@oscaner-skills/cdd-engine 1.0.0 → 2.0.0
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/README.md +9 -8
- package/README.zh-CN.md +9 -8
- package/package.json +15 -22
- package/src-next/__tests__/bin.test.ts +128 -0
- package/src-next/__tests__/smoke.integration.test.ts +202 -0
- package/src-next/__tests__/zero-dep.test.ts +134 -0
- package/src-next/bin.ts +61 -0
- package/src-next/contract/__tests__/__snapshots__/project.schema.overall-spec.snap +238 -0
- package/src-next/contract/__tests__/__snapshots__/project.schema.phase-spec.snap +153 -0
- package/src-next/contract/__tests__/__snapshots__/project.schema.plan.snap +173 -0
- package/src-next/contract/__tests__/__snapshots__/project.schema.single-spec.snap +89 -0
- package/src-next/contract/__tests__/__snapshots__/project.shape.overall-spec.snap +225 -0
- package/src-next/contract/__tests__/__snapshots__/project.shape.phase-spec.snap +155 -0
- package/src-next/contract/__tests__/__snapshots__/project.shape.plan.snap +175 -0
- package/src-next/contract/__tests__/__snapshots__/project.shape.single-spec.snap +85 -0
- package/src-next/contract/__tests__/declare.test.ts +242 -0
- package/src-next/contract/__tests__/doc.test.ts +358 -0
- package/src-next/contract/__tests__/judge.test.ts +873 -0
- package/src-next/contract/__tests__/lint.test.ts +314 -0
- package/src-next/contract/__tests__/project.test.ts +419 -0
- package/src-next/contract/__tests__/translate.test.ts +96 -0
- package/src-next/contract/declare.ts +983 -0
- package/src-next/contract/doc.ts +753 -0
- package/src-next/contract/invariants.ts +1268 -0
- package/src-next/contract/judge.ts +142 -0
- package/src-next/contract/lint.ts +275 -0
- package/src-next/contract/project.ts +596 -0
- package/src-next/contract/skill-anatomy.ts +273 -0
- package/src-next/contract/translate.ts +113 -0
- package/src-next/face/__tests__/board-view.test.ts +948 -0
- package/src-next/face/__tests__/capsule.test.ts +276 -0
- package/src-next/face/__tests__/channel-closure.guard.test.ts +102 -0
- package/src-next/face/__tests__/cli.test.ts +4643 -0
- package/src-next/face/__tests__/face.test.ts +289 -0
- package/src-next/face/__tests__/graph-view.test.ts +61 -0
- package/src-next/face/__tests__/host.test.ts +24 -0
- package/src-next/face/__tests__/negation.ts +6 -0
- package/src-next/face/__tests__/projection.test.ts +301 -0
- package/src-next/face/__tests__/sync-runner.test.ts +70 -0
- package/src-next/face/__tests__/words.guard.test.ts +93 -0
- package/src-next/face/artifacts.ts +195 -0
- package/src-next/face/board-view.ts +662 -0
- package/src-next/face/capsule.ts +149 -0
- package/src-next/face/cli.ts +819 -0
- package/src-next/face/declare.ts +326 -0
- package/src-next/face/gate.ts +170 -0
- package/src-next/face/graph-view.ts +74 -0
- package/src-next/face/host.ts +326 -0
- package/src-next/face/lifecycle.ts +700 -0
- package/src-next/face/projection.ts +282 -0
- package/src-next/face/route-render.ts +160 -0
- package/src-next/face/words.ts +296 -0
- package/src-next/infra/__tests__/infra.test.ts +287 -0
- package/src-next/infra/config.ts +42 -0
- package/src-next/infra/git.ts +39 -0
- package/src-next/infra/process.ts +34 -0
- package/src-next/infra/runtime.ts +185 -0
- package/src-next/infra/workspace.ts +232 -0
- package/src-next/render/__tests__/render.test.ts +499 -0
- package/src-next/render/__tests__/skeleton.test.ts +466 -0
- package/src-next/render/brief.ts +121 -0
- package/src-next/render/issue-body.ts +159 -0
- package/src-next/render/skeleton.ts +437 -0
- package/src-next/render/templates.ts +650 -0
- package/src-next/session/__tests__/graph.test.ts +270 -0
- package/src-next/session/__tests__/handoff-plane.guard.test.ts +48 -0
- package/src-next/session/__tests__/handoff-schema.test.ts +310 -0
- package/src-next/session/__tests__/ledger.test.ts +744 -0
- package/src-next/session/__tests__/next.test.ts +368 -0
- package/src-next/session/__tests__/preflight.test.ts +491 -0
- package/src-next/session/__tests__/run.test.ts +1014 -0
- package/src-next/session/__tests__/wave-line-phase.guard.test.ts +49 -0
- package/src-next/session/__tests__/wave.test.ts +469 -0
- package/src-next/session/faces.ts +110 -0
- package/src-next/session/graph.ts +411 -0
- package/src-next/session/handoff-schema.ts +373 -0
- package/src-next/session/ledger.ts +1004 -0
- package/src-next/session/next.ts +192 -0
- package/src-next/session/preflight.ts +240 -0
- package/src-next/session/run.ts +606 -0
- package/src-next/session/state.ts +30 -0
- package/src-next/session/wave.ts +139 -0
- package/templates/report/issue-body.json +18 -20
- package/dist/chunks/branch.mjs +0 -480
- package/dist/chunks/docs.mjs +0 -253
- package/dist/chunks/task.mjs +0 -913
- package/dist/cli.mjs +0 -5457
- package/dist/documents/schema/add-phase-protocol.json +0 -126
- package/dist/documents/schema/overall.json +0 -361
- package/dist/documents/schema/phase-spec.json +0 -145
- package/dist/documents/schema/plan.json +0 -191
- package/dist/documents/schema/skill-anatomy.json +0 -233
- package/dist/resources/harness-registry.json +0 -49
- package/dist/shared/cdd-engine.liioziig.mjs +0 -184
- package/templates/engine-config.json +0 -302
- package/templates/schema/cache-profile-schema.json +0 -23
- package/templates/schema/docs-handoff-schema.json +0 -129
- package/templates/schema/task-handoff-schema.json +0 -332
- package/templates/template-contract.json +0 -231
package/src-next/bin.ts
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// src-next/bin.ts — the P3.2 new-tree CLI entry. The whole command tree, the parse
|
|
3
|
+
// face and the run bodies live in face/cli.ts (T11 — the composition root); this
|
|
4
|
+
// file only boots it: pass the raw argv to the composed `Cli` (the static factory —
|
|
5
|
+
// the class face is the entry, the module carries zero bare functions), exit by its
|
|
6
|
+
// code. The dev face runs this source directly under Node >=22.18 (native type
|
|
7
|
+
// stripping); the published artifact runs the tsc-emitted dist/bin.js. Unconditional
|
|
8
|
+
// boot — this artifact is only ever executed as the CLI entry, never imported.
|
|
9
|
+
import process from "node:process";
|
|
10
|
+
|
|
11
|
+
// The environment pre-flight — the engine's `engines` floor (package.json#engines
|
|
12
|
+
// ">=22.18.0"). It is the first thing this module body runs and covers every
|
|
13
|
+
// configuration where the entry's JS actually loads — the published artifact (the
|
|
14
|
+
// tsc-emitted dist/bin.js, plain JS) on any below-floor Node, and dev-face setups
|
|
15
|
+
// that load the `.ts` entry behind the type-stripping flag while still below 22.18.
|
|
16
|
+
// On those surfaces it exits with a self-explaining message + exit 1 before the
|
|
17
|
+
// cli face loads — the Cli face is `await import`ed only after the check, so that
|
|
18
|
+
// ordering is real where reachable. It cannot cover the plain `node src-next/bin.ts`
|
|
19
|
+
// dev face on a below-22.18 Node: there the loader itself rejects the `.ts` entry
|
|
20
|
+
// (native type stripping), so no engine JS — including this guard — ever runs; that
|
|
21
|
+
// crash is inherent to a `.ts` entry on old Node. On the published artifact the
|
|
22
|
+
// guard is a no-op — floor-consistent, never over-strict.
|
|
23
|
+
const NODE_FLOOR = { major: 22, minor: 18 } as const;
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* NodeEnvGuard — the entry's environment pre-flight, a static-judgement class (the
|
|
27
|
+
* module carries zero bare functions). problem() returns the below-floor message or
|
|
28
|
+
* null; the gate semantics and the exit message bytes are the boot guard's pinned
|
|
29
|
+
* face — the version floor and the wording never drift from this run.
|
|
30
|
+
*/
|
|
31
|
+
// biome-ignore lint/complexity/noStaticOnlyClass: the plan-mandated static guard surface — the zero-bare-function discipline admits no standalone predicate functions.
|
|
32
|
+
class NodeEnvGuard {
|
|
33
|
+
static problem(): string | null {
|
|
34
|
+
const [major, minor] = process.versions.node
|
|
35
|
+
.split(".")
|
|
36
|
+
.map((part) => Number.parseInt(part, 10));
|
|
37
|
+
if (major < NODE_FLOOR.major || (major === NODE_FLOOR.major && minor < NODE_FLOOR.minor)) {
|
|
38
|
+
return `cdd requires Node >= ${NODE_FLOOR.major}.${NODE_FLOOR.minor} (native type stripping) — installed: ${process.versions.node}`;
|
|
39
|
+
}
|
|
40
|
+
return null;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
const environmentProblem = NodeEnvGuard.problem();
|
|
45
|
+
if (environmentProblem !== null) {
|
|
46
|
+
process.stderr.write(`${environmentProblem}\n`);
|
|
47
|
+
process.exit(1);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
// The CLI face — runArgv owns the usage-error normalization (exit code 0 / 1 / 2,
|
|
51
|
+
// the steady exit-code table); the boot wrapper only maps an unexpected
|
|
52
|
+
// composition-root load/crash to the message + exit 1, never an unhandled
|
|
53
|
+
// rejection. `await import` keeps the environment pre-flight ahead of the load.
|
|
54
|
+
try {
|
|
55
|
+
const { Cli } = await import("./face/cli.ts");
|
|
56
|
+
const exitCode = await Cli.create().runArgv(process.argv.slice(2));
|
|
57
|
+
process.exit(exitCode);
|
|
58
|
+
} catch (raw) {
|
|
59
|
+
process.stderr.write(`cdd: ${raw instanceof Error ? raw.message : String(raw)}\n`);
|
|
60
|
+
process.exit(1);
|
|
61
|
+
}
|
|
@@ -0,0 +1,238 @@
|
|
|
1
|
+
{
|
|
2
|
+
"docType": "overall-spec",
|
|
3
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
4
|
+
"title": "overall-spec document structure",
|
|
5
|
+
"description": "Derived JSON Schema — 39 declared elements · 32 required",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"# Title": {
|
|
9
|
+
"type": "string",
|
|
10
|
+
"pattern": "^# \\S.*$",
|
|
11
|
+
"description": "presence: required · home: header · ref: none"
|
|
12
|
+
},
|
|
13
|
+
"**Version**": {
|
|
14
|
+
"type": "string",
|
|
15
|
+
"pattern": "^- \\*\\*Version\\*\\*: v\\d+\\.\\d+ · \\d{4}-\\d{2}-\\d{2}$",
|
|
16
|
+
"description": "presence: required · home: header · ref: version-lineage"
|
|
17
|
+
},
|
|
18
|
+
"**Status**": {
|
|
19
|
+
"type": "string",
|
|
20
|
+
"pattern": "^- \\*\\*Status\\*\\*: (Draft|Approved|In progress|Complete)$",
|
|
21
|
+
"description": "presence: required · home: header · ref: none"
|
|
22
|
+
},
|
|
23
|
+
"**Author**": {
|
|
24
|
+
"type": "string",
|
|
25
|
+
"pattern": "^- \\*\\*Author\\*\\*:",
|
|
26
|
+
"description": "presence: required · home: header · ref: none"
|
|
27
|
+
},
|
|
28
|
+
"**Constraints**": {
|
|
29
|
+
"type": "string",
|
|
30
|
+
"pattern": "^- \\*\\*Constraints\\*\\*:",
|
|
31
|
+
"description": "presence: required · home: header · ref: none"
|
|
32
|
+
},
|
|
33
|
+
"## Document scope": {
|
|
34
|
+
"type": "string",
|
|
35
|
+
"pattern": "^## Document scope$",
|
|
36
|
+
"description": "presence: required · home: section · ref: none"
|
|
37
|
+
},
|
|
38
|
+
"## File paths": {
|
|
39
|
+
"type": "string",
|
|
40
|
+
"pattern": "^## File paths$",
|
|
41
|
+
"description": "presence: required · home: section · ref: none"
|
|
42
|
+
},
|
|
43
|
+
"## Program charter": {
|
|
44
|
+
"type": "string",
|
|
45
|
+
"pattern": "^## Program charter$",
|
|
46
|
+
"description": "presence: required · home: section · ref: none"
|
|
47
|
+
},
|
|
48
|
+
"## Issue inventory": {
|
|
49
|
+
"type": "string",
|
|
50
|
+
"pattern": "^## Issue inventory$",
|
|
51
|
+
"description": "presence: required · home: section · ref: none"
|
|
52
|
+
},
|
|
53
|
+
"## Phase inventory": {
|
|
54
|
+
"type": "string",
|
|
55
|
+
"pattern": "^## Phase inventory$",
|
|
56
|
+
"description": "presence: required · home: section · ref: none"
|
|
57
|
+
},
|
|
58
|
+
"## Dependency graph": {
|
|
59
|
+
"type": "string",
|
|
60
|
+
"pattern": "^## Dependency graph( \\(ASCII\\))?$",
|
|
61
|
+
"description": "presence: required · home: section · ref: none"
|
|
62
|
+
},
|
|
63
|
+
"## Boundary rules": {
|
|
64
|
+
"type": "string",
|
|
65
|
+
"pattern": "^## Boundary rules$",
|
|
66
|
+
"description": "presence: required · home: section · ref: none"
|
|
67
|
+
},
|
|
68
|
+
"## Maintenance": {
|
|
69
|
+
"type": "string",
|
|
70
|
+
"pattern": "^## Maintenance$",
|
|
71
|
+
"description": "presence: required · home: section · ref: none"
|
|
72
|
+
},
|
|
73
|
+
"## Change history": {
|
|
74
|
+
"type": "string",
|
|
75
|
+
"pattern": "^## Change history$",
|
|
76
|
+
"description": "presence: required · home: section · ref: none"
|
|
77
|
+
},
|
|
78
|
+
"### Goal": {
|
|
79
|
+
"type": "string",
|
|
80
|
+
"pattern": "^### Goal",
|
|
81
|
+
"description": "presence: required · home: facet · ref: none"
|
|
82
|
+
},
|
|
83
|
+
"### Non-goals": {
|
|
84
|
+
"type": "string",
|
|
85
|
+
"pattern": "^### Non-goals",
|
|
86
|
+
"description": "presence: required · home: facet · ref: none"
|
|
87
|
+
},
|
|
88
|
+
"### Cross-cutting": {
|
|
89
|
+
"type": "string",
|
|
90
|
+
"pattern": "^### Cross-cutting",
|
|
91
|
+
"description": "presence: required · home: facet · ref: none"
|
|
92
|
+
},
|
|
93
|
+
"#### [MFRBEN] group": {
|
|
94
|
+
"type": "string",
|
|
95
|
+
"pattern": "^#### [MFRBEN] group",
|
|
96
|
+
"description": "presence: optional · home: facet · ref: none"
|
|
97
|
+
},
|
|
98
|
+
"#### Upstream Endorsements": {
|
|
99
|
+
"type": "string",
|
|
100
|
+
"pattern": "^#### Upstream Endorsements$",
|
|
101
|
+
"description": "presence: optional · home: facet · ref: none"
|
|
102
|
+
},
|
|
103
|
+
"Issue inventory columns": {
|
|
104
|
+
"type": "string",
|
|
105
|
+
"pattern": "^\\| Phase \\| Issue \\(ref\\) \\| Title summary \\|$",
|
|
106
|
+
"description": "presence: required · home: table · ref: none"
|
|
107
|
+
},
|
|
108
|
+
"Issue row": {
|
|
109
|
+
"type": "string",
|
|
110
|
+
"pattern": "^\\|\\s*P\\d+(\\.\\d+)*\\s*\\|",
|
|
111
|
+
"description": "presence: required · home: table · ref: issue-ref"
|
|
112
|
+
},
|
|
113
|
+
"Issue ref cell": {
|
|
114
|
+
"type": "string",
|
|
115
|
+
"pattern": "^(none|#\\d+|\\[#\\d+\\]|#\\d+#issuecomment-\\d+|([^)]*)|\\([^)]*\\))$",
|
|
116
|
+
"description": "presence: required · home: table · ref: issue-ref"
|
|
117
|
+
},
|
|
118
|
+
"issuecomment anchor": {
|
|
119
|
+
"type": "string",
|
|
120
|
+
"pattern": "^#\\d+#issuecomment-\\d+$",
|
|
121
|
+
"description": "presence: conditional · home: table · ref: issue-ref"
|
|
122
|
+
},
|
|
123
|
+
"Phase inventory columns": {
|
|
124
|
+
"type": "string",
|
|
125
|
+
"pattern": "^\\| # \\| Phase \\| Scope \\| Design spec \\| Implementation plan \\| Acceptance criteria \\| Dependency \\|$",
|
|
126
|
+
"description": "presence: required · home: table · ref: none"
|
|
127
|
+
},
|
|
128
|
+
"Phase row": {
|
|
129
|
+
"type": "string",
|
|
130
|
+
"pattern": "^\\|\\s*P\\d+(\\.\\d+)*\\s*\\|",
|
|
131
|
+
"description": "presence: required · home: table · ref: phase-id"
|
|
132
|
+
},
|
|
133
|
+
"Phase id token": {
|
|
134
|
+
"type": "string",
|
|
135
|
+
"pattern": "^P\\d+(\\.\\d+)*$",
|
|
136
|
+
"description": "presence: required · home: table · ref: phase-id"
|
|
137
|
+
},
|
|
138
|
+
"Implementation plan cell": {
|
|
139
|
+
"type": "string",
|
|
140
|
+
"pattern": "^(Pending|\\[Pending\\]|In-flight|\\[In-flight\\]|Done|\\[[^\\]]+\\]\\([^)]+\\))$",
|
|
141
|
+
"description": "presence: required · home: table · ref: markdown-link"
|
|
142
|
+
},
|
|
143
|
+
"Design spec cell": {
|
|
144
|
+
"type": "string",
|
|
145
|
+
"pattern": "^(\\[[^\\]]+\\]\\([^)]+\\)|P\\d+(\\.\\d+)*-design|Done|\\[Pending\\])$",
|
|
146
|
+
"description": "presence: required · home: table · ref: spec-ref"
|
|
147
|
+
},
|
|
148
|
+
"Dependency cell": {
|
|
149
|
+
"type": "string",
|
|
150
|
+
"pattern": "^P\\d+(\\.\\d+)*\\s*->",
|
|
151
|
+
"description": "presence: required · home: table · ref: phase-id"
|
|
152
|
+
},
|
|
153
|
+
"Hard edge": {
|
|
154
|
+
"type": "string",
|
|
155
|
+
"pattern": "^P\\d+(\\.\\d+)*\\s*->\\s*P\\d+(\\.\\d+)*",
|
|
156
|
+
"description": "presence: required · home: graph · ref: phase-id"
|
|
157
|
+
},
|
|
158
|
+
"Soft edge": {
|
|
159
|
+
"type": "string",
|
|
160
|
+
"pattern": "^P\\d+(\\.\\d+)*\\s*->\\s*\\(?\\s*soft\\s*\\)?",
|
|
161
|
+
"description": "presence: optional · home: graph · ref: phase-id"
|
|
162
|
+
},
|
|
163
|
+
"Graph legend": {
|
|
164
|
+
"type": "string",
|
|
165
|
+
"pattern": "^(?:- )?`?->\\s*(?:\\(soft\\))?\\s*`? = hard block|^(?:- )?`?->\\s*\\(soft\\)\\s*`? = suggestion only",
|
|
166
|
+
"description": "presence: required · home: graph · ref: none"
|
|
167
|
+
},
|
|
168
|
+
"File path row": {
|
|
169
|
+
"type": "string",
|
|
170
|
+
"pattern": "^\\| [^|]+ \\| `[^`]+` \\|$",
|
|
171
|
+
"description": "presence: required · home: table · ref: none"
|
|
172
|
+
},
|
|
173
|
+
"Change history row": {
|
|
174
|
+
"type": "string",
|
|
175
|
+
"pattern": "^\\|\\s*v\\d+\\.\\d+\\s*\\|",
|
|
176
|
+
"description": "presence: required · home: table · ref: version-lineage"
|
|
177
|
+
},
|
|
178
|
+
"Version token": {
|
|
179
|
+
"type": "string",
|
|
180
|
+
"pattern": "^v\\d+\\.\\d+$",
|
|
181
|
+
"description": "presence: required · home: table · ref: version-lineage"
|
|
182
|
+
},
|
|
183
|
+
"Change history date": {
|
|
184
|
+
"type": "string",
|
|
185
|
+
"pattern": "^\\d{4}-\\d{2}-\\d{2}$",
|
|
186
|
+
"description": "presence: required · home: table · ref: none"
|
|
187
|
+
},
|
|
188
|
+
"Backfill clause": {
|
|
189
|
+
"type": "string",
|
|
190
|
+
"pattern": "(Pending|\\[Pending\\])\\s*(→|->)\\s*\\S+",
|
|
191
|
+
"description": "presence: conditional · home: table · ref: version-lineage"
|
|
192
|
+
},
|
|
193
|
+
"Design claim token": {
|
|
194
|
+
"type": "string",
|
|
195
|
+
"pattern": "^P\\d+(\\.\\d+)*-design$",
|
|
196
|
+
"description": "presence: conditional · home: table · ref: spec-ref"
|
|
197
|
+
},
|
|
198
|
+
"Phase range ref": {
|
|
199
|
+
"type": "string",
|
|
200
|
+
"pattern": "^P\\d+(\\.\\d+)*\\s*[-–—]\\s*P\\d+(\\.\\d+)*$",
|
|
201
|
+
"description": "presence: optional · home: table · ref: phase-id"
|
|
202
|
+
}
|
|
203
|
+
},
|
|
204
|
+
"required": [
|
|
205
|
+
"# Title",
|
|
206
|
+
"**Version**",
|
|
207
|
+
"**Status**",
|
|
208
|
+
"**Author**",
|
|
209
|
+
"**Constraints**",
|
|
210
|
+
"## Document scope",
|
|
211
|
+
"## File paths",
|
|
212
|
+
"## Program charter",
|
|
213
|
+
"## Issue inventory",
|
|
214
|
+
"## Phase inventory",
|
|
215
|
+
"## Dependency graph",
|
|
216
|
+
"## Boundary rules",
|
|
217
|
+
"## Maintenance",
|
|
218
|
+
"## Change history",
|
|
219
|
+
"### Goal",
|
|
220
|
+
"### Non-goals",
|
|
221
|
+
"### Cross-cutting",
|
|
222
|
+
"Issue inventory columns",
|
|
223
|
+
"Issue row",
|
|
224
|
+
"Issue ref cell",
|
|
225
|
+
"Phase inventory columns",
|
|
226
|
+
"Phase row",
|
|
227
|
+
"Phase id token",
|
|
228
|
+
"Implementation plan cell",
|
|
229
|
+
"Design spec cell",
|
|
230
|
+
"Dependency cell",
|
|
231
|
+
"Hard edge",
|
|
232
|
+
"Graph legend",
|
|
233
|
+
"File path row",
|
|
234
|
+
"Change history row",
|
|
235
|
+
"Version token",
|
|
236
|
+
"Change history date"
|
|
237
|
+
]
|
|
238
|
+
}
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
{
|
|
2
|
+
"docType": "phase-spec",
|
|
3
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
4
|
+
"title": "phase-spec document structure",
|
|
5
|
+
"description": "Derived JSON Schema — 25 declared elements · 17 required",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"# Title": {
|
|
9
|
+
"type": "string",
|
|
10
|
+
"pattern": "^# \\S.*$",
|
|
11
|
+
"description": "presence: required · home: header · ref: none"
|
|
12
|
+
},
|
|
13
|
+
"**Version**": {
|
|
14
|
+
"type": "string",
|
|
15
|
+
"pattern": "^- \\*\\*Version\\*\\*: v\\d+\\.\\d+ · \\d{4}-\\d{2}-\\d{2}$",
|
|
16
|
+
"description": "presence: required · home: header · ref: version-lineage"
|
|
17
|
+
},
|
|
18
|
+
"**Status**": {
|
|
19
|
+
"type": "string",
|
|
20
|
+
"pattern": "^- \\*\\*Status\\*\\*: (Draft|Approved|Plan pending|Shipped)$",
|
|
21
|
+
"description": "presence: required · home: header · ref: none"
|
|
22
|
+
},
|
|
23
|
+
"**Author**": {
|
|
24
|
+
"type": "string",
|
|
25
|
+
"pattern": "^- \\*\\*Author\\*\\*:",
|
|
26
|
+
"description": "presence: required · home: header · ref: none"
|
|
27
|
+
},
|
|
28
|
+
"**Parent program**": {
|
|
29
|
+
"type": "string",
|
|
30
|
+
"pattern": "^- \\*\\*Parent program\\*\\*:? \\[[^\\]]+\\]\\([^)]+\\)",
|
|
31
|
+
"description": "presence: required · home: header · ref: parent-program"
|
|
32
|
+
},
|
|
33
|
+
"**Depends on**": {
|
|
34
|
+
"type": "string",
|
|
35
|
+
"pattern": "^- \\*\\*Depends on\\*\\*:",
|
|
36
|
+
"description": "presence: required · home: header · ref: none"
|
|
37
|
+
},
|
|
38
|
+
"Depends on ref": {
|
|
39
|
+
"type": "string",
|
|
40
|
+
"pattern": "^P\\d+(\\.\\d+)*",
|
|
41
|
+
"description": "presence: conditional · home: header · ref: phase-id"
|
|
42
|
+
},
|
|
43
|
+
"## Design": {
|
|
44
|
+
"type": "string",
|
|
45
|
+
"pattern": "^## Design$",
|
|
46
|
+
"description": "presence: required · home: design-body · ref: none"
|
|
47
|
+
},
|
|
48
|
+
"### N. group heading": {
|
|
49
|
+
"type": "string",
|
|
50
|
+
"pattern": "^### \\d+\\. ",
|
|
51
|
+
"description": "presence: required · home: design-body · ref: none"
|
|
52
|
+
},
|
|
53
|
+
"#### N.M item heading": {
|
|
54
|
+
"type": "string",
|
|
55
|
+
"pattern": "^#### \\d+\\.\\d+ ",
|
|
56
|
+
"description": "presence: required · home: design-body · ref: none"
|
|
57
|
+
},
|
|
58
|
+
"### Acceptance criteria": {
|
|
59
|
+
"type": "string",
|
|
60
|
+
"pattern": "^### Acceptance criteria$",
|
|
61
|
+
"description": "presence: required · home: design-body · ref: none"
|
|
62
|
+
},
|
|
63
|
+
"Acceptance entry": {
|
|
64
|
+
"type": "string",
|
|
65
|
+
"pattern": "^- `",
|
|
66
|
+
"description": "presence: required · home: design-body · ref: none"
|
|
67
|
+
},
|
|
68
|
+
"## Constraints": {
|
|
69
|
+
"type": "string",
|
|
70
|
+
"pattern": "^## Constraints$",
|
|
71
|
+
"description": "presence: required · home: section · ref: none"
|
|
72
|
+
},
|
|
73
|
+
"Constraint delta bullet": {
|
|
74
|
+
"type": "string",
|
|
75
|
+
"pattern": "^- ",
|
|
76
|
+
"description": "presence: required · home: section · ref: none"
|
|
77
|
+
},
|
|
78
|
+
"## Deviations": {
|
|
79
|
+
"type": "string",
|
|
80
|
+
"pattern": "^## Deviations$",
|
|
81
|
+
"description": "presence: conditional · home: conditional · ref: none"
|
|
82
|
+
},
|
|
83
|
+
"Deviations columns": {
|
|
84
|
+
"type": "string",
|
|
85
|
+
"pattern": "^\\| Overall assumption \\| Phase decision \\| Overall updated\\? \\|$",
|
|
86
|
+
"description": "presence: conditional · home: conditional · ref: none"
|
|
87
|
+
},
|
|
88
|
+
"Deviations row": {
|
|
89
|
+
"type": "string",
|
|
90
|
+
"pattern": "^\\|\\s*[^|]+\\s*\\|\\s*[^|]+\\s*\\|\\s*(Yes|No)\\b",
|
|
91
|
+
"description": "presence: conditional · home: conditional · ref: none"
|
|
92
|
+
},
|
|
93
|
+
"Overall updated answer": {
|
|
94
|
+
"type": "string",
|
|
95
|
+
"pattern": "^Yes",
|
|
96
|
+
"description": "presence: conditional · home: conditional · ref: none"
|
|
97
|
+
},
|
|
98
|
+
"## Incremental warning": {
|
|
99
|
+
"type": "string",
|
|
100
|
+
"pattern": "^## Incremental warning$",
|
|
101
|
+
"description": "presence: conditional · home: conditional · ref: none"
|
|
102
|
+
},
|
|
103
|
+
"## Notes for downstream": {
|
|
104
|
+
"type": "string",
|
|
105
|
+
"pattern": "^## Notes for downstream$",
|
|
106
|
+
"description": "presence: conditional · home: conditional · ref: none"
|
|
107
|
+
},
|
|
108
|
+
"## Review record": {
|
|
109
|
+
"type": "string",
|
|
110
|
+
"pattern": "^## Review record$",
|
|
111
|
+
"description": "presence: conditional · home: conditional · ref: none"
|
|
112
|
+
},
|
|
113
|
+
"## Change history": {
|
|
114
|
+
"type": "string",
|
|
115
|
+
"pattern": "^## Change history$",
|
|
116
|
+
"description": "presence: required · home: section · ref: none"
|
|
117
|
+
},
|
|
118
|
+
"Change history row": {
|
|
119
|
+
"type": "string",
|
|
120
|
+
"pattern": "^\\|\\s*v\\d+\\.\\d+\\s*\\|",
|
|
121
|
+
"description": "presence: required · home: table · ref: version-lineage"
|
|
122
|
+
},
|
|
123
|
+
"Version token": {
|
|
124
|
+
"type": "string",
|
|
125
|
+
"pattern": "^v\\d+\\.\\d+$",
|
|
126
|
+
"description": "presence: required · home: table · ref: version-lineage"
|
|
127
|
+
},
|
|
128
|
+
"Change history date": {
|
|
129
|
+
"type": "string",
|
|
130
|
+
"pattern": "^\\d{4}-\\d{2}-\\d{2}$",
|
|
131
|
+
"description": "presence: required · home: table · ref: none"
|
|
132
|
+
}
|
|
133
|
+
},
|
|
134
|
+
"required": [
|
|
135
|
+
"# Title",
|
|
136
|
+
"**Version**",
|
|
137
|
+
"**Status**",
|
|
138
|
+
"**Author**",
|
|
139
|
+
"**Parent program**",
|
|
140
|
+
"**Depends on**",
|
|
141
|
+
"## Design",
|
|
142
|
+
"### N. group heading",
|
|
143
|
+
"#### N.M item heading",
|
|
144
|
+
"### Acceptance criteria",
|
|
145
|
+
"Acceptance entry",
|
|
146
|
+
"## Constraints",
|
|
147
|
+
"Constraint delta bullet",
|
|
148
|
+
"## Change history",
|
|
149
|
+
"Change history row",
|
|
150
|
+
"Version token",
|
|
151
|
+
"Change history date"
|
|
152
|
+
]
|
|
153
|
+
}
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
{
|
|
2
|
+
"docType": "plan",
|
|
3
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
4
|
+
"title": "plan document structure",
|
|
5
|
+
"description": "Derived JSON Schema — 28 declared elements · 22 required",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"# Title": {
|
|
9
|
+
"type": "string",
|
|
10
|
+
"pattern": "^# \\S.*$",
|
|
11
|
+
"description": "presence: required · home: header · ref: none"
|
|
12
|
+
},
|
|
13
|
+
"**Spec:**": {
|
|
14
|
+
"type": "string",
|
|
15
|
+
"pattern": "^\\*\\*Spec:\\*\\*\\s+\\[[^\\]]+\\]\\([^)]+\\)$",
|
|
16
|
+
"description": "presence: required · home: header · ref: spec-ref"
|
|
17
|
+
},
|
|
18
|
+
"**Parent program**": {
|
|
19
|
+
"type": "string",
|
|
20
|
+
"pattern": "^- \\*\\*Parent program\\*\\*:? \\[[^\\]]+\\]\\([^)]+\\)",
|
|
21
|
+
"description": "presence: required · home: header · ref: parent-program"
|
|
22
|
+
},
|
|
23
|
+
"**Version**": {
|
|
24
|
+
"type": "string",
|
|
25
|
+
"pattern": "^- \\*\\*Version\\*\\*: v\\d+\\.\\d+ · \\d{4}-\\d{2}-\\d{2}$",
|
|
26
|
+
"description": "presence: required · home: header · ref: version-lineage"
|
|
27
|
+
},
|
|
28
|
+
"**Depends on**": {
|
|
29
|
+
"type": "string",
|
|
30
|
+
"pattern": "^- \\*\\*Depends on\\*\\*:",
|
|
31
|
+
"description": "presence: optional · home: header · ref: phase-id"
|
|
32
|
+
},
|
|
33
|
+
"**Base**": {
|
|
34
|
+
"type": "string",
|
|
35
|
+
"pattern": "^- \\*\\*Base\\*\\*:",
|
|
36
|
+
"description": "presence: optional · home: header · ref: none"
|
|
37
|
+
},
|
|
38
|
+
"## Constraints": {
|
|
39
|
+
"type": "string",
|
|
40
|
+
"pattern": "^## Constraints$",
|
|
41
|
+
"description": "presence: required · home: section · ref: none"
|
|
42
|
+
},
|
|
43
|
+
"Constraint delta bullet": {
|
|
44
|
+
"type": "string",
|
|
45
|
+
"pattern": "^- ",
|
|
46
|
+
"description": "presence: required · home: section · ref: none"
|
|
47
|
+
},
|
|
48
|
+
"Constraint delta sub-heading": {
|
|
49
|
+
"type": "string",
|
|
50
|
+
"pattern": "^### ",
|
|
51
|
+
"description": "presence: optional · home: section · ref: none"
|
|
52
|
+
},
|
|
53
|
+
"### Task N:": {
|
|
54
|
+
"type": "string",
|
|
55
|
+
"pattern": "^### Task \\d+:( .*)?$",
|
|
56
|
+
"description": "presence: required · home: task-block · ref: none"
|
|
57
|
+
},
|
|
58
|
+
"Task id token": {
|
|
59
|
+
"type": "string",
|
|
60
|
+
"pattern": "^\\d+$",
|
|
61
|
+
"description": "presence: required · home: task-block · ref: task-id"
|
|
62
|
+
},
|
|
63
|
+
"**Objective**": {
|
|
64
|
+
"type": "string",
|
|
65
|
+
"pattern": "^- \\*\\*Objective\\*\\*:",
|
|
66
|
+
"description": "presence: required · home: task-field · ref: none"
|
|
67
|
+
},
|
|
68
|
+
"**Files**": {
|
|
69
|
+
"type": "string",
|
|
70
|
+
"pattern": "^- \\*\\*Files\\*\\*:",
|
|
71
|
+
"description": "presence: required · home: task-field · ref: none"
|
|
72
|
+
},
|
|
73
|
+
"File path token": {
|
|
74
|
+
"type": "string",
|
|
75
|
+
"pattern": "^[\\w./-]+",
|
|
76
|
+
"description": "presence: required · home: task-field · ref: none"
|
|
77
|
+
},
|
|
78
|
+
"**Consumes**": {
|
|
79
|
+
"type": "string",
|
|
80
|
+
"pattern": "^- \\*\\*Consumes\\*\\*:",
|
|
81
|
+
"description": "presence: required · home: task-field · ref: none"
|
|
82
|
+
},
|
|
83
|
+
"**Produces**": {
|
|
84
|
+
"type": "string",
|
|
85
|
+
"pattern": "^- \\*\\*Produces\\*\\*:",
|
|
86
|
+
"description": "presence: required · home: task-field · ref: none"
|
|
87
|
+
},
|
|
88
|
+
"**Steps**": {
|
|
89
|
+
"type": "string",
|
|
90
|
+
"pattern": "^- \\*\\*Steps\\*\\*:",
|
|
91
|
+
"description": "presence: required · home: task-field · ref: none"
|
|
92
|
+
},
|
|
93
|
+
"Step action": {
|
|
94
|
+
"type": "string",
|
|
95
|
+
"pattern": "^- ",
|
|
96
|
+
"description": "presence: required · home: task-step · ref: none"
|
|
97
|
+
},
|
|
98
|
+
"Step checkable": {
|
|
99
|
+
"type": "string",
|
|
100
|
+
"pattern": "—\\s*checkable:\\s*\\S",
|
|
101
|
+
"description": "presence: required · home: task-step · ref: none"
|
|
102
|
+
},
|
|
103
|
+
"**Acceptance**": {
|
|
104
|
+
"type": "string",
|
|
105
|
+
"pattern": "^- \\*\\*Acceptance\\*\\*:",
|
|
106
|
+
"description": "presence: required · home: task-field · ref: none"
|
|
107
|
+
},
|
|
108
|
+
"**DependsOn**": {
|
|
109
|
+
"type": "string",
|
|
110
|
+
"pattern": "^- \\*\\*DependsOn\\*\\*:",
|
|
111
|
+
"description": "presence: required · home: task-field · ref: none"
|
|
112
|
+
},
|
|
113
|
+
"DependsOn none": {
|
|
114
|
+
"type": "string",
|
|
115
|
+
"pattern": "^(none|\\s*)$",
|
|
116
|
+
"description": "presence: optional · home: task-field · ref: none"
|
|
117
|
+
},
|
|
118
|
+
"DependsOn id": {
|
|
119
|
+
"type": "string",
|
|
120
|
+
"pattern": "^[1-9]\\d*$",
|
|
121
|
+
"description": "presence: optional · home: task-field · ref: task-id"
|
|
122
|
+
},
|
|
123
|
+
"Task prose reference": {
|
|
124
|
+
"type": "string",
|
|
125
|
+
"pattern": "\\b(?:Task|T)\\s*([1-9]\\d*)\\b(?!\\.\\d)",
|
|
126
|
+
"description": "presence: optional · home: task-field · ref: task-id"
|
|
127
|
+
},
|
|
128
|
+
"## Change history": {
|
|
129
|
+
"type": "string",
|
|
130
|
+
"pattern": "^## Change history$",
|
|
131
|
+
"description": "presence: required · home: section · ref: none"
|
|
132
|
+
},
|
|
133
|
+
"Change history row": {
|
|
134
|
+
"type": "string",
|
|
135
|
+
"pattern": "^\\|\\s*v\\d+\\.\\d+\\s*\\|",
|
|
136
|
+
"description": "presence: required · home: table · ref: version-lineage"
|
|
137
|
+
},
|
|
138
|
+
"Version token": {
|
|
139
|
+
"type": "string",
|
|
140
|
+
"pattern": "^v\\d+\\.\\d+$",
|
|
141
|
+
"description": "presence: required · home: table · ref: version-lineage"
|
|
142
|
+
},
|
|
143
|
+
"Change history date": {
|
|
144
|
+
"type": "string",
|
|
145
|
+
"pattern": "^\\d{4}-\\d{2}-\\d{2}$",
|
|
146
|
+
"description": "presence: required · home: table · ref: none"
|
|
147
|
+
}
|
|
148
|
+
},
|
|
149
|
+
"required": [
|
|
150
|
+
"# Title",
|
|
151
|
+
"**Spec:**",
|
|
152
|
+
"**Parent program**",
|
|
153
|
+
"**Version**",
|
|
154
|
+
"## Constraints",
|
|
155
|
+
"Constraint delta bullet",
|
|
156
|
+
"### Task N:",
|
|
157
|
+
"Task id token",
|
|
158
|
+
"**Objective**",
|
|
159
|
+
"**Files**",
|
|
160
|
+
"File path token",
|
|
161
|
+
"**Consumes**",
|
|
162
|
+
"**Produces**",
|
|
163
|
+
"**Steps**",
|
|
164
|
+
"Step action",
|
|
165
|
+
"Step checkable",
|
|
166
|
+
"**Acceptance**",
|
|
167
|
+
"**DependsOn**",
|
|
168
|
+
"## Change history",
|
|
169
|
+
"Change history row",
|
|
170
|
+
"Version token",
|
|
171
|
+
"Change history date"
|
|
172
|
+
]
|
|
173
|
+
}
|