@arbiterforge/ca-pi 0.10.13 → 0.14.6

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.
Files changed (57) hide show
  1. package/README.md +1 -1
  2. package/package.json +2 -1
  3. package/plugins/ca-pi/CHANGELOG.md +159 -0
  4. package/plugins/ca-pi/SKILLS.md +1 -1
  5. package/plugins/ca-pi/SPRINT.md +40 -10
  6. package/plugins/ca-pi/agents/backend-author.md +1 -1
  7. package/plugins/ca-pi/agents/frontend-author.md +1 -1
  8. package/plugins/ca-pi/generated/command-catalog.json +1 -1
  9. package/plugins/ca-pi/helpers/artifacts/ca-artifact-darwin-amd64 +0 -0
  10. package/plugins/ca-pi/helpers/artifacts/ca-artifact-darwin-arm64 +0 -0
  11. package/plugins/ca-pi/helpers/artifacts/ca-artifact-linux-amd64 +0 -0
  12. package/plugins/ca-pi/helpers/artifacts/ca-artifact-linux-arm64 +0 -0
  13. package/plugins/ca-pi/helpers/artifacts/ca-artifact-windows-amd64.exe +0 -0
  14. package/plugins/ca-pi/helpers/artifacts/ca-artifact-windows-arm64.exe +0 -0
  15. package/plugins/ca-pi/helpers/artifacts/release.json +38 -0
  16. package/plugins/ca-pi/hooks/_approvallib.py +355 -0
  17. package/plugins/ca-pi/hooks/_artifactlib.py +855 -0
  18. package/plugins/ca-pi/hooks/_cleanuplib.py +1553 -0
  19. package/plugins/ca-pi/hooks/_hooklib.py +37 -13
  20. package/plugins/ca-pi/hooks/_host.py +1 -1
  21. package/plugins/ca-pi/hooks/_intentlib.py +31 -0
  22. package/plugins/ca-pi/hooks/_planfilelib.py +34 -1
  23. package/plugins/ca-pi/hooks/_protectedstatelib.py +11 -1
  24. package/plugins/ca-pi/hooks/_readinjectlib.py +120 -0
  25. package/plugins/ca-pi/hooks/_releaselib.py +933 -85
  26. package/plugins/ca-pi/hooks/_standuplib.py +38 -10
  27. package/plugins/ca-pi/hooks/doctor.py +103 -0
  28. package/plugins/ca-pi/hooks/hostapi.py +1 -1
  29. package/plugins/ca-pi/hooks/pi-bridge.py +5 -1
  30. package/plugins/ca-pi/hooks/prompt-submit.py +33 -10
  31. package/plugins/ca-pi/hooks/releasehash.py +46 -32
  32. package/plugins/ca-pi/includes/artifacts.md +166 -0
  33. package/plugins/ca-pi/includes/author-tdd-workflow.md +2 -1
  34. package/plugins/ca-pi/includes/farm.md +27 -4
  35. package/plugins/ca-pi/includes/routing-table.md +2 -2
  36. package/plugins/ca-pi/includes/verification-boundary.md +27 -0
  37. package/plugins/ca-pi/package.json +18 -0
  38. package/plugins/ca-pi/routines/INDEX.md +4 -4
  39. package/plugins/ca-pi/routines/brainstorming/SKILL.md +23 -4
  40. package/plugins/ca-pi/routines/commit-gate/SKILL.md +30 -5
  41. package/plugins/ca-pi/routines/executing-plans/SKILL.md +52 -7
  42. package/plugins/ca-pi/routines/finishing-a-development-branch/SKILL.md +25 -3
  43. package/plugins/ca-pi/routines/refactor/SKILL.md +3 -2
  44. package/plugins/ca-pi/routines/release/SKILL.md +150 -44
  45. package/plugins/ca-pi/routines/subagent-driven-development/SKILL.md +53 -9
  46. package/plugins/ca-pi/routines/subagent-driven-development/references/farm-dispatch.md +20 -3
  47. package/plugins/ca-pi/routines/tdd/SKILL.md +27 -5
  48. package/plugins/ca-pi/routines/using-git-worktrees/SKILL.md +11 -2
  49. package/plugins/ca-pi/routines/writing-plans/SKILL.md +39 -10
  50. package/plugins/ca-pi/routines/writing-plans/references/farm-plan.md +34 -13
  51. package/plugins/ca-pi/skills/ca-chore/SKILL.md +7 -3
  52. package/plugins/ca-pi/skills/ca-commit/SKILL.md +3 -2
  53. package/plugins/ca-pi/skills/ca-doctor/SKILL.md +14 -0
  54. package/plugins/ca-pi/skills/ca-feature/SKILL.md +42 -8
  55. package/plugins/ca-pi/skills/ca-refactor/SKILL.md +4 -2
  56. package/plugins/ca-pi/skills/ca-release/SKILL.md +7 -6
  57. package/plugins/ca-pi/skills/ca-standup/SKILL.md +36 -8
@@ -0,0 +1,166 @@
1
+ # Typed HTML specifications and plans
2
+
3
+ Load inside the existing brainstorming, planning, TDD, execution or resume
4
+ workflow for new full-lane work or an existing HTML pair.
5
+ This leaf adds no slash command, agent, skill registration or persistent model
6
+ tool.
7
+
8
+ **Default authoring boundary:** new full feature and sprint spec/plan pairs
9
+ default to canonical `.html`. Check the installed capability before writing; a
10
+ missing, invalid, mismatched or unqualified capability is a STOP and
11
+ the workflow must not fall back to Markdown or create any fallback artifact.
12
+ Report `CAPABILITY_MISSING` and direct the user to repair or reinstall the pinned
13
+ artifact payload before retrying. An existing `.md` exact pair remains Markdown
14
+ and continues on the legacy path without automatic conversion. The feature
15
+ small lane remains an inline mini-spec and creates no artifact. HTML `--farm`
16
+ dispatch remains disabled and outside this rollout.
17
+
18
+ ## Internal execution contract
19
+
20
+ The normal qualified package's installation-owned `release.json` pins the native
21
+ executable bytes. The stdlib
22
+ `hooks/_artifactlib.py` bridge selects only that verified installed payload,
23
+ never PATH, an environment-selected binary or a path supplied by the project.
24
+ The existing host's governed execution mechanism and permissions remain
25
+ applicable. An absent payload or denied invocation is a capability gap to
26
+ surface, not permission to bypass the gate.
27
+
28
+ Use one operation with JSON on stdin:
29
+
30
+ ```text
31
+ ca-artifact <operation> --root <project-root> --request -
32
+ ```
33
+
34
+ Requests carry `protocol: codearbiter.artifact-api/0.1.0`. Query `schema` for the
35
+ needed operation or record fragment only; do not preload complete schemas. Return
36
+ stdout is a single bounded JSON envelope. Nonzero exits are failures except the
37
+ structured `validate` response explicitly reporting `valid: false` (also a gate
38
+ failure). Logs/stderr are not artifact content.
39
+
40
+ ## Authoring and approval
41
+
42
+ New full-lane specs and plans use `.codearbiter/specs/<slug>.html` and
43
+ `.codearbiter/plans/<slug>.html`. Create a draft, then use typed `apply` changes;
44
+ do not write or regex-edit HTML or its embedded JSON. `record.add` allocates a
45
+ stable ID when omitted. Keep criterion IDs from the spec in plan references;
46
+ never assign a second criterion ledger. Use `record.update` and explicit
47
+ retirement reasons. There is no generic status/approval update.
48
+
49
+ Drafts may be incomplete. `validate` with `gate: ready` is required before review.
50
+ It checks types, references, scope coverage, contracts and task definitions—not
51
+ semantic truth. Retain the existing negative-intent question, adversarial review,
52
+ ADR compatibility review, open-question handling, harvest and user/SMARTS gates.
53
+ One criterion may need multiple tests. Never invent a condition, oracle, source,
54
+ command, result, approval or reviewer to satisfy a required field.
55
+
56
+ The existing user, SMARTS, reviewer, or verification boundary must first persist
57
+ its actual policy-owned workflow event as canonical JSON in the reserved
58
+ content-addressed authority-source store. Interactive prompt approval currently
59
+ has production host seams in Claude Code and Codex. Pi 0.84.1 exposes no
60
+ pre-model event carrying the user's exact prompt, so under Pi do not arm this
61
+ adapter; the workflow remains blocked until a Pi-native authority adapter is
62
+ implemented. On Claude Code or Codex, arm the exact current artifact immediately
63
+ before asking the approval question:
64
+
65
+ ```sh
66
+ python "<plugin-root>/hooks/_approvallib.py" arm --root "<project-root>" --artifact-id <artifact-id>
67
+ ```
68
+
69
+ Present the returned `reply` value verbatim and require that exact reply. The
70
+ `UserPromptSubmit` hook rechecks the armed identity, records the host-observed
71
+ prompt as the policy-owned source, captures its receipt, and applies approval.
72
+ An ordinary `yes`, a changed artifact, a wrong token, or a model-authored event
73
+ does not confer authority. On the next turn, verify `validate` at the `approved`
74
+ gate before continuing. If the user declines or the artifact changes, cancel the
75
+ exact pending request before arming another one:
76
+
77
+ ```sh
78
+ python "<plugin-root>/hooks/_approvallib.py" cancel --root "<project-root>" --artifact-id <artifact-id>
79
+ ```
80
+
81
+ Cancellation records no authority. Other workflow authorities must use their
82
+ corresponding host-owned adapters; never call `capture` with request-authored
83
+ `authority_kind`, verdict, actor, or source-text labels, and never create an
84
+ authority source merely to satisfy an artifact transition.
85
+ `capture` does not change approval state. `approve` checks the resulting receipt
86
+ against current ready content. A missing or changed receipt, captured event, or
87
+ still-present policy source returns `AUTHORITY_UNVERIFIED`. Receipt format 0.1.0
88
+ remains readable for inspection after upgrade but is not authority-bearing; the
89
+ applicable policy boundary must produce a fresh 0.2.0 attestation before further
90
+ approval, dispatch, acceptance, commit proof, or finalization. This is the
91
+ repository's cooperative same-user attestation model, not cryptographic identity
92
+ proof or protection from an unrestricted same-user filesystem writer.
93
+
94
+ Create a plan as `draft_preview`, consume existing criterion IDs, then `plan-bind`
95
+ to the approved spec. Approve the plan through the applicable existing workflow.
96
+ A normative change invalidates its approval. Rebinding is explicit and preserves
97
+ history; it does not waive coverage or permit silent reinterpretation.
98
+
99
+ ## Reading and dispatch
100
+
101
+ Use `index`, then `outline`, then symbol-scoped `read`. Exact reads are explicitly
102
+ context-incomplete. Execution uses contextual pages; follow every `next_cursor`
103
+ until `context_complete: true`, and retain the final context ticket. Cursors bind
104
+ both documents and contributing receipts/events. No partial record is silently
105
+ returned. A stale cursor/ticket requires a fresh read.
106
+
107
+ These cursors and tickets name engine-written, content-addressed cooperative
108
+ delivery receipts. They are not authentication secrets and do not claim
109
+ resistance to an unrestricted same-user filesystem writer. A digest without its
110
+ corresponding engine-written receipt is rejected.
111
+
112
+ `eligible` is authoritative for task selection on the HTML path.
113
+ `task-start` checks current spec/plan approval, binding, prerequisites, source
114
+ snapshot, dependency evidence and the complete context ticket. Within a checkpoint,
115
+ a predecessor in `REVIEW` can provisionally unblock its dependent after fresh
116
+ verification and spec review. Across checkpoints, dependencies require accepted
117
+ scope evidence. Provisional progress never counts as completion.
118
+
119
+ The orchestrator executes the declared verification through its existing governed
120
+ execution tool, captures actual named-test outcomes and output hashes, and obtains
121
+ a separate spec review. `task-review` records those receipts. After every task in
122
+ the scope reaches `REVIEW`, reverify against one current source snapshot, review
123
+ the combined scope, and use `accept-scope` once. Do not accept tasks individually.
124
+
125
+ `IN_PROGRESS` after interruption requires reconciliation, not automatic completion.
126
+ `REVIEW` requires fresh evidence. Source changes stale proof; state/branding updates
127
+ do not stale their own verification. `task-block` invalidates downstream provisional
128
+ states. `scope-reconcile` records a reviewed new baseline after plan edits.
129
+
130
+ ## Mutation and recovery
131
+
132
+ Every artifact mutation supplies the revision AND model hash last read, plus a
133
+ unique operation ID. On conflict, reread and reconsider—never overwrite forcefully.
134
+ A response lost after replacement is not evidence that nothing changed. Retry the
135
+ same operation ID with identical input, or use `recover` on an uncertain transaction.
136
+ Replaying a completed operation returns its original completion fields and a
137
+ transaction marked as replayed; use `identity` for the current document identity.
138
+ An older journal may return `refresh_required: true` instead. A rolled-back
139
+ operation is not success. Keep journal-compatible tooling when restoring code.
140
+ A transaction that was rolled back returns `OPERATION_ROLLED_BACK`.
141
+
142
+ `repair-preview` identifies an inconsistent generated view. `repair-apply` requires
143
+ both original-byte and candidate hashes and retains original bytes; it never
144
+ infers semantic edits from human-modified HTML. Export writes a standalone copy
145
+ outside canonical directories. Rebranding accepts only validated local assets.
146
+
147
+ ## Legacy transition and blocked capabilities
148
+
149
+ Legacy Markdown remains readable through the old workflow. Conversion is explicit:
150
+ `migration-preview` receives typed spec/plan models and a complete nonoverlapping
151
+ line-disposition map for each original file. Review the models and mappings, then
152
+ `migration-apply` binds to the exact preview digest and records the review. Both
153
+ new artifacts are drafts. Original approval/status prose is not transferred.
154
+ Cutover is recoverable as a pair; completed cutovers use `migration-rollback`, which
155
+ refuses any intervening candidate edit. Original bytes remain in transaction history.
156
+
157
+ **HTML farm dispatch remains disabled and out of scope.** The
158
+ engine can derive an immutable base-bound projection, verify it before canary,
159
+ permit only `meta.model`/`meta.apiBaseUrl` enrichment, and seal exact execution
160
+ bytes plus caller-supplied provider-selection assertions. Those assertions are
161
+ auditable correspondence, not authenticated provenance. The shared built dispatcher enforces the checks
162
+ before side effects. Keep the HTML `--farm` path disabled until real authority
163
+ adapters, native packaged payloads and the fresh frontier/low-tier qualification
164
+ matrix all pass; the June 2026 run earns no current credit. Existing legacy farm
165
+ behavior is unchanged. Enabling normal premium-path HTML authoring does not count
166
+ as farm qualification or authorize farm dispatch.
@@ -3,12 +3,13 @@
3
3
  Canonical for the author agents (`backend-author`, `frontend-author`). Loaded via each agent's
4
4
  Required Reading; the agent bodies do not restate it. This is the worker's execution order for
5
5
  one task — the tdd skill's phase gates govern the lane above it.
6
+ Apply `<plugin-root>/includes/verification-boundary.md` throughout.
6
7
 
7
8
  Fixed order. Do not skip or reorder.
8
9
 
9
10
  1. **Write failing tests** — one test per obligation in the Phase 1 checklist
10
11
  2. **Confirm tests fail for the right reason** — run the test command from `tech-stack.md`; the failure must match the obligation, not an unrelated error
11
12
  3. **Write minimum implementation** — only enough code to make the failing tests pass; no extra scope
12
- 4. **Run full suite** — every test green
13
+ 4. **Run impact-bounded local suite** — every affected test green; exhaustive and cross-platform proof runs in exact-head hosted CI before merge
13
14
  5. **Run lint and type-check** — both clean
14
15
  6. **Stage for commit** — only after steps 1–5 complete
@@ -1,8 +1,31 @@
1
1
  # codeArbiter farm — setup and configuration
2
2
 
3
- > **Feature Forge `preview`.** The `--farm` backend ships off by default and is not yet validated on
4
- > real runs; the premium subagent path is the blessed default. Promotion bar:
5
- > `<project-root>/.codearbiter/open-questions.md` (CONFIRM-05).
3
+ > **Feature Forge `preview`.** The `--farm` backend ships off by default; the premium subagent path is
4
+ > the blessed default. Historical runs informed the design but count as zero current qualification
5
+ > evidence. Promotion requires the complete fresh-evidence bar below.
6
+
7
+ ## Stable opt-in promotion bar
8
+
9
+ Qualification starts at zero on 2026-09-16. Runs before that date are historical development evidence
10
+ only and earn no promotion credit. Before promotion, one durable qualification packet must bind all
11
+ evidence to exact farm revisions and show:
12
+
13
+ - at least five completed farm slices across at least three distinct repositories;
14
+ - at least 50 dispatched implementation tasks;
15
+ - completed evidence from Windows and a POSIX host, spanning at least two selected model identities;
16
+ - at least 85% direct farm completion, no more than 15% premium escalation, and no more than 1.5
17
+ average attempts per dispatched task;
18
+ - zero circuit-breaker trips, gate escapes, security incidents, supply-chain incidents, or unresolved
19
+ HIGH findings;
20
+ - the ordinary integrated suite, full review chain, and fresh verification passing for every slice;
21
+ - at least 25% lower premium implementation-token consumption than comparable premium execution,
22
+ counting escalations and review rather than treating worker tokens as the whole cost.
23
+
24
+ All qualifying runs must use the then-current farm implementation and provider model set. A material
25
+ farm implementation change or provider/model-set change before promotion invalidates the affected
26
+ evidence and requires it to be rerun. Promotion means **stable opt-in** only: it does not make farm the
27
+ default, remove any external-dispatch trust gate, or enable typed-HTML farm projection. The typed-HTML
28
+ path remains blocked until its own integration and qualification are complete.
6
29
 
7
30
  `farm.ts` is the pluggable execution backend: Claude writes specs, failing tests, and a `plan.json`;
8
31
  the farm runs workers in isolated git worktrees to make each test pass; Claude reviews and merges. Its
@@ -38,7 +61,7 @@ capable of the slice).
38
61
  `FARM_MUTATION_TEST_CMD` set and must print a trailing JSON line with a numeric `score`.
39
62
 
40
63
  Note: `writing-plans --farm` MUST place the task's narrow behavioral test first in `gate.commands` —
41
- the mutation guard runs `gate.commands[0]` as the per-mutant test (running the full suite per mutant
64
+ the mutation guard runs `gate.commands[0]` as the per-mutant test (running an exhaustive suite per mutant
42
65
  would be too slow).
43
66
 
44
67
  ### Best-of-N sampling and iterative retries
@@ -46,8 +46,8 @@ reached the same way.
46
46
  | Unsure `/reconcile` vs `/conflict`? | rules contradict and work cannot safely continue → `/conflict`; artifacts drifted, work continues → `/reconcile` | — | When genuinely ambiguous, `/conflict` wins — stopping is recoverable, drifting past a rule conflict is not |
47
47
  | New skill needed | `/new-skill` → `skill-author` | — | No skill until the gap is proven uncovered |
48
48
  | Subagent raises an out-of-scope finding | inline `[NEEDS-TRIAGE]` marker | — | Never an ADR disposition; never silently dropped |
49
- | Sitting down to code / repo hygiene cleanup | `/ca-standup` → orchestrator git actions | — | ff-only pull on a clean tree; each branch/worktree delete confirmed individually; stash/dirty/un-pushed report-only; never touch the default branch |
50
- | Finish an already-merged branch (post-merge cleanup) | `/ca-cleanup` → `post-merge-cleanup` | — | Ancestry of the FETCHED default proven before any delete; unique/unclassifiable artifacts never discarded without a per-item confirmation; `--ff-only` and `branch -d` only; remote branch untouched; never routes to `/ca-override` |
49
+ | Sitting down to code / repo hygiene cleanup | `/ca-standup` → orchestrator git actions | — | ff-only pull on a clean tree; branch deletions confirmed individually, worktree removals may be confirmed as one named enumerated group; stash/dirty/un-pushed report-only; never touch the default branch |
50
+ | Finish an already-merged branch (post-merge cleanup) | `/ca-cleanup` → `post-merge-cleanup` | — | Merge proven against the FETCHED default by ancestry, PR-record squash proof, or a byte-identical fallback; unique/unclassifiable artifacts never discarded without a per-item confirmation; `--ff-only`; `branch -d`, or `-D` only under the restated squash-proof path; remote branch untouched; never routes to `/ca-override` |
51
51
  | Add / start / done a backlog task | `/ca-task` → `hooks/taskwrite.py` (the pure `_taskboardlib` transforms) | — | Board written only through the writer; `start` always stamps a date; `done` requires in-progress; never delete to complete |
52
52
  | Local runtime work (run, watch, exercise this repo's own app) | `mode --ops` → narrows the persona per `includes/ops-mode.md`, no skill/agent dispatch | — | Advisory only, no hook becomes mode-aware; permitted only when the operation starts, observes, or exercises and leaves no change in tracked files or git history — anything that mutates tracked files, the index, git history, or published state still routes normally |
53
53
  | Promote a workflow's un-actioned follow-ups | `includes/harvest.md` (run at a terminal step) → `/ca-task` (work) / `open-questions.md` (decision) | — | Batch-confirm interactive; SMARTS-logged auto under `/sprint`; dedup by `(from <origin>)`; a blocking decision escalates, never demoted |
@@ -0,0 +1,27 @@
1
+ # Local and hosted verification boundary
2
+
3
+ Use **impact-bounded local verification** for the contributor loop. Before a
4
+ commit or pull request, run the smallest fresh set that directly proves the
5
+ changed obligations and affected contracts, plus applicable lint/type-check,
6
+ coverage, generated-artifact parity, staged secret scanning, and specialized
7
+ security, dependency, migration, release, ADR, or deployment gates. A failing
8
+ local check blocks. Do not require a repository-wide or cross-platform suite on
9
+ the contributor's machine merely to create a commit or open a pull request.
10
+
11
+ GitHub's public-repository **hosted CI** owns exhaustive and cross-platform
12
+ validation. Before merge, bind the pull request's current exact-head commit and
13
+ require its repository merge-readiness aggregate, including every job selected
14
+ by the impact planner. Missing, stale, cancelled, or mismatched hosted evidence
15
+ does not count: **MUST NOT merge** until the exact-head required checks pass.
16
+
17
+ Hosted CI is not a substitute for evidence that cannot be exercised safely or
18
+ faithfully on a hosted runner, such as a user-authorized live device, private
19
+ environment, or local integration boundary. Run that proof locally when the
20
+ acceptance criterion requires it, record the environment and result, and still
21
+ require hosted CI for the repository checks it owns.
22
+
23
+ This allocation changes where exhaustive compute runs, not the strength of the
24
+ gates. It never waives focused regression proof, coverage thresholds, lint or
25
+ type-check failures, security and secret controls, dependency review, migration
26
+ review, release invariants, ADR lifecycle proof, deployment review, or exact-head
27
+ merge protection.
@@ -0,0 +1,18 @@
1
+ {
2
+ "name": "@arbiterforge/ca-pi",
3
+ "version": "0.14.6",
4
+ "private": true,
5
+ "license": "AGPL-3.0-only",
6
+ "type": "module",
7
+ "engines": {
8
+ "node": ">=22.19.0"
9
+ },
10
+ "pi": {
11
+ "extensions": [
12
+ "./extensions/codearbiter.js"
13
+ ],
14
+ "skills": [
15
+ "./skills"
16
+ ]
17
+ }
18
+ }
@@ -8,14 +8,14 @@ Skill bodies load on routing only. This index is the surface scan; never bulk-re
8
8
  | Skill | Routed to by | Owns |
9
9
  |---|---|---|
10
10
  | [tdd](tdd/SKILL.md) | `/feature` (after spec approval), `/fix`, `/refactor` | The test-first gate: six phases — obligation scan → red → green → obligation verify → coverage → lint. No implementation before Phase 1; no path to `commit-gate` until all six gates are green. |
11
- | [commit-gate](commit-gate/SKILL.md) | `/commit` | The commit gate: nine phases — permission, branch, classification, verification, behavioral proof, diff review, selective stage, message, commit. No commit while the suite is red, the behavior unproven, or secrets/cruft present. |
11
+ | [commit-gate](commit-gate/SKILL.md) | `/commit` | The commit gate: nine phases — permission, branch, classification, impact-bounded local verification under the shared [verification boundary](../includes/verification-boundary.md), behavioral proof, diff review, selective stage, message, commit. No commit while an applicable check is red, the behavior unproven, or secrets/cruft present; exhaustive exact-head proof remains a hosted-CI merge gate. |
12
12
  | [decision-variance](decision-variance/SKILL.md) | `/reconcile` | SMARTS 6-lens arbitration of project/ADR conflicts; append-only, user-attributed decision log + audit trail. Never decides alone — every choice carries user attribution. |
13
13
  | [debug](debug/SKILL.md) | `/debug` | Investigate-then-decide root-cause analysis: five phases. Investigation only, no code change here; forces one named exit — `/fix`, `/adr`, or a no-action close. |
14
14
  | [refactor](refactor/SKILL.md) | `/refactor` | Behavior-preserving change behind a parity-coverage proof gate; routes to `tdd` Phase 1 only when new test seams are needed. |
15
15
  | [context-creation](context-creation/SKILL.md) | `/create-context` (brownfield) | Back-fills `.codearbiter/` from existing source via parallel scouts; writes `CONTEXT.md` (`arbiter: enabled` + `stage:`) and locks it `<!--INITIALIZED-->`. |
16
16
  | [decompose](decompose/SKILL.md) | greenfield startup, `/decompose` | Six-layer senior-architect interview, compaction-resilient via per-layer disk drafts + DRAFT ADRs; populates `.codearbiter/` and locks it initialized. |
17
- | [brainstorming](brainstorming/SKILL.md) | `/feature` (front), `/sprint` planning | Socratic idea→spec: split bundles, shape the approach, then decide parameters / ask forks in full; adversarial self-review before approval; writes `specs/<slug>.md` whose acceptance criteria become `tdd` obligations. Hard-gate: no code until the spec is approved. |
18
- | [writing-plans](writing-plans/SKILL.md) | `/feature`, `/sprint` (after the spec) | Decomposes an approved spec into small tasks, each with a path + a verification that maps to a `tdd` obligation; writes `plans/<slug>.md` with bijective criterion↔task coverage. |
17
+ | [brainstorming](brainstorming/SKILL.md) | `/feature` (front), `/sprint` planning | Socratic idea→spec: split bundles, shape the approach, then decide parameters / ask forks in full; adversarial self-review before approval; writes new full-lane `specs/<slug>.html` through the installed engine while preserving existing Markdown authority. Its acceptance criteria become `tdd` obligations. Hard-gate: no code until the spec is approved. |
18
+ | [writing-plans](writing-plans/SKILL.md) | `/feature`, `/sprint` (after the spec) | Decomposes an approved spec into small tasks, each with a path + a verification that maps to a `tdd` obligation; writes a same-format plan with bijective criterion↔task coverage (`.html` by default, `.md` for an existing Markdown spec). |
19
19
  | [executing-plans](executing-plans/SKILL.md) | `/feature` | Checkpoint coordinator — groups tasks into batches, delegates each to `subagent-driven-development` (fresh author agent per task, full review chain), stops for user acknowledgement between batches. |
20
20
  | [subagent-driven-development](subagent-driven-development/SKILL.md) | `/sprint` (engine), `executing-plans` (batch scope) | Fresh subagent per task → spec-compliance then quality review → fresh-run verification; accepts only on proof. Hard-stops on `tdd` BLOCK, security CRITICAL, `[CONFIRM-NN]`. |
21
21
  | [dispatching-parallel-agents](dispatching-parallel-agents/SKILL.md) | `subagent-driven-development`, `/sprint`, parallel `/review` | Reusable fan-out primitive: bound concurrency, collect, dedupe, funnel through `finding-triage`→`verdict-aggregator`. Results unused until the read-only funnel runs. |
@@ -25,7 +25,7 @@ Skill bodies load on routing only. This index is the surface scan; never bulk-re
25
25
  | [crypto-compliance](crypto-compliance/SKILL.md) | changed code uses crypto/hashing/signing/TLS/random | The banned-primitive gate: one scan. Rejects broken primitives, disabled TLS verification, home-rolled crypto; approved list lives in `security-controls.md`. Dispatches `auth-crypto-reviewer`. |
26
26
  | [skill-author](skill-author/SKILL.md) | `/new-skill "<gap>"` | The only path to a new skill: five phases — gap evidence, scope, authoring, self-review against the v2 house style, routing integration. No skill written until the gap is proven uncovered; none shipped without gated phases, hard rules, and an `INDEX.md` + routing entry. |
27
27
  | [decision-lifecycle](decision-lifecycle/SKILL.md) | `/adr`, `/adr-status` | Lean ADR author + status: author a numbered, dated, user-attributed ADR under `.codearbiter/decisions/`; list/status; forward-only supersede chains. Optional `decision-challenger`. Log-entry format lives in `includes/smarts/decision-log-format.md`. ADRs only via `/adr`, with user attribution. |
28
- | [release](release/SKILL.md) | `/release` | Lean SemVer release, three phases: derive the bump from Conventional-Commits since the last tag + roll `CHANGELOG.md`; cut the annotated tag + report; publish (push tag + `gh release create`) on explicit authorization. No tag on a red suite; no direct-to-main/force-push; nothing published unbidden; a release commit routes through `commit-gate`. |
28
+ | [release](release/SKILL.md) | `/release` | Lean declared-policy release, three phases: derive the next identity from Conventional Commits under `version-policy` + roll the changelog; cut the annotated tag and qualify declared assets through either a protected hosted `release-build` or a provenance-bound retained exact-head CI cohort; publish that tag and only those assets on explicit authorization, then verify the remote inventory. SemVer remains the default. No tag on a red suite; no direct-to-main/force-push; nothing published unbidden; a release commit routes through `commit-gate`. |
29
29
  | [security-architecture](security-architecture/SKILL.md) | `/threat-model` (optional) | OPTIONAL lightweight STRIDE pass for sensitive features: attack surface → STRIDE → findings, governed by `security-controls.md`. MAY dispatch `security-reviewer` / `auth-crypto-reviewer`. Not a routine gate; hard-STOPs only on a critical unmitigated threat. |
30
30
  | [context-check](context-check/SKILL.md) | `/context-check` | OPTIONAL manual drift audit: load `.codearbiter/.provenance/` via `load_provenance_dir` + `compute_drift`, report stale docs, then per stale doc: re-scout / re-baseline (`rebaseline`) / defer. Not the daily loop — commit-gate auto-heal owns routine maintenance. |
31
31
  | [post-merge-cleanup](post-merge-cleanup/SKILL.md) | `/ca-cleanup` | The already-merged branch transition: fetch, prove `HEAD` is contained in the fetched default (SHA-ancestry, or a squash-merge proven by the merged PR record), classify every dirty/untracked artifact as unique/redundant/superseded, resolve each under its own confirmation, fast-forward the local default ref then `--ff-only` onto it, then `branch -d` the merged local branch. Unique or unclassifiable artifacts are never discarded unbidden; the remote branch is never touched; never routes to `/ca-override`. |
@@ -6,6 +6,23 @@ disable-model-invocation: true
6
6
 
7
7
  # brainstorming
8
8
 
9
+ ## Structured-artifact boundary
10
+
11
+ For new full-lane work or an existing HTML spec/plan, load
12
+ `<plugin-root>/includes/artifacts.md` before artifact I/O. Before Phase 1, call
13
+ `_select_authoring_route` with the trusted project root, slug, invoking workflow,
14
+ and selected lane; use only its returned mode, format, and paths. For a selected
15
+ HTML route it checks the
16
+ installed capability before writing; missing or invalid HTML capability is a
17
+ STOP and the workflow must not fall back to Markdown. Its typed
18
+ ID, binding, readiness, receipt, contextual-read and scope-state rules replace
19
+ legacy Markdown parsing and direct status-cell edits for that pipeline. Keep all
20
+ other workflow gates, including human checkpoints, unchanged. Existing `.md`
21
+ artifacts remain on their legacy path. New full-lane specs use the installed
22
+ structured-artifact engine and default to canonical `.html`. HTML `--farm`
23
+ dispatch remains blocked.
24
+
25
+
9
26
  Refine the idea before it touches code. Routed to by `/feature` (before `tdd`) and by `/sprint` (the planning front).
10
27
 
11
28
  ## Pre-flight
@@ -78,13 +95,15 @@ Gate: every vague term made concrete; every fork resolved by the user or recorde
78
95
 
79
96
  ## Phase 4 — Write the spec · gate: BLOCK
80
97
 
81
- Write the agreed spec to `<project-root>/.codearbiter/specs/<slug>.md`. The slug is derived from the feature. The spec holds:
98
+ Create the agreed spec through the installed structured-artifact engine at
99
+ `<project-root>/.codearbiter/specs/<slug>.html`; do not write the HTML or its
100
+ embedded model directly. The slug is derived from the feature. The spec holds:
82
101
 
83
102
  - **Problem** — the Phase 1 framing in final form.
84
103
  - **Approach** — the Phase 2 choice and the trade-off that picked it, in two or three sentences.
85
104
  - **Scope** — what is in, and the explicit out-of-scope boundary.
86
105
  - **Decided parameters** — the parameter-level choices made in Phase 3, each in one line, so the approval reads them instead of discovering them in code review.
87
- - **Acceptance criteria** — a numbered list, each criterion concrete and testable: a specific input, the observable output, the boundary or failure behavior. Each criterion is verifiable by a single test. "It works well" is not a criterion. These become `tdd` Phase 1 obligations — one obligation per criterion, so an untestable criterion is a defect to fix here, not in `tdd`.
106
+ - **Acceptance criteria** — a numbered list, each criterion concrete and testable: a specific input, the observable output, the boundary or failure behavior. Each criterion is verifiable by one or more focused tests. "It works well" is not a criterion. These become `tdd` Phase 1 obligations — one obligation per criterion, so an untestable criterion is a defect to fix here, not in `tdd`.
88
107
  - **Open questions** — every `[CONFIRM-NN]` raised, cross-referenced to `open-questions.md`.
89
108
  - **Governs** *(optional)* — a spec-header line `**Governs:** <comma-separated globs>` that enrolls the approved spec in file-scoped just-in-time context injection: on a Read of any file matching one of the listed globs, a pointer to this spec is surfaced to the agent (tier 3 of the file→knowledge map). Adding the line is sufficient to enroll; no other change required.
90
109
 
@@ -94,7 +113,7 @@ Gate: the spec file exists on disk under `specs/`, with at least one acceptance
94
113
 
95
114
  The spec earns its approval; it is not waved through. Two passes over the FILE as written, then the stop:
96
115
 
97
- 1. **Mechanical self-review** — one pass, fix inline, no re-review: no placeholder text (`TBD`, `???`, an unfilled section); no criterion that contradicts the scope; nothing that crosses the `CONTEXT.md` NOT-building boundary; no criterion that contradicts an accepted ADR or `plans/01`'s recorded component boundaries (ADR-0025); every criterion still testable by a single test after the edits; the vague-language lens applied to the spec's own prose.
116
+ 1. **Mechanical self-review** — one pass, fix inline, no re-review: no placeholder text (`TBD`, `???`, an unfilled section); no criterion that contradicts the scope; nothing that crosses the `CONTEXT.md` NOT-building boundary; no criterion that contradicts an accepted ADR or `plans/01`'s recorded component boundaries (ADR-0025); every criterion still testable by one or more focused tests after the edits; the vague-language lens applied to the spec's own prose.
98
117
  2. **Adversarial pass** — build the strongest case AGAINST the design before the user reads it: the failure mode most likely to be real, the criterion most likely to be wrong, the assumption that would invalidate the approach if false. Present what survives WITH the spec at approval — the user rules on a challenged design, not a defended one. Finding nothing is a reportable result, stated in one line, not a silent skip.
99
118
  3. **Approval:**
100
119
  - **Under `/feature`** — present the spec and the adversarial findings, and request explicit user approval. Iterate on the file in place until the user approves. A blocking `[CONFIRM-NN]` must be resolved by the user before approval — never auto-resolve it.
@@ -109,7 +128,7 @@ Gate: both review passes run against the file on disk, adversarial findings pres
109
128
  - MUST NOT write implementation code or route to `tdd` before the spec is on disk under `specs/` AND approved.
110
129
  - MUST NOT refine a bundle — an idea holding more than one independently shippable concern splits in Phase 1, before any question budget is spent.
111
130
  - MUST NOT manufacture alternatives in Phase 2 — when one sane approach exists, say so and why.
112
- - MUST NOT write an acceptance criterion that cannot be verified by a single test.
131
+ - MUST NOT write an acceptance criterion that cannot be verified by one or more focused tests.
113
132
  - MUST decide parameter-level choices and record them in the spec; MUST ask genuine forks in full, with a recommendation, the first time — never name an open decision without asking it.
114
133
  - MUST stop a non-converging refinement loop and force one adjudication — a contradiction or a resurfacing fork is a breaker, not a prompt to circle.
115
134
  - MUST run the `uncovered_intent` mechanical backstop and ask the negative-judgment question ("if every criterion passed and nothing else changed, what would still be broken?") before closing Phase 3 — bijective coverage in `writing-plans` proves the plan and the ledger agree with each other, never that the ledger is complete (#566).
@@ -12,8 +12,25 @@ The only permitted path to a commit. Bypassing it is a hard-rule violation. Rout
12
12
  Read these, or STOP and surface the gap — never guess a command:
13
13
 
14
14
  - `<project-root>/.codearbiter/tech-stack.md` — test, lint, and secrets-scan invocations. Stop if missing; do not guess.
15
+ - `<plugin-root>/includes/verification-boundary.md` — the required split between focused local proof and exhaustive exact-head hosted CI.
15
16
  - A git repository must be present and `git status` available.
16
17
  - The `tdd` skill must have cleared all six phases for any new or modified feature code in the staged set. If `tdd` is incomplete, STOP and surface the gap.
18
+ - The discovered authoritative spec/plan pair, when this commit belongs to a
19
+ `/feature` or `/sprint` pipeline. For HTML, load
20
+ `<plugin-root>/includes/artifacts.md`; use the engine `identity` and `eligible`
21
+ results, and treat the exact spec and plan identities plus the acceptance
22
+ receipts bound in engine state as the commit proof. Require
23
+ `all_accepted_and_current: true` before this gate can commit completed plan
24
+ work. The gate must not parse rendered HTML and must not consult a shadow
25
+ Markdown ledger. Displayed state, checkboxes, hashes, or caller-supplied
26
+ labels cannot substitute for current engine acceptance.
27
+
28
+ For that HTML pair, invoke the installed bridge's
29
+ `_preflight_current_acceptance` with the exact `_resolve_workflow_pair` result,
30
+ the repository-bound client, and the spec/plan IDs returned by the engine. Use
31
+ its returned identities and receipts as the proof for this gate. A refusal is a
32
+ BLOCK before staging or committing; never construct an equivalent proof from
33
+ caller metadata.
17
34
 
18
35
  ## Phase 1 — Permission · gate: BLOCK
19
36
 
@@ -49,9 +66,10 @@ Gate: the staged set is type-homogeneous with a single type and scope.
49
66
 
50
67
  ## Phase 4 — Verification · gate: BLOCK
51
68
 
52
- Read the test, lint, and secrets-scan commands from `tech-stack.md`. Then:
69
+ Read the test, lint, and secrets-scan commands from `tech-stack.md`, then apply
70
+ `<plugin-root>/includes/verification-boundary.md`:
53
71
 
54
- - Run the test command. ALL tests green. Any failure blocks.
72
+ - Run the impact-bounded local tests that directly cover the staged paths and obligations. Any failure blocks. Repository-wide and cross-platform suites belong to exact-head hosted CI before merge, not this commit gate.
55
73
  - Run lint, and the type-check if the project is statically typed. Zero errors.
56
74
  - Run the secrets scan on ALL staged files, regardless of commit type. Any finding blocks.
57
75
  - **Security gates (mandatory routing):** if the staged diff touches crypto/TLS or secret patterns, route it through `crypto-compliance` (`<plugin-root>/routines/crypto-compliance/SKILL.md`) and/or `secret-handling` (`<plugin-root>/routines/secret-handling/SKILL.md`) — they scan against `security-controls.md` and, on pass, record the diff-bound marker `.codearbiter/.markers/security-gate-passed` (via `hooks/security-pass.py`). This is not optional: the PreToolUse commit hook **H-09b/H-10b blocks the commit** until that gate pass is recorded AND covers every sensitive line being committed.
@@ -60,7 +78,7 @@ Read the test, lint, and secrets-scan commands from `tech-stack.md`. Then:
60
78
 
61
79
  Record each result (PASS / BLOCK) for the report.
62
80
 
63
- Gate: test, lint, secrets scan, and (when crypto/secret is touched) the security gate all PASS. Any failure halts the commit until fixed and re-run.
81
+ Gate: the applicable focused tests, lint/type-check, secrets scan, and specialized gates all PASS. Any failure halts the commit until fixed and re-run. This gate does not claim that exhaustive hosted CI has run; `finishing-a-development-branch` proves that separately before merge.
64
82
 
65
83
  ## Phase 5 — Behavioral proof · gate: BLOCK
66
84
 
@@ -68,7 +86,11 @@ Apply the shared fresh-run discipline in `<plugin-root>/includes/fresh-verificat
68
86
  **the spec's acceptance criterion** as the target — prove the behavior against the spec, not against a
69
87
  self-report.
70
88
 
71
- - Identify the proving command or observable: the acceptance criterion from `<project-root>/.codearbiter/specs/<slug>.md` (or the task's verification in the plan). If none exists, derive the smallest command that exercises the claimed behavior.
89
+ - Identify the proving command or observable from the selected authoritative
90
+ pair. For Markdown, use the existing criterion and task-verification text. For
91
+ HTML, use the exact criterion and task records returned by symbol-scoped
92
+ engine `read`; never scrape the rendered document. If none exists, derive the
93
+ smallest command that exercises the claimed behavior.
72
94
  - Run it fresh in this phase, read its output and exit code, and confirm the observed behavior matches the spec's acceptance criteria. A mismatch, or an unverifiable claim, blocks.
73
95
 
74
96
  **Stakes:** a behavioral-proof mismatch means the change does not do what the spec claims — state what would ship broken if this passed ("the retry path never fires; a transient error would hang the caller"), not just "proof mismatch." That gap is exactly what a green-looking suite hides.
@@ -94,7 +116,9 @@ Read the complete staged diff (`git diff --cached`). Flag as blocking:
94
116
  - Tests disabled or skipped that were not intentionally disabled.
95
117
  - Scope creep — changes outside the agreed feature or fix boundary.
96
118
 
97
- **Board-edit exemption (ADR-0008):** an edit to `open-tasks.md` where `_taskboardlib.classify_board_diff(old, new)` returns a clean transition (done-flip `[~]`→`[x]`, start-flip `[ ]`→`[~]` with its optional minted dotted ID, or a single queued-add `[ ]`) is **expected and RETAINED** — it is not scope creep and MUST NOT be unstaged. Any other `open-tasks.md` change — a reworded or deleted entry, or an arbitrary content edit — does not classify as a transition and still flags as scope creep.
119
+ **Board-edit exemption (ADR-0008):** ADR-0008 governs three transitions riding a commit whose primary purpose is something else — a board edit inside such a commit is **expected and RETAINED** (not scope creep, MUST NOT be unstaged) only when `_taskboardlib.classify_board_diff(old, new)` returns a clean transition (done-flip `[~]`→`[x]`, start-flip `[ ]`→`[~]` with its optional minted dotted ID, or a single queued-add `[ ]`). Any other `open-tasks.md` edit riding an unrelated commit does not classify as one of those transitions and still flags as scope creep — it does not belong to that commit's agreed boundary.
120
+
121
+ This does not cover a commit whose own Phase 3 classification **is** the board change — e.g. a `docs` chore whose sole content is a `/ca-standup` archival sweep (open-tasks.md removals plus the matching `done-tasks.md` append). There, the boundary was already agreed at Phase 3, so those edits are in-scope by that classification directly; `classify_board_diff` is not consulted and does not need to recognize archival as a fourth transition.
98
122
 
99
123
  **Provenance re-baseline exemption (ADR-0008):** a `.codearbiter/.provenance/<doc>.json` file written by the Phase 5.5 auto-heal re-baseline is likewise **expected and RETAINED** — it is not scope creep and MUST NOT be unstaged. A heal-proposed doc or code-map edit (the claim-changed path from Phase 5.5) appears in the diff for normal review; treat it as any other finding. This exemption waives the scope-creep flag only; the secrets check is not waived — the automated re-scan in Phase 5.5 covers the provenance file.
100
124
 
@@ -142,6 +166,7 @@ Gate: the commit lands and `git status` is clean. Unexpected uncommitted changes
142
166
  - MUST NOT commit to `main`, `master`, or any protected branch.
143
167
  - MUST NOT run `git add -A`, `git add .`, or any wildcard staging.
144
168
  - MUST NOT commit while any test is failing, any lint error stands, or any secret is present.
169
+ - MUST NOT turn exhaustive repository-wide or cross-platform CI into a local prerequisite when the shared `verification-boundary` assigns it to exact-head hosted CI.
145
170
  - MUST NOT accept a self-reported "it works" — prove the behavior against the spec with a fresh command run (Phase 5) before committing.
146
171
  - MUST NOT skip, disable, or work around any automated gate.
147
172
  - MUST NOT commit a staged database migration without a recorded migration-review pass — the H-14 hook blocks it until `migration-reviewer` passes and `hooks/migration-pass.py` records the content-bound marker.
@@ -6,6 +6,19 @@ disable-model-invocation: true
6
6
 
7
7
  # executing-plans
8
8
 
9
+ ## Structured-artifact format boundary
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
+
9
22
  Coordinate the plan in small, user-acknowledged batches. Routed to by `/feature` after
10
23
  `writing-plans` has produced a plan. Each batch is executed by `subagent-driven-development` — fresh
11
24
  author agent per task, spec-compliance review, quality review, fresh verification — and the user
@@ -15,8 +28,15 @@ checkpoints between batches. The orchestrator never implements; it schedules and
15
28
 
16
29
  Read these, or STOP and surface the gap — never guess a path, a command, or a task boundary:
17
30
 
18
- - `<project-root>/.codearbiter/plans/<slug>.md` — the approved plan. The ordered task list and each task's verification command are the contract. No plan, no execution.
19
- - `<project-root>/.codearbiter/specs/<slug>.md` — the spec the plan implements.
31
+ - The discovered authoritative spec/plan pair. Existing Markdown pairs retain
32
+ their current ledger. For an HTML pair, load
33
+ `<plugin-root>/includes/artifacts.md`, retain the exact artifact identities
34
+ and engine-written receipts, and obtain task, scope, dependency, and binding
35
+ state only through `identity`, `index`, `outline`, symbol-scoped `read`, and
36
+ `eligible`. The engine `eligible` response is authoritative; the coordinator
37
+ must not infer authority from rendered text, checkboxes, status words,
38
+ digests, or caller-supplied labels, and must not read or write a shadow
39
+ Markdown ledger.
20
40
  - `<project-root>/.codearbiter/CONTEXT.md` — the `stage:` frontmatter (the maturity value) and project context.
21
41
  - `<project-root>/.codearbiter/tech-stack.md` — the exact verification, test, and build invocations.
22
42
 
@@ -25,10 +45,20 @@ Read these, or STOP and surface the gap — never guess a path, a command, or a
25
45
  Group the plan's tasks into small batches. Keep batches tight — three to five tasks is a ceiling, not
26
46
  a target. Respect the plan's ordering and dependencies: a task never lands before the task it depends on.
27
47
 
28
- **Resume is the normal re-entry.** A task already `ACCEPTED` in the plan's status column was verified
29
- before an earlier interruption — exclude it from batching and say so ("resuming: T-01–T-03 already
30
- ACCEPTED"). Batch only the non-`ACCEPTED` tasks, starting at the first. Never re-execute an `ACCEPTED`
31
- task, and never restart the pipeline at brainstorming because the session died mid-plan.
48
+ **Resume is the normal re-entry.** For Markdown, a task already `ACCEPTED` in
49
+ the plan's status column was verified before an earlier interruption. For HTML,
50
+ derive the same decision from the current `eligible` result and its exact task
51
+ identities. Exclude accepted tasks from batching and say so ("resuming: T-01–T-03
52
+ already ACCEPTED"). Batch only the remaining tasks, starting at the first. Never
53
+ re-execute an accepted task, and never restart the pipeline at brainstorming
54
+ because the session died mid-plan.
55
+
56
+ After process recreation on an HTML pair, rediscover the same authoritative pair
57
+ and query `identity` and `eligible` again. An `IN_PROGRESS` task is not proof of
58
+ completion: capture the existing reconciliation authority and apply
59
+ `task-reconcile` before redispatch through `task-start` with a fresh complete
60
+ context ticket. A task in `REVIEW` still requires fresh evidence and the current
61
+ scope review before `accept-scope`; conversation memory cannot advance it.
32
62
 
33
63
  For each task, confirm the plan names its exact target paths and its verification command. A task
34
64
  missing either is underspecified — return it to `writing-plans`, do not improvise the gap.
@@ -48,6 +78,12 @@ Invoke `subagent-driven-development` (`<plugin-root>/routines/subagent-driven-de
48
78
  spec slug so it can read its own pre-flight files. Do not implement anything here — the author agents,
49
79
  review chain, and verification all run inside that skill.
50
80
 
81
+ For HTML, pass the selected spec/plan identities and task IDs, not copied task
82
+ labels or prose. The nested workflow records dispatch with `task-start`, records
83
+ the separate verification and spec-review receipts with `task-review`, and
84
+ records whole-scope acceptance once with `accept-scope`. Preserve every returned
85
+ identity and receipt for the checkpoint and later commit proof.
86
+
51
87
  `subagent-driven-development` returns when every task in the scope is `ACCEPTED` (Phase 3–5 green,
52
88
  verification passed on a fresh run). A `tdd` BLOCK, a security CRITICAL finding, or an unresolved
53
89
  `[CONFIRM-NN]` surfaced inside that skill halts the loop — surface it to the user and do not proceed.
@@ -71,11 +107,20 @@ Gate: the user has acknowledged the checkpoint. On acknowledgement, loop to Phas
71
107
  batch. When the final batch is acknowledged and the plan is fully verified, route to `commit-gate` —
72
108
  do not commit from here.
73
109
 
110
+ Before claiming that an HTML plan's final batch completed, use the installed
111
+ bridge's `_preflight_current_acceptance` with the exact route returned by
112
+ `_resolve_workflow_pair`, the repository-bound client, and the engine-returned
113
+ spec and plan artifact IDs. Pass no caller status, digest, receipt, or label.
114
+ Retain the returned engine identities and receipt set for `commit-gate`. Any
115
+ refusal leaves the batch incomplete and blocks the handoff.
116
+
74
117
  ## Hard rules
75
118
 
76
119
  - MUST NOT execute tasks inline — delegate every batch to `subagent-driven-development` with an explicit `scope`.
77
120
  - MUST NOT advance past a checkpoint the user has not acknowledged.
78
- - MUST NOT call `commit-gate` until all batches are acknowledged and every plan task is `ACCEPTED`.
121
+ - MUST NOT call `commit-gate` until all batches are acknowledged and every plan
122
+ task is accepted; for HTML this means a fresh `eligible` result reports
123
+ `all_accepted_and_current: true` for the selected plan identity.
79
124
  - MUST surface any halt from `subagent-driven-development` (tdd BLOCK, CRITICAL, CONFIRM-NN) to the user — do not swallow it or re-dispatch around it.
80
125
  - MUST NOT absorb scope the plan does not name — mark it `[NEEDS-TRIAGE]`.
81
126
  - MUST NOT commit; route to `commit-gate` when the plan is fully verified.