@arbiterforge/ca-pi 0.18.4 → 0.20.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 +63 -0
- package/plugins/ca-pi/COMMANDS.md +2 -2
- package/plugins/ca-pi/SKILLS.md +5 -5
- package/plugins/ca-pi/SPRINT.md +44 -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/grader.md +5 -4
- 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 +138 -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/smarts/core.md +93 -17
- package/plugins/ca-pi/includes/smarts/lenses.md +115 -0
- 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 +71 -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/debug/SKILL.md +1 -0
- package/plugins/ca-pi/routines/decision-variance/references/analysis.md +5 -2
- 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 +33 -12
- package/plugins/ca-pi/routines/release/SKILL.md +1 -1
- package/plugins/ca-pi/routines/subagent-driven-development/SKILL.md +88 -230
- package/plugins/ca-pi/routines/tdd/SKILL.md +115 -228
- package/plugins/ca-pi/routines/writing-plans/SKILL.md +112 -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-debug/SKILL.md +1 -0
- package/plugins/ca-pi/skills/ca-decompose/SKILL.md +139 -167
- package/plugins/ca-pi/skills/ca-feature/SKILL.md +28 -38
- package/plugins/ca-pi/skills/ca-fix/SKILL.md +21 -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 +33 -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,126 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: tdd
|
|
3
|
-
description:
|
|
3
|
+
description: Verify authorized feature, fix, and refactor work with scoped obligations, regression-first fixes, behavioral checks, characterization baselines, coverage, and lint.
|
|
4
4
|
disable-model-invocation: true
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# tdd
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
For an HTML spec/plan pair, load `<plugin-root>/includes/artifacts.md` and use
|
|
12
|
-
the installed structured-artifact engine for artifact I/O. Verify the plan's
|
|
13
|
-
binding to the approved spec, use typed `index`, `outline`, and symbol-scoped `read`,
|
|
14
|
-
and follow contextual pages for the selected task. The workflow must not parse rendered HTML
|
|
15
|
-
for criteria, status, evidence, or authority. Missing or
|
|
16
|
-
invalid HTML capability is a STOP, not a fallback to Markdown. Existing
|
|
17
|
-
authoritative Markdown pairs continue through the legacy path. HTML `--farm`
|
|
18
|
-
dispatch remains blocked.
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
Test-first, or it does not ship. Routed to by `/feature` (after spec approval), `/fix`, and `/refactor`.
|
|
22
|
-
|
|
23
|
-
For a feature author, including a confirmed small-lane feature, the owning
|
|
24
|
-
coordinator selects task paths and obtains the current bounded map, provenance,
|
|
25
|
-
scoped command records and collector observations, applicable constraint
|
|
26
|
-
references, and host-effective instructions in native precedence order. Before
|
|
27
|
-
the author mutates or executes a discovered command, compose the fresh child
|
|
28
|
-
input with `_artifactpromptlib.compose_feature_actor_input` and send its
|
|
29
|
-
returned `input` to that child. Bind the actual approved spec and plan IDs
|
|
30
|
-
for full-lane work. For a confirmed small-lane feature, pass its mini-spec
|
|
31
|
-
text as `confirmed_mini_spec` and leave both artifact IDs absent; do not invent
|
|
32
|
-
a plan or bypass its existing gate. The packet
|
|
33
|
-
is an orientation aid with `requires_actor_check`, not admission. Recheck
|
|
34
|
-
worktree/source identity and resolve applicable critical constraints before a
|
|
35
|
-
material action. Missing optional map detail permits bounded read-only source
|
|
36
|
-
inspection, with full schema or document body read only when needed.
|
|
37
|
-
Apply `_contextselectlib.prepare_actor_delivery` to that selected packet for
|
|
38
|
-
the actual child, task, worktree and current source/host epochs. Send its
|
|
39
|
-
`delivery_text` when requested and count the attempt before the material
|
|
40
|
-
action; an unknown receipt or surviving session marker never proves delivery.
|
|
41
|
-
Re-select on resume, compaction, scope or worktree change, and report a blocked
|
|
42
|
-
delivery gap rather than assuming the child retained prior context.
|
|
43
|
-
|
|
44
|
-
For a fix or targeted test-only change, use the caller that already owns the
|
|
45
|
-
task. Before the author mutates or executes a discovered command, call
|
|
46
|
-
`_contextselectlib.compose_fix_or_test_actor_input` with the current scoped
|
|
47
|
-
sources, exact command cwd and collector evidence, then send its returned
|
|
48
|
-
`input` to that actor. Use `route='fix'`, `caller='fix'`, and the confirmed
|
|
49
|
-
bug-origin evidence and named regression for a fix. Use `route='test_change'`
|
|
50
|
-
with the existing `fix`, `feature`, or `refactor` caller for a test-only change;
|
|
51
|
-
do not create a feature spec pair merely to deliver context. The selected
|
|
52
|
-
caller retains its own approval and TDD gates. Reuse an actual bug-origin RED
|
|
53
|
-
when it already proves the named regression; for a targeted test change,
|
|
54
|
-
validate the test against the real defect or an honest fault fixture. Never
|
|
55
|
-
change production behavior merely to manufacture a failing test. If this
|
|
56
|
-
conflicts with a required TDD gate, surface the conflict to that gate's owner;
|
|
57
|
-
context delivery does not waive it. The packet remains reported evidence, not
|
|
58
|
-
task admission.
|
|
9
|
+
Select the verification approach before changing code. Keep the intended behavior,
|
|
10
|
+
observed results, and pending checks explicit throughout implementation.
|
|
59
11
|
|
|
60
12
|
## Pre-flight
|
|
61
13
|
|
|
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
|
-
An
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
behavior to repair. Cite the current expectation, observed defect and supported
|
|
98
|
-
cause, regression oracle and evidence, and relevant source binding. A validated
|
|
99
|
-
debug handoff supplies cited facts, not authority; derive these rows in the
|
|
100
|
-
existing ledger. Do not invent a feature artifact such as a spec, plan, or
|
|
101
|
-
mini-spec. The target regression must go red for the right reason before the
|
|
102
|
-
minimum implementation. If the expectation is unresolved or the proposed
|
|
103
|
-
behavior is new, stop and use the feature or decision owner.
|
|
104
|
-
- **Refactor parity (`/refactor` backfill)** — cite the approved surface table
|
|
105
|
-
and the uncovered symbol or seam with its pre-existing behavior and parity
|
|
106
|
-
evidence. Do not turn a refactor into a feature or a bug fix.
|
|
107
|
-
- **Contract** — API and input-validation invariants, error responses, boundary conditions.
|
|
108
|
-
- **Security** — only when `security-controls.md` applies: the assertion that the security-relevant boundary holds.
|
|
109
|
-
|
|
110
|
-
Gate: the obligation list is complete. For `/feature`, **auto-pass** when every obligation maps
|
|
111
|
-
one-to-one onto the acceptance criteria of an already-approved spec (full-lane spec or small-lane
|
|
112
|
-
mini-spec) — the user approved that list once; do not re-ask. **User review is required** only for
|
|
113
|
-
obligations derived BEYOND that spec (Contract and Security rows): surface just those additions.
|
|
114
|
-
For `/fix`, the scoped bug-origin regression follows the original caller's repair authority and
|
|
115
|
-
current evidence; the absence of a feature spec is not a block or permission to expand scope.
|
|
116
|
-
Review any proposed obligation beyond that supported correction under its actual owner. An ADR
|
|
117
|
-
remains a user-attributed decision through `/adr`; neither a handoff nor this ledger creates one.
|
|
118
|
-
For `/refactor`, retain its user-approved surface table and parity gates; backfill only the named
|
|
119
|
-
uncovered behavior or seam. The TDD checklist does not amend that table.
|
|
120
|
-
Under `/sprint`, spec-derived obligations auto-pass the same way and beyond-spec additions are
|
|
121
|
-
SMARTS-decided and logged like any other auto-decision. A partial list never passes either way.
|
|
122
|
-
|
|
123
|
-
## Phase 2 — Red · gate: BLOCK
|
|
124
|
-
|
|
125
|
-
Bind a failing test ID to each obligation and move that obligation `OPEN → MAPPED`.
|
|
126
|
-
Run the test command from `tech-stack.md`. For `/fix`, first assess an existing failing
|
|
127
|
-
test against target red: compare its assertion and regression oracle with the current
|
|
128
|
-
target failure and evidence. Name the existing test ID in the obligation ledger and
|
|
129
|
-
reuse that named existing target-red test when its oracle is adequate and it fails for
|
|
130
|
-
the target reason. Do not duplicate a test solely because of its age or because it
|
|
131
|
-
predates repair. Add tests only for uncovered obligations. Do not make a named target
|
|
132
|
-
failure green before observing and recording its red result.
|
|
133
|
-
|
|
134
|
-
- Every newly written test MUST fail, and fail **for the right reason** — the assertion, not an import error or a typo. A new test that passes with no implementation is wrong; fix it before continuing.
|
|
135
|
-
- Record unrelated existing failures in the baseline and report them; an unrelated failure is not target red. An import or setup error is not target red. Preserve each failure's identity and output. A newly broken pre-existing test is a conflict — stop and surface it.
|
|
136
|
-
- Required commit gates remain blocked while required checks fail. Do not skip tests, suppress failures, or waive gates to proceed.
|
|
137
|
-
|
|
138
|
-
Observe the target regression red on the broken source before repair or implementation. If a material fixture or setup change occurs after that observation, the earlier red no longer qualifies: repeat target red on the broken implementation with the changed fixture or setup before the minimum repair. For an intermittent or timing defect, prefer a faithful deterministic seam. If only repeated trials can exercise the mechanism, predeclare a finite trial bound and failure oracle; record the stochastic sample limit. Do not claim deterministic proof from a passing sample or retry until green. A failing trial must match the target mechanism, not merely fail intermittently.
|
|
139
|
-
|
|
140
|
-
Reject the standard traps: asserting on a mock instead of behavior; a test that can never fail; a
|
|
141
|
-
snapshot so broad it asserts nothing; coupling to an implementation detail instead of observable
|
|
142
|
-
behavior; asserting on the framework's behavior rather than your own.
|
|
143
|
-
|
|
144
|
-
The reasons to skip red are known. Hearing one is the tell that this gate is about to be waived —
|
|
145
|
-
never the license to waive it:
|
|
146
|
-
|
|
147
|
-
| excuse | reality |
|
|
14
|
+
Use the selected specification or inline criteria for a feature, the observed defect
|
|
15
|
+
and expected behavior for a fix, and the agreed surface plus existing behavior for a
|
|
16
|
+
refactor. Read applicable project instructions and the test, coverage, and lint
|
|
17
|
+
commands in `<project-root>/.codearbiter/tech-stack.md`. Follow
|
|
18
|
+
`<plugin-root>/includes/verification-boundary.md` for local versus hosted checks.
|
|
19
|
+
Read security controls when the affected behavior crosses a security boundary.
|
|
20
|
+
Use `.codearbiter/code-map.md` on demand for source orientation when present.
|
|
21
|
+
|
|
22
|
+
For artifact I/O, load `<plugin-root>/includes/artifacts.md`. Use the selected
|
|
23
|
+
spec/plan identities and typed criterion records for HTML. Direct implementation
|
|
24
|
+
reads the same relevant inputs; it does not require a child or delivery receipt.
|
|
25
|
+
|
|
26
|
+
For actual delegation, send bounded context to the named actor. Feature actors use
|
|
27
|
+
`_artifactpromptlib.compose_feature_actor_input`; fix and test-only actors use
|
|
28
|
+
`_contextselectlib.compose_fix_or_test_actor_input`. Bind the actual task paths,
|
|
29
|
+
commands and cwd, applicable constraints, and effective instructions. A small-lane
|
|
30
|
+
feature supplies `confirmed_mini_spec` with absent spec/plan IDs. A fix supplies
|
|
31
|
+
`route='fix'`, `caller='fix'`, bug-origin evidence and the named regression. Test-only
|
|
32
|
+
work uses `route='test_change'` under its existing feature, fix, or refactor caller.
|
|
33
|
+
Use `required_refs` for particular task-critical inputs. Missing optional map or
|
|
34
|
+
provenance information permits focused source inspection.
|
|
35
|
+
|
|
36
|
+
`_contextselectlib.prepare_actor_delivery` can prepare the actor's bounded input.
|
|
37
|
+
Send the returned delivery text when requested and retain observed delivery facts.
|
|
38
|
+
An advisory delivery result needs no further retry. Re-select after a material
|
|
39
|
+
source, scope or worktree change. Resolve actual critical missing or conflicting
|
|
40
|
+
inputs before the affected action, and preserve host permissions.
|
|
41
|
+
|
|
42
|
+
## Phase 1 — Obligations and verification approach
|
|
43
|
+
|
|
44
|
+
Record each required claim with an ID, its source, and its proving check. Include
|
|
45
|
+
applicable contract and security boundaries. Retain the existing feature criteria,
|
|
46
|
+
fix expectation, or refactor surface; ask only about a consequential missing choice.
|
|
47
|
+
|
|
48
|
+
| Work | Evidence required |
|
|
148
49
|
|---|---|
|
|
149
|
-
|
|
|
150
|
-
|
|
|
151
|
-
|
|
|
152
|
-
|
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
Run lint, and the type-check if the project is statically typed, from `tech-stack.md`. Resolve every
|
|
227
|
-
error.
|
|
228
|
-
|
|
229
|
-
Gate: clean lint and type-check, zero errors — this is what clears the path to `commit-gate`.
|
|
230
|
-
"Mostly passes" is not passing.
|
|
231
|
-
|
|
232
|
-
## Hard rules
|
|
233
|
-
|
|
234
|
-
- MUST NOT skip, suppress, or comment out a test to clear any gate.
|
|
235
|
-
- MUST NOT mark an obligation `COVERED` without a passing test that exercises the claim.
|
|
236
|
-
- MUST NOT lower a coverage threshold without a decision recorded in `CONTEXT.md`.
|
|
237
|
-
- MUST NOT inline-suppress a lint rule without a written reason, and never to bypass a security-relevant rule.
|
|
238
|
-
- MUST NOT guess the test, coverage, or lint command — read `tech-stack.md` or STOP.
|
|
239
|
-
- MUST, at exit, run the follow-up harvest (`<plugin-root>/includes/harvest.md`) over any `[NEEDS-TRIAGE]` raised this run — batch-confirm promoting work to `open-tasks.md` and decisions to `open-questions.md` so nothing languishes; nothing auto-promotes interactively.
|
|
50
|
+
| Confirmed fix | Observe a named regression failing for the defect before repair, then passing after repair. Reuse an adequate current bug-origin RED. |
|
|
51
|
+
| Feature | Prefer test-first behavior checks. Existing implementation can be verified through current criterion-focused tests and meaningful negative controls where needed; report the observed sequence accurately. |
|
|
52
|
+
| Refactor or coverage backfill | Run characterization tests against existing behavior before restructuring. An initially passing test is a valid baseline. Preserve that baseline and its assertions through the refactor. |
|
|
53
|
+
| Documentation or non-executable change | Use the relevant reference, generation, schema, or rendering validation. Mark test and coverage phases inapplicable with the concrete reason. |
|
|
54
|
+
|
|
55
|
+
Each obligation moves `OPEN → MAPPED → COVERED`; a claim without adequate evidence
|
|
56
|
+
remains `MISSING`. Declare the approach and needed checks up front. Record only
|
|
57
|
+
observed results, including failures, skips, and unavailable checks.
|
|
58
|
+
|
|
59
|
+
## Phase 2 — Establish the baseline
|
|
60
|
+
|
|
61
|
+
Run the selected checks and read their output. For a confirmed fix, verify that the
|
|
62
|
+
named regression fails for the target assertion, not an import, setup, or unrelated
|
|
63
|
+
error. Reuse a suitable existing test rather than duplicating it. Add tests for
|
|
64
|
+
uncovered behavior. Keep unrelated baseline failures separately identified.
|
|
65
|
+
|
|
66
|
+
For test-first feature work, observe the intended missing behavior before adding
|
|
67
|
+
it. For characterization, observe the existing behavior passing. A negative control
|
|
68
|
+
or isolated fault fixture can establish that a test detects a relevant deviation;
|
|
69
|
+
do not alter correct production behavior merely to obtain a failure.
|
|
70
|
+
|
|
71
|
+
For timing defects, prefer a deterministic seam. When repeated trials are necessary,
|
|
72
|
+
state a finite trial bound and failure oracle before running them. Report sample
|
|
73
|
+
limits; a passing sample is not deterministic proof.
|
|
74
|
+
|
|
75
|
+
Proceed when the selected baseline supports the intended change. A confirmed fix
|
|
76
|
+
requires its genuine target RED. Missing characterization coverage requires useful
|
|
77
|
+
baseline tests before restructuring. Never weaken assertions or suppress failures.
|
|
78
|
+
|
|
79
|
+
## Phase 3 — Implement and check
|
|
80
|
+
|
|
81
|
+
Implement the scoped change using project conventions. Run the proving checks on
|
|
82
|
+
the resulting source, followed by affected pre-existing contracts. Repair regressions
|
|
83
|
+
and retain failed results until superseded by an actual rerun.
|
|
84
|
+
|
|
85
|
+
For a regression-first fix, run the same named test for fresh GREEN. Keep its
|
|
86
|
+
assertions unchanged between RED and GREEN. A material fixture or setup change
|
|
87
|
+
requires renewed target RED against the broken source before claiming that sequence.
|
|
88
|
+
For refactors, preserve the behavior and baseline test assertions.
|
|
89
|
+
|
|
90
|
+
## Phase 4 — Verify obligations
|
|
91
|
+
|
|
92
|
+
Match each obligation to evidence that exercises its claim. Mark it `COVERED` only
|
|
93
|
+
when the applicable check passed. An unexplained failure or untested requirement
|
|
94
|
+
remains `MISSING`; repair the affected work and rerun its checks. Reuse current
|
|
95
|
+
results when the relevant source and inputs are unchanged.
|
|
96
|
+
|
|
97
|
+
Review the combined change at the scope its risks warrant. Use `coverage-auditor`
|
|
98
|
+
(`<plugin-root>/agents/coverage-auditor.md`) for an independently required review of security or contract-critical behavior.
|
|
99
|
+
State exactly what the evidence proves and what remains unknown.
|
|
100
|
+
|
|
101
|
+
## Phase 5 — Coverage
|
|
102
|
+
|
|
103
|
+
Apply `<plugin-root>/includes/maturity-coverage.md` using the project's declared
|
|
104
|
+
coverage profile and maturity stage. Run the owning coverage command for the affected
|
|
105
|
+
surface; every required metric must meet its threshold and critical-path evidence
|
|
106
|
+
requirements. Keep production scope, exclusions, and metrics unchanged unless the
|
|
107
|
+
user has authorized a policy change.
|
|
108
|
+
|
|
109
|
+
Name the measurement host and retain the supported host union for platform-forked
|
|
110
|
+
trees. An unavailable host remains unmeasured. When the surface has no coverage
|
|
111
|
+
tooling, cite its `tech-stack.md` Coverage declaration and use the shared no-tooling
|
|
112
|
+
rule with the Phase 4 evidence. Never invent a command or treat unmeasured coverage
|
|
113
|
+
as passing.
|
|
114
|
+
|
|
115
|
+
## Phase 6 — Lint and handoff
|
|
116
|
+
|
|
117
|
+
Run applicable lint and type checks from the project command guide. Resolve errors.
|
|
118
|
+
Return the scoped obligations, selected verification approach, actual command/cwd
|
|
119
|
+
and outcomes, and any pending checks to the caller. The commit owner evaluates this
|
|
120
|
+
evidence for the selected staged changes; it does not require a different historical
|
|
121
|
+
test sequence from the one appropriate to the work.
|
|
122
|
+
|
|
123
|
+
Preserve failures and actual user stops. Do not skip tests, lower coverage thresholds,
|
|
124
|
+
or suppress security checks to obtain a pass. Use `<plugin-root>/includes/harvest.md`
|
|
125
|
+
for genuine out-of-scope findings. Completion reports must distinguish implementation,
|
|
126
|
+
verification, review, and release.
|