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
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import assert from "node:assert/strict";
|
|
3
|
+
import { mkdtemp, mkdir, readFile, writeFile } from "node:fs/promises";
|
|
4
|
+
import os from "node:os";
|
|
5
|
+
import path from "node:path";
|
|
6
|
+
import {
|
|
7
|
+
preparePrototype,
|
|
8
|
+
validatePrototypeEvidence,
|
|
9
|
+
validatePrototypeProject
|
|
10
|
+
} from "../scripts/prototype-contract.mjs";
|
|
11
|
+
|
|
12
|
+
const tempRoot = await mkdtemp(path.join(os.tmpdir(), "yss-prototype-contract-"));
|
|
13
|
+
const projectRoot = path.join(tempRoot, "project");
|
|
14
|
+
const feature = "order-review";
|
|
15
|
+
const prototypeRoot = path.join(projectRoot, "docs/.scratch", feature, "design/prototypes");
|
|
16
|
+
await mkdir(path.join(prototypeRoot, "src"), { recursive: true });
|
|
17
|
+
await mkdir(path.join(projectRoot, "docs/design/tokens"), { recursive: true });
|
|
18
|
+
await writeFile(path.join(prototypeRoot, "package.json"), JSON.stringify({
|
|
19
|
+
name: "order-review-prototype",
|
|
20
|
+
private: true,
|
|
21
|
+
type: "module",
|
|
22
|
+
scripts: { build: "vite build" },
|
|
23
|
+
dependencies: { react: "19.2.0", "react-dom": "19.2.0", vite: "6.4.2" }
|
|
24
|
+
}, null, 2));
|
|
25
|
+
await writeFile(path.join(projectRoot, "docs/design/tokens/theme.json"), JSON.stringify({
|
|
26
|
+
algorithm: "default",
|
|
27
|
+
token: {
|
|
28
|
+
colorPrimary: "#3371ff",
|
|
29
|
+
borderRadius: 6,
|
|
30
|
+
controlHeight: 32,
|
|
31
|
+
layoutHeaderHeight: 64
|
|
32
|
+
}
|
|
33
|
+
}, null, 2));
|
|
34
|
+
|
|
35
|
+
const before = await validatePrototypeProject({ root: prototypeRoot, targetAntdVersion: "6.6.2" });
|
|
36
|
+
assert(before.errors.some((message) => message.includes("antd")), "RED: starter without antd must fail");
|
|
37
|
+
assert(before.errors.some((message) => message.includes("pnpm-lock.yaml")), "RED: missing pnpm lockfile must fail");
|
|
38
|
+
|
|
39
|
+
await preparePrototype({ projectRoot, root: prototypeRoot, feature, targetAntdVersion: "6.6.2", pnpmVersion: "10.15.0" });
|
|
40
|
+
const pkg = JSON.parse(await readFile(path.join(prototypeRoot, "package.json"), "utf8"));
|
|
41
|
+
assert.equal(pkg.dependencies.antd, "6.6.2");
|
|
42
|
+
assert.equal(pkg.packageManager, "pnpm@10.15.0");
|
|
43
|
+
assert.match(await readFile(path.join(prototypeRoot, "src/yss-theme.js"), "utf8"), /compactAlgorithm/);
|
|
44
|
+
|
|
45
|
+
await writeFile(path.join(prototypeRoot, "pnpm-lock.yaml"), "lockfileVersion: '9.0'\n");
|
|
46
|
+
await writeFile(path.join(prototypeRoot, "src/App.jsx"), [
|
|
47
|
+
'import { ConfigProvider, Button } from "antd";',
|
|
48
|
+
'import { yssTheme } from "./yss-theme.js";',
|
|
49
|
+
'export function App() { return <ConfigProvider theme={yssTheme}><Button type="primary">提交</Button></ConfigProvider>; }'
|
|
50
|
+
].join("\n"));
|
|
51
|
+
const after = await validatePrototypeProject({ root: prototypeRoot, targetAntdVersion: "6.6.2" });
|
|
52
|
+
assert.deepEqual(after.errors, []);
|
|
53
|
+
|
|
54
|
+
const wrongTarget = await validatePrototypeProject({ root: prototypeRoot, targetAntdVersion: "6.6.1" });
|
|
55
|
+
assert(wrongTarget.errors.some((message) => message.includes("精确锁定 antd 6.6.1")), "target 与实际 antd 版本不一致必须失败");
|
|
56
|
+
|
|
57
|
+
const npmPackage = structuredClone(pkg);
|
|
58
|
+
npmPackage.packageManager = "npm@11.0.0";
|
|
59
|
+
await writeFile(path.join(prototypeRoot, "package.json"), JSON.stringify(npmPackage, null, 2));
|
|
60
|
+
const npmProject = await validatePrototypeProject({ root: prototypeRoot, targetAntdVersion: "6.6.2" });
|
|
61
|
+
assert(npmProject.errors.some((message) => message.includes("packageManager")), "原型包管理器漂移到 npm 必须失败");
|
|
62
|
+
await writeFile(path.join(prototypeRoot, "package.json"), JSON.stringify(pkg, null, 2));
|
|
63
|
+
|
|
64
|
+
await assert.rejects(
|
|
65
|
+
preparePrototype({
|
|
66
|
+
projectRoot,
|
|
67
|
+
root: path.join(projectRoot, "prototypes", feature),
|
|
68
|
+
feature,
|
|
69
|
+
targetAntdVersion: "6.6.2",
|
|
70
|
+
pnpmVersion: "10.15.0"
|
|
71
|
+
}),
|
|
72
|
+
/docs\/.scratch/,
|
|
73
|
+
"非标准原型目录必须被拒绝"
|
|
74
|
+
);
|
|
75
|
+
|
|
76
|
+
const validEvidence = {
|
|
77
|
+
schema_version: 2,
|
|
78
|
+
feature,
|
|
79
|
+
prototype_ref: `docs/.scratch/${feature}/design/prototypes/index.html`,
|
|
80
|
+
prototype_stack: {
|
|
81
|
+
framework: "react",
|
|
82
|
+
package_manager: "pnpm",
|
|
83
|
+
package_manifest_ref: `docs/.scratch/${feature}/design/prototypes/package.json`,
|
|
84
|
+
lockfile_ref: `docs/.scratch/${feature}/design/prototypes/pnpm-lock.yaml`,
|
|
85
|
+
source_entry_ref: `docs/.scratch/${feature}/design/prototypes/src/App.jsx`,
|
|
86
|
+
build_entry_ref: `docs/.scratch/${feature}/design/prototypes/dist/index.html`,
|
|
87
|
+
build_command: "pnpm build",
|
|
88
|
+
build_result: "passed",
|
|
89
|
+
actual_antd_version: "6.6.2"
|
|
90
|
+
},
|
|
91
|
+
design_baseline: {
|
|
92
|
+
design_standard: "ant-design-v6",
|
|
93
|
+
project_design_ref: "docs/design/design.md",
|
|
94
|
+
project_token_refs: ["docs/design/tokens/theme.json"],
|
|
95
|
+
theme_adapter_ref: `docs/.scratch/${feature}/design/prototypes/src/yss-theme.js`,
|
|
96
|
+
project_override_reviewed: true
|
|
97
|
+
},
|
|
98
|
+
visual_semantic_mapping: {
|
|
99
|
+
runtime_component_library: "ant-design-vue-4.x",
|
|
100
|
+
runtime_version_source: "implementation-lockfile",
|
|
101
|
+
components: [{
|
|
102
|
+
semantic_role: "primary-action",
|
|
103
|
+
antd_v6_component: "Button",
|
|
104
|
+
project_token_refs: ["colorPrimary"],
|
|
105
|
+
yss_or_antdv_target: "YButton",
|
|
106
|
+
state_mapping: ["default", "hover", "active", "disabled", "loading"],
|
|
107
|
+
react_only_api_not_copied: true,
|
|
108
|
+
verification_ref: "verification/button-states.png"
|
|
109
|
+
}]
|
|
110
|
+
},
|
|
111
|
+
antd: { target_antd_version: "6.6.2", queries: { design_md: "verification/antd-design.json", components: [] } },
|
|
112
|
+
browser_verification: { rendered_nonblank: true, viewports: [], main_flow_result: "passed", failure_permission_or_conflict_result: "passed", console_error_ref: "verification/console.txt" },
|
|
113
|
+
design_qa: { report_ref: `docs/.scratch/${feature}/verification/design-qa.md`, result: "passed" },
|
|
114
|
+
accessibility_verification: {
|
|
115
|
+
contrast_results_ref: "verification/contrast.json",
|
|
116
|
+
keyboard_navigation_result: "passed",
|
|
117
|
+
focus_visible_and_order_result: "passed",
|
|
118
|
+
semantic_label_dialog_result: "passed",
|
|
119
|
+
zoom_200_result: "passed",
|
|
120
|
+
reduced_motion_result: "passed",
|
|
121
|
+
target_size_result: "passed",
|
|
122
|
+
automated_scan: { tool: "axe", version: "4", result: "passed", ref: "verification/axe.json" }
|
|
123
|
+
},
|
|
124
|
+
review: { prototype_review_ref: "design/review.md", result: "approved" },
|
|
125
|
+
user_confirmation: { confirmation_ref: "design/confirmation.md", result: "approved" },
|
|
126
|
+
blockers: []
|
|
127
|
+
};
|
|
128
|
+
assert.deepEqual(validatePrototypeEvidence(validEvidence).errors, []);
|
|
129
|
+
|
|
130
|
+
const missingMapping = structuredClone(validEvidence);
|
|
131
|
+
delete missingMapping.visual_semantic_mapping;
|
|
132
|
+
assert(validatePrototypeEvidence(missingMapping).errors.some((message) => message.includes("visual_semantic_mapping")));
|
|
133
|
+
|
|
134
|
+
const copiedReactApi = structuredClone(validEvidence);
|
|
135
|
+
copiedReactApi.visual_semantic_mapping.components[0].react_only_api_not_copied = false;
|
|
136
|
+
assert(validatePrototypeEvidence(copiedReactApi).errors.some((message) => message.includes("React-only")));
|
|
137
|
+
|
|
138
|
+
const inaccessible = structuredClone(validEvidence);
|
|
139
|
+
inaccessible.accessibility_verification.contrast_results_ref = "";
|
|
140
|
+
assert(validatePrototypeEvidence(inaccessible).errors.some((message) => message.includes("contrast_results_ref")));
|
|
141
|
+
|
|
142
|
+
const wrongQaRoot = structuredClone(validEvidence);
|
|
143
|
+
wrongQaRoot.design_qa.report_ref = "docs/design/design-qa.md";
|
|
144
|
+
assert(validatePrototypeEvidence(wrongQaRoot).errors.some((message) => message.includes("design_qa.report_ref")));
|
|
145
|
+
|
|
146
|
+
const versionMismatch = structuredClone(validEvidence);
|
|
147
|
+
versionMismatch.antd.target_antd_version = "6.6.1";
|
|
148
|
+
assert(validatePrototypeEvidence(versionMismatch).errors.some((message) => message.includes("target_antd_version")));
|
|
149
|
+
|
|
150
|
+
const unresolvedBlocker = structuredClone(validEvidence);
|
|
151
|
+
unresolvedBlocker.blockers = ["缺少权限失败态"];
|
|
152
|
+
assert(validatePrototypeEvidence(unresolvedBlocker).errors.some((message) => message.includes("blockers")));
|
|
153
|
+
|
|
154
|
+
process.stdout.write("YSS prototype contract scenarios passed\n");
|
|
@@ -15,7 +15,7 @@ Use this reference when multiple YSS skills seem applicable.
|
|
|
15
15
|
- `yss-use-table-height`: Only table available-height calculation and required container/pagination/toolbar wiring.
|
|
16
16
|
- `yss-use-tree-height`: Only tree available-height calculation, search offset, and virtual scrolling wiring.
|
|
17
17
|
|
|
18
|
-
Default for a new page: first verify the approved product design, state matrix, Ant Design v6 high-fidelity HTML prototype,
|
|
18
|
+
Default for a new page: first verify the approved product design, state matrix, Ant Design v6 theme/visual-standard high-fidelity HTML prototype, schema v2 semantic mapping/browser/accessibility evidence, and user confirmation; then use the implementation lockfile to map into YSS UI + Ant Design Vue 4.x, start with `yss-page-module-development`, and add the narrow skills that match the page controls.
|
|
19
19
|
|
|
20
20
|
中文说明:新建页面默认从页面模块技能开始,只有遇到具体组件、Hook、API、Formily 细节时再加载专项技能。
|
|
21
21
|
|
|
@@ -68,7 +68,7 @@ slice_contract_required:
|
|
|
68
68
|
root: [schema_version, contract_id, contract_version, slice_id, status, lifecycle_refs, readiness, common, frontend, backend, contract, cross_repo, work_units]
|
|
69
69
|
lifecycle_refs: [spec, ticket, requirement_freeze, low_fidelity_review, prototype_review, high_fidelity_html, prototype_verification, antd_cli_evidence, browser_verification_evidence, prototype_confirmation, openapi_freeze_or_no_impact, architecture_review, data_architecture, tactical_design, engineering_baseline, build_architecture_checklist, implementation_repository, frontend_repository, backend_repository, maven_wrapper]
|
|
70
70
|
readiness: [blockers, stale_inputs, not_applicable]
|
|
71
|
-
common: [impacted_areas, implementation_path_policy, project_roots, required_skills, optional_skills, unavailable_skills, allowed_write_paths, forbidden_patterns, expected_evidence_files, verification_commands, human_review_points, full_reroute_triggers]
|
|
71
|
+
common: [impacted_areas, implementation_path_policy, project_roots, required_skills, optional_skills, unavailable_skills, allowed_write_paths, forbidden_patterns, expected_evidence_files, verification_commands, human_review_points, full_reroute_triggers, quality_baseline_ref, context_plan, doubt_driven_review]
|
|
72
72
|
frontend: [status, required_skills, approved_prototype_ref, state_matrix_ref, allowed_write_paths, component_test_seams, e2e_paths]
|
|
73
73
|
backend: [status, affected_layers, component_impacts, required_skills, application_boundary, transaction_boundary, persistence_strategy, allowed_write_paths, forbidden_patterns, expected_evidence_files, seam_deferred, verification_commands, tactical_ddd]
|
|
74
74
|
contract: [api_impact, freeze_ref, no_api_impact_ref, generated_clients, contract_tests, regeneration_commands]
|
|
@@ -100,7 +100,12 @@ work_unit_required: [id, behavior, primary_skill, supporting_skills, tdd_mode, a
|
|
|
100
100
|
work_unit_nonempty_arrays: [allowed_write_paths, expected_evidence, verification_commands]
|
|
101
101
|
slice_contract_nonempty: [contract_id, contract_version, slice_id, status]
|
|
102
102
|
slice_contract_array_fields:
|
|
103
|
-
common: [impacted_areas, implementation_path_policy, project_roots, required_skills, allowed_write_paths, forbidden_patterns, expected_evidence_files, verification_commands, full_reroute_triggers]
|
|
103
|
+
common: [impacted_areas, implementation_path_policy, project_roots, required_skills, allowed_write_paths, forbidden_patterns, expected_evidence_files, verification_commands, full_reroute_triggers, quality_baseline_ref, context_plan, doubt_driven_review]
|
|
104
|
+
|
|
105
|
+
context_plan:
|
|
106
|
+
required: [required_context_refs, on_demand_context_refs, context_stop_rule, missing_context_action]
|
|
107
|
+
context_stop_rule: minimal-sufficient-evidence
|
|
108
|
+
missing_context_action: [blocked, reroute]
|
|
104
109
|
|
|
105
110
|
scaffold_contract_schema:
|
|
106
111
|
schema_version: 1
|
|
@@ -241,6 +246,7 @@ full_reroute_triggers:
|
|
|
241
246
|
- test-seam-changed
|
|
242
247
|
- verification-command-changed
|
|
243
248
|
- delivery-order-changed
|
|
249
|
+
- doubt-review-triggered
|
|
244
250
|
|
|
245
251
|
reroute_destinations:
|
|
246
252
|
scaffold-baseline-drift: stage7-scaffold-revalidation
|
|
@@ -258,9 +264,30 @@ reroute_destinations:
|
|
|
258
264
|
test-seam-changed: spec-ticket-test-seam-review
|
|
259
265
|
verification-command-changed: stage7-contract-recompile
|
|
260
266
|
delivery-order-changed: cross-repo-release-review
|
|
267
|
+
doubt-review-triggered: high-risk-decision-review
|
|
268
|
+
|
|
269
|
+
doubt_driven_review:
|
|
270
|
+
applies_when:
|
|
271
|
+
- api-schema-impact
|
|
272
|
+
- database-schema-impact
|
|
273
|
+
- cross-repo-contract
|
|
274
|
+
- release-or-rollback
|
|
275
|
+
- authentication-authorization-tenant-or-sensitive-data-behavior
|
|
276
|
+
- lifecycle-or-generation-semantics
|
|
277
|
+
required: [claim, counterclaim, evidence_refs, residual_risks, reviewer_ref]
|
|
278
|
+
status_values: [not-applicable, required, completed, blocked]
|
|
279
|
+
blocking_when: [missing-counterclaim, insufficient-evidence, unresolved-residual-risk]
|
|
280
|
+
evidence_owner: decision-or-review-record
|
|
281
|
+
no_new_lifecycle_stage: true
|
|
282
|
+
|
|
283
|
+
quality_baseline:
|
|
284
|
+
source: lifecycle_refs.engineering_baseline
|
|
285
|
+
required_for: [project-instance]
|
|
286
|
+
reused_by: [slice-contract, yss-skill-execution-result, code-review, release]
|
|
287
|
+
redefinition: forbidden
|
|
261
288
|
|
|
262
289
|
execution_result_allowed_statuses: [implemented, seam-deferred, drift, violation, not-applicable]
|
|
263
|
-
execution_blockers: [path-outside-contract, missing-evidence, verification-not-executed, verification-command-mismatch, seam-deferred-without-owner, constraint-failed, unapproved-deviation, drift, violation, new-impacts]
|
|
290
|
+
execution_blockers: [path-outside-contract, missing-evidence, verification-not-executed, verification-command-mismatch, seam-deferred-without-owner, constraint-failed, doubt-review-missing, unapproved-deviation, drift, violation, new-impacts]
|
|
264
291
|
|
|
265
292
|
contract_versioning:
|
|
266
293
|
full_reroute_current_status: stale
|
|
@@ -54,6 +54,20 @@ slice_contract:
|
|
|
54
54
|
verification_commands: []
|
|
55
55
|
human_review_points: []
|
|
56
56
|
full_reroute_triggers: []
|
|
57
|
+
quality_baseline_ref:
|
|
58
|
+
context_plan:
|
|
59
|
+
required_context_refs: []
|
|
60
|
+
on_demand_context_refs: []
|
|
61
|
+
context_stop_rule: minimal-sufficient-evidence
|
|
62
|
+
missing_context_action: blocked # or reroute
|
|
63
|
+
doubt_driven_review:
|
|
64
|
+
status: not-applicable # or required / completed / blocked
|
|
65
|
+
trigger_impacts: []
|
|
66
|
+
claim:
|
|
67
|
+
counterclaim:
|
|
68
|
+
evidence_refs: []
|
|
69
|
+
residual_risks: []
|
|
70
|
+
reviewer_ref:
|
|
57
71
|
frontend:
|
|
58
72
|
status: not-applicable
|
|
59
73
|
required_skills: []
|
|
@@ -13,6 +13,8 @@ execution_result:
|
|
|
13
13
|
contract_ref:
|
|
14
14
|
contract_id:
|
|
15
15
|
contract_version:
|
|
16
|
+
quality_baseline_ref:
|
|
17
|
+
context_plan_ref:
|
|
16
18
|
changed_files:
|
|
17
19
|
- path:
|
|
18
20
|
contract_area: common | frontend | backend | contract | cross_repo
|
|
@@ -28,6 +30,9 @@ execution_result:
|
|
|
28
30
|
- constraint:
|
|
29
31
|
status: passed | failed | not-applicable
|
|
30
32
|
evidence_ref:
|
|
33
|
+
doubt_driven_review:
|
|
34
|
+
status: not-applicable | completed | blocked
|
|
35
|
+
record_ref:
|
|
31
36
|
seam_deferred:
|
|
32
37
|
- risk:
|
|
33
38
|
owner:
|
|
@@ -32,7 +32,7 @@ pnpm why vue @yss-ui/components @yss-ui/hooks ant-design-vue vxe-table
|
|
|
32
32
|
|
|
33
33
|
## Ant Design v6 边界
|
|
34
34
|
|
|
35
|
-
Ant Design v6
|
|
35
|
+
Ant Design v6 是产品原型默认的主题样式、视觉和 token 语义标准;Vue 生产实现使用 Ant Design Vue 4.x。版本号不同本身不是冲突。生产映射必须消费原型证据中的 `visual_semantic_mapping`,并用实现仓 lockfile/类型验证 YSS 或 AntDV 目标;禁止复制 React hooks、JSX、组件 props、theme algorithm API 或事件模型到 Vue 代码。
|
|
36
36
|
|
|
37
37
|
## 兼容性证据
|
|
38
38
|
|
|
@@ -17,7 +17,7 @@ Create skills that add useful, non-obvious guidance without constraining unrelat
|
|
|
17
17
|
6. Follow the repository's declared maintenance and review policy. If none exists, run structural validation plus focused checks of the behavior or invariant changed. Use independent forward testing only when complexity or risk makes it meaningful; do not require a failing baseline for every ordinary edit.
|
|
18
18
|
7. After changes, validate frontmatter, naming, references, scripts, projections, locks, and affected callers. Retire obsolete names and resources unless the repository explicitly requires compatibility.
|
|
19
19
|
8. When a repository declares staged template verification, default the implementation loop to its fast impact profile and stop at `implementation-ready`. Promote explicitly to `review-ready`; do not create frozen candidates, review packages, or release evidence during ordinary iteration. Unknown paths and changes to the verification framework itself must fail safe to the full profile.
|
|
20
|
-
9. For
|
|
20
|
+
9. For L3 template maintenance, record maintainer self-check plus fresh verification and do not create a frozen candidate or formal independent review during ordinary iteration. Before release, run the repository's full `scripts/verify-template` gate once; historical formal-review records remain read-only compatible.
|
|
21
21
|
|
|
22
22
|
## Boundaries
|
|
23
23
|
|
|
@@ -11,6 +11,8 @@
|
|
|
11
11
|
- `antd.queries.components[]`:每个选用组件的 `info_ref` / `demo_ref` / `token_ref` / `semantic_ref`。
|
|
12
12
|
- `design_baseline.project_design_ref`:`docs/design/design.md`。
|
|
13
13
|
- `design_baseline.project_override_reviewed`:上游默认与项目 token 已对照。
|
|
14
|
+
- `prototype_stack.actual_antd_version`:原型 lockfile 中的实际 React `antd@6.x`,必须与 `antd.target_antd_version` 一致。
|
|
15
|
+
- `visual_semantic_mapping.components[]`:记录 v6 semantic role、项目 Token、React 原型组件、生产 YSS/Ant Design Vue 4.x 目标与 React-only API 隔离结论。
|
|
14
16
|
|
|
15
17
|
JSON 输出存为相邻文件,证据清单只引用路径。不要把整份 `llms-full.txt` 或 MCP 对话贴进清单。
|
|
16
18
|
|
|
@@ -18,6 +20,8 @@ JSON 输出存为相邻文件,证据清单只引用路径。不要把整份 `l
|
|
|
18
20
|
|
|
19
21
|
`antd lint` 只对可解析的 React/TSX 源码有规则命中。HTML 原型会出现空 issues(假绿)或 `skippedFiles` / `parse-error` / `partial: true`。
|
|
20
22
|
|
|
23
|
+
CLI JSON 只能证明查询事实,不能单独证明原型消费了目标版本或完成了 Vue/YSS 映射。`gate.prototype-verified` 还必须通过 `yss-prototype-stage/scripts/prototype-contract.mjs` 的项目与 schema v2 证据校验、Design QA、浏览器和无障碍验证。
|
|
24
|
+
|
|
21
25
|
| 产物 | `lint_applicable` | 做法 |
|
|
22
26
|
|---|---|---|
|
|
23
27
|
| `docs/.scratch/<feature>/design/prototypes/index.html` | `not-applicable` | 写 `lint_reason: html-prototype`;`lint_ref` 可空;`lint_passed` 保持 `false`,不得改成 `true` |
|
|
@@ -40,6 +40,7 @@ description: Use when YSS 产品设计系统与 Ant Design 企业级 UI 风格
|
|
|
40
40
|
- 组件语言:优先 Ant Design / YSS UI 语义,不自造同类控件。
|
|
41
41
|
- 状态完整性:loading、empty、error、readonly、disabled、no-permission、conflict、success 必须在设计或实现中可解释。
|
|
42
42
|
- Ant Design v6 原型基线:先用语义 token 定义角色,再用组件 token 或 CSS variables 落地;不以局部硬编码替代主题层。
|
|
43
|
+
- 双轨版本:主题/视觉标准为 React Ant Design v6;生产 API 为 Vue 3 + YSS UI + 实现仓 lockfile 的 Ant Design Vue 4.x。只迁移语义、Token、状态与验收行为。
|
|
43
44
|
|
|
44
45
|
## 强制规则
|
|
45
46
|
|
|
@@ -49,7 +50,7 @@ description: Use when YSS 产品设计系统与 Ant Design 企业级 UI 风格
|
|
|
49
50
|
- 每个页面或决策区域只保留一个 single primary action;其余动作降级为默认、链接或危险操作。
|
|
50
51
|
- 不硬编码表面色、边框色、状态色;优先使用 token 或主题变量。
|
|
51
52
|
- 交互原型中的每个可点击主动作都必须给出 interaction feedback:状态变化、禁用原因、成功或失败反馈至少覆盖其一。
|
|
52
|
-
- accessibility
|
|
53
|
+
- accessibility:品牌 Seed `#3371ff` 保持不变;实际文字/背景组合不满足 WCAG 2.2 AA 时,优先通过 `ConfigProvider` component token 调整,并验证 default/hover/active/disabled/focus、键盘焦点、200% zoom、reduced motion 与目标尺寸,不新增页面级特例色。
|
|
53
54
|
- React + Ant Design 的暗色或紧凑密度必须使用 theme algorithm,不手工反转颜色或逐控件压缩尺寸。
|
|
54
55
|
- 不用 Tag 表达关键错误、阻断或审批状态;关键状态必须有可读文本和语义反馈。
|
|
55
56
|
- 不让按钮、标签、表头、弹窗、卡片中的文字溢出或遮挡。
|
|
@@ -89,6 +90,7 @@ description: Use when YSS 产品设计系统与 Ant Design 企业级 UI 风格
|
|
|
89
90
|
| YTable / YTree / 高度自适应 | `yss-components` / `yss-use-table-height` / `yss-use-tree-height` |
|
|
90
91
|
| 原型阶段的 Ant Design v6 组件 / token / demo 查询 | `yss-antd-design`(只用于原型设计构建;前端落地改用 `yss-ui`) |
|
|
91
92
|
| Codex 原型交接前的视觉 QA | `design-qa`;token / 字体对照读 `references/design-qa-theme.md`,以项目覆盖为准 |
|
|
93
|
+
| Product Design 通用 starter 接入 YSS | `yss-prototype-stage/references/product-design-adapter.md`;锁定 antd@6、pnpm、主题 adapter、feature 级 QA 与证据 |
|
|
92
94
|
| API 契约 / 接入 | `yss-openapi-governance` / `yss-api-integration` |
|
|
93
95
|
|
|
94
96
|
## 更新设计系统
|
|
@@ -157,7 +157,7 @@ When implementing a page module, the result should usually include:
|
|
|
157
157
|
|
|
158
158
|
## Stage 7 Contract
|
|
159
159
|
|
|
160
|
-
- Require an approved `Slice Implementation Contract`, requirement freeze, low-fidelity review, Ant Design v6 high-fidelity HTML prototype,
|
|
160
|
+
- Require an approved `Slice Implementation Contract`, requirement freeze, low-fidelity review, Ant Design v6 theme/visual-standard high-fidelity HTML prototype, schema v2 semantic mapping/browser/accessibility evidence, user confirmation, and state matrix for UI-impact work; production APIs still come from YSS UI + the actual Ant Design Vue 4.x lockfile.
|
|
161
161
|
- Bind page, hooks, schema, blocks, generated API client, component tests, and E2E paths to contract fields and `allowed_write_paths`.
|
|
162
162
|
- User-visible loading, empty, error, permission, selection, pagination, and action behavior use `behavior-tdd`; purely mechanical page scaffolding may use documented `controlled-generation`.
|
|
163
163
|
- Return the shared `YSS Skill Execution Result`. A prototype mismatch, new API, new permission state, path overrun, or missing evidence must produce `drift`, `violation`, or `new_impacts`, not `implemented`.
|
|
@@ -16,6 +16,8 @@ description: 编排 YSS 产品或模块从机会调研到 Spec、原型、技术
|
|
|
16
16
|
|
|
17
17
|
Matt 的 `grill-with-docs`、`to-spec`、`to-tickets`、`implement` 等保留为显式兼容入口;默认路径是本 skill 持有的原生工作单元,由本编排器创建正式资产、维护状态并在会签门禁暂停(级别见数字人角色注册表)。兼容入口不得自动调用它们或代替其创建正式资产;Matt 只导航,不得写生命周期资产或改变门禁/Ticket 状态;任何写入前回交本编排器。
|
|
18
18
|
|
|
19
|
+
技能调用先消费 `docs/agents/yss-skill-registry.yaml` 的 `invocation_contract`:它只约束调用模式、触发/排除条件、主要输出和依赖,不替代生命周期证据或门禁。进入实现后,Slice Contract 的 `common.context_plan` 只加载当前切片的最小充分上下文;缺失权威上下文必须 `blocked` 或回 Router,不得猜测补齐。质量标准由 `engineering-baseline` 一次定义并由切片、Execution Result、审查和发布复用;命中高风险影响时在途记录 Doubt-Driven 主张、反证、证据和残余风险。Wayfinder 仅作为超长或决策前沿不清晰工作的可选 Discovery → Spec 规划模式,完成后回到 `handoff → to-spec`,不改变生命周期状态。
|
|
20
|
+
|
|
19
21
|
## 不可裁剪的主链
|
|
20
22
|
|
|
21
23
|
入口分诊 → Discovery → Spec / 功能架构 → 产品设计 → 系统 / 数据架构与工程契约 → Ticket 正式化 → 垂直切片实现(前后端 TDD)→ 验证 / 发布 / 复盘。
|
|
@@ -31,7 +33,7 @@ Matt 的 `grill-with-docs`、`to-spec`、`to-tickets`、`implement` 等保留为
|
|
|
31
33
|
| 入口分诊 `stage.entry-triage` | 身份、影响面、最近可信阶段 | `work-unit.entry-triage`;`yss-product-lifecycle` | `yss-project.yaml` 合法且影响面可解释 |
|
|
32
34
|
| Discovery `stage.discovery` | Discovery、用户/MVP/非目标/成功标准、测试 seam;命中 DDD 影响时补充领域战略设计与阶段决策包 | `work-unit.discovery-opportunity` + `work-unit.discovery-requirements` + `work-unit.domain-strategy-design` + `work-unit.stage-decision`;市场/竞品事实用 `competitive-intelligence`,技术/标准事实用 `research`;需求澄清用 `grilling`,领域建模用 `domain-modeling` / `yss-stage-decision`;`grill-with-docs` 为兼容入口 | 未决事实已 research 或 handoff,领域边界和统一语言可审查,阶段决策包完成必要批准;`gate.domain-strategy-approved`、`gate.stage-decision-package-approved` |
|
|
33
35
|
| Spec / 功能架构 `stage.spec-architecture` | Spec、产品总体设计、功能架构;必要时 Spec Delta | 原生 `work-unit.spec-synthesis`;`to-spec` 为兼容入口 | 初稿先为 `ready-for-human`;只有 Spec baseline 会签批准后资产才为 `approved` 并进入下游 |
|
|
34
|
-
| 产品设计 `stage.product-design` | 交互说明、低保真、状态矩阵、高保真 HTML、评审记录 | `work-unit.prototype-design`;`yss-
|
|
36
|
+
| 产品设计 `stage.product-design` | 交互说明、低保真、状态矩阵、高保真 HTML、评审记录 | `work-unit.prototype-design`;`yss-prototype-stage` 为主合同,依次消费 `yss-design-system`、独立 `prototype-review`、`yss-antd-design` pre-build facts、Codex `product-design:index` focused workflow、post-build/浏览器/无障碍验证(非 Codex 交付等价合同)。前端落地改用 `yss-ui` | `gate.prototype-reviewed`、`gate.prototype-verified`、`gate.user-confirmation` 均有 schema v2 证据 |
|
|
35
37
|
| 系统 / 数据架构与工程契约 `stage.system-data-engineering` | OpenAPI Draft/Freeze、数据架构、工程基线、架构审查;按领域影响执行 Tactical DDD Check | `work-unit.technical-analysis`;`yss-router` + `yss-openapi-governance` / `yss-openapi-draft-review`、`codebase-design`、`implementation-repo-onboarding`、`yss-tactical-design`;用户或合同明确要求架构可视化时条件追加 `archify` | API/架构契约冻结;无 API 影响有明确记录;战术模型无未解释冲突;脚手架策略满足;Archify 图只作派生审查证据;`gate.openapi-draft-reviewed`、`gate.design-reviewed`、`gate.openapi-frozen`、`gate.engineering-baseline-accepted`、`gate.architecture-reviewed` |
|
|
36
38
|
| Ticket 正式化 `stage.ticket-formalization` | 功能父 Ticket、垂直切片、Slice Implementation Contract | 原生 `work-unit.ticket-decomposition`;`yss-router`;`to-tickets` 为兼容入口;生命周期复算 | 依赖、验收、测试 seam 可执行;合同已批准、持久化且为当前版本;`gate.slice-contract-approved`、`gate.slice-ready-for-agent` |
|
|
37
39
|
| 垂直切片实现 `stage.vertical-slice-implementation` | 前端/后端代码、TDD 证据、YSS Skill Execution Result | 原生 `work-unit.slice-implementation`;`yss-router` + `tdd`;前端按 `yss-ui` + `yss-page-module-development`,后端按 Router 最小闭包;`implement` 为兼容入口 | 仅接收已完成 Ticket 正式化、已绑定垂直切片且 `ready-for-agent` 公式通过的输入;只写允许路径;业务行为用 `tdd` 的 `behavior-tdd` 模式;UI 影响必须有还原计划 |
|
|
@@ -19,7 +19,7 @@ Matt skills 决定如何工作;YSS 生命周期决定是否允许推进;YSS
|
|
|
19
19
|
| 通用入口 | `ask-matt` | 检测到 YSS 后由本编排器最终裁决 |
|
|
20
20
|
| 需求澄清 | `grill-with-docs`(用户显式)或 `grilling`、`domain-modeling`(生命周期原语) | 按退出判定检查未决项和回流 |
|
|
21
21
|
| 信息在其他人手中 | `to-questionnaire` | 使用 `external-input-required` 暂停;答案回流后记录 response、重新分类影响面,再进入 `grill-with-docs` 或 `to-spec` |
|
|
22
|
-
| 大型模糊工作 | `wayfinder
|
|
22
|
+
| 大型模糊工作 | `wayfinder`(可选) | 仅在跨会话 / 跨 Agent 或 frontier 不清晰时启用;map 真正完成后 `handoff → to-spec` |
|
|
23
23
|
| 技术事实 | `research` | 一手资料回填 Spec/OpenAPI/架构/ADR |
|
|
24
24
|
| runnable 问题 | `prototype` | 生成单文件可分享 HTML,保留 `prototype/<name>` 分支作为主来源;必须 source/return handoff 和结论回填,不得替代阶段 4 的低保真评审、Ant Design v6 高保真 HTML、AntD CLI 证据和用户确认 |
|
|
25
25
|
| Spec 综合 | 原生 `work-unit.spec-synthesis`;`to-spec`(用户显式兼容) | 初稿进入 `ready-for-human`,不得直接实现 |
|
|
@@ -76,7 +76,7 @@ Router 状态映射为:`draft → completed`、`blocked → blocked`、`ready-
|
|
|
76
76
|
|
|
77
77
|
## Review 候选与 Git 授权
|
|
78
78
|
|
|
79
|
-
YSS 调用 `code-review` 前必须形成 review input,至少包含 `review_mode`、`review_base_ref`、`implementation_candidate_ref`、`candidate_snapshot_ref`、`candidate_digest`、`spec_ref`、`ticket_ref`、`slice_contract_ref`、`build_architecture_checklist_ref` 和 `yss_execution_result_refs`,并满足 `orchestration-contract.yaml.review_input.manifest_required_by_mode`。Standards 还必须编译 `review_standards_route`:合同 `required_skills`、影响面专项检查输入、报告模板与 `finding_disposition`;机器检查按 `run_if_present`
|
|
79
|
+
YSS 调用 `code-review` 前必须形成 review input,至少包含 `review_mode`、`review_base_ref`、`implementation_candidate_ref`、`candidate_snapshot_ref`、`candidate_digest`、`spec_ref`、`ticket_ref`、`slice_contract_ref`、`build_architecture_checklist_ref` 和 `yss_execution_result_refs`,并满足 `orchestration-contract.yaml.review_input.manifest_required_by_mode`。Standards 还必须编译 `review_standards_route`:合同 `required_skills`、影响面专项检查输入、报告模板与 `finding_disposition`;机器检查按 `run_if_present` 执行。质量标准只从 `engineering-baseline` 引用,禁止在 review input 或切片中另起一份。命中高风险影响时,review input 还要引用 Doubt-Driven 主张 / 反证记录;缺少反证或残余风险未处理时返回 `blocked`。`committed` 审查 merge-base 到不可变 `HEAD`;`worktree` 一次捕获 merge-base 到 working tree 的 committed、staged、unstaged 和 untracked 内容,使用 `yss-worktree-candidate-v1` 规定的 raw path、uint64 big-endian 长度、tracked/untracked record 和不支持条目阻断规则计算 SHA-256,让两个 Reviewer 消费同一不可变快照,并在返回和完成 checkpoint 复核摘要未变化。缺少输入、候选为空、专项覆盖缺失、未关闭 mandatory `violation`、适用行空白或摘要变化时返回 `blocked`,不能缩小审查范围、另起通用审查 skill、由审查者改实现,或合并不同候选的结论。`violation` 类 finding 交实现者在原合同路径修复后全轴复审;`drift` / `new_impacts` 使合同 `stale` 并回 Router。
|
|
80
80
|
|
|
81
81
|
Matt `implement` 的通用提交指令不构成 YSS Git 授权。只有用户明确给出 `commit_authorized` 为 `true`、非空 `commit_scope` 和 `commit_authorization_ref` 时才能 commit;只有明确给出 `push_authorized` 为 `true`、非空 `push_scope` 和 `push_authorization_ref` 时才能 push。缺少任一字段时保持工作区不变,只输出 checkpoint 判断;不得把 `orchestrate`、实现授权、当前分支、测试通过或负责人要求解释为隐含授权。`git-submodule` 还必须按仓授权、禁止 detached HEAD 提交,并先推子仓再更新父仓 gitlink。
|
|
82
82
|
|
package/template/.claude/skills/yss-product-lifecycle/references/orchestration-contract.yaml
CHANGED
|
@@ -241,6 +241,10 @@ work_unit_routes:
|
|
|
241
241
|
primary_skill: yss-prototype-stage
|
|
242
242
|
supporting_skills: [prototype-review, yss-design-system, yss-antd-design, product-design:index]
|
|
243
243
|
skills: [prototype-review, yss-design-system, yss-prototype-stage, yss-antd-design, product-design:index]
|
|
244
|
+
execution_order: [yss-design-system, low-fidelity-assets, prototype-review, yss-antd-design-pre-build, product-design-focused-workflow, yss-antd-design-post-build, browser-design-qa-accessibility, user-confirmation]
|
|
245
|
+
prototype_adapter_ref: .agents/skills/yss-prototype-stage/references/product-design-adapter.md
|
|
246
|
+
evidence_schema_version: 2
|
|
247
|
+
version_boundary: {design_standard: ant-design-v6, prototype_components: react-antd-6.x, production_components: yss-ui-ant-design-vue-4.x, production_version_source: implementation-lockfile}
|
|
244
248
|
human_gate: prototype-confirmation
|
|
245
249
|
applies_when: product_design_impact
|
|
246
250
|
not_applicable_reason: no_ui_or_product_design_impact
|
|
@@ -644,8 +648,49 @@ release_readiness:
|
|
|
644
648
|
wayfinder_completion:
|
|
645
649
|
required: [no_open_children, no_open_blocked_or_claimed_children, no_fog, destination_clear]
|
|
646
650
|
|
|
651
|
+
wayfinder_mode:
|
|
652
|
+
optional: true
|
|
653
|
+
enable_when:
|
|
654
|
+
- multi-session-or-multi-agent-work
|
|
655
|
+
- unclear-decision-frontier
|
|
656
|
+
- cross-domain-dependency-map-needed
|
|
657
|
+
lifecycle_position: discovery-to-spec-planning
|
|
658
|
+
completion_route: wayfinder -> handoff -> to-spec
|
|
659
|
+
does_not_replace: [lifecycle-gates, spec-baseline, ticket-formalization]
|
|
660
|
+
forbidden_state_mutations: [ready-for-agent, gate-approval, ticket-role]
|
|
661
|
+
template_source_use: only-when-template-evolution-is-long-running
|
|
662
|
+
|
|
663
|
+
context_engineering:
|
|
664
|
+
contract_field: slice_contract.common.context_plan
|
|
665
|
+
required_context: [CONTEXT.md, approved-spec, current-slice-contract, applicable-adr-or-baseline]
|
|
666
|
+
on_demand_context: [specialist-references, implementation-repository-files, historical-evidence]
|
|
667
|
+
stop_rule: minimal-sufficient-evidence
|
|
668
|
+
missing_context_action: [blocked, reroute]
|
|
669
|
+
numeric_token_budget: not-required
|
|
670
|
+
|
|
671
|
+
doubt_driven_review:
|
|
672
|
+
applies_when:
|
|
673
|
+
- api-schema-impact
|
|
674
|
+
- database-schema-impact
|
|
675
|
+
- cross-repo-contract
|
|
676
|
+
- release-or-rollback
|
|
677
|
+
- authentication-authorization-tenant-or-sensitive-data-behavior
|
|
678
|
+
- lifecycle-or-generation-semantics
|
|
679
|
+
required: [claim, counterclaim, evidence_refs, residual_risks, reviewer_ref]
|
|
680
|
+
record_in: [decision-record, architecture-review, contract-review, release-review]
|
|
681
|
+
blocking_when: [missing-counterclaim, insufficient-evidence, unresolved-residual-risk]
|
|
682
|
+
ordinary-low-risk_changes: not-required
|
|
683
|
+
no_new_lifecycle_stage: true
|
|
684
|
+
|
|
685
|
+
quality_baseline_reuse:
|
|
686
|
+
source: artifact.engineering-baseline
|
|
687
|
+
applies_to: project-instance
|
|
688
|
+
consumers: [slice-implementation-contract, yss-skill-execution-result, code-review, release]
|
|
689
|
+
constraint_results_field: required
|
|
690
|
+
redefinition: forbidden
|
|
691
|
+
|
|
647
692
|
ready_for_agent:
|
|
648
|
-
required: [gates_satisfied, no_stale_artifacts, blockers_closed, implementation_context_ready, implementation_repo, implementation_branch, ci, verification_commands, rollback_point, predecessor_work_unit, ticket_decomposition_result_ref, ticket_decomposition_result_status, vertical_slice_ticket_ref, vertical_slice_ticket_role, vertical_slice_ticket_kind, slice_contract_approved, slice_contract_persisted, slice_contract_current_version, build_architecture_checklist, backend_slice_contract_if_applicable, backend_scaffold_policy_satisfied, frontend_implementation_plan_if_ui_impact]
|
|
693
|
+
required: [gates_satisfied, no_stale_artifacts, blockers_closed, implementation_context_ready, context_plan, quality_baseline_ref, implementation_repo, implementation_branch, ci, verification_commands, rollback_point, predecessor_work_unit, ticket_decomposition_result_ref, ticket_decomposition_result_status, vertical_slice_ticket_ref, vertical_slice_ticket_role, vertical_slice_ticket_kind, slice_contract_approved, slice_contract_persisted, slice_contract_current_version, build_architecture_checklist, backend_slice_contract_if_applicable, backend_scaffold_policy_satisfied, frontend_implementation_plan_if_ui_impact]
|
|
649
694
|
ticket_formalization_validator: scripts/lib/lifecycle-transition.mjs
|
|
650
695
|
requires_vertical_slice_ticket: true
|
|
651
696
|
parent_ticket_as_implementation_ref: forbidden
|
|
@@ -86,6 +86,12 @@ tracker 选择和冲突按 `docs/agents/issue-tracker.md` 裁决:已持久化
|
|
|
86
86
|
|
|
87
87
|
暂停输出:门禁、指定会签 `role_id`、`runtime_id`、会签文件路径、证据、推荐答案、一个问题、恢复动作。
|
|
88
88
|
|
|
89
|
+
## Context Plan 与质量基线
|
|
90
|
+
|
|
91
|
+
实现合同先消费 `common.context_plan`:必需上下文只包含 `CONTEXT.md`、已批准 Spec、当前合同和适用 ADR / 工程基线;专项 references、实现仓库文件和历史证据按影响面按需加载。达到最小充分证据后停止扩展,缺失权威上下文只能 `blocked` 或 `reroute`。
|
|
92
|
+
|
|
93
|
+
质量标准由 `engineering-baseline` 以 `baseline_id` / `baseline_version` 定义一次,Slice Contract、YSS Skill Execution Result、`code-review` 和发布检查只引用它,并将约束结果写入 `constraint_results`。命中 API / 数据迁移、跨仓契约、发布回滚、实际安全行为或生命周期 / 生成语义时,必须在现有决策或审查记录中完成 Doubt-Driven 主张、反证、证据、残余风险和 Reviewer 引用;普通低风险变更不触发该流程。
|
|
94
|
+
|
|
89
95
|
## Wayfinder 完成判定
|
|
90
96
|
|
|
91
97
|
“无 frontier”不等于完成。只有以下条件同时成立,才能 `wayfinder → handoff → to-spec`:
|
|
@@ -15,11 +15,12 @@ description: Use when a YSS feature has product-design impact on a primary flow,
|
|
|
15
15
|
|
|
16
16
|
## 资产与门禁顺序
|
|
17
17
|
|
|
18
|
-
1. 以 Spec
|
|
18
|
+
1. 以 Spec、产品总体设计、`yss-design-system` 和 `docs/design/design.md` 形成交互说明、低保真页面/流程与状态矩阵。
|
|
19
19
|
2. 用 `prototype-review` 形成独立评审结论;未通过不得生成高保真或进入需求冻结。
|
|
20
|
-
3.
|
|
21
|
-
4.
|
|
22
|
-
5.
|
|
20
|
+
3. 用 `yss-antd-design` 固定目标 React `antd@6.x`,先查询 `design.md` 与本功能组件事实。
|
|
21
|
+
4. 通过 `product-design:index` 的 `get-context → ideate → 用户选择 → image-to-code → design-qa` 产出 feature 级 React/Vite 原型;必须套用 `references/product-design-adapter.md`,不能把通用 starter 视为已符合 YSS。
|
|
22
|
+
5. 完成 AntD post-build manifest/lint(按产物类型)、同视口 Design QA、浏览器与无障碍验证,写入 schema v2 `docs/.scratch/<feature>/verification/prototype-evidence.yaml`。
|
|
23
|
+
6. 用户确认后,才可校准 Spec、分析 API 影响或进入 Router readiness。
|
|
23
24
|
|
|
24
25
|
## 设计与 AntD 依据
|
|
25
26
|
|
|
@@ -27,11 +28,13 @@ description: Use when a YSS feature has product-design impact on a primary flow,
|
|
|
27
28
|
|
|
28
29
|
Codex `$design-qa` 仍走官方对比流程;Colors/tokens 与 Fonts/typography 必须以项目覆盖为 source visual truth。对照清单见 `yss-design-system/references/design-qa-theme.md`。仍用官方 `#1677ff`、强制 `Inter` 或历史 8px 品牌圆角当默认主题,视为项目覆盖漂移。
|
|
29
30
|
|
|
30
|
-
Ant Design v6 事实由 `yss-antd-design` 查询并回写证据,不要并列调用官方 `antd` skill,也不要在前端代码落地时继续使用它。进入实现后改走 `yss-ui`。
|
|
31
|
+
主题与视觉标准固定为 `ant-design-v6`;生产运行时固定为 Vue 3 + YSS UI + `ant-design-vue-4.x`,精确生产版本来自实现仓 lockfile。版本号不同本身不是冲突。Ant Design v6 事实由 `yss-antd-design` 查询并回写证据,不要并列调用官方 `antd` skill,也不要在前端代码落地时继续使用它。进入实现后改走 `yss-ui`。
|
|
32
|
+
|
|
33
|
+
标准原型组件存在 Ant Design 实现时必须精确锁定与 CLI 目标一致的 `antd@6.x`,并通过 `ConfigProvider` 消费项目主题 adapter。执行与验证命令见 `references/product-design-adapter.md` 和 `scripts/prototype-contract.mjs`。
|
|
31
34
|
|
|
32
35
|
## 验证与回流
|
|
33
36
|
|
|
34
|
-
`browser_verification`
|
|
37
|
+
`browser_verification` 至少覆盖非空渲染、主流程、一个失败/权限/冲突状态、桌面与窄屏视口和控制台错误;`accessibility_verification` 至少覆盖对比度、键盘/焦点、语义标签与 Dialog、200% zoom、reduced motion、目标尺寸和自动化扫描。优先使用 Browser 或可执行浏览器自动化,Computer Use 只作人工交互补充。把路径、命令、版本、视口、结果和阻塞项写入证据清单。
|
|
35
38
|
|
|
36
39
|
`gate.prototype-reviewed` 的证据是评审记录;`gate.prototype-verified` 的证据是 AntD CLI 与浏览器验证;`gate.user-confirmation` 的证据是确认记录。三者均不是实现授权。
|
|
37
40
|
|
|
@@ -40,3 +43,5 @@ Ant Design v6 事实由 `yss-antd-design` 查询并回写证据,不要并列
|
|
|
40
43
|
- 仅有截图或 HTML,却没有可复现的 CLI、浏览器和确认记录。
|
|
41
44
|
- 把 `product-design:index` 或某个旧技能当作生命周期批准者。
|
|
42
45
|
- 直接复制官方默认颜色、圆角或间距,忽略项目覆盖。
|
|
46
|
+
- 只证明查询过 AntD v6,却没有 v6 semantic role → 项目 Token → YSS/AntDV4 的映射证据。
|
|
47
|
+
- 沿用 Product Design starter 的 npm、根目录 `design-qa.md` 或未安装 `antd` 的通用配置。
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# YSS Product Design Adapter
|
|
2
|
+
|
|
3
|
+
本合同把 Codex Product Design 的通用 React/Vite 产出接入 YSS 原型阶段。它不修改上游 Product Design skill,也不把 React API 带入 Vue 生产实现。
|
|
4
|
+
|
|
5
|
+
## 双轨版本
|
|
6
|
+
|
|
7
|
+
- `design_standard: ant-design-v6`:高保真原型的主题、视觉语义、标准组件和 CLI 事实。
|
|
8
|
+
- `runtime_component_library: ant-design-vue-4.x`:生产 Vue/YSS 组件 API;精确版本只从实现仓 lockfile 读取。
|
|
9
|
+
- 标准原型组件存在 Ant Design 实现时,React 原型必须精确锁定与 CLI 查询一致的 `antd@6.x`。YSS 专有布局可用适配 CSS,但仍消费项目 Token。
|
|
10
|
+
- 禁止把 React hook、props、JSX、静态 API 或事件模型作为 Vue/YSS 实现合同。
|
|
11
|
+
|
|
12
|
+
## 产出前适配
|
|
13
|
+
|
|
14
|
+
1. 目标目录固定为 `docs/.scratch/<feature>/design/prototypes/`。
|
|
15
|
+
2. Product Design 完成 `get-context`、三方案 `ideate` 和用户视觉选择后,进入 `image-to-code` 的 local preflight,只执行官方 bootstrap 创建空 starter;在安装依赖或编写 UI 前立即运行 adapter:
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
node .agents/skills/yss-prototype-stage/scripts/prototype-contract.mjs prepare \
|
|
19
|
+
--project-root <project-root> \
|
|
20
|
+
--root <project-root>/docs/.scratch/<feature>/design/prototypes \
|
|
21
|
+
--feature <feature> \
|
|
22
|
+
--target-antd-version <exact-6.x-version> \
|
|
23
|
+
--pnpm-version <actual-pnpm-version>
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
3. adapter 只做机械动作:精确写入 `antd` 版本、登记 pnpm、生成 `src/yss-theme.js` 和 `yss-prototype-adapter.json`。随后由 Product Design 将入口包在 `ConfigProvider theme={yssTheme}` 中,并优先使用标准 `antd` 组件。
|
|
27
|
+
4. 执行 `pnpm install`、`pnpm build`,保留 `pnpm-lock.yaml`、源码入口、构建入口、实际命令与退出码。禁止用 npm lockfile 代替受控例外记录。
|
|
28
|
+
5. 校验项目:
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
node .agents/skills/yss-prototype-stage/scripts/prototype-contract.mjs validate-project \
|
|
32
|
+
--root <project-root>/docs/.scratch/<feature>/design/prototypes \
|
|
33
|
+
--target-antd-version <exact-6.x-version>
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## 视觉与实现映射
|
|
37
|
+
|
|
38
|
+
每个关键组件在 `visual_semantic_mapping` 中记录四层映射:Ant Design v6 semantic role、项目 Token、React 原型组件、生产 YSS/Ant Design Vue 目标。映射的是视觉角色、状态和验收行为,不是 React API 表面形状。
|
|
39
|
+
|
|
40
|
+
至少覆盖主操作、表单输入、表格/列表、反馈、弹层和导航中本功能实际出现的类型。每项记录 `default/hover/active/disabled/loading/error` 等适用状态,并把 `react_only_api_not_copied` 设为 `true` 后才能通过。
|
|
41
|
+
|
|
42
|
+
## 视口、QA 与无障碍
|
|
43
|
+
|
|
44
|
+
- 默认视觉目标和同状态 QA 使用 desktop `1440x900`、mobile `390x844`;按影响追加 tablet/laptop/wide,不机械要求九个视口。
|
|
45
|
+
- Design QA 报告固定到 `docs/.scratch/<feature>/verification/design-qa.md`,不得写仓库根共享文件。
|
|
46
|
+
- 项目品牌 Seed `#3371ff` 保持不变;普通文本、按钮及状态组合不满足 WCAG 2.2 AA 时,通过组件 Token 调整实际填充或文字色,并保存对比度证据。
|
|
47
|
+
- 验证至少包含键盘、焦点、语义标签/Dialog、200% zoom、reduced motion、目标尺寸和自动化扫描;工具不可用时记录人工替代与未覆盖缺口,不得空填 passed。
|
|
48
|
+
|
|
49
|
+
## 交互档位
|
|
50
|
+
|
|
51
|
+
- `reviewable-flow`(默认):合同内主路径和关键状态可操作;非范围控件禁用或明确标注,不伪装完整功能。
|
|
52
|
+
- `full-prototype`:brief 明确要求的全部可见范围控件可操作。
|
|
53
|
+
|
|
54
|
+
不得使用含义冲突的 `static` / `mostly-static` 作为 YSS 交付状态。
|