create-yss-spec 2.2.4 → 2.2.6
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/code-review/SKILL.md +10 -7
- package/template/.agents/skills/code-review/agents/openai.yaml +1 -1
- package/template/.agents/skills/code-review/references/yss-review-standards.md +54 -0
- package/template/.agents/skills/yss-product-lifecycle/SKILL.md +13 -12
- 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 +48 -2
- package/template/.agents/skills/yss-product-lifecycle/references/orchestration.md +3 -1
- package/template/.agents/skills/yss-product-lifecycle/references/state-model.md +1 -1
- package/template/.claude/skills/code-review/SKILL.md +10 -7
- package/template/.claude/skills/code-review/agents/openai.yaml +1 -1
- package/template/.claude/skills/code-review/references/yss-review-standards.md +54 -0
- package/template/.claude/skills/yss-product-lifecycle/SKILL.md +13 -12
- 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 +48 -2
- package/template/.claude/skills/yss-product-lifecycle/references/orchestration.md +3 -1
- package/template/.claude/skills/yss-product-lifecycle/references/state-model.md +1 -1
- package/template/.codex/skills/code-review/SKILL.md +10 -7
- package/template/.codex/skills/code-review/agents/openai.yaml +1 -1
- package/template/.codex/skills/code-review/references/yss-review-standards.md +54 -0
- package/template/.codex/skills/yss-product-lifecycle/SKILL.md +13 -12
- 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 +48 -2
- package/template/.codex/skills/yss-product-lifecycle/references/orchestration.md +3 -1
- package/template/.codex/skills/yss-product-lifecycle/references/state-model.md +1 -1
- package/template/.cursor/skills/code-review/SKILL.md +10 -7
- package/template/.cursor/skills/code-review/agents/openai.yaml +1 -1
- package/template/.cursor/skills/code-review/references/yss-review-standards.md +54 -0
- package/template/.cursor/skills/yss-product-lifecycle/SKILL.md +13 -12
- 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 +48 -2
- package/template/.cursor/skills/yss-product-lifecycle/references/orchestration.md +3 -1
- package/template/.cursor/skills/yss-product-lifecycle/references/state-model.md +1 -1
- package/template/.hermes/skills/code-review/SKILL.md +10 -7
- package/template/.hermes/skills/code-review/agents/openai.yaml +1 -1
- package/template/.hermes/skills/code-review/references/yss-review-standards.md +54 -0
- package/template/.hermes/skills/yss-product-lifecycle/SKILL.md +13 -12
- 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 +48 -2
- package/template/.hermes/skills/yss-product-lifecycle/references/orchestration.md +3 -1
- package/template/.hermes/skills/yss-product-lifecycle/references/state-model.md +1 -1
- package/template/.pi/skills/code-review/SKILL.md +10 -7
- package/template/.pi/skills/code-review/agents/openai.yaml +1 -1
- package/template/.pi/skills/code-review/references/yss-review-standards.md +54 -0
- package/template/.pi/skills/yss-product-lifecycle/SKILL.md +13 -12
- 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 +48 -2
- package/template/.pi/skills/yss-product-lifecycle/references/orchestration.md +3 -1
- package/template/.pi/skills/yss-product-lifecycle/references/state-model.md +1 -1
- package/template/.qoder/skills/code-review/SKILL.md +10 -7
- package/template/.qoder/skills/code-review/agents/openai.yaml +1 -1
- package/template/.qoder/skills/code-review/references/yss-review-standards.md +54 -0
- package/template/.qoder/skills/yss-product-lifecycle/SKILL.md +13 -12
- 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 +48 -2
- package/template/.qoder/skills/yss-product-lifecycle/references/orchestration.md +3 -1
- package/template/.qoder/skills/yss-product-lifecycle/references/state-model.md +1 -1
- package/template/.trae/skills/code-review/SKILL.md +10 -7
- package/template/.trae/skills/code-review/agents/openai.yaml +1 -1
- package/template/.trae/skills/code-review/references/yss-review-standards.md +54 -0
- package/template/.trae/skills/yss-product-lifecycle/SKILL.md +13 -12
- 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 +48 -2
- package/template/.trae/skills/yss-product-lifecycle/references/orchestration.md +3 -1
- package/template/.trae/skills/yss-product-lifecycle/references/state-model.md +1 -1
- package/template/AGENTS.md +21 -5
- package/template/CONTEXT.md +1 -1
- package/template/docs/agents/README.md +1 -1
- package/template/docs/agents/digital-human-roles.md +1 -1
- package/template/docs/agents/digital-human-roles.yaml +7 -6
- package/template/docs/process/MATT-POCOCK-ENGINEERING-SKILLS.md +1 -0
- package/template/docs/process/harness-process-tailoring.md +1 -0
- package/template/docs/process/implementation-repo-integration.md +10 -0
- package/template/docs/templates/review-report-template.md +36 -1
- package/template/scripts/lib/scenario-checks.mjs +9 -0
- package/template/scripts/lib/skill-registry.mjs +88 -0
- package/template/scripts/verify-digital-human-roles-scenarios +12 -0
- package/template/skills-lock.json +3 -3
- package/template.snapshot.json +4 -4
|
@@ -62,7 +62,7 @@ AND UI 影响切片的前端实现还原计划已通过 schema 校验、`templat
|
|
|
62
62
|
|
|
63
63
|
## Review 与 Git 授权状态
|
|
64
64
|
|
|
65
|
-
进入代码审查时保存 `review_mode`、`review_base_ref`、`implementation_candidate_ref`、`candidate_snapshot_ref`、`candidate_digest` 及 Spec、Ticket、合同、Checklist、YSS Execution Result
|
|
65
|
+
进入代码审查时保存 `review_mode`、`review_base_ref`、`implementation_candidate_ref`、`candidate_snapshot_ref`、`candidate_digest` 及 Spec、Ticket、合同、Checklist、YSS Execution Result 引用,并记录专项检查覆盖与机器检查结果。`worktree` 候选必须一次捕获 committed、staged、unstaged 和 untracked 文件;manifest 的按模式必填字段以及 `yss-worktree-candidate-v1`(raw path、uint64 big-endian 长度、tracked/untracked record、symlink 和不支持条目)以 `orchestration-contract.yaml.review_input` 为唯一执行定义。两个 Reviewer 消费同一不可变快照;返回后或完成 checkpoint 摘要变化则返回 `blocked` 并重新审查。Finding 分流不新增生命周期状态:`violation` 仍在当前合同路径由实现者修复后复审;`drift` / `new_impacts` 把合同标 `stale` 并走既有重路由。该清单只作为审查证据。
|
|
66
66
|
|
|
67
67
|
Git 动作分别保存 `commit_authorized`、`commit_scope`、`commit_authorization_ref`、`push_authorized`、`push_scope`、`push_authorization_ref`。只有授权值严格为 `true`、范围和用户授权引用均非空时才执行相应动作;缺失授权时保持工作区不变并记录 checkpoint 判断。`git-submodule` 另保存每仓授权、`checkout_state` 和先子后父顺序;空 gitlink、detached HEAD 或 `--force` 覆盖挂载点时不得当成普通目录 commit / 脚手架。
|
|
68
68
|
|
package/template/AGENTS.md
CHANGED
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
| 影响面触发与 `not-applicable` | `docs/process/harness-process-tailoring.md` |
|
|
23
23
|
| 模板维护强度触发与最低等级 | `docs/process/maintenance-intensity.yaml` |
|
|
24
24
|
| 技能清单、来源、版本、哈希和投影目标 | `skills-lock.json` |
|
|
25
|
-
| 技能分层、别名、默认可发现性和运行时入口 | `docs/agents/yss-skill-registry.yaml`(当前 `status:
|
|
25
|
+
| 技能分层、别名、默认可发现性和运行时入口 | `docs/agents/yss-skill-registry.yaml`(当前 `status: active`;Router / 生命周期必须消费) |
|
|
26
26
|
| 数字人角色、阶段协作组、运行时绑定与生命周期会签 | `docs/agents/digital-human-roles.yaml`;`docs/agents/digital-human-roles.md` 为操作说明 |
|
|
27
27
|
|
|
28
28
|
README、用户指南、根目录 `CLAUDE.md` 和其他说明文档只引用或解释上述事实,不重复定义同一规则。`CLAUDE.md` 是 Claude Code 入口指针,不是第二套 Agent 规则。
|
|
@@ -47,6 +47,19 @@ README、用户指南、根目录 `CLAUDE.md` 和其他说明文档只引用或
|
|
|
47
47
|
|
|
48
48
|
先用 `docs/process/harness-process-tailoring.md` 判定变更类型、影响面和最近可信阶段,再按 `docs/process/lifecycle-registry.yaml` 执行命中的工作单元和条件门禁。
|
|
49
49
|
|
|
50
|
+
下表是与 `yss-product-lifecycle` 对齐的阶段级导航索引;阶段、工作单元、技能和门禁不是同一层,条件细节以注册表及 lifecycle skill references 为准。
|
|
51
|
+
|
|
52
|
+
| 主阶段(registry) | 原生工作单元 | 技能入口(按影响面裁剪) | 关键产物 / 门禁 |
|
|
53
|
+
|---|---|---|---|
|
|
54
|
+
| 入口分诊 `stage.entry-triage` | `work-unit.entry-triage` | `yss-product-lifecycle` | 仓库身份、影响面、最近可信阶段;`gate.repository-identity-valid` |
|
|
55
|
+
| Discovery `stage.discovery` | `work-unit.discovery-opportunity`、`work-unit.discovery-requirements`、`work-unit.domain-strategy-design`、`work-unit.stage-decision` | `yss-product-lifecycle`;按事实 / 领域影响使用 `competitive-intelligence`、`research`、`grilling`、`domain-modeling`、`yss-stage-decision` | Discovery、用户/MVP/非目标/成功标准、测试 seam;必要时 DDD 战略设计与阶段决策包;`gate.domain-strategy-approved`、`gate.stage-decision-package-approved` |
|
|
56
|
+
| Spec / 功能架构 `stage.spec-architecture` | `work-unit.spec-synthesis` | `yss-product-lifecycle`;`to-spec` 仅为显式兼容入口 | Spec、产品总体设计、功能架构;必要时 Spec Delta;`gate.spec-baseline-approved` |
|
|
57
|
+
| 产品设计 `stage.product-design` | `work-unit.prototype-design` | `yss-design-system` → `prototype-review` → `yss-prototype-stage` → `yss-antd-design` → Codex `product-design:index`;前端落地改用 `yss-ui` | 交互说明、低 / 高保真原型、状态矩阵;`gate.prototype-reviewed`、`gate.prototype-verified`、`gate.user-confirmation` |
|
|
58
|
+
| 系统 / 数据架构与工程契约 `stage.system-data-engineering` | `work-unit.technical-analysis` | `yss-router`;按影响使用 `yss-openapi-governance`、`yss-openapi-draft-review`、`codebase-design`、`implementation-repo-onboarding`、`yss-tactical-design` | OpenAPI Draft / Freeze、数据架构、工程基线、架构审查;无 API 影响记录;必要时 Tactical DDD Check;`gate.openapi-draft-reviewed`、`gate.design-reviewed`、`gate.openapi-frozen`、`gate.engineering-baseline-accepted`、`gate.architecture-reviewed` |
|
|
59
|
+
| Ticket 正式化 `stage.ticket-formalization` | `work-unit.ticket-decomposition` | `yss-product-lifecycle` + `yss-router`;`to-tickets` 仅为显式兼容入口 | 功能父 Ticket、垂直切片、Slice Implementation Contract;切片初始 `ready-for-human`;`gate.slice-contract-approved`、`gate.slice-ready-for-agent` |
|
|
60
|
+
| 垂直切片实现 `stage.vertical-slice-implementation` | `work-unit.slice-implementation` | `yss-router` + `tdd`;UI 影响追加 `yss-ui`、`yss-page-module-development` 及条件专项 skill;`implement` 仅为显式兼容入口 | 前后端代码、TDD、YSS Skill Execution Result;仅允许 `ready-for-agent` 且合同当前 |
|
|
61
|
+
| 验证 / 发布 / 复盘 `stage.verification-release-retrospective` | `work-unit.frontend-implementation-verification`、`work-unit.code-review`、`work-unit.release-and-retrospective` | `code-review`(唯一入口,Standards 消费 YSS / Alibaba 专项检查输入);UI 影响追加 `yss-ui` + `yss-design-system`;发布 / 复盘由 `yss-product-lifecycle` 持有 | 不可变候选快照、独立审查、findings 按合同分流、fresh verification、发布 / 回滚证据、复盘;UI 影响追加 `gate.frontend-implementation-verified`;`gate.release-ready` |
|
|
62
|
+
|
|
50
63
|
- 生命周期注册表中的条件门禁全部按影响面强制。命中触发条件时必须完成;未命中时只记录 `not-applicable` 及原因,不生成空文档;不得把产物、工作单元或证据统称为门禁。
|
|
51
64
|
- 安全 / 权限不设独立生命周期资料或专属门禁。日常功能不做额外登记、`not-applicable` 或推导校验;只有需求或冻结资产明确要求改变认证、授权、租户隔离、敏感数据或合规行为时,才把该行为写入普通 Spec、API、架构、验收和测试 seam,并仅按实际 UI、API、Backend、Data、High-risk 影响触发既有门禁。普通 action 注册、沿用既有认证中间件、未变化的 `401` / `403`、一般字段、SQL / DDL / 迁移和上传 / 下载本身不构成安全 / 权限专项。
|
|
52
65
|
- `seam-deferred` 只能显式记录风险、责任人、后续 Ticket、验证计划和目标版本或发布日期。
|
|
@@ -69,6 +82,7 @@ README、用户指南、根目录 `CLAUDE.md` 和其他说明文档只引用或
|
|
|
69
82
|
- 无可复用工程时,先确认外部目标仓库或输出目录,再使用 `yss-ddd-scaffold-generator` / `yss-frontend-scaffold-generator`;当前仓库缺少 frontend / backend 目录不改变此路由。
|
|
70
83
|
- 脚手架只在 `scaffold_status=required` 且受控生成合同已持久化、获得生命周期批准后运行;它只产生机械骨架,业务行为回到 Router 并使用 `behavior-tdd`。
|
|
71
84
|
- 正式垂直切片必须消费已批准、已持久化且版本当前的 Slice Implementation Contract。Router 只生成草案,不批准合同、不设置 `ready-for-agent`、不宣布完成。合同 schema、Backend 子合同和证据字段以 `yss-router` references 为准。
|
|
85
|
+
- UI 影响切片必须在 `ready-for-agent` 前具备通过校验的 `frontend_implementation_plan`,实现完成后补齐 `frontend_implementation_verification`;截图 / 视觉回归、状态与交互、console warning 和实际 `pnpm` 退出码均须有证据,不能只做 type-check 或声称“已对齐”。
|
|
72
86
|
- 前端测试、type-check 与构建优先使用 `pnpm`;后端校验、测试与编译优先使用项目根 `./mvnw`。不要默认 `npm` / `yarn` 或裸 `mvn`。既有仓库确实没有 pnpm 或 Maven Wrapper 时,必须记录受控例外和实际命令。登记字段见 `docs/process/implementation-repo-integration.md`。
|
|
73
87
|
- 路径越界、证据缺失、未执行验证、`drift`、`violation` 或 `new_impacts` 时停止实现并重新路由。
|
|
74
88
|
|
|
@@ -76,19 +90,21 @@ README、用户指南、根目录 `CLAUDE.md` 和其他说明文档只引用或
|
|
|
76
90
|
|
|
77
91
|
## 8. 专项任务的强制入口
|
|
78
92
|
|
|
93
|
+
本表补充跨阶段的触发型技能;主阶段对应的原生工作单元和条件技能以第 5 节、`yss-product-lifecycle` 及 `orchestration-contract.yaml` 为准。
|
|
94
|
+
|
|
79
95
|
| 触发情形 | 必须使用 |
|
|
80
96
|
|---|---|
|
|
81
97
|
| 技术事实、标准、第三方 API 或框架行为影响决策 | `research` 或等价的一手资料记录 |
|
|
82
98
|
| 竞品、市场或用户口碑事实 | `competitive-intelligence` |
|
|
83
|
-
| UI 设计、原型、组件或主题 | `yss-design-system`
|
|
99
|
+
| UI 设计、原型、组件或主题 | `yss-design-system` → `prototype-review` → `yss-prototype-stage`;原型事实用 `yss-antd-design`,Codex 再路由 `product-design:index`,其他 Agent 交付等价合同资产。前端代码落地改用 `yss-ui`,不要继续调用 `yss-antd-design` |
|
|
84
100
|
| Bug、测试失败或性能回退 | `diagnosing-bugs` 建立可复现反馈,再用 `tdd` |
|
|
85
101
|
| merge / rebase 冲突 | `resolving-merge-conflicts` |
|
|
86
|
-
| 架构治理、难测模块或深模块设计 | `improve-codebase-architecture`
|
|
102
|
+
| 架构治理、难测模块或深模块设计 | `codebase-design`;`improve-codebase-architecture` 仅作为用户显式兼容入口 |
|
|
87
103
|
| 跨线程、跨仓库、上下文过长或原型结论回流 | `handoff` 或等价交接记录 |
|
|
88
104
|
| 数字人角色、Agent 运行时协同或生命周期会签 | 先读 `docs/agents/digital-human-roles.yaml`。职称实例叠加在编排器上,不另起生命周期,不批准 Slice 合同、不设 `ready-for-agent`、不宣布可发布 |
|
|
89
105
|
| 本地知识库 init / refresh / rebuild,或要把研究结果落成持久 wiki | `llm-wiki`(落成持久 wiki 用 `ingest`;已映射 live 源变了用 `refresh`)。`template-source` 的 wiki-root 为 `.template-source/wiki`;`project-instance` 不附带源仓库编译树,需要时在仓库根 `wiki/` 执行 `init` |
|
|
90
106
|
|
|
91
|
-
业务行为默认按 `tdd`
|
|
107
|
+
业务行为默认按 `tdd` 的 `behavior-tdd` 模式使用已确认的公开 seam 逐切片实现。一次性生成、纯配置或流程文档不适用代码 TDD 时,必须记录例外理由和可执行验证方式。
|
|
92
108
|
|
|
93
109
|
## 9. 工作区与实现仓库边界
|
|
94
110
|
|
|
@@ -98,7 +114,7 @@ README、用户指南、根目录 `CLAUDE.md` 和其他说明文档只引用或
|
|
|
98
114
|
|
|
99
115
|
## 10. 独立审查、验证和追踪
|
|
100
116
|
|
|
101
|
-
- 实现者不能承担命中的独立审查(含数字人)。模板维护按 L1 / L2 / L3 分别使用 self-check / 人工 checkpoint、聚焦独立审查、正式独立审查;模板发布、代码切片和高风险变更仍必须由其他 Agent
|
|
117
|
+
- 实现者不能承担命中的独立审查(含数字人)。模板维护按 L1 / L2 / L3 分别使用 self-check / 人工 checkpoint、聚焦独立审查、正式独立审查;模板发布、代码切片和高风险变更仍必须由其他 Agent 或独立审查者完成。产品切片与模板维护共用同一 finding 闭环:`violation` 由实现者在原合同路径修复后重新捕获并全轴复审;`drift` / `new_impacts` 使合同 `stale` 并回 Router。审查者不得写实现。命中后的 mandatory 不得豁免;未命中才 `not-applicable`。
|
|
102
118
|
- 任何“完成 / 可合并 / 可发布”结论必须基于 fresh verification,不接受“之前跑过”或实现者自述。
|
|
103
119
|
- 会签门禁按 `docs/agents/digital-human-roles.yaml` 的 `gate_policy` 关闭,会签文件经 `scripts/verify-approval-record` 核验;`gate.release-ready`、对外商务承诺和运行时外部副作用仍须生物人。
|
|
104
120
|
- 在会签暂停、handoff、进入实现、合并或发布边界集中同步范围、验证证据、风险、会签点、Ticket 状态和下一步;阻塞、责任人变化或资产单独批准时立即同步。
|
package/template/CONTEXT.md
CHANGED
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
| 试验技能 | 尚未达到项目默认支持成熟度的技能。 | — | 只在明确试验范围内使用,不进入 Router 默认技能闭包。 |
|
|
76
76
|
| 显式兼容入口 | 为已有用户操作习惯保留的 user-invoked 工作流入口,写入前由生命周期编排器预检,结果回交其验收。 | — | 不是默认路径、过时别名或可以越过门禁的第二套生命周期。 |
|
|
77
77
|
| 技能成熟度 | 描述技能从 `draft`、`verified`、`supported` 到 `deprecated` 的治理状态。 | — | 不等同于文件存在、已被投影或能够安装。 |
|
|
78
|
-
| 技能注册表 | 记录技能身份、别名、分层、适用影响面、成熟度、默认可发现性和 Agent 运行时入口的机器可读路由资产。 | — | 不替代 `skills-lock.json` 的来源、hash 和投影完整性职责。当前 `docs/agents/yss-skill-registry.yaml` 为 `
|
|
78
|
+
| 技能注册表 | 记录技能身份、别名、分层、适用影响面、成熟度、默认可发现性和 Agent 运行时入口的机器可读路由资产。 | — | 不替代 `skills-lock.json` 的来源、hash 和投影完整性职责。当前 `docs/agents/yss-skill-registry.yaml` 为 `active`,Router、生命周期编排器和实例发现面必须消费通过校验的 canonical 技能及其 alias 解析结果。 |
|
|
79
79
|
| LLM Wiki | 由 `raw/`、`wiki/` 与 `.wiki-manifest.json` 组成的本地持久知识库。 | — | 不是 `research` 一次性笔记,也不替代权威源。`ingest` 只把用户点名的外源或已落盘研究笔记编进 IR,不改 live 权威文件。 |
|
|
80
80
|
| 生态发布清单 | 关联模板 schema 与 commit、CLI 版本与快照、公开技能来源与导出 hash 的跨仓发布证据。 | — | 不要求尚未生成的仓库 commit 互相循环引用。 |
|
|
81
81
|
| 研发管理仓库 | 承载 Spec、OpenAPI、架构、Ticket、验证、发布和复盘等研发管理资产的仓库。 | — | 不等同于前端 / 后端代码 monorepo。 |
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
| `triage-labels.md` | 标准五态 triage 标签与含义 |
|
|
20
20
|
| `domain.md` | 领域文档读取和维护规则 |
|
|
21
21
|
| `skills-maintenance.md` | Engineering Skills 的安装、升级和验证说明 |
|
|
22
|
-
| `yss-skill-registry.yaml` | 技能分层、别名与运行时入口(
|
|
22
|
+
| `yss-skill-registry.yaml` | 技能分层、别名与运行时入口(active;不替代锁文件) |
|
|
23
23
|
| `gitlab-workflow-skills.md` | GitLab、MR、CI 和自动 gitworks 的技能配置与使用规则 |
|
|
24
24
|
|
|
25
25
|
当 `AGENTS.md` 或某个 skill 提到本目录时,应优先把这里当作项目协作规则读取;真正的 skill 执行入口是各平台投影根,Cursor 为 `.cursor/skills`。
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
| 执行态 | Explorer / Drafter / Worker / Reviewer / Verifier | 数字人角色 |
|
|
17
17
|
| 运行时绑定 | 如何在 Cursor / Claude / Grok 等落地 | 角色职责本身 |
|
|
18
18
|
|
|
19
|
-
一次数字人任务包同时写明 `task_id`、`work_unit_id`、`actor_id`、数字人角色、执行态、当前 `runtime_id`,以及从角色表复制的 `core_skills` / `forbidden_skills`。可用 `taskPackageDefaults(roleId)`(`scripts/lib/digital-human-roles.mjs
|
|
19
|
+
一次数字人任务包同时写明 `task_id`、`work_unit_id`、`actor_id`、数字人角色、执行态、当前 `runtime_id`,以及从角色表复制的 `core_skills` / `forbidden_skills`。可用 `taskPackageDefaults(roleId)`(`scripts/lib/digital-human-roles.mjs`)读取,禁止手写第二套技能包。`role.test-engineer` 的 core_skills 含 YSS / Alibaba 专项 skill,仅作为 `code-review` Standards 只读输入,不得写实现;finding 交实现者修复或回 Router,审查者不得当场改代码。任务包 canonical Schema 为 `docs/process/schemas/digital-human-task-package.schema.json`,按 `contract.kind` 选择生命周期、切片实现或模板维护合同。
|
|
20
20
|
|
|
21
21
|
## 会签人
|
|
22
22
|
|
|
@@ -157,7 +157,7 @@ roles:
|
|
|
157
157
|
title: YSS 后端工程师
|
|
158
158
|
stages: [stage.system-data-engineering, stage.ticket-formalization, stage.vertical-slice-implementation, stage.verification-release-retrospective]
|
|
159
159
|
draft_artifact_ids: [artifact.openapi-draft, artifact.data-architecture]
|
|
160
|
-
core_skills: [yss-router, yss-tactical-design, yss-domain, yss-application, yss-repository, yss-mybatis, yss-web-controller, yss-dto, yss-exception, yss-validation, tdd, yss-ddd-scaffold-generator]
|
|
160
|
+
core_skills: [yss-router, yss-tactical-design, yss-domain, yss-application, yss-repository, yss-mybatis, yss-web-controller, yss-dto, mapstruct, lombok, alibaba-java-code-style, yss-exception, yss-validation, tdd, yss-ddd-scaffold-generator]
|
|
161
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
162
|
description: >-
|
|
163
163
|
Own OpenAPI Draft, data-architecture contributions, and backend tests.
|
|
@@ -172,14 +172,15 @@ roles:
|
|
|
172
172
|
stages: [stage.spec-architecture, stage.vertical-slice-implementation, stage.verification-release-retrospective]
|
|
173
173
|
draft_artifact_ids: [artifact.frontend-implementation-verification]
|
|
174
174
|
owned_evidence_ids: [evidence.fresh-verification, evidence.frontend-implementation-verification]
|
|
175
|
-
core_skills: [tdd, diagnosing-bugs, code-review]
|
|
175
|
+
core_skills: [tdd, diagnosing-bugs, code-review, alibaba-java-code-style, yss-ui, yss-design-system, yss-page-module-development, yss-domain, yss-application, yss-repository, yss-web-controller, yss-dto, mapstruct, lombok]
|
|
176
176
|
forbidden_skills: [yss-ddd-scaffold-generator, yss-frontend-scaffold-generator, implement, to-spec]
|
|
177
177
|
description: >-
|
|
178
178
|
Own test code, defect records, fresh verification, and frontend
|
|
179
|
-
implementation verification evidence. Review every implementation slice
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
179
|
+
implementation verification evidence. Review every implementation slice
|
|
180
|
+
through the unique code-review skill, loading YSS and Alibaba specialist
|
|
181
|
+
skills as read-only Standards sources. Recommend release readiness; do
|
|
182
|
+
not close gate.release-ready. Do not change product scope or write
|
|
183
|
+
feature implementation. Must be a different instance from the implementer.
|
|
183
184
|
|
|
184
185
|
stage_groups:
|
|
185
186
|
- id: group.discovery
|
|
@@ -5,5 +5,6 @@ Matt Pocock Engineering Skills 提供轻量的澄清、实现、TDD、诊断和
|
|
|
5
5
|
## 进入与退出
|
|
6
6
|
|
|
7
7
|
- Matt user-invoked 的 `grill-with-docs`、`to-spec`、`to-tickets` 和 `implement` 必须由用户显式启动,任何 skill 不得自动调用它们;YSS 生命周期只准备、校验和验收其结果。所有 Matt model-invoked skill 仍须遵守 `AGENTS.md` 的阶段、门禁和证据要求,并只能在生命周期允许的工作单元中调用。
|
|
8
|
+
- `code-review` 保持唯一默认审查入口。YSS 适配把 Slice `required_skills`、`alibaba-java-code-style` 与命中的 `yss-ui` / `yss-domain` 等专项 skill 编译为 Standards 检查输入,并要求实现仓已有的 `pnpm` / `./mvnw` 机器检查;禁止再增加第二个通用审查 skill 或专用审查 Cloud 环境来代替这条接线。审查 finding 按编排合同分流:实现者修复后全轴复审,或合同 `stale` 后回 Router;审查者不得写实现。
|
|
8
9
|
- `template-source` 只执行模板维护流程,不生成具体产品 Spec、原型、OpenAPI 或垂直切片 Ticket。
|
|
9
10
|
- Agent 完成工作单元后返回可核验的 evidence refs、变更资产、验证命令、残余风险和下一路由。
|
|
@@ -44,6 +44,7 @@
|
|
|
44
44
|
3. 发布、合并或阶段完成时按整体候选重新判定;不得把共同改变整体语义的修改拆成多个 L1/L2 规避 L3。
|
|
45
45
|
4. RED 用于证明行为差异。L1 不人为构造失败;L2 可使用已有失败、最小 fixture 或现有测试修改前失败;只有行为无法确定性表达时才运行聚焦压力场景。L3 使用 `maintaining-skills` 并执行本节定义的完整 RED、GREEN、REFACTOR 和压力场景要求。
|
|
46
46
|
5. 模板发布候选固定按 L3 聚合验证,但不追溯补造每个既有 L1/L2 修改的独立 RED。
|
|
47
|
+
6. 模板维护与产品切片使用同一 finding 闭环:`violation` / 机器检查失败 / 适用行空白由实施者修复后重新验证并按本表强度复审;`drift` / `new_impacts` 升级影响面并重新分级,禁止在旧合同或旧 checkpoint 上继续编码。审查者不得写实现。未命中的条件项才 `not-applicable`;命中后不得豁免。
|
|
47
48
|
|
|
48
49
|
每个模板维护 checkpoint 使用以下轻量合同;L1/L2 可直接写入主 Ticket 或集中 checkpoint,不要求新增独立文档:
|
|
49
50
|
|
|
@@ -32,6 +32,16 @@ apps/
|
|
|
32
32
|
- Ticket、Slice Implementation Contract、CI 和 Review 证据必须写下实际执行的上述命令。既有仓库缺少 `pnpm` 或 Maven Wrapper 时,先记录受控例外、替代命令和责任人,再执行。
|
|
33
33
|
- 本模板源仓库没有产品 frontend / backend 运行时;模板源维护侧的 Node 校验命令和环境约束只记录在 `.template-source/` 治理区及 CI 配置中,不属于项目实例实现命令。
|
|
34
34
|
|
|
35
|
+
## 1.4 独立审查运行时
|
|
36
|
+
|
|
37
|
+
`work-unit.code-review` 仍使用唯一 skill `code-review`,不新增第二套审查环境或审查 skill。独立 Reviewer 必须与实现者不同 `actor_id`,并在**能执行已登记验证命令**的运行时中工作:
|
|
38
|
+
|
|
39
|
+
- 前端:已登记项目根的 `pnpm` 测试 / type-check / lint(若存在)。
|
|
40
|
+
- 后端:已登记项目根的 `./mvnw` 校验 / 测试;若工程已配置 Checkstyle、P3C 或 Spotless,审查时实际执行。
|
|
41
|
+
- `git-submodule` 必须递归检出;空 gitlink 不得当作「没有工程」。
|
|
42
|
+
- 模板源 `.cursor/environment.json` 只安装模板校验依赖(`jsonschema`、模板 `pnpm`),**不是**实现仓审查运行时。`project-instance` 与实现仓库的 Cloud / CI 环境自行包含 JDK、Maven Wrapper 和 `pnpm`。
|
|
43
|
+
- 审查任务包只写证据路径;专项 skill 只读,不得写实现。审查 finding 按 `review_standards_route.finding_disposition` 分流:`violation` 交实现者修复后全轴复审;`drift` / `new_impacts` 回 Router,不在审查会话中改代码。
|
|
44
|
+
|
|
35
45
|
## 1.3 `repository_scope: git-submodule`
|
|
36
46
|
|
|
37
47
|
当用户明确选择分层接入、且前端 / 后端保持独立 Git 历史、同时挂到 `project-instance` 工作树时,使用 Git submodule,而不是把实现源码复制进 Harness,也不是把 gitlink 登记成 `harness-apps`。
|
|
@@ -63,7 +63,7 @@ Approved / Changes requested / Blocked
|
|
|
63
63
|
| `yss-web-controller` / `yss-dto` 已按影响面落实,CMD / Query / VO / Result 按既有 DTO 体系定义或复用,Controller 不用内部类或非约定包临时承载主要 DTO / VO、不手工分页主要业务集合、不穿透 Repository | pass / violation / not-applicable | |
|
|
64
64
|
| `mapstruct` 已按影响面落实,PO / Domain Model / DTO / VO / CMD / Query 转换使用 MapStruct Convertor / Mapper,未使用 `BeanUtils.copyProperties`、反射拷贝或重复手写字段赋值;例外已记录测试和补齐落点 | pass / violation / not-applicable | |
|
|
65
65
|
| `lombok` 已按影响面落实,POJO 样板代码使用 Lombok,未成片手写 getter/setter、constructor、builder、logger;实体 / POJO 未触发 `@Data` 等反模式或已说明例外 | pass / violation / not-applicable | |
|
|
66
|
-
| `alibaba-java-code-style` 已纳入审查,命名、异常、日志、ORM/MyBatis、Maven、MapStruct / Lombok 注解处理器配置无 blocker | pass / violation / not-applicable | |
|
|
66
|
+
| `alibaba-java-code-style` 已纳入审查,命名、异常、日志、ORM/MyBatis、Maven、MapStruct / Lombok 注解处理器配置无 blocker;可机器检查规则有工具结果或原文引用 | pass / violation / not-applicable | |
|
|
67
67
|
| 后端构建 / 测试 / OpenAPI / CI / Release 命令使用项目根目录 `./mvnw ...`;裸 `mvn ...` 已改正或有受控例外记录 | pass / violation / not-applicable | |
|
|
68
68
|
| 持久化文档正文、章节标题、审查结论和实施说明使用中文;英文模板内容未原样落地 | pass / violation / not-applicable | |
|
|
69
69
|
| 新增或修改的业务类型 / 字段 / OpenAPI property 能追溯到 `CONTEXT.md` 业务术语的 `英文标识` 词干;未登记的新名字已回写词汇表 | pass / violation / not-applicable | |
|
|
@@ -81,6 +81,36 @@ rg -n "class (SingleResult|MultiResult|PageResult|Result)<|public static class .
|
|
|
81
81
|
|---|---|---|
|
|
82
82
|
| | | expected / seam-deferred / violation |
|
|
83
83
|
|
|
84
|
+
## YSS 前端门禁审查
|
|
85
|
+
|
|
86
|
+
> UI 影响切片必填;无 UI 影响写 `not-applicable`。`UI fidelity` 轴只核原型与状态矩阵,不能代替本表。任何 `violation` 都阻断完成 / 可合并结论。
|
|
87
|
+
|
|
88
|
+
| 检查项 | 结论 | 证据 |
|
|
89
|
+
|---|---|---|
|
|
90
|
+
| `yss-ui` 组件路由已落实:YSS `required` 封装(如 `YTable` / `YTree` / `YssFormily`)未被 AntDV 裸组件或其他重型方案绕过;受控回退有能力缺口记录 | pass / violation / not-applicable | |
|
|
91
|
+
| `yss-page-module-development` 页面骨架已落实:`index.vue` 只编排,请求与分页不堆在页面根组件 | pass / violation / not-applicable | |
|
|
92
|
+
| 切片合同 `required_skills` 中的 Formily / 表格 / 树 / 高度 / 主题 / API 专项 skill 已按影响面引用规则;未命中项有 `not-applicable` 原因 | pass / violation / not-applicable | |
|
|
93
|
+
| 前端验证使用项目根 `pnpm ...`;实际退出码已记录。只做 type-check 或声称“已对齐”不算通过 | pass / violation / not-applicable | |
|
|
94
|
+
| 机器检查(`pnpm lint` / `pnpm type-check` 等已存在脚本)已执行,或缺失工具已写 `not-applicable` 及原因 | pass / violation / not-applicable | |
|
|
95
|
+
|
|
96
|
+
### 前端 smoke check
|
|
97
|
+
|
|
98
|
+
```bash
|
|
99
|
+
rg -n "from 'ant-design-vue'|<(Table|Tree|Form)[ >]|YFormily|YssFormily|YTable|YTree" apps/frontend
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
命中说明:直接使用 AntDV `Table` / `Tree` / `Form` 不等于自动失败,但必须说明为何未走 YSS 封装。
|
|
103
|
+
|
|
104
|
+
| 命中 | 解释 | 结论 |
|
|
105
|
+
|---|---|---|
|
|
106
|
+
| | | expected / seam-deferred / violation |
|
|
107
|
+
|
|
108
|
+
## 机器检查
|
|
109
|
+
|
|
110
|
+
| 命令 | 退出码 | 时间 | 证据 | 结论 |
|
|
111
|
+
|---|---|---|---|---|
|
|
112
|
+
| | | | | pass / violation / not-applicable |
|
|
113
|
+
|
|
84
114
|
## 压力场景验证
|
|
85
115
|
|
|
86
116
|
| 压力场景 | 预期 | 本次结论 |
|
|
@@ -97,5 +127,10 @@ rg -n "class (SingleResult|MultiResult|PageResult|Result)<|public static class .
|
|
|
97
127
|
| Agent 使用 `seam-deferred` 却缺少风险、责任人、后续 Ticket、验证计划或目标版本 / 发布日期 | 应标记为 `violation` 并阻断 | |
|
|
98
128
|
| Agent 返回非空 `new_impacts` 后继续编码或补写旧合同 | 应暂停相关工作单元,将合同标记 `stale`,回到 Router 或更早生命周期阶段 | |
|
|
99
129
|
| Agent 只列验证命令但没有实际结果和执行时间 | 不构成 fresh verification,不得给出 Approved / 可合并结论 | |
|
|
130
|
+
| Agent 用第二个通用审查 skill 代替 `code-review`,或 Standards 未读取合同 `required_skills` / Alibaba / `yss-ui` | 应标记为 `violation` 并阻断完成 | |
|
|
131
|
+
| Agent 把 YSS 页面模块约定并进 UI fidelity,或适用报告行留空 | 应回到 Standards 专项检查,空白行视为 `missing_evidence` | |
|
|
132
|
+
| Agent 在审查会话中直接改实现代码以“关掉” finding | 应标记为 `violation`;finding 交实现者在原合同路径修复,再重新捕获候选并全轴复审 | |
|
|
133
|
+
| Agent 把 `violation` 记为 `not-applicable`,或为日常 Alibaba / YSS 另开生物人豁免门禁 | 应阻断;命中后只允许修复或完整 `seam-deferred`,未命中才 `not-applicable` | |
|
|
134
|
+
| Agent 发现 `drift` / `new_impacts` / `required_skills` 与真实影响不一致后仍在旧合同上编码 | 应将合同标 `stale`,回 Router 或更早生命周期阶段 | |
|
|
100
135
|
|
|
101
136
|
## 签字确认
|
|
@@ -67,6 +67,15 @@ function validateInvocationBoundary(data) {
|
|
|
67
67
|
ensure(Array.isArray(frontendRoute?.conditional_skills?.[impact]) && frontendRoute.conditional_skills[impact].length > 0 && typeof frontendRoute.not_applicable_reasons?.[impact] === "string", `前端条件专项路由缺少 ${impact}`);
|
|
68
68
|
}
|
|
69
69
|
ensure(routes?.["work-unit.frontend-implementation-verification"]?.skills?.includes("code-review") && routes?.["work-unit.frontend-implementation-verification"]?.applies_when === "ui_impact", "前端还原验证未绑定 UI fidelity 审查轴");
|
|
70
|
+
const reviewRoute = routes?.["work-unit.code-review"];
|
|
71
|
+
ensure(reviewRoute?.primary_skill === "code-review" && reviewRoute?.review_standards_route?.unique_default_skill === "code-review" && reviewRoute?.review_standards_route?.second_generic_review_skill === "forbidden", "code-review 不是唯一默认审查入口或允许第二套通用审查 skill");
|
|
72
|
+
ensure(includesAll(reviewRoute?.supporting_skills, ["alibaba-java-code-style", "yss-ui", "yss-domain"]) && includesAll(reviewRoute?.skills, ["code-review", "alibaba-java-code-style", "yss-ui"]), "审查工作单元缺少 YSS / Alibaba 专项检查输入");
|
|
73
|
+
const disposition = reviewRoute?.review_standards_route?.finding_disposition;
|
|
74
|
+
ensure(includesAll(disposition?.same_loop_for, ["product-slice", "template-maintenance"]) && disposition?.reviewer_write_implementation === "forbidden", "审查 finding 闭环未同时覆盖产品切片与模板维护,或允许审查者写实现");
|
|
75
|
+
ensure(includesAll(disposition?.repair_then_full_rereview?.kinds, ["violation", "machine_check_failure", "blank_applicable_row", "missing_evidence"]) && disposition?.repair_then_full_rereview?.actor === "implementer" && disposition?.repair_then_full_rereview?.then === "recapture_candidate_and_rerun_all_axes", "violation 类 finding 未要求实现者修复后全轴复审");
|
|
76
|
+
ensure(includesAll(disposition?.stale_and_reroute?.kinds, ["drift", "new_impacts", "required_skills_mismatch"]) && disposition?.stale_and_reroute?.continue_coding_on_old_contract === "forbidden" && disposition?.stale_and_reroute?.next === "router-or-earlier-lifecycle", "drift / new_impacts 未要求合同 stale 并回 Router");
|
|
77
|
+
ensure(disposition?.exemption_policy?.not_applicable === "impact_not_triggered_only" && disposition?.exemption_policy?.mandatory_waiver === "forbidden" && includesAll(disposition?.exemption_policy?.allowed_exits, ["repair", "seam-deferred-complete"]) && disposition?.exemption_policy?.new_human_waiver_gate === "forbidden", "审查豁免策略允许未命中以外的 not-applicable 或 mandatory 豁免");
|
|
78
|
+
ensure(data.review_input?.unique_default_skill === "code-review" && data.review_input?.second_generic_review_skill === "forbidden" && data.review_input?.completed_requires_specialist_coverage === true && data.review_input?.finding_disposition_required === true && data.review_input?.completed_requires_no_open_mandatory_violations === true && data.review_input?.completed_requires_no_blank_applicable_rows === true && data.review_input?.reviewer_write_implementation === "forbidden" && includesAll(data.review_input?.standards_sources, ["slice_contract_required_skills", "specialist_check_inputs", "review_report_template"]), "review_input 未强制专项检查覆盖或 finding 闭环完成条件");
|
|
70
79
|
for (const id of ["work-unit.spec-synthesis", "work-unit.ticket-decomposition", "work-unit.slice-implementation"]) {
|
|
71
80
|
ensure(routes?.[id]?.native?.source === "yss-product-lifecycle" && routes[id].compatibility?.source === "mattpocock/skills" && routes[id].compatibility.formal_artifact_owner === "explicit-user-entry", `${id} 未分离原生执行定义与 Matt 兼容输入`);
|
|
72
81
|
}
|
|
@@ -47,6 +47,92 @@ function requireString(value, field) {
|
|
|
47
47
|
if (typeof value !== "string" || !value.trim()) fail(`${field} 不能为空`);
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
+
function requireObject(value, field) {
|
|
51
|
+
if (!value || typeof value !== "object" || Array.isArray(value)) fail(`${field} 必须是对象`);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
function requireStringSet(value, expected, field) {
|
|
55
|
+
if (!Array.isArray(value)) fail(`${field} 必须是数组`);
|
|
56
|
+
const missing = expected.filter((item) => !value.includes(item));
|
|
57
|
+
const extra = value.filter((item) => !expected.includes(item));
|
|
58
|
+
if (missing.length || extra.length) fail(`${field} 必须恰好为 ${expected.join(", ")}`);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
function validateFindingDisposition(disposition) {
|
|
62
|
+
requireObject(disposition, "review_standards_route.finding_disposition");
|
|
63
|
+
requireStringSet(disposition.same_loop_for, ["product-slice", "template-maintenance"], "finding_disposition.same_loop_for");
|
|
64
|
+
requireObject(disposition.intensity, "finding_disposition.intensity");
|
|
65
|
+
if (disposition.intensity["product-slice"] !== "slice-contract") fail("产品切片审查强度必须绑定 slice-contract");
|
|
66
|
+
if (disposition.intensity["template-maintenance"] !== "L1-L2-L3") fail("模板维护审查强度必须绑定 L1-L2-L3");
|
|
67
|
+
if (disposition.reviewer_write_implementation !== "forbidden") fail("审查者不得写实现");
|
|
68
|
+
const repair = disposition.repair_then_full_rereview;
|
|
69
|
+
requireObject(repair, "finding_disposition.repair_then_full_rereview");
|
|
70
|
+
requireStringSet(repair.kinds, ["violation", "machine_check_failure", "blank_applicable_row", "missing_evidence"], "finding_disposition.repair_then_full_rereview.kinds");
|
|
71
|
+
if (repair.actor !== "implementer") fail("violation 类 finding 必须由实现者修复");
|
|
72
|
+
if (repair.on_original_contract !== true) fail("violation 类 finding 必须在原合同允许路径内修复");
|
|
73
|
+
if (repair.then !== "recapture_candidate_and_rerun_all_axes") fail("修复后必须重新捕获候选并全轴复审");
|
|
74
|
+
const stale = disposition.stale_and_reroute;
|
|
75
|
+
requireObject(stale, "finding_disposition.stale_and_reroute");
|
|
76
|
+
requireStringSet(stale.kinds, ["drift", "new_impacts", "required_skills_mismatch"], "finding_disposition.stale_and_reroute.kinds");
|
|
77
|
+
if (stale.mark_contract !== "stale") fail("drift / new_impacts 必须将合同标为 stale");
|
|
78
|
+
if (stale.continue_coding_on_old_contract !== "forbidden") fail("合同 stale 后禁止在旧合同上继续编码");
|
|
79
|
+
if (stale.next !== "router-or-earlier-lifecycle") fail("合同 stale 后必须回 Router 或更早生命周期阶段");
|
|
80
|
+
const exemption = disposition.exemption_policy;
|
|
81
|
+
requireObject(exemption, "finding_disposition.exemption_policy");
|
|
82
|
+
if (exemption.not_applicable !== "impact_not_triggered_only") fail("not-applicable 仅允许影响面未命中");
|
|
83
|
+
if (exemption.mandatory_waiver !== "forbidden") fail("命中后的 mandatory 门禁不得豁免");
|
|
84
|
+
requireStringSet(exemption.allowed_exits, ["repair", "seam-deferred-complete"], "finding_disposition.exemption_policy.allowed_exits");
|
|
85
|
+
if (exemption.new_human_waiver_gate !== "forbidden") fail("禁止为日常 Alibaba/YSS 新增生物人豁免门禁");
|
|
86
|
+
if (exemption.existing_human_gates_unchanged !== true) fail("既有 TODO-HUMAN-REVIEW / 生物人门禁不得被审查闭环改写");
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
function validateReviewInputFinding(reviewInput) {
|
|
90
|
+
if (reviewInput.finding_disposition_required !== true) fail("review_input.finding_disposition_required 必须为 true");
|
|
91
|
+
if (reviewInput.completed_requires_no_open_mandatory_violations !== true) fail("未关闭的 mandatory violation 不得 completed");
|
|
92
|
+
if (reviewInput.completed_requires_no_blank_applicable_rows !== true) fail("适用报告行空白不得 completed");
|
|
93
|
+
if (reviewInput.reviewer_write_implementation !== "forbidden") fail("review_input 禁止审查者写实现");
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
function validateCodeReviewRoute(route, resolve) {
|
|
97
|
+
if (route.primary_skill !== "code-review") fail("work-unit.code-review 的 primary_skill 必须是唯一默认审查技能 code-review");
|
|
98
|
+
const standards = route.review_standards_route;
|
|
99
|
+
if (!standards || typeof standards !== "object" || Array.isArray(standards)) {
|
|
100
|
+
fail("work-unit.code-review 缺少 review_standards_route");
|
|
101
|
+
}
|
|
102
|
+
if (standards.unique_default_skill !== "code-review") fail("review_standards_route.unique_default_skill 必须为 code-review");
|
|
103
|
+
if (standards.second_generic_review_skill !== "forbidden") fail("禁止叠加第二个通用审查 skill");
|
|
104
|
+
if (standards.write_implementation !== "forbidden") fail("审查专项 skill 不得用于写实现");
|
|
105
|
+
if (standards.contract_required_skills !== "required") fail("Standards 必须消费 Slice 合同 required_skills");
|
|
106
|
+
requireString(standards.report_template, "review_standards_route.report_template");
|
|
107
|
+
if (!existsSync(path.join(ROOT, standards.report_template))) fail(`审查报告模板不存在: ${standards.report_template}`);
|
|
108
|
+
const conditional = standards.conditional_skills;
|
|
109
|
+
if (!conditional || typeof conditional !== "object" || Array.isArray(conditional)) {
|
|
110
|
+
fail("review_standards_route.conditional_skills 必须是对象");
|
|
111
|
+
}
|
|
112
|
+
const union = [];
|
|
113
|
+
for (const [impact, names] of Object.entries(conditional)) {
|
|
114
|
+
if (!Array.isArray(names) || names.length === 0) fail(`review_standards_route.conditional_skills.${impact} 必须是非空数组`);
|
|
115
|
+
for (const name of names) {
|
|
116
|
+
if (!resolve(name)) fail(`审查专项检查输入引用了未登记技能: ${impact} -> ${name}`);
|
|
117
|
+
if (!union.includes(name)) union.push(name);
|
|
118
|
+
}
|
|
119
|
+
if (typeof standards.not_applicable_reasons?.[impact] !== "string") {
|
|
120
|
+
fail(`review_standards_route.not_applicable_reasons.${impact} 必须是字符串`);
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
for (const name of union) {
|
|
124
|
+
if (!route.supporting_skills.includes(name)) fail(`work-unit.code-review.supporting_skills 缺少专项检查输入 ${name}`);
|
|
125
|
+
if (!route.skills.includes(name)) fail(`work-unit.code-review.skills 缺少专项检查输入 ${name}`);
|
|
126
|
+
}
|
|
127
|
+
if (!route.skills.includes("code-review")) fail("work-unit.code-review.skills 必须包含 code-review");
|
|
128
|
+
const machine = standards.machine_checks;
|
|
129
|
+
if (!machine || typeof machine !== "object" || Array.isArray(machine)) fail("review_standards_route.machine_checks 必须是对象");
|
|
130
|
+
if (machine.run_if_present !== true) fail("review_standards_route.machine_checks.run_if_present 必须为 true");
|
|
131
|
+
if (machine.missing_tooling !== "not-applicable-with-reason") fail("缺少机器检查工具时必须记录 not-applicable 及原因");
|
|
132
|
+
if (machine.checkable_rule_without_machine !== "not-a-pass") fail("可机器检查规则在未跑工具时不得记为 pass");
|
|
133
|
+
validateFindingDisposition(standards.finding_disposition);
|
|
134
|
+
}
|
|
135
|
+
|
|
50
136
|
export function validateSkillRegistry(registry, { lock, routerContract, lifecycleContract, skillSource } = {}) {
|
|
51
137
|
if (!registry || typeof registry !== "object" || Array.isArray(registry)) fail("技能路由注册表必须是对象");
|
|
52
138
|
if (registry.schema_version !== 1) fail("schema_version 必须为 1");
|
|
@@ -256,7 +342,9 @@ export function validateSkillRegistry(registry, { lock, routerContract, lifecycl
|
|
|
256
342
|
}
|
|
257
343
|
if (route.primary_skill === "prototype-review") fail("prototype-review 必须作为独立 supporting skill,不得成为生命周期主技能");
|
|
258
344
|
}
|
|
345
|
+
if (routeId === "work-unit.code-review") validateCodeReviewRoute(route, resolve);
|
|
259
346
|
}
|
|
347
|
+
if (lifecycle.review_input) validateReviewInputFinding(lifecycle.review_input);
|
|
260
348
|
}
|
|
261
349
|
|
|
262
350
|
return { skill_count: skills.length, platform_count: platform.length, status: registry.status };
|
|
@@ -38,6 +38,18 @@ function mustFail(doc, pattern, label) {
|
|
|
38
38
|
|
|
39
39
|
validateDefaultDigitalHumanRoles();
|
|
40
40
|
|
|
41
|
+
const tester = loadDigitalHumanRoles().roles.find((role) => role.id === "role.test-engineer");
|
|
42
|
+
for (const skill of ["code-review", "alibaba-java-code-style", "yss-ui", "yss-page-module-development", "yss-domain", "yss-application", "yss-web-controller", "yss-dto", "mapstruct", "lombok"]) {
|
|
43
|
+
if (!tester.core_skills.includes(skill)) throw new TypeError(`role.test-engineer 缺少只读专项检查 skill: ${skill}`);
|
|
44
|
+
}
|
|
45
|
+
if (tester.forbidden_skills.includes("yss-ui") || tester.forbidden_skills.includes("alibaba-java-code-style")) {
|
|
46
|
+
throw new TypeError("测试工程师不得禁止审查所需的 YSS / Alibaba skill");
|
|
47
|
+
}
|
|
48
|
+
const backend = loadDigitalHumanRoles().roles.find((role) => role.id === "role.backend-engineer");
|
|
49
|
+
if (!backend.core_skills.includes("alibaba-java-code-style") || !backend.core_skills.includes("mapstruct") || !backend.core_skills.includes("lombok")) {
|
|
50
|
+
throw new TypeError("role.backend-engineer 缺少 Alibaba / MapStruct / Lombok");
|
|
51
|
+
}
|
|
52
|
+
|
|
41
53
|
const seven = [
|
|
42
54
|
"role.lifecycle-orchestrator",
|
|
43
55
|
"role.requirements-manager",
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"source": "mattpocock/skills",
|
|
58
58
|
"sourceType": "github",
|
|
59
59
|
"skillPath": "skills/engineering/code-review/SKILL.md",
|
|
60
|
-
"effectiveHash": "
|
|
60
|
+
"effectiveHash": "9c0385f372ebc6a0741e35f0c654f5739e3d4aac29083d80e5af56305ce4200c",
|
|
61
61
|
"sourceRevision": "0ab1b63a410a03d3627979a109c8695de27af954",
|
|
62
62
|
"upstreamHash": "12daafb9c4f77deb3c3303dc2e6f8a3c2a0ff7928fc004af959ba18b8bd38068",
|
|
63
63
|
"adaptationRef": "docs/process/MATT-POCOCK-ENGINEERING-SKILLS.md",
|
|
@@ -439,7 +439,7 @@
|
|
|
439
439
|
"source": "project",
|
|
440
440
|
"sourceType": "local",
|
|
441
441
|
"skillPath": ".agents/skills/llm-wiki/SKILL.md",
|
|
442
|
-
"effectiveHash": "
|
|
442
|
+
"effectiveHash": "b9c7b0bda7e1ea77126d612392faafc999d032f6b75ee8b24d6cf4fada8dd6c5",
|
|
443
443
|
"targets": [
|
|
444
444
|
".agents/skills",
|
|
445
445
|
".claude/skills",
|
|
@@ -1398,7 +1398,7 @@
|
|
|
1398
1398
|
"source": "project",
|
|
1399
1399
|
"sourceType": "local",
|
|
1400
1400
|
"skillPath": ".agents/skills/yss-product-lifecycle/SKILL.md",
|
|
1401
|
-
"effectiveHash": "
|
|
1401
|
+
"effectiveHash": "61d56bad65e7176ac36d2f2cdc1ca1eb8d3c8ce9fe9a3423ece0cdb5ef18b43a",
|
|
1402
1402
|
"targets": [
|
|
1403
1403
|
".agents/skills",
|
|
1404
1404
|
".claude/skills",
|
package/template.snapshot.json
CHANGED
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
"templateName": "yss-spec-project-template",
|
|
4
4
|
"templateSource": "github:iloveZzz/yss-spec-project-template",
|
|
5
5
|
"templateRepository": "https://github.com/iloveZzz/yss-spec-project-template.git",
|
|
6
|
-
"requestedRef": "
|
|
7
|
-
"templateCommit": "
|
|
6
|
+
"requestedRef": "4743a3f6805e844be8244c49781eb55f0b3fd644",
|
|
7
|
+
"templateCommit": "4743a3f6805e844be8244c49781eb55f0b3fd644",
|
|
8
8
|
"manifestHash": "10d161eb3f0e426aeefad5d0b9e6c5522d8a4dbacb9edf6ed64285dcb40b1a65",
|
|
9
9
|
"encodedPaths": {
|
|
10
10
|
".codex/skills/data-analytics/.gitignore": ".codex/skills/data-analytics/__yss_dotfile__.gitignore",
|
|
@@ -12,6 +12,6 @@
|
|
|
12
12
|
".codex/skills/product-design/templates/prototype/.npmrc": ".codex/skills/product-design/templates/prototype/__yss_dotfile__.npmrc",
|
|
13
13
|
".gitignore": "__yss_dotfile__.gitignore"
|
|
14
14
|
},
|
|
15
|
-
"snapshotHash": "
|
|
16
|
-
"generatedAt": "2026-08-
|
|
15
|
+
"snapshotHash": "fceef6da9de2136f3c09fe0fb012f0aadf0f1e14c3772880818ad7b325b5f307",
|
|
16
|
+
"generatedAt": "2026-08-30T07:26:02.204Z"
|
|
17
17
|
}
|