@prd-improve/cli 1.1.1 → 1.6.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/dist/changelog.d.ts +13 -7
- package/dist/changelog.js +12 -15
- package/dist/changelog.js.map +1 -1
- package/dist/cli.js +55 -7
- package/dist/cli.js.map +1 -1
- package/dist/commands/_prdSource.d.ts +35 -0
- package/dist/commands/_prdSource.js +110 -0
- package/dist/commands/_prdSource.js.map +1 -0
- package/dist/commands/closeout.d.ts +9 -0
- package/dist/commands/closeout.js +293 -0
- package/dist/commands/closeout.js.map +1 -0
- package/dist/commands/context.js +11 -117
- package/dist/commands/context.js.map +1 -1
- package/dist/commands/export.d.ts +8 -0
- package/dist/commands/export.js +179 -0
- package/dist/commands/export.js.map +1 -0
- package/dist/commands/freeze.d.ts +23 -0
- package/dist/commands/freeze.js +125 -32
- package/dist/commands/freeze.js.map +1 -1
- package/dist/commands/init.d.ts +1 -1
- package/dist/commands/init.js +7 -5
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/migrate-yaml.js +94 -46
- package/dist/commands/migrate-yaml.js.map +1 -1
- package/dist/commands/reopen.d.ts +4 -0
- package/dist/commands/reopen.js +76 -0
- package/dist/commands/reopen.js.map +1 -0
- package/dist/commands/resolve.d.ts +8 -0
- package/dist/commands/resolve.js +127 -0
- package/dist/commands/resolve.js.map +1 -0
- package/dist/commands/skill.d.ts +4 -0
- package/dist/commands/skill.js +16 -1
- package/dist/commands/skill.js.map +1 -1
- package/dist/commands/validate.d.ts +2 -0
- package/dist/commands/validate.js +4 -2
- package/dist/commands/validate.js.map +1 -1
- package/dist/i18n/en.js +71 -6
- package/dist/i18n/en.js.map +1 -1
- package/dist/i18n/help.en.d.ts +30 -0
- package/dist/i18n/help.en.js +32 -2
- package/dist/i18n/help.en.js.map +1 -1
- package/dist/i18n/help.zh.d.ts +30 -0
- package/dist/i18n/help.zh.js +32 -2
- package/dist/i18n/help.zh.js.map +1 -1
- package/dist/i18n/helpGroups.js +1 -1
- package/dist/i18n/helpGroups.js.map +1 -1
- package/dist/i18n/peekLang.d.ts +1 -0
- package/dist/i18n/peekLang.js +19 -0
- package/dist/i18n/peekLang.js.map +1 -1
- package/dist/i18n/zh.d.ts +161 -1
- package/dist/i18n/zh.js +71 -6
- package/dist/i18n/zh.js.map +1 -1
- package/dist/renderer/context-md.d.ts +13 -2
- package/dist/renderer/context-md.js +12 -12
- package/dist/renderer/context-md.js.map +1 -1
- package/dist/renderer/spec-md.d.ts +19 -0
- package/dist/renderer/spec-md.js +206 -0
- package/dist/renderer/spec-md.js.map +1 -0
- package/dist/schema/modules.d.ts +37 -5
- package/dist/schema/modules.js +14 -1
- package/dist/schema/modules.js.map +1 -1
- package/dist/schema/prd.d.ts +93 -17
- package/dist/schema/prd.js +51 -7
- package/dist/schema/prd.js.map +1 -1
- package/dist/skill/prd-improve-forge/SKILL.md +150 -10
- package/dist/skill/prd-improve-forge/checklists/batch-import.md +2 -1
- package/dist/skill/prd-improve-forge/checklists/dimensions/integration-seam.md +131 -0
- package/dist/skill/prd-improve-forge/checklists/dimensions/state-machine-counter.md +130 -0
- package/dist/skill/prd-improve-forge/examples/import-history-prds.prd.yaml +10 -5
- package/dist/skill/prd-improve-forge/templates/prd.yaml +25 -9
- package/dist/validators/blocking.js +15 -12
- package/dist/validators/blocking.js.map +1 -1
- package/dist/validators/references.js +9 -0
- package/dist/validators/references.js.map +1 -1
- package/dist/validators/runner.js +2 -2
- package/dist/validators/runner.js.map +1 -1
- package/dist/workspace.d.ts +12 -1
- package/dist/workspace.js +12 -1
- package/dist/workspace.js.map +1 -1
- package/dist/yamlPatch.d.ts +16 -0
- package/dist/yamlPatch.js +50 -0
- package/dist/yamlPatch.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { type PrdInput } from "./context-md.js";
|
|
2
|
+
export interface SpecMeta {
|
|
3
|
+
feature: string;
|
|
4
|
+
team?: string;
|
|
5
|
+
project?: string;
|
|
6
|
+
owner?: string;
|
|
7
|
+
tags?: string[];
|
|
8
|
+
source_version: string;
|
|
9
|
+
source_path: string;
|
|
10
|
+
source_hash: string;
|
|
11
|
+
exported_at: string;
|
|
12
|
+
schema_version: string;
|
|
13
|
+
/** feature 当前交付状态是否 shipped(由 driver 读 working/prd.yaml 判定);true 时 H1 改 as-built 措辞。 */
|
|
14
|
+
shipped?: boolean;
|
|
15
|
+
/** shipped 伴生交付锚点(来自 working lifecycle),H1 提示透传。 */
|
|
16
|
+
shipped_at?: string;
|
|
17
|
+
landed_commit?: string;
|
|
18
|
+
}
|
|
19
|
+
export declare function renderSpecSkeleton(yaml: PrdInput, meta: SpecMeta): string;
|
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
import { renderBackgroundAndGoals, renderUsersAndRoles, renderInScope, renderOutOfScope, renderEntities, renderMainFlow, renderStatePermissions, renderBusinessRules, renderScenarios, renderEdgeCases, renderUIInteraction, renderDataAndAPI, } from "./context-md.js";
|
|
2
|
+
function isNonEmptyString(v) {
|
|
3
|
+
return typeof v === "string" && v.trim() !== "";
|
|
4
|
+
}
|
|
5
|
+
function isNonEmptyArray(v) {
|
|
6
|
+
return Array.isArray(v) && v.length > 0;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* 单遍标题降级:行首 `## ` 或 `### ` 前插一个 `#`(禁止顺序两次 replace 致双降级)。
|
|
10
|
+
* `#### ` 等 H4+ 不匹配(# 后非空格),不受影响。
|
|
11
|
+
*/
|
|
12
|
+
function demote(md) {
|
|
13
|
+
return md.replace(/^(#{2,3}) /gm, "#$1 ");
|
|
14
|
+
}
|
|
15
|
+
function renderFrontmatter(meta) {
|
|
16
|
+
const lines = ["---", `feature: ${meta.feature}`];
|
|
17
|
+
if (isNonEmptyString(meta.team))
|
|
18
|
+
lines.push(`team: ${meta.team}`);
|
|
19
|
+
if (isNonEmptyString(meta.project))
|
|
20
|
+
lines.push(`project: ${meta.project}`);
|
|
21
|
+
if (isNonEmptyString(meta.owner))
|
|
22
|
+
lines.push(`owner: ${meta.owner}`);
|
|
23
|
+
if (Array.isArray(meta.tags) && meta.tags.length > 0)
|
|
24
|
+
lines.push(`tags: [${meta.tags.join(", ")}]`);
|
|
25
|
+
lines.push(`source: ${meta.source_path}`);
|
|
26
|
+
lines.push(`source_version: ${meta.source_version}`);
|
|
27
|
+
lines.push(`source_hash: ${meta.source_hash}`);
|
|
28
|
+
lines.push(`exported_at: ${meta.exported_at}`);
|
|
29
|
+
lines.push(`schema_version: ${meta.schema_version}`);
|
|
30
|
+
lines.push("generated_by: prd export");
|
|
31
|
+
lines.push("---");
|
|
32
|
+
return lines.join("\n");
|
|
33
|
+
}
|
|
34
|
+
function renderH1(yaml, meta) {
|
|
35
|
+
const title = isNonEmptyString(yaml?.meta?.title)
|
|
36
|
+
? yaml.meta.title
|
|
37
|
+
: meta.feature;
|
|
38
|
+
const head = `# ${title} — design spec\n` +
|
|
39
|
+
`<!-- H1 兜底:meta.title 缺失时落到 feature slug。meta.summary 不进骨架(by-design) -->\n\n`;
|
|
40
|
+
// shipped 锚点:有 shipped_at / landed_commit 则带上(commit 取短 hash),缺则优雅降级。
|
|
41
|
+
const anchors = [];
|
|
42
|
+
if (isNonEmptyString(meta.shipped_at))
|
|
43
|
+
anchors.push(meta.shipped_at);
|
|
44
|
+
if (isNonEmptyString(meta.landed_commit))
|
|
45
|
+
anchors.push(`commit ${meta.landed_commit.slice(0, 8)}`);
|
|
46
|
+
const shippedTag = anchors.length > 0 ? `shipped @ ${anchors.join(",")}` : "shipped";
|
|
47
|
+
const intro = meta.shipped
|
|
48
|
+
? `> 需求段由 \`prd export\` 自 prd.yaml 生成。**本特性已交付(${shippedTag})**:工程段(§A-§D)宜作 as-built 记录(已交付的实现 / 与设计的偏差),而非待开发蓝本。\n`
|
|
49
|
+
: `> 需求段由 \`prd export\` 自 prd.yaml 生成;工程段(§A-§D)为占位,续写后进 writing-plans。\n`;
|
|
50
|
+
return (head +
|
|
51
|
+
intro +
|
|
52
|
+
`> 需求变更请先改 prd.yaml 再重导(--force),勿只改本文件。`);
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* 表格单元格清洗:trim(去 YAML 块标量 `|` 的尾随换行)→ 转义 `|` → 内部换行转 `<br>`。
|
|
56
|
+
* 防 open_question 的 question/resolution 含换行或管道时撑断 markdown 表格行(dogfood bug)。
|
|
57
|
+
*/
|
|
58
|
+
function cell(v) {
|
|
59
|
+
const s = v == null ? "" : String(v);
|
|
60
|
+
return s.trim().replace(/\|/g, "\\|").replace(/\r?\n/g, "<br>");
|
|
61
|
+
}
|
|
62
|
+
function renderDecisionRecord(arr) {
|
|
63
|
+
if (!isNonEmptyArray(arr))
|
|
64
|
+
return "";
|
|
65
|
+
const list = arr;
|
|
66
|
+
const resolved = list.filter((q) => isNonEmptyString(q?.resolution));
|
|
67
|
+
const open = list.filter((q) => !isNonEmptyString(q?.resolution));
|
|
68
|
+
const blocks = ["## §0 决策记录(源自 open_questions)"];
|
|
69
|
+
if (resolved.length > 0) {
|
|
70
|
+
const rows = ["### 已决", "", "| id | 问题 | 决议 | 决于 |", "|---|---|---|---|"];
|
|
71
|
+
for (const q of resolved) {
|
|
72
|
+
rows.push(`| ${cell(q.id)} | ${cell(q.question)} | ${cell(q.resolution)} | ${cell(q.resolved_at)} |`);
|
|
73
|
+
}
|
|
74
|
+
blocks.push(rows.join("\n"));
|
|
75
|
+
}
|
|
76
|
+
if (open.length > 0) {
|
|
77
|
+
const rows = ["### 未决", "", "| id | 问题 | severity | owner / 延后 |", "|---|---|---|---|"];
|
|
78
|
+
for (const q of open) {
|
|
79
|
+
const isBlocking = q.severity === "blocking";
|
|
80
|
+
const id = isBlocking ? `**${cell(q.id)}**` : cell(q.id);
|
|
81
|
+
const sev = isBlocking ? `**${cell(q.severity)}**` : cell(q.severity);
|
|
82
|
+
const owner = isNonEmptyString(q.owner)
|
|
83
|
+
? cell(q.owner)
|
|
84
|
+
: isNonEmptyString(q.deferred_to)
|
|
85
|
+
? `→ ${cell(q.deferred_to)}`
|
|
86
|
+
: "";
|
|
87
|
+
rows.push(`| ${id} | ${cell(q.question)} | ${sev} | ${owner} |`);
|
|
88
|
+
}
|
|
89
|
+
blocks.push(rows.join("\n"));
|
|
90
|
+
}
|
|
91
|
+
return blocks.join("\n\n");
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* 需求出处(meta.source_materials):投影到 §1 末尾 H3 小节。
|
|
95
|
+
* 不经 demote(直接产 H3,与降级后的模块标题同级);空则返回 ""(跳段)。
|
|
96
|
+
*/
|
|
97
|
+
function renderSourceMaterials(arr) {
|
|
98
|
+
if (!isNonEmptyArray(arr))
|
|
99
|
+
return "";
|
|
100
|
+
const items = [];
|
|
101
|
+
for (const raw of arr) {
|
|
102
|
+
const sm = (raw ?? {});
|
|
103
|
+
const type = typeof sm.type === "string" ? sm.type : "";
|
|
104
|
+
const title = typeof sm.title === "string" ? sm.title : "";
|
|
105
|
+
const url = typeof sm.url === "string" ? sm.url : "";
|
|
106
|
+
const captured = typeof sm.captured_at === "string" ? sm.captured_at : "";
|
|
107
|
+
const excerpt = typeof sm.excerpt === "string" ? sm.excerpt : "";
|
|
108
|
+
let head = "- ";
|
|
109
|
+
if (type)
|
|
110
|
+
head += `[${type}] `;
|
|
111
|
+
head += title || url || "(未命名出处)";
|
|
112
|
+
const tail = [];
|
|
113
|
+
if (url)
|
|
114
|
+
tail.push(url);
|
|
115
|
+
if (captured)
|
|
116
|
+
tail.push(captured);
|
|
117
|
+
if (tail.length > 0)
|
|
118
|
+
head += ` — ${tail.join(" · ")}`;
|
|
119
|
+
const lines = [head];
|
|
120
|
+
if (excerpt)
|
|
121
|
+
lines.push(` > ${excerpt.trim().replace(/\r?\n/g, " ")}`);
|
|
122
|
+
items.push(lines.join("\n"));
|
|
123
|
+
}
|
|
124
|
+
if (items.length === 0)
|
|
125
|
+
return "";
|
|
126
|
+
return `### 需求出处(source_materials)\n\n${items.join("\n")}`;
|
|
127
|
+
}
|
|
128
|
+
function renderRequirements(yaml) {
|
|
129
|
+
const subs = [
|
|
130
|
+
renderBackgroundAndGoals(yaml.background_and_goals),
|
|
131
|
+
renderUsersAndRoles(yaml.users_and_roles),
|
|
132
|
+
renderInScope(yaml.in_scope),
|
|
133
|
+
renderOutOfScope(yaml.out_of_scope),
|
|
134
|
+
renderEntities(yaml.entities),
|
|
135
|
+
renderMainFlow(yaml.main_flow),
|
|
136
|
+
renderStatePermissions(yaml.state_permissions),
|
|
137
|
+
renderBusinessRules(yaml.business_rules),
|
|
138
|
+
renderScenarios(yaml.scenarios),
|
|
139
|
+
renderEdgeCases(yaml.edge_cases),
|
|
140
|
+
renderUIInteraction(yaml.ui_interaction),
|
|
141
|
+
renderDataAndAPI(yaml.data_and_api),
|
|
142
|
+
]
|
|
143
|
+
.filter((p) => p !== "")
|
|
144
|
+
.map(demote);
|
|
145
|
+
const prov = renderSourceMaterials(yaml?.meta?.source_materials);
|
|
146
|
+
const parts = prov !== "" ? [...subs, prov] : subs;
|
|
147
|
+
const body = parts.length > 0 ? parts.join("\n\n") : "_(prd.yaml 需求段为空)_";
|
|
148
|
+
return `## §1 需求(generated)\n\n${body}`;
|
|
149
|
+
}
|
|
150
|
+
function renderAcceptance(arr) {
|
|
151
|
+
const tiers = {
|
|
152
|
+
must: [],
|
|
153
|
+
should: [],
|
|
154
|
+
could: [],
|
|
155
|
+
};
|
|
156
|
+
if (Array.isArray(arr)) {
|
|
157
|
+
for (const a of arr) {
|
|
158
|
+
if (!isNonEmptyString(a?.id))
|
|
159
|
+
continue;
|
|
160
|
+
const p = a.priority;
|
|
161
|
+
const tier = p === "should" || p === "could" ? p : "must";
|
|
162
|
+
const lines = [`#### ${a.id}`];
|
|
163
|
+
if (isNonEmptyString(a.criterion))
|
|
164
|
+
lines.push(a.criterion);
|
|
165
|
+
if (isNonEmptyString(a.verification_method))
|
|
166
|
+
lines.push(`**验证方式:** ${a.verification_method}`);
|
|
167
|
+
tiers[tier].push(lines.join("\n"));
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
const blocks = ["## §2 验收标准(按 priority 分层)"];
|
|
171
|
+
for (const t of ["must", "should", "could"]) {
|
|
172
|
+
if (tiers[t].length === 0)
|
|
173
|
+
continue;
|
|
174
|
+
blocks.push(`### ${t}\n\n${tiers[t].join("\n\n")}`);
|
|
175
|
+
}
|
|
176
|
+
return blocks.join("\n\n");
|
|
177
|
+
}
|
|
178
|
+
const PLACEHOLDERS = `## §A 方案评估(占位)
|
|
179
|
+
|
|
180
|
+
<!-- 候选方案 + 取舍 + 推荐。由实施者续写 -->
|
|
181
|
+
|
|
182
|
+
## §B 架构设计(占位)
|
|
183
|
+
|
|
184
|
+
<!-- 组件边界 / 数据流 / 与现有代码的接缝(file:line)。由实施者续写 -->
|
|
185
|
+
|
|
186
|
+
## §C 测试与验证清单(占位)
|
|
187
|
+
|
|
188
|
+
<!-- 测试增量预估 + 验收 grep/命令。由实施者续写 -->
|
|
189
|
+
|
|
190
|
+
## §D 实施模式(占位)
|
|
191
|
+
|
|
192
|
+
<!-- 任务拆分 / subagent-driven 与否 / commit 粒度。由实施者续写 -->`;
|
|
193
|
+
export function renderSpecSkeleton(yaml, meta) {
|
|
194
|
+
if (!yaml || typeof yaml !== "object") {
|
|
195
|
+
throw new Error("yaml 必须是对象");
|
|
196
|
+
}
|
|
197
|
+
const parts = [renderFrontmatter(meta), renderH1(yaml, meta)];
|
|
198
|
+
const s0 = renderDecisionRecord(yaml.open_questions);
|
|
199
|
+
if (s0 !== "")
|
|
200
|
+
parts.push(s0);
|
|
201
|
+
parts.push(renderRequirements(yaml));
|
|
202
|
+
parts.push(renderAcceptance(yaml.acceptance_criteria));
|
|
203
|
+
parts.push(PLACEHOLDERS);
|
|
204
|
+
return parts.join("\n\n").trimEnd() + "\n";
|
|
205
|
+
}
|
|
206
|
+
//# sourceMappingURL=spec-md.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,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,KAAK,EAAE;QAAE,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAC9B,KAAK,CAAC,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC,CAAC;IACrC,KAAK,CAAC,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAC,CAAC;IACvD,KAAK,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;IACzB,OAAO,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,OAAO,EAAE,GAAG,IAAI,CAAC;AAC7C,CAAC"}
|
package/dist/schema/modules.d.ts
CHANGED
|
@@ -38,16 +38,22 @@ export declare const metaSchema: z.ZodObject<{
|
|
|
38
38
|
}>, "many">;
|
|
39
39
|
lifecycle: z.ZodObject<{
|
|
40
40
|
version: z.ZodString;
|
|
41
|
-
status: z.
|
|
41
|
+
status: z.ZodEnum<["draft", "in_review", "frozen", "shipped"]>;
|
|
42
42
|
updated_at: z.ZodString;
|
|
43
|
+
shipped_at: z.ZodOptional<z.ZodString>;
|
|
44
|
+
landed_commit: z.ZodOptional<z.ZodString>;
|
|
43
45
|
}, "strict", z.ZodTypeAny, {
|
|
44
|
-
status:
|
|
46
|
+
status: "draft" | "in_review" | "frozen" | "shipped";
|
|
45
47
|
version: string;
|
|
46
48
|
updated_at: string;
|
|
49
|
+
shipped_at?: string | undefined;
|
|
50
|
+
landed_commit?: string | undefined;
|
|
47
51
|
}, {
|
|
48
|
-
status:
|
|
52
|
+
status: "draft" | "in_review" | "frozen" | "shipped";
|
|
49
53
|
version: string;
|
|
50
54
|
updated_at: string;
|
|
55
|
+
shipped_at?: string | undefined;
|
|
56
|
+
landed_commit?: string | undefined;
|
|
51
57
|
}>;
|
|
52
58
|
}, "strict", z.ZodTypeAny, {
|
|
53
59
|
title: string;
|
|
@@ -65,9 +71,11 @@ export declare const metaSchema: z.ZodObject<{
|
|
|
65
71
|
captured_at: string;
|
|
66
72
|
}[];
|
|
67
73
|
lifecycle: {
|
|
68
|
-
status:
|
|
74
|
+
status: "draft" | "in_review" | "frozen" | "shipped";
|
|
69
75
|
version: string;
|
|
70
76
|
updated_at: string;
|
|
77
|
+
shipped_at?: string | undefined;
|
|
78
|
+
landed_commit?: string | undefined;
|
|
71
79
|
};
|
|
72
80
|
team?: string | undefined;
|
|
73
81
|
}, {
|
|
@@ -86,9 +94,11 @@ export declare const metaSchema: z.ZodObject<{
|
|
|
86
94
|
captured_at: string;
|
|
87
95
|
}[];
|
|
88
96
|
lifecycle: {
|
|
89
|
-
status:
|
|
97
|
+
status: "draft" | "in_review" | "frozen" | "shipped";
|
|
90
98
|
version: string;
|
|
91
99
|
updated_at: string;
|
|
100
|
+
shipped_at?: string | undefined;
|
|
101
|
+
landed_commit?: string | undefined;
|
|
92
102
|
};
|
|
93
103
|
team?: string | undefined;
|
|
94
104
|
}>;
|
|
@@ -444,6 +454,8 @@ export declare const openQuestionSchema: z.ZodObject<{
|
|
|
444
454
|
deferred_to: z.ZodString;
|
|
445
455
|
owner: z.ZodString;
|
|
446
456
|
due_date: z.ZodOptional<z.ZodString>;
|
|
457
|
+
resolution: z.ZodOptional<z.ZodString>;
|
|
458
|
+
resolved_at: z.ZodOptional<z.ZodString>;
|
|
447
459
|
}, "strict", z.ZodTypeAny, {
|
|
448
460
|
owner: string;
|
|
449
461
|
id: string;
|
|
@@ -451,6 +463,8 @@ export declare const openQuestionSchema: z.ZodObject<{
|
|
|
451
463
|
severity: "blocking" | "non_blocking";
|
|
452
464
|
deferred_to: string;
|
|
453
465
|
due_date?: string | undefined;
|
|
466
|
+
resolution?: string | undefined;
|
|
467
|
+
resolved_at?: string | undefined;
|
|
454
468
|
}, {
|
|
455
469
|
owner: string;
|
|
456
470
|
id: string;
|
|
@@ -458,4 +472,22 @@ export declare const openQuestionSchema: z.ZodObject<{
|
|
|
458
472
|
severity: "blocking" | "non_blocking";
|
|
459
473
|
deferred_to: string;
|
|
460
474
|
due_date?: string | undefined;
|
|
475
|
+
resolution?: string | undefined;
|
|
476
|
+
resolved_at?: string | undefined;
|
|
477
|
+
}>;
|
|
478
|
+
export declare const asBuiltDeviationSchema: z.ZodObject<{
|
|
479
|
+
id: z.ZodString;
|
|
480
|
+
deviates_from: z.ZodString;
|
|
481
|
+
actual: z.ZodString;
|
|
482
|
+
evidence: z.ZodString;
|
|
483
|
+
}, "strict", z.ZodTypeAny, {
|
|
484
|
+
id: string;
|
|
485
|
+
deviates_from: string;
|
|
486
|
+
actual: string;
|
|
487
|
+
evidence: string;
|
|
488
|
+
}, {
|
|
489
|
+
id: string;
|
|
490
|
+
deviates_from: string;
|
|
491
|
+
actual: string;
|
|
492
|
+
evidence: string;
|
|
461
493
|
}>;
|
package/dist/schema/modules.js
CHANGED
|
@@ -22,8 +22,10 @@ const sourceMaterialSchema = z
|
|
|
22
22
|
const lifecycleSchema = z
|
|
23
23
|
.object({
|
|
24
24
|
version: z.string(),
|
|
25
|
-
status: z.
|
|
25
|
+
status: z.enum(["draft", "in_review", "frozen", "shipped"]),
|
|
26
26
|
updated_at: z.string(),
|
|
27
|
+
shipped_at: z.string().optional(), // v0.3 起 closeout 写入
|
|
28
|
+
landed_commit: z.string().optional(), // v0.3 起 closeout 写入
|
|
27
29
|
})
|
|
28
30
|
.strict();
|
|
29
31
|
export const metaSchema = z
|
|
@@ -179,6 +181,17 @@ export const openQuestionSchema = z
|
|
|
179
181
|
deferred_to: z.string(),
|
|
180
182
|
owner: z.string(),
|
|
181
183
|
due_date: z.string().optional(),
|
|
184
|
+
resolution: z.string().optional(), // v0.3 起 closeout 决议回填;resolution 非空 = 已决
|
|
185
|
+
resolved_at: z.string().optional(), // v0.3 起 closeout 决议回填
|
|
186
|
+
})
|
|
187
|
+
.strict();
|
|
188
|
+
// v0.3 起,closeout 竣工偏差记录(AB-* 条目;deviates_from 引用既有条款 ID)
|
|
189
|
+
export const asBuiltDeviationSchema = z
|
|
190
|
+
.object({
|
|
191
|
+
id: z.string().regex(idPattern),
|
|
192
|
+
deviates_from: z.string(),
|
|
193
|
+
actual: z.string(),
|
|
194
|
+
evidence: z.string(),
|
|
182
195
|
})
|
|
183
196
|
.strict();
|
|
184
197
|
//# sourceMappingURL=modules.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"modules.js","sourceRoot":"","sources":["../../src/schema/modules.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,4BAA4B;AAC5B,MAAM,SAAS,GAAG,cAAc,CAAC;AAEjC;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,wBAAwB,CAAC;AAEpD,MAAM,oBAAoB,GAAG,CAAC;KAC3B,MAAM,CAAC;IACN,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;IACjB,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE;IACf,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;IACnB,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE;CACxB,CAAC;KACD,MAAM,EAAE,CAAC;AAEZ,MAAM,eAAe,GAAG,CAAC;KACtB,MAAM,CAAC;IACN,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;IACnB,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE;
|
|
1
|
+
{"version":3,"file":"modules.js","sourceRoot":"","sources":["../../src/schema/modules.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,4BAA4B;AAC5B,MAAM,SAAS,GAAG,cAAc,CAAC;AAEjC;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,wBAAwB,CAAC;AAEpD,MAAM,oBAAoB,GAAG,CAAC;KAC3B,MAAM,CAAC;IACN,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;IACjB,GAAG,EAAE,CAAC,CAA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MAAM,EAAE,CAAC,CAAC,MAAM,EAAE;IAClB,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE;CACrB,CAAC;KACD,MAAM,EAAE,CAAC"}
|
package/dist/schema/prd.d.ts
CHANGED
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
/**
|
|
3
|
-
* 当前 schema 版本(
|
|
4
|
-
* 仍接受 v0.1
|
|
3
|
+
* 当前 schema 版本(v0.3 起支持 lifecycle shipped 枚举 + open_questions resolution + as_built 模块)。
|
|
4
|
+
* 仍接受 v0.1 / v0.2 以支持存量 yaml 向后兼容(spec §3.2 backward compat)。
|
|
5
|
+
* v0.2 起强制 meta.team / project / feature 三 slug;v0.1 豁免。
|
|
5
6
|
*/
|
|
6
|
-
export declare const SCHEMA_VERSION_CURRENT: "v0.
|
|
7
|
+
export declare const SCHEMA_VERSION_CURRENT: "v0.3";
|
|
8
|
+
export declare const SCHEMA_VERSION_V02: "v0.2";
|
|
7
9
|
export declare const SCHEMA_VERSION_LEGACY: "v0.1";
|
|
10
|
+
/** validate / runner 共用的版本白名单单一真相源(v1.21 I1:根治字面 drift)。 */
|
|
11
|
+
export declare const SCHEMA_VERSIONS_ACCEPTED: readonly ["v0.1", "v0.2", "v0.3"];
|
|
8
12
|
export declare const PrdSchema: z.ZodEffects<z.ZodObject<{
|
|
9
|
-
schema_version: z.ZodEnum<["v0.1", "v0.2"]>;
|
|
13
|
+
schema_version: z.ZodEnum<["v0.1", "v0.2", "v0.3"]>;
|
|
10
14
|
meta: z.ZodObject<{
|
|
11
15
|
team: z.ZodOptional<z.ZodString>;
|
|
12
16
|
project: z.ZodString;
|
|
@@ -37,16 +41,22 @@ export declare const PrdSchema: z.ZodEffects<z.ZodObject<{
|
|
|
37
41
|
}>, "many">;
|
|
38
42
|
lifecycle: z.ZodObject<{
|
|
39
43
|
version: z.ZodString;
|
|
40
|
-
status: z.
|
|
44
|
+
status: z.ZodEnum<["draft", "in_review", "frozen", "shipped"]>;
|
|
41
45
|
updated_at: z.ZodString;
|
|
46
|
+
shipped_at: z.ZodOptional<z.ZodString>;
|
|
47
|
+
landed_commit: z.ZodOptional<z.ZodString>;
|
|
42
48
|
}, "strict", z.ZodTypeAny, {
|
|
43
|
-
status:
|
|
49
|
+
status: "draft" | "in_review" | "frozen" | "shipped";
|
|
44
50
|
version: string;
|
|
45
51
|
updated_at: string;
|
|
52
|
+
shipped_at?: string | undefined;
|
|
53
|
+
landed_commit?: string | undefined;
|
|
46
54
|
}, {
|
|
47
|
-
status:
|
|
55
|
+
status: "draft" | "in_review" | "frozen" | "shipped";
|
|
48
56
|
version: string;
|
|
49
57
|
updated_at: string;
|
|
58
|
+
shipped_at?: string | undefined;
|
|
59
|
+
landed_commit?: string | undefined;
|
|
50
60
|
}>;
|
|
51
61
|
}, "strict", z.ZodTypeAny, {
|
|
52
62
|
title: string;
|
|
@@ -64,9 +74,11 @@ export declare const PrdSchema: z.ZodEffects<z.ZodObject<{
|
|
|
64
74
|
captured_at: string;
|
|
65
75
|
}[];
|
|
66
76
|
lifecycle: {
|
|
67
|
-
status:
|
|
77
|
+
status: "draft" | "in_review" | "frozen" | "shipped";
|
|
68
78
|
version: string;
|
|
69
79
|
updated_at: string;
|
|
80
|
+
shipped_at?: string | undefined;
|
|
81
|
+
landed_commit?: string | undefined;
|
|
70
82
|
};
|
|
71
83
|
team?: string | undefined;
|
|
72
84
|
}, {
|
|
@@ -85,9 +97,11 @@ export declare const PrdSchema: z.ZodEffects<z.ZodObject<{
|
|
|
85
97
|
captured_at: string;
|
|
86
98
|
}[];
|
|
87
99
|
lifecycle: {
|
|
88
|
-
status:
|
|
100
|
+
status: "draft" | "in_review" | "frozen" | "shipped";
|
|
89
101
|
version: string;
|
|
90
102
|
updated_at: string;
|
|
103
|
+
shipped_at?: string | undefined;
|
|
104
|
+
landed_commit?: string | undefined;
|
|
91
105
|
};
|
|
92
106
|
team?: string | undefined;
|
|
93
107
|
}>;
|
|
@@ -443,6 +457,8 @@ export declare const PrdSchema: z.ZodEffects<z.ZodObject<{
|
|
|
443
457
|
deferred_to: z.ZodString;
|
|
444
458
|
owner: z.ZodString;
|
|
445
459
|
due_date: z.ZodOptional<z.ZodString>;
|
|
460
|
+
resolution: z.ZodOptional<z.ZodString>;
|
|
461
|
+
resolved_at: z.ZodOptional<z.ZodString>;
|
|
446
462
|
}, "strict", z.ZodTypeAny, {
|
|
447
463
|
owner: string;
|
|
448
464
|
id: string;
|
|
@@ -450,6 +466,8 @@ export declare const PrdSchema: z.ZodEffects<z.ZodObject<{
|
|
|
450
466
|
severity: "blocking" | "non_blocking";
|
|
451
467
|
deferred_to: string;
|
|
452
468
|
due_date?: string | undefined;
|
|
469
|
+
resolution?: string | undefined;
|
|
470
|
+
resolved_at?: string | undefined;
|
|
453
471
|
}, {
|
|
454
472
|
owner: string;
|
|
455
473
|
id: string;
|
|
@@ -457,7 +475,25 @@ export declare const PrdSchema: z.ZodEffects<z.ZodObject<{
|
|
|
457
475
|
severity: "blocking" | "non_blocking";
|
|
458
476
|
deferred_to: string;
|
|
459
477
|
due_date?: string | undefined;
|
|
478
|
+
resolution?: string | undefined;
|
|
479
|
+
resolved_at?: string | undefined;
|
|
460
480
|
}>, "many">;
|
|
481
|
+
as_built: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
482
|
+
id: z.ZodString;
|
|
483
|
+
deviates_from: z.ZodString;
|
|
484
|
+
actual: z.ZodString;
|
|
485
|
+
evidence: z.ZodString;
|
|
486
|
+
}, "strict", z.ZodTypeAny, {
|
|
487
|
+
id: string;
|
|
488
|
+
deviates_from: string;
|
|
489
|
+
actual: string;
|
|
490
|
+
evidence: string;
|
|
491
|
+
}, {
|
|
492
|
+
id: string;
|
|
493
|
+
deviates_from: string;
|
|
494
|
+
actual: string;
|
|
495
|
+
evidence: string;
|
|
496
|
+
}>, "many">>;
|
|
461
497
|
}, "strict", z.ZodTypeAny, {
|
|
462
498
|
meta: {
|
|
463
499
|
title: string;
|
|
@@ -475,9 +511,11 @@ export declare const PrdSchema: z.ZodEffects<z.ZodObject<{
|
|
|
475
511
|
captured_at: string;
|
|
476
512
|
}[];
|
|
477
513
|
lifecycle: {
|
|
478
|
-
status:
|
|
514
|
+
status: "draft" | "in_review" | "frozen" | "shipped";
|
|
479
515
|
version: string;
|
|
480
516
|
updated_at: string;
|
|
517
|
+
shipped_at?: string | undefined;
|
|
518
|
+
landed_commit?: string | undefined;
|
|
481
519
|
};
|
|
482
520
|
team?: string | undefined;
|
|
483
521
|
};
|
|
@@ -595,8 +633,16 @@ export declare const PrdSchema: z.ZodEffects<z.ZodObject<{
|
|
|
595
633
|
severity: "blocking" | "non_blocking";
|
|
596
634
|
deferred_to: string;
|
|
597
635
|
due_date?: string | undefined;
|
|
636
|
+
resolution?: string | undefined;
|
|
637
|
+
resolved_at?: string | undefined;
|
|
598
638
|
}[];
|
|
599
|
-
schema_version: "v0.2" | "v0.1";
|
|
639
|
+
schema_version: "v0.3" | "v0.2" | "v0.1";
|
|
640
|
+
as_built?: {
|
|
641
|
+
id: string;
|
|
642
|
+
deviates_from: string;
|
|
643
|
+
actual: string;
|
|
644
|
+
evidence: string;
|
|
645
|
+
}[] | undefined;
|
|
600
646
|
}, {
|
|
601
647
|
meta: {
|
|
602
648
|
title: string;
|
|
@@ -614,9 +660,11 @@ export declare const PrdSchema: z.ZodEffects<z.ZodObject<{
|
|
|
614
660
|
captured_at: string;
|
|
615
661
|
}[];
|
|
616
662
|
lifecycle: {
|
|
617
|
-
status:
|
|
663
|
+
status: "draft" | "in_review" | "frozen" | "shipped";
|
|
618
664
|
version: string;
|
|
619
665
|
updated_at: string;
|
|
666
|
+
shipped_at?: string | undefined;
|
|
667
|
+
landed_commit?: string | undefined;
|
|
620
668
|
};
|
|
621
669
|
team?: string | undefined;
|
|
622
670
|
};
|
|
@@ -734,8 +782,16 @@ export declare const PrdSchema: z.ZodEffects<z.ZodObject<{
|
|
|
734
782
|
severity: "blocking" | "non_blocking";
|
|
735
783
|
deferred_to: string;
|
|
736
784
|
due_date?: string | undefined;
|
|
785
|
+
resolution?: string | undefined;
|
|
786
|
+
resolved_at?: string | undefined;
|
|
737
787
|
}[];
|
|
738
|
-
schema_version: "v0.2" | "v0.1";
|
|
788
|
+
schema_version: "v0.3" | "v0.2" | "v0.1";
|
|
789
|
+
as_built?: {
|
|
790
|
+
id: string;
|
|
791
|
+
deviates_from: string;
|
|
792
|
+
actual: string;
|
|
793
|
+
evidence: string;
|
|
794
|
+
}[] | undefined;
|
|
739
795
|
}>, {
|
|
740
796
|
meta: {
|
|
741
797
|
title: string;
|
|
@@ -753,9 +809,11 @@ export declare const PrdSchema: z.ZodEffects<z.ZodObject<{
|
|
|
753
809
|
captured_at: string;
|
|
754
810
|
}[];
|
|
755
811
|
lifecycle: {
|
|
756
|
-
status:
|
|
812
|
+
status: "draft" | "in_review" | "frozen" | "shipped";
|
|
757
813
|
version: string;
|
|
758
814
|
updated_at: string;
|
|
815
|
+
shipped_at?: string | undefined;
|
|
816
|
+
landed_commit?: string | undefined;
|
|
759
817
|
};
|
|
760
818
|
team?: string | undefined;
|
|
761
819
|
};
|
|
@@ -873,8 +931,16 @@ export declare const PrdSchema: z.ZodEffects<z.ZodObject<{
|
|
|
873
931
|
severity: "blocking" | "non_blocking";
|
|
874
932
|
deferred_to: string;
|
|
875
933
|
due_date?: string | undefined;
|
|
934
|
+
resolution?: string | undefined;
|
|
935
|
+
resolved_at?: string | undefined;
|
|
876
936
|
}[];
|
|
877
|
-
schema_version: "v0.2" | "v0.1";
|
|
937
|
+
schema_version: "v0.3" | "v0.2" | "v0.1";
|
|
938
|
+
as_built?: {
|
|
939
|
+
id: string;
|
|
940
|
+
deviates_from: string;
|
|
941
|
+
actual: string;
|
|
942
|
+
evidence: string;
|
|
943
|
+
}[] | undefined;
|
|
878
944
|
}, {
|
|
879
945
|
meta: {
|
|
880
946
|
title: string;
|
|
@@ -892,9 +958,11 @@ export declare const PrdSchema: z.ZodEffects<z.ZodObject<{
|
|
|
892
958
|
captured_at: string;
|
|
893
959
|
}[];
|
|
894
960
|
lifecycle: {
|
|
895
|
-
status:
|
|
961
|
+
status: "draft" | "in_review" | "frozen" | "shipped";
|
|
896
962
|
version: string;
|
|
897
963
|
updated_at: string;
|
|
964
|
+
shipped_at?: string | undefined;
|
|
965
|
+
landed_commit?: string | undefined;
|
|
898
966
|
};
|
|
899
967
|
team?: string | undefined;
|
|
900
968
|
};
|
|
@@ -1012,7 +1080,15 @@ export declare const PrdSchema: z.ZodEffects<z.ZodObject<{
|
|
|
1012
1080
|
severity: "blocking" | "non_blocking";
|
|
1013
1081
|
deferred_to: string;
|
|
1014
1082
|
due_date?: string | undefined;
|
|
1083
|
+
resolution?: string | undefined;
|
|
1084
|
+
resolved_at?: string | undefined;
|
|
1015
1085
|
}[];
|
|
1016
|
-
schema_version: "v0.2" | "v0.1";
|
|
1086
|
+
schema_version: "v0.3" | "v0.2" | "v0.1";
|
|
1087
|
+
as_built?: {
|
|
1088
|
+
id: string;
|
|
1089
|
+
deviates_from: string;
|
|
1090
|
+
actual: string;
|
|
1091
|
+
evidence: string;
|
|
1092
|
+
}[] | undefined;
|
|
1017
1093
|
}>;
|
|
1018
1094
|
export type Prd = z.infer<typeof PrdSchema>;
|