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,31 +1,21 @@
|
|
|
1
|
-
#
|
|
1
|
+
# 用户手册索引
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
这里集中放置 YSS 模板和生命周期的入门手册。第一次使用时,先看总览,再进入与你当前工作阶段对应的子项目手册。
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## 推荐阅读顺序
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
1. [YSS 用户手册](./用户手册.md):了解仓库身份、生命周期主链和 Agent 使用模式。
|
|
8
|
+
2. [战略设计子项目用户手册](../../submodules/yss-strategic-design-harness/docs/user-guide/战略设计子项目用户手册.md):从模糊想法形成 Strategic Design Handoff。
|
|
9
|
+
3. [战术设计子项目用户手册](./战术设计子项目用户手册.md):把交接包细化为 Tactical Design,供研发实现和评审。
|
|
8
10
|
|
|
9
|
-
##
|
|
11
|
+
## 按任务查找
|
|
10
12
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
13
|
+
| 你现在要做什么 | 推荐手册 |
|
|
14
|
+
|---|---|
|
|
15
|
+
| 创建、接管或更新 YSS 项目 | [YSS 用户手册](./用户手册.md) |
|
|
16
|
+
| 澄清需求、确定用户和范围 | [战略设计子项目用户手册](../../submodules/yss-strategic-design-harness/docs/user-guide/战略设计子项目用户手册.md) |
|
|
17
|
+
| 设计聚合、状态、不变量和领域事件 | [战术设计子项目用户手册](./战术设计子项目用户手册.md) |
|
|
18
|
+
| 了解完整生命周期和阶段门禁 | [产品生命周期工作流](../../submodules/yss-strategic-design-harness/docs/user-guide/产品生命周期工作流.md) |
|
|
19
|
+
| 查找长期协作习惯和反模式 | [生命周期最佳实践](../../submodules/yss-strategic-design-harness/docs/user-guide/生命周期最佳实践.md) |
|
|
18
20
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
- [create-yss-spec 外部 CLI 实践指南](./外部命令行工具实践指南.md)
|
|
22
|
-
- [产品全生命周期使用手册](./产品生命周期工作流.md)
|
|
23
|
-
- [全生命周期最佳实践](./生命周期最佳实践.md)
|
|
24
|
-
- [产品研发全生命周期最佳实践](./产品研发全生命周期最佳实践.md)
|
|
25
|
-
- [grill-with-docs 使用手册](./需求澄清指南.md)
|
|
26
|
-
- [grill-with-docs 最佳实践](./需求澄清最佳实践.md)
|
|
27
|
-
- [Excalidraw Diagram Generator 使用手册](./图示生成器使用指南.md)
|
|
28
|
-
- [PDCA × Scrum](../process/PDCA-SCRUM.md)
|
|
29
|
-
- [Matt Pocock Engineering Skills](../process/MATT-POCOCK-ENGINEERING-SKILLS.md)
|
|
30
|
-
- [架构设计](../architecture/README.md)
|
|
31
|
-
- [测试策略](../testing/README.md)
|
|
21
|
+
> 本仓库是 `template-source`。手册中的业务名称和示例只用于教学;真实产品资料应在 `project-instance` 中建立,并遵守对应的生命周期门禁。
|
|
@@ -11,13 +11,13 @@ const INTENSITY_POLICY = path.join(root, "docs/process/maintenance-intensity.yam
|
|
|
11
11
|
const REQUIRED_EVIDENCE = {
|
|
12
12
|
L1: ["relevant-check"],
|
|
13
13
|
L2: ["counterexample", "fresh-verification", "focused-independent-review"],
|
|
14
|
-
L3: ["
|
|
14
|
+
L3: ["fresh-verification", "self-check"]
|
|
15
15
|
};
|
|
16
16
|
|
|
17
17
|
const REVIEW_MODES = {
|
|
18
18
|
L1: new Set(["self-check", "human-checkpoint"]),
|
|
19
19
|
L2: new Set(["focused-independent"]),
|
|
20
|
-
L3: new Set(["formal-independent"])
|
|
20
|
+
L3: new Set(["self-check", "formal-independent"])
|
|
21
21
|
};
|
|
22
22
|
|
|
23
23
|
function ensure(condition, message) {
|
|
@@ -87,9 +87,13 @@ export function validateMaintenanceCheckpoint(data, options = {}) {
|
|
|
87
87
|
}
|
|
88
88
|
kinds.add(evidence.kind);
|
|
89
89
|
}
|
|
90
|
-
const
|
|
90
|
+
const legacyFormalL3 = data.intensity === "L3" && data.review_mode === "formal-independent";
|
|
91
|
+
const reviewKind = data.intensity === "L2" ? "focused-independent-review" : data.intensity === "L3" ? (legacyFormalL3 ? "formal-independent-review" : "self-check") : null;
|
|
91
92
|
if (data.schema_version === 2) validateCheckpointState(data, kinds, reviewKind);
|
|
92
|
-
|
|
93
|
+
const requiredEvidence = legacyFormalL3
|
|
94
|
+
? ["red", "green", "refactor", "pressure-scenario", "fresh-verification", "formal-independent-review"]
|
|
95
|
+
: REQUIRED_EVIDENCE[data.intensity];
|
|
96
|
+
for (const required of requiredEvidence) {
|
|
93
97
|
const pendingByV2State = data.schema_version === 2 && data.current_state !== "release-ready" && required === reviewKind;
|
|
94
98
|
if ((options.allowPendingReview === true || pendingByV2State) && required === reviewKind) continue;
|
|
95
99
|
ensure(kinds.has(required), `${data.intensity} 缺少 ${required} 证据`);
|
|
@@ -118,14 +122,24 @@ function validateCheckpointState(data, evidenceKinds, reviewKind) {
|
|
|
118
122
|
return;
|
|
119
123
|
}
|
|
120
124
|
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
ensure(
|
|
125
|
+
const selfCheckL3 = data.intensity === "L3" && data.review_mode === "self-check";
|
|
126
|
+
if (!selfCheckL3) {
|
|
127
|
+
ensure(data.candidate_digest !== null, `${data.current_state} 必须绑定 candidate_digest`);
|
|
128
|
+
ensure(data.review_round >= 1, `${data.current_state} 的 review_round 必须为 1 或 2`);
|
|
129
|
+
for (const required of ["candidate-verification", "initial-release-verification", "review-task-packages"]) {
|
|
130
|
+
ensure(evidenceKinds.has(required), `${data.current_state} 缺少 ${required} 证据`);
|
|
131
|
+
}
|
|
132
|
+
validateReleaseVerificationCommand(data, "initial-release-verification");
|
|
133
|
+
} else {
|
|
134
|
+
ensure(data.review_round === 0, "L3 self-check 不需要审查轮次");
|
|
135
|
+
ensure(data.candidate_digest === null, "L3 self-check 不得冻结 candidate_digest");
|
|
125
136
|
}
|
|
126
|
-
validateReleaseVerificationCommand(data, "initial-release-verification");
|
|
127
137
|
if (data.current_state === "review-ready") {
|
|
128
|
-
|
|
138
|
+
if (selfCheckL3) {
|
|
139
|
+
ensure(data.verification_profile === "fast", "L3 self-check 的 review-ready 必须使用 fast profile");
|
|
140
|
+
} else {
|
|
141
|
+
ensure(data.verification_profile === "candidate", "review-ready 必须使用 candidate profile");
|
|
142
|
+
}
|
|
129
143
|
return;
|
|
130
144
|
}
|
|
131
145
|
if (data.current_state === "needs-human") {
|
|
@@ -38,6 +38,25 @@ export function validateSkillGovernance({ read = (relative) => readFileSync(path
|
|
|
38
38
|
if (exists(".agents/skills/high-fidelity-html-prototype") || aliases.has("high-fidelity-html-prototype")) {
|
|
39
39
|
fail("high-fidelity-html-prototype 已退役,不得保留物理目录或运行时 alias");
|
|
40
40
|
}
|
|
41
|
+
const prototypeStage = read(".agents/skills/yss-prototype-stage/SKILL.md");
|
|
42
|
+
const prototypeAdapter = read(".agents/skills/yss-prototype-stage/references/product-design-adapter.md");
|
|
43
|
+
const prototypeEvidence = read("docs/design/templates/prototype-evidence-template.yaml");
|
|
44
|
+
const projectDesign = read("docs/design/design.md");
|
|
45
|
+
const antdvCompatibility = read(".agents/skills/yss-ui/references/antdv-compatibility.md");
|
|
46
|
+
for (const marker of ["product-design-adapter.md", "schema v2", "ant-design-v6", "ant-design-vue-4.x", "accessibility_verification"]) {
|
|
47
|
+
if (!prototypeStage.includes(marker)) fail(`原型阶段合同缺少 YSS adapter 标记: ${marker}`);
|
|
48
|
+
}
|
|
49
|
+
for (const marker of ["antd@6.x", "pnpm", "ConfigProvider", "visual_semantic_mapping", "react_only_api_not_copied", "1440x900", "390x844", "verification/design-qa.md"]) {
|
|
50
|
+
if (!prototypeAdapter.includes(marker)) fail(`Product Design adapter 缺少执行约束: ${marker}`);
|
|
51
|
+
}
|
|
52
|
+
for (const marker of ["schema_version: 2", "design_standard: ant-design-v6", "runtime_component_library: ant-design-vue-4.x", "actual_antd_version", "visual_semantic_mapping", "accessibility_verification", "verification/design-qa.md"]) {
|
|
53
|
+
if (!prototypeEvidence.includes(marker)) fail(`原型证据模板缺少 schema v2 字段: ${marker}`);
|
|
54
|
+
}
|
|
55
|
+
if (prototypeEvidence.includes("与官方 #1677ff / Inter / 8px")) fail("原型证据模板仍把 Inter/8px 误写为官方 v6 默认差异");
|
|
56
|
+
if (projectDesign.includes("`antdv6-design.md`")) fail("design.md 仍引用不存在的 antdv6-design.md");
|
|
57
|
+
for (const marker of ["Ant Design v6", "Ant Design Vue 4.x", "版本号不同本身不是冲突", "visual_semantic_mapping"]) {
|
|
58
|
+
if (!antdvCompatibility.includes(marker)) fail(`AntDV 兼容策略缺少双轨边界: ${marker}`);
|
|
59
|
+
}
|
|
41
60
|
for (const skill of registry.skills) {
|
|
42
61
|
if (!canonicalIds.has(skill.id)) fail(`注册表 canonical skill 无效: ${skill.id}`);
|
|
43
62
|
if (skill.maturity === "deprecated") {
|
|
@@ -9,6 +9,7 @@ const ROUTER_CONTRACT = path.join(ROOT, ".agents/skills/yss-router/references/ro
|
|
|
9
9
|
const LIFECYCLE_CONTRACT = path.join(ROOT, ".agents/skills/yss-product-lifecycle/references/orchestration-contract.yaml");
|
|
10
10
|
const LAYERS = new Set(["core", "specialist", "compatibility", "maintainer-only"]);
|
|
11
11
|
const MATURITIES = new Set(["draft", "verified", "supported", "deprecated"]);
|
|
12
|
+
const INVOCATION_MODES = new Set(["user", "model", "both"]);
|
|
12
13
|
const ID_PATTERN = /^[a-z0-9][a-z0-9-]*$/;
|
|
13
14
|
const PLATFORM_ALIAS_PATTERN = /^[a-z0-9][a-z0-9-]*(?::[a-z0-9][a-z0-9-]*)?$/;
|
|
14
15
|
|
|
@@ -51,6 +52,74 @@ function requireObject(value, field) {
|
|
|
51
52
|
if (!value || typeof value !== "object" || Array.isArray(value)) fail(`${field} 必须是对象`);
|
|
52
53
|
}
|
|
53
54
|
|
|
55
|
+
function requireStringArray(value, field, { nonEmpty = false } = {}) {
|
|
56
|
+
if (!Array.isArray(value) || (nonEmpty && value.length === 0) || value.some((item) => typeof item !== "string" || !item.trim())) {
|
|
57
|
+
fail(`${field} 必须是${nonEmpty ? "非空" : ""}字符串数组`);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
function validateInvocationContract(registry, skill) {
|
|
62
|
+
const contract = registry.invocation_contract;
|
|
63
|
+
requireObject(contract, "invocation_contract");
|
|
64
|
+
if (contract.schema_version !== 1) fail("invocation_contract.schema_version 必须为 1");
|
|
65
|
+
if (contract.scope !== "routing-and-dependencies-only") fail("invocation_contract.scope 必须限定为 routing-and-dependencies-only");
|
|
66
|
+
requireStringArray(contract.required_fields, "invocation_contract.required_fields", { nonEmpty: true });
|
|
67
|
+
const expected = ["invocation_mode", "trigger_conditions", "exclusion_conditions", "primary_output", "required_dependencies", "optional_dependencies"];
|
|
68
|
+
if (JSON.stringify(contract.required_fields) !== JSON.stringify(expected)) fail("invocation_contract.required_fields 顺序或字段不完整");
|
|
69
|
+
requireStringArray(contract.allowed_invocation_modes, "invocation_contract.allowed_invocation_modes", { nonEmpty: true });
|
|
70
|
+
if (![...INVOCATION_MODES].every((mode) => contract.allowed_invocation_modes.includes(mode))) {
|
|
71
|
+
fail("invocation_contract.allowed_invocation_modes 必须包含 user、model、both");
|
|
72
|
+
}
|
|
73
|
+
if (contract.trigger_source !== "impacts" || contract.trigger_encoding !== "impact:<impact>") {
|
|
74
|
+
fail("invocation_contract 必须从 impacts 生成 impact:<impact> 触发条件");
|
|
75
|
+
}
|
|
76
|
+
requireObject(contract.default, "invocation_contract.default");
|
|
77
|
+
requireObject(contract.layer_defaults, "invocation_contract.layer_defaults");
|
|
78
|
+
requireObject(contract.overrides, "invocation_contract.overrides");
|
|
79
|
+
for (const layer of LAYERS) {
|
|
80
|
+
const layerDefault = contract.layer_defaults[layer];
|
|
81
|
+
requireObject(layerDefault, `invocation_contract.layer_defaults.${layer}`);
|
|
82
|
+
if (!INVOCATION_MODES.has(layerDefault.invocation_mode)) fail(`${layer} 的 invocation_mode 无效`);
|
|
83
|
+
requireString(layerDefault.primary_output, `invocation_contract.layer_defaults.${layer}.primary_output`);
|
|
84
|
+
}
|
|
85
|
+
const defaultMode = contract.default.invocation_mode;
|
|
86
|
+
if (!INVOCATION_MODES.has(defaultMode)) fail("invocation_contract.default.invocation_mode 无效");
|
|
87
|
+
requireStringArray(contract.default.trigger_conditions, "invocation_contract.default.trigger_conditions", { nonEmpty: true });
|
|
88
|
+
requireStringArray(contract.default.exclusion_conditions, "invocation_contract.default.exclusion_conditions", { nonEmpty: true });
|
|
89
|
+
requireString(contract.default.primary_output, "invocation_contract.default.primary_output");
|
|
90
|
+
requireStringArray(contract.default.required_dependencies, "invocation_contract.default.required_dependencies");
|
|
91
|
+
requireStringArray(contract.default.optional_dependencies, "invocation_contract.default.optional_dependencies");
|
|
92
|
+
for (const [skillId, override] of Object.entries(contract.overrides)) {
|
|
93
|
+
requireObject(override, `invocation_contract.overrides.${skillId}`);
|
|
94
|
+
if (!ID_PATTERN.test(skillId)) fail(`invocation_contract.overrides id 非法: ${skillId}`);
|
|
95
|
+
if (override.invocation_mode && !INVOCATION_MODES.has(override.invocation_mode)) fail(`${skillId}.invocation_mode 无效`);
|
|
96
|
+
if (override.trigger_conditions) requireStringArray(override.trigger_conditions, `${skillId}.trigger_conditions`, { nonEmpty: true });
|
|
97
|
+
if (override.exclusion_conditions) requireStringArray(override.exclusion_conditions, `${skillId}.exclusion_conditions`, { nonEmpty: true });
|
|
98
|
+
if (override.primary_output) requireString(override.primary_output, `${skillId}.primary_output`);
|
|
99
|
+
if (override.required_dependencies) requireStringArray(override.required_dependencies, `${skillId}.required_dependencies`);
|
|
100
|
+
if (override.optional_dependencies) requireStringArray(override.optional_dependencies, `${skillId}.optional_dependencies`);
|
|
101
|
+
}
|
|
102
|
+
const overrideIds = Object.keys(contract.overrides);
|
|
103
|
+
const knownIds = new Set(registry.skills.map((item) => item?.id).filter(Boolean));
|
|
104
|
+
for (const skillId of overrideIds) if (!knownIds.has(skillId)) fail(`invocation_contract.overrides 引用了未登记技能: ${skillId}`);
|
|
105
|
+
const effective = {
|
|
106
|
+
...contract.default,
|
|
107
|
+
...contract.layer_defaults[skill.layer],
|
|
108
|
+
...(contract.overrides[skill.id] ?? {})
|
|
109
|
+
};
|
|
110
|
+
effective.trigger_conditions = [...new Set([...(effective.trigger_conditions ?? []), ...skill.impacts.map((impact) => `impact:${impact}`)])];
|
|
111
|
+
if (!INVOCATION_MODES.has(effective.invocation_mode)) fail(`${skill.id}.invocation_mode 无效`);
|
|
112
|
+
requireStringArray(effective.trigger_conditions, `${skill.id}.trigger_conditions`, { nonEmpty: true });
|
|
113
|
+
requireStringArray(effective.exclusion_conditions, `${skill.id}.exclusion_conditions`, { nonEmpty: true });
|
|
114
|
+
requireString(effective.primary_output, `${skill.id}.primary_output`);
|
|
115
|
+
requireStringArray(effective.required_dependencies, `${skill.id}.required_dependencies`);
|
|
116
|
+
requireStringArray(effective.optional_dependencies, `${skill.id}.optional_dependencies`);
|
|
117
|
+
const impactTriggers = skill.impacts.map((impact) => `impact:${impact}`);
|
|
118
|
+
if (!impactTriggers.every((trigger) => effective.trigger_conditions.includes(trigger))) {
|
|
119
|
+
fail(`${skill.id} 的调用契约必须覆盖其 impacts 触发条件`);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
|
|
54
123
|
function requireStringSet(value, expected, field) {
|
|
55
124
|
if (!Array.isArray(value)) fail(`${field} 必须是数组`);
|
|
56
125
|
const missing = expected.filter((item) => !value.includes(item));
|
|
@@ -209,6 +278,7 @@ export function validateSkillRegistry(registry, { lock, routerContract, lifecycl
|
|
|
209
278
|
if (!Array.isArray(skill.impacts) || skill.impacts.length === 0 || skill.impacts.some((item) => typeof item !== "string" || !item.trim())) {
|
|
210
279
|
fail(`${skill.id} impacts 不能为空`);
|
|
211
280
|
}
|
|
281
|
+
validateInvocationContract(registry, skill);
|
|
212
282
|
}
|
|
213
283
|
for (const skill of skills) {
|
|
214
284
|
if (skill.replaced_by && !ids.has(skill.replaced_by)) fail(`${skill.id}.replaced_by 引用了未登记技能: ${skill.replaced_by}`);
|
|
@@ -42,7 +42,7 @@ try {
|
|
|
42
42
|
const ignored = run("git", ["check-ignore", "-q", relativePath]);
|
|
43
43
|
if (ignored.status === 0) throw new TypeError(`权威注册表资产不得被 Git 忽略: ${relativePath}`);
|
|
44
44
|
}
|
|
45
|
-
const stalePaths = ["AGENTS.md", "README.md", "docs/user-guide
|
|
45
|
+
const stalePaths = ["AGENTS.md", "README.md", "docs/user-guide/用户手册.md", ".agents/skills/yss-product-lifecycle/SKILL.md", "docs/process/lifecycle-artifact-map.md"];
|
|
46
46
|
if (isTemplateSource(ROOT)) stalePaths.push(".template-source/derived/harness-work-unit-map.md");
|
|
47
47
|
for (const relativePath of stalePaths) {
|
|
48
48
|
if (/\d+\s*个(?:主阶段|门禁|工作单元|职责点)/.test(readFileSync(path.join(ROOT, relativePath), "utf8"))) {
|
|
@@ -38,6 +38,8 @@ const releaseBaseline = [
|
|
|
38
38
|
"scripts/verify-matt-yss-integration-scenarios",
|
|
39
39
|
"scripts/verify-yss-router-scenarios",
|
|
40
40
|
"scripts/verify-yss-ui-scenarios",
|
|
41
|
+
"scripts/verify-yss-prototype-contract-scenarios",
|
|
42
|
+
"node .agents/skills/yss-prototype-stage/scripts/prototype-contract.mjs validate-evidence docs/design/templates/prototype-evidence-template.yaml --allow-template",
|
|
41
43
|
"scripts/verify-openapi-yaml-first-scenarios",
|
|
42
44
|
"scripts/verify-openapi-json-handoff-scenarios"
|
|
43
45
|
].sort();
|
|
@@ -57,6 +59,9 @@ const skillChange = planTemplateVerification({ profile: "fast", changedFiles: ["
|
|
|
57
59
|
assert.ok(skillChange.groups.includes("skills"));
|
|
58
60
|
assert.ok(skillChange.groups.includes("hygiene"));
|
|
59
61
|
|
|
62
|
+
const prototypeContractChange = planTemplateVerification({ profile: "fast", changedFiles: ["scripts/verify-yss-prototype-contract-scenarios"] });
|
|
63
|
+
assert.ok(prototypeContractChange.groups.includes("implementation"), "原型契约脚本变化必须运行实现压力场景");
|
|
64
|
+
|
|
60
65
|
const candidate = planTemplateVerification({ profile: "candidate", changedFiles: ["docs/process/harness-process-tailoring.md"] });
|
|
61
66
|
assert.equal(candidate.effective_profile, "candidate");
|
|
62
67
|
assert.ok(candidate.groups.includes("maintenance"));
|
|
@@ -513,7 +513,7 @@
|
|
|
513
513
|
"source": "project",
|
|
514
514
|
"sourceType": "local",
|
|
515
515
|
"skillPath": ".agents/skills/maintaining-skills/SKILL.md",
|
|
516
|
-
"effectiveHash": "
|
|
516
|
+
"effectiveHash": "16f8adeeaa8fc3e8abf3ec49f9e96fe74e3dede0a0b70a918bc62931b597bff7",
|
|
517
517
|
"targets": [
|
|
518
518
|
".agents/skills",
|
|
519
519
|
".claude/skills",
|
|
@@ -1068,7 +1068,7 @@
|
|
|
1068
1068
|
"source": "project",
|
|
1069
1069
|
"sourceType": "local",
|
|
1070
1070
|
"skillPath": ".agents/skills/yss-antd-design/SKILL.md",
|
|
1071
|
-
"effectiveHash": "
|
|
1071
|
+
"effectiveHash": "09cbc687f2240c7402393c06f499877be432d1fbb2ee36e97dba4aad66d18f15",
|
|
1072
1072
|
"targets": [
|
|
1073
1073
|
".agents/skills",
|
|
1074
1074
|
".claude/skills",
|
|
@@ -1180,7 +1180,7 @@
|
|
|
1180
1180
|
"source": "project",
|
|
1181
1181
|
"sourceType": "local",
|
|
1182
1182
|
"skillPath": ".agents/skills/yss-design-system/SKILL.md",
|
|
1183
|
-
"effectiveHash": "
|
|
1183
|
+
"effectiveHash": "2392b5b87fe403ed24b2158f06f6969b2f48afb4b53bfc006b38314c1b08c7b3",
|
|
1184
1184
|
"targets": [
|
|
1185
1185
|
".agents/skills",
|
|
1186
1186
|
".claude/skills",
|
|
@@ -1404,7 +1404,7 @@
|
|
|
1404
1404
|
"source": "project",
|
|
1405
1405
|
"sourceType": "local",
|
|
1406
1406
|
"skillPath": ".agents/skills/yss-page-module-development/SKILL.md",
|
|
1407
|
-
"effectiveHash": "
|
|
1407
|
+
"effectiveHash": "18d91ded9c236a76395c6bc6cab303cf6c5acda6c1d642fcb3363af0d4803c19",
|
|
1408
1408
|
"targets": [
|
|
1409
1409
|
".agents/skills",
|
|
1410
1410
|
".claude/skills",
|
|
@@ -1420,7 +1420,7 @@
|
|
|
1420
1420
|
"source": "project",
|
|
1421
1421
|
"sourceType": "local",
|
|
1422
1422
|
"skillPath": ".agents/skills/yss-product-lifecycle/SKILL.md",
|
|
1423
|
-
"effectiveHash": "
|
|
1423
|
+
"effectiveHash": "a7283ff14706ed156d0ed4eea619407b9758e3f2dca521f112ab4bcdfad46f57",
|
|
1424
1424
|
"targets": [
|
|
1425
1425
|
".agents/skills",
|
|
1426
1426
|
".claude/skills",
|
|
@@ -1436,7 +1436,7 @@
|
|
|
1436
1436
|
"source": "project",
|
|
1437
1437
|
"sourceType": "local",
|
|
1438
1438
|
"skillPath": ".agents/skills/yss-prototype-stage/SKILL.md",
|
|
1439
|
-
"effectiveHash": "
|
|
1439
|
+
"effectiveHash": "ac8842d09ecb52bf796f37d4086d7ea0a9a89c9ca5a25b92313c1683155b31b2",
|
|
1440
1440
|
"targets": [
|
|
1441
1441
|
".agents/skills",
|
|
1442
1442
|
".claude/skills",
|
|
@@ -1484,7 +1484,7 @@
|
|
|
1484
1484
|
"source": "project",
|
|
1485
1485
|
"sourceType": "local",
|
|
1486
1486
|
"skillPath": ".agents/skills/yss-router/SKILL.md",
|
|
1487
|
-
"effectiveHash": "
|
|
1487
|
+
"effectiveHash": "7b1cd0ed4fc3b99a313e125d68f2e7e9bbbf53b4369085575ba06f4d2872a3ca",
|
|
1488
1488
|
"targets": [
|
|
1489
1489
|
".agents/skills",
|
|
1490
1490
|
".claude/skills",
|
|
@@ -1564,7 +1564,7 @@
|
|
|
1564
1564
|
"source": "project",
|
|
1565
1565
|
"sourceType": "local",
|
|
1566
1566
|
"skillPath": ".agents/skills/yss-ui/SKILL.md",
|
|
1567
|
-
"effectiveHash": "
|
|
1567
|
+
"effectiveHash": "d4acc508059f872f1c9b22fc296cdf224bf6ad91898cd54f12a1a83110177d76",
|
|
1568
1568
|
"targets": [
|
|
1569
1569
|
".agents/skills",
|
|
1570
1570
|
".claude/skills",
|
package/template.manifest.json
CHANGED
package/template.snapshot.json
CHANGED
|
@@ -3,15 +3,15 @@
|
|
|
3
3
|
"templateName": "yss-spec-project-template",
|
|
4
4
|
"templateSource": "github:iloveZzz/yss-spec-project-template",
|
|
5
5
|
"templateRepository": "https://github.com/iloveZzz/yss-spec-project-template.git",
|
|
6
|
-
"requestedRef": "
|
|
7
|
-
"templateCommit": "
|
|
8
|
-
"manifestHash": "
|
|
6
|
+
"requestedRef": "a7f2c1be9cb96569c1f6d41890edd72719a5f2af",
|
|
7
|
+
"templateCommit": "a7f2c1be9cb96569c1f6d41890edd72719a5f2af",
|
|
8
|
+
"manifestHash": "387b499e08cf3dfa03e08acbc5b5783ee287c61aca12d995c61e2140f5552f40",
|
|
9
9
|
"encodedPaths": {
|
|
10
10
|
".codex/skills/data-analytics/.gitignore": ".codex/skills/data-analytics/__yss_dotfile__.gitignore",
|
|
11
11
|
".codex/skills/product-design/.npmignore": ".codex/skills/product-design/__yss_dotfile__.npmignore",
|
|
12
12
|
".codex/skills/product-design/templates/prototype/.npmrc": ".codex/skills/product-design/templates/prototype/__yss_dotfile__.npmrc",
|
|
13
13
|
".gitignore": "__yss_dotfile__.gitignore"
|
|
14
14
|
},
|
|
15
|
-
"snapshotHash": "
|
|
16
|
-
"generatedAt": "2026-09-
|
|
15
|
+
"snapshotHash": "9c3b6db377c9fc29f0ae947bcad5eb7ae181e1027fd2cc7b17cd000759a9ac59",
|
|
16
|
+
"generatedAt": "2026-09-02T16:32:00.623Z"
|
|
17
17
|
}
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
pipeline: <feature-id>
|
|
3
|
-
stage: user-guide
|
|
4
|
-
status: draft
|
|
5
|
-
owner: ai
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
# <功能名称>用户手册
|
|
9
|
-
|
|
10
|
-
> 适用场景:功能发布前或发布后,需要让业务用户、实施顾问或运维人员完成真实工作流。
|
|
11
|
-
> 本文面向使用者,不描述内部实现细节。
|
|
12
|
-
|
|
13
|
-
## 1. 适用对象
|
|
14
|
-
|
|
15
|
-
| 用户 / 角色 | 需要完成的任务 | 前置条件 |
|
|
16
|
-
|-------------|----------------|----------|
|
|
17
|
-
| | | |
|
|
18
|
-
|
|
19
|
-
## 2. 功能入口
|
|
20
|
-
|
|
21
|
-
- 菜单 / 页面入口:
|
|
22
|
-
- 权限要求:
|
|
23
|
-
- 相关配置:
|
|
24
|
-
|
|
25
|
-
## 3. 核心流程
|
|
26
|
-
|
|
27
|
-
| 步骤 | 操作 | 预期结果 | 异常处理 |
|
|
28
|
-
|------|------|----------|----------|
|
|
29
|
-
| 1 | | | |
|
|
30
|
-
|
|
31
|
-
## 4. 状态与提示
|
|
32
|
-
|
|
33
|
-
| 状态 / 提示 | 含义 | 用户应如何处理 |
|
|
34
|
-
|-------------|------|----------------|
|
|
35
|
-
| | | |
|
|
36
|
-
|
|
37
|
-
## 5. 常见问题
|
|
38
|
-
|
|
39
|
-
| 问题 | 原因 | 处理方式 |
|
|
40
|
-
|------|------|----------|
|
|
41
|
-
| | | |
|
|
42
|
-
|
|
43
|
-
## 6. 发布与支持信息
|
|
44
|
-
|
|
45
|
-
- 适用版本:
|
|
46
|
-
- 相关发布说明:
|
|
47
|
-
- 支持 / 反馈渠道:
|
|
48
|
-
|
|
49
|
-
## 7. 完成标准
|
|
50
|
-
|
|
51
|
-
- [ ] 目标用户可按本文完成核心流程。
|
|
52
|
-
- [ ] 权限、配置、异常状态和常见问题已说明。
|
|
53
|
-
- [ ] 不暴露不必要的内部实现细节。
|