@punks/cli 3.2.1 → 3.3.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/AGENTS.md +2 -0
- package/dist/BASELINE_CHANGELOG.md +76 -0
- package/dist/CHANGELOG.md +46 -1
- package/dist/baseline/scaffold-baseline/baseline.json +5 -5
- package/dist/baseline/scaffold-baseline/data/catalog/lint-assets.json +4 -1
- package/dist/baseline/scaffold-baseline/data/catalog/packs.json +7 -3
- package/dist/baseline/scaffold-baseline/data/catalog/skills.json +32 -0
- package/dist/baseline/scaffold-baseline/skills/agnostic/cli/hi-cli/references/post-command-flow.md +25 -17
- package/dist/baseline/scaffold-baseline/skills/agnostic/docs/rule-authoring/SKILL.md +18 -0
- package/dist/baseline/scaffold-baseline/skills/agnostic/docs/rule-authoring/references/migration.md +10 -0
- package/dist/baseline/scaffold-baseline/skills/agnostic/frontend/animate/LICENSE +21 -0
- package/dist/baseline/scaffold-baseline/skills/agnostic/frontend/animate/RECIPES.md +333 -0
- package/dist/baseline/scaffold-baseline/skills/agnostic/frontend/animate/SKILL.md +203 -0
- package/dist/baseline/scaffold-baseline/skills/agnostic/frontend/animate/UPSTREAM.md +9 -0
- package/dist/baseline/scaffold-baseline/skills/agnostic/frontend/review-animations/LICENSE +21 -0
- package/dist/baseline/scaffold-baseline/skills/agnostic/frontend/review-animations/SKILL.md +112 -0
- package/dist/baseline/scaffold-baseline/skills/agnostic/frontend/review-animations/STANDARDS.md +229 -0
- package/dist/baseline/scaffold-baseline/skills/agnostic/frontend/review-animations/UPSTREAM.md +9 -0
- package/dist/baseline/scaffold-baseline/skills/agnostic/planning/create-plan/REFERENCE.md +5 -1
- package/dist/baseline/scaffold-baseline/skills/agnostic/planning/create-plan/SKILL.md +9 -7
- package/dist/baseline/scaffold-baseline/skills/agnostic/planning/create-plan/references/architecture-convergence.md +4 -3
- package/dist/baseline/scaffold-baseline/skills/agnostic/planning/create-plan/references/planner-task-graph.md +12 -7
- package/dist/baseline/scaffold-baseline/skills/agnostic/quality/tdd/SKILL.md +3 -2
- package/dist/baseline/scaffold-baseline/skills/agnostic/quality/tdd/high-signal-tests.md +17 -3
- package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/domain-modeling/{CONTEXT-FORMAT.md → GLOSSARY-FORMAT.md} +9 -9
- package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/domain-modeling/SKILL.md +12 -12
- package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/requirements-grill/SKILL.md +4 -1
- package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/requirements-grill/references/artifact-output.md +36 -3
- package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/requirements-grill/references/grilling-flow.md +18 -1
- package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/EXAMPLES.md +1 -1
- package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/REFERENCE.md +4 -3
- package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/SKILL.md +2 -2
- package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/assets/concepts/backlog-model.md +6 -6
- package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/assets/providers/azure-devops-create-payload.md +7 -7
- package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/assets/providers/github-projects-create-payload.md +12 -12
- package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/assets/providers/linear-create-payload.md +9 -9
- package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/assets/providers/monday-create-payload.md +10 -10
- package/dist/baseline/scaffold-baseline/skills/frameworks/expo/animate-expo/LICENSE +21 -0
- package/dist/baseline/scaffold-baseline/skills/frameworks/expo/animate-expo/RECIPES.md +435 -0
- package/dist/baseline/scaffold-baseline/skills/frameworks/expo/animate-expo/SKILL.md +255 -0
- package/dist/baseline/scaffold-baseline/skills/frameworks/expo/animate-expo/UPSTREAM.md +9 -0
- package/dist/baseline/scaffold-baseline/skills/misc/wait-what/SKILL.md +1 -1
- package/dist/baseline/scaffold-baseline/skills/phases/delivery-phase/SKILL.md +5 -7
- package/dist/baseline/scaffold-baseline/skills/phases/delivery-phase/phases/review.md +50 -25
- package/dist/baseline/scaffold-baseline/skills/phases/delivery-phase/phases/router.md +29 -21
- package/dist/baseline/scaffold-baseline/skills/phases/delivery-phase/references/phase-handoff.md +28 -10
- package/dist/baseline/scaffold-baseline/skills/phases/review-phase/AUTHORING-HANDOFF.md +14 -11
- package/dist/baseline/scaffold-baseline/skills/phases/review-phase/phases/prepare-review.md +1 -1
- package/dist/baseline/scaffold-baseline/skills/phases/review-phase/phases/retain-report.md +9 -2
- package/dist/baseline/scaffold-baseline/skills/phases/review-phase/phases/return-route.md +6 -8
- package/dist/baseline/scaffold-baseline/skills/phases/review-phase/phases/run-review.md +8 -5
- package/dist/baseline/scaffold-baseline/skills/phases/review-phase/references/durable-report.md +29 -14
- package/dist/baseline/scaffold-baseline/skills/phases/review-phase/references/state-graph.md +45 -32
- package/dist/baseline/scaffold-baseline/skills/phases/review-phase/references/targets.md +2 -1
- package/dist/baseline/scaffold-baseline/skills/phases/review-phase/scripts/review-contract.mjs +86 -12
- package/dist/baseline/scaffold-baseline.json +5 -5
- package/dist/baseline/scaffold-baseline.tgz +0 -0
- package/dist/data/AGENTS.md +2 -0
- package/dist/index.js +17 -17
- package/dist/skills/agnostic/cli/hi-cli/references/post-command-flow.md +10 -2
- package/dist/skills/agnostic/docs/rule-authoring/SKILL.md +18 -0
- package/dist/skills/agnostic/docs/rule-authoring/references/migration.md +10 -0
- package/dist/skills/agnostic/frontend/animate/LICENSE +21 -0
- package/dist/skills/agnostic/frontend/animate/RECIPES.md +324 -0
- package/dist/skills/agnostic/frontend/animate/SKILL.md +199 -0
- package/dist/skills/agnostic/frontend/animate/UPSTREAM.md +9 -0
- package/dist/skills/agnostic/frontend/review-animations/LICENSE +21 -0
- package/dist/skills/agnostic/frontend/review-animations/SKILL.md +112 -0
- package/dist/skills/agnostic/frontend/review-animations/STANDARDS.md +187 -0
- package/dist/skills/agnostic/frontend/review-animations/UPSTREAM.md +9 -0
- package/dist/skills/agnostic/planning/create-plan/REFERENCE.md +5 -1
- package/dist/skills/agnostic/planning/create-plan/SKILL.md +9 -7
- package/dist/skills/agnostic/planning/create-plan/references/architecture-convergence.md +4 -3
- package/dist/skills/agnostic/planning/create-plan/references/planner-task-graph.md +12 -7
- package/dist/skills/agnostic/quality/tdd/SKILL.md +3 -2
- package/dist/skills/agnostic/quality/tdd/high-signal-tests.md +17 -3
- package/dist/skills/agnostic/requirements/domain-modeling/{CONTEXT-FORMAT.md → GLOSSARY-FORMAT.md} +9 -9
- package/dist/skills/agnostic/requirements/domain-modeling/SKILL.md +12 -12
- package/dist/skills/agnostic/requirements/requirements-grill/SKILL.md +4 -1
- package/dist/skills/agnostic/requirements/requirements-grill/references/artifact-output.md +33 -3
- package/dist/skills/agnostic/requirements/requirements-grill/references/grilling-flow.md +18 -1
- package/dist/skills/agnostic/requirements/write-backlog/EXAMPLES.md +1 -1
- package/dist/skills/agnostic/requirements/write-backlog/REFERENCE.md +4 -3
- package/dist/skills/agnostic/requirements/write-backlog/SKILL.md +2 -2
- package/dist/skills/agnostic/requirements/write-backlog/assets/concepts/backlog-model.md +6 -6
- package/dist/skills/agnostic/requirements/write-backlog/assets/providers/azure-devops-create-payload.md +7 -7
- package/dist/skills/agnostic/requirements/write-backlog/assets/providers/github-projects-create-payload.md +12 -12
- package/dist/skills/agnostic/requirements/write-backlog/assets/providers/linear-create-payload.md +9 -9
- package/dist/skills/agnostic/requirements/write-backlog/assets/providers/monday-create-payload.md +10 -10
- package/dist/skills/frameworks/expo/animate-expo/LICENSE +21 -0
- package/dist/skills/frameworks/expo/animate-expo/RECIPES.md +385 -0
- package/dist/skills/frameworks/expo/animate-expo/SKILL.md +255 -0
- package/dist/skills/frameworks/expo/animate-expo/UPSTREAM.md +9 -0
- package/dist/skills/misc/wait-what/SKILL.md +1 -1
- package/dist/skills/phases/delivery-phase/SKILL.md +5 -7
- package/dist/skills/phases/delivery-phase/phases/review.md +50 -25
- package/dist/skills/phases/delivery-phase/phases/router.md +27 -19
- package/dist/skills/phases/delivery-phase/references/phase-handoff.md +28 -10
- package/dist/skills/phases/review-phase/AUTHORING-HANDOFF.md +14 -11
- package/dist/skills/phases/review-phase/phases/prepare-review.md +1 -1
- package/dist/skills/phases/review-phase/phases/retain-report.md +9 -2
- package/dist/skills/phases/review-phase/phases/return-route.md +6 -8
- package/dist/skills/phases/review-phase/phases/run-review.md +8 -5
- package/dist/skills/phases/review-phase/references/durable-report.md +29 -14
- package/dist/skills/phases/review-phase/references/state-graph.md +19 -6
- package/dist/skills/phases/review-phase/references/targets.md +2 -1
- package/dist/skills/phases/review-phase/scripts/review-contract.mjs +91 -11
- package/package.json +4 -23
- package/dist/baseline/scaffold-baseline/data/scripts/harness-projection/adapters/claude.test.ts +0 -130
- package/dist/baseline/scaffold-baseline/data/scripts/harness-projection/adapters/codex.test.ts +0 -135
- package/dist/baseline/scaffold-baseline/data/scripts/harness-projection/adapters/cursor.test.ts +0 -138
- package/dist/baseline/scaffold-baseline/data/scripts/harness-projection/adapters/opencode.test.ts +0 -135
- package/dist/baseline/scaffold-baseline/data/scripts/harness-projection/contract.test.ts +0 -875
- package/dist/baseline/scaffold-baseline/data/scripts/sync-subagents.lifecycle.test.ts +0 -205
- package/dist/baseline/scaffold-baseline/data/scripts/sync-subagents.native.test.ts +0 -2765
- package/dist/baseline/scaffold-baseline/data/scripts/sync-subagents.test.ts +0 -2108
- package/dist/baseline/scaffold-baseline/data/subagents/manifest.test.ts +0 -116
|
@@ -15,9 +15,9 @@ disable-model-invocation: true
|
|
|
15
15
|
handoff, validation, and docs state to choose the current gate.
|
|
16
16
|
3. If approved artifact links or UI Evidence links are present, carry them as routing evidence.
|
|
17
17
|
4. Load exactly one phase file from `phases/`.
|
|
18
|
-
5. Complete that phase
|
|
18
|
+
5. Complete that phase and write its outcome. Full delivery re-enters routing immediately; other modes stop at their selected boundary.
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
Full delivery grants its selected inner steps the authority needed to reach closeout. Progressive loading still exposes one phase at a time.
|
|
21
21
|
|
|
22
22
|
## Entry Modes
|
|
23
23
|
|
|
@@ -47,16 +47,14 @@ Completion of one phase does not imply loading the rest of the chain.
|
|
|
47
47
|
- A phase may delegate to `create-spec`, `write-backlog`, `create-plan`,
|
|
48
48
|
`implement-spec`, `debugging-phase`, or `docs-ingest-phase` only from
|
|
49
49
|
its own phase file.
|
|
50
|
-
- `review-phase`
|
|
51
|
-
|
|
52
|
-
then delivery stops. It never invokes that skill itself.
|
|
50
|
+
- In full delivery, activate `review-phase` as an authorized inner step below the three-pass budget. Outside full delivery, return its exact explicit invocation context and stop.
|
|
51
|
+
- After the third repair, run focused validation. Passing resumes routing toward closeout; terminal failure is a blocker.
|
|
53
52
|
- After a phase completes, write enough state for future resume. Review-triggered
|
|
54
53
|
repair uses the idempotent fields in
|
|
55
54
|
[references/phase-handoff.md](references/phase-handoff.md).
|
|
56
55
|
|
|
57
56
|
## Stop Conditions
|
|
58
57
|
|
|
59
|
-
-
|
|
60
|
-
- User requested a HITL checkpoint before the next phase.
|
|
58
|
+
- User explicitly requested a HITL checkpoint or one-phase mode and its resumable state was written.
|
|
61
59
|
- Router reaches closeout and final evidence is reported.
|
|
62
60
|
- Scope is ambiguous, stale, contradictory, or blocked by missing access.
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Use after implementation or whenever delivery has `review_due` for a stale or
|
|
4
4
|
missing retained review.
|
|
5
5
|
|
|
6
|
-
## Prepare
|
|
6
|
+
## Prepare Review
|
|
7
7
|
|
|
8
8
|
1. Validate accepted bounds and normalize a supported Git/diff target without
|
|
9
9
|
mutating it. Unsupported targets or invalid bounds enter `review_failed`
|
|
@@ -14,39 +14,64 @@ missing retained review.
|
|
|
14
14
|
current-route evidence. This is a zero-write no-op: do not persist
|
|
15
15
|
`review_due` or mutate any handoff, counter, or delivery status.
|
|
16
16
|
4. Only when recovered `review_count < 3`, persist `review_due` with the valid
|
|
17
|
-
normalized target and
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
5.
|
|
21
|
-
|
|
22
|
-
`review_run_id`, and enters `review_running`.
|
|
23
|
-
|
|
24
|
-
For `report_retention_pending`,
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
lenses.
|
|
17
|
+
normalized target and `$review-phase` invocation context defined in the
|
|
18
|
+
phase-handoff reference. Do not preallocate an ordinal or derive
|
|
19
|
+
`review_run_id` yet.
|
|
20
|
+
5. Full delivery invokes `$review-phase` with that context immediately. Other
|
|
21
|
+
modes return it and stop. Invocation preallocates ordinal `review_count + 1`,
|
|
22
|
+
fixes `review_run_id`, and enters `review_running`.
|
|
23
|
+
|
|
24
|
+
For `report_retention_pending`, use a `$review-phase` resume context with the
|
|
25
|
+
existing run id, local report identity, and fresh target/source hashes. Full
|
|
26
|
+
delivery resumes it immediately; other modes return it and stop. Retention
|
|
27
|
+
resumes without rerunning lenses.
|
|
28
28
|
|
|
29
29
|
## Route Retained Findings
|
|
30
30
|
|
|
31
31
|
After the retained report establishes the completed ordinal:
|
|
32
32
|
|
|
33
|
-
1.
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
33
|
+
1. Recompute aggregate routing from every finding's validated `return_route`
|
|
34
|
+
with the review contract helper. Reject a mismatch with the retained routing
|
|
35
|
+
object.
|
|
36
|
+
2. When `secondary_architecture_follow_up` is true, enter `debt_follow_up`
|
|
37
|
+
first and persist the primary `debugging` or `implementation` route as
|
|
38
|
+
`post_debt_route`.
|
|
39
|
+
3. Without secondary debt, `debugging` opens debugging and `implementation`
|
|
40
|
+
opens implementation.
|
|
41
|
+
4. Primary `debt_follow_up` enters debt capture with `post_debt_route` set to
|
|
42
|
+
`docs_ingest` when documentation remains, otherwise `closeout`.
|
|
43
|
+
5. `docs_ingest` enters docs ingest. `closeout` enters closeout.
|
|
37
44
|
|
|
38
45
|
Architecture debt may remain a secondary follow-up beside debugging or
|
|
39
|
-
implementation.
|
|
40
|
-
of active state, route,
|
|
41
|
-
`
|
|
42
|
-
|
|
43
|
-
directly without another
|
|
46
|
+
implementation. Open its repair only after debt capture. Opening either repair
|
|
47
|
+
route is one atomic durable handoff write of active state, route,
|
|
48
|
+
`repair_count = review_count`, and idempotency `review_run_id`. Reject a
|
|
49
|
+
mismatched or already-consumed repair ordinal. Complete the transition only
|
|
50
|
+
after that write. Resume an already-recorded run directly without another
|
|
51
|
+
increment.
|
|
52
|
+
|
|
53
|
+
## Capture Debt Follow-Up
|
|
54
|
+
|
|
55
|
+
For each primary or secondary debt finding, enter `debt_follow_up` and upsert a
|
|
56
|
+
goal/spec-linked debt artifact exactly once. Key each entry by retained report
|
|
57
|
+
commit, retained report path, and stable finding ID. Persist the artifact path,
|
|
58
|
+
keys, captured finding IDs, and `post_debt_route` in the review handoff before
|
|
59
|
+
leaving this state. Set `post_debt_route` to the higher-priority `debugging` or
|
|
60
|
+
`implementation` route for secondary debt. For primary debt, set it to
|
|
61
|
+
`docs_ingest` when required documentation remains, otherwise `closeout`. On
|
|
62
|
+
resume, reuse matching keys, add only missing entries, and follow the recorded
|
|
63
|
+
route after every key is present.
|
|
64
|
+
|
|
65
|
+
Debt capture records unaccepted work; it does not implement the debt or open an
|
|
66
|
+
implementation task. Primary capture resumes `docs_ingest` or `closeout`;
|
|
67
|
+
secondary capture resumes its recorded repair. Capture happens once before that
|
|
68
|
+
route.
|
|
44
69
|
|
|
45
70
|
## Completion
|
|
46
71
|
|
|
47
|
-
Before review, completion is a durable `review_due` handoff plus
|
|
48
|
-
|
|
72
|
+
Before review, completion is a durable `review_due` handoff plus an invocation
|
|
73
|
+
context; full delivery consumes it immediately. After review returns `review_routed`, completion
|
|
49
74
|
records report path, report SHA-256, report commit SHA, verified retained ref,
|
|
50
75
|
lineage, run id, recovered/projected counts, stable finding ids, primary route,
|
|
51
|
-
secondary debt route when present, and resulting state.
|
|
52
|
-
|
|
76
|
+
secondary debt route when present, and resulting state. Full delivery re-enters
|
|
77
|
+
routing; other modes stop at their boundary.
|
|
@@ -19,12 +19,12 @@ state take precedence over inferred artifact order.
|
|
|
19
19
|
`review_failed` even when a persisted counter is 3. Only after those checks
|
|
20
20
|
may it recover `review_count` and evaluate the budget in memory. Exhaustion
|
|
21
21
|
returns `review_budget_exhausted` with zero handoff or status writes. A count
|
|
22
|
-
below 3 persists `review_due
|
|
23
|
-
|
|
24
|
-
3. For `report_retention_pending`, load [review.md](review.md)
|
|
25
|
-
|
|
26
|
-
resumes without rerunning lenses. Stop on terminal
|
|
27
|
-
exact evidence.
|
|
22
|
+
below 3 persists `review_due`. Full delivery activates `$review-phase` with
|
|
23
|
+
that context; other modes return the exact explicit invocation context and stop.
|
|
24
|
+
3. For `report_retention_pending`, load [review.md](review.md) to resume
|
|
25
|
+
`$review-phase` in full delivery or return its exact resume context in other
|
|
26
|
+
modes. A fresh local report resumes without rerunning lenses. Stop on terminal
|
|
27
|
+
`review_failed` with its exact evidence.
|
|
28
28
|
4. Otherwise recover review state by `review_lineage_id`: read the highest valid
|
|
29
29
|
retained ordinal, reconcile the handoff `review_count` projection, then assess
|
|
30
30
|
target and source freshness separately.
|
|
@@ -33,24 +33,31 @@ state take precedence over inferred artifact order.
|
|
|
33
33
|
6. Resume an atomic handoff already in `debug_active` through [debug.md](debug.md)
|
|
34
34
|
or `repair_active` through [implement.md](implement.md). A recorded
|
|
35
35
|
`review_run_id` cannot increment `repair_count` again.
|
|
36
|
-
7.
|
|
36
|
+
7. Resume `debt_follow_up` through [review.md](review.md). Its handler reuses or
|
|
37
|
+
records the goal/spec-linked debt artifact, then follows durable
|
|
38
|
+
`post_debt_route`: `debugging` or `implementation` for secondary debt;
|
|
39
|
+
`docs_ingest` or `closeout` for primary debt. It never implements the debt.
|
|
40
|
+
8. Route `focused_validation` to its recorded implementation or debugging owner.
|
|
37
41
|
Passing becomes `clean_handoff`; failure remains repair epoch 3.
|
|
38
|
-
|
|
42
|
+
9. Route `clean_handoff` to [docs-ingest.md](docs-ingest.md) when docs remain,
|
|
39
43
|
otherwise [closeout.md](closeout.md).
|
|
40
|
-
|
|
44
|
+
10. For durable `docs_ingest`, load [docs-ingest.md](docs-ingest.md).
|
|
45
|
+
11. For durable `closeout`, load [closeout.md](closeout.md).
|
|
46
|
+
12. If no matching agent-ready `SPEC.md` exists, it is stale, contradictory, or
|
|
41
47
|
incomplete, or its remote retention or stable blob URL is missing or
|
|
42
48
|
unverified, load [spec.md](spec.md).
|
|
43
|
-
|
|
49
|
+
13. If the verified post-spec backlog projection is missing or stale, load
|
|
44
50
|
[backlog.md](backlog.md).
|
|
45
|
-
|
|
51
|
+
14. If no execution-ready matching plan exists, or it lacks dependencies, owned
|
|
46
52
|
paths, validation gates, or wave boundaries, load [plan.md](plan.md).
|
|
47
|
-
|
|
48
|
-
|
|
53
|
+
15. If accepted plan work is incomplete, load [implement.md](implement.md).
|
|
54
|
+
16. If implementation exists and its retained review is missing or stale, load
|
|
49
55
|
[review.md](review.md). That phase validates accepted bounds and normalizes a
|
|
50
56
|
supported target before any delivery-budget evaluation, then returns either
|
|
51
|
-
`review_failed`, `review_budget_exhausted`, or
|
|
52
|
-
|
|
53
|
-
|
|
57
|
+
`review_failed`, `review_budget_exhausted`, or a valid `$review-phase`
|
|
58
|
+
context. Full delivery consumes that context immediately; other modes
|
|
59
|
+
return the exact explicit invocation context and stop.
|
|
60
|
+
17. Route remaining docs-affecting work to [docs-ingest.md](docs-ingest.md),
|
|
54
61
|
otherwise [closeout.md](closeout.md).
|
|
55
62
|
|
|
56
63
|
Only an explicitly new delivery goal with materially changed accepted bounds
|
|
@@ -59,9 +66,10 @@ revision, resume, rebase, commit, retry, and handoff preserve them.
|
|
|
59
66
|
|
|
60
67
|
## HITL And Resume
|
|
61
68
|
|
|
62
|
-
A HITL checkpoint
|
|
63
|
-
|
|
64
|
-
|
|
69
|
+
A HITL checkpoint exists only when the user explicitly requests it. Full
|
|
70
|
+
delivery otherwise continues across ordinary in-bounds operations without
|
|
71
|
+
confirmation. Earlier phases may have completed through direct skills; reuse
|
|
72
|
+
fresh matching artifacts rather than rerunning them.
|
|
65
73
|
|
|
66
74
|
## Output
|
|
67
75
|
|
|
@@ -30,14 +30,19 @@ accepted_bounds_identity:
|
|
|
30
30
|
accepted_bounds_hash:
|
|
31
31
|
review_lineage_id:
|
|
32
32
|
review_run_id:
|
|
33
|
-
state: review_due | review_running | report_retention_pending | review_routed | debug_active | repair_active | focused_validation | clean_handoff
|
|
33
|
+
state: review_due | review_running | report_retention_pending | review_routed | debt_follow_up | debug_active | repair_active | focused_validation | docs_ingest | closeout | clean_handoff
|
|
34
34
|
primary_route:
|
|
35
|
+
secondary_architecture_follow_up:
|
|
36
|
+
post_debt_route:
|
|
35
37
|
review_count:
|
|
36
38
|
repair_count:
|
|
37
39
|
authoritative_report_path:
|
|
38
40
|
authoritative_report_commit:
|
|
39
41
|
verified_retained_ref:
|
|
40
42
|
stable_finding_ids:
|
|
43
|
+
debt_follow_up_artifact:
|
|
44
|
+
debt_follow_up_keys:
|
|
45
|
+
captured_debt_finding_ids:
|
|
41
46
|
```
|
|
42
47
|
|
|
43
48
|
`review_count` is a projection of the highest valid retained report ordinal for
|
|
@@ -46,13 +51,25 @@ writes active state, primary route, `repair_count = review_count`, and
|
|
|
46
51
|
idempotency `review_run_id`; complete the transition only after the write. A
|
|
47
52
|
recorded run id resumes its state without increment or guard fallthrough.
|
|
48
53
|
|
|
49
|
-
|
|
54
|
+
Each debt follow-up key is the tuple of authoritative report commit,
|
|
55
|
+
authoritative report path, and stable finding ID. The debt artifact links the
|
|
56
|
+
delivery goal and accepted Spec, records those keys, and lives outside the
|
|
57
|
+
immutable report. Replaying a recorded key reuses the existing entry. It never
|
|
58
|
+
opens implementation work for unaccepted debt.
|
|
50
59
|
|
|
51
|
-
|
|
52
|
-
|
|
60
|
+
`post_debt_route` is durable before debt capture starts. It is `debugging` or
|
|
61
|
+
`implementation` for secondary debt, and `docs_ingest` or `closeout` for
|
|
62
|
+
primary debt after capture. Resume follows this field after every debt key is
|
|
63
|
+
present. For primary debt, the successful capture transition atomically records
|
|
64
|
+
every debt key and sets state = `post_debt_route`. Resume continues from the
|
|
65
|
+
recorded `docs_ingest` or `closeout` state without repeating capture.
|
|
66
|
+
|
|
67
|
+
## Review Invocation Context
|
|
68
|
+
|
|
69
|
+
Delivery persists this block for `review_due`:
|
|
53
70
|
|
|
54
71
|
```text
|
|
55
|
-
|
|
72
|
+
review_invocation_authority: full_delivery | explicit_operator
|
|
56
73
|
review_invocation_skill: $review-phase
|
|
57
74
|
review_invocation_mode: delivery
|
|
58
75
|
delivery_goal_identity:
|
|
@@ -64,14 +81,15 @@ current_route:
|
|
|
64
81
|
normalized_target:
|
|
65
82
|
```
|
|
66
83
|
|
|
67
|
-
The `review_due` handoff leaves `review_run_id` unset.
|
|
68
|
-
|
|
69
|
-
id, and enters
|
|
84
|
+
The `review_due` handoff leaves `review_run_id` unset. Full delivery consumes the
|
|
85
|
+
context immediately; other modes return it for explicit operator invocation.
|
|
86
|
+
Consumption preallocates the next ordinal, fixes the run id, and enters
|
|
87
|
+
`review_running`.
|
|
70
88
|
|
|
71
89
|
For `report_retention_pending`, the explicit resume context additionally carries
|
|
72
90
|
the existing `review_run_id`, ordinal, local report path and SHA-256, target hash,
|
|
73
|
-
source hashes, and intended retained ref.
|
|
74
|
-
|
|
91
|
+
source hashes, and intended retained ref. Full delivery resumes `$review-phase`;
|
|
92
|
+
other modes return the context for explicit retry without rerunning lenses.
|
|
75
93
|
|
|
76
94
|
After fix 3, `clean_handoff` is final authority. Link immutable review 3, final
|
|
77
95
|
changes, the same passing focused validation, and clean status.
|
|
@@ -3,6 +3,10 @@
|
|
|
3
3
|
This is the graph-authoring record. It is separate from review runtime
|
|
4
4
|
handoffs, retained reports, and delivery handoffs.
|
|
5
5
|
|
|
6
|
+
Test references below are source-repository provenance. The installed package
|
|
7
|
+
omits the source repository test files; reproduce a claim from the immutable
|
|
8
|
+
source commit with its named command and contract seam.
|
|
9
|
+
|
|
6
10
|
## Router Selection
|
|
7
11
|
|
|
8
12
|
Phase: router
|
|
@@ -362,8 +366,8 @@ Artifacts:
|
|
|
362
366
|
Validation:
|
|
363
367
|
|
|
364
368
|
- Disclosure completion was durable.
|
|
365
|
-
- The focused route contract was observed RED
|
|
366
|
-
|
|
369
|
+
- The focused route contract was observed RED against deleted or relocated
|
|
370
|
+
authority.
|
|
367
371
|
- The nine authoring route predictions and runtime storage/no-write cases were
|
|
368
372
|
not yet executable or recorded, so `test-routes.md` was the single route.
|
|
369
373
|
|
|
@@ -410,8 +414,8 @@ Validation:
|
|
|
410
414
|
- All nine predictions matched derivation; no runtime contract mismatch required
|
|
411
415
|
repair.
|
|
412
416
|
- Stale, out-of-scope, and invalid artifact subcases resolve separately.
|
|
413
|
-
- The focused
|
|
414
|
-
deleted-root assertions and adding
|
|
417
|
+
- The focused source contract moved from observed RED to GREEN after replacing
|
|
418
|
+
deleted-root assertions and adding runtime graph contracts.
|
|
415
419
|
- Router priorities 1-12 cover terminal, checkpoint, blocked, and all four gate
|
|
416
420
|
outputs. Delivery and standalone storage, conflict, and every declared
|
|
417
421
|
authoritative no-write class are executable assertions.
|
|
@@ -441,7 +445,7 @@ storage modes, no-write outcomes, conflicts, and router classes were tested.
|
|
|
441
445
|
|
|
442
446
|
Artifacts:
|
|
443
447
|
|
|
444
|
-
-
|
|
448
|
+
- The canonical source review-graph contract and its named Node command.
|
|
445
449
|
- `Test Routes Outcome`: nine frozen predictions with nine matching derived
|
|
446
450
|
routes and zero graph repairs.
|
|
447
451
|
|
|
@@ -474,8 +478,7 @@ Artifacts:
|
|
|
474
478
|
|
|
475
479
|
- `SKILL.md`, `agents/openai.yaml`, `phases/router.md`, four flat gate files,
|
|
476
480
|
four references, and `scripts/review-contract.mjs`.
|
|
477
|
-
-
|
|
478
|
-
`tests/*.test.mjs` files.
|
|
481
|
+
- The canonical source review-graph contract and shared source contract command.
|
|
479
482
|
|
|
480
483
|
Validation:
|
|
481
484
|
|
|
@@ -498,7 +501,7 @@ Validation:
|
|
|
498
501
|
- The no-op test required zero deletions: each remaining instruction changes
|
|
499
502
|
invocation, routing, evidence, validation, persistence, or stop behavior.
|
|
500
503
|
- `SKILL.md` and `agents/openai.yaml` consistently disable implicit invocation.
|
|
501
|
-
-
|
|
504
|
+
- The focused and shared source contract commands pass. Both Node
|
|
502
505
|
files pass syntax checks, and the scoped diff passes `git diff --check`.
|
|
503
506
|
- The requested literal `python` command is unavailable. The same validator
|
|
504
507
|
executed through `uv run --with pyyaml python` and failed because
|
|
@@ -582,8 +585,8 @@ Artifacts:
|
|
|
582
585
|
|
|
583
586
|
- `SKILL.md`, `agents/openai.yaml`, `phases/router.md`, four flat gate files,
|
|
584
587
|
four references, and `scripts/review-contract.mjs`.
|
|
585
|
-
-
|
|
586
|
-
|
|
588
|
+
- The canonical source review-graph and shared contract commands, plus the
|
|
589
|
+
applicable `skills` packaging validator output.
|
|
587
590
|
|
|
588
591
|
Validation:
|
|
589
592
|
|
|
@@ -601,7 +604,7 @@ Validation:
|
|
|
601
604
|
form the progressive-disclosure trace.
|
|
602
605
|
- The no-op test required zero deletions. Root frontmatter and
|
|
603
606
|
`agents/openai.yaml` consistently enforce explicit-only invocation.
|
|
604
|
-
-
|
|
607
|
+
- The focused and shared source contract commands pass. Both Node
|
|
605
608
|
files pass syntax checks, and the scoped diff passes `git diff --check`.
|
|
606
609
|
- The applicable packaging validator exits zero, validates the local path,
|
|
607
610
|
discovers 106 skills, and lists `review-phase` with the exact source
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
## Entry Guard
|
|
4
4
|
|
|
5
5
|
The router selected this gate from fresh `review_due` evidence supplied by an
|
|
6
|
-
explicit
|
|
6
|
+
authorized full-delivery or explicit-operator invocation. The review mode is `delivery` or `standalone`,
|
|
7
7
|
and no valid later-state evidence already owns the run.
|
|
8
8
|
|
|
9
9
|
## Inputs
|
|
@@ -11,6 +11,8 @@ returns the zero-write `review_budget_exhausted` terminal.
|
|
|
11
11
|
## Inputs
|
|
12
12
|
|
|
13
13
|
- exact local report path and bytes
|
|
14
|
+
- exact bytes resolved from `reportCommitSha:reportPath` for every retained
|
|
15
|
+
candidate, supplied to the validator as `resolvedReportBytes`
|
|
14
16
|
- primitive accepted-bounds, normalized-target, and governing-source evidence
|
|
15
17
|
- review mode, lineage, run ID, and delivery ordinal when applicable
|
|
16
18
|
- expected report SHA-256 and allowed navigation/wiki-log envelope paths
|
|
@@ -51,8 +53,11 @@ accepting an exit.
|
|
|
51
53
|
the report and allowed envelope, then push or use the approved ref. Preserve
|
|
52
54
|
the report bytes exactly.
|
|
53
55
|
6. Verify that the retained ref contains the exact report commit and that the
|
|
54
|
-
commit changed only approved envelope paths.
|
|
55
|
-
|
|
56
|
+
commit changed only approved envelope paths. Resolve
|
|
57
|
+
`reportCommitSha:reportPath` from that commit, pass those exact committed
|
|
58
|
+
bytes to the retained-pass validator, and require exact equality with the
|
|
59
|
+
local report bytes. A local digest or caller assertion cannot replace this
|
|
60
|
+
commit-tree read.
|
|
56
61
|
7. Only a unique valid retained delivery report establishes its ordinal.
|
|
57
62
|
Reconcile the delivery `review_count` projection from the highest unique
|
|
58
63
|
valid retained ordinal. Standalone retention changes no delivery counter.
|
|
@@ -81,6 +86,8 @@ accepting an exit.
|
|
|
81
86
|
- same-run candidate inventory and uniqueness decision
|
|
82
87
|
- report commit SHA and its exact changed-path set
|
|
83
88
|
- approved retained ref and proof that it contains the report commit
|
|
89
|
+
- exact `reportCommitSha:reportPath` resolution and committed/local byte
|
|
90
|
+
equality
|
|
84
91
|
- delivery ordinal and reconciled counter projection, or standalone mode
|
|
85
92
|
|
|
86
93
|
## Declared Exits
|
|
@@ -31,13 +31,11 @@ debug, debt, documentation, or closeout work.
|
|
|
31
31
|
1. Revalidate the retained blob, canonical identities, approved commit paths,
|
|
32
32
|
same-run uniqueness, ref containment, and current freshness. Reuse only the
|
|
33
33
|
immutable authority block inside those retained bytes.
|
|
34
|
-
2.
|
|
35
|
-
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
- otherwise -> `closeout`
|
|
40
|
-
3. Set `secondary_architecture_follow_up` only when a broad architecture-debt
|
|
34
|
+
2. Pass the complete retained finding set to the public `deriveReviewRouting`
|
|
35
|
+
helper. Each non-empty finding already carries one validated `return_route`.
|
|
36
|
+
The helper applies `debugging` > `implementation` > `debt_follow_up` >
|
|
37
|
+
`docs_ingest`; an empty set returns `closeout`.
|
|
38
|
+
3. Accept `secondary_architecture_follow_up` only when a `debt_follow_up`
|
|
41
39
|
finding accompanies a higher-priority debugging or implementation route.
|
|
42
40
|
4. Require the derived result to equal the retained report's `routing` object.
|
|
43
41
|
A mismatch is invalid retained routing evidence and routes to
|
|
@@ -63,7 +61,7 @@ debug, debt, documentation, or closeout work.
|
|
|
63
61
|
|
|
64
62
|
- valid retained-pass result and final freshness result
|
|
65
63
|
- retained report path, SHA-256, commit, and containing ref
|
|
66
|
-
- stable finding IDs
|
|
64
|
+
- stable finding IDs and their explicit `return_route` classifications
|
|
67
65
|
- deterministic precedence result and exact match to report `routing`
|
|
68
66
|
- returned mode-specific state and routing-evidence artifact
|
|
69
67
|
|
|
@@ -51,7 +51,8 @@ scope; the parent rejects stale, expanded, duplicated, or unverified output.
|
|
|
51
51
|
6. Parent-verify every advisory and lens candidate against the frozen target and
|
|
52
52
|
adjacent evidence. Only verified candidates become findings. Give each
|
|
53
53
|
accepted finding a stable identifier, lens, severity, location, impact,
|
|
54
|
-
evidence, and
|
|
54
|
+
evidence, action, and one explicit `return_route`: `debugging`,
|
|
55
|
+
`implementation`, `debt_follow_up`, or `docs_ingest`.
|
|
55
56
|
7. Run only the smallest safe readonly validation needed to verify candidates or
|
|
56
57
|
governing acceptance evidence. Broader checks require explicit accepted spec
|
|
57
58
|
or plan authority. Record missing required RED/GREEN evidence as a finding;
|
|
@@ -61,10 +62,11 @@ scope; the parent rejects stale, expanded, duplicated, or unverified output.
|
|
|
61
62
|
caches, generated files, snapshots, lockfiles, or state run in a disposable
|
|
62
63
|
checkout or snapshot rooted at the frozen revision. Reconcile exact commands,
|
|
63
64
|
isolation mode, hashes, output, skipped checks, and residual risk.
|
|
64
|
-
9.
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
65
|
+
9. Pass the complete verified finding set to `deriveReviewRouting` in
|
|
66
|
+
[`review-contract.mjs`](../scripts/review-contract.mjs). Store its result
|
|
67
|
+
unchanged. The helper uses only `return_route`, applies canonical precedence,
|
|
68
|
+
and preserves debt as a secondary follow-up beside debugging or
|
|
69
|
+
implementation. Finding prose never selects or reranks a route.
|
|
68
70
|
10. Assemble exactly one complete local report using
|
|
69
71
|
[`../references/durable-report.md`](../references/durable-report.md). Record
|
|
70
72
|
an explicit outcome for every lens. After its final bytes are written, treat
|
|
@@ -95,6 +97,7 @@ The run is complete only when one local report contains:
|
|
|
95
97
|
and mode-specific delivery identities
|
|
96
98
|
- explicit Standards, skill-adherence, architecture, simplify, and Spec outcomes
|
|
97
99
|
- every verified stable finding and no unverified advisory candidate
|
|
100
|
+
- one validated `return_route` on each accepted finding
|
|
98
101
|
- evidence-cardinality results for all applicable skill guidance and notes
|
|
99
102
|
- exact validation commands, isolation, before/after hashes, outcomes, skipped
|
|
100
103
|
checks, and residual risk
|
|
@@ -45,9 +45,14 @@ the fixed wiki values are `review-report`, `project`, and `internal`. Its title
|
|
|
45
45
|
uses the derived filename slug; created and updated equal the date in
|
|
46
46
|
`reviewed_at`. Its lineage, run, mode, timestamp, accepted-bounds identity/hash,
|
|
47
47
|
and snapshot hash must agree with the JSON authority and recomputed evidence.
|
|
48
|
+
Prototype-sensitive frontmatter keys are malformed and are rejected before any
|
|
49
|
+
assignment. `reviewed_at` must name a real UTC calendar instant. Delivery
|
|
50
|
+
normalization requires a non-empty inclusive scope and delivery-goal identity;
|
|
51
|
+
governing-source normalization requires a non-empty source set.
|
|
48
52
|
|
|
49
53
|
The parsed JSON object is report authority. Detached objects, sidecars, and
|
|
50
|
-
caller-supplied derived identities are never trusted. It contains exactly these
|
|
54
|
+
caller-supplied derived identities are never trusted. It contains exactly these
|
|
55
|
+
fields:
|
|
51
56
|
|
|
52
57
|
- `review_lineage_id`
|
|
53
58
|
- `review_run_id`
|
|
@@ -60,8 +65,8 @@ caller-supplied derived identities are never trusted. It contains exactly these
|
|
|
60
65
|
- canonical `source_set_hash`
|
|
61
66
|
- an explicit outcome for Standards, skill adherence and scoped skills,
|
|
62
67
|
architecture, simplify, and Spec
|
|
63
|
-
- stable finding identifiers with severity, location, impact, evidence,
|
|
64
|
-
action
|
|
68
|
+
- stable finding identifiers with severity, location, impact, evidence,
|
|
69
|
+
action, and one `return_route`
|
|
65
70
|
- routing and validation
|
|
66
71
|
|
|
67
72
|
Delivery mode also records delivery-goal identity, review ordinal, and preceding
|
|
@@ -70,16 +75,23 @@ as null or not applicable.
|
|
|
70
75
|
|
|
71
76
|
`lens_outcomes` has exactly `standards`, `skill_adherence`, `architecture`,
|
|
72
77
|
`simplify`, and `spec`; each value is `clean` or `findings`. Every finding has
|
|
73
|
-
exactly
|
|
74
|
-
`action`. Finding IDs are unique, severity is `critical`,
|
|
75
|
-
`low`, and each lens outcome agrees with whether that lens
|
|
78
|
+
exactly the fields `id`, `lens`, `severity`, `location`, `impact`, `evidence`,
|
|
79
|
+
`action`, and `return_route`. Finding IDs are unique, severity is `critical`,
|
|
80
|
+
`high`, `medium`, or `low`, and each lens outcome agrees with whether that lens
|
|
81
|
+
has a finding. Each finding's `return_route` is exactly `debugging`,
|
|
82
|
+
`implementation`, `debt_follow_up`, or `docs_ingest`.
|
|
76
83
|
|
|
77
84
|
`routing` has exactly `primary` and `secondary_architecture_follow_up`.
|
|
78
85
|
`primary` is `debugging`, `implementation`, `debt_follow_up`, `docs_ingest`, or
|
|
79
|
-
`closeout`; the secondary flag is boolean.
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
86
|
+
`closeout`; the secondary flag is boolean. Aggregate routing is derived by the
|
|
87
|
+
public `deriveReviewRouting` helper from the complete finding set. Precedence is
|
|
88
|
+
`debugging` > `implementation` > `debt_follow_up` > `docs_ingest`; an empty set
|
|
89
|
+
derives `closeout`, and debt is secondary only beside debugging or
|
|
90
|
+
implementation. A supplied aggregate mismatch is invalid. `validation` is an
|
|
91
|
+
array of records with exactly command, isolation mode, before/after frozen
|
|
92
|
+
hashes, outcome, and evidence. Isolation is proven no-write, disposable
|
|
93
|
+
checkout, or disposable snapshot. Retained validation records require equal
|
|
94
|
+
before/after hashes.
|
|
83
95
|
|
|
84
96
|
Delivery ordinals are 1 through 3. Review 1 has null preceding-repair ordinal;
|
|
85
97
|
review 2 or 3 records respectively 1 or 2. Standalone delivery-goal identity,
|
|
@@ -117,12 +129,15 @@ evidence. A candidate is a valid retained pass only when every predicate holds:
|
|
|
117
129
|
snapshot hash, source-set hash, and deterministic report path equal values
|
|
118
130
|
recomputed from the canonical identity algorithm;
|
|
119
131
|
3. the outside-envelope report SHA-256 equals the exact retained report blob;
|
|
120
|
-
4.
|
|
132
|
+
4. bytes resolved from `reportCommitSha:reportPath` are exactly equal to the
|
|
133
|
+
local report bytes; the caller supplies them as `resolvedReportBytes`;
|
|
134
|
+
5. current accepted-bounds, normalized-target, and governing-source hashes still
|
|
121
135
|
equal the report values;
|
|
122
|
-
|
|
136
|
+
6. the report commit changed the report path and only repository-approved
|
|
123
137
|
report, navigation, and wiki-log envelope paths;
|
|
124
|
-
|
|
125
|
-
|
|
138
|
+
7. the approved retained ref contains that exact report commit with boolean
|
|
139
|
+
`true` containment evidence;
|
|
140
|
+
8. delivery ordinal is an integer from 1 through 3; standalone delivery-only
|
|
126
141
|
fields are null.
|
|
127
142
|
|
|
128
143
|
A malformed report, wrong lineage or run id, wrong blob or freshness hash,
|
|
@@ -8,7 +8,7 @@ and clean handoff.
|
|
|
8
8
|
| --- | --- | --- | --- | --- | --- | --- |
|
|
9
9
|
| Current delivery state | Review considered | Unsupported target | Delivery caller | Return `review_failed` | None; zero handoff or status writes | Exact target failure; no report |
|
|
10
10
|
| Current delivery state | Review considered | Invalid accepted bounds | Delivery caller | Return `review_failed` | None; zero handoff or status writes | Exact bounds failure; no report |
|
|
11
|
-
| `review_due` |
|
|
11
|
+
| `review_due` | Authorized review invocation | Delivery; accepted bounds and target valid; recovered `review_count < 3` | Delivery caller | `review_running` | Preallocate ordinal `review_count + 1`; no completed-pass change | Lineage, run id, ordinal, bounds identity/hash, normalized target |
|
|
12
12
|
| `review_due` | Explicit review invocation | Standalone; accepted bounds and target valid | Standalone caller | `review_running` | None | Lineage, run id, bounds identity/hash, normalized target |
|
|
13
13
|
| Current delivery state | Review considered | Delivery; in-memory accepted bounds and target valid; recovered `review_count >= 3` | Delivery caller | Return `review_budget_exhausted` | None; zero handoff or status writes | Exact current route, lineage, counters; no report or status mutation |
|
|
14
14
|
| `review_running` | All lenses and parent verification complete | One frozen snapshot; complete local report exists | `review-phase` | `report_retention_pending` | None; no completed-pass change | Complete report and fresh target/source hashes |
|
|
@@ -27,11 +27,17 @@ and clean handoff.
|
|
|
27
27
|
| `review_routed` | Readonly return | Standalone | Standalone caller | `review_complete` | None | Retained report output and route |
|
|
28
28
|
| `review_routed` | Resume debug route | Handoff already records run id, debug route, and `debug_active` | `delivery-phase` | `debug_active` | None | Existing atomic handoff; no guard fallthrough |
|
|
29
29
|
| `review_routed` | Resume implementation route | Handoff already records run id, implementation route, and `repair_active` | `delivery-phase` | `repair_active` | None | Existing atomic handoff; no guard fallthrough |
|
|
30
|
-
| `review_routed` |
|
|
31
|
-
| `review_routed` | Mixed
|
|
32
|
-
| `review_routed` |
|
|
33
|
-
| `review_routed` |
|
|
34
|
-
| `review_routed` | No-blocker route
|
|
30
|
+
| `review_routed` | Resume debt follow-up | Handoff already records run id, retained report, stable finding IDs, and `debt_follow_up` | Delivery review handoff | `debt_follow_up` | None | Existing debt keys and artifact; no duplicate capture |
|
|
31
|
+
| `review_routed` | Mixed finding route | Runtime evidence exists; derived primary route is `debugging`; secondary architecture follow-up is true; run id unrecorded | `delivery-phase` | `debt_follow_up` | None | Explicit finding routes, stable findings, post-debt route `debugging` |
|
|
32
|
+
| `review_routed` | Mixed finding route | No runtime evidence; derived primary route is `implementation`; secondary architecture follow-up is true; run id unrecorded | `delivery-phase` | `debt_follow_up` | None | Explicit finding routes, stable findings, post-debt route `implementation` |
|
|
33
|
+
| `review_routed` | Single repair route | Runtime evidence exists; derived primary route is `debugging`; no debt follow-up; run id unrecorded | `delivery-phase` | `debug_active` | Atomic handoff opens corresponding repair | Explicit finding routes, stable findings, atomic handoff |
|
|
34
|
+
| `review_routed` | Single repair route | No runtime evidence; in-scope non-runtime blocker exists; derived primary route is `implementation`; no debt follow-up; run id unrecorded | `delivery-phase` | `repair_active` | Atomic handoff opens corresponding repair | Explicit finding routes, stable findings, atomic handoff |
|
|
35
|
+
| `review_routed` | Finding route | Derived primary route is `debt_follow_up` | `delivery-phase` | `debt_follow_up` | None | Explicit debt routes, stable findings, post-debt route `docs_ingest` or `closeout` |
|
|
36
|
+
| `debt_follow_up` | Debt captured | Every debt key is present; `post_debt_route` is `debugging` | Delivery review handoff | `debug_active` | Open repair after capture exactly once | Retained report commit/path, stable finding IDs, artifact path, captured keys |
|
|
37
|
+
| `debt_follow_up` | Debt captured | Every debt key is present; `post_debt_route` is `implementation` | Delivery review handoff | `repair_active` | Open repair after capture exactly once | Retained report commit/path, stable finding IDs, artifact path, captured keys |
|
|
38
|
+
| `debt_follow_up` | Debt captured | Every debt key is present; `post_debt_route` is `docs_ingest` or `closeout` | Delivery review handoff | `docs_ingest` or `closeout` | None | Retained report commit/path, stable finding IDs, artifact path, captured keys |
|
|
39
|
+
| `review_routed` | Documentation-only findings | Derived primary route is `docs_ingest` | `delivery-phase` | `docs_ingest` | None | Explicit docs routes and stable findings |
|
|
40
|
+
| `review_routed` | Finding-free route | Finding set is empty | `delivery-phase` | `closeout` | None | Report and derived closeout route |
|
|
35
41
|
| `repair_active` or `debug_active` | Ordinary repair completes | `review_count < 3` | `delivery-phase` | `review_due` | None | Stale prior report, changed target identity, preserved counters |
|
|
36
42
|
| `repair_active` or `debug_active` | Fix 3 completes | `review_count = 3` and `repair_count = 3` | `delivery-phase` | `focused_validation` | None | Fix-3 changes and required focused validation |
|
|
37
43
|
| `focused_validation` | Focused validation fails | Repair epoch 3 remains open | `delivery-phase` | `repair_active` or `debug_active` | None; unchanged counters | Failed validation and recorded owning route |
|
|
@@ -52,6 +58,13 @@ already-consumed ordinals. Complete the transition only after the write. An
|
|
|
52
58
|
already recorded run ID resumes its active state without another increment and
|
|
53
59
|
cannot fall through to an unrecorded guard.
|
|
54
60
|
|
|
61
|
+
Debt capture is also idempotent. The retained report commit, report path, and
|
|
62
|
+
stable finding ID form one key in the goal/spec-linked debt artifact. Resume
|
|
63
|
+
reuses recorded keys, adds only missing keys, and follows durable
|
|
64
|
+
`post_debt_route` without implementing unaccepted debt. Secondary debt records
|
|
65
|
+
`debugging` or `implementation`; primary debt records `docs_ingest` or
|
|
66
|
+
`closeout`. Capture completes before the recorded route opens.
|
|
67
|
+
|
|
55
68
|
Review 1 may open fix 1, review 2 fix 2, and review 3 fix 3. Fix 3 never opens
|
|
56
69
|
review 4. A failed focused validation stays in repair epoch 3 until that same
|
|
57
70
|
validation passes.
|
|
@@ -6,7 +6,8 @@ composition, report, routing, and freshness contracts.
|
|
|
6
6
|
|
|
7
7
|
## Scope
|
|
8
8
|
|
|
9
|
-
Record
|
|
9
|
+
Record a non-empty, smallest certain inclusive scope in every review mode. A
|
|
10
|
+
zero-artifact bundle is not a review target. Full-repository expansion requires
|
|
10
11
|
an explicit caller request. Unsupported targets or invalid accepted bounds enter
|
|
11
12
|
`review_failed` with exact evidence, no report, and no counter change, including
|
|
12
13
|
when a delivery counter is already 3.
|