@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.
- package/dist/BASELINE_CHANGELOG.md +24 -0
- package/dist/CHANGELOG.md +17 -0
- package/dist/baseline/scaffold-baseline/baseline.json +5 -5
- package/dist/baseline/scaffold-baseline/data/catalog/lint-assets.json +10 -4
- package/dist/baseline/scaffold-baseline/data/catalog/packs.json +0 -1
- package/dist/baseline/scaffold-baseline/data/catalog/skills.json +0 -8
- package/dist/baseline/scaffold-baseline/data/hooks/format-edited-file.mjs +602 -101
- package/dist/baseline/scaffold-baseline/data/scripts/commit-gate-runner.d.ts +11 -0
- package/dist/baseline/scaffold-baseline/data/scripts/commit-gate-runner.mjs +103 -0
- package/dist/baseline/scaffold-baseline/data/scripts/commit-gate-runner.test.ts +144 -0
- package/dist/baseline/scaffold-baseline/data/scripts/harness-projection/adapters/claude.mjs +1 -0
- package/dist/baseline/scaffold-baseline/data/scripts/harness-projection/adapters/codex.mjs +1 -0
- package/dist/baseline/scaffold-baseline/data/scripts/harness-projection/adapters/cursor.mjs +1 -0
- package/dist/baseline/scaffold-baseline/data/scripts/harness-projection/adapters/opencode.mjs +1 -0
- package/dist/baseline/scaffold-baseline/data/scripts/harness-projection/contract.ts +24 -33
- package/dist/baseline/scaffold-baseline/data/scripts/harness-projection/core.mjs +4 -0
- package/dist/baseline/scaffold-baseline/data/scripts/harness-projection/core.test.ts +61 -0
- package/dist/baseline/scaffold-baseline/data/scripts/harness-projection/lint-feedback.test.ts +123 -0
- package/dist/baseline/scaffold-baseline/data/scripts/harness-projection/test-fixtures/claude/actions.json +1 -0
- package/dist/baseline/scaffold-baseline/data/scripts/harness-projection/test-fixtures/codex/actions.json +2 -1
- package/dist/baseline/scaffold-baseline/data/scripts/harness-projection/test-fixtures/cursor/projection.json +1 -0
- package/dist/baseline/scaffold-baseline/data/scripts/harness-projection/test-fixtures/opencode/projection.json +1 -0
- package/dist/baseline/scaffold-baseline/skills/agnostic/docs/docs-onboarding/SKILL.md +2 -2
- package/dist/baseline/scaffold-baseline/skills/agnostic/planning/create-spec/SKILL.md +32 -32
- package/dist/baseline/scaffold-baseline/skills/agnostic/planning/create-spec/assets/SPEC-TEMPLATE.md +7 -7
- package/dist/baseline/scaffold-baseline/skills/agnostic/planning/create-spec/references/readiness.md +14 -13
- package/dist/baseline/scaffold-baseline/skills/agnostic/planning/create-spec/references/spec-quality-bar.md +26 -19
- package/dist/baseline/scaffold-baseline/skills/agnostic/quality/autoreview/SKILL.md +2 -2
- package/dist/baseline/scaffold-baseline/skills/agnostic/quality/autoreview/scripts/autoreview +3 -0
- package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/brainstorm/SKILL.md +12 -0
- package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/requirements-grill/SKILL.md +2 -1
- package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/EXAMPLES.md +9 -9
- package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/REFERENCE.md +43 -55
- package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/SKILL.md +68 -63
- package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/assets/concepts/backlog-model.md +26 -29
- package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/assets/concepts/story-shape.md +5 -5
- package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/assets/providers/azure-devops-create-payload.md +1 -1
- package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/assets/providers/github-projects-create-payload.md +2 -2
- package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/assets/providers/linear-create-payload.md +1 -1
- package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/assets/providers/monday-create-payload.md +2 -2
- package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/references/business-projection.md +19 -24
- package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/references/delivery-status.md +17 -13
- package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/references/fog-intake.md +45 -48
- package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/references/functional-projection.md +16 -21
- package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/references/normalization.md +14 -14
- package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/references/project-context.md +32 -27
- package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/references/providers/github.md +105 -150
- package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/references/providers/linear.md +111 -181
- package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/references/technical-projection.md +51 -47
- package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/scripts/validate-task-blocker-graph.mjs +49 -35
- package/dist/baseline/scaffold-baseline/skills/agnostic/security/security-best-practices/references/javascript-typescript-vue-web-frontend-security.md +1 -1
- package/dist/baseline/scaffold-baseline/skills/frameworks/expo/eas-update-insights/references/update-insights-schema.md +2 -6
- package/dist/baseline/scaffold-baseline/skills/frameworks/expo/expo-skill-eval/SKILL.md +6 -7
- package/dist/baseline/scaffold-baseline/skills/frameworks/pulumi/pulumi-best-practices/SKILL.md +1 -3
- package/dist/baseline/scaffold-baseline/skills/frameworks/pulumi/pulumi-component/SKILL.md +2 -14
- package/dist/baseline/scaffold-baseline/skills/frameworks/tanstack-query/tanstack-query/references/best-practices.md +7 -1
- package/dist/baseline/scaffold-baseline/skills/frameworks/tanstack-query/tanstack-query/templates/devtools-setup.tsx +4 -0
- package/dist/baseline/scaffold-baseline/skills/frameworks/trpc/tanstack-query/references/best-practices.md +7 -1
- package/dist/baseline/scaffold-baseline/skills/frameworks/trpc/tanstack-query/templates/devtools-setup.tsx +4 -0
- package/dist/baseline/scaffold-baseline/skills/languages/typescript/quality-types/SKILL.md +1 -3
- package/dist/baseline/scaffold-baseline/skills/phases/business-finder/SKILL.md +29 -16
- package/dist/baseline/scaffold-baseline/skills/phases/delivery-phase/phases/router.md +10 -8
- package/dist/baseline/scaffold-baseline/skills/phases/design-phase/phases/backlog.md +26 -17
- package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/AUTHORING-HANDOFF.md +51 -261
- package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/SKILL.md +22 -25
- package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/phases/ensure-fog.md +13 -23
- package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/phases/grilling.md +40 -0
- package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/phases/handback.md +11 -18
- package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/phases/prototype.md +13 -21
- package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/phases/reconcile.md +21 -35
- package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/phases/research.md +13 -18
- package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/phases/return-target.md +14 -25
- package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/phases/router.md +22 -56
- package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/references/entrypoint-contract.md +25 -26
- package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/references/root-routing.md +12 -20
- package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/references/runtime-handoff.md +17 -39
- package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/references/state-graph.md +27 -49
- package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/scripts/finder-contract.mjs +40 -359
- package/dist/baseline/scaffold-baseline/skills/phases/functional-finder/SKILL.md +29 -62
- package/dist/baseline/scaffold-baseline/skills/phases/requirements-phase/SKILL.md +49 -13
- package/dist/baseline/scaffold-baseline.json +5 -5
- package/dist/baseline/scaffold-baseline.tgz +0 -0
- package/dist/data/hooks/format-edited-file.d.mts +21 -0
- package/dist/data/hooks/format-edited-file.mjs +588 -98
- package/dist/data/scripts/commit-gate-runner.mjs +103 -0
- package/dist/data/scripts/harness-projection/adapters/claude.mjs +1 -0
- package/dist/data/scripts/harness-projection/adapters/codex.mjs +1 -0
- package/dist/data/scripts/harness-projection/adapters/cursor.mjs +1 -0
- package/dist/data/scripts/harness-projection/adapters/opencode.mjs +1 -0
- package/dist/data/scripts/harness-projection/core.mjs +4 -0
- package/dist/data/scripts/harness-projection/test-fixtures/claude/actions.json +1 -0
- package/dist/data/scripts/harness-projection/test-fixtures/codex/actions.json +2 -1
- package/dist/data/scripts/harness-projection/test-fixtures/cursor/projection.json +1 -0
- package/dist/data/scripts/harness-projection/test-fixtures/opencode/projection.json +1 -0
- package/dist/index.js +73 -58
- package/dist/skills/agnostic/docs/docs-onboarding/SKILL.md +2 -2
- package/dist/skills/agnostic/planning/create-spec/SKILL.md +32 -32
- package/dist/skills/agnostic/planning/create-spec/assets/SPEC-TEMPLATE.md +7 -7
- package/dist/skills/agnostic/planning/create-spec/references/readiness.md +14 -13
- package/dist/skills/agnostic/planning/create-spec/references/spec-quality-bar.md +26 -19
- package/dist/skills/agnostic/quality/autoreview/SKILL.md +2 -2
- package/dist/skills/agnostic/quality/autoreview/scripts/autoreview +3 -0
- package/dist/skills/agnostic/requirements/brainstorm/SKILL.md +12 -0
- package/dist/skills/agnostic/requirements/requirements-grill/SKILL.md +2 -1
- package/dist/skills/agnostic/requirements/write-backlog/EXAMPLES.md +9 -9
- package/dist/skills/agnostic/requirements/write-backlog/REFERENCE.md +43 -55
- package/dist/skills/agnostic/requirements/write-backlog/SKILL.md +68 -63
- package/dist/skills/agnostic/requirements/write-backlog/assets/concepts/backlog-model.md +26 -29
- package/dist/skills/agnostic/requirements/write-backlog/assets/concepts/story-shape.md +5 -5
- package/dist/skills/agnostic/requirements/write-backlog/assets/providers/azure-devops-create-payload.md +1 -1
- package/dist/skills/agnostic/requirements/write-backlog/assets/providers/github-projects-create-payload.md +2 -2
- package/dist/skills/agnostic/requirements/write-backlog/assets/providers/linear-create-payload.md +1 -1
- package/dist/skills/agnostic/requirements/write-backlog/assets/providers/monday-create-payload.md +2 -2
- package/dist/skills/agnostic/requirements/write-backlog/references/business-projection.md +19 -24
- package/dist/skills/agnostic/requirements/write-backlog/references/delivery-status.md +17 -13
- package/dist/skills/agnostic/requirements/write-backlog/references/fog-intake.md +45 -48
- package/dist/skills/agnostic/requirements/write-backlog/references/functional-projection.md +16 -21
- package/dist/skills/agnostic/requirements/write-backlog/references/normalization.md +14 -14
- package/dist/skills/agnostic/requirements/write-backlog/references/project-context.md +32 -27
- package/dist/skills/agnostic/requirements/write-backlog/references/providers/github.md +97 -142
- package/dist/skills/agnostic/requirements/write-backlog/references/providers/linear.md +106 -176
- package/dist/skills/agnostic/requirements/write-backlog/references/technical-projection.md +51 -47
- package/dist/skills/agnostic/requirements/write-backlog/scripts/validate-task-blocker-graph.mjs +55 -31
- package/dist/skills/phases/business-finder/SKILL.md +29 -16
- package/dist/skills/phases/delivery-phase/phases/router.md +10 -8
- package/dist/skills/phases/design-phase/phases/backlog.md +26 -17
- package/dist/skills/phases/finder-phase/AUTHORING-HANDOFF.md +51 -261
- package/dist/skills/phases/finder-phase/SKILL.md +22 -25
- package/dist/skills/phases/finder-phase/phases/ensure-fog.md +13 -23
- package/dist/skills/phases/finder-phase/phases/grilling.md +40 -0
- package/dist/skills/phases/finder-phase/phases/handback.md +11 -18
- package/dist/skills/phases/finder-phase/phases/prototype.md +13 -21
- package/dist/skills/phases/finder-phase/phases/reconcile.md +21 -35
- package/dist/skills/phases/finder-phase/phases/research.md +13 -18
- package/dist/skills/phases/finder-phase/phases/return-target.md +14 -25
- package/dist/skills/phases/finder-phase/phases/router.md +22 -56
- package/dist/skills/phases/finder-phase/references/entrypoint-contract.md +25 -26
- package/dist/skills/phases/finder-phase/references/root-routing.md +12 -20
- package/dist/skills/phases/finder-phase/references/runtime-handoff.md +17 -39
- package/dist/skills/phases/finder-phase/references/state-graph.md +27 -49
- package/dist/skills/phases/finder-phase/scripts/finder-contract.mjs +44 -357
- package/dist/skills/phases/functional-finder/SKILL.md +29 -62
- package/dist/skills/phases/requirements-phase/SKILL.md +49 -13
- package/package.json +7 -5
- package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/phases/adopt-business-path.md +0 -52
- package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/phases/business-grilling.md +0 -68
- package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/phases/functional-grilling.md +0 -53
- package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/phases/technical-grilling.md +0 -67
- package/dist/baseline/scaffold-baseline/skills/phases/technical-finder/SKILL.md +0 -74
- package/dist/baseline/scaffold-baseline/skills/phases/technical-finder/agents/openai.yaml +0 -2
- package/dist/skills/phases/finder-phase/phases/adopt-business-path.md +0 -52
- package/dist/skills/phases/finder-phase/phases/business-grilling.md +0 -68
- package/dist/skills/phases/finder-phase/phases/functional-grilling.md +0 -53
- package/dist/skills/phases/finder-phase/phases/technical-grilling.md +0 -67
- package/dist/skills/phases/technical-finder/SKILL.md +0 -74
- 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
|
|
4
|
-
provider-neutral mutation envelope into native Linear objects;
|
|
5
|
-
|
|
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
|
-
##
|
|
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
|
|
13
|
-
| Initiative |
|
|
14
|
-
| Epic |
|
|
15
|
-
| Story |
|
|
16
|
-
| Task |
|
|
17
|
-
| Fog | lateral
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
identity
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
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**:
|
|
115
|
-
|
|
116
|
-
|
|
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
|
-
|
|
120
|
-
|
|
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
|
-
##
|
|
77
|
+
## Milestones and Blockers
|
|
127
78
|
|
|
128
79
|
Reuse a fitting existing `V*` milestone before proposing one. Linear milestones
|
|
129
|
-
are project-scoped, so
|
|
130
|
-
Project.
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
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
|
|
179
|
-
3. Epic
|
|
180
|
-
4.
|
|
181
|
-
5. exactly
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
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
|
-
#
|
|
1
|
+
# Delivery Projection
|
|
2
2
|
|
|
3
|
-
Before any provider write, require
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
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
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
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
|
|
17
|
-
|
|
18
|
-
|
|
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
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
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
|
|
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
|
|
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
|
|
41
|
-
identity, parent Story identity, exact milestone, and blocker identities
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
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.
|
package/dist/skills/agnostic/requirements/write-backlog/scripts/validate-task-blocker-graph.mjs
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
const failure = (code, details = {}) => ({ ok: false, code, ...details });
|
|
2
2
|
|
|
3
|
-
const stableId = (value) =>
|
|
3
|
+
const stableId = (value) =>
|
|
4
|
+
typeof value === "string" && value.trim() === value && value.length > 0;
|
|
4
5
|
|
|
5
6
|
/**
|
|
6
|
-
* Validate
|
|
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
|
-
|
|
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))
|
|
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))
|
|
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) =>
|
|
51
|
-
|
|
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", {
|
|
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))
|
|
76
|
-
|
|
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
|
|
93
|
+
const blockerIds = [...task.blockedBy].sort((left, right) =>
|
|
86
94
|
String(left).localeCompare(String(right)),
|
|
87
95
|
);
|
|
88
|
-
|
|
89
|
-
|
|
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
|
-
|
|
93
|
-
|
|
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 (
|
|
117
|
+
if (blockerId === task.id) return failure("SELF_EDGE", { taskId: task.id });
|
|
100
118
|
if (
|
|
101
|
-
milestoneRank.get(
|
|
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", {
|
|
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
|
|
121
|
-
|
|
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 {
|
|
154
|
+
return {
|
|
155
|
+
ok: true,
|
|
156
|
+
taskIds: orderedTasks.map(({ id }) => id),
|
|
157
|
+
edges,
|
|
158
|
+
};
|
|
135
159
|
};
|