create-yss-spec 2.2.7 → 2.2.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/package.json +1 -1
- package/template/.agents/skills/maintaining-skills/SKILL.md +1 -1
- package/template/.agents/skills/yss-antd-design/references/evidence.md +4 -0
- package/template/.agents/skills/yss-design-system/SKILL.md +3 -1
- package/template/.agents/skills/yss-page-module-development/SKILL.md +1 -1
- package/template/.agents/skills/yss-product-lifecycle/SKILL.md +3 -1
- package/template/.agents/skills/yss-product-lifecycle/references/matt-yss-adapter.md +2 -2
- package/template/.agents/skills/yss-product-lifecycle/references/orchestration-contract.yaml +46 -1
- package/template/.agents/skills/yss-product-lifecycle/references/orchestration.md +6 -0
- package/template/.agents/skills/yss-prototype-stage/SKILL.md +11 -6
- package/template/.agents/skills/yss-prototype-stage/references/product-design-adapter.md +54 -0
- package/template/.agents/skills/yss-prototype-stage/scripts/prototype-contract.mjs +207 -0
- package/template/.agents/skills/yss-prototype-stage/tests/run-scenarios.mjs +154 -0
- package/template/.agents/skills/yss-router/references/boundaries.md +1 -1
- package/template/.agents/skills/yss-router/references/router-contract.yaml +30 -3
- package/template/.agents/skills/yss-router/references/slice-implementation-contract.md +14 -0
- package/template/.agents/skills/yss-router/references/yss-skill-execution-result.md +5 -0
- package/template/.agents/skills/yss-ui/references/antdv-compatibility.md +1 -1
- package/template/.claude/skills/maintaining-skills/SKILL.md +1 -1
- package/template/.claude/skills/yss-antd-design/references/evidence.md +4 -0
- package/template/.claude/skills/yss-design-system/SKILL.md +3 -1
- package/template/.claude/skills/yss-page-module-development/SKILL.md +1 -1
- package/template/.claude/skills/yss-product-lifecycle/SKILL.md +3 -1
- package/template/.claude/skills/yss-product-lifecycle/references/matt-yss-adapter.md +2 -2
- package/template/.claude/skills/yss-product-lifecycle/references/orchestration-contract.yaml +46 -1
- package/template/.claude/skills/yss-product-lifecycle/references/orchestration.md +6 -0
- package/template/.claude/skills/yss-prototype-stage/SKILL.md +11 -6
- package/template/.claude/skills/yss-prototype-stage/references/product-design-adapter.md +54 -0
- package/template/.claude/skills/yss-prototype-stage/scripts/prototype-contract.mjs +207 -0
- package/template/.claude/skills/yss-prototype-stage/tests/run-scenarios.mjs +154 -0
- package/template/.claude/skills/yss-router/references/boundaries.md +1 -1
- package/template/.claude/skills/yss-router/references/router-contract.yaml +30 -3
- package/template/.claude/skills/yss-router/references/slice-implementation-contract.md +14 -0
- package/template/.claude/skills/yss-router/references/yss-skill-execution-result.md +5 -0
- package/template/.claude/skills/yss-ui/references/antdv-compatibility.md +1 -1
- package/template/.codex/skills/maintaining-skills/SKILL.md +1 -1
- package/template/.codex/skills/yss-antd-design/references/evidence.md +4 -0
- package/template/.codex/skills/yss-design-system/SKILL.md +3 -1
- package/template/.codex/skills/yss-page-module-development/SKILL.md +1 -1
- package/template/.codex/skills/yss-product-lifecycle/SKILL.md +3 -1
- package/template/.codex/skills/yss-product-lifecycle/references/matt-yss-adapter.md +2 -2
- package/template/.codex/skills/yss-product-lifecycle/references/orchestration-contract.yaml +46 -1
- package/template/.codex/skills/yss-product-lifecycle/references/orchestration.md +6 -0
- package/template/.codex/skills/yss-prototype-stage/SKILL.md +11 -6
- package/template/.codex/skills/yss-prototype-stage/references/product-design-adapter.md +54 -0
- package/template/.codex/skills/yss-prototype-stage/scripts/prototype-contract.mjs +207 -0
- package/template/.codex/skills/yss-prototype-stage/tests/run-scenarios.mjs +154 -0
- package/template/.codex/skills/yss-router/references/boundaries.md +1 -1
- package/template/.codex/skills/yss-router/references/router-contract.yaml +30 -3
- package/template/.codex/skills/yss-router/references/slice-implementation-contract.md +14 -0
- package/template/.codex/skills/yss-router/references/yss-skill-execution-result.md +5 -0
- package/template/.codex/skills/yss-ui/references/antdv-compatibility.md +1 -1
- package/template/.cursor/skills/maintaining-skills/SKILL.md +1 -1
- package/template/.cursor/skills/yss-antd-design/references/evidence.md +4 -0
- package/template/.cursor/skills/yss-design-system/SKILL.md +3 -1
- package/template/.cursor/skills/yss-page-module-development/SKILL.md +1 -1
- package/template/.cursor/skills/yss-product-lifecycle/SKILL.md +3 -1
- package/template/.cursor/skills/yss-product-lifecycle/references/matt-yss-adapter.md +2 -2
- package/template/.cursor/skills/yss-product-lifecycle/references/orchestration-contract.yaml +46 -1
- package/template/.cursor/skills/yss-product-lifecycle/references/orchestration.md +6 -0
- package/template/.cursor/skills/yss-prototype-stage/SKILL.md +11 -6
- package/template/.cursor/skills/yss-prototype-stage/references/product-design-adapter.md +54 -0
- package/template/.cursor/skills/yss-prototype-stage/scripts/prototype-contract.mjs +207 -0
- package/template/.cursor/skills/yss-prototype-stage/tests/run-scenarios.mjs +154 -0
- package/template/.cursor/skills/yss-router/references/boundaries.md +1 -1
- package/template/.cursor/skills/yss-router/references/router-contract.yaml +30 -3
- package/template/.cursor/skills/yss-router/references/slice-implementation-contract.md +14 -0
- package/template/.cursor/skills/yss-router/references/yss-skill-execution-result.md +5 -0
- package/template/.cursor/skills/yss-ui/references/antdv-compatibility.md +1 -1
- package/template/.hermes/skills/maintaining-skills/SKILL.md +1 -1
- package/template/.hermes/skills/yss-antd-design/references/evidence.md +4 -0
- package/template/.hermes/skills/yss-design-system/SKILL.md +3 -1
- package/template/.hermes/skills/yss-page-module-development/SKILL.md +1 -1
- package/template/.hermes/skills/yss-product-lifecycle/SKILL.md +3 -1
- package/template/.hermes/skills/yss-product-lifecycle/references/matt-yss-adapter.md +2 -2
- package/template/.hermes/skills/yss-product-lifecycle/references/orchestration-contract.yaml +46 -1
- package/template/.hermes/skills/yss-product-lifecycle/references/orchestration.md +6 -0
- package/template/.hermes/skills/yss-prototype-stage/SKILL.md +11 -6
- package/template/.hermes/skills/yss-prototype-stage/references/product-design-adapter.md +54 -0
- package/template/.hermes/skills/yss-prototype-stage/scripts/prototype-contract.mjs +207 -0
- package/template/.hermes/skills/yss-prototype-stage/tests/run-scenarios.mjs +154 -0
- package/template/.hermes/skills/yss-router/references/boundaries.md +1 -1
- package/template/.hermes/skills/yss-router/references/router-contract.yaml +30 -3
- package/template/.hermes/skills/yss-router/references/slice-implementation-contract.md +14 -0
- package/template/.hermes/skills/yss-router/references/yss-skill-execution-result.md +5 -0
- package/template/.hermes/skills/yss-ui/references/antdv-compatibility.md +1 -1
- package/template/.pi/skills/maintaining-skills/SKILL.md +1 -1
- package/template/.pi/skills/yss-antd-design/references/evidence.md +4 -0
- package/template/.pi/skills/yss-design-system/SKILL.md +3 -1
- package/template/.pi/skills/yss-page-module-development/SKILL.md +1 -1
- package/template/.pi/skills/yss-product-lifecycle/SKILL.md +3 -1
- package/template/.pi/skills/yss-product-lifecycle/references/matt-yss-adapter.md +2 -2
- package/template/.pi/skills/yss-product-lifecycle/references/orchestration-contract.yaml +46 -1
- package/template/.pi/skills/yss-product-lifecycle/references/orchestration.md +6 -0
- package/template/.pi/skills/yss-prototype-stage/SKILL.md +11 -6
- package/template/.pi/skills/yss-prototype-stage/references/product-design-adapter.md +54 -0
- package/template/.pi/skills/yss-prototype-stage/scripts/prototype-contract.mjs +207 -0
- package/template/.pi/skills/yss-prototype-stage/tests/run-scenarios.mjs +154 -0
- package/template/.pi/skills/yss-router/references/boundaries.md +1 -1
- package/template/.pi/skills/yss-router/references/router-contract.yaml +30 -3
- package/template/.pi/skills/yss-router/references/slice-implementation-contract.md +14 -0
- package/template/.pi/skills/yss-router/references/yss-skill-execution-result.md +5 -0
- package/template/.pi/skills/yss-ui/references/antdv-compatibility.md +1 -1
- package/template/.qoder/skills/maintaining-skills/SKILL.md +1 -1
- package/template/.qoder/skills/yss-antd-design/references/evidence.md +4 -0
- package/template/.qoder/skills/yss-design-system/SKILL.md +3 -1
- package/template/.qoder/skills/yss-page-module-development/SKILL.md +1 -1
- package/template/.qoder/skills/yss-product-lifecycle/SKILL.md +3 -1
- package/template/.qoder/skills/yss-product-lifecycle/references/matt-yss-adapter.md +2 -2
- package/template/.qoder/skills/yss-product-lifecycle/references/orchestration-contract.yaml +46 -1
- package/template/.qoder/skills/yss-product-lifecycle/references/orchestration.md +6 -0
- package/template/.qoder/skills/yss-prototype-stage/SKILL.md +11 -6
- package/template/.qoder/skills/yss-prototype-stage/references/product-design-adapter.md +54 -0
- package/template/.qoder/skills/yss-prototype-stage/scripts/prototype-contract.mjs +207 -0
- package/template/.qoder/skills/yss-prototype-stage/tests/run-scenarios.mjs +154 -0
- package/template/.qoder/skills/yss-router/references/boundaries.md +1 -1
- package/template/.qoder/skills/yss-router/references/router-contract.yaml +30 -3
- package/template/.qoder/skills/yss-router/references/slice-implementation-contract.md +14 -0
- package/template/.qoder/skills/yss-router/references/yss-skill-execution-result.md +5 -0
- package/template/.qoder/skills/yss-ui/references/antdv-compatibility.md +1 -1
- package/template/.trae/skills/maintaining-skills/SKILL.md +1 -1
- package/template/.trae/skills/yss-antd-design/references/evidence.md +4 -0
- package/template/.trae/skills/yss-design-system/SKILL.md +3 -1
- package/template/.trae/skills/yss-page-module-development/SKILL.md +1 -1
- package/template/.trae/skills/yss-product-lifecycle/SKILL.md +3 -1
- package/template/.trae/skills/yss-product-lifecycle/references/matt-yss-adapter.md +2 -2
- package/template/.trae/skills/yss-product-lifecycle/references/orchestration-contract.yaml +46 -1
- package/template/.trae/skills/yss-product-lifecycle/references/orchestration.md +6 -0
- package/template/.trae/skills/yss-prototype-stage/SKILL.md +11 -6
- package/template/.trae/skills/yss-prototype-stage/references/product-design-adapter.md +54 -0
- package/template/.trae/skills/yss-prototype-stage/scripts/prototype-contract.mjs +207 -0
- package/template/.trae/skills/yss-prototype-stage/tests/run-scenarios.mjs +154 -0
- package/template/.trae/skills/yss-router/references/boundaries.md +1 -1
- package/template/.trae/skills/yss-router/references/router-contract.yaml +30 -3
- package/template/.trae/skills/yss-router/references/slice-implementation-contract.md +14 -0
- package/template/.trae/skills/yss-router/references/yss-skill-execution-result.md +5 -0
- package/template/.trae/skills/yss-ui/references/antdv-compatibility.md +1 -1
- package/template/AGENTS.md +5 -4
- package/template/CONTEXT.md +2 -2
- package/template/DESIGN.md +203 -0
- package/template/README.md +10 -11
- package/template/__yss_dotfile__.gitignore +1 -0
- package/template/docs/agents/digital-human-roles.md +1 -1
- package/template/docs/agents/digital-human-roles.yaml +17 -21
- package/template/docs/agents/skills-maintenance.md +2 -2
- package/template/docs/agents/yss-plugin-dependency-contract.md +45 -0
- package/template/docs/agents/yss-skill-registry.yaml +30 -1
- package/template/docs/api/templates/openapi-draft-review-checklist.md +2 -2
- package/template/docs/architecture/templates/engineering-baseline-review-template.md +19 -0
- package/template/docs/design/README.md +14 -3
- package/template/docs/design/design-system-sync.yaml +12 -0
- package/template/docs/design/design.md +69 -10
- package/template/docs/design/preview-dark.html +15 -0
- package/template/docs/design/preview.html +20 -0
- package/template/docs/design/templates/interaction-spec-template.md +2 -2
- package/template/docs/design/templates/prototype-confirmation-template.md +1 -1
- package/template/docs/design/templates/prototype-evidence-template.yaml +52 -10
- package/template/docs/design/tokens/.design-md-projection.json +13 -0
- package/template/docs/discovery/reports/agent-governance-options.md +71 -0
- package/template/docs/process/harness-process-tailoring.md +12 -5
- package/template/docs/process/lifecycle-registry-baseline.json +1 -1
- package/template/docs/process/lifecycle-registry.yaml +1 -1
- package/template/docs/process/template-engineering-overview.md +2 -2
- package/template/docs/process/template-verification-profiles.yaml +15 -1
- package/template/docs/process/templates/maintenance-checkpoint-template.yaml +3 -12
- package/template/docs/templates/build-architecture-checklist-template.md +2 -0
- package/template/docs/templates/implementation-routing-template.md +23 -0
- package/template/docs/templates/requirement-freeze-template.md +1 -1
- package/template/docs/user-guide//346/210/230/346/234/257/350/256/276/350/256/241/345/255/220/351/241/271/347/233/256/347/224/250/346/210/267/346/211/213/345/206/214.md +218 -0
- package/template/docs/user-guide//347/224/250/346/210/267/346/211/213/345/206/214.md +1014 -0
- package/template/docs/user-guide//347/224/250/346/210/267/346/211/213/345/206/214/347/264/242/345/274/225.md +15 -25
- package/template/scripts/lib/digital-human-roles.mjs +0 -1
- package/template/scripts/lib/maintenance-intensity.mjs +24 -10
- package/template/scripts/lib/skill-governance.mjs +19 -0
- package/template/scripts/lib/skill-registry.mjs +70 -0
- package/template/scripts/node-verify-lifecycle-registry.mjs +1 -1
- package/template/scripts/verify-digital-human-roles-scenarios +1 -1
- package/template/scripts/verify-template-verification-scenarios +5 -0
- package/template/scripts/verify-yss-prototype-contract-scenarios +2 -0
- package/template/skills-lock.json +8 -8
- package/template.manifest.json +1 -0
- package/template.snapshot.json +5 -5
- package/template/docs/user-guide/templates//347/224/250/346/210/267/346/211/213/345/206/214/346/250/241/346/235/277.md +0 -53
- package/template/docs/user-guide//344/272/247/345/223/201/347/224/237/345/221/275/345/221/250/346/234/237/345/267/245/344/275/234/346/265/201.md +0 -223
- package/template/docs/user-guide//344/272/247/345/223/201/347/240/224/345/217/221/345/205/250/347/224/237/345/221/275/345/221/250/346/234/237/346/234/200/344/275/263/345/256/236/350/267/265.md +0 -1115
- package/template/docs/user-guide//345/244/226/351/203/250/345/221/275/344/273/244/350/241/214/345/267/245/345/205/267/345/256/236/350/267/265/346/214/207/345/215/227.md +0 -117
- package/template/docs/user-guide//347/224/237/345/221/275/345/221/250/346/234/237/346/234/200/344/275/263/345/256/236/350/267/265.md +0 -584
- package/template/docs/user-guide//350/247/204/346/240/274/344/270/216/344/273/273/345/212/241/350/277/201/347/247/273/346/214/207/345/215/227.md +0 -44
- package/template/docs/user-guide//351/234/200/346/261/202/346/276/204/346/270/205/346/214/207/345/215/227.md +0 -230
- package/template/docs/user-guide//351/234/200/346/261/202/346/276/204/346/270/205/346/234/200/344/275/263/345/256/236/350/267/265.md +0 -275
|
@@ -1,584 +0,0 @@
|
|
|
1
|
-
# 全生命周期最佳实践
|
|
2
|
-
|
|
3
|
-
本文补充 [产品全生命周期使用手册](./产品生命周期工作流.md),用于约束长期使用这套模板时的工作习惯、质量门禁和常见反模式。
|
|
4
|
-
|
|
5
|
-
## 1. 核心原则
|
|
6
|
-
|
|
7
|
-
### 1.1 先稳定语言,再稳定实现
|
|
8
|
-
|
|
9
|
-
业务系统最怕“同一个东西有三个名字”。开始写代码前,先把稳定术语和 PascalCase `英文标识` 写进 `CONTEXT.md` 的 `## 业务术语`。
|
|
10
|
-
|
|
11
|
-
示例:
|
|
12
|
-
|
|
13
|
-
```text
|
|
14
|
-
模型 / Model、字段 / Field、草稿版本 / DraftVersion、发布版本 / PublishedVersion
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
如果一个术语还在讨论中,可以先放在 Spec 或 discovery 文档,不要急着写进 `CONTEXT.md`。
|
|
18
|
-
|
|
19
|
-
### 1.2 契约草案先评审,API Freeze 先于前后端实现
|
|
20
|
-
|
|
21
|
-
只要涉及前后端接口,就先形成 API 影响记录和契约草案;必要时在 `docs/.scratch/<feature>/api/*.yaml` 产出 review-only OpenAPI Draft。Draft 经过工程基线、系统 / 数据架构设计和设计审查反审后,才能冻结为 OpenAPI Freeze,再实现前后端或生成客户端。
|
|
22
|
-
|
|
23
|
-
这能避免:
|
|
24
|
-
|
|
25
|
-
- 后端 DTO 和前端类型不一致。
|
|
26
|
-
- 错误响应没有统一结构。
|
|
27
|
-
- 分页、排序、筛选字段反复改。
|
|
28
|
-
- 实施文档和真实接口脱节。
|
|
29
|
-
|
|
30
|
-
Draft 阶段允许调整接口,但不能被当成稳定实现契约;Freeze 之后的契约变更必须回到工程基线、系统 / 数据架构设计和设计审查点,不能边写代码边悄悄改接口。
|
|
31
|
-
|
|
32
|
-
### 1.3 工程基线先于业务代码
|
|
33
|
-
|
|
34
|
-
编码规范分三层维护:
|
|
35
|
-
|
|
36
|
-
| 层级 | 放什么 | 不放什么 |
|
|
37
|
-
|---|---|---|
|
|
38
|
-
| `AGENTS.md` | Agent 启动即必须遵守的工程约束、技能入口和阶段门禁 | 完整代码手册、临时实现细节 |
|
|
39
|
-
| YSS skills | DDD 脚手架、分层职责、命名、Repository、MapStruct、统一响应等细则 | 单个功能的临时取舍 |
|
|
40
|
-
| `docs/.scratch/<feature>/architecture/` / ADR | 本次变更的模块边界、状态流、风险取舍和回滚策略 | 全局编码规则的重复副本 |
|
|
41
|
-
|
|
42
|
-
从零创建后端服务时,工程基线由 `yss-ddd-scaffold-generator` 产出;设计和审查阶段用 `yss-backend-scaffold-parent` 校验。功能开发阶段只补充本次变更需要的局部约束,不重新发明分层架构。
|
|
43
|
-
|
|
44
|
-
如果功能已有高保真原型和用户确认,原型确认后先完成工程基线和脚手架受控生成合同;合同经生命周期批准/持久化后再生成后端脚手架,顺序为:`engineering-baseline -> yss-router scaffold-contract -> lifecycle approval -> yss-ddd-scaffold-generator -> yss-backend-scaffold-parent -> yss-router`。脚手架合同必须记录 `contract_id`、`contract_version`、Router draft、生命周期批准、持久化引用、允许写路径和预期证据。脚手架只生成工程骨架和机械模板;所有后续生成的后端代码都必须消费批准且版本当前的 Slice Implementation Contract、对应 YSS skills 和 YSS Skill Execution Result。
|
|
45
|
-
|
|
46
|
-
### 1.4 一个垂直切片 Ticket 只解决一个目标
|
|
47
|
-
|
|
48
|
-
垂直切片 Ticket 应该围绕一个清晰目标。
|
|
49
|
-
|
|
50
|
-
好的 change:
|
|
51
|
-
|
|
52
|
-
```text
|
|
53
|
-
实现模型发布与版本冻结
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
过大的 change:
|
|
57
|
-
|
|
58
|
-
```text
|
|
59
|
-
实现数据中台模型管理、指标管理、血缘分析和权限审批
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
如果一个 Ticket 需要多天都说不清完成标准,通常应该拆分。
|
|
63
|
-
|
|
64
|
-
### 1.5 用垂直切片交付,不按技术层横切
|
|
65
|
-
|
|
66
|
-
每个任务都应该能独立验收。
|
|
67
|
-
|
|
68
|
-
推荐:
|
|
69
|
-
|
|
70
|
-
```text
|
|
71
|
-
创建模型草稿:API + Domain 行为 + GatewayImpl / Repository + 前端弹窗 + 测试 + 验收
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
不推荐:
|
|
75
|
-
|
|
76
|
-
```text
|
|
77
|
-
写所有 Adapter
|
|
78
|
-
写所有 Application / Domain
|
|
79
|
-
写所有页面
|
|
80
|
-
```
|
|
81
|
-
|
|
82
|
-
### 1.6 人类保留最终决策权
|
|
83
|
-
|
|
84
|
-
AI 可以生成方案、代码、测试和报告,但这些决策必须由人确认:
|
|
85
|
-
|
|
86
|
-
- 产品优先级。
|
|
87
|
-
- 架构方向。
|
|
88
|
-
- 发布范围。
|
|
89
|
-
- 风险 / 回滚约束。
|
|
90
|
-
- 数据库迁移。
|
|
91
|
-
- 认证授权。
|
|
92
|
-
- 公共基础库 API。
|
|
93
|
-
- 加密算法相关内容。
|
|
94
|
-
|
|
95
|
-
存在需要人工确认的风险时,文档或代码中必须记录范围、责任人和结论。
|
|
96
|
-
|
|
97
|
-
### 1.7 机会探索先于 Spec
|
|
98
|
-
|
|
99
|
-
进入 Spec 前先完成机会探索环。它不是固定的“头脑风暴 → 发现”单向步骤,而是把事实、假设和 MVP 边界来回校准:
|
|
100
|
-
|
|
101
|
-
```text
|
|
102
|
-
市场 / 竞品 / 用户事实 <-> 机会构想假设 <-> MVP 边界
|
|
103
|
-
```
|
|
104
|
-
|
|
105
|
-
竞品分析不是“多收集一些参考资料”,而是正式输入:
|
|
106
|
-
|
|
107
|
-
- 用竞品矩阵识别行业基础能力。
|
|
108
|
-
- 用功能空白区识别差异化机会。
|
|
109
|
-
- 用竞品流程反推用户已习惯的交互和术语。
|
|
110
|
-
- 用竞品缺陷约束自己的非目标范围。
|
|
111
|
-
|
|
112
|
-
竞品结论必须落到 MVP 边界、用户故事或非目标范围里,否则只是背景材料。
|
|
113
|
-
|
|
114
|
-
常见入口:
|
|
115
|
-
|
|
116
|
-
- 只有模糊想法:先机会构想,再用 Discovery 验证。
|
|
117
|
-
- 已有行业、竞品或用户材料:先 Discovery,再生成候选方案。
|
|
118
|
-
- 明确 Bug 或小调整:不走完整机会探索,直接进入 hotfix / tweak。
|
|
119
|
-
|
|
120
|
-
## 2. 推荐工作模式
|
|
121
|
-
|
|
122
|
-
### 2.1 完整功能
|
|
123
|
-
|
|
124
|
-
适用于新模块、新页面、API 变更、跨模块能力。
|
|
125
|
-
|
|
126
|
-
```text
|
|
127
|
-
opportunity exploration
|
|
128
|
-
-> grill-with-docs
|
|
129
|
-
-> Spec
|
|
130
|
-
-> API impact / contract draft
|
|
131
|
-
-> Engineering Baseline / DDD Review
|
|
132
|
-
-> Architecture / 系统 / 数据架构设计
|
|
133
|
-
-> Design Review
|
|
134
|
-
-> OpenAPI Freeze
|
|
135
|
-
-> to-tickets
|
|
136
|
-
-> implement / tdd
|
|
137
|
-
-> code-review
|
|
138
|
-
-> fresh verification
|
|
139
|
-
-> release / retro
|
|
140
|
-
```
|
|
141
|
-
|
|
142
|
-
要求:
|
|
143
|
-
|
|
144
|
-
- 有机会探索结论,或明确说明无需市场 / 竞品 / 用户输入。
|
|
145
|
-
- Spec 前已用 `grill-with-docs` 澄清关键边界,或已有等价的确认记录。
|
|
146
|
-
- 有 Spec。
|
|
147
|
-
- 有 API 影响分析 / 契约草案 / OpenAPI Freeze 判断;涉及接口时已有影响记录和契约草案 / review-only Draft,并在开发前 Freeze。
|
|
148
|
-
- 有 YSS DDD 工程基线判断;后端新服务或新模块已选择对应 YSS skills。
|
|
149
|
-
- 有设计审查结论;阻断项已经回到对应阶段修正。
|
|
150
|
-
- 有验收标准。
|
|
151
|
-
- 有测试决策。
|
|
152
|
-
- 有发布 / 复盘收口记录。
|
|
153
|
-
|
|
154
|
-
### 2.1.1 小迭代从最近可信阶段延伸
|
|
155
|
-
|
|
156
|
-
已有功能的小需求变更不需要从机会探索重新走一遍。先判断现有资产可信到哪一层,再从最早受影响的阶段继续:
|
|
157
|
-
|
|
158
|
-
| 影响类型 | 从哪里继续 | 需要补什么 |
|
|
159
|
-
|---|---|---|
|
|
160
|
-
| 文案、样式、局部配置 | tweak / 最小改动 | 验证记录 |
|
|
161
|
-
| 页面状态、交互、字段展示 | 产品设计 / 原型评审 | 交互说明、状态矩阵、Spec 回填项 |
|
|
162
|
-
| 验收标准、业务规则、非目标边界 | Spec 校准 | Spec 更新、产品总体设计影响 |
|
|
163
|
-
| 请求 / 响应 / 错误 / 权限 / 分页 | API 影响分析 / 契约草案 / OpenAPI Draft Review | 契约更新、Freeze 记录、契约测试 |
|
|
164
|
-
| 状态机、服务边界、集成、NFR、回滚 | 系统概要设计 / Design Review | 架构影响、ADR 候选、验证方案 |
|
|
165
|
-
| 持久化、元模型、版本、血缘、查询、索引 | 数据架构 / Design Review | 数据模型、迁移约束、人工审查点 |
|
|
166
|
-
|
|
167
|
-
只有当小迭代推翻了用户、痛点、MVP、非目标或产品边界,才回到 Discovery / 业务架构 / Spec 初稿阶段。
|
|
168
|
-
|
|
169
|
-
### 2.2 小调整
|
|
170
|
-
|
|
171
|
-
适用于文案、局部样式、已有配置值调整。
|
|
172
|
-
|
|
173
|
-
```text
|
|
174
|
-
/直接最小改动 调整模型列表空状态文案
|
|
175
|
-
```
|
|
176
|
-
|
|
177
|
-
如果改动扩散到多个模块、新增配置项或影响规格,升级到最早受影响阶段并补齐下游门禁。
|
|
178
|
-
|
|
179
|
-
### 2.3 小范围 bug
|
|
180
|
-
|
|
181
|
-
适用于可复现、范围明确、不引入新 API 的 bug。
|
|
182
|
-
|
|
183
|
-
```text
|
|
184
|
-
/diagnosing-bugs 修复模型校验失败后按钮没有恢复的问题
|
|
185
|
-
```
|
|
186
|
-
|
|
187
|
-
要求:
|
|
188
|
-
|
|
189
|
-
- 先建立复现命令或复现步骤。
|
|
190
|
-
- 先写失败测试或明确验证方式。
|
|
191
|
-
- 修复后补充回归验证。
|
|
192
|
-
|
|
193
|
-
如果 bug 修复引出新业务规则,升级到 Spec 校准、产品总体设计、OpenAPI 或系统概要设计等最早受影响阶段。
|
|
194
|
-
|
|
195
|
-
### 2.4 探索和 spike
|
|
196
|
-
|
|
197
|
-
适用于不确定是否要做、如何做、影响多大。
|
|
198
|
-
|
|
199
|
-
```text
|
|
200
|
-
请 explore “模型版本是否允许回滚”的业务流程、API 影响和实施风险。
|
|
201
|
-
```
|
|
202
|
-
|
|
203
|
-
探索阶段可以输出方案和建议,但不要直接改业务代码。
|
|
204
|
-
|
|
205
|
-
## 3. 文档资产规范
|
|
206
|
-
|
|
207
|
-
### 3.1 推荐命名
|
|
208
|
-
|
|
209
|
-
| 类型 | 命名 |
|
|
210
|
-
|---|---|
|
|
211
|
-
| 竞品矩阵 | `docs/.scratch/<feature>/discovery/reports/<feature>-competitive-matrix.md` |
|
|
212
|
-
| Spec | `docs/.scratch/<feature>/spec.md` |
|
|
213
|
-
| OpenAPI | `docs/.scratch/<feature>/api/<feature>.yaml` |
|
|
214
|
-
| 技术方案 | `docs/.scratch/<feature>/architecture/<feature>-architecture.md` |
|
|
215
|
-
| ADR | `docs/adr/0001-<decision>.md` |
|
|
216
|
-
| 发布说明 | `docs/releases/v<version>-<topic>.md` |
|
|
217
|
-
| 实施记录 | `docs/implementation/<customer-or-env>-<topic>.md` |
|
|
218
|
-
|
|
219
|
-
名称使用英文 kebab-case,正文可以中文。
|
|
220
|
-
|
|
221
|
-
### 3.2 每类文档只承担一个职责
|
|
222
|
-
|
|
223
|
-
| 文档 | 应该写 | 不应该写 |
|
|
224
|
-
|---|---|---|
|
|
225
|
-
| `CONTEXT.md` | 稳定术语与英文标识词干 | 临时计划、类全名、表名、代码路径 |
|
|
226
|
-
| Competitive Matrix | 竞品功能、差异化机会、MVP 边界输入 | 未验证事实、营销文案堆砌 |
|
|
227
|
-
| Spec | 用户问题、范围、验收 | 详细实现代码 |
|
|
228
|
-
| OpenAPI | 接口契约 | 页面交互细节 |
|
|
229
|
-
| Architecture | 模块边界、数据流、风险 | 业务长篇背景 |
|
|
230
|
-
| ADR | 难回滚、有取舍的决策 | 常规实现选择 |
|
|
231
|
-
| Release Note | 发布影响、升级、回滚 | 未完成需求 |
|
|
232
|
-
|
|
233
|
-
### 3.3 文档要互相链接
|
|
234
|
-
|
|
235
|
-
一个功能的主链路建议这样互链:
|
|
236
|
-
|
|
237
|
-
```text
|
|
238
|
-
Competitive Matrix
|
|
239
|
-
-> Discovery
|
|
240
|
-
-> CONTEXT
|
|
241
|
-
-> Spec
|
|
242
|
-
-> API impact / contract draft
|
|
243
|
-
-> Architecture / ADR / 系统 / 数据架构设计
|
|
244
|
-
-> OpenAPI Freeze
|
|
245
|
-
-> 垂直切片 Ticket
|
|
246
|
-
-> Tickets
|
|
247
|
-
-> Release Note
|
|
248
|
-
-> User Guide
|
|
249
|
-
```
|
|
250
|
-
|
|
251
|
-
这样后续你或 AI 能从任何入口追溯完整上下文。
|
|
252
|
-
|
|
253
|
-
## 4. YSS 技能路由与落地顺序
|
|
254
|
-
|
|
255
|
-
### 4.1 先用 yss-router 选最小技能集
|
|
256
|
-
|
|
257
|
-
当任务跨前端、后端、组件、API 或代码生成时,先用 `yss-router` 判断技能组合。原则是先选一个主技能,再按明确需要补充副技能。
|
|
258
|
-
|
|
259
|
-
| 场景 | 主技能 | 常见补充 |
|
|
260
|
-
|---|---|---|
|
|
261
|
-
| 新建完整 Vue 业务页面 | `yss-ui` | `yss-page-module-development`、`yss-openapi-governance`、`yss-api-integration` |
|
|
262
|
-
| YTable / YTree / YssFormily 页面 | `yss-ui` | `yss-use-table-height`、`yss-use-tree-height`、`yss-formily` |
|
|
263
|
-
| 从零创建后端服务 | `yss-ddd-scaffold-generator` | 后续接 `yss-domain`、`yss-repository`、`yss-web-controller` |
|
|
264
|
-
| 领域建模和状态规则 | `yss-domain` | — |
|
|
265
|
-
| PO / Repository / GatewayImpl | `yss-repository` | `yss-mybatis` |
|
|
266
|
-
| Controller / DTO / VO / Web Convertor | `yss-web-controller` | `yss-dto` |
|
|
267
|
-
| MyBatis 分页、批量、多数据源或排障 | `yss-mybatis` | `yss-source-index` |
|
|
268
|
-
|
|
269
|
-
禁止因为“这是 YSS 项目”就一次性加载所有 YSS skills。只有需求涉及具体实现细节时,才加载对应专项技能。
|
|
270
|
-
|
|
271
|
-
### 4.2 前端必须按 yss-ui 落地
|
|
272
|
-
|
|
273
|
-
Vue + AntDV 页面优先复用 YSS UI 体系:
|
|
274
|
-
|
|
275
|
-
- YSS 已封装场景优先 `@yss-ui/components`,再考虑 `ant-design-vue`。
|
|
276
|
-
- 页面目录建议采用 `components/`、`hooks/`、`schemas/`、`index.vue`、`style.less`。
|
|
277
|
-
- `index.vue` 只负责页面编排和事件转发。
|
|
278
|
-
- 查询表单优先 `YssFormily` schema 驱动。
|
|
279
|
-
- 表格优先 `YTable`,列定义必须用 `field/type`,插槽使用字段同名插槽。
|
|
280
|
-
- 请求统一下沉到 `hooks/useXxx.ts`,使用 `vue-hooks-plus` 的 `useRequest`,并包含成功和失败兜底。
|
|
281
|
-
- 用 `currentParams` 作为查询、分页、导出、刷新的参数单一来源。
|
|
282
|
-
- 有表格高度自适应时用 `useTableHeight`,有树高度自适应时用 `useTreeHeight`。
|
|
283
|
-
- 页面至少覆盖 `loading`、`empty`、`error`、`selected` 状态。
|
|
284
|
-
- 路由菜单标题放 `meta.title`,非主菜单详情页使用 `MENU_TYPE.INNER_MENU`。
|
|
285
|
-
|
|
286
|
-
前端完成定义:
|
|
287
|
-
|
|
288
|
-
- [ ] 页面结构符合 YSS 目录和职责边界。
|
|
289
|
-
- [ ] YTable 使用 `field/type` 与字段同名插槽。
|
|
290
|
-
- [ ] YssFormily schema 和 scope 清晰。
|
|
291
|
-
- [ ] useRequest 请求、分页和参数治理已下沉 Hook。
|
|
292
|
-
- [ ] useTableHeight / useTreeHeight 绑定的是容器 ref。
|
|
293
|
-
- [ ] API / Mock / 路由菜单约定已对齐。
|
|
294
|
-
|
|
295
|
-
### 4.3 后端按 YSS DDD 顺序推进
|
|
296
|
-
|
|
297
|
-
从零创建后端服务时先确认项目名、基础包名、输出目录和数据库类型,由 `yss-router` 编译结构化脚手架工作单元合同并经生命周期批准、持久化为 JSON 后,再使用 `yss-ddd-scaffold-generator --contract-file ...` 生成骨架。生成后再业务化定制,不要把脚手架直接当最终代码;原型确认后的脚手架必须先经过 `yss-backend-scaffold-parent` 和 `yss-router` 合同重编译。
|
|
298
|
-
|
|
299
|
-
如果只是开发现有服务中的一个功能,不需要重新生成全量脚手架;先读取 `yss-backend-scaffold-parent` 和对应层级 skill,确认本次变更落在哪些层。
|
|
300
|
-
|
|
301
|
-
推荐顺序:
|
|
302
|
-
|
|
303
|
-
```text
|
|
304
|
-
yss-router(脚手架合同)
|
|
305
|
-
-> 生命周期批准 / 持久化
|
|
306
|
-
-> yss-ddd-scaffold-generator
|
|
307
|
-
-> yss-backend-scaffold-parent
|
|
308
|
-
-> yss-router(合同重编译)
|
|
309
|
-
-> yss-domain / yss-application / yss-repository / yss-web-controller
|
|
310
|
-
-> yss-repository
|
|
311
|
-
-> yss-mybatis
|
|
312
|
-
-> yss-web-controller
|
|
313
|
-
```
|
|
314
|
-
|
|
315
|
-
脚手架和后续代码生成的边界:领域规则、状态机、权限、事务、复杂查询和错误映射必须拆成 `behavior-tdd` 垂直切片;只有工程结构、样板、配置和冻结客户端可使用 `controlled-generation`。`./mvnw validate` 通过不能替代合同批准或 `ready-for-agent`;三条 `./mvnw` 命令必须真实执行并记录 `exit_code`、`duration_ms`、stdout/stderr 引用和执行时间,生成器打印命令不算验证证据。
|
|
316
|
-
|
|
317
|
-
领域层:
|
|
318
|
-
|
|
319
|
-
- 先抽业务术语、聚合边界和状态变化。
|
|
320
|
-
- 数据库字段只做补充,不直接决定领域对象。
|
|
321
|
-
- Domain 层不依赖 Repository、Mapper、Controller。
|
|
322
|
-
- 关键状态流转用领域方法表达,例如 `publish()`、`cancel()`、`terminate()`。
|
|
323
|
-
- Cmd 继承 `CommandDTO`,分页 Query 继承 `PageQuery`,普通 Query 继承 `QueryDTO`。
|
|
324
|
-
- Cmd 必须使用 JSR-303/380 注解校验。
|
|
325
|
-
- Gateway 定义在 Domain 层,方法命名体现领域能力。
|
|
326
|
-
|
|
327
|
-
持久层:
|
|
328
|
-
|
|
329
|
-
- 已有 Domain 模型后再用 `yss-repository` 补 `PO / Repository / Convertor / GatewayImpl`。
|
|
330
|
-
- Gateway 定义在 Domain,实现放在 Infrastructure。
|
|
331
|
-
- Convertor 优先 MapStruct。
|
|
332
|
-
- 逻辑删除、审计字段、主键策略要显式处理。
|
|
333
|
-
- 涉及 BaseRepository、BasePlusRepository、PageQuery、多数据源或批量插入时加载 `yss-mybatis`。
|
|
334
|
-
- 分页查询沿用 `PageQuery` 传递链路,不在 Repository 内发明临时分页参数。
|
|
335
|
-
|
|
336
|
-
Web 层:
|
|
337
|
-
|
|
338
|
-
- 有稳定领域模型或 metadata 后再用 `yss-web-controller`。
|
|
339
|
-
- 优先运行生成脚本,再按项目规范少量手调。
|
|
340
|
-
- Controller 默认依赖 Domain Gateway,不穿透 Repository。
|
|
341
|
-
- 返回结构保持 `SingleResult`、`PageResult`、`MultiResult` 体系。
|
|
342
|
-
- 复杂接口不要承诺脚本自动覆盖全部业务逻辑。
|
|
343
|
-
|
|
344
|
-
后端完成定义:
|
|
345
|
-
|
|
346
|
-
- [ ] 多模块依赖仍符合 Domain、Application、Infrastructure、Adapter、Bootstrap 分层。
|
|
347
|
-
- [ ] Domain 没有依赖 Infrastructure 或 Web。
|
|
348
|
-
- [ ] Gateway 边界清晰,未泄漏持久化细节。
|
|
349
|
-
- [ ] Repository / Mapper / XML / Convertor 命名和路径对齐。
|
|
350
|
-
- [ ] PageQuery、批量、多数据源等 MyBatis 机制未重复造轮子。
|
|
351
|
-
- [ ] Controller 返回包装和 API 路径符合项目既有规范。
|
|
352
|
-
|
|
353
|
-
## 5. Java + Vue + AntDV 落地建议
|
|
354
|
-
|
|
355
|
-
### 5.1 后端
|
|
356
|
-
|
|
357
|
-
保持 YSS DDD 分层清晰:
|
|
358
|
-
|
|
359
|
-
```text
|
|
360
|
-
Web Adapter
|
|
361
|
-
-> Application Use Case / Command Handler
|
|
362
|
-
-> Domain Model / Domain Service
|
|
363
|
-
-> Domain Gateway
|
|
364
|
-
-> Infrastructure GatewayImpl / Repository
|
|
365
|
-
```
|
|
366
|
-
|
|
367
|
-
建议:
|
|
368
|
-
|
|
369
|
-
- Controller / Web Adapter 只处理协议适配、参数校验和响应包装。
|
|
370
|
-
- Application 层负责用例编排、事务边界和 Command / Query 处理。
|
|
371
|
-
- Domain 层承载聚合、实体、值对象、领域服务和 Gateway 接口。
|
|
372
|
-
- Infrastructure 层实现 GatewayImpl、Repository、Mapper 和外部服务适配。
|
|
373
|
-
- CMD、Query、VO 与 OpenAPI schema 保持一致。
|
|
374
|
-
- Domain / Application 行为测试覆盖核心业务规则。
|
|
375
|
-
- API 测试覆盖契约、错误响应和权限行为。
|
|
376
|
-
|
|
377
|
-
### 5.2 前端
|
|
378
|
-
|
|
379
|
-
建议从 OpenAPI 契约派生 API 类型或接口封装。
|
|
380
|
-
|
|
381
|
-
页面结构建议:
|
|
382
|
-
|
|
383
|
-
```text
|
|
384
|
-
api client
|
|
385
|
-
-> composable / page service
|
|
386
|
-
-> AntDV table / form / modal / drawer
|
|
387
|
-
-> error state / empty state / loading state
|
|
388
|
-
```
|
|
389
|
-
|
|
390
|
-
模型管理类页面要特别关注:
|
|
391
|
-
|
|
392
|
-
- 列表筛选条件是否可恢复。
|
|
393
|
-
- 表格列是否适合实施人员排查问题。
|
|
394
|
-
- 表单校验是否能定位到字段。
|
|
395
|
-
- 发布失败是否能展示字段级错误。
|
|
396
|
-
- 禁用、只读、无权限状态是否明确。
|
|
397
|
-
- 大字段列表是否支持批量操作或导入。
|
|
398
|
-
|
|
399
|
-
### 5.3 前后端协作
|
|
400
|
-
|
|
401
|
-
推荐顺序:
|
|
402
|
-
|
|
403
|
-
```text
|
|
404
|
-
OpenAPI Freeze
|
|
405
|
-
-> 后端契约测试
|
|
406
|
-
-> YSS DDD 后端实现
|
|
407
|
-
-> 前端 API 类型
|
|
408
|
-
-> 前端页面
|
|
409
|
-
-> E2E 关键路径
|
|
410
|
-
```
|
|
411
|
-
|
|
412
|
-
如果前端先做原型,也要在进入开发前回填 OpenAPI 和 Spec。
|
|
413
|
-
|
|
414
|
-
## 6. 质量门禁
|
|
415
|
-
|
|
416
|
-
### 6.1 进入开发前
|
|
417
|
-
|
|
418
|
-
- [ ] 已有机会探索结论,或明确说明无需市场 / 竞品 / 用户输入。
|
|
419
|
-
- [ ] Spec 已说明问题、范围和验收标准。
|
|
420
|
-
- [ ] OpenAPI 影响为“无”或已有 Draft,并在开发前 Freeze。
|
|
421
|
-
- [ ] 后端新服务或新模块已完成 YSS DDD 工程基线确认。
|
|
422
|
-
- [ ] Spec / API / 工程基线 / Architecture / Plan 的阻断审查项已关闭。
|
|
423
|
-
- [ ] 主要测试 seam 已明确。
|
|
424
|
-
- [ ] 风险 / 回滚约束已检查。
|
|
425
|
-
- [ ] 垂直切片已经足够小。
|
|
426
|
-
- [ ] YSS 技能集已通过 `yss-router` 或明确专项技能选择确定。
|
|
427
|
-
|
|
428
|
-
### 6.2 合并前
|
|
429
|
-
|
|
430
|
-
- [ ] 相关测试已通过。
|
|
431
|
-
- [ ] OpenAPI 与实现一致。
|
|
432
|
-
- [ ] 前端错误态、空态、加载态已处理。
|
|
433
|
-
- [ ] 前端页面符合 `yss-ui` 的组件、Hook、分页和高度治理规范。
|
|
434
|
-
- [ ] 后端代码符合 YSS DDD 分层、Gateway、Repository、Controller 边界。
|
|
435
|
-
- [ ] 实现者没有审查自己的代码;独立 Review 的阻断项已关闭。
|
|
436
|
-
- [ ] 如果涉及权限、认证、SQL、迁移、加密或公共 API 时,已记录风险判断和验证证据。
|
|
437
|
-
- [ ] 没有调试代码。
|
|
438
|
-
- [ ] 任务清单已更新。
|
|
439
|
-
- [ ] 如果术语或规则变化,已更新 `CONTEXT.md`(业务术语含 `英文标识`)或 Spec。
|
|
440
|
-
|
|
441
|
-
### 6.3 发布前
|
|
442
|
-
|
|
443
|
-
- [ ] 发布说明已写。
|
|
444
|
-
- [ ] 实施步骤已写。
|
|
445
|
-
- [ ] 回滚方案已写。
|
|
446
|
-
- [ ] 已知风险已写。
|
|
447
|
-
- [ ] 验收清单已写。
|
|
448
|
-
- [ ] 需要人工审查的项已确认。
|
|
449
|
-
|
|
450
|
-
### 6.4 归档前
|
|
451
|
-
|
|
452
|
-
- [ ] 垂直切片任务全部完成或明确取消。
|
|
453
|
-
- [ ] 必要的 Spec Delta 已与 Spec / OpenAPI / Ticket 互链。
|
|
454
|
-
- [ ] 验证结果已记录。
|
|
455
|
-
- [ ] 经验已沉淀到 `AGENTS.md`、`CONTEXT.md` 或 ADR。
|
|
456
|
-
|
|
457
|
-
使用 Ticket 追踪时,发布前应确认所有垂直切片任务已完成或明确取消,并记录验证与回滚结论。
|
|
458
|
-
|
|
459
|
-
## 7. 常见反模式
|
|
460
|
-
|
|
461
|
-
| 反模式 | 后果 | 修正方式 |
|
|
462
|
-
|---|---|---|
|
|
463
|
-
| 跳过竞品分析直接定 MVP | 容易重复造已有弱功能,差异化不足 | 先产出竞品矩阵和机会清单 |
|
|
464
|
-
| 只在聊天里讲需求 | 后续无法追溯,AI 容易遗忘 | 写入 Spec、Spec Delta 或 Ticket |
|
|
465
|
-
| 先写页面再补接口 | 字段和错误结构反复返工 | 先写 OpenAPI |
|
|
466
|
-
| 按层拆任务 | 做了很多代码但无法演示 | 按垂直切片拆 |
|
|
467
|
-
| 不经 yss-router 随手选技能 | 规范加载过多或漏掉关键约束 | 先选最小技能集 |
|
|
468
|
-
| 把完整编码手册塞进 AGENTS.md | 入口指令变长且容易和 YSS skills 冲突 | AGENTS.md 放入口约束,细则放 skills / docs |
|
|
469
|
-
| 新后端服务绕过脚手架手搓结构 | 模块依赖和命名不一致 | 先用 `yss-ddd-scaffold-generator`,再业务化定制 |
|
|
470
|
-
| YSS 页面把请求写满 index.vue | 页面难维护,分页参数重复 | 请求和分页下沉 Hook |
|
|
471
|
-
| 后端 Controller 直接穿透 Repository | 分层破坏,领域规则失控 | Controller 依赖 Domain Gateway / Service |
|
|
472
|
-
| 一个 change 包含多个目标 | 验证和归档困难 | 拆成多个 change |
|
|
473
|
-
| 跳过测试直接实现 | 回归风险高 | 至少覆盖关键业务 seam |
|
|
474
|
-
| AI 自己审查自己实现的代码 | 容易漏掉同类错误 | 使用独立 review 流程 |
|
|
475
|
-
| ADR 写太多 | 决策记录变噪音 | 只记录难回滚且有真实取舍的决策 |
|
|
476
|
-
| 连续推进不保留 checkpoint 因果 | Spec / Spec Delta / OpenAPI / Ticket 决策难追溯 | 在人工暂停、handoff、进入实现、合并或发布边界集中同步,并列出本轮覆盖阶段 |
|
|
477
|
-
| 实施反馈不回流 | 同类问题反复出现 | 写入 user guide、Spec 或 AGENTS.md |
|
|
478
|
-
|
|
479
|
-
## 8. Prompt 模板
|
|
480
|
-
|
|
481
|
-
### 8.1 竞品分析
|
|
482
|
-
|
|
483
|
-
```text
|
|
484
|
-
请作为产品经理、设计和实施顾问,基于“数据中台模型管理”场景,
|
|
485
|
-
使用 docs/discovery/templates/competitive-matrix-template.md 输出竞品功能矩阵。
|
|
486
|
-
要求覆盖竞品概览、功能矩阵、差异化亮点、功能空白区和 MVP 边界建议。
|
|
487
|
-
```
|
|
488
|
-
|
|
489
|
-
### 8.2 需求澄清
|
|
490
|
-
|
|
491
|
-
```text
|
|
492
|
-
请作为产品和实施顾问,基于“数据中台模型管理”场景和竞品分析结论,
|
|
493
|
-
帮我澄清用户角色、核心流程、异常场景、非目标范围和第一版 MVP。
|
|
494
|
-
输出为 discovery 文档。
|
|
495
|
-
```
|
|
496
|
-
|
|
497
|
-
### 8.3 Spec 生成
|
|
498
|
-
|
|
499
|
-
```text
|
|
500
|
-
基于 discovery 文档,使用 docs/templates/spec-template.md 生成 Spec。
|
|
501
|
-
要求补充 Gherkin 验收标准、OpenAPI 影响、测试决策和人工审查点。
|
|
502
|
-
```
|
|
503
|
-
|
|
504
|
-
### 8.4 API 契约草案
|
|
505
|
-
|
|
506
|
-
```text
|
|
507
|
-
基于 Spec 生成 OpenAPI 3.1 Draft。
|
|
508
|
-
要求包含分页、排序、错误响应、字段级校验错误和发布接口。
|
|
509
|
-
保存到 `docs/.scratch/<feature>/api/<feature>.yaml`。
|
|
510
|
-
```
|
|
511
|
-
|
|
512
|
-
### 8.5 API 契约冻结
|
|
513
|
-
|
|
514
|
-
```text
|
|
515
|
-
基于 OpenAPI Draft、工程基线、架构设计和 Ticket 行为规格,
|
|
516
|
-
检查路径、schema、错误结构、分页、权限、状态流、DDD 边界和契约测试是否一致。
|
|
517
|
-
确认后将 `docs/.scratch/<feature>/api/<feature>.yaml` 作为开发冻结契约。
|
|
518
|
-
```
|
|
519
|
-
|
|
520
|
-
### 8.6 YSS 技能路由
|
|
521
|
-
|
|
522
|
-
```text
|
|
523
|
-
请使用 yss-router 分析这个垂直切片需要哪些最小 YSS 技能集。
|
|
524
|
-
分别说明前端、后端、API、Repository/MyBatis、Controller 是否需要专项技能。
|
|
525
|
-
```
|
|
526
|
-
|
|
527
|
-
### 8.7 垂直切片
|
|
528
|
-
|
|
529
|
-
```text
|
|
530
|
-
基于 Spec、冻结 OpenAPI 和架构设计,把功能拆成 3-6 个可独立验收的垂直切片。
|
|
531
|
-
每个切片都要包含 API、后端、前端、测试和完成定义。
|
|
532
|
-
```
|
|
533
|
-
|
|
534
|
-
### 8.7 前端开发
|
|
535
|
-
|
|
536
|
-
```text
|
|
537
|
-
请按 yss-ui 规范实现该页面。
|
|
538
|
-
要求使用 YTable / YssFormily,列表请求和分页下沉 hooks/useXxx.ts,
|
|
539
|
-
使用 currentParams 统一参数,并覆盖 loading、empty、error 状态。
|
|
540
|
-
```
|
|
541
|
-
|
|
542
|
-
### 8.8 后端开发
|
|
543
|
-
|
|
544
|
-
```text
|
|
545
|
-
请按 YSS DDD 顺序实现该后端切片:
|
|
546
|
-
先用 yss-domain 建模领域对象和 Gateway,
|
|
547
|
-
再用 yss-repository 补 PO / Repository / Convertor / GatewayImpl,
|
|
548
|
-
涉及 PageQuery 或 BaseRepository 时遵循 yss-mybatis,
|
|
549
|
-
最后用 yss-web-controller 补 Controller / DTO / VO / Web Convertor。
|
|
550
|
-
```
|
|
551
|
-
|
|
552
|
-
### 8.9 通用开发
|
|
553
|
-
|
|
554
|
-
```text
|
|
555
|
-
按当前 垂直切片 Ticket 的 tasks 推进下一个未完成任务。
|
|
556
|
-
默认使用 TDD,先写公共接口层面的失败测试,再实现。
|
|
557
|
-
```
|
|
558
|
-
|
|
559
|
-
### 8.10 发布实施
|
|
560
|
-
|
|
561
|
-
```text
|
|
562
|
-
基于本次 change、测试结果和 API 变化,
|
|
563
|
-
生成发布说明、实施步骤、回滚方案、验收清单和已知风险。
|
|
564
|
-
```
|
|
565
|
-
|
|
566
|
-
## 9. 单人多角色节奏
|
|
567
|
-
|
|
568
|
-
当你同时是产品、设计、开发和实施时,最容易混乱的是上下文切换。建议每天按固定顺序推进:
|
|
569
|
-
|
|
570
|
-
```text
|
|
571
|
-
上午:竞品、产品和设计决策
|
|
572
|
-
下午:YSS 前后端开发和测试
|
|
573
|
-
收尾:更新文档、任务状态和实施记录
|
|
574
|
-
```
|
|
575
|
-
|
|
576
|
-
每周至少做一次小复盘:
|
|
577
|
-
|
|
578
|
-
- 本周交付了哪些垂直切片?
|
|
579
|
-
- 哪些需求被改了两次以上?
|
|
580
|
-
- 哪些实现让实施解释成本变高?
|
|
581
|
-
- 哪些规则应该写入 `AGENTS.md`?
|
|
582
|
-
- 哪些术语应该写入 `CONTEXT.md`,并补上英文标识词干?
|
|
583
|
-
|
|
584
|
-
这样这套模板会从“文档目录”逐渐变成你的产品操作系统。
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
# Spec / Ticket 迁移指南
|
|
2
|
-
|
|
3
|
-
本文面向从旧版模板升级的仓库。新模板只保留旧路径的只读迁移识别,不保留旧 skill 的转发别名;迁移完成后应运行 `scripts/verify-template`。
|
|
4
|
-
|
|
5
|
-
## 名称映射
|
|
6
|
-
|
|
7
|
-
| 旧入口或路径 | 新入口或路径 |
|
|
8
|
-
|---|---|
|
|
9
|
-
| `to-prd` | `to-spec` |
|
|
10
|
-
| `to-issues` | `to-tickets` |
|
|
11
|
-
| `docs/templates/prd-template.md` | `docs/templates/spec-template.md` |
|
|
12
|
-
| `docs/templates/vertical-slice-issue-template.md` | `docs/templates/vertical-slice-ticket-template.md` |
|
|
13
|
-
| `docs/requirements/issues/` | `docs/requirements/tickets/` |
|
|
14
|
-
| `docs/requirements/<feature>-prd.md` | `docs/requirements/<feature>-spec.md` |
|
|
15
|
-
| `.scratch/<feature>/` | `docs/.scratch/<feature>/` |
|
|
16
|
-
| `docs/requirements/tickets/*` | `docs/.scratch/<feature>/issues/`(按功能包重新整理) |
|
|
17
|
-
|
|
18
|
-
Local Markdown 项目不再使用上述旧目录作为主 tracker:新的完整功能包统一位于 `docs/.scratch/<feature>/`,其中 Spec 为 `spec.md`,功能父 Ticket 为 `parent-ticket.md`,垂直切片位于 `issues/`。根 `.scratch/` 与 `docs/requirements/tickets/` 只能作为只读迁移来源。
|
|
19
|
-
|
|
20
|
-
旧文档中的 PRD 可继续作为历史事实保留,但新建和继续维护的规格资产应迁移为 Spec。GitHub Issues 与 GitLab Issues 仍是平台产品名称;领域工作单元统一称为 Ticket。
|
|
21
|
-
|
|
22
|
-
## 状态迁移
|
|
23
|
-
|
|
24
|
-
- Spec 初稿、产品设计、原型和 OpenAPI Draft 使用 `ready-for-human`。
|
|
25
|
-
- 需求与契约冻结后,先创建功能父 Ticket,再创建垂直切片子 Ticket。
|
|
26
|
-
- 只有必要门禁已通过、依赖已解除且可直接实现的垂直切片 Ticket 使用 `ready-for-agent`。
|
|
27
|
-
|
|
28
|
-
## 升级步骤
|
|
29
|
-
|
|
30
|
-
1. 在根目录添加 `yss-project.yaml`,明确 `repository_mode`。
|
|
31
|
-
2. 重命名旧规格、模板和本地任务目录,并修正 Markdown 链接;将根 `.scratch/<feature>/` 迁移到 `docs/.scratch/<feature>/`。
|
|
32
|
-
3. 检查 `docs/requirements/tickets/` 中的旧扁平 Ticket,按功能拆分到 `docs/.scratch/<feature>/issues/`,发生路径重叠时暂停并人工确认。
|
|
33
|
-
4. 删除所有 Agent root 中的旧 skill 目录,不创建兼容别名。
|
|
34
|
-
5. 只在 `.agents/skills` 修改共享技能,运行 `scripts/sync-skills` 生成投影。
|
|
35
|
-
6. 运行 `scripts/update-skill-lock` 更新完整树哈希。
|
|
36
|
-
7. 运行 `scripts/verify-template`;修复全部结构、语义、压力场景和链接错误后再进入发布审查。
|
|
37
|
-
|
|
38
|
-
## 模板工具运行时迁移
|
|
39
|
-
|
|
40
|
-
从包含 Ruby 模板治理脚本的历史快照升级时,新的受管 Node 脚本直接随模板快照分发,项目实例不执行依赖安装。实例需要 Node `>=22 <27`;缺失或不兼容时先停止同步并恢复原 metadata。历史 `.rb` 文件由 CLI 的模板删除规则以 `remove-report` 告知,默认不静默删除。升级后运行三个固定门禁;失败时按 CLI 操作日志回滚。
|
|
41
|
-
|
|
42
|
-
## 外部初始化 CLI
|
|
43
|
-
|
|
44
|
-
`create-yss-spec` 必须在初始化和升级时写入正确的 `repository_mode`,并执行等价的路径迁移与集成测试。模板仓库与 CLI 仓库未共同通过集成验证前,不得单独声明新版模板可发布。
|