CLI Interface
↓
Master Supervisor (Orchestrator)
├── Research Supervisor
│ ├── Documentation Search Agent
│ └── Context Analysis Agent
│
├── [HUMAN VALIDATION CHECKPOINT #1]
│ • Validate research findings
│ • Approve orchestration plan
│
├── Development Supervisor
│ ├── Code Generation Agent
│ └── Test Environment Agent
│
├── QA Supervisor
│ ├── Code Validation Agent
│ └── Test Orchestration Agent
│
└── [HUMAN VALIDATION CHECKPOINT #2]
• Review generated code
• Verify test results
• Approve for completion
- Run with any model: Easily changeable to any model
- Tool Orchestration Over Reinvention: Agents act as intelligent coordinators of existing CHT tools (cht-conf, cht-toolbox, cht-datasource, cht-docs, npm scripts) rather than implementing custom validation
- Context-Based Learning: Lightweight file-based memory system that mirrors CHT repository structure
- Incremental Value Delivery: Each agent provides immediate value while building knowledge over time
- Developer-Friendly Integration: Seamless integration with existing npm scripts and development workflows
For WIP, you can find more design details here
The Research Supervisor and its underlying agents have been implemented:
- Documentation Search Agent: Searches CHT documentation (currently mocked, will integrate with Kapa.AI MCP server)
- Context Analysis Agent: Analyzes past implementations and identifies reusable patterns
- Research Supervisor: Orchestrates the research phase using LangGraph workflow
cht-agent/
├── src/
│ ├── agents/
│ │ ├── documentation-search-agent.ts # Doc search with mocked MCP
│ │ └── context-analysis-agent.ts # Context analysis
│ ├── supervisors/
│ │ └── research-supervisor.ts # LangGraph orchestration
│ ├── types/
│ │ └── index.ts # TypeScript interfaces
│ ├── utils/
│ │ └── context-loader.ts # Context file utilities
│ └── examples/
│ └── research-supervisor-example.ts # Demo script
├── agent-memory/ # Context storage (auto-created)
│ ├── domains/ # Domain contexts
│ ├── workflows/ # Workflow contexts
│ ├── knowledge-base/ # Resolved issues
│ └── indices/ # Lookup tables
└── tickets/ # Issue tickets to process
- Node.js >= 20.0.0
- Anthropic API key
# Install dependencies
npm install
# Create .env file with your API key
cp .env.example .env
# Edit .env and add your ANTHROPIC_API_KEY
# Build the project
npm run build# Run the Research Supervisor demo
npm run example:researchThis will demonstrate the complete research workflow:
- Documentation Search (using mocked Kapa.AI responses)
- Context Analysis (analyzing past implementations)
- Orchestration Plan Generation (creating implementation plan)
The example processes a sample issue and outputs:
- Documentation references found
- Similar past implementations
- Reusable patterns identified
- Implementation phases
- Risk factors
- Effort estimates
# Watch mode for development
npm run dev
# Lint code
npm run lint
# Build
npm run build- MCP Integration: Connect Documentation Search Agent to Kapa.AI MCP server
- Context Population: Populate agent-memory with actual CHT domain contexts
- Development Supervisor: Implement code generation and test environment agents
- QA Supervisor: Implement validation and test orchestration agents
- CLI Interface: Build command-line interface for issue processing