@punks/cli 3.3.3 → 3.3.5
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 -1
- package/dist/BASELINE_CHANGELOG.md +10 -3
- package/dist/CHANGELOG.md +13 -1
- package/dist/baseline/scaffold-baseline/baseline.json +5 -5
- package/dist/baseline/scaffold-baseline/data/catalog/lint-assets.json +0 -5
- package/dist/baseline/scaffold-baseline/data/catalog/packs.json +2 -1
- package/dist/baseline/scaffold-baseline/data/catalog/skills.json +16 -0
- package/dist/baseline/scaffold-baseline/skills/agnostic/backend/backend-domain-structure/SKILL.md +3 -1
- package/dist/baseline/scaffold-baseline/skills/agnostic/backend/backend-domain-structure/references/layout.md +14 -1
- package/dist/baseline/scaffold-baseline/skills/agnostic/docs/write-graph-based-skills/AUTHORING-HANDOFF.md +12 -0
- package/dist/baseline/scaffold-baseline/skills/agnostic/docs/write-graph-based-skills/SKILL.md +84 -0
- package/dist/baseline/scaffold-baseline/skills/agnostic/docs/write-graph-based-skills/agents/openai.yaml +4 -0
- package/dist/baseline/scaffold-baseline/skills/agnostic/docs/write-graph-based-skills/phases/audit.md +33 -0
- package/dist/baseline/scaffold-baseline/skills/agnostic/docs/write-graph-based-skills/phases/define-authority.md +26 -0
- package/dist/baseline/scaffold-baseline/skills/agnostic/docs/write-graph-based-skills/phases/define-handoffs.md +34 -0
- package/dist/baseline/scaffold-baseline/skills/agnostic/docs/write-graph-based-skills/phases/model-state.md +30 -0
- package/dist/baseline/scaffold-baseline/skills/agnostic/docs/write-graph-based-skills/phases/qualify.md +27 -0
- package/dist/baseline/scaffold-baseline/skills/agnostic/docs/write-graph-based-skills/phases/router.md +36 -0
- package/dist/baseline/scaffold-baseline/skills/agnostic/docs/write-graph-based-skills/phases/test-routes.md +33 -0
- package/dist/baseline/scaffold-baseline/skills/agnostic/docs/write-graph-based-skills/phases/verify-disclosure.md +28 -0
- package/dist/baseline/scaffold-baseline/skills/agnostic/docs/write-graph-based-skills/phases/write-phases.md +33 -0
- package/dist/baseline/scaffold-baseline/skills/agnostic/docs/write-graph-based-skills/phases/write-router.md +30 -0
- package/dist/baseline/scaffold-baseline/skills/agnostic/docs/write-graph-based-skills/references/authoring-contract.md +226 -0
- package/dist/baseline/scaffold-baseline/skills/agnostic/generic/handback/SKILL.md +27 -0
- package/dist/baseline/scaffold-baseline/skills/agnostic/quality/autoreview/SKILL.md +9 -4
- package/dist/baseline/scaffold-baseline/skills/frameworks/effect/effect-backend-structure/SKILL.md +20 -10
- package/dist/baseline/scaffold-baseline/skills/frameworks/effect/effect-backend-structure/references/layout.md +38 -2
- package/dist/baseline/scaffold-baseline/skills/phases/debugging-phase/SKILL.md +6 -5
- package/dist/baseline/scaffold-baseline/skills/phases/delivery-phase/SKILL.md +5 -1
- package/dist/baseline/scaffold-baseline/skills/phases/delivery-phase/phases/debug.md +2 -2
- package/dist/baseline/scaffold-baseline/skills/phases/delivery-phase/phases/handback.md +23 -0
- package/dist/baseline/scaffold-baseline/skills/phases/delivery-phase/phases/implement.md +2 -0
- package/dist/baseline/scaffold-baseline/skills/phases/delivery-phase/phases/review.md +6 -4
- package/dist/baseline/scaffold-baseline/skills/phases/delivery-phase/phases/router.md +25 -19
- package/dist/baseline/scaffold-baseline/skills/phases/delivery-phase/references/phase-handoff.md +6 -2
- package/dist/baseline/scaffold-baseline/skills/phases/review-phase/phases/return-route.md +14 -9
- package/dist/baseline/scaffold-baseline/skills/phases/review-phase/phases/router.md +15 -13
- package/dist/baseline/scaffold-baseline/skills/phases/review-phase/phases/run-review.md +3 -2
- package/dist/baseline/scaffold-baseline/skills/phases/review-phase/references/durable-report.md +15 -12
- package/dist/baseline/scaffold-baseline/skills/phases/review-phase/references/runtime-handoff.md +2 -2
- package/dist/baseline/scaffold-baseline/skills/phases/review-phase/references/state-graph.md +5 -1
- package/dist/baseline/scaffold-baseline/skills/phases/review-phase/scripts/review-contract.mjs +15 -4
- package/dist/baseline/scaffold-baseline.json +5 -5
- package/dist/baseline/scaffold-baseline.tgz +0 -0
- package/dist/data/AGENTS.md +1 -0
- package/dist/data/shared-agents.md +113 -0
- package/dist/index.js +76 -68
- package/dist/skills/agnostic/backend/backend-domain-structure/SKILL.md +3 -1
- package/dist/skills/agnostic/backend/backend-domain-structure/references/layout.md +14 -1
- package/dist/skills/agnostic/docs/write-graph-based-skills/AUTHORING-HANDOFF.md +12 -0
- package/dist/skills/agnostic/docs/write-graph-based-skills/SKILL.md +84 -0
- package/dist/skills/agnostic/docs/write-graph-based-skills/agents/openai.yaml +4 -0
- package/dist/skills/agnostic/docs/write-graph-based-skills/phases/audit.md +33 -0
- package/dist/skills/agnostic/docs/write-graph-based-skills/phases/define-authority.md +26 -0
- package/dist/skills/agnostic/docs/write-graph-based-skills/phases/define-handoffs.md +34 -0
- package/dist/skills/agnostic/docs/write-graph-based-skills/phases/model-state.md +30 -0
- package/dist/skills/agnostic/docs/write-graph-based-skills/phases/qualify.md +27 -0
- package/dist/skills/agnostic/docs/write-graph-based-skills/phases/router.md +36 -0
- package/dist/skills/agnostic/docs/write-graph-based-skills/phases/test-routes.md +33 -0
- package/dist/skills/agnostic/docs/write-graph-based-skills/phases/verify-disclosure.md +28 -0
- package/dist/skills/agnostic/docs/write-graph-based-skills/phases/write-phases.md +33 -0
- package/dist/skills/agnostic/docs/write-graph-based-skills/phases/write-router.md +30 -0
- package/dist/skills/agnostic/docs/write-graph-based-skills/references/authoring-contract.md +211 -0
- package/dist/skills/agnostic/generic/handback/SKILL.md +27 -0
- package/dist/skills/agnostic/quality/autoreview/SKILL.md +9 -4
- package/dist/skills/frameworks/effect/effect-backend-structure/SKILL.md +20 -10
- package/dist/skills/frameworks/effect/effect-backend-structure/references/layout.md +38 -2
- package/dist/skills/phases/debugging-phase/SKILL.md +6 -5
- package/dist/skills/phases/delivery-phase/SKILL.md +5 -1
- package/dist/skills/phases/delivery-phase/phases/debug.md +2 -2
- package/dist/skills/phases/delivery-phase/phases/handback.md +23 -0
- package/dist/skills/phases/delivery-phase/phases/implement.md +2 -0
- package/dist/skills/phases/delivery-phase/phases/review.md +6 -4
- package/dist/skills/phases/delivery-phase/phases/router.md +23 -17
- package/dist/skills/phases/delivery-phase/references/phase-handoff.md +6 -2
- package/dist/skills/phases/review-phase/phases/return-route.md +14 -9
- package/dist/skills/phases/review-phase/phases/router.md +15 -13
- package/dist/skills/phases/review-phase/phases/run-review.md +3 -2
- package/dist/skills/phases/review-phase/references/durable-report.md +10 -8
- package/dist/skills/phases/review-phase/references/runtime-handoff.md +2 -2
- package/dist/skills/phases/review-phase/references/state-graph.md +5 -1
- package/dist/skills/phases/review-phase/scripts/review-contract.mjs +2 -0
- package/package.json +1 -1
|
@@ -33,27 +33,30 @@ debug, debt, documentation, or closeout work.
|
|
|
33
33
|
immutable authority block inside those retained bytes.
|
|
34
34
|
2. Pass the complete retained finding set to the public `deriveReviewRouting`
|
|
35
35
|
helper. Each non-empty finding already carries one validated `return_route`.
|
|
36
|
-
The helper applies `
|
|
37
|
-
`docs_ingest`; an empty set returns
|
|
36
|
+
The helper applies `human_steering_required` > `debugging` >
|
|
37
|
+
`implementation` > `debt_follow_up` > `docs_ingest`; an empty set returns
|
|
38
|
+
`closeout`.
|
|
38
39
|
3. Accept `secondary_architecture_follow_up` only when a `debt_follow_up`
|
|
39
40
|
finding accompanies a higher-priority debugging or implementation route.
|
|
40
41
|
4. Require the derived result to equal the retained report's `routing` object.
|
|
41
42
|
A mismatch is invalid retained routing evidence and routes to
|
|
42
43
|
`review_failed`.
|
|
43
|
-
5.
|
|
44
|
-
|
|
45
|
-
|
|
44
|
+
5. If the primary route is `human_steering_required`, invoke `$handback`, write
|
|
45
|
+
its durable outcome, and stop.
|
|
46
|
+
6. Otherwise write returned routing evidence containing the immutable report
|
|
47
|
+
identity, stable finding IDs, primary route, optional architecture follow-up,
|
|
48
|
+
and validation summary. Delivery returns `review_routed`; standalone returns
|
|
46
49
|
`review_complete`.
|
|
47
50
|
|
|
48
51
|
## Invariants
|
|
49
52
|
|
|
50
53
|
- Findings and routing come strictly from the retained report. Current delivery
|
|
51
54
|
state, caller preference, and later unreviewed changes cannot rerank them.
|
|
52
|
-
-
|
|
53
|
-
|
|
55
|
+
- Human steering outranks runtime, implementation, debt, documentation, and
|
|
56
|
+
closeout.
|
|
54
57
|
- The retained report and reviewed target remain readonly.
|
|
55
|
-
- This gate writes routing evidence only. Delivery owns any later
|
|
56
|
-
mutation and every repair counter or active repair state.
|
|
58
|
+
- This gate writes routing or `$handback` evidence only. Delivery owns any later
|
|
59
|
+
route mutation and every repair counter or active repair state.
|
|
57
60
|
- One return does not invoke review again, run validation again, create review
|
|
58
61
|
4, or enter repair.
|
|
59
62
|
|
|
@@ -71,6 +74,8 @@ debug, debt, documentation, or closeout work.
|
|
|
71
74
|
explicit delivery resume.
|
|
72
75
|
- `review_complete`: standalone routing evidence is durable and review is
|
|
73
76
|
complete.
|
|
77
|
+
- `human_steering_required`: the `$handback` outcome is durable and expanded
|
|
78
|
+
repair awaits that skill's authority guard.
|
|
74
79
|
- `report_retention_pending`: retained containment or blob evidence became
|
|
75
80
|
temporarily unverifiable; retry retention without rerunning lenses.
|
|
76
81
|
- `review_due`: target, bounds, or governing sources are no longer fresh for
|
|
@@ -43,18 +43,19 @@ output.
|
|
|
43
43
|
|
|
44
44
|
| Priority | Current evidence | Output |
|
|
45
45
|
| --- | --- | --- |
|
|
46
|
-
| 1 |
|
|
47
|
-
| 2 |
|
|
48
|
-
| 3 |
|
|
49
|
-
| 4 |
|
|
50
|
-
| 5 |
|
|
51
|
-
| 6 |
|
|
52
|
-
| 7 |
|
|
53
|
-
| 8 | A valid retained
|
|
54
|
-
| 9 |
|
|
55
|
-
| 10 |
|
|
56
|
-
| 11 |
|
|
57
|
-
| 12 | Fresh `
|
|
46
|
+
| 1 | Durable `human_steering_required` while the `$handback` authority guard fails | terminal `human_steering_required` |
|
|
47
|
+
| 2 | Unsupported target, invalid accepted bounds, non-retryable contract or infrastructure failure, malformed active retention candidate, or `same_run_conflict` | terminal `review_failed` |
|
|
48
|
+
| 3 | Delivery entry is otherwise valid, recovered `review_count >= 3`, and no already-started run has valid predecessor evidence | terminal `review_budget_exhausted` |
|
|
49
|
+
| 4 | A repository-approved retained ref is required but cannot be derived and requires an operator decision | checkpoint `retained_ref_approval_required` |
|
|
50
|
+
| 5 | Same-authority admissible evidence conflicts and no declared tie-break resolves it | blocked `review_state_conflict` |
|
|
51
|
+
| 6 | Required explicit invocation context, accepted bounds, target evidence, or reconstructible lineage inputs are missing | blocked `review_context_blocked` |
|
|
52
|
+
| 7 | The caller is in delivery-owned `debug_active`, `repair_active`, `debt_follow_up`, `docs_ingest`, `closeout`, `focused_validation`, or `clean_handoff` without fresh `review_due` evidence | blocked `review_not_due` |
|
|
53
|
+
| 8 | A valid retained standalone report and durable returned routing output exist | terminal `review_complete` |
|
|
54
|
+
| 9 | A valid retained delivery report and durable returned routing output exist | terminal `review_routed` |
|
|
55
|
+
| 10 | Retention is verified and fresh, but its returned routing output is absent | [`return-route.md`](return-route.md) |
|
|
56
|
+
| 11 | A complete fresh local report exists without unique verified retention, including a retryable retention failure | [`retain-report.md`](retain-report.md) |
|
|
57
|
+
| 12 | Fresh `review_running` predecessor evidence exists without a complete local report | [`run-review.md`](run-review.md) |
|
|
58
|
+
| 13 | Fresh `review_due` evidence exists, or mutation, partial-run, retryable failure, or stale target/source evidence invalidated later work | [`prepare-review.md`](prepare-review.md) |
|
|
58
59
|
|
|
59
60
|
## State Coverage
|
|
60
61
|
|
|
@@ -67,7 +68,8 @@ output.
|
|
|
67
68
|
- `review_routed` selects `return-route.md` until durable return evidence exists,
|
|
68
69
|
then terminates as `review_complete` for standalone or `review_routed` for
|
|
69
70
|
delivery.
|
|
70
|
-
- `review_failed
|
|
71
|
+
- `human_steering_required`, `review_failed`, and `review_budget_exhausted` are
|
|
72
|
+
terminal router outcomes.
|
|
71
73
|
- Review-owned mutation or retryable partial-run evidence projects back to
|
|
72
74
|
`review_due`; retryable fresh retention evidence remains
|
|
73
75
|
`report_retention_pending`.
|
|
@@ -51,8 +51,9 @@ 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, action, and one explicit `return_route`: `
|
|
55
|
-
`implementation`, `debt_follow_up`, or `docs_ingest`.
|
|
54
|
+
evidence, action, and one explicit `return_route`: `human_steering_required`,
|
|
55
|
+
`debugging`, `implementation`, `debt_follow_up`, or `docs_ingest`. Use
|
|
56
|
+
`human_steering_required` when the repair triggers `$handback`.
|
|
56
57
|
7. Run only the smallest safe readonly validation needed to verify candidates or
|
|
57
58
|
governing acceptance evidence. Broader checks require explicit accepted spec
|
|
58
59
|
or plan authority. Record missing required RED/GREEN evidence as a finding;
|
|
@@ -78,16 +78,18 @@ as null or not applicable.
|
|
|
78
78
|
exactly the fields `id`, `lens`, `severity`, `location`, `impact`, `evidence`,
|
|
79
79
|
`action`, and `return_route`. Finding IDs are unique, severity is `critical`,
|
|
80
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
|
|
82
|
-
`implementation`, `debt_follow_up`, or
|
|
81
|
+
has a finding. Each finding's `return_route` is exactly
|
|
82
|
+
`human_steering_required`, `debugging`, `implementation`, `debt_follow_up`, or
|
|
83
|
+
`docs_ingest`.
|
|
83
84
|
|
|
84
85
|
`routing` has exactly `primary` and `secondary_architecture_follow_up`.
|
|
85
|
-
`primary` is `
|
|
86
|
-
`closeout`; the secondary flag is boolean.
|
|
87
|
-
public `deriveReviewRouting` helper from
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
86
|
+
`primary` is `human_steering_required`, `debugging`, `implementation`,
|
|
87
|
+
`debt_follow_up`, `docs_ingest`, or `closeout`; the secondary flag is boolean.
|
|
88
|
+
Aggregate routing is derived by the public `deriveReviewRouting` helper from
|
|
89
|
+
the complete finding set. Precedence is
|
|
90
|
+
`human_steering_required` > `debugging` > `implementation` > `debt_follow_up`
|
|
91
|
+
> `docs_ingest`; an empty set derives `closeout`, and debt is secondary only
|
|
92
|
+
beside debugging or implementation. A supplied aggregate mismatch is invalid. `validation` is an
|
|
91
93
|
array of records with exactly command, isolation mode, before/after frozen
|
|
92
94
|
hashes, outcome, and evidence. Isolation is proven no-write, disposable
|
|
93
95
|
checkout, or disposable snapshot. Retained validation records require equal
|
|
@@ -69,8 +69,8 @@ Resume identity:
|
|
|
69
69
|
|
|
70
70
|
`Review state` is exactly one of `review_due`, `review_running`,
|
|
71
71
|
`report_retention_pending`, `retained_ref_approval_required`,
|
|
72
|
-
`review_context_blocked`, `review_routed`, `review_complete`,
|
|
73
|
-
`review_failed`. `Next suggested route` is optional advice represented by
|
|
72
|
+
`review_context_blocked`, `review_routed`, `review_complete`,
|
|
73
|
+
`human_steering_required`, or `review_failed`. `Next suggested route` is optional advice represented by
|
|
74
74
|
`none` when absent and is always lowest authority. `attempt` starts at 1 for a
|
|
75
75
|
run and increases by one for each new stateful record. Persist locators and
|
|
76
76
|
hashes, not reconstructible raw target, source, report, validation, or finding
|
|
@@ -24,7 +24,8 @@ and clean handoff.
|
|
|
24
24
|
| `report_retention_pending` | Retryable retention failure | Hashes fresh | Report writer | `report_retention_pending` | None | Exact retryable evidence; no authoritative pass |
|
|
25
25
|
| `report_retention_pending` | Non-retryable retention failure | Retry cannot succeed | Report writer | `review_failed` | None | Exact terminal evidence; no authoritative pass |
|
|
26
26
|
| `report_retention_pending` | Freshness changed | Target or source hash changed | `review-phase` | `review_due` | None | Stale local report; unchanged counters |
|
|
27
|
-
| `review_routed` |
|
|
27
|
+
| `review_routed` | Human steering route | Derived primary route is `human_steering_required` | `review-phase` | `human_steering_required` | None | Retained report plus durable `$handback` outcome |
|
|
28
|
+
| `review_routed` | Readonly return | Standalone; primary route is not `human_steering_required` | Standalone caller | `review_complete` | None | Retained report output and route |
|
|
28
29
|
| `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
30
|
| `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
31
|
| `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 |
|
|
@@ -69,6 +70,9 @@ Review 1 may open fix 1, review 2 fix 2, and review 3 fix 3. Fix 3 never opens
|
|
|
69
70
|
review 4. A failed focused validation stays in repair epoch 3 until that same
|
|
70
71
|
validation passes.
|
|
71
72
|
|
|
73
|
+
`human_steering_required` opens no repair. It remains terminal until the
|
|
74
|
+
`$handback` authority guard passes.
|
|
75
|
+
|
|
72
76
|
Same-goal bounds revisions preserve delivery lineage and counters. Resume,
|
|
73
77
|
rebase, new commit, process retry, and handoff preserve them. Only an explicitly
|
|
74
78
|
new delivery goal with materially changed accepted bounds creates a new lineage
|
|
@@ -187,6 +187,7 @@ const LENS_KEYS = [
|
|
|
187
187
|
];
|
|
188
188
|
const PROTOTYPE_KEYS = new Set(["__proto__", "constructor", "prototype"]);
|
|
189
189
|
const FINDING_ROUTES = [
|
|
190
|
+
"human_steering_required",
|
|
190
191
|
"debugging",
|
|
191
192
|
"implementation",
|
|
192
193
|
"debt_follow_up",
|
|
@@ -571,6 +572,7 @@ const validateReportSemantics = (report, errors) => {
|
|
|
571
572
|
if (
|
|
572
573
|
!exactKeys(report.routing, ["primary", "secondary_architecture_follow_up"]) ||
|
|
573
574
|
![
|
|
575
|
+
"human_steering_required",
|
|
574
576
|
"debugging",
|
|
575
577
|
"implementation",
|
|
576
578
|
"debt_follow_up",
|