@punks/cli 3.1.10 → 3.1.11
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/dist/BASELINE_CHANGELOG.md +33 -0
- package/dist/CHANGELOG.md +30 -0
- package/dist/data/subagents/manifest.mjs +11 -6
- package/dist/index.js +29 -29
- package/dist/skills/agnostic/cli/hi-cli/references/post-command-flow.md +5 -0
- package/dist/skills/agnostic/planning/create-plan/REFERENCE.md +1 -1
- package/dist/skills/agnostic/planning/create-plan/SKILL.md +19 -7
- package/dist/skills/agnostic/planning/create-plan/references/plan-schema.md +19 -0
- package/dist/skills/agnostic/planning/create-plan/references/planner-task-graph.md +27 -10
- package/dist/skills/agnostic/planning/implement-spec/SKILL.md +6 -2
- package/dist/skills/agnostic/planning/implement-spec/assets/IMPLEMENTATION-NOTES-TEMPLATE.md +22 -6
- package/dist/skills/agnostic/planning/implement-spec/references/lifecycle.md +12 -0
- package/dist/skills/agnostic/planning/implement-spec/references/parallel-orchestration.md +10 -2
- package/dist/skills/agnostic/planning/implement-spec/references/parallel-worker-brief.md +10 -1
- package/dist/skills/agnostic/planning/implement-spec/references/parallel.md +2 -0
- package/dist/skills/agnostic/quality/autoreview/SKILL.md +11 -2
- package/dist/skills/agnostic/quality/review/SKILL.md +16 -11
- package/dist/skills/languages/python/python-backend-structure/SKILL.md +91 -0
- package/dist/skills/languages/python/python-backend-structure/agents/openai.yaml +4 -0
- package/dist/skills/languages/python/python-design-patterns/SKILL.md +93 -69
- package/dist/skills/languages/python/python-project-structure/SKILL.md +4 -247
- package/dist/skills/phases/delivery-phase/SKILL.md +13 -4
- package/dist/skills/phases/delivery-phase/phases/closeout.md +3 -0
- package/dist/skills/phases/delivery-phase/phases/debug.md +8 -1
- package/dist/skills/phases/delivery-phase/phases/implement.md +11 -2
- package/dist/skills/phases/delivery-phase/phases/review.md +50 -29
- package/dist/skills/phases/delivery-phase/phases/router.md +56 -36
- package/dist/skills/phases/delivery-phase/references/artifact-state.md +8 -2
- package/dist/skills/phases/delivery-phase/references/phase-handoff.md +60 -10
- package/dist/skills/phases/finder-phase/references/root-routing.md +6 -1
- package/dist/skills/phases/review-phase/REFERENCE.md +83 -145
- package/dist/skills/phases/review-phase/SKILL.md +41 -45
- package/dist/skills/phases/review-phase/agents/openai.yaml +2 -0
- package/dist/skills/phases/review-phase/references/durable-report.md +172 -0
- package/dist/skills/phases/review-phase/references/state-graph.md +69 -0
- package/dist/skills/phases/review-phase/references/targets.md +156 -0
- package/dist/skills/phases/review-phase/scripts/review-contract.mjs +819 -0
- package/package.json +9 -9
|
@@ -1,31 +1,52 @@
|
|
|
1
1
|
# Review Phase
|
|
2
2
|
|
|
3
|
-
Use
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
##
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
3
|
+
Use after implementation or whenever delivery has `review_due` for a stale or
|
|
4
|
+
missing retained review.
|
|
5
|
+
|
|
6
|
+
## Prepare Explicit Review
|
|
7
|
+
|
|
8
|
+
1. Validate accepted bounds and normalize a supported Git/diff target without
|
|
9
|
+
mutating it. Unsupported targets or invalid bounds enter `review_failed`
|
|
10
|
+
with exact evidence, no report, and no counter change.
|
|
11
|
+
2. Keep that result in memory and recover `review_count` from unique valid retained passes for the
|
|
12
|
+
delivery lineage and reconcile the handoff projection.
|
|
13
|
+
3. If recovered `review_count >= 3`, return `review_budget_exhausted` with exact
|
|
14
|
+
current-route evidence. This is a zero-write no-op: do not persist
|
|
15
|
+
`review_due` or mutate any handoff, counter, or delivery status.
|
|
16
|
+
4. Only when recovered `review_count < 3`, persist `review_due` with the valid
|
|
17
|
+
normalized target and exact explicit `$review-phase` invocation
|
|
18
|
+
context defined in the phase-handoff reference. Do not preallocate an ordinal
|
|
19
|
+
or derive `review_run_id` yet.
|
|
20
|
+
5. Return that invocation context and stop. Only an explicit operator invocation
|
|
21
|
+
of `$review-phase` consumes it, preallocates ordinal `review_count + 1`, fixes
|
|
22
|
+
`review_run_id`, and enters `review_running`.
|
|
23
|
+
|
|
24
|
+
For `report_retention_pending`, return an explicit `$review-phase` resume context
|
|
25
|
+
with the existing run id, local report identity, and fresh target/source hashes,
|
|
26
|
+
then stop. The explicit review invocation resumes retention without rerunning
|
|
27
|
+
lenses.
|
|
28
|
+
|
|
29
|
+
## Route Retained Findings
|
|
30
|
+
|
|
31
|
+
After the retained report establishes the completed ordinal:
|
|
32
|
+
|
|
33
|
+
1. Runtime evidence routes primarily to debugging.
|
|
34
|
+
2. Otherwise, an in-scope non-runtime blocker routes primarily to implementation.
|
|
35
|
+
3. Otherwise, broad architecture debt routes to debt follow-up.
|
|
36
|
+
4. Otherwise, route to docs ingest or closeout by documentation completeness.
|
|
37
|
+
|
|
38
|
+
Architecture debt may remain a secondary follow-up beside debugging or
|
|
39
|
+
implementation. Opening either repair route is one atomic durable handoff write
|
|
40
|
+
of active state, route, `repair_count = review_count`, and idempotency
|
|
41
|
+
`review_run_id`. Reject a mismatched or already-consumed repair ordinal.
|
|
42
|
+
Complete the transition only after that write. Resume an already-recorded run
|
|
43
|
+
directly without another increment.
|
|
44
|
+
|
|
45
|
+
## Completion
|
|
46
|
+
|
|
47
|
+
Before review, completion is a durable `review_due` handoff plus exact explicit
|
|
48
|
+
invocation context and a stop. After review returns `review_routed`, completion
|
|
49
|
+
records report path, report SHA-256, report commit SHA, verified retained ref,
|
|
50
|
+
lineage, run id, recovered/projected counts, stable finding ids, primary route,
|
|
51
|
+
secondary debt route when present, and resulting state. Then stop or re-enter
|
|
52
|
+
delivery routing.
|
|
@@ -1,48 +1,68 @@
|
|
|
1
1
|
# Router Phase
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
Choose one next phase from durable artifacts. Review counters and active repair
|
|
4
|
+
state take precedence over inferred artifact order.
|
|
5
5
|
|
|
6
|
-
## Inputs
|
|
6
|
+
## Inputs
|
|
7
7
|
|
|
8
|
-
-
|
|
9
|
-
-
|
|
10
|
-
-
|
|
11
|
-
-
|
|
8
|
+
- entry intent and accepted goal bounds
|
|
9
|
+
- matching spec, backlog projection, plan, implementation notes, and validation
|
|
10
|
+
- retained review reports plus durable phase handoff
|
|
11
|
+
- current diff/target and governing source hashes
|
|
12
|
+
- docs, stack, tracker, and PR state when relevant
|
|
12
13
|
|
|
13
|
-
##
|
|
14
|
+
## Route
|
|
14
15
|
|
|
15
|
-
1.
|
|
16
|
-
2.
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
16
|
+
1. Stop on unclear goal bounds and ask one concrete question.
|
|
17
|
+
2. For durable `review_due`, load [review.md](review.md). It first validates
|
|
18
|
+
accepted bounds and normalizes a supported target. A rejection enters
|
|
19
|
+
`review_failed` even when a persisted counter is 3. Only after those checks
|
|
20
|
+
may it recover `review_count` and evaluate the budget in memory. Exhaustion
|
|
21
|
+
returns `review_budget_exhausted` with zero handoff or status writes. A count
|
|
22
|
+
below 3 persists `review_due` and returns the exact explicit `$review-phase`
|
|
23
|
+
invocation context. Then stop. Delivery never enters `review_running` itself.
|
|
24
|
+
3. For `report_retention_pending`, load [review.md](review.md) only to return the
|
|
25
|
+
exact explicit `$review-phase` resume context, then stop. A fresh local report
|
|
26
|
+
resumes without rerunning lenses. Stop on terminal `review_failed` with its
|
|
27
|
+
exact evidence.
|
|
28
|
+
4. Otherwise recover review state by `review_lineage_id`: read the highest valid
|
|
29
|
+
retained ordinal, reconcile the handoff `review_count` projection, then assess
|
|
30
|
+
target and source freshness separately.
|
|
31
|
+
5. Route a fresh retained `review_routed` report through [review.md](review.md)
|
|
32
|
+
when no durable route handoff exists yet.
|
|
33
|
+
6. Resume an atomic handoff already in `debug_active` through [debug.md](debug.md)
|
|
34
|
+
or `repair_active` through [implement.md](implement.md). A recorded
|
|
35
|
+
`review_run_id` cannot increment `repair_count` again.
|
|
36
|
+
7. Route `focused_validation` to its recorded implementation or debugging owner.
|
|
37
|
+
Passing becomes `clean_handoff`; failure remains repair epoch 3.
|
|
38
|
+
8. Route `clean_handoff` to [docs-ingest.md](docs-ingest.md) when docs remain,
|
|
39
|
+
otherwise [closeout.md](closeout.md).
|
|
40
|
+
9. If no matching agent-ready `SPEC.md` exists, or it is stale,
|
|
41
|
+
contradictory, or incomplete, load [spec.md](spec.md).
|
|
42
|
+
10. If the verified post-spec backlog projection is missing or stale, load
|
|
43
|
+
[backlog.md](backlog.md).
|
|
44
|
+
11. If no execution-ready matching plan exists, or it lacks dependencies, owned
|
|
45
|
+
paths, validation gates, or wave boundaries, load [plan.md](plan.md).
|
|
46
|
+
12. If accepted plan work is incomplete, load [implement.md](implement.md).
|
|
47
|
+
13. If implementation exists and its retained review is missing or stale, load
|
|
48
|
+
[review.md](review.md). That phase validates accepted bounds and normalizes a
|
|
49
|
+
supported target before any delivery-budget evaluation, then returns either
|
|
50
|
+
`review_failed`, `review_budget_exhausted`, or the exact explicit
|
|
51
|
+
`$review-phase` invocation context and stops.
|
|
52
|
+
14. Route remaining docs-affecting work to [docs-ingest.md](docs-ingest.md),
|
|
53
|
+
otherwise [closeout.md](closeout.md).
|
|
27
54
|
|
|
28
|
-
|
|
55
|
+
Only an explicitly new delivery goal with materially changed accepted bounds
|
|
56
|
+
creates a new lineage and resets review/repair counters. Same-goal bounds
|
|
57
|
+
revision, resume, rebase, commit, retry, and handoff preserve them.
|
|
29
58
|
|
|
30
|
-
|
|
31
|
-
gate. When requested, route only the requested phase and stop after writing its
|
|
32
|
-
phase handoff. On resume, an agent-ready `SPEC.md` proceeds directly to the next
|
|
33
|
-
applicable phase; no reviewed or approved status is required.
|
|
59
|
+
## HITL And Resume
|
|
34
60
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
skills. Verify artifact freshness; do not re-run a phase only because
|
|
39
|
-
`delivery-phase` did not run it.
|
|
61
|
+
A HITL checkpoint is explicit user control. Run only the requested phase and
|
|
62
|
+
stop after its handoff. Earlier phases may have completed through direct skills;
|
|
63
|
+
reuse fresh matching artifacts rather than rerunning them.
|
|
40
64
|
|
|
41
65
|
## Output
|
|
42
66
|
|
|
43
|
-
Report
|
|
44
|
-
|
|
45
|
-
- selected phase
|
|
46
|
-
- evidence that selected it
|
|
47
|
-
- child skill or phase file to load next
|
|
48
|
-
- blocker question if no phase can be selected safely
|
|
67
|
+
Report the selected state and phase, the durable evidence that selected it, the
|
|
68
|
+
next file or child skill, and any exact blocker.
|
|
@@ -30,8 +30,14 @@ Use this reference when deciding whether a phase is complete enough to skip.
|
|
|
30
30
|
|
|
31
31
|
## Review Complete
|
|
32
32
|
|
|
33
|
-
-
|
|
34
|
-
|
|
33
|
+
- A fresh immutable report matches the delivery lineage, accepted bounds,
|
|
34
|
+
normalized target, governing source hashes, and latest implementation state.
|
|
35
|
+
- Its commit exists on a verified retained ref; a local report alone is pending.
|
|
36
|
+
- The highest valid retained ordinal is authoritative and the handoff
|
|
37
|
+
`review_count` is its reconciled projection.
|
|
38
|
+
- Findings are routed by stable ids. Review itself entered no repair state.
|
|
39
|
+
- After fix 3, `clean_handoff` supersedes the normal fresh-review requirement
|
|
40
|
+
and links report 3, final changes, focused validation, and clean status.
|
|
35
41
|
|
|
36
42
|
## Debug Complete
|
|
37
43
|
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
# Phase Handoff
|
|
2
2
|
|
|
3
|
-
Each phase
|
|
4
|
-
resume without guessing.
|
|
3
|
+
Each phase leaves enough durable state for resume without guessing.
|
|
5
4
|
|
|
6
|
-
##
|
|
5
|
+
## Base Shape
|
|
7
6
|
|
|
8
7
|
```text
|
|
9
8
|
Phase:
|
|
@@ -17,11 +16,62 @@ Next suggested route:
|
|
|
17
16
|
Blockers:
|
|
18
17
|
```
|
|
19
18
|
|
|
20
|
-
|
|
19
|
+
State only what ran. Prefer durable artifact paths/links. Carry approved
|
|
20
|
+
artifacts and UI evidence. Give every skip an exact no-op reason. Honor explicit
|
|
21
|
+
HITL stops.
|
|
21
22
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
23
|
+
## Review And Repair Projection
|
|
24
|
+
|
|
25
|
+
For a delivery goal with review activity, also persist:
|
|
26
|
+
|
|
27
|
+
```text
|
|
28
|
+
delivery_goal_identity:
|
|
29
|
+
accepted_bounds_identity:
|
|
30
|
+
accepted_bounds_hash:
|
|
31
|
+
review_lineage_id:
|
|
32
|
+
review_run_id:
|
|
33
|
+
state: review_due | review_running | report_retention_pending | review_routed | debug_active | repair_active | focused_validation | clean_handoff
|
|
34
|
+
primary_route:
|
|
35
|
+
review_count:
|
|
36
|
+
repair_count:
|
|
37
|
+
authoritative_report_path:
|
|
38
|
+
authoritative_report_commit:
|
|
39
|
+
verified_retained_ref:
|
|
40
|
+
stable_finding_ids:
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
`review_count` is a projection of the highest valid retained report ordinal for
|
|
44
|
+
the lineage. Reconcile it on resume. An opening repair transition atomically
|
|
45
|
+
writes active state, primary route, `repair_count = review_count`, and
|
|
46
|
+
idempotency `review_run_id`; complete the transition only after the write. A
|
|
47
|
+
recorded run id resumes its state without increment or guard fallthrough.
|
|
48
|
+
|
|
49
|
+
## Explicit Review Invocation Context
|
|
50
|
+
|
|
51
|
+
Delivery persists this block for `review_due` and returns it unchanged before
|
|
52
|
+
stopping:
|
|
53
|
+
|
|
54
|
+
```text
|
|
55
|
+
explicit_operator_invocation_required: true
|
|
56
|
+
review_invocation_skill: $review-phase
|
|
57
|
+
review_invocation_mode: delivery
|
|
58
|
+
delivery_goal_identity:
|
|
59
|
+
accepted_bounds_identity:
|
|
60
|
+
accepted_bounds_hash:
|
|
61
|
+
review_lineage_id:
|
|
62
|
+
recovered_review_count:
|
|
63
|
+
current_route:
|
|
64
|
+
normalized_target:
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
The `review_due` handoff leaves `review_run_id` unset. Only the explicit operator
|
|
68
|
+
invocation consumes this context, preallocates the next ordinal, fixes the run
|
|
69
|
+
id, and enters `review_running`.
|
|
70
|
+
|
|
71
|
+
For `report_retention_pending`, the explicit resume context additionally carries
|
|
72
|
+
the existing `review_run_id`, ordinal, local report path and SHA-256, target hash,
|
|
73
|
+
source hashes, and intended retained ref. Delivery returns it and stops; the
|
|
74
|
+
operator invokes `$review-phase` to retry retention without rerunning lenses.
|
|
75
|
+
|
|
76
|
+
After fix 3, `clean_handoff` is final authority. Link immutable review 3, final
|
|
77
|
+
changes, the same passing focused validation, and clean status.
|
|
@@ -15,7 +15,8 @@ Keep root prompt guidance short:
|
|
|
15
15
|
- Unclear requirements inside a bounded topic route to `requirements-phase`.
|
|
16
16
|
- Accepted specs, issues, or plans route to `delivery-phase`.
|
|
17
17
|
- Runtime failures route to `debugging-phase`.
|
|
18
|
-
-
|
|
18
|
+
- Review requests persist the bounded target and accepted-bounds context, then
|
|
19
|
+
point the operator to the exact explicit `$review-phase` invocation.
|
|
19
20
|
- Docs learning after proven changes routes to `docs-ingest-phase`.
|
|
20
21
|
|
|
21
22
|
## Boundary
|
|
@@ -28,3 +29,7 @@ Keep root prompt guidance short:
|
|
|
28
29
|
- `create-spec`, `create-plan`, or `delivery-phase` after implementation scope is accepted.
|
|
29
30
|
|
|
30
31
|
It chooses the route and updates the frontier handoff.
|
|
32
|
+
|
|
33
|
+
`finder-phase`, root routing, and `delivery-phase` never invoke, delegate to, or
|
|
34
|
+
model-select `review-phase`. They may only persist its input context, return the
|
|
35
|
+
exact explicit `$review-phase` instruction, and stop.
|
|
@@ -1,147 +1,85 @@
|
|
|
1
1
|
# Review Phase Reference
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
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
|
-
- Serious grill sessions pair `references/grilling-flow.md` with
|
|
88
|
-
`references/artifact-output.md`.
|
|
89
|
-
- Before each round is yielded, it is persisted with stable question ids,
|
|
90
|
-
prerequisites, and the current frontier, with a stable mapping between live
|
|
91
|
-
questions and the routed log/status artifacts.
|
|
92
|
-
- Each response set is processed answer by answer; partially answered rounds
|
|
93
|
-
preserve omitted questions as unanswered and carry them forward.
|
|
94
|
-
- Status is updated after each response set, and branch percentages agree with
|
|
95
|
-
the unanswered-question and shared-understanding confirmation fields.
|
|
96
|
-
- Routed grill log/status artifacts are created or updated when grilling
|
|
97
|
-
decisions, branches, parked scope, percentages, glossary, axioms, or
|
|
98
|
-
ambiguities change.
|
|
99
|
-
- Glossary, axiom, and status updates preserve current meaning while the
|
|
100
|
-
log records accepted decisions and superseded decisions.
|
|
101
|
-
- Added or renamed wiki grill artifacts update routed metadata/bookkeeping:
|
|
102
|
-
`content/docs/project/grilling/meta.json`, section index when missing,
|
|
103
|
-
and wiki `log.md` when the repo maintains one.
|
|
104
|
-
- After `$grilling` completes, downstream handoff evidence exists as
|
|
105
|
-
applicable: wiki synthesis, backlog/user stories, spec, or phase handoff
|
|
106
|
-
carrying accepted decisions and recorded scope state.
|
|
107
|
-
|
|
108
|
-
Missing inner-flow or durable-artifact evidence is a review finding when
|
|
109
|
-
the wrapper promised grill behavior.
|
|
110
|
-
|
|
111
|
-
## Findings Policy
|
|
112
|
-
|
|
113
|
-
Prioritize bugs, regressions, broken contracts, missing validation, unsafe
|
|
114
|
-
assumptions, and user-facing risks. Include file and line references when
|
|
115
|
-
available. Separate blocking findings from improvements and optional cleanup.
|
|
116
|
-
|
|
117
|
-
Do not edit code in standalone mode unless the user explicitly asks after
|
|
118
|
-
seeing the review scope. Do not use `simplify` as permission to refactor.
|
|
119
|
-
|
|
120
|
-
Do not flatten scoped `AGENTS.md` guidance into generic advice; cite the
|
|
121
|
-
concrete constraint. Do not skip scoped skills from `AGENTS.md` prompts.
|
|
122
|
-
|
|
123
|
-
Do not run mutating stack commands in review. `review-phase` reports stack
|
|
124
|
-
evidence only; delivery owns `stack sync`.
|
|
125
|
-
|
|
126
|
-
## Output Checklist
|
|
127
|
-
|
|
128
|
-
Lead with findings, ordered by severity. For each finding include:
|
|
129
|
-
|
|
130
|
-
- severity
|
|
131
|
-
- file/line or artifact reference
|
|
132
|
-
- issue and impact
|
|
133
|
-
- evidence
|
|
134
|
-
- recommended action
|
|
135
|
-
|
|
136
|
-
Then include:
|
|
137
|
-
|
|
138
|
-
- open questions or assumptions
|
|
139
|
-
- validation run and result
|
|
140
|
-
- exact `autoreview` command and clean/accepted-findings result
|
|
141
|
-
- fixed point, Spec source or skipped reason, Standards sources
|
|
142
|
-
- scoped `AGENTS.md` files and mandatory scoped skills checked
|
|
143
|
-
- short summary after findings
|
|
144
|
-
- mode: standalone readonly review or delivery-owned review
|
|
145
|
-
|
|
146
|
-
If there are no findings, say so clearly and still report validation coverage
|
|
147
|
-
and residual risk.
|
|
3
|
+
Load [references/targets.md](references/targets.md) for target normalization,
|
|
4
|
+
identity, or resume. Load
|
|
5
|
+
[references/state-graph.md](references/state-graph.md) for delivery budget,
|
|
6
|
+
failure, retention, routing, repair, or final-fix behavior. Load
|
|
7
|
+
[references/durable-report.md](references/durable-report.md) before writing or
|
|
8
|
+
retaining a report.
|
|
9
|
+
|
|
10
|
+
## One All-Lens Run
|
|
11
|
+
|
|
12
|
+
Evaluate exactly one frozen bounded snapshot per completed invocation.
|
|
13
|
+
|
|
14
|
+
1. Run `autoreview` exactly once as advisory candidate generation. A ClawPatch
|
|
15
|
+
helper, when present, stays inside that call and consumes no additional pass.
|
|
16
|
+
2. The parent verifies all advisory candidates against the frozen target and
|
|
17
|
+
adjacent evidence. Only verified candidates become findings.
|
|
18
|
+
3. Dispatch independent lenses against the same snapshot in parallel:
|
|
19
|
+
- Standards
|
|
20
|
+
- skill adherence and scoped skills
|
|
21
|
+
- architecture
|
|
22
|
+
- simplify
|
|
23
|
+
- Spec
|
|
24
|
+
4. Record an explicit outcome for every lens. Standards and skill adherence,
|
|
25
|
+
architecture, simplify, then Spec controls presentation and triage order
|
|
26
|
+
only. Parallel execution is unchanged. Standards and Spec stay distinct
|
|
27
|
+
report sections without cross-axis merging or reranking.
|
|
28
|
+
|
|
29
|
+
The `review` skill supplies separate Standards and Spec checks. Apply
|
|
30
|
+
`improve-codebase-architecture`, `simplify`, the nearest `AGENTS.md`, and every
|
|
31
|
+
named scoped skill as their own bounded lenses.
|
|
32
|
+
|
|
33
|
+
## Skill-Adherence Lens
|
|
34
|
+
|
|
35
|
+
Treat `assigned_skills` as planning provenance. For every implementation task:
|
|
36
|
+
|
|
37
|
+
1. Match every implementation-applicable `assigned_skills` item to exactly one
|
|
38
|
+
`implementation_skill_guidance` entry.
|
|
39
|
+
2. Match every guidance entry to exactly one `IMPLEMENTATION-NOTES.md` evidence
|
|
40
|
+
record.
|
|
41
|
+
3. Check evidence cardinality and every record, including `not_applicable`,
|
|
42
|
+
against frozen changed artifacts and the cited how/where location.
|
|
43
|
+
4. Report missing, extra, or contradicted claims as a skill-adherence finding.
|
|
44
|
+
|
|
45
|
+
When a requirements or design wrapper claims grilling behavior, verify its
|
|
46
|
+
named guidance, routed log/status artifacts, stable question mapping, carried
|
|
47
|
+
unanswered questions, and downstream synthesis evidence instead of accepting
|
|
48
|
+
the wrapper claim alone.
|
|
49
|
+
|
|
50
|
+
## Validation Boundary
|
|
51
|
+
|
|
52
|
+
Run the smallest safe readonly validation needed to verify candidates or
|
|
53
|
+
governing acceptance evidence. Broader checks run only when the accepted spec
|
|
54
|
+
or plan explicitly requires them. Missing required RED/GREEN evidence becomes
|
|
55
|
+
a reported and routed finding; review never creates that evidence.
|
|
56
|
+
|
|
57
|
+
Before every validation command, record the frozen-target hash. A command may
|
|
58
|
+
run against the reviewed checkout only when its no-write mode is proven. Run any
|
|
59
|
+
command that may write caches, generated files, snapshots, lockfiles, or other
|
|
60
|
+
state in a disposable checkout or snapshot rooted at the frozen revision.
|
|
61
|
+
|
|
62
|
+
Always recompute and compare the frozen-target hash after validation. A mismatch
|
|
63
|
+
invalidates the run and any local report, returns `review_due` with exact
|
|
64
|
+
mutation evidence, and consumes no pass. Record exact commands, isolation mode,
|
|
65
|
+
before/after hashes, sources, skipped checks, and residual risk. Keep this
|
|
66
|
+
validation bounded; isolation is a safety boundary, not permission to broaden
|
|
67
|
+
the test surface.
|
|
68
|
+
|
|
69
|
+
Use the executable before/after decision in
|
|
70
|
+
[`scripts/review-contract.mjs`](scripts/review-contract.mjs); mutation returns
|
|
71
|
+
`review_due` and consumes no pass.
|
|
72
|
+
|
|
73
|
+
## Finding And Route Output
|
|
74
|
+
|
|
75
|
+
Every stable finding records severity, location, impact, evidence, and action.
|
|
76
|
+
Determine route precedence from verified evidence:
|
|
77
|
+
|
|
78
|
+
1. runtime evidence: debugging
|
|
79
|
+
2. otherwise, an in-scope non-runtime blocker: implementation
|
|
80
|
+
3. otherwise, broad architecture debt: debt follow-up
|
|
81
|
+
4. otherwise: documentation ingest or closeout by documentation completeness
|
|
82
|
+
|
|
83
|
+
Broad architecture debt may accompany debugging or implementation as a
|
|
84
|
+
secondary follow-up. Review returns this routing output and stops. Delivery
|
|
85
|
+
owns route mutation and repairs.
|