@chenmk/superflow 0.3.0 → 0.5.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/INSTALL.en.md +54 -12
- package/INSTALL.md +59 -33
- package/README.md +192 -49
- package/README.zh-CN.md +166 -46
- package/assets/brand/managed-review-loop.png +0 -0
- package/assets/manifest.json +15 -9
- package/assets/prompts/superflow-design.md +3 -0
- package/assets/prompts/superflow-docs.md +4 -1
- package/assets/scripts/superflow-coding-ready.mjs +135 -0
- package/assets/scripts/superflow-dependency-update-hook.sh +81 -8
- package/assets/scripts/superflow-document-audit.mjs +240 -0
- package/assets/scripts/superflow-environment-preflight.mjs +398 -0
- package/assets/scripts/superflow-hook-guard.sh +40 -1
- package/assets/scripts/superflow-managed-command-guard.py +309 -0
- package/assets/scripts/superflow-managed-executor-preflight.mjs +421 -0
- package/assets/scripts/superflow-managed-owner-verification.sh +117 -0
- package/assets/scripts/superflow-managed-work-check.mjs +455 -0
- package/assets/scripts/superflow-managed-work-guard.sh +17 -0
- package/assets/skills/openspec-propose/SKILL.md +11 -0
- package/assets/skills/superflow-clarify/SKILL.md +14 -0
- package/assets/skills/superflow-design/SKILL.md +46 -12
- package/assets/skills/superflow-docs/SKILL.md +109 -2
- package/assets/skills/superflow-pipeline/SKILL.md +205 -2
- package/assets/skills/superflow-pipeline/references/batch-prompt-template.md +17 -9
- package/assets/skills/superflow-pipeline/references/document-readiness.md +157 -0
- package/assets/skills/superflow-pipeline/references/document-templates.md +17 -5
- package/assets/skills/superflow-pipeline/references/feature-gated-workflow.md +14 -0
- package/assets/skills/superflow-pipeline/references/implementation-prompt-template.md +20 -11
- package/assets/skills/superflow-pipeline/references/managed-work.md +166 -0
- package/assets/skills/superflow-pipeline/references/orchestration.md +2 -2
- package/assets/skills/superflow-pipeline/references/p0-baseline-template.md +3 -2
- package/assets/skills/superflow-pipeline/references/quality-gate.md +8 -5
- package/assets/skills/superflow-pipeline/references/reviewer-checklist.md +7 -0
- package/assets/skills/superflow-pipeline/references/superpower-technical-design-template.md +10 -0
- package/assets/skills/superflow-pipeline/scripts/superflow-archive.sh +1 -1
- package/assets/skills/superflow-pipeline/scripts/superflow-guard.sh +282 -16
- package/assets/skills/superflow-pipeline/scripts/superflow-handoff.sh +7 -4
- package/assets/skills/superflow-requirement-review/SKILL.md +178 -0
- package/assets/skills/superflow-requirement-review/agents/openai.yaml +4 -0
- package/assets/skills-en/openspec-propose/SKILL.md +14 -0
- package/assets/skills-en/superflow-clarify/SKILL.md +17 -0
- package/assets/skills-en/superflow-design/SKILL.md +40 -11
- package/assets/skills-en/superflow-docs/SKILL.md +115 -0
- package/assets/skills-en/superflow-pipeline/SKILL.md +202 -0
- package/assets/skills-en/superflow-pipeline/references/batch-prompt-template.md +4 -0
- package/assets/skills-en/superflow-pipeline/references/document-readiness.md +125 -0
- package/assets/skills-en/superflow-pipeline/references/document-templates.md +15 -0
- package/assets/skills-en/superflow-pipeline/references/feature-gated-workflow.md +7 -0
- package/assets/skills-en/superflow-pipeline/references/implementation-prompt-template.md +7 -0
- package/assets/skills-en/superflow-pipeline/references/managed-work.md +184 -0
- package/assets/skills-en/superflow-pipeline/references/quality-gate.md +20 -0
- package/assets/skills-en/superflow-pipeline/references/reviewer-checklist.md +7 -0
- package/assets/skills-en/superflow-pipeline/references/superpower-technical-design-template.md +11 -0
- package/assets/skills-en/superflow-pipeline/scripts/superflow-archive.sh +1 -1
- package/assets/skills-en/superflow-pipeline/scripts/superflow-guard.sh +279 -14
- package/assets/skills-en/superflow-pipeline/scripts/superflow-handoff.sh +7 -4
- package/assets/skills-en/superflow-requirement-review/SKILL.md +99 -0
- package/assets/skills-en/superflow-requirement-review/agents/openai.yaml +4 -0
- package/dist/app/cli.js +176 -103
- package/dist/app/cli.js.map +1 -1
- package/dist/app/commands/change-guard.js +19 -2
- package/dist/app/commands/change-guard.js.map +1 -1
- package/dist/app/commands/check.js +107 -45
- package/dist/app/commands/check.js.map +1 -1
- package/dist/app/commands/docs.js +7 -3
- package/dist/app/commands/docs.js.map +1 -1
- package/dist/app/commands/doctor.js +174 -198
- package/dist/app/commands/doctor.js.map +1 -1
- package/dist/app/commands/eval.js +64 -0
- package/dist/app/commands/eval.js.map +1 -0
- package/dist/app/commands/implement.js +7 -3
- package/dist/app/commands/implement.js.map +1 -1
- package/dist/app/commands/init.js +16 -24
- package/dist/app/commands/init.js.map +1 -1
- package/dist/app/commands/managed-service.js +5 -0
- package/dist/app/commands/managed-service.js.map +1 -0
- package/dist/app/commands/mcp.js +167 -0
- package/dist/app/commands/mcp.js.map +1 -0
- package/dist/app/commands/pipeline.js +757 -3
- package/dist/app/commands/pipeline.js.map +1 -1
- package/dist/app/commands/requirement-review.js +6 -0
- package/dist/app/commands/requirement-review.js.map +1 -0
- package/dist/app/commands/status.js +262 -77
- package/dist/app/commands/status.js.map +1 -1
- package/dist/app/commands/uninstall.js +8 -5
- package/dist/app/commands/uninstall.js.map +1 -1
- package/dist/app/commands/update.js +114 -15
- package/dist/app/commands/update.js.map +1 -1
- package/dist/domains/agent.js +3 -11
- package/dist/domains/agent.js.map +1 -1
- package/dist/domains/config/cli-help.js +145 -73
- package/dist/domains/config/cli-help.js.map +1 -1
- package/dist/domains/config/i18n.js +6 -8
- package/dist/domains/config/i18n.js.map +1 -1
- package/dist/domains/config/manifest.js +0 -3
- package/dist/domains/config/manifest.js.map +1 -1
- package/dist/domains/deps.js +70 -8
- package/dist/domains/deps.js.map +1 -1
- package/dist/domains/hook.js +71 -38
- package/dist/domains/hook.js.map +1 -1
- package/dist/domains/managed-work/completion-policy.js +174 -0
- package/dist/domains/managed-work/completion-policy.js.map +1 -0
- package/dist/domains/managed-work/context-manifest.js +208 -0
- package/dist/domains/managed-work/context-manifest.js.map +1 -0
- package/dist/domains/managed-work/contract.js +349 -0
- package/dist/domains/managed-work/contract.js.map +1 -0
- package/dist/domains/managed-work/control-signals.js +34 -0
- package/dist/domains/managed-work/control-signals.js.map +1 -0
- package/dist/domains/managed-work/control.js +628 -0
- package/dist/domains/managed-work/control.js.map +1 -0
- package/dist/domains/managed-work/evaluation.js +497 -0
- package/dist/domains/managed-work/evaluation.js.map +1 -0
- package/dist/domains/managed-work/evidence-path.js +14 -0
- package/dist/domains/managed-work/evidence-path.js.map +1 -0
- package/dist/domains/managed-work/execution-contract.js +167 -0
- package/dist/domains/managed-work/execution-contract.js.map +1 -0
- package/dist/domains/managed-work/executor-policy.js +65 -0
- package/dist/domains/managed-work/executor-policy.js.map +1 -0
- package/dist/domains/managed-work/failure.js +65 -0
- package/dist/domains/managed-work/failure.js.map +1 -0
- package/dist/domains/managed-work/host-review.js +77 -0
- package/dist/domains/managed-work/host-review.js.map +1 -0
- package/dist/domains/managed-work/human-messages.js +31 -0
- package/dist/domains/managed-work/human-messages.js.map +1 -0
- package/dist/domains/managed-work/i18n.js +12 -0
- package/dist/domains/managed-work/i18n.js.map +1 -0
- package/dist/domains/managed-work/input.js +137 -0
- package/dist/domains/managed-work/input.js.map +1 -0
- package/dist/domains/managed-work/journal.js +196 -0
- package/dist/domains/managed-work/journal.js.map +1 -0
- package/dist/domains/managed-work/lock.js +106 -0
- package/dist/domains/managed-work/lock.js.map +1 -0
- package/dist/domains/managed-work/notifications.js +38 -0
- package/dist/domains/managed-work/notifications.js.map +1 -0
- package/dist/domains/managed-work/pair-admission.js +108 -0
- package/dist/domains/managed-work/pair-admission.js.map +1 -0
- package/dist/domains/managed-work/paths.js +18 -0
- package/dist/domains/managed-work/paths.js.map +1 -0
- package/dist/domains/managed-work/prompts.js +453 -0
- package/dist/domains/managed-work/prompts.js.map +1 -0
- package/dist/domains/managed-work/redaction.js +90 -0
- package/dist/domains/managed-work/redaction.js.map +1 -0
- package/dist/domains/managed-work/review-convergence.js +41 -0
- package/dist/domains/managed-work/review-convergence.js.map +1 -0
- package/dist/domains/managed-work/review-facts.js +181 -0
- package/dist/domains/managed-work/review-facts.js.map +1 -0
- package/dist/domains/managed-work/rule-selection.js +84 -0
- package/dist/domains/managed-work/rule-selection.js.map +1 -0
- package/dist/domains/managed-work/runner.js +2418 -0
- package/dist/domains/managed-work/runner.js.map +1 -0
- package/dist/domains/managed-work/schemas.js +155 -0
- package/dist/domains/managed-work/schemas.js.map +1 -0
- package/dist/domains/managed-work/service.js +190 -0
- package/dist/domains/managed-work/service.js.map +1 -0
- package/dist/domains/managed-work/state.js +280 -0
- package/dist/domains/managed-work/state.js.map +1 -0
- package/dist/domains/managed-work/storage.js +223 -0
- package/dist/domains/managed-work/storage.js.map +1 -0
- package/dist/domains/managed-work/types.js +19 -0
- package/dist/domains/managed-work/types.js.map +1 -0
- package/dist/domains/managed-work/verification-categories.js +39 -0
- package/dist/domains/managed-work/verification-categories.js.map +1 -0
- package/dist/domains/managed-work/verification-policy.js +116 -0
- package/dist/domains/managed-work/verification-policy.js.map +1 -0
- package/dist/domains/managed-work/wait.js +58 -0
- package/dist/domains/managed-work/wait.js.map +1 -0
- package/dist/domains/managed-work/workspace-binding.js +133 -0
- package/dist/domains/managed-work/workspace-binding.js.map +1 -0
- package/dist/domains/sdd-readiness.js +44 -0
- package/dist/domains/sdd-readiness.js.map +1 -0
- package/dist/domains/skill/deploy.js +0 -6
- package/dist/domains/skill/deploy.js.map +1 -1
- package/dist/domains/skill/scripts.js +0 -8
- package/dist/domains/skill/scripts.js.map +1 -1
- package/dist/domains/state.js +1 -2
- package/dist/domains/state.js.map +1 -1
- package/dist/mcp/runtime-identity.js +21 -0
- package/dist/mcp/runtime-identity.js.map +1 -0
- package/dist/mcp/server.js +369 -0
- package/dist/mcp/server.js.map +1 -0
- package/dist/platform/agent-process.js +769 -0
- package/dist/platform/agent-process.js.map +1 -0
- package/dist/platform/executable.js +28 -0
- package/dist/platform/executable.js.map +1 -0
- package/dist/platform/paths.js +1 -17
- package/dist/platform/paths.js.map +1 -1
- package/dist/platform/process-liveness.js +10 -0
- package/dist/platform/process-liveness.js.map +1 -0
- package/dist/platform/process-tree.js +44 -0
- package/dist/platform/process-tree.js.map +1 -0
- package/dist/platform/process.js +1 -1
- package/dist/platform/process.js.map +1 -1
- package/dist/platform/version-check.js +30 -9
- package/dist/platform/version-check.js.map +1 -1
- package/package.json +16 -7
- package/scripts/check-design-principles.mjs +107 -0
- package/scripts/check-managed-work-design.mjs +507 -0
- package/scripts/clean-dist.js +9 -0
- package/scripts/ensure-bin-modes.js +11 -0
- package/dist/cli/index.js +0 -193
- package/dist/cli/index.js.map +0 -1
- package/dist/commands/archive.js +0 -6
- package/dist/commands/archive.js.map +0 -1
- package/dist/commands/clarify.js +0 -6
- package/dist/commands/clarify.js.map +0 -1
- package/dist/commands/design.js +0 -28
- package/dist/commands/design.js.map +0 -1
- package/dist/commands/docs.js +0 -6
- package/dist/commands/docs.js.map +0 -1
- package/dist/commands/doctor.js +0 -494
- package/dist/commands/doctor.js.map +0 -1
- package/dist/commands/implement.js +0 -6
- package/dist/commands/implement.js.map +0 -1
- package/dist/commands/init.js +0 -520
- package/dist/commands/init.js.map +0 -1
- package/dist/commands/pipeline.js +0 -6
- package/dist/commands/pipeline.js.map +0 -1
- package/dist/commands/scan.js +0 -63
- package/dist/commands/scan.js.map +0 -1
- package/dist/commands/status.js +0 -173
- package/dist/commands/status.js.map +0 -1
- package/dist/commands/uninstall.js +0 -214
- package/dist/commands/uninstall.js.map +0 -1
- package/dist/commands/update.js +0 -193
- package/dist/commands/update.js.map +0 -1
- package/dist/commands/verify.js +0 -6
- package/dist/commands/verify.js.map +0 -1
- package/dist/core/assets.js +0 -27
- package/dist/core/assets.js.map +0 -1
- package/dist/core/cli-help.js +0 -98
- package/dist/core/cli-help.js.map +0 -1
- package/dist/core/context.js +0 -123
- package/dist/core/context.js.map +0 -1
- package/dist/core/dependencies.js +0 -146
- package/dist/core/dependencies.js.map +0 -1
- package/dist/core/detect.js +0 -64
- package/dist/core/detect.js.map +0 -1
- package/dist/core/i18n.js +0 -105
- package/dist/core/i18n.js.map +0 -1
- package/dist/core/integrity.js +0 -46
- package/dist/core/integrity.js.map +0 -1
- package/dist/core/manifest.js +0 -21
- package/dist/core/manifest.js.map +0 -1
- package/dist/core/prompts.js +0 -20
- package/dist/core/prompts.js.map +0 -1
- package/dist/core/registry.js +0 -134
- package/dist/core/registry.js.map +0 -1
- package/dist/core/rules.js +0 -17
- package/dist/core/rules.js.map +0 -1
- package/dist/core/scripts.js +0 -48
- package/dist/core/scripts.js.map +0 -1
- package/dist/core/skill-check.js +0 -32
- package/dist/core/skill-check.js.map +0 -1
- package/dist/core/skills.js +0 -62
- package/dist/core/skills.js.map +0 -1
- package/dist/core/state.js +0 -54
- package/dist/core/state.js.map +0 -1
- package/dist/utils/path.js +0 -11
- package/dist/utils/path.js.map +0 -1
- package/dist/utils/shell.js +0 -29
- package/dist/utils/shell.js.map +0 -1
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: superflow-requirement-review
|
|
3
|
+
description: 对已澄清或已形成 OpenSpec/SDD 草案的需求和设计执行源码驱动的反向评审,主动发现闭环缺口、事实冲突、遗漏场景、过度设计、欠设计、API/UI/DB/tests 漂移及不可验证合同,并推动整改和复审闭环。Use when the user asks for 需求评审、反向评审、挑战需求、找遗漏、查错误、检查可测性、评审设计是否走偏、检查过度设计,或要求在 Superflow docs/design/implementation 前做独立审查。
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Superflow Requirement Review
|
|
7
|
+
|
|
8
|
+
对当前 OpenSpec change 进行独立、对抗式但基于证据的反向评审。评审不是旁路建议:
|
|
9
|
+
阻塞级问题必须回写并修正文档,复审通过后才能离开 docs 阶段。
|
|
10
|
+
|
|
11
|
+
## 边界
|
|
12
|
+
|
|
13
|
+
- 在复杂需求完成逐功能澄清、形成可评审文档草案后使用。
|
|
14
|
+
- 不替代 `superflow-clarify` 的 owner 决策确认,也不替代源码、Mapper/SQL、DB 和
|
|
15
|
+
真实调用方核查。
|
|
16
|
+
- 不创建平行需求体系;产物必须落在当前 `openspec/changes/<change>/`。
|
|
17
|
+
- 不只输出意见清单。发现成立的问题后,必须修正 canonical 文档并复审。
|
|
18
|
+
- 不为了“解决遗漏”增加没有真实需求或复用证据的表、接口、服务、缓存和状态。
|
|
19
|
+
|
|
20
|
+
## 必须读取
|
|
21
|
+
|
|
22
|
+
按当前任务范围读取:
|
|
23
|
+
|
|
24
|
+
- 原始需求索引:`source-ingestion.md`、`feature-inventory.md`、`feature-gates.md`
|
|
25
|
+
- 合同:`proposal.md`、`api.md`、`specs/**/spec.md`、`design.md`
|
|
26
|
+
- 证据:`source-code-audit.md`、`database-contract.md`、`release-sql.md`
|
|
27
|
+
- 交付:`tasks.md`、`tests.md`、`traceability-matrix.md`、
|
|
28
|
+
`review-checklist.md`、`sdd-quality-gate.md`、`test-report.md`
|
|
29
|
+
- 当前源码、Mapper/XML、真实前端/小程序/H5 调用方、sibling repo,以及必要的
|
|
30
|
+
只读数据库证据
|
|
31
|
+
|
|
32
|
+
缺少某类文件时记录为评审发现,不得凭聊天记忆补结论。
|
|
33
|
+
|
|
34
|
+
## 评审流程
|
|
35
|
+
|
|
36
|
+
### 1. 冻结评审基线
|
|
37
|
+
|
|
38
|
+
记录 change、当前 phase、需求来源、功能范围、handoff hash 和已确认/待确认决策。
|
|
39
|
+
一次只评审一个已冻结功能;不得把下一功能的问题混入当前结论。
|
|
40
|
+
|
|
41
|
+
### 2. 建立证据资格
|
|
42
|
+
|
|
43
|
+
先完成平台影响面发现,再回到源码、Mapper/SQL、真实调用方和必要的只读 DB。
|
|
44
|
+
understand-anything 只作定位。将证据标记为 `current`、`legacy`、`unmounted`、
|
|
45
|
+
`data-model-only`、`owner-confirmed` 或 `blocked`。
|
|
46
|
+
|
|
47
|
+
仓库和数据库能查明的事实不得转问用户。只有 owner 取舍才进入澄清,并且一次只问
|
|
48
|
+
一个决策问题。
|
|
49
|
+
|
|
50
|
+
所有未决项先按解决责任分类,禁止统一写成“外部待确认”:
|
|
51
|
+
|
|
52
|
+
- `SOURCE_INVESTIGATION`:源码、依赖、配置、日志或只读数据库可以查明。评审者必须
|
|
53
|
+
继续调查,未查完不得退出评审,也不得转问用户。
|
|
54
|
+
- `OWNER_DECISION`:存在两个以上成立方案,需要产品或业务 owner 取舍。返回
|
|
55
|
+
`superflow-clarify`,一次只问一个问题。
|
|
56
|
+
- `EXTERNAL_CONTRACT`:第三方请求/响应、签名、幂等、枚举、回调或跨服务责任合同。
|
|
57
|
+
只要会改变 API、SQL、状态机、安全实现或测试断言,就属于实现阻塞项,必须取得
|
|
58
|
+
合同证据后才能 PASS;“已在文档标记 Blocked”不算关闭。
|
|
59
|
+
- `EXECUTION_EVIDENCE`:已经冻结实现合同,仅等待部署、真实调用、迁移或运行证据。
|
|
60
|
+
可以留在 tests/test-report 阻塞交付,但不得伪装成合同未知项。
|
|
61
|
+
|
|
62
|
+
### 3. 六向反查
|
|
63
|
+
|
|
64
|
+
逐项从结果反推前提,不能只沿设计正向复述:
|
|
65
|
+
|
|
66
|
+
1. **业务闭环**:输入、触发、前置条件、处理、输出、异常、恢复、取消/重复动作。
|
|
67
|
+
2. **源码事实**:真实入口、全部写入方、读取/过滤方、遗留能力、跨仓消费者、DB样本。
|
|
68
|
+
3. **合同一致性**:PRD/截图、UI、API、DTO/VO、DB、状态枚举、SQL、tests 和 tasks。
|
|
69
|
+
4. **失败与边界**:越权、并发、幂等、超时、不确定结果、乱序回调、部分失败、脏数据。
|
|
70
|
+
5. **复杂度减法**:重复字段、平行接口、无必要 Service、缓存/MQ/定时任务、推测性兼容。
|
|
71
|
+
6. **可交付性**:每条需求是否有实现任务、RED/GREEN、真实入口、DB/log证据和验收口径。
|
|
72
|
+
|
|
73
|
+
涉及数据库时必须使用 `superflow-table-impact-analysis`,或在不可用时按同等规则降级
|
|
74
|
+
执行并记录原因。
|
|
75
|
+
|
|
76
|
+
### 4. 记录发现
|
|
77
|
+
|
|
78
|
+
创建或更新当前 change 的 `requirement-review.md`:
|
|
79
|
+
|
|
80
|
+
```markdown
|
|
81
|
+
---
|
|
82
|
+
change: <change-name>
|
|
83
|
+
review_verdict: BLOCKED
|
|
84
|
+
implementation_readiness: BLOCKED
|
|
85
|
+
open_blockers: <number>
|
|
86
|
+
open_external_contracts: <number>
|
|
87
|
+
open_source_investigations: <number>
|
|
88
|
+
open_owner_decisions: <number>
|
|
89
|
+
---
|
|
90
|
+
|
|
91
|
+
# 需求反向评审
|
|
92
|
+
|
|
93
|
+
## 评审基线
|
|
94
|
+
- change:
|
|
95
|
+
- phase:
|
|
96
|
+
- 功能范围:
|
|
97
|
+
- 来源与证据:
|
|
98
|
+
- handoff hash:
|
|
99
|
+
|
|
100
|
+
## 闭环矩阵
|
|
101
|
+
| 功能点 | 输入/触发 | 处理 | 输出 | 异常 | 恢复/重复 | 证据 | 结论 |
|
|
102
|
+
|---|---|---|---|---|---|---|---|
|
|
103
|
+
|
|
104
|
+
## 评审发现
|
|
105
|
+
| ID | 等级 | 维度 | 位置 | 问题 | 证据 | 影响 | 最小修正 | 状态 |
|
|
106
|
+
|---|---|---|---|---|---|---|---|---|
|
|
107
|
+
|
|
108
|
+
## 未关闭阻塞项
|
|
109
|
+
| ID | 分类 | 影响的实现合同 | 解决责任 | 下一证据/问题 | 状态 |
|
|
110
|
+
|---|---|---|---|---|---|
|
|
111
|
+
|
|
112
|
+
## 过度设计与欠设计
|
|
113
|
+
| 设计项 | 现有复用 | 必要性 | 删除/保留结论 | 证据 |
|
|
114
|
+
|---|---|---|---|---|
|
|
115
|
+
|
|
116
|
+
## 复审结论
|
|
117
|
+
- BLOCKED / PASS
|
|
118
|
+
- 未关闭发现:
|
|
119
|
+
- 已修正文档:
|
|
120
|
+
- 仍需 owner 决策:
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
等级只能使用:
|
|
124
|
+
|
|
125
|
+
- `BLOCKER`:需求事实、API/DB/状态、安全、真实入口或验收合同错误,阻塞推进。
|
|
126
|
+
- `IMPORTANT`:高概率造成遗漏、返工或不可测,必须在 docs 阶段修正。
|
|
127
|
+
- `SUGGESTION`:不影响合同正确性的改进建议,可由 owner 决定。
|
|
128
|
+
|
|
129
|
+
### 5. 整改
|
|
130
|
+
|
|
131
|
+
每个成立的 `BLOCKER/IMPORTANT` 必须:
|
|
132
|
+
|
|
133
|
+
1. 修正原始 canonical 文档,而不是只修改 `requirement-review.md`。
|
|
134
|
+
2. 同步 API、design、spec、SQL、tasks、tests、traceability 和 quality gate 中受影响项。
|
|
135
|
+
3. 记录“问题 → 修正文件 → 测试/证据”的闭环。
|
|
136
|
+
4. 若修正改变 owner 已确认合同,停止并回到 `superflow-clarify`。
|
|
137
|
+
|
|
138
|
+
### 6. 独立复审
|
|
139
|
+
|
|
140
|
+
整改后重新从需求来源和源码证据检查,不以“文档已经修改”为通过依据。
|
|
141
|
+
|
|
142
|
+
通过条件:
|
|
143
|
+
|
|
144
|
+
- 所有 `BLOCKER/IMPORTANT` 已关闭并有文件与测试证据。
|
|
145
|
+
- 没有未解释的 UI/API/DB/SQL/status/tests 漂移。
|
|
146
|
+
- 复杂度减法结论成立,没有无证据的新抽象。
|
|
147
|
+
- `SOURCE_INVESTIGATION` 已穷尽并回写证据,数量为0。
|
|
148
|
+
- owner 决策均已记录,`OWNER_DECISION` 数量为0。
|
|
149
|
+
- 会改变实现的 `EXTERNAL_CONTRACT` 已取得证据并冻结,数量为0;仅写成
|
|
150
|
+
`Blocked`、分配 owner 或列入任务不算关闭。
|
|
151
|
+
- 剩余项只能是不会改变实现合同的 `EXECUTION_EVIDENCE`,并已进入测试/发布门禁。
|
|
152
|
+
- `requirement-review.md` 结论为 `PASS`。
|
|
153
|
+
- front matter 精确记录 `review_verdict: PASS`、`implementation_readiness: READY`、
|
|
154
|
+
`open_blockers: 0`、`open_external_contracts: 0`、
|
|
155
|
+
`open_source_investigations: 0` 和 `open_owner_decisions: 0`。
|
|
156
|
+
|
|
157
|
+
### 7. 刷新门禁
|
|
158
|
+
|
|
159
|
+
文档修正后刷新 handoff,并运行 docs guard 与 OpenSpec strict validate。将
|
|
160
|
+
`requirement-review.md` 路径、复审结论和未关闭项同步到 `sdd-quality-gate.md` 与
|
|
161
|
+
`test-report.md`。
|
|
162
|
+
|
|
163
|
+
## 禁止项
|
|
164
|
+
|
|
165
|
+
- 禁止只按文档文字评审而不核源码和真实入口。
|
|
166
|
+
- 禁止把数据模型可表达能力当成当前产品行为。
|
|
167
|
+
- 禁止用“字段非空、接口200、编译通过”替代业务语义正确。
|
|
168
|
+
- 禁止为了覆盖边界而虚构默认值、fallback、状态或兼容层。
|
|
169
|
+
- 禁止把评审结果落到其他流程目录,导致 OpenSpec change 无法追踪。
|
|
170
|
+
- 禁止未关闭阻塞问题却将 docs/design 标为通过。
|
|
171
|
+
- 禁止以“文档已记录”“已有 owner”“待联调”关闭会改变实现的外部合同。
|
|
172
|
+
- 禁止 `review_verdict: PASS` 与 `implementation_readiness: BLOCKED` 并存。
|
|
173
|
+
|
|
174
|
+
## Handoff
|
|
175
|
+
|
|
176
|
+
评审通过后继续当前 Superflow 阶段;若发现 owner 决策缺失,返回
|
|
177
|
+
`superflow-clarify`;若发现文档合同缺失,返回 `superflow-docs` 并在修正后再次执行
|
|
178
|
+
本 skill。
|
|
@@ -22,6 +22,20 @@ When ready to implement, run /opsx:apply
|
|
|
22
22
|
|
|
23
23
|
**Input**: The user's request should include a change name (kebab-case) OR a description of what they want to build.
|
|
24
24
|
|
|
25
|
+
### Canonical OpenSpec Change Directory (Blocking)
|
|
26
|
+
|
|
27
|
+
- A change must have exactly one physical directory:
|
|
28
|
+
`openspec/changes/<name>/`.
|
|
29
|
+
- Encode the release version in `<name>`. For example, an account-permission
|
|
30
|
+
change for `v1.1.1` must use `v1-1-1-account-permission-optimization`.
|
|
31
|
+
- Do not create nested version directories such as
|
|
32
|
+
`openspec/changes/v1.1.1/<feature>/`.
|
|
33
|
+
- Do not create a flat symlink, copied directory, or second canonical document
|
|
34
|
+
tree to work around OpenSpec CLI discovery.
|
|
35
|
+
- Creation, status, validation, and apply must use the same `<name>` in
|
|
36
|
+
`openspec new change`, `openspec status --change`, and
|
|
37
|
+
`openspec validate <name> --strict`.
|
|
38
|
+
|
|
25
39
|
**Steps**
|
|
26
40
|
|
|
27
41
|
1. **If no clear input provided, ask what they want to build**
|
|
@@ -23,6 +23,21 @@ any full SDD document or implementation prompt is generated.
|
|
|
23
23
|
- Do not freeze a feature from product text or understand-anything output alone
|
|
24
24
|
when code impact is relevant. Current source, Mapper/XML, database samples,
|
|
25
25
|
API contracts, or real consumer entry points must confirm the design.
|
|
26
|
+
- For features that depend on existing behavior, table relationships, or call
|
|
27
|
+
chains, create a `source-code-audit.md` Source Fact Freeze Card before
|
|
28
|
+
freezing: `Business conclusion | understand-anything locator | Data model |
|
|
29
|
+
All writers | Real user entry | Current callers | Legacy conflict | DB check
|
|
30
|
+
required | Conclusion level | owner decision`. Treat understand-anything only
|
|
31
|
+
as a locator and confirm every conclusion in source, Mapper/SQL, current
|
|
32
|
+
callers, or read-only DB evidence.
|
|
33
|
+
- Classify evidence as `current`, `legacy`, `unmounted`, `data-model-only`,
|
|
34
|
+
`owner-confirmed`, or `blocked`. If `List`, `orderIds`, `batchInsert`, or a
|
|
35
|
+
one-to-many relation exists while the real UI/mini-program/H5 submits one
|
|
36
|
+
item, add a Conflict Audit and do not infer current batch behavior.
|
|
37
|
+
- Before asking the user, record a Question Eligibility Gate covering source,
|
|
38
|
+
Mapper/SQL, frontend/mini-program/H5 callers, sibling repositories, and the
|
|
39
|
+
DB check or skip reason. Do not ask the user for facts discoverable from the
|
|
40
|
+
repository or read-only data; ask only for owner-intent decisions.
|
|
26
41
|
- When the feature depends on existing code relationships, field ownership,
|
|
27
42
|
table joins, data permissions, status transitions, or upstream/downstream
|
|
28
43
|
calls, verify the relationship before freezing with current evidence:
|
|
@@ -81,6 +96,8 @@ Create or update these files in the active OpenSpec change directory:
|
|
|
81
96
|
- `ui-contract.md`: page fields, controls, buttons, list columns, dropdowns, API/DTO/DB mapping.
|
|
82
97
|
- `gap-analysis.md`: UI/document/source gaps and over-design risks.
|
|
83
98
|
- `spec-freeze-review.md`: freeze card for the current feature.
|
|
99
|
+
- `source-code-audit.md`: source fact freeze card, evidence classifications,
|
|
100
|
+
conflict audit, and question eligibility gate.
|
|
84
101
|
- Platform impact evidence in one of the above documents: discovery method,
|
|
85
102
|
understand-anything index status when available, analyzed platform scope,
|
|
86
103
|
impacted modules/interfaces/tables, regression risks, source/DB/API
|
|
@@ -21,6 +21,12 @@ Superpowers own source-level HOW without weakening OpenSpec/SDD contracts.
|
|
|
21
21
|
|
|
22
22
|
## Preconditions
|
|
23
23
|
|
|
24
|
+
- When the change modifies a database schema, index, constraint, seed data, or
|
|
25
|
+
historical data, `release-sql.md` must already contain the complete executable
|
|
26
|
+
release SQL, an exact target `.sql` path, `copy_policy: verbatim`, and a valid
|
|
27
|
+
`sql_sha256`. Source-level HOW design must not defer SQL design to an
|
|
28
|
+
implementation prompt.
|
|
29
|
+
|
|
24
30
|
- `proposal.md`, `api.md`, `design.md`, `tasks.md`, `tests.md`,
|
|
25
31
|
`traceability-matrix.md`, `sdd-quality-gate.md`, and `test-report.md` exist.
|
|
26
32
|
- `.sdd/state.yaml` exists and is in `phase: design`. If still `docs`, run:
|
|
@@ -38,15 +44,31 @@ Superpowers own source-level HOW without weakening OpenSpec/SDD contracts.
|
|
|
38
44
|
|
|
39
45
|
1. Read `.sdd/handoff/sdd-context.md` plus original `api.md`, `design.md`,
|
|
40
46
|
`tasks.md`, and `tests.md`.
|
|
41
|
-
2.
|
|
47
|
+
2. For a database change, verify `release-sql.md` before source-level HOW
|
|
48
|
+
design: one complete executable SQL block, exact destination, normalized
|
|
49
|
+
SHA-256, pre/post checks, and explicit verbatim-copy references in
|
|
50
|
+
`design.md`, `tasks.md`, and `sdd-quality-gate.md`. Any unresolved type,
|
|
51
|
+
default, index, migration rule, or target path returns to
|
|
52
|
+
`$superflow-docs`; it must not be deferred to `$superflow-implement`.
|
|
53
|
+
3. If design discussion is still evolving, maintain
|
|
42
54
|
`.sdd/handoff/brainstorm-summary.md` with confirmed, candidate, pending, and
|
|
43
55
|
rejected items. Do not create final technical design from memory only.
|
|
44
|
-
|
|
56
|
+
4. Use Superpowers `brainstorming` or equivalent deep design reasoning to
|
|
45
57
|
decide source-level HOW.
|
|
46
|
-
|
|
58
|
+
5. Write:
|
|
47
59
|
`docs/superpowers/specs/YYYY-MM-DD-<change-id>-technical-design.md`
|
|
48
60
|
using `../superflow-pipeline/references/superpower-technical-design-template.md`.
|
|
49
|
-
|
|
61
|
+
6. Complete `Minimal Design Review` before expanding source-level HOW. For
|
|
62
|
+
every new table, field, API, service/component, abstraction, cache,
|
|
63
|
+
async/MQ/event flow, scheduled job, or compatibility layer, prove existing
|
|
64
|
+
reuse options, necessity, and why the simplest direct implementation is
|
|
65
|
+
insufficient. Prefer one owner, one write path, one transaction, and
|
|
66
|
+
set-based operations when they satisfy the contract. Remove speculative
|
|
67
|
+
extension points, duplicate DTO/API layers, derivable persistence,
|
|
68
|
+
premature caches, and async compensation without measured need. Record
|
|
69
|
+
retained and removed counts; unresolved simpler alternatives keep the
|
|
70
|
+
design blocked.
|
|
71
|
+
7. For cross-repository, service-to-service, SDK, MQ, scheduler, device,
|
|
50
72
|
callback, third-party, mini-program, gateway, or adapter changes, include
|
|
51
73
|
`Architecture Boundary And Call Direction`. Prove owner module, call
|
|
52
74
|
direction, existing entry/exit points, proposed entry/exit points, evidence
|
|
@@ -54,7 +76,7 @@ Superpowers own source-level HOW without weakening OpenSpec/SDD contracts.
|
|
|
54
76
|
adapter/protocol translator/device gateway into a business-entry
|
|
55
77
|
orchestrator, stop and return to `$superflow-docs` unless the OpenSpec/SDD
|
|
56
78
|
contract explicitly grants that ownership with approval evidence.
|
|
57
|
-
|
|
79
|
+
8. For third-party platforms/tools, SDKs, MQ/Kafka, callbacks, payment
|
|
58
80
|
gateways, cloud services, or other external integrations, include
|
|
59
81
|
`External Integration Configuration And Deployment Contract`. Inventory
|
|
60
82
|
every endpoint, app/tenant/project ID, Topic, Tag, Consumer Group,
|
|
@@ -66,7 +88,7 @@ Superpowers own source-level HOW without weakening OpenSpec/SDD contracts.
|
|
|
66
88
|
auto-creation or pre-existing resources must not be treated as proof that
|
|
67
89
|
production will provision them. Missing production provisioning evidence
|
|
68
90
|
blocks design completion.
|
|
69
|
-
|
|
91
|
+
9. For concurrent requests, batch issue/activation/renewal, duplicate callbacks,
|
|
70
92
|
duplicate consumption, or repeated external delivery, include
|
|
71
93
|
`Concurrency And Idempotency Ownership`. Use a stable business idempotency
|
|
72
94
|
key and an application-layer atomic claim in a short transaction; persist
|
|
@@ -76,10 +98,17 @@ Superpowers own source-level HOW without weakening OpenSpec/SDD contracts.
|
|
|
76
98
|
optional fallback with proven natural uniqueness, historical cleanup,
|
|
77
99
|
NULL/soft-delete semantics, and a conflict contract. Check-then-insert,
|
|
78
100
|
process-local locks, and random IDs alone are blocked.
|
|
79
|
-
|
|
101
|
+
When the selected design is version-based optimistic locking, record the
|
|
102
|
+
exact database atomic compare-and-set statement and affected-row decision:
|
|
103
|
+
the update predicate contains both the stable row identity and expected
|
|
104
|
+
version; a zero-row result distinguishes missing data from version conflict.
|
|
105
|
+
The TDD plan references the `tests.md` concurrent stale-version case proving
|
|
106
|
+
one winner, one conflict, and one increment. Do not defer this decision to
|
|
107
|
+
the managed Executor prompt.
|
|
108
|
+
10. For field/status/enum/sync changes, include `Field And Status Reverse
|
|
80
109
|
Impact` and prove writers, readers, filters, derived sync paths, consumers,
|
|
81
110
|
and tests. Direct setter-only design is blocked.
|
|
82
|
-
|
|
111
|
+
11. For amount, fee, discount, deduction, refund, sharing, payment, invoice,
|
|
83
112
|
balance, electricity fee, service fee, package settlement, proration,
|
|
84
113
|
allocation, reconciliation, or financial display changes,
|
|
85
114
|
include `Money Precision Boundary`. Prove calculation-state fields,
|
|
@@ -98,12 +127,12 @@ Superpowers own source-level HOW without weakening OpenSpec/SDD contracts.
|
|
|
98
127
|
level and policy source, deterministic residual strategy with stable
|
|
99
128
|
tie-breaker, and positive/zero/negative evidence. For FX changes, freeze the
|
|
100
129
|
directional rate metadata and one canonical conversion path.
|
|
101
|
-
|
|
130
|
+
12. Record state:
|
|
102
131
|
```bash
|
|
103
132
|
../superflow-pipeline/scripts/superflow-state.sh set <change-dir> technical_design docs/superpowers/specs/YYYY-MM-DD-<change-id>-technical-design.md
|
|
104
133
|
../superflow-pipeline/scripts/superflow-state.sh set <change-dir> design_doc design.md
|
|
105
134
|
```
|
|
106
|
-
|
|
135
|
+
13. Update `design.md` with `Superpowers Technical Design Handoff`, update
|
|
107
136
|
`sdd-quality-gate.md` with the technical design path and hash, then run
|
|
108
137
|
`../superflow-pipeline/scripts/superflow-handoff.sh <change-dir> --refresh`.
|
|
109
138
|
If the guard reports a stale or missing hash, record the printed hash in
|
|
@@ -111,7 +140,7 @@ Superpowers own source-level HOW without weakening OpenSpec/SDD contracts.
|
|
|
111
140
|
`--refresh` again. Do not set `design_doc` to the Superpowers document;
|
|
112
141
|
`design_doc` is the OpenSpec/SDD contract design, while `technical_design`
|
|
113
142
|
is the Superpowers HOW document.
|
|
114
|
-
|
|
143
|
+
14. Run:
|
|
115
144
|
```bash
|
|
116
145
|
../superflow-pipeline/scripts/superflow-yaml-validate.sh <change-dir>
|
|
117
146
|
../superflow-pipeline/scripts/superflow-guard.sh <change-dir> design --apply
|
|
@@ -64,12 +64,29 @@ For complex requirements, verify these before writing docs:
|
|
|
64
64
|
checks when source is insufficient. Graph output or chat explanation alone is
|
|
65
65
|
not sufficient. If this evidence is missing and the relationship affects
|
|
66
66
|
design, stop and return to `$superflow-clarify`.
|
|
67
|
+
- For full-workflow existing-system changes, `source-code-audit.md` must contain
|
|
68
|
+
the source fact freeze card, current/legacy/unmounted/data-model-only/
|
|
69
|
+
owner-confirmed/blocked classifications, all writers and real callers, DB
|
|
70
|
+
evidence or a skip reason, and the owner decision boundary. `List`,
|
|
71
|
+
`orderIds`, `batchInsert`, or one-to-many schema signals that conflict with a
|
|
72
|
+
single-item real entry require an explicit conflict audit. Missing evidence
|
|
73
|
+
blocks docs even when understand-anything contains a plausible summary.
|
|
67
74
|
- For any database-backed design, the docs include table-to-code reverse impact
|
|
68
75
|
evidence: every affected table/field, all writers/readers/filters, sibling
|
|
69
76
|
repo or third-party consumers, real user-facing endpoints, reverse-state
|
|
70
77
|
scenarios, and validation cases. If the docs only describe the write/sync
|
|
71
78
|
path and do not prove consumers, stop and return to `$superflow-clarify`. Use
|
|
72
79
|
`$superflow-table-impact-analysis` when available.
|
|
80
|
+
- For any schema, index, constraint, seed-data, or historical-data change,
|
|
81
|
+
docs MUST create `release-sql.md` before `$superflow-design` or implementation
|
|
82
|
+
prompts. It contains exactly one complete executable `sql` block and front
|
|
83
|
+
matter with `database_change: true`, an exact `target_sql_path`,
|
|
84
|
+
`copy_policy: verbatim`, and the normalized payload `sql_sha256`. Freeze all
|
|
85
|
+
prechecks, DDL/DML, post-verification, defaults, constraints, indexes, and
|
|
86
|
+
migration semantics here. `design.md`, `tasks.md`, and
|
|
87
|
+
`sdd-quality-gate.md` must reference it and prohibit implementation agents
|
|
88
|
+
from editing the SQL. Placeholder paths, missing hashes, SQL fragments, or
|
|
89
|
+
deferred SQL design block docs completion.
|
|
73
90
|
- For any status, enum, sync, derived, default, or compatibility behavior, the
|
|
74
91
|
docs include business semantic evidence:
|
|
75
92
|
`Source field | Source enum | Target field | Target enum | Consumer meaning | Business basis | Unknowns`.
|
|
@@ -103,6 +120,52 @@ For complex requirements, verify these before writing docs:
|
|
|
103
120
|
chain, no-fallback/no-guessing boundary, and pre-coding agent self-check. If
|
|
104
121
|
any gate is missing from `design.md`, `tests.md`, or quality gate, stop and
|
|
105
122
|
complete the docs first.
|
|
123
|
+
- Low-freedom means the Executor has no unresolved implementation or test-design
|
|
124
|
+
choice. `design.md` names reusable modules, exact change points, call/data flow,
|
|
125
|
+
transaction and concurrency boundaries, error behavior, and implementation
|
|
126
|
+
order. `tests.md` names environment, fixtures, startup command, steps,
|
|
127
|
+
automation command, response/DB/log assertions, cleanup, and evidence paths.
|
|
128
|
+
If two materially different implementations or acceptance paths remain valid,
|
|
129
|
+
return to clarification/design instead of delegating the choice to development.
|
|
130
|
+
- For full workflow changes, `design.md` must include a `Minimal Design Review`
|
|
131
|
+
before docs freeze. Inventory every proposed table, field, API,
|
|
132
|
+
service/component, cache, async/MQ/event flow, scheduled job, compatibility
|
|
133
|
+
layer, and abstraction. Record existing reuse evidence, necessity, the
|
|
134
|
+
simplest implementation, removed/rejected complexity, and blockers.
|
|
135
|
+
Prefer extending current modules and synchronous transactions. Do not keep a
|
|
136
|
+
layer only for hypothetical future flexibility; remove it without evidence.
|
|
137
|
+
- `sdd-quality-gate.md` must record the minimal-design verdict as `PASS` or
|
|
138
|
+
`BLOCKED`; only `PASS` may leave docs/design. Missing reuse evidence, parallel APIs/models, redundant persisted
|
|
139
|
+
fields, speculative cache/async/compensation, or an unresolved simpler option
|
|
140
|
+
blocks docs completion.
|
|
141
|
+
- After a reviewable full-workflow contract draft exists, run
|
|
142
|
+
`$superflow-requirement-review` before docs guard completion. It must create
|
|
143
|
+
`requirement-review.md`, repair canonical documents for every confirmed
|
|
144
|
+
`BLOCKER/IMPORTANT` finding, and re-review from source evidence. Record its
|
|
145
|
+
verdict and unresolved findings in `sdd-quality-gate.md` and `test-report.md`.
|
|
146
|
+
Source-resolvable unknowns must be investigated, owner decisions must return to
|
|
147
|
+
clarification, and implementation-affecting external contracts must be evidenced and frozen.
|
|
148
|
+
Merely documenting or assigning a blocker does not close it. A missing report, non-READY
|
|
149
|
+
implementation verdict, or nonzero blocker count prevents transition to design.
|
|
150
|
+
- Before developer handoff, a full workflow records three independent reviews
|
|
151
|
+
against the current handoff hash in `.sdd/reviews/document-review.json`:
|
|
152
|
+
`source-contract`, `architecture-minimality`, and `e2e-environment`.
|
|
153
|
+
Resolve discoverable gaps autonomously and ask owner-only blockers once at the end.
|
|
154
|
+
- Explore the declared local/dev/test configuration before handoff and record
|
|
155
|
+
fail-safe probes in `.sdd/readiness/environment.json`. Its v2
|
|
156
|
+
`executionContract` uniquely freezes the application location, dependency
|
|
157
|
+
policy, config sources, and allowed/forbidden overrides. Tests use verified
|
|
158
|
+
startup commands, ports, simulators, and dependencies; reachability alone is
|
|
159
|
+
not an environment contract and discovery is not deferred to the developer.
|
|
160
|
+
- Cross-repo, cross-service, device, MQ, callback, state-machine, or three-plus
|
|
161
|
+
module logic includes Mermaid `sequenceDiagram` and `flowchart`/`stateDiagram`.
|
|
162
|
+
- Run `superflow check <change> --level coding-ready` after prompts are complete.
|
|
163
|
+
A failed implement gate is fixed by the docs workflow, never delegated to the
|
|
164
|
+
developer Agent.
|
|
165
|
+
- When an upstream caller receives an explicit failure and owns refund/cancel
|
|
166
|
+
compensation, default to fail-fast, fail-closed, at-most-once, and
|
|
167
|
+
caller-owned compensation. Transparent retry/reroute/resend requires owner
|
|
168
|
+
approval in the cross-system failure ownership boundary.
|
|
106
169
|
- `design.md` stays the OpenSpec/SDD design contract: requirement mapping,
|
|
107
170
|
API/DB/field semantics, source facts, real-entry call chain, no-fallback
|
|
108
171
|
boundary, risks, and acceptance hooks. It must not try to own all source-level
|
|
@@ -163,12 +226,20 @@ applicable:
|
|
|
163
226
|
- `specs/<capability>/spec.md`
|
|
164
227
|
- `design.md`
|
|
165
228
|
- `tasks.md`
|
|
229
|
+
- Every `tasks.md` checkbox must carry exactly one machine category:
|
|
230
|
+
`[local_required]`, `[environment_required]`, or `[release_required]`.
|
|
231
|
+
Locally executable code, tests, startup, and browser checks are local_required;
|
|
232
|
+
free-form Blocker/owner prose cannot replace the category.
|
|
166
233
|
- `tests.md`
|
|
167
234
|
- `test-report.md` skeleton
|
|
168
235
|
- `sdd-quality-gate.md`
|
|
169
236
|
- `traceability-matrix.md` when tasks are split
|
|
170
237
|
- `mock.md` when external dependencies exist
|
|
171
238
|
- `review-checklist.md` when implementation will be split
|
|
239
|
+
- `requirement-review.md` for full-workflow changes before docs completion
|
|
240
|
+
- `source-code-audit.md` for full existing-system, DB, cross-repo, or real-entry changes
|
|
241
|
+
- `release-sql.md` for every database change; omit it only when the docs prove
|
|
242
|
+
that no schema/data migration is required
|
|
172
243
|
- `.sdd/state.yaml`
|
|
173
244
|
- `.sdd/handoff/sdd-context.md`
|
|
174
245
|
- `.sdd/handoff/sdd-context.json`
|
|
@@ -251,6 +322,11 @@ Use references only as needed:
|
|
|
251
322
|
the relationship judgment as `confirmed/partially confirmed/unknown` when a bug fix hinges on
|
|
252
323
|
existing data or call-chain behavior.
|
|
253
324
|
- `design.md` must reference the frozen `api.md` fields and errors.
|
|
325
|
+
- `design.md` must include `Minimal Design Review` with:
|
|
326
|
+
`Design item | Existing capability/reuse evidence | Necessary? | Simplest implementation | Removed/rejected complexity | Evidence/blocker`.
|
|
327
|
+
Count new tables, fields, APIs, services/components, caches, async flows,
|
|
328
|
+
jobs, and compatibility layers. A zero count is valid and preferred when
|
|
329
|
+
existing capabilities close the contract.
|
|
254
330
|
- `design.md` must include a "Field Semantic Contract" table for every risky field:
|
|
255
331
|
`Field | Source table/DTO/event | Real semantics | Target field | Target semantics | Equivalent? |
|
|
256
332
|
Evidence anchor | Forbidden usage | Unknowns/owner`.
|
|
@@ -282,6 +358,25 @@ Use references only as needed:
|
|
|
282
358
|
`Case ID | Requirement/scenario | Level L1/L2/L3/L4 | Precondition data | Steps |
|
|
283
359
|
Automation command | Response assertion | DB assertion | Log assertion | RED expected failure | GREEN expected pass |
|
|
284
360
|
test-report evidence location`.
|
|
361
|
+
- For L3/L4 input validation, protocol rejection, and exceptional branches,
|
|
362
|
+
`tests.md` also freezes the real injected payload and evidence that it reaches
|
|
363
|
+
the intended parser or validation branch; matching the same HTTP status alone
|
|
364
|
+
is not coverage. Raw malformed JSON, wrong Content-Type, unauthorized identity,
|
|
365
|
+
and invalid fields must be sent on the real wire protocol and assert no side effect.
|
|
366
|
+
- When a task adds or copies an owner/cleanup primitive for local processes,
|
|
367
|
+
containers, or temporary resources, `design.md`, `tests.md`, and
|
|
368
|
+
`test-report.md` freeze resource identity fields, producer/consumer equality
|
|
369
|
+
relations, and refusal-to-clean tests for every mismatch (for example nonce,
|
|
370
|
+
PID, port, and process signature). When reusing an unchanged certified owner
|
|
371
|
+
helper, record only its integrity, task parameters, one failure cleanup, and
|
|
372
|
+
final zero residue; do not repeat framework certification.
|
|
373
|
+
- When a design uses a version field for optimistic locking, `design.md` freezes
|
|
374
|
+
the database-level atomic compare-and-set boundary, conflict response, and
|
|
375
|
+
zero-row distinction between missing data and stale version. A read-then-write
|
|
376
|
+
check alone is blocked. `tests.md` includes two concurrent requests holding
|
|
377
|
+
the same old version and asserts exactly one success, one conflict, and one
|
|
378
|
+
version increment. The implementation prompt only inherits these frozen case
|
|
379
|
+
IDs and commands; managed orchestration never invents the business design.
|
|
285
380
|
- Each visible UI field, button action, list column, dropdown, and enum must map to API/DTO/DB/tests or be explicitly out of scope.
|
|
286
381
|
- Every spec scenario must have at least one test case.
|
|
287
382
|
- Every implementation batch must have at least one test that can fail before
|
|
@@ -315,6 +410,26 @@ Use references only as needed:
|
|
|
315
410
|
`RED failure evidence`, `GREEN pass evidence`, `interface automation evidence`, `DB evidence`,
|
|
316
411
|
`log evidence`, `manual/blocking cases`, and `Partially verified boundary`.
|
|
317
412
|
Each section must reference concrete `tests.md` case IDs.
|
|
413
|
+
- `tests.md` freezes runtime-specific acceptance instead of leaving it to
|
|
414
|
+
managed orchestration:
|
|
415
|
+
- Spring Boot/backend services: verified startup command, dynamic or planned
|
|
416
|
+
isolated port, readiness condition, at least one real HTTP invocation, and
|
|
417
|
+
failure evidence when the environment blocks startup.
|
|
418
|
+
- `.vue/.tsx/.jsx`, frontend API registration, page permission, or visible UI
|
|
419
|
+
behavior: frontend startup plus real-browser Playwright/Cypress cases and
|
|
420
|
+
page assertions; build, static inspection, and mocks are supplementary only.
|
|
421
|
+
- Controller/API DTO plus frontend request changes: backend Controller contract,
|
|
422
|
+
frontend request contract, and dynamic API export/call-resolution snapshot
|
|
423
|
+
when applicable.
|
|
424
|
+
- Named runtime backends such as MySQL, Testcontainers, a real browser, or a
|
|
425
|
+
real service: exact backend and command; H2, mocks, stubs, in-memory stores,
|
|
426
|
+
and compatibility modes never close the named gate.
|
|
427
|
+
- Multi-repository/service changes: build/runtime checks for every affected
|
|
428
|
+
repository plus the real cross-repository path; one repository's evidence
|
|
429
|
+
never substitutes for another.
|
|
430
|
+
`design.md` records why each runtime and repository is in scope; `tasks.md`
|
|
431
|
+
classifies local, environment, and release work; the implementation prompt
|
|
432
|
+
inherits the exact case IDs, commands, assertions, and evidence paths.
|
|
318
433
|
- For money-related changes, `test-report.md` must also include `Money Precision
|
|
319
434
|
Boundary` evidence: original calculation inputs and precision, actual rounding
|
|
320
435
|
boundary and mode, half-cent/residual/multi-detail cases, and reconciliation
|