2025-12-28 17:40:51 +09:00
|
|
|
# AGENTS KNOWLEDGE BASE
|
|
|
|
|
|
|
|
|
|
## OVERVIEW
|
2026-01-13 21:00:00 +09:00
|
|
|
AI agent definitions for multi-model orchestration, delegating tasks to specialized experts.
|
2025-12-28 17:40:51 +09:00
|
|
|
|
|
|
|
|
## STRUCTURE
|
|
|
|
|
```
|
|
|
|
|
agents/
|
2026-01-17 19:16:49 +09:00
|
|
|
├── orchestrator-sisyphus.ts # Orchestrator agent (1531 lines) - 7-section delegation, wisdom
|
|
|
|
|
├── sisyphus.ts # Main Sisyphus prompt (640 lines)
|
2026-01-09 15:44:06 +09:00
|
|
|
├── sisyphus-junior.ts # Junior variant for delegated tasks
|
2026-01-09 02:24:43 +09:00
|
|
|
├── oracle.ts # Strategic advisor (GPT-5.2)
|
2026-01-13 21:00:00 +09:00
|
|
|
├── librarian.ts # Multi-repo research (GLM-4.7-free)
|
2026-01-09 02:24:43 +09:00
|
|
|
├── explore.ts # Fast codebase grep (Grok Code)
|
2026-01-15 15:53:51 +09:00
|
|
|
├── frontend-ui-ux-engineer.ts # UI generation (Gemini 3 Pro Preview)
|
|
|
|
|
├── document-writer.ts # Technical docs (Gemini 3 Pro Preview)
|
2026-01-09 02:24:43 +09:00
|
|
|
├── multimodal-looker.ts # PDF/image analysis (Gemini 3 Flash)
|
2026-01-17 19:16:49 +09:00
|
|
|
├── prometheus-prompt.ts # Planning agent prompt (1196 lines) - interview mode
|
2026-01-13 21:00:00 +09:00
|
|
|
├── metis.ts # Plan Consultant agent - pre-planning analysis
|
|
|
|
|
├── momus.ts # Plan Reviewer agent - plan validation
|
2025-12-28 17:40:51 +09:00
|
|
|
├── build-prompt.ts # Shared build agent prompt
|
|
|
|
|
├── plan-prompt.ts # Shared plan agent prompt
|
2026-01-15 15:53:51 +09:00
|
|
|
├── sisyphus-prompt-builder.ts # Factory for orchestrator prompts
|
2025-12-28 17:40:51 +09:00
|
|
|
├── types.ts # AgentModelConfig interface
|
|
|
|
|
├── utils.ts # createBuiltinAgents(), getAgentName()
|
|
|
|
|
└── index.ts # builtinAgents export
|
|
|
|
|
```
|
|
|
|
|
|
2026-01-09 02:24:43 +09:00
|
|
|
## HOW TO ADD AN AGENT
|
2026-01-13 21:00:00 +09:00
|
|
|
1. Create `src/agents/my-agent.ts` exporting `AgentConfig`.
|
|
|
|
|
2. Add to `builtinAgents` in `src/agents/index.ts`.
|
|
|
|
|
3. Update `types.ts` if adding new config interfaces.
|
2025-12-28 17:40:51 +09:00
|
|
|
|
2026-01-09 02:24:43 +09:00
|
|
|
## MODEL FALLBACK LOGIC
|
2026-01-13 21:00:00 +09:00
|
|
|
`createBuiltinAgents()` handles resolution:
|
|
|
|
|
1. User config override (`agents.{name}.model`).
|
|
|
|
|
2. Environment-specific settings (max20, antigravity).
|
|
|
|
|
3. Hardcoded defaults in `index.ts`.
|
2025-12-28 17:40:51 +09:00
|
|
|
|
2026-01-17 19:16:49 +09:00
|
|
|
## SHARED PROMPTS
|
|
|
|
|
- **7-Section Delegation**: `orchestrator-sisyphus.ts` uses strict phases (0-6) for classification, research, planning, validation.
|
|
|
|
|
- **Wisdom Notepad**: Persistent scratchpad preserving project-specific learnings across turns.
|
|
|
|
|
- **Interview Mode**: `Prometheus` defaults to conversational consultant mode for requirement extraction.
|
|
|
|
|
- **build-prompt.ts**: Unified base for Sisyphus and Builder variants.
|
|
|
|
|
- **plan-prompt.ts**: Core planning logic shared across planning agents.
|
|
|
|
|
|
2026-01-13 21:00:00 +09:00
|
|
|
## ANTI-PATTERNS
|
|
|
|
|
- **Trusting reports**: NEVER trust subagent self-reports; always verify outputs.
|
|
|
|
|
- **High temp**: Don't use >0.3 for code agents (Sisyphus/Prometheus use 0.1).
|
2026-01-16 17:34:40 +09:00
|
|
|
- **Sequential calls**: Prefer `delegate_task` with `run_in_background` for parallelism.
|