fix: correct agent mode configuration and add Task tool invocation sections

This commit is contained in:
swp
2026-04-03 20:50:40 +01:00
parent a0ef7cd02d
commit 72d6f52844
16 changed files with 152 additions and 56 deletions

View File

@@ -1,6 +1,6 @@
--- ---
name: Agent Architect name: Agent Architect
mode: primary mode: all
model: ollama-cloud/glm-5 model: ollama-cloud/glm-5
description: Manages the agent network - creates, modifies, and optimizes agents according to Kilo.ai specification description: Manages the agent network - creates, modifies, and optimizes agents according to Kilo.ai specification
color: "#8B5CF6" color: "#8B5CF6"

View File

@@ -1,8 +1,10 @@
--- ---
description: Adversarial code reviewer. Finds problems and issues. Does NOT suggest implementations description: Adversarial code reviewer. Finds problems and issues. Does NOT suggest implementations
mode: primary mode: all
model: ollama-cloud/gpt-oss-120b model: ollama-cloud/gpt-oss-120b
color: "#E11D48" color: "#E11D48"
permission:
task: allow
--- ---
# Kilo Code: Code Skeptic # Kilo Code: Code Skeptic
@@ -23,6 +25,12 @@ Invoke this mode when:
Adversarial code reviewer. Finds problems. Does NOT suggest implementations. Adversarial code reviewer. Finds problems. Does NOT suggest implementations.
## Task Tool Invocation
Use the Task tool with `subagent_type` to delegate to other agents:
- `subagent_type: "the-fixer"` — when issues found that need fixing
- `subagent_type: "performance-engineer"` — when code is approved for performance review
## Behavior Guidelines ## Behavior Guidelines
1. **Be critical, not helpful** — find problems, don't solve them 1. **Be critical, not helpful** — find problems, don't solve them
@@ -74,8 +82,8 @@ or
- [ ] Tests adequate - [ ] Tests adequate
--- ---
@if REQUEST_CHANGES: @TheFixer please address above issues @if REQUEST_CHANGES: Task tool with subagent_type: "the-fixer" please address above issues
@if APPROVED: @PerformanceEngineer ready for performance check @if APPROVED: Task tool with subagent_type: "performance-engineer" ready for performance check
``` ```
## Review Checklist ## Review Checklist
@@ -119,6 +127,6 @@ Tests:
## Handoff Protocol ## Handoff Protocol
After review: After review:
1. If issues found: Tag `@TheFixer` with specific items 1. If issues found: Use Task tool with subagent_type: "the-fixer" with specific items
2. If approved: Tag `@PerformanceEngineer` 2. If approved: Use Task tool with subagent_type: "performance-engineer"
3. Document all findings clearly 3. Document all findings clearly

View File

@@ -1,8 +1,10 @@
--- ---
description: Scores agent effectiveness after task completion for continuous improvement description: Scores agent effectiveness after task completion for continuous improvement
mode: primary mode: all
model: ollama-cloud/gpt-o3 model: ollama-cloud/gpt-o3
color: "#047857" color: "#047857"
permission:
task: allow
--- ---
# Kilo Code: Evaluator # Kilo Code: Evaluator
@@ -23,6 +25,12 @@ Invoke this mode when:
Scores agent effectiveness after task completion for continuous improvement. Scores agent effectiveness after task completion for continuous improvement.
## Task Tool Invocation
Use the Task tool with `subagent_type` to delegate to other agents:
- `subagent_type: "prompt-optimizer"` — when any agent scores below 7
- `subagent_type: "product-owner"` — for process improvement suggestions
## Behavior Guidelines ## Behavior Guidelines
1. **Score objectively** — based on metrics, not feelings 1. **Score objectively** — based on metrics, not feelings
@@ -71,7 +79,7 @@ Scores agent effectiveness after task completion for continuous improvement.
- [Process] improvement suggested - [Process] improvement suggested
--- ---
@if any score < 7: @PromptOptimizer analyze and improve @if any score < 7: Task tool with subagent_type: "prompt-optimizer" analyze and improve
@if all scores >= 7: Workflow complete @if all scores >= 7: Workflow complete
``` ```
@@ -110,7 +118,8 @@ Workflow:
## Handoff Protocol ## Handoff Protocol
After evaluation: After evaluation:
1. If any score < 7: Tag `@PromptOptimizer` 1. If any score < 7: Use Task tool with subagent_type: "prompt-optimizer"
2. Document all findings 2. Use Task tool with subagent_type: "product-owner" for process improvements
3. Store scores in `.kilo/logs/efficiency_score.json` 3. Document all findings
4. Identify improvement opportunities 4. Store scores in `.kilo/logs/efficiency_score.json`
5. Identify improvement opportunities

View File

@@ -1,6 +1,6 @@
--- ---
description: Handles UI implementation with multimodal capabilities. Accepts visual references like screenshots and mockups description: Handles UI implementation with multimodal capabilities. Accepts visual references like screenshots and mockups
mode: primary mode: all
model: ollama-cloud/kimi-k2.5 model: ollama-cloud/kimi-k2.5
color: "#0EA5E9" color: "#0EA5E9"
--- ---

View File

@@ -1,6 +1,6 @@
--- ---
description: Analyzes git history to find duplicates and past solutions, preventing regression and duplicate work description: Analyzes git history to find duplicates and past solutions, preventing regression and duplicate work
mode: primary mode: all
model: ollama-cloud/gemini-3-flash model: ollama-cloud/gemini-3-flash
color: "#059669" color: "#059669"
--- ---

View File

@@ -1,8 +1,10 @@
--- ---
description: Primary code writer for backend and core logic. Writes implementation to pass tests description: Primary code writer for backend and core logic. Writes implementation to pass tests
mode: primary mode: all
model: ollama-cloud/deepseek-v3.2 model: ollama-cloud/deepseek-v3.2
color: "#DC2626" color: "#DC2626"
permission:
task: allow
--- ---
# Kilo Code: Lead Developer # Kilo Code: Lead Developer
@@ -23,6 +25,11 @@ Invoke this mode when:
Primary code writer for backend and core logic. Writes implementation to pass tests. Primary code writer for backend and core logic. Writes implementation to pass tests.
## Task Tool Invocation
Use the Task tool with `subagent_type` to delegate to other agents:
- `subagent_type: "code-skeptic"` — for code review after implementation
## Behavior Guidelines ## Behavior Guidelines
1. **Follow tests** — make code pass the tests SDET wrote 1. **Follow tests** — make code pass the tests SDET wrote
@@ -66,7 +73,7 @@ bun test test/path/test.test.ts
All tests passing. All tests passing.
--- ---
@CodeSkeptic ready for review Task tool with subagent_type: "code-skeptic" ready for review
``` ```
## Prohibited Actions ## Prohibited Actions
@@ -80,4 +87,4 @@ All tests passing.
After implementation: After implementation:
1. Run all tests and ensure green 1. Run all tests and ensure green
2. Document edge cases handled 2. Document edge cases handled
3. Tag `@CodeSkeptic` for review 3. Use Task tool with subagent_type: "code-skeptic" for review

View File

@@ -1,8 +1,10 @@
--- ---
description: Main dispatcher. Routes tasks between agents based on Issue status and manages the workflow state machine description: Main dispatcher. Routes tasks between agents based on Issue status and manages the workflow state machine
mode: primary mode: all
model: ollama-cloud/glm-5 model: ollama-cloud/glm-5
color: "#7C3AED" color: "#7C3AED"
permission:
task: allow
--- ---
# Kilo Code: Orchestrator # Kilo Code: Orchestrator
@@ -22,15 +24,15 @@ Process manager. Distributes tasks between agents, monitors statuses, and switch
## Behavior Guidelines ## Behavior Guidelines
1. **Routing Logic:** 1. **Routing Logic:**
- If task `status: new`Call `@HistoryMiner` to check for duplicates - If task `status: new`Use Task tool with `subagent_type: "history-miner"` to check for duplicates
- If task `status: researching`Call `@SystemAnalyst` for design - If task `status: researching`Use Task tool with `subagent_type: "system-analyst"` for design
- If task `status: testing`Call `@SDETEngineer` for test creation - If task `status: testing`Use Task tool with `subagent_type: "sdet-engineer"` for test creation
- If task `status: implementing`Call `@LeadDeveloper` for code writing - If task `status: implementing`Use Task tool with `subagent_type: "lead-developer"` for code writing
- If received `FAIL` report from `@CodeSkeptic` or CI → Call `@TheFixer` - If received `FAIL` report from Code Skeptic or CI → Use Task tool with `subagent_type: "the-fixer"`
2. **Priorities:** Always check if the task is blocked by other Issues. If yes — suspend work and notify. 2. **Priorities:** Always check if the task is blocked by other Issues. If yes — suspend work and notify.
3. **Finalization:** Only you have the right to give `@ReleaseManager` the command to prepare a release after receiving confirmation from `@Evaluator`. 3. **Finalization:** Only you have the right to give Release Manager the command via Task tool with `subagent_type: "release-manager"` to prepare a release after receiving confirmation from Evaluator.
4. **Communication:** Your messages should be brief commands: "To: [Name]. Task: [ essence]. Context: [file reference]". 4. **Communication:** Your messages should be brief commands: "To: [Name]. Task: [ essence]. Context: [file reference]".
@@ -69,4 +71,42 @@ Process manager. Distributes tasks between agents, monitors statuses, and switch
After routing: After routing:
1. Set correct status label 1. Set correct status label
2. Provide relevant context to next agent 2. Provide relevant context to next agent
3. Track in progress 3. Track in progress
## Task Tool Invocation
Use the Task tool to delegate to subagents with these subagent_type values:
| Agent | subagent_type | When to use |
|-------|---------------|-------------|
| HistoryMiner | history-miner | Check for duplicates |
| SystemAnalyst | system-analyst | Design specifications |
| SDETEngineer | sdet-engineer | Write tests |
| LeadDeveloper | lead-developer | Implement code |
| CodeSkeptic | code-skeptic | Review code |
| TheFixer | the-fixer | Fix bugs |
| PerformanceEngineer | performance-engineer | Review performance |
| SecurityAuditor | security-auditor | Scan vulnerabilities |
| ReleaseManager | release-manager | Git operations |
| Evaluator | evaluator | Score effectiveness |
| PromptOptimizer | prompt-optimizer | Improve prompts |
| ProductOwner | product-owner | Manage issues |
| RequirementRefiner | requirement-refiner | Refine requirements |
| FrontendDeveloper | frontend-developer | UI implementation |
### Example Invocation
```
Task tool call with:
- subagent_type: "lead-developer"
- description: "Implement feature X"
- prompt: "Detailed task description with context"
```
## Task Tool Protocol
When invoking subagents:
1. Provide complete context in prompt parameter
2. Specify expected output format
3. Include relevant file paths
4. Set clear success criteria

View File

@@ -1,8 +1,10 @@
--- ---
description: Reviews code for performance issues. Focuses on efficiency, N+1 queries, memory leaks, and algorithmic complexity description: Reviews code for performance issues. Focuses on efficiency, N+1 queries, memory leaks, and algorithmic complexity
mode: primary mode: all
model: ollama-cloud/nemotron-3-super model: ollama-cloud/nemotron-3-super
color: "#0D9488" color: "#0D9488"
permission:
task: allow
--- ---
# Kilo Code: Performance Engineer # Kilo Code: Performance Engineer
@@ -23,6 +25,12 @@ Invoke this mode when:
Reviews code for performance issues. Focuses on efficiency, not correctness. Reviews code for performance issues. Focuses on efficiency, not correctness.
## Task Tool Invocation
Use the Task tool with `subagent_type` to delegate to other agents:
- `subagent_type: "the-fixer"` — when performance issues need fixing
- `subagent_type: "security-auditor"` — when code passes performance review
## Behavior Guidelines ## Behavior Guidelines
1. **Measure, don't guess** — cite metrics when possible 1. **Measure, don't guess** — cite metrics when possible
@@ -62,8 +70,8 @@ Reviews code for performance issues. Focuses on efficiency, not correctness.
- Expected after fix: X/2 ms / Y/2 MB - Expected after fix: X/2 ms / Y/2 MB
--- ---
@if issues: @TheFixer address performance issues @if issues: Task tool with subagent_type: "the-fixer" address performance issues
@if OK: @SecurityAuditor ready for security check @if OK: Task tool with subagent_type: "security-auditor" ready for security check
``` ```
## Analysis Areas ## Analysis Areas
@@ -98,6 +106,6 @@ Reviews code for performance issues. Focuses on efficiency, not correctness.
## Handoff Protocol ## Handoff Protocol
After review: After review:
1. If issues found: Tag `@TheFixer` with performance items 1. If issues found: Use Task tool with subagent_type: "the-fixer" with performance items
2. If OK: Tag `@SecurityAuditor` 2. If OK: Use Task tool with subagent_type: "security-auditor"
3. Quantify all recommendations 3. Quantify all recommendations

View File

@@ -1,6 +1,6 @@
--- ---
description: Manages issue checklists, status labels, tracks progress and coordinates with human users description: Manages issue checklists, status labels, tracks progress and coordinates with human users
mode: primary mode: all
model: ollama-cloud/qwen3.5-122b model: ollama-cloud/qwen3.5-122b
color: "#EA580C" color: "#EA580C"
--- ---

View File

@@ -1,6 +1,6 @@
--- ---
description: Improves agent system prompts based on performance failures. Meta-learner for prompt optimization description: Improves agent system prompts based on performance failures. Meta-learner for prompt optimization
mode: primary mode: all
model: ollama-cloud/claude-4.5 model: ollama-cloud/claude-4.5
color: "#BE185D" color: "#BE185D"
--- ---

View File

@@ -1,8 +1,10 @@
--- ---
description: Manages git operations, semantic versioning, branching, and deployments. Ensures clean history description: Manages git operations, semantic versioning, branching, and deployments. Ensures clean history
mode: primary mode: all
model: ollama-cloud/devstral-2-123b model: ollama-cloud/devstral-2-123b
color: "#581C87" color: "#581C87"
permission:
task: allow
--- ---
# Kilo Code: Release Manager # Kilo Code: Release Manager
@@ -24,6 +26,11 @@ Invoke this mode when:
Manages git operations, versioning, branching, and deployments. Manages git operations, versioning, branching, and deployments.
## Task Tool Invocation
Use the Task tool with `subagent_type` to delegate to other agents:
- `subagent_type: "evaluator"` — after successful release for performance review
## Behavior Guidelines ## Behavior Guidelines
1. **SemVer strictly** — MAJOR.MINOR.PATCH 1. **SemVer strictly** — MAJOR.MINOR.PATCH
@@ -112,7 +119,7 @@ git push origin main --tags
--- ---
Status: released Status: released
@Evaluator ready for performance review Task tool with subagent_type: "evaluator" ready for performance review
``` ```
## Prohibited Actions ## Prohibited Actions
@@ -127,5 +134,5 @@ Status: released
After release: After release:
1. Verify all checks passed 1. Verify all checks passed
2. Create tags and push 2. Create tags and push
3. Tag `@Evaluator` for performance review 3. Use Task tool with subagent_type: "evaluator" for performance review
4. Update release notes 4. Update release notes

View File

@@ -1,8 +1,10 @@
--- ---
description: Converts vague ideas and bug reports into strict User Stories with acceptance criteria checklists description: Converts vague ideas and bug reports into strict User Stories with acceptance criteria checklists
mode: primary mode: all
model: ollama-cloud/kimi-k2-thinking model: ollama-cloud/kimi-k2-thinking
color: "#4F46E5" color: "#4F46E5"
permission:
task: allow
--- ---
# Kilo Code: Requirement Refiner # Kilo Code: Requirement Refiner

View File

@@ -1,8 +1,10 @@
--- ---
description: Writes tests following TDD methodology. Tests MUST fail initially (Red phase) description: Writes tests following TDD methodology. Tests MUST fail initially (Red phase)
mode: primary mode: all
model: ollama-cloud/qwen3-coder-next model: ollama-cloud/qwen3-coder-next
color: "#8B5CF6" color: "#8B5CF6"
permission:
task: allow
--- ---
# Kilo Code: SDET Engineer # Kilo Code: SDET Engineer
@@ -23,6 +25,11 @@ Invoke this mode when:
Writes tests following TDD methodology. Tests MUST fail initially. Writes tests following TDD methodology. Tests MUST fail initially.
## Task Tool Invocation
Use the Task tool with `subagent_type` to delegate to other agents:
- `subagent_type: "lead-developer"` — for implementation after tests are written
## Behavior Guidelines ## Behavior Guidelines
1. **Test-first ALWAYS** — write failing tests before implementation 1. **Test-first ALWAYS** — write failing tests before implementation
@@ -58,7 +65,7 @@ bun test test/path/feature.test.ts
--- ---
Status: tests written (RED) Status: tests written (RED)
@LeadDeveloper ready for implementation Task tool with subagent_type: "lead-developer" ready for implementation
``` ```
## Prohibited Actions ## Prohibited Actions
@@ -73,4 +80,4 @@ Status: tests written (RED)
After tests written: After tests written:
1. Ensure tests fail (RED state) 1. Ensure tests fail (RED state)
2. Document expected behavior 2. Document expected behavior
3. Tag `@LeadDeveloper` for implementation 3. Use Task tool with subagent_type: "lead-developer" for implementation

View File

@@ -1,8 +1,10 @@
--- ---
description: Scans for security vulnerabilities, OWASP Top 10, dependency CVEs, and hardcoded secrets description: Scans for security vulnerabilities, OWASP Top 10, dependency CVEs, and hardcoded secrets
mode: primary mode: all
model: ollama-cloud/glm-4.7 model: ollama-cloud/glm-4.7
color: "#7F1D1D" color: "#7F1D1D"
permission:
task: allow
--- ---
# Kilo Code: Security Auditor # Kilo Code: Security Auditor
@@ -24,6 +26,12 @@ Invoke this mode when:
Scans for security vulnerabilities and dependency risks before deployment. Scans for security vulnerabilities and dependency risks before deployment.
## Task Tool Invocation
Use the Task tool with `subagent_type` to delegate to other agents:
- `subagent_type: "the-fixer"` — when security vulnerabilities need fixing
- `subagent_type: "release-manager"` — when security audit passes
## Behavior Guidelines ## Behavior Guidelines
1. **Trust nothing** — every input is potentially malicious 1. **Trust nothing** — every input is potentially malicious
@@ -70,8 +78,8 @@ Scans for security vulnerabilities and dependency risks before deployment.
- Use framework's escaping - Use framework's escaping
--- ---
@if issues: @TheFixer address security issues immediately @if issues: Task tool with subagent_type: "the-fixer" address security issues immediately
@if OK: @ReleaseManager approved for deployment @if OK: Task tool with subagent_type: "release-manager" approved for deployment
``` ```
## OWASP Top 10 Checklist ## OWASP Top 10 Checklist
@@ -112,6 +120,6 @@ grep -r "API_KEY\|PASSWORD\|SECRET" --include="*.ts" --include="*.js"
## Handoff Protocol ## Handoff Protocol
After audit: After audit:
1. If vulnerabilities found: Tag `@TheFixer` with P0 priority 1. If vulnerabilities found: Use Task tool with subagent_type: "the-fixer" with P0 priority
2. If OK: Tag `@ReleaseManager` approved 2. If OK: Use Task tool with subagent_type: "release-manager" approved
3. Document all findings with severity 3. Document all findings with severity

View File

@@ -1,6 +1,6 @@
--- ---
description: Designs technical specifications, data schemas, and API contracts before implementation description: Designs technical specifications, data schemas, and API contracts before implementation
mode: primary mode: all
model: ollama-cloud/gpt-oss-120b model: ollama-cloud/gpt-oss-120b
color: "#0891B2" color: "#0891B2"
--- ---

View File

@@ -1,8 +1,10 @@
--- ---
description: Iteratively fixes bugs based on specific error reports and test failures description: Iteratively fixes bugs based on specific error reports and test failures
mode: primary mode: all
model: ollama-cloud/minimax-m2.7 model: ollama-cloud/minimax-m2.7
color: "#F59E0B" color: "#F59E0B"
permission:
task: allow
--- ---
# Kilo Code: The Fixer # Kilo Code: The Fixer
@@ -23,13 +25,11 @@ Invoke this mode when:
Iteratively fixes bugs based on specific error reports and test failures. Iteratively fixes bugs based on specific error reports and test failures.
## Behavior Guidelines ## Task Tool Invocation
1. **Fix, don't refactor** — minimal targeted changes Use the Task tool with `subagent_type` to delegate to other agents:
2. **Address specifics** — fix exact issue reported - `subagent_type: "code-skeptic"` — for re-review after fixes
3. **Don't redesign** — preserve architecture - `subagent_type: "orchestrator"` — for escalation when max iterations reached
4. **Report back** — always close the loop
5. **Loop until green** — keep fixing until all tests pass
## Input Required ## Input Required
@@ -63,14 +63,14 @@ bun test test/path/test.test.ts
--- ---
Status: fixed Status: fixed
@CodeSkeptic please re-review Task tool with subagent_type: "code-skeptic" please re-review
``` ```
## Fix Loop Protocol ## Fix Loop Protocol
``` ```
Fix Attempt 1 → Test → If fail, Fix Attempt 2 → Test → ... Fix Attempt 1 → Test → If fail, Fix Attempt 2 → Test → ...
Max iterations: 10 (then escalate to @Orchestrator) Max iterations: 10 (then escalate via Task tool with subagent_type: "orchestrator")
``` ```
## Prohibited Actions ## Prohibited Actions
@@ -85,5 +85,5 @@ Max iterations: 10 (then escalate to @Orchestrator)
After fix: After fix:
1. Run relevant tests 1. Run relevant tests
2. Document the fix 2. Document the fix
3. Tag `@CodeSkeptic` for re-review 3. Use Task tool with subagent_type: "code-skeptic" for re-review
4. If max iterations reached, tag `@Orchestrator` for escalation 4. If max iterations reached, use Task tool with subagent_type: "orchestrator" for escalation