@openprd/cli 0.1.9 → 0.1.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (138) hide show
  1. package/.openprd/benchmarks/index.md +16 -0
  2. package/.openprd/benchmarks/sources.yaml +53 -1
  3. package/.openprd/config.yaml +10 -0
  4. package/.openprd/design/README.md +47 -0
  5. package/.openprd/design/README_EN.md +25 -0
  6. package/.openprd/design/active/asset-spec.md +15 -0
  7. package/.openprd/design/active/direction-plan.md +7 -0
  8. package/.openprd/design/active/facts-sheet.md +13 -0
  9. package/.openprd/design/active/image-preflight.md +9 -0
  10. package/.openprd/design/active/selected-direction.md +11 -0
  11. package/.openprd/design/anti-slop.md +16 -0
  12. package/.openprd/design/assets/dark-mesh.svg +14 -0
  13. package/.openprd/design/assets/paper-grid.svg +14 -0
  14. package/.openprd/design/assets/surface-presets.md +21 -0
  15. package/.openprd/design/assets/workbench-grid.svg +16 -0
  16. package/.openprd/design/checklists/ui-quality-gate.md +22 -0
  17. package/.openprd/design/components/component-catalog.md +42 -0
  18. package/.openprd/design/layouts/layout-catalog.json +45 -0
  19. package/.openprd/design/lenses/frontend-lenses.md +31 -0
  20. package/.openprd/design/recipes/content-experience.md +26 -0
  21. package/.openprd/design/recipes/operational-tool.md +25 -0
  22. package/.openprd/design/recipes/product-launch.md +26 -0
  23. package/.openprd/design/templates/README.md +36 -0
  24. package/.openprd/design/templates/README_EN.md +31 -0
  25. package/.openprd/design/templates/content-home.html +415 -0
  26. package/.openprd/design/templates/ops-dashboard.html +340 -0
  27. package/.openprd/design/templates/product-launch.html +360 -0
  28. package/.openprd/design/themes/theme-catalog.json +77 -0
  29. package/.openprd/engagements/active/prd.md +111 -100
  30. package/.openprd/schema/prd.schema.yaml +25 -0
  31. package/.openprd/templates/base/intake.md +17 -0
  32. package/.openprd/templates/base/prd.md +31 -6
  33. package/AGENTS.md +10 -7
  34. package/README.md +26 -28
  35. package/README_EN.md +3 -3
  36. package/package.json +41 -2
  37. package/scripts/openprd-codex-isolated-worker.mjs +799 -0
  38. package/skills/openprd-benchmark-router/SKILL.md +5 -0
  39. package/skills/openprd-frontend-design/SKILL.md +161 -0
  40. package/skills/openprd-frontend-design/references/design-asset-contract.md +34 -0
  41. package/skills/openprd-frontend-design/references/direction-engine.md +46 -0
  42. package/skills/openprd-harness/SKILL.md +37 -20
  43. package/skills/openprd-learning-review/SKILL.md +2 -1
  44. package/skills/openprd-learning-review/references/style-packs/xianxia-cultivation.prompt.md +1 -1
  45. package/skills/openprd-quality/SKILL.md +5 -3
  46. package/skills/openprd-requirement-intake/SKILL.md +27 -5
  47. package/skills/openprd-requirement-intake/references/prd-template-lenses.md +6 -3
  48. package/skills/openprd-requirement-intake/references/routing-rubric.md +9 -5
  49. package/skills/openprd-requirement-intake/references/startup-validation-lens.md +108 -0
  50. package/skills/openprd-router/SKILL.md +13 -5
  51. package/skills/openprd-shared/SKILL.md +38 -25
  52. package/src/agent-integration.js +120 -69
  53. package/src/brainstorm-artifacts.js +1805 -0
  54. package/src/brainstorm-presentation.js +233 -0
  55. package/src/brainstorm.js +766 -0
  56. package/src/cli/args.js +51 -3
  57. package/src/cli/doctor-print.js +34 -8
  58. package/src/cli/print.js +6 -0
  59. package/src/cli/quality-print.js +79 -3
  60. package/src/cli/run-print.js +43 -1
  61. package/src/cli/shared-print.js +33 -2
  62. package/src/cli/workflow-print.js +21 -0
  63. package/src/codex-hook-runner-template.mjs +838 -58
  64. package/src/design-starter-support.js +462 -0
  65. package/src/design-starter.js +1207 -0
  66. package/src/diagram-core.js +384 -151
  67. package/src/html-artifacts.js +403 -50
  68. package/src/knowledge.js +291 -32
  69. package/src/learning-review.js +3 -3
  70. package/src/loop.js +839 -101
  71. package/src/openprd.js +86 -1
  72. package/src/openspec/change-validate.js +1 -0
  73. package/src/prd-core.js +119 -2
  74. package/src/quality-html-artifact.js +30 -5
  75. package/src/quality-learning.js +50 -6
  76. package/src/quality.js +22 -12
  77. package/src/run-harness.js +191 -29
  78. package/src/self-update.js +301 -4
  79. package/src/standards.js +46 -5
  80. package/src/visual-prepare.js +940 -0
  81. package/src/workspace-core.js +175 -0
  82. package/src/workspace-workflow.js +307 -7
  83. package/.openprd/benchmarks/evidence/milvus-io-ai-code-review-gets-better-when-models-debate-claude-vs-gemini-vs-code.md +0 -14
  84. package/.openprd/benchmarks/evidence/nolanlawson-com-using-ai-to-write-better-code-more-slowly.md +0 -14
  85. package/.openprd/discovery/config.json +0 -35
  86. package/.openprd/engagements/active/flows.md +0 -35
  87. package/.openprd/engagements/active/handoff.md +0 -16
  88. package/.openprd/engagements/active/review.html +0 -61
  89. package/.openprd/engagements/active/roles.md +0 -22
  90. package/.openprd/engagements/work-units/wu-20260524015648-6d33ded7.json +0 -23
  91. package/.openprd/engagements/work-units/wu-20260602113956-a99b5b88.json +0 -18
  92. package/.openprd/engagements/work-units/wu-20260602122244-78656aaf.json +0 -18
  93. package/.openprd/engagements/work-units/wu-20260602122442-e96489e2.json +0 -18
  94. package/.openprd/engagements/work-units/wu-20260602132835-695429e8.json +0 -18
  95. package/.openprd/exports/.gitkeep +0 -0
  96. package/.openprd/knowledge/candidates/candidate-turn-1780116203372-5f266a79e968c758/candidate.json +0 -78
  97. package/.openprd/knowledge/candidates/candidate-turn-1780116203372-5f266a79e968c758/diagnostic-report.json +0 -129
  98. package/.openprd/knowledge/candidates/candidate-turn-1780116203372-5f266a79e968c758/root-cause-candidates.json +0 -41
  99. package/.openprd/knowledge/candidates/candidate-turn-1780116203372-5f266a79e968c758/timeline.json +0 -14
  100. package/.openprd/knowledge/drafts/openprd-experience-diagnostic-candidate-turn-1780116203372-5f266a79e968c758/SKILL.md +0 -49
  101. package/.openprd/knowledge/index.json +0 -47
  102. package/.openprd/reviews/v0001.html +0 -1322
  103. package/.openprd/reviews/v0002.html +0 -1150
  104. package/.openprd/reviews/v0003.html +0 -1150
  105. package/.openprd/reviews/v0004.html +0 -1150
  106. package/.openprd/reviews/v0005.html +0 -1150
  107. package/.openprd/sessions/.gitkeep +0 -0
  108. package/.openprd/state/changes.json +0 -27
  109. package/.openprd/state/current.json +0 -505
  110. package/.openprd/state/release-ledger.json +0 -387
  111. package/.openprd/state/version-index.json +0 -67
  112. package/.openprd/state/versions/.gitkeep +0 -0
  113. package/.openprd/state/versions/v0001.json +0 -121
  114. package/.openprd/state/versions/v0001.md +0 -161
  115. package/.openprd/state/versions/v0002.json +0 -264
  116. package/.openprd/state/versions/v0002.md +0 -183
  117. package/.openprd/state/versions/v0003.json +0 -269
  118. package/.openprd/state/versions/v0003.md +0 -188
  119. package/.openprd/state/versions/v0004.json +0 -274
  120. package/.openprd/state/versions/v0004.md +0 -193
  121. package/.openprd/state/versions/v0005.json +0 -299
  122. package/.openprd/state/versions/v0005.md +0 -189
  123. package/docs/assets/openprd-capability-overview-en.png +0 -0
  124. package/docs/assets/openprd-capability-overview-zh.png +0 -0
  125. package/docs/assets/openprd-learning-html.png +0 -0
  126. package/docs/assets/openprd-quality-html.png +0 -0
  127. package/docs/assets/openprd-requirement-routing-en.png +0 -0
  128. package/docs/assets/openprd-requirement-routing-en.svg +0 -102
  129. package/docs/assets/openprd-requirement-routing-zh-refined.png +0 -0
  130. package/docs/assets/openprd-requirement-routing-zh.png +0 -0
  131. package/docs/assets/openprd-requirement-routing-zh.svg +0 -102
  132. package/docs/assets/openprd-review-html.png +0 -0
  133. package/docs/assets/openprd-scenario-overview.png +0 -0
  134. package/docs/assets/openprd-scenario-overview.svg +0 -114
  135. package/docs/assets/openprd-self-evolving-mechanisms-en.png +0 -0
  136. package/docs/assets/openprd-self-evolving-mechanisms-zh.png +0 -0
  137. package/docs/assets/openprd-visual-compare-case-study-en.png +0 -0
  138. package/docs/assets/openprd-visual-compare-case-study-zh.png +0 -0
@@ -20,6 +20,28 @@ const CORE_TEMPLATE_FILES = [
20
20
  'README.md',
21
21
  'README_EN.md',
22
22
  'config.yaml',
23
+ 'design/README.md',
24
+ 'design/README_EN.md',
25
+ 'design/anti-slop.md',
26
+ 'design/lenses/frontend-lenses.md',
27
+ 'design/themes/theme-catalog.json',
28
+ 'design/layouts/layout-catalog.json',
29
+ 'design/components/component-catalog.md',
30
+ 'design/recipes/product-launch.md',
31
+ 'design/recipes/content-experience.md',
32
+ 'design/recipes/operational-tool.md',
33
+ 'design/checklists/ui-quality-gate.md',
34
+ 'design/assets/surface-presets.md',
35
+ 'design/templates/README.md',
36
+ 'design/templates/README_EN.md',
37
+ 'design/templates/content-home.html',
38
+ 'design/templates/product-launch.html',
39
+ 'design/templates/ops-dashboard.html',
40
+ 'design/active/facts-sheet.md',
41
+ 'design/active/asset-spec.md',
42
+ 'design/active/image-preflight.md',
43
+ 'design/active/direction-plan.md',
44
+ 'design/active/selected-direction.md',
23
45
  'schema/prd.schema.yaml',
24
46
  'schema/diagram-architecture.schema.yaml',
25
47
  'schema/diagram-product-flow.schema.yaml',
@@ -60,6 +82,28 @@ const CORE_TEMPLATE_FILES = [
60
82
  const WORKSPACE_SEED_REFRESH_FILES = [
61
83
  'README.md',
62
84
  'README_EN.md',
85
+ 'design/README.md',
86
+ 'design/README_EN.md',
87
+ 'design/anti-slop.md',
88
+ 'design/lenses/frontend-lenses.md',
89
+ 'design/themes/theme-catalog.json',
90
+ 'design/layouts/layout-catalog.json',
91
+ 'design/components/component-catalog.md',
92
+ 'design/recipes/product-launch.md',
93
+ 'design/recipes/content-experience.md',
94
+ 'design/recipes/operational-tool.md',
95
+ 'design/checklists/ui-quality-gate.md',
96
+ 'design/assets/surface-presets.md',
97
+ 'design/templates/README.md',
98
+ 'design/templates/README_EN.md',
99
+ 'design/templates/content-home.html',
100
+ 'design/templates/product-launch.html',
101
+ 'design/templates/ops-dashboard.html',
102
+ 'design/active/facts-sheet.md',
103
+ 'design/active/asset-spec.md',
104
+ 'design/active/image-preflight.md',
105
+ 'design/active/direction-plan.md',
106
+ 'design/active/selected-direction.md',
63
107
  'schema/prd.schema.yaml',
64
108
  'schema/diagram-architecture.schema.yaml',
65
109
  'schema/diagram-product-flow.schema.yaml',
@@ -87,6 +131,9 @@ const WORKSPACE_SEED_REFRESH_FILES = [
87
131
  ];
88
132
  const WORKSPACE_SEED_COPY_IGNORE = new Set([
89
133
  'artifacts',
134
+ 'benchmarks/.DS_Store',
135
+ 'benchmarks/evidence',
136
+ 'benchmarks/inbox',
90
137
  'discovery',
91
138
  'growth',
92
139
  'harness',
@@ -99,6 +146,8 @@ const WORKSPACE_SEED_COPY_IGNORE = new Set([
99
146
  'engagements/active/architecture-diagram.html',
100
147
  'engagements/active/architecture-diagram.json',
101
148
  'engagements/active/architecture-diagram.mmd',
149
+ 'engagements/active/brainstorm.html',
150
+ 'engagements/active/brainstorm.json',
102
151
  'engagements/active/decision-log.md',
103
152
  'engagements/active/product-flow-diagram.html',
104
153
  'engagements/active/product-flow-diagram.json',
@@ -326,6 +375,7 @@ function buildWorkflowTaskGraph(snapshot = null, analysis = null, options = {})
326
375
  const isSynthesized = Boolean(snapshot?.digest || prdVersion > 0);
327
376
  const isFrozen = snapshot?.status === 'frozen';
328
377
  const isHandedOff = snapshot?.status === 'handed_off';
378
+ const brainstormDone = Boolean(snapshot?.brainstormMeta?.generatedAt || snapshot?.brainstormMeta?.artifactId);
329
379
  const isInterviewComplete = Boolean(
330
380
  snapshot?.sections?.problem?.problemStatement
331
381
  && snapshot?.sections?.users?.primaryUsers?.length
@@ -347,6 +397,13 @@ function buildWorkflowTaskGraph(snapshot = null, analysis = null, options = {})
347
397
  const clarifyGateActive = Boolean(clarificationState?.shouldAskUser);
348
398
 
349
399
  const workflow = [
400
+ {
401
+ id: 'brainstorm',
402
+ label: 'brainstorm',
403
+ kind: 'workflow-step',
404
+ status: brainstormDone ? 'done' : 'ready',
405
+ dependsOn: [],
406
+ },
350
407
  {
351
408
  id: 'clarify',
352
409
  label: 'clarify',
@@ -435,6 +492,13 @@ function buildWorkflowTaskGraph(snapshot = null, analysis = null, options = {})
435
492
  status: 'ready',
436
493
  dependsOn: [],
437
494
  },
495
+ {
496
+ id: 'brainstorm-file',
497
+ label: 'brainstorm.html',
498
+ kind: 'artifact',
499
+ status: brainstormDone ? 'done' : 'ready',
500
+ dependsOn: ['brainstorm'],
501
+ },
438
502
  {
439
503
  id: 'open-questions',
440
504
  label: 'open-questions.md',
@@ -560,6 +624,7 @@ function buildWorkflowTaskGraph(snapshot = null, analysis = null, options = {})
560
624
  })),
561
625
  ],
562
626
  edges: [
627
+ { from: 'brainstorm', to: 'brainstorm-file', relation: 'produces' },
563
628
  { from: 'clarify', to: 'classify', relation: 'unblocks' },
564
629
  { from: 'classify', to: 'interview', relation: 'enables' },
565
630
  { from: 'interview', to: 'synthesize', relation: 'enables' },
@@ -667,6 +732,15 @@ async function ensureWorkspaceSkeleton(projectRoot, options = {}) {
667
732
  await fs.mkdir(cjoin(workspaceRoot, 'artifacts', 'archive'), { recursive: true });
668
733
  await fs.mkdir(cjoin(workspaceRoot, 'learning', 'archive'), { recursive: true });
669
734
  await fs.mkdir(cjoin(workspaceRoot, 'quality', 'reports'), { recursive: true });
735
+ await fs.mkdir(cjoin(workspaceRoot, 'design', 'lenses'), { recursive: true });
736
+ await fs.mkdir(cjoin(workspaceRoot, 'design', 'themes'), { recursive: true });
737
+ await fs.mkdir(cjoin(workspaceRoot, 'design', 'layouts'), { recursive: true });
738
+ await fs.mkdir(cjoin(workspaceRoot, 'design', 'components'), { recursive: true });
739
+ await fs.mkdir(cjoin(workspaceRoot, 'design', 'recipes'), { recursive: true });
740
+ await fs.mkdir(cjoin(workspaceRoot, 'design', 'checklists'), { recursive: true });
741
+ await fs.mkdir(cjoin(workspaceRoot, 'design', 'assets'), { recursive: true });
742
+ await fs.mkdir(cjoin(workspaceRoot, 'design', 'templates'), { recursive: true });
743
+ await fs.mkdir(cjoin(workspaceRoot, 'design', 'active'), { recursive: true });
670
744
  await fs.mkdir(cjoin(workspaceRoot, 'growth'), { recursive: true });
671
745
  await fs.mkdir(cjoin(workspaceRoot, 'knowledge', 'incidents'), { recursive: true });
672
746
  await fs.mkdir(cjoin(workspaceRoot, 'knowledge', 'patterns'), { recursive: true });
@@ -735,6 +809,17 @@ async function migrateWorkspaceConfig(projectRoot, changes) {
735
809
  ...(seed.quality ?? {}),
736
810
  ...(current.quality ?? {}),
737
811
  },
812
+ design: {
813
+ ...(seed.design ?? {}),
814
+ ...(current.design ?? {}),
815
+ enabled: current.design?.enabled ?? seed.design?.enabled ?? true,
816
+ frameworkRoot: current.design?.frameworkRoot ?? seed.design?.frameworkRoot ?? '.openprd/design',
817
+ templateRoot: current.design?.templateRoot ?? seed.design?.templateRoot ?? '.openprd/design/templates',
818
+ activeArtifacts: {
819
+ ...(seed.design?.activeArtifacts ?? {}),
820
+ ...(current.design?.activeArtifacts ?? {}),
821
+ },
822
+ },
738
823
  supportedProductTypes: seed.supportedProductTypes,
739
824
  templateInheritance: seed.templateInheritance,
740
825
  workflow: seed.workflow,
@@ -918,6 +1003,15 @@ async function migrateWorkspaceSkeleton(projectRoot, options = {}) {
918
1003
  await fs.mkdir(cjoin(workspaceRoot, 'artifacts', 'archive'), { recursive: true });
919
1004
  await fs.mkdir(cjoin(workspaceRoot, 'learning', 'archive'), { recursive: true });
920
1005
  await fs.mkdir(cjoin(workspaceRoot, 'quality', 'reports'), { recursive: true });
1006
+ await fs.mkdir(cjoin(workspaceRoot, 'design', 'lenses'), { recursive: true });
1007
+ await fs.mkdir(cjoin(workspaceRoot, 'design', 'themes'), { recursive: true });
1008
+ await fs.mkdir(cjoin(workspaceRoot, 'design', 'layouts'), { recursive: true });
1009
+ await fs.mkdir(cjoin(workspaceRoot, 'design', 'components'), { recursive: true });
1010
+ await fs.mkdir(cjoin(workspaceRoot, 'design', 'recipes'), { recursive: true });
1011
+ await fs.mkdir(cjoin(workspaceRoot, 'design', 'checklists'), { recursive: true });
1012
+ await fs.mkdir(cjoin(workspaceRoot, 'design', 'assets'), { recursive: true });
1013
+ await fs.mkdir(cjoin(workspaceRoot, 'design', 'templates'), { recursive: true });
1014
+ await fs.mkdir(cjoin(workspaceRoot, 'design', 'active'), { recursive: true });
921
1015
  await fs.mkdir(cjoin(workspaceRoot, 'growth'), { recursive: true });
922
1016
  await fs.mkdir(cjoin(workspaceRoot, 'knowledge', 'incidents'), { recursive: true });
923
1017
  await fs.mkdir(cjoin(workspaceRoot, 'knowledge', 'patterns'), { recursive: true });
@@ -1020,6 +1114,8 @@ async function loadWorkspace(projectRoot, options = {}) {
1020
1114
  activeFlows: cjoin(workspaceRoot, 'engagements', 'active', 'flows.md'),
1021
1115
  activeRoles: cjoin(workspaceRoot, 'engagements', 'active', 'roles.md'),
1022
1116
  activeHandoff: cjoin(workspaceRoot, 'engagements', 'active', 'handoff.md'),
1117
+ activeBrainstormHtml: cjoin(workspaceRoot, 'engagements', 'active', 'brainstorm.html'),
1118
+ activeBrainstormState: cjoin(workspaceRoot, 'engagements', 'active', 'brainstorm.json'),
1023
1119
  activeReviewHtml: cjoin(workspaceRoot, 'engagements', 'active', 'review.html'),
1024
1120
  reviewsDir: cjoin(workspaceRoot, 'reviews'),
1025
1121
  artifactsActiveDir: cjoin(workspaceRoot, 'artifacts', 'active'),
@@ -1033,6 +1129,24 @@ async function loadWorkspace(projectRoot, options = {}) {
1033
1129
  qualityReportsDir: cjoin(workspaceRoot, 'quality', 'reports'),
1034
1130
  qualityReportIndex: cjoin(workspaceRoot, 'quality', 'reports', 'index.json'),
1035
1131
  qualityReportLatest: cjoin(workspaceRoot, 'quality', 'reports', 'latest.json'),
1132
+ designRoot: cjoin(workspaceRoot, 'design'),
1133
+ designReadme: cjoin(workspaceRoot, 'design', 'README.md'),
1134
+ designLenses: cjoin(workspaceRoot, 'design', 'lenses', 'frontend-lenses.md'),
1135
+ designThemes: cjoin(workspaceRoot, 'design', 'themes', 'theme-catalog.json'),
1136
+ designLayouts: cjoin(workspaceRoot, 'design', 'layouts', 'layout-catalog.json'),
1137
+ designComponents: cjoin(workspaceRoot, 'design', 'components', 'component-catalog.md'),
1138
+ designChecklist: cjoin(workspaceRoot, 'design', 'checklists', 'ui-quality-gate.md'),
1139
+ designAntiSlop: cjoin(workspaceRoot, 'design', 'anti-slop.md'),
1140
+ designTemplatesRoot: cjoin(workspaceRoot, 'design', 'templates'),
1141
+ designTemplatesReadme: cjoin(workspaceRoot, 'design', 'templates', 'README.md'),
1142
+ designContentHomeTemplate: cjoin(workspaceRoot, 'design', 'templates', 'content-home.html'),
1143
+ designProductLaunchTemplate: cjoin(workspaceRoot, 'design', 'templates', 'product-launch.html'),
1144
+ designOpsDashboardTemplate: cjoin(workspaceRoot, 'design', 'templates', 'ops-dashboard.html'),
1145
+ designFactsSheet: cjoin(workspaceRoot, 'design', 'active', 'facts-sheet.md'),
1146
+ designAssetSpec: cjoin(workspaceRoot, 'design', 'active', 'asset-spec.md'),
1147
+ designImagePreflight: cjoin(workspaceRoot, 'design', 'active', 'image-preflight.md'),
1148
+ designDirectionPlan: cjoin(workspaceRoot, 'design', 'active', 'direction-plan.md'),
1149
+ designSelectedDirection: cjoin(workspaceRoot, 'design', 'active', 'selected-direction.md'),
1036
1150
  growthDir: cjoin(workspaceRoot, 'growth'),
1037
1151
  growthCandidates: cjoin(workspaceRoot, 'growth', 'candidates.jsonl'),
1038
1152
  growthAccepted: cjoin(workspaceRoot, 'growth', 'accepted.json'),
@@ -1122,6 +1236,28 @@ const USER_CLARIFICATION_PATHS = new Set([
1122
1236
  'problem.problemStatement',
1123
1237
  'problem.whyNow',
1124
1238
  'users.primaryUsers',
1239
+ 'validation.community',
1240
+ 'validation.seedUsers',
1241
+ 'validation.communityFit',
1242
+ 'validation.currentAlternative',
1243
+ 'validation.painEvidence',
1244
+ 'validation.manualPath',
1245
+ 'validation.manualPlaybook',
1246
+ 'validation.commitmentSignals',
1247
+ 'validation.firstValidationStep',
1248
+ 'validation.defaultAlivePlan',
1249
+ 'validation.paymentProof',
1250
+ 'validation.mvpSlice',
1251
+ 'validation.weekendTest',
1252
+ 'validation.smallestExecution',
1253
+ 'validation.productizeGate',
1254
+ 'validation.firstCustomerPath',
1255
+ 'validation.pricingHypothesis',
1256
+ 'validation.customerOneProfitability',
1257
+ 'validation.growthDiscipline',
1258
+ 'validation.reversibility',
1259
+ 'validation.customerTruth',
1260
+ 'validation.valuesFit',
1125
1261
  'goals.goals',
1126
1262
  'goals.successMetrics',
1127
1263
  'scope.inScope',
@@ -1162,6 +1298,28 @@ const FIELD_PATH_TO_STATE_KEY = {
1162
1298
  'users.primaryUsers': 'primaryUsers',
1163
1299
  'users.secondaryUsers': 'secondaryUsers',
1164
1300
  'users.stakeholders': 'stakeholders',
1301
+ 'validation.community': 'community',
1302
+ 'validation.seedUsers': 'seedUsers',
1303
+ 'validation.communityFit': 'communityFit',
1304
+ 'validation.currentAlternative': 'currentAlternative',
1305
+ 'validation.painEvidence': 'painEvidence',
1306
+ 'validation.manualPath': 'manualPath',
1307
+ 'validation.manualPlaybook': 'manualPlaybook',
1308
+ 'validation.commitmentSignals': 'commitmentSignals',
1309
+ 'validation.firstValidationStep': 'firstValidationStep',
1310
+ 'validation.defaultAlivePlan': 'defaultAlivePlan',
1311
+ 'validation.paymentProof': 'paymentProof',
1312
+ 'validation.mvpSlice': 'mvpSlice',
1313
+ 'validation.weekendTest': 'weekendTest',
1314
+ 'validation.smallestExecution': 'smallestExecution',
1315
+ 'validation.productizeGate': 'productizeGate',
1316
+ 'validation.firstCustomerPath': 'firstCustomerPath',
1317
+ 'validation.pricingHypothesis': 'pricingHypothesis',
1318
+ 'validation.customerOneProfitability': 'customerOneProfitability',
1319
+ 'validation.growthDiscipline': 'growthDiscipline',
1320
+ 'validation.reversibility': 'reversibility',
1321
+ 'validation.customerTruth': 'customerTruth',
1322
+ 'validation.valuesFit': 'valuesFit',
1165
1323
  'goals.goals': 'goals',
1166
1324
  'goals.successMetrics': 'successMetrics',
1167
1325
  'goals.acceptanceGoals': 'acceptanceGoals',
@@ -1598,6 +1756,19 @@ function coerceCapturedValue(pathString, rawValue, append = false) {
1598
1756
  'users.primaryUsers',
1599
1757
  'users.secondaryUsers',
1600
1758
  'users.stakeholders',
1759
+ 'validation.community',
1760
+ 'validation.seedUsers',
1761
+ 'validation.communityFit',
1762
+ 'validation.painEvidence',
1763
+ 'validation.manualPath',
1764
+ 'validation.manualPlaybook',
1765
+ 'validation.commitmentSignals',
1766
+ 'validation.defaultAlivePlan',
1767
+ 'validation.paymentProof',
1768
+ 'validation.smallestExecution',
1769
+ 'validation.productizeGate',
1770
+ 'validation.firstCustomerPath',
1771
+ 'validation.growthDiscipline',
1601
1772
  'goals.goals',
1602
1773
  'goals.successMetrics',
1603
1774
  'goals.acceptanceGoals',
@@ -1867,8 +2038,11 @@ function buildClarificationPlan(snapshot, analysis) {
1867
2038
  const mustAsk = analysis.missingFields.filter((field) => USER_CLARIFICATION_PATHS.has(field.path));
1868
2039
  const derived = analysis.missingFields.filter((field) => !USER_CLARIFICATION_PATHS.has(field.path));
1869
2040
  const kickoffQuestions = [
2041
+ { id: 'problem.problemStatement', label: '核心问题', prompt: '我们要解决什么问题?' },
1870
2042
  { id: 'project-overview', label: '项目轮廓', prompt: '这件事主要是给谁用的,他们会在什么场景下最先感受到价值?' },
2043
+ { id: 'current-alternative', label: '当前替代', prompt: '他们现在主要靠什么办法、流程或替代品在解决这个问题?' },
1871
2044
  { id: 'first-slice', label: '首版切片', prompt: '如果先做第一版,最值得先让用户完成什么关键动作?' },
2045
+ { id: 'validation-loop', label: '验证闭环', prompt: '如果先不做完整产品,最容易先找谁验证、先怎么手工交付、什么真实承诺最能证明值得继续?' },
1872
2046
  { id: 'guardrails', label: '保护项', prompt: '这轮明确先不做什么,或者哪些既有体验、流程和业务结果不能被影响?' },
1873
2047
  ];
1874
2048
  return {
@@ -2003,6 +2177,7 @@ export {
2003
2177
  coerceCapturedValue,
2004
2178
  computeWorkspaceDigest,
2005
2179
  CORE_TEMPLATE_FILES,
2180
+ USER_CLARIFICATION_PATHS,
2006
2181
  deriveGateLabels,
2007
2182
  detectWorkspaceScenario,
2008
2183
  ensureWorkspaceSkeleton,