create-yss-spec 3.5.0 → 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 +6 -2
- package/package.json +1 -1
- package/src/api/_sync-service.js +31 -6
- package/src/cli/args.js +2 -0
- package/src/cli/help.js +4 -1
- package/src/commands/attach.js +9 -3
- package/src/commands/diff.js +1 -0
- package/src/commands/doctor.js +1 -0
- package/src/commands/init.js +2 -1
- package/src/commands/sync.js +1 -0
- package/src/family-identity.js +1 -1
- package/src/template/asset-runtime.js +57 -49
- package/src/template/attach-planner.js +1 -1
- package/src/template/distribution-runtime.js +9 -9
- package/src/template/instance-runtime.js +9 -9
- package/src/template/layout-migration.js +160 -0
- package/src/template/migration-runtime.js +2 -2
- package/src/template/sync-planner.js +1 -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-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-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-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 +65 -43
- 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 +3 -3
- package/template/.agents/skills/yss-product-lifecycle/references/user-decisions.md +2 -2
- package/template/.agents/skills/yss-prototype-stage/SKILL.md +7 -7
- 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 +2 -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-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-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-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 +65 -43
- 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 +3 -3
- package/template/.codex/skills/yss-product-lifecycle/references/user-decisions.md +2 -2
- package/template/.codex/skills/yss-prototype-stage/SKILL.md +7 -7
- 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 +2 -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-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-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-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 +65 -43
- 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 +3 -3
- package/template/.cursor/skills/yss-product-lifecycle/references/user-decisions.md +2 -2
- package/template/.cursor/skills/yss-prototype-stage/SKILL.md +7 -7
- 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 +2 -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-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-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-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 +65 -43
- 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 +3 -3
- package/template/.pi/skills/yss-product-lifecycle/references/user-decisions.md +2 -2
- package/template/.pi/skills/yss-prototype-stage/SKILL.md +7 -7
- 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 +2 -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 +2 -2
- package/template/{docs → .template-spec}/agents/triage-labels.md +1 -1
- package/template/{docs → .template-spec}/agents/yss-skill-registry.yaml +2 -2
- 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 -11
- package/template/{docs → .template-spec}/design/design.md +19 -19
- package/template/{docs/design/templates/interaction-spec-template.md → .template-spec/design/templates/examples/model-publishing-interaction.example.md} +5 -3
- 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 +21 -21
- package/template/scripts/backend-delivery +1 -1
- 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 +2 -2
- 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 +8 -8
- package/template/scripts/lib/skill-supply-chain.mjs +1 -1
- 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 +2 -0
- package/template/scripts/verify-scaffold-architecture-decisions +1 -1
- package/template/scripts/verify-strategic-context-import +3 -3
- package/template/skills-lock.json +77 -77
- package/template.manifest.json +19 -19
- package/template.snapshot.json +5 -5
- package/template/docs/agents/archify-integration.md +0 -19
- package/template/docs/design/design-system-sync.yaml +0 -13
- 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/tokens/.design-md-projection.json +0 -13
- package/template/docs/engineering/evidence/aliyun-artifact-resolution.json +0 -446
- package/template/docs/process/MATT-POCOCK-ENGINEERING-SKILLS.md +0 -13
- package/template/docs/process/github-workflows.md +0 -52
- package/template/docs/templates/release-note-template.md +0 -14
- package/template/docs/templates/retro-report-template.md +0 -16
- package/template/docs/templates/verification-record-template.md +0 -53
- /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/README.md
CHANGED
|
@@ -34,7 +34,7 @@ CLI 在规划和写入前检查模板家族身份,当前主路线识别:
|
|
|
34
34
|
- `create-yss-harness-backend` / `.yss-harness-backend.json`
|
|
35
35
|
- `create-yss-harness-frontend` / `.yss-harness-frontend.json`
|
|
36
36
|
|
|
37
|
-
|
|
37
|
+
`.template-spec/process/harness-profile.yaml` 也参与身份判断。异族、多重 identity、损坏 metadata、未知或矛盾 profile、identity symlink 均在写入前 fail closed,`--force` 不能绕过;Programmatic API 使用相同 guard。帮助和版本查询不受目标家族限制。
|
|
38
38
|
|
|
39
39
|
旧 `create-yss-harness-dev` / `.yss-harness-dev.json` 仍会被识别并拒绝跨家族接管;既有实例按原固定版本维护,不再作为新项目入口。战略、后端和前端分别使用专职 CLI,任何家族都不做跨家族原地迁移。
|
|
40
40
|
|
|
@@ -183,4 +183,8 @@ npm pack --dry-run
|
|
|
183
183
|
- [Ownership Policy v1](docs/implementation/ownership-policy-v1.md)
|
|
184
184
|
- [Lifecycle Policies v1](docs/implementation/lifecycle-policies-v1.md)
|
|
185
185
|
- [Programmatic API v1](docs/implementation/programmatic-api-v1.md)
|
|
186
|
-
- [完整中文使用手册](
|
|
186
|
+
- [完整中文使用手册](.template-spec/user-guide/create-yss-spec-cli-guide.md)
|
|
187
|
+
|
|
188
|
+
## 治理目录迁移
|
|
189
|
+
|
|
190
|
+
新实例将分发治理资产安装到 `.template-spec/`,项目规格产物放在 `docs/`。已有实例只有显式运行 `sync --migrate-layout --plan` 审阅后,才运行 `sync --migrate-layout --apply`;`attach` 同样支持该开关。迁移保留项目 tracker 配置,缺少可信摘要、旧文件被修改或目标路径冲突时阻断。普通 sync 不自动改变旧实例目录。
|
package/package.json
CHANGED
package/src/api/_sync-service.js
CHANGED
|
@@ -12,6 +12,7 @@ const { collectGitRoots, gitDirtyWarning } = require("../git/worktree");
|
|
|
12
12
|
const { unmanagedPathReason, assertTargetWorkingTreeWritable } = require("../validation/security");
|
|
13
13
|
const { buildSyncPlanFromRuntime } = require("../template/sync-planner-runtime");
|
|
14
14
|
const { buildLegacyMigrationPlan } = require("../template/migration-runtime");
|
|
15
|
+
const { prepareLayoutMigration, combineMigrationPlans } = require("../template/layout-migration");
|
|
15
16
|
const { classifyRemovedFiles } = require("../template/prune-planner");
|
|
16
17
|
const { decorateMetadataOwnership } = require("../template/ownership-metadata");
|
|
17
18
|
const { decorateMetadataLifecycle } = require("../template/lifecycle-metadata");
|
|
@@ -73,7 +74,7 @@ function affectedPathsForMigration(migrationPlan) {
|
|
|
73
74
|
);
|
|
74
75
|
}
|
|
75
76
|
|
|
76
|
-
function buildSyncContext({ targetDir = ".", force = false, cwd = process.cwd() } = {}) {
|
|
77
|
+
function buildSyncContext({ targetDir = ".", force = false, migrateLayout = false, cwd = process.cwd() } = {}) {
|
|
77
78
|
const snapshot = readTemplateSnapshot();
|
|
78
79
|
assertBundledFamily(snapshot);
|
|
79
80
|
const resolvedTargetDir = normalizeTargetDir(targetDir, cwd);
|
|
@@ -84,17 +85,24 @@ function buildSyncContext({ targetDir = ".", force = false, cwd = process.cwd()
|
|
|
84
85
|
|
|
85
86
|
const { metadata } = loadTemplateMetadata(resolvedTargetDir);
|
|
86
87
|
const identity = readTargetIdentity(resolvedTargetDir);
|
|
87
|
-
const
|
|
88
|
+
const baseDesiredOperations = buildSyncDesiredOperations(
|
|
88
89
|
resolvedTargetDir,
|
|
89
90
|
metadata,
|
|
90
91
|
identity,
|
|
91
92
|
snapshot,
|
|
92
93
|
);
|
|
93
|
-
const
|
|
94
|
+
const layout = prepareLayoutMigration({
|
|
95
|
+
targetDir: resolvedTargetDir,
|
|
96
|
+
desiredOperations: baseDesiredOperations,
|
|
97
|
+
managedFiles: metadata.managedFiles || {},
|
|
98
|
+
explicit: migrateLayout,
|
|
99
|
+
});
|
|
100
|
+
const desiredOperations = layout.desiredOperations;
|
|
101
|
+
const migrationPlan = combineMigrationPlans(layout.plan, buildLegacyMigrationPlan(
|
|
94
102
|
resolvedTargetDir,
|
|
95
103
|
desiredOperations,
|
|
96
104
|
{ checkFlatTickets: false },
|
|
97
|
-
);
|
|
105
|
+
));
|
|
98
106
|
const warning = gitDirtyWarning(resolvedTargetDir);
|
|
99
107
|
|
|
100
108
|
const { classified: syncPlan, plan } = buildSyncPlanFromRuntime({
|
|
@@ -110,7 +118,9 @@ function buildSyncContext({ targetDir = ".", force = false, cwd = process.cwd()
|
|
|
110
118
|
getFileHash: (operation) => fileHash(operation.targetPath),
|
|
111
119
|
});
|
|
112
120
|
const removedPlan = classifyRemovedFiles({
|
|
113
|
-
removed: syncPlan.removed.filter((relativePath) =>
|
|
121
|
+
removed: syncPlan.removed.filter((relativePath) =>
|
|
122
|
+
relativePath !== "README.md" &&
|
|
123
|
+
!layout.plan.operations.some((operation) => operation.kind === "remove" && operation.path === relativePath)),
|
|
114
124
|
managedFiles: metadata.managedFiles || {},
|
|
115
125
|
getPathKind: (relativePath) => pathKind(targetPath(resolvedTargetDir, relativePath)),
|
|
116
126
|
getFileHash: (relativePath) => fileHash(targetPath(resolvedTargetDir, relativePath)),
|
|
@@ -142,6 +152,7 @@ function buildSyncContext({ targetDir = ".", force = false, cwd = process.cwd()
|
|
|
142
152
|
identity,
|
|
143
153
|
desiredOperations,
|
|
144
154
|
migrationPlan,
|
|
155
|
+
migrateLayout,
|
|
145
156
|
warning,
|
|
146
157
|
syncPlan,
|
|
147
158
|
plan,
|
|
@@ -261,8 +272,17 @@ function applySyncContext(context, { force = false, prune = false } = {}) {
|
|
|
261
272
|
throw new Error(`${relativePath}: 待清理文件在规划后已变化,请重新运行 sync`);
|
|
262
273
|
}
|
|
263
274
|
}
|
|
264
|
-
const
|
|
275
|
+
const currentLayout = prepareLayoutMigration({
|
|
276
|
+
targetDir,
|
|
277
|
+
desiredOperations: buildSyncDesiredOperations(targetDir, metadata, readTargetIdentity(targetDir), context.snapshot),
|
|
278
|
+
managedFiles: metadata.managedFiles || {},
|
|
279
|
+
explicit: context.migrateLayout,
|
|
280
|
+
});
|
|
281
|
+
const currentMigration = combineMigrationPlans(currentLayout.plan,
|
|
282
|
+
buildLegacyMigrationPlan(targetDir, desiredOperations, { checkFlatTickets: false }));
|
|
265
283
|
if (!isDeepStrictEqual(currentMigration.operations, migrationPlan.operations) ||
|
|
284
|
+
!isDeepStrictEqual(currentLayout.desiredOperations.map((operation) => [operation.relativePath, operation.desiredHash]),
|
|
285
|
+
desiredOperations.map((operation) => [operation.relativePath, operation.desiredHash])) ||
|
|
266
286
|
currentMigration.unsafe.length || currentMigration.conflicts.length) {
|
|
267
287
|
throw new Error("旧路径迁移在规划后已变化,请重新运行 sync");
|
|
268
288
|
}
|
|
@@ -283,6 +303,11 @@ function applySyncContext(context, { force = false, prune = false } = {}) {
|
|
|
283
303
|
const nextMetadata = decorateMetadataLifecycle(
|
|
284
304
|
decorateMetadataOwnership(buildNextSyncMetadata(metadata, syncPlan, { snapshot: context.snapshot })),
|
|
285
305
|
);
|
|
306
|
+
for (const operation of context.migrationPlan.operations) {
|
|
307
|
+
if (operation.kind === "remove" && operation.path.startsWith("docs/")) {
|
|
308
|
+
delete nextMetadata.managedFiles[operation.path];
|
|
309
|
+
}
|
|
310
|
+
}
|
|
286
311
|
if (!isDeepStrictEqual({ ...nextMetadata, lastSyncedAt: metadata.lastSyncedAt }, metadata)) {
|
|
287
312
|
writeTemplateMetadata(targetDir, nextMetadata, transaction);
|
|
288
313
|
}
|
package/src/cli/args.js
CHANGED
|
@@ -39,6 +39,8 @@ function parseArgs(argv = []) {
|
|
|
39
39
|
options.force = true;
|
|
40
40
|
} else if (current === "--prune") {
|
|
41
41
|
options.prune = true;
|
|
42
|
+
} else if (current === "--migrate-layout") {
|
|
43
|
+
options.migrateLayout = true;
|
|
42
44
|
} else if (current === "--git-init") {
|
|
43
45
|
options.gitInit = true;
|
|
44
46
|
} else if (current === "--include-example-docs") {
|
package/src/cli/help.js
CHANGED
|
@@ -36,6 +36,7 @@ OPTIONS
|
|
|
36
36
|
attach / sync:覆盖受管冲突文件;unsafe 路径始终阻断
|
|
37
37
|
update:即使已是最新时仍重新安装;npx / 源码目录仍不覆盖
|
|
38
38
|
--prune sync:备份并删除与旧受管基线一致的退出分发文件
|
|
39
|
+
--migrate-layout attach/sync:显式迁移旧 docs 治理布局,冲突时停止并保留备份
|
|
39
40
|
--git-init 初始化完成后执行 git init
|
|
40
41
|
--include-example-docs 显式保留示例文档(默认关闭)
|
|
41
42
|
--no-example-docs 不生成示例文档
|
|
@@ -66,6 +67,8 @@ EXAMPLES
|
|
|
66
67
|
$ npx create-yss-spec@latest sync
|
|
67
68
|
$ npx create-yss-spec@latest sync --dry-run
|
|
68
69
|
$ npx create-yss-spec@latest sync --plan
|
|
70
|
+
$ npx create-yss-spec@latest sync --plan --migrate-layout
|
|
71
|
+
$ npx create-yss-spec@latest sync --migrate-layout
|
|
69
72
|
$ npx create-yss-spec@latest sync --json
|
|
70
73
|
$ npx create-yss-spec@latest diff
|
|
71
74
|
$ npx create-yss-spec@latest diff --json
|
|
@@ -86,7 +89,7 @@ EXAMPLES
|
|
|
86
89
|
|
|
87
90
|
LEARN MORE
|
|
88
91
|
仓库 README:https://github.com/iloveZzz/create-yss-spec#readme
|
|
89
|
-
使用手册:https://github.com/iloveZzz/create-yss-spec/blob/main/
|
|
92
|
+
使用手册:https://github.com/iloveZzz/create-yss-spec/blob/main/.template-spec/user-guide/create-yss-spec-cli-guide.md
|
|
90
93
|
模板仓库:https://github.com/iloveZzz/yss-spec-project-template
|
|
91
94
|
`;
|
|
92
95
|
}
|
package/src/commands/attach.js
CHANGED
|
@@ -13,6 +13,7 @@ const { gitDirtyWarning } = require("../git/worktree");
|
|
|
13
13
|
const { unmanagedPathReason, assertTargetWorkingTreeWritable } = require("../validation/security");
|
|
14
14
|
const { buildAttachPlanFromRuntime } = require("../template/attach-planner-runtime");
|
|
15
15
|
const { buildLegacyMigrationPlan } = require("../template/migration-runtime");
|
|
16
|
+
const { prepareLayoutMigration, combineMigrationPlans } = require("../template/layout-migration");
|
|
16
17
|
const {
|
|
17
18
|
PACKAGE_ROOT,
|
|
18
19
|
BUNDLED_TEMPLATE_ROOT,
|
|
@@ -190,14 +191,19 @@ async function runAttach(argv = []) {
|
|
|
190
191
|
|
|
191
192
|
const variables = attachVariables(options);
|
|
192
193
|
const identity = readTargetIdentity(targetDir);
|
|
193
|
-
const
|
|
194
|
+
const baseDesiredOperations = buildAttachDesiredOperations(
|
|
194
195
|
targetDir,
|
|
195
196
|
variables,
|
|
196
197
|
identity,
|
|
197
198
|
);
|
|
198
|
-
const
|
|
199
|
-
|
|
199
|
+
const layout = prepareLayoutMigration({
|
|
200
|
+
targetDir, desiredOperations: baseDesiredOperations,
|
|
201
|
+
explicit: Boolean(options.migrateLayout),
|
|
200
202
|
});
|
|
203
|
+
const desiredOperations = layout.desiredOperations;
|
|
204
|
+
const migrationPlan = combineMigrationPlans(layout.plan, buildLegacyMigrationPlan(targetDir, desiredOperations, {
|
|
205
|
+
checkFlatTickets: true,
|
|
206
|
+
}));
|
|
201
207
|
const warning = gitDirtyWarning(targetDir);
|
|
202
208
|
|
|
203
209
|
const { classified: plan } = buildAttachPlanFromRuntime({
|
package/src/commands/diff.js
CHANGED
|
@@ -8,6 +8,7 @@ const { projectDiff } = require("../api/project-diff");
|
|
|
8
8
|
function runDiff(argv = []) {
|
|
9
9
|
const options = parseArgs(argv);
|
|
10
10
|
if (options.prune) throw new Error("--prune 仅适用于 sync");
|
|
11
|
+
if (options.migrateLayout) throw new Error("--migrate-layout 仅适用于 attach/sync");
|
|
11
12
|
const plan = projectDiff({
|
|
12
13
|
targetDir: options.targetDir || ".",
|
|
13
14
|
force: Boolean(options.force),
|
package/src/commands/doctor.js
CHANGED
|
@@ -394,6 +394,7 @@ function renderDoctorText(report) {
|
|
|
394
394
|
function runDoctor(argv = []) {
|
|
395
395
|
const options = parseArgs(argv);
|
|
396
396
|
if (options.prune) throw new Error("--prune 仅适用于 sync");
|
|
397
|
+
if (options.migrateLayout) throw new Error("--migrate-layout 仅适用于 attach/sync");
|
|
397
398
|
const targetDir = normalizeTargetDir(options.targetDir);
|
|
398
399
|
const report = buildDoctorReport(targetDir);
|
|
399
400
|
|
package/src/commands/init.js
CHANGED
|
@@ -121,6 +121,7 @@ function parentDirectoryOperations(desiredOperations, targetDir) {
|
|
|
121
121
|
async function runInit(argv = []) {
|
|
122
122
|
const options = parseArgs(argv);
|
|
123
123
|
if (options.prune) throw new Error("--prune 仅适用于 sync");
|
|
124
|
+
if (options.migrateLayout) throw new Error("--migrate-layout 仅适用于 attach/sync");
|
|
124
125
|
if (options.help) {
|
|
125
126
|
printHelp(PACKAGE_MANIFEST.version);
|
|
126
127
|
return;
|
|
@@ -195,7 +196,7 @@ async function runInit(argv = []) {
|
|
|
195
196
|
? "2. 运行 git status 检查初始化结果"
|
|
196
197
|
: "2. 如需版本管理,可执行 git init",
|
|
197
198
|
);
|
|
198
|
-
console.log("3. 检查 AGENTS.md、README 和 docs
|
|
199
|
+
console.log("3. 检查 AGENTS.md、README 和 .template-spec 目录是否符合预期;docs 将在首次项目产出时创建");
|
|
199
200
|
}
|
|
200
201
|
|
|
201
202
|
module.exports = {
|
package/src/commands/sync.js
CHANGED
package/src/family-identity.js
CHANGED
|
@@ -7,39 +7,40 @@ const ASSET_PROFILE = "stage-selective";
|
|
|
7
7
|
const INITIAL_STAGES = ["stage.entry-triage", "stage.plan"];
|
|
8
8
|
const TEMPLATE_ONLY_IMPORTS = new Set(["scripts/lib/maintenance-intensity.mjs"]);
|
|
9
9
|
const RENDERED_SKILL_SCRIPTS = Object.freeze({ "yss-design-system": ["scripts/design-md"] });
|
|
10
|
-
const SKILL_ASSET_PREFIXES = Object.freeze({ "yss-design-system": ["
|
|
10
|
+
const SKILL_ASSET_PREFIXES = Object.freeze({ "yss-design-system": [".template-spec/design/tokens/"] });
|
|
11
11
|
|
|
12
12
|
// Paths here are the entry points for each stage. Relative JavaScript imports
|
|
13
13
|
// are included by moduleClosure; files named by an explicitly installed Skill
|
|
14
14
|
// are included by skillReferences. The CLI snapshot retains every source file.
|
|
15
15
|
const COMMON = {
|
|
16
16
|
files: [
|
|
17
|
-
"
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
"
|
|
21
|
-
"
|
|
22
|
-
"
|
|
23
|
-
"
|
|
24
|
-
"
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
"
|
|
30
|
-
"
|
|
31
|
-
"
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
"
|
|
35
|
-
"
|
|
36
|
-
"
|
|
37
|
-
"
|
|
38
|
-
"
|
|
39
|
-
"
|
|
40
|
-
"
|
|
41
|
-
"
|
|
42
|
-
"
|
|
17
|
+
".template-spec/agents/yss-skill-registry.yaml",
|
|
18
|
+
".template-spec/agents/digital-human-roles.yaml",
|
|
19
|
+
".template-spec/agents/digital-human-roles.md",
|
|
20
|
+
".template-spec/agents/issue-tracker.md",
|
|
21
|
+
".template-spec/agents/triage-labels.md",
|
|
22
|
+
".template-spec/agents/domain.md",
|
|
23
|
+
".template-spec/process/lifecycle-registry.yaml",
|
|
24
|
+
".template-spec/process/lifecycle-registry-baseline.json",
|
|
25
|
+
".template-spec/process/lifecycle-registry-baseline-v1.json",
|
|
26
|
+
".template-spec/process/lifecycle-artifact-map.md",
|
|
27
|
+
".template-spec/process/harness-process-tailoring.md",
|
|
28
|
+
".template-spec/process/document-writing.md",
|
|
29
|
+
".template-spec/process/contract-reading.md",
|
|
30
|
+
".template-spec/process/stage-tracking.md",
|
|
31
|
+
".template-spec/process/schemas/context-reconciliation.schema.json",
|
|
32
|
+
".template-spec/process/schemas/digital-human-task-package.schema.json",
|
|
33
|
+
".template-spec/process/schemas/lifecycle-checkpoint.schema.json",
|
|
34
|
+
".template-spec/process/schemas/stage-tracking.schema.json",
|
|
35
|
+
".template-spec/process/schemas/user-decision.schema.json",
|
|
36
|
+
".template-spec/process/templates/context-reconciliation-template.yaml",
|
|
37
|
+
".template-spec/process/templates/lifecycle-checkpoint-template.yaml",
|
|
38
|
+
".template-spec/process/templates/stage-checkpoint-template.md",
|
|
39
|
+
".template-spec/process/templates/user-decision-template.yaml",
|
|
40
|
+
".template-spec/templates/local-parent-ticket-template.md",
|
|
41
|
+
".template-spec/templates/approval-record-template.yaml",
|
|
42
|
+
".template-spec/templates/review-report-template.md",
|
|
43
|
+
".template-spec/user-guide/用户手册.md",
|
|
43
44
|
],
|
|
44
45
|
scripts: [
|
|
45
46
|
"scripts/verify-project-instance",
|
|
@@ -62,35 +63,35 @@ const COMMON = {
|
|
|
62
63
|
const STAGES = Object.freeze({
|
|
63
64
|
"stage.entry-triage": { files: [], scripts: [], skills: [] },
|
|
64
65
|
"stage.plan": {
|
|
65
|
-
prefixes: ["
|
|
66
|
-
files: ["
|
|
66
|
+
prefixes: [".template-spec/plan/"],
|
|
67
|
+
files: [".template-spec/process/plan-migration.md"],
|
|
67
68
|
scripts: ["scripts/verify-plan-spec-entry"],
|
|
68
69
|
skills: [],
|
|
69
70
|
},
|
|
70
71
|
"stage.spec-architecture": {
|
|
71
72
|
files: [
|
|
72
|
-
"
|
|
73
|
-
"
|
|
74
|
-
"
|
|
75
|
-
"
|
|
73
|
+
".template-spec/templates/spec-template.md",
|
|
74
|
+
".template-spec/templates/spec-delta-template.md",
|
|
75
|
+
".template-spec/architecture/templates/business-architecture-template.md",
|
|
76
|
+
".template-spec/architecture/templates/functional-architecture-template.md",
|
|
76
77
|
],
|
|
77
78
|
scripts: [],
|
|
78
79
|
skills: [],
|
|
79
80
|
},
|
|
80
81
|
"stage.product-design": {
|
|
81
|
-
prefixes: ["
|
|
82
|
+
prefixes: [".template-spec/design/"],
|
|
82
83
|
files: [],
|
|
83
84
|
scripts: ["scripts/design-md"],
|
|
84
85
|
skills: ["yss-prototype-stage"],
|
|
85
86
|
},
|
|
86
87
|
"stage.system-data-engineering": {
|
|
87
|
-
prefixes: ["
|
|
88
|
+
prefixes: [".template-spec/engineering/"],
|
|
88
89
|
files: [
|
|
89
|
-
"
|
|
90
|
-
"
|
|
91
|
-
"
|
|
92
|
-
"
|
|
93
|
-
"
|
|
90
|
+
".template-spec/process/implementation-repo-integration.md",
|
|
91
|
+
".template-spec/process/existing-backend-architecture.md",
|
|
92
|
+
".template-spec/process/existing-ui-baseline.md",
|
|
93
|
+
".template-spec/process/frontend-backend-delivery.md",
|
|
94
|
+
".template-spec/templates/implementation-repo-registry-template.md",
|
|
94
95
|
],
|
|
95
96
|
scripts: [
|
|
96
97
|
"scripts/backend-platforms",
|
|
@@ -101,21 +102,21 @@ const STAGES = Object.freeze({
|
|
|
101
102
|
skills: ["yss-implementation-contract-compiler"],
|
|
102
103
|
},
|
|
103
104
|
"stage.ticket-formalization": {
|
|
104
|
-
files: ["
|
|
105
|
+
files: [".template-spec/templates/vertical-slice-ticket-template.md", ".template-spec/templates/cross-repo-slice-template.md"],
|
|
105
106
|
scripts: ["scripts/dispatch-slice-task", "scripts/slice-contract"],
|
|
106
107
|
skills: [],
|
|
107
108
|
},
|
|
108
109
|
"stage.vertical-slice-implementation": {
|
|
109
|
-
files: ["
|
|
110
|
+
files: [".template-spec/templates/verification-record-template.md"],
|
|
110
111
|
scripts: ["scripts/implementation-path-policy", "scripts/complete-backend-delivery"],
|
|
111
112
|
skills: [],
|
|
112
113
|
},
|
|
113
114
|
"stage.verification-release-retrospective": {
|
|
114
115
|
files: [
|
|
115
|
-
"
|
|
116
|
-
"
|
|
117
|
-
"
|
|
118
|
-
"
|
|
116
|
+
".template-spec/process/delivery-preflight.md",
|
|
117
|
+
".template-spec/templates/release-note-template.md",
|
|
118
|
+
".template-spec/templates/retro-report-template.md",
|
|
119
|
+
".template-spec/templates/review-bundle-template.yaml",
|
|
119
120
|
],
|
|
120
121
|
scripts: ["scripts/preflight-delivery"],
|
|
121
122
|
skills: [],
|
|
@@ -181,7 +182,7 @@ function skillReferences(root, result, skillId, selectedSkills) {
|
|
|
181
182
|
if (entry.isDirectory()) visit(file);
|
|
182
183
|
else if (entry.isFile() && /\.(?:md|yaml|json)$/.test(entry.name)) {
|
|
183
184
|
const source = fs.readFileSync(file, "utf8");
|
|
184
|
-
for (const match of source.matchAll(/(
|
|
185
|
+
for (const match of source.matchAll(/(?:\.template-spec|scripts)\/[\p{L}\p{N}_.\/-]+/gu)) {
|
|
185
186
|
const ref = match[0].replace(/[.,;]+$/, "");
|
|
186
187
|
if (!fs.existsSync(path.join(root, ref)) || !fs.statSync(path.join(root, ref)).isFile()) continue;
|
|
187
188
|
if (ref.startsWith("scripts/")) moduleClosure(root, result, ref, selectedSkills);
|
|
@@ -197,14 +198,21 @@ function skillReferences(root, result, skillId, selectedSkills) {
|
|
|
197
198
|
|
|
198
199
|
function assetPaths(root, distribution) {
|
|
199
200
|
if (distribution.mode !== "selected" || distribution.assetProfile !== ASSET_PROFILE) return null;
|
|
200
|
-
const lifecycle = fs.readFileSync(sourceFile(root, "
|
|
201
|
+
const lifecycle = fs.readFileSync(sourceFile(root, ".template-spec/process/lifecycle-registry.yaml"), "utf8");
|
|
201
202
|
const stageIds = [...lifecycle.matchAll(/^ - id: (stage\.[a-z0-9-]+)\s*$/gm)].map((match) => match[1]).sort();
|
|
202
203
|
if (JSON.stringify(stageIds) !== JSON.stringify(Object.keys(STAGES).sort())) {
|
|
203
204
|
throw new Error("CLI 阶段资产映射与生命周期注册表阶段 ID 不一致");
|
|
204
205
|
}
|
|
205
206
|
const result = new Set();
|
|
206
207
|
const selectedSkills = new Set(distribution.installedSkills);
|
|
207
|
-
for (const ref of COMMON.files)
|
|
208
|
+
for (const ref of COMMON.files) {
|
|
209
|
+
if (ref === ".template-spec/process/lifecycle-registry-baseline-v1.json" &&
|
|
210
|
+
!fs.existsSync(path.join(root, ref))) {
|
|
211
|
+
const baseline = JSON.parse(fs.readFileSync(sourceFile(root, ".template-spec/process/lifecycle-registry-baseline.json"), "utf8"));
|
|
212
|
+
if (baseline.schema_version === 1) continue;
|
|
213
|
+
}
|
|
214
|
+
addFile(root, result, ref);
|
|
215
|
+
}
|
|
208
216
|
for (const ref of COMMON.scripts) moduleClosure(root, result, ref, selectedSkills);
|
|
209
217
|
for (const stage of distribution.installedStages) {
|
|
210
218
|
const bundle = STAGES[stage];
|
|
@@ -41,7 +41,7 @@ function classifyAttachOperations({
|
|
|
41
41
|
continue;
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
-
if (operation.relativePath === "
|
|
44
|
+
if (operation.relativePath === ".template-spec/agents/issue-tracker.md") {
|
|
45
45
|
matched.push({ ...operation, reason: "project-owned-tracker-configuration" });
|
|
46
46
|
continue;
|
|
47
47
|
}
|
|
@@ -6,16 +6,16 @@ const { ASSET_PROFILE, INITIAL_STAGES } = require("./asset-runtime");
|
|
|
6
6
|
|
|
7
7
|
const RUNTIMES = Object.freeze({ codex: ".codex/skills", cursor: ".cursor/skills", pi: ".pi/skills" });
|
|
8
8
|
const OMIT_INSTANCE_PATHS = [
|
|
9
|
-
"
|
|
10
|
-
"
|
|
11
|
-
"
|
|
12
|
-
"
|
|
13
|
-
"
|
|
14
|
-
"
|
|
9
|
+
".template-source/process/github-workflows.md",
|
|
10
|
+
".template-spec/process/harness-executive-blueprint.md",
|
|
11
|
+
".template-spec/process/PDCA-SCRUM.md",
|
|
12
|
+
".template-spec/design/preview.html", ".template-spec/design/preview.css", ".template-spec/design/preview.js", ".template-spec/design/preview-dark.html",
|
|
13
|
+
".template-spec/design/facts/antdv-next", ".template-spec/user-guide/设备借用贯穿案例.md",
|
|
14
|
+
".template-spec/design/design-system-sync.yaml",
|
|
15
15
|
];
|
|
16
16
|
|
|
17
17
|
function readDistributionRegistry(templateRoot) {
|
|
18
|
-
const registry = fs.readFileSync(path.join(templateRoot, "
|
|
18
|
+
const registry = fs.readFileSync(path.join(templateRoot, ".template-spec/agents/yss-skill-registry.yaml"), "utf8");
|
|
19
19
|
const match = registry.match(/^instance_distribution:\n([\s\S]*?)(?=^[^\s#][^\n]*:\s*$)/m);
|
|
20
20
|
if (!match) throw new Error("Skill 注册表缺少 instance_distribution");
|
|
21
21
|
const initial = match[1].match(/^ initial_skills: \[([^\]]+)\]/m);
|
|
@@ -50,7 +50,7 @@ function isIncludedInstancePath(relativePath, distribution) {
|
|
|
50
50
|
if (relativePath === ".cursorrules" && !distribution.runtimes.includes("cursor")) return false;
|
|
51
51
|
if (OMIT_INSTANCE_PATHS.some((excluded) => relativePath === excluded || relativePath.startsWith(`${excluded}/`))) return false;
|
|
52
52
|
if (distribution.assetProfile === ASSET_PROFILE &&
|
|
53
|
-
(relativePath.startsWith("
|
|
53
|
+
(relativePath.startsWith(".template-spec/") || relativePath.startsWith("scripts/") || relativePath.startsWith(".vscode/"))) {
|
|
54
54
|
return distribution.assetPaths.has(relativePath) ||
|
|
55
55
|
[...distribution.assetPaths].some((ref) => ref.startsWith(`${relativePath}/`));
|
|
56
56
|
}
|
|
@@ -103,7 +103,7 @@ function renderInstanceSkillSupplyChain(sourceText) {
|
|
|
103
103
|
function renderInstanceDesignSkillFile(sourceText) {
|
|
104
104
|
return sourceText
|
|
105
105
|
.replaceAll("node .template-source/tooling/node/scripts/design-md.mjs", "scripts/design-md")
|
|
106
|
-
.replace("运行前先更新
|
|
106
|
+
.replace("运行前先更新 `.template-spec/design/design-system-sync.yaml` 的规范源摘要。", "项目实例无需模板间的 design-system-sync 摘要。")
|
|
107
107
|
.replace("修改根 DESIGN.md → 更新 design-system-sync.yaml 摘要 →", "修改根 DESIGN.md →");
|
|
108
108
|
}
|
|
109
109
|
|
|
@@ -147,22 +147,22 @@ function renderTemplateFile(relativePath, content, variables) {
|
|
|
147
147
|
if (relativePath === "skills-lock.json") return selectedSkillLock(content, distribution);
|
|
148
148
|
if (relativePath === "scripts/lib/skill-supply-chain.mjs" && distribution.mode === "selected") return renderInstanceSkillSupplyChain(content);
|
|
149
149
|
if (distribution.mode === "selected" && /^\.(agents|codex|cursor|pi)\/skills\/yss-design-system\/(SKILL\.md|references\/data-quality-theme\.md)$/.test(relativePath)) return renderInstanceDesignSkillFile(content);
|
|
150
|
-
if (relativePath === "
|
|
150
|
+
if (relativePath === ".template-spec/engineering/backend-platforms.json" && distribution.mode === "selected") {
|
|
151
151
|
return content.replaceAll(".template-source/evidence/maintenance/2026-09-18-yss-backend-components/aliyun-artifact-resolution.json", "docs/engineering/evidence/aliyun-artifact-resolution.json");
|
|
152
152
|
}
|
|
153
|
-
if (relativePath === "
|
|
153
|
+
if (relativePath === ".template-spec/agents/backend-architecture-profiles.md" && distribution.mode === "selected") {
|
|
154
154
|
return content.replace(/;依据见 `\.template-source\/evidence\/maintenance\/2026-09-12-existing-project-delivery\/maven-adapters-04\.json`/, ";适配验证证据保留在模板源,项目实例须对自身工程重新验证");
|
|
155
155
|
}
|
|
156
|
-
if (relativePath === "
|
|
156
|
+
if (relativePath === ".template-spec/user-guide/用户手册.md" && distribution.mode === "selected") {
|
|
157
157
|
if (distribution.assetProfile !== ASSET_PROFILE) {
|
|
158
158
|
return `# ${variables.projectName} 用户手册\n\n本仓是 \`project-instance\`,用于 ${variables.businessDomain} 的研发资产。先阅读根 [AGENTS.md](../../AGENTS.md)、[CONTEXT.md](../../CONTEXT.md) 与 [生命周期资产索引](../process/lifecycle-artifact-map.md)。\n\n阶段派发前,由 Agent 运行 \`create-yss-spec skills ensure <skill-id...> --plan\` 核对依赖,再运行 \`--apply\` 安装。旧实例继续沿用既有文件分发范围;增加平台使用 \`create-yss-spec skills runtime add <codex|cursor|pi> --plan/--apply\`。CLI 快照必须与实例记录的模板提交一致;升级 CLI 后先运行 \`create-yss-spec sync\`。\n\n项目校验运行 \`scripts/verify-project-instance\`。\n`;
|
|
159
159
|
}
|
|
160
160
|
return `# ${variables.projectName} 用户手册\n\n本仓是 \`project-instance\`,用于 ${variables.businessDomain} 的研发资产。先阅读根 [AGENTS.md](../../AGENTS.md)、[CONTEXT.md](../../CONTEXT.md) 与 [生命周期资产索引](../process/lifecycle-artifact-map.md)。\n\n初始化安装分诊与 Plan 入口资产、三项入口 Skill 与所选 Agent 平台。进入后续阶段前,运行 \`create-yss-spec assets ensure <stage-id> --plan\` 核对文件,再运行 \`--apply\` 原子安装;专项 Skill 使用 \`create-yss-spec skills ensure <skill-id...> --plan/--apply\`,会补齐该 Skill 引用的实例文件。增加平台使用 \`create-yss-spec skills runtime add <codex|cursor|pi> --plan/--apply\`。CLI 快照必须与实例记录的模板提交一致;升级 CLI 后先运行 \`create-yss-spec sync\`。\n\n项目校验运行 \`scripts/verify-project-instance\`;实例 CI 应执行该命令和项目实际的构建、测试。\n`;
|
|
161
161
|
}
|
|
162
|
-
if (distribution.mode === "selected" && relativePath === "
|
|
162
|
+
if (distribution.mode === "selected" && relativePath === ".template-spec/design/README.md") {
|
|
163
163
|
return content.replace(/^.*design-system-sync\.yaml.*\n/m, "");
|
|
164
164
|
}
|
|
165
|
-
if (distribution.mode === "selected" && relativePath.startsWith("
|
|
165
|
+
if (distribution.mode === "selected" && relativePath.startsWith(".template-spec/user-guide/") && relativePath.endsWith(".md")) {
|
|
166
166
|
return content.replaceAll("[设备借用贯穿案例](设备借用贯穿案例.md)", "[项目用户手册](用户手册.md)")
|
|
167
167
|
.replaceAll("本仓是 `template-source`", "模板源是 `template-source`");
|
|
168
168
|
}
|
|
@@ -186,10 +186,10 @@ function renderTemplateFile(relativePath, content, variables) {
|
|
|
186
186
|
);
|
|
187
187
|
if (distribution.mode !== "selected") return rendered;
|
|
188
188
|
const base = rendered.replace(/## 4\. \`template-source\` 模板维护路由[\s\S]*?(?=## 5\.)/, "")
|
|
189
|
-
.replace(/\| 影响面、\`not-applicable\`、模板维护强度 \|[^\n]*\n/, "| 影响面与 `not-applicable` |
|
|
189
|
+
.replace(/\| 影响面、\`not-applicable\`、模板维护强度 \|[^\n]*\n/, "| 影响面与 `not-applicable` | `.template-spec/process/harness-process-tailoring.md` |\n");
|
|
190
190
|
const guidance = distribution.assetProfile === ASSET_PROFILE
|
|
191
|
-
? "## 按需阶段资产与 Skill\n\n进入后续生命周期阶段前,运行 `create-yss-spec assets ensure <stage-id> --plan` 查看完整依赖,核对后运行 `--apply`。专项任务根据
|
|
192
|
-
: "## 按需 Skill\n\n此实例继续沿用原文件分发范围。阶段派发或专项任务开始前,根据
|
|
191
|
+
? "## 按需阶段资产与 Skill\n\n进入后续生命周期阶段前,运行 `create-yss-spec assets ensure <stage-id> --plan` 查看完整依赖,核对后运行 `--apply`。专项任务根据 .template-spec/agents/yss-skill-registry.yaml 选定 Skill,运行 `create-yss-spec skills ensure <skill-id...> --plan`,核对后运行 `--apply`。缺少阶段资产时先补装,不以缺文件推定门禁不适用。若 CLI 快照与实例模板提交不一致,先运行 `create-yss-spec sync`。\n"
|
|
192
|
+
: "## 按需 Skill\n\n此实例继续沿用原文件分发范围。阶段派发或专项任务开始前,根据 .template-spec/agents/yss-skill-registry.yaml 选定 Skill,运行 `create-yss-spec skills ensure <skill-id...> --plan`,核对后运行 `--apply`。若 CLI 快照与实例模板提交不一致,先运行 `create-yss-spec sync`。\n";
|
|
193
193
|
return `${base}\n${guidance}`;
|
|
194
194
|
}
|
|
195
195
|
|
|
@@ -197,7 +197,7 @@ function renderTemplateFile(relativePath, content, variables) {
|
|
|
197
197
|
const assetGuidance = distribution.assetProfile === ASSET_PROFILE
|
|
198
198
|
? "后续阶段先运行 `create-yss-spec assets ensure <stage-id> --plan` 核对依赖,再运行 `--apply`;专项 Skill 使用 `create-yss-spec skills ensure <skill-id> --plan/--apply`。"
|
|
199
199
|
: "专项 Skill 使用 `create-yss-spec skills ensure <skill-id> --plan/--apply`。";
|
|
200
|
-
return `# ${variables.projectName}\n\n本仓库用于管理 ${variables.businessDomain} 的研发资产。\n\n- 默认 Issue Tracker:${variables.issueTracker}\n- Agent 平台:${distribution.mode === "selected" ? distribution.runtimes.join(", ") : "legacy-all"}\n- 协作入口:[AGENTS.md](./AGENTS.md)\n- 业务词汇:[CONTEXT.md](./CONTEXT.md)\n- 用户指南:[
|
|
200
|
+
return `# ${variables.projectName}\n\n本仓库用于管理 ${variables.businessDomain} 的研发资产。\n\n- 默认 Issue Tracker:${variables.issueTracker}\n- Agent 平台:${distribution.mode === "selected" ? distribution.runtimes.join(", ") : "legacy-all"}\n- 协作入口:[AGENTS.md](./AGENTS.md)\n- 业务词汇:[CONTEXT.md](./CONTEXT.md)\n- 用户指南:[.template-spec/user-guide/用户手册.md](./.template-spec/user-guide/用户手册.md)\n\n项目校验:\`scripts/verify-project-instance\`。${assetGuidance}\n`;
|
|
201
201
|
}
|
|
202
202
|
|
|
203
203
|
if (relativePath === ".gitignore") return extractManagedGitignoreBlock(content);
|