create-yss-spec 3.4.9 → 3.5.0
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 +2 -2
- package/package.json +1 -1
- package/src/api/_sync-service.js +111 -18
- package/src/cli/args.js +1 -0
- package/src/cli/help.js +10 -1
- package/src/cli/index.js +3 -0
- package/src/cli/prompts.js +5 -1
- package/src/cli/router.js +2 -0
- package/src/commands/attach.js +12 -2
- package/src/commands/init.js +2 -0
- package/src/commands/skills.js +253 -0
- package/src/commands/sync.js +3 -0
- package/src/family-identity.js +1 -1
- package/src/template/asset-runtime.js +220 -0
- package/src/template/attach-planner.js +5 -0
- package/src/template/distribution-runtime.js +165 -0
- package/src/template/instance-runtime.js +76 -29
- package/src/template/ownership-policy.js +17 -1
- package/src/template/prune-planner.js +6 -1
- package/src/template/sync-planner.js +8 -0
- package/src/template/verification-runtime.js +56 -1
- package/src/validation/metadata.js +24 -1
- package/template/.agents/skills/.strategic-design-skills-manifest.json +1 -1
- package/template/.agents/skills/yss-cache/SKILL.md +6 -5
- package/template/.agents/skills/yss-cache/references/annotations.md +3 -1
- package/template/.agents/skills/yss-cache/references/architecture.md +4 -2
- package/template/.agents/skills/yss-cache/references/configuration.md +6 -3
- package/template/.agents/skills/yss-cache/references/jetcache.md +21 -0
- package/template/.agents/skills/yss-cache/references/redis-fallback.md +5 -3
- package/template/.agents/skills/yss-cache/references/verification.md +10 -4
- package/template/.agents/skills/yss-cache/scripts/verify-cache-component.sh +26 -20
- package/template/.agents/skills/yss-distributed-id/SKILL.md +14 -58
- package/template/.agents/skills/yss-distributed-id/agents/openai.yaml +2 -2
- package/template/.agents/skills/yss-distributed-id/references/README.md +11 -47
- package/template/.agents/skills/yss-implementation-contract-compiler/SKILL.md +2 -0
- package/template/.agents/skills/yss-mybatis/SKILL.md +14 -2
- 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 +68 -5
- package/template/.agents/skills/yss-product-lifecycle/references/orchestration.md +2 -2
- package/template/.agents/skills/yss-product-lifecycle/references/state-model.md +8 -8
- package/template/.agents/skills/yss-prototype-stage/SKILL.md +4 -2
- package/template/.agents/skills/yss-prototype-stage/scripts/visual-baseline-contract.mjs +2 -2
- package/template/.agents/skills/yss-repository/SKILL.md +1 -0
- 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-cache/SKILL.md +6 -5
- package/template/.codex/skills/yss-cache/references/annotations.md +3 -1
- package/template/.codex/skills/yss-cache/references/architecture.md +4 -2
- package/template/.codex/skills/yss-cache/references/configuration.md +6 -3
- package/template/.codex/skills/yss-cache/references/jetcache.md +21 -0
- package/template/.codex/skills/yss-cache/references/redis-fallback.md +5 -3
- package/template/.codex/skills/yss-cache/references/verification.md +10 -4
- package/template/.codex/skills/yss-cache/scripts/verify-cache-component.sh +26 -20
- package/template/.codex/skills/yss-distributed-id/SKILL.md +14 -58
- package/template/.codex/skills/yss-distributed-id/agents/openai.yaml +2 -2
- package/template/.codex/skills/yss-distributed-id/references/README.md +11 -47
- package/template/.codex/skills/yss-implementation-contract-compiler/SKILL.md +2 -0
- package/template/.codex/skills/yss-mybatis/SKILL.md +14 -2
- 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 +68 -5
- package/template/.codex/skills/yss-product-lifecycle/references/orchestration.md +2 -2
- package/template/.codex/skills/yss-product-lifecycle/references/state-model.md +8 -8
- package/template/.codex/skills/yss-prototype-stage/SKILL.md +4 -2
- package/template/.codex/skills/yss-prototype-stage/scripts/visual-baseline-contract.mjs +2 -2
- package/template/.codex/skills/yss-repository/SKILL.md +1 -0
- 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-cache/SKILL.md +6 -5
- package/template/.cursor/skills/yss-cache/references/annotations.md +3 -1
- package/template/.cursor/skills/yss-cache/references/architecture.md +4 -2
- package/template/.cursor/skills/yss-cache/references/configuration.md +6 -3
- package/template/.cursor/skills/yss-cache/references/jetcache.md +21 -0
- package/template/.cursor/skills/yss-cache/references/redis-fallback.md +5 -3
- package/template/.cursor/skills/yss-cache/references/verification.md +10 -4
- package/template/.cursor/skills/yss-cache/scripts/verify-cache-component.sh +26 -20
- package/template/.cursor/skills/yss-distributed-id/SKILL.md +14 -58
- package/template/.cursor/skills/yss-distributed-id/agents/openai.yaml +2 -2
- package/template/.cursor/skills/yss-distributed-id/references/README.md +11 -47
- package/template/.cursor/skills/yss-implementation-contract-compiler/SKILL.md +2 -0
- package/template/.cursor/skills/yss-mybatis/SKILL.md +14 -2
- 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 +68 -5
- package/template/.cursor/skills/yss-product-lifecycle/references/orchestration.md +2 -2
- package/template/.cursor/skills/yss-product-lifecycle/references/state-model.md +8 -8
- package/template/.cursor/skills/yss-prototype-stage/SKILL.md +4 -2
- package/template/.cursor/skills/yss-prototype-stage/scripts/visual-baseline-contract.mjs +2 -2
- package/template/.cursor/skills/yss-repository/SKILL.md +1 -0
- 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-cache/SKILL.md +6 -5
- package/template/.pi/skills/yss-cache/references/annotations.md +3 -1
- package/template/.pi/skills/yss-cache/references/architecture.md +4 -2
- package/template/.pi/skills/yss-cache/references/configuration.md +6 -3
- package/template/.pi/skills/yss-cache/references/jetcache.md +21 -0
- package/template/.pi/skills/yss-cache/references/redis-fallback.md +5 -3
- package/template/.pi/skills/yss-cache/references/verification.md +10 -4
- package/template/.pi/skills/yss-cache/scripts/verify-cache-component.sh +26 -20
- package/template/.pi/skills/yss-distributed-id/SKILL.md +14 -58
- package/template/.pi/skills/yss-distributed-id/agents/openai.yaml +2 -2
- package/template/.pi/skills/yss-distributed-id/references/README.md +11 -47
- package/template/.pi/skills/yss-implementation-contract-compiler/SKILL.md +2 -0
- package/template/.pi/skills/yss-mybatis/SKILL.md +14 -2
- 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 +68 -5
- package/template/.pi/skills/yss-product-lifecycle/references/orchestration.md +2 -2
- package/template/.pi/skills/yss-product-lifecycle/references/state-model.md +8 -8
- package/template/.pi/skills/yss-prototype-stage/SKILL.md +4 -2
- package/template/.pi/skills/yss-prototype-stage/scripts/visual-baseline-contract.mjs +2 -2
- package/template/.pi/skills/yss-repository/SKILL.md +1 -0
- 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 +3 -5
- package/template/docs/agents/issue-tracker.md +7 -0
- package/template/docs/agents/skill-migrations.md +4 -0
- package/template/docs/agents/yss-skill-registry.yaml +7 -6
- package/template/docs/design/README.md +0 -1
- package/template/docs/design/design.md +2 -2
- package/template/docs/design/templates/interaction-spec-template.md +1 -1
- package/template/docs/engineering/evidence/aliyun-artifact-resolution.json +446 -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/design-md +2 -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/design-md.mjs +230 -0
- 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 +10 -3
- package/template/scripts/lib/skill-supply-chain.mjs +33 -14
- 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/scripts/verify-project-instance +11 -10
- package/template/skills-lock.json +17 -32
- package/template.manifest.json +18 -3
- package/template.snapshot.json +5 -5
- package/template/.agents/skills/grill-me/SKILL.md +0 -7
- package/template/.agents/skills/grill-me/agents/openai.yaml +0 -5
- package/template/.agents/skills/yss-distributed-id/assets/AutoIdInterceptor.java +0 -246
- package/template/.agents/skills/yss-distributed-id/assets/EnableDistributedId.java +0 -25
- package/template/.agents/skills/yss-distributed-id/assets/LeafConf.java +0 -36
- package/template/.codex/skills/grill-me/SKILL.md +0 -7
- package/template/.codex/skills/grill-me/agents/openai.yaml +0 -5
- package/template/.codex/skills/yss-distributed-id/assets/AutoIdInterceptor.java +0 -246
- package/template/.codex/skills/yss-distributed-id/assets/EnableDistributedId.java +0 -25
- package/template/.codex/skills/yss-distributed-id/assets/LeafConf.java +0 -36
- package/template/.cursor/skills/grill-me/SKILL.md +0 -7
- package/template/.cursor/skills/grill-me/agents/openai.yaml +0 -5
- package/template/.cursor/skills/yss-distributed-id/assets/AutoIdInterceptor.java +0 -246
- package/template/.cursor/skills/yss-distributed-id/assets/EnableDistributedId.java +0 -25
- package/template/.cursor/skills/yss-distributed-id/assets/LeafConf.java +0 -36
- package/template/.pi/skills/grill-me/SKILL.md +0 -7
- package/template/.pi/skills/grill-me/agents/openai.yaml +0 -5
- package/template/.pi/skills/yss-distributed-id/assets/AutoIdInterceptor.java +0 -246
- package/template/.pi/skills/yss-distributed-id/assets/EnableDistributedId.java +0 -25
- package/template/.pi/skills/yss-distributed-id/assets/LeafConf.java +0 -36
- package/template/docs/agents/yss-plugin-dependency-contract.md +0 -45
- package/template/docs/api/.gitkeep +0 -0
- package/template/docs/api/specs/.gitkeep +0 -0
- package/template/docs/architecture/.gitkeep +0 -0
- package/template/docs/design/facts/antdv-next/1.5.2/cli-help.txt +0 -38
- package/template/docs/design/facts/antdv-next/1.5.2/component-list.json +0 -434
- package/template/docs/design/facts/antdv-next/1.5.2/components/Alert/demo-basic.json +0 -7
- package/template/docs/design/facts/antdv-next/1.5.2/components/Alert/info.json +0 -246
- package/template/docs/design/facts/antdv-next/1.5.2/components/Alert/semantic.json +0 -40
- package/template/docs/design/facts/antdv-next/1.5.2/components/Alert/token.json +0 -32
- package/template/docs/design/facts/antdv-next/1.5.2/components/Button/demo-basic.json +0 -7
- package/template/docs/design/facts/antdv-next/1.5.2/components/Button/info.json +0 -190
- package/template/docs/design/facts/antdv-next/1.5.2/components/Button/semantic.json +0 -20
- package/template/docs/design/facts/antdv-next/1.5.2/components/Button/token.json +0 -256
- package/template/docs/design/facts/antdv-next/1.5.2/components/Input/demo-basic.json +0 -7
- package/template/docs/design/facts/antdv-next/1.5.2/components/Input/info.json +0 -460
- package/template/docs/design/facts/antdv-next/1.5.2/components/Input/semantic.json +0 -70
- package/template/docs/design/facts/antdv-next/1.5.2/components/Input/token.json +0 -123
- package/template/docs/design/facts/antdv-next/1.5.2/components/Modal/demo-basic.json +0 -7
- package/template/docs/design/facts/antdv-next/1.5.2/components/Modal/info.json +0 -646
- package/template/docs/design/facts/antdv-next/1.5.2/components/Modal/semantic.json +0 -50
- package/template/docs/design/facts/antdv-next/1.5.2/components/Modal/token.json +0 -130
- package/template/docs/design/facts/antdv-next/1.5.2/components/Select/demo-basic.json +0 -7
- package/template/docs/design/facts/antdv-next/1.5.2/components/Select/info.json +0 -640
- package/template/docs/design/facts/antdv-next/1.5.2/components/Select/semantic.json +0 -70
- package/template/docs/design/facts/antdv-next/1.5.2/components/Select/token.json +0 -172
- package/template/docs/design/facts/antdv-next/1.5.2/components/Table/demo-basic.json +0 -7
- package/template/docs/design/facts/antdv-next/1.5.2/components/Table/info.json +0 -1010
- package/template/docs/design/facts/antdv-next/1.5.2/components/Table/semantic.json +0 -70
- package/template/docs/design/facts/antdv-next/1.5.2/components/Table/token.json +0 -263
- package/template/docs/design/facts/antdv-next/1.5.2/components/Tag/demo-basic.json +0 -7
- package/template/docs/design/facts/antdv-next/1.5.2/components/Tag/info.json +0 -321
- package/template/docs/design/facts/antdv-next/1.5.2/components/Tag/semantic.json +0 -25
- package/template/docs/design/facts/antdv-next/1.5.2/components/Tag/token.json +0 -25
- package/template/docs/design/facts/antdv-next/1.5.2/design-md.json +0 -3
- package/template/docs/design/facts/antdv-next/1.5.2/manifest.json +0 -215
- package/template/docs/design/facts/antdv-next/1.5.2/resolution-probe.json +0 -5
- package/template/docs/design/prototypes/.gitkeep +0 -1
- package/template/docs/implementation/.gitkeep +0 -1
- package/template/docs/plan/IDEATION.md +0 -96
- package/template/docs/process/PDCA-SCRUM.md +0 -10
- package/template/docs/process/harness-executive-blueprint.md +0 -10
- package/template/docs/releases/.gitkeep +0 -1
- package/template/docs/requirements/README.md +0 -85
- package/template/docs/requirements/tickets/.gitkeep +0 -1
- package/template/docs/templates/agent-brief-template.md +0 -46
- package/template/docs/templates/architecture-proposal-template.md +0 -18
- package/template/docs/templates/implementation-plan-template.md +0 -16
- package/template/docs/templates/implementation-routing-template.md +0 -350
- package/template/docs/templates/requirement-freeze-template.md +0 -63
- package/template/docs/templates/risk-register-template.md +0 -11
- package/template/docs/templates/user-story-template.md +0 -20
- package/template/docs/testing/README.md +0 -110
|
@@ -1,350 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
pipeline: <feature-id>
|
|
3
|
-
stage: implementation-routing
|
|
4
|
-
status: draft
|
|
5
|
-
owner: ai
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
# <功能名称>实现路由记录
|
|
9
|
-
|
|
10
|
-
> 适用场景:Spec、OpenAPI Freeze / 无 API 影响记录、Design Review 和垂直切片 Ticket 已就绪后,进入实现前。
|
|
11
|
-
> 本文记录契约状态、Ticket 状态、YSS skill 最小集合、测试策略和回滚点,不替代垂直切片 Ticket 或实施计划。
|
|
12
|
-
> 实现合同编译器 只能生成 `draft`、`blocked` 或 `ready-for-lifecycle-review`;不得自行写入 `approved`、`ready-for-agent` 或 `completed`。合同批准、持久化和 Ticket 状态推进由生命周期编排器负责。
|
|
13
|
-
|
|
14
|
-
## 1. 输入材料
|
|
15
|
-
|
|
16
|
-
| 资产 | 路径 / 链接 | 状态 | 备注 |
|
|
17
|
-
|------|-------------|------|------|
|
|
18
|
-
| 垂直切片 Ticket | | | |
|
|
19
|
-
| OpenAPI Freeze / 无 API 影响记录 | | | |
|
|
20
|
-
| OpenSpec-style Spec Delta(条件必需) | | | 仅 API、状态机、数据模型、跨端、新模块或高风险变更需要 |
|
|
21
|
-
| Design Review | | | |
|
|
22
|
-
| 实现仓库 / 实现位置 | | | |
|
|
23
|
-
| 前后端工程存在性判定 | | | 记录 frontend / backend 是否已存在且可复用 |
|
|
24
|
-
| 工程路径策略 | | | Harness 内使用 `apps/backend/<project>/` / `apps/frontend/<project>/`;外部仓库记录真实项目根 |
|
|
25
|
-
| `垂直切片 Ticket 状态` | | | ready / blocked / in-progress |
|
|
26
|
-
|
|
27
|
-
## 2. 实现前门禁
|
|
28
|
-
|
|
29
|
-
| 检查项 | 结果 | 备注 |
|
|
30
|
-
|--------|------|------|
|
|
31
|
-
| Spec 验收标准已可追溯 | 是 / 否 | |
|
|
32
|
-
| OpenAPI Freeze 或无 API 影响记录已完成 | 是 / 否 | |
|
|
33
|
-
| Spec Delta 已补齐或明确不需要 | 是 / 否 / 不适用 | |
|
|
34
|
-
| Design Review 阻断项已关闭 | 是 / 否 / 不适用 | |
|
|
35
|
-
| 垂直切片 Ticket 已拆到端到端可验收 | 是 / 否 | |
|
|
36
|
-
| 实现仓库 / 实现位置已登记 | 是 / 否 | |
|
|
37
|
-
| 受影响 frontend 工程已存在可复用,或已登记 `scaffold_status=required` 并确认外部脚手架目标 | 是 / 否 / 不适用 | |
|
|
38
|
-
| 受影响 backend 工程已存在可复用,或已登记 `scaffold_status=required` 并确认外部脚手架目标 | 是 / 否 / 不适用 | |
|
|
39
|
-
| 缺失工程时已路由到对应脚手架 skill | 是 / 否 / 不适用 | `yss-ddd-scaffold-generator` / `yss-frontend-scaffold-generator` |
|
|
40
|
-
| Harness 内项目根路径符合 `apps/<backend|frontend>/<project>/` | 是 / 否 / 不适用 | `apps/backend/`、`apps/frontend/` 仅为容器 |
|
|
41
|
-
| 未使用 `app/backend/`、`app/frontend/` 及其子路径 | 是 / 否 / 不适用 | 命中即阻断生成和实现 |
|
|
42
|
-
| 原型确认后先完成后端脚手架,再进入业务代码路由 | 是 / 否 / 不适用 | `backend_scaffold_policy_satisfied` |
|
|
43
|
-
| 后端脚手架合同字段完整且版本当前 | 是 / 否 / 不适用 | schema v2:`scaffold_request_id`、项目/输出目录、实现合同编译器 draft、生命周期批准、base package、Maven 坐标、target DDD/Profile、initialize-only、允许写路径、预期证据、验证命令 |
|
|
44
|
-
| 后端构建 / 测试 / OpenAPI / CI 命令均使用项目根目录 `./mvnw ...`,或已记录受控例外 | 是 / 否 / 不适用 | 裸 `mvn ...` 默认为规范偏离 |
|
|
45
|
-
| 持久化文档正文和章节标题已转换为中文,仅保留必要英文技术标识 / metadata | 是 / 否 | 英文 skill / 模板不得原样落地为交付文档 |
|
|
46
|
-
| YSS skill 路由已完成 | 是 / 否 | |
|
|
47
|
-
| fresh verification 方式已明确 | 是 / 否 | |
|
|
48
|
-
|
|
49
|
-
## 2.1 Slice Implementation Contract 身份与状态
|
|
50
|
-
|
|
51
|
-
| 字段 | 内容 |
|
|
52
|
-
|---|---|
|
|
53
|
-
| schema_version | `1` |
|
|
54
|
-
| contract_id | |
|
|
55
|
-
| contract_version | |
|
|
56
|
-
| slice_id | |
|
|
57
|
-
| status | `draft` / `blocked` / `ready-for-lifecycle-review` |
|
|
58
|
-
| compiled_by | `yss-implementation-contract-compiler` |
|
|
59
|
-
| 生命周期批准状态 | pending / approved / rejected;由生命周期编排器填写 |
|
|
60
|
-
| 合同持久化路径 | |
|
|
61
|
-
|
|
62
|
-
### 生命周期引用与就绪性
|
|
63
|
-
|
|
64
|
-
| lifecycle_ref | 路径 / 链接 | 状态 | 阻塞或过期说明 |
|
|
65
|
-
|---|---|---|---|
|
|
66
|
-
| Spec | | | |
|
|
67
|
-
| 垂直切片 Ticket | | | |
|
|
68
|
-
| 需求冻结 | | | |
|
|
69
|
-
| 原型确认 / 状态矩阵 | | | 无 UI 影响时记录 `not-applicable` 及原因 |
|
|
70
|
-
| OpenAPI Freeze / 无 API 影响记录 | | | |
|
|
71
|
-
| 系统 / 数据架构审查 | | | |
|
|
72
|
-
| Build Architecture Checklist | | | |
|
|
73
|
-
|
|
74
|
-
| readiness | 内容 |
|
|
75
|
-
|---|---|
|
|
76
|
-
| blockers | |
|
|
77
|
-
| stale_inputs | |
|
|
78
|
-
| not_applicable | |
|
|
79
|
-
|
|
80
|
-
任一适用输入为 `missing`、`stale` 或未批准时,合同状态必须为 `blocked`,并写明回退阶段。
|
|
81
|
-
|
|
82
|
-
## 2.2 Common 子合同
|
|
83
|
-
|
|
84
|
-
| 字段 | 内容 |
|
|
85
|
-
|---|---|
|
|
86
|
-
| impacted_areas | |
|
|
87
|
-
| implementation_path_policy | `harness-apps-multi-project` / `external-repository-native` / `git-submodule-harness-apps` |
|
|
88
|
-
| project_roots | Harness 内与 `git-submodule` 填写 `apps/backend/<project>/` / `apps/frontend/<project>/`;外部仓库填写真实项目根 |
|
|
89
|
-
| required_skills | |
|
|
90
|
-
| optional_skills | |
|
|
91
|
-
| unavailable_skills | 写明 provider、fallback 和阻断结论;不得静默跳过 |
|
|
92
|
-
| allowed_write_paths | |
|
|
93
|
-
| forbidden_patterns | |
|
|
94
|
-
| expected_evidence_files | |
|
|
95
|
-
| verification_commands | |
|
|
96
|
-
| human_review_points | |
|
|
97
|
-
| full_reroute_triggers | 新 API/schema、状态机、数据模型、写目录、仓库、skill、风险、seam、交付顺序或其他未冻结行为等变化 |
|
|
98
|
-
| quality_baseline_ref | 工程基线的 `baseline_id` / `baseline_version`;切片不得重新定义质量标准 |
|
|
99
|
-
| context_plan | 必需上下文、按需上下文、停止规则和缺失动作 |
|
|
100
|
-
| doubt_driven_review | 高风险影响的主张、反证、证据、残余风险和审查引用;未命中时 `not-applicable` |
|
|
101
|
-
|
|
102
|
-
| 不适用 skill | 原因 |
|
|
103
|
-
|---|---|
|
|
104
|
-
| | |
|
|
105
|
-
|
|
106
|
-
### Context Plan(上下文工程)
|
|
107
|
-
|
|
108
|
-
| 字段 | 内容 |
|
|
109
|
-
|---|---|
|
|
110
|
-
| required_context_refs | `CONTEXT.md`、已批准 Spec、当前 Slice Contract、适用 ADR / 工程基线 |
|
|
111
|
-
| on_demand_context_refs | 命中影响面后再加载的专项 references、实现仓库文件和历史证据 |
|
|
112
|
-
| context_stop_rule | `minimal-sufficient-evidence` |
|
|
113
|
-
| missing_context_action | `blocked` / `reroute`;不得猜测补齐 |
|
|
114
|
-
|
|
115
|
-
### Doubt-Driven 高风险反证
|
|
116
|
-
|
|
117
|
-
| 字段 | 内容 |
|
|
118
|
-
|---|---|
|
|
119
|
-
| status | `not-applicable` / `required` / `completed` / `blocked` |
|
|
120
|
-
| trigger_impacts | API、数据迁移、跨仓契约、发布回滚、实际安全行为、生命周期 / 生成语义 |
|
|
121
|
-
| claim / counterclaim | | |
|
|
122
|
-
| evidence_refs | |
|
|
123
|
-
| residual_risks | |
|
|
124
|
-
| reviewer_ref | |
|
|
125
|
-
|
|
126
|
-
## 3. YSS skill 最小集合
|
|
127
|
-
|
|
128
|
-
| 领域 | skill | 使用原因 | 是否必需 |
|
|
129
|
-
|------|-------|----------|----------|
|
|
130
|
-
| 前端 | | | 是 / 否 |
|
|
131
|
-
| 后端 | | | 是 / 否 |
|
|
132
|
-
| API / 契约 | | | 是 / 否 |
|
|
133
|
-
| 测试 / 验证 | | | 是 / 否 |
|
|
134
|
-
|
|
135
|
-
### 3.1 Frontend 子合同
|
|
136
|
-
|
|
137
|
-
> 有 UI 影响时,批准后的产品设计、正式原型和状态矩阵是必填输入;缺失时合同必须为 `blocked`。无 UI 影响时填写 `not-applicable` 及原因。
|
|
138
|
-
|
|
139
|
-
| 字段 | 内容 |
|
|
140
|
-
|---|---|
|
|
141
|
-
| status | required / not-applicable |
|
|
142
|
-
| required_skills | |
|
|
143
|
-
| approved_prototype_ref | |
|
|
144
|
-
| state_matrix_ref | |
|
|
145
|
-
| visual_baseline_ref | `visual-baseline.yaml` 路径、版本与 digest |
|
|
146
|
-
| visual_baseline_case_ids | 当前切片实际消费的 case_id;禁止目录 glob |
|
|
147
|
-
| generated_api_client_ref | |
|
|
148
|
-
| allowed_write_paths | |
|
|
149
|
-
| component_test_seams | loading / empty / error / permission / 其他公开 seam |
|
|
150
|
-
| e2e_paths | |
|
|
151
|
-
|
|
152
|
-
### 3.2 Backend Slice Implementation Contract
|
|
153
|
-
|
|
154
|
-
> 任一后端切片写业务代码前必须填写本合同;没有后端影响时标记 `not-applicable` 并说明原因。合同缺少必填项时,结论必须为 `Blocked`,不得进入实现。
|
|
155
|
-
|
|
156
|
-
| 项 | 内容 |
|
|
157
|
-
|---|---|
|
|
158
|
-
| slice_id | |
|
|
159
|
-
| status | required / not-applicable |
|
|
160
|
-
| affected_layers | Adapter / Application / Domain / Infrastructure / Bootstrap / not-applicable |
|
|
161
|
-
| required_skills | `yss-domain` / `yss-application` / `yss-repository` / `yss-mybatis` / `yss-web-controller` / `yss-dto` / `mapstruct` / `lombok` / `alibaba-java-code-style` / other |
|
|
162
|
-
| application_boundary | |
|
|
163
|
-
| transaction_boundary | |
|
|
164
|
-
| persistence_strategy | |
|
|
165
|
-
| allowed_write_paths | |
|
|
166
|
-
| forbidden_patterns | 私自新建 / 混用 Result 包装;Controller 内部类或非约定包临时定义主要 DTO / VO;DTO 未按 `yss-dto` 继承 `CommandDTO` / `QueryDTO` / `PageQuery`;Controller 手工分页;Controller 穿透 Repository;InMemory Gateway 作为正式持久化;`BeanUtils.copyProperties` / 反射拷贝 / 重复手写 mapping;成片手写 POJO getter/setter/constructor/builder/logger;其他: |
|
|
167
|
-
| expected_evidence_files | |
|
|
168
|
-
| seam_deferred | |
|
|
169
|
-
| 人工确认项 | |
|
|
170
|
-
| verification_commands | 后端命令必须使用 `./mvnw ...`;如使用裸 `mvn ...`,必须在备注中记录受控例外原因 |
|
|
171
|
-
|
|
172
|
-
| 层级 | 必需 skill | 预期文件 / 证据 | 状态 |
|
|
173
|
-
|---|---|---|---|
|
|
174
|
-
| Adapter / Web | `yss-web-controller`、`yss-dto`、`mapstruct`、`lombok` | Controller、CMD / Query / VO、WebConvertor、统一响应包装、Lombok 注解和 MapStruct 转换证据 | pending / implemented / seam-deferred / violation / not-applicable |
|
|
175
|
-
| Application | `yss-application` | AppService / UseCase、事务边界、跨聚合协调、异常处理 | pending / implemented / seam-deferred / violation / not-applicable |
|
|
176
|
-
| Domain | `yss-domain`;术语 / 边界 / ADR 变化时增加 `domain-modeling` | Entity / ValueObject / DomainService / Gateway interface / 状态方法;命中通用建模时补 CONTEXT / ADR 证据 | pending / implemented / seam-deferred / violation / not-applicable |
|
|
177
|
-
| Infrastructure | `yss-repository`、`yss-mybatis`、`mapstruct`、`lombok` | PO、Repository、Convertor、GatewayImpl、Mapper / XML / 查询策略、Lombok 注解和 MapStruct 转换证据 | pending / implemented / seam-deferred / violation / not-applicable |
|
|
178
|
-
| Java 规范 | `alibaba-java-code-style` | 命名、异常、日志、ORM、Maven、单测和安全项审查记录 | pending / implemented / seam-deferred / violation / not-applicable |
|
|
179
|
-
|
|
180
|
-
### 3.3 Contract 子合同
|
|
181
|
-
|
|
182
|
-
| 字段 | 内容 |
|
|
183
|
-
|---|---|
|
|
184
|
-
| api_impact | true / false |
|
|
185
|
-
| freeze_ref | API 有影响时的 OpenAPI Freeze |
|
|
186
|
-
| no_api_impact_ref | API 无影响时的正式记录 |
|
|
187
|
-
| generated_clients | |
|
|
188
|
-
| contract_tests | |
|
|
189
|
-
| regeneration_commands | |
|
|
190
|
-
|
|
191
|
-
### 3.4 Cross-repo 子合同
|
|
192
|
-
|
|
193
|
-
| 字段 | 内容 |
|
|
194
|
-
|---|---|
|
|
195
|
-
| repositories | |
|
|
196
|
-
| delivery_order | |
|
|
197
|
-
| integration_verification | |
|
|
198
|
-
| rollback_order | |
|
|
199
|
-
|
|
200
|
-
### 3.5 后端门禁压力场景
|
|
201
|
-
|
|
202
|
-
| 场景 | 期望处理 |
|
|
203
|
-
|---|---|
|
|
204
|
-
| Agent 试图在 Controller 中新增内部 `CreateXCommand`、`XVO` 或私自新建 `PageResult` | 标记 `violation`;回到 `yss-web-controller` / `yss-dto` 补独立 DTO / VO / WebConvertor、复用既有响应包装或记录受控例外 |
|
|
205
|
-
| Agent 试图用 `InMemory*Gateway` 完成需要持久化的切片 | 仅允许 `seam-deferred`;必须写补齐切片、风险、人工确认项,不得作为正式持久化实现 |
|
|
206
|
-
| Agent 试图跳过 Repository / PO / Convertor,直接在 Application 中过滤集合 | 若切片需要持久化或查询策略,标记 `violation`;回到 `yss-repository` / `yss-mybatis` |
|
|
207
|
-
| Agent 试图用 `BeanUtils.copyProperties`、反射拷贝或大段手写字段赋值完成对象转换 | 标记 `violation`;回到 `mapstruct` / `yss-repository` / `yss-web-controller` 补 MapStruct Convertor,或记录受控例外、测试和 review 证据 |
|
|
208
|
-
| Agent 试图成片手写 POJO getter/setter、constructor、builder 或 logger | 标记 `violation`;回到 `lombok` 补注解,或记录受控例外、测试和 review 证据 |
|
|
209
|
-
| Agent 只写“符合 YSS”但没有列出 skill 证据和文件证据 | 标记 `violation`;不得进入 code review / 完成结论 |
|
|
210
|
-
| Agent 在后端 README、CI、Ticket、Review 或验证记录中使用 `mvn clean test` 等裸 Maven 命令 | 标记规范偏离;改为项目根目录 `./mvnw ...`,或记录既有仓库无法使用 wrapper 的受控例外 |
|
|
211
|
-
| Agent 将英文 skill 模板标题 / checklist 原样复制为持久化交付文档 | 标记规范偏离;正文、标题、审查结论、实施说明和 checkpoint 说明必须改为中文 |
|
|
212
|
-
|
|
213
|
-
## 4. 外部实现仓库
|
|
214
|
-
|
|
215
|
-
> 当前仓库默认不承载运行时代码。若用户明确选择 Harness 内实现,同源代码用 `harness-apps`;独立仓挂载用 `git-submodule`。两种项目根都必须是 `apps/backend/<project>/` 或 `apps/frontend/<project>/`;`apps/backend/`、`apps/frontend/` 不能作为项目根,`app/backend/`、`app/frontend/` 及其子路径禁止使用。
|
|
216
|
-
|
|
217
|
-
| repo_role | project_root | git_url | default_branch | working_branch | MR / PR | CI | test_command | build_command | 状态 |
|
|
218
|
-
|---|---|---|---|---|---|---|---|---|---|
|
|
219
|
-
| backend | `apps/backend/<project>/` 或外部真实路径 | | | | | | | | pending / ready / blocked / not-applicable |
|
|
220
|
-
| frontend | `apps/frontend/<project>/` 或外部真实路径 | | | | | | | | pending / ready / blocked / not-applicable |
|
|
221
|
-
| other | 真实路径 | | | | | | | | pending / ready / blocked / not-applicable |
|
|
222
|
-
|
|
223
|
-
说明:当前仓库默认作为 Harness / 研发管理仓库;前后端实现默认位于外部实现仓库。缺少实现仓库登记时,先使用 `implementation-repo-onboarding`,并按 `docs/templates/implementation-repo-registry-template.md` 补齐登记。
|
|
224
|
-
|
|
225
|
-
## 4.1 脚手架初始化判定
|
|
226
|
-
|
|
227
|
-
| 受影响端 | 是否已有可用工程 | scaffold_status | 目标是否确认 | 处理结论 | 使用 skill | 输出位置 / 仓库 | 备注 |
|
|
228
|
-
|---|---|---|---|---|---|---|---|
|
|
229
|
-
| backend | 是 / 否 / 不适用 | existing / required / initialized / not-applicable | 是 / 否 / 不适用 | 复用现有 / 初始化 / 阻塞 | `yss-ddd-scaffold-generator` / `yss-layered-mvc-scaffold-generator` / none | | 新建填写 gate、architecture_family、精确 Spring Boot 版本、decision_id 与 digest;既有工程填写登记值复用证据 |
|
|
230
|
-
| frontend | 是 / 否 / 不适用 | existing / required / initialized / not-applicable | 是 / 否 / 不适用 | 复用现有 / 初始化 / 阻塞 | `yss-frontend-scaffold-generator` / none | | |
|
|
231
|
-
|
|
232
|
-
脚手架输出位置必须回指具体项目根:后端为 `apps/backend/<project>/`,前端为 `apps/frontend/<project>/`;不得把 `apps/backend/`、`apps/frontend/` 容器根或任何 `app/backend/`、`app/frontend/` 路径作为生成目标。
|
|
233
|
-
|
|
234
|
-
## 4.2 人工确认结论
|
|
235
|
-
|
|
236
|
-
| 人工确认项 | 是否涉及 | 结论 | 证据 / 链接 | 补齐落点 |
|
|
237
|
-
|---|---|---|---|---|
|
|
238
|
-
| DDL / SQL / 数据库迁移 | 是 / 否 | 通过 / 草案 / 阻断 / 不适用 | | |
|
|
239
|
-
| 其他已明确的风险 / 人工确认 | 是 / 否 | 通过 / 草案 / 阻断 / 不适用 | 仅登记上游已经明确的事项 | |
|
|
240
|
-
|
|
241
|
-
### 4.3 后端脚手架工作单元
|
|
242
|
-
|
|
243
|
-
当 backend `scaffold_status=required` 时,生命周期先按领域复杂度推荐 DDD/MVC,并展示平台清单中的精确 Spring Boot / Java 版本,以批量决策表取得同一次用户确认并通过 `gate.backend-architecture-platform-approved`。选择写入 `scaffold-architecture-decisions.yaml`;缺失、未确认或 stale 时阻断。门禁通过后才进入对应的 DDD 战术设计或 MVC 技术设计,再登记 `controlled-generation` 工作单元。`domain-driven` 使用 `primary_skill=yss-ddd-scaffold-generator`,`layered-mvc` 使用 `primary_skill=yss-layered-mvc-scaffold-generator`。生成后执行对应基线校验和 `yss-implementation-contract-compiler` 合同重编译。`existing` / `initialized` 核验并复用当前登记架构与平台,不重复询问或生成;架构转换、平台升级另立迁移工作单元。
|
|
244
|
-
|
|
245
|
-
| 项 | 内容 |
|
|
246
|
-
|---|---|
|
|
247
|
-
| 前置 | `prototype_confirmation`、工程基线、实现仓库和脚手架目标已确认;`gate.backend-architecture-platform-approved` 已同时确认 DDD / MVC 与精确 Spring Boot 版本,`scaffold-architecture-decisions.yaml` digest 当前;实现合同编译器 schema v4 脚手架合同 draft 已经生命周期批准并持久化为结构化 JSON,生成器通过 `--contract-file` 消费 |
|
|
248
|
-
| 生成器 | `domain-driven` → `yss-ddd-scaffold-generator`;`layered-mvc` → `yss-layered-mvc-scaffold-generator` |
|
|
249
|
-
| 模式 | `controlled-generation` |
|
|
250
|
-
| Java / Maven 身份 | `base_package` 与 Maven `group_id` 分开登记;项目版本、父 POM GAV、`yss-components.version` 进入批准合同并原样传给 CLI |
|
|
251
|
-
| 允许生成 | DDD 的 Domain / Application / Infrastructure / Adapter / Bootstrap,或 MVC 的 server / service / repository 与能力解析出的 adapter / client / feign-client;以及 POM、配置、Wrapper 和非业务机械模板 |
|
|
252
|
-
| 禁止生成 | 业务规则、状态机、权限、事务、复杂查询、错误映射、业务字段和用户可见行为 |
|
|
253
|
-
| 生成选项 | 关闭 `--with-example`;生成器严格 initialize-only,非空目录、`--force`、旧项目迁移和当前模板升级均为 `unsupported` |
|
|
254
|
-
| Profile | DDD:`target-domain-model`;MVC:`layered-mvc-service`;Spring Boot / Java 使用用户确认且兼容清单验证通过的精确组合,不使用版本范围或 `latest` |
|
|
255
|
-
| 验证 | 使用一键生成验证入口,实际执行项目根目录 `./mvnw validate`、`./mvnw test`、`./mvnw package`;通过后仅为 `empty-scaffold-verified`,golden first slice 通过后才是 `first-slice-verified` |
|
|
256
|
-
| 后置 | 生成器内部工程基线校验、`yss-implementation-contract-compiler` 业务合同重编译、YSS Skill Execution Result |
|
|
257
|
-
|
|
258
|
-
所有后续生成代码必须绑定当前批准且版本一致的 Slice Implementation Contract、主 YSS skill、依赖闭包、允许写路径、预期证据和 Execution Result。业务行为必须使用 `behavior-tdd`;缺任一条件即阻断,不得以脚手架成功或时间压力豁免。
|
|
259
|
-
|
|
260
|
-
## 5. TDD 与验证策略
|
|
261
|
-
|
|
262
|
-
> 每个工作单元必须且只能选择 `behavior-tdd` 或 `controlled-generation`。领域规则、状态机、事务、复杂查询、权限 / 错误映射、页面交互和用户可见状态必须使用 `behavior-tdd`;`controlled-generation` 只用于机械脚手架、样板、冻结客户端和配置。
|
|
263
|
-
|
|
264
|
-
| work_unit_id | 验收行为 / 生成目标 | primary_skill | supporting_skills | tdd_mode | allowed_write_paths | expected_evidence | verification_commands | 状态 |
|
|
265
|
-
|---|---|---|---|---|---|---|---|---|
|
|
266
|
-
| | | | | behavior-tdd / controlled-generation | | | | pending / running / blocked / completed / stale |
|
|
267
|
-
|
|
268
|
-
### 5.1 `behavior-tdd` 工作单元
|
|
269
|
-
|
|
270
|
-
| work_unit_id | 已确认公开 seam | RED 证据 | GREEN 证据 | 合同回勾 |
|
|
271
|
-
|---|---|---|---|---|
|
|
272
|
-
| | | | | |
|
|
273
|
-
|
|
274
|
-
### 5.2 `controlled-generation` 工作单元
|
|
275
|
-
|
|
276
|
-
| work_unit_id | exception_reason | generator | generator_inputs | expected_files | verification_commands | behavior_tests_after_generation |
|
|
277
|
-
|---|---|---|---|---|---|---|
|
|
278
|
-
| | mechanical-scaffold / frozen-client / configuration / other | | | | | |
|
|
279
|
-
|
|
280
|
-
若生成内容包含状态变化、权限、业务过滤、事务或错误映射,必须拆分对应工作单元并改为 `behavior-tdd`。
|
|
281
|
-
|
|
282
|
-
| 层级 | 先失败测试 / 验证命令 | 通过标准 |
|
|
283
|
-
|------|------------------------|----------|
|
|
284
|
-
| Domain / Application | | |
|
|
285
|
-
| API / 契约 | | |
|
|
286
|
-
| 前端组件 | | |
|
|
287
|
-
| E2E / 关键路径 | | |
|
|
288
|
-
|
|
289
|
-
## 5.3 YSS Skill Execution Result 回填
|
|
290
|
-
|
|
291
|
-
> 每个结果必须引用当前 `contract_id` / `contract_version` 和 `work_unit_id`。只列计划命令、缺实际结果、`duration_ms` 或时间戳,不构成 fresh verification。
|
|
292
|
-
|
|
293
|
-
| schema_version | skill | slice_id | work_unit_id | status | consumed contract ref / version | changed_files | evidence_files | verification result / executed_at | constraint_results | seam_deferred | deviations | new_impacts | 结果文件引用 |
|
|
294
|
-
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
295
|
-
| `1` | | | | implemented / seam-deferred / drift / violation / not-applicable | | | | | | | | | |
|
|
296
|
-
|
|
297
|
-
汇总规则:
|
|
298
|
-
|
|
299
|
-
- `changed_files` 超出 `allowed_write_paths`,或 `expected_evidence_files` 缺失:标记 `violation`,阻断 build。
|
|
300
|
-
- `drift`:触发 Architecture Re-check;不得汇总为完成。
|
|
301
|
-
- `new_impacts` 非空、原 `not-applicable` 被推翻或合同关键输入变化:将合同及相关工作单元标记 `stale`,暂停实现并进入完整重路由或生命周期回退。
|
|
302
|
-
|
|
303
|
-
## 6. Subagent 执行计划
|
|
304
|
-
|
|
305
|
-
| task_id | 数字人角色 | runtime_id | core_skills(从角色表复制) | subagent 角色 | 责任范围 | 允许修改文件 / 模块 | 禁止事项 | 输出回填位置 |
|
|
306
|
-
|---|---|---|---|---|---|---|---|---|
|
|
307
|
-
| | role.frontend-engineer | runtime.skill-projection | 从 YAML `core_skills` 复制 | Explorer / Drafter / Worker / Reviewer / Verifier | frontend / backend / test / review / docs | | 不得 Freeze / 不得覆盖他人改动 / 不得会签自己的草稿 | |
|
|
308
|
-
|
|
309
|
-
| 并行风险 | 缓解措施 | 合并负责人 | 状态 |
|
|
310
|
-
|---|---|---|---|
|
|
311
|
-
| 写范围冲突 | 按文件 / 模块拆分,不重叠写入 | 主控 Agent | open / mitigated / blocked |
|
|
312
|
-
| 实现者自审 | Reviewer 必须独立于 Worker / Drafter | 主控 Agent | open / mitigated / blocked |
|
|
313
|
-
| 验证不足 | Verifier 执行 fresh verification 并记录命令 | 主控 Agent | open / mitigated / blocked |
|
|
314
|
-
|
|
315
|
-
| 子代理输出 | 主控采纳结论 | 未采纳原因 | 回填资产 |
|
|
316
|
-
|---|---|---|---|
|
|
317
|
-
| | 采纳 / 部分采纳 / 不采纳 / 需返工 | | |
|
|
318
|
-
|
|
319
|
-
## 7. 回滚点与风险
|
|
320
|
-
|
|
321
|
-
| 风险 | 回滚点 | 观察信号 | 负责人 |
|
|
322
|
-
|------|--------|----------|--------|
|
|
323
|
-
| | | | |
|
|
324
|
-
|
|
325
|
-
## 8. 完成标准
|
|
326
|
-
|
|
327
|
-
- [ ] 垂直切片 Ticket 完整,且状态允许进入实现。
|
|
328
|
-
- [ ] 统一合同包含 `contract_id` / `contract_version`、Common、Frontend、Backend、Contract 和 Cross-repo 子合同;不适用项均有原因。
|
|
329
|
-
- [ ] 生命周期编排器已批准并持久化合同;实现合同编译器 没有自行给出 `approved` 或 `ready-for-agent`。
|
|
330
|
-
- [ ] YSS skills 已最小化选择,没有绕过 Ticket、OpenAPI Freeze / 无 API 影响记录或必要的 Spec Delta。
|
|
331
|
-
- [ ] 后端切片如适用,已填写 `Backend Slice Implementation Contract`,并且 required skills、禁止模式、证据文件、延期 seam 和验证命令完整。
|
|
332
|
-
- [ ] 受影响外部实现仓库已登记,并绑定分支、MR / PR、CI 和验证命令。
|
|
333
|
-
- [ ] 受影响 frontend / backend 工程存在性已判定;0-1 缺失工程已登记 `scaffold_status=required`、确认外部脚手架目标并路由对应脚手架 skill。
|
|
334
|
-
- [ ] 原型确认后已满足 `backend_scaffold_policy_satisfied`;脚手架只生成工程骨架,所有后续生成代码均经批准合同和 YSS skill 路由。
|
|
335
|
-
- [ ] DDL / SQL / 数据库迁移及其他上游明确的人工确认结论已记录。
|
|
336
|
-
- [ ] `seam-deferred` 若存在,已填写风险、责任人、后续 Ticket、验证计划和目标版本 / 发布日期。
|
|
337
|
-
- [ ] 若使用 subagent,已记录任务包、写范围、独立 review、verification 命令和主控采纳结论。
|
|
338
|
-
- [ ] 每个切片包含测试命令、验证方式和回滚点。
|
|
339
|
-
- [ ] 每个工作单元均绑定唯一 TDD 模式,且 Execution Result 引用合同版本并包含实际验证结果和时间。
|
|
340
|
-
- [ ] `changed_files`、证据文件、`deviations`、`new_impacts`、`drift` 和 `violation` 已完成汇总核验;需重路由时合同已标记 `stale` 并暂停相关工作单元。
|
|
341
|
-
- [ ] 需要人工确认的事项已记录范围、责任人和结论。
|
|
342
|
-
|
|
343
|
-
## 9. 下一步门禁
|
|
344
|
-
|
|
345
|
-
- 实现合同编译器 结论:draft / blocked / ready-for-lifecycle-review
|
|
346
|
-
- 生命周期编排器结论:approved / rejected / pending
|
|
347
|
-
- 下一步:生命周期合同审查 / TDD 实现 / 完整重路由 / Architecture Re-check / 回到 系统 / 数据架构设计 / 回到垂直切片
|
|
348
|
-
- 阻断项:
|
|
349
|
-
- stale 合同 / 工作单元:
|
|
350
|
-
- 恢复条件:
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
pipeline: <feature-id>
|
|
3
|
-
stage: requirement-freeze
|
|
4
|
-
status: draft
|
|
5
|
-
owner: ai
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
# <功能名称>需求冻结记录
|
|
9
|
-
|
|
10
|
-
> 适用场景:Spec 初稿经过产品总体设计 / 功能架构、产品设计 / 原型评审后,需要冻结可进入 API 影响分析 / 契约草案和工程设计的范围。
|
|
11
|
-
> 本文记录最终范围、回填项、非目标和开放问题,不替代 Spec。
|
|
12
|
-
|
|
13
|
-
## 1. 输入材料
|
|
14
|
-
|
|
15
|
-
| 资产 | 路径 / 链接 | 状态 | 备注 |
|
|
16
|
-
|------|-------------|------|------|
|
|
17
|
-
| Spec 初稿 | | | |
|
|
18
|
-
| 产品总体设计 / 功能架构 | | | 必需 |
|
|
19
|
-
| 产品设计 / 交互说明 | | | |
|
|
20
|
-
| 原型交付物 | `docs/.scratch/<feature>/design/prototypes/index.html` 或稳定 URL | | 有产品设计影响时必需;按 H1/H2 档位提供 Prototype Evidence schema v4、Visual Baseline schema v1、浏览器、Design QA 与条件 AntD 事实;真实组件待验事项进入前端实现计划 |
|
|
21
|
-
| Prototype Review | | | |
|
|
22
|
-
| CONTEXT 术语 | | | 业务术语须含 PascalCase `英文标识` |
|
|
23
|
-
|
|
24
|
-
## 2. 冻结范围
|
|
25
|
-
|
|
26
|
-
| 能力 | 是否冻结进入本轮 | 优先级 | 验收标准链接 / 摘要 |
|
|
27
|
-
|------|------------------|--------|---------------------|
|
|
28
|
-
| | 是 / 否 | P0 / P1 / P2 | |
|
|
29
|
-
|
|
30
|
-
## 3. Spec 回填完成情况
|
|
31
|
-
|
|
32
|
-
| 回填项 | 来源 | 处理结果 | 是否阻断 |
|
|
33
|
-
|--------|------|----------|----------|
|
|
34
|
-
| | 产品设计 / 原型评审 / 架构 | 已回填 / 延后 / 拒绝 | 是 / 否 |
|
|
35
|
-
|
|
36
|
-
## 4. 非目标与延后项
|
|
37
|
-
|
|
38
|
-
| 项目 | 原因 | 后续触发条件 |
|
|
39
|
-
|------|------|--------------|
|
|
40
|
-
| | | |
|
|
41
|
-
|
|
42
|
-
## 5. OpenAPI 与架构影响
|
|
43
|
-
|
|
44
|
-
| 影响类型 | 结论 | 下一步 |
|
|
45
|
-
|----------|------|--------|
|
|
46
|
-
| OpenAPI | 有 / 无 / 待确认 | API 影响分析 / 契约草案 / 无 API 影响记录 / 阻断 |
|
|
47
|
-
| 工程基线 | 有 / 无 | 工程基线审查 / 跳过 |
|
|
48
|
-
| 系统架构 | 有 / 无 | 系统概要设计 / 跳过 |
|
|
49
|
-
| 数据架构 | 有 / 无 | 数据架构 / 跳过 |
|
|
50
|
-
| 高风险变更 / 人工确认项 | 有 / 无 | 需确认 / 不适用 |
|
|
51
|
-
|
|
52
|
-
## 6. 完成标准
|
|
53
|
-
|
|
54
|
-
- [ ] Spec 已吸收产品总体设计 / 功能架构、产品设计、低保真原型评审和原型交付物暴露的阻断项。
|
|
55
|
-
- [ ] 本轮做什么、不做什么、延后什么已经明确。
|
|
56
|
-
- [ ] OpenAPI、工程基线、系统架构、数据架构、风险影响已有明确结论。
|
|
57
|
-
- [ ] 可进入 API 影响分析 / 契约草案 / 工程基线,或阻断项已列出。
|
|
58
|
-
|
|
59
|
-
## 7. 下一步门禁
|
|
60
|
-
|
|
61
|
-
- 结论:Approved / Blocked
|
|
62
|
-
- 下一步:API 影响分析 / 契约草案 / 工程基线 / 回到 Spec 或产品设计
|
|
63
|
-
- 阻断项:
|
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
# 测试策略 (Testing Strategy)
|
|
2
|
-
|
|
3
|
-
> **覆盖全流程:单元 → 集成 → E2E → 性能 → 安全**
|
|
4
|
-
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
## 测试金字塔
|
|
8
|
-
|
|
9
|
-
```
|
|
10
|
-
┌──────┐
|
|
11
|
-
│ E2E │ ← Playwright (关键流程 100% 覆盖)
|
|
12
|
-
├──────┤
|
|
13
|
-
│ 集成 │ ← pytest + httpx (API 端点)
|
|
14
|
-
├──────┤
|
|
15
|
-
│ 单元 │ ← pytest + vitest (Service/Hook/组件)
|
|
16
|
-
└──────┘
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
---
|
|
20
|
-
|
|
21
|
-
## 各层测试策略
|
|
22
|
-
|
|
23
|
-
### 单元测试 (Unit)
|
|
24
|
-
|
|
25
|
-
| 层级 | 工具 | 覆盖率 | Mock 策略 |
|
|
26
|
-
|------|------|--------|----------|
|
|
27
|
-
| 后端 Service | pytest | ≥90% | Mock DB/外部API,不 mock 内部 Service |
|
|
28
|
-
| 后端 Model | pytest | ≥90% | 验证字段定义/约束 |
|
|
29
|
-
| 前端 Hook | vitest | ≥90% | Mock API 调用 |
|
|
30
|
-
| 前端 工具函数 | vitest | ≥90% | 纯函数不 mock |
|
|
31
|
-
|
|
32
|
-
### 集成测试 (Integration)
|
|
33
|
-
|
|
34
|
-
| 层级 | 工具 | 覆盖率 | 策略 |
|
|
35
|
-
|------|------|--------|------|
|
|
36
|
-
| API 端点 | pytest + httpx + ASGITransport | ≥80% | 真实路由 + Mock 数据层 |
|
|
37
|
-
| 数据库 (未来) | pytest + test DB | ≥80% | 每测试独立事务,自动回滚 |
|
|
38
|
-
|
|
39
|
-
### E2E 测试
|
|
40
|
-
|
|
41
|
-
| 场景 | 工具 | 策略 |
|
|
42
|
-
|------|------|------|
|
|
43
|
-
| 关键业务流程 | Playwright | 100% 覆盖 |
|
|
44
|
-
| 视觉回归 | Playwright + screenshot | 关键页面 |
|
|
45
|
-
| 跨浏览器 | Playwright (Chromium + Firefox) | 关键流程 |
|
|
46
|
-
|
|
47
|
-
### 性能测试
|
|
48
|
-
|
|
49
|
-
| 指标 | 工具 | 目标 |
|
|
50
|
-
|------|------|------|
|
|
51
|
-
| API 响应时间 | locust / k6 | P99 ≤ 200ms |
|
|
52
|
-
| 并发用户 | locust | 1000 并发 P99 ≤ 500ms |
|
|
53
|
-
|
|
54
|
-
### 安全测试
|
|
55
|
-
|
|
56
|
-
| 检查项 | 工具 | 频率 |
|
|
57
|
-
|--------|------|------|
|
|
58
|
-
| 依赖漏洞 | pip audit / npm audit | 每次 PR |
|
|
59
|
-
| 代码安全 | bandit (Python) | 每次 PR |
|
|
60
|
-
| SAST | semgrep | 每次 PR |
|
|
61
|
-
|
|
62
|
-
---
|
|
63
|
-
|
|
64
|
-
## AI 在测试中的角色
|
|
65
|
-
|
|
66
|
-
### 1. 测试生成 Agent — 分析影响范围,自动生成测试
|
|
67
|
-
|
|
68
|
-
```python
|
|
69
|
-
delegate_task(
|
|
70
|
-
goal="分析本次 PR diff,生成被修改代码的针对性测试",
|
|
71
|
-
context="""
|
|
72
|
-
分析 git diff,对每个修改的函数:
|
|
73
|
-
1. 识别未覆盖的代码路径
|
|
74
|
-
2. 生成单元测试 (边界值/等价类/异常路径)
|
|
75
|
-
3. 如果修改了 API 端点,生成集成测试
|
|
76
|
-
|
|
77
|
-
输出:可直接运行的测试代码
|
|
78
|
-
""",
|
|
79
|
-
toolsets=["terminal", "file"]
|
|
80
|
-
)
|
|
81
|
-
```
|
|
82
|
-
|
|
83
|
-
### 2. 失败诊断 Agent — 测试失败时辅助定位
|
|
84
|
-
|
|
85
|
-
```python
|
|
86
|
-
delegate_task(
|
|
87
|
-
goal="分析测试失败日志,定位根因",
|
|
88
|
-
context="""
|
|
89
|
-
失败测试输出:[贴入 pytest/vitest 输出]
|
|
90
|
-
|
|
91
|
-
1. 归类失败 (代码bug / 测试bug / 环境问题)
|
|
92
|
-
2. 定位最可能的根因文件+行号
|
|
93
|
-
3. 给出修复建议
|
|
94
|
-
""",
|
|
95
|
-
toolsets=["terminal", "file"]
|
|
96
|
-
)
|
|
97
|
-
```
|
|
98
|
-
|
|
99
|
-
---
|
|
100
|
-
|
|
101
|
-
## 质量门禁
|
|
102
|
-
|
|
103
|
-
| 门禁 | 条件 | 阻断级别 |
|
|
104
|
-
|------|------|---------|
|
|
105
|
-
| 单元测试 | 100% pass | 🔴 阻断合入 |
|
|
106
|
-
| 集成测试 | 100% pass | 🔴 阻断合入 |
|
|
107
|
-
| 覆盖率 | ≥80% (新增代码) | 🟡 警告 |
|
|
108
|
-
| Lint | 0 error | 🔴 阻断合入 |
|
|
109
|
-
| 安全扫描 | 0 high/critical | 🔴 阻断合入 |
|
|
110
|
-
| 发布门禁 | 项目定义的质量门禁通过 | 🔴 阻断合入 |
|