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/README.md
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
用于初始化、接管已有项目并持续同步 `yss-spec-project-template` 研发管理资产的 npm CLI。
|
|
4
4
|
|
|
5
|
-
源码候选版本:`3.
|
|
5
|
+
源码候选版本:`3.5.0`。当前固定模板身份、来源状态和摘要见 `template.snapshot.json`;CLI 运行时不会拉取模板仓库。`npm create yss-spec@latest` 获取的是实际已发布 npm 包,发布版本请以 `npm view create-yss-spec version` 为准,并用 `create-yss-spec --version` 核对当前执行版本。
|
|
6
6
|
|
|
7
7
|
## 本版模板能力
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
本版新增按阶段分发项目实例资产及 `assets ensure` 命令;旧实例沿用原有分发范围。CLI 在同一事务内刷新生成型 `skills-lock.json` 并运行项目实例校验,失败时恢复同步前状态。版本升级只完成 GitHub 源码交付,npm 发布状态仍以 registry 为准。
|
|
10
10
|
|
|
11
11
|
## 快速开始
|
|
12
12
|
|
|
@@ -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
|
@@ -2,19 +2,22 @@
|
|
|
2
2
|
|
|
3
3
|
const fs = require("node:fs");
|
|
4
4
|
const path = require("node:path");
|
|
5
|
+
const { isDeepStrictEqual } = require("node:util");
|
|
5
6
|
|
|
6
7
|
const { pathKind, targetPath, normalizeRelativePath } = require("../filesystem/path-utils");
|
|
7
8
|
const { applyManagedOperation, applyMigrationOperations } = require("../filesystem/apply-plan");
|
|
8
9
|
const { runInTransaction } = require("../filesystem/transaction-runner");
|
|
9
10
|
const { assertBundledFamily, assertTargetFamily } = require("../family-runtime");
|
|
10
|
-
const { gitDirtyWarning } = require("../git/worktree");
|
|
11
|
+
const { collectGitRoots, gitDirtyWarning } = require("../git/worktree");
|
|
11
12
|
const { unmanagedPathReason, assertTargetWorkingTreeWritable } = require("../validation/security");
|
|
12
13
|
const { buildSyncPlanFromRuntime } = require("../template/sync-planner-runtime");
|
|
13
14
|
const { buildLegacyMigrationPlan } = require("../template/migration-runtime");
|
|
15
|
+
const { prepareLayoutMigration, combineMigrationPlans } = require("../template/layout-migration");
|
|
14
16
|
const { classifyRemovedFiles } = require("../template/prune-planner");
|
|
15
17
|
const { decorateMetadataOwnership } = require("../template/ownership-metadata");
|
|
16
18
|
const { decorateMetadataLifecycle } = require("../template/lifecycle-metadata");
|
|
17
19
|
const {
|
|
20
|
+
readProjectSkillLock,
|
|
18
21
|
refreshGeneratedProjectInstance,
|
|
19
22
|
verifyGeneratedProjectInstance,
|
|
20
23
|
} = require("../template/verification-runtime");
|
|
@@ -47,7 +50,7 @@ function isInsideTemplateRoot(targetDir) {
|
|
|
47
50
|
);
|
|
48
51
|
}
|
|
49
52
|
|
|
50
|
-
function inspectExistingTargetDir(targetDir, { force = false } = {}) {
|
|
53
|
+
function inspectExistingTargetDir(targetDir, { force = false, gitRoots = null } = {}) {
|
|
51
54
|
if (isInsideTemplateRoot(targetDir)) {
|
|
52
55
|
throw new Error("目标目录不能位于模板源仓库内部");
|
|
53
56
|
}
|
|
@@ -57,6 +60,7 @@ function inspectExistingTargetDir(targetDir, { force = false } = {}) {
|
|
|
57
60
|
assertTargetWorkingTreeWritable(targetDir, {
|
|
58
61
|
force,
|
|
59
62
|
packageRoot: PACKAGE_ROOT,
|
|
63
|
+
...(gitRoots && { deps: { collectGitRoots: () => gitRoots } }),
|
|
60
64
|
});
|
|
61
65
|
}
|
|
62
66
|
|
|
@@ -70,25 +74,35 @@ function affectedPathsForMigration(migrationPlan) {
|
|
|
70
74
|
);
|
|
71
75
|
}
|
|
72
76
|
|
|
73
|
-
function buildSyncContext({ targetDir = ".", force = false, cwd = process.cwd() } = {}) {
|
|
77
|
+
function buildSyncContext({ targetDir = ".", force = false, migrateLayout = false, cwd = process.cwd() } = {}) {
|
|
74
78
|
const snapshot = readTemplateSnapshot();
|
|
75
79
|
assertBundledFamily(snapshot);
|
|
76
80
|
const resolvedTargetDir = normalizeTargetDir(targetDir, cwd);
|
|
77
81
|
assertTargetFamily(resolvedTargetDir);
|
|
78
|
-
|
|
82
|
+
const gitRoots = collectGitRoots(resolvedTargetDir);
|
|
83
|
+
const securityOptions = { packageRoot: PACKAGE_ROOT, deps: { collectGitRoots: () => gitRoots } };
|
|
84
|
+
inspectExistingTargetDir(resolvedTargetDir, { force: Boolean(force), gitRoots });
|
|
79
85
|
|
|
80
86
|
const { metadata } = loadTemplateMetadata(resolvedTargetDir);
|
|
81
87
|
const identity = readTargetIdentity(resolvedTargetDir);
|
|
82
|
-
const
|
|
88
|
+
const baseDesiredOperations = buildSyncDesiredOperations(
|
|
83
89
|
resolvedTargetDir,
|
|
84
90
|
metadata,
|
|
85
91
|
identity,
|
|
92
|
+
snapshot,
|
|
86
93
|
);
|
|
87
|
-
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(
|
|
88
102
|
resolvedTargetDir,
|
|
89
103
|
desiredOperations,
|
|
90
104
|
{ checkFlatTickets: false },
|
|
91
|
-
);
|
|
105
|
+
));
|
|
92
106
|
const warning = gitDirtyWarning(resolvedTargetDir);
|
|
93
107
|
|
|
94
108
|
const { classified: syncPlan, plan } = buildSyncPlanFromRuntime({
|
|
@@ -99,19 +113,19 @@ function buildSyncContext({ targetDir = ".", force = false, cwd = process.cwd()
|
|
|
99
113
|
warning,
|
|
100
114
|
toVersion: PACKAGE_MANIFEST.version,
|
|
101
115
|
getUnmanagedReason: (operation) =>
|
|
102
|
-
operation.unsafeReason || unmanagedPathReason(resolvedTargetDir, operation.relativePath,
|
|
103
|
-
packageRoot: PACKAGE_ROOT,
|
|
104
|
-
}),
|
|
116
|
+
operation.unsafeReason || unmanagedPathReason(resolvedTargetDir, operation.relativePath, securityOptions),
|
|
105
117
|
getPathKind: (operation) => pathKind(operation.targetPath),
|
|
106
118
|
getFileHash: (operation) => fileHash(operation.targetPath),
|
|
107
119
|
});
|
|
108
120
|
const removedPlan = classifyRemovedFiles({
|
|
109
|
-
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)),
|
|
110
124
|
managedFiles: metadata.managedFiles || {},
|
|
111
125
|
getPathKind: (relativePath) => pathKind(targetPath(resolvedTargetDir, relativePath)),
|
|
112
126
|
getFileHash: (relativePath) => fileHash(targetPath(resolvedTargetDir, relativePath)),
|
|
113
127
|
getUnmanagedReason: (relativePath) =>
|
|
114
|
-
unmanagedPathReason(resolvedTargetDir, relativePath,
|
|
128
|
+
unmanagedPathReason(resolvedTargetDir, relativePath, securityOptions),
|
|
115
129
|
});
|
|
116
130
|
const readmeOwnershipTransferred = syncPlan.removed.includes("README.md");
|
|
117
131
|
syncPlan.removed = syncPlan.removed.filter((relativePath) => relativePath !== "README.md");
|
|
@@ -133,10 +147,12 @@ function buildSyncContext({ targetDir = ".", force = false, cwd = process.cwd()
|
|
|
133
147
|
|
|
134
148
|
return {
|
|
135
149
|
targetDir: resolvedTargetDir,
|
|
150
|
+
snapshot,
|
|
136
151
|
metadata,
|
|
137
152
|
identity,
|
|
138
153
|
desiredOperations,
|
|
139
154
|
migrationPlan,
|
|
155
|
+
migrateLayout,
|
|
140
156
|
warning,
|
|
141
157
|
syncPlan,
|
|
142
158
|
plan,
|
|
@@ -158,27 +174,118 @@ function assertSyncApplicable(context) {
|
|
|
158
174
|
}
|
|
159
175
|
}
|
|
160
176
|
|
|
177
|
+
function isVerifiedNoopCandidate(context) {
|
|
178
|
+
const { metadata, migrationPlan, syncPlan } = context;
|
|
179
|
+
if (
|
|
180
|
+
syncPlan.updated.some((operation) => operation.relativePath !== "skills-lock.json") ||
|
|
181
|
+
syncPlan.added.length > 0 ||
|
|
182
|
+
syncPlan.skipped.length > 0 ||
|
|
183
|
+
syncPlan.removed.length > 0 ||
|
|
184
|
+
syncPlan.prunable.length > 0 ||
|
|
185
|
+
syncPlan.retainedRemoved.length > 0 ||
|
|
186
|
+
syncPlan.readmeOwnershipTransferred ||
|
|
187
|
+
(syncPlan.alreadyMissing || []).length > 0 ||
|
|
188
|
+
migrationPlan.operations.length > 0
|
|
189
|
+
) return false;
|
|
190
|
+
|
|
191
|
+
const nextMetadata = decorateMetadataLifecycle(
|
|
192
|
+
decorateMetadataOwnership(buildNextSyncMetadata(metadata, syncPlan, {
|
|
193
|
+
snapshot: context.snapshot,
|
|
194
|
+
currentHashes: syncPlan.currentHashes,
|
|
195
|
+
})),
|
|
196
|
+
);
|
|
197
|
+
return isDeepStrictEqual(
|
|
198
|
+
{ ...nextMetadata, lastSyncedAt: metadata.lastSyncedAt },
|
|
199
|
+
metadata,
|
|
200
|
+
);
|
|
201
|
+
}
|
|
202
|
+
|
|
161
203
|
function applySyncContext(context, { force = false, prune = false } = {}) {
|
|
162
204
|
assertSyncApplicable(context);
|
|
163
|
-
const { targetDir, metadata, migrationPlan, syncPlan } = context;
|
|
205
|
+
const { targetDir, metadata, desiredOperations, migrationPlan, syncPlan } = context;
|
|
206
|
+
if (isVerifiedNoopCandidate(context)) {
|
|
207
|
+
try {
|
|
208
|
+
verifyGeneratedProjectInstance(targetDir);
|
|
209
|
+
return {
|
|
210
|
+
schemaVersion: APPLY_RESULT_SCHEMA_VERSION,
|
|
211
|
+
operation: "sync",
|
|
212
|
+
targetDir,
|
|
213
|
+
backupPath: null,
|
|
214
|
+
template: context.plan.template,
|
|
215
|
+
stats: { updated: 0, added: 0, skipped: 0, removed: 0, forceApplied: 0, pruned: 0 },
|
|
216
|
+
skipped: [],
|
|
217
|
+
removed: [],
|
|
218
|
+
prunable: [],
|
|
219
|
+
pruned: [],
|
|
220
|
+
retainedRemoved: [],
|
|
221
|
+
ownershipTransferred: [],
|
|
222
|
+
};
|
|
223
|
+
} catch {
|
|
224
|
+
// A stale generated lock needs the normal transactional refresh and verification.
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
const previousSkillLock = readProjectSkillLock(targetDir);
|
|
164
228
|
const managedToApply = [
|
|
165
229
|
...syncPlan.updated,
|
|
166
230
|
...syncPlan.added,
|
|
167
231
|
...(force ? syncPlan.forceableConflicts : []),
|
|
168
232
|
];
|
|
169
233
|
syncPlan.pruned = prune ? [...syncPlan.prunable] : [];
|
|
234
|
+
const affectedPaths = [
|
|
235
|
+
...affectedPathsForManagedOperations(managedToApply),
|
|
236
|
+
...affectedPathsForMigration(migrationPlan),
|
|
237
|
+
...syncPlan.pruned,
|
|
238
|
+
"skills-lock.json",
|
|
239
|
+
TEMPLATE_METADATA_FILENAME,
|
|
240
|
+
];
|
|
170
241
|
|
|
171
242
|
const { backupPath } = runInTransaction({
|
|
172
243
|
targetDir,
|
|
173
244
|
operation: "sync",
|
|
174
|
-
affectedPaths
|
|
175
|
-
...affectedPathsForManagedOperations(managedToApply),
|
|
176
|
-
...affectedPathsForMigration(migrationPlan),
|
|
177
|
-
...syncPlan.pruned,
|
|
178
|
-
"skills-lock.json",
|
|
179
|
-
TEMPLATE_METADATA_FILENAME,
|
|
180
|
-
],
|
|
245
|
+
affectedPaths,
|
|
181
246
|
execute: (transaction) => {
|
|
247
|
+
const gitRoots = collectGitRoots(targetDir);
|
|
248
|
+
const securityOptions = { packageRoot: PACKAGE_ROOT, deps: { collectGitRoots: () => gitRoots } };
|
|
249
|
+
assertTargetWorkingTreeWritable(targetDir, { ...securityOptions, force });
|
|
250
|
+
for (const relativePath of new Set(affectedPaths)) {
|
|
251
|
+
const reason = unmanagedPathReason(targetDir, relativePath, securityOptions);
|
|
252
|
+
if (reason) throw new Error(`${relativePath}: ${reason}`);
|
|
253
|
+
const kind = pathKind(targetPath(targetDir, relativePath));
|
|
254
|
+
if (kind === "other") throw new Error(`${relativePath}: 写入前路径类型已变化为 ${kind}`);
|
|
255
|
+
if (["skills-lock.json", TEMPLATE_METADATA_FILENAME].includes(relativePath) && kind === "directory") {
|
|
256
|
+
throw new Error(`${relativePath}: 写入前路径类型已变化为 ${kind}`);
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
if (!isDeepStrictEqual(loadTemplateMetadata(targetDir).metadata, metadata)) {
|
|
260
|
+
throw new Error("模板元数据在规划后已变化,请重新运行 sync");
|
|
261
|
+
}
|
|
262
|
+
for (const operation of managedToApply) {
|
|
263
|
+
const kind = pathKind(targetPath(targetDir, operation.relativePath));
|
|
264
|
+
const plannedHash = syncPlan.currentHashes[operation.relativePath];
|
|
265
|
+
if (plannedHash === undefined ? kind !== "missing" : kind !== "file" || fileHash(operation.targetPath) !== plannedHash) {
|
|
266
|
+
throw new Error(`${operation.relativePath}: 规划后目标文件已变化,请重新运行 sync`);
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
for (const relativePath of syncPlan.pruned) {
|
|
270
|
+
const current = targetPath(targetDir, relativePath);
|
|
271
|
+
if (pathKind(current) !== "file" || fileHash(current) !== metadata.managedFiles[relativePath]?.contentHash) {
|
|
272
|
+
throw new Error(`${relativePath}: 待清理文件在规划后已变化,请重新运行 sync`);
|
|
273
|
+
}
|
|
274
|
+
}
|
|
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 }));
|
|
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])) ||
|
|
286
|
+
currentMigration.unsafe.length || currentMigration.conflicts.length) {
|
|
287
|
+
throw new Error("旧路径迁移在规划后已变化,请重新运行 sync");
|
|
288
|
+
}
|
|
182
289
|
for (const operation of managedToApply) {
|
|
183
290
|
applyManagedOperation(operation, transaction);
|
|
184
291
|
}
|
|
@@ -187,12 +294,23 @@ function applySyncContext(context, { force = false, prune = false } = {}) {
|
|
|
187
294
|
transaction.remove(targetPath(targetDir, relativePath));
|
|
188
295
|
}
|
|
189
296
|
verifyGeneratedSyncInstance(targetDir);
|
|
190
|
-
refreshGeneratedProjectInstance(targetDir
|
|
297
|
+
refreshGeneratedProjectInstance(targetDir, {
|
|
298
|
+
previousSkillLock,
|
|
299
|
+
previousManagedFiles: metadata.managedFiles,
|
|
300
|
+
transaction,
|
|
301
|
+
});
|
|
191
302
|
verifyGeneratedProjectInstance(targetDir);
|
|
192
303
|
const nextMetadata = decorateMetadataLifecycle(
|
|
193
|
-
decorateMetadataOwnership(buildNextSyncMetadata(metadata, syncPlan)),
|
|
304
|
+
decorateMetadataOwnership(buildNextSyncMetadata(metadata, syncPlan, { snapshot: context.snapshot })),
|
|
194
305
|
);
|
|
195
|
-
|
|
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
|
+
}
|
|
311
|
+
if (!isDeepStrictEqual({ ...nextMetadata, lastSyncedAt: metadata.lastSyncedAt }, metadata)) {
|
|
312
|
+
writeTemplateMetadata(targetDir, nextMetadata, transaction);
|
|
313
|
+
}
|
|
196
314
|
},
|
|
197
315
|
});
|
|
198
316
|
|
package/src/cli/args.js
CHANGED
|
@@ -8,6 +8,7 @@ const VALUE_OPTIONS = new Map([
|
|
|
8
8
|
["--team-size", "teamSize"],
|
|
9
9
|
["--target-dir", "targetDir"],
|
|
10
10
|
["--issue-tracker", "issueTracker"],
|
|
11
|
+
["--agent-runtime", "agentRuntime"],
|
|
11
12
|
]);
|
|
12
13
|
|
|
13
14
|
function parseArgs(argv = []) {
|
|
@@ -38,6 +39,8 @@ function parseArgs(argv = []) {
|
|
|
38
39
|
options.force = true;
|
|
39
40
|
} else if (current === "--prune") {
|
|
40
41
|
options.prune = true;
|
|
42
|
+
} else if (current === "--migrate-layout") {
|
|
43
|
+
options.migrateLayout = true;
|
|
41
44
|
} else if (current === "--git-init") {
|
|
42
45
|
options.gitInit = true;
|
|
43
46
|
} else if (current === "--include-example-docs") {
|
package/src/cli/help.js
CHANGED
|
@@ -16,6 +16,8 @@ COMMANDS
|
|
|
16
16
|
sync 同步已有模板实例的受管资产
|
|
17
17
|
diff 只计算同步差异,不写入文件
|
|
18
18
|
doctor 检查模板实例、身份、Git 和安全状态
|
|
19
|
+
skills 按需补装 Skill 或增加 Agent 平台
|
|
20
|
+
assets 按生命周期阶段补装所需文件与 Skill
|
|
19
21
|
update 检查 npm 最新版本,如有更新则安装
|
|
20
22
|
upgrade update 的别名
|
|
21
23
|
|
|
@@ -25,6 +27,7 @@ OPTIONS
|
|
|
25
27
|
--team-size <size> 团队规模;init 不传则可留空,默认「待补充」
|
|
26
28
|
--target-dir <dir> 目标目录;init 不传则进入交互输入,sync/diff/doctor 默认为当前目录
|
|
27
29
|
--issue-tracker github|gitlab 默认 issue tracker 偏好(默认 github)
|
|
30
|
+
--agent-runtime codex|cursor|pi init/attach 必选;交互模式可在提示中选择
|
|
28
31
|
--dry-run 兼容预演模式,不写入文件
|
|
29
32
|
--plan sync:输出结构化文本计划,不写入文件
|
|
30
33
|
--json sync/diff/doctor:输出机器可读 JSON,不写入文件
|
|
@@ -33,8 +36,9 @@ OPTIONS
|
|
|
33
36
|
attach / sync:覆盖受管冲突文件;unsafe 路径始终阻断
|
|
34
37
|
update:即使已是最新时仍重新安装;npx / 源码目录仍不覆盖
|
|
35
38
|
--prune sync:备份并删除与旧受管基线一致的退出分发文件
|
|
39
|
+
--migrate-layout attach/sync:显式迁移旧 docs 治理布局,冲突时停止并保留备份
|
|
36
40
|
--git-init 初始化完成后执行 git init
|
|
37
|
-
--include-example-docs
|
|
41
|
+
--include-example-docs 显式保留示例文档(默认关闭)
|
|
38
42
|
--no-example-docs 不生成示例文档
|
|
39
43
|
-h, --help 显示本帮助信息
|
|
40
44
|
-v, --version 显示 CLI 版本
|
|
@@ -63,6 +67,8 @@ EXAMPLES
|
|
|
63
67
|
$ npx create-yss-spec@latest sync
|
|
64
68
|
$ npx create-yss-spec@latest sync --dry-run
|
|
65
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
|
|
66
72
|
$ npx create-yss-spec@latest sync --json
|
|
67
73
|
$ npx create-yss-spec@latest diff
|
|
68
74
|
$ npx create-yss-spec@latest diff --json
|
|
@@ -70,6 +76,12 @@ EXAMPLES
|
|
|
70
76
|
$ npx create-yss-spec@latest doctor --json
|
|
71
77
|
$ npx create-yss-spec@latest sync --target-dir . --force
|
|
72
78
|
$ npx create-yss-spec@latest sync --plan --prune
|
|
79
|
+
$ npx create-yss-spec@latest skills ensure yss-web-controller --plan
|
|
80
|
+
$ npx create-yss-spec@latest assets ensure stage.spec-architecture --plan
|
|
81
|
+
$ npx create-yss-spec@latest assets ensure stage.spec-architecture --apply
|
|
82
|
+
$ npx create-yss-spec@latest skills ensure yss-web-controller --apply
|
|
83
|
+
$ npx create-yss-spec@latest skills runtime add cursor --plan
|
|
84
|
+
$ npx create-yss-spec@latest skills runtime add cursor --apply
|
|
73
85
|
$ npx create-yss-spec@latest sync --prune
|
|
74
86
|
$ npx create-yss-spec update
|
|
75
87
|
$ npx create-yss-spec update --dry-run
|
|
@@ -77,7 +89,7 @@ EXAMPLES
|
|
|
77
89
|
|
|
78
90
|
LEARN MORE
|
|
79
91
|
仓库 README:https://github.com/iloveZzz/create-yss-spec#readme
|
|
80
|
-
使用手册: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
|
|
81
93
|
模板仓库:https://github.com/iloveZzz/yss-spec-project-template
|
|
82
94
|
`;
|
|
83
95
|
}
|
package/src/cli/index.js
CHANGED
|
@@ -29,6 +29,7 @@ const { runDiff } = require("../commands/diff");
|
|
|
29
29
|
const { runDoctor } = require("../commands/doctor");
|
|
30
30
|
const { runInit } = require("../commands/init");
|
|
31
31
|
const { runSync } = require("../commands/sync");
|
|
32
|
+
const { runSkills, runAssets } = require("../commands/skills");
|
|
32
33
|
const { runUpdateCommand } = require("../commands/update");
|
|
33
34
|
const { printHelp, printVersion } = require("./help");
|
|
34
35
|
const { resolveCommand } = require("./router");
|
|
@@ -58,6 +59,8 @@ async function runCli(argv = []) {
|
|
|
58
59
|
if (route.command === "sync") {
|
|
59
60
|
return runSync(route.args);
|
|
60
61
|
}
|
|
62
|
+
if (route.command === "skills") return runSkills(route.args);
|
|
63
|
+
if (route.command === "assets") return runAssets(route.args);
|
|
61
64
|
if (route.command === "doctor") {
|
|
62
65
|
return runDoctor(route.args);
|
|
63
66
|
}
|
package/src/cli/prompts.js
CHANGED
|
@@ -11,8 +11,9 @@ function normalizeInteractiveOptions(options, values) {
|
|
|
11
11
|
gitInit: Boolean(options.gitInit),
|
|
12
12
|
includeExampleDocs:
|
|
13
13
|
options.includeExampleDocs === undefined
|
|
14
|
-
?
|
|
14
|
+
? false
|
|
15
15
|
: Boolean(options.includeExampleDocs),
|
|
16
|
+
...(values.agentRuntime || options.agentRuntime ? { agentRuntime: values.agentRuntime || options.agentRuntime } : {}),
|
|
16
17
|
};
|
|
17
18
|
}
|
|
18
19
|
|
|
@@ -40,12 +41,14 @@ async function promptForMissingOptions(options, deps = {}) {
|
|
|
40
41
|
: await rl.question("团队规模(可留空): ");
|
|
41
42
|
const targetDir =
|
|
42
43
|
options.targetDir || (await rl.question("目标目录: ")).trim();
|
|
44
|
+
const agentRuntime = options.agentRuntime || (await rl.question("Agent 平台(codex/cursor/pi): ")).trim();
|
|
43
45
|
|
|
44
46
|
return normalizeInteractiveOptions(options, {
|
|
45
47
|
projectName,
|
|
46
48
|
businessDomain,
|
|
47
49
|
teamSize: (teamSizeInput || "").trim() || "待补充",
|
|
48
50
|
targetDir,
|
|
51
|
+
agentRuntime,
|
|
49
52
|
});
|
|
50
53
|
} finally {
|
|
51
54
|
rl.close();
|
|
@@ -53,6 +56,7 @@ async function promptForMissingOptions(options, deps = {}) {
|
|
|
53
56
|
}
|
|
54
57
|
|
|
55
58
|
async function promptFromBufferedInput(options, deps = {}) {
|
|
59
|
+
if (!options.agentRuntime) throw new Error("无交互 init 必须显式指定 --agent-runtime codex|cursor|pi");
|
|
56
60
|
const stdin = deps.stdin || process.stdin;
|
|
57
61
|
const stdout = deps.stdout || process.stdout;
|
|
58
62
|
const chunks = [];
|
package/src/cli/router.js
CHANGED
|
@@ -19,6 +19,8 @@ function resolveCommand(argv = []) {
|
|
|
19
19
|
if (head === "sync") {
|
|
20
20
|
return { command: "sync", args: rest };
|
|
21
21
|
}
|
|
22
|
+
if (head === "skills") return { command: "skills", args: rest };
|
|
23
|
+
if (head === "assets") return { command: "assets", args: rest };
|
|
22
24
|
if (head === "attach") {
|
|
23
25
|
return { command: "attach", args: rest };
|
|
24
26
|
}
|
package/src/commands/attach.js
CHANGED
|
@@ -4,6 +4,7 @@ const fs = require("node:fs");
|
|
|
4
4
|
const path = require("node:path");
|
|
5
5
|
|
|
6
6
|
const { parseArgs } = require("../cli/args");
|
|
7
|
+
const { assertRuntime } = require("../template/distribution-runtime");
|
|
7
8
|
const { pathKind, targetPath, normalizeRelativePath } = require("../filesystem/path-utils");
|
|
8
9
|
const { applyManagedOperation, applyMigrationOperations } = require("../filesystem/apply-plan");
|
|
9
10
|
const { runInTransaction } = require("../filesystem/transaction-runner");
|
|
@@ -12,6 +13,7 @@ const { gitDirtyWarning } = require("../git/worktree");
|
|
|
12
13
|
const { unmanagedPathReason, assertTargetWorkingTreeWritable } = require("../validation/security");
|
|
13
14
|
const { buildAttachPlanFromRuntime } = require("../template/attach-planner-runtime");
|
|
14
15
|
const { buildLegacyMigrationPlan } = require("../template/migration-runtime");
|
|
16
|
+
const { prepareLayoutMigration, combineMigrationPlans } = require("../template/layout-migration");
|
|
15
17
|
const {
|
|
16
18
|
PACKAGE_ROOT,
|
|
17
19
|
BUNDLED_TEMPLATE_ROOT,
|
|
@@ -29,6 +31,8 @@ const {
|
|
|
29
31
|
} = require("../template/verification-runtime");
|
|
30
32
|
|
|
31
33
|
function assertRequiredOptions(options) {
|
|
34
|
+
if (!options.agentRuntime && !process.stdin.isTTY) throw new Error("无交互 attach 必须显式指定 --agent-runtime codex|cursor|pi");
|
|
35
|
+
if (options.agentRuntime) assertRuntime(options.agentRuntime);
|
|
32
36
|
if (!options.projectName) {
|
|
33
37
|
throw new Error("attach 需要 --project-name,项目名称不能为空");
|
|
34
38
|
}
|
|
@@ -73,8 +77,9 @@ function attachVariables(options) {
|
|
|
73
77
|
issueTracker: options.issueTracker || "github",
|
|
74
78
|
includeExampleDocs:
|
|
75
79
|
options.includeExampleDocs === undefined
|
|
76
|
-
?
|
|
80
|
+
? false
|
|
77
81
|
: Boolean(options.includeExampleDocs),
|
|
82
|
+
agentRuntime: options.agentRuntime,
|
|
78
83
|
};
|
|
79
84
|
}
|
|
80
85
|
|
|
@@ -156,8 +161,14 @@ function affectedPathsForMigration(migrationPlan) {
|
|
|
156
161
|
);
|
|
157
162
|
}
|
|
158
163
|
|
|
159
|
-
function runAttach(argv = []) {
|
|
164
|
+
async function runAttach(argv = []) {
|
|
160
165
|
const options = parseArgs(argv);
|
|
166
|
+
if (!options.agentRuntime && process.stdin.isTTY) {
|
|
167
|
+
const readline = require("node:readline/promises");
|
|
168
|
+
const rl = readline.createInterface({ input: process.stdin, output: process.stdout });
|
|
169
|
+
try { options.agentRuntime = (await rl.question("Agent 平台(codex/cursor/pi): ")).trim(); }
|
|
170
|
+
finally { rl.close(); }
|
|
171
|
+
}
|
|
161
172
|
if (options.prune) throw new Error("--prune 仅适用于 sync");
|
|
162
173
|
assertRequiredOptions(options);
|
|
163
174
|
|
|
@@ -180,14 +191,19 @@ function runAttach(argv = []) {
|
|
|
180
191
|
|
|
181
192
|
const variables = attachVariables(options);
|
|
182
193
|
const identity = readTargetIdentity(targetDir);
|
|
183
|
-
const
|
|
194
|
+
const baseDesiredOperations = buildAttachDesiredOperations(
|
|
184
195
|
targetDir,
|
|
185
196
|
variables,
|
|
186
197
|
identity,
|
|
187
198
|
);
|
|
188
|
-
const
|
|
189
|
-
|
|
199
|
+
const layout = prepareLayoutMigration({
|
|
200
|
+
targetDir, desiredOperations: baseDesiredOperations,
|
|
201
|
+
explicit: Boolean(options.migrateLayout),
|
|
190
202
|
});
|
|
203
|
+
const desiredOperations = layout.desiredOperations;
|
|
204
|
+
const migrationPlan = combineMigrationPlans(layout.plan, buildLegacyMigrationPlan(targetDir, desiredOperations, {
|
|
205
|
+
checkFlatTickets: true,
|
|
206
|
+
}));
|
|
191
207
|
const warning = gitDirtyWarning(targetDir);
|
|
192
208
|
|
|
193
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
|
@@ -4,6 +4,7 @@ const fs = require("node:fs");
|
|
|
4
4
|
const path = require("node:path");
|
|
5
5
|
|
|
6
6
|
const { parseArgs } = require("../cli/args");
|
|
7
|
+
const { assertRuntime } = require("../template/distribution-runtime");
|
|
7
8
|
const { promptForMissingOptions } = require("../cli/prompts");
|
|
8
9
|
const { printHelp, printVersion } = require("../cli/help");
|
|
9
10
|
const { pathKind, normalizeRelativePath } = require("../filesystem/path-utils");
|
|
@@ -32,6 +33,7 @@ const {
|
|
|
32
33
|
} = require("../template/verification-runtime");
|
|
33
34
|
|
|
34
35
|
function assertRequiredOptions(options) {
|
|
36
|
+
assertRuntime(options.agentRuntime);
|
|
35
37
|
if (!options.projectName) {
|
|
36
38
|
throw new Error("init 需要 --project-name,项目名称不能为空");
|
|
37
39
|
}
|
|
@@ -119,6 +121,7 @@ function parentDirectoryOperations(desiredOperations, targetDir) {
|
|
|
119
121
|
async function runInit(argv = []) {
|
|
120
122
|
const options = parseArgs(argv);
|
|
121
123
|
if (options.prune) throw new Error("--prune 仅适用于 sync");
|
|
124
|
+
if (options.migrateLayout) throw new Error("--migrate-layout 仅适用于 attach/sync");
|
|
122
125
|
if (options.help) {
|
|
123
126
|
printHelp(PACKAGE_MANIFEST.version);
|
|
124
127
|
return;
|
|
@@ -193,7 +196,7 @@ async function runInit(argv = []) {
|
|
|
193
196
|
? "2. 运行 git status 检查初始化结果"
|
|
194
197
|
: "2. 如需版本管理,可执行 git init",
|
|
195
198
|
);
|
|
196
|
-
console.log("3. 检查 AGENTS.md、README 和 docs
|
|
199
|
+
console.log("3. 检查 AGENTS.md、README 和 .template-spec 目录是否符合预期;docs 将在首次项目产出时创建");
|
|
197
200
|
}
|
|
198
201
|
|
|
199
202
|
module.exports = {
|