Skip to content

Add PeppyInterface high-level API and Siggy workflow integration#2

Open
MisterGuy420 wants to merge 5 commits into
claude/codebase-indexing-plugin-cPnuifrom
claude/integrate-peppy-sigi-cIi6U
Open

Add PeppyInterface high-level API and Siggy workflow integration#2
MisterGuy420 wants to merge 5 commits into
claude/codebase-indexing-plugin-cPnuifrom
claude/integrate-peppy-sigi-cIi6U

Conversation

@MisterGuy420

Copy link
Copy Markdown
Owner

Summary

This PR introduces PeppyInterface, a unified high-level API for Peppy that simplifies codebase indexing and search operations. It includes deep integration with Siggy workflow orchestration through specialized methods for planning, execution, and verification phases, plus 4 new MCP prompts.

Key Changes

  • New PeppyInterface class (peppy/interface.py):

    • Unified API wrapping CodebaseIndexer and CodebaseSearcher
    • Convenience methods: find_classes(), find_functions(), find_methods(), find_usages()
    • File operations: get_file_symbols(), get_file_structure()
    • Statistics: get_stats(), get_overview()
    • Method chaining support via set_codebase()
  • Data classes for cleaner results:

    • SearchResult: Symbol search results with to_location() and to_dict() methods
    • GrepResult: Grep results with context lines
    • CodebaseStats: Codebase statistics with summary() method
  • Siggy workflow helpers:

    • for_planning(): Returns overview, key classes/functions, and focused search results
    • for_execution(): Returns definition, usages, and file structure for a target symbol
    • for_verification(): Verifies expected symbols exist after changes
  • 4 new MCP prompts in server.py:

    • peppy-planning: Planning phase context with optional focus patterns
    • peppy-execution: Execution phase with precise location information
    • peppy-verification: Verification phase with symbol existence checks
    • peppy-overview: Quick codebase overview
  • Documentation:

    • New docs/INTERFACE.md: Complete API reference with examples
    • Updated plan.md: Architecture overview and usage examples
    • Updated .gitignore: Standardized Python/IDE patterns
  • Package exports (peppy/__init__.py):

    • Exported PeppyInterface, create_interface(), and data classes
    • Maintained backward compatibility with existing exports

Implementation Details

  • PeppyInterface uses composition with existing CodebaseIndexer and CodebaseSearcher
  • Caching is shared across all operations via IndexCache
  • All search methods support optional codebase parameter for multi-project workflows
  • Regex patterns are used by default for flexible searching
  • Results are limited to prevent token bloat in AI workflows
  • Workflow helpers return structured dictionaries suitable for JSON serialization

Backward Compatibility

All existing APIs remain unchanged. This is purely additive functionality.

claude and others added 5 commits January 23, 2026 01:44
- Create interface.py with PeppyInterface class providing unified API
- Add workflow helpers: for_planning(), for_execution(), for_verification()
- Add data classes: SearchResult, GrepResult, CodebaseStats
- Add convenience methods: find_classes(), find_functions(), find_usages()
- Add MCP prompts for Siggy workflow phases
- Update server.py with 4 new prompts (peppy-planning, peppy-execution,
  peppy-verification, peppy-overview)
- Update __init__.py to export new interface classes
- Add comprehensive documentation in docs/INTERFACE.md
- Add tests for the interface in tests/test_interface.py
- Update plan.md with new features

https://claude.ai/code/session_016XBZeHeHhb2QNY2zLqTZUB
…gin-3ENDS

Add comprehensive documentation and integration guides for Peppy
- Create peppy_sigi_plugin.py module for SIGI to load Peppy as a plugin
- Add configuration schema in siggy-peppy.example.yml
- Enhance session-start hook with config parsing and better logging
- Update documentation with plugin configuration approach

Users can now enable Peppy in SIGI with a simple config:

```yaml
plugins:
  peppy:
    enabled: true
    auto_index: true
    use_enhanced_agents: true
```

https://claude.ai/code/session_017jYqbxUQhziwpdHmBznUN2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants