create-yss-spec 3.4.10 → 3.5.2
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 +8 -4
- package/package.json +1 -1
- package/src/api/_sync-service.js +141 -23
- package/src/cli/args.js +3 -0
- package/src/cli/help.js +14 -2
- 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 +21 -5
- package/src/commands/diff.js +1 -0
- package/src/commands/doctor.js +1 -0
- package/src/commands/init.js +4 -1
- package/src/commands/skills.js +253 -0
- package/src/commands/sync.js +4 -0
- package/src/family-identity.js +2 -2
- package/src/template/asset-runtime.js +228 -0
- package/src/template/attach-planner.js +1 -1
- package/src/template/distribution-runtime.js +165 -0
- package/src/template/instance-runtime.js +76 -29
- package/src/template/layout-migration.js +160 -0
- package/src/template/migration-runtime.js +2 -2
- package/src/template/ownership-policy.js +17 -1
- package/src/template/prune-planner.js +6 -1
- package/src/template/sync-planner.js +4 -1
- package/src/template/verification-runtime.js +56 -1
- package/src/validation/metadata.js +24 -1
- package/template/.agents/rules/yss-ai-skills.md +1 -1
- package/template/.agents/skills/.strategic-design-skills-manifest.json +7 -8
- package/template/.agents/skills/.yss-skills-manifest.json +2 -2
- package/template/.agents/skills/alibaba-java-code-style/SKILL.md +1 -1
- package/template/.agents/skills/code-review/SKILL.md +6 -6
- package/template/.agents/skills/code-review/references/yss-review-standards.md +1 -1
- package/template/.agents/skills/cross-repo-implementation-routing/SKILL.md +2 -2
- package/template/.agents/skills/i-have-adhd/SKILL.md +1 -1
- package/template/.agents/skills/i-have-adhd/references/yss-adaptation.md +1 -1
- package/template/.agents/skills/i-have-adhd/tests/verify-integration.mjs +2 -2
- package/template/.agents/skills/implementation-repo-onboarding/SKILL.md +2 -2
- package/template/.agents/skills/llm-wiki/references/discover.md +3 -3
- package/template/.agents/skills/prototype-review/SKILL.md +4 -4
- package/template/.agents/skills/setup-matt-pocock-skills/SKILL.md +10 -10
- package/template/.agents/skills/triage/SKILL.md +1 -1
- package/template/.agents/skills/yss-application/references/profiles/layered-mvc-service.md +1 -1
- package/template/.agents/skills/yss-application/references/profiles/mvc-data-analysis-v1.md +1 -1
- package/template/.agents/skills/yss-backend-spec-review/SKILL.md +1 -1
- package/template/.agents/skills/yss-backend-spec-review/references/check-inputs.md +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-ddd-scaffold-generator/SKILL.md +2 -2
- package/template/.agents/skills/yss-ddd-scaffold-generator/scripts/generate_scaffold.mjs +1 -1
- package/template/.agents/skills/yss-design-system/SKILL.md +10 -10
- package/template/.agents/skills/yss-design-system/references/design-qa-theme.md +3 -3
- package/template/.agents/skills/yss-design-system/references/design-system.md +3 -3
- 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-exception/SKILL.md +1 -1
- package/template/.agents/skills/yss-frontend-scaffold-generator/SKILL.md +2 -2
- package/template/.agents/skills/yss-frontend-scaffold-generator/scripts/generate_scaffold.mjs +1 -1
- package/template/.agents/skills/yss-frontend-scaffold-generator/scripts/refresh_baseline.mjs +2 -2
- package/template/.agents/skills/yss-implementation-contract-compiler/SKILL.md +9 -9
- package/template/.agents/skills/yss-implementation-contract-compiler/references/boundaries.md +1 -1
- package/template/.agents/skills/yss-implementation-contract-compiler/references/compiler-contract.yaml +9 -9
- package/template/.agents/skills/yss-implementation-contract-compiler/references/slice-implementation-contract-v2.md +3 -3
- package/template/.agents/skills/yss-implementation-contract-compiler/references/slice-implementation-contract.md +1 -1
- package/template/.agents/skills/yss-implementation-contract-compiler/references/strategic-handoff-routing.md +1 -1
- package/template/.agents/skills/yss-layered-mvc-scaffold-generator/SKILL.md +2 -2
- package/template/.agents/skills/yss-layered-mvc-scaffold-generator/scripts/data-analysis-profile.mjs +5 -5
- package/template/.agents/skills/yss-layered-mvc-scaffold-generator/scripts/generate_scaffold.mjs +2 -2
- package/template/.agents/skills/yss-layered-mvc-scaffold-generator/scripts/scaffold-generator.test.mjs +42 -0
- package/template/.agents/skills/yss-mybatis/SKILL.md +14 -2
- package/template/.agents/skills/yss-openapi-draft-review/SKILL.md +2 -2
- package/template/.agents/skills/yss-openapi-governance/SKILL.md +7 -7
- package/template/.agents/skills/yss-product-lifecycle/SKILL.md +11 -11
- package/template/.agents/skills/yss-product-lifecycle/references/matt-yss-adapter.md +5 -5
- package/template/.agents/skills/yss-product-lifecycle/references/orchestration-contract.yaml +70 -47
- package/template/.agents/skills/yss-product-lifecycle/references/orchestration.md +22 -14
- package/template/.agents/skills/yss-product-lifecycle/references/request-triage.md +2 -0
- package/template/.agents/skills/yss-product-lifecycle/references/state-model.md +11 -11
- package/template/.agents/skills/yss-product-lifecycle/references/user-decisions.md +2 -2
- package/template/.agents/skills/yss-prototype-stage/SKILL.md +9 -9
- package/template/.agents/skills/yss-prototype-stage/references/existing-ui-entry.md +1 -1
- package/template/.agents/skills/yss-prototype-stage/scripts/build-antd-prototype.mjs +1 -1
- package/template/.agents/skills/yss-prototype-stage/scripts/offline-html.mjs +3 -3
- package/template/.agents/skills/yss-prototype-stage/tests/browser-smoke.mjs +2 -2
- package/template/.agents/skills/yss-prototype-stage/tests/run-scenarios.mjs +4 -4
- package/template/.agents/skills/yss-prototype-stage/tests/workbench-smoke.mjs +1 -1
- package/template/.agents/skills/yss-repository/SKILL.md +3 -2
- package/template/.agents/skills/yss-repository/references/profiles/layered-mvc-service.md +1 -1
- package/template/.agents/skills/yss-repository/references/profiles/mvc-data-analysis-v1.md +1 -1
- package/template/.agents/skills/yss-repository/tests/profile-routing.test.mjs +2 -2
- package/template/.agents/skills/yss-research/SKILL.md +2 -2
- package/template/.agents/skills/yss-skill-source-index-refresh/references/backend-component-platform-compatibility.md +1 -1
- package/template/.agents/skills/yss-stage-decision/SKILL.md +5 -5
- package/template/.agents/skills/yss-stage-decision/references/domain-strategy-contract.md +1 -1
- package/template/.agents/skills/yss-stage-decision/references/strategic-handoff-routing.md +1 -1
- package/template/.agents/skills/yss-tactical-design/SKILL.md +2 -2
- package/template/.agents/skills/yss-tactical-design/references/strategic-handoff-routing.md +1 -1
- package/template/.agents/skills/yss-tactical-design/references/tactical-design-contract.md +1 -1
- package/template/.agents/skills/yss-technical-design/SKILL.md +6 -6
- package/template/.agents/skills/yss-technical-design/references/technical-design-contract.md +1 -1
- package/template/.agents/skills/yss-ui/SKILL.md +1 -1
- package/template/.agents/skills/yss-up-springboot3/SKILL.md +1 -1
- package/template/.agents/skills/yss-web-controller/SKILL.md +1 -1
- package/template/.agents/skills/yss-web-controller/references/profiles/layered-mvc-service.md +1 -1
- package/template/.codex/skills/alibaba-java-code-style/SKILL.md +1 -1
- package/template/.codex/skills/code-review/SKILL.md +6 -6
- package/template/.codex/skills/code-review/references/yss-review-standards.md +1 -1
- package/template/.codex/skills/cross-repo-implementation-routing/SKILL.md +2 -2
- package/template/.codex/skills/i-have-adhd/SKILL.md +1 -1
- package/template/.codex/skills/i-have-adhd/references/yss-adaptation.md +1 -1
- package/template/.codex/skills/i-have-adhd/tests/verify-integration.mjs +2 -2
- package/template/.codex/skills/implementation-repo-onboarding/SKILL.md +2 -2
- package/template/.codex/skills/llm-wiki/references/discover.md +3 -3
- package/template/.codex/skills/prototype-review/SKILL.md +4 -4
- package/template/.codex/skills/setup-matt-pocock-skills/SKILL.md +10 -10
- package/template/.codex/skills/triage/SKILL.md +1 -1
- package/template/.codex/skills/yss-application/references/profiles/layered-mvc-service.md +1 -1
- package/template/.codex/skills/yss-application/references/profiles/mvc-data-analysis-v1.md +1 -1
- package/template/.codex/skills/yss-backend-spec-review/SKILL.md +1 -1
- package/template/.codex/skills/yss-backend-spec-review/references/check-inputs.md +1 -1
- 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-ddd-scaffold-generator/SKILL.md +2 -2
- package/template/.codex/skills/yss-ddd-scaffold-generator/scripts/generate_scaffold.mjs +1 -1
- package/template/.codex/skills/yss-design-system/SKILL.md +10 -10
- package/template/.codex/skills/yss-design-system/references/design-qa-theme.md +3 -3
- package/template/.codex/skills/yss-design-system/references/design-system.md +3 -3
- 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-exception/SKILL.md +1 -1
- package/template/.codex/skills/yss-frontend-scaffold-generator/SKILL.md +2 -2
- package/template/.codex/skills/yss-frontend-scaffold-generator/scripts/generate_scaffold.mjs +1 -1
- package/template/.codex/skills/yss-frontend-scaffold-generator/scripts/refresh_baseline.mjs +2 -2
- package/template/.codex/skills/yss-implementation-contract-compiler/SKILL.md +9 -9
- package/template/.codex/skills/yss-implementation-contract-compiler/references/boundaries.md +1 -1
- package/template/.codex/skills/yss-implementation-contract-compiler/references/compiler-contract.yaml +9 -9
- package/template/.codex/skills/yss-implementation-contract-compiler/references/slice-implementation-contract-v2.md +3 -3
- package/template/.codex/skills/yss-implementation-contract-compiler/references/slice-implementation-contract.md +1 -1
- package/template/.codex/skills/yss-implementation-contract-compiler/references/strategic-handoff-routing.md +1 -1
- package/template/.codex/skills/yss-layered-mvc-scaffold-generator/SKILL.md +2 -2
- package/template/.codex/skills/yss-layered-mvc-scaffold-generator/scripts/data-analysis-profile.mjs +5 -5
- package/template/.codex/skills/yss-layered-mvc-scaffold-generator/scripts/generate_scaffold.mjs +2 -2
- package/template/.codex/skills/yss-layered-mvc-scaffold-generator/scripts/scaffold-generator.test.mjs +42 -0
- package/template/.codex/skills/yss-mybatis/SKILL.md +14 -2
- package/template/.codex/skills/yss-openapi-draft-review/SKILL.md +2 -2
- package/template/.codex/skills/yss-openapi-governance/SKILL.md +7 -7
- package/template/.codex/skills/yss-product-lifecycle/SKILL.md +11 -11
- package/template/.codex/skills/yss-product-lifecycle/references/matt-yss-adapter.md +5 -5
- package/template/.codex/skills/yss-product-lifecycle/references/orchestration-contract.yaml +70 -47
- package/template/.codex/skills/yss-product-lifecycle/references/orchestration.md +22 -14
- package/template/.codex/skills/yss-product-lifecycle/references/request-triage.md +2 -0
- package/template/.codex/skills/yss-product-lifecycle/references/state-model.md +11 -11
- package/template/.codex/skills/yss-product-lifecycle/references/user-decisions.md +2 -2
- package/template/.codex/skills/yss-prototype-stage/SKILL.md +9 -9
- package/template/.codex/skills/yss-prototype-stage/references/existing-ui-entry.md +1 -1
- package/template/.codex/skills/yss-prototype-stage/scripts/build-antd-prototype.mjs +1 -1
- package/template/.codex/skills/yss-prototype-stage/scripts/offline-html.mjs +3 -3
- package/template/.codex/skills/yss-prototype-stage/tests/browser-smoke.mjs +2 -2
- package/template/.codex/skills/yss-prototype-stage/tests/run-scenarios.mjs +4 -4
- package/template/.codex/skills/yss-prototype-stage/tests/workbench-smoke.mjs +1 -1
- package/template/.codex/skills/yss-repository/SKILL.md +3 -2
- package/template/.codex/skills/yss-repository/references/profiles/layered-mvc-service.md +1 -1
- package/template/.codex/skills/yss-repository/references/profiles/mvc-data-analysis-v1.md +1 -1
- package/template/.codex/skills/yss-repository/tests/profile-routing.test.mjs +2 -2
- package/template/.codex/skills/yss-research/SKILL.md +2 -2
- package/template/.codex/skills/yss-skill-source-index-refresh/references/backend-component-platform-compatibility.md +1 -1
- package/template/.codex/skills/yss-stage-decision/SKILL.md +5 -5
- package/template/.codex/skills/yss-stage-decision/references/domain-strategy-contract.md +1 -1
- package/template/.codex/skills/yss-stage-decision/references/strategic-handoff-routing.md +1 -1
- package/template/.codex/skills/yss-tactical-design/SKILL.md +2 -2
- package/template/.codex/skills/yss-tactical-design/references/strategic-handoff-routing.md +1 -1
- package/template/.codex/skills/yss-tactical-design/references/tactical-design-contract.md +1 -1
- package/template/.codex/skills/yss-technical-design/SKILL.md +6 -6
- package/template/.codex/skills/yss-technical-design/references/technical-design-contract.md +1 -1
- package/template/.codex/skills/yss-ui/SKILL.md +1 -1
- package/template/.codex/skills/yss-up-springboot3/SKILL.md +1 -1
- package/template/.codex/skills/yss-web-controller/SKILL.md +1 -1
- package/template/.codex/skills/yss-web-controller/references/profiles/layered-mvc-service.md +1 -1
- package/template/.cursor/skills/alibaba-java-code-style/SKILL.md +1 -1
- package/template/.cursor/skills/code-review/SKILL.md +6 -6
- package/template/.cursor/skills/code-review/references/yss-review-standards.md +1 -1
- package/template/.cursor/skills/cross-repo-implementation-routing/SKILL.md +2 -2
- package/template/.cursor/skills/i-have-adhd/SKILL.md +1 -1
- package/template/.cursor/skills/i-have-adhd/references/yss-adaptation.md +1 -1
- package/template/.cursor/skills/i-have-adhd/tests/verify-integration.mjs +2 -2
- package/template/.cursor/skills/implementation-repo-onboarding/SKILL.md +2 -2
- package/template/.cursor/skills/llm-wiki/references/discover.md +3 -3
- package/template/.cursor/skills/prototype-review/SKILL.md +4 -4
- package/template/.cursor/skills/setup-matt-pocock-skills/SKILL.md +10 -10
- package/template/.cursor/skills/triage/SKILL.md +1 -1
- package/template/.cursor/skills/yss-application/references/profiles/layered-mvc-service.md +1 -1
- package/template/.cursor/skills/yss-application/references/profiles/mvc-data-analysis-v1.md +1 -1
- package/template/.cursor/skills/yss-backend-spec-review/SKILL.md +1 -1
- package/template/.cursor/skills/yss-backend-spec-review/references/check-inputs.md +1 -1
- 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-ddd-scaffold-generator/SKILL.md +2 -2
- package/template/.cursor/skills/yss-ddd-scaffold-generator/scripts/generate_scaffold.mjs +1 -1
- package/template/.cursor/skills/yss-design-system/SKILL.md +10 -10
- package/template/.cursor/skills/yss-design-system/references/design-qa-theme.md +3 -3
- package/template/.cursor/skills/yss-design-system/references/design-system.md +3 -3
- 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-exception/SKILL.md +1 -1
- package/template/.cursor/skills/yss-frontend-scaffold-generator/SKILL.md +2 -2
- package/template/.cursor/skills/yss-frontend-scaffold-generator/scripts/generate_scaffold.mjs +1 -1
- package/template/.cursor/skills/yss-frontend-scaffold-generator/scripts/refresh_baseline.mjs +2 -2
- package/template/.cursor/skills/yss-implementation-contract-compiler/SKILL.md +9 -9
- package/template/.cursor/skills/yss-implementation-contract-compiler/references/boundaries.md +1 -1
- package/template/.cursor/skills/yss-implementation-contract-compiler/references/compiler-contract.yaml +9 -9
- package/template/.cursor/skills/yss-implementation-contract-compiler/references/slice-implementation-contract-v2.md +3 -3
- package/template/.cursor/skills/yss-implementation-contract-compiler/references/slice-implementation-contract.md +1 -1
- package/template/.cursor/skills/yss-implementation-contract-compiler/references/strategic-handoff-routing.md +1 -1
- package/template/.cursor/skills/yss-layered-mvc-scaffold-generator/SKILL.md +2 -2
- package/template/.cursor/skills/yss-layered-mvc-scaffold-generator/scripts/data-analysis-profile.mjs +5 -5
- package/template/.cursor/skills/yss-layered-mvc-scaffold-generator/scripts/generate_scaffold.mjs +2 -2
- package/template/.cursor/skills/yss-layered-mvc-scaffold-generator/scripts/scaffold-generator.test.mjs +42 -0
- package/template/.cursor/skills/yss-mybatis/SKILL.md +14 -2
- package/template/.cursor/skills/yss-openapi-draft-review/SKILL.md +2 -2
- package/template/.cursor/skills/yss-openapi-governance/SKILL.md +7 -7
- package/template/.cursor/skills/yss-product-lifecycle/SKILL.md +11 -11
- package/template/.cursor/skills/yss-product-lifecycle/references/matt-yss-adapter.md +5 -5
- package/template/.cursor/skills/yss-product-lifecycle/references/orchestration-contract.yaml +70 -47
- package/template/.cursor/skills/yss-product-lifecycle/references/orchestration.md +22 -14
- package/template/.cursor/skills/yss-product-lifecycle/references/request-triage.md +2 -0
- package/template/.cursor/skills/yss-product-lifecycle/references/state-model.md +11 -11
- package/template/.cursor/skills/yss-product-lifecycle/references/user-decisions.md +2 -2
- package/template/.cursor/skills/yss-prototype-stage/SKILL.md +9 -9
- package/template/.cursor/skills/yss-prototype-stage/references/existing-ui-entry.md +1 -1
- package/template/.cursor/skills/yss-prototype-stage/scripts/build-antd-prototype.mjs +1 -1
- package/template/.cursor/skills/yss-prototype-stage/scripts/offline-html.mjs +3 -3
- package/template/.cursor/skills/yss-prototype-stage/tests/browser-smoke.mjs +2 -2
- package/template/.cursor/skills/yss-prototype-stage/tests/run-scenarios.mjs +4 -4
- package/template/.cursor/skills/yss-prototype-stage/tests/workbench-smoke.mjs +1 -1
- package/template/.cursor/skills/yss-repository/SKILL.md +3 -2
- package/template/.cursor/skills/yss-repository/references/profiles/layered-mvc-service.md +1 -1
- package/template/.cursor/skills/yss-repository/references/profiles/mvc-data-analysis-v1.md +1 -1
- package/template/.cursor/skills/yss-repository/tests/profile-routing.test.mjs +2 -2
- package/template/.cursor/skills/yss-research/SKILL.md +2 -2
- package/template/.cursor/skills/yss-skill-source-index-refresh/references/backend-component-platform-compatibility.md +1 -1
- package/template/.cursor/skills/yss-stage-decision/SKILL.md +5 -5
- package/template/.cursor/skills/yss-stage-decision/references/domain-strategy-contract.md +1 -1
- package/template/.cursor/skills/yss-stage-decision/references/strategic-handoff-routing.md +1 -1
- package/template/.cursor/skills/yss-tactical-design/SKILL.md +2 -2
- package/template/.cursor/skills/yss-tactical-design/references/strategic-handoff-routing.md +1 -1
- package/template/.cursor/skills/yss-tactical-design/references/tactical-design-contract.md +1 -1
- package/template/.cursor/skills/yss-technical-design/SKILL.md +6 -6
- package/template/.cursor/skills/yss-technical-design/references/technical-design-contract.md +1 -1
- package/template/.cursor/skills/yss-ui/SKILL.md +1 -1
- package/template/.cursor/skills/yss-up-springboot3/SKILL.md +1 -1
- package/template/.cursor/skills/yss-web-controller/SKILL.md +1 -1
- package/template/.cursor/skills/yss-web-controller/references/profiles/layered-mvc-service.md +1 -1
- package/template/.cursorrules +1 -1
- package/template/.pi/skills/alibaba-java-code-style/SKILL.md +1 -1
- package/template/.pi/skills/code-review/SKILL.md +6 -6
- package/template/.pi/skills/code-review/references/yss-review-standards.md +1 -1
- package/template/.pi/skills/cross-repo-implementation-routing/SKILL.md +2 -2
- package/template/.pi/skills/i-have-adhd/SKILL.md +1 -1
- package/template/.pi/skills/i-have-adhd/references/yss-adaptation.md +1 -1
- package/template/.pi/skills/i-have-adhd/tests/verify-integration.mjs +2 -2
- package/template/.pi/skills/implementation-repo-onboarding/SKILL.md +2 -2
- package/template/.pi/skills/llm-wiki/references/discover.md +3 -3
- package/template/.pi/skills/prototype-review/SKILL.md +4 -4
- package/template/.pi/skills/setup-matt-pocock-skills/SKILL.md +10 -10
- package/template/.pi/skills/triage/SKILL.md +1 -1
- package/template/.pi/skills/yss-application/references/profiles/layered-mvc-service.md +1 -1
- package/template/.pi/skills/yss-application/references/profiles/mvc-data-analysis-v1.md +1 -1
- package/template/.pi/skills/yss-backend-spec-review/SKILL.md +1 -1
- package/template/.pi/skills/yss-backend-spec-review/references/check-inputs.md +1 -1
- 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-ddd-scaffold-generator/SKILL.md +2 -2
- package/template/.pi/skills/yss-ddd-scaffold-generator/scripts/generate_scaffold.mjs +1 -1
- package/template/.pi/skills/yss-design-system/SKILL.md +10 -10
- package/template/.pi/skills/yss-design-system/references/design-qa-theme.md +3 -3
- package/template/.pi/skills/yss-design-system/references/design-system.md +3 -3
- 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-exception/SKILL.md +1 -1
- package/template/.pi/skills/yss-frontend-scaffold-generator/SKILL.md +2 -2
- package/template/.pi/skills/yss-frontend-scaffold-generator/scripts/generate_scaffold.mjs +1 -1
- package/template/.pi/skills/yss-frontend-scaffold-generator/scripts/refresh_baseline.mjs +2 -2
- package/template/.pi/skills/yss-implementation-contract-compiler/SKILL.md +9 -9
- package/template/.pi/skills/yss-implementation-contract-compiler/references/boundaries.md +1 -1
- package/template/.pi/skills/yss-implementation-contract-compiler/references/compiler-contract.yaml +9 -9
- package/template/.pi/skills/yss-implementation-contract-compiler/references/slice-implementation-contract-v2.md +3 -3
- package/template/.pi/skills/yss-implementation-contract-compiler/references/slice-implementation-contract.md +1 -1
- package/template/.pi/skills/yss-implementation-contract-compiler/references/strategic-handoff-routing.md +1 -1
- package/template/.pi/skills/yss-layered-mvc-scaffold-generator/SKILL.md +2 -2
- package/template/.pi/skills/yss-layered-mvc-scaffold-generator/scripts/data-analysis-profile.mjs +5 -5
- package/template/.pi/skills/yss-layered-mvc-scaffold-generator/scripts/generate_scaffold.mjs +2 -2
- package/template/.pi/skills/yss-layered-mvc-scaffold-generator/scripts/scaffold-generator.test.mjs +42 -0
- package/template/.pi/skills/yss-mybatis/SKILL.md +14 -2
- package/template/.pi/skills/yss-openapi-draft-review/SKILL.md +2 -2
- package/template/.pi/skills/yss-openapi-governance/SKILL.md +7 -7
- package/template/.pi/skills/yss-product-lifecycle/SKILL.md +11 -11
- package/template/.pi/skills/yss-product-lifecycle/references/matt-yss-adapter.md +5 -5
- package/template/.pi/skills/yss-product-lifecycle/references/orchestration-contract.yaml +70 -47
- package/template/.pi/skills/yss-product-lifecycle/references/orchestration.md +22 -14
- package/template/.pi/skills/yss-product-lifecycle/references/request-triage.md +2 -0
- package/template/.pi/skills/yss-product-lifecycle/references/state-model.md +11 -11
- package/template/.pi/skills/yss-product-lifecycle/references/user-decisions.md +2 -2
- package/template/.pi/skills/yss-prototype-stage/SKILL.md +9 -9
- package/template/.pi/skills/yss-prototype-stage/references/existing-ui-entry.md +1 -1
- package/template/.pi/skills/yss-prototype-stage/scripts/build-antd-prototype.mjs +1 -1
- package/template/.pi/skills/yss-prototype-stage/scripts/offline-html.mjs +3 -3
- package/template/.pi/skills/yss-prototype-stage/tests/browser-smoke.mjs +2 -2
- package/template/.pi/skills/yss-prototype-stage/tests/run-scenarios.mjs +4 -4
- package/template/.pi/skills/yss-prototype-stage/tests/workbench-smoke.mjs +1 -1
- package/template/.pi/skills/yss-repository/SKILL.md +3 -2
- package/template/.pi/skills/yss-repository/references/profiles/layered-mvc-service.md +1 -1
- package/template/.pi/skills/yss-repository/references/profiles/mvc-data-analysis-v1.md +1 -1
- package/template/.pi/skills/yss-repository/tests/profile-routing.test.mjs +2 -2
- package/template/.pi/skills/yss-research/SKILL.md +2 -2
- package/template/.pi/skills/yss-skill-source-index-refresh/references/backend-component-platform-compatibility.md +1 -1
- package/template/.pi/skills/yss-stage-decision/SKILL.md +5 -5
- package/template/.pi/skills/yss-stage-decision/references/domain-strategy-contract.md +1 -1
- package/template/.pi/skills/yss-stage-decision/references/strategic-handoff-routing.md +1 -1
- package/template/.pi/skills/yss-tactical-design/SKILL.md +2 -2
- package/template/.pi/skills/yss-tactical-design/references/strategic-handoff-routing.md +1 -1
- package/template/.pi/skills/yss-tactical-design/references/tactical-design-contract.md +1 -1
- package/template/.pi/skills/yss-technical-design/SKILL.md +6 -6
- package/template/.pi/skills/yss-technical-design/references/technical-design-contract.md +1 -1
- package/template/.pi/skills/yss-ui/SKILL.md +1 -1
- package/template/.pi/skills/yss-up-springboot3/SKILL.md +1 -1
- package/template/.pi/skills/yss-web-controller/SKILL.md +1 -1
- package/template/.pi/skills/yss-web-controller/references/profiles/layered-mvc-service.md +1 -1
- package/template/{docs → .template-spec}/adr/README.md +1 -1
- package/template/{docs → .template-spec}/agents/README.md +1 -1
- package/template/{docs → .template-spec}/agents/backend-architecture-profiles.md +2 -2
- package/template/{docs → .template-spec}/agents/digital-human-roles.md +6 -6
- package/template/{docs → .template-spec}/agents/digital-human-roles.yaml +5 -5
- package/template/{docs → .template-spec}/agents/gitlab-workflow-skills.md +2 -2
- package/template/{docs → .template-spec}/agents/issue-tracker.md +1 -1
- package/template/{docs → .template-spec}/agents/skill-migrations.md +6 -2
- package/template/{docs → .template-spec}/agents/triage-labels.md +1 -1
- package/template/{docs → .template-spec}/agents/yss-skill-registry.yaml +9 -8
- package/template/{docs → .template-spec}/architecture/README.md +3 -3
- package/template/{docs → .template-spec}/architecture/templates/tech-design-template.md +3 -1
- package/template/{docs → .template-spec}/design/README.md +12 -12
- package/template/{docs → .template-spec}/design/design.md +20 -20
- package/template/{docs/design/templates/interaction-spec-template.md → .template-spec/design/templates/examples/model-publishing-interaction.example.md} +6 -4
- package/template/{docs/design/templates/state-matrix-template.md → .template-spec/design/templates/examples/model-publishing-state-matrix.example.md} +3 -1
- package/template/.template-spec/design/templates/interaction-spec-template.md +61 -0
- package/template/{docs → .template-spec}/design/templates/product-overview-design-template.md +11 -11
- package/template/{docs → .template-spec}/design/templates/prototype-evidence-template.yaml +4 -4
- package/template/{docs → .template-spec}/design/templates/prototype-review-checklist.md +1 -1
- package/template/.template-spec/design/templates/state-matrix-template.md +29 -0
- package/template/.template-spec/design/tokens/.design-md-projection.json +13 -0
- package/template/{docs → .template-spec}/engineering/backend-platforms.md +1 -1
- package/template/{docs → .template-spec}/plan/entry-review.md +8 -4
- package/template/{docs → .template-spec}/plan/templates/plan-template.md +1 -1
- package/template/{docs → .template-spec}/process/contract-reading.md +1 -1
- package/template/{docs → .template-spec}/process/lifecycle-artifact-map.md +5 -5
- package/template/.template-spec/process/lifecycle-registry-baseline.json +253 -0
- package/template/{docs → .template-spec}/process/lifecycle-registry.yaml +19 -12
- package/template/{docs → .template-spec}/process/plan-migration.md +1 -1
- package/template/{docs → .template-spec}/process/schemas/digital-human-task-package.schema.json +14 -1
- package/template/{docs → .template-spec}/process/schemas/lifecycle-checkpoint.schema.json +15 -0
- package/template/{docs → .template-spec}/process/schemas/lifecycle-registry.schema.json +1 -1
- package/template/{docs → .template-spec}/process/schemas/strategic-design-handoff-v3.schema.json +1 -1
- package/template/{docs → .template-spec}/process/schemas/strategic-design-handoff-v4.schema.json +1 -1
- package/template/{docs → .template-spec}/process/schemas/strategic-design-handoff-v5.schema.json +1 -1
- package/template/{docs → .template-spec}/process/schemas/strategic-design-handoff.schema.json +1 -1
- package/template/{docs → .template-spec}/process/stage-tracking.md +1 -1
- package/template/{docs → .template-spec}/process/subagent-collaboration.md +2 -2
- package/template/{docs → .template-spec}/templates/build-architecture-checklist-template.md +2 -2
- package/template/{docs → .template-spec}/templates/digital-human-runtime-profile-template.md +2 -2
- package/template/{docs → .template-spec}/templates/grok-bot-profile-template.md +1 -1
- package/template/{docs → .template-spec}/templates/local-parent-ticket-template.md +1 -1
- package/template/.template-spec/templates/release-note-template.md +29 -0
- package/template/.template-spec/templates/retro-report-template.md +24 -0
- package/template/{docs → .template-spec}/templates/subagent-task-package-template.md +3 -3
- package/template/.template-spec/templates/verification-record-template.md +64 -0
- package/template/{docs → .template-spec}/templates/vertical-slice-ticket-template.md +5 -10
- package/template/{docs → .template-spec}/user-guide//347/224/250/346/210/267/346/211/213/345/206/214.md +1 -1
- package/template/{docs → .template-spec}/user-guide//347/224/250/346/210/267/346/211/213/345/206/214/347/264/242/345/274/225.md +4 -4
- package/template/AGENTS.md +12 -12
- package/template/CONTEXT.md +3 -3
- package/template/README.md +22 -25
- package/template/scripts/backend-delivery +1 -1
- package/template/scripts/design-md +2 -0
- package/template/scripts/lib/api-contract-decision.mjs +1 -1
- package/template/scripts/lib/approved-execution-context.mjs +5 -5
- package/template/scripts/lib/backend-delivery.mjs +4 -4
- package/template/scripts/lib/backend-platform.mjs +1 -1
- package/template/scripts/lib/backend-review.mjs +1 -1
- package/template/scripts/lib/backend-scaffold-prerequisites.mjs +1 -1
- package/template/scripts/lib/backend-standards-coverage.mjs +2 -2
- package/template/scripts/lib/context-reconciliation.mjs +1 -1
- package/template/scripts/lib/contract-views.mjs +9 -9
- package/template/scripts/lib/delivery-preflight.mjs +6 -6
- package/template/scripts/lib/design-md.mjs +230 -0
- package/template/scripts/lib/digital-human-roles.mjs +2 -2
- package/template/scripts/lib/existing-backend-architecture.mjs +1 -1
- package/template/scripts/lib/existing-ui-baseline.mjs +1 -1
- package/template/scripts/lib/frontend-delivery.mjs +2 -2
- package/template/scripts/lib/governance-layout.mjs +74 -0
- package/template/scripts/lib/harness-execution-scope.mjs +2 -2
- package/template/scripts/lib/lifecycle-context-query.mjs +11 -3
- package/template/scripts/lib/lifecycle-registry.mjs +46 -7
- package/template/scripts/lib/lifecycle-status.mjs +111 -0
- package/template/scripts/lib/lifecycle-transition.mjs +71 -10
- package/template/scripts/lib/openapi-draft-validation.mjs +1 -1
- package/template/scripts/lib/plan-spec-entry-view.mjs +48 -0
- package/template/scripts/lib/plan-spec-entry.mjs +3 -3
- package/template/scripts/lib/skill-registry.mjs +16 -9
- package/template/scripts/lib/skill-supply-chain.mjs +34 -15
- package/template/scripts/lib/slice-contract-preparation.mjs +3 -3
- package/template/scripts/lib/slice-contract.mjs +1 -1
- package/template/scripts/lib/slice-repositories.mjs +1 -1
- package/template/scripts/lib/slice-task-package.mjs +3 -3
- package/template/scripts/lib/stage-tracking-migration.mjs +2 -2
- package/template/scripts/lib/stage-tracking.mjs +5 -5
- package/template/scripts/lib/strategic-feedback.mjs +2 -2
- package/template/scripts/lib/strategic-handoff-routing.mjs +2 -2
- package/template/scripts/lib/strategic-handoff.mjs +15 -15
- package/template/scripts/lib/task-package-schema.mjs +2 -2
- package/template/scripts/lib/task-package.mjs +1 -1
- package/template/scripts/lib/technical-design-boundary.mjs +1 -1
- package/template/scripts/lib/user-decision.mjs +2 -1
- package/template/scripts/lifecycle-status +14 -0
- package/template/scripts/plan-spec-entry +21 -0
- package/template/scripts/strategic-consumer-entry +1 -1
- package/template/scripts/strategic-handoff +1 -1
- package/template/scripts/verify-frontend-implementation-evidence +1 -1
- package/template/scripts/verify-governance-layout +15 -0
- package/template/scripts/verify-lifecycle-checkpoint +1 -1
- package/template/scripts/verify-project-instance +13 -10
- package/template/scripts/verify-scaffold-architecture-decisions +1 -1
- package/template/scripts/verify-strategic-context-import +3 -3
- package/template/skills-lock.json +80 -95
- package/template.manifest.json +30 -15
- 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/archify-integration.md +0 -19
- 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/design-system-sync.yaml +0 -13
- 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/preview-dark.html +0 -178
- package/template/docs/design/preview.css +0 -730
- package/template/docs/design/preview.html +0 -178
- package/template/docs/design/preview.js +0 -71
- package/template/docs/design/prototypes/.gitkeep +0 -1
- package/template/docs/design/tokens/.design-md-projection.json +0 -13
- package/template/docs/implementation/.gitkeep +0 -1
- package/template/docs/plan/IDEATION.md +0 -96
- package/template/docs/process/MATT-POCOCK-ENGINEERING-SKILLS.md +0 -13
- package/template/docs/process/PDCA-SCRUM.md +0 -10
- package/template/docs/process/github-workflows.md +0 -52
- 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/release-note-template.md +0 -14
- package/template/docs/templates/requirement-freeze-template.md +0 -63
- package/template/docs/templates/retro-report-template.md +0 -16
- package/template/docs/templates/risk-register-template.md +0 -11
- package/template/docs/templates/user-story-template.md +0 -20
- package/template/docs/templates/verification-record-template.md +0 -53
- package/template/docs/testing/README.md +0 -110
- /package/template/{docs → .template-spec}/agents/domain.md +0 -0
- /package/template/{docs → .template-spec}/api/templates/openapi-draft-review-checklist.md +0 -0
- /package/template/{docs → .template-spec}/api/templates/openapi-draft-validation-record-template.yaml +0 -0
- /package/template/{docs → .template-spec}/api/templates/openapi-freeze-record-template.md +0 -0
- /package/template/{docs → .template-spec}/api/templates/openapi-json-export-record-template.md +0 -0
- /package/template/{docs → .template-spec}/architecture/templates/architecture-deepening-template.md +0 -0
- /package/template/{docs → .template-spec}/architecture/templates/architecture-review-checklist.md +0 -0
- /package/template/{docs → .template-spec}/architecture/templates/business-architecture-template.md +0 -0
- /package/template/{docs → .template-spec}/architecture/templates/data-architecture-template.md +0 -0
- /package/template/{docs → .template-spec}/architecture/templates/engineering-baseline-review-template.md +0 -0
- /package/template/{docs → .template-spec}/architecture/templates/functional-architecture-template.md +0 -0
- /package/template/{docs → .template-spec}/architecture/templates/system-overview-design-template.md +0 -0
- /package/template/{docs → .template-spec}/design/diagrams/README.md +0 -0
- /package/template/{docs → .template-spec}/design/schemas/visual-baseline.schema.json +0 -0
- /package/template/{docs → .template-spec}/design/templates/prototype-confirmation-template.md +0 -0
- /package/template/{docs → .template-spec}/design/templates/visual-baseline-template.yaml +0 -0
- /package/template/{docs → .template-spec}/design/tokens/theme.json +0 -0
- /package/template/{docs → .template-spec}/design/tokens/tokens.compact.json +0 -0
- /package/template/{docs → .template-spec}/design/tokens/tokens.dark.json +0 -0
- /package/template/{docs → .template-spec}/design/tokens/tokens.default.json +0 -0
- /package/template/{docs → .template-spec}/design/tokens/variables.css +0 -0
- /package/template/{docs → .template-spec}/design/tokens/variables.dark.css +0 -0
- /package/template/{docs → .template-spec}/engineering/backend-platforms.json +0 -0
- /package/template/{docs → .template-spec}/plan/README.md +0 -0
- /package/template/{docs → .template-spec}/plan/templates/competitive-analysis-template.md +0 -0
- /package/template/{docs → .template-spec}/plan/templates/competitive-matrix-template.md +0 -0
- /package/template/{docs → .template-spec}/plan/templates/market-analysis-template.md +0 -0
- /package/template/{docs → .template-spec}/plan/templates/user-pain-points-template.md +0 -0
- /package/template/{docs → .template-spec}/process/delivery-preflight.md +0 -0
- /package/template/{docs → .template-spec}/process/document-writing.md +0 -0
- /package/template/{docs → .template-spec}/process/existing-backend-architecture.md +0 -0
- /package/template/{docs → .template-spec}/process/existing-ui-baseline.md +0 -0
- /package/template/{docs → .template-spec}/process/frontend-backend-delivery.md +0 -0
- /package/template/{docs → .template-spec}/process/harness-process-tailoring.md +0 -0
- /package/template/{docs → .template-spec}/process/implementation-repo-integration.md +0 -0
- /package/template/{docs/process/lifecycle-registry-baseline.json → .template-spec/process/lifecycle-registry-baseline-v1.json} +0 -0
- /package/template/{docs → .template-spec}/process/schemas/api-contract-decision-v2.schema.json +0 -0
- /package/template/{docs → .template-spec}/process/schemas/api-contract-decision.schema.json +0 -0
- /package/template/{docs → .template-spec}/process/schemas/backend-architecture-identity.schema.json +0 -0
- /package/template/{docs → .template-spec}/process/schemas/backend-delivery-verification.schema.json +0 -0
- /package/template/{docs → .template-spec}/process/schemas/backend-delivery.schema.json +0 -0
- /package/template/{docs → .template-spec}/process/schemas/context-reconciliation.schema.json +0 -0
- /package/template/{docs → .template-spec}/process/schemas/data-architecture-decision.schema.json +0 -0
- /package/template/{docs → .template-spec}/process/schemas/delivery-preflight-input.schema.json +0 -0
- /package/template/{docs → .template-spec}/process/schemas/delivery-preflight-result.schema.json +0 -0
- /package/template/{docs → .template-spec}/process/schemas/existing-ui-baseline.schema.json +0 -0
- /package/template/{docs → .template-spec}/process/schemas/frontend-delivery-acceptance-v1.schema.json +0 -0
- /package/template/{docs → .template-spec}/process/schemas/frontend-delivery-acceptance-v3.schema.json +0 -0
- /package/template/{docs → .template-spec}/process/schemas/frontend-delivery-acceptance.schema.json +0 -0
- /package/template/{docs → .template-spec}/process/schemas/frontend-implementation-evidence.schema.json +0 -0
- /package/template/{docs → .template-spec}/process/schemas/frontend-strategic-preflight-v2.schema.json +0 -0
- /package/template/{docs → .template-spec}/process/schemas/frontend-strategic-preflight.schema.json +0 -0
- /package/template/{docs → .template-spec}/process/schemas/implementation-repository-preparation-result.schema.json +0 -0
- /package/template/{docs → .template-spec}/process/schemas/openapi-draft-validation-record.schema.json +0 -0
- /package/template/{docs → .template-spec}/process/schemas/project-scaffold-contract.schema.json +0 -0
- /package/template/{docs → .template-spec}/process/schemas/review-bundle.schema.json +0 -0
- /package/template/{docs → .template-spec}/process/schemas/scaffold-architecture-decisions.schema.json +0 -0
- /package/template/{docs → .template-spec}/process/schemas/slice-implementation-contract-v3.schema.json +0 -0
- /package/template/{docs → .template-spec}/process/schemas/stage-tracking.schema.json +0 -0
- /package/template/{docs → .template-spec}/process/schemas/strategic-consumer-feedback.schema.json +0 -0
- /package/template/{docs → .template-spec}/process/schemas/strategic-feedback-adjudication.schema.json +0 -0
- /package/template/{docs → .template-spec}/process/schemas/strategic-handoff-delivery-verification.schema.json +0 -0
- /package/template/{docs → .template-spec}/process/schemas/strategic-handoff-delivery.schema.json +0 -0
- /package/template/{docs → .template-spec}/process/schemas/strategic-handoff-domain-strategy-v3.schema.json +0 -0
- /package/template/{docs → .template-spec}/process/schemas/strategic-handoff-domain-strategy.schema.json +0 -0
- /package/template/{docs → .template-spec}/process/schemas/strategic-handoff-export-v2.schema.json +0 -0
- /package/template/{docs → .template-spec}/process/schemas/strategic-handoff-export.schema.json +0 -0
- /package/template/{docs → .template-spec}/process/schemas/strategic-handoff-import-receipt-v3.schema.json +0 -0
- /package/template/{docs → .template-spec}/process/schemas/strategic-handoff-import-receipt.schema.json +0 -0
- /package/template/{docs → .template-spec}/process/schemas/strategic-handoff-package.schema.json +0 -0
- /package/template/{docs → .template-spec}/process/schemas/strategic-handoff-stage-decision-package-v3.schema.json +0 -0
- /package/template/{docs → .template-spec}/process/schemas/strategic-handoff-stage-decision-package.schema.json +0 -0
- /package/template/{docs → .template-spec}/process/schemas/subagent-task-package.schema.json +0 -0
- /package/template/{docs → .template-spec}/process/schemas/user-decision.schema.json +0 -0
- /package/template/{docs → .template-spec}/process/strategic-handoff-package.md +0 -0
- /package/template/{docs → .template-spec}/process/templates/context-reconciliation-template.yaml +0 -0
- /package/template/{docs → .template-spec}/process/templates/frontend-implementation-plan-template.yaml +0 -0
- /package/template/{docs → .template-spec}/process/templates/frontend-implementation-verification-template.yaml +0 -0
- /package/template/{docs → .template-spec}/process/templates/lifecycle-checkpoint-template.yaml +0 -0
- /package/template/{docs → .template-spec}/process/templates/scaffold-architecture-decisions-template.yaml +0 -0
- /package/template/{docs → .template-spec}/process/templates/stage-checkpoint-template.md +0 -0
- /package/template/{docs → .template-spec}/process/templates/user-decision-template.yaml +0 -0
- /package/template/{docs → .template-spec}/templates/adr-template.md +0 -0
- /package/template/{docs → .template-spec}/templates/approval-record-template.yaml +0 -0
- /package/template/{docs → .template-spec}/templates/cross-repo-slice-template.md +0 -0
- /package/template/{docs → .template-spec}/templates/examples/lifecycle-writing-examples.md +0 -0
- /package/template/{docs → .template-spec}/templates/implementation-repo-registry-template.md +0 -0
- /package/template/{docs → .template-spec}/templates/openapi-spec-template.yaml +0 -0
- /package/template/{docs → .template-spec}/templates/review-bundle-template.yaml +0 -0
- /package/template/{docs → .template-spec}/templates/review-report-template.md +0 -0
- /package/template/{docs → .template-spec}/templates/spec-delta-template.md +0 -0
- /package/template/{docs → .template-spec}/templates/spec-template.md +0 -0
- /package/template/{docs → .template-spec}/user-guide/yss-ui-mcp.md +0 -0
- /package/template/{docs → .template-spec}/user-guide//346/212/200/346/234/257/350/256/276/350/256/241/347/224/250/346/210/267/346/214/207/345/215/227.md" +0 -0
- /package/template/{docs → .template-spec}/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" +0 -0
- /package/template/{docs → .template-spec}/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" +0 -0
package/template/README.md
CHANGED
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
└── scripts/ ← 模板轻量校验脚本
|
|
33
33
|
```
|
|
34
34
|
|
|
35
|
-
项目需要生成度量、外部实现仓库记录或其他临时产物时再按需创建对应目录。前后端实现仓库接入规则见
|
|
35
|
+
项目需要生成度量、外部实现仓库记录或其他临时产物时再按需创建对应目录。前后端实现仓库接入规则见 `.template-spec/process/implementation-repo-integration.md`。
|
|
36
36
|
|
|
37
37
|
## Quickstart
|
|
38
38
|
|
|
@@ -43,14 +43,14 @@
|
|
|
43
43
|
5. 实现仓库接入、YSS 路由、独立审查、fresh verification 和 Git checkpoint 以 `AGENTS.md` 的硬门禁为准。
|
|
44
44
|
|
|
45
45
|
|
|
46
|
-
YSS UI 组件知识同时通过项目级 MCP 配置提供;支持的客户端、Codex 全局安装和自检方法见 [YSS UI MCP 接入](
|
|
46
|
+
YSS UI 组件知识同时通过项目级 MCP 配置提供;支持的客户端、Codex 全局安装和自检方法见 [YSS UI MCP 接入](./.template-spec/user-guide/yss-ui-mcp.md)。
|
|
47
47
|
|
|
48
48
|
## 模板初始化 CLI
|
|
49
49
|
|
|
50
50
|
`create-yss-spec` 的发布仓库是 [iloveZzz/create-yss-spec](https://github.com/iloveZzz/create-yss-spec)。用户从统一手册选择家族;CLI 源码、测试、打包和发布仍在各自仓库维护:
|
|
51
51
|
|
|
52
|
-
- [YSS 用户手册:CLI 能力与写入方式](
|
|
53
|
-
- [YSS 用户手册:接管、同步与恢复](
|
|
52
|
+
- [YSS 用户手册:CLI 能力与写入方式](./.template-spec/user-guide/用户手册.md#cli-能力与写入方式)
|
|
53
|
+
- [YSS 用户手册:接管、同步与恢复](./.template-spec/user-guide/用户手册.md#接管同步与恢复)
|
|
54
54
|
|
|
55
55
|
推荐入口:
|
|
56
56
|
|
|
@@ -98,35 +98,32 @@ scripts/verify-template-fast
|
|
|
98
98
|
|
|
99
99
|
## 关键文档
|
|
100
100
|
|
|
101
|
+
业务方可从[用户手册](./.template-spec/user-guide/用户手册.md)了解工作入口;阶段、条件门禁和完成证据以生命周期注册表及流程裁剪规则为准。
|
|
102
|
+
|
|
101
103
|
| 文档 | 内容 |
|
|
102
104
|
|------|------|
|
|
103
105
|
| [AGENTS.md](./AGENTS.md) | 全局 AI 指令 + 工程基线入口 + Agent 协作 |
|
|
104
|
-
| [
|
|
105
|
-
| [阶段接入与产物复用使用手册](
|
|
106
|
-
| [
|
|
107
|
-
| [
|
|
108
|
-
| [
|
|
109
|
-
| [
|
|
110
|
-
| [
|
|
111
|
-
| [
|
|
112
|
-
| [
|
|
113
|
-
| [docs/user-guide/yss-ui-mcp.md](./docs/user-guide/yss-ui-mcp.md) | YSS UI MCP 项目配置、全局安装边界与自检 |
|
|
114
|
-
| [docs/plan/IDEATION.md](./docs/plan/IDEATION.md) | 机会构想方法 |
|
|
115
|
-
| [docs/architecture/README.md](./docs/architecture/README.md) | 架构设计 + 审查清单 |
|
|
116
|
-
| [docs/testing/README.md](./docs/testing/README.md) | 测试策略 |
|
|
106
|
+
| [.template-spec/user-guide/用户手册.md](./.template-spec/user-guide/用户手册.md) | 从首次只读检查到需求、开发、审查、发布和 CLI 操作的统一用户手册 |
|
|
107
|
+
| [阶段接入与产物复用使用手册](./.template-spec/user-guide/阶段接入与产物复用使用手册.md) | 复用上游资产,从指定入口继续;含后端交付后前端开发操作 |
|
|
108
|
+
| [.template-source/process/MATT-POCOCK-ENGINEERING-SKILLS.md](./.template-source/process/MATT-POCOCK-ENGINEERING-SKILLS.md) | Matt Pocock Engineering Skills 集成与使用 |
|
|
109
|
+
| [.template-spec/process/lifecycle-registry.yaml](./.template-spec/process/lifecycle-registry.yaml) | 生命周期结构事实源:主阶段、门禁、产物、工作单元、证据与稳定 ID |
|
|
110
|
+
| [.template-spec/process/harness-process-tailoring.md](./.template-spec/process/harness-process-tailoring.md) | 小改动 / 中等变更 / 新模块的流程裁剪指南 |
|
|
111
|
+
| [.template-spec/process/implementation-repo-integration.md](./.template-spec/process/implementation-repo-integration.md) | 外部前端 / 后端实现仓库接入与跨仓库切片绑定 |
|
|
112
|
+
| [.template-spec/agents/README.md](./.template-spec/agents/README.md) | Agent 协作文档目录说明 |
|
|
113
|
+
| [.template-spec/user-guide/yss-ui-mcp.md](./.template-spec/user-guide/yss-ui-mcp.md) | YSS UI MCP 项目配置、全局安装边界与自检 |
|
|
114
|
+
| [.template-spec/architecture/README.md](./.template-spec/architecture/README.md) | 架构设计 + 审查清单 |
|
|
117
115
|
|
|
118
116
|
## 核心模板
|
|
119
117
|
|
|
120
118
|
| 模板 | 用途 |
|
|
121
119
|
|------|------|
|
|
122
|
-
| [
|
|
123
|
-
| [
|
|
124
|
-
| [
|
|
125
|
-
| [
|
|
126
|
-
| [
|
|
127
|
-
| [
|
|
128
|
-
| [docs/architecture/templates/architecture-deepening-template.md](./docs/architecture/templates/architecture-deepening-template.md) | 架构 deepening 候选与 seam 设计 |
|
|
120
|
+
| [.template-spec/templates/spec-template.md](./.template-spec/templates/spec-template.md) | Spec,包含 OpenAPI 影响、测试决策、AI / 人工审查点 |
|
|
121
|
+
| [.template-spec/templates/local-parent-ticket-template.md](./.template-spec/templates/local-parent-ticket-template.md) | Local Markdown 功能父 Ticket 与生命周期索引 |
|
|
122
|
+
| [.template-spec/templates/vertical-slice-ticket-template.md](./.template-spec/templates/vertical-slice-ticket-template.md) | 垂直切片 Ticket |
|
|
123
|
+
| [.template-spec/templates/implementation-repo-registry-template.md](./.template-spec/templates/implementation-repo-registry-template.md) | 外部实现仓库登记 |
|
|
124
|
+
| [.template-spec/templates/cross-repo-slice-template.md](./.template-spec/templates/cross-repo-slice-template.md) | 跨仓库垂直切片记录 |
|
|
125
|
+
| [.template-spec/architecture/templates/architecture-deepening-template.md](./.template-spec/architecture/templates/architecture-deepening-template.md) | 架构 deepening 候选与 seam 设计 |
|
|
129
126
|
|
|
130
127
|
## 按职责使用与升级
|
|
131
128
|
|
|
132
|
-
[四个现行家族用户手册](
|
|
129
|
+
[四个现行家族用户手册](.template-spec/user-guide/用户手册.md)提供选型、初始化及升级;[设备借用贯穿案例](.template-spec/user-guide/设备借用贯穿案例.md)演示战略、后端、前端与统一验收。[全部手册](.template-spec/user-guide/用户手册索引.md)给出本体和子项目入口。GitHub 当前能力、npm 发布版本与实例模板快照分别核对。
|
|
@@ -8,7 +8,7 @@ async function preflightExport(values) {
|
|
|
8
8
|
const root=path.resolve(values['source-root']),delivery=read(safe(root,values.delivery));
|
|
9
9
|
const document=read(safe(root,delivery.slice_contract.ref)),contract=document.slice_contract||document;
|
|
10
10
|
const identity=contract.resolution?.architecture_identity||contract.backend?.architecture_identity||contract.architecture_identity;
|
|
11
|
-
ensure(identity?.schema_version!==2||values['preflight-input'],'preflight-required: 既有工程身份 v2 导出必须提供 --preflight-input <file>;先按
|
|
11
|
+
ensure(identity?.schema_version!==2||values['preflight-input'],'preflight-required: 既有工程身份 v2 导出必须提供 --preflight-input <file>;先按 .template-spec/process/delivery-preflight.md 准备源资产清单并执行 export 阶段只读预检');
|
|
12
12
|
if(!values['preflight-input'])return;
|
|
13
13
|
const {preflightDelivery}=await import('./lib/delivery-preflight.mjs');
|
|
14
14
|
const input=read(path.resolve(values['preflight-input']));
|
|
@@ -8,7 +8,7 @@ import { validateJsonSchema } from "./json-schema.mjs";
|
|
|
8
8
|
import { openApiDigest, resolveOpenApiRef, validateOpenApiDraftValidationRecord } from "./openapi-draft-validation.mjs";
|
|
9
9
|
|
|
10
10
|
const TEMPLATE_ROOT = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "../..");
|
|
11
|
-
const SCHEMA = path.join(TEMPLATE_ROOT, "
|
|
11
|
+
const SCHEMA = path.join(TEMPLATE_ROOT, ".template-spec/process/schemas/api-contract-decision.schema.json");
|
|
12
12
|
const fail = (message) => { throw new TypeError(message); };
|
|
13
13
|
const readBound = (root, ref, label) => {
|
|
14
14
|
const file = resolveOpenApiRef(root, ref);
|
|
@@ -38,13 +38,13 @@ export function verifySliceContractApproval(binding,{root=process.cwd(),contract
|
|
|
38
38
|
assertExistingSliceStructure(contract);
|
|
39
39
|
check((!binding.id||binding.id===contract.contract_id)&&(!binding.version||binding.version===contract.contract_version),'EXECUTION_CONTRACT_CONFLICT','当前合同身份或版本不匹配');
|
|
40
40
|
if(expected)check(same(sourceSliceContract(expected),sourceSliceContract(contract)),'EXECUTION_CONTRACT_CONFLICT','调用方合同与持久化原字节不一致');
|
|
41
|
-
const roles=read(safe(root,'
|
|
41
|
+
const roles=read(safe(root,'.template-spec/agents/digital-human-roles.yaml'));
|
|
42
42
|
const approval=read(safe(root,binding.approval_ref));
|
|
43
43
|
if(!countersignRuleForGate(roles.gate_policy,gateId)&&roles.gate_policy.orchestrator?.includes(gateId)) {
|
|
44
44
|
// The current lifecycle already owns this gate. Consume its checkpoint and existing
|
|
45
45
|
// implementation-scope decision instead of inventing an approval-record countersignature.
|
|
46
46
|
check(approval?.gates&&approval?.human_review&&!approval.gate_id,'EXECUTION_APPROVAL_PROTOCOL','当前主控 gate 需要生命周期 checkpoint,不接受伪造 approval-record');
|
|
47
|
-
schema(approval,'
|
|
47
|
+
schema(approval,'.template-spec/process/schemas/lifecycle-checkpoint.schema.json');
|
|
48
48
|
const gate=approval.gates?.[gateId],review=approval.human_review||{};
|
|
49
49
|
check(approval.repository_mode==='project-instance'&&approval.status!=='blocked'&&approval.blockers.length===0,'EXECUTION_APPROVAL_BLOCKED','主控 checkpoint 仍有阻断或不是产品实例');
|
|
50
50
|
check(gate?.status==='approved'&&gate.subject_ref===binding.ref,'EXECUTION_APPROVAL_SCOPE','主控 gate 未批准当前持久化 Slice');
|
|
@@ -80,11 +80,11 @@ function primeApprovalSchemas(binding,root){
|
|
|
80
80
|
// Original consumers still validate every semantic and authorization rule below.
|
|
81
81
|
try{
|
|
82
82
|
const source=parseSliceYaml(readFileSync(safe(root,binding.ref))),raw=source.slice_contract||source;
|
|
83
|
-
if(raw.schema_version===3)add(raw,'
|
|
83
|
+
if(raw.schema_version===3)add(raw,'.template-spec/process/schemas/slice-implementation-contract-v3.schema.json',false,'verbose');
|
|
84
84
|
const approval=read(safe(root,binding.approval_ref));
|
|
85
85
|
if(approval.gates&&approval.human_review&&!approval.gate_id){
|
|
86
|
-
add(approval,'
|
|
87
|
-
for(const requirement of approval.human_review.user_decisions||[])if(requirement.user_decision_ref&&!requirement.continuation_ref){const ref=path.isAbsolute(requirement.user_decision_ref)?path.relative(root,requirement.user_decision_ref):requirement.user_decision_ref;add(read(safe(root,ref)),'
|
|
86
|
+
add(approval,'.template-spec/process/schemas/lifecycle-checkpoint.schema.json',false,'verbose');
|
|
87
|
+
for(const requirement of approval.human_review.user_decisions||[])if(requirement.user_decision_ref&&!requirement.continuation_ref){const ref=path.isAbsolute(requirement.user_decision_ref)?path.relative(root,requirement.user_decision_ref):requirement.user_decision_ref;add(read(safe(root,ref)),'.template-spec/process/schemas/user-decision.schema.json',true,'compact');}
|
|
88
88
|
}
|
|
89
89
|
}catch{/* The original consumer reports missing or invalid input with its existing code. */}
|
|
90
90
|
if(jobs.length)validateJsonSchemas(jobs);return true;
|
|
@@ -20,7 +20,7 @@ async function approvedFile(root, binding, gate) {
|
|
|
20
20
|
const bytes=boundFile(root,binding);
|
|
21
21
|
if(gate==='gate.slice-contract-approved'){verifySliceContractApproval(binding,{root});return bytes;}
|
|
22
22
|
const record=read(safe(root,binding.approval_ref));
|
|
23
|
-
const roles=sourceApprovalPolicy(read(safe(root,'
|
|
23
|
+
const roles=sourceApprovalPolicy(read(safe(root,'.template-spec/agents/digital-human-roles.yaml')));
|
|
24
24
|
await sourceApproval(record,roles,root);
|
|
25
25
|
ensure((Array.isArray(gate)?gate:[gate]).includes(record.gate_id),`交付资产批准门禁不匹配: ${binding.ref}`);
|
|
26
26
|
ensure(record.artifact_bindings?.some(x=>x.id===binding.id&&x.version===binding.version&&x.digest===binding.digest),`批准未绑定当前交付资产: ${binding.ref}`);
|
|
@@ -30,7 +30,7 @@ async function approvedFile(root, binding, gate) {
|
|
|
30
30
|
function verification(root, binding, basis, kind) {
|
|
31
31
|
boundFile(root,binding);
|
|
32
32
|
const record=read(safe(root,binding.ref));
|
|
33
|
-
schema(record,'
|
|
33
|
+
schema(record,'.template-spec/process/schemas/backend-delivery-verification.schema.json');
|
|
34
34
|
ensure(record.kind===kind&&record.subject_digest===basis,`验证未绑定当前交付: ${kind}`);
|
|
35
35
|
ensure(record.results.every(x=>x.exit_code===0),`后端验证失败: ${kind}`);
|
|
36
36
|
for(const result of record.results) {
|
|
@@ -43,7 +43,7 @@ function verification(root, binding, basis, kind) {
|
|
|
43
43
|
export async function inspectBackendDelivery(root, ref, { readOnly = false } = {}) {
|
|
44
44
|
project(root);
|
|
45
45
|
const delivery=read(safe(root,ref));
|
|
46
|
-
schema(delivery,'
|
|
46
|
+
schema(delivery,'.template-spec/process/schemas/backend-delivery.schema.json');
|
|
47
47
|
ensure(boundFile(root,delivery.environment.test_data).length>0,'测试数据准备说明为空');
|
|
48
48
|
await approvedFile(root,delivery.openapi,['gate.engineering-contract-approved','gate.openapi-frozen','gate.openapi-freeze-confirmed']);
|
|
49
49
|
await approvedFile(root,delivery.slice_contract,'gate.slice-contract-approved');
|
|
@@ -115,7 +115,7 @@ export async function exportBackendDelivery({sourceRoot,deliveryRef,output,zip=f
|
|
|
115
115
|
const root=project(sourceRoot), target=path.resolve(output);
|
|
116
116
|
ensure(!existsSync(target)&&(!zip||!existsSync(`${target}.zip`)),'后端包输出已存在');
|
|
117
117
|
const {delivery}=await inspectBackendDelivery(root,deliveryRef);
|
|
118
|
-
const refs=new Set([deliveryRef,'yss-project.yaml','CONTEXT.md','
|
|
118
|
+
const refs=new Set([deliveryRef,'yss-project.yaml','CONTEXT.md','.template-spec/agents/digital-human-roles.yaml',delivery.openapi.ref,delivery.openapi.approval_ref,delivery.slice_contract.ref,delivery.slice_contract.approval_ref,delivery.environment.test_data.ref,...delivery.supporting_files]);
|
|
119
119
|
for(const binding of Object.values(delivery.verification)) {
|
|
120
120
|
refs.add(binding.ref);
|
|
121
121
|
for(const result of read(safe(root,binding.ref)).results)for(const file of result.evidence)refs.add(file.ref);
|
|
@@ -6,7 +6,7 @@ import path from "node:path";
|
|
|
6
6
|
import { fileURLToPath } from "node:url";
|
|
7
7
|
|
|
8
8
|
export const PLATFORM_ROOT = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "../..");
|
|
9
|
-
export const PLATFORM_CATALOG_REF = "
|
|
9
|
+
export const PLATFORM_CATALOG_REF = ".template-spec/engineering/backend-platforms.json";
|
|
10
10
|
export const PLATFORM_SKILLS = ["yss-ddd-scaffold-generator", "yss-layered-mvc-scaffold-generator"];
|
|
11
11
|
const fail = (message) => { throw new TypeError(`backend-platform: ${message}`); };
|
|
12
12
|
const componentFail = (code, message) => {
|
|
@@ -124,7 +124,7 @@ function validateBaselineReview(state,{root}) {
|
|
|
124
124
|
ensure(digest(fs.readFileSync(file(root,input.spec_binding.ref)))===input.spec_binding.digest.replace(/^sha256:/,''),'Spec evidence stale');
|
|
125
125
|
ensure(text(input.spec_binding.approval_ref),'Spec approval record required');
|
|
126
126
|
const approval=parseSliceYaml(fs.readFileSync(file(root,input.spec_binding.approval_ref),'utf8'));
|
|
127
|
-
validateApprovalRecord(approval,{root,requireApproved:true,rolesDoc:parseSliceYaml(fs.readFileSync(file(root,'
|
|
127
|
+
validateApprovalRecord(approval,{root,requireApproved:true,rolesDoc:parseSliceYaml(fs.readFileSync(file(root,'.template-spec/agents/digital-human-roles.yaml'),'utf8'))});
|
|
128
128
|
ensure(approval.gate_id==='gate.spec-baseline-approved' && approval.artifact_bindings?.some(b=>b.digest.replace(/^sha256:/,'')===input.spec_binding.digest.replace(/^sha256:/,'')),'Spec approval does not bind current baseline');
|
|
129
129
|
ensure(Array.isArray(result.constraint_results)&&result.constraint_results.some(r=>r.axis==='Spec'&&r.status==='passed'&&text(r.evidence_ref)),'Spec acceptance evidence required');
|
|
130
130
|
for(const row of result.constraint_results.filter(r=>r.axis==='Spec')) {
|
|
@@ -8,7 +8,7 @@ import { ROOT } from "./lifecycle-registry.mjs";
|
|
|
8
8
|
import { validateTechnicalDesign } from "../../.agents/skills/yss-technical-design/scripts/validate-technical-design.mjs";
|
|
9
9
|
import { validateApiContractDecision } from "./api-contract-decision.mjs";
|
|
10
10
|
|
|
11
|
-
const DATA_DECISION_SCHEMA = path.join(ROOT, "
|
|
11
|
+
const DATA_DECISION_SCHEMA = path.join(ROOT, ".template-spec/process/schemas/data-architecture-decision.schema.json");
|
|
12
12
|
|
|
13
13
|
const fail = (message) => { throw new TypeError(message); };
|
|
14
14
|
const digest = (bytes) => `sha256:${createHash("sha256").update(bytes).digest("hex")}`;
|
|
@@ -153,7 +153,7 @@ export function compileStandardsCoverage({root,projectRoot,contract=null,scope_k
|
|
|
153
153
|
// Derive component ownership from the existing registry and the locked platform index.
|
|
154
154
|
// These are discovery signals only; they never certify component compatibility.
|
|
155
155
|
const discovery_sources=[];
|
|
156
|
-
const registryRef='
|
|
156
|
+
const registryRef='.template-spec/agents/yss-skill-registry.yaml';
|
|
157
157
|
if(fs.existsSync(path.join(root,registryRef))) {
|
|
158
158
|
const registryBytes=fs.readFileSync(coverageFile(root,registryRef));
|
|
159
159
|
discovery_sources.push({ref:registryRef,digest:coverageDigest(registryBytes)});
|
|
@@ -195,7 +195,7 @@ export function compileStandardsCoverage({root,projectRoot,contract=null,scope_k
|
|
|
195
195
|
for(const skill of observedSkills){const {rules,sourceDigests}=readRules(root,skill);rulesSources.push(...sourceDigests);for(const rule of rules){const applicability=tags.has(rule.when)?'required':(['pagination','batch'].includes(rule.when)?'conditional':'not-applicable');constraints.push({...rule,constraint_id:rule.id,applicability,applicability_basis:applicability==='required'?[...reasons.get(skill)].sort():[`no-observed-${rule.when}; reviewer must reconcile actual behavior`]});}}
|
|
196
196
|
ensure(new Set(constraints.map(r=>r.constraint_id)).size===constraints.length,'duplicate canonical constraint_id');
|
|
197
197
|
const platform=identity?.platform_configuration;
|
|
198
|
-
const catalogRef='
|
|
198
|
+
const catalogRef='.template-spec/engineering/backend-platforms.json';
|
|
199
199
|
const catalogPath=path.join(root,catalogRef);
|
|
200
200
|
let platform_catalog_digest=null;
|
|
201
201
|
if(platform?.profile_id && fs.existsSync(catalogPath)) {
|
|
@@ -3,7 +3,7 @@ import path from "node:path";
|
|
|
3
3
|
import { parseDocument } from "../vendor/yaml.mjs";
|
|
4
4
|
import { resolveContextTermRefs, verifyContextSnapshot } from "./context-contract.mjs";
|
|
5
5
|
import { validateJsonSchema } from "./json-schema.mjs";
|
|
6
|
-
const schemaPath = path.resolve(import.meta.dirname, "
|
|
6
|
+
const schemaPath = path.resolve(import.meta.dirname, "../../.template-spec/process/schemas/context-reconciliation.schema.json");
|
|
7
7
|
export function parseReconciliationFile(file) {
|
|
8
8
|
const document = parseDocument(readFileSync(file, "utf8"), { maxAliasCount: 0, uniqueKeys: true });
|
|
9
9
|
if (document.errors.length) throw new TypeError(document.errors[0].message);
|
|
@@ -7,13 +7,13 @@ import {renderSliceContractView,diffSliceContracts} from './slice-contract-views
|
|
|
7
7
|
export const contractKinds=Object.freeze({
|
|
8
8
|
slice:null,plan:null,spec:null,'product-design':null,'prototype-confirmation':null,'visual-baseline':null,
|
|
9
9
|
'technical-design':'.agents/skills/yss-technical-design/references/technical-design.schema.json',
|
|
10
|
-
'api-decision':'
|
|
11
|
-
'data-decision':'
|
|
12
|
-
scaffold:'
|
|
13
|
-
'scaffold-decision':'
|
|
14
|
-
handoff:null,'backend-delivery':'
|
|
15
|
-
'frontend-acceptance':'
|
|
16
|
-
'context-reconciliation':'
|
|
10
|
+
'api-decision':'.template-spec/process/schemas/api-contract-decision.schema.json',
|
|
11
|
+
'data-decision':'.template-spec/process/schemas/data-architecture-decision.schema.json',
|
|
12
|
+
scaffold:'.template-spec/process/schemas/project-scaffold-contract.schema.json',
|
|
13
|
+
'scaffold-decision':'.template-spec/process/schemas/scaffold-architecture-decisions.schema.json',
|
|
14
|
+
handoff:null,'backend-delivery':'.template-spec/process/schemas/backend-delivery.schema.json',
|
|
15
|
+
'frontend-acceptance':'.template-spec/process/schemas/frontend-delivery-acceptance.schema.json',approval:null,'user-decision':'.template-spec/process/schemas/user-decision.schema.json',
|
|
16
|
+
'context-reconciliation':'.template-spec/process/schemas/context-reconciliation.schema.json'
|
|
17
17
|
});
|
|
18
18
|
const object=v=>v&&typeof v==='object'&&!Array.isArray(v);
|
|
19
19
|
const stringify=v=>typeof v==='string'?v:JSON.stringify(v,null,2);
|
|
@@ -84,8 +84,8 @@ function view(ref,{root=process.cwd(),kind,profile='review',unit_id}={}){
|
|
|
84
84
|
}else{
|
|
85
85
|
const {bytes,raw}=load(ref,root);binding={ref,id:raw.contract_id||raw.technical_design_id||raw.decision_id||raw.request?.request_id||raw.handoff_id||raw.baseline_id||raw.spec_id||raw.plan_id||raw.id||null,version:raw.contract_version||raw.decision_version||raw.handoff_version||raw.version||null,digest:hash(bytes)};
|
|
86
86
|
blockers.push(...declaredBlockers(raw));
|
|
87
|
-
let schemaRef=contractKinds[kind];if(kind==='api-decision'&&raw.schema_version===2)schemaRef='
|
|
88
|
-
if(kind==='frontend-acceptance'&&[1,3].includes(raw.schema_version))schemaRef
|
|
87
|
+
let schemaRef=contractKinds[kind];if(kind==='api-decision'&&raw.schema_version===2)schemaRef='.template-spec/process/schemas/api-contract-decision-v2.schema.json';
|
|
88
|
+
if(kind==='frontend-acceptance'&&[1,3].includes(raw.schema_version))schemaRef=`.template-spec/process/schemas/frontend-delivery-acceptance${raw.schema_version===1?'-v1':'-v3'}.schema.json`;
|
|
89
89
|
if(schemaRef)try{schema(raw,schemaRef);checks.push('结构校验');}catch(error){blockers.push(error.message);}
|
|
90
90
|
else checks.push('结构与批准未核验,按资产所有者规则继续');
|
|
91
91
|
sourceChecks=references(raw,root);if(sourceChecks.length)checks.push(`核对 ${sourceChecks.length} 项可识别来源摘要;其余语义由资产所有者核验`);for(const source of sourceChecks)if(!source.current)blockers.push(`来源不可读或过期:${source.ref}`);
|
|
@@ -28,7 +28,7 @@ export function invalidPreflightInput(message) {
|
|
|
28
28
|
|
|
29
29
|
/** Installed profile owns backend technical authoring; caller governance_root cannot grant it. */
|
|
30
30
|
export function backendPreflightCapability() {
|
|
31
|
-
const profileRef=path.join(ROOT,'
|
|
31
|
+
const profileRef=path.join(ROOT,'.template-spec/process/harness-profile.yaml');
|
|
32
32
|
const profile=existsSync(profileRef)?read(profileRef):null;
|
|
33
33
|
const profileId=profile?.profile_id||'template.full';
|
|
34
34
|
const ownsBackend=!profile||profileId==='harness.backend-delivery';
|
|
@@ -49,7 +49,7 @@ function requireBackendCapability(key) {
|
|
|
49
49
|
/** Read-only: never executes input commands, starts services, unpacks archives or writes receipts. */
|
|
50
50
|
export async function preflightDelivery(input,options={}) {return withValidationPhase({root:path.resolve(options.root||process.cwd(),typeof input?.governance_root==='string'?input.governance_root:'.'),purpose:`delivery-${options.stage}`,slice_id:input?.scope?.slice_id,work_unit_id:options.work_unit_id,readOnly:true,signal:options.signal},()=>preflight(input,options));}
|
|
51
51
|
async function preflight(input,{stage,root=process.cwd(),work_unit_id}={}) {
|
|
52
|
-
try { ensure(STAGES.includes(stage),'未知阶段;必须是 prepare|build|export|accept');schema(input,'
|
|
52
|
+
try { ensure(STAGES.includes(stage),'未知阶段;必须是 prepare|build|export|accept');schema(input,'.template-spec/process/schemas/delivery-preflight-input.schema.json'); }
|
|
53
53
|
catch(error) { return invalidPreflightInput(error.message); }
|
|
54
54
|
root=path.resolve(root,input.governance_root||'.');
|
|
55
55
|
const deliveryKind=input.delivery_kind||'complete';
|
|
@@ -121,7 +121,7 @@ async function preflight(input,{stage,root=process.cwd(),work_unit_id}={}) {
|
|
|
121
121
|
async function approved(root,binding,gates) {
|
|
122
122
|
ensure(binding.approval_ref&&binding.id&&binding.version,'缺少当前资产 id/version/approval_ref');
|
|
123
123
|
const record=read(safe(root,binding.approval_ref));
|
|
124
|
-
const roles=sourceApprovalPolicy(read(safe(root,'
|
|
124
|
+
const roles=sourceApprovalPolicy(read(safe(root,'.template-spec/agents/digital-human-roles.yaml')));
|
|
125
125
|
validateApprovalRecord(record,{rolesDoc:roles,requireApproved:true,root,read:ref=>readFileSync(safe(root,path.relative(root,ref).split(path.sep).join('/')))});
|
|
126
126
|
ensure(gates.includes(record.gate_id),'资产批准使用错误门禁');
|
|
127
127
|
ensure(record.artifact_bindings?.some(x=>x.id===binding.id&&x.version===binding.version&&x.digest===binding.digest),'stale: 批准未绑定当前资产身份、版本及字节');
|
|
@@ -186,7 +186,7 @@ async function verifyAsset(key,data,binding,{root,input,documents,assets,executi
|
|
|
186
186
|
await approved(root,binding,['gate.product-design-approved','gate.user-confirmation']);
|
|
187
187
|
} else if(key==='build') {
|
|
188
188
|
// Same build shape used by backend-delivery, captured independently before packaging.
|
|
189
|
-
const deliverySchema=read(safe(ROOT,'
|
|
189
|
+
const deliverySchema=read(safe(ROOT,'.template-spec/process/schemas/backend-delivery.schema.json'));
|
|
190
190
|
const buildRules=deliverySchema.properties.build;
|
|
191
191
|
// Validate in memory to avoid writing a generated schema: check the published required fields.
|
|
192
192
|
for(const field of buildRules.required||[])ensure(Object.hasOwn(data,field),`构建缺少交付协议字段: ${field}`);
|
|
@@ -195,7 +195,7 @@ async function verifyAsset(key,data,binding,{root,input,documents,assets,executi
|
|
|
195
195
|
ensure(/^sha256:[0-9a-f]{64}$/.test(data.artifact_digest),'构建制品摘要无效');
|
|
196
196
|
ensure(Object.keys(data).every(key=>Object.hasOwn(buildRules.properties,key)),'构建包含交付协议未定义字段');
|
|
197
197
|
} else if(key==='deployment') {
|
|
198
|
-
schema(data,'
|
|
198
|
+
schema(data,'.template-spec/process/schemas/backend-delivery-verification.schema.json');
|
|
199
199
|
ensure(data.kind==='backend-deployment','部署证据 kind 必须为 backend-deployment');
|
|
200
200
|
for(const result of data.results) {
|
|
201
201
|
ensure(result.exit_code===0&&Number.isFinite(Date.parse(result.executed_at))&&Date.parse(result.executed_at)<=Date.now()+60000,'部署执行结果或时间无效');
|
|
@@ -206,7 +206,7 @@ async function verifyAsset(key,data,binding,{root,input,documents,assets,executi
|
|
|
206
206
|
ensure(data.subject_digest===backendDeliveryBasis(documents.backend_delivery),'stale: 部署验证未绑定当前交付依据');
|
|
207
207
|
}
|
|
208
208
|
} else if(key==='backend_delivery') {
|
|
209
|
-
schema(data
|
|
209
|
+
schema(data,`.template-spec/process/schemas/backend-delivery${data.schema_version===2?'-v2':''}.schema.json`);
|
|
210
210
|
ensure(data.scope.slice_id===input.scope.slice_id&&input.scope.operation_ids.every(id=>data.scope.operation_ids.includes(id)),'后端交付切片/接口范围不匹配');
|
|
211
211
|
for(const asset of ['openapi','slice_contract'])if(assets[asset])ensure(data[asset].ref===assets[asset].ref&&data[asset].digest===assets[asset].digest,'后端交付引用与预检输入不一致');
|
|
212
212
|
for(const asset of [data.environment.test_data,...Object.values(data.verification)])fileBinding(root,asset);
|
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { createHash } from "node:crypto";
|
|
3
|
+
import { existsSync, readFileSync, writeFileSync } from "node:fs";
|
|
4
|
+
import path from "node:path";
|
|
5
|
+
import { spawnSync } from "node:child_process";
|
|
6
|
+
import { createRequire } from "node:module";
|
|
7
|
+
import { parseDocument } from "../vendor/yaml.mjs";
|
|
8
|
+
|
|
9
|
+
const repositoryRoot = path.resolve(new URL("../..", import.meta.url).pathname);
|
|
10
|
+
const designPath = path.join(repositoryRoot, "DESIGN.md");
|
|
11
|
+
const projectionDir = path.join(repositoryRoot, ".template-spec/design/tokens");
|
|
12
|
+
const manifestPath = path.join(projectionDir, ".design-md-projection.json");
|
|
13
|
+
const syncMetadataPath = path.join(repositoryRoot, ".template-source/design/design-system-sync.yaml");
|
|
14
|
+
const expectedSections = ["Overview", "Colors", "Typography", "Layout", "Elevation & Depth", "Shapes", "Components", "Do's and Don'ts"];
|
|
15
|
+
const requiredFrontmatter = ["version", "name", "description", "colors", "typography", "rounded", "spacing", "components"];
|
|
16
|
+
const componentProperties = new Set(["backgroundColor", "textColor", "typography", "rounded", "padding", "size", "height", "width"]);
|
|
17
|
+
|
|
18
|
+
function sha256(value) { return createHash("sha256").update(value).digest("hex"); }
|
|
19
|
+
function fail(message) { throw new Error(message); }
|
|
20
|
+
function escapeRegExp(value) { return value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"); }
|
|
21
|
+
|
|
22
|
+
function resolveValue(value, frontmatter) {
|
|
23
|
+
const match = typeof value === "string" ? value.match(/^\{(colors|typography|rounded|spacing)\.([\w-]+)\}$/) : null;
|
|
24
|
+
return match ? frontmatter[match[1]]?.[match[2]] : value;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
function projectedCssVariables(frontmatter) {
|
|
28
|
+
const components = frontmatter.components;
|
|
29
|
+
return {
|
|
30
|
+
"yss-color-primary-control": resolveValue(components["button-primary"].backgroundColor, frontmatter),
|
|
31
|
+
"yss-color-primary-control-hover": resolveValue(components["button-primary-hover"].backgroundColor, frontmatter),
|
|
32
|
+
"yss-color-on-primary": resolveValue(components["button-primary"].textColor, frontmatter),
|
|
33
|
+
"yss-control-height": resolveValue(components["button-primary"].height, frontmatter),
|
|
34
|
+
"yss-card-padding": resolveValue(components["card-default"].padding, frontmatter),
|
|
35
|
+
"yss-control-height-compact": resolveValue(components["button-compact"].height, frontmatter),
|
|
36
|
+
"yss-card-compact-padding": resolveValue(components["card-compact"].padding, frontmatter)
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
function writeCssProjection(frontmatter) {
|
|
41
|
+
const cssPath = path.join(projectionDir, "variables.css");
|
|
42
|
+
let source = readFileSync(cssPath, "utf8");
|
|
43
|
+
for (const [name, value] of Object.entries(projectedCssVariables(frontmatter))) {
|
|
44
|
+
const declaration = ` --${name}: ${value};`;
|
|
45
|
+
const pattern = new RegExp(`^\\s*--${escapeRegExp(name)}:.*;$`, "m");
|
|
46
|
+
source = pattern.test(source) ? source.replace(pattern, declaration) : source.replace(":root {\n", `:root {\n${declaration}\n`);
|
|
47
|
+
}
|
|
48
|
+
writeFileSync(cssPath, source);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
function validateCssProjection(frontmatter) {
|
|
52
|
+
const source = readFileSync(path.join(projectionDir, "variables.css"), "utf8");
|
|
53
|
+
for (const [name, value] of Object.entries(projectedCssVariables(frontmatter))) {
|
|
54
|
+
if (!new RegExp(`^\\s*--${escapeRegExp(name)}: ${escapeRegExp(String(value))};$`, "m").test(source)) fail(`variables.css 的 --${name} 与 DESIGN.md 不一致`);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
function readDesign(file = designPath) {
|
|
59
|
+
const source = readFileSync(file, "utf8");
|
|
60
|
+
if (!source.startsWith("---\n")) fail(`${path.relative(repositoryRoot, file)} 缺少 YAML frontmatter`);
|
|
61
|
+
const end = source.indexOf("\n---", 4);
|
|
62
|
+
if (end < 0) fail(`${path.relative(repositoryRoot, file)} frontmatter 未闭合`);
|
|
63
|
+
const document = parseDocument(source.slice(4, end), { uniqueKeys: true, maxAliasCount: 0 });
|
|
64
|
+
if (document.errors.length) fail(document.errors[0].message);
|
|
65
|
+
const frontmatter = document.toJS({ maxAliasCount: 0 });
|
|
66
|
+
for (const field of requiredFrontmatter) if (!frontmatter?.[field]) fail(`frontmatter 缺少 ${field}`);
|
|
67
|
+
const body = source.slice(end + 4);
|
|
68
|
+
const headings = [...body.matchAll(/^## ([^\n]+)$/gm)].map((match) => match[1].trim());
|
|
69
|
+
const actual = headings.slice(0, expectedSections.length);
|
|
70
|
+
if (JSON.stringify(actual) !== JSON.stringify(expectedSections)) fail(`canonical H2 章节顺序必须为: ${expectedSections.join(" → ")}`);
|
|
71
|
+
for (const section of expectedSections) {
|
|
72
|
+
if (headings.filter((heading) => heading === section).length !== 1) fail(`canonical H2 章节必须且只能出现一次: ${section}`);
|
|
73
|
+
}
|
|
74
|
+
const canonicalH1 = [...body.matchAll(/^# ([^\n]+)$/gm)].map((match) => match[1].trim()).filter((heading) => expectedSections.includes(heading));
|
|
75
|
+
if (canonicalH1.length > 0) fail(`canonical 正文章节必须使用 H2,不能使用 H1: ${canonicalH1.join(", ")}`);
|
|
76
|
+
for (const [name, component] of Object.entries(frontmatter.components)) {
|
|
77
|
+
if (!/^[a-z][a-z0-9-]*$/.test(name)) fail(`组件变体名称非法: ${name}`);
|
|
78
|
+
for (const key of Object.keys(component)) if (!componentProperties.has(key)) fail(`组件 ${name} 使用不支持的属性: ${key}`);
|
|
79
|
+
}
|
|
80
|
+
const references = [...source.matchAll(/\{(colors|typography|rounded|spacing)\.([\w-]+)\}/g)].map((match) => match[0]);
|
|
81
|
+
for (const reference of references) {
|
|
82
|
+
const [, group, token] = reference.match(/^\{([^}]+)\.([^}]+)\}$/);
|
|
83
|
+
if (frontmatter[group]?.[token] === undefined) fail(`悬空 token 引用: ${reference}`);
|
|
84
|
+
}
|
|
85
|
+
if (file === designPath && existsSync(syncMetadataPath)) {
|
|
86
|
+
const syncDocument = parseDocument(readFileSync(syncMetadataPath, "utf8"), { uniqueKeys: true, maxAliasCount: 0 });
|
|
87
|
+
if (syncDocument.errors.length) fail(syncDocument.errors[0].message);
|
|
88
|
+
const sync = syncDocument.toJS({ maxAliasCount: 0 })?.design_system_sync;
|
|
89
|
+
if (!sync?.baseline_sha256 || sync.baseline_sha256 !== sha256(source)) {
|
|
90
|
+
fail("design-system-sync.yaml 的 baseline_sha256 与 DESIGN.md 不一致,请更新跨仓同步摘要");
|
|
91
|
+
}
|
|
92
|
+
if (!Array.isArray(sync.synchronized_sections) || sync.synchronized_sections.length === 0) {
|
|
93
|
+
fail("design-system-sync.yaml 缺少 synchronized_sections");
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
return { source, frontmatter };
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
function runUpstream(args) {
|
|
100
|
+
const result = spawnSync("npx", ["--yes", "@google/design.md@0.4.0", ...args], { cwd: repositoryRoot, encoding: "utf8" });
|
|
101
|
+
if (result.error || result.status !== 0) fail(result.stderr?.trim() || result.stdout?.trim() || "design.md CLI 执行失败");
|
|
102
|
+
return result.stdout;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
function projectionFiles() {
|
|
106
|
+
return ["theme.json", "tokens.default.json", "tokens.dark.json", "tokens.compact.json", "variables.css", "variables.dark.css"].map((file) => path.join(projectionDir, file));
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
function writeProjectionManifest() {
|
|
110
|
+
const { source } = readDesign();
|
|
111
|
+
const files = Object.fromEntries(projectionFiles().map((file) => [path.relative(repositoryRoot, file), sha256(readFileSync(file))]));
|
|
112
|
+
writeFileSync(manifestPath, `${JSON.stringify({ schema_version: 1, source: "DESIGN.md", source_sha256: sha256(source), files }, null, 2)}\n`);
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
function writeThemeProjection(frontmatter) {
|
|
116
|
+
const themeFile = path.join(projectionDir, "theme.json");
|
|
117
|
+
const theme = { token: {}, algorithm: "default" };
|
|
118
|
+
const token = theme.token || (theme.token = {});
|
|
119
|
+
const colors = frontmatter.colors;
|
|
120
|
+
const typography = frontmatter.typography;
|
|
121
|
+
const rounded = frontmatter.rounded;
|
|
122
|
+
const spacing = frontmatter.spacing;
|
|
123
|
+
Object.assign(token, {
|
|
124
|
+
colorPrimary: colors.primary,
|
|
125
|
+
colorSuccess: colors.success,
|
|
126
|
+
colorWarning: colors.warning,
|
|
127
|
+
colorError: colors.error,
|
|
128
|
+
colorInfo: colors.info ?? colors.primary,
|
|
129
|
+
colorTextBase: "#000000",
|
|
130
|
+
colorBgBase: colors.surface ?? "#ffffff",
|
|
131
|
+
colorBgLayout: colors["canvas-layout"] ?? "#f0f2f5",
|
|
132
|
+
colorText: colors.text,
|
|
133
|
+
colorTextSecondary: colors["text-secondary"],
|
|
134
|
+
colorBorder: colors.border ?? "#d9d9d9",
|
|
135
|
+
fontFamily: typography.body.fontFamily,
|
|
136
|
+
fontSize: Number.parseInt(typography.body.fontSize, 10),
|
|
137
|
+
borderRadius: Number.parseInt(rounded.md, 10),
|
|
138
|
+
sizeUnit: Number.parseInt(spacing.xxs, 10),
|
|
139
|
+
sizeStep: Number.parseInt(spacing.xxs, 10),
|
|
140
|
+
controlHeight: Number.parseInt(frontmatter.components["button-primary"].height, 10),
|
|
141
|
+
controlHeightSM: Number.parseInt(frontmatter.components["button-small"].height, 10),
|
|
142
|
+
controlHeightLG: Number.parseInt(frontmatter.components["button-large"].height, 10),
|
|
143
|
+
fontSizeSM: Number.parseInt(typography.caption.fontSize, 10),
|
|
144
|
+
borderRadiusSM: Number.parseInt(rounded.sm, 10),
|
|
145
|
+
borderRadiusLG: Number.parseInt(rounded.lg, 10),
|
|
146
|
+
padding: Number.parseInt(spacing.md, 10),
|
|
147
|
+
paddingSM: Number.parseInt(spacing.sm, 10),
|
|
148
|
+
paddingXS: Number.parseInt(spacing.xs, 10),
|
|
149
|
+
paddingLG: Number.parseInt(spacing.card, 10)
|
|
150
|
+
});
|
|
151
|
+
theme.components = { Card: { borderRadiusLG: token.borderRadiusLG, paddingLG: token.paddingLG } };
|
|
152
|
+
writeFileSync(themeFile, `${JSON.stringify(theme, null, 2)}\n`);
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
function writeAlgorithmProjections(toolchain) {
|
|
156
|
+
if (!toolchain) fail("export --write 需要 --antd-toolchain <独立作者工具目录>,固定 antd 6.6.4");
|
|
157
|
+
const require = createRequire(path.join(path.resolve(toolchain), "package.json"));
|
|
158
|
+
if (require("antd/package.json").version !== "6.6.4") fail("主题算法需要 antd 6.6.4");
|
|
159
|
+
const { theme } = require("antd");
|
|
160
|
+
const config = JSON.parse(readFileSync(path.join(projectionDir, "theme.json")));
|
|
161
|
+
const kebab = key => key.replace(/[A-Z]/g, letter => `-${letter.toLowerCase()}`);
|
|
162
|
+
const snapshots = {};
|
|
163
|
+
for (const [mode, algorithm] of Object.entries({ default: theme.defaultAlgorithm, dark: theme.darkAlgorithm, compact: theme.compactAlgorithm })) {
|
|
164
|
+
const token = { ...config.token };
|
|
165
|
+
// Let the dark algorithm derive neutral colors instead of pinning light aliases.
|
|
166
|
+
if (mode === "dark") for (const key of ["colorBgBase", "colorTextBase", "colorBgLayout", "colorText", "colorTextSecondary", "colorBorder"]) delete token[key];
|
|
167
|
+
snapshots[mode] = theme.getDesignToken({ token, algorithm });
|
|
168
|
+
writeFileSync(path.join(projectionDir, `tokens.${mode}.json`), JSON.stringify(snapshots[mode], null, 2) + "\n");
|
|
169
|
+
}
|
|
170
|
+
const rewrite = (css, token) => {
|
|
171
|
+
const values = Object.fromEntries(Object.entries(token).map(([key,value]) => [kebab(key),value]));
|
|
172
|
+
return css.replace(/(--brand-([\w-]+):\s*)([^;]+);/g, (all, prefix, key, old) => {
|
|
173
|
+
const value = values[key];
|
|
174
|
+
if (value === undefined || typeof value === "object") return all;
|
|
175
|
+
const unit = typeof value === "number" ? old.trim().match(/(?:px|ms|s)$/)?.[0] || "" : "";
|
|
176
|
+
return `${prefix}${value}${unit};`;
|
|
177
|
+
});
|
|
178
|
+
};
|
|
179
|
+
const cssPath = path.join(projectionDir, "variables.css");
|
|
180
|
+
const css = readFileSync(cssPath, "utf8");
|
|
181
|
+
const darkStart = css.indexOf('[data-theme="dark"]');
|
|
182
|
+
writeFileSync(cssPath, darkStart < 0 ? rewrite(css, snapshots.default) : rewrite(css.slice(0, darkStart), snapshots.default) + rewrite(css.slice(darkStart), snapshots.dark));
|
|
183
|
+
const darkPath = path.join(projectionDir, "variables.dark.css");
|
|
184
|
+
writeFileSync(darkPath, rewrite(readFileSync(darkPath, "utf8"), snapshots.dark));
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
function driftCheck() {
|
|
188
|
+
const { source, frontmatter } = readDesign();
|
|
189
|
+
validateCssProjection(frontmatter);
|
|
190
|
+
if (!existsSync(manifestPath)) fail(`缺少 ${path.relative(repositoryRoot, manifestPath)},请先执行 export --write-manifest`);
|
|
191
|
+
const manifest = JSON.parse(readFileSync(manifestPath, "utf8"));
|
|
192
|
+
if (manifest.source_sha256 !== sha256(source)) fail("DESIGN.md 已变化但投影未重新生成(source_sha256 漂移)");
|
|
193
|
+
for (const [relative, digest] of Object.entries(manifest.files || {})) {
|
|
194
|
+
const file = path.join(repositoryRoot, relative);
|
|
195
|
+
if (!existsSync(file) || sha256(readFileSync(file)) !== digest) fail(`派生文件漂移: ${relative}`);
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
function main() {
|
|
200
|
+
const [command, ...args] = process.argv.slice(2);
|
|
201
|
+
if (command === "lint") {
|
|
202
|
+
const file = args.find((arg) => !arg.startsWith("-")) || designPath;
|
|
203
|
+
readDesign(path.resolve(repositoryRoot, file));
|
|
204
|
+
process.stdout.write(`${runUpstream(["lint", file, "--format", "json"])}`);
|
|
205
|
+
return;
|
|
206
|
+
}
|
|
207
|
+
if (command === "diff") {
|
|
208
|
+
if (args.length < 2) fail("用法: design-md diff <before> <after>");
|
|
209
|
+
process.stdout.write(runUpstream(["diff", ...args.slice(0, 2), "--format", "json"]));
|
|
210
|
+
return;
|
|
211
|
+
}
|
|
212
|
+
if (command === "export") {
|
|
213
|
+
const format = args[0] || "dtcg";
|
|
214
|
+
const { frontmatter } = readDesign();
|
|
215
|
+
process.stdout.write(runUpstream(["export", "DESIGN.md", "--format", format]));
|
|
216
|
+
if (args.includes("--write")) {
|
|
217
|
+
const toolchain = args[args.indexOf("--antd-toolchain") + 1];
|
|
218
|
+
if (!args.includes("--antd-toolchain") || !toolchain) fail("缺少 --antd-toolchain");
|
|
219
|
+
writeThemeProjection(frontmatter);
|
|
220
|
+
writeAlgorithmProjections(toolchain);
|
|
221
|
+
writeCssProjection(frontmatter);
|
|
222
|
+
}
|
|
223
|
+
if (args.includes("--write-manifest")) writeProjectionManifest();
|
|
224
|
+
return;
|
|
225
|
+
}
|
|
226
|
+
if (command === "drift") { driftCheck(); process.stdout.write("DESIGN.md 投影无漂移\n"); return; }
|
|
227
|
+
fail("用法: design-md lint|diff|export|drift");
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
try { main(); } catch (error) { process.stderr.write(`${error.message}\n`); process.exitCode = 1; }
|
|
@@ -4,7 +4,7 @@ import { parseDocument } from "../vendor/yaml.mjs";
|
|
|
4
4
|
import { loadRegistry, ROOT } from "./lifecycle-registry.mjs";
|
|
5
5
|
import { loadSkillRegistry } from "./skill-registry.mjs";
|
|
6
6
|
|
|
7
|
-
export const DEFAULT_DIGITAL_HUMAN_ROLES = path.join(ROOT, "
|
|
7
|
+
export const DEFAULT_DIGITAL_HUMAN_ROLES = path.join(ROOT, ".template-spec/agents/digital-human-roles.yaml");
|
|
8
8
|
|
|
9
9
|
const ROLE_ID = /^role\.[a-z0-9][a-z0-9-]*$/;
|
|
10
10
|
const GROUP_ID = /^group\.[a-z0-9][a-z0-9-]*$/;
|
|
@@ -259,7 +259,7 @@ export function validateDigitalHumanRoles(doc, { skillIds, stageIds, gateIds, ar
|
|
|
259
259
|
if (doc.registry_id !== "yss.digital-human-roles") fail("registry_id 必须为 yss.digital-human-roles");
|
|
260
260
|
if (doc.status !== "active") fail("status 必须为 active");
|
|
261
261
|
requireString(doc.description, "description");
|
|
262
|
-
if (doc.canonical_path !== "
|
|
262
|
+
if (doc.canonical_path !== ".template-spec/agents/digital-human-roles.yaml") fail("canonical_path 必须为 .template-spec/agents/digital-human-roles.yaml");
|
|
263
263
|
rejectGrokCoupling(doc.runtime_policy, "runtime_policy");
|
|
264
264
|
rejectGrokCoupling(doc.gate_policy, "gate_policy");
|
|
265
265
|
const runtime = doc.runtime_policy;
|
|
@@ -111,7 +111,7 @@ export function verifyExistingArchitecture(identity,bindings,{root,registry,exec
|
|
|
111
111
|
requireThat(Array.isArray(baseline.verification_commands)&&baseline.verification_commands.length&&Array.isArray(registration.verification_commands),'ARCH_VERIFICATION_MISSING','缺少登记验证命令');
|
|
112
112
|
same(baseline.verification_commands,registration.verification_commands,'ARCH_VERIFICATION_CONFLICT','验证入口不一致');
|
|
113
113
|
const review=bound(root,baseline.boundary_review);
|
|
114
|
-
const rolesFile=path.join(root,'
|
|
114
|
+
const rolesFile=path.join(root,'.template-spec/agents/digital-human-roles.yaml');
|
|
115
115
|
const roles=parse(readFileSync(rolesFile));
|
|
116
116
|
validateApprovalRecord(review,{rolesDoc:roles,requireApproved:true,root});
|
|
117
117
|
requireThat(['check.architecture-reviewed','gate.technical-design-approved'].includes(review.gate_id)&&text(baseline.id)&&text(baseline.version),'ARCH_REVIEW_MISSING','需要架构边界审查');
|
|
@@ -7,7 +7,7 @@ export function validateExistingUiBaseline(data,options={}) {return inValidation
|
|
|
7
7
|
function validate(data, { bundleRoot } = {}) {
|
|
8
8
|
const errors=[];
|
|
9
9
|
try {
|
|
10
|
-
schema(data,'
|
|
10
|
+
schema(data,'.template-spec/process/schemas/existing-ui-baseline.schema.json');
|
|
11
11
|
ensure(bundleRoot,'existing-ui-baseline 需要原始 bundleRoot');
|
|
12
12
|
const consumed=new Set(['existing-ui-baseline.json']);
|
|
13
13
|
const allFiles=files(bundleRoot);
|