create-yss-spec 2.2.1 → 2.2.3

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 (86) hide show
  1. package/README.md +2 -2
  2. package/package.json +1 -1
  3. package/src/cli.js +56 -8
  4. package/template/.agents/skills/yss-product-lifecycle/SKILL.md +5 -5
  5. package/template/.agents/skills/yss-product-lifecycle/references/matt-yss-adapter.md +1 -1
  6. package/template/.agents/skills/yss-product-lifecycle/references/orchestration.md +3 -3
  7. package/template/.agents/skills/yss-product-lifecycle/references/state-model.md +3 -3
  8. package/template/.agents/skills/yss-router/SKILL.md +1 -1
  9. package/template/.agents/skills/yss-router/references/slice-implementation-contract.md +1 -0
  10. package/template/.claude/skills/yss-product-lifecycle/SKILL.md +5 -5
  11. package/template/.claude/skills/yss-product-lifecycle/references/matt-yss-adapter.md +1 -1
  12. package/template/.claude/skills/yss-product-lifecycle/references/orchestration.md +3 -3
  13. package/template/.claude/skills/yss-product-lifecycle/references/state-model.md +3 -3
  14. package/template/.claude/skills/yss-router/SKILL.md +1 -1
  15. package/template/.claude/skills/yss-router/references/slice-implementation-contract.md +1 -0
  16. package/template/.codex/skills/yss-product-lifecycle/SKILL.md +5 -5
  17. package/template/.codex/skills/yss-product-lifecycle/references/matt-yss-adapter.md +1 -1
  18. package/template/.codex/skills/yss-product-lifecycle/references/orchestration.md +3 -3
  19. package/template/.codex/skills/yss-product-lifecycle/references/state-model.md +3 -3
  20. package/template/.codex/skills/yss-router/SKILL.md +1 -1
  21. package/template/.codex/skills/yss-router/references/slice-implementation-contract.md +1 -0
  22. package/template/.cursor/skills/yss-product-lifecycle/SKILL.md +5 -5
  23. package/template/.cursor/skills/yss-product-lifecycle/references/matt-yss-adapter.md +1 -1
  24. package/template/.cursor/skills/yss-product-lifecycle/references/orchestration.md +3 -3
  25. package/template/.cursor/skills/yss-product-lifecycle/references/state-model.md +3 -3
  26. package/template/.cursor/skills/yss-router/SKILL.md +1 -1
  27. package/template/.cursor/skills/yss-router/references/slice-implementation-contract.md +1 -0
  28. package/template/.hermes/skills/yss-product-lifecycle/SKILL.md +5 -5
  29. package/template/.hermes/skills/yss-product-lifecycle/references/matt-yss-adapter.md +1 -1
  30. package/template/.hermes/skills/yss-product-lifecycle/references/orchestration.md +3 -3
  31. package/template/.hermes/skills/yss-product-lifecycle/references/state-model.md +3 -3
  32. package/template/.hermes/skills/yss-router/SKILL.md +1 -1
  33. package/template/.hermes/skills/yss-router/references/slice-implementation-contract.md +1 -0
  34. package/template/.pi/skills/yss-product-lifecycle/SKILL.md +5 -5
  35. package/template/.pi/skills/yss-product-lifecycle/references/matt-yss-adapter.md +1 -1
  36. package/template/.pi/skills/yss-product-lifecycle/references/orchestration.md +3 -3
  37. package/template/.pi/skills/yss-product-lifecycle/references/state-model.md +3 -3
  38. package/template/.pi/skills/yss-router/SKILL.md +1 -1
  39. package/template/.pi/skills/yss-router/references/slice-implementation-contract.md +1 -0
  40. package/template/.qoder/skills/yss-product-lifecycle/SKILL.md +5 -5
  41. package/template/.qoder/skills/yss-product-lifecycle/references/matt-yss-adapter.md +1 -1
  42. package/template/.qoder/skills/yss-product-lifecycle/references/orchestration.md +3 -3
  43. package/template/.qoder/skills/yss-product-lifecycle/references/state-model.md +3 -3
  44. package/template/.qoder/skills/yss-router/SKILL.md +1 -1
  45. package/template/.qoder/skills/yss-router/references/slice-implementation-contract.md +1 -0
  46. package/template/.trae/skills/yss-product-lifecycle/SKILL.md +5 -5
  47. package/template/.trae/skills/yss-product-lifecycle/references/matt-yss-adapter.md +1 -1
  48. package/template/.trae/skills/yss-product-lifecycle/references/orchestration.md +3 -3
  49. package/template/.trae/skills/yss-product-lifecycle/references/state-model.md +3 -3
  50. package/template/.trae/skills/yss-router/SKILL.md +1 -1
  51. package/template/.trae/skills/yss-router/references/slice-implementation-contract.md +1 -0
  52. package/template/AGENTS.md +7 -16
  53. package/template/CONTEXT.md +14 -2
  54. package/template/docs/adr/README.md +7 -0
  55. package/template/docs/agents/digital-human-roles.md +83 -0
  56. package/template/docs/agents/digital-human-roles.yaml +253 -0
  57. package/template/docs/agents/skills-maintenance.md +1 -1
  58. package/template/docs/agents/triage-labels.md +5 -5
  59. package/template/docs/process/implementation-repo-integration.md +1 -1
  60. package/template/docs/process/schemas/lifecycle-checkpoint.schema.json +2 -1
  61. package/template/docs/process/subagent-collaboration.md +5 -3
  62. package/template/docs/process/templates/stage-checkpoint-template.md +3 -1
  63. package/template/docs/templates/approval-record-template.yaml +14 -0
  64. package/template/docs/templates/digital-human-runtime-profile-template.md +38 -0
  65. package/template/docs/templates/grok-bot-profile-template.md +24 -0
  66. package/template/docs/templates/implementation-routing-template.md +3 -3
  67. package/template/docs/templates/local-parent-ticket-template.md +8 -0
  68. package/template/docs/templates/subagent-task-package-template.md +4 -0
  69. package/template/docs/templates/vertical-slice-ticket-template.md +7 -0
  70. 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 +2 -0
  71. package/template/scripts/lib/approval-record.mjs +123 -0
  72. package/template/scripts/lib/digital-human-roles.mjs +398 -0
  73. package/template/scripts/verify-approval-record +13 -0
  74. package/template/scripts/verify-digital-human-roles +10 -0
  75. package/template/scripts/verify-digital-human-roles-scenarios +147 -0
  76. package/template/scripts/verify-governance-release +7 -5
  77. package/template/scripts/verify-lifecycle-checkpoint +2 -0
  78. package/template/scripts/verify-template +5 -2
  79. package/template/skills-lock.json +2 -2
  80. package/template.manifest.json +30 -7
  81. package/template.snapshot.json +5 -4
  82. package/template/docs/adr/0001-product-design-prototype-entrypoint.md +0 -54
  83. package/template/docs/adr/0002-yss-project-repository-mode.md +0 -3
  84. package/template/docs/adr/0003-machine-readable-lifecycle-registry.md +0 -5
  85. package/template/docs/adr/0006-stable-lifecycle-ids-and-generated-structure.md +0 -5
  86. package/template/docs/adr/0007-lifecycle-native-work-units.md +0 -5
@@ -9,6 +9,7 @@ slice_contract:
9
9
  contract_version: 1
10
10
  slice_id:
11
11
  status: draft
12
+ suggested_owner_role_id: # role.frontend-engineer | role.backend-engineer | role.test-engineer;Router 只建议,编排器派活并批准
12
13
  lifecycle_refs:
13
14
  spec:
14
15
  ticket:
@@ -10,7 +10,7 @@
10
10
  - `repository_mode: project-instance`:按产品研发生命周期分诊任务。
11
11
  - 文件缺失、schema 版本不支持或模式值非法时,停止路由并执行迁移检查;不根据目录、Git 远程或占位符猜测身份。
12
12
 
13
- 仓库身份契约见 `docs/adr/0002-yss-project-repository-mode.md`。
13
+ 仓库身份契约由根目录 `yss-project.yaml` 和本文件共同声明。
14
14
 
15
15
  ## 2. 单一事实来源
16
16
 
@@ -23,6 +23,7 @@
23
23
  | 模板维护强度触发与最低等级 | `docs/process/maintenance-intensity.yaml` |
24
24
  | 技能清单、来源、版本、哈希和投影目标 | `skills-lock.json` |
25
25
  | 技能分层、别名、默认可发现性和运行时入口 | `docs/agents/yss-skill-registry.yaml`(当前 `status: shadow`,不作为 Router / 生命周期运行时入口) |
26
+ | 数字人角色、阶段协作组、运行时绑定与生命周期会签 | `docs/agents/digital-human-roles.yaml`;`docs/agents/digital-human-roles.md` 为操作说明 |
26
27
 
27
28
  README、用户指南、根目录 `CLAUDE.md` 和其他说明文档只引用或解释上述事实,不重复定义同一规则。`CLAUDE.md` 是 Claude Code 入口指针,不是第二套 Agent 规则。
28
29
 
@@ -83,6 +84,7 @@ README、用户指南、根目录 `CLAUDE.md` 和其他说明文档只引用或
83
84
  | merge / rebase 冲突 | `resolving-merge-conflicts` |
84
85
  | 架构治理、难测模块或深模块设计 | `improve-codebase-architecture` / `codebase-design` |
85
86
  | 跨线程、跨仓库、上下文过长或原型结论回流 | `handoff` 或等价交接记录 |
87
+ | 数字人角色、Agent 运行时协同或生命周期会签 | 先读 `docs/agents/digital-human-roles.yaml`。职称实例叠加在编排器上,不另起生命周期,不批准 Slice 合同、不设 `ready-for-agent`、不宣布可发布 |
86
88
  | 本地知识库 init / refresh / rebuild,或要把研究结果落成持久 wiki | `llm-wiki`(落成持久 wiki 用 `ingest`;已映射 live 源变了用 `refresh`)。`template-source` 的 wiki-root 为 `.template-source/wiki`;`project-instance` 不附带源仓库编译树,需要时在仓库根 `wiki/` 执行 `init` |
87
89
 
88
90
  业务行为默认按 `tdd` 使用已确认的公开 seam 逐切片实现。一次性生成、纯配置或流程文档不适用代码 TDD 时,必须记录例外理由和可执行验证方式。
@@ -95,28 +97,17 @@ README、用户指南、根目录 `CLAUDE.md` 和其他说明文档只引用或
95
97
 
96
98
  ## 10. 独立审查、验证和追踪
97
99
 
98
- - 实现者不能承担命中的独立审查。模板维护按 L1 / L2 / L3 分别使用 self-check / 人工 checkpoint、聚焦独立审查、正式独立审查;模板发布、代码切片和高风险变更仍必须由其他 Agent 或人工独立审查。
100
+ - 实现者不能承担命中的独立审查(含数字人)。模板维护按 L1 / L2 / L3 分别使用 self-check / 人工 checkpoint、聚焦独立审查、正式独立审查;模板发布、代码切片和高风险变更仍必须由其他 Agent 或独立审查者完成。
99
101
  - 任何“完成 / 可合并 / 可发布”结论必须基于 fresh verification,不接受“之前跑过”或实现者自述。
100
- - 在人工暂停、handoff、进入实现、合并或发布边界集中同步范围、验证证据、风险、人工审查点、Ticket 状态和下一步;阻塞、责任人变化或资产单独批准时立即同步。
102
+ - 会签门禁按 `docs/agents/digital-human-roles.yaml` 的 `gate_policy` 关闭,会签文件经 `scripts/verify-approval-record` 核验;`gate.release-ready`、对外商务承诺和运行时外部副作用仍须生物人。
103
+ - 在会签暂停、handoff、进入实现、合并或发布边界集中同步范围、验证证据、风险、会签点、Ticket 状态和下一步;阻塞、责任人变化或资产单独批准时立即同步。
101
104
  - Git checkpoint 只包含本轮明确范围;获得用户授权后才提交或推送。
102
105
  - 发布后或阶段性完成后做复盘判断;出现架构返工、验证返工、IMPORTANT / CRITICAL review finding 或人工确认延期时,落简体中文复盘并修订权威资产。
103
106
 
104
107
  ## 11. Subagent 协同
105
108
 
106
- 使用 subagent 前按 `docs/process/subagent-collaboration.md` 定义任务包和不重叠的写入范围。实现者不担任独立审查者;仓库身份、需求 / 契约冻结、Ticket 最终状态、Git checkpoint 和完成结论仍由主控 Agent 或人工决定。
109
+ 使用 subagent 或其它 Agent 运行时前按 `docs/process/subagent-collaboration.md` 定义任务包和不重叠的写入范围,并同时写明数字人角色、`runtime_id`、从角色表复制的 `core_skills` / `forbidden_skills` 与 Explorer / Drafter / Worker / Reviewer / Verifier 执行态。实现者不担任独立审查者;仓库身份、Ticket 最终状态、Git checkpoint、Slice 合同批准和完成结论仍由主控数字人按编排器规则决定。会签恢复前校验 `scripts/verify-approval-record`。写隔离靠任务包;共享工作区不是默认沙箱。
107
110
 
108
111
  ## 12. 测试质量基线
109
112
 
110
113
  模板推荐值为 Domain / Application `>= 90%`、API `>= 80%`、前端组件 `>= 75%`、已明确的关键流程 `100% E2E`。只有项目实例在测试策略中明确采纳或覆盖后才构成 CI 门禁;未定义关键流程清单时,不声称其 E2E 覆盖率达到 100%。
111
-
112
- ## Cursor Cloud specific instructions
113
-
114
- 本仓库是 `template-source` Harness / 研发管理仓库,没有前端 / 后端运行时应用;可运行、可测试的表面只有 Node 工具链与治理校验脚本。
115
-
116
- - 依赖与工具链:Node `>=22 <27`(`.nvmrc` 固定 22);`pnpm` 通过 `packageManager` 字段由 corepack 自动切换到 `10.15.0`,无需手工切换。Node 依赖只装在 `.template-source/tooling/node`,仓库根没有 `package.json`。本仓 wiki-root 为 `.template-source/wiki`。
117
- - 测试:`pnpm --dir .template-source/tooling/node test`(`node --test`,共 16 个用例)。
118
- - 构建 / lint:`pnpm --dir .template-source/tooling/node build:vendor` 与 `check:vendor` 维护 `scripts/vendor/*.mjs`;顶层 lint 是 `verify-template` 内对所有脚本执行的 `node --check`。
119
- - 完整发布门禁(相当于"运行应用"):`scripts/verify-template`,成功输出 `模板发布校验通过`。它串联证据索引、`pnpm test`、`check:vendor` 和全部 `scripts/verify-*` 场景校验。
120
- - 非显然的坑:`scripts/verify-lifecycle-registry`(及其对应测试 `Node lifecycle registry verifier ...`)会 shell out 到 `python3` 并 `import jsonschema` 做 JSON Schema 校验。缺少该 Python 模块时测试会以 `ModuleNotFoundError: No module named 'jsonschema'` 失败,而不是代码问题;update script 已负责 `pip3 install jsonschema`。
121
- - `pnpm install` 输出的 `Ignored build scripts: esbuild` 警告可忽略:esbuild 0.28.2 在本平台自带二进制,`build:vendor` / `check:vendor` 无需 `pnpm approve-builds`。
122
- - 常用只读入口:`scripts/repository-mode`(返回仓库身份)、`scripts/generate-lifecycle-artifacts`(从 `docs/process/lifecycle-registry.yaml` 派生产物,输出应无 diff)、`scripts/export-yss-skills --output <dir>`(导出公开技能)。
@@ -12,7 +12,19 @@
12
12
 
13
13
  | 术语 | 含义 | 英文标识 | 避免 / 备注 |
14
14
  |---|---|---|---|
15
- | Agent | 执行特定工作流步骤的 AI 协作者。 | — | 不要与人工审查者混用。 |
15
+ | Agent | 执行特定工作流步骤的 AI 协作者。 | — | 不要与生物人审查者、数字人角色或 Ticket 状态混用。运行时实例(Cursor Agent、Claude Code、Grok Bot 等)是 Agent 的承载,不是角色本身。 |
16
+ | 运行时绑定 | 把数字人角色落到某个 Agent 平台的适配声明,权威清单在数字人角色注册表的 `runtimes`。 | — | 不要为每个平台复制一套职称职责。 |
17
+ | Grok Bot | Grok 平台上的持久数字队友实例;对应 `runtime.grok`。 | — | 不是数字人角色、技能或门禁。 |
18
+ | 数字人角色 | 叠加在生命周期编排器上的职称配置;一个运行时实例绑定一种。v1 清单以 `docs/agents/digital-human-roles.yaml` 为准。 | — | 不要称为 Ticket「标准角色」、职能 Agent 或某个平台的产品名。 |
19
+ | 主控数字人 | 运行 `yss-product-lifecycle` 的协调实例。 | — | 不是第八个业务职称;默认兼任项目经理。 |
20
+ | 角色配置 | 某数字人角色的关注阶段、技能包、可起草产物和禁止事项。 | — | 不是独立编排器,也不含平台群聊人数。 |
21
+ | 生命周期会签 | 指定数字人或生物人关闭 `gate.*` / 独立审查并写入 `evidence.approval-record`。 | — | 不是运行时副作用审批。会签人由 `docs/agents/digital-human-roles.yaml` 的 `gate_policy` 指定。起草者不得会签自己起草的资产。`paused-human-gate` 表示等待该会签人,不是必须生物人。 |
22
+ | 运行时副作用审批 | 对发消息、改生产、付款、删数据等工具动作的账号级确认。 | — | 点 Allow 不等于门禁已批准或可发布。避免只称「Grok 平台审批」。 |
23
+ | Ticket 状态 | Tracker 五态:`needs-triage`、`needs-info`、`ready-for-agent`、`ready-for-human`、`wontfix`。 | — | 不要称为数字人角色或「标准角色」。 |
24
+ | 阶段协作组 | 某阶段需要共同可见会签的逻辑成员集合。 | — | 不是某个产品的群聊;平台人数上限只写在对应 `runtimes`。 |
25
+ | 需求经理 | 主责 Discovery 语言、用户/MVP/非目标、Spec 正文与测试 seam 的数字人角色。 | — | 不拥有原型视觉定稿,不 Freeze API,不写实现。 |
26
+ | 产品经理 | 主责优先级、产品设计影响、原型确认建议和范围裁剪的数字人角色。 | — | 不写生产代码,不单独 Freeze API。 |
27
+ | 商务 | 主责机会调研商业约束、交付承诺和发布窗口商务非目标的数字人角色。 | — | 不参与 Spec 定稿、契约、代码或 Ticket 状态推进。 |
16
28
  | Agent 入口规则 | Agent 启动任务时必须先遵守的全局路由、硬门禁和禁止事项。 | — | 不作为 YSS 后端、前端或其他专项编码规范的完整手册。 |
17
29
  | 标准文档语言 | 面向业务、产品、架构、实施、审查、发布和复盘的持久化文档所使用的默认语言。 | — | 统一使用简体中文;英文专有名词、代码标识、API 路径、schema、文件名和协议 metadata 保持原样。 |
18
30
  | Matt Engineering Skills | 来自 `mattpocock/skills` 的轻量工程流程技能集合。 | — | 用于澄清、Spec、Ticket、实现、TDD、诊断、审查和架构治理,不替代 YSS 专项规范。 |
@@ -25,7 +37,7 @@
25
37
  | Ticket | 在追踪平台上承载功能生命周期或可实现工作单元的通用追踪对象。 | — | GitHub Issues / GitLab Issues 是具体平台对象名称;领域资产统一称为 Ticket。 |
26
38
  | 功能父 Ticket | 汇总一个功能从 Spec 到契约冻结的阶段状态、资产链接、审查结论和阻塞项的 Ticket。 | — | 不作为 Agent 直接实现的垂直切片。 |
27
39
  | 垂直切片 Ticket | 契约冻结后生成的可独立验证实现单元,记录范围、阻塞关系、验收标准和验证证据。 | — | 只有通过必要门禁并具备直接实现条件时才能标记 `ready-for-agent`。 |
28
- | `ready-for-human` | 表示 Spec、设计、契约草案或其他资产仍需人工审查或确认的流程状态。 | — | 此状态不表示可以直接进入实现。 |
40
+ | `ready-for-human` | 表示 Spec、设计、契约草案或其他资产仍需会签(指定数字人或生物人)。 | — | 此状态不表示可以直接进入实现;也不等于某个数字人角色。 |
29
41
  | `ready-for-agent` | 表示垂直切片已通过必要门禁并具备直接实现条件的流程状态。 | — | 不得用于 Spec 初稿、原型、OpenAPI Draft 或其他未冻结资产。 |
30
42
  | OpenAPI Draft | review-only 的 OpenAPI 3.1 契约草案。 | — | Freeze 前不得作为前后端稳定实现契约。 |
31
43
  | OpenAPI Freeze | 已通过评审、可作为前后端实现和契约测试输入的 OpenAPI 3.1 契约。 | — | Freeze 后变更必须回到 API 影响分析和设计审查。 |
@@ -0,0 +1,7 @@
1
+ # 产品架构决策
2
+
3
+ 本目录只记录当前项目自身的架构决策,不承载 `yss-spec-project-template` 模板源仓库的治理决策。
4
+
5
+ 创建 ADR 时使用 [`docs/templates/adr-template.md`](../templates/adr-template.md),并为每条决策补充状态、背景、取舍、后果和相关资产。
6
+
7
+ 模板源仓库的 ADR 保存在 `.template-source/adr/`,不会随 `create-yss-spec` 进入 `project-instance`。
@@ -0,0 +1,83 @@
1
+ # 数字人角色
2
+
3
+ 结构化事实源是 `docs/agents/digital-human-roles.yaml`。角色、技能、协作组和会签级别与运行时无关。Claude Code、Cursor、Codex、Hermes、Grok Bot 等只通过 YAML `runtimes` 绑定。冲突时以 YAML 为准。
4
+
5
+ ## 何时读本文
6
+
7
+ 按职称派活、写会签、把数字人角色和 Ticket 状态 / 职能 Agent / 执行态弄混,或要在某个 Agent 平台上实例化这些角色时。
8
+
9
+ ## 四条正交轴
10
+
11
+ | 轴 | 是什么 | 不是什么 |
12
+ |---|---|---|
13
+ | 数字人角色 | 职称配置(需求经理、前端工程师…) | Ticket 五态、某个平台的 Bot |
14
+ | 主控数字人 | 生命周期编排器的运行时实例 | 第八个业务职称 |
15
+ | 职能工作单元 | Discovery / Spec / Code / Review | 职称 |
16
+ | 执行态 | Explorer / Drafter / Worker / Reviewer / Verifier | 数字人角色 |
17
+ | 运行时绑定 | 如何在 Cursor / Claude / Grok 等落地 | 角色职责本身 |
18
+
19
+ 一次任务包同时写明数字人角色、执行态、当前 `runtime_id`,以及从角色表复制的 `core_skills` / `forbidden_skills`。可用 `taskPackageDefaults(roleId)`(`scripts/lib/digital-human-roles.mjs`)读取,禁止手写第二套技能包。
20
+
21
+ ## 会签人
22
+
23
+ `gate_policy.digital_human_review` 与 `dual_digital_human` 是「门禁 × 起草者 × 会签人」规则,不是门禁名单。主控按 `countersigners` 派会签任务。
24
+
25
+ | 门禁 / 工作单元 | 起草 | 会签 |
26
+ |---|---|---|
27
+ | `gate.prototype-reviewed` | `role.product-manager` | `role.frontend-engineer` |
28
+ | `gate.openapi-draft-reviewed` | `role.backend-engineer` | `role.frontend-engineer` |
29
+ | `gate.engineering-baseline-accepted` | (实现者) | `role.test-engineer` |
30
+ | `gate.frontend-implementation-verified` | `role.frontend-engineer` | `role.test-engineer` |
31
+ | `work-unit.code-review` | 实现者 | `role.test-engineer`(必须不同实例) |
32
+ | `gate.spec-baseline-approved` | `role.requirements-manager` | `role.product-manager` |
33
+ | `gate.openapi-frozen` | `role.backend-engineer` | `role.product-manager`、`role.test-engineer` |
34
+ | `gate.user-confirmation` | — | `role.product-manager`;生物人可否决 |
35
+ | `gate.release-ready` | — | 生物人(`role.biological-human`) |
36
+
37
+ 未列入表的门禁(含 `gate.design-reviewed`、`gate.architecture-reviewed`)走 `default_if_unlisted: biological-human`。
38
+
39
+ 会签写入 `docs/.scratch/<feature>/gates/<gate-id>-approval.yaml`,形状见 `docs/templates/approval-record-template.yaml`。恢复前运行 `scripts/verify-approval-record`。错误会签只能得到 `blocked`,不能把门禁标成 `approved`。Checkpoint 里会签桶门禁为 `approved` 时必须有可读 `approval_ref`。
40
+
41
+ `paused-human-gate` 表示等待上述指定会签人,不是「必须是生物人」。
42
+
43
+ 主控默认兼任项目经理,直到 `dual_hat_split_when`(`cross-repo-load` 或 `responsibility-conflict`)要求分体。
44
+
45
+ ## 跨平台协同(默认)
46
+
47
+ 1. 人默认只跟主控说话。
48
+ 2. 主控按阶段 1:1 指定一个 owner,并给任务包(输入、写范围、禁止 skill、验收、验证命令)。
49
+ 3. 需要可见会签时使用 YAML `stage_groups` 的**逻辑协作组**。这不是某个产品的群聊人数限制。
50
+ 4. 权威结论写回 git。运行时记忆只记该数字人的稳定偏好。
51
+ 5. 写隔离一律靠任务包。某运行时若共享磁盘或会话,适配器必须声明 `shared_workspace_is_not_security_boundary: true`,不得把实例当成沙箱。
52
+ 6. `project-instance` 复制角色实例并绑定仓库路径。禁止按功能再拆实例。
53
+ 7. 技能权威仍是 `.agents/skills`。已有投影根走 `runtime.skill-projection`,不要为职称再维护一份 skill。任务包的技能列表必须从角色表复制。
54
+
55
+ ## 运行时绑定
56
+
57
+ | ID | 覆盖 | 落地方式 |
58
+ |---|---|---|
59
+ | `runtime.generic` | 任何能加载 `core_skills` 并接受任务包的 Agent | 通用会话 / 人设 / system prompt |
60
+ | `runtime.skill-projection` | `yss-skill-registry.yaml` 的 `agent_runtime_roots`(claude、codex、cursor、hermes、pi、qoder、trae) | 投影技能 + subagent 任务包 |
61
+ | `runtime.grok` | Grok Bot | 持久 Bot、群聊或 1:1 交接;群超过 6 人改 1:1,不改逻辑协作组 |
62
+
63
+ 新增平台:先加 `runtimes` 条目,再写适配说明。不要把平台限制写进 `roles`。
64
+
65
+ Grok 专用操作见 `docs/templates/grok-bot-profile-template.md`。通用实例化见 `docs/templates/digital-human-runtime-profile-template.md`。
66
+
67
+ ## 两套批准
68
+
69
+ | 名称 | 关闭什么 | 谁点 |
70
+ |---|---|---|
71
+ | 运行时副作用审批 | 发消息、改生产、付款、删数据等工具动作 | 生物人(各平台自己的 Allow / 确认框) |
72
+ | 生命周期会签 | `gate.*` 与独立 code review | 见 YAML `gate_policy` |
73
+
74
+ 会签写入 `docs/templates/approval-record-template.yaml`,带 `runtime_id`、`principal_ref` 与实例引用。起草者不得出现在会签人里。`gate.release-ready`、对外商务合同、运行时外部副作用,以及未列入会签表的 `gate.design-reviewed` / `gate.architecture-reviewed` 仍须生物人。
75
+
76
+ ## 实例化
77
+
78
+ - 模板仓:`publish-singleton-profiles`。账户级只发布一套职称 profile,不按功能再拆。
79
+ - `project-instance`:`duplicate-and-bind-repo-path`。复制 YAML 的 `title` / `description` / `core_skills`,写入本仓库路径,选择 `runtime_id`。步骤见 `docs/templates/digital-human-runtime-profile-template.md`。外部 `create-yss-spec` 尚未接管此步骤。
80
+
81
+ ## 任务包最低字段
82
+
83
+ 数字人角色 ID、`runtime_id`、执行态、从角色表复制的 `core_skills` / `forbidden_skills`、输入资产、允许写路径、禁止事项、验收、验证命令、汇合方式。
@@ -0,0 +1,253 @@
1
+ schema_version: 1
2
+ registry_id: yss.digital-human-roles
3
+ status: active
4
+ description: >-
5
+ 数字人角色、主控、阶段协作组、技能启用/禁止与生命周期会签的单一事实源。
6
+ 角色配置与运行时无关;Claude / Cursor / Codex / Grok 等只通过 runtimes 绑定。
7
+ Ticket 五态不是数字人角色。
8
+ canonical_path: docs/agents/digital-human-roles.yaml
9
+ runtime_policy:
10
+ overlay_on_lifecycle: true
11
+ consumed_by_lifecycle: true
12
+ git_is_ssot: true
13
+ default_invocation: orchestrator
14
+ dispatch: orchestrator-one-to-one
15
+ per_feature_instances: forbidden
16
+ project_instance_instantiation: duplicate-and-bind-repo-path
17
+ template_instantiation: publish-singleton-profiles
18
+ biological_veto: true
19
+ implementer_must_differ: true
20
+ write_isolation: task-package-policy
21
+ dual_hat_split_when: [cross-repo-load, responsibility-conflict]
22
+
23
+ runtimes:
24
+ - id: runtime.generic
25
+ kind: generic
26
+ instance_kind: agent-session
27
+ skill_root: null
28
+ covers_skill_registry_roots: false
29
+ collaboration: task-package-and-handoff
30
+ max_collaboration_group_size: null
31
+ overflow: not-applicable
32
+ shared_workspace_is_not_security_boundary: false
33
+ side_effect_approval: biological-human
34
+ notes: 任何能加载 core_skills 并接受任务包的 Agent 会话。
35
+ - id: runtime.skill-projection
36
+ kind: projected-agent-root
37
+ instance_kind: agent-session-or-subagent
38
+ skill_root: from-skill-registry
39
+ covers_skill_registry_roots: true
40
+ collaboration: subagent-task-package
41
+ max_collaboration_group_size: null
42
+ overflow: not-applicable
43
+ shared_workspace_is_not_security_boundary: false
44
+ side_effect_approval: biological-human
45
+ notes: >-
46
+ 覆盖 docs/agents/yss-skill-registry.yaml 的 agent_runtime_roots
47
+ (claude / codex / cursor / hermes / pi / qoder / trae)。
48
+ 技能仍从 .agents/skills 投影,不按职称再维护一份。
49
+ - id: runtime.grok
50
+ kind: grok-bot
51
+ instance_kind: durable-bot
52
+ skill_root: null
53
+ covers_skill_registry_roots: false
54
+ collaboration: group-chat-or-async-dm
55
+ max_collaboration_group_size: 6
56
+ min_collaboration_group_size: 2
57
+ overflow: one-to-one-handoff
58
+ shared_workspace_is_not_security_boundary: true
59
+ side_effect_approval: biological-human
60
+ notes: >-
61
+ Grok Bot 适配。群聊 2–6 人;超出则改 1:1 交接,不改逻辑阶段协作组。
62
+ 全部 Bot 共享云计算机,写范围只靠任务包。不新增 agent_runtime_roots.grok。
63
+
64
+ orchestrator:
65
+ id: role.lifecycle-orchestrator
66
+ name: 主控数字人
67
+ kind: orchestrator
68
+ title: YSS 生命周期主控
69
+ default_dual_hat: [role.project-manager]
70
+ stages: [stage.entry-triage, stage.discovery, stage.spec-architecture, stage.product-design, stage.system-data-engineering, stage.ticket-formalization, stage.vertical-slice-implementation, stage.verification-release-retrospective]
71
+ core_skills: [yss-product-lifecycle, yss-router]
72
+ forbidden_skills: [yss-domain, yss-ui, yss-page-module-development, yss-web-controller, yss-repository, implement]
73
+ description: >-
74
+ Own YSS lifecycle routing. Read yss-project.yaml and CONTEXT.md first.
75
+ Select the next unblocked work unit, compile a task package, and assign
76
+ one owner per stage. Do not implement business code. Do not approve Slice
77
+ contracts into ready-for-agent without the full formula. Do not announce
78
+ releasable. Default dual-hat: project manager until a separate instance
79
+ is required. Authoritative artifacts live in git.
80
+
81
+ roles:
82
+ - id: role.requirements-manager
83
+ name: 需求经理
84
+ kind: digital-human
85
+ title: YSS 需求经理
86
+ stages: [stage.discovery, stage.spec-architecture]
87
+ draft_artifact_ids: [artifact.discovery-record, artifact.spec]
88
+ core_skills: [grilling, domain-modeling, research, competitive-intelligence, grill-with-docs]
89
+ forbidden_skills: [yss-ui, yss-domain, yss-web-controller, yss-repository, yss-ddd-scaffold-generator, yss-frontend-scaffold-generator, implement, tdd]
90
+ description: >-
91
+ Own Discovery language, users, MVP, non-goals, success criteria, test
92
+ seams, and Spec prose. Propose CONTEXT.md glossary entries. Do not freeze
93
+ visual prototypes, OpenAPI, or code. Do not guess unconfirmed business
94
+ rules. Hand off to the orchestrator when the frontier is empty.
95
+
96
+ - id: role.product-manager
97
+ name: 产品经理
98
+ kind: digital-human
99
+ title: YSS 产品经理
100
+ stages: [stage.discovery, stage.spec-architecture, stage.product-design, stage.verification-release-retrospective]
101
+ draft_artifact_ids: [artifact.product-overview, artifact.functional-architecture, artifact.interaction-spec, artifact.state-matrix, artifact.prototype-confirmation]
102
+ core_skills: [yss-design-system, yss-prototype-stage, prototype-review, yss-antd-design]
103
+ forbidden_skills: [yss-ui, yss-domain, yss-repository, yss-web-controller, yss-ddd-scaffold-generator, implement, tdd]
104
+ description: >-
105
+ Own priority, product-design impact, interaction, state matrix, and
106
+ prototype confirmation recommendation. May reject Spec scope. Do not write
107
+ production code or freeze OpenAPI alone. Frontend implementation uses the
108
+ frontend-engineer role and yss-ui, not yss-antd-design.
109
+
110
+ - id: role.business
111
+ name: 商务
112
+ kind: digital-human
113
+ title: YSS 商务
114
+ stages: [stage.discovery, stage.verification-release-retrospective]
115
+ draft_artifact_ids: [artifact.discovery-record]
116
+ core_skills: [competitive-intelligence, research]
117
+ forbidden_skills: [yss-ui, yss-domain, yss-web-controller, yss-openapi-governance, to-spec, to-tickets, implement, tdd, yss-router]
118
+ description: >-
119
+ Own commercial constraints, delivery promises, and business non-goals in
120
+ Discovery and release windows. Do not finalize Spec, API, tickets, or
121
+ code. External quotes and contracts stay behind runtime side-effect
122
+ approval by a biological human.
123
+
124
+ - id: role.project-manager
125
+ name: 项目经理
126
+ kind: digital-human
127
+ title: YSS 项目经理
128
+ stages: [stage.entry-triage, stage.discovery, stage.spec-architecture, stage.product-design, stage.system-data-engineering, stage.ticket-formalization, stage.vertical-slice-implementation, stage.verification-release-retrospective]
129
+ draft_artifact_ids: [artifact.parent-ticket, artifact.vertical-slice-ticket]
130
+ core_skills: [yss-product-lifecycle, handoff, implementation-repo-onboarding, cross-repo-implementation-routing]
131
+ forbidden_skills: [yss-domain, yss-ui, implement, tdd, yss-web-controller]
132
+ description: >-
133
+ Own parent Ticket hygiene, checkpoints, handoff, risk, and implementation
134
+ repo registry. Do not set ready-for-agent; the orchestrator recomputes
135
+ that formula. Do not approve Spec or OpenAPI Freeze. Do not write business
136
+ code or serve as independent Reviewer. Default dual-hat on the
137
+ orchestrator instance until dual_hat_split_when
138
+ (cross-repo-load or responsibility-conflict) requires a separate instance.
139
+
140
+ - id: role.frontend-engineer
141
+ name: 前端工程师
142
+ kind: digital-human
143
+ title: YSS 前端工程师
144
+ stages: [stage.product-design, stage.system-data-engineering, stage.ticket-formalization, stage.vertical-slice-implementation, stage.verification-release-retrospective]
145
+ draft_artifact_ids: [artifact.frontend-implementation-plan]
146
+ core_skills: [yss-ui, yss-page-module-development, yss-components, yss-formily, formily-foundation, formily-linkage-effects, formily-mode-slot-detail, formily-step-flow, ytable-usage, ytree-usage, yedit-table-usage, yss-api-integration, yss-hook, theme-token-usage, page-skeleton, page-list-module, page-form-module, component-selection-imports, vue3-best-practices, tdd]
147
+ forbidden_skills: [yss-domain, yss-application, yss-repository, yss-mybatis, yss-web-controller, yss-ddd-scaffold-generator, java-backend-commit]
148
+ description: >-
149
+ Own Vue page modules, frontend tests, and frontend_implementation_plan.
150
+ Review OpenAPI Draft for client fit and prototype feasibility. Write only
151
+ contract-allowed frontend paths. Verify with pnpm. Do not freeze API, own
152
+ backend domain, or countersign your own merge.
153
+
154
+ - id: role.backend-engineer
155
+ name: 后端工程师
156
+ kind: digital-human
157
+ title: YSS 后端工程师
158
+ stages: [stage.system-data-engineering, stage.ticket-formalization, stage.vertical-slice-implementation, stage.verification-release-retrospective]
159
+ draft_artifact_ids: [artifact.openapi-draft, artifact.data-architecture]
160
+ core_skills: [yss-router, yss-domain, yss-application, yss-repository, yss-mybatis, yss-web-controller, yss-dto, yss-exception, yss-validation, tdd, yss-ddd-scaffold-generator]
161
+ forbidden_skills: [yss-ui, yss-page-module-development, yss-formily, yss-frontend-scaffold-generator, yss-antd-design, page-list-module, page-form-module]
162
+ description: >-
163
+ Own OpenAPI Draft, data-architecture contributions, and backend tests.
164
+ Write only contract-allowed backend paths. Verify with ./mvnw. Do not
165
+ Freeze OpenAPI, treat UI copy as requirements, or countersign your own
166
+ implementation.
167
+
168
+ - id: role.test-engineer
169
+ name: 测试工程师
170
+ kind: digital-human
171
+ title: YSS 测试工程师
172
+ stages: [stage.spec-architecture, stage.vertical-slice-implementation, stage.verification-release-retrospective]
173
+ draft_artifact_ids: [artifact.frontend-implementation-verification]
174
+ owned_evidence_ids: [evidence.fresh-verification, evidence.frontend-implementation-verification]
175
+ core_skills: [tdd, diagnosing-bugs, code-review]
176
+ forbidden_skills: [yss-ddd-scaffold-generator, yss-frontend-scaffold-generator, implement, to-spec]
177
+ description: >-
178
+ Own test code, defect records, fresh verification, and frontend
179
+ implementation verification evidence. Review every implementation slice.
180
+ Recommend release readiness; do not close gate.release-ready. Do not
181
+ change product scope or write feature implementation. Must be a different
182
+ instance from the implementer.
183
+
184
+ stage_groups:
185
+ - id: group.discovery
186
+ name: Discovery
187
+ stage: stage.discovery
188
+ members: [role.lifecycle-orchestrator, role.requirements-manager, role.product-manager, role.business]
189
+ - id: group.spec
190
+ name: Spec
191
+ stage: stage.spec-architecture
192
+ members: [role.lifecycle-orchestrator, role.requirements-manager, role.product-manager, role.test-engineer]
193
+ - id: group.product-design
194
+ name: 产品设计
195
+ stage: stage.product-design
196
+ members: [role.lifecycle-orchestrator, role.product-manager, role.requirements-manager, role.frontend-engineer]
197
+ - id: group.contract
198
+ name: 契约
199
+ stage: stage.system-data-engineering
200
+ members: [role.lifecycle-orchestrator, role.backend-engineer, role.frontend-engineer, role.test-engineer, role.product-manager]
201
+ - id: group.tickets
202
+ name: Ticket 正式化
203
+ stage: stage.ticket-formalization
204
+ members: [role.lifecycle-orchestrator, role.project-manager, role.frontend-engineer, role.backend-engineer, role.test-engineer]
205
+ - id: group.implementation
206
+ name: 实现
207
+ stage: stage.vertical-slice-implementation
208
+ members: [role.lifecycle-orchestrator, role.frontend-engineer, role.backend-engineer, role.test-engineer]
209
+ - id: group.release
210
+ name: 发布
211
+ stage: stage.verification-release-retrospective
212
+ members: [role.lifecycle-orchestrator, role.project-manager, role.test-engineer, role.product-manager, role.business]
213
+
214
+ gate_policy:
215
+ default_if_unlisted: biological-human
216
+ unlisted_kept_biological:
217
+ - gate.design-reviewed
218
+ - gate.architecture-reviewed
219
+ evidence_only:
220
+ - gate.repository-identity-valid
221
+ - gate.prototype-verified
222
+ orchestrator:
223
+ - gate.slice-contract-approved
224
+ - gate.slice-ready-for-agent
225
+ digital_human_review:
226
+ - gate: gate.prototype-reviewed
227
+ drafter: role.product-manager
228
+ countersigners: [role.frontend-engineer]
229
+ - gate: gate.openapi-draft-reviewed
230
+ drafter: role.backend-engineer
231
+ countersigners: [role.frontend-engineer]
232
+ - gate: gate.engineering-baseline-accepted
233
+ countersigners: [role.test-engineer]
234
+ - gate: gate.frontend-implementation-verified
235
+ drafter: role.frontend-engineer
236
+ countersigners: [role.test-engineer]
237
+ digital_human_review_work_units:
238
+ - work_unit: work-unit.code-review
239
+ countersigners: [role.test-engineer]
240
+ implementer_must_differ: true
241
+ dual_digital_human:
242
+ - gate: gate.spec-baseline-approved
243
+ drafter: role.requirements-manager
244
+ countersigners: [role.product-manager]
245
+ - gate: gate.openapi-frozen
246
+ drafter: role.backend-engineer
247
+ countersigners: [role.product-manager, role.test-engineer]
248
+ product_digital_human_with_biological_veto:
249
+ - gate.user-confirmation
250
+ biological_human:
251
+ - gate.release-ready
252
+ runtime_side_effect_approval: biological-human
253
+ commercial_contract: biological-human
@@ -57,7 +57,7 @@
57
57
  scripts/verify-template
58
58
  ```
59
59
 
60
- 若模板维护引入或更新分发到实例的 Node 工具,先在 `.template-source/tooling/node/` 使用 `pnpm install --frozen-lockfile`,再运行 `pnpm build:vendor` 与 `pnpm check:vendor`;实例门禁不得安装依赖或重建 vendor。运行时、公开入口和跨仓回滚规则以 `.template-source/adr/0009-zero-install-node-tooling-runtime.md` 及对应契约为准。
60
+ 模板源维护引入或更新分发到实例的 Node 工具时,维护侧依赖、构建和 vendor 校验只在模板源治理区及 CI 中执行;实例门禁不得安装依赖或重建 vendor。实例只消费已提交的 `scripts/lib/*.mjs` 与 `scripts/vendor/*.mjs`,具体维护侧命令和治理决策不属于项目实例文档。
61
61
 
62
62
  6. 需要重新加载技能的客户端在变更落地后重启或刷新项目。
63
63
 
@@ -1,15 +1,15 @@
1
1
  # Triage 标签
2
2
 
3
- 本文定义 Agent 分诊时使用的五种标准角色,以及它们在当前 Ticket tracker 中对应的标签。
3
+ 本文定义 Agent 分诊时使用的五种 **Ticket 状态**,以及它们在当前 Ticket tracker 中对应的标签。不要把它们叫做数字人角色。
4
4
 
5
- | 标准角色 | Tracker 标签 | 含义 |
5
+ | Ticket 状态 | Tracker 标签 | 含义 |
6
6
  | --- | --- | --- |
7
7
  | `needs-triage` | `needs-triage` | 等待维护者评估 Ticket |
8
8
  | `needs-info` | `needs-info` | 等待报告者补充信息 |
9
9
  | `ready-for-agent` | `ready-for-agent` | 必要门禁已通过、阻塞边已清除,可由 Agent 直接实现的垂直切片 Ticket |
10
- | `ready-for-human` | `ready-for-human` | Spec、设计、契约草案或其他资产需要人工审查、判断或特权访问 |
10
+ | `ready-for-human` | `ready-for-human` | Spec、设计、契约草案或其他资产需要会签(指定数字人或生物人)或特权访问 |
11
11
  | `wontfix` | `wontfix` | 不会处理 |
12
12
 
13
- 当 skill 提及某个标准角色时,使用表中对应的 Tracker 标签。
13
+ 当 skill 提及某个 Ticket 状态时,使用表中对应的 Tracker 标签。会签人由 `docs/agents/digital-human-roles.yaml` 指定,不由本表指定。
14
14
 
15
- Local Markdown 主 tracker 不调用远程标签:在 Ticket 文件顶部使用同名 `Status:` 值记录标准角色。Wayfinder 的 `claimed` / `resolved` 仅是临时工作状态,不属于本表五态;进入交付 Ticket 前必须转换为标准 `Status:`。
15
+ Local Markdown 主 tracker 不调用远程标签:在 Ticket 文件顶部使用同名 `Status:` 值记录 Ticket 状态。Wayfinder 的 `claimed` / `resolved` 仅是临时工作状态,不属于本表五态;进入交付 Ticket 前必须转换为标准 `Status:`。
@@ -30,7 +30,7 @@ apps/
30
30
  - **frontend**:依赖安装、测试、type-check 与构建优先使用 `pnpm`(例如 `pnpm test`、`pnpm type-check`、`pnpm build`)。不要默认 `npm` 或 `yarn`。
31
31
  - **backend**:校验、测试与编译优先使用项目根 `./mvnw`(例如 `./mvnw validate`、`./mvnw test`、`./mvnw package`)。不要默认裸 `mvn`。
32
32
  - Ticket、Slice Implementation Contract、CI 和 Review 证据必须写下实际执行的上述命令。既有仓库缺少 `pnpm` 或 Maven Wrapper 时,先记录受控例外、替代命令和责任人,再执行。
33
- - 本模板源仓库没有产品 frontend / backend 运行时;其 Node 校验仍按 `AGENTS.md` 的 Cursor Cloud 说明使用 `pnpm --dir .template-source/tooling/node`。
33
+ - 本模板源仓库没有产品 frontend / backend 运行时;模板源维护侧的 Node 校验命令和环境约束只记录在 `.template-source/` 治理区及 CI 配置中,不属于项目实例实现命令。
34
34
 
35
35
  ## 1.3 `repository_scope: git-submodule`
36
36
 
@@ -37,7 +37,8 @@
37
37
  "properties": {
38
38
  "status": { "enum": ["not-evaluated", "blocked", "ready-for-human", "approved", "stale", "not-applicable"] },
39
39
  "reason": { "type": "string" },
40
- "evidence_refs": { "type": "array", "items": { "type": "string" } }
40
+ "evidence_refs": { "type": "array", "items": { "type": "string" } },
41
+ "approval_ref": { "type": ["string", "null"] }
41
42
  }
42
43
  }
43
44
  },
@@ -1,11 +1,13 @@
1
1
  # Subagent 协作规则
2
2
 
3
- Subagent 只接收边界清晰的任务包,主控 Agent 负责仓库身份、Spec baseline、门禁、Ticket 状态、Git checkpoint 和完成结论。
3
+ Subagent 和其它运行时实例只接收边界清晰的任务包。主控数字人负责仓库身份、门禁计算、Ticket 状态、Git checkpoint 和完成结论。数字人角色、`runtime_id` 与 Explorer / Drafter / Worker / Reviewer / Verifier 执行态正交,任务包必须同时写明。
4
+
5
+ 写入范围不得与其他执行者重叠;实现者不得同时担任同一切片的独立审查者,也不得会签自己起草的资产。写隔离以任务包为准。某运行时若共享磁盘或会话,不得把不同实例当成安全边界。
4
6
 
5
7
  ## 任务包
6
8
 
7
- 每个任务包必须写明输入资产、目标、允许写路径、禁止事项、验收标准、验证命令和汇合方式。写入范围不得与其他执行者重叠;实现者不得同时担任同一切片的独立审查者。
9
+ 每个任务包必须写明数字人角色 ID、`runtime_id`、执行态、从 `docs/agents/digital-human-roles.yaml` 复制的 `core_skills` / `forbidden_skills`(可用 `taskPackageDefaults`)、输入资产、目标、允许写路径、禁止事项、验收标准、验证命令和汇合方式。禁止手写第二套技能包。
8
10
 
9
11
  ## 汇合
10
12
 
11
- 返回结果至少包括变更文件、证据文件、实际执行的命令、结果、延期 seam、drift / violation / new impacts 和建议下一路由。主控 Agent 必须重新执行 fresh verification,并在集中 checkpoint 中保留阶段因果。
13
+ 返回结果至少包括变更文件、证据文件、实际执行的命令、结果、延期 seam、drift / violation / new impacts 和建议下一路由。主控必须重新执行 fresh verification,并在集中 checkpoint 中保留阶段因果。会签写入 `docs/.scratch/<feature>/gates/<gate-id>-approval.yaml`(形状见 `docs/templates/approval-record-template.yaml`),不能用聊天表情代替。恢复前校验 `scripts/verify-approval-record`。
@@ -14,6 +14,8 @@ gates:
14
14
  <stable-gate-id>:
15
15
  status: <not-evaluated|blocked|ready-for-human|approved|stale|not-applicable>
16
16
  reason: <why this status applies>
17
+ evidence_refs: []
18
+ approval_ref: <docs/.scratch/<feature>/gates/<gate-id>-approval.yaml when approved countersign gate>
17
19
  phase_boundary:
18
20
  decision: <continue|clear|handoff|subagent|compact>
19
21
  reason: <decision evidence>
@@ -41,4 +43,4 @@ blockers: []
41
43
  rollback: []
42
44
  ```
43
45
 
44
- 阶段 checkpoint 只在人工暂停、handoff、进入实现、合并或发布边界集中回写;出现阻塞、责任人变化或资产单独批准时立即回写,并保留阶段因果。
46
+ 阶段 checkpoint 只在会签暂停、handoff、进入实现、合并或发布边界集中回写;出现阻塞、责任人变化或资产单独批准时立即回写,并保留阶段因果。`paused-human-gate` 表示等待 YAML `gate_policy` 指定的会签人(数字人或生物人),不是「必须是生物人」。会签桶内门禁标为 `approved` 时必须有可读的 `approval_ref`。
@@ -0,0 +1,14 @@
1
+ schema_version: 1
2
+ gate_id: gate.spec-baseline-approved
3
+ decision: approved
4
+ actor_kind: digital-human
5
+ role_id: role.product-manager
6
+ runtime_id: runtime.generic
7
+ runtime_instance_ref: "runtime.generic:role.product-manager"
8
+ principal_ref: "instance:role.product-manager"
9
+ drafter_role_id: role.requirements-manager
10
+ countersigner_role_ids:
11
+ - role.product-manager
12
+ evidence_refs: []
13
+ biological_veto: false
14
+ notes: 会签必须可读取;起草者不得出现在 countersigner_role_ids。运行时表情/reaction 无效。
@@ -0,0 +1,38 @@
1
+ # 数字人运行时 Profile:<数字人角色>
2
+
3
+ > 从 `docs/agents/digital-human-roles.yaml` 复制 title / description / skill。不要手写第二套职责。先选 `runtime_id`,再按该运行时适配器落地。
4
+
5
+ ## 绑定
6
+
7
+ | 字段 | 内容 |
8
+ |---|---|
9
+ | 数字人角色 ID | `role.` |
10
+ | 运行时 | `runtime.generic` / `runtime.skill-projection` / `runtime.grok` / 新增适配器 |
11
+ | title | YAML `title` |
12
+ | description | YAML `description` 全文,加上本 `project-instance` 仓库路径 |
13
+ | 兼任 | 仅主控默认兼任 `role.project-manager`,直到 `dual_hat_split_when` |
14
+ | 仓库路径 | 本 `project-instance` 的 git 根路径 |
15
+
16
+ ## Skills
17
+
18
+ - 启用:YAML `core_skills`(投影根从 `.agents/skills` 加载同名 skill)
19
+ - 保持关闭:YAML `forbidden_skills`
20
+ - 账户或客户端能发现更多 skill,不等于该数字人可用
21
+
22
+ ## `project-instance` 绑定清单
23
+
24
+ 模板仓只 `publish-singleton-profiles`。实例仓按本表 duplicate,禁止按功能再拆实例。外部 `create-yss-spec` 尚未接管此步骤。
25
+
26
+ - [ ] 从 YAML 复制 `title`、`description`、`core_skills`、`forbidden_skills`,不手写第二套职责
27
+ - [ ] 选择一个 `runtime_id`(`runtime.generic` / `runtime.skill-projection` / `runtime.grok`)
28
+ - [ ] `description` 末尾写明本仓库路径
29
+ - [ ] 会签文件落在 `docs/.scratch/<feature>/gates/<gate-id>-approval.yaml`
30
+ - [ ] 未命中 `dual_hat_split_when` 时,主控与项目经理共用同一实例
31
+
32
+ ## 协同
33
+
34
+ - 人默认只跟主控说话。
35
+ - 逻辑协作组以 YAML `stage_groups` 为准。
36
+ - 当前运行时若声明了 `max_collaboration_group_size` 且 `overflow=one-to-one-handoff`,超员时改 1:1,不改逻辑组。
37
+ - 会签按 YAML `gate_policy` 写 `docs/templates/approval-record-template.yaml`,填 `runtime_id` 与 `principal_ref`。恢复前跑 `scripts/verify-approval-record`。
38
+ - 权威产物写 git。
@@ -0,0 +1,24 @@
1
+ # Grok Bot Profile:<数字人角色>
2
+
3
+ > 这是 `runtime.grok` 适配模板。角色职责仍以 `docs/agents/digital-human-roles.yaml` 为准。通用流程见 `docs/templates/digital-human-runtime-profile-template.md`。
4
+
5
+ ## Profile
6
+
7
+ | 字段 | 内容 |
8
+ |---|---|
9
+ | 数字人角色 ID | `role.` |
10
+ | runtime_id | `runtime.grok` |
11
+ | Grok title | YAML `title` |
12
+ | Description | YAML `description` 全文,加上本 `project-instance` 仓库路径 |
13
+ | 兼任 | 仅主控默认兼任 `role.project-manager`,直到 `dual_hat_split_when` |
14
+
15
+ ## Skills
16
+
17
+ - 在 Grok **Settings → Plugins → Yours** 仅为该 Bot 启用 `core_skills`
18
+ - `forbidden_skills` 保持关闭
19
+
20
+ ## Grok 约束
21
+
22
+ - 群聊 2–6 人。逻辑协作组更大时用 1:1 异步交接,不要改 YAML `stage_groups`。
23
+ - 全部 Bot 共享云计算机。写范围只写在任务包里。
24
+ - 发邮件、改生产等走 Grok Allow;不等于生命周期门禁已过。会签写 git 记录并跑 `scripts/verify-approval-record`。
@@ -275,9 +275,9 @@ owner: ai
275
275
 
276
276
  ## 6. Subagent 执行计划
277
277
 
278
- | task_id | subagent 角色 | 责任范围 | 允许修改文件 / 模块 | 禁止事项 | 输出回填位置 |
279
- |---|---|---|---|---|---|
280
- | | Explorer / Drafter / Worker / Reviewer / Verifier | frontend / backend / test / review / verify / docs | | 不得 Freeze / 不得安全放行 / 不得覆盖他人改动 | |
278
+ | task_id | 数字人角色 | runtime_id | core_skills(从角色表复制) | subagent 角色 | 责任范围 | 允许修改文件 / 模块 | 禁止事项 | 输出回填位置 |
279
+ |---|---|---|---|---|---|---|---|---|
280
+ | | role.frontend-engineer | runtime.skill-projection | 从 YAML `core_skills` 复制 | Explorer / Drafter / Worker / Reviewer / Verifier | frontend / backend / test / review / docs | | 不得 Freeze / 不得覆盖他人改动 / 不得会签自己的草稿 | |
281
281
 
282
282
  | 并行风险 | 缓解措施 | 合并负责人 | 状态 |
283
283
  |---|---|---|---|