@punks/cli 3.2.0 → 3.2.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 (62) hide show
  1. package/dist/BASELINE_CHANGELOG.md +14 -1
  2. package/dist/CHANGELOG.md +15 -0
  3. package/dist/baseline/scaffold-baseline/baseline.json +5 -5
  4. package/dist/baseline/scaffold-baseline/data/catalog/lint-assets.json +48 -0
  5. package/dist/baseline/scaffold-baseline/skills/agnostic/cli/hi-cli/references/post-command-flow.md +1 -6
  6. package/dist/baseline/scaffold-baseline/skills/agnostic/docs/upstream/mattpocock-writing-skills.md +81 -12
  7. package/dist/baseline/scaffold-baseline/skills/agnostic/planning/create-plan/REFERENCE.md +11 -14
  8. package/dist/baseline/scaffold-baseline/skills/agnostic/planning/create-plan/SKILL.md +17 -14
  9. package/dist/baseline/scaffold-baseline/skills/agnostic/planning/create-plan/references/architecture-convergence.md +98 -0
  10. package/dist/baseline/scaffold-baseline/skills/agnostic/planning/create-plan/references/plan-schema.md +34 -0
  11. package/dist/baseline/scaffold-baseline/skills/agnostic/planning/create-plan/references/planner-task-graph.md +15 -12
  12. package/dist/baseline/scaffold-baseline/skills/agnostic/planning/implement-spec/SKILL.md +6 -5
  13. package/dist/baseline/scaffold-baseline/skills/agnostic/planning/implement-spec/assets/IMPLEMENTATION-NOTES-TEMPLATE.md +10 -0
  14. package/dist/baseline/scaffold-baseline/skills/agnostic/planning/implement-spec/references/architecture-conformance.md +100 -0
  15. package/dist/baseline/scaffold-baseline/skills/agnostic/planning/implement-spec/references/lifecycle.md +25 -2
  16. package/dist/baseline/scaffold-baseline/skills/agnostic/planning/implement-spec/references/parallel-orchestration.md +17 -1
  17. package/dist/baseline/scaffold-baseline/skills/agnostic/planning/implement-spec/references/parallel-worker-brief.md +14 -0
  18. package/dist/baseline/scaffold-baseline/skills/agnostic/planning/implement-spec/references/parallel.md +7 -0
  19. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/requirements-grill/SKILL.md +1 -1
  20. package/dist/baseline/scaffold-baseline/skills/frameworks/effect/effect-service-design/UPSTREAM.md +17 -0
  21. package/dist/baseline/scaffold-baseline/skills/phases/delivery-phase/phases/review.md +9 -34
  22. package/dist/baseline/scaffold-baseline/skills/phases/delivery-phase/phases/router.md +10 -16
  23. package/dist/baseline/scaffold-baseline/skills/phases/delivery-phase/references/phase-handoff.md +1 -19
  24. package/dist/baseline/scaffold-baseline/skills/phases/review-phase/AUTHORING-HANDOFF.md +11 -14
  25. package/dist/baseline/scaffold-baseline/skills/phases/review-phase/phases/retain-report.md +2 -9
  26. package/dist/baseline/scaffold-baseline/skills/phases/review-phase/phases/return-route.md +8 -6
  27. package/dist/baseline/scaffold-baseline/skills/phases/review-phase/phases/run-review.md +5 -8
  28. package/dist/baseline/scaffold-baseline/skills/phases/review-phase/references/durable-report.md +14 -29
  29. package/dist/baseline/scaffold-baseline/skills/phases/review-phase/references/state-graph.md +32 -45
  30. package/dist/baseline/scaffold-baseline/skills/phases/review-phase/references/targets.md +1 -2
  31. package/dist/baseline/scaffold-baseline/skills/phases/review-phase/scripts/review-contract.mjs +12 -86
  32. package/dist/baseline/scaffold-baseline.json +5 -5
  33. package/dist/baseline/scaffold-baseline.tgz +0 -0
  34. package/dist/index.js +5 -5
  35. package/dist/skills/agnostic/cli/hi-cli/references/post-command-flow.md +1 -6
  36. package/dist/skills/agnostic/docs/upstream/mattpocock-writing-skills.md +81 -12
  37. package/dist/skills/agnostic/planning/create-plan/REFERENCE.md +11 -14
  38. package/dist/skills/agnostic/planning/create-plan/SKILL.md +17 -14
  39. package/dist/skills/agnostic/planning/create-plan/references/architecture-convergence.md +98 -0
  40. package/dist/skills/agnostic/planning/create-plan/references/plan-schema.md +34 -0
  41. package/dist/skills/agnostic/planning/create-plan/references/planner-task-graph.md +15 -12
  42. package/dist/skills/agnostic/planning/implement-spec/SKILL.md +6 -5
  43. package/dist/skills/agnostic/planning/implement-spec/assets/IMPLEMENTATION-NOTES-TEMPLATE.md +10 -0
  44. package/dist/skills/agnostic/planning/implement-spec/references/architecture-conformance.md +100 -0
  45. package/dist/skills/agnostic/planning/implement-spec/references/lifecycle.md +25 -2
  46. package/dist/skills/agnostic/planning/implement-spec/references/parallel-orchestration.md +17 -1
  47. package/dist/skills/agnostic/planning/implement-spec/references/parallel-worker-brief.md +14 -0
  48. package/dist/skills/agnostic/planning/implement-spec/references/parallel.md +7 -0
  49. package/dist/skills/agnostic/requirements/requirements-grill/SKILL.md +1 -1
  50. package/dist/skills/frameworks/effect/effect-service-design/UPSTREAM.md +17 -0
  51. package/dist/skills/phases/delivery-phase/phases/review.md +9 -34
  52. package/dist/skills/phases/delivery-phase/phases/router.md +8 -14
  53. package/dist/skills/phases/delivery-phase/references/phase-handoff.md +1 -19
  54. package/dist/skills/phases/review-phase/AUTHORING-HANDOFF.md +11 -14
  55. package/dist/skills/phases/review-phase/phases/retain-report.md +2 -9
  56. package/dist/skills/phases/review-phase/phases/return-route.md +8 -6
  57. package/dist/skills/phases/review-phase/phases/run-review.md +5 -8
  58. package/dist/skills/phases/review-phase/references/durable-report.md +14 -29
  59. package/dist/skills/phases/review-phase/references/state-graph.md +5 -18
  60. package/dist/skills/phases/review-phase/references/targets.md +1 -2
  61. package/dist/skills/phases/review-phase/scripts/review-contract.mjs +11 -91
  62. package/package.json +1 -1
@@ -36,12 +36,7 @@ Then:
36
36
  - treat `.devpunks/specs/prompts/**` as the complete prompt-authoring contract; apply every scoped-prompt criterion it contains
37
37
  - ground scoped prompts in current code evidence: structure, placement, dependencies, and boundaries first; applied coding conventions second; enforced constraints outrank the nearest stable module-family pattern
38
38
  - keep each scoped prompt lean with exact-trigger pointers to co-authored reference content; references disclose content and never create deeper prompt scopes
39
- - render every selected non-phase skill in one final `## Skills` table with
40
- `Skill | Exact trigger`; each row names the exact invocation condition
41
- - open every selected installed skill's `SKILL.md`; that installed file remains
42
- workflow authority
43
- - keep root `AGENTS.md` table-free; phase wrappers remain global orchestration
44
- entrypoints and are excluded from scoped tables
39
+ - render every selected non-phase skill in a `Skill | What / when` table derived from its complete `SKILL.md`
45
40
  - always link `opensrc/README.md` from scoped prompts and read it when work depends on third-party library behavior
46
41
  - reconcile only the generated skills, prompts, lint, hooks, scripts, subagents, tools, and wiki assets in scope
47
42
  - preserve repo-owned edits and ask before changing project policy
@@ -1,22 +1,91 @@
1
- # Matt Pocock Writing Skills
1
+ # Matt Pocock Skills: provenance and coverage
2
2
 
3
- Source: https://github.com/mattpocock/skills/tree/main/skills/in-progress
3
+ This is the source-of-truth audit for Matt Pocock material retained in the
4
+ Devpunks skill library.
4
5
 
5
- Imported from upstream commit:
6
+ ## Audit snapshot
6
7
 
7
- ```text
8
- 694fa30311e02c2639942308513555e61ee84a6f
9
- ```
8
+ - Checked: 2026-08-12
9
+ - Curated catalog: <https://www.aihero.dev/skills>
10
+ - Upstream repository: <https://github.com/mattpocock/skills>
11
+ - Compared GitHub snapshot: `84fdeffd12f2ee307994d1eb6feb48173b6e0502`
12
+ - Upstream license SHA-256: `0e7ac423bf2c6e223b7c5b156f8cf72da49d748e56a1641402c31f22ad07dbb5`
10
13
 
11
- Imported skills:
14
+ The local files below are the only direct Matt-derived skills in this repo.
15
+ Each directory carries an adjacent `LICENSE` copied from the upstream root
16
+ license and an `UPSTREAM.md` with its immutable source commit. The local
17
+ adaptations remain intentionally customized; this audit does not replace them
18
+ with upstream files.
12
19
 
13
- - `writing-fragments`
14
- - `writing-beats`
15
- - `writing-shape`
20
+ ## Direct Matt-derived skills
16
21
 
17
- These skills were in upstream `skills/in-progress` at import time. Devpunks adopts them as reusable agnostic docs/writing skills and distributes them through the normal shared skills sync.
22
+ | Local skill | Upstream skill | Relationship | Imported source |
23
+ | --- | --- | --- | --- |
24
+ | `agnostic/docs/writing-beats` | `in-progress/writing-beats` | adapted | [`694fa303`](https://github.com/mattpocock/skills/tree/694fa30311e02c2639942308513555e61ee84a6f/skills/in-progress/writing-beats) |
25
+ | `agnostic/docs/writing-fragments` | `in-progress/writing-fragments` | adapted | [`694fa303`](https://github.com/mattpocock/skills/tree/694fa30311e02c2639942308513555e61ee84a6f/skills/in-progress/writing-fragments) |
26
+ | `agnostic/docs/writing-shape` | `in-progress/writing-shape` | adapted | [`694fa303`](https://github.com/mattpocock/skills/tree/694fa30311e02c2639942308513555e61ee84a6f/skills/in-progress/writing-shape) |
27
+ | `agnostic/docs/writing-for-agents` | `productivity/writing-for-agents` | imported unchanged | [`2ffb184f`](https://github.com/mattpocock/skills/tree/2ffb184ffbb752faa664c0b204f3c9241b1428e9/skills/productivity/writing-for-agents) |
28
+ | `agnostic/generic/handoff` | `productivity/handoff` | adapted | [`221ffca9`](https://github.com/mattpocock/skills/tree/221ffca96736afefdc08ca7cf0b3965e9ea83f41/skills/productivity/handoff) |
29
+ | `agnostic/quality/codebase-design` | `engineering/codebase-design` | adapted | [`221ffca9`](https://github.com/mattpocock/skills/tree/221ffca96736afefdc08ca7cf0b3965e9ea83f41/skills/engineering/codebase-design) |
30
+ | `agnostic/quality/review` | `in-progress/review` | adapted | [`801dca68`](https://github.com/mattpocock/skills/tree/801dca688564c529fa84f247f64472520d9ebe28/skills/in-progress/review) |
31
+ | `agnostic/quality/tdd` | `engineering/tdd` | adapted | [`62f43a18`](https://github.com/mattpocock/skills/tree/62f43a18177be6ec82da242e59ffbc490a4c22ea/skills/engineering/tdd) |
32
+ | `agnostic/requirements/grilling` | `in-progress/batch-grill-me` | imported with local contract | [`9603c1cc`](https://github.com/mattpocock/skills/tree/9603c1cc8118d08bc1b3bf34cf714f62178dea3b/skills/in-progress/batch-grill-me) |
33
+ | `agnostic/research/improve-codebase-architecture` | `engineering/improve-codebase-architecture` | adapted | [`62f43a18`](https://github.com/mattpocock/skills/tree/62f43a18177be6ec82da242e59ffbc490a4c22ea/skills/engineering/improve-codebase-architecture) |
34
+ | `agnostic/research/prototype` | `engineering/prototype` | adapted | [`2ffb184f`](https://github.com/mattpocock/skills/tree/2ffb184ffbb752faa664c0b204f3c9241b1428e9/skills/engineering/prototype) |
35
+ | `misc/wait-what` | `productivity/wait-what` | imported unchanged | [`2ffb184f`](https://github.com/mattpocock/skills/tree/2ffb184ffbb752faa664c0b204f3c9241b1428e9/skills/productivity/wait-what) |
18
36
 
19
- ## MIT License Notice
37
+ The retained writing skills were in upstream `skills/in-progress` at import
38
+ time, so they remain licensed and attributed even though they are not part of
39
+ the current curated page.
40
+
41
+ ## Indirect derivative with Matt's retained license
42
+
43
+ `frameworks/effect/effect-service-design` is adapted from Dillon Mulroy's
44
+ `dmmulroy/skills` at commit
45
+ `8603380821fee6a77c82639f364ce8fe4f5a92be`. Dillon's source repository
46
+ retains the same Matt Pocock MIT license, so the local skill keeps that exact
47
+ license and now documents the full attribution chain in its adjacent
48
+ `UPSTREAM.md`. It is not counted as one of Matt's direct catalog skills.
49
+
50
+ ## Comparison with the current AI Hero catalog
51
+
52
+ The AI Hero page currently lists 25 curated skills. A dash means the local
53
+ repo does not carry that skill. “Local analogue” means a Devpunks skill with a
54
+ similar role, not copied Matt material, and therefore it does not receive
55
+ Matt's license or attribution solely because the names overlap.
56
+
57
+ | AI Hero skill | Local coverage |
58
+ | --- | --- |
59
+ | `setup-matt-pocock-skills` | — |
60
+ | `ask-matt` | — |
61
+ | `grill-with-docs` | — |
62
+ | `to-spec` | local analogue: `agnostic/planning/create-spec` |
63
+ | `to-tickets` | local analogue: `agnostic/requirements/write-backlog` |
64
+ | `implement` | local analogue: `agnostic/planning/implement-spec` |
65
+ | `code-review` | direct adaptation: `agnostic/quality/review` |
66
+ | `wayfinder` | local analogue: `agnostic/planning/wayfinder` |
67
+ | `prototype` | direct adaptation: `agnostic/research/prototype` |
68
+ | `research` | local analogue: `agnostic/research/parallel-research` |
69
+ | `improve-codebase-architecture` | direct adaptation: `agnostic/research/improve-codebase-architecture` |
70
+ | `diagnosing-bugs` | local analogue: `agnostic/debug/debug-agent` |
71
+ | `resolving-merge-conflicts` | — |
72
+ | `triage` | — |
73
+ | `wizard` | — |
74
+ | `grill-me` | — |
75
+ | `handoff` | direct adaptation: `agnostic/generic/handoff` |
76
+ | `to-questionnaire` | — |
77
+ | `teach` | — |
78
+ | `wait-what` | imported unchanged: `misc/wait-what` |
79
+ | `writing-for-agents` | imported unchanged: `agnostic/docs/writing-for-agents` |
80
+ | `codebase-design` | direct adaptation: `agnostic/quality/codebase-design` |
81
+ | `domain-modeling` | — |
82
+ | `grilling` | direct adaptation: `agnostic/requirements/grilling` |
83
+ | `tdd` | direct adaptation: `agnostic/quality/tdd` |
84
+
85
+ ## MIT license notice
86
+
87
+ The adjacent `LICENSE` files for the direct Matt-derived skills preserve the
88
+ upstream notice exactly:
20
89
 
21
90
  MIT License
22
91
 
@@ -4,31 +4,28 @@
4
4
 
5
5
  ## Required inner skills
6
6
 
7
- - MUST use `$grilling`
8
- - MUST use `$swarm-planner`
9
- - MUST use `$tdd`
10
- - MUST use `$codebase-design`
7
+ The required-inner-skills list in canonical [SKILL.md](SKILL.md) is authoritative and includes `$show-me`.
8
+ Execute every listed skill; keep this reference focused on sequencing and disclosed rules.
9
+
11
10
  - `opensrc` provides source context for installed or external packages
12
- - scoped `AGENTS.md` files provide per-path skill requirements through one final
13
- `## Skills` table with `Skill | Exact trigger`; select matching non-phase rows
14
- and open each selected installed skill's `SKILL.md`, which remains workflow
15
- authority. Root `AGENTS.md` stays table-free. Phase wrappers remain global
16
- orchestration entrypoints and are excluded from scoped tables.
11
+ - scoped `AGENTS.md` files provide per-path skill requirements through `Skill | What / when` tables; select exact trigger matches and open each selected skill's complete `SKILL.md`
17
12
 
18
13
  ## Graph map
19
14
 
20
15
  1. Read current repo state and derive as much context as possible before asking.
21
16
  2. Reduce ambiguity before task synthesis:
22
17
  - see [references/grill-ambiguity.md](references/grill-ambiguity.md)
23
- 3. Build the swarm graph of `Tn` tasks:
18
+ 3. Classify architecture applicability and persist convergence views when required:
19
+ - see [references/architecture-convergence.md](references/architecture-convergence.md)
20
+ 4. Build the swarm graph of `Tn` tasks from that contract:
24
21
  - see [references/planner-task-graph.md](references/planner-task-graph.md)
25
- 4. Attach TDD shaping to each `Tn` task:
22
+ 5. Attach TDD shaping to each `Tn` task:
26
23
  - see [references/tdd-shaping.md](references/tdd-shaping.md)
27
- 5. Normalize the saved plan using:
24
+ 6. Normalize the saved plan using:
28
25
  - [references/plan-schema.md](references/plan-schema.md)
29
- 6. Sync backlog items using:
26
+ 7. Sync backlog items using:
30
27
  - [references/backlog-sync.md](references/backlog-sync.md)
31
- 7. Stop using:
28
+ 8. Stop using:
32
29
  - [references/stop-conditions.md](references/stop-conditions.md)
33
30
 
34
31
  ## Global rules
@@ -43,27 +43,27 @@ silently renaming them.
43
43
  remains step 13.
44
44
  7. If readonly discovery has independent code paths, specs, backlog items, external docs, or hypotheses, read and use `$parallel-research` before final task synthesis.
45
45
  8. Research with `opensrc path <package>` or `opensrc path <owner>/<repo>` plus primary-source web docs when current behavior matters.
46
- 9. Locate scoped `AGENTS.md` files for every planned task path. Scoped guidance
47
- uses one final `## Skills` table with `Skill | Exact trigger`. Select only
48
- non-phase rows whose exact triggers match the task, then open each selected
49
- installed skill's `SKILL.md`; that installed file is workflow authority.
50
- Root `AGENTS.md` stays table-free. Phase wrappers remain global orchestration
51
- entrypoints and are excluded from scoped tables.
46
+ 9. Locate scoped `AGENTS.md` files for every planned task path. Read each
47
+ applicable `Skill | What / when` table, select rows whose exact `What / when`
48
+ triggers match the task, and open each selected skill's complete `SKILL.md`
49
+ before finalizing task design.
52
50
  10. For every implementation task, convert applicable scoped or named skill
53
51
  obligations into `implementation_skill_guidance`; preserve `assigned_skills`
54
52
  as planning provenance.
55
- 11. Read `references/planner-task-graph.md` and run `$swarm-planner` to produce the swarm graph and `Tn` task contract.
56
- 12. Read `references/tdd-shaping.md` and run `$tdd` to attach RED/GREEN targets to each `Tn` task.
57
- 13. Read `references/backlog-sync.md`. Sync backlog at epic/story level only when
53
+ 11. Read `references/architecture-convergence.md`. Persist architecture applicability. For architecture-bearing
54
+ work, ground and author the complete architecture contract before finalizing task and wave boundaries.
55
+ 12. Read `references/planner-task-graph.md` and run `$swarm-planner` to produce the swarm graph and `Tn` task contract.
56
+ 13. Read `references/tdd-shaping.md` and run `$tdd` to attach RED/GREEN targets to each `Tn` task.
57
+ 14. Read `references/backlog-sync.md`. Sync backlog at epic/story level only when
58
58
  backlog sync is eligible and in scope; otherwise record an explicit skip
59
59
  reason and continue plan completion.
60
- 14. Invoke `$show-me` to present the task graph, dependencies, waves, and
60
+ 15. Invoke `$show-me` to present the task graph, dependencies, waves, and
61
61
  validation gates from the complete plan state before `$wait-what`. The
62
62
  presentation is a derived view; `PLAN.md` fields remain the execution authority.
63
- 15. Before writing `PLAN.md`, invoke `$wait-what` on the complete plan. Proceed
63
+ 16. Before writing `PLAN.md`, invoke `$wait-what` on the complete plan. Proceed
64
64
  only when its language contract passes without changing the resolved
65
65
  decision ledger.
66
- 16. Read `references/stop-conditions.md` and stop exactly there.
66
+ 17. Read `references/stop-conditions.md` and stop exactly there.
67
67
 
68
68
  ## Workflows
69
69
 
@@ -76,8 +76,8 @@ silently renaming them.
76
76
  5. Scan relevant routed learning artifacts before task synthesis when prior bug knowledge, domain behavior, or project conventions could affect the plan.
77
77
  6. Resolve each task's scoped guidance from root `AGENTS.md` down to the nearest `AGENTS.md` for its `location`.
78
78
  7. Use each task's required skill guidance while shaping its scope, dependencies, validation, RED target, and review mode; do not merely list skills after the plan is written.
79
- 8. Assign each task the deduplicated union of skills whose exact triggers match
80
- in every touched scope, merging all touched scopes for
79
+ 8. Assign each task the deduplicated union of skills whose exact `What / when`
80
+ triggers match in every touched scope, merging all touched scopes for
81
81
  cross-directory tasks.
82
82
  9. Build plan-derived worker waves: place every currently unblocked task with
83
83
  a disjoint write scope in the same wave. Use a one-task wave only when
@@ -89,6 +89,8 @@ silently renaming them.
89
89
  `tdd_status`, `tdd_target`, RED/GREEN commands, evidence fields,
90
90
  `codebase_design_notes`, `review_mode`, `runtime_validation`,
91
91
  `runtime_target`, `runtime_evidence`, and `runtime_cleanup`.
92
+ Architecture-bearing tasks also carry the convergence fields required by
93
+ `references/architecture-convergence.md`.
92
94
  11. Keep `PLAN.md` self-contained: embed gathered context, relevant code paths, existing patterns, constraints, assumptions, design reasoning, tradeoffs, initial situation, issue, solution shape, findings, research, dependency graph, testing strategy, skill-routing notes, risks, validation gates, unresolved questions, and a resolved decision ledger.
93
95
  12. Write enough conceptual reasoning that an executor can implement from `PLAN.md` alone, using supplementary research only when they choose to refresh or deepen context.
94
96
  13. For complex work, express the plan as a swarm graph of `Tn` tasks with dependency-aware validation gates, expected outcomes, assertions, or checks that let the executor self-verify before moving on.
@@ -123,5 +125,6 @@ See [REFERENCE.md](REFERENCE.md) for the overview and graph map.
123
125
  - Planner / swarm graph: see [references/planner-task-graph.md](references/planner-task-graph.md)
124
126
  - TDD shaping: see [references/tdd-shaping.md](references/tdd-shaping.md)
125
127
  - `PLAN.md` schema and task contract: see [references/plan-schema.md](references/plan-schema.md)
128
+ - Architecture applicability and convergence contract: see [references/architecture-convergence.md](references/architecture-convergence.md)
126
129
  - Backlog sync rules: see [references/backlog-sync.md](references/backlog-sync.md)
127
130
  - Stop conditions: see [references/stop-conditions.md](references/stop-conditions.md)
@@ -0,0 +1,98 @@
1
+ # Architecture Convergence
2
+
3
+ Use this branch when a plan can change cumulative code ownership. The saved plan is the architecture
4
+ contract; later execution checks conformance against it.
5
+
6
+ ## Classify Applicability
7
+
8
+ Persist `architecture_applicability: local | architecture-bearing` with evidence.
9
+
10
+ - `local`: one bounded responsibility, with no domain-owner, public-seam, composition, or cross-domain
11
+ dependency change. Keep the ordinary task graph and `codebase_design_notes`; record why this branch does
12
+ not apply.
13
+ - `architecture-bearing`: multiple stories or tasks change one capability cumulatively; or any task crosses
14
+ an ownership boundary, changes composition, changes a public seam, introduces a domain, migrates callers,
15
+ or changes cross-domain dependencies.
16
+
17
+ Classification is complete when every planned location and consumer is covered by one outcome. A plan
18
+ cannot use `local` merely because each task looks small in isolation.
19
+
20
+ ## Ground the Contract
21
+
22
+ For backend scope, invoke `$backend-domain-structure` and read its layout reference. Derive honest feature,
23
+ platform/composition, integration, persistence, model, and public-boundary ownership from the repository.
24
+
25
+ For frontend scope, invoke `$frontend-domain-structure` and read its agnostic reference. Apply the invariant-owner,
26
+ domain-worthiness, public-entrypoint, one-way, and acyclic dependency rules. For React scope, also read its
27
+ React addendum and classify route composition, components, hooks, providers, and behavior-test seams.
28
+
29
+ For mixed scope, apply both theories at their respective boundaries. Preserve repository vocabulary and
30
+ existing honest owners. Completion requires every changed responsibility and dependency edge to be grounded
31
+ in the applicable theory and current code evidence.
32
+
33
+ ## Persist the Architecture Contract
34
+
35
+ For an architecture-bearing plan, invoke `$show-me` while authoring **each persisted view** below. Save the
36
+ smallest visual that preserves exact owners, edges, order, labels, and uncertainty next to a terse textual
37
+ conclusion. These views are normative `PLAN.md` content, not a conversational summary.
38
+
39
+ ### Target Ownership Topology
40
+
41
+ Show the target domains/modules and composition roots as a shallow tree or ownership map. For every owner,
42
+ state its responsibility, public entrypoint, owned paths, and responsibilities it must not absorb. Ownership
43
+ means semantic policy and behavior, not file placement alone.
44
+
45
+ ### Declared Dependency Graph
46
+
47
+ Show every changed or newly relevant cross-owner edge. Label allowed edges with the public seam they traverse;
48
+ list forbidden static imports and forbidden semantic calls. Require one-way, acyclic dependencies and deliberate
49
+ public entrypoints under the applicable frontend/backend theory.
50
+
51
+ ### Responsibility Acceptance Criteria
52
+
53
+ Give every target owner observable acceptance criteria proving that its policy, orchestration, persistence,
54
+ integration, transport, or presentation responsibility lives there. Include focused behavior and architecture
55
+ checks; file existence alone is insufficient evidence. Each criterion records a stable `criterion_id`, its
56
+ owner, observable assertion, evidence command or inspection, and `due_architecture_wave`. Every criterion id
57
+ must map to at least one task and exactly one due wave.
58
+
59
+ ### Architecture Waves
60
+
61
+ Show ordered architecture waves separately from worker parallelism:
62
+
63
+ ```text
64
+ boundary establishment
65
+ vertical slice / caller migration
66
+ continuous convergence checkpoint
67
+ next slice
68
+ continuous convergence checkpoint
69
+ final closure
70
+ ```
71
+
72
+ Each wave has a stable `architecture_wave` id distinct from worker `wave_boundary`; it names its topology delta,
73
+ entry dependencies, criterion ids due in that wave, allowed temporary seams, and checkpoint. Vertical delivery
74
+ remains behavior-complete; architecture work is not deferred wholesale to final closure.
75
+
76
+ ### Public Seam Contract
77
+
78
+ Name each consumer-facing command, result, port, event, component, hook, or entrypoint affected by the plan;
79
+ list its owner and allowed consumers. A task that changes the declared public seam must amend the plan contract
80
+ before dependent work continues.
81
+
82
+ ### Migration Ledger
83
+
84
+ For every temporary seam record its introducing task, reason, allowed consumers, removal task, expiry wave, and
85
+ removal proof. Undeclared temporary seams are drift. Final closure requires the migration ledger to be empty.
86
+
87
+ ## Shape Continuous Convergence
88
+
89
+ Every architecture-bearing task declares `architecture_wave`, `behavior_owner`, `integration_surface`,
90
+ `public_seam`, `topology_delta`, `forbidden_ownership`, `temporary_seams`, and
91
+ `responsibility_acceptance_criteria`. Each architecture wave ends with a **continuous convergence checkpoint**
92
+ that compares cumulative implementation with all persisted views: actual ownership, allowed and forbidden edges,
93
+ public-seam amendments, topology delta, and migration-ledger additions/removals. The checkpoint evaluates every
94
+ criterion due through the current wave and regression-checks every criterion previously met. Missing, failing,
95
+ or regressed evidence blocks dependent waves.
96
+
97
+ Final closure confirms the target responsibilities, graph, public seams, and acceptance evidence; all migration
98
+ entries are removed. It is a zero-drift proof, not the first consolidation pass.
@@ -8,6 +8,7 @@ The generated `PLAN.md` is the execution handoff. It must stand alone without hi
8
8
 
9
9
  Include:
10
10
 
11
+ - `architecture_applicability: local | architecture-bearing` with evidence
11
12
  - initial situation
12
13
  - issue or problem statement
13
14
  - proposed solution shape
@@ -22,6 +23,12 @@ Include:
22
23
  - validation gates per `Tn` task and dependency wave
23
24
  - unresolved questions
24
25
 
26
+ When `architecture_applicability: architecture-bearing`, also include the normative **Target Ownership
27
+ Topology**, **Declared Dependency Graph**, **Responsibility Acceptance Criteria**, **Architecture Waves**,
28
+ **Public Seam Contract**, and **Migration Ledger** defined in
29
+ [architecture-convergence.md](architecture-convergence.md). Persist each view using `$show-me`; the migration
30
+ ledger starts with every planned temporary seam and final closure requires it to be empty.
31
+
25
32
  `unresolved questions` is not a hiding place for skipped planning. Include only `$grilling`-deferred, externally blocked, or non-blocking questions, and state why each remains open.
26
33
 
27
34
  Each wave contains every currently unblocked task whose `owned_paths` are
@@ -62,6 +69,25 @@ Every task must include:
62
69
  - `runtime_evidence`
63
70
  - `runtime_cleanup`
64
71
 
72
+ Every architecture-bearing task must also include:
73
+
74
+ - `architecture_wave`
75
+ - `behavior_owner`
76
+ - `integration_surface`
77
+ - `public_seam`
78
+ - `topology_delta`
79
+ - `forbidden_ownership`
80
+ - `temporary_seams`
81
+ - `responsibility_acceptance_criteria`
82
+
83
+ These fields bind the task to cumulative ownership rather than file placement. Local-plan tasks omit them;
84
+ their plan-level applicability evidence and ordinary `codebase_design_notes` are the explicit escape hatch.
85
+
86
+ `architecture_wave` is a stable architecture sequence id, for example `A2`; `wave_boundary` remains the worker
87
+ parallelism id. `responsibility_acceptance_criteria` lists the stable criterion ids this task advances or proves.
88
+ Every listed id must exist in the plan-level Responsibility Acceptance Criteria view, whose entry declares its
89
+ `due_architecture_wave`. Each criterion maps to at least one task and exactly one due architecture wave.
90
+
65
91
  `backlog_item_id` and `backlog_item_url` reference the owning product-facing story, not a task-owned backlog record.
66
92
 
67
93
  `owned_paths` lists the exact write scope assigned to the task. Tasks in the
@@ -142,4 +168,12 @@ Use `not_applicable` for the other runtime fields when `runtime_validation: not_
142
168
  - **runtime_target**: Supported local API and background worker.
143
169
  - **runtime_evidence**: Public response plus correlated persisted state and worker completion.
144
170
  - **runtime_cleanup**: Tag fixtures with a unique run id; remove only resources carrying that id.
171
+ - **architecture_wave**: A2
172
+ - **behavior_owner**: Target domain or module responsible for the changed behavior.
173
+ - **integration_surface**: Composition, transport, UI, or caller surface consuming the owner.
174
+ - **public_seam**: Declared entrypoint and command/result/port contract, or unchanged.
175
+ - **topology_delta**: Exact owner or dependency edge moved toward the target topology.
176
+ - **forbidden_ownership**: Policy or mechanics this task must keep outside its owner.
177
+ - **temporary_seams**: Ledger entries introduced or removed by this task, or none.
178
+ - **responsibility_acceptance_criteria**: [RAC-2, RAC-3]
145
179
  ```
@@ -16,23 +16,21 @@ Before finalizing task boundaries:
16
16
 
17
17
  1. List every concrete `location` each task may touch.
18
18
  2. For each location, inspect the `AGENTS.md` chain from repo root to the nearest scoped file.
19
- 3. Read the final `## Skills` table with `Skill | Exact trigger` in every
20
- applicable scoped file and select only non-phase rows whose exact trigger
21
- matches the task.
22
- 4. Verify each selected skill exists in `.agents/skills/` or another installed
23
- skill source visible to the agent.
24
- 5. Open each selected installed skill's `SKILL.md`; that installed file is
25
- workflow authority while finalizing the task's boundary, validation, RED
26
- target, and review mode.
19
+ 3. Read every applicable `Skill | What / when` table and select only rows whose
20
+ exact `What / when` trigger matches the task.
21
+ 4. Verify each selected skill exists in `.agents/skills/` or an installed skill
22
+ source visible to the agent.
23
+ 5. Open each selected skill's complete `SKILL.md` before finalizing the task's
24
+ boundary, validation, RED target, and review mode.
27
25
  6. Add the merged, deduplicated union from every touched scope to the task as
28
26
  `assigned_skills`.
29
27
  7. For every implementation-applicable item, add exactly one
30
28
  `implementation_skill_guidance` entry with the exact skill identity and its
31
29
  concise applicable behavior. Planning-only items remain provenance without a
32
30
  guidance entry.
33
-
34
- Root `AGENTS.md` stays table-free. Phase wrappers remain global orchestration
35
- entrypoints and are excluded from scoped tables.
31
+ 8. Classify architecture applicability using `architecture-convergence.md` before locking dependencies and
32
+ waves. For architecture-bearing plans, derive task boundaries and architecture waves from the persisted
33
+ target ownership topology, dependency graph, responsibility criteria, public seams, and migration ledger.
36
34
 
37
35
  If a task spans multiple scopes, include all selected skills from all touched
38
36
  scopes. If a matching row names a missing skill, keep the task planned but
@@ -55,10 +53,15 @@ Preserve `$swarm-planner` behavior:
55
53
  - validations per task
56
54
  - parallel execution waves
57
55
  - risks and mitigations
58
- - explicit `assigned_skills` per task from exact scoped trigger
56
+ - explicit `assigned_skills` per task from exact scoped `What / when` trigger
59
57
  matches, with task design shaped by those skills
60
58
  - complete one-to-one `implementation_skill_guidance` for every
61
59
  implementation-applicable assigned skill
60
+ - architecture-bearing task fields `architecture_wave`, `behavior_owner`, `integration_surface`, `public_seam`,
61
+ `topology_delta`, `forbidden_ownership`, `temporary_seams`, and `responsibility_acceptance_criteria`
62
+ - stable criterion ids mapped to at least one task and exactly one due architecture wave
63
+ - a continuous convergence checkpoint after every architecture wave that checks all criteria due through the
64
+ current wave and regression-checks previously met criteria
62
65
  - a final `plan-reviewer` subagent review for missing deps, missing
63
66
  `owned_paths`, missing `wave_boundary`, ordering issues, edge cases, invalid
64
67
  parallelism, unsafe write overlap, missing RED targets, missing validation,
@@ -41,15 +41,15 @@ implementation tasks.
41
41
 
42
42
  1. Resolve the target spec folder by checking, in order: `apps/wiki/content/docs/project/specs/<domain>/<spec>/`, legacy `apps/wiki/specs/<domain>/<spec>/`, then `docs/specs/<domain>/<spec>/`.
43
43
  2. Read `references/lifecycle.md` and follow the shared execution contract exactly.
44
- 3. Read `references/parallel.md`, parse the plan graph, and build the first unblocked wave.
44
+ 3. Read `references/parallel.md`, parse the plan graph, and build the first unblocked wave. When the plan is architecture-bearing, also read and enforce `references/architecture-conformance.md`.
45
45
  4. Launch scoped workers for the current wave using
46
46
  `references/parallel-worker-brief.md`. Forward every guidance item unchanged,
47
47
  preserving its `implementation_skill_guidance` skill and behavior fields.
48
48
  5. After each validated wave, update `PLAN.md`, `IMPLEMENTATION-NOTES.md`, and
49
49
  spec-linked tech debt before advancing. Require exactly one skill-application
50
- evidence record per guidance entry. Use `$show-me` for a derived wave board
51
- when it materially improves operator orientation; the shared artifacts remain
52
- authoritative.
50
+ evidence record per guidance entry. For architecture-bearing plans, run the
51
+ cumulative conformance checkpoint after every architecture wave and persist
52
+ its `$show-me` evidence; a failed checkpoint blocks dependent waves.
53
53
  6. Use `$codebase-design` vocabulary while reviewing each worker change: interface, seam, adapter, depth, leverage, locality, and test surface.
54
54
  7. Resolve implementation debt as soon as it appears. Do not leave "later" work, TODOs, temporary compromises, or vague follow-up debt.
55
55
  8. If a debt item needs a product/scope decision outside the active goal, stop and run a very small `$requirements-phase` clarification before continuing.
@@ -61,7 +61,7 @@ implementation tasks.
61
61
  classification. A mismatch is runtime evidence: route it to
62
62
  `debugging-phase`. If the required interaction capability is unavailable,
63
63
  record the explicit blocker and keep affected acceptance criteria blocked.
64
- 13. Finish with the shared acceptance audit, manual review checklist, and spec finalization contract.
64
+ 13. Finish with the shared acceptance audit, manual review checklist, and spec finalization contract. Architecture-bearing plans also require final zero-drift closure and an empty migration ledger.
65
65
  14. Invoke `$show-me` to present the implementation notes, final code changes,
66
66
  acceptance status, and manual review path from finalized
67
67
  `IMPLEMENTATION-NOTES.md`, the diff, and recorded evidence. The presentation
@@ -106,3 +106,4 @@ at the same gate. That branch owns the complete run.
106
106
  - Worker-wave execution: see [references/parallel.md](references/parallel.md)
107
107
  - Plan parsing and wave construction: see [references/parallel-orchestration.md](references/parallel-orchestration.md)
108
108
  - Worker brief contract: see [references/parallel-worker-brief.md](references/parallel-worker-brief.md)
109
+ - Architecture-bearing wave checkpoints and final closure: see [references/architecture-conformance.md](references/architecture-conformance.md)
@@ -34,6 +34,16 @@ where the guidance was assessed.
34
34
  |------|-------|--------|-----------|-----------------------------------------------|
35
35
  | | | | | |
36
36
 
37
+ ## Architecture Conformance Evidence
38
+
39
+ Persist the `$show-me` ownership tree, dependency graph, wave delta, or seam
40
+ diff beside each conclusion. Use one row after every architecture wave and one
41
+ for final closure. Local plans remove this section.
42
+
43
+ | Architecture wave id | Target ownership topology and observed state | Declared dependency graph and observed state | Due criterion ids, evidence, and prior-met regression status | Public seam delta | Migration ledger delta, expiry waves, and final empty-ledger status | Validation evidence | Verdict or exact drift |
44
+ |----------------------|----------------------------------------------|----------------------------------------------|------------------------------------------------------------|------------------|-------------------------------------------------------------------|---------------------|------------------------|
45
+ | | | | | | | | |
46
+
37
47
  ## UI Evidence Links
38
48
 
39
49
  | Surface | Viewport | Before | After | Notes |
@@ -0,0 +1,100 @@
1
+ # Architecture Conformance
2
+
3
+ Use this contract when `PLAN.md` declares architecture applicability as
4
+ `architecture-bearing`. A `local` plan keeps the normal task design checks and
5
+ does not invent an architecture contract during execution.
6
+
7
+ The plan is authoritative. Execute its **Target Ownership Topology**, **Declared
8
+ Dependency Graph**, **Responsibility Acceptance Criteria**, **Architecture Waves**,
9
+ public seam contract, and migration ledger. Execution may clarify
10
+ evidence. An evidence-only clarification may be recorded locally when it changes
11
+ no owner, edge, criterion, wave, seam, migration, or task contract. Any target
12
+ contract change pauses execution and routes back through `$create-plan` on the
13
+ same spec folder for architecture convergence authoring and plan review. Reload
14
+ the amended plan before dispatching more architecture-bearing work.
15
+
16
+ ## Load the theory
17
+
18
+ Before the first architecture wave, load `$backend-domain-structure` for
19
+ backend scope and `$frontend-domain-structure` for frontend scope. Read their
20
+ required references. Use their responsibility classifiers, public boundaries,
21
+ and dependency direction to interpret the plan against the actual repository.
22
+ Preserve project-native folder names: responsibility is authoritative; an
23
+ example tree is not.
24
+
25
+ When an accepted amendment changes the target contract, re-ground the affected
26
+ scope in `$backend-domain-structure` and `$frontend-domain-structure` as
27
+ applicable, including their required references. Rewrite every affected
28
+ `$show-me` persisted view from the amended authority before execution resumes.
29
+
30
+ Invoke `$show-me` to render each persisted architecture evidence view from the
31
+ authoritative plan and observed code. Persist the smallest useful ownership
32
+ tree, dependency graph, wave delta, or seam diff beside its textual conclusion
33
+ in `IMPLEMENTATION-NOTES.md`. The view preserves plan labels, status,
34
+ uncertainty, and violations; it introduces no architecture decision.
35
+
36
+ ## Before dispatch
37
+
38
+ For each architecture wave:
39
+
40
+ 1. Resolve its required starting topology and dependency state from the prior
41
+ checkpoint.
42
+ 2. Map every task's `architecture_wave`, `behavior_owner`,
43
+ `integration_surface`, `public_seam`, `topology_delta`,
44
+ `forbidden_ownership`, `temporary_seams` including `expiry_wave`, and
45
+ `responsibility_acceptance_criteria` including each `criterion_id` and
46
+ `due_wave` into its worker brief unchanged.
47
+ 3. Verify the tasks collectively advance the declared architecture wave and
48
+ have responsibility acceptance criteria that can be evidenced.
49
+ 4. Block dispatch when a prerequisite checkpoint failed or the wave would
50
+ introduce an undeclared dependency, public seam change, or temporary seam.
51
+
52
+ Dispatch is ready when every architecture-bearing task has an accountable
53
+ owner, expected graph delta, seam contract, and checkable responsibility bound.
54
+
55
+ ## Cumulative conformance checkpoint
56
+
57
+ Run a cumulative conformance checkpoint after every architecture wave, before
58
+ computing the next wave. Inspect the whole affected graph, not only the latest
59
+ diff:
60
+
61
+ - compare actual responsibility placement with the Target Ownership Topology;
62
+ - compare static imports and semantic calls with the Declared Dependency Graph;
63
+ - prove every Responsibility Acceptance Criterion due through the current
64
+ architecture wave, keyed by `criterion_id`, with changed artifacts and focused
65
+ validation;
66
+ - rerun each previously met criterion as a regression check and revoke its met
67
+ status when current evidence fails;
68
+ - reconcile every planned `topology_delta` and `forbidden_ownership` rule;
69
+ - detect public seam additions, removals, signature changes, aliases, and deep
70
+ imports, and reconcile each with the public seam contract;
71
+ - reconcile the migration ledger: introducing task, reason, allowed consumers,
72
+ removal task, expiry wave, current status, and removal proof;
73
+ - reject undeclared temporary seams and migrations due through the current
74
+ architecture wave whose removal proof is absent;
75
+ - run the narrowest available architecture, import-boundary, cycle, type, and
76
+ focused behavior checks.
77
+
78
+ Record the checkpoint in `PLAN.md` and under `## Architecture Conformance
79
+ Evidence` in `IMPLEMENTATION-NOTES.md`. Include expected state, observed state,
80
+ evidence, violations, public seam delta, migration delta, and verdict. A failed
81
+ checkpoint blocks dependent architecture waves. Repair the current wave or
82
+ route a target-contract amendment through `$create-plan`; final closure is not
83
+ the first cleanup pass.
84
+
85
+ ## Final closure
86
+
87
+ After the last architecture wave, rerun the checkpoint across the complete
88
+ affected topology. Closure requires:
89
+
90
+ - zero drift from the Target Ownership Topology and Declared Dependency Graph;
91
+ - every Responsibility Acceptance Criterion met with cited evidence;
92
+ - every public seam change declared and accepted;
93
+ - the entire migration ledger is empty, with removal proof for every retired
94
+ temporary seam;
95
+ - no expired or undeclared temporary seam remains;
96
+ - focused architecture and behavior validation is green.
97
+
98
+ Keep the spec incomplete when closure fails. Record exact drift and the task or
99
+ decision required to remove it; never convert in-goal architecture drift into
100
+ generic tech debt.