@punks/cli 3.1.10 → 3.1.12
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 +61 -0
- package/dist/CHANGELOG.md +57 -0
- package/dist/data/subagents/manifest.mjs +11 -6
- package/dist/index.js +28 -28
- package/dist/skills/agnostic/cli/hi-cli/references/post-command-flow.md +5 -0
- package/dist/skills/agnostic/docs/writing-beats/LICENSE +21 -0
- package/dist/skills/agnostic/docs/writing-beats/UPSTREAM.md +11 -0
- package/dist/skills/agnostic/docs/writing-fragments/LICENSE +21 -0
- package/dist/skills/agnostic/docs/writing-fragments/UPSTREAM.md +11 -0
- package/dist/skills/agnostic/docs/writing-shape/LICENSE +21 -0
- package/dist/skills/agnostic/docs/writing-shape/UPSTREAM.md +11 -0
- package/dist/skills/agnostic/frontend/frontend-domain-structure/SKILL.md +24 -42
- package/dist/skills/agnostic/frontend/frontend-domain-structure/agents/openai.yaml +1 -1
- package/dist/skills/agnostic/frontend/frontend-domain-structure/references/react/structure.md +51 -78
- package/dist/skills/agnostic/frontend/frontend-domain-structure/references/structure.md +89 -212
- package/dist/skills/agnostic/generic/handoff/LICENSE +21 -0
- package/dist/skills/agnostic/generic/handoff/UPSTREAM.md +11 -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/codebase-design/LICENSE +21 -0
- package/dist/skills/agnostic/quality/codebase-design/UPSTREAM.md +11 -0
- package/dist/skills/agnostic/quality/review/LICENSE +21 -0
- package/dist/skills/agnostic/quality/review/SKILL.md +16 -11
- package/dist/skills/agnostic/quality/review/UPSTREAM.md +11 -0
- package/dist/skills/agnostic/quality/tdd/LICENSE +21 -0
- package/dist/skills/agnostic/quality/tdd/UPSTREAM.md +11 -0
- package/dist/skills/agnostic/research/improve-codebase-architecture/LICENSE +21 -0
- package/dist/skills/agnostic/research/improve-codebase-architecture/UPSTREAM.md +11 -0
- package/dist/skills/frameworks/effect/effect/SKILL.md +5 -12
- package/dist/skills/frameworks/effect/effect/references/CONFIG.md +10 -19
- package/dist/skills/frameworks/effect/effect/references/SERVICES_LAYERS.md +3 -63
- package/dist/skills/frameworks/effect/effect/references/TESTING.md +2 -72
- package/dist/skills/frameworks/effect/effect-backend-structure/SKILL.md +12 -29
- package/dist/skills/frameworks/effect/effect-backend-structure/agents/openai.yaml +1 -1
- package/dist/skills/frameworks/effect/effect-backend-structure/references/layout.md +9 -9
- package/dist/skills/frameworks/sqlalchemy/sqlalchemy-schema-design/SKILL.md +199 -0
- package/dist/skills/frameworks/sqlalchemy/sqlalchemy-schema-design/UPSTREAM.md +31 -0
- package/dist/skills/frameworks/sqlalchemy/sqlalchemy-schema-design/agents/openai.yaml +4 -0
- 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/prototype-phase/agents/openai.yaml +2 -0
- package/dist/skills/phases/review-phase/AUTHORING-HANDOFF.md +622 -0
- package/dist/skills/phases/review-phase/SKILL.md +11 -42
- package/dist/skills/phases/review-phase/agents/openai.yaml +2 -0
- package/dist/skills/phases/review-phase/phases/prepare-review.md +105 -0
- package/dist/skills/phases/review-phase/phases/retain-report.md +113 -0
- package/dist/skills/phases/review-phase/phases/return-route.md +95 -0
- package/dist/skills/phases/review-phase/phases/router.md +78 -0
- package/dist/skills/phases/review-phase/phases/run-review.md +128 -0
- package/dist/skills/phases/review-phase/references/durable-report.md +153 -0
- package/dist/skills/phases/review-phase/references/runtime-handoff.md +138 -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 +56 -2
- package/dist/skills/phases/review-phase/REFERENCE.md +0 -147
|
@@ -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.
|