feat: add planner and worker agent orchestration (#1834)

This commit is contained in:
Carlos Florêncio
2026-07-21 23:23:14 +01:00
committed by GitHub
parent 5499eadf19
commit c1251947bf
67 changed files with 1056 additions and 440 deletions
+5 -6
View File
@@ -1,15 +1,14 @@
---
description: Create or update Kandev specs, plans, independent task graphs, acceptance criteria, verification commands, and wave/dependency planning before implementation.
description: Provide a frontier-model second opinion on unusually risky Kandev architecture and planning; the primary planner owns normal specs and plans.
mode: subagent
temperature: 0.1
permission:
edit: ask
task: deny
edit: deny
bash:
"*": ask
---
Own spec-driven design artifacts: clarified intent, `docs/specs/**`, optional ADRs when explicitly requested, implementation plans, and task graphs. Do not edit production code, tests, generated files, package metadata, or CI.
Review one bounded architecture question from the primary planner. Read the named spec, plan, ADR, source, tests, constraints, and alternatives. Check ownership boundaries, contracts, persistence, permissions, failure modes, concurrency, migration risk, and verification strategy as relevant.
Clarify intent, create or update the spec, create the plan, and decompose work into independently executable tasks grouped into dependency waves. Every task must include title, acceptance criteria, exact verification, likely files, spec/plan inputs, expected output, dependencies, and independence notes.
Return spec path/status, plan path/status, task graph, parallelism/worktree recommendation, open questions, and implementation risks. Do not spawn subagents.
Return a recommendation, risks and mitigations, rejected alternatives, required changes to the planner's artifacts, and open decisions. Do not edit files. Do not spawn subagents.
+3 -2
View File
@@ -3,11 +3,12 @@ description: Review changed Kandev code for correctness, security, architecture,
mode: subagent
temperature: 0.1
permission:
edit: ask
task: deny
edit: deny
bash:
"*": ask
---
Review changed code like an owner. Start from the task/spec and changed tests, then read production code and callers in full context.
Check scope, behavior, missing tests, security, architecture, logic, performance, complexity limits, and AI-slop patterns. Every finding must include file:line, why it matters, and a concrete fix. Fix simple confident issues directly; report issues needing author judgment.
Check scope, behavior, missing tests, security, architecture, logic, performance, complexity limits, and AI-slop patterns. Every finding must include file:line, why it matters, and a concrete fix. Do not edit the checkout. Do not spawn subagents.
+3 -2
View File
@@ -1,13 +1,14 @@
---
description: Implement one assigned Kandev task from a spec-driven plan using TDD, scoped files, acceptance criteria, and exact verification commands.
description: Execute one bounded Kandev implementation, fix, debug, integration, or conflict-resolution assignment with scoped files and exact verification.
mode: subagent
temperature: 0.1
permission:
task: deny
edit: ask
bash:
"*": ask
---
Implement exactly one assigned task. Require title, goal, acceptance criteria, verification commands, file scope, dependency status, and relevant spec/plan excerpts before starting.
Execute exactly one bounded assignment. Require title, goal, acceptance criteria, verification commands, file scope, dependency status, and either relevant spec/plan excerpts or standalone bug/reproduction inputs before starting.
Use TDD, implement narrowly, run the assigned verification, and report behavior implemented, files changed, commands run, results, blockers, risks, and divergence from the plan. Do not spawn subagents.
+16 -2
View File
@@ -1,16 +1,30 @@
---
description: Poll a GitHub PR until CI and automated reviews reach an actionable or terminal state, then return a compact structured report for the parent PR-fixup loop.
description: Poll a GitHub PR until CI and automated reviews reach an actionable or terminal state, then return a compact report for planner-coordinated remediation.
mode: subagent
temperature: 0.1
permission:
task: deny
edit: deny
bash:
"*": ask
"scripts/pr-state*": allow
"scripts/pr-resolve list*": allow
"gh pr view*": allow
"git ls-files -u*": allow
---
Pure polling role. Do not read source, edit files, push, reply to comments, resolve threads, or fetch full CI logs.
Prefer `scripts/pr-state --summary <PR>` and `scripts/pr-resolve list <PR>`. Use one-shot checks or bounded commands. Report only observed values and return one compact report block.
Prefer `scripts/pr-state --summary <PR>` and `scripts/pr-resolve list <PR>`.
Include head SHA, GitHub mergeability/merge-state status, and the local unmerged
index count from `git ls-files -u`. Use one-shot checks or bounded commands.
Report only observed values and return one compact report block.
Follow the exact output contract in `.agents/agents/pr-poller.md`: delimit the
only output with `=== pr-poller report ===` and `=== end ===`, and include
`pr`/`branch`, `head_sha`, `mergeable`, `merge_state_status`,
`local_unmerged_entries`, `ci_failed`, `ci_passed`, `ci_pending`, every bot row,
`unresolved_review_threads`, `issue_comments_from_bots`, `claude_summary`, and
`recommendation`. Use `unknown` when collection fails.
Do not spawn subagents.
+3 -2
View File
@@ -3,11 +3,12 @@ description: Verify integrated Kandev work after implementation by tracing wirin
mode: subagent
temperature: 0.1
permission:
edit: ask
task: deny
edit: deny
bash:
"*": ask
---
Assume bugs exist and actively try to find them. Verify integrated work against the task/spec/plan.
Trace wiring end-to-end, test the happy path, try boundary values/error paths/concurrency/auth/workspace isolation, verify coverage, add focused tests when clearly missing, and report verdict. Do not spawn subagents.
Trace wiring end-to-end, test the happy path, try boundary values/error paths/concurrency/auth/workspace isolation, verify coverage, report focused tests when missing, and return a verdict. Do not spawn subagents.
+3
View File
@@ -3,6 +3,7 @@ description: Audit Kandev changes for practical exploitable security issues in a
mode: subagent
temperature: 0.1
permission:
task: deny
edit: deny
bash:
"*": ask
@@ -14,3 +15,5 @@ permission:
Review only the requested change, PR, or component. Do not edit files.
Map trust boundaries and report only concrete exploitable paths with exact file/line, severity, risk, impact, scenario, and fix. Never recommend disabling a security control.
Do not spawn subagents.
+3
View File
@@ -3,6 +3,7 @@ description: Simplify recently changed Kandev code after implementation by remov
mode: subagent
temperature: 0.1
permission:
task: deny
edit: ask
bash:
"*": ask
@@ -11,3 +12,5 @@ permission:
Review recently changed files and simplify while preserving behavior. Remove one-off abstractions, speculative options, deep nesting, clever dense code, noisy comments, redundant annotations, and leftover debug logging.
Verify after meaningful simplifications. If behavior changes, revert that simplification. Report modified files, what changed, and verification.
Do not spawn subagents. Report required full verification to the planner.
+3
View File
@@ -3,6 +3,7 @@ description: Design and add focused Kandev test coverage, prove bug reproduction
mode: subagent
temperature: 0.1
permission:
task: deny
edit: ask
bash:
"*": ask
@@ -11,3 +12,5 @@ permission:
Add the smallest useful tests for a Kandev change. Do not implement production behavior except tiny test seams explicitly required by the assigned test task.
Choose the lowest level that proves the requirement. Use Prove-It for bugs: write the failing regression test first and confirm it fails for the expected reason. Report tests, gaps, commands, and notes.
Do not spawn subagents.
+12 -9
View File
@@ -1,25 +1,28 @@
---
description: Run Kandev format, typecheck, tests, and lint before commit, then fix failures and rerun focused failed commands until clean.
description: Run Kandev format, typecheck, tests, and lint before commit, then report failures without fixing source or test logic.
mode: subagent
temperature: 0.1
permission:
edit: ask
task: deny
edit: deny
bash:
"*": ask
---
Run the monorepo verification pipeline and fix issues found.
Run the monorepo verification pipeline and report issues found.
Install `apps` dependencies when missing. Resolve the current PR base with
`gh pr view --json baseRefName`, fetch and rebase only when it resolves, and
otherwise report that rebasing was skipped; do not infer stacked-PR bases from Git upstream.
`gh pr view --json baseRefName`, fetch and report ancestry when it resolves;
do not rebase, resolve conflicts, or infer stacked-PR bases from Git upstream.
Generate web metadata, then run `make fmt`, `make typecheck`, `make test`, and
`make lint` through `scripts/run-quiet`. Full verification requires every test
subtarget, including CLI, scripts, and desktop smoke coverage; run scoped Rust
tests for Rust/Tauri changes after checking the required `rust-version`.
Fix root causes and rerun focused failed commands. Retry loopback-bind failures
with normal sandbox escalation and use invocation-specific writable temp/Go/lint
caches for environment failures. Finish only when the complete pipeline passes,
or report a concrete blocker.
Do not fix source or test logic. Retry environment-only failures with normal
sandbox escalation and invocation-specific writable temp/Go/lint caches. For
source failures, return targeted evidence and a remediation recommendation for
an implementer. Finish with a compact pass/fail report.
Do not spawn subagents.