create-yss-spec 3.1.0 → 3.2.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 +119 -89
- package/bin/create-yss-spec.js +11 -3
- package/package.json +9 -2
- package/src/api/_sync-service.js +191 -0
- package/src/api/index.js +22 -0
- package/src/api/project-diff.js +9 -0
- package/src/api/project-doctor.js +10 -0
- package/src/api/template-apply.js +10 -0
- package/src/api/template-plan.js +9 -0
- package/src/cli/args.js +60 -0
- package/src/cli/error-output.js +52 -0
- package/src/cli/flags.js +9 -0
- package/src/cli/help.js +95 -0
- package/src/cli/index.js +82 -0
- package/src/cli/plan-output.js +61 -0
- package/src/cli/prompts.js +91 -0
- package/src/cli/router.js +41 -0
- package/src/cli.js +5 -2253
- package/src/commands/attach.js +280 -0
- package/src/commands/diff.js +23 -0
- package/src/commands/doctor.js +417 -0
- package/src/commands/init.js +193 -0
- package/src/commands/sync.js +146 -0
- package/src/commands/update.js +14 -0
- package/src/contracts/apply-result-v1.json +45 -0
- package/src/contracts/customization-policy-v1.json +28 -0
- package/src/contracts/doctor-report-v1.json +29 -0
- package/src/contracts/error-envelope-v1.json +24 -0
- package/src/contracts/generator-policy-v1.json +24 -0
- package/src/contracts/ownership-policy-v1.json +40 -0
- package/src/contracts/plan-schema-v1.json +115 -0
- package/src/family-identity.js +365 -0
- package/src/family-runtime.js +23 -0
- package/src/filesystem/apply-plan.js +44 -0
- package/src/filesystem/copy-path.js +28 -0
- package/src/filesystem/path-utils.js +67 -0
- package/src/filesystem/transaction-runner.js +41 -0
- package/src/filesystem/transaction.js +153 -0
- package/src/git/submodule.js +115 -0
- package/src/git/worktree.js +69 -0
- package/src/template/attach-planner-runtime.js +51 -0
- package/src/template/attach-planner.js +160 -0
- package/src/template/instance-runtime.js +463 -0
- package/src/template/lifecycle-metadata.js +99 -0
- package/src/template/lifecycle-policy.js +129 -0
- package/src/template/lifecycle-runtime.js +90 -0
- package/src/template/migration-planner.js +95 -0
- package/src/template/migration-runtime.js +247 -0
- package/src/template/ownership-metadata.js +79 -0
- package/src/template/ownership-policy.js +149 -0
- package/src/template/ownership-runtime.js +109 -0
- package/src/template/plan-schema.js +36 -0
- package/src/template/sync-planner-runtime.js +57 -0
- package/src/template/sync-planner.js +206 -0
- package/src/template/verification-runtime.js +154 -0
- package/src/validation/identity.js +41 -0
- package/src/validation/metadata.js +105 -0
- package/src/validation/security.js +67 -0
- package/src/validation/snapshot.js +47 -0
- package/template/.agents/skills/.strategic-design-skills-manifest.json +1 -1
- package/template/.agents/skills/yss-domain/SKILL.md +3 -3
- package/template/.agents/skills/yss-frontend-scaffold-generator/SKILL.md +2 -0
- package/template/.agents/skills/yss-implementation-contract-compiler/SKILL.md +4 -2
- package/template/.agents/skills/yss-implementation-contract-compiler/references/boundaries.md +5 -0
- package/template/.agents/skills/yss-implementation-contract-compiler/references/compiler-contract.yaml +16 -2
- package/template/.agents/skills/yss-implementation-contract-compiler/references/slice-implementation-contract.md +10 -1
- package/template/.agents/skills/yss-mvc-design/SKILL.md +16 -0
- package/template/.agents/skills/yss-mvc-design/agents/openai.yaml +4 -0
- package/template/.agents/skills/yss-mvc-design/references/mvc-design.schema.json +315 -0
- package/template/.agents/skills/yss-product-lifecycle/SKILL.md +4 -2
- package/template/.agents/skills/yss-product-lifecycle/references/artifact-dependencies.md +2 -2
- package/template/.agents/skills/yss-product-lifecycle/references/orchestration-contract.yaml +14 -9
- package/template/.agents/skills/yss-product-lifecycle/references/orchestration.md +1 -1
- package/template/.agents/skills/yss-product-lifecycle/references/state-model.md +1 -1
- package/template/.agents/skills/yss-tactical-design/SKILL.md +2 -2
- package/template/.agents/skills/yss-tactical-design/references/output-template.md +2 -0
- package/template/.agents/skills/yss-tactical-design/references/tactical-design-contract.md +3 -1
- package/template/.agents/skills/yss-tactical-design/scripts/validate-tactical-design.mjs +3 -2
- package/template/.agents/skills/yss-technical-design/SKILL.md +31 -0
- package/template/.agents/skills/yss-technical-design/agents/openai.yaml +4 -0
- package/template/.agents/skills/yss-technical-design/references/technical-design-common.schema.json +290 -0
- package/template/.agents/skills/yss-technical-design/references/technical-design-contract.md +31 -0
- package/template/.agents/skills/yss-technical-design/references/technical-design.schema.json +759 -0
- package/template/.agents/skills/yss-technical-design/scripts/generate-schema.mjs +20 -0
- package/template/.agents/skills/yss-technical-design/scripts/validate-technical-design.mjs +134 -0
- package/template/.agents/skills/yss-technical-design/tests/fixtures.mjs +32 -0
- package/template/.agents/skills/yss-technical-design/tests/run-scenarios.mjs +82 -0
- package/template/.agents/skills/yss-ui/SKILL.md +2 -0
- package/template/.claude/skills/yss-domain/SKILL.md +3 -3
- package/template/.claude/skills/yss-frontend-scaffold-generator/SKILL.md +2 -0
- package/template/.claude/skills/yss-implementation-contract-compiler/SKILL.md +4 -2
- package/template/.claude/skills/yss-implementation-contract-compiler/references/boundaries.md +5 -0
- package/template/.claude/skills/yss-implementation-contract-compiler/references/compiler-contract.yaml +16 -2
- package/template/.claude/skills/yss-implementation-contract-compiler/references/slice-implementation-contract.md +10 -1
- package/template/.claude/skills/yss-mvc-design/SKILL.md +16 -0
- package/template/.claude/skills/yss-mvc-design/agents/openai.yaml +4 -0
- package/template/.claude/skills/yss-mvc-design/references/mvc-design.schema.json +315 -0
- package/template/.claude/skills/yss-product-lifecycle/SKILL.md +4 -2
- package/template/.claude/skills/yss-product-lifecycle/references/artifact-dependencies.md +2 -2
- package/template/.claude/skills/yss-product-lifecycle/references/orchestration-contract.yaml +14 -9
- package/template/.claude/skills/yss-product-lifecycle/references/orchestration.md +1 -1
- package/template/.claude/skills/yss-product-lifecycle/references/state-model.md +1 -1
- package/template/.claude/skills/yss-tactical-design/SKILL.md +2 -2
- package/template/.claude/skills/yss-tactical-design/references/output-template.md +2 -0
- package/template/.claude/skills/yss-tactical-design/references/tactical-design-contract.md +3 -1
- package/template/.claude/skills/yss-tactical-design/scripts/validate-tactical-design.mjs +3 -2
- package/template/.claude/skills/yss-technical-design/SKILL.md +31 -0
- package/template/.claude/skills/yss-technical-design/agents/openai.yaml +4 -0
- package/template/.claude/skills/yss-technical-design/references/technical-design-common.schema.json +290 -0
- package/template/.claude/skills/yss-technical-design/references/technical-design-contract.md +31 -0
- package/template/.claude/skills/yss-technical-design/references/technical-design.schema.json +759 -0
- package/template/.claude/skills/yss-technical-design/scripts/generate-schema.mjs +20 -0
- package/template/.claude/skills/yss-technical-design/scripts/validate-technical-design.mjs +134 -0
- package/template/.claude/skills/yss-technical-design/tests/fixtures.mjs +32 -0
- package/template/.claude/skills/yss-technical-design/tests/run-scenarios.mjs +82 -0
- package/template/.claude/skills/yss-ui/SKILL.md +2 -0
- package/template/.codex/skills/yss-domain/SKILL.md +3 -3
- package/template/.codex/skills/yss-frontend-scaffold-generator/SKILL.md +2 -0
- package/template/.codex/skills/yss-implementation-contract-compiler/SKILL.md +4 -2
- package/template/.codex/skills/yss-implementation-contract-compiler/references/boundaries.md +5 -0
- package/template/.codex/skills/yss-implementation-contract-compiler/references/compiler-contract.yaml +16 -2
- package/template/.codex/skills/yss-implementation-contract-compiler/references/slice-implementation-contract.md +10 -1
- package/template/.codex/skills/yss-mvc-design/SKILL.md +16 -0
- package/template/.codex/skills/yss-mvc-design/agents/openai.yaml +4 -0
- package/template/.codex/skills/yss-mvc-design/references/mvc-design.schema.json +315 -0
- package/template/.codex/skills/yss-product-lifecycle/SKILL.md +4 -2
- package/template/.codex/skills/yss-product-lifecycle/references/artifact-dependencies.md +2 -2
- package/template/.codex/skills/yss-product-lifecycle/references/orchestration-contract.yaml +14 -9
- package/template/.codex/skills/yss-product-lifecycle/references/orchestration.md +1 -1
- package/template/.codex/skills/yss-product-lifecycle/references/state-model.md +1 -1
- package/template/.codex/skills/yss-tactical-design/SKILL.md +2 -2
- package/template/.codex/skills/yss-tactical-design/references/output-template.md +2 -0
- package/template/.codex/skills/yss-tactical-design/references/tactical-design-contract.md +3 -1
- package/template/.codex/skills/yss-tactical-design/scripts/validate-tactical-design.mjs +3 -2
- package/template/.codex/skills/yss-technical-design/SKILL.md +31 -0
- package/template/.codex/skills/yss-technical-design/agents/openai.yaml +4 -0
- package/template/.codex/skills/yss-technical-design/references/technical-design-common.schema.json +290 -0
- package/template/.codex/skills/yss-technical-design/references/technical-design-contract.md +31 -0
- package/template/.codex/skills/yss-technical-design/references/technical-design.schema.json +759 -0
- package/template/.codex/skills/yss-technical-design/scripts/generate-schema.mjs +20 -0
- package/template/.codex/skills/yss-technical-design/scripts/validate-technical-design.mjs +134 -0
- package/template/.codex/skills/yss-technical-design/tests/fixtures.mjs +32 -0
- package/template/.codex/skills/yss-technical-design/tests/run-scenarios.mjs +82 -0
- package/template/.codex/skills/yss-ui/SKILL.md +2 -0
- package/template/.cursor/skills/yss-domain/SKILL.md +3 -3
- package/template/.cursor/skills/yss-frontend-scaffold-generator/SKILL.md +2 -0
- package/template/.cursor/skills/yss-implementation-contract-compiler/SKILL.md +4 -2
- package/template/.cursor/skills/yss-implementation-contract-compiler/references/boundaries.md +5 -0
- package/template/.cursor/skills/yss-implementation-contract-compiler/references/compiler-contract.yaml +16 -2
- package/template/.cursor/skills/yss-implementation-contract-compiler/references/slice-implementation-contract.md +10 -1
- package/template/.cursor/skills/yss-mvc-design/SKILL.md +16 -0
- package/template/.cursor/skills/yss-mvc-design/agents/openai.yaml +4 -0
- package/template/.cursor/skills/yss-mvc-design/references/mvc-design.schema.json +315 -0
- package/template/.cursor/skills/yss-product-lifecycle/SKILL.md +4 -2
- package/template/.cursor/skills/yss-product-lifecycle/references/artifact-dependencies.md +2 -2
- package/template/.cursor/skills/yss-product-lifecycle/references/orchestration-contract.yaml +14 -9
- package/template/.cursor/skills/yss-product-lifecycle/references/orchestration.md +1 -1
- package/template/.cursor/skills/yss-product-lifecycle/references/state-model.md +1 -1
- package/template/.cursor/skills/yss-tactical-design/SKILL.md +2 -2
- package/template/.cursor/skills/yss-tactical-design/references/output-template.md +2 -0
- package/template/.cursor/skills/yss-tactical-design/references/tactical-design-contract.md +3 -1
- package/template/.cursor/skills/yss-tactical-design/scripts/validate-tactical-design.mjs +3 -2
- package/template/.cursor/skills/yss-technical-design/SKILL.md +31 -0
- package/template/.cursor/skills/yss-technical-design/agents/openai.yaml +4 -0
- package/template/.cursor/skills/yss-technical-design/references/technical-design-common.schema.json +290 -0
- package/template/.cursor/skills/yss-technical-design/references/technical-design-contract.md +31 -0
- package/template/.cursor/skills/yss-technical-design/references/technical-design.schema.json +759 -0
- package/template/.cursor/skills/yss-technical-design/scripts/generate-schema.mjs +20 -0
- package/template/.cursor/skills/yss-technical-design/scripts/validate-technical-design.mjs +134 -0
- package/template/.cursor/skills/yss-technical-design/tests/fixtures.mjs +32 -0
- package/template/.cursor/skills/yss-technical-design/tests/run-scenarios.mjs +82 -0
- package/template/.cursor/skills/yss-ui/SKILL.md +2 -0
- package/template/.pi/skills/yss-domain/SKILL.md +3 -3
- package/template/.pi/skills/yss-frontend-scaffold-generator/SKILL.md +2 -0
- package/template/.pi/skills/yss-implementation-contract-compiler/SKILL.md +4 -2
- package/template/.pi/skills/yss-implementation-contract-compiler/references/boundaries.md +5 -0
- package/template/.pi/skills/yss-implementation-contract-compiler/references/compiler-contract.yaml +16 -2
- package/template/.pi/skills/yss-implementation-contract-compiler/references/slice-implementation-contract.md +10 -1
- package/template/.pi/skills/yss-mvc-design/SKILL.md +16 -0
- package/template/.pi/skills/yss-mvc-design/agents/openai.yaml +4 -0
- package/template/.pi/skills/yss-mvc-design/references/mvc-design.schema.json +315 -0
- package/template/.pi/skills/yss-product-lifecycle/SKILL.md +4 -2
- package/template/.pi/skills/yss-product-lifecycle/references/artifact-dependencies.md +2 -2
- package/template/.pi/skills/yss-product-lifecycle/references/orchestration-contract.yaml +14 -9
- package/template/.pi/skills/yss-product-lifecycle/references/orchestration.md +1 -1
- package/template/.pi/skills/yss-product-lifecycle/references/state-model.md +1 -1
- package/template/.pi/skills/yss-tactical-design/SKILL.md +2 -2
- package/template/.pi/skills/yss-tactical-design/references/output-template.md +2 -0
- package/template/.pi/skills/yss-tactical-design/references/tactical-design-contract.md +3 -1
- package/template/.pi/skills/yss-tactical-design/scripts/validate-tactical-design.mjs +3 -2
- package/template/.pi/skills/yss-technical-design/SKILL.md +31 -0
- package/template/.pi/skills/yss-technical-design/agents/openai.yaml +4 -0
- package/template/.pi/skills/yss-technical-design/references/technical-design-common.schema.json +290 -0
- package/template/.pi/skills/yss-technical-design/references/technical-design-contract.md +31 -0
- package/template/.pi/skills/yss-technical-design/references/technical-design.schema.json +759 -0
- package/template/.pi/skills/yss-technical-design/scripts/generate-schema.mjs +20 -0
- package/template/.pi/skills/yss-technical-design/scripts/validate-technical-design.mjs +134 -0
- package/template/.pi/skills/yss-technical-design/tests/fixtures.mjs +32 -0
- package/template/.pi/skills/yss-technical-design/tests/run-scenarios.mjs +82 -0
- package/template/.pi/skills/yss-ui/SKILL.md +2 -0
- package/template/.qoder/skills/yss-domain/SKILL.md +3 -3
- package/template/.qoder/skills/yss-frontend-scaffold-generator/SKILL.md +2 -0
- package/template/.qoder/skills/yss-implementation-contract-compiler/SKILL.md +4 -2
- package/template/.qoder/skills/yss-implementation-contract-compiler/references/boundaries.md +5 -0
- package/template/.qoder/skills/yss-implementation-contract-compiler/references/compiler-contract.yaml +16 -2
- package/template/.qoder/skills/yss-implementation-contract-compiler/references/slice-implementation-contract.md +10 -1
- package/template/.qoder/skills/yss-mvc-design/SKILL.md +16 -0
- package/template/.qoder/skills/yss-mvc-design/agents/openai.yaml +4 -0
- package/template/.qoder/skills/yss-mvc-design/references/mvc-design.schema.json +315 -0
- package/template/.qoder/skills/yss-product-lifecycle/SKILL.md +4 -2
- package/template/.qoder/skills/yss-product-lifecycle/references/artifact-dependencies.md +2 -2
- package/template/.qoder/skills/yss-product-lifecycle/references/orchestration-contract.yaml +14 -9
- package/template/.qoder/skills/yss-product-lifecycle/references/orchestration.md +1 -1
- package/template/.qoder/skills/yss-product-lifecycle/references/state-model.md +1 -1
- package/template/.qoder/skills/yss-tactical-design/SKILL.md +2 -2
- package/template/.qoder/skills/yss-tactical-design/references/output-template.md +2 -0
- package/template/.qoder/skills/yss-tactical-design/references/tactical-design-contract.md +3 -1
- package/template/.qoder/skills/yss-tactical-design/scripts/validate-tactical-design.mjs +3 -2
- package/template/.qoder/skills/yss-technical-design/SKILL.md +31 -0
- package/template/.qoder/skills/yss-technical-design/agents/openai.yaml +4 -0
- package/template/.qoder/skills/yss-technical-design/references/technical-design-common.schema.json +290 -0
- package/template/.qoder/skills/yss-technical-design/references/technical-design-contract.md +31 -0
- package/template/.qoder/skills/yss-technical-design/references/technical-design.schema.json +759 -0
- package/template/.qoder/skills/yss-technical-design/scripts/generate-schema.mjs +20 -0
- package/template/.qoder/skills/yss-technical-design/scripts/validate-technical-design.mjs +134 -0
- package/template/.qoder/skills/yss-technical-design/tests/fixtures.mjs +32 -0
- package/template/.qoder/skills/yss-technical-design/tests/run-scenarios.mjs +82 -0
- package/template/.qoder/skills/yss-ui/SKILL.md +2 -0
- package/template/.trae/skills/yss-domain/SKILL.md +3 -3
- package/template/.trae/skills/yss-frontend-scaffold-generator/SKILL.md +2 -0
- package/template/.trae/skills/yss-implementation-contract-compiler/SKILL.md +4 -2
- package/template/.trae/skills/yss-implementation-contract-compiler/references/boundaries.md +5 -0
- package/template/.trae/skills/yss-implementation-contract-compiler/references/compiler-contract.yaml +16 -2
- package/template/.trae/skills/yss-implementation-contract-compiler/references/slice-implementation-contract.md +10 -1
- package/template/.trae/skills/yss-mvc-design/SKILL.md +16 -0
- package/template/.trae/skills/yss-mvc-design/agents/openai.yaml +4 -0
- package/template/.trae/skills/yss-mvc-design/references/mvc-design.schema.json +315 -0
- package/template/.trae/skills/yss-product-lifecycle/SKILL.md +4 -2
- package/template/.trae/skills/yss-product-lifecycle/references/artifact-dependencies.md +2 -2
- package/template/.trae/skills/yss-product-lifecycle/references/orchestration-contract.yaml +14 -9
- package/template/.trae/skills/yss-product-lifecycle/references/orchestration.md +1 -1
- package/template/.trae/skills/yss-product-lifecycle/references/state-model.md +1 -1
- package/template/.trae/skills/yss-tactical-design/SKILL.md +2 -2
- package/template/.trae/skills/yss-tactical-design/references/output-template.md +2 -0
- package/template/.trae/skills/yss-tactical-design/references/tactical-design-contract.md +3 -1
- package/template/.trae/skills/yss-tactical-design/scripts/validate-tactical-design.mjs +3 -2
- package/template/.trae/skills/yss-technical-design/SKILL.md +31 -0
- package/template/.trae/skills/yss-technical-design/agents/openai.yaml +4 -0
- package/template/.trae/skills/yss-technical-design/references/technical-design-common.schema.json +290 -0
- package/template/.trae/skills/yss-technical-design/references/technical-design-contract.md +31 -0
- package/template/.trae/skills/yss-technical-design/references/technical-design.schema.json +759 -0
- package/template/.trae/skills/yss-technical-design/scripts/generate-schema.mjs +20 -0
- package/template/.trae/skills/yss-technical-design/scripts/validate-technical-design.mjs +134 -0
- package/template/.trae/skills/yss-technical-design/tests/fixtures.mjs +32 -0
- package/template/.trae/skills/yss-technical-design/tests/run-scenarios.mjs +82 -0
- package/template/.trae/skills/yss-ui/SKILL.md +2 -0
- package/template/CONTEXT.md +4 -1
- package/template/README.md +4 -0
- package/template/docs/agents/digital-human-roles.yaml +3 -2
- package/template/docs/agents/yss-skill-registry.yaml +20 -1
- package/template/docs/architecture/templates/architecture-review-checklist.md +1 -1
- package/template/docs/architecture/templates/system-overview-design-template.md +15 -4
- package/template/docs/process/frontend-backend-delivery.md +72 -0
- package/template/docs/process/implementation-repo-integration.md +2 -0
- package/template/docs/process/lifecycle-artifact-map.md +3 -0
- package/template/docs/process/lifecycle-registry-baseline.json +4 -1
- package/template/docs/process/lifecycle-registry.yaml +14 -2
- package/template/docs/process/schemas/backend-delivery-verification.schema.json +113 -0
- package/template/docs/process/schemas/backend-delivery.schema.json +301 -0
- package/template/docs/process/schemas/digital-human-task-package.schema.json +8 -0
- package/template/docs/process/schemas/frontend-delivery-acceptance.schema.json +200 -0
- package/template/docs/process/schemas/frontend-implementation-evidence.schema.json +3 -0
- package/template/docs/process/schemas/strategic-design-handoff.schema.json +77 -4
- package/template/docs/process/strategic-handoff-package.md +4 -2
- package/template/docs/process/template-verification-profiles.yaml +20 -0
- package/template/docs/user-guide//346/210/230/346/234/257/350/256/276/350/256/241/345/255/220/351/241/271/347/233/256/347/224/250/346/210/267/346/211/213/345/206/214.md +21 -206
- package/template/docs/user-guide//347/224/250/346/210/267/346/211/213/345/206/214.md +63 -963
- package/template/docs/user-guide//347/224/250/346/210/267/346/211/213/345/206/214/347/264/242/345/274/225.md +11 -14
- package/template/docs/user-guide//350/256/276/345/244/207/345/200/237/347/224/250/350/264/257/347/251/277/346/241/210/344/276/213.md +127 -0
- package/template/scripts/backend-delivery +14 -0
- package/template/scripts/fixtures/backend-delivery/revision-server.mjs +11 -0
- package/template/scripts/fixtures/strategic-handoff/fixture.mjs +3 -2
- package/template/scripts/instantiate-harness +69 -0
- package/template/scripts/lib/backend-delivery.mjs +164 -0
- package/template/scripts/lib/frontend-delivery-boundary.mjs +49 -0
- package/template/scripts/lib/frontend-delivery.mjs +73 -0
- package/template/scripts/lib/harness-execution-scope.mjs +52 -0
- package/template/scripts/lib/implementation-contract-compiler.mjs +19 -2
- package/template/scripts/lib/lifecycle-transition.mjs +7 -0
- package/template/scripts/lib/strategic-handoff-consumption.mjs +17 -10
- package/template/scripts/lib/strategic-handoff-design-targets.mjs +15 -0
- package/template/scripts/lib/strategic-handoff.mjs +1 -1
- package/template/scripts/lib/task-package.mjs +7 -0
- package/template/scripts/lib/technical-design-boundary.mjs +23 -0
- package/template/scripts/sync-strategic-handoff-tools +5 -2
- package/template/scripts/verify-frontend-delivery +9 -0
- package/template/scripts/verify-frontend-delivery-scenarios +131 -0
- package/template/scripts/verify-frontend-implementation-evidence +2 -0
- package/template/scripts/verify-strategic-handoff-package-scenarios +7 -1
- package/template/skills-lock.json +43 -13
- package/template.manifest.json +43 -1
- package/template.snapshot.json +5 -5
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
const OWNERSHIP_TYPES = new Set([
|
|
4
|
+
"managed",
|
|
5
|
+
"managed-customizable",
|
|
6
|
+
"generated",
|
|
7
|
+
"user-owned",
|
|
8
|
+
"protected",
|
|
9
|
+
]);
|
|
10
|
+
const MERGE_STRATEGIES = new Set(["replace-with-force", "manual"]);
|
|
11
|
+
|
|
12
|
+
function assertPositiveInteger(value, name) {
|
|
13
|
+
if (value !== undefined && (!Number.isInteger(value) || value < 1)) {
|
|
14
|
+
throw new Error(`模板元数据 ${name} 必须是正整数`);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
function assertSha256(value, name) {
|
|
19
|
+
if (value !== undefined && !/^[0-9a-f]{64}$/.test(value)) {
|
|
20
|
+
throw new Error(`模板元数据 ${name} 必须是 64 位 sha256`);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
function validateTemplateMetadata(metadata, {
|
|
25
|
+
currentSchemaVersion = 2,
|
|
26
|
+
templateName,
|
|
27
|
+
templateSource,
|
|
28
|
+
} = {}) {
|
|
29
|
+
if (!metadata || typeof metadata !== "object" || Array.isArray(metadata)) {
|
|
30
|
+
throw new Error("模板元数据必须是 JSON 对象");
|
|
31
|
+
}
|
|
32
|
+
if (metadata.metadataSchemaVersion !== undefined && (!Number.isInteger(metadata.metadataSchemaVersion) || metadata.metadataSchemaVersion < 1)) {
|
|
33
|
+
throw new Error("模板元数据 metadataSchemaVersion 必须是正整数");
|
|
34
|
+
}
|
|
35
|
+
if (metadata.metadataSchemaVersion > currentSchemaVersion) {
|
|
36
|
+
throw new Error(`不支持的模板元数据版本:${metadata.metadataSchemaVersion}`);
|
|
37
|
+
}
|
|
38
|
+
if (metadata.managedFiles !== undefined && (typeof metadata.managedFiles !== "object" || metadata.managedFiles === null || Array.isArray(metadata.managedFiles))) {
|
|
39
|
+
throw new Error("模板元数据 managedFiles 必须是 JSON 对象");
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
assertPositiveInteger(metadata.ownershipPolicyVersion, "ownershipPolicyVersion");
|
|
43
|
+
assertSha256(metadata.ownershipPolicyHash, "ownershipPolicyHash");
|
|
44
|
+
assertPositiveInteger(metadata.customizationPolicyVersion, "customizationPolicyVersion");
|
|
45
|
+
assertSha256(metadata.customizationPolicyHash, "customizationPolicyHash");
|
|
46
|
+
assertPositiveInteger(metadata.generatorPolicyVersion, "generatorPolicyVersion");
|
|
47
|
+
assertSha256(metadata.generatorPolicyHash, "generatorPolicyHash");
|
|
48
|
+
|
|
49
|
+
for (const [relativePath, record] of Object.entries(metadata.managedFiles || {})) {
|
|
50
|
+
if (!record || typeof record !== "object" || Array.isArray(record)) {
|
|
51
|
+
throw new Error(`模板元数据 managedFiles.${relativePath} 必须是对象`);
|
|
52
|
+
}
|
|
53
|
+
if (record.ownership !== undefined && !OWNERSHIP_TYPES.has(record.ownership)) {
|
|
54
|
+
throw new Error(`模板元数据 managedFiles.${relativePath}.ownership 非法:${record.ownership}`);
|
|
55
|
+
}
|
|
56
|
+
if (
|
|
57
|
+
record.mergeStrategy !== undefined &&
|
|
58
|
+
!MERGE_STRATEGIES.has(record.mergeStrategy)
|
|
59
|
+
) {
|
|
60
|
+
throw new Error(
|
|
61
|
+
`模板元数据 managedFiles.${relativePath}.mergeStrategy 非法:${record.mergeStrategy}`,
|
|
62
|
+
);
|
|
63
|
+
}
|
|
64
|
+
if (
|
|
65
|
+
record.generatorId !== undefined &&
|
|
66
|
+
!/^[a-z][a-z0-9-]*$/.test(record.generatorId)
|
|
67
|
+
) {
|
|
68
|
+
throw new Error(
|
|
69
|
+
`模板元数据 managedFiles.${relativePath}.generatorId 非法:${record.generatorId}`,
|
|
70
|
+
);
|
|
71
|
+
}
|
|
72
|
+
if (
|
|
73
|
+
record.generatorVersion !== undefined &&
|
|
74
|
+
(!Number.isInteger(record.generatorVersion) || record.generatorVersion < 1)
|
|
75
|
+
) {
|
|
76
|
+
throw new Error(
|
|
77
|
+
`模板元数据 managedFiles.${relativePath}.generatorVersion 必须是正整数`,
|
|
78
|
+
);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
if (metadata.metadataSchemaVersion === currentSchemaVersion) {
|
|
83
|
+
if (templateName !== undefined && metadata.templateName !== templateName) {
|
|
84
|
+
throw new Error("模板元数据 templateName 与当前 CLI 不匹配");
|
|
85
|
+
}
|
|
86
|
+
if (typeof metadata.cliVersion !== "string" || !metadata.cliVersion) {
|
|
87
|
+
throw new Error("模板元数据 cliVersion 缺失或非法");
|
|
88
|
+
}
|
|
89
|
+
if (templateSource !== undefined && metadata.templateSource !== templateSource) {
|
|
90
|
+
throw new Error("模板元数据 templateSource 缺失或非法");
|
|
91
|
+
}
|
|
92
|
+
if (!/^[0-9a-f]{40}$/.test(metadata.templateCommit || "")) {
|
|
93
|
+
throw new Error("模板元数据必须包含 40 位不可变 templateCommit");
|
|
94
|
+
}
|
|
95
|
+
if (!/^[0-9a-f]{64}$/.test(metadata.managedFilesManifestVersion || "")) {
|
|
96
|
+
throw new Error("模板元数据 managedFilesManifestVersion 缺失或非法");
|
|
97
|
+
}
|
|
98
|
+
if (typeof metadata.variables !== "object" || metadata.variables === null || Array.isArray(metadata.variables)) {
|
|
99
|
+
throw new Error("模板元数据 variables 必须是 JSON 对象");
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
return metadata;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
module.exports = { validateTemplateMetadata };
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
const path = require("node:path");
|
|
4
|
+
const { collectGitRoots, inspectCheckoutState } = require("../git/worktree");
|
|
5
|
+
const { isGitSubmoduleMount } = require("../git/submodule");
|
|
6
|
+
|
|
7
|
+
const DEFAULT_UNMANAGED_USER_PATHS = new Set([".gitmodules"]);
|
|
8
|
+
|
|
9
|
+
function gitlinkWriteViolation(targetDir, { force = false, packageRoot = null, deps = {} } = {}) {
|
|
10
|
+
const resolved = path.resolve(targetDir);
|
|
11
|
+
const roots = (deps.collectGitRoots || collectGitRoots)(resolved);
|
|
12
|
+
for (const root of roots) {
|
|
13
|
+
if (packageRoot && path.resolve(root) === path.resolve(packageRoot)) continue;
|
|
14
|
+
let current = resolved;
|
|
15
|
+
while (true) {
|
|
16
|
+
if ((deps.isGitSubmoduleMount || isGitSubmoduleMount)(root, current, deps)) {
|
|
17
|
+
const checkout = (deps.inspectCheckoutState || inspectCheckoutState)(root, current, deps);
|
|
18
|
+
if (checkout === "empty-gitlink" || checkout === "uninitialized") {
|
|
19
|
+
return "空 gitlink 不得当成普通目录写入;gitlink 不得由 CLI 覆盖";
|
|
20
|
+
}
|
|
21
|
+
if (checkout === "detached-head") {
|
|
22
|
+
return "detached HEAD 不得当成普通目录写入;gitlink 不得由 CLI 覆盖";
|
|
23
|
+
}
|
|
24
|
+
if (path.resolve(current) === resolved) {
|
|
25
|
+
return force
|
|
26
|
+
? "--force 不得把 git-submodule 挂载点当成普通目录覆盖"
|
|
27
|
+
: "git-submodule gitlink 不得由 CLI 覆盖;先 git submodule update --init,在子仓附加分支的工作树内操作,或改用独立目录";
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
if (path.resolve(current) === path.resolve(root)) break;
|
|
31
|
+
const parent = path.dirname(current);
|
|
32
|
+
if (parent === current) break;
|
|
33
|
+
current = parent;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
return null;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
function assertTargetWorkingTreeWritable(targetDir, options = {}) {
|
|
40
|
+
const violation = gitlinkWriteViolation(targetDir, options);
|
|
41
|
+
if (violation) throw new Error(violation);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
function unmanagedPathReason(targetDir, relativePath, { packageRoot = null, unmanagedPaths = DEFAULT_UNMANAGED_USER_PATHS, deps = {} } = {}) {
|
|
45
|
+
const normalized = String(relativePath).split(path.sep).join("/");
|
|
46
|
+
if (unmanagedPaths.has(normalized) || normalized.split("/")[0] === ".gitmodules") {
|
|
47
|
+
return ".gitmodules 是用户资产,不属于受管模板文件";
|
|
48
|
+
}
|
|
49
|
+
const absolutePath = path.resolve(targetDir, normalized);
|
|
50
|
+
const roots = (deps.collectGitRoots || collectGitRoots)(targetDir);
|
|
51
|
+
for (const root of roots) {
|
|
52
|
+
if (packageRoot && path.resolve(root) === path.resolve(packageRoot)) continue;
|
|
53
|
+
let current = absolutePath;
|
|
54
|
+
while (true) {
|
|
55
|
+
if ((deps.isGitSubmoduleMount || isGitSubmoduleMount)(root, current, deps)) {
|
|
56
|
+
return "gitlink / apps 挂载工作树是用户资产,不属于受管模板文件";
|
|
57
|
+
}
|
|
58
|
+
if (path.resolve(current) === path.resolve(root)) break;
|
|
59
|
+
const parent = path.dirname(current);
|
|
60
|
+
if (parent === current) break;
|
|
61
|
+
current = parent;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
return null;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
module.exports = { DEFAULT_UNMANAGED_USER_PATHS, gitlinkWriteViolation, assertTargetWorkingTreeWritable, unmanagedPathReason };
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
const path = require("node:path");
|
|
4
|
+
|
|
5
|
+
function normalizeRelativePath(value) {
|
|
6
|
+
return String(value).split(path.sep).join("/");
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
function validateTemplateSnapshot(snapshot, { manifestHash, treeHash } = {}) {
|
|
10
|
+
if (!snapshot || typeof snapshot !== "object" || Array.isArray(snapshot)) {
|
|
11
|
+
throw new Error("模板快照元数据必须是 JSON 对象");
|
|
12
|
+
}
|
|
13
|
+
if (!/^[0-9a-f]{40}$/.test(snapshot.templateCommit || "")) {
|
|
14
|
+
throw new Error("模板快照必须绑定 40 位不可变 templateCommit");
|
|
15
|
+
}
|
|
16
|
+
if (!/^[0-9a-f]{64}$/.test(snapshot.snapshotHash || "")) {
|
|
17
|
+
throw new Error("模板快照必须包含 64 位 snapshotHash");
|
|
18
|
+
}
|
|
19
|
+
if (manifestHash !== undefined && snapshot.manifestHash !== manifestHash) {
|
|
20
|
+
throw new Error("模板快照与当前 template.manifest.json 不一致,请重新构建 CLI 包");
|
|
21
|
+
}
|
|
22
|
+
if (snapshot.encodedPaths !== undefined && (typeof snapshot.encodedPaths !== "object" || snapshot.encodedPaths === null || Array.isArray(snapshot.encodedPaths))) {
|
|
23
|
+
throw new Error("模板快照 encodedPaths 必须是 JSON 对象");
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
const encodedTargets = new Set();
|
|
27
|
+
for (const [logicalPath, encodedPath] of Object.entries(snapshot.encodedPaths || {})) {
|
|
28
|
+
for (const value of [logicalPath, encodedPath]) {
|
|
29
|
+
const normalized = normalizeRelativePath(value);
|
|
30
|
+
if (!normalized || normalized === "." || normalized.startsWith("../") || normalized.includes("/../") || path.posix.isAbsolute(normalized)) {
|
|
31
|
+
throw new Error(`模板快照包含越界路径:${value}`);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
const normalizedTarget = normalizeRelativePath(encodedPath);
|
|
35
|
+
if (encodedTargets.has(normalizedTarget)) {
|
|
36
|
+
throw new Error(`模板快照 encodedPaths 存在重复目标:${encodedPath}`);
|
|
37
|
+
}
|
|
38
|
+
encodedTargets.add(normalizedTarget);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
if (treeHash !== undefined && snapshot.snapshotHash !== treeHash) {
|
|
42
|
+
throw new Error("模板快照内容 hash 不匹配,请重新构建 CLI 包");
|
|
43
|
+
}
|
|
44
|
+
return snapshot;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
module.exports = { validateTemplateSnapshot, normalizeRelativePath };
|
|
@@ -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": "8a67e0f5a56aa5085d18c2b42bb540c8f36c2fab",
|
|
7
7
|
"adaptation_ref": "docs/agents/strategic-design-skills-integration.md",
|
|
8
8
|
"skills": [
|
|
9
9
|
{
|
|
@@ -5,7 +5,7 @@ description: 用于构建或重构 YSS 领域层代码。当用户要求设计
|
|
|
5
5
|
|
|
6
6
|
# yss-domain
|
|
7
7
|
|
|
8
|
-
这是一个领域实现 skill
|
|
8
|
+
这是一个领域实现 skill。核心目标是消费已批准的战术模型,将领域行为落实为代码;`yss-technical-design` 组织 DDD 分支,由 `yss-tactical-design` 设计、`yss-product-lifecycle` 维护批准。
|
|
9
9
|
|
|
10
10
|
本 skill 在新脚手架链路只支持 `domain-driven` / `target-domain-model`。`layered-mvc-service` 与 `mvc-data-analysis-v1` 是独立 MVC Profile,不是失败的 DDD 工程;它们不加载本 skill,也不生成 Domain Gateway。既有旧架构不在本链路内迁移。
|
|
11
11
|
|
|
@@ -23,7 +23,7 @@ description: 用于构建或重构 YSS 领域层代码。当用户要求设计
|
|
|
23
23
|
|
|
24
24
|
## 工作方式
|
|
25
25
|
|
|
26
|
-
1. 先读取批准且版本当前的 tactical-design contract
|
|
26
|
+
1. 先读取批准且版本当前的 Technical Design Contract 的 DDD `design` 分支和 Slice Implementation Contract;旧 v1 tactical-design contract 只按 DDD 显式兼容读取。
|
|
27
27
|
2. 数据库字段只做补充,不直接决定领域对象结构。
|
|
28
28
|
3. 按合同实现领域行为、状态机、不变量和 Gateway 边界。
|
|
29
29
|
4. 规则不清晰或模型需要扩展时,返回 `new_impacts` / `drift` 并停止,不要静默猜测。
|
|
@@ -64,7 +64,7 @@ description: 用于构建或重构 YSS 领域层代码。当用户要求设计
|
|
|
64
64
|
## 阶段 7 合同
|
|
65
65
|
|
|
66
66
|
- 只消费生命周期已批准的 `Slice Implementation Contract` 和当前 `work_unit`;不得扩大 `allowed_write_paths`。
|
|
67
|
-
- `Slice Implementation Contract` 必须引用批准且版本当前的 `tactical_design_ref
|
|
67
|
+
- `Slice Implementation Contract` 必须引用批准且版本当前的 `technical_design` 绑定(旧 DDD 显式兼容 `tactical_design_ref`);不得在实现阶段重新批准或替换聚合、不变量和一致性策略。
|
|
68
68
|
- 领域规则、状态机和不变量必须使用 `behavior-tdd`,先形成失败测试,再实现最小行为。
|
|
69
69
|
- 完成后按 `yss-implementation-contract-compiler/references/yss-skill-execution-result.md` 返回统一 `YSS Skill Execution Result`:changed files、领域/测试证据、实际验证结果、偏离和新增影响。
|
|
70
70
|
- 发现新 API、权限、状态机、数据模型或架构影响时填入 `new_impacts` 并暂停,不得静默扩张切片。
|
|
@@ -30,6 +30,8 @@ branch: template
|
|
|
30
30
|
|
|
31
31
|
## Workflow
|
|
32
32
|
|
|
33
|
+
采用专职前端 profile 或显式 `frontend_delivery` 绑定时,先按 `docs/process/frontend-backend-delivery.md` 实际核验战略与后端联合交付。缺任一输入只能诊断和回交;输入通过后准备计划/合同,正式实现、生成和恢复仍须当前批准的 Slice Contract 冻结接收摘要。接口或部署版本漂移时重新接收,不复用旧成功输出。
|
|
34
|
+
|
|
33
35
|
1. 确认当前任务已经通过 Harness 入口分诊,且实现位置已记录在 proposal、design、build entry review、实施计划或实现路由记录中。
|
|
34
36
|
2. 确认目标是外部实现仓库;只有用户明确选择时才输出到 Harness 仓库的 `apps/frontend/<project>/`。`apps/frontend/` 只能作为项目容器,`app/frontend/`、`app/backend/` 及其子路径禁止作为输出位置。`git-submodule` 只能在已初始化且附加分支的子仓工作树生成;空 gitlink、detached HEAD、`--force` 覆盖挂载点不得当成普通目录。
|
|
35
37
|
3. 只读检查模板分支是否可访问:`git ls-remote --heads <repo> template`。
|
|
@@ -26,12 +26,14 @@ description: Use when a YSS vertical slice is entering implementation, spans mul
|
|
|
26
26
|
|
|
27
27
|
## 硬规则
|
|
28
28
|
|
|
29
|
+
采用专职前端 profile 或显式 `frontend_delivery` 绑定时,先按 `docs/process/frontend-backend-delivery.md` 实际核验战略与后端联合交付。缺任一输入只能诊断和回交;输入通过后准备计划/合同,正式实现、生成和恢复仍须当前批准的 Slice Contract 冻结接收摘要。接口或部署版本漂移时重新接收,不复用旧成功输出。
|
|
30
|
+
|
|
29
31
|
- 编译器不得输出 `approved`、`ready-for-agent` 或 `completed`。
|
|
30
32
|
- Registry、Slice Contract 或编译器合同 schema v1 一律拒绝并给出迁移到 v2 的提示;不自动升级,不提供旧技能名兼容。
|
|
31
33
|
- `required_capabilities` 与 `required_skills` 必须同时冻结;Registry 或编译器摘要变化后合同立即 `stale`,重新编译后仍须交生命周期重新批准。
|
|
32
34
|
- UI 影响缺少正式原型确认、批准且 digest 当前的 Visual Baseline manifest 或当前切片 `case_id` 时,不得路由页面实现。模型必须先读 manifest 与语义引用,再查看对应 PNG;禁止目录 glob 和图片独立猜义。
|
|
33
35
|
- Repository/数据模型影响缺少数据架构时,不得路由持久化实现。
|
|
34
|
-
-
|
|
36
|
+
- 后端技术设计由 `yss-technical-design` 先行组织。消费批准且版本当前的 Technical Design Contract,核对其架构与工程基线一致;DDD 才消费聚合、Gateway 等战术字段并路由 `yss-domain`,MVC 消费用例、分层、规则和事务设计并按 Profile 路由。旧 v1 战术合同只按 DDD 显式兼容读取。无相关影响记录带原因的 `not-applicable`。
|
|
35
37
|
- API 变化必须回到生命周期 Draft/Review/Freeze;半成品 backend 不得冒充稳定 source of truth。
|
|
36
38
|
- 后端端到端切片必须包含 Application;对象/POJO 影响按契约自动补 `mapstruct`、`lombok`、`alibaba-java-code-style`。
|
|
37
39
|
- Harness 内实现路径必须落在 `apps/backend/<project>/` 或 `apps/frontend/<project>/` 的具体项目目录;`apps/backend/`、`apps/frontend/` 只能作为容器,`app/backend/`、`app/frontend/` 及其子路径一律阻断。外部实现仓库使用其登记的真实项目根路径。`git-submodule` 使用 `implementation_path_policy: git-submodule-harness-apps`,空 gitlink、detached HEAD 或 `--force` 覆盖挂载点不得脚手架;`inspectWorkingTreeScope.writable` 必须为显式布尔值。
|
|
@@ -58,4 +60,4 @@ description: Use when a YSS vertical slice is entering implementation, spans mul
|
|
|
58
60
|
|
|
59
61
|
跨仓交接使用 `scripts/strategic-handoff export / verify / import`。正式导出前补齐源战略的稳定规则 ID、关键场景和当前批准绑定;源资产原字节冻结、包内路径通过清单解析。目标导入只产生快照和对账/承接草案,正式 reconciliation 通过后才能进入战术设计。流程与字段见 `docs/process/strategic-handoff-package.md`。
|
|
60
62
|
|
|
61
|
-
|
|
63
|
+
来自战略交接包的技术设计合同(DDD / MVC)必须绑定 `strategic_handoff` 导入收据、包摘要、正式目标对账及逐条承接 rows。来自导入包时禁止仅填 `upstream_current: true`。批准前执行 `scripts/verify-strategic-handoff-consumption --root <target> <tactical>`;存在受控延期时按切片执行 `--slice <slice-id>`,实际核验通过且合同批准后才可继续相关切片。最新源规则、关键场景或资产变化使依赖项 stale;未知依赖扩大阻断,业务冲突回交战略方。结果绑定当前包与战术摘要,不能复用旧输出宣布 ready-for-agent。
|
package/template/.agents/skills/yss-implementation-contract-compiler/references/boundaries.md
CHANGED
|
@@ -18,6 +18,8 @@
|
|
|
18
18
|
|
|
19
19
|
| Capability | Primary skill | Task modes |
|
|
20
20
|
| --- | --- | --- |
|
|
21
|
+
| `architecture.technical-design` | `yss-technical-design` | `guidance`, `integration`, `review-input` |
|
|
22
|
+
| `architecture.mvc-design` | `yss-mvc-design` | `guidance`, `integration`, `review-input` |
|
|
21
23
|
| `layer.mvc-service` | `yss-application` | `guidance`, `integration`, `slice-implementation`, `troubleshooting`, `review-input` |
|
|
22
24
|
| `layer.mvc-persistence` | `yss-repository` | `guidance`, `integration`, `slice-implementation`, `troubleshooting`, `review-input` |
|
|
23
25
|
| `layer.mvc-web` | `yss-web-controller` | `guidance`, `integration`, `slice-implementation`, `troubleshooting`, `review-input` |
|
|
@@ -112,6 +114,9 @@
|
|
|
112
114
|
| `yss-domain` | `domain-modeling` | `coordination-only` | — |
|
|
113
115
|
| `yss-domain` | `yss-tactical-design` | `context-conditional` | `tactical-domain` |
|
|
114
116
|
| `yss-domain` | `lombok` | `context-conditional` | `pojo` |
|
|
117
|
+
| `yss-technical-design` | `yss-tactical-design` | `coordination-only` | `domain-driven` |
|
|
118
|
+
| `yss-technical-design` | `yss-mvc-design` | `coordination-only` | `layered-mvc` |
|
|
119
|
+
| `yss-mvc-design` | `yss-openapi-draft-review` | `review-only` | `api-impact` |
|
|
115
120
|
| `yss-tactical-design` | `domain-modeling` | `coordination-only` | — |
|
|
116
121
|
| `yss-tactical-design` | `yss-openapi-draft-review` | `review-only` | `api-impact` |
|
|
117
122
|
| `yss-tactical-design` | `yss-repository` | `component-dependency` | `data-impact` |
|
|
@@ -61,6 +61,12 @@ readiness:
|
|
|
61
61
|
data_impact: [data_architecture]
|
|
62
62
|
backend_impact: [engineering_baseline, backend_repository, maven_wrapper]
|
|
63
63
|
cross_repo: [repository_registry, delivery_order, integration_verification, rollback_order]
|
|
64
|
+
frontend_delivery:
|
|
65
|
+
when: specialized-frontend-profile-or-explicit-frontend-delivery-binding
|
|
66
|
+
source: docs/process/frontend-backend-delivery.md
|
|
67
|
+
verifier: scripts/verify-frontend-delivery
|
|
68
|
+
output_binding: frontend.delivery
|
|
69
|
+
inputs_verified_is_implementation_approval: false
|
|
64
70
|
|
|
65
71
|
compiler_input_required:
|
|
66
72
|
- slice_id
|
|
@@ -77,7 +83,7 @@ exclusive_flags:
|
|
|
77
83
|
|
|
78
84
|
slice_contract_required:
|
|
79
85
|
root: [schema_version, contract_id, contract_version, slice_id, status, lifecycle_refs, readiness, resolution, common, frontend, backend, contract, cross_repo, work_units]
|
|
80
|
-
lifecycle_refs: [spec, ticket, requirement_freeze, low_fidelity_review, prototype_review, prototype_profile_decision, prototype_deliverable, prototype_deliverable_verification, visual_baseline, prototype_confirmation, openapi_freeze_or_no_impact, architecture_review, data_architecture, tactical_design, engineering_baseline, build_architecture_checklist, implementation_repository, frontend_repository, backend_repository, maven_wrapper]
|
|
86
|
+
lifecycle_refs: [spec, ticket, requirement_freeze, low_fidelity_review, prototype_review, prototype_profile_decision, prototype_deliverable, prototype_deliverable_verification, visual_baseline, prototype_confirmation, openapi_freeze_or_no_impact, architecture_review, data_architecture, technical_design, tactical_design, engineering_baseline, build_architecture_checklist, implementation_repository, frontend_repository, backend_repository, maven_wrapper]
|
|
81
87
|
readiness: [blockers, stale_inputs, not_applicable]
|
|
82
88
|
resolution: [required_capabilities, required_skills, recipe_ids, conditions, reason_chains, registry_digest, compiler_contract_digest, compiled_at, freshness]
|
|
83
89
|
common: [impacted_areas, implementation_path_policy, project_roots, required_capabilities, required_skills, optional_skills, unavailable_skills, allowed_write_paths, forbidden_patterns, expected_evidence_files, verification_commands, human_review_points, full_reroute_triggers, quality_baseline_ref, context_plan, doubt_driven_review]
|
|
@@ -103,6 +109,7 @@ lifecycle_ref_by_readiness:
|
|
|
103
109
|
openapi_freeze: openapi_freeze_or_no_impact
|
|
104
110
|
no_api_impact_record: openapi_freeze_or_no_impact
|
|
105
111
|
data_architecture: data_architecture
|
|
112
|
+
technical_design: technical_design
|
|
106
113
|
tactical_design: tactical_design
|
|
107
114
|
engineering_baseline: engineering_baseline
|
|
108
115
|
backend_repository: backend_repository
|
|
@@ -227,7 +234,14 @@ applicable_subcontract_nonempty:
|
|
|
227
234
|
backend:
|
|
228
235
|
scalar: [application_boundary, transaction_boundary, persistence_strategy]
|
|
229
236
|
array: [affected_layers, required_skills, allowed_write_paths, forbidden_patterns, expected_evidence_files, verification_commands]
|
|
237
|
+
conditional_technical_design:
|
|
238
|
+
when: backend-technical-design-impact
|
|
239
|
+
binding: resolution.technical_design
|
|
240
|
+
scalar: [ref, version, digest]
|
|
241
|
+
architecture_match: resolution.architecture_identity.architecture_family
|
|
242
|
+
verification: node .agents/skills/yss-technical-design/scripts/validate-technical-design.mjs <contract> --root <target> --slice <slice-id>
|
|
230
243
|
conditional_tactical_ddd:
|
|
244
|
+
architecture_family: domain-driven
|
|
231
245
|
when: [aggregate-impact, state-machine-impact, invariant-impact, consistency-impact, domain-event-impact, gateway-boundary-impact, persistence-mapping-impact]
|
|
232
246
|
scalar: [tactical_design_ref, tactical_design_version, gateway_boundary_ref]
|
|
233
247
|
array: [aggregate_refs, invariant_refs, state_behavior_refs, domain_test_seams, application_test_seams]
|
|
@@ -360,7 +374,7 @@ unavailable_skill_required: [skill, provider, fallback, resolution]
|
|
|
360
374
|
strategic_handoff_consumption:
|
|
361
375
|
when: upstream-source-is-imported-strategic-handoff
|
|
362
376
|
required: [import_receipt_ref, bundle_digest, context_reconciliation_ref, rows]
|
|
363
|
-
verification: scripts/verify-strategic-handoff-consumption --root <target> --slice <slice-id> <approved-
|
|
377
|
+
verification: scripts/verify-strategic-handoff-consumption --root <target> --slice <slice-id> <approved-technical-design-contract>
|
|
364
378
|
require_actual_exit_code: 0
|
|
365
379
|
stale_policy: latest-imported-source-digest-and-dependent-slices
|
|
366
380
|
unknown_dependency: block-all
|
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
`yss-implementation-contract-compiler` 生成草案;`yss-product-lifecycle` 核验、批准并持久化。合同缺少必填字段时状态为 `blocked`。schema v1 已停止支持,必须重新编译为 v2,不提供自动升级。
|
|
6
6
|
|
|
7
|
+
采用专职前端 profile 时,`frontend.delivery` 绑定 `{acceptance_ref, digest}`,来自 `scripts/verify-frontend-delivery` 的当前结果;也可由 `resolution.frontend_delivery` 承载,两处并存时必须一致。正式执行从持久化合同读取并重验输入。细则见 `docs/process/frontend-backend-delivery.md`。
|
|
8
|
+
|
|
7
9
|
```yaml
|
|
8
10
|
slice_contract:
|
|
9
11
|
schema_version: 2
|
|
@@ -26,7 +28,8 @@ slice_contract:
|
|
|
26
28
|
architecture_review:
|
|
27
29
|
data_architecture:
|
|
28
30
|
engineering_baseline:
|
|
29
|
-
|
|
31
|
+
technical_design: # 阅读引用;与 resolution.technical_design.ref 指向同一文件
|
|
32
|
+
tactical_design: # 旧 DDD 引用兼容
|
|
30
33
|
build_architecture_checklist:
|
|
31
34
|
implementation_repository:
|
|
32
35
|
frontend_repository:
|
|
@@ -39,6 +42,10 @@ slice_contract:
|
|
|
39
42
|
- item:
|
|
40
43
|
reason:
|
|
41
44
|
resolution:
|
|
45
|
+
technical_design: # 有技术设计影响时由编译器绑定,DDD / MVC 共用
|
|
46
|
+
ref:
|
|
47
|
+
version:
|
|
48
|
+
digest: # 已持久化合同原始字节摘要
|
|
42
49
|
required_capabilities: []
|
|
43
50
|
required_skills: []
|
|
44
51
|
recipe_ids: []
|
|
@@ -199,3 +206,5 @@ work_unit:
|
|
|
199
206
|
`work_units` 中的前端、后端和测试任务是切片级子任务,不是新的生命周期阶段。每个子任务必须引用独立任务包;任务包只能消费同一份已批准且版本当前的 Slice Contract。`workflow_status` 追踪执行过程,不能替代生命周期状态;`contract_id`、`contract_version` 或 resolution digest 不一致时必须阻断并回到实现合同编译器。
|
|
200
207
|
|
|
201
208
|
一个切片可以组合多个窄 Recipe,但只计算一次闭包。Recipe 只能引用 capability;合同同时冻结 `required_capabilities`、`required_skills`、完整原因链和 Registry/Compiler digest。任一 digest 或 Visual Baseline 版本 / digest 改变时,当前合同标记 `stale`,重新编译后仍须由 `yss-product-lifecycle` 再批准。UI 切片只消费 `visual_baseline_case_ids` 指定的图片,并先读取 manifest 与语义引用,禁止按目录 glob 猜测图片含义。
|
|
209
|
+
|
|
210
|
+
技术设计编译绑定使用 `technical_design: {ref, version, digest}` 与 `slice_id`,校验器规则见 `yss-technical-design/references/technical-design-contract.md`。`backend.tactical_ddd` 仅适用于 `domain-driven`;MVC 消费共同技术设计绑定与 `design` 的用例、规则、事务和测试 seam,不填聚合或 Gateway 字段。
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: yss-mvc-design
|
|
3
|
+
description: 为已确认 layered-mvc 的 YSS 项目设计分层职责、用例、业务规则、事务和持久化映射,不生成代码。
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# YSS MVC 技术设计
|
|
7
|
+
|
|
8
|
+
由 `yss-technical-design` 在 `layered-mvc` 分支调用,输入和批准边界由通用技术设计合同持有。既有工程按已登记 Profile 设计,不重选架构。
|
|
9
|
+
|
|
10
|
+
必须说明模块职责与依赖方向、用例流程、业务规则、状态转换、事务边界、失败回滚、幂等与并发、持久化映射、外部集成与公开测试 seam。无状态流转或外部集成时记录有原因的不适用,不硬造对象。
|
|
11
|
+
|
|
12
|
+
分层边界消费 `docs/agents/backend-architecture-profiles.md`:Controller 处理 HTTP 边界;service/core 承载用例、规则与事务;Repository 负责持久化;适用时 Adapter 承接外部集成。不得为 MVC 加载 `yss-domain` 或生成 DDD Gateway。
|
|
13
|
+
|
|
14
|
+
输出 Technical Design Contract 的 `design` 分支,结构见 `references/mvc-design.schema.json`。业务规则和关键场景必须关联具体用例与测试 seam;关键场景覆盖成功和失败。与 DDD 使用同一承接和审查要求,不能因采用 MVC 省略规则、一致性或测试设计。
|
|
15
|
+
|
|
16
|
+
由通用入口校验整个合同并回交生命周期独立审查。本技能不自行批准、不创建 Ticket、不设置 `ready-for-agent`,不生成 Java、SQL 或生产 API。实现由编译器按批准的架构 Profile 和最小技能闭包路由。
|