Skip to content

Epic: Subagent Foundation #2

@prosdev

Description

@prosdev

Description

This epic focuses on extending the core functionality with a subagent system that enables specialized tasks within the dev-agent ecosystem. The Subagent Foundation provides a framework for coordinating multiple AI-driven agents that assist with code analysis, planning, and context provision.

Architecture: Context provision and read-only analysis agents that work together to reduce AI hallucinations by providing rich, accurate context.

Goals

  1. ✅ Create a robust subagent coordinator for managing multiple specialized agents
  2. ✅ Implement a communication protocol between subagents
  3. ✅ Develop the planner subagent for task breakdown and organization
  4. ✅ Build the explorer subagent for pattern discovery and code exploration
  5. ✅ Create the GitHub context subagent for indexing and searching issues/PRs

Acceptance Criteria

  • ✅ Subagent coordinator successfully manages the lifecycle of multiple agents
  • ✅ Communication protocol allows efficient message passing between agents
  • ✅ Planner subagent can analyze GitHub issues and break them down into actionable tasks
  • ✅ Explorer subagent identifies patterns, similar code, and relationships across repositories
  • ✅ GitHub context subagent indexes and searches GitHub issues/PRs, linking them to code
  • ✅ All components are thoroughly tested with >80% test coverage (achieved 100% for utilities!)
  • ✅ Documentation is comprehensive and clear

Definition of Done

  • ✅ All code passes linting, formatting, and type checking
  • ✅ All tests are passing with >= 80% coverage (557 tests passing, 100% utils coverage)
  • ✅ Documentation is complete, including API reference and user guides
  • ✅ Real-world dogfooding: Used Planner to break down Issue Implement Planner Subagent #8, Explorer for code discovery
  • ✅ Agents successfully coordinate through message passing

Completed Work

Coordinator (Issue #7)

  • Message routing and agent lifecycle management
  • Context sharing between agents
  • Health checks and graceful shutdown
  • 17 integration tests

Planner Subagent (Issue #8)

  • Analyzes GitHub issues via gh CLI
  • Breaks issues into actionable tasks with effort estimates
  • CLI command: dev plan <issue-number>
  • 65 tests (50 utils + 15 integration)

Explorer Subagent (Issue #9)

  • Pattern discovery across codebase
  • Similar code identification
  • Relationship mapping
  • CLI commands: dev explore pattern/similar/relationships
  • 123 tests (90 utils + 33 integration)

GitHub Context Subagent (Issue #10)

  • Indexes GitHub issues, PRs, discussions
  • Semantic search with relevance scoring
  • Links GitHub items to code files
  • CLI commands: dev gh index/search/context
  • 61 tests (47 parser + 14 integration)

Future Work

Automation Layer (Future Epic #3):
The PR subagent originally planned for this epic has been deferred to a future automation-focused epic. Our current focus is on context provision (read-only analysis) rather than automation (write operations).

Future automation capabilities could include:

Impact

  • Total Tests: 557 passing (30 test files)
  • Utility Coverage: 100% for all subagents
  • Documentation: 4 comprehensive READMEs (2,000+ lines)
  • Lines Added: ~8,000 (including tests and docs)
  • Real-world validation: Successfully dogfooded during development

Priority: High (Core foundation for agent system)

Sub-issues

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions