@punks/cli 4.0.4 → 5.0.1

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.
Files changed (112) hide show
  1. package/dist/BASELINE_CHANGELOG.md +29 -1
  2. package/dist/CHANGELOG.md +48 -0
  3. package/dist/baseline/scaffold-baseline/baseline.json +563 -5
  4. package/dist/baseline/scaffold-baseline/data/scripts/harness-projection/authoring.d.mts +23 -0
  5. package/dist/baseline/scaffold-baseline/data/scripts/harness-projection/authoring.mjs +84 -0
  6. package/dist/baseline/scaffold-baseline/data/scripts/harness-projection/authoring.test.ts +79 -0
  7. package/dist/baseline/scaffold-baseline/data/scripts/harness-projection/lint-feedback.test.ts +60 -28
  8. package/dist/baseline/scaffold-baseline/data/scripts/sync-subagents.mjs +166 -3
  9. package/dist/baseline/scaffold-baseline/data/shared-agents.md +55 -0
  10. package/dist/baseline/scaffold-baseline/skills/agnostic/cli/hi-cli/references/commands.md +4 -2
  11. package/dist/baseline/scaffold-baseline/skills/agnostic/cli/hi-cli/references/post-command-flow.md +20 -2
  12. package/dist/baseline/scaffold-baseline/skills/agnostic/generic/handoff/SKILL.md +18 -5
  13. package/dist/baseline/scaffold-baseline/skills/agnostic/planning/create-plan/SKILL.md +10 -2
  14. package/dist/baseline/scaffold-baseline/skills/agnostic/planning/create-plan/references/plan-schema.md +28 -8
  15. package/dist/baseline/scaffold-baseline/skills/agnostic/planning/create-plan/references/planner-task-graph.md +7 -3
  16. package/dist/baseline/scaffold-baseline/skills/agnostic/planning/create-verification-skill/SKILL.md +66 -0
  17. package/dist/baseline/scaffold-baseline/skills/agnostic/planning/create-verification-skill/references/upstream.md +20 -0
  18. package/dist/baseline/scaffold-baseline/skills/agnostic/planning/implement-spec/SKILL.md +16 -41
  19. package/dist/baseline/scaffold-baseline/skills/agnostic/planning/implement-spec/assets/IMPLEMENTATION-NOTES-TEMPLATE.md +14 -0
  20. package/dist/baseline/scaffold-baseline/skills/agnostic/planning/implement-spec/references/architecture-conformance.md +10 -6
  21. package/dist/baseline/scaffold-baseline/skills/agnostic/planning/implement-spec/references/lifecycle.md +47 -7
  22. package/dist/baseline/scaffold-baseline/skills/agnostic/planning/implement-spec/references/parallel-orchestration.md +102 -134
  23. package/dist/baseline/scaffold-baseline/skills/agnostic/planning/implement-spec/references/parallel-worker-brief.md +77 -67
  24. package/dist/baseline/scaffold-baseline/skills/agnostic/planning/implement-spec/references/parallel.md +19 -39
  25. package/dist/baseline/scaffold-baseline/skills/agnostic/planning/implement-spec/references/runtime-product-validation.md +27 -0
  26. package/dist/baseline/scaffold-baseline/skills/agnostic/planning/swarm-planner/SKILL.md +27 -2
  27. package/dist/baseline/scaffold-baseline/skills/agnostic/planning/update-verification-skill/SKILL.md +81 -0
  28. package/dist/baseline/scaffold-baseline/skills/agnostic/planning/verify-behavior/SKILL.md +105 -65
  29. package/dist/baseline/scaffold-baseline/skills/agnostic/quality/autoreview/SKILL.md +17 -4
  30. package/dist/baseline/scaffold-baseline/skills/agnostic/quality/autoreview/scripts/autoreview +102 -5
  31. package/dist/baseline/scaffold-baseline/skills/agnostic/subagents/swarm-planner/SKILL.md +27 -2
  32. package/dist/baseline/scaffold-baseline/skills/phases/delivery-phase/SKILL.md +11 -13
  33. package/dist/baseline/scaffold-baseline/skills/phases/delivery-phase/phases/backlog.md +4 -0
  34. package/dist/baseline/scaffold-baseline/skills/phases/delivery-phase/phases/closeout.md +12 -4
  35. package/dist/baseline/scaffold-baseline/skills/phases/delivery-phase/phases/debug.md +11 -5
  36. package/dist/baseline/scaffold-baseline/skills/phases/delivery-phase/phases/docs-ingest.md +4 -0
  37. package/dist/baseline/scaffold-baseline/skills/phases/delivery-phase/phases/handback.md +6 -2
  38. package/dist/baseline/scaffold-baseline/skills/phases/delivery-phase/phases/implement.md +12 -7
  39. package/dist/baseline/scaffold-baseline/skills/phases/delivery-phase/phases/plan.md +7 -1
  40. package/dist/baseline/scaffold-baseline/skills/phases/delivery-phase/phases/review.md +61 -22
  41. package/dist/baseline/scaffold-baseline/skills/phases/delivery-phase/phases/router.md +45 -91
  42. package/dist/baseline/scaffold-baseline/skills/phases/delivery-phase/phases/spec.md +4 -0
  43. package/dist/baseline/scaffold-baseline/skills/phases/delivery-phase/references/artifact-state.md +21 -9
  44. package/dist/baseline/scaffold-baseline/skills/phases/delivery-phase/references/context-continuity.md +109 -0
  45. package/dist/baseline/scaffold-baseline/skills/phases/delivery-phase/references/failure-continuity.md +27 -0
  46. package/dist/baseline/scaffold-baseline/skills/phases/delivery-phase/references/phase-handoff.md +32 -20
  47. package/dist/baseline/scaffold-baseline/skills/phases/docs-ingest-phase/SKILL.md +4 -0
  48. package/dist/baseline/scaffold-baseline/skills/phases/docs-ingest-phase/references/wiki-ingest.md +4 -0
  49. package/dist/baseline/scaffold-baseline/skills/phases/review-phase/phases/prepare-review.md +41 -8
  50. package/dist/baseline/scaffold-baseline/skills/phases/review-phase/phases/retain-report.md +13 -4
  51. package/dist/baseline/scaffold-baseline/skills/phases/review-phase/phases/router.md +1 -1
  52. package/dist/baseline/scaffold-baseline/skills/phases/review-phase/phases/run-review.md +24 -18
  53. package/dist/baseline/scaffold-baseline/skills/phases/review-phase/references/durable-report.md +40 -6
  54. package/dist/baseline/scaffold-baseline/skills/phases/review-phase/references/review-packet.md +72 -0
  55. package/dist/baseline/scaffold-baseline/skills/phases/review-phase/references/runtime-handoff.md +3 -0
  56. package/dist/baseline/scaffold-baseline/skills/phases/review-phase/references/state-graph.md +51 -42
  57. package/dist/baseline/scaffold-baseline/skills/phases/review-phase/scripts/review-contract.mjs +239 -4
  58. package/dist/baseline/scaffold-baseline.json +5 -5
  59. package/dist/baseline/scaffold-baseline.tgz +0 -0
  60. package/dist/data/scripts/harness-projection/authoring.d.mts +23 -0
  61. package/dist/data/scripts/harness-projection/authoring.mjs +84 -0
  62. package/dist/data/scripts/sync-subagents.mjs +129 -3
  63. package/dist/index.js +1413 -1396
  64. package/dist/skills/agnostic/cli/hi-cli/references/commands.md +4 -2
  65. package/dist/skills/agnostic/cli/hi-cli/references/post-command-flow.md +20 -2
  66. package/dist/skills/agnostic/generic/handoff/SKILL.md +18 -5
  67. package/dist/skills/agnostic/planning/create-plan/SKILL.md +10 -2
  68. package/dist/skills/agnostic/planning/create-plan/references/plan-schema.md +28 -8
  69. package/dist/skills/agnostic/planning/create-plan/references/planner-task-graph.md +7 -3
  70. package/dist/skills/agnostic/planning/create-verification-skill/SKILL.md +66 -0
  71. package/dist/skills/agnostic/planning/create-verification-skill/references/upstream.md +20 -0
  72. package/dist/skills/agnostic/planning/implement-spec/SKILL.md +16 -41
  73. package/dist/skills/agnostic/planning/implement-spec/assets/IMPLEMENTATION-NOTES-TEMPLATE.md +14 -0
  74. package/dist/skills/agnostic/planning/implement-spec/references/architecture-conformance.md +10 -6
  75. package/dist/skills/agnostic/planning/implement-spec/references/lifecycle.md +47 -7
  76. package/dist/skills/agnostic/planning/implement-spec/references/parallel-orchestration.md +102 -134
  77. package/dist/skills/agnostic/planning/implement-spec/references/parallel-worker-brief.md +77 -67
  78. package/dist/skills/agnostic/planning/implement-spec/references/parallel.md +19 -39
  79. package/dist/skills/agnostic/planning/implement-spec/references/runtime-product-validation.md +27 -0
  80. package/dist/skills/agnostic/planning/swarm-planner/SKILL.md +27 -2
  81. package/dist/skills/agnostic/planning/update-verification-skill/SKILL.md +81 -0
  82. package/dist/skills/agnostic/planning/verify-behavior/SKILL.md +105 -65
  83. package/dist/skills/agnostic/quality/autoreview/SKILL.md +17 -4
  84. package/dist/skills/agnostic/quality/autoreview/scripts/autoreview +102 -5
  85. package/dist/skills/agnostic/subagents/swarm-planner/SKILL.md +27 -2
  86. package/dist/skills/phases/delivery-phase/SKILL.md +11 -13
  87. package/dist/skills/phases/delivery-phase/phases/backlog.md +4 -0
  88. package/dist/skills/phases/delivery-phase/phases/closeout.md +12 -4
  89. package/dist/skills/phases/delivery-phase/phases/debug.md +11 -5
  90. package/dist/skills/phases/delivery-phase/phases/docs-ingest.md +4 -0
  91. package/dist/skills/phases/delivery-phase/phases/handback.md +6 -2
  92. package/dist/skills/phases/delivery-phase/phases/implement.md +12 -7
  93. package/dist/skills/phases/delivery-phase/phases/plan.md +7 -1
  94. package/dist/skills/phases/delivery-phase/phases/review.md +61 -22
  95. package/dist/skills/phases/delivery-phase/phases/router.md +45 -91
  96. package/dist/skills/phases/delivery-phase/phases/spec.md +4 -0
  97. package/dist/skills/phases/delivery-phase/references/artifact-state.md +21 -9
  98. package/dist/skills/phases/delivery-phase/references/context-continuity.md +109 -0
  99. package/dist/skills/phases/delivery-phase/references/failure-continuity.md +27 -0
  100. package/dist/skills/phases/delivery-phase/references/phase-handoff.md +32 -20
  101. package/dist/skills/phases/docs-ingest-phase/SKILL.md +4 -0
  102. package/dist/skills/phases/docs-ingest-phase/references/wiki-ingest.md +4 -0
  103. package/dist/skills/phases/review-phase/phases/prepare-review.md +40 -8
  104. package/dist/skills/phases/review-phase/phases/retain-report.md +13 -4
  105. package/dist/skills/phases/review-phase/phases/router.md +1 -1
  106. package/dist/skills/phases/review-phase/phases/run-review.md +24 -18
  107. package/dist/skills/phases/review-phase/references/durable-report.md +40 -6
  108. package/dist/skills/phases/review-phase/references/review-packet.md +72 -0
  109. package/dist/skills/phases/review-phase/references/runtime-handoff.md +3 -0
  110. package/dist/skills/phases/review-phase/references/state-graph.md +21 -12
  111. package/dist/skills/phases/review-phase/scripts/review-contract.mjs +137 -4
  112. package/package.json +4 -1
@@ -1,134 +1,102 @@
1
- # Worker-Wave Orchestration
2
-
3
- Use this reference to run the full parallel orchestration loop inside `implement-spec`.
4
-
5
- ## Step 1: Parse request
6
-
7
- Extract from the user request:
8
-
9
- 1. the plan source to execute
10
- 2. an optional task subset
11
-
12
- If no subset is provided, execute the full plan.
13
-
14
- ## Step 2: Read and parse `PLAN.md`
15
-
16
- Find task subsections such as:
17
-
18
- - `### T1:`
19
- - `### Task 1.1:`
20
-
21
- For each task, extract:
22
-
23
- - task id and task name
24
- - `depends_on`
25
- - owned paths
26
- - wave boundary
27
- - full content needed for execution:
28
- - location
29
- - description
30
- - acceptance criteria
31
- - validation
32
- - `tdd_target`
33
- - `architecture_wave`
34
- - `behavior_owner`
35
- - `integration_surface`
36
- - `public_seam`
37
- - `topology_delta`
38
- - `forbidden_ownership`
39
- - `temporary_seams`
40
- - each temporary seam's `expiry_wave`
41
- - `responsibility_acceptance_criteria`
42
- - each criterion's `criterion_id` and `due_wave`
43
- - `assigned_skills`
44
- - `implementation_skill_guidance`
45
- - `review_mode`
46
- - `runtime_validation`
47
- - `runtime_target`
48
- - `runtime_evidence`
49
- - `runtime_cleanup`
50
- - backlog metadata when present
51
- - related tasks or plan-level constraints when they materially shape execution
52
-
53
- Build the task list from this data.
54
-
55
- If a task subset was requested:
56
-
57
- - filter to the requested tasks
58
- - include every required dependency first
59
-
60
- ## Step 3: Build the current wave
61
-
62
- A task is unblocked only when all ids in its `depends_on` list are complete.
63
-
64
- For the current recorded wave boundary:
65
-
66
- - collect every unblocked task
67
- - exclude already-complete tasks
68
- - exclude tasks blocked by failed prerequisites
69
- - verify worker write scopes are disjoint
70
-
71
- Launch all unblocked tasks in parallel.
72
-
73
- ## Step 4: Spawn workers
74
-
75
- For each unblocked task:
76
-
77
- - choose the worker template from `.agents/subagents/manifest.mjs`
78
- - use the worker-brief contract from [parallel-worker-brief.md](parallel-worker-brief.md)
79
- - assign the task's owned paths
80
- - assign its validation gates
81
- - forward each `implementation_skill_guidance` item unchanged
82
-
83
- ## Step 5: Review and validate the wave
84
-
85
- After the workers return:
86
-
87
- 1. inspect their outputs for correctness and completeness
88
- 2. compare the result against the task validation contract
89
- 3. ensure the task log and touched files were written back into `PLAN.md`
90
- 4. ensure `IMPLEMENTATION-NOTES.md` has exactly one evidence record per guidance
91
- entry and no unmatched record
92
- 5. verify each record against the worker result and changed artifacts
93
- 6. ensure non-obvious deviations or surprises were written into `IMPLEMENTATION-NOTES.md`
94
- 7. for an architecture wave, run the cumulative conformance checkpoint in
95
- [architecture-conformance.md](architecture-conformance.md), render and persist
96
- its `$show-me` evidence, and block dependent waves on any violation
97
- 8. retry or escalate failed work instead of quietly advancing
98
-
99
- Move to the next wave only after the current wave is validated and logged.
100
-
101
- ## Step 6: Repeat
102
-
103
- Re-read the plan state and compute the next set of unblocked tasks.
104
-
105
- Continue until:
106
-
107
- - all reachable tasks are complete
108
- - or a real blocker remains
109
-
110
- ## Completion rule
111
-
112
- A task is complete only when all of the following are true:
113
-
114
- - the worker finished the assigned scope
115
- - acceptance criteria are satisfied, not only partially implemented
116
- - RED -> GREEN evidence exists for testable tasks, or an explicit `reason_not_testable` plus exact alternative verification exists
117
- - validation evidence matches the task contract
118
- - required runtime validation has conclusive evidence recorded, or the task remains blocked with an exact blocker
119
- - `PLAN.md` reflects the completed status and execution log
120
- - touched files are recorded
121
- - any non-obvious deviations are reflected in `IMPLEMENTATION-NOTES.md`
122
- - skill-application evidence has exact one-to-one cardinality with forwarded
123
- guidance
124
- - architecture-bearing tasks satisfy their responsibility acceptance criteria,
125
- declared topology delta, dependency constraints, public seam contract, and
126
- migration-ledger obligations at the cumulative checkpoint
127
-
128
- If any of these are missing, the task is not done yet.
129
-
130
- ## Error handling
131
-
132
- - If the requested task subset cannot be found, report the available task ids.
133
- - If parsing fails, report what was tried and what is ambiguous.
134
- - If a worker result is incomplete or incorrect, retry or escalate instead of marking the task complete.
1
+ # Execution Frontier
2
+
3
+ The parent owns Task Gates and scope transfer. Workers implement on the recorded
4
+ current branch and return the Task Result defined in
5
+ [parallel-worker-brief.md](parallel-worker-brief.md). Use native agent handles;
6
+ this contract introduces no scheduler, lock service, worker branch or worktree.
7
+
8
+ ## 1. Resolve the graph
9
+
10
+ Read the accepted `PLAN.md`, requested subset and every required prerequisite.
11
+ Preserve task/provider identities and native blocker edges. For each task resolve
12
+ its outcome, acceptance references, checks, guidance, `owned_paths`,
13
+ `read_dependencies`, `shared_runtime_resources`, `relevant_input_set`, and
14
+ architecture fields. Missing or ambiguous authority blocks that task with the
15
+ exact missing input; it does not grant an empty read set or a passing gate.
16
+
17
+ `wave_boundary` records an earliest frontier for planning; it is not a barrier.
18
+ Keep the execution board's passed, active, eligible, queued, repair-required and
19
+ blocked states separate from shared-summary reconciliation and final acceptance.
20
+
21
+ ## 2. Reserve and dispatch
22
+
23
+ An **Active Write Scope** is the exact reserved path set, owning task, native
24
+ worker handle and lifecycle state. Reserve before spawning; keep it exclusive
25
+ through execution, failure, interruption, gate review and cleanup. A finished
26
+ handle alone does not release ownership. Before release or transfer, the parent
27
+ proves the old writer has stopped, inspects its changes and cleanup, records the
28
+ retained output and exact new owner, then dispatches that owner. Every
29
+ implementation edit, including repair, stays delegated. Preserve unrelated
30
+ working-tree changes.
31
+
32
+ The **Execution Frontier** contains every unfinished task whose prerequisites
33
+ have passed their current Task Gates and whose scopes, declared reads, runtime
34
+ resources and required architecture responsibilities permit release. Recompute
35
+ after each gate result, input invalidation, capacity change or scope transfer:
36
+
37
+ 1. Exclude tasks with failed, incomplete or invalidated prerequisites.
38
+ 2. Exclude overlapping reserved writes, writes intersecting an active declared
39
+ read, reads intersecting an active write, and incompatible shared-runtime
40
+ use. Read/read overlap alone is safe. Name each actual conflict and owner;
41
+ preserve provider blockers unchanged.
42
+ 3. Require stable Relevant Input Set identities. An unknown identity or active
43
+ mutation affecting it waits; unrelated disjoint work stays eligible.
44
+ 4. For architecture-bearing work, apply
45
+ [architecture-conformance.md](architecture-conformance.md) to the specific
46
+ responsibilities it consumes. An unproved checkpoint responsibility blocks
47
+ its consumers, not unrelated preparation.
48
+ 5. Dispatch the complete eligible frontier within actual native capacity.
49
+ Prefer assumption-invalidating work, then longest remaining dependency chain,
50
+ then unlock count, then plan order. Record capacity and queued reason for
51
+ each eligible task left waiting. Capacity one delegates one worker; capacity
52
+ zero records a capacity blocker and performs no parent implementation.
53
+
54
+ Use the verified scoped specialist and worker brief. Record dispatch timestamp,
55
+ handle, scope, Relevant Input Set identities and required gates. A slow unrelated
56
+ worker never becomes an extra prerequisite.
57
+
58
+ ## 3. Apply each Task Gate
59
+
60
+ As each Task Result arrives, inspect it immediately without waiting for other
61
+ workers. A missing, malformed or unsupported result is `blocked`, never success.
62
+ The parent records one Task Gate result: `passed`, `repair_required` or `blocked`,
63
+ with task identity, timestamp, relevant input identities and evidence pointers.
64
+
65
+ A passing Task Gate requires all applicable task-local proof:
66
+
67
+ - assigned scope complete and changed paths within its Active Write Scope;
68
+ - acceptance references satisfied by parent inspection of observable results;
69
+ - actual RED/GREEN target, or the accepted non-testable reason and exact proof;
70
+ - relevant typecheck and lint passed, with explicit applicability when absent;
71
+ - task validation, runtime proof and one verified application-evidence record
72
+ per forwarded guidance entry;
73
+ - declared public seam, topology and task-local responsibility obligations met.
74
+
75
+ Verification joins this gate only when the task owns a complete visible journey
76
+ or runtime side effect consumed by a dependent; otherwise it remains a final
77
+ acceptance gate. Capture the Relevant Input Set before and after checks. Compare
78
+ again before dependent release and finalization. A changed source, declared read,
79
+ runtime resource or authority identity invalidates only affected evidence and
80
+ gates; schedule affected checks again before their consumers can proceed.
81
+
82
+ On `passed`, retain the parent gate evidence, release or transfer the scope by
83
+ step 2, and immediately recompute the frontier. On `repair_required` or
84
+ `blocked`, reserve the scope until safe transfer and keep dependents ineligible;
85
+ continue independent eligible work. Retry only with actionable evidence or
86
+ continue bounded discriminating diagnosis; route an authority boundary to the
87
+ owning delivery phase.
88
+
89
+ ## 4. Reconcile and close
90
+
91
+ Parent-only reconciliation follows the worker brief's shared-record contract.
92
+ Task Gate success can release work before summary materialization, but reconcile
93
+ `PLAN.md` and `IMPLEMENTATION-NOTES.md` before cumulative Architecture Checkpoints,
94
+ final acceptance, handoff and closeout. Record touched files, deviations and exact
95
+ guidance evidence. A gate, reconciled summaries, final acceptance and Code Review
96
+ are separate facts.
97
+
98
+ At each due architecture boundary, run cumulative conformance and persist its
99
+ proof. Finish only with all accepted task checks, required runtime and Verification
100
+ proof, reconciled summaries, acceptance audit and architecture zero-drift closure
101
+ with an empty migration ledger. Otherwise retain exact task-local blockers and
102
+ scope custody so resume can reconstruct the frontier truthfully.
@@ -1,49 +1,44 @@
1
- # Wave Worker Brief
2
-
3
- Use this reference when spawning a worker for one task in a parallel wave.
4
-
5
- ## Required context
6
-
7
- Every worker brief should include:
8
-
9
- - plan file or spec-folder context
10
- - relevant goals or overview from the plan
11
- - task id and task name
12
- - task dependencies
13
- - wave boundary
14
- - owned paths
15
- - related tasks when they matter
16
- - file locations
17
- - full description
18
- - acceptance criteria
19
- - validation gates
20
- - `tdd_target`
21
- - `tdd_status`
22
- - `codebase_design_notes`
23
- - `architecture_wave`
24
- - `behavior_owner`
25
- - `integration_surface`
26
- - `public_seam`
27
- - `topology_delta`
28
- - `forbidden_ownership`
29
- - `temporary_seams`
30
- - each temporary seam's `expiry_wave`
31
- - `responsibility_acceptance_criteria`
32
- - each criterion's `criterion_id` and `due_wave`
33
- - `red_command`
34
- - `expected_red_failure`
35
- - `green_command`
36
- - `reason_not_testable`
37
- - `assigned_skills` as planning provenance
38
- - every `implementation_skill_guidance` item, unchanged
39
- - `review_mode`
40
- - `runtime_validation`
41
- - `runtime_target`
42
- - `runtime_evidence`
43
- - `runtime_cleanup`
44
- - relevant risks or constraints from the plan
45
- - UI screenshot evidence requirements from [ui-screenshot-evidence.md](ui-screenshot-evidence.md) when the task changes UI
46
- - supported-runtime evidence requirements from [runtime-product-validation.md](runtime-product-validation.md) when `runtime_validation: required`
1
+ # Task Worker Brief
2
+
3
+ Use this reference when spawning a worker for one task released from the Execution Frontier.
4
+
5
+ ## Compact task kernel
6
+
7
+ Keep these execution decisions inline in every brief:
8
+
9
+ - task id/name, provider identity and task-identity/relation mode when applicable
10
+ - dependencies, intended outcome, acceptance references, execution status
11
+ - recorded current branch, owned paths / Active Write Scope, Read Dependencies
12
+ and Shared Runtime Resources forming the Relevant Input Set
13
+ - validation commands and RED/GREEN targets, `tdd_status`, evidence requirements
14
+ or exact `reason_not_testable` and alternative verification
15
+ - applicable TDD, runtime, UI, provider-readback, Verification and acceptance gates
16
+ - Architecture Checkpoint identifiers, due responsibility criterion ids,
17
+ architecture wave and ownership/risk constraints
18
+
19
+ Supply specification detail, code symbols, architecture views and exact skill
20
+ instructions through Context Pointers. Each pointer names its authority path or
21
+ URL, a task-relevant selector (heading, criterion, symbol or guidance entry),
22
+ when to read it, and the source identity to compare with current bytes. Read
23
+ selected pointers before implementing; unrelated sections remain disclosed.
24
+ Resolve applicable skill guidance without paraphrasing its obligations. Preserve
25
+ `assigned_skills` as provenance and every `implementation_skill_guidance` identity
26
+ for one-to-one result evidence.
27
+
28
+ A Derived Context Excerpt may avoid a predictable lookup. Label it subordinate,
29
+ keep it bounded to the needed rationale, retain its resolvable Context Pointer,
30
+ and record a source revision or content digest plus the selector used. A timestamp
31
+ alone cannot detect changed inputs. Compare identity before consuming the excerpt
32
+ and before validating its result. A missing source, changed relevant input,
33
+ unsourced excerpt, full copied authority, or excerpt/source mismatch requires
34
+ refresh from authority or an exact blocked Task Result; stale material cannot
35
+ justify implementation or release. Update the affected Relevant Input Set and
36
+ repeat affected checks before parent acceptance.
37
+
38
+ Read [ui-screenshot-evidence.md](ui-screenshot-evidence.md) for UI work and
39
+ [runtime-product-validation.md](runtime-product-validation.md) when
40
+ `runtime_validation: required`. Read the task's architecture contract when its
41
+ checkpoint or responsibility criteria apply.
47
42
 
48
43
  ## Required instructions
49
44
 
@@ -54,7 +49,7 @@ Each worker brief should require:
54
49
  3. starting from `tdd_target` and driving the task RED first when it is testable
55
50
  4. preserving or explicitly reconciling `codebase_design_notes` for module interface, seam, adapter strategy, and test surface
56
51
  5. capturing failing evidence for the expected behavior gap before implementation
57
- 6. recording `red_evidence` and `green_evidence` in the plan before marking behavior-changing tasks complete
52
+ 6. returning `red_evidence` and `green_evidence` in the Task Result before marking behavior-changing tasks complete
58
53
  7. recovering code-before-RED by writing the intended public-result RED test and marking `tdd_status: recovered`, not by using `reason_not_testable`
59
54
  8. recording an explicit `reason_not_testable` plus exact alternative verification when the task is not a good TDD candidate
60
55
  9. treating RED-phase tests or the approved non-testable verification plan as the implementation contract
@@ -64,7 +59,7 @@ Each worker brief should require:
64
59
  13. resolving any in-goal debt immediately instead of leaving TODOs, temporary workarounds, or "later" notes
65
60
  14. stopping for parent clarification when a debt item requires a product/scope decision outside the assigned task
66
61
  15. capturing and linking durable before/after screenshot evidence when the task changes UI
67
- 16. updating the plan entry with status, log, touched files, and gotchas before handoff closes
62
+ 16. returning status, log, touched files, and gotchas for parent reconciliation before handoff closes
68
63
  17. loading every forwarded skill and applying its stated behavior where the
69
64
  task evidence supports it
70
65
  18. returning exactly one evidence record per guidance entry with skill,
@@ -73,9 +68,11 @@ Each worker brief should require:
73
68
  19. refusing completion for required runtime validation without conclusive recorded evidence; returning an exact blocker leaves the task blocked
74
69
  20. for an architecture-bearing task, implementing toward the declared ownership topology and dependency graph, proving each due `responsibility_acceptance_criteria` item by `criterion_id`, and reporting every public-seam and migration-ledger delta with its architecture wave
75
70
 
76
- ## Worker output contract
71
+ ## Task Result
77
72
 
78
- Require the worker to return:
73
+ Return one Task Result with task/provider identity, `ready_for_gate | blocked`
74
+ status, source and Relevant Input Set identities, exact blocker when blocked,
75
+ and:
79
76
 
80
77
  - files modified or created
81
78
  - concise summary of changes
@@ -92,20 +89,33 @@ Require the worker to return:
92
89
  responsibility-acceptance proof keyed by `criterion_id`, public-seam delta,
93
90
  and temporary-seam status including `expiry_wave`
94
91
 
95
- ## Scope rule
96
-
97
- The worker is not responsible for overall wave orchestration.
98
-
99
- The worker owns:
100
-
101
- - one assigned task
102
- - its local validation
103
- - its plan-entry updates
104
-
105
- The parent `implement-spec` run owns:
106
-
107
- - wave construction
108
- - cross-task dependency handling
109
- - review of worker outputs
110
- - retry and escalation decisions
111
- - deciding when the wave is complete
92
+ ## Parent reconciliation
93
+
94
+ The worker owns assigned paths and local validation in the recorded current
95
+ branch. It returns its Task Result to the parent; shared `PLAN.md` and
96
+ `IMPLEMENTATION-NOTES.md` remain parent-only writes. Workers neither create
97
+ branches/worktrees nor edit another task's result or canonical summaries.
98
+
99
+ The parent validates the Task Result, evidence freshness and Active Write Scope,
100
+ then records its Task Gate decision. A passed Task Gate can release safe
101
+ dependents through the Execution Frontier while mechanical summary reconciliation
102
+ is pending. Retain the accepted result and reconciliation status in parent-owned
103
+ execution state so a summary backlog cannot erase acceptance or imply completion.
104
+ A stale or blocked summary is visible with affected tasks, exact reason and next
105
+ action; parent reconstructs it from fresh Task Results, never from worker guesses.
106
+
107
+ Track the Task Gate result (`passed | repair_required | blocked`) separately
108
+ from evidence eligibility (`pending | current | invalidated`), reconciliation
109
+ (`pending | complete | stale | blocked`), final acceptance and post-implementation
110
+ Code Review separately. A failed summary write leaves reconciliation blocked,
111
+ not the Task Gate falsely failed or final acceptance passed. If the failure hides
112
+ or invalidates task evidence, hold affected release until evidence is recovered.
113
+
114
+ Before an applicable Architecture Checkpoint, reconcile every contributing result
115
+ and assess cumulative ownership, dependency, public-seam, responsibility and
116
+ migration conformance. Finalization requires all results reconciled, applicable
117
+ Verification and acceptance proof, final zero architecture drift and an empty
118
+ migration ledger. Shared summaries describe these gates; they never replace them.
119
+ The parent owns frontier decisions, scope transfer, retries, escalation and
120
+ canonical record reconciliation. Delivery review follows implementation acceptance
121
+ through the lifecycle contract.
@@ -1,39 +1,19 @@
1
- # Worker-Wave Execution
2
-
3
- Every `implement-spec` run executes through plan-derived worker waves.
4
-
5
- ## Contract
6
-
7
- - **Worker policy:** spawn multiple workers only for currently unblocked independent work with disjoint write scopes
8
- - **Execution board:** completed, in progress, unblocked next, blocked, current wave
9
- - **Parent policy:** parse, dispatch, review, validate, update shared artifacts, and advance the graph
10
-
11
- A wave may contain one worker when dependencies or owned paths leave one task
12
- unblocked. Keep the wave boundary and parent validation.
13
-
14
- ## Required evidence
15
-
16
- - plan-derived wave selection from dependencies, owned paths, validation gates, and wave boundaries
17
- - explicit worker briefs per task
18
- - post-wave review of worker outputs
19
- - acceptance-criteria coverage plus RED -> GREEN evidence, or explicit non-testable verification
20
- - task completion only after validation and plan/log updates
21
- - unchanged guidance forwarding and exactly one verified skill-application
22
- evidence record per guidance entry
23
- - clear reporting of retries, issues, or blockers
24
- - for architecture-bearing plans, cumulative ownership, dependency,
25
- responsibility-acceptance, public-seam, and migration-ledger evidence after
26
- every architecture wave
27
-
28
- ## Loop rule
29
-
30
- Keep iterating wave by wave until:
31
-
32
- - all reachable tasks are complete, validated, and logged
33
- - or a real blocker remains and is reported honestly
34
-
35
- Retry failed work or report the exact blocker before advancing.
36
-
37
- An architecture wave advances only after its cumulative conformance checkpoint
38
- passes. Final closure confirms zero drift and an empty migration ledger; it is
39
- never the first consolidation pass.
1
+ # Scoped Execution
2
+
3
+ Every implementation edit belongs to a scoped worker on the recorded branch.
4
+ The parent parses the accepted graph, reserves scopes, dispatches, reviews Task
5
+ Results, applies Task Gates and reconciles shared artifacts.
6
+
7
+ Read [parallel-orchestration.md](parallel-orchestration.md) to compute the complete
8
+ Execution Frontier after each result. Read
9
+ [parallel-worker-brief.md](parallel-worker-brief.md) when preparing a worker's
10
+ context or consuming its Task Result. Architecture-bearing plans also use
11
+ [architecture-conformance.md](architecture-conformance.md) for cumulative proof.
12
+
13
+ Retain task identity, scope custody, dispatch and gate timestamps/native handles,
14
+ stable relevant inputs, acceptance/check evidence, unchanged guidance with one
15
+ application record per entry, and exact queued or blocked reasons. Wave labels
16
+ organize planned work; independent eligible work progresses after its own gates.
17
+ Task Gate success, shared-record reconciliation, final acceptance and Code Review
18
+ remain distinct. Continue until all accepted work is proved or the exact remaining
19
+ blocker requires external change.
@@ -2,6 +2,33 @@
2
2
 
3
3
  Use this reference only for tasks with `runtime_validation: required`. The plan fields define what must be proved; this reference defines how to obtain and report the proof.
4
4
 
5
+ ## Recover Project Verifier coverage
6
+
7
+ For visibly exercisable acceptance, retain the original scenario, affected criteria,
8
+ selected apps and authority/code/runtime/scenario identities, then invoke the single
9
+ `verify-behavior` entrypoint. It progressively selects project-owned references.
10
+
11
+ - **Uncovered Surface**: invoke `create-verification-skill` for the selected missing
12
+ app. Wait for `ready` with complete Reference Smoke Proof before resuming.
13
+ - **Uncovered Behavior**: invoke `update-verification-skill` for the selected missing
14
+ drive path. `unchanged` or `updated` resumes the original scenario with live proof;
15
+ `blocked` keeps every affected criterion blocked with its exact prerequisite;
16
+ `product-failure` routes the retained symptom to `debugging-phase` without changing
17
+ expected product semantics.
18
+
19
+ Coverage recovery remains inside implementation and on the current branch/PR. Shared
20
+ skills own the protocol; app mechanics remain project-owned below
21
+ `.agents/skills/verify-behavior/references/`. Missing references or paths require these
22
+ branches before acceptance classification; improvised automation cannot bypass them.
23
+
24
+ Compare returned proof with the original scenario's authority, code, runtime and
25
+ scenario identities and every required observation/side effect. Reuse only complete
26
+ matching proof; otherwise invoke `verify-behavior` for the missing proof before
27
+ classifying affected acceptance. A Reference Smoke Proof is readiness evidence, not
28
+ a blanket acceptance pass. Recheck identities after execution; changed inputs invalidate
29
+ only affected proof. `implement-spec` owns evidence freshness and affected reruns;
30
+ Code Review consumes retained evidence without executing or maintaining the verifier.
31
+
5
32
  ## Discover and recover the supported runtime
6
33
 
7
34
  Read scoped repository guidance, runbooks, manifests, and scripts to identify:
@@ -64,6 +64,10 @@ Each task MUST include:
64
64
  - **depends_on**: Array of task IDs that must complete first (empty `[]` for root tasks)
65
65
  - **description**: What the task accomplishes
66
66
  - **location**: File paths involved
67
+ - **owned_paths**: Exact Active Write Scope
68
+ - **read_dependencies**, **shared_runtime_resources**, **relevant_input_set**:
69
+ consumed inputs, runtime access and evidence-stability identities
70
+ - **wave_boundary**: Earliest frontier label; release follows individual Task Gates
67
71
  - **validation**: How to verify completion
68
72
 
69
73
  **Example:**
@@ -78,7 +82,13 @@ T6: [depends_on: [T2, T5]] Add API endpoints
78
82
  T7: [depends_on: [T6]] Write integration tests
79
83
  ```
80
84
 
81
- Tasks with empty/satisfied dependencies can run in parallel (T1, T2 above).
85
+ Use [the canonical task schema](../create-plan/references/plan-schema.md) for
86
+ scope, stability, capacity and architecture constraints. Plan the complete
87
+ Execution Frontier; task-local parent gates release eligible dependents while
88
+ unrelated work runs. Record actual read/write or runtime conflicts separately
89
+ from prerequisite edges. Architecture Checkpoints preserve cumulative RAC proof,
90
+ reconciliation, zero drift and migration closure while gating only affected
91
+ consumption.
82
92
 
83
93
  ### 4. Save Plan
84
94
 
@@ -133,6 +143,11 @@ T2 ──┴── T4 ──┘
133
143
  ### T1: [Name]
134
144
  - **depends_on**: []
135
145
  - **location**: [file paths]
146
+ - **owned_paths**: [exact reserved write paths]
147
+ - **read_dependencies**: [consumed paths/contracts]
148
+ - **shared_runtime_resources**: [resources and access compatibility, or explicit none]
149
+ - **relevant_input_set**: [identity methods for consumed inputs/resources]
150
+ - **wave_boundary**: [earliest frontier label]
136
151
  - **description**: [what to do]
137
152
  - **validation**: [how to verify]
138
153
  - **status**: Not Completed
@@ -142,6 +157,11 @@ T2 ──┴── T4 ──┘
142
157
  ### T2: [Name]
143
158
  - **depends_on**: []
144
159
  - **location**: [file paths]
160
+ - **owned_paths**: [exact reserved write paths]
161
+ - **read_dependencies**: [consumed paths/contracts]
162
+ - **shared_runtime_resources**: [resources and access compatibility, or explicit none]
163
+ - **relevant_input_set**: [identity methods for consumed inputs/resources]
164
+ - **wave_boundary**: [earliest frontier label]
145
165
  - **description**: [what to do]
146
166
  - **validation**: [how to verify]
147
167
  - **status**: Not Completed
@@ -151,6 +171,11 @@ T2 ──┴── T4 ──┘
151
171
  ### T3: [Name]
152
172
  - **depends_on**: [T1]
153
173
  - **location**: [file paths]
174
+ - **owned_paths**: [exact reserved write paths]
175
+ - **read_dependencies**: [consumed paths/contracts]
176
+ - **shared_runtime_resources**: [resources and access compatibility, or explicit none]
177
+ - **relevant_input_set**: [identity methods for consumed inputs/resources]
178
+ - **wave_boundary**: [earliest frontier label]
154
179
  - **description**: [what to do]
155
180
  - **validation**: [how to verify]
156
181
  - **status**: Not Completed
@@ -164,7 +189,7 @@ T2 ──┴── T4 ──┘
164
189
  | Wave | Tasks | Can Start When |
165
190
  |------|-------|----------------|
166
191
  | 1 | T1, T2 | Immediately |
167
- | 2 | T3, T4 | Wave 1 complete |
192
+ | 2 | T3, T4 | T1 gate passed; scopes and inputs available |
168
193
  | 3 | T5 | T3, T4 complete |
169
194
  | ... | ... | ... |
170
195