@arbiterforge/ca-pi 0.18.3 → 0.19.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/package.json +1 -1
- package/plugins/ca-pi/CHANGELOG.md +60 -0
- package/plugins/ca-pi/COMMANDS.md +2 -2
- package/plugins/ca-pi/SKILLS.md +5 -5
- package/plugins/ca-pi/SPRINT.md +43 -230
- package/plugins/ca-pi/agents/backend-author.md +5 -5
- package/plugins/ca-pi/agents/checkpoint-aggregator.md +7 -0
- package/plugins/ca-pi/agents/frontend-author.md +5 -5
- package/plugins/ca-pi/agents/infra-author.md +6 -7
- package/plugins/ca-pi/agents/scout.md +25 -24
- package/plugins/ca-pi/arbiter.md +6 -4
- package/plugins/ca-pi/generated/command-catalog.json +5 -5
- package/plugins/ca-pi/helpers/artifacts/ca-artifact-darwin-amd64 +0 -0
- package/plugins/ca-pi/helpers/artifacts/ca-artifact-darwin-arm64 +0 -0
- package/plugins/ca-pi/helpers/artifacts/ca-artifact-linux-amd64 +0 -0
- package/plugins/ca-pi/helpers/artifacts/ca-artifact-linux-arm64 +0 -0
- package/plugins/ca-pi/helpers/artifacts/ca-artifact-windows-amd64.exe +0 -0
- package/plugins/ca-pi/helpers/artifacts/ca-artifact-windows-arm64.exe +0 -0
- package/plugins/ca-pi/helpers/artifacts/release.json +37 -37
- package/plugins/ca-pi/hooks/_approvallib.py +41 -0
- package/plugins/ca-pi/hooks/_artifactlib.py +61 -115
- package/plugins/ca-pi/hooks/_artifactpromptlib.py +12 -12
- package/plugins/ca-pi/hooks/_bashguardlib.py +66 -4
- package/plugins/ca-pi/hooks/_contextselectlib.py +38 -35
- package/plugins/ca-pi/hooks/_contextwriterlib.py +114 -0
- package/plugins/ca-pi/hooks/_host.py +1 -1
- package/plugins/ca-pi/hooks/_prerequisitelib.py +35 -0
- package/plugins/ca-pi/hooks/_provenancelib.py +107 -1
- package/plugins/ca-pi/hooks/_readinjectlib.py +21 -7
- package/plugins/ca-pi/hooks/_reconciliationlib.py +170 -3
- package/plugins/ca-pi/hooks/_releaselib.py +6 -6
- package/plugins/ca-pi/hooks/_sprintapprovallib.py +52 -2
- package/plugins/ca-pi/hooks/artifact-reconcile.py +13 -4
- package/plugins/ca-pi/hooks/hostapi.py +1 -1
- package/plugins/ca-pi/hooks/init-codearbiter.py +34 -5
- package/plugins/ca-pi/includes/artifacts-attestation.md +434 -0
- package/plugins/ca-pi/includes/artifacts.md +133 -492
- package/plugins/ca-pi/includes/author-tdd-workflow.md +32 -21
- package/plugins/ca-pi/includes/fresh-verification.md +14 -12
- package/plugins/ca-pi/includes/harvest.md +3 -3
- package/plugins/ca-pi/includes/reference-map.md +1 -1
- package/plugins/ca-pi/includes/routing-table.md +3 -3
- package/plugins/ca-pi/includes/sprint-authority.md +6 -1
- package/plugins/ca-pi/includes/verification-boundary.md +11 -2
- package/plugins/ca-pi/package.json +1 -1
- package/plugins/ca-pi/routines/INDEX.md +8 -8
- package/plugins/ca-pi/routines/brainstorming/SKILL.md +65 -202
- package/plugins/ca-pi/routines/commit-gate/SKILL.md +60 -25
- package/plugins/ca-pi/routines/context-check/SKILL.md +89 -53
- package/plugins/ca-pi/routines/context-creation/SKILL.md +114 -220
- package/plugins/ca-pi/routines/decompose/SKILL.md +139 -167
- package/plugins/ca-pi/routines/executing-plans/SKILL.md +38 -136
- package/plugins/ca-pi/routines/finishing-a-development-branch/SKILL.md +45 -55
- package/plugins/ca-pi/routines/refactor/SKILL.md +27 -12
- package/plugins/ca-pi/routines/release/SKILL.md +1 -1
- package/plugins/ca-pi/routines/subagent-driven-development/SKILL.md +80 -230
- package/plugins/ca-pi/routines/tdd/SKILL.md +115 -228
- package/plugins/ca-pi/routines/writing-plans/SKILL.md +104 -174
- package/plugins/ca-pi/skills/ca-audit/SKILL.md +2 -2
- package/plugins/ca-pi/skills/ca-checkpoint/SKILL.md +1 -1
- package/plugins/ca-pi/skills/ca-commit/SKILL.md +60 -25
- package/plugins/ca-pi/skills/ca-context-check/SKILL.md +89 -53
- package/plugins/ca-pi/skills/ca-create-context/SKILL.md +114 -220
- package/plugins/ca-pi/skills/ca-decompose/SKILL.md +139 -167
- package/plugins/ca-pi/skills/ca-feature/SKILL.md +21 -38
- package/plugins/ca-pi/skills/ca-fix/SKILL.md +15 -9
- package/plugins/ca-pi/skills/ca-init/SKILL.md +18 -40
- package/plugins/ca-pi/skills/ca-pr/SKILL.md +45 -55
- package/plugins/ca-pi/skills/ca-refactor/SKILL.md +27 -12
- package/plugins/ca-pi/skills/ca-release/SKILL.md +1 -1
- package/plugins/ca-pi/skills/ca-review/SKILL.md +5 -8
- package/plugins/ca-pi/skills/ca-sprint/SKILL.md +11 -25
- package/plugins/ca-pi/skills/ca-status/SKILL.md +15 -6
|
@@ -1,239 +1,89 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: subagent-driven-development
|
|
3
|
-
description:
|
|
3
|
+
description: Assistive implementation engine for /sprint and scoped executing-plans work. Follow actual dependencies, implement or delegate coherently, run relevant checks, preserve honest evidence, and advance without artifact approval codes or compulsory reviewer cascades.
|
|
4
4
|
disable-model-invocation: true
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# subagent-driven-development
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
New full-lane workflows default to HTML through the installed engine. Existing
|
|
12
|
-
HTML pairs use the same path. Load
|
|
13
|
-
`<plugin-root>/includes/artifacts.md` before HTML artifact I/O;
|
|
14
|
-
its typed identity, binding, receipt, contextual-read, and scope-state rules
|
|
15
|
-
replace rendered-document parsing and direct status-cell edits. Existing
|
|
16
|
-
authoritative Markdown pairs stay on their exact legacy path without conversion.
|
|
17
|
-
A missing, invalid, or unqualified HTML capability must fail closed rather than
|
|
18
|
-
fall back to new Markdown authority. HTML `--farm` dispatch remains disabled.
|
|
19
|
-
Keep every other workflow gate, including human checkpoints, unchanged.
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
One task, one fresh subagent, two reviews, proof on a fresh run. Routed to by `/sprint` (full plan,
|
|
23
|
-
autonomous) and by `executing-plans` (one batch at a time, with human checkpoints between batches).
|
|
24
|
-
The loop processes tasks in dependency order and never trusts a self-report.
|
|
25
|
-
|
|
26
|
-
## Pre-flight
|
|
27
|
-
|
|
28
|
-
Read these, or STOP and surface the gap — never guess scope, command, or obligation:
|
|
29
|
-
|
|
30
|
-
- `<project-root>/.codearbiter/CONTEXT.md` — the `stage:` frontmatter (the maturity value) and project context.
|
|
31
|
-
- The discovered authoritative spec/plan pair. Existing Markdown pairs retain
|
|
32
|
-
their current ledger. For HTML, load `<plugin-root>/includes/artifacts.md`,
|
|
33
|
-
retain the exact artifact identities and engine-written receipts, and read
|
|
34
|
-
the approved spec binding, obligations, paths, verification definitions,
|
|
35
|
-
dependencies, and state only through `identity`, `index`, `outline`,
|
|
36
|
-
symbol-scoped `read`, and `eligible`. The engine `eligible` response is authoritative;
|
|
37
|
-
the workflow must not infer authority from rendered text, checkboxes, status
|
|
38
|
-
words, digests, or caller-supplied labels, and must not read or write a shadow
|
|
39
|
-
Markdown ledger.
|
|
40
|
-
- `<project-root>/.codearbiter/tech-stack.md` — build, test, and verification invocations; file layout; the scope-to-author mapping.
|
|
41
|
-
- `<project-root>/.codearbiter/security-controls.md` — only when a task touches a security boundary (auth, crypto, secrets, a trust boundary).
|
|
42
|
-
|
|
43
|
-
**Optional `scope` parameter:** when invoked by `executing-plans`, a list of task IDs is passed. The
|
|
44
|
-
loop processes only those tasks (in their internal dependency order). When `scope` is absent (the
|
|
45
|
-
`/sprint` path), the loop processes the full plan from first unblocked task to last.
|
|
46
|
-
|
|
47
|
-
## Phase 1 — Task selection · gate: BLOCK
|
|
48
|
-
|
|
49
|
-
Pull the next unblocked task from the plan in dependency order. When a `scope` was passed, restrict
|
|
50
|
-
selection to tasks in that list. For Markdown, select only a task whose status is `PENDING` and whose
|
|
51
|
-
dependencies are `ACCEPTED`; `BLOCKED` tasks are not selectable until the owning plan workflow
|
|
52
|
-
records a supported transition. For HTML, accept only tasks returned by `eligible` for the exact
|
|
53
|
-
selected plan identity. A task is one verifiable unit of work with a path set, a spec obligation,
|
|
54
|
-
and a verification command.
|
|
55
|
-
|
|
56
|
-
For HTML, select only a task returned as eligible for the exact selected plan
|
|
57
|
-
identity. Follow contextual `read` pages to completion, retain their context
|
|
58
|
-
ticket, and use `task-start` before author dispatch. Do not translate a displayed
|
|
59
|
-
status or a copied task label into a transition.
|
|
60
|
-
|
|
61
|
-
After process recreation, rediscover the same authoritative pair and query
|
|
62
|
-
`identity` and `eligible` again. Reconcile an interrupted `IN_PROGRESS` task only
|
|
63
|
-
through an authority-backed `task-reconcile`, then redispatch with `task-start`
|
|
64
|
-
and a fresh complete context ticket. A task in `REVIEW` is not accepted on
|
|
65
|
-
resume; obtain fresh evidence when required and finish the current combined
|
|
66
|
-
scope review before `accept-scope`.
|
|
67
|
-
|
|
68
|
-
- For Markdown, confirm every dependency task is `ACCEPTED` before selecting.
|
|
69
|
-
- For HTML, use the engine's eligibility and current evidence; do not replace its same-checkpoint `REVIEW` rule
|
|
70
|
-
with the legacy `ACCEPTED` sentence or infer eligibility from a displayed status.
|
|
71
|
-
- Confirm no unresolved `[CONFIRM-NN]` blocks the task. One that does halts the loop — see Hard rules.
|
|
72
|
-
|
|
73
|
-
Gate: exactly one task selected, dependency-clean, with its spec obligation and verification command in hand.
|
|
74
|
-
|
|
75
|
-
## Phase 2 — Implementation dispatch · gate: BLOCK
|
|
76
|
-
|
|
77
|
-
**Farm path (when `<slug>.plan.json` exists alongside the `.md` plan):** skip the subagent dispatch
|
|
78
|
-
loop below and follow `<plugin-root>/routines/subagent-driven-development/references/farm-dispatch.md`.
|
|
79
|
-
The farm path replaces only the *authoring* step for the plan's tasks (cheap Zen workers under hard
|
|
80
|
-
gates instead of premium subagents); it does **not** replace review — every task the farm reports green
|
|
81
|
-
is still routed through Phases 3–5 before acceptance. The cost arbitrage is in who *writes* the code,
|
|
82
|
-
never in whether it is *reviewed*. In brief: select a model (canary-probe with a cache→websearch
|
|
83
|
-
fallback ladder), invoke the trusted `codearbiter_farm_preview` tool with the project-relative
|
|
84
|
-
plan path, honor a circuit-breaker abort as a hard-gate STOP, then for
|
|
85
|
-
each result either accept-after-Phases-3–5 (green) or re-dispatch via premium Phase 2 (escalate).
|
|
86
|
-
Results stream to `.farm/farm-results.jsonl` and are consumed in completion order — Phase 3 + Phase 5
|
|
87
|
-
per green task as it lands, Phase 4 still the once-per-scope barrier (reconcile against `farm-report.json`
|
|
88
|
-
on abort). The reference has the full step-by-step.
|
|
9
|
+
Execute an existing plan. The plan helps the agent remember the intended result; it is not a second permission system. Run meaningful work, correct defects, update progress, and tell the truth about unfinished checks. The active host, user instructions, and independently applicable security/commit controls still govern real actions.
|
|
89
10
|
|
|
90
|
-
|
|
11
|
+
## Format and capability boundary
|
|
12
|
+
|
|
13
|
+
Load `<plugin-root>/includes/artifacts.md` for artifact I/O and preserve the selected spec/plan representation. For an explicitly selected Markdown `plan.json` farm workflow, follow `<plugin-root>/routines/subagent-driven-development/references/farm-dispatch.md` and its provider, budget and circuit-breaker requirements.
|
|
14
|
+
|
|
15
|
+
**Scope:** with an explicit `scope` from `executing-plans`, work only on the named tasks; without it, `/sprint` works across the plan. A checkpoint is an organizing group, not independent permission to do the next task.
|
|
16
|
+
|
|
17
|
+
## 1. Orient and select actual work
|
|
18
|
+
|
|
19
|
+
Read the selected spec/plan, relevant `.codearbiter/CONTEXT.md`, and the needed build/check commands from `.codearbiter/tech-stack.md`, when present. Read `security-controls.md` for work affecting its rules. Missing optional orientation is a diagnostic, not a blanket STOP; never guess an essential requirement or execute an unknown command.
|
|
20
|
+
|
|
21
|
+
For HTML, use `identity`, `index`, `outline`, exact or batched symbol-scoped `read`, and `eligible`. The engine `eligible` response is **advisory scheduling**, not permission or evidence of a passing test. Read actual task dependencies and `waiting_prerequisites`; do not treat a checkpoint number or an unscoped legacy prerequisite as a universal dependency.
|
|
22
|
+
|
|
23
|
+
**Read only what matters:** use `task-context` with the current plan
|
|
24
|
+
`model_sha256` and task ID. It returns referenced criteria, dependency states
|
|
25
|
+
and scoped facts without claiming a snapshot or approval. If
|
|
26
|
+
`binding_current: false`, inspect changed requirements. If
|
|
27
|
+
`context_complete: false`, fetch necessary exact symbols. On `STALE_CURSOR`
|
|
28
|
+
reread identity; on `RECORD_TOO_LARGE` fetch complete individual records.
|
|
29
|
+
Without this operation, fall back to existing exact/`read-batch` reads.
|
|
30
|
+
|
|
31
|
+
For a `fact` prerequisite, check it with ordinary authorized tools and record the actual `prerequisite` observation (satisfied/unsatisfied/unknown, source, outcome and reported origin). For a `decision`, apply the user's already-stated choice where it is actually supported; otherwise ask the consequential question in ordinary language. An agent report is not an authenticated user decision. An unresolved prerequisite affects only the tasks that depend on it; continue independent work.
|
|
32
|
+
|
|
33
|
+
Record `task-start` when beginning a pending HTML task using the current revision/model hash and a durable operation ID. `task-start` does not need approval receipts, a complete context ticket, a source snapshot, or a reviewer. It cannot clear a recorded stop or start already-running work again.
|
|
34
|
+
|
|
35
|
+
**After process recreation**, rediscover the same authoritative pair and query `identity` and `eligible` again. Inspect the current worktree, outstanding tool runs, and task results before deciding whether an `IN_PROGRESS` task is still active, partly finished, or ready. Use a reasoned `task-reconcile` to reflect known progress; do not duplicate execution or manufacture evidence. Resume a `BLOCKED` task only after its actual blocker or user's stop has been resolved. CAS/replay remain mandatory: on a lost response, check the journal or retry the same operation ID and identical request rather than reissuing a mutation under a new identity.
|
|
36
|
+
|
|
37
|
+
## 2. Implement or delegate the useful unit
|
|
38
|
+
|
|
39
|
+
Work directly when a focused change is clearer and cheaper. Delegate when genuinely useful for isolation, independent parallel work, or specialist expertise. A **fresh subagent per task is not mandatory**; do not spawn reviewer agents solely because task status or a receipt changed.
|
|
40
|
+
|
|
41
|
+
Choose a relevant author (backend/front-end/infrastructure) when delegated. Supply the objective, paths, criterion IDs, actual constraints, known current state, and observable checks in a **bounded context packet**. Reuse `_artifactpromptlib.compose_feature_actor_input` and `_contextselectlib.prepare_actor_delivery` when useful to deliver relevant context; neither returns execution permission, and an absent delivery receipt is not grounds to forbid already-authorized work. Respect the host's real subagent permissions and applicable security constraints. Do not pass source-discovered commands to a tool without ordinary host-governed authorization.
|
|
42
|
+
|
|
43
|
+
Prefer the test-first approach in `<plugin-root>/routines/tdd/SKILL.md` for behavior changes, using evidence that distinguishes RED, GREEN, regression, and skipped/unrun checks. Documentation-only or other work without a runnable test uses a concrete relevant validation instead. Never weaken or delete a failing test to create a pass.
|
|
44
|
+
|
|
45
|
+
If implementation reveals a better in-scope method, update task steps, runner, or decomposition through typed `apply` with a short reason. Do not reset other tasks or reapprove the entire plan. A changed outcome or consequential unresolved choice goes to its real owner.
|
|
46
|
+
|
|
47
|
+
## 3. Verify truthfully and assess only relevant risks
|
|
48
|
+
|
|
49
|
+
Compare the implementation to the source criteria: what is required, what changed, what is missing, and what behavior a passing test actually covers. Run the planned applicable test or a narrower verified equivalent through the existing **host-governed execution tool**. Record the command, working directory, outcome, and limitations. A command-level pass is not invented named-test proof. A new failure or a skipped/unknown result cannot be masked by an earlier pass.
|
|
50
|
+
|
|
51
|
+
A failing check is a reason to repair, investigate, or mark verification pending, **not permission to claim it passed** and not a ban on unrelated implementation. Rerun affected checks after a correction. If the same approach fails repeatedly without new information, diagnose differently or record a bounded blocked task and continue unrelated work.
|
|
52
|
+
|
|
53
|
+
Review the combined relevant diff when risk or change size warrants it. Use a specialist reviewer only for an actual security/dependency/migration concern or an explicit policy requirement. Avoid duplicate security reviews and blanket per-task spec/quality fleets. Retain useful findings; revisit affected conclusions only when relevant code, requirements, supporting evidence, or the previously reviewed subject changes. A new receipt ID by itself is not an impact.
|
|
54
|
+
|
|
55
|
+
For an explicitly required attested claim, load only the applicable part of `<plugin-root>/includes/artifacts-attestation.md`. Never fabricate or auto-approve receipts. Actual user stops, host permissions and policy-required reviews still apply.
|
|
56
|
+
|
|
57
|
+
For a real verification command that the host already ran, record its
|
|
58
|
+
ordinary result via native `task-check` with `command_index` only when
|
|
59
|
+
the exact declared command ran, or without it for a useful ad-hoc check.
|
|
60
|
+
Pass along the observed exit code, summary and bounded source/output; never
|
|
61
|
+
invent a named-test result because a collector could not parse it. The
|
|
62
|
+
result stays `caller_reported`, never an independent test/reviewer certificate.
|
|
63
|
+
The engine can compare the bounded task paths, explicitly declared
|
|
64
|
+
`shared_inputs` and known build manifests to the earlier report. Treat
|
|
65
|
+
`scoped_changed` as a reason to refresh **affected** checks; treat
|
|
66
|
+
`scoped_unchanged` as partial applicability only (`scope_complete: false`).
|
|
67
|
+
An unmodeled import, oversized directory, symlink, missing source or
|
|
68
|
+
custom build input remains `unassessed`. Include actual shared interfaces
|
|
69
|
+
in the plan when relevant; do not run a repository-wide snapshot on every
|
|
70
|
+
task read or claim complete dependency closure from these hashes. A failed/skipped/unknown
|
|
71
|
+
report does not become successful because the task was marked `DONE`.
|
|
72
|
+
The latest reported failure remains visible even after an older pass; fix
|
|
73
|
+
only relevant work and record another actual result as appropriate. Avoid
|
|
74
|
+
turning this bookkeeping into an extra testing or approval phase.
|
|
75
|
+
|
|
76
|
+
## 4. Persist honest progress and return
|
|
77
|
+
|
|
78
|
+
For HTML use `task-review` without receipts to record implementation ready for review; this is **not** a claim that an independent review or tests passed. For a completed implementation batch use `accept-scope` with its authored scope ID and a real reason, **without a receipt**, to record `DONE` (implementation complete; checks not assessed). It must not clear a pending/blocked member. Keep failures, outstanding checks, and uncertainty in the report or appropriate typed records. Do not upgrade `DONE` to `ACCEPTED` without genuine independent evidence.
|
|
79
|
+
|
|
80
|
+
For Markdown, keep its one task ledger and original format; do not treat past status text as new verification.
|
|
81
|
+
|
|
82
|
+
- **Scoped invocation:** return completed tasks, checks actually run, unresolved issues, and next work to `executing-plans`. Do not call `commit-gate` yourself.
|
|
83
|
+
- **Full-plan invocation:** provide the same honest summary to `/sprint`; it owns the authorized commit and PR handoff. A completed implementation batch with failing or unrun required checks is not release-ready.
|
|
84
|
+
|
|
85
|
+
## Hard boundaries
|
|
86
|
+
|
|
87
|
+
Do not invent a test result, user choice, reviewer finding, credential, approval, or installed-host qualification. Do not clear a user stop, skip actual host permissions, run an irreversible or unapproved out-of-scope operation, or bypass independently applicable security controls. Do not silently modify a requirement to claim completion. Mark unrelated discoveries `[NEEDS-TRIAGE]`, not automatic scope expansion.
|
|
91
88
|
|
|
92
|
-
|
|
93
|
-
`infra-author` by the scope mapping in `tech-stack.md`
|
|
94
|
-
(`<plugin-root>/agents/<name>.md`). A fresh context per task is the whole point: no carried-over
|
|
95
|
-
assumptions, no accumulated drift.
|
|
96
|
-
|
|
97
|
-
The subagent works test-first by routing through the `tdd` skill (`<plugin-root>/routines/tdd/SKILL.md`) — no implementation code before
|
|
98
|
-
`tdd` Phase 1. Brief it with the task's path set, its spec obligation, and its verification command.
|
|
99
|
-
Nothing else from prior tasks leaks in.
|
|
100
|
-
|
|
101
|
-
Before dispatch, obtain current bounded inputs for the selected task paths:
|
|
102
|
-
existing code-map text if available, assessed provenance, scoped command
|
|
103
|
-
records and collector observations, applicable constraint references, and
|
|
104
|
-
host-effective native instructions in precedence order. Call the private
|
|
105
|
-
`_artifactpromptlib.compose_feature_actor_input` with the chosen author name,
|
|
106
|
-
brief, exact approved spec and plan IDs, task ID, task paths, and those inputs.
|
|
107
|
-
Send its returned `input` as the fresh child's actual input. The returned
|
|
108
|
-
packet never grants task start, source-snapshot admission, or permission to
|
|
109
|
-
mutate or execute a discovered command. Resolve an applicable critical
|
|
110
|
-
unresolved constraint before that material action. An unavailable optional
|
|
111
|
-
map permits bounded read-only orientation, not an invented complete map.
|
|
112
|
-
For each author or reviewer dispatch, call `_contextselectlib.prepare_actor_delivery`
|
|
113
|
-
on that actor's freshly selected packet with the actual actor/task, absolute
|
|
114
|
-
worktree, current source identity, and host epoch when observable. Send its
|
|
115
|
-
bounded `delivery_text` to that child on `deliver` and retain the counted
|
|
116
|
-
attempt. Treat `observed` only as caller-reported load/input evidence; do not
|
|
117
|
-
use a shared session or persona/read marker as a receipt. On `blocked`, stop
|
|
118
|
-
the material action and report the delivery gap. Re-select after resume,
|
|
119
|
-
compaction, scope expansion, or worktree switch; missing epochs get at most
|
|
120
|
-
two counted deliveries for the same binding.
|
|
121
|
-
|
|
122
|
-
Gate: all six `tdd` phases must be green before acceptance. Never redispatch merely to evade a failing gate.
|
|
123
|
-
Under an approved `/sprint`, an ordinary implementation/test failure routes to **Recovery within the approved sprint** in `<plugin-root>/SPRINT.md`; rerun the original gate after an evidence-led correction.
|
|
124
|
-
An attended invocation returns the blocked prerequisite to its caller. A real authority or security block
|
|
125
|
-
halts the affected work and is surfaced under the hard rules, in either mode.
|
|
126
|
-
|
|
127
|
-
## Phase 3 — Spec-compliance review · gate: BLOCK
|
|
128
|
-
|
|
129
|
-
Did the change satisfy the task's obligation? Measure the result against the spec line the task
|
|
130
|
-
traces to — not against whether tests merely pass.
|
|
131
|
-
|
|
132
|
-
For an independent spec reviewer, freshly compose the same task-scoped input
|
|
133
|
-
with actor `spec-reviewer` and the exact artifact/task IDs, then send the
|
|
134
|
-
returned `input` to that reviewer before its substantive verdict. Do not
|
|
135
|
-
substitute the author's packet or the coordinator's summary for reviewer
|
|
136
|
-
delivery; the reviewer independently checks source identity and constraints.
|
|
137
|
-
|
|
138
|
-
- Every acceptance claim in the task's obligation is met by the change.
|
|
139
|
-
- Scope is clean: nothing implemented beyond the task; nothing required by it omitted.
|
|
140
|
-
- Out-of-scope work the subagent noticed is recorded with an inline `[NEEDS-TRIAGE]` marker — never
|
|
141
|
-
acted on inside this task.
|
|
142
|
-
|
|
143
|
-
For HTML, capture the actual spec-review event against the exact task and
|
|
144
|
-
artifact identities. After the governed verification runner has produced its
|
|
145
|
-
separate receipt, use `task-review` with those two engine-written receipts. A
|
|
146
|
-
digest or the reviewer/subagent's label is not evidence by itself.
|
|
147
|
-
|
|
148
|
-
Gate: the obligation is fully satisfied and scope is clean. A shortfall returns the task to Phase 2
|
|
149
|
-
with a corrective brief.
|
|
150
|
-
|
|
151
|
-
## Phase 4 — Quality review (once per scope) · gate: BLOCK
|
|
152
|
-
|
|
153
|
-
Runs ONCE per scope — after every task in the current scope has cleared Phase 3 and Phase 5 — over
|
|
154
|
-
the **combined diff** of the scope, not per 2–5-minute task. Per-task review at that granularity
|
|
155
|
-
costs more context than the work and catches nothing the batch diff doesn't; the batch boundary is
|
|
156
|
-
where review pays. (A scope of one task reviews that task's diff — same rule, degenerate case.)
|
|
157
|
-
|
|
158
|
-
Dispatch the reviewers applicable to what the combined diff touches, then `finding-triage`
|
|
159
|
-
(`<plugin-root>/agents/finding-triage.md`) to classify every finding by severity. Select
|
|
160
|
-
reviewers by the diff, not blanket — dispatching an irrelevant reviewer wastes a context:
|
|
161
|
-
|
|
162
|
-
For each dispatched reviewer, compose and send a fresh actor input with the
|
|
163
|
-
union of paths in the combined scope, the current bounded context inputs,
|
|
164
|
-
exact approved spec/plan IDs, and the scope task binding. Preserve independent
|
|
165
|
-
review judgment and all existing review gates. A packet read only by the
|
|
166
|
-
coordinator is not reviewer delivery; unresolved critical constraints block a
|
|
167
|
-
substantive verdict while bounded source inspection remains possible.
|
|
168
|
-
|
|
169
|
-
- `security-reviewer` (`<plugin-root>/agents/security-reviewer.md`) — any security-relevant path (authn/authz, deploy, CI, trust boundary).
|
|
170
|
-
- `auth-crypto-reviewer` (`<plugin-root>/agents/auth-crypto-reviewer.md`) — auth, crypto, key, or secret changes.
|
|
171
|
-
- `dependency-reviewer` (`<plugin-root>/agents/dependency-reviewer.md`) — `package.json` / lockfile / base-image changes.
|
|
172
|
-
- `migration-reviewer` (`<plugin-root>/agents/migration-reviewer.md`) — DB migration add/modify.
|
|
173
|
-
|
|
174
|
-
(Do NOT dispatch `grader` or `scout` — they are INTERNAL to `decision-variance` and must never be
|
|
175
|
-
dispatched here.) If the change touches none of the above domains, the quality bar is `tdd`'s own gates
|
|
176
|
-
plus `coverage-auditor` (already run in `tdd` Phase 4) — record that and proceed.
|
|
177
|
-
|
|
178
|
-
- A security CRITICAL finding halts the loop — see Hard rules.
|
|
179
|
-
- A HIGH finding returns the offending task(s) — attributed by file — to Phase 2; the scope's
|
|
180
|
-
quality review re-runs over the corrected combined diff.
|
|
181
|
-
- MEDIUM and LOW findings are recorded; the active caller owns their disposition. Under an approved
|
|
182
|
-
`/sprint`, use its existing delegated decision rules rather than adding a per-finding user checkpoint.
|
|
183
|
-
In attended execution the user retains that decision; mandatory project policy still applies.
|
|
184
|
-
|
|
185
|
-
Gate: no CRITICAL, no HIGH across the scope's combined diff. Nothing in the scope is `ACCEPTED`
|
|
186
|
-
until this passes.
|
|
187
|
-
|
|
188
|
-
## Phase 5 — Verification · gate: BLOCK
|
|
189
|
-
|
|
190
|
-
Verification-before-completion: apply the shared fresh-run discipline in
|
|
191
|
-
`<plugin-root>/includes/fresh-verification.md`, with **the task's verification command from the
|
|
192
|
-
plan** as the target. Run it yourself in a clean invocation; do not accept a logged result from Phase 2.
|
|
193
|
-
A non-zero exit, or output that does not demonstrate the obligation, returns the task to Phase 2.
|
|
194
|
-
|
|
195
|
-
Gate: the verification command exits clean and its output demonstrates the obligation. Only then.
|
|
196
|
-
|
|
197
|
-
## Phase 6 — Accept and advance · gate: BLOCK
|
|
198
|
-
|
|
199
|
-
Mark a task accepted only when its spec-compliance review and fresh verification
|
|
200
|
-
passed AND the scope's Phase 4 quality review passed. For Markdown, record the
|
|
201
|
-
existing status-cell transition in the plan. For HTML, capture the actual
|
|
202
|
-
combined quality-review event and call `accept-scope` once for the whole scope;
|
|
203
|
-
the resulting engine state and acceptance receipts are the resume ledger. Never
|
|
204
|
-
edit an HTML status cell or create a Markdown counterpart. In either format, an
|
|
205
|
-
acceptance that lives only in conversation context is lost to interruption.
|
|
206
|
-
|
|
207
|
-
- Tasks remain in the current scope → return to Phase 1.
|
|
208
|
-
- **Scoped invocation** (`scope` was passed by `executing-plans`): all scoped tasks `ACCEPTED` → signal
|
|
209
|
-
batch complete and return to `executing-plans`. Do NOT hand to `commit-gate`; the caller owns that decision.
|
|
210
|
-
- **Full-plan invocation** (no `scope`, i.e. `/sprint`): plan complete → hand the branch to
|
|
211
|
-
`commit-gate`, then to the caller's finishing step. The loop does not commit on its own authority.
|
|
212
|
-
|
|
213
|
-
When either path claims the entire HTML plan is currently accepted, invoke the
|
|
214
|
-
installed bridge's `_preflight_current_acceptance` with the exact
|
|
215
|
-
`_resolve_workflow_pair` result, repository-bound client, and engine-returned
|
|
216
|
-
spec/plan IDs. Do not pass or derive authority from a caller label, digest,
|
|
217
|
-
status, or receipt. A refusal means the plan is not complete; return to the
|
|
218
|
-
appropriate execution/reconciliation phase instead of handing off.
|
|
219
|
-
|
|
220
|
-
Gate: every task in the current scope `ACCEPTED`, the suite green, ready for the caller's next step.
|
|
221
|
-
|
|
222
|
-
## Hard rules
|
|
223
|
-
|
|
224
|
-
- MUST dispatch a fresh subagent per task — never reuse one context across tasks.
|
|
225
|
-
- MUST NOT write implementation code before the task's `tdd` Phase 1 completes.
|
|
226
|
-
- MUST accept a task only when both reviews pass AND verification passes on a fresh run.
|
|
227
|
-
- MUST NOT accept a task on a subagent's self-report — run the verification command and read its exit code.
|
|
228
|
-
- MUST halt and surface a real authority or security block, including security CRITICAL findings and
|
|
229
|
-
unresolved `[CONFIRM-NN]` decisions. Ordinary TDD/verification failures and finish-time stale proof
|
|
230
|
-
under an approved sprint take Recovery within the approved sprint in `<plugin-root>/SPRINT.md`.
|
|
231
|
-
A failed gate never auto-passes, and recovery never grants missing commit authority.
|
|
232
|
-
- MUST NOT commit — hand the accepted branch to `commit-gate`.
|
|
233
|
-
- MUST mark out-of-scope findings with an inline `[NEEDS-TRIAGE]` marker and never act on them inside the task.
|
|
234
|
-
- MUST NOT invoke `farm.js` before writing `meta.model` into `plan.json` (or setting `FARM_MODEL`) — the dispatcher fails loudly otherwise.
|
|
235
|
-
- MUST NOT skip model selection (Step 1) when `FARM_MODEL` is not set — exhaust the canary→cache→websearch fallback ladder before BLOCKing; never blind-invoke with an unknown model id.
|
|
236
|
-
- MUST route every green farm task through Phases 3–5 before acceptance — the farm replaces authoring, never review. A cheap model gets the same scrutiny as a premium subagent, not less.
|
|
237
|
-
- MUST treat a single task's drift/gaming/tampered-test escalation as model incapacity (re-dispatch via premium Phase 2); raise `[CONFIRM-NN]` and HALT only when multiple tasks drift onto the same out-of-scope path (a real spec gap).
|
|
238
|
-
- MUST treat a `farm.js` circuit-breaker abort (`aborted: true`) as a hard-gate STOP — surface to the user; do not silently re-dispatch the whole slice to premium.
|
|
239
|
-
- MUST NOT dispatch `grader` or `scout` in Phase 4 — they are INTERNAL to `decision-variance`.
|
|
89
|
+
A reported `DONE` is useful progress, not fresh verification. `eligible` is useful scheduling, not authority. Treat actual failures as failures; do not compensate by adding approval ceremonies or dispatching unrelated reviewers. Do not commit from this skill; use the real `commit-gate` owner when committing is authorized.
|