@punks/cli 4.0.4 → 5.0.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/dist/BASELINE_CHANGELOG.md +20 -1
- package/dist/CHANGELOG.md +33 -0
- package/dist/baseline/scaffold-baseline/baseline.json +563 -5
- package/dist/baseline/scaffold-baseline/data/scripts/harness-projection/authoring.d.mts +23 -0
- package/dist/baseline/scaffold-baseline/data/scripts/harness-projection/authoring.mjs +84 -0
- package/dist/baseline/scaffold-baseline/data/scripts/harness-projection/authoring.test.ts +79 -0
- package/dist/baseline/scaffold-baseline/data/scripts/harness-projection/lint-feedback.test.ts +60 -28
- package/dist/baseline/scaffold-baseline/data/scripts/sync-subagents.mjs +166 -3
- package/dist/baseline/scaffold-baseline/data/shared-agents.md +55 -0
- package/dist/baseline/scaffold-baseline/skills/agnostic/cli/hi-cli/references/post-command-flow.md +12 -0
- package/dist/baseline/scaffold-baseline/skills/agnostic/generic/handoff/SKILL.md +18 -5
- package/dist/baseline/scaffold-baseline/skills/agnostic/planning/create-plan/SKILL.md +10 -2
- package/dist/baseline/scaffold-baseline/skills/agnostic/planning/create-plan/references/plan-schema.md +28 -8
- package/dist/baseline/scaffold-baseline/skills/agnostic/planning/create-plan/references/planner-task-graph.md +7 -3
- package/dist/baseline/scaffold-baseline/skills/agnostic/planning/create-verification-skill/SKILL.md +66 -0
- package/dist/baseline/scaffold-baseline/skills/agnostic/planning/create-verification-skill/references/upstream.md +20 -0
- package/dist/baseline/scaffold-baseline/skills/agnostic/planning/implement-spec/SKILL.md +16 -41
- package/dist/baseline/scaffold-baseline/skills/agnostic/planning/implement-spec/assets/IMPLEMENTATION-NOTES-TEMPLATE.md +14 -0
- package/dist/baseline/scaffold-baseline/skills/agnostic/planning/implement-spec/references/architecture-conformance.md +10 -6
- package/dist/baseline/scaffold-baseline/skills/agnostic/planning/implement-spec/references/lifecycle.md +47 -7
- package/dist/baseline/scaffold-baseline/skills/agnostic/planning/implement-spec/references/parallel-orchestration.md +102 -134
- package/dist/baseline/scaffold-baseline/skills/agnostic/planning/implement-spec/references/parallel-worker-brief.md +77 -67
- package/dist/baseline/scaffold-baseline/skills/agnostic/planning/implement-spec/references/parallel.md +19 -39
- package/dist/baseline/scaffold-baseline/skills/agnostic/planning/implement-spec/references/runtime-product-validation.md +27 -0
- package/dist/baseline/scaffold-baseline/skills/agnostic/planning/swarm-planner/SKILL.md +27 -2
- package/dist/baseline/scaffold-baseline/skills/agnostic/planning/update-verification-skill/SKILL.md +81 -0
- package/dist/baseline/scaffold-baseline/skills/agnostic/planning/verify-behavior/SKILL.md +105 -65
- package/dist/baseline/scaffold-baseline/skills/agnostic/quality/autoreview/SKILL.md +17 -4
- package/dist/baseline/scaffold-baseline/skills/agnostic/quality/autoreview/scripts/autoreview +102 -5
- package/dist/baseline/scaffold-baseline/skills/agnostic/subagents/swarm-planner/SKILL.md +27 -2
- package/dist/baseline/scaffold-baseline/skills/phases/delivery-phase/SKILL.md +11 -13
- package/dist/baseline/scaffold-baseline/skills/phases/delivery-phase/phases/backlog.md +4 -0
- package/dist/baseline/scaffold-baseline/skills/phases/delivery-phase/phases/closeout.md +12 -4
- package/dist/baseline/scaffold-baseline/skills/phases/delivery-phase/phases/debug.md +11 -5
- package/dist/baseline/scaffold-baseline/skills/phases/delivery-phase/phases/docs-ingest.md +4 -0
- package/dist/baseline/scaffold-baseline/skills/phases/delivery-phase/phases/handback.md +6 -2
- package/dist/baseline/scaffold-baseline/skills/phases/delivery-phase/phases/implement.md +12 -7
- package/dist/baseline/scaffold-baseline/skills/phases/delivery-phase/phases/plan.md +7 -1
- package/dist/baseline/scaffold-baseline/skills/phases/delivery-phase/phases/review.md +61 -22
- package/dist/baseline/scaffold-baseline/skills/phases/delivery-phase/phases/router.md +45 -91
- package/dist/baseline/scaffold-baseline/skills/phases/delivery-phase/phases/spec.md +4 -0
- package/dist/baseline/scaffold-baseline/skills/phases/delivery-phase/references/artifact-state.md +21 -9
- package/dist/baseline/scaffold-baseline/skills/phases/delivery-phase/references/context-continuity.md +109 -0
- package/dist/baseline/scaffold-baseline/skills/phases/delivery-phase/references/failure-continuity.md +27 -0
- package/dist/baseline/scaffold-baseline/skills/phases/delivery-phase/references/phase-handoff.md +32 -20
- package/dist/baseline/scaffold-baseline/skills/phases/docs-ingest-phase/SKILL.md +4 -0
- package/dist/baseline/scaffold-baseline/skills/phases/docs-ingest-phase/references/wiki-ingest.md +4 -0
- package/dist/baseline/scaffold-baseline/skills/phases/review-phase/phases/prepare-review.md +41 -8
- package/dist/baseline/scaffold-baseline/skills/phases/review-phase/phases/retain-report.md +13 -4
- package/dist/baseline/scaffold-baseline/skills/phases/review-phase/phases/router.md +1 -1
- package/dist/baseline/scaffold-baseline/skills/phases/review-phase/phases/run-review.md +24 -18
- package/dist/baseline/scaffold-baseline/skills/phases/review-phase/references/durable-report.md +40 -6
- package/dist/baseline/scaffold-baseline/skills/phases/review-phase/references/review-packet.md +72 -0
- package/dist/baseline/scaffold-baseline/skills/phases/review-phase/references/runtime-handoff.md +3 -0
- package/dist/baseline/scaffold-baseline/skills/phases/review-phase/references/state-graph.md +51 -42
- package/dist/baseline/scaffold-baseline/skills/phases/review-phase/scripts/review-contract.mjs +239 -4
- package/dist/baseline/scaffold-baseline.json +5 -5
- package/dist/baseline/scaffold-baseline.tgz +0 -0
- package/dist/data/scripts/harness-projection/authoring.d.mts +23 -0
- package/dist/data/scripts/harness-projection/authoring.mjs +84 -0
- package/dist/data/scripts/sync-subagents.mjs +129 -3
- package/dist/index.js +1412 -1396
- package/dist/skills/agnostic/cli/hi-cli/references/post-command-flow.md +12 -0
- package/dist/skills/agnostic/generic/handoff/SKILL.md +18 -5
- package/dist/skills/agnostic/planning/create-plan/SKILL.md +10 -2
- package/dist/skills/agnostic/planning/create-plan/references/plan-schema.md +28 -8
- package/dist/skills/agnostic/planning/create-plan/references/planner-task-graph.md +7 -3
- package/dist/skills/agnostic/planning/create-verification-skill/SKILL.md +66 -0
- package/dist/skills/agnostic/planning/create-verification-skill/references/upstream.md +20 -0
- package/dist/skills/agnostic/planning/implement-spec/SKILL.md +16 -41
- package/dist/skills/agnostic/planning/implement-spec/assets/IMPLEMENTATION-NOTES-TEMPLATE.md +14 -0
- package/dist/skills/agnostic/planning/implement-spec/references/architecture-conformance.md +10 -6
- package/dist/skills/agnostic/planning/implement-spec/references/lifecycle.md +47 -7
- package/dist/skills/agnostic/planning/implement-spec/references/parallel-orchestration.md +102 -134
- package/dist/skills/agnostic/planning/implement-spec/references/parallel-worker-brief.md +77 -67
- package/dist/skills/agnostic/planning/implement-spec/references/parallel.md +19 -39
- package/dist/skills/agnostic/planning/implement-spec/references/runtime-product-validation.md +27 -0
- package/dist/skills/agnostic/planning/swarm-planner/SKILL.md +27 -2
- package/dist/skills/agnostic/planning/update-verification-skill/SKILL.md +81 -0
- package/dist/skills/agnostic/planning/verify-behavior/SKILL.md +105 -65
- package/dist/skills/agnostic/quality/autoreview/SKILL.md +17 -4
- package/dist/skills/agnostic/quality/autoreview/scripts/autoreview +102 -5
- package/dist/skills/agnostic/subagents/swarm-planner/SKILL.md +27 -2
- package/dist/skills/phases/delivery-phase/SKILL.md +11 -13
- package/dist/skills/phases/delivery-phase/phases/backlog.md +4 -0
- package/dist/skills/phases/delivery-phase/phases/closeout.md +12 -4
- package/dist/skills/phases/delivery-phase/phases/debug.md +11 -5
- package/dist/skills/phases/delivery-phase/phases/docs-ingest.md +4 -0
- package/dist/skills/phases/delivery-phase/phases/handback.md +6 -2
- package/dist/skills/phases/delivery-phase/phases/implement.md +12 -7
- package/dist/skills/phases/delivery-phase/phases/plan.md +7 -1
- package/dist/skills/phases/delivery-phase/phases/review.md +61 -22
- package/dist/skills/phases/delivery-phase/phases/router.md +45 -91
- package/dist/skills/phases/delivery-phase/phases/spec.md +4 -0
- package/dist/skills/phases/delivery-phase/references/artifact-state.md +21 -9
- package/dist/skills/phases/delivery-phase/references/context-continuity.md +109 -0
- package/dist/skills/phases/delivery-phase/references/failure-continuity.md +27 -0
- package/dist/skills/phases/delivery-phase/references/phase-handoff.md +32 -20
- package/dist/skills/phases/docs-ingest-phase/SKILL.md +4 -0
- package/dist/skills/phases/docs-ingest-phase/references/wiki-ingest.md +4 -0
- package/dist/skills/phases/review-phase/phases/prepare-review.md +40 -8
- package/dist/skills/phases/review-phase/phases/retain-report.md +13 -4
- package/dist/skills/phases/review-phase/phases/router.md +1 -1
- package/dist/skills/phases/review-phase/phases/run-review.md +24 -18
- package/dist/skills/phases/review-phase/references/durable-report.md +40 -6
- package/dist/skills/phases/review-phase/references/review-packet.md +72 -0
- package/dist/skills/phases/review-phase/references/runtime-handoff.md +3 -0
- package/dist/skills/phases/review-phase/references/state-graph.md +21 -12
- package/dist/skills/phases/review-phase/scripts/review-contract.mjs +137 -4
- package/package.json +4 -1
|
@@ -18,11 +18,13 @@ Load `debugging-phase` only after this phase is selected.
|
|
|
18
18
|
opening another goal.
|
|
19
19
|
- Preserve review lineage, `review_count`, `repair_count`, and the opening
|
|
20
20
|
`review_run_id` through the repair.
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
21
|
+
|
|
22
|
+
## Accepted Repair Continuity
|
|
23
|
+
|
|
24
|
+
Follow [review.md](review.md) for Focused Repair Validation, affected Verification
|
|
25
|
+
reruns and risk-triggered second-pass eligibility. Preserve lineage, retained
|
|
26
|
+
ordinals and consumed repair run IDs. On failure, use
|
|
27
|
+
[bounded diagnosis and scope custody](../references/failure-continuity.md).
|
|
26
28
|
|
|
27
29
|
## Completion State
|
|
28
30
|
|
|
@@ -35,3 +37,7 @@ Write or verify:
|
|
|
35
37
|
- resulting state and preserved counter evidence
|
|
36
38
|
|
|
37
39
|
Then stop or re-enter `delivery-phase` for routing.
|
|
40
|
+
|
|
41
|
+
Emit the [common Phase Result](../references/context-continuity.md#common-phase-result)
|
|
42
|
+
with pointers to this completion evidence. Continue only in Full Delivery;
|
|
43
|
+
otherwise stop at the requested boundary.
|
|
@@ -25,3 +25,7 @@ Write or verify:
|
|
|
25
25
|
- any follow-up docs debt
|
|
26
26
|
|
|
27
27
|
Then stop or re-enter `delivery-phase` for routing.
|
|
28
|
+
|
|
29
|
+
Emit the [common Phase Result](../references/context-continuity.md#common-phase-result)
|
|
30
|
+
with pointers to this completion evidence. Continue only in Full Delivery;
|
|
31
|
+
otherwise stop at the requested boundary.
|
|
@@ -7,8 +7,8 @@ The router selected current evidence that triggers `$handback`.
|
|
|
7
7
|
## Bounded Action
|
|
8
8
|
|
|
9
9
|
1. Invoke `$handback` with the active delivery evidence.
|
|
10
|
-
2.
|
|
11
|
-
|
|
10
|
+
2. Retain its complete outcome in the durable state artifact; put its Context
|
|
11
|
+
Pointer and exact blocker in the compact Delivery Handoff.
|
|
12
12
|
3. Stop.
|
|
13
13
|
|
|
14
14
|
## Completion Evidence
|
|
@@ -21,3 +21,7 @@ The router selected current evidence that triggers `$handback`.
|
|
|
21
21
|
|
|
22
22
|
Return terminal `human_steering_required`. Resume routing only after the
|
|
23
23
|
`$handback` authority guard passes.
|
|
24
|
+
|
|
25
|
+
Emit the [common Phase Result](../references/context-continuity.md#common-phase-result)
|
|
26
|
+
with pointers to this completion evidence. Stop in every mode until the
|
|
27
|
+
`$handback` authority guard passes.
|
|
@@ -22,7 +22,7 @@ silently renaming them.
|
|
|
22
22
|
- For provider-task work, immediately route each directly observed work start,
|
|
23
23
|
blocker, pull request, merge, staging deployment, or production deployment
|
|
24
24
|
through `write-backlog`'s
|
|
25
|
-
[delivery-status.md](
|
|
25
|
+
[delivery-status.md](../../../agnostic/requirements/write-backlog/references/delivery-status.md) branch.
|
|
26
26
|
Require exact readback before advancing the Task. Planning-only work emits no
|
|
27
27
|
provider lifecycle mutation or readback claim.
|
|
28
28
|
- Merge is never deployment evidence. Merge, staging, and production remain
|
|
@@ -41,12 +41,13 @@ silently renaming them.
|
|
|
41
41
|
- If runtime evidence appears during validation, finish the phase handoff and route to debug.
|
|
42
42
|
- Preserve review lineage, `review_count`, `repair_count`, and the opening
|
|
43
43
|
`review_run_id` through the repair.
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
44
|
+
|
|
45
|
+
## Accepted Repair Continuity
|
|
46
|
+
|
|
47
|
+
Follow [review.md](review.md) for Focused Repair Validation, affected Verification
|
|
48
|
+
reruns and risk-triggered second-pass eligibility. Preserve lineage, retained
|
|
49
|
+
ordinals and consumed repair run IDs. On failure, use
|
|
50
|
+
[bounded diagnosis and scope custody](../references/failure-continuity.md).
|
|
50
51
|
|
|
51
52
|
## Completion State
|
|
52
53
|
|
|
@@ -63,3 +64,7 @@ Write or verify:
|
|
|
63
64
|
`clean_handoff`, or blocked
|
|
64
65
|
|
|
65
66
|
Then stop or re-enter `delivery-phase` for routing.
|
|
67
|
+
|
|
68
|
+
Emit the [common Phase Result](../references/context-continuity.md#common-phase-result)
|
|
69
|
+
with pointers to this completion evidence. Continue only in Full Delivery;
|
|
70
|
+
otherwise stop at the requested boundary.
|
|
@@ -11,7 +11,9 @@ Load `create-plan` only after this phase is selected.
|
|
|
11
11
|
|
|
12
12
|
- Verify the spec still matches the requested goal.
|
|
13
13
|
- Preserve tracker hierarchy and every child-story or sub-issue requirement.
|
|
14
|
-
- Require dependencies,
|
|
14
|
+
- Require dependencies, Active Write Scopes, Read Dependencies, Shared Runtime
|
|
15
|
+
Resources, Relevant Input Set identities, validation gates, review routing and
|
|
16
|
+
explicit wave boundaries through `create-plan` and its `swarm-planner` primitive.
|
|
15
17
|
- Group independent tasks with disjoint write scopes into the same wave.
|
|
16
18
|
- Put every currently unblocked task with a disjoint write scope in the same
|
|
17
19
|
wave. Use a one-task wave only when dependencies or ownership leave one task
|
|
@@ -27,3 +29,7 @@ Write or verify:
|
|
|
27
29
|
- planned review and docs-ingest expectations
|
|
28
30
|
|
|
29
31
|
Then stop or re-enter `delivery-phase` for routing.
|
|
32
|
+
|
|
33
|
+
Emit the [common Phase Result](../references/context-continuity.md#common-phase-result)
|
|
34
|
+
with pointers to this completion evidence. Continue only in Full Delivery;
|
|
35
|
+
otherwise stop at the requested boundary.
|
|
@@ -1,30 +1,69 @@
|
|
|
1
1
|
# Review Phase
|
|
2
2
|
|
|
3
|
-
Use after
|
|
4
|
-
missing retained review
|
|
3
|
+
Use after `implement-spec` returns complete implementation evidence. For a stale
|
|
4
|
+
or missing retained review, first recheck the same completion gates against the
|
|
5
|
+
current snapshot.
|
|
5
6
|
|
|
6
7
|
## Prepare Review
|
|
7
8
|
|
|
8
|
-
1.
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
9
|
+
1. Require implementation, applicable task checks and Task Gates, Verification,
|
|
10
|
+
parent shared-summary reconciliation, Architecture Checkpoints and final
|
|
11
|
+
acceptance evidence. Missing or stale proof returns the exact owning gate;
|
|
12
|
+
it cannot enter Code Review. Review consumes Verification evidence while
|
|
13
|
+
implementation owns verifier execution and maintenance.
|
|
14
|
+
2. Validate accepted bounds and normalize the supported Git/diff target without
|
|
15
|
+
mutation. Invalid bounds or unsupported targets return `review_failed` with
|
|
16
|
+
exact evidence, no report and no completed-count change.
|
|
17
|
+
3. Recover completed Full Code Review Passes from valid retained evidence for
|
|
18
|
+
this delivery lineage and reconcile `review_count`. Interrupted, incomplete
|
|
19
|
+
or invalidated attempts are neither clean nor completed; preserve their
|
|
20
|
+
attempt identity and missing coverage without consuming completed allowance.
|
|
21
|
+
4. Default to one Full Code Review Pass over the frozen implemented change.
|
|
22
|
+
After a completed pass, apply the repair rules below before opening another.
|
|
23
|
+
At two completed passes, return `review_budget_exhausted` unless explicit
|
|
24
|
+
human direction authorizes another. Record the exhausted route evidence;
|
|
25
|
+
preserve retained reports, counts and pending work.
|
|
26
|
+
5. For an eligible pass, persist `review_due`, the normalized target and
|
|
27
|
+
`$review-phase` invocation context from the phase-handoff reference. Full
|
|
28
|
+
delivery invokes it immediately; other modes return that context and stop.
|
|
29
|
+
Invocation fixes the attempt identity and proposed next completed ordinal;
|
|
30
|
+
only complete coverage plus valid retained evidence establishes completion.
|
|
31
|
+
|
|
32
|
+
The review owner prepares one frozen Review Packet for the comprehensive primary
|
|
33
|
+
reviewer and mandatory independent risk-focused challenger. Completion requires
|
|
34
|
+
explicit primary outcomes for Standards, skill adherence, architecture, simplify
|
|
35
|
+
and Spec, plus complete challenger coverage for its bounded independent risk
|
|
36
|
+
area. The parent adjudicates findings and owns the report. Reach
|
|
37
|
+
[review-phase](../../review-phase/SKILL.md) for that protocol.
|
|
38
|
+
|
|
39
|
+
A semantic input change during an active attempt invalidates it. Record the
|
|
40
|
+
changed input, preserve the incomplete attempt evidence and start a fresh attempt
|
|
41
|
+
over the new frozen target after rechecking affected implementation gates. This
|
|
42
|
+
is distinct from accepted repair after a completed pass.
|
|
43
|
+
|
|
44
|
+
For `report_retention_pending`, recheck target/source freshness and resume the
|
|
45
|
+
existing run and local report identity without rerunning reviewers. Semantic
|
|
46
|
+
change instead invalidates the attempt. A retention retry alone grants neither
|
|
47
|
+
a new pass nor a second completed ordinal.
|
|
48
|
+
|
|
49
|
+
## Validate Accepted Repair
|
|
50
|
+
|
|
51
|
+
Ordinary accepted repair runs Focused Repair Validation and reruns only
|
|
52
|
+
Verification scenarios whose evidence it invalidated. Keep matching unaffected
|
|
53
|
+
proof with its identity and freshness. Passing focused checks resumes delivery
|
|
54
|
+
routing without automatically opening a second Full Code Review Pass.
|
|
55
|
+
|
|
56
|
+
One second completed pass is eligible only when accepted repair changes
|
|
57
|
+
architecture, security or authorization, a public contract, runtime or deployment
|
|
58
|
+
topology, or accepted scope. Record the changed risk category and accepted repair
|
|
59
|
+
evidence before requesting it; changed accepted scope must already have explicit
|
|
60
|
+
authority. Recheck implementation completion and freeze the repaired target.
|
|
61
|
+
The two-completed-pass ceiling still applies.
|
|
62
|
+
|
|
63
|
+
Continue a repair only when new evidence advances diagnosis or validation, or a
|
|
64
|
+
remaining discriminating diagnostic can resolve the failure. Record that evidence
|
|
65
|
+
or diagnostic before retrying. A stagnant loop returns an exact blocker and
|
|
66
|
+
remaining work; it never counts as progress or expands the review allowance.
|
|
28
67
|
|
|
29
68
|
## Route Retained Findings
|
|
30
69
|
|
|
@@ -1,93 +1,47 @@
|
|
|
1
1
|
# Router Phase
|
|
2
2
|
|
|
3
|
-
Choose one next phase from durable
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
13. For durable `closeout`, load [closeout.md](closeout.md).
|
|
49
|
-
14. If no matching agent-ready `SPEC.md` exists for bounded requirements, or the
|
|
50
|
-
specification is stale, contradictory, incomplete, or lacks verified remote
|
|
51
|
-
retention, route them to Requirements Phase. Requirements Phase owns the
|
|
52
|
-
Requirements Grill, Create Spec, and Write Backlog sequence.
|
|
53
|
-
15. If a verified specification lacks its current Write Backlog result, route
|
|
54
|
-
the retained specification authority to Requirements Phase for
|
|
55
|
-
delivery-depth projection and exact readback.
|
|
56
|
-
16. If no execution-ready matching plan exists, or it lacks dependencies, owned
|
|
57
|
-
paths, validation gates, or wave boundaries, load [plan.md](plan.md).
|
|
58
|
-
17. If accepted plan work is incomplete, load [implement.md](implement.md).
|
|
59
|
-
18. If implementation exists and its retained review is missing or stale, load
|
|
60
|
-
[review.md](review.md). That phase validates accepted bounds and normalizes a
|
|
61
|
-
supported target before any delivery-budget evaluation, then returns either
|
|
62
|
-
`review_failed`, `review_budget_exhausted`, or a valid `$review-phase`
|
|
63
|
-
context. Full delivery consumes that context immediately; other modes
|
|
64
|
-
return the exact explicit invocation context and stop.
|
|
65
|
-
19. Route remaining docs-affecting work to [docs-ingest.md](docs-ingest.md),
|
|
66
|
-
otherwise [closeout.md](closeout.md).
|
|
67
|
-
|
|
68
|
-
Finder context is optional. Route direct bounded input to Requirements Phase
|
|
69
|
-
without creating a Finder artifact. When the caller supplies Finder context,
|
|
70
|
-
pass only its exact handle for Requirements Phase to resolve.
|
|
71
|
-
|
|
72
|
-
When a linked provider Task has a newly observed work start, blocker, pull
|
|
73
|
-
request, merge, staging deployment, or production deployment without exact
|
|
74
|
-
readback, route to [implement.md](implement.md) before any later phase.
|
|
75
|
-
|
|
76
|
-
Only an explicitly new delivery goal with materially changed accepted bounds
|
|
77
|
-
creates a new lineage and resets review/repair counters. Same-goal bounds
|
|
78
|
-
revision, resume, rebase, commit, retry, and handoff preserve them.
|
|
79
|
-
|
|
80
|
-
## HITL And Resume
|
|
81
|
-
|
|
82
|
-
A HITL checkpoint exists only when the user explicitly requests it. Full
|
|
83
|
-
delivery otherwise continues across ordinary in-bounds operations without
|
|
84
|
-
confirmation. Earlier phases may have completed through direct skills; reuse
|
|
85
|
-
fresh matching artifacts rather than rerunning them.
|
|
86
|
-
|
|
87
|
-
`human_steering_required` is a terminal boundary, not an optional HITL
|
|
88
|
-
checkpoint.
|
|
89
|
-
|
|
90
|
-
## Output
|
|
91
|
-
|
|
92
|
-
Report the selected state and phase, the durable evidence that selected it, the
|
|
93
|
-
next file or child skill, and any exact blocker.
|
|
3
|
+
Choose one next phase from current durable authority.
|
|
4
|
+
|
|
5
|
+
1. Apply [context continuity](../references/context-continuity.md): select
|
|
6
|
+
trigger-specific instructions, validate required pointers and warm/cold mode.
|
|
7
|
+
A failed resolution emits the common Phase Result and blocks its action.
|
|
8
|
+
2. Preserve terminal `human_steering_required` until `$handback`'s authority guard
|
|
9
|
+
passes. New boundary evidence selects [handback.md](handback.md).
|
|
10
|
+
3. For failed tasks or repair evidence, apply
|
|
11
|
+
[failure continuity](../references/failure-continuity.md). Independent eligible
|
|
12
|
+
work continues through the implementation owner's gates.
|
|
13
|
+
4. Recover review lineage, valid completed ordinals and durable active repair
|
|
14
|
+
state separately from current evidence freshness. Review due, retention pending,
|
|
15
|
+
unrouted findings, or budget decisions select [review.md](review.md), the sole
|
|
16
|
+
delivery review-transition authority. It validates bounds and target before
|
|
17
|
+
budget evaluation and distinguishes incomplete attempts from completed passes.
|
|
18
|
+
Resume `debug_active` through [debug.md](debug.md), `repair_active` through
|
|
19
|
+
[implement.md](implement.md), and debt capture through [review.md](review.md).
|
|
20
|
+
Route legacy `focused_validation` to its recorded implementation/debugging
|
|
21
|
+
owner and `clean_handoff` to remaining docs or closeout after checking proof.
|
|
22
|
+
Reuse recorded run IDs and debt keys; a resume cannot consume them twice.
|
|
23
|
+
5. Before planning, require a matching agent-ready `SPEC.md` with verified remote
|
|
24
|
+
retention and its current Write Backlog result through the
|
|
25
|
+
[Spec Complete and Backlog Projection Complete gates](../references/artifact-state.md).
|
|
26
|
+
Missing, stale or contradictory required proof routes the exact gap to
|
|
27
|
+
Requirements Phase before planning. It owns Requirements Grill, Create Spec
|
|
28
|
+
and Write Backlog. Valid current proof proceeds without a new approval gate;
|
|
29
|
+
optional Finder context is passed only when supplied, never manufactured.
|
|
30
|
+
6. A missing or stale execution plan selects [plan.md](plan.md). Incomplete plan
|
|
31
|
+
work, invalidated implementation evidence or an observed provider lifecycle
|
|
32
|
+
fact lacking exact readback selects [implement.md](implement.md).
|
|
33
|
+
7. Completed implementation needing Code Review selects [review.md](review.md).
|
|
34
|
+
Accepted repair follows that same transition authority's Focused Repair
|
|
35
|
+
Validation and risk-triggered second-pass rules. Passing ordinary focused
|
|
36
|
+
checks proceed without automatically reopening Code Review.
|
|
37
|
+
8. Remaining docs-affecting work selects [docs-ingest.md](docs-ingest.md), otherwise
|
|
38
|
+
[closeout.md](closeout.md). A fresh completed closeout needs no repeated mutation.
|
|
39
|
+
|
|
40
|
+
Read only the selected phase. Each exit emits the common Phase Result. Full
|
|
41
|
+
Delivery re-enters here; other modes stop at the requested boundary. An unclear
|
|
42
|
+
goal blocks with the exact missing authority rather than inferred scope.
|
|
43
|
+
|
|
44
|
+
Same-goal revision, resume, rebase, commit, retry and handoff preserve review
|
|
45
|
+
lineage and historical counts. Only an explicitly new delivery goal with new
|
|
46
|
+
accepted bounds establishes a new lineage; read-time legacy normalization never
|
|
47
|
+
resets valid report identities or ordinals.
|
|
@@ -30,3 +30,7 @@ Then stop or re-enter `delivery-phase` for routing.
|
|
|
30
30
|
|
|
31
31
|
This completion state satisfies the downstream spec gate. Do not add a spec
|
|
32
32
|
review or approval stop unless the user explicitly requested a HITL checkpoint.
|
|
33
|
+
|
|
34
|
+
Emit the [common Phase Result](../references/context-continuity.md#common-phase-result)
|
|
35
|
+
with pointers to this completion evidence. Continue only in Full Delivery;
|
|
36
|
+
otherwise stop at the requested boundary.
|
package/dist/baseline/scaffold-baseline/skills/phases/delivery-phase/references/artifact-state.md
CHANGED
|
@@ -4,10 +4,16 @@ Use this reference when deciding whether a phase is complete enough to skip.
|
|
|
4
4
|
|
|
5
5
|
## Spec Complete
|
|
6
6
|
|
|
7
|
-
- `SPEC.md`
|
|
7
|
+
- A matching agent-ready `SPEC.md` has `readiness: agent-ready`; its scope is
|
|
8
|
+
current, complete and consistent with the requested goal.
|
|
9
|
+
- Verified remote retention proves the retained ref contains the exact spec commit
|
|
10
|
+
and the verified immutable blob URL resolves that commit/path with bytes matching
|
|
11
|
+
the current SPEC identity. A stored URL or local file alone is insufficient.
|
|
8
12
|
- Scope includes required tracker children, acceptance criteria, constraints,
|
|
9
13
|
and non-goals.
|
|
10
|
-
-
|
|
14
|
+
- Required unresolved questions or missing, stale or contradictory authority
|
|
15
|
+
prevent completion. Agent-ready compiler output needs no additional spec
|
|
16
|
+
approval or review gate.
|
|
11
17
|
|
|
12
18
|
## Plan Complete
|
|
13
19
|
|
|
@@ -18,16 +24,19 @@ Use this reference when deciding whether a phase is complete enough to skip.
|
|
|
18
24
|
each `Tn` is the execution identity, provider identity slots are `not_applicable`,
|
|
19
25
|
relation mode is `unprojected`, a nonempty sync-skip reason is present, and
|
|
20
26
|
`depends_on` names plan `Tn` identities.
|
|
21
|
-
- Tasks have
|
|
27
|
+
- Tasks have Active Write Scopes, Read Dependencies, Shared Runtime Resources,
|
|
28
|
+
Relevant Input Set identities, validation gates and wave boundaries.
|
|
22
29
|
- Each wave contains every currently unblocked task with a disjoint write scope;
|
|
23
30
|
one-task waves are justified by dependencies or ownership.
|
|
24
31
|
|
|
25
32
|
## Backlog Projection Complete
|
|
26
33
|
|
|
27
|
-
-
|
|
34
|
+
- The current Write Backlog result names the verified immutable spec URL and
|
|
35
|
+
identity, provider destination, exact
|
|
28
36
|
Epic and Story identities, provider Task IDs and URLs, same `V*`, native
|
|
29
37
|
blocker edges, and verified observed state.
|
|
30
|
-
-
|
|
38
|
+
- Exact provider readback and projection evidence match the current retained
|
|
39
|
+
specification identity and provider state; otherwise the projection is stale.
|
|
31
40
|
|
|
32
41
|
## Implementation Complete
|
|
33
42
|
|
|
@@ -42,14 +51,17 @@ Use this reference when deciding whether a phase is complete enough to skip.
|
|
|
42
51
|
|
|
43
52
|
## Review Complete
|
|
44
53
|
|
|
45
|
-
-
|
|
46
|
-
|
|
54
|
+
- An immutable report matches the delivery lineage, accepted bounds and frozen
|
|
55
|
+
reviewed target/source identities. Unchanged implementation retains fresh proof;
|
|
56
|
+
subsequent accepted repair requires the evidence specified by the review
|
|
57
|
+
transition below rather than an automatic replacement report.
|
|
47
58
|
- Its commit exists on a verified retained ref; a local report alone is pending.
|
|
48
59
|
- The highest valid retained ordinal is authoritative and the handoff
|
|
49
60
|
`review_count` is its reconciled projection.
|
|
50
61
|
- Findings are routed by stable ids. Review itself entered no repair state.
|
|
51
|
-
-
|
|
52
|
-
|
|
62
|
+
- Accepted repair follows [review transition](../phases/review.md): retain Focused
|
|
63
|
+
Repair Validation and affected Verification evidence; preserve historical report
|
|
64
|
+
identities and ordinals during read-time normalization.
|
|
53
65
|
|
|
54
66
|
## Debug Complete
|
|
55
67
|
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
# Delivery Context Continuity
|
|
2
|
+
|
|
3
|
+
Use this contract at delivery entry and after each Phase Result. Durable sources
|
|
4
|
+
remain authoritative; routing is native-harness reasoning, not a runtime service.
|
|
5
|
+
|
|
6
|
+
## Select instructions and validate pointers
|
|
7
|
+
|
|
8
|
+
1. Keep project facts and hard ownership/authority boundaries always loaded.
|
|
9
|
+
2. Load the selected workflow contract required by the current action. Load an
|
|
10
|
+
optional technique only when its named trigger applies; retain its pointer
|
|
11
|
+
until then. Record selected instruction-surface Context Pointers, identities
|
|
12
|
+
and freshness in the packet's `context_pointers` and `evidence_freshness`.
|
|
13
|
+
Do not assemble all skills or phase bodies at entry.
|
|
14
|
+
3. Resolve only the Context Pointers needed for that action. Each pointer has
|
|
15
|
+
`authority_kind`, `locator`, optional `selector`, `identity` (content digest,
|
|
16
|
+
revision or observed state identity), and `freshness_rule` checked by its
|
|
17
|
+
consumer. A timestamp alone is not semantic freshness.
|
|
18
|
+
4. A missing, stale, malformed or ambiguous pointer stops its dependent action.
|
|
19
|
+
The parent may perform exactly one bounded refresh of the named authority
|
|
20
|
+
for that resolution episode. Continue only after proving exactly one current
|
|
21
|
+
identity. Otherwise emit `blocked`, naming the exact pointer and missing
|
|
22
|
+
proof. Never choose a near match, infer missing content or copy a broad
|
|
23
|
+
authority set. A retry with unchanged evidence cannot restart the refresh
|
|
24
|
+
allowance; a new authoritative observation defines a new resolution episode.
|
|
25
|
+
|
|
26
|
+
Completion: every required pointer resolves uniquely and its consumer checked
|
|
27
|
+
freshness, or the dependent action is blocked with retained resolution evidence.
|
|
28
|
+
|
|
29
|
+
## Warm or cold route
|
|
30
|
+
|
|
31
|
+
Only Full Delivery carries a continuing Delivery Context Packet in memory.
|
|
32
|
+
Warm routing requires the same native task, delivery goal, accepted bounds,
|
|
33
|
+
next-action authority, branch/base/target and fresh required evidence. Compare
|
|
34
|
+
identities before action, including each affected Relevant Input Set: declared
|
|
35
|
+
Read Dependencies and Shared Runtime Resources as well as Active Write Scopes.
|
|
36
|
+
|
|
37
|
+
A new task, Delivery Handoff, changed bounds or required authority, inconsistent
|
|
38
|
+
Git target, stale evidence or unresolved contradiction cold-routes before further
|
|
39
|
+
action. Discard the packet and resolve current named authorities from durable
|
|
40
|
+
pointers. Invalidate only affected evidence and eligibility; independent work
|
|
41
|
+
with matching inputs remains eligible. Route affected task proof back to the
|
|
42
|
+
parent's [execution gates](../../../agnostic/planning/implement-spec/references/parallel-orchestration.md)
|
|
43
|
+
before dependent release or finalization. This adds no lock or execution engine.
|
|
44
|
+
|
|
45
|
+
On cold resume, read durable mutation receipts and provider readback before any
|
|
46
|
+
retry. Reuse matching complete proof; perform only the unproven remainder.
|
|
47
|
+
Never duplicate a repository or provider mutation already proven complete.
|
|
48
|
+
|
|
49
|
+
Completion: record `warm` or `cold`, the identity comparison and exact invalidated
|
|
50
|
+
proof behind an evidence pointer; the next action has current authority.
|
|
51
|
+
|
|
52
|
+
## Disposable Delivery Context Packet
|
|
53
|
+
|
|
54
|
+
Carry only `delivery_goal_identity`, `accepted_bounds_identity`, authoritative
|
|
55
|
+
`context_pointers`, `git_identity` (branch/base/target), `phase`, `next_action`,
|
|
56
|
+
`active_identity` (Task or review), `evidence_freshness`, `blocker` and
|
|
57
|
+
`stop_condition`. Explicit `none` is valid for an absent active identity or
|
|
58
|
+
blocker. Create it from resolved authority; update it only through Phase Results.
|
|
59
|
+
|
|
60
|
+
Each optional Derived Context Excerpt contains only bounded action-relevant
|
|
61
|
+
content or rationale, with a source Context Pointer, source identity, freshness
|
|
62
|
+
rule and explicit `non_authoritative: true`. Its source always wins. Full
|
|
63
|
+
artifact/report/skill bodies, command logs, unsourced excerpts and unbounded
|
|
64
|
+
narrative fail contract validation. A missing required identity, pointer,
|
|
65
|
+
freshness, blocker or stop field also fails closed before action.
|
|
66
|
+
|
|
67
|
+
The packet is disposable: never write it into a Delivery Handoff or other durable
|
|
68
|
+
artifact. A packet is not a receipt, plan, report or acceptance record.
|
|
69
|
+
|
|
70
|
+
## Common Phase Result
|
|
71
|
+
|
|
72
|
+
Every phase emits this compact envelope, including failure, no-op and human stops:
|
|
73
|
+
|
|
74
|
+
```text
|
|
75
|
+
phase:
|
|
76
|
+
outcome: complete | blocked | failed | skipped | human_steering_required
|
|
77
|
+
authority_or_evidence_created: Context Pointer[]
|
|
78
|
+
changed_facts: bounded delta (explicit none when unchanged)
|
|
79
|
+
invalidated_evidence: Context Pointer[] (explicit none when unchanged)
|
|
80
|
+
next_eligible_phase: phase or none
|
|
81
|
+
blocker_or_stop_reason: exact reason or explicit none
|
|
82
|
+
context_pointers: only those needed next
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
Validate all fields before consuming the result. Pointer entries obey the
|
|
86
|
+
pointer contract above; required delta and stop fields cannot be omitted.
|
|
87
|
+
Keep phase-specific state, logs and detailed rationale in pointed durable
|
|
88
|
+
artifacts. `failed` records an attempted action's observed failure; `blocked`
|
|
89
|
+
records unavailable required proof or prerequisite. `skipped` requires an exact
|
|
90
|
+
no-op reason. `human_steering_required` points to the retained handback outcome.
|
|
91
|
+
A Phase Result neither accepts a Task nor replaces its Task Gate.
|
|
92
|
+
|
|
93
|
+
Full Delivery updates its packet and re-enters the router. Direct phase, explicit
|
|
94
|
+
HITL checkpoint, standalone review, narrow resume and closeout invocations emit
|
|
95
|
+
one Phase Result and stop at the requested boundary. Resume intent alone does
|
|
96
|
+
not grant Full Delivery continuation.
|
|
97
|
+
|
|
98
|
+
## Legacy cold reconstruction
|
|
99
|
+
|
|
100
|
+
For a legacy plan, notes, handoff or retained report, derive the current compact
|
|
101
|
+
projection at read time. Preserve every historical byte, valid report identity
|
|
102
|
+
and ordinal. Resolve goal/bounds, Git target, next action and evidence from the
|
|
103
|
+
legacy artifact's named durable authorities, not absent guessed fields. Keep
|
|
104
|
+
unknowns explicit. Unreconstructable required authority returns `blocked` with
|
|
105
|
+
the exact artifact pointer and missing proof. Only new writes use the compact
|
|
106
|
+
contracts; normalization never bulk-migrates history or resets review lineage.
|
|
107
|
+
|
|
108
|
+
Completion: before/after legacy digests match, recovered report identities and
|
|
109
|
+
ordinals match, and all required projected authority is proven or exactly blocked.
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# Failure and Repair Continuity
|
|
2
|
+
|
|
3
|
+
Use when a Task fails, a Task Gate requests repair, diagnosis advances, or work
|
|
4
|
+
crosses accepted bounds. The parent consumes the authoritative
|
|
5
|
+
[Task Result](../../../agnostic/planning/implement-spec/references/parallel-worker-brief.md)
|
|
6
|
+
and [Task Gate / Execution Frontier](../../../agnostic/planning/implement-spec/references/parallel-orchestration.md)
|
|
7
|
+
contracts; these remain the sole owners of worker returns and gate outcomes.
|
|
8
|
+
|
|
9
|
+
1. Retain the failed Task identity, latest result/gate evidence and dependent
|
|
10
|
+
chain. Block only that chain; recompute independent eligibility through the
|
|
11
|
+
execution owner. Preserve failed or repair-required Active Write Scope until
|
|
12
|
+
the parent proves the old worker stopped and cleanup completed, or transfers
|
|
13
|
+
it to exactly one scoped repair worker. An unproven transfer blocks reuse.
|
|
14
|
+
2. Before another scoped repair, identify new actionable evidence from the latest
|
|
15
|
+
Task Result or Task Gate and the exact change it justifies. Bounded authorized
|
|
16
|
+
diagnosis may continue while it can distinguish named hypotheses and produce
|
|
17
|
+
Diagnostic Evidence. Record the observation and discriminating result before
|
|
18
|
+
retrying; repeating the same repair is not new evidence.
|
|
19
|
+
3. Stagnant repair, required scope redesign, weaker gates, changed requirements,
|
|
20
|
+
missing access or a human decision routes to [handback](../phases/handback.md).
|
|
21
|
+
Keep accepted bounds and scope custody intact while steering is required.
|
|
22
|
+
4. Retain the resulting phase-specific state behind a pointer and emit the common
|
|
23
|
+
[Phase Result](context-continuity.md#common-phase-result). Resume checks current
|
|
24
|
+
authority and mutation proof before doing any remaining work.
|
|
25
|
+
|
|
26
|
+
Completion: dependent blocking, independent progress, scope custody, new evidence
|
|
27
|
+
or exact human boundary and next action are recoverable from durable pointers.
|