create-yss-spec 3.3.7 → 3.3.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (131) hide show
  1. package/README.md +12 -13
  2. package/package.json +1 -1
  3. package/template/.agents/skills/.strategic-design-skills-manifest.json +2 -2
  4. package/template/.agents/skills/implementation-repo-onboarding/SKILL.md +2 -2
  5. package/template/.agents/skills/yss-application/SKILL.md +1 -1
  6. package/template/.agents/skills/yss-application/references/profiles/existing-domain-driven-maven.md +5 -0
  7. package/template/.agents/skills/yss-application/references/profiles/existing-layered-mvc-maven.md +5 -0
  8. package/template/.agents/skills/yss-implementation-contract-compiler/SKILL.md +2 -2
  9. package/template/.agents/skills/yss-implementation-contract-compiler/references/compiler-contract.yaml +4 -0
  10. package/template/.agents/skills/yss-product-lifecycle/references/orchestration-contract.yaml +6 -1
  11. package/template/.agents/skills/yss-prototype-stage/SKILL.md +10 -1
  12. package/template/.agents/skills/yss-technical-design/SKILL.md +2 -0
  13. package/template/.agents/skills/yss-technical-design/references/engineering-design.schema.json +224 -0
  14. package/template/.agents/skills/yss-technical-design/references/technical-design-common.schema.json +6 -0
  15. package/template/.agents/skills/yss-technical-design/references/technical-design.schema.json +288 -10
  16. package/template/.agents/skills/yss-technical-design/scripts/engineering-design.mjs +30 -0
  17. package/template/.agents/skills/yss-technical-design/scripts/generate-schema.mjs +2 -1
  18. package/template/.agents/skills/yss-technical-design/scripts/validate-technical-design.mjs +20 -8
  19. package/template/.agents/skills/yss-technical-design/tests/engineering-scenarios.mjs +12 -0
  20. package/template/.agents/skills/yss-web-controller/SKILL.md +1 -1
  21. package/template/.agents/skills/yss-web-controller/references/profiles/existing-domain-driven-maven.md +5 -0
  22. package/template/.agents/skills/yss-web-controller/references/profiles/existing-layered-mvc-maven.md +5 -0
  23. package/template/.codex/skills/implementation-repo-onboarding/SKILL.md +2 -2
  24. package/template/.codex/skills/yss-application/SKILL.md +1 -1
  25. package/template/.codex/skills/yss-application/references/profiles/existing-domain-driven-maven.md +5 -0
  26. package/template/.codex/skills/yss-application/references/profiles/existing-layered-mvc-maven.md +5 -0
  27. package/template/.codex/skills/yss-implementation-contract-compiler/SKILL.md +2 -2
  28. package/template/.codex/skills/yss-implementation-contract-compiler/references/compiler-contract.yaml +4 -0
  29. package/template/.codex/skills/yss-product-lifecycle/references/orchestration-contract.yaml +6 -1
  30. package/template/.codex/skills/yss-prototype-stage/SKILL.md +10 -1
  31. package/template/.codex/skills/yss-technical-design/SKILL.md +2 -0
  32. package/template/.codex/skills/yss-technical-design/references/engineering-design.schema.json +224 -0
  33. package/template/.codex/skills/yss-technical-design/references/technical-design-common.schema.json +6 -0
  34. package/template/.codex/skills/yss-technical-design/references/technical-design.schema.json +288 -10
  35. package/template/.codex/skills/yss-technical-design/scripts/engineering-design.mjs +30 -0
  36. package/template/.codex/skills/yss-technical-design/scripts/generate-schema.mjs +2 -1
  37. package/template/.codex/skills/yss-technical-design/scripts/validate-technical-design.mjs +20 -8
  38. package/template/.codex/skills/yss-technical-design/tests/engineering-scenarios.mjs +12 -0
  39. package/template/.codex/skills/yss-web-controller/SKILL.md +1 -1
  40. package/template/.codex/skills/yss-web-controller/references/profiles/existing-domain-driven-maven.md +5 -0
  41. package/template/.codex/skills/yss-web-controller/references/profiles/existing-layered-mvc-maven.md +5 -0
  42. package/template/.cursor/skills/implementation-repo-onboarding/SKILL.md +2 -2
  43. package/template/.cursor/skills/yss-application/SKILL.md +1 -1
  44. package/template/.cursor/skills/yss-application/references/profiles/existing-domain-driven-maven.md +5 -0
  45. package/template/.cursor/skills/yss-application/references/profiles/existing-layered-mvc-maven.md +5 -0
  46. package/template/.cursor/skills/yss-implementation-contract-compiler/SKILL.md +2 -2
  47. package/template/.cursor/skills/yss-implementation-contract-compiler/references/compiler-contract.yaml +4 -0
  48. package/template/.cursor/skills/yss-product-lifecycle/references/orchestration-contract.yaml +6 -1
  49. package/template/.cursor/skills/yss-prototype-stage/SKILL.md +10 -1
  50. package/template/.cursor/skills/yss-technical-design/SKILL.md +2 -0
  51. package/template/.cursor/skills/yss-technical-design/references/engineering-design.schema.json +224 -0
  52. package/template/.cursor/skills/yss-technical-design/references/technical-design-common.schema.json +6 -0
  53. package/template/.cursor/skills/yss-technical-design/references/technical-design.schema.json +288 -10
  54. package/template/.cursor/skills/yss-technical-design/scripts/engineering-design.mjs +30 -0
  55. package/template/.cursor/skills/yss-technical-design/scripts/generate-schema.mjs +2 -1
  56. package/template/.cursor/skills/yss-technical-design/scripts/validate-technical-design.mjs +20 -8
  57. package/template/.cursor/skills/yss-technical-design/tests/engineering-scenarios.mjs +12 -0
  58. package/template/.cursor/skills/yss-web-controller/SKILL.md +1 -1
  59. package/template/.cursor/skills/yss-web-controller/references/profiles/existing-domain-driven-maven.md +5 -0
  60. package/template/.cursor/skills/yss-web-controller/references/profiles/existing-layered-mvc-maven.md +5 -0
  61. package/template/.pi/skills/implementation-repo-onboarding/SKILL.md +2 -2
  62. package/template/.pi/skills/yss-application/SKILL.md +1 -1
  63. package/template/.pi/skills/yss-application/references/profiles/existing-domain-driven-maven.md +5 -0
  64. package/template/.pi/skills/yss-application/references/profiles/existing-layered-mvc-maven.md +5 -0
  65. package/template/.pi/skills/yss-implementation-contract-compiler/SKILL.md +2 -2
  66. package/template/.pi/skills/yss-implementation-contract-compiler/references/compiler-contract.yaml +4 -0
  67. package/template/.pi/skills/yss-product-lifecycle/references/orchestration-contract.yaml +6 -1
  68. package/template/.pi/skills/yss-prototype-stage/SKILL.md +10 -1
  69. package/template/.pi/skills/yss-technical-design/SKILL.md +2 -0
  70. package/template/.pi/skills/yss-technical-design/references/engineering-design.schema.json +224 -0
  71. package/template/.pi/skills/yss-technical-design/references/technical-design-common.schema.json +6 -0
  72. package/template/.pi/skills/yss-technical-design/references/technical-design.schema.json +288 -10
  73. package/template/.pi/skills/yss-technical-design/scripts/engineering-design.mjs +30 -0
  74. package/template/.pi/skills/yss-technical-design/scripts/generate-schema.mjs +2 -1
  75. package/template/.pi/skills/yss-technical-design/scripts/validate-technical-design.mjs +20 -8
  76. package/template/.pi/skills/yss-technical-design/tests/engineering-scenarios.mjs +12 -0
  77. package/template/.pi/skills/yss-web-controller/SKILL.md +1 -1
  78. package/template/.pi/skills/yss-web-controller/references/profiles/existing-domain-driven-maven.md +5 -0
  79. package/template/.pi/skills/yss-web-controller/references/profiles/existing-layered-mvc-maven.md +5 -0
  80. package/template/README.md +4 -6
  81. package/template/docs/agents/backend-architecture-profiles.md +4 -0
  82. package/template/docs/agents/yss-skill-registry.yaml +13 -0
  83. package/template/docs/design/templates/prototype-confirmation-template.md +2 -2
  84. package/template/docs/design/templates/prototype-review-checklist.md +2 -2
  85. package/template/docs/plan/templates/market-analysis-template.md +3 -3
  86. package/template/docs/plan/templates/user-pain-points-template.md +3 -3
  87. package/template/docs/process/delivery-preflight.md +72 -0
  88. package/template/docs/process/document-writing.md +5 -1
  89. package/template/docs/process/existing-backend-architecture.md +31 -0
  90. package/template/docs/process/existing-ui-baseline.md +40 -0
  91. package/template/docs/process/frontend-backend-delivery.md +19 -6
  92. package/template/docs/process/implementation-repo-integration.md +6 -0
  93. package/template/docs/process/schemas/backend-architecture-identity.schema.json +111 -14
  94. package/template/docs/process/schemas/delivery-preflight-input.schema.json +158 -0
  95. package/template/docs/process/schemas/delivery-preflight-result.schema.json +159 -0
  96. package/template/docs/process/schemas/digital-human-task-package.schema.json +1 -1
  97. package/template/docs/process/schemas/existing-ui-baseline.schema.json +365 -0
  98. package/template/docs/process/schemas/frontend-delivery-acceptance-v3.schema.json +308 -0
  99. package/template/docs/process/schemas/frontend-strategic-preflight-v2.schema.json +114 -0
  100. package/template/docs/process/schemas/strategic-design-handoff-v5.schema.json +932 -0
  101. package/template/docs/process/schemas/strategic-handoff-export-v2.schema.json +378 -0
  102. package/template/docs/process/strategic-handoff-package.md +21 -13
  103. package/template/docs/user-guide//346/212/200/346/234/257/350/256/276/350/256/241/347/224/250/346/210/267/346/214/207/345/215/227.md +43 -0
  104. package/template/docs/user-guide//347/224/250/346/210/267/346/211/213/345/206/214.md +83 -67
  105. package/template/docs/user-guide//347/224/250/346/210/267/346/211/213/345/206/214/347/264/242/345/274/225.md +9 -10
  106. package/template/docs/user-guide//350/256/276/345/244/207/345/200/237/347/224/250/350/264/257/347/251/277/346/241/210/344/276/213.md +12 -9
  107. package/template/scripts/backend-delivery +20 -4
  108. package/template/scripts/lib/approved-execution-context.mjs +106 -0
  109. package/template/scripts/lib/backend-architecture.mjs +12 -0
  110. package/template/scripts/lib/backend-delivery.mjs +10 -6
  111. package/template/scripts/lib/delivery-preflight.mjs +238 -0
  112. package/template/scripts/lib/existing-backend-architecture.mjs +139 -0
  113. package/template/scripts/lib/existing-ui-baseline.mjs +84 -0
  114. package/template/scripts/lib/frontend-delivery.mjs +23 -15
  115. package/template/scripts/lib/implementation-contract-compiler.mjs +19 -5
  116. package/template/scripts/lib/json-schema.mjs +19 -4
  117. package/template/scripts/lib/profile-skill-sync.mjs +26 -0
  118. package/template/scripts/lib/strategic-handoff-consumption.mjs +6 -5
  119. package/template/scripts/lib/strategic-handoff-design-targets.mjs +2 -3
  120. package/template/scripts/lib/strategic-handoff-io.mjs +10 -0
  121. package/template/scripts/lib/strategic-handoff.mjs +47 -29
  122. package/template/scripts/lib/task-package.mjs +11 -3
  123. package/template/scripts/lib/technical-design-boundary.mjs +9 -1
  124. package/template/scripts/lib/ui-baseline.mjs +26 -0
  125. package/template/scripts/lib/user-decision.mjs +4 -1
  126. package/template/scripts/preflight-delivery +14 -0
  127. package/template/scripts/strategic-handoff +19 -4
  128. package/template/scripts/sync-profile-skills +4 -5
  129. package/template/skills-lock.json +15 -15
  130. package/template.snapshot.json +3 -3
  131. 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 +0 -35
package/README.md CHANGED
@@ -2,11 +2,11 @@
2
2
 
3
3
  用于初始化、接管已有项目并持续同步 `yss-spec-project-template` 研发管理资产的 npm CLI。
4
4
 
5
- 源码候选版本:`3.3.7`。当前固定模板为 `yss-spec-project-template@857265c065d48198aaa2a8bcece22da5885daf7b`;CLI 运行时不会拉取模板仓库。`npm create yss-spec@latest` 获取的是实际已发布 npm 包,发布版本请以 `npm view create-yss-spec version` 为准。
5
+ 源码候选版本:`3.3.8`。当前固定模板身份、来源状态和摘要见 `template.snapshot.json`;CLI 运行时不会拉取模板仓库。`npm create yss-spec@latest` 获取的是实际已发布 npm 包,发布版本请以 `npm view create-yss-spec version` 为准,并用 `create-yss-spec --version` 核对当前执行版本。
6
6
 
7
7
  ## 本版模板能力
8
8
 
9
- 本版同步 Handoff v4、领域与阶段决策 v3、前后端交付边界和 committed-source 身份校验。CLI 仍会在同一事务内刷新生成型 `skills-lock.json`,再运行项目实例校验;刷新或校验失败恢复同步前状态。版本升级只完成 GitHub 源码交付,npm 发布状态仍以 registry 为准。
9
+ 本版同步 Handoff v5、领域与阶段决策、前后端交付边界和 committed-source 身份校验。CLI 仍会在同一事务内刷新生成型 `skills-lock.json`,再运行项目实例校验;刷新或校验失败恢复同步前状态。版本升级只完成 GitHub 源码交付,npm 发布状态仍以 registry 为准。
10
10
 
11
11
  ## 快速开始
12
12
 
@@ -25,19 +25,18 @@ npx create-yss-spec@latest \
25
25
  --target-dir ./equipment-project
26
26
  ```
27
27
 
28
- ## 五家族身份保护
28
+ ## 四个现行家族与旧实例兼容
29
29
 
30
- CLI 在规划和写入前检查模板家族身份,当前识别:
30
+ CLI 在规划和写入前检查模板家族身份,当前主路线识别:
31
31
 
32
32
  - `create-yss-spec` / `.yss-template.json`
33
33
  - `create-yss-harness-design` / `.yss-harness-design.json`
34
- - `create-yss-harness-dev` / `.yss-harness-dev.json`
35
- - repository-local backend / `.yss-harness-backend.json`
36
- - repository-local frontend / `.yss-harness-frontend.json`
34
+ - `create-yss-harness-backend` / `.yss-harness-backend.json`
35
+ - `create-yss-harness-frontend` / `.yss-harness-frontend.json`
37
36
 
38
37
  `docs/process/harness-profile.yaml` 也参与身份判断。异族、多重 identity、损坏 metadata、未知或矛盾 profile、identity symlink 均在写入前 fail closed,`--force` 不能绕过;Programmatic API 使用相同 guard。帮助和版本查询不受目标家族限制。
39
38
 
40
- 后端/前端专职模板使用各自仓库的 `scripts/instantiate-harness --target <新目录>`,不由本 CLI 做跨家族原地迁移。
39
+ 旧 `create-yss-harness-dev` / `.yss-harness-dev.json` 仍会被识别并拒绝跨家族接管;既有实例按原固定版本维护,不再作为新项目入口。战略、后端和前端分别使用专职 CLI,任何家族都不做跨家族原地迁移。
41
40
 
42
41
  ## CLI 能力
43
42
 
@@ -155,17 +154,17 @@ Inspect → Desired State → Policy → Plan → Validate → Transaction → V
155
154
 
156
155
  ## 使用未发布候选包
157
156
 
158
- 从本仓固定提交构建候选包时,先使用 `scripts/sync-template.js` 中的 `DEFAULT_TEMPLATE_REF` 重建模板快照,再打包:
157
+ 从本仓构建候选包时,先用明确来源重建模板快照,再打包:
159
158
 
160
159
  ```bash
161
- YSS_SPEC_TEMPLATE_REPO=https://github.com/iloveZzz/yss-spec-project-template.git \
162
- YSS_SPEC_TEMPLATE_REF=017925706a981aec9eadefd470232bb531acd4d6 \
160
+ YSS_SPEC_TEMPLATE_REPO=/absolute/path/to/yss-spec-project-template \
161
+ YSS_SPEC_TEMPLATE_REF=WORKTREE \
163
162
  node scripts/sync-template.js
164
163
 
165
164
  npm pack --ignore-scripts
166
165
  ```
167
166
 
168
- `--ignore-scripts` 仅用于已经显式重建并核对固定快照后的候选打包,不代表 npm 发布。
167
+ `WORKTREE` 仅形成 implementation-ready 候选;固定交付必须改用完整 40 位提交。`--ignore-scripts` 仅用于已经显式重建并核对快照后的候选打包,不代表 npm 发布。
169
168
 
170
169
  ## 开发验证
171
170
 
@@ -173,7 +172,7 @@ npm pack --ignore-scripts
173
172
  npm run test:contracts
174
173
  npm run test:unit
175
174
  npm run test:integration
176
- YSS_SPEC_TEMPLATE_REF=017925706a981aec9eadefd470232bb531acd4d6 npm test
175
+ YSS_SPEC_TEMPLATE_REPO=/absolute/path/to/yss-spec-project-template YSS_SPEC_TEMPLATE_REF=WORKTREE npm test
177
176
  npm pack --dry-run
178
177
  ```
179
178
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-yss-spec",
3
- "version": "3.3.7",
3
+ "version": "3.3.8",
4
4
  "description": "Initialize a YSS spec project template repository",
5
5
  "main": "src/api/index.js",
6
6
  "repository": {
@@ -3,7 +3,7 @@
3
3
  "source": "iloveZzz/yss-harness-design-agent",
4
4
  "source_type": "git-submodule",
5
5
  "source_root": ".agents/skills",
6
- "source_revision": "e24465921a8a51d8690a1732842274a35b935c9e",
6
+ "source_revision": "b7947298f74510861a36caedda4e77d03df35569",
7
7
  "adaptation_ref": "docs/agents/strategic-design-skills-integration.md",
8
8
  "skills": [
9
9
  {
@@ -14,7 +14,7 @@
14
14
  {
15
15
  "upstream": "yss-prototype-stage",
16
16
  "canonical": "yss-prototype-stage",
17
- "upstream_hash": "aa78ef758ad3c515e94fb6b87d4e519f39a38e53bb3c82413d707f7d0f96f58b"
17
+ "upstream_hash": "4bb0ba6cdbbbd1a3b89e97d94a7b0829c9282e21c8ce9e4bfda6e69a8714bc6d"
18
18
  },
19
19
  {
20
20
  "upstream": "yss-design-system",
@@ -16,13 +16,13 @@ description: Use when connecting an existing frontend, backend, fullstack, or ot
16
16
 
17
17
  ## Workflow
18
18
 
19
- 1. 确认当前仓库是 Harness 仓库,读取 `docs/process/implementation-repo-integration.md`。
19
+ 1. 按根 `yss-project.yaml` 确认 `project-instance` 身份并消费根 `CONTEXT.md`,读取 `docs/process/implementation-repo-integration.md`。命中既有 Java/Maven 跨仓交付接入时,先按 `docs/process/delivery-preflight.md` 以已知原始引用准备清单并运行 `scripts/preflight-delivery --input <file> --stage prepare --json`;缺失来源保持缺失,不伪造 scope、批准、生成器或模块事实。预检可在拟初始化目标上列出当前缺项,但不会创建工程或执行输入命令。
20
20
  2. 如果输入是本地路径,只读检查 Git remote、当前分支、目录结构、构建文件和测试脚本。
21
21
  3. 如果输入是远端 URL,优先使用只读 Git 查询。需要完整工作树时:`external-repository` 只能 clone 到临时目录;`git-submodule` 只能通过 `git submodule add` / `git submodule update --init` 在已批准的 `apps/backend/<project>/` 或 `apps/frontend/<project>/` gitlink 挂载点检出,禁止普通 clone 或复制源码进 Harness。
22
22
  4. 识别技术栈、包管理器、CI、测试命令、构建命令、OpenAPI 接入和设计 token 接入。
23
23
  5. 判定实现位置与 `repository_scope`:`external-repository` 记录真实项目根;`harness-apps` 与 `git-submodule` 只能使用 `apps/backend/<project>/` 或 `apps/frontend/<project>/`。`apps/backend/`、`apps/frontend/` 仅为容器,`app/backend/`、`app/frontend/` 及其子路径必须标记为阻断。gitlink(mode `160000`)必须登记为 `git-submodule` 和 `layout_policy: git-submodule-harness-apps`,不得写成 `harness-apps`。必须对照工作树:`git ls-files --stage`、`.gitmodules` 与声明 scope 不一致时阻断;缺少 `git_entry_mode: 160000` 不得把挂载点当普通目录。
24
24
  6. 按 `docs/templates/implementation-repo-registry-template.md` 输出实现仓库登记内容。`git-submodule` 必填 `gitmodules_name`、`gitlink_path`、`git_entry_mode`、`superproject_git_url` 和 `checkout_state`。`harness-apps` / `external-repository` 这些字段填 `不适用`。
25
- 7. 列出 `known_gaps`、人审点、fresh verification 命令和需要回写到 Harness change / Issue / checkpoint 的信息。空 gitlink、detached HEAD、`--force` 覆盖挂载点或缺少递归检出凭据时标记阻断。写入前必须看 `inspectWorkingTreeScope` / `implementationWriteViolation`:只接受对象结果且 `.writable === true` 才可写;字符串、`null` 或 `.writable !== true` 一律不可写。即使已正确登记为 `git-submodule`,空 gitlink 或 detached HEAD 也必须 `.writable === false`,不得当普通目录写文件或脚手架。
25
+ 7. 列出 `known_gaps`、人审点、fresh verification 命令和需要回写到 Harness change / Issue / checkpoint 的信息。命中交付预检时,登记和工程基线补齐后重跑 `prepare`;将结构化诊断的责任来源和恢复入口纳入缺口清单,在初始化或构建前关闭当前阶段阻断。后续阶段证据尚未形成不能被当作本阶段失败;其他技术栈/不涉及该交付协议的接入记录不适用原因,不能冒充后端 v2 正例。空 gitlink、detached HEAD、`--force` 覆盖挂载点或缺少递归检出凭据时标记阻断。写入前必须看 `inspectWorkingTreeScope` / `implementationWriteViolation`:只接受对象结果且 `.writable === true` 才可写;字符串、`null` 或 `.writable !== true` 一律不可写。即使已正确登记为 `git-submodule`,空 gitlink 或 detached HEAD 也必须 `.writable === false`,不得当普通目录写文件或脚手架。
26
26
 
27
27
  ## Baseline Checks
28
28
 
@@ -7,7 +7,7 @@ description: Use when implementing YSS application use cases, transaction bounda
7
7
 
8
8
  ## 架构分流(先执行)
9
9
 
10
- 读取当前合同的 architecture_identity 并与工程基线、仓库登记及 Manifest 核对;再且只读取 `references/profiles/<architecture_profile>.md`。支持的分支为 target-domain-model、layered-mvc-service、mvc-data-analysis-v1;成熟度以注册表为准,不能把 draft 称为受支持。MVC 不执行下文 DDD 专属规则,也不加载其旧分层 guide;组件、安全、批准合同、允许路径及执行证据规则仍共用。
10
+ 读取当前合同的 architecture_identity 并与工程基线、仓库登记及 Manifest 核对;再且只读取 `references/profiles/<architecture_profile>.md`。生成式分支为 target-domain-model、layered-mvc-service、mvc-data-analysis-v1;既有工程分支为 existing-domain-driven-maven、existing-layered-mvc-maven。成熟度以注册表为准,不能把 draft 称为受支持。MVC 不执行下文 DDD 专属规则,也不加载其旧分层 guide;组件、安全、批准合同、允许路径及执行证据规则仍共用。
11
11
 
12
12
  以下 Application / Domain Gateway / Infrastructure / Web module 叙述仅适用于 target-domain-model;MVC 的 service/core/repository/server/client 所有权由所选 Profile 引用定义。
13
13
 
@@ -0,0 +1,5 @@
1
+ # existing-domain-driven-maven
2
+
3
+ 只用于 `source_kind=existing-registration` 且 `architecture_family=domain-driven` 的受支持身份。Application 责任以登记、工程基线、独立观测 manifest 与边界审查的实际 build unit/package 映射为准,不要求生成式 `application` 模块存在。
4
+
5
+ 有批准的 Application 源码写路径时,按实际 use-case seam 组织领域与端口;没有该写路径且技术设计明确为 engineering-only 时,只核验 Web build unit 内的只读 orchestration seam 满足合同,不新建业务 Application、Domain、Gateway 或事务层。任何业务规则、持久化写入、新跨上下文协作或无法解释的责任映射都返回 `new_impacts` 或 `blocked`。
@@ -0,0 +1,5 @@
1
+ # existing-layered-mvc-maven
2
+
3
+ 只用于 `source_kind=existing-registration` 且 `architecture_family=layered-mvc` 的受支持身份。以登记、工程基线、独立观测 manifest 和边界审查中的实际 service/core/use-case build unit、source root 与 package 映射确定 Application 责任;不得要求模板模块名、数量或生成器 manifest。
4
+
5
+ 有批准的 service/core 写路径时在现有公开用例 seam 内实现编排和事务。若 engineering-only 技术设计没有对应写路径,只核验已批准的只读 orchestration seam,不制造 Domain Gateway、业务 service 或持久化层。Controller 直连 Repository、越界路径或责任无法映射时返回 `blocked`。
@@ -20,7 +20,7 @@ description: Use when a YSS vertical slice is entering implementation, spans mul
20
20
  ## 编译循环
21
21
 
22
22
  1. 判断 frontend/backend/API/data/domain/cross-repo 影响,并按 [compiler-contract.yaml](references/compiler-contract.yaml) 把 impact 映射为入口 capability;逐项填写 backend `component_impacts`。
23
- 2. 检查工程存在性和核心/长尾 skill 可用性。
23
+ 2. 按 `docs/process/delivery-preflight.md` 只读检查当前阶段交付前提,再检查工程存在性和核心/长尾 skill 可用性。既有 Java/Maven 工程按 `docs/process/existing-backend-architecture.md` 加载登记、工程基线、独立观测的原始引用与摘要;不伪填生成器或 H2。
24
24
  3. 从 `docs/agents/yss-skill-registry.yaml` 选择一个或多个窄 Recipe,合并 `required_capabilities`;Recipe 不得直接引用 skill。
25
25
  4. 由 capability 解析入口 skill,只递归 `context-required`;`context-conditional` 仅在显式 condition 命中时加载,其他依赖类型只进入原因链,不扩张执行上下文。
26
26
  5. 按“Recipe 声明顺序 → 依赖拓扑 → skill ID”确定性排序,去重 skill 并保留全部原因;冻结 Registry 与编译器合同 SHA-256。
@@ -37,7 +37,7 @@ description: Use when a YSS vertical slice is entering implementation, spans mul
37
37
  - 编译器不得输出 `approved`、`ready-for-agent` 或 `completed`。
38
38
  - Registry、Slice Contract 或编译器合同 schema v1 一律拒绝并给出迁移到 v2 的提示;不自动升级,不提供旧技能名兼容。
39
39
  - `required_capabilities` 与 `required_skills` 必须同时冻结;Registry 或编译器摘要变化后合同立即 `stale`,重新编译后仍须交生命周期重新批准。
40
- - UI 影响缺少正式原型确认、批准且 digest 当前的 Visual Baseline manifest 或当前切片 `case_id` 时,不得路由页面实现。模型必须先读 manifest 与语义引用,再查看对应 PNG;禁止目录 glob 和图片独立猜义。
40
+ - UI 影响按来源分支核验:新设计保持正式原型确认与 Visual Baseline;无 UI 改动才允许 `existing-ui-baseline` v1,并须当前真实基线确认及 `case_id`。任一来源缺少当前批准或摘要绑定时,不得路由页面实现。模型必须先读 manifest 与语义引用,再查看对应 PNG;禁止目录 glob 和图片独立猜义。
41
41
  - Repository/数据模型影响缺少数据架构时,不得路由持久化实现。
42
42
  - 后端技术设计由 `yss-technical-design` 先行组织。消费批准且版本当前的 Technical Design Contract,核对其架构与工程基线一致;DDD 才消费聚合、Gateway 等战术字段并路由 `yss-domain`,MVC 消费用例、分层、规则和事务设计并按 Profile 路由。旧 v1 战术合同只按 DDD 显式兼容读取。无相关影响记录带原因的 `not-applicable`。
43
43
  - API 变化必须回到生命周期 Draft/Review/Freeze;半成品 backend 不得冒充稳定 source of truth。
@@ -3,6 +3,10 @@ backend_architecture:
3
3
  registry_source: docs/agents/yss-skill-registry.yaml
4
4
  identity_schema: docs/process/schemas/backend-architecture-identity.schema.json
5
5
  required_evidence: [engineering_baseline, repository_registration, manifest]
6
+ evidence_loading: original-references-and-raw-sha256
7
+ existing_identity: {schema_version: 2, source_kind: existing-registration, profiles_source: existing_project_profiles}
8
+ generated_identity: preserve-original-generator-and-module-closure
9
+ existing_source_policy: fixed-input-and-approved-bounded-output
6
10
  required_identity_surfaces: [resolution, work_unit, execution_result]
7
11
  family_recipe_selection: explicit-ddd-or-mvc-no-legacy-alias
8
12
  readiness: supported-profile-and-current-identical-evidence
@@ -12,7 +12,12 @@ document_writing:
12
12
  gate_and_status_semantics: unchanged
13
13
 
14
14
  backend_architecture_identity_policy:
15
- source: docs/agents/yss-skill-registry.yaml#architecture_profiles
15
+ source: docs/agents/yss-skill-registry.yaml
16
+ generated_profiles: architecture_profiles
17
+ existing_profiles: existing_project_profiles
18
+ existing_evidence: [repository-registration, engineering-baseline, existing-project-observation]
19
+ evidence_policy: original-ref-digest-and-current-source-verification
20
+ delivery_preflight: scripts/preflight-delivery
16
21
  schema: docs/process/schemas/backend-architecture-identity.schema.json
17
22
  required_surfaces: [engineering-baseline, repository-registration, scaffold-manifest, slice-contract, work-unit, execution-result]
18
23
  agreement: exact-identity-and-digest
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: yss-prototype-stage
3
- description: Use when a YSS feature has product-design impact on a primary flow, navigation, state, recovery, permission experience, or UI-driven API contract and needs profile-routed prototype assets before implementation readiness.
3
+ description: Use when a YSS feature has product-design impact on a primary flow, navigation, state, recovery, permission experience, or UI-driven API contract and needs profile-routed prototype assets before implementation readiness, or when handing off a confirmed unchanged existing UI baseline.
4
4
  ---
5
5
 
6
6
  # YSS Prototype Stage
@@ -62,3 +62,12 @@ Design QA 合并 visual、layout、interaction、content、accessibility、cross
62
62
  - H1 伪造 lockfile/AntD 段,或 H2 声称已验证生产 YSS/AntDV 真实组件。
63
63
  - 重复抄写机器可采集的版本、digest、截图和 console;创建第二份状态机、QA 或 handoff 资产。
64
64
  - 把原型源码直接复制进生产,或在原型阶段调用 `yss-ui`。
65
+
66
+
67
+ ## 既有 UI 的交接入口
68
+
69
+ 现有工程需要跨仓交接且确认 UI、交互、状态和权限体验均无改动时,先读取 `docs/process/existing-ui-baseline.md`,使用独立 `existing-ui-baseline` v1,不进入 H1/H2 原型构建。绑定固定源码、锁文件、实际构建、原始动作、PNG 截图和真实 API 交换证据;可离线审阅不等于可离线运行原型。
70
+
71
+ 通过 `gate.product-design-approved` 的现有用户决定协议确认当前基线 manifest 原字节,Handoff v5 明确声明 `ui_baseline_kind: existing-ui-baseline`。截图、代码可运行或旧原型批准都不能替代该确认;本技能只能准备审阅资产,不代答或批准。发现任何 UI 改动,包括后端行为导致的体验变化,回到上述原型流程;新设计继续保留现有原型与验证要求。
72
+
73
+ 消费者以 `scripts/preflight-delivery` 检查交付前提,再由 `scripts/lib/ui-baseline.mjs` 分派原型与既有基线。前端使用 Strategic Preflight v2 和 Delivery Acceptance v3 的通用 `baseline_case_ids` 承接;通过仅说明输入可核验,不授予写代码权限。
@@ -24,6 +24,8 @@ description: 在 YSS 技术分析中统一承接需求与战略输入,按已
24
24
 
25
25
  已有 Strategic Design Handoff 时,两种分支都必须先完成导入和目标词汇对账,再逐条承接规则与关键场景。没有战略交接包的项目直接消费批准需求,不能为 MVC 补造战略 DDD。
26
26
 
27
+ 既有身份 v2 的纯工程变更可显式使用 `design_scope: engineering-only`;按 `references/engineering-design.schema.json` 绑定真实构建单元、写路径、只读依赖、失败处理与测试 seam。不得更改登记业务边界、领域模型、业务规则/状态、持久化、数据库 schema 或 UI;命中这些影响回原架构设计。缺省仍保留原 DDD/MVC 规则,不自动降级。工程分支仍需当前 Spec/API/工程依据、逐条承接、独立技术审查及正式 Slice 批准。
28
+
27
29
  ## 合同与验证
28
30
 
29
31
  新产物使用 schema v2 Technical Design Contract:共同头记录架构来源、输入版本与摘要、规则/场景承接、评审证据和状态,`design` 保存架构专属内容。合同格式与兼容规则见 `references/technical-design-contract.md`,Schema 见 `references/technical-design.schema.json`。
@@ -0,0 +1,224 @@
1
+ {
2
+ "type": "object",
3
+ "properties": {
4
+ "scope_reason": {
5
+ "type": "string",
6
+ "minLength": 1
7
+ },
8
+ "impact_assessment": {
9
+ "type": "object",
10
+ "properties": {
11
+ "domain_model": {
12
+ "const": "none"
13
+ },
14
+ "business_state": {
15
+ "const": "none"
16
+ },
17
+ "business_rules": {
18
+ "const": "none"
19
+ },
20
+ "business_persistence": {
21
+ "const": "none"
22
+ },
23
+ "schema_migration": {
24
+ "const": "none"
25
+ },
26
+ "ui_change": {
27
+ "const": "none"
28
+ },
29
+ "architecture_boundary_change": {
30
+ "const": "none"
31
+ }
32
+ },
33
+ "required": [
34
+ "domain_model",
35
+ "business_state",
36
+ "business_rules",
37
+ "business_persistence",
38
+ "schema_migration",
39
+ "ui_change",
40
+ "architecture_boundary_change"
41
+ ],
42
+ "additionalProperties": false
43
+ },
44
+ "component_catalog": {
45
+ "type": "array",
46
+ "minItems": 1,
47
+ "items": {
48
+ "type": "object",
49
+ "properties": {
50
+ "component_id": {
51
+ "type": "string",
52
+ "minLength": 1
53
+ },
54
+ "responsibility": {
55
+ "type": "string",
56
+ "minLength": 1
57
+ },
58
+ "build_unit_ref": {
59
+ "type": "string",
60
+ "minLength": 1
61
+ },
62
+ "write_paths": {
63
+ "type": "array",
64
+ "minItems": 1,
65
+ "items": {
66
+ "type": "string",
67
+ "minLength": 1
68
+ }
69
+ },
70
+ "depends_on": {
71
+ "type": "array",
72
+ "minItems": 0,
73
+ "items": {
74
+ "type": "string",
75
+ "minLength": 1
76
+ }
77
+ }
78
+ },
79
+ "required": [
80
+ "component_id",
81
+ "responsibility",
82
+ "build_unit_ref",
83
+ "write_paths",
84
+ "depends_on"
85
+ ],
86
+ "additionalProperties": false
87
+ }
88
+ },
89
+ "allowed_write_paths": {
90
+ "type": "array",
91
+ "minItems": 1,
92
+ "items": {
93
+ "type": "string",
94
+ "minLength": 1
95
+ }
96
+ },
97
+ "read_dependencies": {
98
+ "type": "array",
99
+ "minItems": 1,
100
+ "items": {
101
+ "type": "object",
102
+ "properties": {
103
+ "ref": {
104
+ "type": "string",
105
+ "minLength": 1
106
+ },
107
+ "digest": {
108
+ "type": "string",
109
+ "pattern": "^sha256:[a-f0-9]{64}$"
110
+ },
111
+ "purpose": {
112
+ "type": "string",
113
+ "minLength": 1
114
+ }
115
+ },
116
+ "required": [
117
+ "ref",
118
+ "digest",
119
+ "purpose"
120
+ ],
121
+ "additionalProperties": false
122
+ }
123
+ },
124
+ "flow": {
125
+ "type": "array",
126
+ "minItems": 1,
127
+ "items": {
128
+ "type": "string",
129
+ "minLength": 1
130
+ }
131
+ },
132
+ "failure_handling": {
133
+ "type": "string",
134
+ "minLength": 1
135
+ },
136
+ "consistency_policy": {
137
+ "type": "object",
138
+ "properties": {
139
+ "read_only": {
140
+ "const": "read-only"
141
+ },
142
+ "transaction_boundary": {
143
+ "type": "string",
144
+ "minLength": 1
145
+ },
146
+ "concurrency": {
147
+ "type": "string",
148
+ "minLength": 1
149
+ },
150
+ "idempotency": {
151
+ "type": "string",
152
+ "minLength": 1
153
+ },
154
+ "cross_database_limit": {
155
+ "type": "string",
156
+ "minLength": 1
157
+ },
158
+ "timeouts": {
159
+ "type": "string",
160
+ "minLength": 1
161
+ },
162
+ "recovery": {
163
+ "type": "string",
164
+ "minLength": 1
165
+ }
166
+ },
167
+ "required": [
168
+ "read_only",
169
+ "transaction_boundary",
170
+ "concurrency",
171
+ "idempotency",
172
+ "cross_database_limit",
173
+ "timeouts",
174
+ "recovery"
175
+ ],
176
+ "additionalProperties": false
177
+ },
178
+ "test_seams": {
179
+ "type": "array",
180
+ "minItems": 1,
181
+ "items": {
182
+ "type": "object",
183
+ "properties": {
184
+ "seam_id": {
185
+ "type": "string",
186
+ "minLength": 1
187
+ },
188
+ "kind": {
189
+ "type": "string",
190
+ "minLength": 1
191
+ },
192
+ "subject_ref": {
193
+ "type": "string",
194
+ "minLength": 1
195
+ },
196
+ "assertion": {
197
+ "type": "string",
198
+ "minLength": 1
199
+ }
200
+ },
201
+ "required": [
202
+ "seam_id",
203
+ "kind",
204
+ "subject_ref",
205
+ "assertion"
206
+ ],
207
+ "additionalProperties": false
208
+ }
209
+ }
210
+ },
211
+ "required": [
212
+ "scope_reason",
213
+ "impact_assessment",
214
+ "component_catalog",
215
+ "allowed_write_paths",
216
+ "read_dependencies",
217
+ "flow",
218
+ "failure_handling",
219
+ "consistency_policy",
220
+ "test_seams"
221
+ ],
222
+ "additionalProperties": false,
223
+ "title": "既有工程的受控工程技术设计"
224
+ }
@@ -266,6 +266,12 @@
266
266
  "digest": {
267
267
  "type": "string",
268
268
  "pattern": "^sha256:[a-f0-9]{64}$"
269
+ },
270
+ "design_scope": {
271
+ "enum": [
272
+ "architecture-specific",
273
+ "engineering-only"
274
+ ]
269
275
  }
270
276
  },
271
277
  "required": [