@punks/cli 3.2.0 → 3.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +2 -0
- package/dist/BASELINE_CHANGELOG.md +47 -1
- package/dist/CHANGELOG.md +36 -0
- package/dist/baseline/scaffold-baseline/baseline.json +5 -5
- package/dist/baseline/scaffold-baseline/data/catalog/lint-assets.json +48 -0
- package/dist/baseline/scaffold-baseline/data/catalog/packs.json +2 -1
- package/dist/baseline/scaffold-baseline/data/catalog/skills.json +8 -0
- package/dist/baseline/scaffold-baseline/skills/agnostic/cli/hi-cli/references/post-command-flow.md +20 -22
- package/dist/baseline/scaffold-baseline/skills/agnostic/docs/rule-authoring/SKILL.md +18 -0
- package/dist/baseline/scaffold-baseline/skills/agnostic/docs/rule-authoring/references/migration.md +10 -0
- package/dist/baseline/scaffold-baseline/skills/agnostic/docs/upstream/mattpocock-writing-skills.md +81 -12
- package/dist/baseline/scaffold-baseline/skills/agnostic/planning/create-plan/REFERENCE.md +11 -14
- package/dist/baseline/scaffold-baseline/skills/agnostic/planning/create-plan/SKILL.md +17 -14
- package/dist/baseline/scaffold-baseline/skills/agnostic/planning/create-plan/references/architecture-convergence.md +99 -0
- package/dist/baseline/scaffold-baseline/skills/agnostic/planning/create-plan/references/plan-schema.md +34 -0
- package/dist/baseline/scaffold-baseline/skills/agnostic/planning/create-plan/references/planner-task-graph.md +15 -12
- package/dist/baseline/scaffold-baseline/skills/agnostic/planning/implement-spec/SKILL.md +6 -5
- package/dist/baseline/scaffold-baseline/skills/agnostic/planning/implement-spec/assets/IMPLEMENTATION-NOTES-TEMPLATE.md +10 -0
- package/dist/baseline/scaffold-baseline/skills/agnostic/planning/implement-spec/references/architecture-conformance.md +100 -0
- package/dist/baseline/scaffold-baseline/skills/agnostic/planning/implement-spec/references/lifecycle.md +25 -2
- package/dist/baseline/scaffold-baseline/skills/agnostic/planning/implement-spec/references/parallel-orchestration.md +17 -1
- package/dist/baseline/scaffold-baseline/skills/agnostic/planning/implement-spec/references/parallel-worker-brief.md +14 -0
- package/dist/baseline/scaffold-baseline/skills/agnostic/planning/implement-spec/references/parallel.md +7 -0
- package/dist/baseline/scaffold-baseline/skills/agnostic/quality/tdd/SKILL.md +3 -2
- package/dist/baseline/scaffold-baseline/skills/agnostic/quality/tdd/high-signal-tests.md +17 -3
- package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/domain-modeling/{CONTEXT-FORMAT.md → GLOSSARY-FORMAT.md} +9 -9
- package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/domain-modeling/SKILL.md +12 -12
- package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/requirements-grill/SKILL.md +3 -2
- package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/requirements-grill/references/grilling-flow.md +1 -1
- package/dist/baseline/scaffold-baseline/skills/frameworks/effect/effect-service-design/UPSTREAM.md +17 -0
- package/dist/baseline/scaffold-baseline/skills/misc/wait-what/SKILL.md +1 -1
- package/dist/baseline/scaffold-baseline/skills/phases/delivery-phase/SKILL.md +5 -7
- package/dist/baseline/scaffold-baseline/skills/phases/delivery-phase/phases/review.md +25 -50
- package/dist/baseline/scaffold-baseline/skills/phases/delivery-phase/phases/router.md +22 -27
- package/dist/baseline/scaffold-baseline/skills/phases/delivery-phase/references/phase-handoff.md +10 -28
- package/dist/baseline/scaffold-baseline/skills/phases/review-phase/AUTHORING-HANDOFF.md +11 -14
- package/dist/baseline/scaffold-baseline/skills/phases/review-phase/phases/prepare-review.md +1 -1
- package/dist/baseline/scaffold-baseline/skills/phases/review-phase/phases/retain-report.md +2 -9
- package/dist/baseline/scaffold-baseline/skills/phases/review-phase/phases/return-route.md +8 -6
- package/dist/baseline/scaffold-baseline/skills/phases/review-phase/phases/run-review.md +5 -8
- package/dist/baseline/scaffold-baseline/skills/phases/review-phase/references/durable-report.md +14 -29
- package/dist/baseline/scaffold-baseline/skills/phases/review-phase/references/state-graph.md +32 -45
- package/dist/baseline/scaffold-baseline/skills/phases/review-phase/references/targets.md +1 -2
- package/dist/baseline/scaffold-baseline/skills/phases/review-phase/scripts/review-contract.mjs +12 -86
- package/dist/baseline/scaffold-baseline.json +5 -5
- package/dist/baseline/scaffold-baseline.tgz +0 -0
- package/dist/data/AGENTS.md +2 -0
- package/dist/index.js +15 -15
- package/dist/skills/agnostic/cli/hi-cli/references/post-command-flow.md +5 -7
- package/dist/skills/agnostic/docs/rule-authoring/SKILL.md +18 -0
- package/dist/skills/agnostic/docs/rule-authoring/references/migration.md +10 -0
- package/dist/skills/agnostic/docs/upstream/mattpocock-writing-skills.md +81 -12
- package/dist/skills/agnostic/planning/create-plan/REFERENCE.md +11 -14
- package/dist/skills/agnostic/planning/create-plan/SKILL.md +17 -14
- package/dist/skills/agnostic/planning/create-plan/references/architecture-convergence.md +99 -0
- package/dist/skills/agnostic/planning/create-plan/references/plan-schema.md +34 -0
- package/dist/skills/agnostic/planning/create-plan/references/planner-task-graph.md +15 -12
- package/dist/skills/agnostic/planning/implement-spec/SKILL.md +6 -5
- package/dist/skills/agnostic/planning/implement-spec/assets/IMPLEMENTATION-NOTES-TEMPLATE.md +10 -0
- package/dist/skills/agnostic/planning/implement-spec/references/architecture-conformance.md +100 -0
- package/dist/skills/agnostic/planning/implement-spec/references/lifecycle.md +25 -2
- package/dist/skills/agnostic/planning/implement-spec/references/parallel-orchestration.md +17 -1
- package/dist/skills/agnostic/planning/implement-spec/references/parallel-worker-brief.md +14 -0
- package/dist/skills/agnostic/planning/implement-spec/references/parallel.md +7 -0
- package/dist/skills/agnostic/quality/tdd/SKILL.md +3 -2
- package/dist/skills/agnostic/quality/tdd/high-signal-tests.md +17 -3
- package/dist/skills/agnostic/requirements/domain-modeling/{CONTEXT-FORMAT.md → GLOSSARY-FORMAT.md} +9 -9
- package/dist/skills/agnostic/requirements/domain-modeling/SKILL.md +12 -12
- package/dist/skills/agnostic/requirements/requirements-grill/SKILL.md +3 -2
- package/dist/skills/agnostic/requirements/requirements-grill/references/grilling-flow.md +1 -1
- package/dist/skills/frameworks/effect/effect-service-design/UPSTREAM.md +17 -0
- package/dist/skills/frameworks/nestjs/nestjs-best-practices/.gitignore +29 -0
- package/dist/skills/misc/wait-what/SKILL.md +1 -1
- package/dist/skills/phases/delivery-phase/SKILL.md +5 -7
- package/dist/skills/phases/delivery-phase/phases/review.md +25 -50
- package/dist/skills/phases/delivery-phase/phases/router.md +20 -25
- package/dist/skills/phases/delivery-phase/references/phase-handoff.md +10 -28
- package/dist/skills/phases/review-phase/AUTHORING-HANDOFF.md +11 -14
- package/dist/skills/phases/review-phase/phases/prepare-review.md +1 -1
- package/dist/skills/phases/review-phase/phases/retain-report.md +2 -9
- package/dist/skills/phases/review-phase/phases/return-route.md +8 -6
- package/dist/skills/phases/review-phase/phases/run-review.md +5 -8
- package/dist/skills/phases/review-phase/references/durable-report.md +14 -29
- package/dist/skills/phases/review-phase/references/state-graph.md +6 -19
- package/dist/skills/phases/review-phase/references/targets.md +1 -2
- package/dist/skills/phases/review-phase/scripts/review-contract.mjs +11 -91
- package/package.json +9 -71
package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/domain-modeling/SKILL.md
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: domain-modeling
|
|
3
|
-
description: Build and sharpen a project's domain model. Use when discussing codebase terminology, writing or editing a
|
|
3
|
+
description: Build and sharpen a project's domain model. Use when discussing codebase terminology, writing or editing a GLOSSARY.md, or recording or editing an ADR.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Domain Modeling
|
|
7
7
|
|
|
8
|
-
Actively build and sharpen the project's domain model as you design. This is the _active_ discipline — challenging terms, inventing edge-case scenarios, and writing the glossary and decisions down the moment they crystallise. (Merely _reading_ `
|
|
8
|
+
Actively build and sharpen the project's domain model as you design. This is the _active_ discipline — challenging terms, inventing edge-case scenarios, and writing the glossary and decisions down the moment they crystallise. (Merely _reading_ `GLOSSARY.md` for vocabulary is not this skill — that's a one-line habit any skill can do. This skill is for when you're changing the model, not just consuming it.)
|
|
9
9
|
|
|
10
10
|
## File structure
|
|
11
11
|
|
|
@@ -13,7 +13,7 @@ Most repos have a single context:
|
|
|
13
13
|
|
|
14
14
|
```
|
|
15
15
|
/
|
|
16
|
-
├──
|
|
16
|
+
├── GLOSSARY.md
|
|
17
17
|
├── docs/
|
|
18
18
|
│ └── adr/
|
|
19
19
|
│ ├── 0001-event-sourced-orders.md
|
|
@@ -21,29 +21,29 @@ Most repos have a single context:
|
|
|
21
21
|
└── src/
|
|
22
22
|
```
|
|
23
23
|
|
|
24
|
-
If a `
|
|
24
|
+
If a `GLOSSARY-MAP.md` exists at the root, the repo has multiple contexts. The map points to where each one lives:
|
|
25
25
|
|
|
26
26
|
```
|
|
27
27
|
/
|
|
28
|
-
├──
|
|
28
|
+
├── GLOSSARY-MAP.md
|
|
29
29
|
├── docs/
|
|
30
30
|
│ └── adr/ ← system-wide decisions
|
|
31
31
|
├── src/
|
|
32
32
|
│ ├── ordering/
|
|
33
|
-
│ │ ├──
|
|
33
|
+
│ │ ├── GLOSSARY.md
|
|
34
34
|
│ │ └── docs/adr/ ← context-specific decisions
|
|
35
35
|
│ └── billing/
|
|
36
|
-
│ ├──
|
|
36
|
+
│ ├── GLOSSARY.md
|
|
37
37
|
│ └── docs/adr/
|
|
38
38
|
```
|
|
39
39
|
|
|
40
|
-
Create files lazily — only when you have something to write. If no `
|
|
40
|
+
Create files lazily — only when you have something to write. If no `GLOSSARY.md` exists, create one when the first term is resolved. If no `docs/adr/` exists, create it when the first ADR is needed.
|
|
41
41
|
|
|
42
42
|
## During the session
|
|
43
43
|
|
|
44
44
|
### Challenge against the glossary
|
|
45
45
|
|
|
46
|
-
When the user uses a term that conflicts with the existing language in `
|
|
46
|
+
When the user uses a term that conflicts with the existing language in `GLOSSARY.md`, call it out immediately. "Your glossary defines 'cancellation' as X, but you seem to mean Y — which is it?"
|
|
47
47
|
|
|
48
48
|
### Sharpen fuzzy language
|
|
49
49
|
|
|
@@ -57,11 +57,11 @@ When domain relationships are being discussed, stress-test them with specific sc
|
|
|
57
57
|
|
|
58
58
|
When the user states how something works, check whether the code agrees. If you find a contradiction, surface it: "Your code cancels entire Orders, but you just said partial cancellation is possible — which is right?"
|
|
59
59
|
|
|
60
|
-
### Update
|
|
60
|
+
### Update GLOSSARY.md inline
|
|
61
61
|
|
|
62
|
-
When a term is resolved, update `
|
|
62
|
+
When a term is resolved, update `GLOSSARY.md` right there. Don't batch these up — capture them as they happen. Use the format in [GLOSSARY-FORMAT.md](./GLOSSARY-FORMAT.md).
|
|
63
63
|
|
|
64
|
-
|
|
64
|
+
Pressure-test implementation and architecture consequences during live modeling. Persist accepted technical decisions in the grill artifacts and `SPEC.md`. Keep `GLOSSARY.md` glossary-only.
|
|
65
65
|
|
|
66
66
|
### Offer ADRs sparingly
|
|
67
67
|
|
package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/requirements-grill/SKILL.md
CHANGED
|
@@ -33,12 +33,13 @@ Both workflows can happen in one long session, but keep the responsibilities dis
|
|
|
33
33
|
- Use `$wait-what` to present every grilling question and recommendation to the user. A round is complete only when every frontier item has been presented, answered, parked, or explicitly deferred, and the updated durable artifacts are persisted before continuing.
|
|
34
34
|
- Give `$domain-modeling` the active status glossary before the first question. Invoke it whenever a round changes terminology, relationships, or domain decisions, and persist its accepted results through `artifact-output` before continuing.
|
|
35
35
|
- Inspect relevant routed learning artifacts before grilling requirements that depend on known behavior, prior bugs, project conventions, or domain facts.
|
|
36
|
+
- Record whether the work has technical consequences. For code- or architecture-bearing work, close the applicable topology, dependencies, seams, boundaries, persistence, and module shape from current code evidence. Persist accepted design in the grill artifacts; keep `GLOSSARY.md` glossary-only.
|
|
36
37
|
- Prefer conservative defaults once enough context exists.
|
|
37
38
|
- If the user authorizes auto-pinning defaults, record obvious remaining defaults without needless extra questions.
|
|
38
39
|
- Treat parked branches as preserved knowledge, not deleted scope.
|
|
39
40
|
- Apply the round persistence contract in `artifact-output` alongside `$grilling`.
|
|
40
|
-
-
|
|
41
|
-
|
|
41
|
+
- When `$grilling` reports completion, invoke `$show-me` to present the
|
|
42
|
+
persisted shared understanding before requesting
|
|
42
43
|
approval. Treat the presentation as a derived view: persist any correction
|
|
43
44
|
through `artifact-output`, then present the corrected state again. Approval
|
|
44
45
|
applies to the durable artifacts, not the presentation.
|
|
@@ -16,7 +16,7 @@ At each `$grilling` round boundary, apply the [round persistence contract](artif
|
|
|
16
16
|
|
|
17
17
|
## Domain Modeling
|
|
18
18
|
|
|
19
|
-
Use `$domain-modeling`
|
|
19
|
+
Use `$domain-modeling` for terminology, relationships, and implementation pressure. Record whether technical consequences exist. When they do, ground the applicable topology, dependency direction, seams, boundaries, persistence, and module shape in current code. Persist accepted architecture in grill artifacts for `create-spec`; keep the active glossary implementation-free.
|
|
20
20
|
|
|
21
21
|
## Conservative Closure
|
|
22
22
|
|
package/dist/baseline/scaffold-baseline/skills/frameworks/effect/effect-service-design/UPSTREAM.md
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Upstream provenance
|
|
2
|
+
|
|
3
|
+
Adapted from Dillon Mulroy's [`dmmulroy/skills`](https://github.com/dmmulroy/skills/tree/8603380821fee6a77c82639f364ce8fe4f5a92be/effect-service-design) at commit:
|
|
4
|
+
|
|
5
|
+
```text
|
|
6
|
+
8603380821fee6a77c82639f364ce8fe4f5a92be
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
That source repository retains [Matt Pocock's MIT license](https://github.com/mattpocock/skills/blob/84fdeffd12f2ee307994d1eb6feb48173b6e0502/LICENSE)
|
|
10
|
+
for the underlying skill material. The adjacent `LICENSE` is byte-identical to
|
|
11
|
+
that upstream license and preserves Matt's copyright and attribution. This skill
|
|
12
|
+
is an indirect derivative, not a skill published in Matt's current curated
|
|
13
|
+
`mattpocock/skills` catalog.
|
|
14
|
+
|
|
15
|
+
Devpunks keeps the service-or-value test, design/audit branches, service and
|
|
16
|
+
Layer inventory, and honest test-substitute guidance, then adapts the
|
|
17
|
+
architecture boundaries to the local Effect skill family.
|
|
@@ -9,4 +9,4 @@ routed `requirements-grill` status artifact. Preserve its canonical terms;
|
|
|
9
9
|
route proposed terminology changes through `requirements-grill` instead of
|
|
10
10
|
silently renaming them.
|
|
11
11
|
|
|
12
|
-
Wait — I don't understand where you've got to here. Re-pitch that: give me a little bit of context, talk in ASD-STE100 Simplified Technical English, and use the ubiquitous language from `
|
|
12
|
+
Wait — I don't understand where you've got to here. Re-pitch that: give me a little bit of context, talk in ASD-STE100 Simplified Technical English, and use the ubiquitous language from `GLOSSARY.md`.
|
|
@@ -15,9 +15,9 @@ disable-model-invocation: true
|
|
|
15
15
|
handoff, validation, and docs state to choose the current gate.
|
|
16
16
|
3. If approved artifact links or UI Evidence links are present, carry them as routing evidence.
|
|
17
17
|
4. Load exactly one phase file from `phases/`.
|
|
18
|
-
5. Complete that phase
|
|
18
|
+
5. Complete that phase and write its outcome. Full delivery re-enters routing immediately; other modes stop at their selected boundary.
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
Full delivery grants its selected inner steps the authority needed to reach closeout. Progressive loading still exposes one phase at a time.
|
|
21
21
|
|
|
22
22
|
## Entry Modes
|
|
23
23
|
|
|
@@ -47,16 +47,14 @@ Completion of one phase does not imply loading the rest of the chain.
|
|
|
47
47
|
- A phase may delegate to `create-spec`, `write-backlog`, `create-plan`,
|
|
48
48
|
`implement-spec`, `debugging-phase`, or `docs-ingest-phase` only from
|
|
49
49
|
its own phase file.
|
|
50
|
-
- `review-phase`
|
|
51
|
-
|
|
52
|
-
then delivery stops. It never invokes that skill itself.
|
|
50
|
+
- In full delivery, activate `review-phase` as an authorized inner step below the three-pass budget. Outside full delivery, return its exact explicit invocation context and stop.
|
|
51
|
+
- After the third repair, run focused validation. Passing resumes routing toward closeout; terminal failure is a blocker.
|
|
53
52
|
- After a phase completes, write enough state for future resume. Review-triggered
|
|
54
53
|
repair uses the idempotent fields in
|
|
55
54
|
[references/phase-handoff.md](references/phase-handoff.md).
|
|
56
55
|
|
|
57
56
|
## Stop Conditions
|
|
58
57
|
|
|
59
|
-
-
|
|
60
|
-
- User requested a HITL checkpoint before the next phase.
|
|
58
|
+
- User explicitly requested a HITL checkpoint or one-phase mode and its resumable state was written.
|
|
61
59
|
- Router reaches closeout and final evidence is reported.
|
|
62
60
|
- Scope is ambiguous, stale, contradictory, or blocked by missing access.
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Use after implementation or whenever delivery has `review_due` for a stale or
|
|
4
4
|
missing retained review.
|
|
5
5
|
|
|
6
|
-
## Prepare
|
|
6
|
+
## Prepare Review
|
|
7
7
|
|
|
8
8
|
1. Validate accepted bounds and normalize a supported Git/diff target without
|
|
9
9
|
mutating it. Unsupported targets or invalid bounds enter `review_failed`
|
|
@@ -14,64 +14,39 @@ missing retained review.
|
|
|
14
14
|
current-route evidence. This is a zero-write no-op: do not persist
|
|
15
15
|
`review_due` or mutate any handoff, counter, or delivery status.
|
|
16
16
|
4. Only when recovered `review_count < 3`, persist `review_due` with the valid
|
|
17
|
-
normalized target and
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
5.
|
|
21
|
-
|
|
22
|
-
`review_run_id`, and enters `review_running`.
|
|
23
|
-
|
|
24
|
-
For `report_retention_pending`,
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
lenses.
|
|
17
|
+
normalized target and `$review-phase` invocation context defined in the
|
|
18
|
+
phase-handoff reference. Do not preallocate an ordinal or derive
|
|
19
|
+
`review_run_id` yet.
|
|
20
|
+
5. Full delivery invokes `$review-phase` with that context immediately. Other
|
|
21
|
+
modes return it and stop. Invocation preallocates ordinal `review_count + 1`,
|
|
22
|
+
fixes `review_run_id`, and enters `review_running`.
|
|
23
|
+
|
|
24
|
+
For `report_retention_pending`, use a `$review-phase` resume context with the
|
|
25
|
+
existing run id, local report identity, and fresh target/source hashes. Full
|
|
26
|
+
delivery resumes it immediately; other modes return it and stop. Retention
|
|
27
|
+
resumes without rerunning lenses.
|
|
28
28
|
|
|
29
29
|
## Route Retained Findings
|
|
30
30
|
|
|
31
31
|
After the retained report establishes the completed ordinal:
|
|
32
32
|
|
|
33
|
-
1.
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
first and persist the primary `debugging` or `implementation` route as
|
|
38
|
-
`post_debt_route`.
|
|
39
|
-
3. Without secondary debt, `debugging` opens debugging and `implementation`
|
|
40
|
-
opens implementation.
|
|
41
|
-
4. Primary `debt_follow_up` enters debt capture with `post_debt_route` set to
|
|
42
|
-
`docs_ingest` when documentation remains, otherwise `closeout`.
|
|
43
|
-
5. `docs_ingest` enters docs ingest. `closeout` enters closeout.
|
|
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.
|
|
44
37
|
|
|
45
38
|
Architecture debt may remain a secondary follow-up beside debugging or
|
|
46
|
-
implementation.
|
|
47
|
-
|
|
48
|
-
`
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
increment.
|
|
52
|
-
|
|
53
|
-
## Capture Debt Follow-Up
|
|
54
|
-
|
|
55
|
-
For each primary or secondary debt finding, enter `debt_follow_up` and upsert a
|
|
56
|
-
goal/spec-linked debt artifact exactly once. Key each entry by retained report
|
|
57
|
-
commit, retained report path, and stable finding ID. Persist the artifact path,
|
|
58
|
-
keys, captured finding IDs, and `post_debt_route` in the review handoff before
|
|
59
|
-
leaving this state. Set `post_debt_route` to the higher-priority `debugging` or
|
|
60
|
-
`implementation` route for secondary debt. For primary debt, set it to
|
|
61
|
-
`docs_ingest` when required documentation remains, otherwise `closeout`. On
|
|
62
|
-
resume, reuse matching keys, add only missing entries, and follow the recorded
|
|
63
|
-
route after every key is present.
|
|
64
|
-
|
|
65
|
-
Debt capture records unaccepted work; it does not implement the debt or open an
|
|
66
|
-
implementation task. Primary capture resumes `docs_ingest` or `closeout`;
|
|
67
|
-
secondary capture resumes its recorded repair. Capture happens once before that
|
|
68
|
-
route.
|
|
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.
|
|
69
44
|
|
|
70
45
|
## Completion
|
|
71
46
|
|
|
72
|
-
Before review, completion is a durable `review_due` handoff plus
|
|
73
|
-
|
|
47
|
+
Before review, completion is a durable `review_due` handoff plus an invocation
|
|
48
|
+
context; full delivery consumes it immediately. After review returns `review_routed`, completion
|
|
74
49
|
records report path, report SHA-256, report commit SHA, verified retained ref,
|
|
75
50
|
lineage, run id, recovered/projected counts, stable finding ids, primary route,
|
|
76
|
-
secondary debt route when present, and resulting state.
|
|
77
|
-
|
|
51
|
+
secondary debt route when present, and resulting state. Full delivery re-enters
|
|
52
|
+
routing; other modes stop at their boundary.
|
|
@@ -19,12 +19,12 @@ state take precedence over inferred artifact order.
|
|
|
19
19
|
`review_failed` even when a persisted counter is 3. Only after those checks
|
|
20
20
|
may it recover `review_count` and evaluate the budget in memory. Exhaustion
|
|
21
21
|
returns `review_budget_exhausted` with zero handoff or status writes. A count
|
|
22
|
-
below 3 persists `review_due
|
|
23
|
-
|
|
24
|
-
3. For `report_retention_pending`, load [review.md](review.md)
|
|
25
|
-
|
|
26
|
-
resumes without rerunning lenses. Stop on terminal
|
|
27
|
-
exact evidence.
|
|
22
|
+
below 3 persists `review_due`. Full delivery activates `$review-phase` with
|
|
23
|
+
that context; other modes return the exact explicit invocation context and stop.
|
|
24
|
+
3. For `report_retention_pending`, load [review.md](review.md) to resume
|
|
25
|
+
`$review-phase` in full delivery or return its exact resume context in other
|
|
26
|
+
modes. A fresh local report resumes without rerunning lenses. Stop on terminal
|
|
27
|
+
`review_failed` with its exact evidence.
|
|
28
28
|
4. Otherwise recover review state by `review_lineage_id`: read the highest valid
|
|
29
29
|
retained ordinal, reconcile the handoff `review_count` projection, then assess
|
|
30
30
|
target and source freshness separately.
|
|
@@ -33,30 +33,24 @@ state take precedence over inferred artifact order.
|
|
|
33
33
|
6. Resume an atomic handoff already in `debug_active` through [debug.md](debug.md)
|
|
34
34
|
or `repair_active` through [implement.md](implement.md). A recorded
|
|
35
35
|
`review_run_id` cannot increment `repair_count` again.
|
|
36
|
-
7.
|
|
37
|
-
records the goal/spec-linked debt artifact, then follows durable
|
|
38
|
-
`post_debt_route`: `debugging` or `implementation` for secondary debt;
|
|
39
|
-
`docs_ingest` or `closeout` for primary debt. It never implements the debt.
|
|
40
|
-
8. Route `focused_validation` to its recorded implementation or debugging owner.
|
|
36
|
+
7. Route `focused_validation` to its recorded implementation or debugging owner.
|
|
41
37
|
Passing becomes `clean_handoff`; failure remains repair epoch 3.
|
|
42
|
-
|
|
38
|
+
8. Route `clean_handoff` to [docs-ingest.md](docs-ingest.md) when docs remain,
|
|
43
39
|
otherwise [closeout.md](closeout.md).
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
unverified, load [spec.md](spec.md).
|
|
49
|
-
13. If the verified post-spec backlog projection is missing or stale, load
|
|
40
|
+
9. If no matching agent-ready `SPEC.md` exists, it is stale, contradictory, or
|
|
41
|
+
incomplete, or its remote retention or stable blob URL is missing or
|
|
42
|
+
unverified, load [spec.md](spec.md).
|
|
43
|
+
10. If the verified post-spec backlog projection is missing or stale, load
|
|
50
44
|
[backlog.md](backlog.md).
|
|
51
|
-
|
|
45
|
+
11. If no execution-ready matching plan exists, or it lacks dependencies, owned
|
|
52
46
|
paths, validation gates, or wave boundaries, load [plan.md](plan.md).
|
|
53
|
-
|
|
54
|
-
|
|
47
|
+
12. If accepted plan work is incomplete, load [implement.md](implement.md).
|
|
48
|
+
13. If implementation exists and its retained review is missing or stale, load
|
|
55
49
|
[review.md](review.md). That phase validates accepted bounds and normalizes a
|
|
56
50
|
supported target before any delivery-budget evaluation, then returns either
|
|
57
|
-
`review_failed`, `review_budget_exhausted`, or
|
|
58
|
-
|
|
59
|
-
|
|
51
|
+
`review_failed`, `review_budget_exhausted`, or a valid `$review-phase`
|
|
52
|
+
context. Full delivery consumes that context immediately; other modes stop.
|
|
53
|
+
14. Route remaining docs-affecting work to [docs-ingest.md](docs-ingest.md),
|
|
60
54
|
otherwise [closeout.md](closeout.md).
|
|
61
55
|
|
|
62
56
|
Only an explicitly new delivery goal with materially changed accepted bounds
|
|
@@ -65,9 +59,10 @@ revision, resume, rebase, commit, retry, and handoff preserve them.
|
|
|
65
59
|
|
|
66
60
|
## HITL And Resume
|
|
67
61
|
|
|
68
|
-
A HITL checkpoint
|
|
69
|
-
|
|
70
|
-
|
|
62
|
+
A HITL checkpoint exists only when the user explicitly requests it. Full
|
|
63
|
+
delivery otherwise continues across ordinary in-bounds operations without
|
|
64
|
+
confirmation. Earlier phases may have completed through direct skills; reuse
|
|
65
|
+
fresh matching artifacts rather than rerunning them.
|
|
71
66
|
|
|
72
67
|
## Output
|
|
73
68
|
|
package/dist/baseline/scaffold-baseline/skills/phases/delivery-phase/references/phase-handoff.md
CHANGED
|
@@ -30,19 +30,14 @@ accepted_bounds_identity:
|
|
|
30
30
|
accepted_bounds_hash:
|
|
31
31
|
review_lineage_id:
|
|
32
32
|
review_run_id:
|
|
33
|
-
state: review_due | review_running | report_retention_pending | review_routed |
|
|
33
|
+
state: review_due | review_running | report_retention_pending | review_routed | debug_active | repair_active | focused_validation | clean_handoff
|
|
34
34
|
primary_route:
|
|
35
|
-
secondary_architecture_follow_up:
|
|
36
|
-
post_debt_route:
|
|
37
35
|
review_count:
|
|
38
36
|
repair_count:
|
|
39
37
|
authoritative_report_path:
|
|
40
38
|
authoritative_report_commit:
|
|
41
39
|
verified_retained_ref:
|
|
42
40
|
stable_finding_ids:
|
|
43
|
-
debt_follow_up_artifact:
|
|
44
|
-
debt_follow_up_keys:
|
|
45
|
-
captured_debt_finding_ids:
|
|
46
41
|
```
|
|
47
42
|
|
|
48
43
|
`review_count` is a projection of the highest valid retained report ordinal for
|
|
@@ -51,26 +46,12 @@ writes active state, primary route, `repair_count = review_count`, and
|
|
|
51
46
|
idempotency `review_run_id`; complete the transition only after the write. A
|
|
52
47
|
recorded run id resumes its state without increment or guard fallthrough.
|
|
53
48
|
|
|
54
|
-
|
|
55
|
-
authoritative report path, and stable finding ID. The debt artifact links the
|
|
56
|
-
delivery goal and accepted Spec, records those keys, and lives outside the
|
|
57
|
-
immutable report. Replaying a recorded key reuses the existing entry. It never
|
|
58
|
-
opens implementation work for unaccepted debt.
|
|
49
|
+
## Review Invocation Context
|
|
59
50
|
|
|
60
|
-
|
|
61
|
-
`implementation` for secondary debt, and `docs_ingest` or `closeout` for
|
|
62
|
-
primary debt after capture. Resume follows this field after every debt key is
|
|
63
|
-
present. For primary debt, the successful capture transition atomically records
|
|
64
|
-
every debt key and sets state = `post_debt_route`. Resume continues from the
|
|
65
|
-
recorded `docs_ingest` or `closeout` state without repeating capture.
|
|
66
|
-
|
|
67
|
-
## Explicit Review Invocation Context
|
|
68
|
-
|
|
69
|
-
Delivery persists this block for `review_due` and returns it unchanged before
|
|
70
|
-
stopping:
|
|
51
|
+
Delivery persists this block for `review_due`:
|
|
71
52
|
|
|
72
53
|
```text
|
|
73
|
-
|
|
54
|
+
review_invocation_authority: full_delivery | explicit_operator
|
|
74
55
|
review_invocation_skill: $review-phase
|
|
75
56
|
review_invocation_mode: delivery
|
|
76
57
|
delivery_goal_identity:
|
|
@@ -82,14 +63,15 @@ current_route:
|
|
|
82
63
|
normalized_target:
|
|
83
64
|
```
|
|
84
65
|
|
|
85
|
-
The `review_due` handoff leaves `review_run_id` unset.
|
|
86
|
-
|
|
87
|
-
id, and enters
|
|
66
|
+
The `review_due` handoff leaves `review_run_id` unset. Full delivery consumes the
|
|
67
|
+
context immediately; other modes return it for explicit operator invocation.
|
|
68
|
+
Consumption preallocates the next ordinal, fixes the run id, and enters
|
|
69
|
+
`review_running`.
|
|
88
70
|
|
|
89
71
|
For `report_retention_pending`, the explicit resume context additionally carries
|
|
90
72
|
the existing `review_run_id`, ordinal, local report path and SHA-256, target hash,
|
|
91
|
-
source hashes, and intended retained ref.
|
|
92
|
-
|
|
73
|
+
source hashes, and intended retained ref. Full delivery resumes `$review-phase`;
|
|
74
|
+
other modes return the context for explicit retry without rerunning lenses.
|
|
93
75
|
|
|
94
76
|
After fix 3, `clean_handoff` is final authority. Link immutable review 3, final
|
|
95
77
|
changes, the same passing focused validation, and clean status.
|
|
@@ -3,10 +3,6 @@
|
|
|
3
3
|
This is the graph-authoring record. It is separate from review runtime
|
|
4
4
|
handoffs, retained reports, and delivery handoffs.
|
|
5
5
|
|
|
6
|
-
Test references below are source-repository provenance. The installed package
|
|
7
|
-
omits the source repository test files; reproduce a claim from the immutable
|
|
8
|
-
source commit with its named command and contract seam.
|
|
9
|
-
|
|
10
6
|
## Router Selection
|
|
11
7
|
|
|
12
8
|
Phase: router
|
|
@@ -366,8 +362,8 @@ Artifacts:
|
|
|
366
362
|
Validation:
|
|
367
363
|
|
|
368
364
|
- Disclosure completion was durable.
|
|
369
|
-
- The focused route contract was observed RED
|
|
370
|
-
authority.
|
|
365
|
+
- The focused route contract was observed RED at 16/23: seven assertions still
|
|
366
|
+
addressed deleted or relocated authority.
|
|
371
367
|
- The nine authoring route predictions and runtime storage/no-write cases were
|
|
372
368
|
not yet executable or recorded, so `test-routes.md` was the single route.
|
|
373
369
|
|
|
@@ -414,8 +410,8 @@ Validation:
|
|
|
414
410
|
- All nine predictions matched derivation; no runtime contract mismatch required
|
|
415
411
|
repair.
|
|
416
412
|
- Stale, out-of-scope, and invalid artifact subcases resolve separately.
|
|
417
|
-
- The focused
|
|
418
|
-
deleted-root assertions and adding runtime graph contracts.
|
|
413
|
+
- The focused suite moved from observed RED 16/23 to GREEN 25/25 after replacing
|
|
414
|
+
deleted-root assertions and adding two runtime graph contracts.
|
|
419
415
|
- Router priorities 1-12 cover terminal, checkpoint, blocked, and all four gate
|
|
420
416
|
outputs. Delivery and standalone storage, conflict, and every declared
|
|
421
417
|
authoritative no-write class are executable assertions.
|
|
@@ -445,7 +441,7 @@ storage modes, no-write outcomes, conflicts, and router classes were tested.
|
|
|
445
441
|
|
|
446
442
|
Artifacts:
|
|
447
443
|
|
|
448
|
-
-
|
|
444
|
+
- `tests/review-phase-graph.contract.test.mjs`: 25 focused graph contracts.
|
|
449
445
|
- `Test Routes Outcome`: nine frozen predictions with nine matching derived
|
|
450
446
|
routes and zero graph repairs.
|
|
451
447
|
|
|
@@ -478,7 +474,8 @@ Artifacts:
|
|
|
478
474
|
|
|
479
475
|
- `SKILL.md`, `agents/openai.yaml`, `phases/router.md`, four flat gate files,
|
|
480
476
|
four references, and `scripts/review-contract.mjs`.
|
|
481
|
-
-
|
|
477
|
+
- `tests/review-phase-graph.contract.test.mjs` and all eight shared
|
|
478
|
+
`tests/*.test.mjs` files.
|
|
482
479
|
|
|
483
480
|
Validation:
|
|
484
481
|
|
|
@@ -501,7 +498,7 @@ Validation:
|
|
|
501
498
|
- The no-op test required zero deletions: each remaining instruction changes
|
|
502
499
|
invocation, routing, evidence, validation, persistence, or stop behavior.
|
|
503
500
|
- `SKILL.md` and `agents/openai.yaml` consistently disable implicit invocation.
|
|
504
|
-
-
|
|
501
|
+
- Focused tests pass 25/25; all eight shared test files pass 94/94. Both Node
|
|
505
502
|
files pass syntax checks, and the scoped diff passes `git diff --check`.
|
|
506
503
|
- The requested literal `python` command is unavailable. The same validator
|
|
507
504
|
executed through `uv run --with pyyaml python` and failed because
|
|
@@ -585,8 +582,8 @@ Artifacts:
|
|
|
585
582
|
|
|
586
583
|
- `SKILL.md`, `agents/openai.yaml`, `phases/router.md`, four flat gate files,
|
|
587
584
|
four references, and `scripts/review-contract.mjs`.
|
|
588
|
-
-
|
|
589
|
-
applicable `skills` packaging validator output.
|
|
585
|
+
- `tests/review-phase-graph.contract.test.mjs`, all eight shared test files,
|
|
586
|
+
and the applicable `skills` packaging validator output.
|
|
590
587
|
|
|
591
588
|
Validation:
|
|
592
589
|
|
|
@@ -604,7 +601,7 @@ Validation:
|
|
|
604
601
|
form the progressive-disclosure trace.
|
|
605
602
|
- The no-op test required zero deletions. Root frontmatter and
|
|
606
603
|
`agents/openai.yaml` consistently enforce explicit-only invocation.
|
|
607
|
-
-
|
|
604
|
+
- Focused tests pass 25/25; all eight shared test files pass 94/94. Both Node
|
|
608
605
|
files pass syntax checks, and the scoped diff passes `git diff --check`.
|
|
609
606
|
- The applicable packaging validator exits zero, validates the local path,
|
|
610
607
|
discovers 106 skills, and lists `review-phase` with the exact source
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
## Entry Guard
|
|
4
4
|
|
|
5
5
|
The router selected this gate from fresh `review_due` evidence supplied by an
|
|
6
|
-
explicit
|
|
6
|
+
authorized full-delivery or explicit-operator invocation. The review mode is `delivery` or `standalone`,
|
|
7
7
|
and no valid later-state evidence already owns the run.
|
|
8
8
|
|
|
9
9
|
## Inputs
|
|
@@ -11,8 +11,6 @@ returns the zero-write `review_budget_exhausted` terminal.
|
|
|
11
11
|
## Inputs
|
|
12
12
|
|
|
13
13
|
- exact local report path and bytes
|
|
14
|
-
- exact bytes resolved from `reportCommitSha:reportPath` for every retained
|
|
15
|
-
candidate, supplied to the validator as `resolvedReportBytes`
|
|
16
14
|
- primitive accepted-bounds, normalized-target, and governing-source evidence
|
|
17
15
|
- review mode, lineage, run ID, and delivery ordinal when applicable
|
|
18
16
|
- expected report SHA-256 and allowed navigation/wiki-log envelope paths
|
|
@@ -53,11 +51,8 @@ review_run_id)` independently. Reuse one unique valid candidate, including
|
|
|
53
51
|
the report and allowed envelope, then push or use the approved ref. Preserve
|
|
54
52
|
the report bytes exactly.
|
|
55
53
|
6. Verify that the retained ref contains the exact report commit and that the
|
|
56
|
-
commit changed only approved envelope paths.
|
|
57
|
-
|
|
58
|
-
bytes to the retained-pass validator, and require exact equality with the
|
|
59
|
-
local report bytes. A local digest or caller assertion cannot replace this
|
|
60
|
-
commit-tree read.
|
|
54
|
+
commit changed only approved envelope paths. Run the complete retained-pass
|
|
55
|
+
validator again against the retained blob and current primitive evidence.
|
|
61
56
|
7. Only a unique valid retained delivery report establishes its ordinal.
|
|
62
57
|
Reconcile the delivery `review_count` projection from the highest unique
|
|
63
58
|
valid retained ordinal. Standalone retention changes no delivery counter.
|
|
@@ -86,8 +81,6 @@ review_run_id)` independently. Reuse one unique valid candidate, including
|
|
|
86
81
|
- same-run candidate inventory and uniqueness decision
|
|
87
82
|
- report commit SHA and its exact changed-path set
|
|
88
83
|
- approved retained ref and proof that it contains the report commit
|
|
89
|
-
- exact `reportCommitSha:reportPath` resolution and committed/local byte
|
|
90
|
-
equality
|
|
91
84
|
- delivery ordinal and reconciled counter projection, or standalone mode
|
|
92
85
|
|
|
93
86
|
## Declared Exits
|
|
@@ -31,11 +31,13 @@ debug, debt, documentation, or closeout work.
|
|
|
31
31
|
1. Revalidate the retained blob, canonical identities, approved commit paths,
|
|
32
32
|
same-run uniqueness, ref containment, and current freshness. Reuse only the
|
|
33
33
|
immutable authority block inside those retained bytes.
|
|
34
|
-
2.
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
34
|
+
2. Derive the primary route from retained findings in this order:
|
|
35
|
+
- any finding with runtime-failure evidence -> `debugging`
|
|
36
|
+
- otherwise, any in-scope non-runtime blocking finding -> `implementation`
|
|
37
|
+
- otherwise, any broad architecture-debt finding -> `debt_follow_up`
|
|
38
|
+
- otherwise, incomplete required documentation -> `docs_ingest`
|
|
39
|
+
- otherwise -> `closeout`
|
|
40
|
+
3. Set `secondary_architecture_follow_up` only when a broad architecture-debt
|
|
39
41
|
finding accompanies a higher-priority debugging or implementation route.
|
|
40
42
|
4. Require the derived result to equal the retained report's `routing` object.
|
|
41
43
|
A mismatch is invalid retained routing evidence and routes to
|
|
@@ -61,7 +63,7 @@ debug, debt, documentation, or closeout work.
|
|
|
61
63
|
|
|
62
64
|
- valid retained-pass result and final freshness result
|
|
63
65
|
- retained report path, SHA-256, commit, and containing ref
|
|
64
|
-
- stable finding IDs
|
|
66
|
+
- stable finding IDs used by each route class
|
|
65
67
|
- deterministic precedence result and exact match to report `routing`
|
|
66
68
|
- returned mode-specific state and routing-evidence artifact
|
|
67
69
|
|
|
@@ -51,8 +51,7 @@ 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,
|
|
55
|
-
`implementation`, `debt_follow_up`, or `docs_ingest`.
|
|
54
|
+
evidence, and action.
|
|
56
55
|
7. Run only the smallest safe readonly validation needed to verify candidates or
|
|
57
56
|
governing acceptance evidence. Broader checks require explicit accepted spec
|
|
58
57
|
or plan authority. Record missing required RED/GREEN evidence as a finding;
|
|
@@ -62,11 +61,10 @@ scope; the parent rejects stale, expanded, duplicated, or unverified output.
|
|
|
62
61
|
caches, generated files, snapshots, lockfiles, or state run in a disposable
|
|
63
62
|
checkout or snapshot rooted at the frozen revision. Reconcile exact commands,
|
|
64
63
|
isolation mode, hashes, output, skipped checks, and residual risk.
|
|
65
|
-
9.
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
implementation. Finding prose never selects or reranks a route.
|
|
64
|
+
9. Derive the report route from verified findings: runtime evidence first,
|
|
65
|
+
otherwise an in-scope non-runtime blocker, otherwise broad architecture debt,
|
|
66
|
+
otherwise documentation ingest or closeout by documentation completeness.
|
|
67
|
+
Architecture debt may remain a secondary follow-up.
|
|
70
68
|
10. Assemble exactly one complete local report using
|
|
71
69
|
[`../references/durable-report.md`](../references/durable-report.md). Record
|
|
72
70
|
an explicit outcome for every lens. After its final bytes are written, treat
|
|
@@ -97,7 +95,6 @@ The run is complete only when one local report contains:
|
|
|
97
95
|
and mode-specific delivery identities
|
|
98
96
|
- explicit Standards, skill-adherence, architecture, simplify, and Spec outcomes
|
|
99
97
|
- every verified stable finding and no unverified advisory candidate
|
|
100
|
-
- one validated `return_route` on each accepted finding
|
|
101
98
|
- evidence-cardinality results for all applicable skill guidance and notes
|
|
102
99
|
- exact validation commands, isolation, before/after hashes, outcomes, skipped
|
|
103
100
|
checks, and residual risk
|