@punks/cli 3.2.2 → 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 +1 -1
- package/dist/BASELINE_CHANGELOG.md +43 -0
- package/dist/CHANGELOG.md +24 -0
- 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 +5 -2
- package/dist/baseline/scaffold-baseline/data/catalog/skills.json +24 -0
- package/dist/baseline/scaffold-baseline/skills/agnostic/cli/hi-cli/references/post-command-flow.md +6 -1
- 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 +8 -6
- package/dist/baseline/scaffold-baseline/skills/agnostic/planning/create-plan/references/planner-task-graph.md +12 -7
- package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/requirements-grill/SKILL.md +6 -4
- 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/phases/delivery-phase/phases/review.md +34 -9
- package/dist/baseline/scaffold-baseline/skills/phases/delivery-phase/phases/router.md +18 -11
- package/dist/baseline/scaffold-baseline/skills/phases/delivery-phase/references/phase-handoff.md +19 -1
- package/dist/baseline/scaffold-baseline/skills/phases/review-phase/AUTHORING-HANDOFF.md +14 -11
- 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 +1 -1
- package/dist/index.js +10 -10
- package/dist/skills/agnostic/cli/hi-cli/references/post-command-flow.md +6 -1
- 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 +8 -6
- package/dist/skills/agnostic/planning/create-plan/references/planner-task-graph.md +12 -7
- package/dist/skills/agnostic/requirements/requirements-grill/SKILL.md +6 -4
- 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/phases/delivery-phase/phases/review.md +34 -9
- package/dist/skills/phases/delivery-phase/phases/router.md +16 -9
- package/dist/skills/phases/delivery-phase/references/phase-handoff.md +19 -1
- package/dist/skills/phases/review-phase/AUTHORING-HANDOFF.md +14 -11
- 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 +18 -5
- 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 +52 -9
- 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
- package/dist/skills/frameworks/nestjs/nestjs-best-practices/.gitignore +0 -29
package/dist/baseline/scaffold-baseline/skills/phases/review-phase/references/durable-report.md
CHANGED
|
@@ -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,
|
package/dist/baseline/scaffold-baseline/skills/phases/review-phase/references/state-graph.md
CHANGED
|
@@ -4,38 +4,44 @@ Review owns normalization, frozen inspection, report retention, routing output,
|
|
|
4
4
|
and termination. Delivery owns debugging, implementation, debt, docs, closeout,
|
|
5
5
|
and clean handoff.
|
|
6
6
|
|
|
7
|
-
| State | Event | Guard
|
|
8
|
-
| --------------------------------- | ------------------------------------------------ |
|
|
9
|
-
| Current delivery state | Review considered | Unsupported target
|
|
10
|
-
| Current delivery state | Review considered | Invalid accepted bounds
|
|
11
|
-
| `review_due` | Authorized review invocation | Delivery; accepted bounds and target valid; recovered `review_count < 3`
|
|
12
|
-
| `review_due` | Explicit review invocation | Standalone; accepted bounds and target valid
|
|
13
|
-
| Current delivery state | Review considered | Delivery; in-memory accepted bounds and target valid; recovered `review_count >= 3`
|
|
14
|
-
| `review_running` | All lenses and parent verification complete | One frozen snapshot; complete local report exists
|
|
15
|
-
| `review_running` | Validation mutation detected | Frozen-target hash differs after validation
|
|
16
|
-
| `review_running` | Retryable infrastructure failure or partial run | No immutable report
|
|
17
|
-
| `review_running` | Non-retryable contract or infrastructure failure | No immutable report
|
|
18
|
-
| `report_retention_pending` | Retention verified | Delivery; valid retained-pass predicate; ordinal at most 3; hashes fresh
|
|
19
|
-
| `report_retention_pending` | Retention rejected | Delivery; ordinal is greater than 3
|
|
20
|
-
| `report_retention_pending` | Retention verified | Standalone; valid retained-pass predicate; hashes fresh
|
|
21
|
-
| `report_retention_pending` | Idempotent retention recovery | Same lineage/run has identical valid path, report blob SHA-256, and commit
|
|
22
|
-
| `report_retention_pending` | Same-run conflict | Same lineage/run has two valid candidates with different path, blob, or commit
|
|
23
|
-
| `report_retention_pending` | Retained-pass validation rejected | Active candidate is malformed or has wrong derived identity, hash, paths, containment, or ordinal
|
|
24
|
-
| `report_retention_pending` | Retryable retention failure | Hashes fresh
|
|
25
|
-
| `report_retention_pending` | Non-retryable retention failure | Retry cannot succeed
|
|
26
|
-
| `report_retention_pending` | Freshness changed | Target or source hash changed
|
|
27
|
-
| `review_routed` | Readonly return | Standalone
|
|
28
|
-
| `review_routed` | Resume debug route | Handoff already records run id, debug route, and `debug_active`
|
|
29
|
-
| `review_routed` | Resume implementation route | Handoff already records run id, implementation route, and `repair_active`
|
|
30
|
-
| `review_routed` |
|
|
31
|
-
| `review_routed` | Mixed
|
|
32
|
-
| `review_routed` |
|
|
33
|
-
| `review_routed` |
|
|
34
|
-
| `review_routed` | No-blocker route
|
|
35
|
-
| `
|
|
36
|
-
| `
|
|
37
|
-
| `
|
|
38
|
-
| `
|
|
7
|
+
| State | Event | Guard | Owner | Next state | Counter effect | Required evidence |
|
|
8
|
+
| --------------------------------- | ------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------- | --------------------------------- | ------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |
|
|
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
|
+
| 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` | 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
|
+
| `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
|
+
| 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
|
+
| `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 |
|
|
15
|
+
| `review_running` | Validation mutation detected | Frozen-target hash differs after validation | `review-phase` | `review_due` | None | Before/after hashes, command, mutation evidence; no report or pass |
|
|
16
|
+
| `review_running` | Retryable infrastructure failure or partial run | No immutable report | `review-phase` | `review_due` | None | Exact retryable evidence; unchanged counters |
|
|
17
|
+
| `review_running` | Non-retryable contract or infrastructure failure | No immutable report | `review-phase` | `review_failed` | None | Exact terminal evidence; no report; unchanged counters |
|
|
18
|
+
| `report_retention_pending` | Retention verified | Delivery; valid retained-pass predicate; ordinal at most 3; hashes fresh | Report writer | `review_routed` | Unique retained commit establishes authoritative ordinal; reconcile projection | Path, SHA-256, commit, retained ref, ordinal, run id |
|
|
19
|
+
| `report_retention_pending` | Retention rejected | Delivery; ordinal is greater than 3 | Report writer | `review_budget_exhausted` | None | Exact ordinal rejection/current route; no authoritative pass |
|
|
20
|
+
| `report_retention_pending` | Retention verified | Standalone; valid retained-pass predicate; hashes fresh | Report writer | `review_routed` | None | Path, SHA-256, commit, retained ref |
|
|
21
|
+
| `report_retention_pending` | Idempotent retention recovery | Same lineage/run has identical valid path, report blob SHA-256, and commit | Report writer | `review_routed` | Reuse existing pass; project its ordinal at most once | Existing unique authority and containment evidence |
|
|
22
|
+
| `report_retention_pending` | Same-run conflict | Same lineage/run has two valid candidates with different path, blob, or commit | Report writer | `review_failed` | None | `same_run_conflict`, both authorities; no pass or counter change |
|
|
23
|
+
| `report_retention_pending` | Retained-pass validation rejected | Active candidate is malformed or has wrong derived identity, hash, paths, containment, or ordinal | Report writer | `review_failed` | None | Exact failed predicate; no pass or counter change |
|
|
24
|
+
| `report_retention_pending` | Retryable retention failure | Hashes fresh | Report writer | `report_retention_pending` | None | Exact retryable evidence; no authoritative pass |
|
|
25
|
+
| `report_retention_pending` | Non-retryable retention failure | Retry cannot succeed | Report writer | `review_failed` | None | Exact terminal evidence; no authoritative pass |
|
|
26
|
+
| `report_retention_pending` | Freshness changed | Target or source hash changed | `review-phase` | `review_due` | None | Stale local report; unchanged counters |
|
|
27
|
+
| `review_routed` | Readonly return | Standalone | Standalone caller | `review_complete` | None | Retained report output and route |
|
|
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
|
+
| `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` | 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 |
|
|
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 |
|
|
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 |
|
|
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 |
|
|
44
|
+
| `focused_validation` | Focused validation passes | Repair epoch 3 complete | `delivery-phase` | `clean_handoff` | None | Passing validation, final changes, report-3 link, clean status |
|
|
39
45
|
|
|
40
46
|
## Durable Budget
|
|
41
47
|
|
|
@@ -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.
|
package/dist/baseline/scaffold-baseline/skills/phases/review-phase/scripts/review-contract.mjs
CHANGED
|
@@ -36,8 +36,12 @@ export const inclusiveScopeHash = (entries) => hashRecord("inclusive-scope", sor
|
|
|
36
36
|
export const acceptedBoundsHash = (identity, scopeEntries) =>
|
|
37
37
|
hashRecord("accepted-bounds", [identity, inclusiveScopeHash(scopeEntries)]);
|
|
38
38
|
|
|
39
|
-
export const deliveryLineageId = (deliveryGoalIdentity) =>
|
|
40
|
-
|
|
39
|
+
export const deliveryLineageId = (deliveryGoalIdentity) => {
|
|
40
|
+
if (typeof deliveryGoalIdentity !== "string" || deliveryGoalIdentity.length === 0) {
|
|
41
|
+
throw new TypeError("delivery goal identity must be a non-empty string");
|
|
42
|
+
}
|
|
43
|
+
return hashRecord("delivery-lineage", [deliveryGoalIdentity]);
|
|
44
|
+
};
|
|
41
45
|
|
|
42
46
|
export const standaloneLineageId = (locator, boundsHash) =>
|
|
43
47
|
hashRecord("standalone-lineage", [locator, boundsHash]);
|
|
@@ -118,10 +122,21 @@ export const sourceSetHash = (sources) =>
|
|
|
118
122
|
.flatMap(({ path, hash }) => [path, hash]),
|
|
119
123
|
);
|
|
120
124
|
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
125
|
+
const assertReviewedAt = (reviewedAt, field) => {
|
|
126
|
+
const match = /^(\d{4})(\d{2})(\d{2})T(\d{2})(\d{2})(\d{2})Z$/u.exec(reviewedAt);
|
|
127
|
+
if (!match) {
|
|
128
|
+
throw new TypeError(`${field} must use YYYYMMDDTHHMMSSZ UTC format`);
|
|
129
|
+
}
|
|
130
|
+
const [, year, month, day, hour, minute, second] = match;
|
|
131
|
+
const iso = `${year}-${month}-${day}T${hour}:${minute}:${second}.000Z`;
|
|
132
|
+
const instant = new Date(iso);
|
|
133
|
+
if (Number.isNaN(instant.valueOf()) || instant.toISOString() !== iso) {
|
|
134
|
+
throw new TypeError(`${field} must name a real UTC instant`);
|
|
124
135
|
}
|
|
136
|
+
};
|
|
137
|
+
|
|
138
|
+
export const reviewReportPath = ({ lineageId, reviewedAt, snapshotHash }) => {
|
|
139
|
+
assertReviewedAt(reviewedAt, "reviewedAt");
|
|
125
140
|
return `apps/wiki/content/docs/project/reviews/${reviewScopeSlug(lineageId)}-${reviewedAt}-${snapshot12(snapshotHash)}-review-report.md`;
|
|
126
141
|
};
|
|
127
142
|
|
|
@@ -147,6 +162,29 @@ const FRONTMATTER_KEYS = [
|
|
|
147
162
|
const HEX_64 = /^[0-9a-f]{64}$/u;
|
|
148
163
|
const COMMIT_SHA = /^[0-9a-f]{40}(?:[0-9a-f]{24})?$/u;
|
|
149
164
|
const LENS_KEYS = ["standards", "skill_adherence", "architecture", "simplify", "spec"];
|
|
165
|
+
const PROTOTYPE_KEYS = new Set(["__proto__", "constructor", "prototype"]);
|
|
166
|
+
const FINDING_ROUTES = ["debugging", "implementation", "debt_follow_up", "docs_ingest"];
|
|
167
|
+
|
|
168
|
+
export const deriveReviewRouting = (findings) => {
|
|
169
|
+
if (
|
|
170
|
+
!Array.isArray(findings) ||
|
|
171
|
+
findings.some(
|
|
172
|
+
(finding) =>
|
|
173
|
+
finding === null ||
|
|
174
|
+
typeof finding !== "object" ||
|
|
175
|
+
!FINDING_ROUTES.includes(finding.return_route),
|
|
176
|
+
)
|
|
177
|
+
) {
|
|
178
|
+
throw new TypeError("invalid finding return route");
|
|
179
|
+
}
|
|
180
|
+
const routes = new Set(findings.map(({ return_route: route }) => route));
|
|
181
|
+
const primary = FINDING_ROUTES.find((route) => routes.has(route)) ?? "closeout";
|
|
182
|
+
return {
|
|
183
|
+
primary,
|
|
184
|
+
secondary_architecture_follow_up:
|
|
185
|
+
routes.has("debt_follow_up") && (primary === "debugging" || primary === "implementation"),
|
|
186
|
+
};
|
|
187
|
+
};
|
|
150
188
|
|
|
151
189
|
const exactKeys = (value, keys) =>
|
|
152
190
|
value !== null &&
|
|
@@ -163,9 +201,7 @@ const sortedUniqueStrings = (values) =>
|
|
|
163
201
|
isDeepStrictEqual(values, sortUtf8(values));
|
|
164
202
|
|
|
165
203
|
const reportDate = (reviewedAt) => {
|
|
166
|
-
|
|
167
|
-
throw new TypeError("reviewed_at must use YYYYMMDDTHHMMSSZ");
|
|
168
|
-
}
|
|
204
|
+
assertReviewedAt(reviewedAt, "reviewed_at");
|
|
169
205
|
return `${reviewedAt.slice(0, 4)}-${reviewedAt.slice(4, 6)}-${reviewedAt.slice(6, 8)}`;
|
|
170
206
|
};
|
|
171
207
|
|
|
@@ -218,11 +254,14 @@ const parseFrontmatter = (text) => {
|
|
|
218
254
|
if (!text.startsWith("---\n")) throw new TypeError("missing frontmatter");
|
|
219
255
|
const close = text.indexOf("\n---\n", 4);
|
|
220
256
|
if (close < 0) throw new TypeError("unclosed frontmatter");
|
|
221
|
-
const frontmatter =
|
|
257
|
+
const frontmatter = Object.create(null);
|
|
222
258
|
for (const line of text.slice(4, close).split("\n")) {
|
|
223
259
|
const separator = line.indexOf(": ");
|
|
224
260
|
if (separator < 1) throw new TypeError("malformed frontmatter line");
|
|
225
261
|
const key = line.slice(0, separator);
|
|
262
|
+
if (PROTOTYPE_KEYS.has(key)) {
|
|
263
|
+
throw new TypeError("prototype-sensitive frontmatter key");
|
|
264
|
+
}
|
|
226
265
|
if (Object.hasOwn(frontmatter, key)) throw new TypeError("duplicate frontmatter key");
|
|
227
266
|
const raw = line.slice(separator + 2);
|
|
228
267
|
frontmatter[key] = raw === "[]" ? [] : JSON.parse(raw);
|
|
@@ -264,6 +303,8 @@ export const normalizeReviewTarget = (mode, evidence) => {
|
|
|
264
303
|
!nonemptyString(evidence.actualBaseRef) ||
|
|
265
304
|
!COMMIT_SHA.test(evidence.fixedPointSha) ||
|
|
266
305
|
!nonemptyString(evidence.headIdentity) ||
|
|
306
|
+
!Array.isArray(evidence.scopeEntries) ||
|
|
307
|
+
evidence.scopeEntries.length === 0 ||
|
|
267
308
|
!sortedUniqueStrings(sortUtf8(evidence.scopeEntries)) ||
|
|
268
309
|
!Buffer.isBuffer(evidence.canonicalPatchBytes)
|
|
269
310
|
) {
|
|
@@ -280,11 +321,15 @@ export const normalizeReviewTarget = (mode, evidence) => {
|
|
|
280
321
|
};
|
|
281
322
|
}
|
|
282
323
|
if (mode === "standalone") {
|
|
324
|
+
if (!Array.isArray(evidence.scopeEntries) || evidence.scopeEntries.length === 0) {
|
|
325
|
+
throw new TypeError("invalid standalone target evidence");
|
|
326
|
+
}
|
|
283
327
|
const files = orderedFiles(evidence.files);
|
|
284
328
|
const identities = files.map(({ identity }) => identity);
|
|
285
329
|
const scope = sortUtf8(evidence.scopeEntries);
|
|
286
330
|
if (
|
|
287
331
|
!nonemptyString(evidence.locator) ||
|
|
332
|
+
identities.length === 0 ||
|
|
288
333
|
!sortedUniqueStrings(identities) ||
|
|
289
334
|
!files.every(({ bytes }) => Buffer.isBuffer(bytes)) ||
|
|
290
335
|
!isDeepStrictEqual(scope, identities)
|
|
@@ -306,6 +351,7 @@ export const normalizeReviewTarget = (mode, evidence) => {
|
|
|
306
351
|
export const normalizeReviewSources = (sources) => {
|
|
307
352
|
if (
|
|
308
353
|
!Array.isArray(sources) ||
|
|
354
|
+
sources.length === 0 ||
|
|
309
355
|
sources.some(({ path, bytes }) => !nonemptyString(path) || !Buffer.isBuffer(bytes)) ||
|
|
310
356
|
new Set(sources.map(({ path }) => path)).size !== sources.length
|
|
311
357
|
) {
|
|
@@ -393,7 +439,12 @@ const validateTargetSchema = (target, mode, errors) => {
|
|
|
393
439
|
errors.push("malformed:normalized_target_schema");
|
|
394
440
|
return;
|
|
395
441
|
}
|
|
396
|
-
if (
|
|
442
|
+
if (
|
|
443
|
+
!nonemptyString(target.locator) ||
|
|
444
|
+
!Array.isArray(target.inclusive_scope) ||
|
|
445
|
+
target.inclusive_scope.length === 0 ||
|
|
446
|
+
!sortedUniqueStrings(target.inclusive_scope)
|
|
447
|
+
) {
|
|
397
448
|
errors.push("malformed:normalized_target_common_fields");
|
|
398
449
|
}
|
|
399
450
|
if (mode === "delivery") {
|
|
@@ -435,7 +486,16 @@ const validateReportSemantics = (report, errors) => {
|
|
|
435
486
|
if (!Array.isArray(report.findings)) {
|
|
436
487
|
errors.push("malformed:findings");
|
|
437
488
|
} else {
|
|
438
|
-
const findingKeys = [
|
|
489
|
+
const findingKeys = [
|
|
490
|
+
"id",
|
|
491
|
+
"lens",
|
|
492
|
+
"severity",
|
|
493
|
+
"location",
|
|
494
|
+
"impact",
|
|
495
|
+
"evidence",
|
|
496
|
+
"action",
|
|
497
|
+
"return_route",
|
|
498
|
+
];
|
|
439
499
|
const ids = new Set();
|
|
440
500
|
const findingLenses = new Set();
|
|
441
501
|
for (const finding of report.findings) {
|
|
@@ -471,6 +531,14 @@ const validateReportSemantics = (report, errors) => {
|
|
|
471
531
|
typeof report.routing?.secondary_architecture_follow_up !== "boolean"
|
|
472
532
|
) {
|
|
473
533
|
errors.push("malformed:routing");
|
|
534
|
+
} else {
|
|
535
|
+
try {
|
|
536
|
+
if (!isDeepStrictEqual(report.routing, deriveReviewRouting(report.findings))) {
|
|
537
|
+
errors.push("mismatch:routing");
|
|
538
|
+
}
|
|
539
|
+
} catch {
|
|
540
|
+
errors.push("malformed:finding_return_route");
|
|
541
|
+
}
|
|
474
542
|
}
|
|
475
543
|
|
|
476
544
|
const validationKeys = [
|
|
@@ -655,7 +723,13 @@ const inspectRetainedPass = (candidate, expected) => {
|
|
|
655
723
|
) {
|
|
656
724
|
errors.push("mismatch:report_sha256");
|
|
657
725
|
}
|
|
658
|
-
if (
|
|
726
|
+
if (
|
|
727
|
+
!Buffer.isBuffer(candidate.resolvedReportBytes) ||
|
|
728
|
+
!candidate.reportBytes.equals(candidate.resolvedReportBytes)
|
|
729
|
+
) {
|
|
730
|
+
errors.push("mismatch:resolved_report_bytes");
|
|
731
|
+
}
|
|
732
|
+
if (candidate.refContainsCommit !== true) errors.push("ref_missing_commit");
|
|
659
733
|
if (!COMMIT_SHA.test(candidate.reportCommitSha)) {
|
|
660
734
|
errors.push("invalid:report_commit_sha");
|
|
661
735
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 2,
|
|
3
3
|
"channel": "stable",
|
|
4
|
-
"version": "2026.08.
|
|
5
|
-
"tag": "baseline/stable/2026.08.
|
|
6
|
-
"commit": "
|
|
4
|
+
"version": "2026.08.19-animation-react-compiler-lint",
|
|
5
|
+
"tag": "baseline/stable/2026.08.19-animation-react-compiler-lint",
|
|
6
|
+
"commit": "458b025ec77c326c75bde9a8d77e1eaceb0328d5",
|
|
7
7
|
"archive": "scaffold-baseline.tgz",
|
|
8
|
-
"archiveSha256": "
|
|
8
|
+
"archiveSha256": "6c22529038f1922c527e55f76b733dd662194dc01d98a4a85e06d045267105a8",
|
|
9
9
|
"compatibility": {
|
|
10
|
-
"cliVersionRange": ">=3.
|
|
10
|
+
"cliVersionRange": ">=3.3.0 <3.4.0"
|
|
11
11
|
}
|
|
12
12
|
}
|
|
Binary file
|
package/dist/data/AGENTS.md
CHANGED
|
@@ -4,6 +4,6 @@ Primary skills here: `autoreview`, `codebase-design`, `improve-codebase-architec
|
|
|
4
4
|
|
|
5
5
|
This scope owns packaged CLI assets: skill and pack catalogs, hooks, prompt content, subagent manifests, harness-projection scripts, and generated declarations. Keep runtime behavior in `apps/cli/src`; keep shared scaffold model contracts in `packages/scaffold`. Changes to embedded or generated assets must preserve their content hashes and public-output contracts.
|
|
6
6
|
|
|
7
|
-
When reusable skills change, complete the root source-first flow before treating these distributed assets as current:
|
|
7
|
+
When reusable skills change, complete the root source-first flow before treating these distributed assets as current: before editing, verify `git -C /Users/stefan/Desktop/repos/wearedevpunks-skills branch --show-current` returns exactly `main`; stop otherwise. Edit and commit the canonical source only on that checked-out `main` branch; alternate branches or worktrees are out of scope for this flow. Then push, run `bun run sync:skills`, verify the exact receipt SHA, and publish the baseline when requested.
|
|
8
8
|
|
|
9
9
|
If work here changes scaffolding behavior, generated guidance, release assets, or validation procedures, update `docs/README.md` and `docs/runbooks/hi-cli-scaffolding.md` in the same task.
|