@punks/cli 4.0.1 → 4.0.3

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 (172) hide show
  1. package/dist/BASELINE_CHANGELOG.md +34 -0
  2. package/dist/CHANGELOG.md +24 -0
  3. package/dist/baseline/scaffold-baseline/baseline.json +5 -5
  4. package/dist/baseline/scaffold-baseline/data/catalog/lint-assets.json +10 -4
  5. package/dist/baseline/scaffold-baseline/data/catalog/packs.json +2 -3
  6. package/dist/baseline/scaffold-baseline/data/catalog/skills.json +8 -8
  7. package/dist/baseline/scaffold-baseline/data/hooks/format-edited-file.mjs +602 -101
  8. package/dist/baseline/scaffold-baseline/data/scripts/commit-gate-runner.d.ts +11 -0
  9. package/dist/baseline/scaffold-baseline/data/scripts/commit-gate-runner.mjs +103 -0
  10. package/dist/baseline/scaffold-baseline/data/scripts/commit-gate-runner.test.ts +144 -0
  11. package/dist/baseline/scaffold-baseline/data/scripts/harness-projection/adapters/claude.mjs +1 -0
  12. package/dist/baseline/scaffold-baseline/data/scripts/harness-projection/adapters/codex.mjs +1 -0
  13. package/dist/baseline/scaffold-baseline/data/scripts/harness-projection/adapters/cursor.mjs +1 -0
  14. package/dist/baseline/scaffold-baseline/data/scripts/harness-projection/adapters/opencode.mjs +1 -0
  15. package/dist/baseline/scaffold-baseline/data/scripts/harness-projection/contract.ts +24 -33
  16. package/dist/baseline/scaffold-baseline/data/scripts/harness-projection/core.mjs +4 -0
  17. package/dist/baseline/scaffold-baseline/data/scripts/harness-projection/core.test.ts +61 -0
  18. package/dist/baseline/scaffold-baseline/data/scripts/harness-projection/lint-feedback.test.ts +123 -0
  19. package/dist/baseline/scaffold-baseline/data/scripts/harness-projection/test-fixtures/claude/actions.json +1 -0
  20. package/dist/baseline/scaffold-baseline/data/scripts/harness-projection/test-fixtures/codex/actions.json +2 -1
  21. package/dist/baseline/scaffold-baseline/data/scripts/harness-projection/test-fixtures/cursor/projection.json +1 -0
  22. package/dist/baseline/scaffold-baseline/data/scripts/harness-projection/test-fixtures/opencode/projection.json +1 -0
  23. package/dist/baseline/scaffold-baseline/skills/agnostic/docs/docs-onboarding/SKILL.md +2 -2
  24. package/dist/baseline/scaffold-baseline/skills/agnostic/planning/create-spec/SKILL.md +32 -32
  25. package/dist/baseline/scaffold-baseline/skills/agnostic/planning/create-spec/assets/SPEC-TEMPLATE.md +7 -7
  26. package/dist/baseline/scaffold-baseline/skills/agnostic/planning/create-spec/references/readiness.md +14 -13
  27. package/dist/baseline/scaffold-baseline/skills/agnostic/planning/create-spec/references/spec-quality-bar.md +26 -19
  28. package/dist/baseline/scaffold-baseline/skills/agnostic/quality/autoreview/SKILL.md +2 -2
  29. package/dist/baseline/scaffold-baseline/skills/agnostic/quality/autoreview/scripts/autoreview +3 -0
  30. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/brainstorm/SKILL.md +12 -0
  31. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/requirements-grill/SKILL.md +2 -1
  32. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/EXAMPLES.md +9 -9
  33. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/REFERENCE.md +43 -55
  34. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/SKILL.md +68 -63
  35. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/assets/concepts/backlog-model.md +26 -29
  36. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/assets/concepts/story-shape.md +5 -5
  37. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/assets/providers/azure-devops-create-payload.md +1 -1
  38. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/assets/providers/github-projects-create-payload.md +2 -2
  39. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/assets/providers/linear-create-payload.md +1 -1
  40. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/assets/providers/monday-create-payload.md +2 -2
  41. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/references/business-projection.md +19 -24
  42. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/references/delivery-status.md +17 -13
  43. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/references/fog-intake.md +45 -48
  44. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/references/functional-projection.md +16 -21
  45. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/references/normalization.md +14 -14
  46. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/references/project-context.md +32 -27
  47. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/references/providers/github.md +105 -150
  48. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/references/providers/linear.md +111 -181
  49. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/references/technical-projection.md +51 -47
  50. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/scripts/validate-task-blocker-graph.mjs +49 -35
  51. package/dist/baseline/scaffold-baseline/skills/agnostic/research/parallel-research/DURABLE-REPORT.md +5 -12
  52. package/dist/baseline/scaffold-baseline/skills/agnostic/research/parallel-research/SKILL.md +7 -8
  53. package/dist/baseline/scaffold-baseline/skills/agnostic/security/architect-pipeline/SKILL.md +97 -0
  54. package/dist/baseline/scaffold-baseline/skills/agnostic/security/architect-pipeline/agents/openai.yaml +4 -0
  55. package/dist/baseline/scaffold-baseline/skills/agnostic/security/architect-pipeline/references/infrastructure-deployment.md +29 -0
  56. package/dist/baseline/scaffold-baseline/skills/agnostic/security/architect-pipeline/references/security-by-design.md +22 -0
  57. package/dist/baseline/scaffold-baseline/skills/agnostic/security/security-best-practices/references/javascript-typescript-vue-web-frontend-security.md +1 -1
  58. package/dist/baseline/scaffold-baseline/skills/frameworks/expo/eas-update-insights/references/update-insights-schema.md +2 -6
  59. package/dist/baseline/scaffold-baseline/skills/frameworks/expo/expo-skill-eval/SKILL.md +6 -7
  60. package/dist/baseline/scaffold-baseline/skills/frameworks/pulumi/provider-upgrade/SKILL.md +10 -7
  61. package/dist/baseline/scaffold-baseline/skills/frameworks/pulumi/pulumi-best-practices/SKILL.md +19 -53
  62. package/dist/baseline/scaffold-baseline/skills/frameworks/pulumi/pulumi-component/SKILL.md +36 -88
  63. package/dist/baseline/scaffold-baseline/skills/frameworks/tanstack-query/tanstack-query/references/best-practices.md +7 -1
  64. package/dist/baseline/scaffold-baseline/skills/frameworks/tanstack-query/tanstack-query/templates/devtools-setup.tsx +4 -0
  65. package/dist/baseline/scaffold-baseline/skills/frameworks/trpc/tanstack-query/references/best-practices.md +7 -1
  66. package/dist/baseline/scaffold-baseline/skills/frameworks/trpc/tanstack-query/templates/devtools-setup.tsx +4 -0
  67. package/dist/baseline/scaffold-baseline/skills/languages/typescript/quality-types/SKILL.md +1 -3
  68. package/dist/baseline/scaffold-baseline/skills/phases/business-finder/SKILL.md +29 -16
  69. package/dist/baseline/scaffold-baseline/skills/phases/delivery-phase/phases/router.md +10 -8
  70. package/dist/baseline/scaffold-baseline/skills/phases/design-phase/phases/backlog.md +26 -17
  71. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/AUTHORING-HANDOFF.md +51 -261
  72. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/SKILL.md +22 -25
  73. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/phases/ensure-fog.md +13 -23
  74. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/phases/grilling.md +40 -0
  75. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/phases/handback.md +11 -18
  76. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/phases/prototype.md +13 -21
  77. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/phases/reconcile.md +21 -35
  78. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/phases/research.md +13 -18
  79. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/phases/return-target.md +14 -25
  80. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/phases/router.md +22 -56
  81. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/references/entrypoint-contract.md +25 -26
  82. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/references/root-routing.md +12 -20
  83. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/references/runtime-handoff.md +17 -39
  84. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/references/state-graph.md +27 -49
  85. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/scripts/finder-contract.mjs +40 -359
  86. package/dist/baseline/scaffold-baseline/skills/phases/functional-finder/SKILL.md +29 -62
  87. package/dist/baseline/scaffold-baseline/skills/phases/requirements-phase/SKILL.md +49 -13
  88. package/dist/baseline/scaffold-baseline.json +5 -5
  89. package/dist/baseline/scaffold-baseline.tgz +0 -0
  90. package/dist/data/hooks/format-edited-file.d.mts +21 -0
  91. package/dist/data/hooks/format-edited-file.mjs +588 -98
  92. package/dist/data/scripts/commit-gate-runner.mjs +103 -0
  93. package/dist/data/scripts/harness-projection/adapters/claude.mjs +1 -0
  94. package/dist/data/scripts/harness-projection/adapters/codex.mjs +1 -0
  95. package/dist/data/scripts/harness-projection/adapters/cursor.mjs +1 -0
  96. package/dist/data/scripts/harness-projection/adapters/opencode.mjs +1 -0
  97. package/dist/data/scripts/harness-projection/core.mjs +4 -0
  98. package/dist/data/scripts/harness-projection/test-fixtures/claude/actions.json +1 -0
  99. package/dist/data/scripts/harness-projection/test-fixtures/codex/actions.json +2 -1
  100. package/dist/data/scripts/harness-projection/test-fixtures/cursor/projection.json +1 -0
  101. package/dist/data/scripts/harness-projection/test-fixtures/opencode/projection.json +1 -0
  102. package/dist/index.js +73 -58
  103. package/dist/skills/agnostic/docs/docs-onboarding/SKILL.md +2 -2
  104. package/dist/skills/agnostic/planning/create-spec/SKILL.md +32 -32
  105. package/dist/skills/agnostic/planning/create-spec/assets/SPEC-TEMPLATE.md +7 -7
  106. package/dist/skills/agnostic/planning/create-spec/references/readiness.md +14 -13
  107. package/dist/skills/agnostic/planning/create-spec/references/spec-quality-bar.md +26 -19
  108. package/dist/skills/agnostic/quality/autoreview/SKILL.md +2 -2
  109. package/dist/skills/agnostic/quality/autoreview/scripts/autoreview +3 -0
  110. package/dist/skills/agnostic/requirements/brainstorm/SKILL.md +12 -0
  111. package/dist/skills/agnostic/requirements/requirements-grill/SKILL.md +2 -1
  112. package/dist/skills/agnostic/requirements/write-backlog/EXAMPLES.md +9 -9
  113. package/dist/skills/agnostic/requirements/write-backlog/REFERENCE.md +43 -55
  114. package/dist/skills/agnostic/requirements/write-backlog/SKILL.md +68 -63
  115. package/dist/skills/agnostic/requirements/write-backlog/assets/concepts/backlog-model.md +26 -29
  116. package/dist/skills/agnostic/requirements/write-backlog/assets/concepts/story-shape.md +5 -5
  117. package/dist/skills/agnostic/requirements/write-backlog/assets/providers/azure-devops-create-payload.md +1 -1
  118. package/dist/skills/agnostic/requirements/write-backlog/assets/providers/github-projects-create-payload.md +2 -2
  119. package/dist/skills/agnostic/requirements/write-backlog/assets/providers/linear-create-payload.md +1 -1
  120. package/dist/skills/agnostic/requirements/write-backlog/assets/providers/monday-create-payload.md +2 -2
  121. package/dist/skills/agnostic/requirements/write-backlog/references/business-projection.md +19 -24
  122. package/dist/skills/agnostic/requirements/write-backlog/references/delivery-status.md +17 -13
  123. package/dist/skills/agnostic/requirements/write-backlog/references/fog-intake.md +45 -48
  124. package/dist/skills/agnostic/requirements/write-backlog/references/functional-projection.md +16 -21
  125. package/dist/skills/agnostic/requirements/write-backlog/references/normalization.md +14 -14
  126. package/dist/skills/agnostic/requirements/write-backlog/references/project-context.md +32 -27
  127. package/dist/skills/agnostic/requirements/write-backlog/references/providers/github.md +97 -142
  128. package/dist/skills/agnostic/requirements/write-backlog/references/providers/linear.md +106 -176
  129. package/dist/skills/agnostic/requirements/write-backlog/references/technical-projection.md +51 -47
  130. package/dist/skills/agnostic/requirements/write-backlog/scripts/validate-task-blocker-graph.mjs +55 -31
  131. package/dist/skills/agnostic/research/parallel-research/DURABLE-REPORT.md +5 -12
  132. package/dist/skills/agnostic/research/parallel-research/SKILL.md +7 -8
  133. package/dist/skills/agnostic/security/architect-pipeline/SKILL.md +97 -0
  134. package/dist/skills/agnostic/security/architect-pipeline/agents/openai.yaml +4 -0
  135. package/dist/skills/agnostic/security/architect-pipeline/references/infrastructure-deployment.md +29 -0
  136. package/dist/skills/agnostic/security/architect-pipeline/references/security-by-design.md +22 -0
  137. package/dist/skills/frameworks/pulumi/provider-upgrade/SKILL.md +10 -7
  138. package/dist/skills/frameworks/pulumi/pulumi-best-practices/SKILL.md +10 -42
  139. package/dist/skills/frameworks/pulumi/pulumi-component/SKILL.md +18 -58
  140. package/dist/skills/phases/business-finder/SKILL.md +29 -16
  141. package/dist/skills/phases/delivery-phase/phases/router.md +10 -8
  142. package/dist/skills/phases/design-phase/phases/backlog.md +26 -17
  143. package/dist/skills/phases/finder-phase/AUTHORING-HANDOFF.md +51 -261
  144. package/dist/skills/phases/finder-phase/SKILL.md +22 -25
  145. package/dist/skills/phases/finder-phase/phases/ensure-fog.md +13 -23
  146. package/dist/skills/phases/finder-phase/phases/grilling.md +40 -0
  147. package/dist/skills/phases/finder-phase/phases/handback.md +11 -18
  148. package/dist/skills/phases/finder-phase/phases/prototype.md +13 -21
  149. package/dist/skills/phases/finder-phase/phases/reconcile.md +21 -35
  150. package/dist/skills/phases/finder-phase/phases/research.md +13 -18
  151. package/dist/skills/phases/finder-phase/phases/return-target.md +14 -25
  152. package/dist/skills/phases/finder-phase/phases/router.md +22 -56
  153. package/dist/skills/phases/finder-phase/references/entrypoint-contract.md +25 -26
  154. package/dist/skills/phases/finder-phase/references/root-routing.md +12 -20
  155. package/dist/skills/phases/finder-phase/references/runtime-handoff.md +17 -39
  156. package/dist/skills/phases/finder-phase/references/state-graph.md +27 -49
  157. package/dist/skills/phases/finder-phase/scripts/finder-contract.mjs +44 -357
  158. package/dist/skills/phases/functional-finder/SKILL.md +29 -62
  159. package/dist/skills/phases/requirements-phase/SKILL.md +49 -13
  160. package/package.json +7 -5
  161. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/phases/adopt-business-path.md +0 -52
  162. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/phases/business-grilling.md +0 -68
  163. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/phases/functional-grilling.md +0 -53
  164. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/phases/technical-grilling.md +0 -67
  165. package/dist/baseline/scaffold-baseline/skills/phases/technical-finder/SKILL.md +0 -74
  166. package/dist/baseline/scaffold-baseline/skills/phases/technical-finder/agents/openai.yaml +0 -2
  167. package/dist/skills/phases/finder-phase/phases/adopt-business-path.md +0 -52
  168. package/dist/skills/phases/finder-phase/phases/business-grilling.md +0 -68
  169. package/dist/skills/phases/finder-phase/phases/functional-grilling.md +0 -53
  170. package/dist/skills/phases/finder-phase/phases/technical-grilling.md +0 -67
  171. package/dist/skills/phases/technical-finder/SKILL.md +0 -74
  172. package/dist/skills/phases/technical-finder/agents/openai.yaml +0 -2
@@ -1,190 +1,120 @@
1
1
  # Linear Provider Adapter
2
2
 
3
- Read this reference only when the resolved provider is Linear. It translates the
4
- provider-neutral mutation envelope into native Linear objects; it does not
5
- change product terms or authorize a mutation.
3
+ Read this reference only when the resolved provider is Linear. It translates
4
+ the provider-neutral mutation envelope into native Linear objects; hierarchy
5
+ policy and mutation authority remain in Write Backlog.
6
6
 
7
- ## Native Representation
7
+ ## `linear-free-v1` Representation
8
+
9
+ `linear-free-v1` is the sole default Linear Free representation.
8
10
 
9
11
  | Product meaning | Linear representation | Required ownership |
10
12
  | --- | --- | --- |
11
13
  | Product/Backlog Root | top-level Linear Initiative | no semantic parent |
12
- | Product Area | Linear Initiative | direct child of the Root |
13
- | Initiative | nested Linear Initiative | exactly one Product Area parent |
14
- | Epic | Linear Project | exactly one owning Initiative |
15
- | Story | Linear Issue | member of its Epic Project |
16
- | Task | Linear sub-issue | `parentId` is its Story; same Project and team |
17
- | Fog | lateral Linear Issue | provenance, never a hierarchy parent |
18
-
19
- Linear permits multiple initiative parents. The semantic contract is narrower:
20
- each Product Area has the resolved Root as its only product parent, and each
21
- nested Initiative has exactly one Product Area parent. An Epic has exactly one
22
- owning Initiative membership. Additional native parents or owning Initiative
23
- memberships are ambiguous hierarchy, not harmless metadata.
24
-
25
- Product Area and Initiative are native Initiative layers, not labels or
26
- milestones. Story has no parent Issue standing in for its Epic: Project
27
- membership represents the Epic. Task nesting uses `parentId` to reference the
28
- Story's stable provider ID.
29
-
30
- ## Read Before Write
31
-
32
- Resolve and read the actual Linear workspace first:
33
-
34
- 1. Read `.devpunks/settings.json`. Resolve `backlogProjectUrl` as the top-level
35
- Linear Initiative by stable provider ID; the URL is a locator, not proof.
36
- 2. Read that Root Initiative, including its workspace ID and workspace URL, and
37
- match both to the workspace encoded by the configured Root URL.
38
- 3. Treat a Linear Project URL or any non-Initiative URL as a legacy or invalid
39
- destination. Return exact `hi ensure` migration guidance and zero writes.
40
- 4. Continue with the native object reads below only after Root and workspace
41
- identity agree.
42
-
43
- - workspace ID, workspace name, and workspace URL
44
- - Product/Backlog Root Initiative ID and URL
45
- - expected parent and child Initiative IDs
46
- - Epic Project IDs, owning Initiative memberships, and team memberships
47
- - Story and Task Issue IDs, parents, Projects, teams, labels, and relations
48
- - every Project milestone and selected milestone membership
49
- - configured `Kind` and `Grilling Stage` label-group IDs and options
50
- - every saved view's stable ID, type, filters, grouping, ordering, and scope
51
-
52
- A connector alias is a routing hint, not identity evidence. Match the workspace
53
- returned by the connected authority to the workspace encoded by the configured
54
- Root URL. Resolve known objects by stable provider ID plus durable wiki identity.
55
- A title-only match, alias-only workspace match, ambiguous candidate, unexpected
56
- parent, or missing representation returns the evidence and zero writes.
57
-
58
- Use provider search only to discover candidates. Before the first mutation,
59
- read every candidate by ID and prove the complete intended hierarchy,
60
- membership, milestone, field, view, provenance, and blocker delta in memory.
61
-
62
- ## Backlog Initialization
63
-
64
- Use the Root Initiative as the compact Linear projection of the wiki-owned
65
- product context. Preserve the full values under stable headings in its
66
- description and use supported native fields where they add structure:
67
-
68
- - `summary` or the opening description: Product brief
69
- - description: business objectives
70
- - description: target users
71
- - description: product boundaries
72
- - description: existing Product Map
73
- - description: durable constraints and non-goals
74
- - description: operating rules
75
- - `owner`: owner
76
- - description: verified repository link
77
- - description: verified wiki link
78
- - description: current and future `V*` milestone context
79
-
80
- Keep repository link and wiki link as explicit Markdown links when the connected
81
- Initiative API exposes no native link collection. Read their exact URLs back
82
- from the Root description. Richer product meaning remains authoritative in the
83
- wiki; the Linear projection links to it rather than inventing a substitute.
84
-
85
- Reconcile existing Product Areas, nested Initiatives, and Epic Projects before
86
- proposing new objects. New Root, Area, Initiative, Project, semantic field, or
87
- view provisioning is structural: preview the current and intended topology and
88
- obtain explicit approval. Write only the approved stable-ID delta.
89
-
90
- ### Semantic Fields
91
-
92
- Use configured Linear label groups as issue-level semantic fields:
93
-
94
- - `Kind`: the accepted Issue kind, including Fog, grilling, Story, and Task
95
- - `Grilling Stage`: exactly Business, Functional, or Technical for a grilling
96
- Issue; absent from other kinds
97
-
98
- Native Initiative and Project entity types already distinguish Root, Product
99
- Area, Initiative, and Epic. Provisioning or changing a field, group, or option
100
- requires a field or view preview and explicit approval. Ordinary projection
101
- reuses exact configured IDs and never creates labels ad hoc. Overlapping,
102
- missing, or non-exclusive representations stop with zero writes and setup
103
- guidance.
104
-
105
- ### Product-Owner Views
106
-
107
- Preserve an equivalent existing view before proposing a new one. The required
108
- semantic views are:
109
-
110
- - **Product Map**: Root -> Product Area -> Initiative -> Epic, without Story or
111
- Task noise
112
- - **Roadmap**: `V*` iterations and their Story/Task progress rolled up through
14
+ | Product Area | Linear Project | member of the Root Initiative |
15
+ | Initiative | Linear Issue labeled `Kind/initiative` | member of its Product Area Project |
16
+ | Epic | child Issue labeled `Kind/epic` | `parentId` is its Initiative |
17
+ | Story | child Issue labeled `Kind/story` | `parentId` is its Epic |
18
+ | Task | child Issue labeled `Kind/task` | `parentId` is its Story |
19
+ | Fog | lateral Issue labeled `Kind/fog` | provenance, never a hierarchy parent |
20
+
21
+ The Root is the only native Initiative. Each Product Area has one Root
22
+ Initiative membership. Initiative, Epic, Story, and Task Issues share the
23
+ Product Area Project and team; required `Kind/*` labels and recursive
24
+ `parentId` relations preserve semantic type and ownership. A nested native
25
+ Initiative, a Project per semantic Initiative or Epic, an extra parent, or a
26
+ mismatched Project is divergent topology. It remains unchanged until an
27
+ explicitly approved Normalization operation targets it.
28
+
29
+ ## Destination and Read-Before-Write
30
+
31
+ 1. Read `.devpunks/settings.json`. Keep the current `backlogProjectUrl` key; it
32
+ identifies the Product/Backlog Root Initiative.
33
+ 2. Resolve that Root by stable provider ID. Read its workspace ID, workspace
34
+ name, workspace URL, and configured Root URL. A connector alias is only a
35
+ routing hint.
36
+ 3. Require the returned workspace ID and workspace URL to identify the same
37
+ workspace encoded by the configured Root URL. A wrong workspace returns its
38
+ observed identity, expected identity, and zero provider mutations.
39
+ 4. Treat a Linear Project URL, legacy project destination, or any non-Initiative
40
+ Root URL as invalid. Return exact `hi ensure` destination guidance and zero
41
+ writes rather than guessing or creating another Root.
42
+ 5. Read all candidate Projects, Issues, parents, labels, milestones, relations,
43
+ views, and durable identity links before choosing create, reuse, or enrich.
44
+
45
+ Stable provider identity plus durable wiki identity is the reuse key. A title
46
+ match, incomplete search, ambiguous candidate, conflicting identity, unexpected
47
+ parent, or unsupported representation returns exact steering and zero writes.
48
+
49
+ ## Initialization Metadata and Views
50
+
51
+ Project wiki content remains authoritative. Project the Root's Product brief,
52
+ business objectives, target users, product boundaries, Product Map, constraints
53
+ and non-goals, operating rules, owner, repository link, wiki link, and current
54
+ and future `V*` context into supported Initiative fields and description.
55
+
56
+ Use the configured issue label group for exact labels including
57
+ `Kind/initiative`, `Kind/epic`, `Kind/story`, `Kind/task`, `Kind/fog`,
58
+ `Kind/grilling`, `Kind/research`, and `Kind/prototype`. Entity type already
59
+ distinguishes the Root and Product Area Project. Missing, overlapping, or
60
+ non-exclusive Kind labels return setup guidance and zero writes. Ordinary
61
+ projection reuses configured label IDs; initialization may provision labels
62
+ only after a structural preview and explicit approval.
63
+
64
+ Preserve semantically equivalent existing views before proposing another:
65
+
66
+ - **Product Map**: Product Area, Initiative, and Epic structure without Story
67
+ or Task noise
68
+ - **Roadmap**: ordered `V*` milestones and Story/Task progress rolled up through
113
69
  Epic and Initiative outcomes
114
- - **Fogs**: Fog status, affected structures, target and completion iteration,
115
- generated work, and production evidence
116
- - **Current Delivery**: active Stories and Tasks grouped by `V*`, status,
117
- owner, and blocker readiness
70
+ - **Fogs**: unresolved provenance, affected structures, and production evidence
71
+ - **Current Delivery**: active Stories and Tasks with milestone, owner, status,
72
+ and native blocker readiness
118
73
 
119
- Compare semantics, not display title: view type, scope, filters, grouping,
120
- ordering, and visible fields must match. View creation or material change needs
121
- the structural preview and explicit approval. When the connected view API is
122
- unavailable or unsupported, return the missing capability and zero writes for
123
- initialization. A document, issue list, or guessed UI configuration is not an
124
- exact view readback.
74
+ If the connected provider cannot create, update, or read back a required view,
75
+ return exact manual setup guidance and zero initialization writes.
125
76
 
126
- ## Contextual Version Milestones
77
+ ## Milestones and Blockers
127
78
 
128
79
  Reuse a fitting existing `V*` milestone before proposing one. Linear milestones
129
- are project-scoped, so each Story's milestone must belong to its Epic's Linear
130
- Project. When one product version crosses Epics, reconcile the same durable
131
- version identity in each affected Project; a shared title alone is not identity.
132
-
133
- Every Story has exactly one contextual `V*` milestone. Every Task has the same
134
- Project milestone as its Story. Reject zero or multiple memberships and reject
135
- a Task whose Project or milestone differs from its Story. Product Areas,
136
- Initiatives, and Epics span versions. A Fog may target a fitting version; use a
137
- native milestone only when its Issue belongs to the applicable Project,
138
- otherwise preserve the target as a stable milestone link in its body.
139
-
140
- When supported, milestone metadata contains:
141
-
142
- 1. Version name
143
- 2. One-sentence product goal
144
- 3. Included product outcomes or capability changes
145
-
146
- Store goal and outcomes in the milestone description when that field is
147
- supported. When milestone description metadata is unsupported by the connected
148
- authority, the name-only fallback is sufficient and the full meaning remains in
149
- the linked wiki. Moving an existing Story, Task, or Fog between milestones
150
- changes roadmap commitment and requires explicit approval.
151
-
152
- Blockers define delivery precedence. Before writing, traverse the complete
153
- reachable Task graph and reject missing targets, future-iteration dependencies,
154
- self-edges, and cycles. Materialize accepted edges with native `blockedBy` and
155
- `blocks` relations; milestone order never creates a blocker.
156
-
157
- ## Lateral Fog Provenance
158
-
159
- Fog remains lateral. Use native `relatedTo` relations between the Fog and every
160
- resulting Story and Task Issue. Record stable Product Area, Initiative, and Epic
161
- URLs in the Fog body. Add the immutable Fog source link to each enriched
162
- Initiative or Project description so non-Issue objects preserve reciprocal
163
- provenance. Read back both the Issue relation and every body or description
164
- source link. A source link supplements native relations; it never becomes a
165
- parent edge.
166
-
167
- ## Mutation And Exact Readback
168
-
169
- Apply the validated, approved delta parent-first and use stable IDs for every
170
- update or relationship. After each create, capture its returned ID before a
171
- dependent write. On a partial provider failure, stop, read the affected objects,
172
- and return the observed writes plus unresolved delta; resume from fresh reads
173
- instead of replaying the batch.
174
-
175
- RAC-2 is satisfied only after exact readback proves:
80
+ are project-scoped, so every Story belongs to exactly one milestone in its
81
+ Product Area Project. Every derived Task belongs to the same Project and
82
+ milestone as its Story. Product Areas, Initiatives, and Epics may span
83
+ iterations. A milestone record retains the Version name, one-sentence product
84
+ goal, and included product outcomes or capability changes when supported; a
85
+ name-only fallback keeps richer meaning in the linked wiki.
86
+
87
+ Validate the complete reachable Task graph before mutation. Reject missing
88
+ parents or blocker targets, Task/Story milestone mismatch, future-iteration
89
+ dependencies, duplicate edges, self-edges, and cycles. Materialize only accepted
90
+ edges as native `blockedBy` and reciprocal `blocks` relations.
91
+
92
+ ## Provenance
93
+
94
+ Fog remains lateral. Use native `relatedTo` relations for Fog-to-Issue
95
+ provenance and immutable source links in every enriched or produced Issue and
96
+ Project description. Historical staged tickets are read-only compatibility
97
+ evidence and are excluded from automatic Normalization.
98
+
99
+ ## Small Mutation and Exact Readback
100
+
101
+ Build the complete intended mutation envelope in memory: ordered operations,
102
+ stable IDs, preconditions, immutable source identities, approval record, and
103
+ expected readback. Preview every material structural change and obtain explicit
104
+ approval before writing. Write only the validated delta, parent-first, using
105
+ stable IDs; capture each returned ID before a dependent operation.
106
+
107
+ Exact readback must prove:
176
108
 
177
109
  1. workspace and Root identity
178
- 2. Root -> Product Area -> Initiative parent hierarchy
179
- 3. Epic Project owning Initiative and team membership
180
- 4. Story Project membership and Task parent, Project, and team membership
181
- 5. exactly-one contextual milestone for every Story and the same milestone for
182
- every Task
183
- 6. semantic fields and all four views
184
- 7. Fog provenance, immutable evidence, and source links
185
- 8. every native `relatedTo`, `blockedBy`, and `blocks` relation
186
- 9. created, enriched, repaired, or unchanged state for each stable object
187
-
188
- Any mismatch remains unresolved reconciliation. Report stable IDs, URLs,
189
- observed provider state, approval record, and the first missing representation;
190
- never claim success from mutation responses alone.
110
+ 2. Root Initiative membership for every Product Area Project
111
+ 3. recursive Initiative → Epic → Story → Task parent chain
112
+ 4. Product Area Project, team, and `Kind/*` identity for every Issue
113
+ 5. exactly one contextual `V*` milestone per Story and the same one per Task
114
+ 6. semantic views, Fog provenance, immutable sources, and source links
115
+ 7. every native `relatedTo`, `blockedBy`, and `blocks` relation
116
+ 8. created, enriched, repaired, or unchanged classification for every object
117
+
118
+ A mismatch remains unresolved reconciliation. On partial provider failure,
119
+ stop further writes, read back every affected object, and return observed writes,
120
+ the recovery point, and exact residual delta. Resume only after fresh reads.
@@ -1,35 +1,46 @@
1
- # Technical Projection
1
+ # Delivery Projection
2
2
 
3
- Before any provider write, require one exact Story, one immutable accepted Technical grilling
4
- resolution on its exact child, and a verified stable blob URL to an authoritative agent-ready `SPEC.md`. The specification
5
- must preserve stable user stories, acceptance criteria, accepted technical and
6
- testing decisions, and verification seams. Name every readiness gap and write
7
- nothing when authority is incomplete.
3
+ Before any provider write, require a verified stable blob URL for the
4
+ authoritative agent-ready `SPEC.md`. The specification must preserve neutral
5
+ `OUT-###` outcomes, acceptance criteria, accepted technical and testing
6
+ decisions, and verification seams. Name every readiness gap and write nothing
7
+ when authority is incomplete, mutable, or local-only.
8
+
9
+ ## Derive Delivery Structure
10
+
11
+ Read current provider evidence and the immutable specification before mutation.
12
+ Derive or reuse the accepted Epic, then derive the shippable Stories and atomic,
13
+ independently owner-ready Tasks supported by the requirements. Missing or
14
+ ambiguous placement identity, unsupported immutable authority representation,
15
+ or mismatched readback authorizes zero provider writes.
16
+
17
+ Retain each `OUT-###` only as traceability from derived delivery items back to
18
+ the specification. It does not select a provider identity and never prescribes
19
+ an Epic, Story, or Task count. Outcome and Story counts may differ.
8
20
 
9
21
  ## Authority Enrichment
10
22
 
11
- Read the exact existing Epic and Story before mutation. Enrich the existing Epic and Story with verified immutable spec authority: the stable blob URL, accepted
12
- technical and testing decisions, verification seams, and Fog/Technical-resolution
13
- provenance. Preserve their Business and Functional wording, non-goals,
14
- dependencies, and durable accepted-artifact links.
23
+ Enrich every reused or derived Epic, Story, and Task with the verified stable
24
+ specification authority: stable blob URL, applicable outcome links, acceptance
25
+ criteria, accepted technical and testing decisions, verification seams, and
26
+ durable provenance. Preserve accepted wording, non-goals, and dependencies.
15
27
 
16
- Include this enrichment in the validated mutation before Task creation. When the
17
- provider requires multiple requests, write and read back the authority enrichment
18
- before creating Tasks. Missing or ambiguous Epic/Story identity, unsupported
19
- immutable authority representation, or mismatched readback produces no Task write.
28
+ Include authority enrichment in the validated mutation. When a provider
29
+ requires multiple requests, write and read back the authority enrichment before
30
+ creating dependent items. Any mismatched readback stops the remaining writes.
20
31
 
21
- ## Task Split
32
+ ## Story and Task Split
22
33
 
23
- Create one or more mandatory, atomic, independently owner-ready Tasks for the
24
- Story. Each Task must define one bounded shippable responsibility, preserve its
25
- Story and specification authority, name its acceptance and verification
26
- evidence, and remain understandable without a private planning artifact.
34
+ Each derived Story is one shippable product outcome. Create one or more
35
+ mandatory Tasks only when required to deliver that Story. Every Task is atomic,
36
+ independently ownable, understandable from its Story and stable specification
37
+ authority, and names its acceptance and verification evidence.
27
38
 
28
- Tasks are the provider execution graph that downstream planning preserves. Do
39
+ Provider Tasks form the execution graph that downstream planning preserves. Do
29
40
  not create a second private Task graph or split by technical layer when one
30
41
  owner-ready vertical unit can deliver the result.
31
42
 
32
- ## Milestone And Blockers
43
+ ## Milestone and Blockers
33
44
 
34
45
  Every Task uses the same `V*` milestone iteration as its Story. Resolve every
35
46
  blocker by stable provider identity and validate the full reachable Task graph,
@@ -37,29 +48,22 @@ including existing connected Tasks.
37
48
 
38
49
  Run the [provider-neutral Task graph
39
50
  validator](../scripts/validate-task-blocker-graph.mjs) with every reachable
40
- Story's stable identity and exact milestone, every reachable Task's stable
41
- identity, parent Story identity, exact milestone, and blocker identities, plus
42
- the resolved earliest-to-latest milestone order. A failed result authorizes
43
- zero provider mutations. Provider adapters materialize only the validator's
44
- accepted edges.
45
-
46
- Reject:
47
-
48
- - missing targets
49
- - missing parent Stories
50
- - Task/Story milestone mismatches
51
- - future-iteration dependencies
52
- - self-edges
53
- - cycles
54
-
55
- Real blockers may cross Stories and Epics when the target is in the same or an
56
- earlier milestone iteration. Native blocker relations, not list order or
57
- milestone order, define precedence and parallel delivery waves.
58
-
59
- ## Write And Read Back
60
-
61
- Preview the complete Task topology with `$show-me`; obtain approval for any
62
- structural movement. Write the validated Epic/Story authority enrichment, Tasks,
63
- parents, the same `V*` membership, blockers, source links, and Fog provenance.
64
- Read every enrichment and relation back exactly. Return stable Epic, Story, and
65
- Task identities plus blocker edges to Finder, planning, and delivery consumers.
51
+ Story's stable identity and exact milestone; every reachable Task's stable
52
+ identity, parent Story identity, exact milestone, and blocker identities; plus
53
+ resolved earliest-to-latest milestone order. A failed result authorizes zero
54
+ provider mutations. Provider adapters materialize only accepted edges.
55
+
56
+ Reject missing targets, missing parent Stories, Task/Story milestone mismatch,
57
+ future-iteration dependencies, self-edges, and cycles. Real blockers may cross
58
+ Stories and Epics when their target is in the same or an earlier milestone.
59
+ Native blocker relations, rather than list or milestone order, define delivery
60
+ precedence.
61
+
62
+ ## Write and Read Back
63
+
64
+ Preview the complete authority-derived topology with `$show-me`; obtain
65
+ approval for material structural movement. Write only the validated Epic,
66
+ Stories, Tasks, parents, `V*` membership, blockers, source links, and provenance.
67
+ Read every identity, enrichment, and relation back exactly. Return the stable
68
+ Epic, Story, and Task identities plus blocker edges to planning and delivery
69
+ consumers.
@@ -1,18 +1,18 @@
1
1
  const failure = (code, details = {}) => ({ ok: false, code, ...details });
2
2
 
3
- const stableId = (value) => typeof value === "string" && value.trim() === value && value.length > 0;
3
+ const stableId = (value) =>
4
+ typeof value === "string" && value.trim() === value && value.length > 0;
4
5
 
5
6
  /**
6
- * Validate the complete provider-neutral Task graph before any provider write.
7
+ * Validate a complete provider-neutral Task graph before any provider write.
7
8
  * Milestone order contains stable V* identities from earliest to latest.
9
+ * Empty derived Story and Task sets are valid; authority determines cardinality.
8
10
  */
9
11
  export const validateTaskBlockerGraph = ({ milestoneOrder, stories, tasks } = {}) => {
10
12
  if (
11
13
  !Array.isArray(milestoneOrder) ||
12
14
  !Array.isArray(stories) ||
13
- stories.length === 0 ||
14
- !Array.isArray(tasks) ||
15
- tasks.length === 0
15
+ !Array.isArray(tasks)
16
16
  ) {
17
17
  return failure("GRAPH_REQUIRED");
18
18
  }
@@ -29,10 +29,13 @@ export const validateTaskBlockerGraph = ({ milestoneOrder, stories, tasks } = {}
29
29
  const storiesById = new Map();
30
30
  for (const story of stories) {
31
31
  if (!story || !stableId(story.id)) return failure("STORY_ID_REQUIRED");
32
- if (storiesById.has(story.id)) return failure("STORY_ID_DUPLICATE", { storyId: story.id });
32
+ if (storiesById.has(story.id)) {
33
+ return failure("STORY_ID_DUPLICATE", { storyId: story.id });
34
+ }
33
35
  if (!Array.isArray(story.milestoneIds) || story.milestoneIds.length !== 1) {
34
36
  return failure("STORY_MILESTONE_CARDINALITY", { storyId: story.id });
35
37
  }
38
+
36
39
  const [milestoneId] = story.milestoneIds;
37
40
  if (!stableId(milestoneId) || !milestoneRank.has(milestoneId)) {
38
41
  return failure("STORY_MILESTONE_UNKNOWN", { storyId: story.id, milestoneId });
@@ -43,12 +46,16 @@ export const validateTaskBlockerGraph = ({ milestoneOrder, stories, tasks } = {}
43
46
  const tasksById = new Map();
44
47
  for (const task of tasks) {
45
48
  if (!task || !stableId(task.id)) return failure("TASK_ID_REQUIRED");
46
- if (tasksById.has(task.id)) return failure("TASK_ID_DUPLICATE", { taskId: task.id });
49
+ if (tasksById.has(task.id)) {
50
+ return failure("TASK_ID_DUPLICATE", { taskId: task.id });
51
+ }
47
52
  tasksById.set(task.id, task);
48
53
  }
49
54
 
50
- const orderedTasks = [...tasksById.values()].sort((left, right) => left.id.localeCompare(right.id));
51
- const taskCountByStory = new Map([...storiesById.keys()].map((storyId) => [storyId, 0]));
55
+ const orderedTasks = [...tasksById.values()].sort((left, right) =>
56
+ left.id.localeCompare(right.id),
57
+ );
58
+
52
59
  for (const task of orderedTasks) {
53
60
  if (!Array.isArray(task.milestoneIds) || task.milestoneIds.length !== 1) {
54
61
  return failure("MILESTONE_CARDINALITY", { taskId: task.id });
@@ -60,9 +67,13 @@ export const validateTaskBlockerGraph = ({ milestoneOrder, stories, tasks } = {}
60
67
  if (!stableId(task.storyId)) {
61
68
  return failure("PARENT_STORY_ID_REQUIRED", { taskId: task.id });
62
69
  }
70
+
63
71
  const parentStory = storiesById.get(task.storyId);
64
72
  if (!parentStory) {
65
- return failure("PARENT_STORY_MISSING", { taskId: task.id, storyId: task.storyId });
73
+ return failure("PARENT_STORY_MISSING", {
74
+ taskId: task.id,
75
+ storyId: task.storyId,
76
+ });
66
77
  }
67
78
  if (parentStory.milestoneIds[0] !== milestoneId) {
68
79
  return failure("TASK_STORY_MILESTONE_MISMATCH", {
@@ -72,54 +83,63 @@ export const validateTaskBlockerGraph = ({ milestoneOrder, stories, tasks } = {}
72
83
  taskMilestoneId: milestoneId,
73
84
  });
74
85
  }
75
- if (!Array.isArray(task.blockedBy)) return failure("BLOCKERS_REQUIRED", { taskId: task.id });
76
- taskCountByStory.set(task.storyId, taskCountByStory.get(task.storyId) + 1);
77
- }
78
-
79
- for (const [storyId, taskCount] of taskCountByStory) {
80
- if (taskCount === 0) return failure("STORY_TASK_REQUIRED", { storyId });
86
+ if (!Array.isArray(task.blockedBy)) {
87
+ return failure("BLOCKERS_REQUIRED", { taskId: task.id });
88
+ }
81
89
  }
82
90
 
83
91
  const edges = [];
84
92
  for (const task of orderedTasks) {
85
- const blockingTaskIds = [...task.blockedBy].sort((left, right) =>
93
+ const blockerIds = [...task.blockedBy].sort((left, right) =>
86
94
  String(left).localeCompare(String(right)),
87
95
  );
88
- for (const blockingTaskId of blockingTaskIds) {
89
- if (!stableId(blockingTaskId)) {
96
+ const seen = new Set();
97
+
98
+ for (const blockerId of blockerIds) {
99
+ if (!stableId(blockerId)) {
90
100
  return failure("BLOCKER_ID_REQUIRED", { blockedTaskId: task.id });
91
101
  }
92
- const blockingTask = tasksById.get(blockingTaskId);
93
- if (!blockingTask) {
102
+ if (seen.has(blockerId)) {
103
+ return failure("BLOCKER_EDGE_DUPLICATE", {
104
+ blockedTaskId: task.id,
105
+ blockingTaskId: blockerId,
106
+ });
107
+ }
108
+ seen.add(blockerId);
109
+
110
+ const blocker = tasksById.get(blockerId);
111
+ if (!blocker) {
94
112
  return failure("BLOCKER_TARGET_MISSING", {
95
113
  blockedTaskId: task.id,
96
- blockingTaskId,
114
+ blockingTaskId: blockerId,
97
115
  });
98
116
  }
99
- if (blockingTaskId === task.id) return failure("SELF_EDGE", { taskId: task.id });
117
+ if (blockerId === task.id) return failure("SELF_EDGE", { taskId: task.id });
100
118
  if (
101
- milestoneRank.get(blockingTask.milestoneIds[0]) > milestoneRank.get(task.milestoneIds[0])
119
+ milestoneRank.get(blocker.milestoneIds[0]) >
120
+ milestoneRank.get(task.milestoneIds[0])
102
121
  ) {
103
122
  return failure("FUTURE_BLOCKER", {
104
123
  blockedTaskId: task.id,
105
- blockingTaskId,
124
+ blockingTaskId: blockerId,
106
125
  });
107
126
  }
108
- edges.push({ blockedTaskId: task.id, blockingTaskId });
127
+ edges.push({ blockedTaskId: task.id, blockingTaskId: blockerId });
109
128
  }
110
129
  }
111
130
 
112
131
  const state = new Map();
113
132
  const visit = (taskId, path) => {
114
133
  if (state.get(taskId) === "visiting") {
115
- return failure("CYCLE", { cycle: [...path.slice(path.indexOf(taskId)), taskId] });
134
+ return failure("CYCLE", {
135
+ cycle: [...path.slice(path.indexOf(taskId)), taskId],
136
+ });
116
137
  }
117
138
  if (state.get(taskId) === "visited") return null;
118
139
 
119
140
  state.set(taskId, "visiting");
120
- const task = tasksById.get(taskId);
121
- for (const blockingTaskId of [...task.blockedBy].sort()) {
122
- const cycle = visit(blockingTaskId, [...path, taskId]);
141
+ for (const blockerId of [...tasksById.get(taskId).blockedBy].sort()) {
142
+ const cycle = visit(blockerId, [...path, taskId]);
123
143
  if (cycle) return cycle;
124
144
  }
125
145
  state.set(taskId, "visited");
@@ -131,5 +151,9 @@ export const validateTaskBlockerGraph = ({ milestoneOrder, stories, tasks } = {}
131
151
  if (cycle) return cycle;
132
152
  }
133
153
 
134
- return { ok: true, taskIds: orderedTasks.map(({ id }) => id), edges };
154
+ return {
155
+ ok: true,
156
+ taskIds: orderedTasks.map(({ id }) => id),
157
+ edges,
158
+ };
135
159
  };
@@ -6,9 +6,7 @@ written to the project wiki before the run can complete.
6
6
 
7
7
  ## Contract
8
8
 
9
- 1. Record the current checkout and branch before dispatching lanes. This branch
10
- is the retention reference. A detached checkout is a blocker.
11
- 2. Resolve `<wiki-root>` using the repository convention (`apps/wiki` for a
9
+ 1. Resolve `<wiki-root>` using the repository convention (`apps/wiki` for a
12
10
  monorepo, `wiki` for a single-repo project), then read `<wiki-root>/AGENTS.md`
13
11
  before writing. The consolidated report path is always
14
12
  `<wiki-root>/content/docs/project/research/<slug>-research-report.md`, as a
@@ -16,19 +14,14 @@ written to the project wiki before the run can complete.
16
14
  substitute `public-docs`, `specs`, or a context-only handoff. If the
17
15
  `project/research` route is missing, create its index and route metadata only
18
16
  as required by the wiki's existing conventions.
19
- 3. Run 2-4 readonly lanes. Lanes never write the report.
20
- 4. After synthesis, the coordinator or one designated consolidator writes one
17
+ 2. Run 2-4 readonly lanes. Lanes never write the report.
18
+ 3. After synthesis, the coordinator or one designated consolidator writes one
21
19
  Markdown report at the resolved wiki path. There is exactly one writer and
22
20
  one consolidated report. Include the primary source for every retained
23
21
  factual claim and separate facts, inferences, conflicts, and unresolved
24
22
  product decisions.
25
- 5. Write and commit the report and any required route metadata in one commit in
26
- the current checkout on the current branch. Never create, switch, checkout,
27
- or use another branch or worktree to persist the report. Push that same
28
- branch when remote retention is required; otherwise retain it locally.
29
- 6. Verify the checkout and branch are unchanged and that the same branch
30
- contains the report commit. Do this before returning the immutable commit SHA
31
- and path, plus the verified branch retention reference.
23
+ 4. Persist the consolidated report in the repository at the resolved intended
24
+ project-wiki path before returning.
32
25
 
33
26
  The report may close factual uncertainty. It must not silently choose product
34
27
  direction or impersonate a human decision-maker. A later `docs-ingest-phase`