@chenmk/superflow 0.1.1 → 0.1.2

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 (79) hide show
  1. package/INSTALL.en.md +32 -5
  2. package/INSTALL.md +58 -17
  3. package/README.md +83 -7
  4. package/README.zh-CN.md +80 -11
  5. package/assets/brand/superflow-banner.svg +80 -0
  6. package/assets/context-templates/business-rules.md +45 -78
  7. package/assets/context-templates/decisions.md +63 -149
  8. package/assets/context-templates/external-systems.md +64 -161
  9. package/assets/context-templates/incidents.md +40 -78
  10. package/assets/context-templates-en/business-rules.md +72 -0
  11. package/assets/context-templates-en/decisions.md +72 -0
  12. package/assets/context-templates-en/external-systems.md +78 -0
  13. package/assets/context-templates-en/incidents.md +52 -0
  14. package/assets/manifest.json +6 -4
  15. package/assets/scripts/claude-auto-backup-hook.sh +11 -6
  16. package/assets/scripts/codex-auto-backup-hook.sh +11 -6
  17. package/assets/skills-en/api-doc-changelog/SKILL.md +64 -151
  18. package/assets/skills-en/superflow-clarify/SKILL.md +4 -4
  19. package/assets/skills-en/superflow-clarify/agents/openai.yaml +1 -1
  20. package/assets/skills-en/superflow-design/agents/openai.yaml +1 -1
  21. package/assets/skills-en/superflow-docs/SKILL.md +27 -27
  22. package/assets/skills-en/superflow-docs/agents/openai.yaml +1 -1
  23. package/assets/skills-en/superflow-implement/SKILL.md +113 -457
  24. package/assets/skills-en/superflow-implement/agents/openai.yaml +1 -1
  25. package/assets/skills-en/superflow-pipeline/SKILL.md +167 -840
  26. package/assets/skills-en/superflow-pipeline/agents/openai.yaml +1 -1
  27. package/assets/skills-en/superflow-pipeline/references/api-design-template.md +17 -426
  28. package/assets/skills-en/superflow-pipeline/references/architecture-design-template.md +15 -114
  29. package/assets/skills-en/superflow-pipeline/references/batch-prompt-template.md +36 -524
  30. package/assets/skills-en/superflow-pipeline/references/batch-split-guide.md +19 -133
  31. package/assets/skills-en/superflow-pipeline/references/document-templates.md +50 -123
  32. package/assets/skills-en/superflow-pipeline/references/feature-gated-workflow.md +12 -119
  33. package/assets/skills-en/superflow-pipeline/references/implementation-prompt-template.md +22 -1044
  34. package/assets/skills-en/superflow-pipeline/references/mock-strategy-guide.md +11 -81
  35. package/assets/skills-en/superflow-pipeline/references/openspec-format.md +17 -51
  36. package/assets/skills-en/superflow-pipeline/references/orchestration.md +17 -632
  37. package/assets/skills-en/superflow-pipeline/references/p0-baseline-template.md +10 -169
  38. package/assets/skills-en/superflow-pipeline/references/prompt-usage-template.md +29 -128
  39. package/assets/skills-en/superflow-pipeline/references/quality-gate.md +36 -299
  40. package/assets/skills-en/superflow-pipeline/references/quality-standards.md +12 -186
  41. package/assets/skills-en/superflow-pipeline/references/reviewer-checklist.md +12 -154
  42. package/assets/skills-en/superflow-pipeline/references/sql-risk-review-checklist.md +19 -316
  43. package/assets/skills-en/superflow-pipeline/references/test-execution-template.md +22 -220
  44. package/assets/skills-en/superflow-pipeline/references/test-guide.md +12 -26
  45. package/assets/skills-en/superflow-pipeline/references/traceability-matrix.md +5 -103
  46. package/assets/skills-en/superflow-pipeline/references/validation-integrity.md +12 -130
  47. package/assets/skills-en/superflow-pipeline/scripts/superflow-guard.sh +23 -23
  48. package/assets/skills-en/superflow-pipeline/scripts/superflow-state.sh +1 -1
  49. package/assets/skills-en/superflow-pipeline/scripts/superflow-status.sh +15 -15
  50. package/assets/skills-en/superflow-table-impact-analysis/SKILL.md +3 -3
  51. package/dist/cli/index.js +61 -54
  52. package/dist/cli/index.js.map +1 -1
  53. package/dist/commands/doctor.js +31 -12
  54. package/dist/commands/doctor.js.map +1 -1
  55. package/dist/commands/init.js +75 -27
  56. package/dist/commands/init.js.map +1 -1
  57. package/dist/commands/scan.js +8 -4
  58. package/dist/commands/scan.js.map +1 -1
  59. package/dist/commands/uninstall.js +3 -3
  60. package/dist/commands/uninstall.js.map +1 -1
  61. package/dist/commands/update.js +8 -3
  62. package/dist/commands/update.js.map +1 -1
  63. package/dist/core/cli-help.js +98 -0
  64. package/dist/core/cli-help.js.map +1 -0
  65. package/dist/core/context.js +40 -17
  66. package/dist/core/context.js.map +1 -1
  67. package/dist/core/detect.js +58 -5
  68. package/dist/core/detect.js.map +1 -1
  69. package/dist/core/i18n.js +10 -8
  70. package/dist/core/i18n.js.map +1 -1
  71. package/dist/core/manifest.js +3 -0
  72. package/dist/core/manifest.js.map +1 -1
  73. package/dist/core/scripts.js +8 -0
  74. package/dist/core/scripts.js.map +1 -1
  75. package/dist/core/skills.js +6 -0
  76. package/dist/core/skills.js.map +1 -1
  77. package/dist/core/state.js +12 -1
  78. package/dist/core/state.js.map +1 -1
  79. package/package.json +4 -3
@@ -1,193 +1,106 @@
1
1
  ---
2
2
  name: api-doc-changelog
3
- description: >
4
- 规范 API 联调文档(api.md)的变更标注格式。当编写或更新前后端联调接口文档时,
5
- 自动在接口和字段级别标注变更类型,让前端 agent 一眼看出两个版本之间改了什么。
6
- 适用于:写 api.md、更新 api.md、推送飞书前检查文档、SuperBridge Flow 流程生成接口设计。
7
- 触发词:api文档变更、接口变更标记、changelog、联调文档更新、接口变更标注、
8
- 变更追踪、接口diff、版本变更、提测文档。
3
+ description: Standardize API documentation changelog annotations. Use when writing or updating api.md, preparing frontend integration docs, marking API/field-level changes, or reviewing API docs before handoff.
9
4
  ---
10
5
 
11
- # API 文档变更标注规范
6
+ # API Documentation Changelog Standard
12
7
 
13
- ## 为什么需要这个规范
8
+ Use this skill when `api.md` must show what changed between the previous
9
+ baseline and the current delivery. The goal is to make API deltas visible to
10
+ frontend, QA, and integration agents without forcing them to diff a large file.
14
11
 
15
- 每次提测新版本时,前端 agent 需要快速回答三个问题:
16
- 1. 这次新增了哪些接口?
17
- 2. 哪些接口的参数/返回值改了?改了哪个字段?
18
- 3. 哪些接口被废弃或删除了?
12
+ ## Required Structure
19
13
 
20
- 如果这些信息藏在 2000+ 行的文档底部一个概要表格里,前端 agent 基本找不到。
21
- 本规范通过**文档顶部的变更概览 + 接口内联标注**,让变更信息对前端 agent 零门槛可见。
22
-
23
- ---
24
-
25
- ## 一、文档顶部变更概览
26
-
27
- 在 `## 1. 通用约定` 之前,插入变更概览节。格式如下:
14
+ Add a changelog overview before the first normal API section:
28
15
 
29
16
  ```markdown
30
- ## 0. 变更概览(本次提测变更)
17
+ ## 0. Change Overview
31
18
 
32
- > 基线版本:v1.0 | 当前版本:v1.1 | 变更日期:2026-05-22
19
+ > Baseline: v1.0 | Current: v1.1 | Date: YYYY-MM-DD
33
20
 
34
- ### 新增接口
21
+ ### Added APIs
35
22
 
36
- | 接口 | 说明 |
37
- |------|------|
38
- | `POST /api/xxx` | 新增 xxx 功能 |
23
+ | API | Summary |
24
+ |-----|---------|
25
+ | `POST /api/example` | Adds example creation |
39
26
 
40
- ### 修改接口
27
+ ### Changed APIs
41
28
 
42
- | 接口 | 变更摘要 |
43
- |------|----------|
44
- | `GET /api/yyy` | 新增 query 参数 `keyword`;响应增加 `tag` 字段 |
45
- | `PUT /api/zzz/{id}` | 入参 `status` 枚举值新增 `3=待审核` |
29
+ | API | Change Summary |
30
+ |-----|----------------|
31
+ | `GET /api/example` | Adds query parameter `keyword`; response adds `tag` |
46
32
 
47
- ### 废弃接口
33
+ ### Deprecated APIs
48
34
 
49
- | 接口 | 替代方案 | 移除计划 |
50
- |------|----------|----------|
51
- | `GET /api/old` | 使用 `GET /api/new` | v2.0 移除 |
35
+ | API | Replacement | Removal Plan |
36
+ |-----|-------------|--------------|
37
+ | `GET /api/old` | `GET /api/new` | v2.0 |
52
38
  ```
53
39
 
54
- ### 规则
55
-
56
- 1. **每次提测必须更新**:推送飞书前,必须刷新变更概览节的内容和日期。
57
- 2. **只写本次变更**:变更概览只记录"上一版基线 → 当前版本"的差量,不是完整历史。
58
- 3. **完整历史在第 8 节**:文档末尾的"接口变更记录"表保留完整历史,格式不变。
59
- 4. **无变更也要写**:如果没有变更,写"本次提测无接口变更,仅修复已知问题"。
60
-
61
- ---
62
-
63
- ## 二、接口级别内联标注
64
-
65
- 每个接口的标题行后紧跟变更标签,用方括号标注变更类型:
40
+ If there are no API changes, write that explicitly:
66
41
 
67
42
  ```markdown
68
- #### `GET /api/charging-package/templates` `[新增]`
69
-
70
- #### `PUT /api/parking-guns/{id}` `[修改]`
71
-
72
- #### `DELETE /api/old-endpoint` `[废弃]`
43
+ No API contract changes in this delivery.
73
44
  ```
74
45
 
75
- ### 标签类型
76
-
77
- | 标签 | 含义 | 使用场景 |
78
- |------|------|----------|
79
- | `[新增]` | 本次新增的接口 | 全新开发的接口 |
80
- | `[修改]` | 本次有改动的接口 | 参数、响应、行为有任何变化 |
81
- | `[废弃]` | 已废弃但暂未移除 | 已有替代方案,但保留兼容 |
82
- | 无标签 | 本次无变更 | 上个版本就存在且未修改的接口 |
83
-
84
- ### 规则
85
-
86
- 1. **只有本次变更的接口才加标签**,稳定接口不加。
87
- 2. 下次提测时,上一轮的标签要**清除**(上一轮的变更已不再是"新"变更)。
88
- 3. 接口标题和标签之间用空格分隔。
46
+ ## API-Level Labels
89
47
 
90
- ---
48
+ For each changed API heading, append one label:
91
49
 
92
- ## 三、字段级别内联标注
50
+ - `[Added]`
51
+ - `[Changed]`
52
+ - `[Deprecated]`
93
53
 
94
- 在参数表和响应字段表中,变更的字段在"说明"列末尾追加标注:
54
+ Stable APIs from earlier versions do not need labels. Remove old labels during
55
+ the next delivery cycle so labels always mean "changed in this delivery".
95
56
 
96
- ### 参数/响应表的标注方式
57
+ Example:
97
58
 
98
59
  ```markdown
99
- | 字段 | 类型 | 必填 | 说明 |
100
- |------|------|------|------|
101
- | name | String | 是 | 套餐名称 |
102
- | keyword | String | 否 | 搜索关键词 `【本次新增】` |
103
- | status | Integer | 否 | 状态:1 上架,2 下架,3 待审核 `【枚举值变更:新增 3】` |
104
- | oldField | String | 否 | ~~已废弃,使用 newField~~ `【本次废弃】` |
60
+ #### `GET /api/orders` `[Changed]`
105
61
  ```
106
62
 
107
- ### 字段标注类型
108
-
109
- | 标注 | 含义 | 在说明列中的写法 |
110
- |------|------|-----------------|
111
- | 新增字段 | 本次新增的入参或返回字段 | 追加 `【本次新增】` |
112
- | 字段修改 | 类型、校验规则、枚举值等有变化 | 追加 `【本次变更:具体改了什么】` |
113
- | 字段废弃 | 仍在返回但已不推荐使用 | 用删除线 + 追加 `【本次废弃】` |
114
- | 字段移除 | 不再返回或不再接受 | 从表中移除,在变更概览中说明 |
115
-
116
- ### 规则
117
-
118
- 1. 标注追加在说明文字末尾,用 `【】` 包裹,与正常说明文字区分。
119
- 2. 变更描述要**具体**:写"枚举值新增 3=待审核",不要只写"有变更"。
120
- 3. 下次提测时清除上一轮标注。
121
- 4. JSON 响应示例中不需要标注,以字段表为准。
122
-
123
- ---
124
-
125
- ## 四、操作流程
63
+ ## Field-Level Labels
126
64
 
127
- ### 4.1 首次编写 api.md(新模块)
65
+ In request and response field tables, append change notes to the description
66
+ column:
128
67
 
129
- 首次编写时不需要任何变更标注,因为没有"上一版"做对比。
130
- 文档正常编写即可,变更概览节写:
68
+ | Field | Type | Required | Description |
69
+ |-------|------|----------|-------------|
70
+ | `keyword` | String | No | Search keyword `[Added]` |
71
+ | `status` | Integer | No | Status enum `[Changed: adds 3=Pending Review]` |
72
+ | `oldField` | String | No | ~~Deprecated; use `newField`~~ `[Deprecated]` |
131
73
 
132
- ```markdown
133
- ## 0. 变更概览(本次提测变更)
134
-
135
- > 首个版本,全部接口为新增。详见接口列表。
136
- ```
74
+ Rules:
137
75
 
138
- ### 4.2 更新已有 api.md(迭代开发)
76
+ - Be concrete. Write what changed, not just "changed".
77
+ - Mark added, changed, deprecated, and removed fields.
78
+ - Remove prior delivery labels in the next delivery cycle.
79
+ - JSON examples do not need inline labels; field tables are the source of truth.
139
80
 
140
- 1. **读取当前 api.md**,识别所有接口和字段。
141
- 2. **对比代码变更**(git diff、接口实现变化、DTO 字段变化)确定变更范围。
142
- 3. **更新变更概览**:在 `## 0. 变更概览` 节中列出新增/修改/废弃的接口。
143
- 4. **添加接口级标签**:在变更接口的标题行后追加 `[新增]`/`[修改]`/`[废弃]`。
144
- 5. **添加字段级标注**:在变更字段的说明列末尾追加 `【本次新增】`/`【本次变更:...】`。
145
- 6. **清除上一轮标注**:删除上一轮提测的变更标签和字段标注。
146
- 7. **更新第 8 节历史表**:在文档末尾的变更记录表中追加一行。
81
+ ## Change Classification
147
82
 
148
- ### 4.3 推送飞书前检查
83
+ Mark a change when any of these happen:
149
84
 
150
- 推送前确认:
151
- - [ ] 变更概览节的版本号和日期已更新
152
- - [ ] 所有变更接口有标签
153
- - [ ] 所有变更字段有标注
154
- - [ ] 上一轮的标注已清除
155
- - [ ] 第 8 节历史表已追加
85
+ - API added, removed, or deprecated.
86
+ - Request parameter added, removed, renamed, made required, or made optional.
87
+ - Response field added, removed, renamed, or type-changed.
88
+ - Enum value added, removed, or meaning-changed.
89
+ - Validation rule, sorting, permission behavior, error code, or idempotency
90
+ behavior changes.
156
91
 
157
- ---
158
-
159
- ## 五、变更判定标准
160
-
161
- 以下情况算"变更",必须标注:
162
-
163
- | 变更类型 | 示例 |
164
- |----------|------|
165
- | 新增接口 | 新增 POST /api/xxx |
166
- | 删除接口 | 移除 GET /api/old |
167
- | 新增参数/字段 | 入参增加 keyword 字段 |
168
- | 删除参数/字段 | 不再返回 oldField |
169
- | 修改字段类型 | String → Long |
170
- | 修改枚举值 | status 新增值 3 |
171
- | 修改校验规则 | 长度限制从 64 改为 128 |
172
- | 修改必填状态 | 可选 → 必填 |
173
- | 修改行为逻辑 | 排序规则改变、权限逻辑变更 |
174
- | 修改错误码 | 新增错误码或修改错误码含义 |
175
-
176
- 以下情况**不算变更**,不需要标注:
177
- - 修正错别字
178
- - 调整文档格式
179
- - 补充边界说明(不改变接口行为)
180
- - curl 示例调整(不改变接口契约)
181
-
182
- ---
92
+ Do not mark a change for typo fixes, formatting, or explanatory notes that do
93
+ not change the contract.
183
94
 
184
- ## 六、与 SuperBridge Flow 流程的集成
95
+ ## Superflow Integration
185
96
 
186
- 本规范是 SuperBridge Flow 流程的一部分。在 `superflow-docs` 阶段生成 `api.md` 时:
97
+ During `superflow-docs`:
187
98
 
188
- 1. **首次生成**:按本规范第四条第 4.1 款处理,写首个版本标记。
189
- 2. **迭代更新**:按第四条第 4.2 款处理,对比已有 api.md 标注变更。
190
- 3. **推送飞书前**:按第四条第 4.3 款检查清单验证。
99
+ 1. If `api.md` is new, write "initial version" in the overview.
100
+ 2. If `api.md` exists, compare the current contract against the baseline and
101
+ update the overview plus inline labels.
102
+ 3. Before handoff, verify that frontend-facing changes are visible both in the
103
+ overview and near the affected API/field.
191
104
 
192
- SDD 的 `api-design-template.md` 中"第 8 节 接口变更记录"继续保留作为完整历史记录。
193
- 本规范新增的"第 0 节 变更概览"是提测时的增量视图,两者互补。
105
+ The full historical API change log can stay near the end of `api.md`; the
106
+ overview is the delivery-specific delta.
@@ -43,7 +43,7 @@ any full SDD document or implementation prompt is generated.
43
43
  - When a feature relies on a status, enum, sync field, derived field, default
44
44
  value, or compatibility behavior, freeze the business semantics before API or
45
45
  design freezing. Record:
46
- `真源字段 | 真源枚举 | 目标字段 | 目标枚举 | 消费方解释 | 业务依据 | 不确定项`.
46
+ `Source field | Source enum | Target field | Target enum | Consumer meaning | Business basis | Unknowns`.
47
47
  Do not treat non-null, present, successful, or "has any value" as correct.
48
48
  Do not accept fallback/default/keep-old-value behavior unless the requirement
49
49
  or owner explicitly approves it for dirty historical data or uncontrollable
@@ -119,11 +119,11 @@ Use the detailed workflow in:
119
119
  clarification questions.
120
120
  9. For database-backed behavior, add a table reverse impact table before
121
121
  freezing:
122
- `表/字段 | 写入方 | 读取/过滤方 | 跨仓/外部消费方 | 真实入口 | 反向状态场景 | 必测用例`.
122
+ `Table/field | Writer | Reader/filter | Cross-repo/external consumer | Real entry | Reverse-state scenario | Required test`.
123
123
  If any consumer or real entry is unknown, mark the feature blocked.
124
124
  10. For status/enum/sync/default behavior, add a semantic mapping table before
125
125
  freezing:
126
- `真源字段 | 真源枚举 | 目标字段 | 目标枚举 | 消费方解释 | 业务依据 | 不确定项`.
126
+ `Source field | Source enum | Target field | Target enum | Consumer meaning | Business basis | Unknowns`.
127
127
  If a proposed default, fallback, old-value retention, or null conversion is
128
128
  not explicitly approved by the requirement or owner, mark it rejected and do
129
129
  not include it in the design.
@@ -132,7 +132,7 @@ Use the detailed workflow in:
132
132
  13. Draft a rough API contract: path, action, core request, core response. Field types can be approximate.
133
133
  14. Wait for programmer confirmation of the rough API.
134
134
  15. Produce a precise API section with field names, types, requiredness, defaults, enums, errors, examples, and curl.
135
- 16. Mark the feature as `已冻结` only when understanding, rough API, precise API,
135
+ 16. Mark the feature as `frozen` only when understanding, rough API, precise API,
136
136
  and validation data needs are confirmed or explicitly blocked.
137
137
  17. Only after the current feature is frozen or blocked, move to the next
138
138
  indexed feature. Do not batch-confirm multiple features from memory or a
@@ -1,4 +1,4 @@
1
1
  interface:
2
2
  display_name: "SDD Clarify"
3
- short_description: "需求理解澄清、功能点串行门禁与 API 草案冻结阶段"
3
+ short_description: "Clarify requirements, confirm features one by one, and freeze API drafts"
4
4
  default_prompt: "Use $superflow-clarify to process this requirement one confirmed feature at a time before SDD docs."
@@ -1,4 +1,4 @@
1
1
  interface:
2
2
  display_name: "SDD Design"
3
- short_description: "用 Superpowers 生成源码级技术详设和反向影响面分析"
3
+ short_description: "Use Superpowers for source-level technical design and reverse impact analysis"
4
4
  default_prompt: "Use $superflow-design to create the Superpowers technical design after SDD contract docs are complete."
@@ -72,7 +72,7 @@ For complex requirements, verify these before writing docs:
72
72
  `$superflow-table-impact-analysis` when available.
73
73
  - For any status, enum, sync, derived, default, or compatibility behavior, the
74
74
  docs include business semantic evidence:
75
- `真源字段 | 真源枚举 | 目标字段 | 目标枚举 | 消费方解释 | 业务依据 | 不确定项`.
75
+ `Source field | Source enum | Target field | Target enum | Consumer meaning | Business basis | Unknowns`.
76
76
  If the docs only prove that a value exists, is non-null, or lets the request
77
77
  succeed, stop and return to `$superflow-clarify`. If fallback/default/keep-old-value
78
78
  behavior is proposed without explicit requirement or owner approval, stop.
@@ -121,7 +121,7 @@ For complex requirements, verify these before writing docs:
121
121
  DB/log evidence, and matching `test-report.md` section. If test data,
122
122
  token, device, third-party dependency, or environment is unavailable, mark
123
123
  that case `Blocked`/`Partially verified`; do not leave it as an open TODO.
124
- - `feature-gates.md` exists and the current feature is `已冻结`.
124
+ - `feature-gates.md` exists and the current feature is `frozen`.
125
125
  - `ui-contract.md` contains page-to-API/DTO/DB mapping.
126
126
  - `gap-analysis.md` has no unresolved blocker for the current feature.
127
127
  - A precise `api.md` section exists or can be generated from the confirmed API draft.
@@ -201,8 +201,8 @@ Use references only as needed:
201
201
  platform adapters, or configuration consumers are affected.
202
202
  - Do not freeze cross-module design from "this module can technically call it"
203
203
  evidence. `design.md` or `traceability-matrix.md` must include:
204
- `链路步骤 | 调用方向 | 业务入口 owner | 出口/适配 owner | 既有入口/出口 |
205
- 拟新增入口/出口 | 是否符合职责 | 证据锚点 | 禁止绕路`.
204
+ `Flow step | Call direction | Business-entry owner | Adapter owner | Existing entry/exit |
205
+ Proposed entry/exit | Responsibility fit | Evidence anchor | No bypass`.
206
206
  Outbound adapters, protocol translators, MQ notification consumers, and
207
207
  device gateways must not be promoted into business-entry orchestrators unless
208
208
  the contract says they own that entry and records approval.
@@ -213,33 +213,33 @@ Use references only as needed:
213
213
  turn an assumption into a requirement, table design, API contract, or prompt.
214
214
  - Do not finalize database-backed design from a forward-only flow. For each
215
215
  affected table/field, `design.md` or `traceability-matrix.md` must include:
216
- `表/字段 | 写入方 | 读取/过滤方 | 跨仓/外部消费方 | 真实入口 | 反向状态场景 | 必测用例`.
216
+ `Table/field | Writer | Reader/filter | Cross-repo/external consumer | Real entry | Reverse-state scenario | Required test`.
217
217
  Status fields must include recovery scenarios such as offline -> online,
218
218
  deleted -> restored, missing -> reappearing, and old invalid value -> valid
219
219
  after an upstream omission.
220
220
  - Do not finalize status/enum/sync/default design from "has a value" evidence.
221
221
  `design.md` or `traceability-matrix.md` must include:
222
- `真源字段 | 真源枚举 | 目标字段 | 目标枚举 | 消费方解释 | 业务依据 | 不确定项`.
222
+ `Source field | Source enum | Target field | Target enum | Consumer meaning | Business basis | Unknowns`.
223
223
  Default values, fallback values, null-to-available conversions, old-value
224
224
  retention, and alternative-field substitution are forbidden unless explicitly
225
225
  required for dirty historical data or uncontrollable external input. Approved
226
226
  compatibility must document:
227
- `兜底触发条件 | 业务依据 | 会掩盖的异常 | 监控/告警/暴露方式 | 移除条件 | owner确认`.
227
+ `Fallback trigger | Business basis | Masked anomaly | Monitoring/alert/exposure | Removal condition | Owner approval`.
228
228
  - `design.md`, `tests.md`, `sdd-quality-gate.md`, or `test-report.md` must name
229
- the relationship judgment as `确定/部分确定/不确定` when a bug fix hinges on
229
+ the relationship judgment as `confirmed/partially confirmed/unknown` when a bug fix hinges on
230
230
  existing data or call-chain behavior.
231
231
  - `design.md` must reference the frozen `api.md` fields and errors.
232
- - `design.md` must include a "字段语义合同" table for every risky field:
233
- `字段 | 来源表/DTO/事件 | 真实语义 | 目标字段 | 目标语义 | 是否可等价 |
234
- 证据锚点 | 禁止用法 | 不确定项/owner`.
235
- - `design.md` or `traceability-matrix.md` must include a "写入闭环" table for
232
+ - `design.md` must include a "Field Semantic Contract" table for every risky field:
233
+ `Field | Source table/DTO/event | Real semantics | Target field | Target semantics | Equivalent? |
234
+ Evidence anchor | Forbidden usage | Unknowns/owner`.
235
+ - `design.md` or `traceability-matrix.md` must include a "Write-Through Closure" table for
236
236
  every persisted or synchronized value:
237
- `业务动作 | Java setter/赋值点 | Converter/DTO 映射 | Mapper insert/update |
238
- DB column | 后续读取方 | 消费入口 | 验证 SQL | 测试用例`.
239
- - `design.md` must include a "真实入口调用链" table:
240
- `用户/外部动作 | 上游服务/接口 | 本仓入口 | MQ/异步回调 | 关键字段变化 |
241
- DB 状态 | 结算/通知/展示消费点 | 真实验证方式`.
242
- - `design.md` or `sdd-quality-gate.md` must include a "禁止 fallback 与猜测实现"
237
+ `Business action | Java setter/assignment | Converter/DTO mapping | Mapper insert/update |
238
+ DB column | Later reader | Consumer entry | Verification SQL | Test case`.
239
+ - `design.md` must include a "Real Entry Call Chain" table:
240
+ `User/external action | Upstream service/API | Current repo entry | MQ/async callback | Key field change |
241
+ DB state | Settlement/notification/display consumer | Real verification method`.
242
+ - `design.md` or `sdd-quality-gate.md` must include a "No Fallback Or Guesswork"
243
243
  section. It must explicitly list forbidden defaults, fallback queries,
244
244
  substitute fields, keep-old-value behavior, null conversion, and downstream
245
245
  compensation. Approved compatibility must include owner confirmation and
@@ -250,16 +250,16 @@ Use references only as needed:
250
250
  OpenSpec/SDD owns WHAT/API/DB/tests/gates; Superpowers owns source-level HOW,
251
251
  TDD/RED order, team split, worktree/port plan, and verification choreography.
252
252
  The final technical design is created by `$superflow-design`, not `$superflow-docs`.
253
- - `test-report.md` skeleton must include an "Agent 执行前自检" section with:
254
- `真实入口已定位 | 字段语义合同已核对 | 写入闭环已核对 |
255
- 禁止兜底边界已确认 | RED 测试已执行 | 允许修改文件 | 禁止修改文件 |
256
- 阻塞项`.
253
+ - `test-report.md` skeleton must include an "Agent Pre-Execution Self-Check" section with:
254
+ `Real entry located | Field semantic contract checked | Write-through closure checked |
255
+ No-fallback boundary confirmed | RED test executed | Allowed files | Forbidden files |
256
+ Blockers`.
257
257
  - `tasks.md`, `tests.md`, and later prompts must use the same field names as `api.md`.
258
258
  - `tests.md` is a pre-implementation contract. It must not be a vague checklist.
259
259
  Every case must include:
260
- `用例ID | 需求/Scenario | 层级L1/L2/L3/L4 | 前置数据 | 操作步骤 |
261
- 自动化命令 | 响应断言 | DB断言 | 日志断言 | RED预期失败 | GREEN预期通过 |
262
- test-report证据位置`.
260
+ `Case ID | Requirement/scenario | Level L1/L2/L3/L4 | Precondition data | Steps |
261
+ Automation command | Response assertion | DB assertion | Log assertion | RED expected failure | GREEN expected pass |
262
+ test-report evidence location`.
263
263
  - Each visible UI field, button action, list column, dropdown, and enum must map to API/DTO/DB/tests or be explicitly out of scope.
264
264
  - Every spec scenario must have at least one test case.
265
265
  - Every implementation batch must have at least one test that can fail before
@@ -290,8 +290,8 @@ Use references only as needed:
290
290
  CR/Px follow-ups: failing evidence before the fix, then the same path passing
291
291
  after the fix.
292
292
  - `test-report.md` skeleton must include these sections before implementation:
293
- `RED 失败证据`, `GREEN 通过证据`, `接口自动化证据`, `DB 核查证据`,
294
- `日志核查证据`, `未自动化/阻塞用例`, and `Partially verified 边界`.
293
+ `RED failure evidence`, `GREEN pass evidence`, `interface automation evidence`, `DB evidence`,
294
+ `log evidence`, `manual/blocking cases`, and `Partially verified boundary`.
295
295
  Each section must reference concrete `tests.md` case IDs.
296
296
  - `sdd-quality-gate.md` must include blocking checks for:
297
297
  executable tests frozen, RED/GREEN expectations present, interface automation
@@ -1,4 +1,4 @@
1
1
  interface:
2
2
  display_name: "SDD Docs"
3
- short_description: "基于冻结功能点生成 API 先行的完整 SDD 文档集"
3
+ short_description: "Generate API-first SDD document sets from frozen feature scope"
4
4
  default_prompt: "Use $superflow-docs to generate API-first OpenSpec SDD documents from the confirmed feature."