@arbiterforge/ca-pi 0.18.4 → 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 +54 -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 +167 -2
- 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,181 +1,111 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: writing-plans
|
|
3
|
-
description:
|
|
3
|
+
description: Turn the selected specification into a maintained implementation plan with clear outcomes, useful tasks, dependencies, and verification steps. Drafting uses the existing authorization and does not require artifact approval codes, reviewer receipts, or a frozen implementation script.
|
|
4
4
|
disable-model-invocation: true
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# writing-plans
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
- Every task advances at least one `AC-NN`. A task that covers nothing is scope creep — cut it or surface it.
|
|
113
|
-
|
|
114
|
-
For an HTML source, pass the selected route, installed client, and the spec
|
|
115
|
-
identity just read from the engine through `_preflight_plan_authoring`. Initial full-lane sprint
|
|
116
|
-
pair preparation alone sets `draft_for_pair: true`; the ordinary default still requires approval. Only its
|
|
117
|
-
returned same-slug `.codearbiter/plans/<slug>.html` target may be created. Create
|
|
118
|
-
that plan through the installed structured-artifact engine as `draft_preview`,
|
|
119
|
-
using the source spec's exact artifact ID and normative digest. For ordinary sequential planning,
|
|
120
|
-
this must be the approved spec's exact artifact ID and normative digest. Populate it only with typed operations
|
|
121
|
-
and validate it at the ready gate. Before presenting either ordinary or combined review, call
|
|
122
|
-
the private `_approvallib._preflight_plan_verification(client, identity)` with the current engine identity.
|
|
123
|
-
It reads every task through bounded engine pages, checks each declared runner's supported
|
|
124
|
-
named-outcome format, snapshots current inputs, and rejects identity drift. Resolve the complete
|
|
125
|
-
reported set of command/input diagnostics before asking for approval. It does not run commands,
|
|
126
|
-
discover or import tests, or require proposed test files and test names to exist. Input roots must
|
|
127
|
-
already exist: choose an existing containing directory for files the plan will create. Roots and
|
|
128
|
-
excluded directories are exact repository-relative paths, not basenames, globs, or paths relative
|
|
129
|
-
to each root; for root `site`, use `site/node_modules`, `site/dist`, and other reviewed output paths.
|
|
130
|
-
The ordinary and paired approval adapters repeat this preflight before arming their user reply.
|
|
131
|
-
This admission check is not verification evidence; execution still binds actual commands and
|
|
132
|
-
requires current named outcomes. For initial combined review, retain `draft_preview` and return
|
|
133
|
-
both ready identities to the caller: `sprint-approve` owns the binding and both approvals after one
|
|
134
|
-
actual host-observed reply. Do not separately `plan-bind` or approve that pair. On ordinary approved-spec
|
|
135
|
-
planning, use `plan-bind` to bind it to the approved spec before plan approval. This path must not create `.codearbiter/plans/<slug>.md`;
|
|
136
|
-
that would be a shadow authority.
|
|
137
|
-
|
|
138
|
-
For an existing authoritative Markdown source, write
|
|
139
|
-
`<project-root>/.codearbiter/plans/<slug>.md` — `<slug>` matching the spec —
|
|
140
|
-
with the `AC-NN` ledger, the ordered task table (id · path(s) · verification ·
|
|
141
|
-
maps-to · covers · depends-on · **status**, initialized `PENDING`), the marked
|
|
142
|
-
MVP slice, and any out-of-scope item tagged inline `[NEEDS-TRIAGE]`.
|
|
143
|
-
|
|
144
|
-
The status column is the pipeline's resume ledger: `subagent-driven-development` flips a task to
|
|
145
|
-
`ACCEPTED` the moment it accepts it, so an interrupted run (crash, compaction, closed session) is
|
|
146
|
-
re-entered by `/feature` at the first non-`ACCEPTED` task instead of restarted from brainstorming.
|
|
147
|
-
|
|
148
|
-
Gate: bijection proven between the plan and the ledger — no criterion without a task, no task without
|
|
149
|
-
a criterion — and the plan written to disk. This proves the two are mutually consistent, nothing more;
|
|
150
|
-
completeness of the ledger itself was Phase 1's gate, not this one. Initial combined-review drafts
|
|
151
|
-
return for `arm-sprint`, never execution. Only verified approved spec-and-plan authority clears execution:
|
|
152
|
-
`executing-plans` (checkpointed, via `/feature`) or `subagent-driven-development` (autonomous, via
|
|
153
|
-
`/sprint`) — each routes every task through `tdd`. The plan never hands off to `tdd` directly.
|
|
154
|
-
|
|
155
|
-
### Phase 4-farm extension (only when `--farm` was requested)
|
|
156
|
-
|
|
157
|
-
When `--farm` was requested for a legacy Markdown workflow, after the bijective coverage gate passes and the `.md` plan is written,
|
|
158
|
-
produce the farm artifact (`plan.json`) — **one MVP slice at a time** — per
|
|
159
|
-
`<plugin-root>/routines/writing-plans/references/farm-plan.md`. Load that leaf and follow it;
|
|
160
|
-
it owns the per-task failing-test + schema-valid `plan.json` procedure.
|
|
161
|
-
|
|
162
|
-
Gate: all failing tests written and confirmed failing; `plan.json` written and schema-valid. Both
|
|
163
|
-
artifacts exist before handing off to `subagent-driven-development` (`<plugin-root>/routines/subagent-driven-development/SKILL.md`).
|
|
164
|
-
|
|
165
|
-
## Hard rules
|
|
166
|
-
|
|
167
|
-
- MUST NOT execute or approve work against an absent or unapproved spec. Only explicit initial
|
|
168
|
-
full-lane HTML `draft_for_pair` planning accepts a ready draft and must return for combined approval;
|
|
169
|
-
other unapproved inputs route back to their actual caller.
|
|
170
|
-
- MUST NOT write or parse rendered HTML directly, create a Markdown shadow for
|
|
171
|
-
an HTML spec, or bind a plan from a caller-supplied identity.
|
|
172
|
-
- MUST NOT emit a task without an exact path AND a concrete verification step.
|
|
173
|
-
- MUST NOT let a task's verification stand in for a `tdd` gate — it maps to a tdd obligation, it does not replace one.
|
|
174
|
-
- MUST NOT write the plan while any acceptance criterion is uncovered or any task covers nothing.
|
|
175
|
-
- MUST NOT guess a verification command — cite `tech-stack.md` or STOP.
|
|
176
|
-
- MUST NOT resolve an ambiguous criterion by guessing — raise a `[CONFIRM-NN]`.
|
|
177
|
-
- MUST run the `uncovered_intent` backstop and ask the negative-judgment question in Phase 1, and MUST NOT treat Phase 4's bijection proof as a substitute — bijection proves the plan and the ledger agree with each other, never that the ledger is complete (#566).
|
|
178
|
-
- MUST NOT emit `plan.json` in `--farm` mode without writing and confirming each failing test first.
|
|
179
|
-
- MUST NOT set `meta.model` or `meta.apiBaseUrl` in `plan.json` — these belong to the dispatch step.
|
|
180
|
-
- MUST NOT proceed with `--farm` if `FARM_API_KEY` is absent — cite `<plugin-root>/includes/farm.md` and BLOCK.
|
|
181
|
-
- MUST, at exit, run the follow-up harvest (`<plugin-root>/includes/harvest.md`) over any `[NEEDS-TRIAGE]` out-of-scope items — batch-confirm promoting them to `open-tasks.md` (work) or `open-questions.md` (decisions) so they don't die in the plan file.
|
|
9
|
+
Produce the plan for the active feature or sprint, then return it to that caller.
|
|
10
|
+
Do not execute implementation from this skill. Use the user's existing direction;
|
|
11
|
+
ask only about a consequential unresolved outcome, not permission to maintain the
|
|
12
|
+
plan. An explicitly requested human checkpoint still belongs to the caller.
|
|
13
|
+
|
|
14
|
+
## Select the source and representation
|
|
15
|
+
|
|
16
|
+
Load `<plugin-root>/includes/artifacts.md` for artifact I/O. Read the selected
|
|
17
|
+
specification's criterion records and retain its artifact ID and normative digest.
|
|
18
|
+
For HTML, `_preflight_plan_authoring` checks that identity, structural validity,
|
|
19
|
+
and the same-slug target. Create the matching plan as `draft_preview`; use
|
|
20
|
+
`plan-bind` when selecting or refreshing its specification binding. Preserve human
|
|
21
|
+
edits and stable references in the selected representation.
|
|
22
|
+
|
|
23
|
+
Read relevant project context and the build/test commands in
|
|
24
|
+
`<project-root>/.codearbiter/tech-stack.md`; use
|
|
25
|
+
`<project-root>/.codearbiter/coding-standards.md` for applicable conventions.
|
|
26
|
+
Missing optional orientation is not a new permission gate. Identify a genuinely
|
|
27
|
+
missing requirement or command contract instead of guessing it.
|
|
28
|
+
|
|
29
|
+
## Build useful tasks
|
|
30
|
+
|
|
31
|
+
Start with the specification's intended outcome and criterion IDs. Check coverage
|
|
32
|
+
in both directions: each required criterion has planned work, and each task serves
|
|
33
|
+
the agreed outcome. Agreement between a plan and its criterion list does not
|
|
34
|
+
prove that either captures every part of the user's intent. Inspect relevant
|
|
35
|
+
source and ask what would still be wrong if all listed criteria passed. Record
|
|
36
|
+
actual gaps; do not repeat an interview the caller has already resolved.
|
|
37
|
+
|
|
38
|
+
Each task should describe a coherent unit of work: stable ID, intended result,
|
|
39
|
+
relevant paths, referenced criteria, an implementation approach, dependencies,
|
|
40
|
+
and the appropriate check or observable completion condition. Choose task size
|
|
41
|
+
for useful implementation and review, not a compulsory two-to-five-minute limit.
|
|
42
|
+
A small related change does not need its own author/reviewer lifecycle. Split
|
|
43
|
+
work when it has separate outcomes, dependencies, or independently useful progress.
|
|
44
|
+
|
|
45
|
+
Use real repository commands or an explicitly described observable check. A test
|
|
46
|
+
file or case that this task will create may not exist yet. An unsupported named
|
|
47
|
+
result parser is not a reason to reject the plan or invent test outcomes; a
|
|
48
|
+
command-level result must not be claimed as proof of individual named tests.
|
|
49
|
+
Read relevant command definitions without executing anything merely to author a
|
|
50
|
+
plan. Runner support and actual execution are checked when that check is needed.
|
|
51
|
+
|
|
52
|
+
Separate prerequisites that can be observed from choices only the user can make.
|
|
53
|
+
For typed prerequisites, use `kind: fact` or `kind: decision` and explicit
|
|
54
|
+
`task_refs` for affected tasks. Do not guess that an old unscoped prerequisite
|
|
55
|
+
applies to every task, or narrow a real shared dependency to hide it. Observable
|
|
56
|
+
facts use ordinary authorized tools and the engine's reported-observation path.
|
|
57
|
+
A consequential unresolved choice gets a clear normal-language question, not an
|
|
58
|
+
approval digest or a certification code.
|
|
59
|
+
|
|
60
|
+
For source impact without a repository-wide dependency analysis, record
|
|
61
|
+
`shared_inputs` only where the task genuinely depends on a common source
|
|
62
|
+
interface, fixture, schema or unusual build configuration. These must be
|
|
63
|
+
portable repository-relative paths to actual source, not generated artifact
|
|
64
|
+
state; a directory path includes its bounded descendants. A known shared
|
|
65
|
+
input change should refresh the affected check, not every unrelated review.
|
|
66
|
+
Do not invent references or claim an exhaustive dependency graph; missing
|
|
67
|
+
or unbounded inputs remain honestly `unassessed` in task context.
|
|
68
|
+
|
|
69
|
+
Order tasks by their actual dependencies. Remove cycles by fixing the plan, not
|
|
70
|
+
by pretending a required predecessor is complete. Group meaningful batches with
|
|
71
|
+
clear outcomes; checkpoints organize implementation and do not independently
|
|
72
|
+
create user approval requests. Keep genuinely blocked work visible while allowing
|
|
73
|
+
independent work to proceed. Identify the smallest useful delivery outcome without
|
|
74
|
+
splitting a promised atomic migration or compatibility change across releases.
|
|
75
|
+
|
|
76
|
+
## Save, inspect, and maintain
|
|
77
|
+
|
|
78
|
+
For HTML, use typed `create` and `apply` operations with current identity and CAS.
|
|
79
|
+
Preserve the specification's criterion IDs, task references, reasons, and history.
|
|
80
|
+
Drafts may be incomplete. Use `validate` with `gate: ready` to discover omissions;
|
|
81
|
+
its diagnostics describe the plan, not whether an already-authorized agent may
|
|
82
|
+
continue useful work. Structural errors or a conflicting write remain actual
|
|
83
|
+
operation failures. Do not fill missing fields with fabricated evidence to make
|
|
84
|
+
validation green.
|
|
85
|
+
|
|
86
|
+
Maintain the plan under existing authorization without extra artifact approvals
|
|
87
|
+
or freezing each method or check as another decision. Update in-scope steps,
|
|
88
|
+
tasks, checks and valid dependencies with a reason; material outcome changes
|
|
89
|
+
go to their actual decision owner.
|
|
90
|
+
|
|
91
|
+
Read back the saved identity and affected symbols. Return the plan location,
|
|
92
|
+
useful next work, actual unresolved choices, and outstanding checks to the active
|
|
93
|
+
caller. Distinguish implemented progress from verified behavior; a plan or a
|
|
94
|
+
`DONE` label is not test, review, or release evidence. Keep unrelated progress
|
|
95
|
+
when correcting the plan, and do not restart brainstorming after an interruption.
|
|
96
|
+
|
|
97
|
+
Existing Markdown retains one ledger and its original representation.
|
|
98
|
+
Never infer a passing check from an old status or duplicate approval prompts.
|
|
99
|
+
|
|
100
|
+
## Explicit farm requests only
|
|
101
|
+
|
|
102
|
+
For a user-selected Markdown `--farm` workflow, use
|
|
103
|
+
`<plugin-root>/includes/farm.md` and
|
|
104
|
+
`<plugin-root>/routines/writing-plans/references/farm-plan.md`. Preserve the
|
|
105
|
+
requested provider/budget and actual credential boundaries. Do not read
|
|
106
|
+
credential contents or trigger model spending during ordinary authoring.
|
|
107
|
+
HTML farm is disabled; never silently change backends.
|
|
108
|
+
|
|
109
|
+
Retain real out-of-scope follow-ups using `<plugin-root>/includes/harvest.md`
|
|
110
|
+
when relevant. Do not turn routine drafting into an additional audit program,
|
|
111
|
+
mandatory reviewer chain, or repeated approval interview.
|
|
@@ -14,14 +14,14 @@ authorized it, and what is still open.* Read-only over every source; its only wr
|
|
|
14
14
|
## Window
|
|
15
15
|
|
|
16
16
|
- `<from-ref> <to-ref>` — two tags/SHAs (e.g. `v1.2.0 v1.3.0`).
|
|
17
|
-
- `--since-checkpoint` — from the
|
|
17
|
+
- `--since-checkpoint` — use `source_commit` and `recorded_at` from the latest checkpoint report under `.codearbiter/checkpoints/` as the commit and UTC time anchors.
|
|
18
18
|
- `--since <date>` — ISO date to HEAD.
|
|
19
19
|
- No argument → from the most recent tag to HEAD (no tags → last checkpoint; neither → BLOCK and
|
|
20
20
|
ask for an explicit window).
|
|
21
21
|
|
|
22
22
|
## Flow
|
|
23
23
|
|
|
24
|
-
1. Resolve the window to a commit range and a time range; both appear in the packet header.
|
|
24
|
+
1. Resolve the window to a commit range and a time range; both appear in the packet header. For a checkpoint window, select the report with the latest valid `recorded_at`, verify its `source_commit` resolves to a commit and is an ancestor of HEAD, and cite the report. Include its `worktree_dirty` value as a review-scope limitation. Missing or invalid anchors require an explicit ref/date window; never infer one from the report filename or the integer override counter in `last-checkpoint`.
|
|
25
25
|
2. Gather, citing each source file:
|
|
26
26
|
- **Commits** — `git log` over the range, grouped by Conventional-Commit type; merge commits
|
|
27
27
|
listed with their PR reference.
|
|
@@ -24,7 +24,7 @@ Periodic sweep of the entire codebase with the reviewer fleet, funneled to a sin
|
|
|
24
24
|
|
|
25
25
|
2. Route to `dispatching-parallel-agents` (`<plugin-root>/routines/dispatching-parallel-agents/SKILL.md`) with that unit list (read-only batch). It dedupes, then
|
|
26
26
|
funnels through `finding-triage` → `verdict-aggregator` and returns the single read-only verdict.
|
|
27
|
-
3. After the verdict returns, separately dispatch `checkpoint-aggregator` with that verdict. It writes the dated report to
|
|
27
|
+
3. After the verdict returns, separately dispatch `checkpoint-aggregator` with that verdict and the reviewed commit from `git rev-parse HEAD`, the UTC review-start time, and whether the reviewed worktree was dirty. Retain these observed values from before the sweep. It writes the dated report to
|
|
28
28
|
`<project-root>/.codearbiter/checkpoints/YYYY-MM-DD.md`: findings by severity with
|
|
29
29
|
file:line, and out-of-scope items marked inline `[NEEDS-TRIAGE]`.
|
|
30
30
|
4. Write the current override **count** to `<project-root>/.codearbiter/last-checkpoint` — the
|
|
@@ -20,23 +20,22 @@ Read these, or STOP and surface the gap — never guess a command:
|
|
|
20
20
|
- `<project-root>/.codearbiter/tech-stack.md` — test, lint, and secrets-scan invocations. Stop if missing; do not guess.
|
|
21
21
|
- `<plugin-root>/includes/verification-boundary.md` — the required split between focused local proof and exhaustive exact-head hosted CI.
|
|
22
22
|
- A git repository must be present and `git status` available.
|
|
23
|
-
-
|
|
24
|
-
- The discovered authoritative spec/plan pair, when this commit
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
`_preflight_current_acceptance`
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
caller metadata.
|
|
23
|
+
- Read the scoped obligations and observed evidence under `<plugin-root>/routines/tdd/SKILL.md`. Confirmed fixes require regression RED/GREEN; features require current criterion-focused checks; refactors require passing characterization/parity evidence. Apply the relevant coverage and lint requirements. Resolve missing evidence for the staged change using its selected verification approach.
|
|
24
|
+
- The discovered authoritative spec/plan pair, when relevant to this commit. For HTML,
|
|
25
|
+
load `<plugin-root>/includes/artifacts.md` and read the exact spec/plan
|
|
26
|
+
identity, task progress and criteria through typed operations. `eligible`
|
|
27
|
+
gives scheduling advice, **not** authority, verification or a reason to forbid
|
|
28
|
+
committing already-authorized work. `REVIEW` and `DONE` describe work
|
|
29
|
+
progress, not independent checks.
|
|
30
|
+
|
|
31
|
+
A plan may contain unfinished or unverified tasks: list these accurately in
|
|
32
|
+
the commit report and do not claim the whole feature is verified. This gate's
|
|
33
|
+
actual authorization, selected staged diff, applicable test results, secrets,
|
|
34
|
+
security and migration controls still apply. Do not call
|
|
35
|
+
`_preflight_current_acceptance` for ordinary commits or manufacture acceptance
|
|
36
|
+
receipts to replace real test output. A caller requiring an explicit
|
|
37
|
+
receipt-backed *proof claim* may use that separate validator, but it does not
|
|
38
|
+
grant permission to commit.
|
|
40
39
|
|
|
41
40
|
## Phase 1 — Permission · gate: BLOCK
|
|
42
41
|
|
|
@@ -75,20 +74,24 @@ Gate: the staged set is type-homogeneous with a single type and scope.
|
|
|
75
74
|
Read the test, lint, and secrets-scan commands from `tech-stack.md`, then apply
|
|
76
75
|
`<plugin-root>/includes/verification-boundary.md`:
|
|
77
76
|
|
|
78
|
-
-
|
|
79
|
-
-
|
|
77
|
+
- Establish impact-bounded local test results that directly cover the staged paths and obligations. Reuse inspected results while their relevant source, inputs and command match; run missing or affected checks. Any unresolved failure blocks. Repository-wide and cross-platform suites belong to exact-head hosted CI before merge.
|
|
78
|
+
- Establish current lint results, and type-check results if the project is statically typed. Reuse applicable observed results under the same source/input rule. Zero errors.
|
|
80
79
|
- Run the secrets scan on ALL staged files, regardless of commit type. Any finding blocks.
|
|
81
80
|
- **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.
|
|
82
81
|
- **Migration gate (mandatory routing):** if the staged set contains a database migration (Phase 3 flags it; the detection rule is `_hooklib.is_migration_path` — default migration globs, extendable/narrowable via a `migration-paths` block in `security-controls.md`), dispatch the `migration-reviewer` agent (`<plugin-root>/agents/migration-reviewer.md`). **On a genuine PASS only**, record the content-bound marker `.codearbiter/.markers/migration-gate-passed` by resolving the interpreter once by presence — `PY=python3; { command -v python3 >/dev/null 2>&1 && python3 --version >/dev/null 2>&1; } || PY=python` — never `python3 X || python X`, which reruns X on any nonzero exit (#577) — and running `"$PY" "<plugin-root>/hooks/migration-pass.py"`. This is not optional: the PreToolUse commit hook **H-14 blocks the commit** until the pass is recorded AND covers every migration file being committed (by content digest, no freshness window — an edit to a reviewed migration re-blocks). This closes the bare-`/commit` / small-lane gap from issue #77. On a BLOCK, do not record the pass.
|
|
83
82
|
- **CI/deploy review (mandatory routing, no marker gate):** if the staged set touches a CI/CD workflow (`_hooklib.is_ci_path` — defaults extendable via a `ci-paths` block in `security-controls.md`) or a deployment/IaC manifest (`_hooklib.is_deploy_path` — `deploy-paths` block), dispatch the `security-reviewer` agent (`<plugin-root>/agents/security-reviewer.md`). This is the enforcement point the advisory `post-write-edit` reminders **H-15/H-16** point to, and it closes the bare-`/commit` / small-lane gap for CI/deploy (the `/review`, `/pr`, `/checkpoint`, and sprint lanes already dispatch it). Unlike crypto/secret/migration there is **no commit-block marker** — a CI workflow runs only once merged and IaC bites only on apply, so a BLOCK-level finding halts the commit via Phase 6 review, but routine CI/deploy edits are not gated per-commit. Act on the findings by severity; do not record a marker.
|
|
84
83
|
|
|
85
|
-
|
|
84
|
+
Required specialized review may reuse an existing review of the same source,
|
|
85
|
+
requirements, findings and verification inputs. Dispatch only missing or affected
|
|
86
|
+
review work. Required security and migration markers must still cover the actual
|
|
87
|
+
staged content; a prior review does not waive their writers or hook checks.
|
|
88
|
+
Record each result (PASS / BLOCK), its source and whether it was reused or run.
|
|
86
89
|
|
|
87
90
|
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.
|
|
88
91
|
|
|
89
92
|
## Phase 5 — Behavioral proof · gate: BLOCK
|
|
90
93
|
|
|
91
|
-
Apply the
|
|
94
|
+
Apply the current-evidence rules in `<plugin-root>/includes/fresh-verification.md`, with
|
|
92
95
|
**the spec's acceptance criterion** as the target — prove the behavior against the spec, not against a
|
|
93
96
|
self-report.
|
|
94
97
|
|
|
@@ -97,15 +100,47 @@ self-report.
|
|
|
97
100
|
HTML, use the exact criterion and task records returned by symbol-scoped
|
|
98
101
|
engine `read`; never scrape the rendered document. If none exists, derive the
|
|
99
102
|
smallest command that exercises the claimed behavior.
|
|
100
|
-
-
|
|
103
|
+
- Inspect the applicable output and exit code and confirm the observed behavior matches the spec's acceptance criteria. Reuse the Phase 4 or implementation result when it already proves that criterion on unchanged relevant inputs. Run a separate proving command only when existing evidence is missing, affected or insufficient. A mismatch or unverifiable claim blocks.
|
|
101
104
|
|
|
102
105
|
**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.
|
|
103
106
|
|
|
104
|
-
Gate:
|
|
107
|
+
Gate: inspected current command output and exit code prove the claimed behavior. The phase change alone does not require another run. A self-reported "it works" does not pass.
|
|
105
108
|
|
|
106
109
|
## Phase 5.5 — Provenance auto-heal (conditional)
|
|
107
110
|
|
|
108
|
-
|
|
111
|
+
Partition the loaded records by schema. Select only recorded content paths or
|
|
112
|
+
membership scopes/predicates intersecting staged sources. Commits touching no
|
|
113
|
+
recorded source do no re-scout work. An empty legacy worklist says nothing about v2.
|
|
114
|
+
Include deleted paths and both sides of renames in `staged_paths`, for example
|
|
115
|
+
with `git diff --cached --name-only --no-renames`.
|
|
116
|
+
|
|
117
|
+
**Managed v2 pairs:** acquire one bounded snapshot covering the selected documents'
|
|
118
|
+
recorded dependencies and target preimages. Call `assess_context_provenance` for
|
|
119
|
+
those document IDs with its action-boundary snapshot probe, then reuse that
|
|
120
|
+
snapshot and assessment in
|
|
121
|
+
`_provenancelib.v2_heal_worklist(staged_paths, provenance, snapshot, assessment)`.
|
|
122
|
+
Its `claims` identify the affected document, field, claim and staged source paths;
|
|
123
|
+
they select inspection work, not permission to write. These paths are staged triggers;
|
|
124
|
+
inspect the selected claims' complete recorded evidence before refreshing their fields,
|
|
125
|
+
including any changed unstaged dependency. Preserve uninspected claims and bindings.
|
|
126
|
+
Report `unknown` entries and defer that document's automatic
|
|
127
|
+
update; do not label it fresh or block independent commit work.
|
|
128
|
+
|
|
129
|
+
When inspected claims still hold, prepare an `update` of the selected owned fields
|
|
130
|
+
with unchanged content and current source evidence. When a claim changed, propose
|
|
131
|
+
the bounded content correction for Phase 6 review. Use the typed `context-preview`
|
|
132
|
+
and `context-apply` procedure in
|
|
133
|
+
`<plugin-root>/routines/context-check/SKILL.md`, retaining exact expected pair hashes,
|
|
134
|
+
the returned preview reference/digest and all unselected bytes. Reuse the existing
|
|
135
|
+
maintenance authorization; do not enter a second approval cycle. Native apply
|
|
136
|
+
rechecks the source and pair identities and writes both files together. Read back
|
|
137
|
+
the result. Never pass v2 records to `rebaseline` or write them directly. Stage the
|
|
138
|
+
resulting pair by explicit paths and secrets-scan every newly staged file.
|
|
139
|
+
|
|
140
|
+
**Legacy v1 records:** compute the heal worklist via
|
|
141
|
+
`_provenancelib.heal_worklist(staged_paths, provenance, current_hashes)` — staged
|
|
142
|
+
`drift_trigger:true` entries whose hash diverged or is absent. An empty v1 worklist
|
|
143
|
+
skips only this legacy branch.
|
|
109
144
|
|
|
110
145
|
Non-empty worklist → call `_provenancelib.compute_drift(provenance, current_hashes)` to retain the document/source mapping. For each stale document in that drift report, get its record as `doc_provenance` and call `_provenancelib.changed_scope(doc_provenance, drift)`. Intersect that document's drifted paths with the worklist; skip a document when the intersection is empty. The hash map can omit unstaged paths, so a missing entry outside the worklist must not broaden this commit's re-scout. Confirm that every selected worklist path maps to at least one stale document after this filtering; if a record is malformed or the mapping is incomplete, STOP and report the gap rather than treating the path as fresh.
|
|
111
146
|
|
|
@@ -217,7 +252,7 @@ Gate: the commit lands and `git status` is clean. Unexpected uncommitted changes
|
|
|
217
252
|
- MUST NOT run `git add -A`, `git add .`, or any wildcard staging.
|
|
218
253
|
- MUST NOT commit while any test is failing, any lint error stands, or any secret is present.
|
|
219
254
|
- 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.
|
|
220
|
-
- MUST
|
|
255
|
+
- MUST prove the behavior against the spec with inspected current evidence (Phase 5); a self-reported "it works" is insufficient.
|
|
221
256
|
- MUST NOT skip, disable, or work around any automated gate.
|
|
222
257
|
- 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.
|
|
223
258
|
- MUST NOT `--amend` after a pre-commit hook failure — create a new commit.
|