create-yss-spec 3.4.9 → 3.4.10
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/package.json +1 -1
- package/src/template/attach-planner.js +5 -0
- package/src/template/sync-planner.js +5 -0
- package/template/.agents/skills/.strategic-design-skills-manifest.json +1 -1
- package/template/.agents/skills/yss-implementation-contract-compiler/SKILL.md +2 -0
- package/template/.agents/skills/yss-openapi-draft-review/SKILL.md +2 -0
- package/template/.agents/skills/yss-openapi-governance/SKILL.md +4 -0
- package/template/.agents/skills/yss-product-lifecycle/SKILL.md +11 -5
- package/template/.agents/skills/yss-product-lifecycle/references/orchestration-contract.yaml +63 -1
- package/template/.agents/skills/yss-product-lifecycle/references/orchestration.md +2 -2
- package/template/.agents/skills/yss-prototype-stage/SKILL.md +2 -0
- package/template/.agents/skills/yss-prototype-stage/scripts/visual-baseline-contract.mjs +2 -2
- package/template/.agents/skills/yss-stage-decision/SKILL.md +2 -0
- package/template/.agents/skills/yss-tactical-design/SKILL.md +2 -0
- package/template/.agents/skills/yss-technical-design/SKILL.md +2 -0
- package/template/.agents/skills/yss-technical-design/scripts/engineering-design.mjs +1 -1
- package/template/.agents/skills/yss-technical-design/scripts/validate-technical-design.mjs +11 -8
- package/template/.codex/skills/yss-implementation-contract-compiler/SKILL.md +2 -0
- package/template/.codex/skills/yss-openapi-draft-review/SKILL.md +2 -0
- package/template/.codex/skills/yss-openapi-governance/SKILL.md +4 -0
- package/template/.codex/skills/yss-product-lifecycle/SKILL.md +11 -5
- package/template/.codex/skills/yss-product-lifecycle/references/orchestration-contract.yaml +63 -1
- package/template/.codex/skills/yss-product-lifecycle/references/orchestration.md +2 -2
- package/template/.codex/skills/yss-prototype-stage/SKILL.md +2 -0
- package/template/.codex/skills/yss-prototype-stage/scripts/visual-baseline-contract.mjs +2 -2
- package/template/.codex/skills/yss-stage-decision/SKILL.md +2 -0
- package/template/.codex/skills/yss-tactical-design/SKILL.md +2 -0
- package/template/.codex/skills/yss-technical-design/SKILL.md +2 -0
- package/template/.codex/skills/yss-technical-design/scripts/engineering-design.mjs +1 -1
- package/template/.codex/skills/yss-technical-design/scripts/validate-technical-design.mjs +11 -8
- package/template/.cursor/skills/yss-implementation-contract-compiler/SKILL.md +2 -0
- package/template/.cursor/skills/yss-openapi-draft-review/SKILL.md +2 -0
- package/template/.cursor/skills/yss-openapi-governance/SKILL.md +4 -0
- package/template/.cursor/skills/yss-product-lifecycle/SKILL.md +11 -5
- package/template/.cursor/skills/yss-product-lifecycle/references/orchestration-contract.yaml +63 -1
- package/template/.cursor/skills/yss-product-lifecycle/references/orchestration.md +2 -2
- package/template/.cursor/skills/yss-prototype-stage/SKILL.md +2 -0
- package/template/.cursor/skills/yss-prototype-stage/scripts/visual-baseline-contract.mjs +2 -2
- package/template/.cursor/skills/yss-stage-decision/SKILL.md +2 -0
- package/template/.cursor/skills/yss-tactical-design/SKILL.md +2 -0
- package/template/.cursor/skills/yss-technical-design/SKILL.md +2 -0
- package/template/.cursor/skills/yss-technical-design/scripts/engineering-design.mjs +1 -1
- package/template/.cursor/skills/yss-technical-design/scripts/validate-technical-design.mjs +11 -8
- package/template/.pi/skills/yss-implementation-contract-compiler/SKILL.md +2 -0
- package/template/.pi/skills/yss-openapi-draft-review/SKILL.md +2 -0
- package/template/.pi/skills/yss-openapi-governance/SKILL.md +4 -0
- package/template/.pi/skills/yss-product-lifecycle/SKILL.md +11 -5
- package/template/.pi/skills/yss-product-lifecycle/references/orchestration-contract.yaml +63 -1
- package/template/.pi/skills/yss-product-lifecycle/references/orchestration.md +2 -2
- package/template/.pi/skills/yss-prototype-stage/SKILL.md +2 -0
- package/template/.pi/skills/yss-prototype-stage/scripts/visual-baseline-contract.mjs +2 -2
- package/template/.pi/skills/yss-stage-decision/SKILL.md +2 -0
- package/template/.pi/skills/yss-tactical-design/SKILL.md +2 -0
- package/template/.pi/skills/yss-technical-design/SKILL.md +2 -0
- package/template/.pi/skills/yss-technical-design/scripts/engineering-design.mjs +1 -1
- package/template/.pi/skills/yss-technical-design/scripts/validate-technical-design.mjs +11 -8
- package/template/AGENTS.md +2 -0
- package/template/CONTEXT.md +2 -1
- package/template/README.md +1 -0
- package/template/docs/agents/issue-tracker.md +7 -0
- package/template/docs/process/contract-reading.md +46 -0
- package/template/docs/process/lifecycle-artifact-map.md +2 -2
- package/template/docs/process/lifecycle-registry-baseline.json +2 -1
- package/template/docs/process/lifecycle-registry.yaml +10 -4
- package/template/docs/process/schemas/api-contract-decision-v2.schema.json +198 -0
- package/template/docs/process/schemas/digital-human-task-package.schema.json +8 -0
- package/template/docs/process/schemas/lifecycle-checkpoint.schema.json +259 -0
- package/template/docs/process/schemas/stage-tracking.schema.json +259 -0
- package/template/docs/process/stage-tracking.md +62 -0
- package/template/docs/process/strategic-handoff-package.md +8 -0
- package/template/docs/user-guide//347/224/250/346/210/267/346/211/213/345/206/214.md +2 -0
- package/template/docs/user-guide//347/224/250/346/210/267/346/211/213/345/206/214/347/264/242/345/274/225.md +1 -0
- package/template/docs/user-guide//351/230/266/346/256/265/346/216/245/345/205/245/344/270/216/344/272/247/347/211/251/345/244/215/347/224/250/344/275/277/347/224/250/346/211/213/345/206/214.md +243 -0
- package/template/scripts/api-contract-decision +16 -0
- package/template/scripts/complete-backend-delivery +17 -0
- package/template/scripts/contract +13 -0
- package/template/scripts/dispatch-slice-task +13 -0
- package/template/scripts/lib/api-contract-decision.mjs +45 -4
- package/template/scripts/lib/approval-record.mjs +1 -1
- package/template/scripts/lib/approved-execution-context.mjs +35 -7
- package/template/scripts/lib/backend-architecture.mjs +2 -2
- package/template/scripts/lib/backend-delivery-terminal.mjs +51 -0
- package/template/scripts/lib/backend-platform-provenance.mjs +1 -1
- package/template/scripts/lib/backend-platform.mjs +1 -1
- package/template/scripts/lib/backend-scaffold-prerequisites.mjs +1 -1
- package/template/scripts/lib/context-contract.mjs +1 -1
- package/template/scripts/lib/context-reconciliation.mjs +1 -1
- package/template/scripts/lib/contract-source.mjs +22 -0
- package/template/scripts/lib/contract-views.mjs +109 -0
- package/template/scripts/lib/delivery-preflight.mjs +3 -2
- package/template/scripts/lib/digital-human-roles.mjs +1 -1
- package/template/scripts/lib/existing-backend-architecture.mjs +4 -3
- package/template/scripts/lib/existing-ui-baseline.mjs +4 -2
- package/template/scripts/lib/frontend-delivery-boundary.mjs +1 -1
- package/template/scripts/lib/frontend-delivery.mjs +1 -1
- package/template/scripts/lib/harness-execution-scope.mjs +15 -1
- package/template/scripts/lib/implementation-contract-compiler.mjs +4 -4
- package/template/scripts/lib/json-schema.mjs +19 -4
- package/template/scripts/lib/lifecycle-context-query.mjs +5 -1
- package/template/scripts/lib/lifecycle-controls.mjs +1 -1
- package/template/scripts/lib/lifecycle-execution-scope.mjs +92 -0
- package/template/scripts/lib/lifecycle-registry.mjs +2 -1
- package/template/scripts/lib/lifecycle-transition.mjs +21 -3
- package/template/scripts/lib/openapi-draft-validation.mjs +2 -1
- package/template/scripts/lib/skill-registry.mjs +1 -1
- package/template/scripts/lib/slice-contract-preparation.mjs +16 -14
- package/template/scripts/lib/slice-contract-views.mjs +1 -1
- package/template/scripts/lib/slice-contract.mjs +18 -3
- package/template/scripts/lib/slice-execution-preflight.mjs +7 -3
- package/template/scripts/lib/slice-repositories.mjs +1 -1
- package/template/scripts/lib/slice-task-package.mjs +3 -2
- package/template/scripts/lib/stage-tracking-migration.mjs +176 -0
- package/template/scripts/lib/stage-tracking.mjs +184 -0
- package/template/scripts/lib/strategic-handoff-consumption.mjs +5 -4
- package/template/scripts/lib/strategic-handoff-io.mjs +5 -2
- package/template/scripts/lib/strategic-handoff-routing.mjs +31 -0
- package/template/scripts/lib/strategic-handoff.mjs +4 -2
- package/template/scripts/lib/task-package.mjs +2 -0
- package/template/scripts/lib/technical-design-boundary.mjs +4 -2
- package/template/scripts/lib/ui-baseline.mjs +1 -1
- package/template/scripts/lib/user-decision.mjs +1 -1
- package/template/scripts/lib/validation-phase.mjs +72 -0
- package/template/scripts/stage-tracking +25 -0
- package/template/scripts/strategic-consumer-entry +47 -0
- package/template/scripts/verify-context-reconciliation +4 -3
- package/template/scripts/verify-lifecycle-checkpoint +10 -0
- package/template/skills-lock.json +13 -13
- package/template.snapshot.json +4 -4
package/package.json
CHANGED
|
@@ -41,6 +41,11 @@ function classifyAttachOperations({
|
|
|
41
41
|
continue;
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
+
if (operation.relativePath === "docs/agents/issue-tracker.md") {
|
|
45
|
+
matched.push({ ...operation, reason: "project-owned-tracker-configuration" });
|
|
46
|
+
continue;
|
|
47
|
+
}
|
|
48
|
+
|
|
44
49
|
const currentHash = getFileHash(operation);
|
|
45
50
|
if (currentHash === operation.desiredHash) {
|
|
46
51
|
matched.push(operation);
|
|
@@ -47,6 +47,11 @@ function classifySyncOperations({
|
|
|
47
47
|
continue;
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
+
if (operation.relativePath === "docs/agents/issue-tracker.md") {
|
|
51
|
+
unchanged.push({ ...operation, reason: "project-owned-tracker-configuration" });
|
|
52
|
+
continue;
|
|
53
|
+
}
|
|
54
|
+
|
|
50
55
|
const currentHash = getFileHash(operation);
|
|
51
56
|
|
|
52
57
|
if (operation.safeSectionMerge && currentHash !== operation.desiredHash) {
|
|
@@ -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": "
|
|
6
|
+
"source_revision": "9e17922a0a718e5bd1845ddab11850a2f43becad",
|
|
7
7
|
"adaptation_ref": "docs/agents/strategic-design-skills-integration.md",
|
|
8
8
|
"skills": [
|
|
9
9
|
{
|
|
@@ -5,6 +5,8 @@ description: "编译或重验 YSS Slice Implementation Contract、最小 Skill
|
|
|
5
5
|
|
|
6
6
|
# YSS Implementation Contract Compiler
|
|
7
7
|
|
|
8
|
+
已有生命周期资产优先用 `scripts/contract view <资产> --kind <类型>` 阅读;执行任务用 `--profile task --unit <ID>`,绑定与校验明细用 `--profile full`。视图不授予执行权限,仍按本 Skill 的原始来源和批准门禁处理。类型、准备和迁移见 `docs/process/contract-reading.md`。
|
|
9
|
+
|
|
8
10
|
阶段 7 的实现合同编译器。它把已批准的生命周期资产、垂直切片、capability 和窄 Recipe 编译为 `Slice Implementation Contract` v3 草案;不批准合同、不写业务代码、不设置 `ready-for-agent`。
|
|
9
11
|
|
|
10
12
|
文档输出时按 `lifecycle-document-output` 条件调用 `i-have-adhd`,读取 `docs/process/document-writing.md`;作用域仅限当前产物,派发时传递条件及引用。
|
|
@@ -5,6 +5,8 @@ description: "审查 YSS OpenAPI Draft 的需求覆盖、页面动作、响应
|
|
|
5
5
|
|
|
6
6
|
# YSS OpenAPI Draft Review
|
|
7
7
|
|
|
8
|
+
已有生命周期资产优先用 `scripts/contract view <资产> --kind <类型>` 阅读;执行任务用 `--profile task --unit <ID>`,绑定与校验明细用 `--profile full`。视图不授予执行权限,仍按本 Skill 的原始来源和批准门禁处理。类型、准备和迁移见 `docs/process/contract-reading.md`。
|
|
9
|
+
|
|
8
10
|
Use this skill after OpenAPI Draft creation and before Engineering Baseline / YSS DDD Review. It is a fail-closed contract review skill for design-time OpenAPI files under `docs/.scratch/<feature>/api/`; it does not bundle JSON or generate Orval clients.
|
|
9
11
|
|
|
10
12
|
## Required Inputs
|
|
@@ -5,6 +5,8 @@ description: "维护、校验、冻结或导出 YSS OpenAPI 3.1 设计合同;
|
|
|
5
5
|
|
|
6
6
|
# YSS OpenAPI Governance
|
|
7
7
|
|
|
8
|
+
已有生命周期资产优先用 `scripts/contract view <资产> --kind <类型>` 阅读;执行任务用 `--profile task --unit <ID>`,绑定与校验明细用 `--profile full`。视图不授予执行权限,仍按本 Skill 的原始来源和批准门禁处理。类型、准备和迁移见 `docs/process/contract-reading.md`。
|
|
9
|
+
|
|
8
10
|
本 skill 负责 YSS OpenAPI 的 **YAML-first** 工作流:
|
|
9
11
|
|
|
10
12
|
```text
|
|
@@ -114,3 +116,5 @@ pnpm exec redocly bundle \
|
|
|
114
116
|
## 输出契约
|
|
115
117
|
|
|
116
118
|
执行治理或导出时,按 [输出契约](references/governance-output.md) 记录 YAML 权威、当前校验证据、JSON 派生与交接。不能只给自然语言完成声明;未冻结时不生成可供实现消费的 JSON。
|
|
119
|
+
|
|
120
|
+
API Contract Decision 可用 `scripts/api-contract-decision prepare` 自动生成来源摘要;v1 显式迁移用 `migrate --version <新版本> --output <新路径>`。候选保持 draft,审查、Freeze 绑定和工程契约批准仍由现有生命周期核验。
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: yss-product-lifecycle
|
|
3
|
-
description: 编排 YSS
|
|
3
|
+
description: 编排 YSS 研发全生命周期;当阶段、产物、门禁或 Skill 路由不清晰时使用。
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# YSS Product Lifecycle
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
合同阅读:`scripts/contract view`;见 `docs/process/contract-reading.md`。
|
|
9
|
+
|
|
10
|
+
主控识别请求、仓库身份和可信阶段,计算 frontier、派发与验收工作单元;专项 Skill 负责设计、实现和独立审查。
|
|
9
11
|
|
|
10
12
|
文档按 `document_writing` 条件调用 `i-have-adhd`,并传递 `docs/process/document-writing.md` 规范。
|
|
11
13
|
|
|
@@ -21,7 +23,7 @@ description: 编排 YSS 产品或模块从机会调研到 Spec、原型、技术
|
|
|
21
23
|
| 数字人角色、运行时和会签策略 | `docs/agents/digital-human-roles.yaml` |
|
|
22
24
|
| 影响面、裁剪和模板维护强度 | `docs/process/harness-process-tailoring.md`、`docs/process/maintenance-intensity.yaml` |
|
|
23
25
|
|
|
24
|
-
|
|
26
|
+
用 `scripts/query-lifecycle-context` 查询合同:
|
|
25
27
|
|
|
26
28
|
```bash
|
|
27
29
|
scripts/query-lifecycle-context --mode route --stage stage.plan --work-unit work-unit.plan-requirements --include execution_efficiency
|
|
@@ -54,6 +56,8 @@ Plan 入口读取 `docs/plan/README.md` 和 `docs/process/plan-migration.md`,
|
|
|
54
56
|
|
|
55
57
|
聚合批准见 `gate_consolidation`。普通功能默认一个独立审查者,按能力缺口、冲突或外部制度增员;相邻检查组合审查、逐项留证。
|
|
56
58
|
|
|
59
|
+
项目职责与后端终点见 `execution_scopes`;恢复、编译和派发必须复验。保留产品设计门禁,后端交付不等于业务完成或发布。
|
|
60
|
+
|
|
57
61
|
### 用户决定
|
|
58
62
|
|
|
59
63
|
按角色表 `user_decision_policy` 和 `references/user-decisions.md` 先展示可审阅资产、范围、风险及后续动作,再取得提问者或其指定生物人的原始回复。数字人、超时和默认项不能代答。已有授权优先用 `continuation_ref` 核验延续;未知/实质变化或强制审批缺失才重新决定。缺陷和缺证据阻断,建议记待办;合同、验证及外部动作授权仍须满足。
|
|
@@ -71,7 +75,7 @@ Plan 入口读取 `docs/plan/README.md` 和 `docs/process/plan-migration.md`,
|
|
|
71
75
|
5. 先对照用户目标逐项验收,检查遗漏诉求、错误假设与尚未解决的问题,再验收 `Workflow Execution Result`:工作单元、合同、允许写路径、`context_reconciliation`、证据、实际验证、延期 seam、漂移和下一路由必须可核验。实现派发额外绑定当前 Slice Implementation Contract v3;其他阶段不得伪造该合同。
|
|
72
76
|
6. 在授权边界内继续下一工作单元;遇到人工决定、新授权、证据冲突、专项失败或合并/发布结论时暂停。暂停不得阻断无依赖的独立工作。
|
|
73
77
|
|
|
74
|
-
每个 `project-instance`
|
|
78
|
+
每个 `project-instance` 工作单元批准或流转前,回写稳定术语到唯一根 `CONTEXT.md`,并生成通过校验的 `context_reconciliation`。候选术语、错误路径、摘要漂移或未决冲突必须阻断。质量标准只由 `engineering-baseline` 定义一次;高风险影响按裁剪合同补充反证和残余风险。
|
|
75
79
|
|
|
76
80
|
## 面向业务角色
|
|
77
81
|
|
|
@@ -85,10 +89,12 @@ Plan → Spec(含正式草稿、恢复与显式 `to-spec`)写入前,按 `d
|
|
|
85
89
|
|
|
86
90
|
## 结果与暂停
|
|
87
91
|
|
|
88
|
-
|
|
92
|
+
咨询直接回答;工作单元保留完整结果,对外仅展示当前决定所需信息。
|
|
89
93
|
|
|
90
94
|
工作单元结果至少包含:模式、仓库身份、当前阶段和工作单元、影响面、资产与门禁状态、证据、新鲜度、Ticket/垂直切片/合同状态、`ready-for-agent` 结论、阻塞项、本轮动作、下一工作单元、暂停或继续理由、Ticket 同步和 Git checkpoint 判断。
|
|
91
95
|
|
|
92
96
|
暂停会签时追加门禁 ID、`role_id`、`runtime_id`、会签文件路径、推荐答案和恢复动作;恢复前运行适用验证器。只有同一候选快照通过全部适用审查轴与 fresh verification,才能提出合并、发布或完成结论;发布仍须生物人决定。
|
|
93
97
|
|
|
94
98
|
专项合同加载索引见 `references/orchestration.md`。
|
|
99
|
+
|
|
100
|
+
Plan / Spec / Design 追踪按 `docs/process/stage-tracking.md`。
|
package/template/.agents/skills/yss-product-lifecycle/references/orchestration-contract.yaml
CHANGED
|
@@ -53,7 +53,7 @@ review_verification:
|
|
|
53
53
|
|
|
54
54
|
checkpoint_policy:
|
|
55
55
|
strategy: consolidated
|
|
56
|
-
flush_on: [human_pause, handoff, implementation_entry, merge, release]
|
|
56
|
+
flush_on: [stage_exit, human_pause, handoff, implementation_entry, merge, release]
|
|
57
57
|
flush_immediately_on: [blocked, responsibility_changed, asset_approval]
|
|
58
58
|
preserve_stage_causality: true
|
|
59
59
|
required_stage_trace_fields: [stage, upstream_refs, artifact_refs, gate_decisions, downstream_impacts]
|
|
@@ -481,6 +481,15 @@ work_unit_routes:
|
|
|
481
481
|
skills: [yss-ui, yss-design-system, code-review]
|
|
482
482
|
applies_when: ui_impact
|
|
483
483
|
not_applicable_reason: no_ui_impact
|
|
484
|
+
work-unit.backend-delivery:
|
|
485
|
+
native: {source: yss-product-lifecycle, skill: yss-product-lifecycle, invocation_mode: model-invoked}
|
|
486
|
+
primary_skill: yss-product-lifecycle
|
|
487
|
+
supporting_skills: [code-review]
|
|
488
|
+
skills: [yss-product-lifecycle, code-review]
|
|
489
|
+
applies_when: execution_scope_plan_to_backend
|
|
490
|
+
not_applicable_reason: outside_plan_to_backend_execution_scope
|
|
491
|
+
verifier: scripts/complete-backend-delivery
|
|
492
|
+
completion: current-source-and-exported-package-verified
|
|
484
493
|
work-unit.code-review:
|
|
485
494
|
native: {source: yss-product-lifecycle, skill: code-review, invocation_mode: model-invoked}
|
|
486
495
|
primary_skill: code-review
|
|
@@ -628,6 +637,11 @@ transition_graph:
|
|
|
628
637
|
work-unit.technical-analysis: [work-unit.implementation-repository-preparation]
|
|
629
638
|
work-unit.implementation-repository-preparation: [work-unit.ticket-decomposition]
|
|
630
639
|
work-unit.ticket-decomposition: [work-unit.slice-implementation]
|
|
640
|
+
work-unit.slice-implementation: [work-unit.frontend-implementation-verification, work-unit.code-review]
|
|
641
|
+
work-unit.frontend-implementation-verification: [work-unit.code-review]
|
|
642
|
+
work-unit.code-review: [work-unit.release-and-retrospective, work-unit.slice-implementation, work-unit.backend-delivery]
|
|
643
|
+
work-unit.backend-delivery: []
|
|
644
|
+
work-unit.release-and-retrospective: []
|
|
631
645
|
forbidden_shortcuts:
|
|
632
646
|
- {from: work-unit.spec-synthesis, to: work-unit.implementation-repository-preparation}
|
|
633
647
|
- {from: work-unit.prototype-design, to: work-unit.implementation-repository-preparation}
|
|
@@ -1030,6 +1044,7 @@ ready_for_agent:
|
|
|
1030
1044
|
parent_ticket_as_implementation_ref: forbidden
|
|
1031
1045
|
|
|
1032
1046
|
frontend_implementation_plan:
|
|
1047
|
+
scope_interpretation: product_ui_impact_requires_design_but_only_owned_frontend_implementation_requires_this_plan
|
|
1033
1048
|
applies_when: [ui_impact]
|
|
1034
1049
|
required_before: [ready_for_agent]
|
|
1035
1050
|
required: [prototype_ref, spec_ref, visual_baseline, route_and_page_inventory, baseline_case_ids, desktop_viewport, narrow_viewport, state_cases, pnpm_commands]
|
|
@@ -1196,3 +1211,50 @@ gate_consolidation:
|
|
|
1196
1211
|
invalidation: affected_dependencies_or_authorization_change_only
|
|
1197
1212
|
historical_gate_records: read_only_no_automatic_approval_migration
|
|
1198
1213
|
verifier: scripts/verify-lifecycle-checkpoint
|
|
1214
|
+
|
|
1215
|
+
# 项目 opt-in 只选择此权威策略,不能传入自定义工作单元白名单。
|
|
1216
|
+
execution_scopes:
|
|
1217
|
+
plan-to-backend:
|
|
1218
|
+
activation_ref: .yss-execution-scope.yaml
|
|
1219
|
+
validator: scripts/lib/lifecycle-execution-scope.mjs
|
|
1220
|
+
terminal_work_unit: work-unit.backend-delivery
|
|
1221
|
+
terminal_record: .yss-backend-delivery.json
|
|
1222
|
+
allowed_work_units: [work-unit.entry-triage, work-unit.plan-opportunity, work-unit.plan-requirements, work-unit.domain-strategy-design, work-unit.stage-decision, work-unit.spec-synthesis, work-unit.prototype-design, work-unit.technical-analysis, work-unit.implementation-repository-preparation, work-unit.scaffold-generation, work-unit.ticket-decomposition, work-unit.slice-implementation, work-unit.code-review, work-unit.backend-delivery]
|
|
1223
|
+
route_overrides:
|
|
1224
|
+
work-unit.code-review: [work-unit.slice-implementation, work-unit.backend-delivery]
|
|
1225
|
+
work-unit.slice-implementation: [work-unit.code-review]
|
|
1226
|
+
work-unit.backend-delivery: []
|
|
1227
|
+
product_ui_design: retain-all-triggered-gates
|
|
1228
|
+
implementation_delivery_roles: [backend]
|
|
1229
|
+
implementation_ui_impact: false
|
|
1230
|
+
downstream_frontend_required_when_product_ui_impact: [owner, ticket_ref, verification_plan, target_version]
|
|
1231
|
+
consumer_capabilities: [backend-technical-design]
|
|
1232
|
+
completion_claim: backend-delivery-only
|
|
1233
|
+
business_completion: forbidden
|
|
1234
|
+
release: forbidden
|
|
1235
|
+
resume: revalidate-current-scope-approvals-and-delivery
|
|
1236
|
+
|
|
1237
|
+
# Package wire IDs remain immutable; each target resolves its own executable entry.
|
|
1238
|
+
consumer_entry_routes:
|
|
1239
|
+
yss-full-lifecycle:
|
|
1240
|
+
backend-technical-design:
|
|
1241
|
+
source_work_unit: work-unit.technical-design
|
|
1242
|
+
target_work_unit: work-unit.technical-analysis
|
|
1243
|
+
plan-to-backend:
|
|
1244
|
+
backend-technical-design:
|
|
1245
|
+
source_work_unit: work-unit.technical-design
|
|
1246
|
+
target_work_unit: work-unit.technical-analysis
|
|
1247
|
+
harness.backend-delivery:
|
|
1248
|
+
backend-technical-design:
|
|
1249
|
+
source_work_unit: work-unit.technical-design
|
|
1250
|
+
target_work_unit: work-unit.technical-design
|
|
1251
|
+
|
|
1252
|
+
stage_tracking:
|
|
1253
|
+
contract: docs/process/stage-tracking.md
|
|
1254
|
+
schema: docs/process/schemas/stage-tracking.schema.json
|
|
1255
|
+
verifier: scripts/stage-tracking
|
|
1256
|
+
configuration: tracker.lifecycle_tracking_version
|
|
1257
|
+
machine_state_owner: checkpoint.stage_tracking
|
|
1258
|
+
transition_checkpoint_ref: checkpoint_ref
|
|
1259
|
+
flush_on: [stage_exit, blocked, responsibility_changed, asset_approval]
|
|
1260
|
+
preserves: [ticket-state, gate-approval, profile-scope]
|
|
@@ -4,14 +4,14 @@
|
|
|
4
4
|
|
|
5
5
|
1. 按 `orchestration-contract.yaml.request_triage` 理解请求并选择模式,再识别仓库身份、任务规模和影响面;问题理解与澄清细节见 [请求分诊协议](request-triage.md)。
|
|
6
6
|
2. `setup readiness`:每个任务只执行一次,核对 tracker、五态标签和领域文档布局,并在本轮缓存结果;仅在 tracker、主远端、真实标签或配置变化时重查。
|
|
7
|
-
3. 加载父 Ticket/checkpoint
|
|
7
|
+
3. 加载父 Ticket/checkpoint 与真实资产,计算最近可信阶段;按 `docs/process/stage-tracking.md` 登记、恢复并核验当前阶段工作项,写入前确保 checkpoint 已持久化,工作单元结果带 checkpoint_ref。
|
|
8
8
|
4. 评估资产、门禁和 `stale`,选择第一个未阻塞工作单元。进入 `work-unit.slice-implementation` 前,必须先通过 `scripts/lib/lifecycle-transition.mjs` 的 Ticket 正式化、垂直切片绑定和合法 `next_route` 校验;父 Ticket、缺少垂直切片或 `ready-for-human` 的切片一律 `blocked`。
|
|
9
9
|
5. 执行最小生命周期工作单元:主控先按 `docs/process/schemas/digital-human-task-package.schema.json` 编译并校验任务包,再只实际调用允许的 model-invoked skill;原生工作单元可直接持有正式资产,Matt 兼容 user-invoked skill 仅作为 workflow reference,仍由用户显式启动。将结果归一化为 `Workflow Execution Result`,验收输出并回写状态与证据。任务包的 `contract.kind` 按工作单元选择;只有实现子任务使用 `slice-implementation` 并消费 Slice Implementation Contract,其他阶段不伪造该合同。
|
|
10
10
|
6. 若仍在授权和自动推进边界内,回到第 3 步;否则暂停。
|
|
11
11
|
|
|
12
12
|
不要仅输出下一个提示词后结束 `orchestrate`/`resume`。不要因进入业务代码阶段而退出主控;应把实现交给专项 skill,并在返回后继续核验。
|
|
13
13
|
|
|
14
|
-
连续阶段自动推进时累积 Ticket 同步和 Git
|
|
14
|
+
连续阶段自动推进时累积 Ticket 同步和 Git 判断证据,在阶段退出、人工暂停、handoff、进入实现、合并或发布边界集中 checkpoint。发生阻塞、责任人变化或资产需要单独批准时立即落 checkpoint,不因合并记录而丢失阶段因果关系。
|
|
15
15
|
|
|
16
16
|
## 执行成本
|
|
17
17
|
|
|
@@ -5,6 +5,8 @@ description: Use when a YSS feature has product-design impact on a primary flow,
|
|
|
5
5
|
|
|
6
6
|
# YSS Prototype Stage
|
|
7
7
|
|
|
8
|
+
已有生命周期资产优先用 `scripts/contract view <资产> --kind <类型>` 阅读;执行任务用 `--profile task --unit <ID>`,绑定与校验明细用 `--profile full`。视图不授予执行权限,仍按本 Skill 的原始来源和批准门禁处理。类型、准备和迁移见 `docs/process/contract-reading.md`。
|
|
9
|
+
|
|
8
10
|
把产品设计影响收敛为跨 Agent 一致的原型交付物、证据和生命周期回流合同。它不替代 `yss-product-lifecycle` 的门禁裁决,也不把原型当作生产前端代码。
|
|
9
11
|
|
|
10
12
|
文档输出时按 `lifecycle-document-output` 条件调用 `i-have-adhd`,读取 `docs/process/document-writing.md`;作用域仅限当前产物,派发时传递条件及引用。
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createHash } from "node:crypto";
|
|
3
|
-
import { existsSync } from "
|
|
4
|
-
import { mkdir,
|
|
3
|
+
import { existsSync, readFile, readdir } from "../../../../scripts/lib/validation-phase.mjs";
|
|
4
|
+
import { mkdir, writeFile } from "node:fs/promises";
|
|
5
5
|
import path from "node:path";
|
|
6
6
|
import { pathToFileURL } from "node:url";
|
|
7
7
|
import { parseDocument, stringify } from "../../../../scripts/vendor/yaml.mjs";
|
|
@@ -5,6 +5,8 @@ description: 编排 Plan 到 Spec 入口的方案决策与业务边界、协作
|
|
|
5
5
|
|
|
6
6
|
# YSS Stage Decision
|
|
7
7
|
|
|
8
|
+
已有生命周期资产优先用 `scripts/contract view <资产> --kind <类型>` 阅读;执行任务用 `--profile task --unit <ID>`,绑定与校验明细用 `--profile full`。视图不授予执行权限,仍按本 Skill 的原始来源和批准门禁处理。类型、准备和迁移见 `docs/process/contract-reading.md`。
|
|
9
|
+
|
|
8
10
|
`yss-stage-decision` 是由生命周期主控调度的上游决策技能,负责把需求、产品、商务输入和业务边界与规则设计结果整理成可审查、可版本化、可被下游消费的方案决策包。它不替代生命周期主控,也不生成产品代码、原型、OpenAPI 或垂直切片 Ticket。
|
|
9
11
|
|
|
10
12
|
文档输出时按 `lifecycle-document-output` 条件调用 `i-have-adhd`,读取 `docs/process/document-writing.md`;作用域仅限当前产物,派发时传递条件及引用。
|
|
@@ -5,6 +5,8 @@ description: 在 YSS 技术分析阶段将批准的战略领域输入细化为
|
|
|
5
5
|
|
|
6
6
|
# yss-tactical-design
|
|
7
7
|
|
|
8
|
+
已有生命周期资产优先用 `scripts/contract view <资产> --kind <类型>` 阅读;执行任务用 `--profile task --unit <ID>`,绑定与校验明细用 `--profile full`。视图不授予执行权限,仍按本 Skill 的原始来源和批准门禁处理。类型、准备和迁移见 `docs/process/contract-reading.md`。
|
|
9
|
+
|
|
8
10
|
本 skill 负责 DDD 战术设计,不新增生命周期主阶段,也不替代 `yss-stage-decision` 或 `yss-domain`。
|
|
9
11
|
|
|
10
12
|
## 适用边界
|
|
@@ -5,6 +5,8 @@ description: 在 YSS 技术分析中统一承接需求与战略输入,按已
|
|
|
5
5
|
|
|
6
6
|
# YSS 技术设计
|
|
7
7
|
|
|
8
|
+
已有生命周期资产优先用 `scripts/contract view <资产> --kind <类型>` 阅读;执行任务用 `--profile task --unit <ID>`,绑定与校验明细用 `--profile full`。视图不授予执行权限,仍按本 Skill 的原始来源和批准门禁处理。类型、准备和迁移见 `docs/process/contract-reading.md`。
|
|
9
|
+
|
|
8
10
|
由 `yss-product-lifecycle` 调度,负责 `work-unit.technical-analysis` 的技术设计,不另起生命周期、不生成生产代码。生命周期维护批准和状态;`yss-implementation-contract-compiler` 消费批准且当前的设计,起草实现合同。
|
|
9
11
|
|
|
10
12
|
文档输出时按 `lifecycle-document-output` 条件调用 `i-have-adhd`,读取 `docs/process/document-writing.md`;作用域仅限当前产物,派发时传递条件及引用。
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import path from 'node:path';
|
|
2
|
-
import {readFileSync} from '
|
|
2
|
+
import {readFileSync} from '../../../../scripts/lib/validation-phase.mjs';
|
|
3
3
|
import {ensure,read,safe,hash} from '../../../../scripts/lib/strategic-handoff-io.mjs';
|
|
4
4
|
const beneath=(ref,scope)=>ref===scope||ref.startsWith(`${scope}/`);
|
|
5
5
|
export function validateEngineeringDesign(data,{root}) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { readFileSync } from '
|
|
2
|
+
import { readFileSync, withValidationPhase, validationDependencies } from '../../../../scripts/lib/validation-phase.mjs';
|
|
3
3
|
import { validateEngineeringDesign } from './engineering-design.mjs';
|
|
4
4
|
import { createApprovedExecutionContext, assertApprovedExecutionContext } from '../../../../scripts/lib/approved-execution-context.mjs';
|
|
5
5
|
import { verifyArchitectureEvidence } from '../../../../scripts/lib/backend-architecture.mjs';
|
|
@@ -42,8 +42,8 @@ function validateMvc(design) {
|
|
|
42
42
|
if (!design.integration_catalog.length) ensure(text(design.integration_not_applicable_reason), '无外部集成必须说明原因');
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
-
export function verifyArchitecture(data, root, {execution,sliceRef}={}) {
|
|
46
|
-
if(execution)assertApprovedExecutionContext(execution,{root,technicalDesign:data,sliceId:sliceRef});
|
|
45
|
+
export function verifyArchitecture(data, root, {execution,sliceRef,readOnly=false}={}) {
|
|
46
|
+
if(execution)assertApprovedExecutionContext(execution,{root,technicalDesign:data,sliceId:sliceRef,readOnly});
|
|
47
47
|
const binding = data.architecture;
|
|
48
48
|
const file = safe(root, binding.decision_ref);
|
|
49
49
|
ensure(hash(readFileSync(file)) === binding.decision_digest, '架构来源摘要漂移');
|
|
@@ -63,7 +63,7 @@ export function verifyArchitecture(data, root, {execution,sliceRef}={}) {
|
|
|
63
63
|
ensure(!['stale','blocked'].includes(record.status) && !['stale','blocked'].includes(entry.status), '工程登记已失效');
|
|
64
64
|
if (entry.architecture_identity?.schema_version === 2) {
|
|
65
65
|
ensure(entry.architecture_evidence?.engineering_baseline && entry.architecture_evidence?.manifest, '既有工程登记缺少原始工程证据引用');
|
|
66
|
-
verifyArchitectureEvidence(entry.architecture_identity, { ...entry.architecture_evidence, repository_registration: { ref: binding.decision_ref, digest: binding.decision_digest } }, { root, execution });
|
|
66
|
+
verifyArchitectureEvidence(entry.architecture_identity, { ...entry.architecture_evidence, repository_registration: { ref: binding.decision_ref, digest: binding.decision_digest } }, { root, execution, readOnly });
|
|
67
67
|
}
|
|
68
68
|
}
|
|
69
69
|
}
|
|
@@ -111,7 +111,7 @@ export async function validateTechnicalDesign(data, { root = process.cwd(), slic
|
|
|
111
111
|
ensure(data.digest === technicalDigest(data), '技术设计合同摘要不匹配');
|
|
112
112
|
ensure(!['stale','blocked','drift','new_impacts'].includes(data.status), '设计状态不可消费');
|
|
113
113
|
if (sliceRef) ensure(data.status === 'approved', '切片只能消费 approved 设计');
|
|
114
|
-
verifyArchitecture(data, root, {execution,sliceRef});
|
|
114
|
+
verifyArchitecture(data, root, {execution,sliceRef,readOnly});
|
|
115
115
|
ensure(data.inputs.some(item => item.kind === 'context' && item.ref === 'CONTEXT.md') && data.inputs.some(item => item.kind === 'spec'), '共同输入缺少根 CONTEXT.md 或 Spec');
|
|
116
116
|
for (const input of data.inputs) ensure(hash(readFileSync(safe(root, input.ref))) === input.digest, `输入摘要漂移: ${input.ref}`);
|
|
117
117
|
for (const ref of data.evidence_refs) safe(root, ref);
|
|
@@ -135,12 +135,15 @@ export async function validateTechnicalDesign(data, { root = process.cwd(), slic
|
|
|
135
135
|
}
|
|
136
136
|
|
|
137
137
|
async function main() {
|
|
138
|
-
const { values, positionals } = parseArgs({ allowPositionals: true, options: { root: { type: 'string', default: process.cwd() }, slice: { type: 'string' }, 'legacy-ddd': { type: 'boolean', default: false }, 'read-only': {type:'boolean',default:false}, 'work-unit': {type:'string'}, 'approved-slice': {type:'string'}, 'approved-slice-digest': {type:'string'}, 'approved-slice-approval': {type:'string'} } });
|
|
138
|
+
const { values, positionals } = parseArgs({ allowPositionals: true, options: { root: { type: 'string', default: process.cwd() }, slice: { type: 'string' }, 'legacy-ddd': { type: 'boolean', default: false }, 'read-only': {type:'boolean',default:false}, 'validation-dependencies': {type:'boolean',default:false}, 'work-unit': {type:'string'}, 'approved-slice': {type:'string'}, 'approved-slice-digest': {type:'string'}, 'approved-slice-approval': {type:'string'} } });
|
|
139
139
|
ensure(positionals.length === 1, '用法: validate-technical-design.mjs <合同> --root <项目根> [--slice <ID>] [--legacy-ddd]');
|
|
140
140
|
const approvedOptions=['approved-slice','approved-slice-digest','approved-slice-approval'];
|
|
141
141
|
ensure(!approvedOptions.some(key=>values[key])||approvedOptions.every(key=>values[key]),'执行增量必须完整给出持久化 Slice、字节摘要及本地批准引用');
|
|
142
|
-
const
|
|
142
|
+
const output=await withValidationPhase({root:values.root,purpose:'technical-design',slice_id:values.slice,work_unit_id:values['work-unit'],readOnly:values['read-only']},async()=>{
|
|
143
|
+
const execution=values['approved-slice']?createApprovedExecutionContext({ref:values['approved-slice'],digest:values['approved-slice-digest'],approval_ref:values['approved-slice-approval']},{root:values.root,work_unit_id:values['work-unit'],readOnly:values['read-only']}):undefined;
|
|
143
144
|
const result = await validateTechnicalDesign(read(path.resolve(positionals[0])), { root: values.root, sliceRef: values.slice, legacyDdd: values['legacy-ddd'], readOnly:values['read-only'], execution });
|
|
144
|
-
|
|
145
|
+
return values['validation-dependencies']?{...result,validation_dependencies:validationDependencies()}:result;
|
|
146
|
+
});
|
|
147
|
+
process.stdout.write(`${JSON.stringify(output, null, 2)}\n`);
|
|
145
148
|
}
|
|
146
149
|
if (process.argv[1] && import.meta.url === pathToFileURL(process.argv[1]).href) main().catch(error => { process.stderr.write(`${JSON.stringify({ result: 'blocked', errors: [error.message] })}\n`); process.exitCode = 1; });
|
|
@@ -5,6 +5,8 @@ description: "编译或重验 YSS Slice Implementation Contract、最小 Skill
|
|
|
5
5
|
|
|
6
6
|
# YSS Implementation Contract Compiler
|
|
7
7
|
|
|
8
|
+
已有生命周期资产优先用 `scripts/contract view <资产> --kind <类型>` 阅读;执行任务用 `--profile task --unit <ID>`,绑定与校验明细用 `--profile full`。视图不授予执行权限,仍按本 Skill 的原始来源和批准门禁处理。类型、准备和迁移见 `docs/process/contract-reading.md`。
|
|
9
|
+
|
|
8
10
|
阶段 7 的实现合同编译器。它把已批准的生命周期资产、垂直切片、capability 和窄 Recipe 编译为 `Slice Implementation Contract` v3 草案;不批准合同、不写业务代码、不设置 `ready-for-agent`。
|
|
9
11
|
|
|
10
12
|
文档输出时按 `lifecycle-document-output` 条件调用 `i-have-adhd`,读取 `docs/process/document-writing.md`;作用域仅限当前产物,派发时传递条件及引用。
|
|
@@ -5,6 +5,8 @@ description: "审查 YSS OpenAPI Draft 的需求覆盖、页面动作、响应
|
|
|
5
5
|
|
|
6
6
|
# YSS OpenAPI Draft Review
|
|
7
7
|
|
|
8
|
+
已有生命周期资产优先用 `scripts/contract view <资产> --kind <类型>` 阅读;执行任务用 `--profile task --unit <ID>`,绑定与校验明细用 `--profile full`。视图不授予执行权限,仍按本 Skill 的原始来源和批准门禁处理。类型、准备和迁移见 `docs/process/contract-reading.md`。
|
|
9
|
+
|
|
8
10
|
Use this skill after OpenAPI Draft creation and before Engineering Baseline / YSS DDD Review. It is a fail-closed contract review skill for design-time OpenAPI files under `docs/.scratch/<feature>/api/`; it does not bundle JSON or generate Orval clients.
|
|
9
11
|
|
|
10
12
|
## Required Inputs
|
|
@@ -5,6 +5,8 @@ description: "维护、校验、冻结或导出 YSS OpenAPI 3.1 设计合同;
|
|
|
5
5
|
|
|
6
6
|
# YSS OpenAPI Governance
|
|
7
7
|
|
|
8
|
+
已有生命周期资产优先用 `scripts/contract view <资产> --kind <类型>` 阅读;执行任务用 `--profile task --unit <ID>`,绑定与校验明细用 `--profile full`。视图不授予执行权限,仍按本 Skill 的原始来源和批准门禁处理。类型、准备和迁移见 `docs/process/contract-reading.md`。
|
|
9
|
+
|
|
8
10
|
本 skill 负责 YSS OpenAPI 的 **YAML-first** 工作流:
|
|
9
11
|
|
|
10
12
|
```text
|
|
@@ -114,3 +116,5 @@ pnpm exec redocly bundle \
|
|
|
114
116
|
## 输出契约
|
|
115
117
|
|
|
116
118
|
执行治理或导出时,按 [输出契约](references/governance-output.md) 记录 YAML 权威、当前校验证据、JSON 派生与交接。不能只给自然语言完成声明;未冻结时不生成可供实现消费的 JSON。
|
|
119
|
+
|
|
120
|
+
API Contract Decision 可用 `scripts/api-contract-decision prepare` 自动生成来源摘要;v1 显式迁移用 `migrate --version <新版本> --output <新路径>`。候选保持 draft,审查、Freeze 绑定和工程契约批准仍由现有生命周期核验。
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: yss-product-lifecycle
|
|
3
|
-
description: 编排 YSS
|
|
3
|
+
description: 编排 YSS 研发全生命周期;当阶段、产物、门禁或 Skill 路由不清晰时使用。
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# YSS Product Lifecycle
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
合同阅读:`scripts/contract view`;见 `docs/process/contract-reading.md`。
|
|
9
|
+
|
|
10
|
+
主控识别请求、仓库身份和可信阶段,计算 frontier、派发与验收工作单元;专项 Skill 负责设计、实现和独立审查。
|
|
9
11
|
|
|
10
12
|
文档按 `document_writing` 条件调用 `i-have-adhd`,并传递 `docs/process/document-writing.md` 规范。
|
|
11
13
|
|
|
@@ -21,7 +23,7 @@ description: 编排 YSS 产品或模块从机会调研到 Spec、原型、技术
|
|
|
21
23
|
| 数字人角色、运行时和会签策略 | `docs/agents/digital-human-roles.yaml` |
|
|
22
24
|
| 影响面、裁剪和模板维护强度 | `docs/process/harness-process-tailoring.md`、`docs/process/maintenance-intensity.yaml` |
|
|
23
25
|
|
|
24
|
-
|
|
26
|
+
用 `scripts/query-lifecycle-context` 查询合同:
|
|
25
27
|
|
|
26
28
|
```bash
|
|
27
29
|
scripts/query-lifecycle-context --mode route --stage stage.plan --work-unit work-unit.plan-requirements --include execution_efficiency
|
|
@@ -54,6 +56,8 @@ Plan 入口读取 `docs/plan/README.md` 和 `docs/process/plan-migration.md`,
|
|
|
54
56
|
|
|
55
57
|
聚合批准见 `gate_consolidation`。普通功能默认一个独立审查者,按能力缺口、冲突或外部制度增员;相邻检查组合审查、逐项留证。
|
|
56
58
|
|
|
59
|
+
项目职责与后端终点见 `execution_scopes`;恢复、编译和派发必须复验。保留产品设计门禁,后端交付不等于业务完成或发布。
|
|
60
|
+
|
|
57
61
|
### 用户决定
|
|
58
62
|
|
|
59
63
|
按角色表 `user_decision_policy` 和 `references/user-decisions.md` 先展示可审阅资产、范围、风险及后续动作,再取得提问者或其指定生物人的原始回复。数字人、超时和默认项不能代答。已有授权优先用 `continuation_ref` 核验延续;未知/实质变化或强制审批缺失才重新决定。缺陷和缺证据阻断,建议记待办;合同、验证及外部动作授权仍须满足。
|
|
@@ -71,7 +75,7 @@ Plan 入口读取 `docs/plan/README.md` 和 `docs/process/plan-migration.md`,
|
|
|
71
75
|
5. 先对照用户目标逐项验收,检查遗漏诉求、错误假设与尚未解决的问题,再验收 `Workflow Execution Result`:工作单元、合同、允许写路径、`context_reconciliation`、证据、实际验证、延期 seam、漂移和下一路由必须可核验。实现派发额外绑定当前 Slice Implementation Contract v3;其他阶段不得伪造该合同。
|
|
72
76
|
6. 在授权边界内继续下一工作单元;遇到人工决定、新授权、证据冲突、专项失败或合并/发布结论时暂停。暂停不得阻断无依赖的独立工作。
|
|
73
77
|
|
|
74
|
-
每个 `project-instance`
|
|
78
|
+
每个 `project-instance` 工作单元批准或流转前,回写稳定术语到唯一根 `CONTEXT.md`,并生成通过校验的 `context_reconciliation`。候选术语、错误路径、摘要漂移或未决冲突必须阻断。质量标准只由 `engineering-baseline` 定义一次;高风险影响按裁剪合同补充反证和残余风险。
|
|
75
79
|
|
|
76
80
|
## 面向业务角色
|
|
77
81
|
|
|
@@ -85,10 +89,12 @@ Plan → Spec(含正式草稿、恢复与显式 `to-spec`)写入前,按 `d
|
|
|
85
89
|
|
|
86
90
|
## 结果与暂停
|
|
87
91
|
|
|
88
|
-
|
|
92
|
+
咨询直接回答;工作单元保留完整结果,对外仅展示当前决定所需信息。
|
|
89
93
|
|
|
90
94
|
工作单元结果至少包含:模式、仓库身份、当前阶段和工作单元、影响面、资产与门禁状态、证据、新鲜度、Ticket/垂直切片/合同状态、`ready-for-agent` 结论、阻塞项、本轮动作、下一工作单元、暂停或继续理由、Ticket 同步和 Git checkpoint 判断。
|
|
91
95
|
|
|
92
96
|
暂停会签时追加门禁 ID、`role_id`、`runtime_id`、会签文件路径、推荐答案和恢复动作;恢复前运行适用验证器。只有同一候选快照通过全部适用审查轴与 fresh verification,才能提出合并、发布或完成结论;发布仍须生物人决定。
|
|
93
97
|
|
|
94
98
|
专项合同加载索引见 `references/orchestration.md`。
|
|
99
|
+
|
|
100
|
+
Plan / Spec / Design 追踪按 `docs/process/stage-tracking.md`。
|
|
@@ -53,7 +53,7 @@ review_verification:
|
|
|
53
53
|
|
|
54
54
|
checkpoint_policy:
|
|
55
55
|
strategy: consolidated
|
|
56
|
-
flush_on: [human_pause, handoff, implementation_entry, merge, release]
|
|
56
|
+
flush_on: [stage_exit, human_pause, handoff, implementation_entry, merge, release]
|
|
57
57
|
flush_immediately_on: [blocked, responsibility_changed, asset_approval]
|
|
58
58
|
preserve_stage_causality: true
|
|
59
59
|
required_stage_trace_fields: [stage, upstream_refs, artifact_refs, gate_decisions, downstream_impacts]
|
|
@@ -481,6 +481,15 @@ work_unit_routes:
|
|
|
481
481
|
skills: [yss-ui, yss-design-system, code-review]
|
|
482
482
|
applies_when: ui_impact
|
|
483
483
|
not_applicable_reason: no_ui_impact
|
|
484
|
+
work-unit.backend-delivery:
|
|
485
|
+
native: {source: yss-product-lifecycle, skill: yss-product-lifecycle, invocation_mode: model-invoked}
|
|
486
|
+
primary_skill: yss-product-lifecycle
|
|
487
|
+
supporting_skills: [code-review]
|
|
488
|
+
skills: [yss-product-lifecycle, code-review]
|
|
489
|
+
applies_when: execution_scope_plan_to_backend
|
|
490
|
+
not_applicable_reason: outside_plan_to_backend_execution_scope
|
|
491
|
+
verifier: scripts/complete-backend-delivery
|
|
492
|
+
completion: current-source-and-exported-package-verified
|
|
484
493
|
work-unit.code-review:
|
|
485
494
|
native: {source: yss-product-lifecycle, skill: code-review, invocation_mode: model-invoked}
|
|
486
495
|
primary_skill: code-review
|
|
@@ -628,6 +637,11 @@ transition_graph:
|
|
|
628
637
|
work-unit.technical-analysis: [work-unit.implementation-repository-preparation]
|
|
629
638
|
work-unit.implementation-repository-preparation: [work-unit.ticket-decomposition]
|
|
630
639
|
work-unit.ticket-decomposition: [work-unit.slice-implementation]
|
|
640
|
+
work-unit.slice-implementation: [work-unit.frontend-implementation-verification, work-unit.code-review]
|
|
641
|
+
work-unit.frontend-implementation-verification: [work-unit.code-review]
|
|
642
|
+
work-unit.code-review: [work-unit.release-and-retrospective, work-unit.slice-implementation, work-unit.backend-delivery]
|
|
643
|
+
work-unit.backend-delivery: []
|
|
644
|
+
work-unit.release-and-retrospective: []
|
|
631
645
|
forbidden_shortcuts:
|
|
632
646
|
- {from: work-unit.spec-synthesis, to: work-unit.implementation-repository-preparation}
|
|
633
647
|
- {from: work-unit.prototype-design, to: work-unit.implementation-repository-preparation}
|
|
@@ -1030,6 +1044,7 @@ ready_for_agent:
|
|
|
1030
1044
|
parent_ticket_as_implementation_ref: forbidden
|
|
1031
1045
|
|
|
1032
1046
|
frontend_implementation_plan:
|
|
1047
|
+
scope_interpretation: product_ui_impact_requires_design_but_only_owned_frontend_implementation_requires_this_plan
|
|
1033
1048
|
applies_when: [ui_impact]
|
|
1034
1049
|
required_before: [ready_for_agent]
|
|
1035
1050
|
required: [prototype_ref, spec_ref, visual_baseline, route_and_page_inventory, baseline_case_ids, desktop_viewport, narrow_viewport, state_cases, pnpm_commands]
|
|
@@ -1196,3 +1211,50 @@ gate_consolidation:
|
|
|
1196
1211
|
invalidation: affected_dependencies_or_authorization_change_only
|
|
1197
1212
|
historical_gate_records: read_only_no_automatic_approval_migration
|
|
1198
1213
|
verifier: scripts/verify-lifecycle-checkpoint
|
|
1214
|
+
|
|
1215
|
+
# 项目 opt-in 只选择此权威策略,不能传入自定义工作单元白名单。
|
|
1216
|
+
execution_scopes:
|
|
1217
|
+
plan-to-backend:
|
|
1218
|
+
activation_ref: .yss-execution-scope.yaml
|
|
1219
|
+
validator: scripts/lib/lifecycle-execution-scope.mjs
|
|
1220
|
+
terminal_work_unit: work-unit.backend-delivery
|
|
1221
|
+
terminal_record: .yss-backend-delivery.json
|
|
1222
|
+
allowed_work_units: [work-unit.entry-triage, work-unit.plan-opportunity, work-unit.plan-requirements, work-unit.domain-strategy-design, work-unit.stage-decision, work-unit.spec-synthesis, work-unit.prototype-design, work-unit.technical-analysis, work-unit.implementation-repository-preparation, work-unit.scaffold-generation, work-unit.ticket-decomposition, work-unit.slice-implementation, work-unit.code-review, work-unit.backend-delivery]
|
|
1223
|
+
route_overrides:
|
|
1224
|
+
work-unit.code-review: [work-unit.slice-implementation, work-unit.backend-delivery]
|
|
1225
|
+
work-unit.slice-implementation: [work-unit.code-review]
|
|
1226
|
+
work-unit.backend-delivery: []
|
|
1227
|
+
product_ui_design: retain-all-triggered-gates
|
|
1228
|
+
implementation_delivery_roles: [backend]
|
|
1229
|
+
implementation_ui_impact: false
|
|
1230
|
+
downstream_frontend_required_when_product_ui_impact: [owner, ticket_ref, verification_plan, target_version]
|
|
1231
|
+
consumer_capabilities: [backend-technical-design]
|
|
1232
|
+
completion_claim: backend-delivery-only
|
|
1233
|
+
business_completion: forbidden
|
|
1234
|
+
release: forbidden
|
|
1235
|
+
resume: revalidate-current-scope-approvals-and-delivery
|
|
1236
|
+
|
|
1237
|
+
# Package wire IDs remain immutable; each target resolves its own executable entry.
|
|
1238
|
+
consumer_entry_routes:
|
|
1239
|
+
yss-full-lifecycle:
|
|
1240
|
+
backend-technical-design:
|
|
1241
|
+
source_work_unit: work-unit.technical-design
|
|
1242
|
+
target_work_unit: work-unit.technical-analysis
|
|
1243
|
+
plan-to-backend:
|
|
1244
|
+
backend-technical-design:
|
|
1245
|
+
source_work_unit: work-unit.technical-design
|
|
1246
|
+
target_work_unit: work-unit.technical-analysis
|
|
1247
|
+
harness.backend-delivery:
|
|
1248
|
+
backend-technical-design:
|
|
1249
|
+
source_work_unit: work-unit.technical-design
|
|
1250
|
+
target_work_unit: work-unit.technical-design
|
|
1251
|
+
|
|
1252
|
+
stage_tracking:
|
|
1253
|
+
contract: docs/process/stage-tracking.md
|
|
1254
|
+
schema: docs/process/schemas/stage-tracking.schema.json
|
|
1255
|
+
verifier: scripts/stage-tracking
|
|
1256
|
+
configuration: tracker.lifecycle_tracking_version
|
|
1257
|
+
machine_state_owner: checkpoint.stage_tracking
|
|
1258
|
+
transition_checkpoint_ref: checkpoint_ref
|
|
1259
|
+
flush_on: [stage_exit, blocked, responsibility_changed, asset_approval]
|
|
1260
|
+
preserves: [ticket-state, gate-approval, profile-scope]
|
|
@@ -4,14 +4,14 @@
|
|
|
4
4
|
|
|
5
5
|
1. 按 `orchestration-contract.yaml.request_triage` 理解请求并选择模式,再识别仓库身份、任务规模和影响面;问题理解与澄清细节见 [请求分诊协议](request-triage.md)。
|
|
6
6
|
2. `setup readiness`:每个任务只执行一次,核对 tracker、五态标签和领域文档布局,并在本轮缓存结果;仅在 tracker、主远端、真实标签或配置变化时重查。
|
|
7
|
-
3. 加载父 Ticket/checkpoint
|
|
7
|
+
3. 加载父 Ticket/checkpoint 与真实资产,计算最近可信阶段;按 `docs/process/stage-tracking.md` 登记、恢复并核验当前阶段工作项,写入前确保 checkpoint 已持久化,工作单元结果带 checkpoint_ref。
|
|
8
8
|
4. 评估资产、门禁和 `stale`,选择第一个未阻塞工作单元。进入 `work-unit.slice-implementation` 前,必须先通过 `scripts/lib/lifecycle-transition.mjs` 的 Ticket 正式化、垂直切片绑定和合法 `next_route` 校验;父 Ticket、缺少垂直切片或 `ready-for-human` 的切片一律 `blocked`。
|
|
9
9
|
5. 执行最小生命周期工作单元:主控先按 `docs/process/schemas/digital-human-task-package.schema.json` 编译并校验任务包,再只实际调用允许的 model-invoked skill;原生工作单元可直接持有正式资产,Matt 兼容 user-invoked skill 仅作为 workflow reference,仍由用户显式启动。将结果归一化为 `Workflow Execution Result`,验收输出并回写状态与证据。任务包的 `contract.kind` 按工作单元选择;只有实现子任务使用 `slice-implementation` 并消费 Slice Implementation Contract,其他阶段不伪造该合同。
|
|
10
10
|
6. 若仍在授权和自动推进边界内,回到第 3 步;否则暂停。
|
|
11
11
|
|
|
12
12
|
不要仅输出下一个提示词后结束 `orchestrate`/`resume`。不要因进入业务代码阶段而退出主控;应把实现交给专项 skill,并在返回后继续核验。
|
|
13
13
|
|
|
14
|
-
连续阶段自动推进时累积 Ticket 同步和 Git
|
|
14
|
+
连续阶段自动推进时累积 Ticket 同步和 Git 判断证据,在阶段退出、人工暂停、handoff、进入实现、合并或发布边界集中 checkpoint。发生阻塞、责任人变化或资产需要单独批准时立即落 checkpoint,不因合并记录而丢失阶段因果关系。
|
|
15
15
|
|
|
16
16
|
## 执行成本
|
|
17
17
|
|
|
@@ -5,6 +5,8 @@ description: Use when a YSS feature has product-design impact on a primary flow,
|
|
|
5
5
|
|
|
6
6
|
# YSS Prototype Stage
|
|
7
7
|
|
|
8
|
+
已有生命周期资产优先用 `scripts/contract view <资产> --kind <类型>` 阅读;执行任务用 `--profile task --unit <ID>`,绑定与校验明细用 `--profile full`。视图不授予执行权限,仍按本 Skill 的原始来源和批准门禁处理。类型、准备和迁移见 `docs/process/contract-reading.md`。
|
|
9
|
+
|
|
8
10
|
把产品设计影响收敛为跨 Agent 一致的原型交付物、证据和生命周期回流合同。它不替代 `yss-product-lifecycle` 的门禁裁决,也不把原型当作生产前端代码。
|
|
9
11
|
|
|
10
12
|
文档输出时按 `lifecycle-document-output` 条件调用 `i-have-adhd`,读取 `docs/process/document-writing.md`;作用域仅限当前产物,派发时传递条件及引用。
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createHash } from "node:crypto";
|
|
3
|
-
import { existsSync } from "
|
|
4
|
-
import { mkdir,
|
|
3
|
+
import { existsSync, readFile, readdir } from "../../../../scripts/lib/validation-phase.mjs";
|
|
4
|
+
import { mkdir, writeFile } from "node:fs/promises";
|
|
5
5
|
import path from "node:path";
|
|
6
6
|
import { pathToFileURL } from "node:url";
|
|
7
7
|
import { parseDocument, stringify } from "../../../../scripts/vendor/yaml.mjs";
|
|
@@ -5,6 +5,8 @@ description: 编排 Plan 到 Spec 入口的方案决策与业务边界、协作
|
|
|
5
5
|
|
|
6
6
|
# YSS Stage Decision
|
|
7
7
|
|
|
8
|
+
已有生命周期资产优先用 `scripts/contract view <资产> --kind <类型>` 阅读;执行任务用 `--profile task --unit <ID>`,绑定与校验明细用 `--profile full`。视图不授予执行权限,仍按本 Skill 的原始来源和批准门禁处理。类型、准备和迁移见 `docs/process/contract-reading.md`。
|
|
9
|
+
|
|
8
10
|
`yss-stage-decision` 是由生命周期主控调度的上游决策技能,负责把需求、产品、商务输入和业务边界与规则设计结果整理成可审查、可版本化、可被下游消费的方案决策包。它不替代生命周期主控,也不生成产品代码、原型、OpenAPI 或垂直切片 Ticket。
|
|
9
11
|
|
|
10
12
|
文档输出时按 `lifecycle-document-output` 条件调用 `i-have-adhd`,读取 `docs/process/document-writing.md`;作用域仅限当前产物,派发时传递条件及引用。
|