Merge remote-tracking branch 'origin/agent-sync-features'
This commit is contained in:
249
AGENTS.md
249
AGENTS.md
@@ -41,132 +41,52 @@ Agent: Runs full pipeline for issue #42 with Gitea logging
|
||||
These agents are invoked automatically by `/pipeline` or manually via `@mention`:
|
||||
|
||||
### Core Development
|
||||
| Agent | Role | Model | Variant | Can Call |
|
||||
|-------|------|-------|---------|----------|
|
||||
| `@requirement-refiner` | Converts ideas to User Stories | glm-5.1 | thinking | history-miner, system-analyst |
|
||||
| `@history-miner` | Finds duplicates in git | nemotron-3-super | — | *(read-only)* |
|
||||
| `@system-analyst` | Designs specifications | glm-5.1 | thinking | sdet-engineer, orchestrator |
|
||||
| `@sdet-engineer` | Writes tests (TDD) | qwen3-coder:480b | thinking | lead-developer, orchestrator |
|
||||
| `@lead-developer` | Implements code | qwen3-coder:480b | thinking | code-skeptic, orchestrator |
|
||||
| `@frontend-developer` | UI (Next.js, Vue/Nuxt, React) | qwen3-coder:480b | — | code-skeptic, visual-tester, orchestrator |
|
||||
| `@backend-developer` | Node.js/Express/APIs | qwen3-coder:480b | — | code-skeptic, orchestrator |
|
||||
| `@php-developer` | PHP/Laravel/Symfony/WordPress | qwen3-coder:480b | thinking | code-skeptic, security-auditor, orchestrator |
|
||||
| `@python-developer` | Python/Django/FastAPI | qwen3-coder:480b | thinking | code-skeptic, security-auditor, orchestrator |
|
||||
| `@go-developer` | Go backend services | qwen3-coder:480b | — | code-skeptic, orchestrator |
|
||||
| `@flutter-developer` | Flutter mobile apps | qwen3-coder:480b | — | code-skeptic, orchestrator |
|
||||
| Agent | Role | When Invoked |
|
||||
|-------|------|--------------|
|
||||
| `@RequirementRefiner` | Converts vague ideas and bug reports into strict User Stories with acceptance criteria checklists | Issue status: new |
|
||||
| `@HistoryMiner` | Analyzes git history to find duplicates and past solutions, preventing regression and duplicate work | Status: planned |
|
||||
| `@SystemAnalyst` | Designs technical specifications, data schemas, and API contracts before implementation | Status: researching |
|
||||
| `@SdetEngineer` | Writes tests following TDD methodology | Status: designed |
|
||||
| `@LeadDeveloper` | Primary code writer for backend and core logic | Status: testing |
|
||||
| `@FrontendDeveloper` | Handles UI implementation with multimodal capabilities | When UI work needed |
|
||||
| `@BackendDeveloper` | Backend specialist for Node | When backend needed |
|
||||
| `@GoDeveloper` | Go backend specialist for Gin, Echo, APIs, and database integration | When Go backend needed |
|
||||
| `@DevopsEngineer` | DevOps specialist for Docker, Kubernetes, CI/CD pipeline automation, and infrastructure management | When deployment/infra needed |
|
||||
|
||||
### Quality Assurance
|
||||
| Agent | Role | Model | Variant | Can Call |
|
||||
|-------|------|-------|---------|----------|
|
||||
| `@code-skeptic` | Adversarial review | minimax-m2.5 | — | the-fixer, performance-engineer, orchestrator |
|
||||
| `@the-fixer` | Fixes issues | minimax-m2.5 | — | code-skeptic, orchestrator |
|
||||
| `@performance-engineer` | Performance review | nemotron-3-super | — | the-fixer, security-auditor, orchestrator |
|
||||
| `@security-auditor` | Security audit | nemotron-3-super | — | the-fixer, release-manager, orchestrator |
|
||||
| `@visual-tester` | Visual regression + bbox extraction + console/network errors | qwen3-coder:480b | — | the-fixer, orchestrator |
|
||||
| `@browser-automation` | E2E testing | qwen3-coder:480b | — | orchestrator |
|
||||
| Agent | Role | When Invoked |
|
||||
|-------|------|--------------|
|
||||
| `@CodeSkeptic` | Adversarial code reviewer | Status: implementing |
|
||||
| `@TheFixer` | Iteratively fixes bugs based on specific error reports and test failures | When review fails |
|
||||
| `@PerformanceEngineer` | Reviews code for performance issues | After code-skeptic |
|
||||
| `@SecurityAuditor` | Scans for security vulnerabilities, OWASP Top 10, dependency CVEs, and hardcoded secrets | After performance |
|
||||
| `@VisualTester` | Visual regression testing agent that compares screenshots and detects UI differences using pixelmatch and image diff | When UI changes |
|
||||
|
||||
### DevOps & Infrastructure
|
||||
| Agent | Role | Model | Variant | Can Call |
|
||||
|-------|------|-------|---------|----------|
|
||||
| `@devops-engineer` | Docker/K8s/CI-CD | nemotron-3-super | — | code-skeptic, security-auditor, orchestrator |
|
||||
| `@release-manager` | Git operations, releases | glm-5.1 | — | evaluator |
|
||||
|
||||
### Meta & Process
|
||||
| Agent | Role | Model | Variant | Can Call |
|
||||
|-------|------|-------|---------|----------|
|
||||
| `@evaluator` | Scores effectiveness | glm-5.1 | thinking | prompt-optimizer, product-owner, orchestrator |
|
||||
| `@pipeline-judge` | Objective fitness scoring | glm-5.1 | — | prompt-optimizer |
|
||||
| `@prompt-optimizer` | Improves prompts | glm-5.1 | instant | *(edits files)* |
|
||||
| `@product-owner` | Manages issues/tracking | glm-5.1 | — | *(read-only)* |
|
||||
|
||||
### Analysis & Design
|
||||
| Agent | Role | Model | Variant | Can Call |
|
||||
|-------|------|-------|---------|----------|
|
||||
| `@capability-analyst` | Analyzes task coverage | glm-5.1 | — | agent-architect, orchestrator |
|
||||
| `@agent-architect` | Creates new agents | glm-5.1 | thinking | capability-analyst, requirement-refiner, system-analyst |
|
||||
| `@workflow-architect` | Creates workflows | glm-5.1 | thinking | *(edits files)* |
|
||||
| `@markdown-validator` | Validates Markdown | nemotron-3-nano:30b | — | orchestrator |
|
||||
| `@architect-indexer` | Maps project codebase into .architect/ | glm-5.1 | thinking | system-analyst, orchestrator |
|
||||
| Agent | Role | When Invoked |
|
||||
|-------|------|--------------|
|
||||
| `@devops-engineer` | Docker/Swarm/K8s deployment | When deployment needed |
|
||||
| `@security-auditor` | Container security scan | After deployment config |
|
||||
|
||||
### Cognitive Enhancement
|
||||
| Agent | Role | Model | Variant | Can Call |
|
||||
|-------|------|-------|---------|----------|
|
||||
| `@planner` | Task decomposition | nemotron-3-super | — | *(read-only)* |
|
||||
| `@reflector` | Self-reflection | nemotron-3-super | — | *(read-only)* |
|
||||
| `@memory-manager` | Memory systems | nemotron-3-super | — | *(read-only)* |
|
||||
| Agent | Role | When Invoked |
|
||||
|-------|------|--------------|
|
||||
| `@Planner` | Advanced task planner using Chain of Thought, Tree of Thoughts, and Plan-Execute-Reflect | Complex tasks |
|
||||
| `@Reflector` | Self-reflection agent using Reflexion pattern - learns from mistakes | After each agent |
|
||||
| `@MemoryManager` | Manages agent memory systems - short-term (context), long-term (vector store), and episodic (experiences) | Context management |
|
||||
|
||||
## Workflow State Machine
|
||||
|
||||
```
|
||||
[new]
|
||||
↓ @requirement-refiner
|
||||
[planned]
|
||||
↓ @capability-analyst → (gaps?) → @agent-architect → create new agents
|
||||
↓ @history-miner
|
||||
[researching]
|
||||
↓ @system-analyst
|
||||
[designed]
|
||||
↓ @sdet-engineer (writes failing tests)
|
||||
[testing]
|
||||
↓ @lead-developer (makes tests pass)
|
||||
[implementing]
|
||||
↓ @code-skeptic (review)
|
||||
[reviewing] ──[fail]──→ [fixing] ──→ [reviewing]
|
||||
↓ @review-watcher → (auto-validate) → create fix tasks
|
||||
↓ [pass]
|
||||
[perf-check]
|
||||
↓ @performance-engineer
|
||||
[security-check]
|
||||
↓ @security-auditor
|
||||
[releasing]
|
||||
↓ @release-manager
|
||||
[evaluated]
|
||||
↓ @evaluator (subjective score 1-10)
|
||||
├── [score ≥ 7] → [@pipeline-judge] → fitness scoring
|
||||
└── [score < 7] → @prompt-optimizer → [@evaluated]
|
||||
↓
|
||||
[@pipeline-judge] ← runs tests, measures tokens/time
|
||||
↓
|
||||
fitness score
|
||||
↓
|
||||
┌──────────────────────────────────────┐
|
||||
│ fitness >= 0.85 │──→ [completed]
|
||||
│ fitness 0.70-0.84 │──→ @prompt-optimizer → [evolving]
|
||||
│ fitness < 0.70 │──→ @prompt-optimizer (major) → [evolving]
|
||||
│ fitness < 0.50 │──→ @agent-architect → redesign
|
||||
└──────────────────────────────────────┘
|
||||
↓
|
||||
[evolving] → re-run workflow → [@pipeline-judge]
|
||||
↓
|
||||
compare fitness_before vs fitness_after
|
||||
↓
|
||||
[improved?] → commit prompts → [completed]
|
||||
└─ [not improved?] → revert → try different strategy
|
||||
```
|
||||
|
||||
## Capability Analysis Flow
|
||||
|
||||
When starting a complex task:
|
||||
|
||||
```
|
||||
[User Request]
|
||||
↓
|
||||
[@capability-analyst] ← Analyzes requirements vs existing capabilities
|
||||
↓
|
||||
[Gap Analysis] ← Identifies missing agents, workflows, skills
|
||||
↓
|
||||
[Recommendations] → Create new or enhance existing?
|
||||
↓
|
||||
[Decision]
|
||||
├── [Create New] → [@agent-architect] → Create component → Review
|
||||
└── [Enhance] → [@lead-developer] → Modify existing
|
||||
↓
|
||||
[Integration] ← Verify new component works with system
|
||||
↓
|
||||
[Complete] ← Task can now be handled
|
||||
```
|
||||
|
||||
## Gitea Integration
|
||||
### Meta & Process
|
||||
| Agent | Role | When Invoked |
|
||||
|-------|------|--------------|
|
||||
| `@Orchestrator` | Main dispatcher | Manages all agent routing |
|
||||
| `@ReleaseManager` | Manages git operations, semantic versioning, branching, and deployments | Status: releasing |
|
||||
| `@Evaluator` | Scores agent effectiveness after task completion for continuous improvement | Status: evaluated |
|
||||
| `@PromptOptimizer` | Improves agent system prompts based on performance failures | When score < 7 |
|
||||
| `@ProductOwner` | Manages issue checklists, status labels, tracks progress and coordinates with human users | Manages issues |
|
||||
| `@AgentArchitect` | Creates, modifies, and reviews new agents, workflows, and skills based on capability gap analysis | When gaps identified |
|
||||
| `@CapabilityAnalyst` | Analyzes task requirements against available agents, workflows, and skills | When starting new task |
|
||||
| `@WorkflowArchitect` | Creates and maintains workflow definitions with complete architecture, Gitea integration, and quality gates | New workflow needed |
|
||||
| `@MarkdownValidator` | Validates and corrects Markdown descriptions for Gitea issues | Before issue creation |
|
||||
|
||||
### Status Labels
|
||||
|
||||
@@ -299,68 +219,45 @@ where:
|
||||
| `.architect/` | Project codebase map (auto-indexed, see below) |
|
||||
| `src/kilocode/` | TypeScript API for programmatic use |
|
||||
|
||||
## `.architect/` Project Mapping
|
||||
## Skills Reference
|
||||
|
||||
The `.architect/` directory is the **project brain** — a structured, auto-indexed map of the codebase that all agents read before starting work.
|
||||
### Containerization Skills
|
||||
| Skill | Purpose | Location |
|
||||
|-------|---------|----------|
|
||||
| `docker-compose` | Multi-container orchestration | `.kilo/skills/docker-compose/` |
|
||||
| `docker-swarm` | Production cluster deployment | `.kilo/skills/docker-swarm/` |
|
||||
| `docker-security` | Container security hardening | `.kilo/skills/docker-security/` |
|
||||
| `docker-monitoring` | Container monitoring/logging | `.kilo/skills/docker-monitoring/` |
|
||||
|
||||
### When Is It Used
|
||||
### Node.js Skills
|
||||
| Skill | Purpose | Location |
|
||||
|-------|---------|----------|
|
||||
| `nodejs-express-patterns` | Express routing, middleware | `.kilo/skills/nodejs-express-patterns/` |
|
||||
| `nodejs-auth-jwt` | JWT authentication | `.kilo/skills/nodejs-auth-jwt/` |
|
||||
| `nodejs-security-owasp` | OWASP security | `.kilo/skills/nodejs-security-owasp/` |
|
||||
|
||||
1. **Orchestrator first contact**: Before routing any task, checks `.architect/state.json`
|
||||
2. **Stale or missing**: Triggers `architect-indexer` to build/update
|
||||
3. **Fresh**: Agents read relevant sections for context
|
||||
4. **After changes**: `lead-developer`/`the-fixer` mark affected sections as stale
|
||||
### Database Skills
|
||||
| Skill | Purpose | Location |
|
||||
|-------|---------|----------|
|
||||
| `postgresql-patterns` | PostgreSQL patterns | `.kilo/skills/postgresql-patterns/` |
|
||||
| `sqlite-patterns` | SQLite patterns | `.kilo/skills/sqlite-patterns/` |
|
||||
| `clickhouse-patterns` | ClickHouse patterns | `.kilo/skills/clickhouse-patterns/` |
|
||||
|
||||
### Structure
|
||||
### Go Skills
|
||||
| Skill | Purpose | Location |
|
||||
|-------|---------|----------|
|
||||
| `go-modules` | Go modules management | `.kilo/skills/go-modules/` |
|
||||
| `go-concurrency` | Goroutines and channels | `.kilo/skills/go-concurrency/` |
|
||||
| `go-testing` | Go testing patterns | `.kilo/skills/go-testing/` |
|
||||
| `go-security` | Go security patterns | `.kilo/skills/go-security/` |
|
||||
|
||||
```
|
||||
.architect/
|
||||
├── README.md # Navigation index (auto-updated)
|
||||
├── project.json # Machine-readable project metadata
|
||||
├── state.json # Index freshness state (hashes, timestamps)
|
||||
├── architecture/
|
||||
│ ├── overview.md # Architecture pattern, layers, boundaries
|
||||
│ └── dependency-graph.md # Module dependency graph
|
||||
├── entities/
|
||||
│ └── entities.md # Domain entities, fields, relationships
|
||||
├── db-schema/
|
||||
│ └── schema.md # Tables, columns, indexes, foreign keys
|
||||
├── api-surface/
|
||||
│ └── endpoints.md # API endpoints, methods, auth, controllers
|
||||
├── conventions/
|
||||
│ └── conventions.md # Naming, patterns, forbidden practices
|
||||
├── maps/
|
||||
│ ├── file-graph.json # Programmatic file→imports/exports graph
|
||||
│ └── module-graph.json # Programmatic module→dependencies graph
|
||||
└── tech-stack/
|
||||
└── stack.md # Languages, frameworks, databases, tools
|
||||
```
|
||||
|
||||
### Context Injection Per Agent
|
||||
|
||||
| Agent | `.architect/` Sections |
|
||||
|-------|----------------------|
|
||||
| system-analyst | architecture/overview, entities, db-schema, api-surface |
|
||||
| sdet-engineer | api-surface, entities, conventions |
|
||||
| lead-developer | conventions, entities, architecture/overview |
|
||||
| code-skeptic | conventions, architecture/dependency-graph |
|
||||
| the-fixer | conventions, relevant file section |
|
||||
| php-developer | conventions, entities, db-schema, api-surface |
|
||||
| python-developer | conventions, entities, db-schema, api-surface |
|
||||
| go-developer | conventions, entities, db-schema, api-surface |
|
||||
| frontend-developer | conventions, api-surface, architecture/overview |
|
||||
| backend-developer | conventions, entities, db-schema, api-surface |
|
||||
|
||||
### Staleness Triggers
|
||||
|
||||
| Event | Sections Marked Stale |
|
||||
|-------|----------------------|
|
||||
| New/removed file | file_graph, module_graph |
|
||||
| New dependency | tech_stack (full reindex) |
|
||||
| New migration | db_schema |
|
||||
| New model/entity | entities |
|
||||
| New API endpoint | api_surface |
|
||||
| Convention change | conventions |
|
||||
| Structural refactor | architecture_overview, dependency_graph |
|
||||
### Process Skills
|
||||
| Skill | Purpose | Location |
|
||||
|-------|---------|----------|
|
||||
| `planning-patterns` | CoT/ToT planning | `.kilo/skills/planning-patterns/` |
|
||||
| `memory-systems` | Memory management | `.kilo/skills/memory-systems/` |
|
||||
| `tool-use` | Tool usage patterns | `.kilo/skills/tool-use/` |
|
||||
| `research-cycle` | Self-improvement cycle | `.kilo/skills/research-cycle/` |
|
||||
|
||||
## Using the TypeScript API
|
||||
|
||||
|
||||
Reference in New Issue
Block a user