@punks/cli 4.0.2 → 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 (156) hide show
  1. package/dist/BASELINE_CHANGELOG.md +24 -0
  2. package/dist/CHANGELOG.md +17 -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 +0 -1
  6. package/dist/baseline/scaffold-baseline/data/catalog/skills.json +0 -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/security/security-best-practices/references/javascript-typescript-vue-web-frontend-security.md +1 -1
  52. package/dist/baseline/scaffold-baseline/skills/frameworks/expo/eas-update-insights/references/update-insights-schema.md +2 -6
  53. package/dist/baseline/scaffold-baseline/skills/frameworks/expo/expo-skill-eval/SKILL.md +6 -7
  54. package/dist/baseline/scaffold-baseline/skills/frameworks/pulumi/pulumi-best-practices/SKILL.md +1 -3
  55. package/dist/baseline/scaffold-baseline/skills/frameworks/pulumi/pulumi-component/SKILL.md +2 -14
  56. package/dist/baseline/scaffold-baseline/skills/frameworks/tanstack-query/tanstack-query/references/best-practices.md +7 -1
  57. package/dist/baseline/scaffold-baseline/skills/frameworks/tanstack-query/tanstack-query/templates/devtools-setup.tsx +4 -0
  58. package/dist/baseline/scaffold-baseline/skills/frameworks/trpc/tanstack-query/references/best-practices.md +7 -1
  59. package/dist/baseline/scaffold-baseline/skills/frameworks/trpc/tanstack-query/templates/devtools-setup.tsx +4 -0
  60. package/dist/baseline/scaffold-baseline/skills/languages/typescript/quality-types/SKILL.md +1 -3
  61. package/dist/baseline/scaffold-baseline/skills/phases/business-finder/SKILL.md +29 -16
  62. package/dist/baseline/scaffold-baseline/skills/phases/delivery-phase/phases/router.md +10 -8
  63. package/dist/baseline/scaffold-baseline/skills/phases/design-phase/phases/backlog.md +26 -17
  64. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/AUTHORING-HANDOFF.md +51 -261
  65. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/SKILL.md +22 -25
  66. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/phases/ensure-fog.md +13 -23
  67. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/phases/grilling.md +40 -0
  68. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/phases/handback.md +11 -18
  69. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/phases/prototype.md +13 -21
  70. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/phases/reconcile.md +21 -35
  71. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/phases/research.md +13 -18
  72. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/phases/return-target.md +14 -25
  73. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/phases/router.md +22 -56
  74. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/references/entrypoint-contract.md +25 -26
  75. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/references/root-routing.md +12 -20
  76. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/references/runtime-handoff.md +17 -39
  77. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/references/state-graph.md +27 -49
  78. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/scripts/finder-contract.mjs +40 -359
  79. package/dist/baseline/scaffold-baseline/skills/phases/functional-finder/SKILL.md +29 -62
  80. package/dist/baseline/scaffold-baseline/skills/phases/requirements-phase/SKILL.md +49 -13
  81. package/dist/baseline/scaffold-baseline.json +5 -5
  82. package/dist/baseline/scaffold-baseline.tgz +0 -0
  83. package/dist/data/hooks/format-edited-file.d.mts +21 -0
  84. package/dist/data/hooks/format-edited-file.mjs +588 -98
  85. package/dist/data/scripts/commit-gate-runner.mjs +103 -0
  86. package/dist/data/scripts/harness-projection/adapters/claude.mjs +1 -0
  87. package/dist/data/scripts/harness-projection/adapters/codex.mjs +1 -0
  88. package/dist/data/scripts/harness-projection/adapters/cursor.mjs +1 -0
  89. package/dist/data/scripts/harness-projection/adapters/opencode.mjs +1 -0
  90. package/dist/data/scripts/harness-projection/core.mjs +4 -0
  91. package/dist/data/scripts/harness-projection/test-fixtures/claude/actions.json +1 -0
  92. package/dist/data/scripts/harness-projection/test-fixtures/codex/actions.json +2 -1
  93. package/dist/data/scripts/harness-projection/test-fixtures/cursor/projection.json +1 -0
  94. package/dist/data/scripts/harness-projection/test-fixtures/opencode/projection.json +1 -0
  95. package/dist/index.js +73 -58
  96. package/dist/skills/agnostic/docs/docs-onboarding/SKILL.md +2 -2
  97. package/dist/skills/agnostic/planning/create-spec/SKILL.md +32 -32
  98. package/dist/skills/agnostic/planning/create-spec/assets/SPEC-TEMPLATE.md +7 -7
  99. package/dist/skills/agnostic/planning/create-spec/references/readiness.md +14 -13
  100. package/dist/skills/agnostic/planning/create-spec/references/spec-quality-bar.md +26 -19
  101. package/dist/skills/agnostic/quality/autoreview/SKILL.md +2 -2
  102. package/dist/skills/agnostic/quality/autoreview/scripts/autoreview +3 -0
  103. package/dist/skills/agnostic/requirements/brainstorm/SKILL.md +12 -0
  104. package/dist/skills/agnostic/requirements/requirements-grill/SKILL.md +2 -1
  105. package/dist/skills/agnostic/requirements/write-backlog/EXAMPLES.md +9 -9
  106. package/dist/skills/agnostic/requirements/write-backlog/REFERENCE.md +43 -55
  107. package/dist/skills/agnostic/requirements/write-backlog/SKILL.md +68 -63
  108. package/dist/skills/agnostic/requirements/write-backlog/assets/concepts/backlog-model.md +26 -29
  109. package/dist/skills/agnostic/requirements/write-backlog/assets/concepts/story-shape.md +5 -5
  110. package/dist/skills/agnostic/requirements/write-backlog/assets/providers/azure-devops-create-payload.md +1 -1
  111. package/dist/skills/agnostic/requirements/write-backlog/assets/providers/github-projects-create-payload.md +2 -2
  112. package/dist/skills/agnostic/requirements/write-backlog/assets/providers/linear-create-payload.md +1 -1
  113. package/dist/skills/agnostic/requirements/write-backlog/assets/providers/monday-create-payload.md +2 -2
  114. package/dist/skills/agnostic/requirements/write-backlog/references/business-projection.md +19 -24
  115. package/dist/skills/agnostic/requirements/write-backlog/references/delivery-status.md +17 -13
  116. package/dist/skills/agnostic/requirements/write-backlog/references/fog-intake.md +45 -48
  117. package/dist/skills/agnostic/requirements/write-backlog/references/functional-projection.md +16 -21
  118. package/dist/skills/agnostic/requirements/write-backlog/references/normalization.md +14 -14
  119. package/dist/skills/agnostic/requirements/write-backlog/references/project-context.md +32 -27
  120. package/dist/skills/agnostic/requirements/write-backlog/references/providers/github.md +97 -142
  121. package/dist/skills/agnostic/requirements/write-backlog/references/providers/linear.md +106 -176
  122. package/dist/skills/agnostic/requirements/write-backlog/references/technical-projection.md +51 -47
  123. package/dist/skills/agnostic/requirements/write-backlog/scripts/validate-task-blocker-graph.mjs +55 -31
  124. package/dist/skills/phases/business-finder/SKILL.md +29 -16
  125. package/dist/skills/phases/delivery-phase/phases/router.md +10 -8
  126. package/dist/skills/phases/design-phase/phases/backlog.md +26 -17
  127. package/dist/skills/phases/finder-phase/AUTHORING-HANDOFF.md +51 -261
  128. package/dist/skills/phases/finder-phase/SKILL.md +22 -25
  129. package/dist/skills/phases/finder-phase/phases/ensure-fog.md +13 -23
  130. package/dist/skills/phases/finder-phase/phases/grilling.md +40 -0
  131. package/dist/skills/phases/finder-phase/phases/handback.md +11 -18
  132. package/dist/skills/phases/finder-phase/phases/prototype.md +13 -21
  133. package/dist/skills/phases/finder-phase/phases/reconcile.md +21 -35
  134. package/dist/skills/phases/finder-phase/phases/research.md +13 -18
  135. package/dist/skills/phases/finder-phase/phases/return-target.md +14 -25
  136. package/dist/skills/phases/finder-phase/phases/router.md +22 -56
  137. package/dist/skills/phases/finder-phase/references/entrypoint-contract.md +25 -26
  138. package/dist/skills/phases/finder-phase/references/root-routing.md +12 -20
  139. package/dist/skills/phases/finder-phase/references/runtime-handoff.md +17 -39
  140. package/dist/skills/phases/finder-phase/references/state-graph.md +27 -49
  141. package/dist/skills/phases/finder-phase/scripts/finder-contract.mjs +44 -357
  142. package/dist/skills/phases/functional-finder/SKILL.md +29 -62
  143. package/dist/skills/phases/requirements-phase/SKILL.md +49 -13
  144. package/package.json +7 -5
  145. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/phases/adopt-business-path.md +0 -52
  146. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/phases/business-grilling.md +0 -68
  147. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/phases/functional-grilling.md +0 -53
  148. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/phases/technical-grilling.md +0 -67
  149. package/dist/baseline/scaffold-baseline/skills/phases/technical-finder/SKILL.md +0 -74
  150. package/dist/baseline/scaffold-baseline/skills/phases/technical-finder/agents/openai.yaml +0 -2
  151. package/dist/skills/phases/finder-phase/phases/adopt-business-path.md +0 -52
  152. package/dist/skills/phases/finder-phase/phases/business-grilling.md +0 -68
  153. package/dist/skills/phases/finder-phase/phases/functional-grilling.md +0 -53
  154. package/dist/skills/phases/finder-phase/phases/technical-grilling.md +0 -67
  155. package/dist/skills/phases/technical-finder/SKILL.md +0 -74
  156. package/dist/skills/phases/technical-finder/agents/openai.yaml +0 -2
@@ -1,27 +1,22 @@
1
1
  # Functional Projection
2
2
 
3
- Require the exact Product Area → Initiative → Epic path, Fog identity, and one
4
- immutable accepted Functional grilling resolution.
3
+ Require immutable accepted Functional evidence, its Fog identity when Finder
4
+ supplied one, and fresh reads of the relevant Business structure.
5
5
 
6
- Create or enrich exactly one Story per Functional child. The Story preserves:
6
+ Functional projection has a strict Product Area → Initiative → Epic ceiling. It
7
+ may reuse, enrich, or create that accepted path. It creates neither Story nor
8
+ Task and does not select a delivery milestone.
7
9
 
8
- - actor and trigger
9
- - observable workflow and result
10
- - applicable business rules
11
- - visible alternate and failure paths
12
- - product-level edge cases
13
- - acceptance signals and boundaries
14
- - non-goals
15
- - known product dependencies
16
- - durable accepted-artifact links
17
- - unresolved engineering handoff questions
18
- - immutable Business and Functional evidence plus Fog provenance
10
+ The Epic preserves:
19
11
 
20
- The Story belongs to exactly one contextual `V*` milestone iteration. Reuse the
21
- Functional resolution's fitting existing milestone. A missing exact iteration
22
- or proposed movement stops before writing and requires a human decision.
12
+ - actor, trigger, observable workflow, and result
13
+ - applicable business rules and visible alternate or failure paths
14
+ - product-level edge cases, acceptance signals, and boundaries
15
+ - non-goals and known product dependencies
16
+ - durable accepted-artifact links and unresolved engineering questions
17
+ - immutable Business and Functional evidence plus Fog provenance
23
18
 
24
- Use stable identity reconciliation before create or enrich. Preserve user wording
25
- and `US-###`/`AC-###` traceability when available. Read back the
26
- Story parent, milestone, source links, and Fog relation. Return the stable Story
27
- identity to Finder.
19
+ Use stable identity reconciliation before create or enrich. Preserve user
20
+ wording and accepted evidence traceability. Read back Product Area and
21
+ Initiative identities, Epic parent, source links, and Fog relation. Return the
22
+ stable Epic identity to Finder without creating delivery-depth children.
@@ -15,7 +15,7 @@ drifted, ambiguous, or conflicting.
15
15
  Detect every accepted drift class:
16
16
 
17
17
  - invalid Fog child placement
18
- - missing or invalid `Grilling Stage`
18
+ - missing or conflicting Fog provenance or support relation
19
19
  - duplicate or ambiguous structures
20
20
  - stale links or status
21
21
  - hierarchy drift
@@ -24,17 +24,17 @@ Detect every accepted drift class:
24
24
 
25
25
  Audit the Fog-child lifecycle against these exact semantics:
26
26
 
27
- - Fog direct children are `grilling`, Research, or Prototype items.
28
- - Every `grilling` child has exactly one `Grilling Stage`: Business,
29
- Functional, or Technical. `Grilling Stage` is absent from every other kind.
30
- - One Fog has one Business child, one or more Functional children, and one
31
- Technical child per Story.
32
- - Research and Prototype children link to the exact grilling child they support.
27
+ - The Fog retains one immutable original `Business` or `Functional` intake lens.
28
+ - Fog direct children are generic `grilling`, `Research`, or `Prototype` items.
29
+ - Each `grilling` child links to the bounded unknown it closes; several are valid.
30
+ - Research and Prototype children link to the exact unknown or Grilling work
31
+ they support.
33
32
 
34
- New and resumed work uses the Fog-child lifecycle immediately. There is no
35
- compatibility writer for the former Fog-graduation model. Normalization may
36
- describe a legacy-shape migration, but that migration is a structural proposal
37
- subject to preview and explicit approval.
33
+ Historical Business, Functional, and Technical staged tickets are compatibility
34
+ evidence only. Their stored content and provider state remain unchanged unless
35
+ a separately authorized operation targets the exact ticket. Exclude them from
36
+ automatic Normalization: never migrate, relabel, replace, reparent, or repair
37
+ their historical metadata. The former Stage is not a current gate.
38
38
 
39
39
  Provider state proves operational facts. The wiki proves durable product
40
40
  meaning. Stable provider identity plus durable wiki identity proves an exact
@@ -67,9 +67,9 @@ relation. A similar title or inferred intent never qualifies.
67
67
  ## Structural Approval
68
68
 
69
69
  Treat duplicate closure, merge, split, boundary change, goal change,
70
- reparenting, milestone movement, reorganization, and migration from the former
71
- Fog-graduation shape as structural. Use `$show-me` to present the exact current
72
- and proposed topology before asking for explicit approval:
70
+ reparenting, milestone movement, and reorganization as structural. Use
71
+ `$show-me` to present the exact current and proposed topology before asking for
72
+ explicit approval:
73
73
 
74
74
  ```text
75
75
  Current (fresh provider read + durable wiki identity)
@@ -2,42 +2,47 @@
2
2
 
3
3
  Read this reference for every mutation.
4
4
 
5
- ## Authority
6
-
7
- 1. A new explicit human decision resolves a genuine semantic conflict after it
8
- is persisted in the durable source that owns that meaning.
9
- 2. The project wiki owns durable product meaning: Product brief, business
10
- objectives, target users, product boundaries, existing Product Map,
11
- constraints and non-goals, operating rules, owner, repository link, wiki
12
- link, and current and future `V*` milestone context.
5
+ ## Authority Order
6
+
7
+ 1. A persisted explicit human decision resolves a genuine semantic conflict.
8
+ 2. The project wiki owns durable product meaning: Product brief, objectives,
9
+ users, boundaries, Product Map, constraints and non-goals, operating rules,
10
+ owner, repository, wiki, and `V*` milestone context.
13
11
  3. `.devpunks/settings.json` selects the provider and Product/Backlog Root. It
14
12
  does not define product meaning.
15
- 4. Fresh provider reads prove current objects, identities, relations, metadata,
16
- views, milestones, and statuses.
13
+ 4. Fresh provider reads prove operational objects, identities, relations,
14
+ metadata, views, milestones, and statuses.
17
15
  5. Repository remotes and provider links prove repository identity. Immutable
18
- accepted evidence uses stable commit/blob links, not mutable branch URLs.
16
+ accepted evidence uses a verified commit/blob URL, not a local path or mutable
17
+ branch URL.
18
+
19
+ Read routed `apps/wiki/` product artifacts before composing the delta. A valid
20
+ Requirements Phase result may have no Finder or Fog provenance; immutable
21
+ specification authority plus accepted placement is sufficient to reuse, enrich,
22
+ or create the needed hierarchy.
19
23
 
20
- Read `apps/wiki/` and its routed product docs before composing the intended
21
- delta. Pin the verified repository link and wiki link on the Product/Backlog
22
- Root when the provider supports them. Keep the richer context in the wiki when
23
- the provider cannot represent a field.
24
+ ## Destination and Identity
24
25
 
25
- ## Identity
26
+ Keep the settings key `backlogProjectUrl`; it identifies the
27
+ Product/Backlog Root. Verify the actual provider workspace, Root, repository,
28
+ and wiki. Connector or MCP aliases are routing hints, never workspace proof.
29
+ Several independent Roots may exist in one workspace.
26
30
 
27
- Verify the actual provider workspace, root identity, repository identity, and
28
- wiki identity. Connector or MCP aliases are routing hints, not workspace proof.
29
- Several independent Product/Backlog Roots may exist in one workspace.
31
+ Every intended object needs a durable wiki identity. Every known provider object
32
+ needs its stable provider identity. Apply the create/reuse/enrich/stop decision
33
+ table in `issue-reconciliation.md`. Titles, similar descriptions, and nearby
34
+ placement are discovery signals only.
30
35
 
31
- Durable wiki identity is required for every intended object; stable provider
32
- identity is required after provider readback and on every later update. Apply
33
- the create/enrich/stop decision table in `issue-reconciliation.md`. Titles,
34
- similar descriptions, and nearby placement are discovery signals only.
36
+ A legacy destination, wrong workspace, unsupported representation, ambiguous
37
+ identity, or incomplete search returns exact setup guidance and zero provider
38
+ mutations. Historical staged tickets remain unchanged and excluded from
39
+ automatic Normalization.
35
40
 
36
41
  ## Conflict Handling
37
42
 
38
- - Provider state defeats stale cached state for operational facts.
39
- - Wiki meaning defeats provider prose copied from an older decision.
43
+ - Provider state defeats cached state for operational facts.
44
+ - Wiki authority defeats provider prose copied from a superseded decision.
40
45
  - A real wiki/provider semantic conflict requires a new explicit decision and
41
46
  durable source update before mutation.
42
- - Preserve user ticket wording unless an accepted decision changes its meaning.
43
- Use `$wait-what` to re-pitch unclear language in canonical project terms.
47
+ - Preserve accepted user wording. Use `$wait-what` to re-pitch unclear language
48
+ in canonical project terms without changing meaning.
@@ -1,168 +1,123 @@
1
1
  # GitHub Provider Adapter
2
2
 
3
- Use one Projects V2 surface as the Product/Backlog Root and GitHub Issues for
4
- the delivery hierarchy. Keep these storage mechanics inside this adapter; the
5
- mutation envelope and callers use provider-neutral terms.
3
+ Read this reference only when the resolved provider is GitHub. It translates
4
+ the provider-neutral mutation envelope into one Projects V2 operating surface;
5
+ hierarchy policy and mutation authority remain in Write Backlog.
6
6
 
7
- ## Semantic Mapping
7
+ ## Accepted Representation
8
8
 
9
9
  | Product meaning | GitHub representation |
10
10
  | --- | --- |
11
11
  | Product/Backlog Root | one Projects V2 project |
12
- | Product Area | configured Project field value |
13
- | Initiative | configured Project field value scoped to its Product Area |
12
+ | Product Area | configured Product Area field option |
13
+ | Initiative | configured Initiative field option scoped to its Product Area |
14
14
  | Epic | Issue added to the Project |
15
- | Story | Epic sub-issue, created with `parentIssueId` or attached with `addSubIssue` |
16
- | Task | required nested sub-issue of its Story |
17
- | Story and every Task iteration | the same repository milestone named `V*` |
15
+ | Story | Epic sub-issue through `parentIssueId` or `addSubIssue` |
16
+ | Task | nested sub-issue of its Story |
17
+ | Story and Task iteration | same repository milestone named `V*` |
18
18
  | Task precedence | native `addBlockedBy` relation |
19
- | Fog | lateral provenance and source links in every object it enriches or produces |
20
-
21
- Preflight the complete intended mapping. If any required hierarchy, semantic
22
- field, Project membership, repository milestone, blocker relation, or source
23
- link is not representable, return zero provider mutations. Return actionable setup guidance for the missing GitHub capability.
24
-
25
- ## Backlog Initialization
26
-
27
- Resolve the Project by stable node ID and durable wiki identity. Read its
28
- metadata, linked repositories, fields, views, items, and repository milestones
29
- before proposing a delta. A title is discovery evidence, never an upsert key.
30
-
31
- Use `updateProjectV2` and `linkProjectV2ToRepository` to reconcile:
32
-
33
- - title: the Product/Backlog Root name
34
- - short description: the Product brief
35
- - README: business objectives, target users, product boundaries, the existing
36
- Product Map, durable constraints and non-goals, operating rules, owner,
37
- repository link, wiki link, and current and future `V*` milestone context
38
- - repository link: the verified repository selected by project context
39
-
40
- Preserve richer product meaning in the wiki. The Project README links that
41
- authority and carries only the context needed to interpret its backlog.
42
-
43
- ### Semantic fields
44
-
45
- Read every field and option by node ID before matching values. The required
46
- configured fields are:
47
-
48
- - configured **Product Area** single-select: each stable option ID maps to one
49
- durable wiki identity
50
- - configured **Initiative** single-select: each stable option ID maps to one
51
- durable wiki identity and its Product Area identity, so equal titles remain
52
- distinct
53
- - configured **Kind** single-select: Fog, Epic, Story, Task, Grilling, Research,
54
- or Prototype
55
- - configured **Grilling Stage** single-select: Business, Functional, or
56
- Technical; populated only when Kind is Grilling
57
-
58
- Put durable wiki identities in Product Area and Initiative option descriptions
59
- when that field is API-supported. In the Project README, also maintain the
60
- canonical identity map: field ID, option ID, option name, durable wiki identity,
61
- and Initiative parent Area identity. Every Issue body records the selected durable
62
- identities and stable option ID references. A standalone URL is provenance only
63
- and is not an identity.
64
-
65
- Backlog initialization may propose `createProjectV2Field` for missing required
66
- fields or options, then `createProjectV2View` for missing semantic views. Show
67
- the complete existing-versus-intended topology in a structural preview and wait
68
- for explicit approval before provisioning. Ordinary writes never provision
69
- fields, options, or views; they stop with the exact missing metadata and setup
70
- action.
71
-
72
- ### Semantic views
73
-
74
- Create or preserve equivalent configured views. The `createProjectV2View`
75
- input can set `name`, `layout`, and `configuration.visibleFieldIds`.
76
- `updateProjectV2View` can set `name`, `layout`, `filter`, and
77
- `configuration.visibleFieldIds`. Automatic view mutation is limited to these
78
- schema-supported inputs.
79
-
80
- - **Product Map**: Epics grouped by Product Area and Initiative, without Story
81
- or Task rows.
82
- - **Roadmap**: Stories and Tasks grouped by repository `V*` milestone, with
83
- Product Area, Initiative, Epic, and progress visible.
84
- - **Fogs**: Fog rows with business status, affected Area/Initiative/Epic,
85
- target iteration, generated Stories and Tasks, completion iteration, and
86
- production-evidence links.
87
- - **Current Delivery**: active Stories and Tasks grouped by repository `V*`,
88
- status, owner, and native blocker readiness.
89
-
90
- GitHub's view mutation inputs leave grouping and sorting unavailable. When an
91
- accepted view needs either and the current view does not match, preflight stops
92
- with zero provider mutations. Return exact manual setup guidance naming the
93
- view, layout, filter, visible fields, group fields, and sort fields. Resume only
94
- after the user saves that configuration; then read back the view ID, layout,
95
- filter, visible fields, `groupByFields`, `verticalGroupByFields`, and
96
- `sortByFields`. A partially automated view is not accepted representation.
97
-
98
- ### Repository V* milestones
19
+ | Fog | lateral provenance and immutable source links |
99
20
 
100
- Read open and closed repository milestones and reuse a fitting existing `V*`
101
- before proposing a new one. Never invent a version identity. A supported full
102
- milestone records:
21
+ Issues, recursive parent/sub-issue relations, repository milestones, native
22
+ blocker relations, semantic fields, and product-owner views must all be
23
+ representable. A missing required representation returns actionable setup
24
+ guidance and zero provider mutations. There is no flat Issues fallback.
25
+
26
+ ## Destination and Identity
27
+
28
+ Resolve the configured Product/Backlog Root by stable Projects V2 node ID and
29
+ durable wiki identity. Read the linked repository, Project metadata, fields,
30
+ views, items, Issues, parents, milestones, blockers, bodies, and immutable
31
+ source links before choosing create, reuse, or enrich.
32
+
33
+ Stable provider identity plus durable wiki identity is the reuse key. A title
34
+ match, standalone provenance URL, incomplete search, ambiguous candidate,
35
+ conflicting identity, wrong repository, or unsupported parent relation returns
36
+ exact steering and zero writes.
37
+
38
+ ## Initialization Metadata, Fields, and Views
39
+
40
+ Use `updateProjectV2` and `linkProjectV2ToRepository` to project the Product
41
+ brief, business objectives, target users, product boundaries, Product Map,
42
+ constraints and non-goals, operating rules, owner, repository link, wiki link,
43
+ and current and future `V*` context. Richer meaning remains in the wiki.
44
+
45
+ Read every configured option by stable node ID:
103
46
 
104
- 1. Version name
105
- 2. One-sentence product goal
106
- 3. Included product outcomes or capability changes
47
+ - **Product Area**: one option ID per durable Product Area identity
48
+ - **Initiative**: one option ID per durable Initiative identity, with its
49
+ Product Area identity in the canonical Project README map
50
+ - **Kind**: Epic, Story, Task, Fog, Grilling, Research, or Prototype
107
51
 
108
- Use the repository milestone title for the Version name and its description
109
- for the accepted goal and outcomes. When description metadata is unsupported,
110
- name only is sufficient. Story and Task assignment still requires exact
111
- milestone readback.
52
+ Record durable wiki identities in option descriptions when the API supports
53
+ them and in the Project README identity map otherwise. Ordinary writes reuse
54
+ configured IDs. Initialization may call `createProjectV2Field` only after a
55
+ structural preview and explicit approval.
56
+
57
+ Create or preserve semantically equivalent product-owner views. Supported
58
+ automatic inputs are `createProjectV2View` and `updateProjectV2View` fields
59
+ `name`, `layout`, `configuration.visibleFieldIds`, and `filter`:
60
+
61
+ - **Product Map**: Product Area, Initiative, and Epic structure
62
+ - **Roadmap**: repository `V*` milestones with rolled-up Story/Task progress
63
+ - **Fogs**: unresolved provenance, affected structures, and production evidence
64
+ - **Current Delivery**: active Stories and Tasks with native blocker readiness
65
+
66
+ If grouping or sorting is required but unavailable through the connected API,
67
+ return manual setup guidance naming the exact view, fields, grouping, and sort.
68
+ Resume only after exact view readback. A partially configured view is not an
69
+ accepted representation.
70
+
71
+ ## Milestones and Blockers
72
+
73
+ Read open and closed repository milestones and reuse a fitting existing `V*`
74
+ before proposing another. Every Story belongs to exactly one repository
75
+ milestone and every derived Task belongs to the same milestone as its Story.
76
+ Preserve Version name, one-sentence product goal, and included product outcomes
77
+ or capability changes in supported milestone metadata; otherwise retain richer
78
+ meaning in the linked wiki.
112
79
 
113
- ## Read-Before-Write Mutation
80
+ Validate the complete reachable Task graph before mutation. Reject missing
81
+ parents or blocker targets, Task/Story milestone mismatch, future-iteration
82
+ dependencies, duplicate edges, self-edges, and cycles. Materialize only accepted
83
+ edges with native `addBlockedBy` relations.
114
84
 
115
- Stable provider identity plus durable wiki identity is the upsert key. Resolve
116
- both identities, then read the exact Project, Issues, Project items, parents,
117
- milestones, fields, blockers, bodies, and source links. A title-only or
118
- ambiguous match authorizes zero provider mutations; return every candidate and
119
- the identity needed to resume.
85
+ ## Small Mutation
120
86
 
121
- Construct the complete delta in memory before the first write. Validate every
122
- Project item, parent, repository `V*`, configured field option, Fog/source link,
123
- and reachable Task blocker. All intended objects must use the same verified
124
- repository and Product/Backlog Root.
87
+ Build the complete mutation envelope in memory: ordered operations, stable IDs,
88
+ preconditions, immutable source identities, approval record, and expected
89
+ readback. Preview every material structural change and obtain explicit approval.
125
90
 
126
- After representability and approval gates pass, use this order:
91
+ Write the approved delta parent-first:
127
92
 
128
- 1. Reconcile approved Project metadata, semantic fields, views, and milestone
129
- definitions required by this operation.
93
+ 1. Reconcile approved Project metadata, fields, views, and milestones.
130
94
  2. Use `createIssue` with `projectV2Ids`, `parentIssueId`, and `milestoneId` as
131
- applicable. Create or enrich the Epic, then each Story under its Epic, then
132
- every required Task under its Story. Use `addSubIssue` only to attach an
133
- existing exact child.
134
- 3. Resolve each new Project item ID and apply configured Product Area,
135
- Initiative, Kind, and Grilling Stage values with
95
+ applicable. Attach an existing exact child only with `addSubIssue`.
96
+ 3. Resolve Project item IDs and set Product Area, Initiative, and Kind through
136
97
  `updateProjectV2ItemFieldValue`.
137
- 4. Add each validated Task prerequisite with `addBlockedBy`; the blocked Task is
138
- `issueId` and its prerequisite is `blockingIssueId`.
98
+ 4. Add each validated Task prerequisite with `addBlockedBy`.
139
99
 
140
- The Fog body records its durable wiki identity, immutable accepted evidence,
141
- and stable links to every Area, Initiative, Epic, Story, and Task it enriched or
142
- produced. Each produced Issue links back to the Fog and immutable source that
143
- authorized it. Fog remains outside the Epic parent chain.
100
+ Fog stays outside the parent chain. Every enriched or produced Issue records
101
+ its Fog backlink when one exists, durable wiki identity, applicable `OUT-###`
102
+ traceability, and immutable specification source.
144
103
 
145
- ## Exact Readback
104
+ ## Exact Readback and Recovery
146
105
 
147
- Read back and compare the Project membership, parent chain, repository `V*`,
148
- configured field values, `blockedBy` edges, source and Fog links, and stable
149
- Issue IDs and URLs for every intended item. For initialization, also compare
150
- Project metadata, linked repository, every option ID-to-durable-wiki-identity
151
- mapping, and all four view configurations. A response without this exact match
152
- is unresolved, not success.
106
+ Exact readback must prove Project membership, recursive parent chain, repository
107
+ milestone, Product Area, Initiative, Kind, native blocker relations, Fog
108
+ provenance, immutable source links, stable IDs, and URLs. Initialization also
109
+ reads back Project metadata, linked repository, identity maps, and all required
110
+ view configurations. A response without an exact comparison remains unresolved.
153
111
 
154
- If a partial provider failure occurs, stop further writes. Read back every
155
- intended object, return observed identities and relations, and identify the
156
- first unresolved delta. A resumed run repeats read-before-write and applies only
157
- the still-missing validated operations.
112
+ On partial provider failure, stop further writes, read back every affected
113
+ object, and return observed writes, the recovery point, and the exact residual
114
+ delta. A resumed operation repeats read-before-write and applies only the
115
+ remaining validated operations.
158
116
 
159
117
  ## Runtime Coverage Gate
160
118
 
161
- The first workflow-created nested Task must be read back with its exact Project
162
- membership, Story parent, repository `V*`, Product Area, Initiative, Kind,
163
- native blocker, Fog backlink, and immutable source in its body, plus stable ID
164
- and URL. GraphQL schema introspection is not runtime proof. This gate does not
165
- claim full view runtime capability. Retain immutable command output and provider
166
- URLs before closing or deleting run-owned fixtures. When provider capability or
167
- authentication blocks this proof, report the exact blocker and leave runtime
168
- coverage unclaimed.
119
+ The first workflow-created nested Task must read back its Project membership,
120
+ Story parent, repository `V*`, Product Area, Initiative, Kind, native blocker,
121
+ Fog backlink, immutable source, stable ID, and URL. Schema introspection is not
122
+ runtime proof. When provider capability or authentication blocks this proof,
123
+ report the exact blocker and leave runtime coverage unclaimed.