create-yss-spec 3.0.1 → 3.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/package.json +1 -1
- package/template/.agents/rules/yss-ai-skills.md +3 -55
- package/template/.agents/skills/.strategic-design-skills-manifest.json +11 -6
- package/template/.agents/skills/.yss-skills-manifest.json +1 -3
- package/template/.agents/skills/alibaba-java-code-style/SKILL.md +1 -0
- package/template/.agents/skills/code-review/references/yss-review-standards.md +1 -1
- package/template/.agents/skills/domain-modeling/CONTEXT-FORMAT.md +37 -42
- package/template/.agents/skills/domain-modeling/SKILL.md +10 -26
- package/template/.agents/skills/grill-with-docs/SKILL.md +6 -5
- package/template/.agents/skills/lombok/SKILL.md +2 -1
- package/template/.agents/skills/mapstruct/SKILL.md +3 -2
- package/template/.agents/skills/setup-matt-pocock-skills/SKILL.md +5 -6
- package/template/.agents/skills/setup-matt-pocock-skills/domain.md +6 -20
- package/template/.agents/skills/wait-what/SKILL.md +1 -1
- package/template/.agents/skills/yss-antdv-next-design/SKILL.md +48 -0
- package/template/.agents/skills/yss-antdv-next-design/references/boundaries.md +25 -0
- package/template/.agents/skills/yss-antdv-next-design/references/cli-matrix.md +34 -0
- package/template/.agents/skills/yss-antdv-next-design/references/fact-pack.md +38 -0
- package/template/.agents/skills/yss-antdv-next-design/scripts/collect-antdv-next-facts.mjs +213 -0
- package/template/.agents/skills/yss-antdv-next-design/scripts/validate-fact-pack.mjs +168 -0
- package/template/.agents/skills/yss-antdv-next-design/tests/run-scenarios.mjs +139 -0
- package/template/.agents/skills/yss-application/SKILL.md +6 -0
- package/template/.agents/skills/yss-application/references/profiles/layered-mvc-service.md +3 -0
- package/template/.agents/skills/yss-application/references/profiles/mvc-data-analysis-v1.md +3 -0
- package/template/.agents/skills/yss-application/references/profiles/target-domain-model.md +3 -0
- package/template/.agents/skills/yss-components/SKILL.md +1 -1
- package/template/.agents/skills/yss-ddd-scaffold-generator/SKILL.md +3 -4
- package/template/.agents/skills/yss-ddd-scaffold-generator/assets/templates/config/application.yml.template +0 -13
- package/template/.agents/skills/yss-ddd-scaffold-generator/assets/templates/pom/bootstrap-pom.xml.template +13 -0
- package/template/.agents/skills/yss-ddd-scaffold-generator/references/USAGE_EXAMPLES.md +13 -4
- package/template/.agents/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-parent/SKILL.md +1 -1
- package/template/.agents/skills/yss-ddd-scaffold-generator/scripts/first-slice-compatibility.test.mjs +21 -7
- package/template/.agents/skills/yss-ddd-scaffold-generator/scripts/generate_scaffold.mjs +37 -15
- package/template/.agents/skills/yss-ddd-scaffold-generator/scripts/run_first_slice_verification.mjs +22 -10
- package/template/.agents/skills/yss-ddd-scaffold-generator/scripts/run_scaffold_verification.mjs +14 -2
- package/template/.agents/skills/yss-ddd-scaffold-generator/scripts/scaffold-generator.test.mjs +41 -12
- package/template/.agents/skills/yss-design-system/SKILL.md +25 -22
- package/template/.agents/skills/yss-design-system/references/design-qa-theme.md +22 -24
- package/template/.agents/skills/yss-design-system/references/design-system.md +39 -56
- package/template/.agents/skills/yss-domain/SKILL.md +1 -1
- package/template/.agents/skills/yss-dto/SKILL.md +1 -0
- package/template/.agents/skills/yss-exception/SKILL.md +1 -0
- package/template/.agents/skills/yss-frontend-scaffold-generator/SKILL.md +1 -1
- package/template/.agents/skills/yss-implementation-contract-compiler/SKILL.md +8 -2
- package/template/.agents/skills/yss-implementation-contract-compiler/references/boundaries.md +16 -8
- package/template/.agents/skills/yss-implementation-contract-compiler/references/compiler-contract.yaml +72 -19
- package/template/.agents/skills/yss-implementation-contract-compiler/references/slice-implementation-contract.md +5 -1
- package/template/.agents/skills/yss-implementation-contract-compiler/references/yss-skill-execution-result.md +2 -0
- package/template/.agents/skills/yss-implementation-contract-compiler/tests/backend-profiles.test.mjs +45 -0
- package/template/.agents/skills/yss-implementation-contract-compiler/tests/compiler-scenarios.test.mjs +8 -6
- package/template/.agents/skills/yss-layered-mvc-scaffold-generator/SKILL.md +64 -0
- package/template/.agents/skills/yss-layered-mvc-scaffold-generator/agents/openai.yaml +4 -0
- package/template/.agents/skills/yss-layered-mvc-scaffold-generator/references/architecture.md +29 -0
- package/template/.agents/skills/yss-layered-mvc-scaffold-generator/scripts/generate_and_verify_scaffold.mjs +61 -0
- package/template/.agents/skills/yss-layered-mvc-scaffold-generator/scripts/generate_scaffold.mjs +315 -0
- package/template/.agents/skills/yss-layered-mvc-scaffold-generator/scripts/run_scaffold_verification.mjs +30 -0
- package/template/.agents/skills/yss-layered-mvc-scaffold-generator/scripts/scaffold-generator.test.mjs +159 -0
- package/template/.agents/skills/yss-mvc-data-analysis-project-initializer/SKILL.md +22 -0
- package/template/.agents/skills/yss-mvc-data-analysis-project-initializer/scripts/generate_project.mjs +77 -0
- package/template/.agents/skills/yss-mvc-data-analysis-project-initializer/scripts/run_scaffold_verification.mjs +9 -0
- package/template/.agents/skills/yss-mvc-scaffold-generator/SKILL.md +3 -82
- package/template/.agents/skills/yss-mvc-scaffold-generator/references/history/generate_project.mjs.txt +137 -0
- package/template/.agents/skills/yss-mvc-scaffold-generator/references/history/generate_project.test.mjs.txt +341 -0
- package/template/.agents/skills/yss-mvc-scaffold-generator/references/history/skill.md +87 -0
- package/template/.agents/skills/yss-mvc-scaffold-generator/scripts/generate_project.mjs +2 -135
- package/template/.agents/skills/yss-mvc-scaffold-generator/scripts/generate_project.test.mjs +4 -332
- package/template/.agents/skills/yss-mvc-scaffold-generator/scripts/lib/envelope.mjs +11 -3
- package/template/.agents/skills/yss-mvc-scaffold-generator/scripts/lib/envelope.test.mjs +36 -0
- package/template/.agents/skills/yss-mybatis/SKILL.md +2 -2
- package/template/.agents/skills/yss-product-lifecycle/SKILL.md +31 -7
- package/template/.agents/skills/yss-product-lifecycle/references/artifact-dependencies.md +3 -0
- package/template/.agents/skills/yss-product-lifecycle/references/matt-yss-adapter.md +4 -6
- package/template/.agents/skills/yss-product-lifecycle/references/orchestration-contract.yaml +119 -46
- package/template/.agents/skills/yss-product-lifecycle/references/orchestration.md +9 -3
- package/template/.agents/skills/yss-product-lifecycle/references/state-model.md +7 -2
- package/template/.agents/skills/yss-product-lifecycle/references/user-decisions.md +56 -0
- package/template/.agents/skills/yss-prototype-stage/SKILL.md +9 -8
- package/template/.agents/skills/yss-prototype-stage/references/product-design-adapter.md +33 -10
- package/template/.agents/skills/yss-prototype-stage/references/prototype-profile-routing.md +10 -8
- package/template/.agents/skills/yss-prototype-stage/scripts/prototype-contract.mjs +129 -22
- package/template/.agents/skills/yss-prototype-stage/scripts/visual-baseline-contract.mjs +314 -0
- package/template/.agents/skills/yss-prototype-stage/tests/run-scenarios.mjs +96 -17
- package/template/.agents/skills/yss-repository/SKILL.md +6 -0
- package/template/.agents/skills/yss-repository/references/profiles/layered-mvc-service.md +3 -0
- package/template/.agents/skills/yss-repository/references/profiles/mvc-data-analysis-v1.md +3 -0
- package/template/.agents/skills/yss-repository/references/profiles/target-domain-model.md +3 -0
- package/template/.agents/skills/yss-skill-source-index-refresh/references/source-map-config.md +0 -1
- package/template/.agents/skills/yss-skill-source-index-refresh/scripts/refresh-yss-skill-index.mjs +1 -1
- package/template/.agents/skills/yss-stage-decision/SKILL.md +16 -12
- package/template/.agents/skills/yss-stage-decision/references/domain-strategy-contract.md +16 -10
- package/template/.agents/skills/yss-stage-decision/references/domain-strategy.schema.json +23 -5
- package/template/.agents/skills/yss-stage-decision/references/stage-decision-package-contract.md +5 -2
- package/template/.agents/skills/yss-stage-decision/references/stage-decision-package.schema.json +16 -4
- package/template/.agents/skills/yss-stage-decision/references/validation-rules.md +1 -1
- package/template/.agents/skills/yss-stage-decision/scripts/migrate-context-references.mjs +62 -0
- package/template/.agents/skills/yss-stage-decision/scripts/validate-domain-strategy.mjs +18 -7
- package/template/.agents/skills/yss-stage-decision/scripts/validate-stage-decision-package.mjs +20 -9
- package/template/.agents/skills/yss-stage-decision/tests/fixtures/domain-strategy-approval.yaml +1 -1
- package/template/.agents/skills/yss-stage-decision/tests/fixtures/stage-decision-approval.yaml +1 -1
- package/template/.agents/skills/yss-stage-decision/tests/fixtures/valid-stage-decision-package.yaml +12 -7
- package/template/.agents/skills/yss-stage-decision/tests/fixtures/valid-supplier-domain.yaml +9 -4
- package/template/.agents/skills/yss-stage-decision/tests/run-scenarios.mjs +134 -56
- package/template/.agents/skills/yss-tactical-design/SKILL.md +8 -2
- package/template/.agents/skills/yss-tactical-design/references/output-template.md +3 -0
- package/template/.agents/skills/yss-tactical-design/references/tactical-design-contract.md +3 -1
- package/template/.agents/skills/yss-tactical-design/scripts/validate-tactical-design.mjs +10 -2
- package/template/.agents/skills/yss-ui/SKILL.md +1 -2
- package/template/.agents/skills/yss-ui-business-page-generation/SKILL.md +3 -3
- package/template/.agents/skills/yss-validation/SKILL.md +1 -0
- package/template/.agents/skills/yss-web-controller/SKILL.md +6 -0
- package/template/.agents/skills/yss-web-controller/references/profiles/layered-mvc-service.md +3 -0
- package/template/.agents/skills/yss-web-controller/references/profiles/mvc-data-analysis-v1.md +3 -0
- package/template/.agents/skills/yss-web-controller/references/profiles/target-domain-model.md +3 -0
- package/template/.agents/skills/yss-web-controller/references/web-generation-contract.schema.json +3 -2
- package/template/.agents/skills/yss-web-controller/scripts/generate_controller.mjs +27 -10
- package/template/.agents/skills/yss-web-controller/scripts/generate_controller.test.mjs +29 -1
- package/template/.claude/skills/alibaba-java-code-style/SKILL.md +1 -0
- package/template/.claude/skills/code-review/references/yss-review-standards.md +1 -1
- package/template/.claude/skills/domain-modeling/CONTEXT-FORMAT.md +37 -42
- package/template/.claude/skills/domain-modeling/SKILL.md +10 -26
- package/template/.claude/skills/grill-with-docs/SKILL.md +6 -5
- package/template/.claude/skills/lombok/SKILL.md +2 -1
- package/template/.claude/skills/mapstruct/SKILL.md +3 -2
- package/template/.claude/skills/setup-matt-pocock-skills/SKILL.md +5 -6
- package/template/.claude/skills/setup-matt-pocock-skills/domain.md +6 -20
- package/template/.claude/skills/wait-what/SKILL.md +1 -1
- package/template/.claude/skills/yss-antdv-next-design/SKILL.md +48 -0
- package/template/.claude/skills/yss-antdv-next-design/references/boundaries.md +25 -0
- package/template/.claude/skills/yss-antdv-next-design/references/cli-matrix.md +34 -0
- package/template/.claude/skills/yss-antdv-next-design/references/fact-pack.md +38 -0
- package/template/.claude/skills/yss-antdv-next-design/scripts/collect-antdv-next-facts.mjs +213 -0
- package/template/.claude/skills/yss-antdv-next-design/scripts/validate-fact-pack.mjs +168 -0
- package/template/.claude/skills/yss-antdv-next-design/tests/run-scenarios.mjs +139 -0
- package/template/.claude/skills/yss-application/SKILL.md +6 -0
- package/template/.claude/skills/yss-application/references/profiles/layered-mvc-service.md +3 -0
- package/template/.claude/skills/yss-application/references/profiles/mvc-data-analysis-v1.md +3 -0
- package/template/.claude/skills/yss-application/references/profiles/target-domain-model.md +3 -0
- package/template/.claude/skills/yss-components/SKILL.md +1 -1
- package/template/.claude/skills/yss-ddd-scaffold-generator/SKILL.md +3 -4
- package/template/.claude/skills/yss-ddd-scaffold-generator/assets/templates/config/application.yml.template +0 -13
- package/template/.claude/skills/yss-ddd-scaffold-generator/assets/templates/pom/bootstrap-pom.xml.template +13 -0
- package/template/.claude/skills/yss-ddd-scaffold-generator/references/USAGE_EXAMPLES.md +13 -4
- package/template/.claude/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-parent/SKILL.md +1 -1
- package/template/.claude/skills/yss-ddd-scaffold-generator/scripts/first-slice-compatibility.test.mjs +21 -7
- package/template/.claude/skills/yss-ddd-scaffold-generator/scripts/generate_scaffold.mjs +37 -15
- package/template/.claude/skills/yss-ddd-scaffold-generator/scripts/run_first_slice_verification.mjs +22 -10
- package/template/.claude/skills/yss-ddd-scaffold-generator/scripts/run_scaffold_verification.mjs +14 -2
- package/template/.claude/skills/yss-ddd-scaffold-generator/scripts/scaffold-generator.test.mjs +41 -12
- package/template/.claude/skills/yss-design-system/SKILL.md +25 -22
- package/template/.claude/skills/yss-design-system/references/design-qa-theme.md +22 -24
- package/template/.claude/skills/yss-design-system/references/design-system.md +39 -56
- package/template/.claude/skills/yss-domain/SKILL.md +1 -1
- package/template/.claude/skills/yss-dto/SKILL.md +1 -0
- package/template/.claude/skills/yss-exception/SKILL.md +1 -0
- package/template/.claude/skills/yss-frontend-scaffold-generator/SKILL.md +1 -1
- package/template/.claude/skills/yss-implementation-contract-compiler/SKILL.md +8 -2
- package/template/.claude/skills/yss-implementation-contract-compiler/references/boundaries.md +16 -8
- package/template/.claude/skills/yss-implementation-contract-compiler/references/compiler-contract.yaml +72 -19
- package/template/.claude/skills/yss-implementation-contract-compiler/references/slice-implementation-contract.md +5 -1
- package/template/.claude/skills/yss-implementation-contract-compiler/references/yss-skill-execution-result.md +2 -0
- package/template/.claude/skills/yss-implementation-contract-compiler/tests/backend-profiles.test.mjs +45 -0
- package/template/.claude/skills/yss-implementation-contract-compiler/tests/compiler-scenarios.test.mjs +8 -6
- package/template/.claude/skills/yss-layered-mvc-scaffold-generator/SKILL.md +64 -0
- package/template/.claude/skills/yss-layered-mvc-scaffold-generator/agents/openai.yaml +4 -0
- package/template/.claude/skills/yss-layered-mvc-scaffold-generator/references/architecture.md +29 -0
- package/template/.claude/skills/yss-layered-mvc-scaffold-generator/scripts/generate_and_verify_scaffold.mjs +61 -0
- package/template/.claude/skills/yss-layered-mvc-scaffold-generator/scripts/generate_scaffold.mjs +315 -0
- package/template/.claude/skills/yss-layered-mvc-scaffold-generator/scripts/run_scaffold_verification.mjs +30 -0
- package/template/.claude/skills/yss-layered-mvc-scaffold-generator/scripts/scaffold-generator.test.mjs +159 -0
- package/template/.claude/skills/yss-mvc-data-analysis-project-initializer/SKILL.md +22 -0
- package/template/.claude/skills/yss-mvc-data-analysis-project-initializer/scripts/generate_project.mjs +77 -0
- package/template/.claude/skills/yss-mvc-data-analysis-project-initializer/scripts/run_scaffold_verification.mjs +9 -0
- package/template/.claude/skills/yss-mvc-scaffold-generator/SKILL.md +3 -82
- package/template/.claude/skills/yss-mvc-scaffold-generator/references/history/generate_project.mjs.txt +137 -0
- package/template/.claude/skills/yss-mvc-scaffold-generator/references/history/generate_project.test.mjs.txt +341 -0
- package/template/.claude/skills/yss-mvc-scaffold-generator/references/history/skill.md +87 -0
- package/template/.claude/skills/yss-mvc-scaffold-generator/scripts/generate_project.mjs +2 -135
- package/template/.claude/skills/yss-mvc-scaffold-generator/scripts/generate_project.test.mjs +4 -332
- package/template/.claude/skills/yss-mvc-scaffold-generator/scripts/lib/envelope.mjs +11 -3
- package/template/.claude/skills/yss-mvc-scaffold-generator/scripts/lib/envelope.test.mjs +36 -0
- package/template/.claude/skills/yss-mybatis/SKILL.md +2 -2
- package/template/.claude/skills/yss-product-lifecycle/SKILL.md +31 -7
- package/template/.claude/skills/yss-product-lifecycle/references/artifact-dependencies.md +3 -0
- package/template/.claude/skills/yss-product-lifecycle/references/matt-yss-adapter.md +4 -6
- package/template/.claude/skills/yss-product-lifecycle/references/orchestration-contract.yaml +119 -46
- package/template/.claude/skills/yss-product-lifecycle/references/orchestration.md +9 -3
- package/template/.claude/skills/yss-product-lifecycle/references/state-model.md +7 -2
- package/template/.claude/skills/yss-product-lifecycle/references/user-decisions.md +56 -0
- package/template/.claude/skills/yss-prototype-stage/SKILL.md +9 -8
- package/template/.claude/skills/yss-prototype-stage/references/product-design-adapter.md +33 -10
- package/template/.claude/skills/yss-prototype-stage/references/prototype-profile-routing.md +10 -8
- package/template/.claude/skills/yss-prototype-stage/scripts/prototype-contract.mjs +129 -22
- package/template/.claude/skills/yss-prototype-stage/scripts/visual-baseline-contract.mjs +314 -0
- package/template/.claude/skills/yss-prototype-stage/tests/run-scenarios.mjs +96 -17
- package/template/.claude/skills/yss-repository/SKILL.md +6 -0
- package/template/.claude/skills/yss-repository/references/profiles/layered-mvc-service.md +3 -0
- package/template/.claude/skills/yss-repository/references/profiles/mvc-data-analysis-v1.md +3 -0
- package/template/.claude/skills/yss-repository/references/profiles/target-domain-model.md +3 -0
- package/template/.claude/skills/yss-skill-source-index-refresh/references/source-map-config.md +0 -1
- package/template/.claude/skills/yss-skill-source-index-refresh/scripts/refresh-yss-skill-index.mjs +1 -1
- package/template/.claude/skills/yss-stage-decision/SKILL.md +16 -12
- package/template/.claude/skills/yss-stage-decision/references/domain-strategy-contract.md +16 -10
- package/template/.claude/skills/yss-stage-decision/references/domain-strategy.schema.json +23 -5
- package/template/.claude/skills/yss-stage-decision/references/stage-decision-package-contract.md +5 -2
- package/template/.claude/skills/yss-stage-decision/references/stage-decision-package.schema.json +16 -4
- package/template/.claude/skills/yss-stage-decision/references/validation-rules.md +1 -1
- package/template/.claude/skills/yss-stage-decision/scripts/migrate-context-references.mjs +62 -0
- package/template/.claude/skills/yss-stage-decision/scripts/validate-domain-strategy.mjs +18 -7
- package/template/.claude/skills/yss-stage-decision/scripts/validate-stage-decision-package.mjs +20 -9
- package/template/.claude/skills/yss-stage-decision/tests/fixtures/domain-strategy-approval.yaml +1 -1
- package/template/.claude/skills/yss-stage-decision/tests/fixtures/stage-decision-approval.yaml +1 -1
- package/template/.claude/skills/yss-stage-decision/tests/fixtures/valid-stage-decision-package.yaml +12 -7
- package/template/.claude/skills/yss-stage-decision/tests/fixtures/valid-supplier-domain.yaml +9 -4
- package/template/.claude/skills/yss-stage-decision/tests/run-scenarios.mjs +134 -56
- package/template/.claude/skills/yss-tactical-design/SKILL.md +8 -2
- package/template/.claude/skills/yss-tactical-design/references/output-template.md +3 -0
- package/template/.claude/skills/yss-tactical-design/references/tactical-design-contract.md +3 -1
- package/template/.claude/skills/yss-tactical-design/scripts/validate-tactical-design.mjs +10 -2
- package/template/.claude/skills/yss-ui/SKILL.md +1 -2
- package/template/.claude/skills/yss-ui-business-page-generation/SKILL.md +3 -3
- package/template/.claude/skills/yss-validation/SKILL.md +1 -0
- package/template/.claude/skills/yss-web-controller/SKILL.md +6 -0
- package/template/.claude/skills/yss-web-controller/references/profiles/layered-mvc-service.md +3 -0
- package/template/.claude/skills/yss-web-controller/references/profiles/mvc-data-analysis-v1.md +3 -0
- package/template/.claude/skills/yss-web-controller/references/profiles/target-domain-model.md +3 -0
- package/template/.claude/skills/yss-web-controller/references/web-generation-contract.schema.json +3 -2
- package/template/.claude/skills/yss-web-controller/scripts/generate_controller.mjs +27 -10
- package/template/.claude/skills/yss-web-controller/scripts/generate_controller.test.mjs +29 -1
- package/template/.codex/skills/alibaba-java-code-style/SKILL.md +1 -0
- package/template/.codex/skills/code-review/references/yss-review-standards.md +1 -1
- package/template/.codex/skills/domain-modeling/CONTEXT-FORMAT.md +37 -42
- package/template/.codex/skills/domain-modeling/SKILL.md +10 -26
- package/template/.codex/skills/grill-with-docs/SKILL.md +6 -5
- package/template/.codex/skills/lombok/SKILL.md +2 -1
- package/template/.codex/skills/mapstruct/SKILL.md +3 -2
- package/template/.codex/skills/setup-matt-pocock-skills/SKILL.md +5 -6
- package/template/.codex/skills/setup-matt-pocock-skills/domain.md +6 -20
- package/template/.codex/skills/wait-what/SKILL.md +1 -1
- package/template/.codex/skills/yss-antdv-next-design/SKILL.md +48 -0
- package/template/.codex/skills/yss-antdv-next-design/references/boundaries.md +25 -0
- package/template/.codex/skills/yss-antdv-next-design/references/cli-matrix.md +34 -0
- package/template/.codex/skills/yss-antdv-next-design/references/fact-pack.md +38 -0
- package/template/.codex/skills/yss-antdv-next-design/scripts/collect-antdv-next-facts.mjs +213 -0
- package/template/.codex/skills/yss-antdv-next-design/scripts/validate-fact-pack.mjs +168 -0
- package/template/.codex/skills/yss-antdv-next-design/tests/run-scenarios.mjs +139 -0
- package/template/.codex/skills/yss-application/SKILL.md +6 -0
- package/template/.codex/skills/yss-application/references/profiles/layered-mvc-service.md +3 -0
- package/template/.codex/skills/yss-application/references/profiles/mvc-data-analysis-v1.md +3 -0
- package/template/.codex/skills/yss-application/references/profiles/target-domain-model.md +3 -0
- package/template/.codex/skills/yss-components/SKILL.md +1 -1
- package/template/.codex/skills/yss-ddd-scaffold-generator/SKILL.md +3 -4
- package/template/.codex/skills/yss-ddd-scaffold-generator/assets/templates/config/application.yml.template +0 -13
- package/template/.codex/skills/yss-ddd-scaffold-generator/assets/templates/pom/bootstrap-pom.xml.template +13 -0
- package/template/.codex/skills/yss-ddd-scaffold-generator/references/USAGE_EXAMPLES.md +13 -4
- package/template/.codex/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-parent/SKILL.md +1 -1
- package/template/.codex/skills/yss-ddd-scaffold-generator/scripts/first-slice-compatibility.test.mjs +21 -7
- package/template/.codex/skills/yss-ddd-scaffold-generator/scripts/generate_scaffold.mjs +37 -15
- package/template/.codex/skills/yss-ddd-scaffold-generator/scripts/run_first_slice_verification.mjs +22 -10
- package/template/.codex/skills/yss-ddd-scaffold-generator/scripts/run_scaffold_verification.mjs +14 -2
- package/template/.codex/skills/yss-ddd-scaffold-generator/scripts/scaffold-generator.test.mjs +41 -12
- package/template/.codex/skills/yss-design-system/SKILL.md +25 -22
- package/template/.codex/skills/yss-design-system/references/design-qa-theme.md +22 -24
- package/template/.codex/skills/yss-design-system/references/design-system.md +39 -56
- package/template/.codex/skills/yss-domain/SKILL.md +1 -1
- package/template/.codex/skills/yss-dto/SKILL.md +1 -0
- package/template/.codex/skills/yss-exception/SKILL.md +1 -0
- package/template/.codex/skills/yss-frontend-scaffold-generator/SKILL.md +1 -1
- package/template/.codex/skills/yss-implementation-contract-compiler/SKILL.md +8 -2
- package/template/.codex/skills/yss-implementation-contract-compiler/references/boundaries.md +16 -8
- package/template/.codex/skills/yss-implementation-contract-compiler/references/compiler-contract.yaml +72 -19
- package/template/.codex/skills/yss-implementation-contract-compiler/references/slice-implementation-contract.md +5 -1
- package/template/.codex/skills/yss-implementation-contract-compiler/references/yss-skill-execution-result.md +2 -0
- package/template/.codex/skills/yss-implementation-contract-compiler/tests/backend-profiles.test.mjs +45 -0
- package/template/.codex/skills/yss-implementation-contract-compiler/tests/compiler-scenarios.test.mjs +8 -6
- package/template/.codex/skills/yss-layered-mvc-scaffold-generator/SKILL.md +64 -0
- package/template/.codex/skills/yss-layered-mvc-scaffold-generator/agents/openai.yaml +4 -0
- package/template/.codex/skills/yss-layered-mvc-scaffold-generator/references/architecture.md +29 -0
- package/template/.codex/skills/yss-layered-mvc-scaffold-generator/scripts/generate_and_verify_scaffold.mjs +61 -0
- package/template/.codex/skills/yss-layered-mvc-scaffold-generator/scripts/generate_scaffold.mjs +315 -0
- package/template/.codex/skills/yss-layered-mvc-scaffold-generator/scripts/run_scaffold_verification.mjs +30 -0
- package/template/.codex/skills/yss-layered-mvc-scaffold-generator/scripts/scaffold-generator.test.mjs +159 -0
- package/template/.codex/skills/yss-mvc-data-analysis-project-initializer/SKILL.md +22 -0
- package/template/.codex/skills/yss-mvc-data-analysis-project-initializer/scripts/generate_project.mjs +77 -0
- package/template/.codex/skills/yss-mvc-data-analysis-project-initializer/scripts/run_scaffold_verification.mjs +9 -0
- package/template/.codex/skills/yss-mvc-scaffold-generator/SKILL.md +3 -82
- package/template/.codex/skills/yss-mvc-scaffold-generator/references/history/generate_project.mjs.txt +137 -0
- package/template/.codex/skills/yss-mvc-scaffold-generator/references/history/generate_project.test.mjs.txt +341 -0
- package/template/.codex/skills/yss-mvc-scaffold-generator/references/history/skill.md +87 -0
- package/template/.codex/skills/yss-mvc-scaffold-generator/scripts/generate_project.mjs +2 -135
- package/template/.codex/skills/yss-mvc-scaffold-generator/scripts/generate_project.test.mjs +4 -332
- package/template/.codex/skills/yss-mvc-scaffold-generator/scripts/lib/envelope.mjs +11 -3
- package/template/.codex/skills/yss-mvc-scaffold-generator/scripts/lib/envelope.test.mjs +36 -0
- package/template/.codex/skills/yss-mybatis/SKILL.md +2 -2
- package/template/.codex/skills/yss-product-lifecycle/SKILL.md +31 -7
- package/template/.codex/skills/yss-product-lifecycle/references/artifact-dependencies.md +3 -0
- package/template/.codex/skills/yss-product-lifecycle/references/matt-yss-adapter.md +4 -6
- package/template/.codex/skills/yss-product-lifecycle/references/orchestration-contract.yaml +119 -46
- package/template/.codex/skills/yss-product-lifecycle/references/orchestration.md +9 -3
- package/template/.codex/skills/yss-product-lifecycle/references/state-model.md +7 -2
- package/template/.codex/skills/yss-product-lifecycle/references/user-decisions.md +56 -0
- package/template/.codex/skills/yss-prototype-stage/SKILL.md +9 -8
- package/template/.codex/skills/yss-prototype-stage/references/product-design-adapter.md +33 -10
- package/template/.codex/skills/yss-prototype-stage/references/prototype-profile-routing.md +10 -8
- package/template/.codex/skills/yss-prototype-stage/scripts/prototype-contract.mjs +129 -22
- package/template/.codex/skills/yss-prototype-stage/scripts/visual-baseline-contract.mjs +314 -0
- package/template/.codex/skills/yss-prototype-stage/tests/run-scenarios.mjs +96 -17
- package/template/.codex/skills/yss-repository/SKILL.md +6 -0
- package/template/.codex/skills/yss-repository/references/profiles/layered-mvc-service.md +3 -0
- package/template/.codex/skills/yss-repository/references/profiles/mvc-data-analysis-v1.md +3 -0
- package/template/.codex/skills/yss-repository/references/profiles/target-domain-model.md +3 -0
- package/template/.codex/skills/yss-skill-source-index-refresh/references/source-map-config.md +0 -1
- package/template/.codex/skills/yss-skill-source-index-refresh/scripts/refresh-yss-skill-index.mjs +1 -1
- package/template/.codex/skills/yss-stage-decision/SKILL.md +16 -12
- package/template/.codex/skills/yss-stage-decision/references/domain-strategy-contract.md +16 -10
- package/template/.codex/skills/yss-stage-decision/references/domain-strategy.schema.json +23 -5
- package/template/.codex/skills/yss-stage-decision/references/stage-decision-package-contract.md +5 -2
- package/template/.codex/skills/yss-stage-decision/references/stage-decision-package.schema.json +16 -4
- package/template/.codex/skills/yss-stage-decision/references/validation-rules.md +1 -1
- package/template/.codex/skills/yss-stage-decision/scripts/migrate-context-references.mjs +62 -0
- package/template/.codex/skills/yss-stage-decision/scripts/validate-domain-strategy.mjs +18 -7
- package/template/.codex/skills/yss-stage-decision/scripts/validate-stage-decision-package.mjs +20 -9
- package/template/.codex/skills/yss-stage-decision/tests/fixtures/domain-strategy-approval.yaml +1 -1
- package/template/.codex/skills/yss-stage-decision/tests/fixtures/stage-decision-approval.yaml +1 -1
- package/template/.codex/skills/yss-stage-decision/tests/fixtures/valid-stage-decision-package.yaml +12 -7
- package/template/.codex/skills/yss-stage-decision/tests/fixtures/valid-supplier-domain.yaml +9 -4
- package/template/.codex/skills/yss-stage-decision/tests/run-scenarios.mjs +134 -56
- package/template/.codex/skills/yss-tactical-design/SKILL.md +8 -2
- package/template/.codex/skills/yss-tactical-design/references/output-template.md +3 -0
- package/template/.codex/skills/yss-tactical-design/references/tactical-design-contract.md +3 -1
- package/template/.codex/skills/yss-tactical-design/scripts/validate-tactical-design.mjs +10 -2
- package/template/.codex/skills/yss-ui/SKILL.md +1 -2
- package/template/.codex/skills/yss-ui-business-page-generation/SKILL.md +3 -3
- package/template/.codex/skills/yss-validation/SKILL.md +1 -0
- package/template/.codex/skills/yss-web-controller/SKILL.md +6 -0
- package/template/.codex/skills/yss-web-controller/references/profiles/layered-mvc-service.md +3 -0
- package/template/.codex/skills/yss-web-controller/references/profiles/mvc-data-analysis-v1.md +3 -0
- package/template/.codex/skills/yss-web-controller/references/profiles/target-domain-model.md +3 -0
- package/template/.codex/skills/yss-web-controller/references/web-generation-contract.schema.json +3 -2
- package/template/.codex/skills/yss-web-controller/scripts/generate_controller.mjs +27 -10
- package/template/.codex/skills/yss-web-controller/scripts/generate_controller.test.mjs +29 -1
- package/template/.cursor/skills/alibaba-java-code-style/SKILL.md +1 -0
- package/template/.cursor/skills/code-review/references/yss-review-standards.md +1 -1
- package/template/.cursor/skills/domain-modeling/CONTEXT-FORMAT.md +37 -42
- package/template/.cursor/skills/domain-modeling/SKILL.md +10 -26
- package/template/.cursor/skills/grill-with-docs/SKILL.md +6 -5
- package/template/.cursor/skills/lombok/SKILL.md +2 -1
- package/template/.cursor/skills/mapstruct/SKILL.md +3 -2
- package/template/.cursor/skills/setup-matt-pocock-skills/SKILL.md +5 -6
- package/template/.cursor/skills/setup-matt-pocock-skills/domain.md +6 -20
- package/template/.cursor/skills/wait-what/SKILL.md +1 -1
- package/template/.cursor/skills/yss-antdv-next-design/SKILL.md +48 -0
- package/template/.cursor/skills/yss-antdv-next-design/references/boundaries.md +25 -0
- package/template/.cursor/skills/yss-antdv-next-design/references/cli-matrix.md +34 -0
- package/template/.cursor/skills/yss-antdv-next-design/references/fact-pack.md +38 -0
- package/template/.cursor/skills/yss-antdv-next-design/scripts/collect-antdv-next-facts.mjs +213 -0
- package/template/.cursor/skills/yss-antdv-next-design/scripts/validate-fact-pack.mjs +168 -0
- package/template/.cursor/skills/yss-antdv-next-design/tests/run-scenarios.mjs +139 -0
- package/template/.cursor/skills/yss-application/SKILL.md +6 -0
- package/template/.cursor/skills/yss-application/references/profiles/layered-mvc-service.md +3 -0
- package/template/.cursor/skills/yss-application/references/profiles/mvc-data-analysis-v1.md +3 -0
- package/template/.cursor/skills/yss-application/references/profiles/target-domain-model.md +3 -0
- package/template/.cursor/skills/yss-components/SKILL.md +1 -1
- package/template/.cursor/skills/yss-ddd-scaffold-generator/SKILL.md +3 -4
- package/template/.cursor/skills/yss-ddd-scaffold-generator/assets/templates/config/application.yml.template +0 -13
- package/template/.cursor/skills/yss-ddd-scaffold-generator/assets/templates/pom/bootstrap-pom.xml.template +13 -0
- package/template/.cursor/skills/yss-ddd-scaffold-generator/references/USAGE_EXAMPLES.md +13 -4
- package/template/.cursor/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-parent/SKILL.md +1 -1
- package/template/.cursor/skills/yss-ddd-scaffold-generator/scripts/first-slice-compatibility.test.mjs +21 -7
- package/template/.cursor/skills/yss-ddd-scaffold-generator/scripts/generate_scaffold.mjs +37 -15
- package/template/.cursor/skills/yss-ddd-scaffold-generator/scripts/run_first_slice_verification.mjs +22 -10
- package/template/.cursor/skills/yss-ddd-scaffold-generator/scripts/run_scaffold_verification.mjs +14 -2
- package/template/.cursor/skills/yss-ddd-scaffold-generator/scripts/scaffold-generator.test.mjs +41 -12
- package/template/.cursor/skills/yss-design-system/SKILL.md +25 -22
- package/template/.cursor/skills/yss-design-system/references/design-qa-theme.md +22 -24
- package/template/.cursor/skills/yss-design-system/references/design-system.md +39 -56
- package/template/.cursor/skills/yss-domain/SKILL.md +1 -1
- package/template/.cursor/skills/yss-dto/SKILL.md +1 -0
- package/template/.cursor/skills/yss-exception/SKILL.md +1 -0
- package/template/.cursor/skills/yss-frontend-scaffold-generator/SKILL.md +1 -1
- package/template/.cursor/skills/yss-implementation-contract-compiler/SKILL.md +8 -2
- package/template/.cursor/skills/yss-implementation-contract-compiler/references/boundaries.md +16 -8
- package/template/.cursor/skills/yss-implementation-contract-compiler/references/compiler-contract.yaml +72 -19
- package/template/.cursor/skills/yss-implementation-contract-compiler/references/slice-implementation-contract.md +5 -1
- package/template/.cursor/skills/yss-implementation-contract-compiler/references/yss-skill-execution-result.md +2 -0
- package/template/.cursor/skills/yss-implementation-contract-compiler/tests/backend-profiles.test.mjs +45 -0
- package/template/.cursor/skills/yss-implementation-contract-compiler/tests/compiler-scenarios.test.mjs +8 -6
- package/template/.cursor/skills/yss-layered-mvc-scaffold-generator/SKILL.md +64 -0
- package/template/.cursor/skills/yss-layered-mvc-scaffold-generator/agents/openai.yaml +4 -0
- package/template/.cursor/skills/yss-layered-mvc-scaffold-generator/references/architecture.md +29 -0
- package/template/.cursor/skills/yss-layered-mvc-scaffold-generator/scripts/generate_and_verify_scaffold.mjs +61 -0
- package/template/.cursor/skills/yss-layered-mvc-scaffold-generator/scripts/generate_scaffold.mjs +315 -0
- package/template/.cursor/skills/yss-layered-mvc-scaffold-generator/scripts/run_scaffold_verification.mjs +30 -0
- package/template/.cursor/skills/yss-layered-mvc-scaffold-generator/scripts/scaffold-generator.test.mjs +159 -0
- package/template/.cursor/skills/yss-mvc-data-analysis-project-initializer/SKILL.md +22 -0
- package/template/.cursor/skills/yss-mvc-data-analysis-project-initializer/scripts/generate_project.mjs +77 -0
- package/template/.cursor/skills/yss-mvc-data-analysis-project-initializer/scripts/run_scaffold_verification.mjs +9 -0
- package/template/.cursor/skills/yss-mvc-scaffold-generator/SKILL.md +3 -82
- package/template/.cursor/skills/yss-mvc-scaffold-generator/references/history/generate_project.mjs.txt +137 -0
- package/template/.cursor/skills/yss-mvc-scaffold-generator/references/history/generate_project.test.mjs.txt +341 -0
- package/template/.cursor/skills/yss-mvc-scaffold-generator/references/history/skill.md +87 -0
- package/template/.cursor/skills/yss-mvc-scaffold-generator/scripts/generate_project.mjs +2 -135
- package/template/.cursor/skills/yss-mvc-scaffold-generator/scripts/generate_project.test.mjs +4 -332
- package/template/.cursor/skills/yss-mvc-scaffold-generator/scripts/lib/envelope.mjs +11 -3
- package/template/.cursor/skills/yss-mvc-scaffold-generator/scripts/lib/envelope.test.mjs +36 -0
- package/template/.cursor/skills/yss-mybatis/SKILL.md +2 -2
- package/template/.cursor/skills/yss-product-lifecycle/SKILL.md +31 -7
- package/template/.cursor/skills/yss-product-lifecycle/references/artifact-dependencies.md +3 -0
- package/template/.cursor/skills/yss-product-lifecycle/references/matt-yss-adapter.md +4 -6
- package/template/.cursor/skills/yss-product-lifecycle/references/orchestration-contract.yaml +119 -46
- package/template/.cursor/skills/yss-product-lifecycle/references/orchestration.md +9 -3
- package/template/.cursor/skills/yss-product-lifecycle/references/state-model.md +7 -2
- package/template/.cursor/skills/yss-product-lifecycle/references/user-decisions.md +56 -0
- package/template/.cursor/skills/yss-prototype-stage/SKILL.md +9 -8
- package/template/.cursor/skills/yss-prototype-stage/references/product-design-adapter.md +33 -10
- package/template/.cursor/skills/yss-prototype-stage/references/prototype-profile-routing.md +10 -8
- package/template/.cursor/skills/yss-prototype-stage/scripts/prototype-contract.mjs +129 -22
- package/template/.cursor/skills/yss-prototype-stage/scripts/visual-baseline-contract.mjs +314 -0
- package/template/.cursor/skills/yss-prototype-stage/tests/run-scenarios.mjs +96 -17
- package/template/.cursor/skills/yss-repository/SKILL.md +6 -0
- package/template/.cursor/skills/yss-repository/references/profiles/layered-mvc-service.md +3 -0
- package/template/.cursor/skills/yss-repository/references/profiles/mvc-data-analysis-v1.md +3 -0
- package/template/.cursor/skills/yss-repository/references/profiles/target-domain-model.md +3 -0
- package/template/.cursor/skills/yss-skill-source-index-refresh/references/source-map-config.md +0 -1
- package/template/.cursor/skills/yss-skill-source-index-refresh/scripts/refresh-yss-skill-index.mjs +1 -1
- package/template/.cursor/skills/yss-stage-decision/SKILL.md +16 -12
- package/template/.cursor/skills/yss-stage-decision/references/domain-strategy-contract.md +16 -10
- package/template/.cursor/skills/yss-stage-decision/references/domain-strategy.schema.json +23 -5
- package/template/.cursor/skills/yss-stage-decision/references/stage-decision-package-contract.md +5 -2
- package/template/.cursor/skills/yss-stage-decision/references/stage-decision-package.schema.json +16 -4
- package/template/.cursor/skills/yss-stage-decision/references/validation-rules.md +1 -1
- package/template/.cursor/skills/yss-stage-decision/scripts/migrate-context-references.mjs +62 -0
- package/template/.cursor/skills/yss-stage-decision/scripts/validate-domain-strategy.mjs +18 -7
- package/template/.cursor/skills/yss-stage-decision/scripts/validate-stage-decision-package.mjs +20 -9
- package/template/.cursor/skills/yss-stage-decision/tests/fixtures/domain-strategy-approval.yaml +1 -1
- package/template/.cursor/skills/yss-stage-decision/tests/fixtures/stage-decision-approval.yaml +1 -1
- package/template/.cursor/skills/yss-stage-decision/tests/fixtures/valid-stage-decision-package.yaml +12 -7
- package/template/.cursor/skills/yss-stage-decision/tests/fixtures/valid-supplier-domain.yaml +9 -4
- package/template/.cursor/skills/yss-stage-decision/tests/run-scenarios.mjs +134 -56
- package/template/.cursor/skills/yss-tactical-design/SKILL.md +8 -2
- package/template/.cursor/skills/yss-tactical-design/references/output-template.md +3 -0
- package/template/.cursor/skills/yss-tactical-design/references/tactical-design-contract.md +3 -1
- package/template/.cursor/skills/yss-tactical-design/scripts/validate-tactical-design.mjs +10 -2
- package/template/.cursor/skills/yss-ui/SKILL.md +1 -2
- package/template/.cursor/skills/yss-ui-business-page-generation/SKILL.md +3 -3
- package/template/.cursor/skills/yss-validation/SKILL.md +1 -0
- package/template/.cursor/skills/yss-web-controller/SKILL.md +6 -0
- package/template/.cursor/skills/yss-web-controller/references/profiles/layered-mvc-service.md +3 -0
- package/template/.cursor/skills/yss-web-controller/references/profiles/mvc-data-analysis-v1.md +3 -0
- package/template/.cursor/skills/yss-web-controller/references/profiles/target-domain-model.md +3 -0
- package/template/.cursor/skills/yss-web-controller/references/web-generation-contract.schema.json +3 -2
- package/template/.cursor/skills/yss-web-controller/scripts/generate_controller.mjs +27 -10
- package/template/.cursor/skills/yss-web-controller/scripts/generate_controller.test.mjs +29 -1
- package/template/.cursorrules +6 -34
- package/template/.pi/skills/alibaba-java-code-style/SKILL.md +1 -0
- package/template/.pi/skills/code-review/references/yss-review-standards.md +1 -1
- package/template/.pi/skills/domain-modeling/CONTEXT-FORMAT.md +37 -42
- package/template/.pi/skills/domain-modeling/SKILL.md +10 -26
- package/template/.pi/skills/grill-with-docs/SKILL.md +6 -5
- package/template/.pi/skills/lombok/SKILL.md +2 -1
- package/template/.pi/skills/mapstruct/SKILL.md +3 -2
- package/template/.pi/skills/setup-matt-pocock-skills/SKILL.md +5 -6
- package/template/.pi/skills/setup-matt-pocock-skills/domain.md +6 -20
- package/template/.pi/skills/wait-what/SKILL.md +1 -1
- package/template/.pi/skills/yss-antdv-next-design/SKILL.md +48 -0
- package/template/.pi/skills/yss-antdv-next-design/references/boundaries.md +25 -0
- package/template/.pi/skills/yss-antdv-next-design/references/cli-matrix.md +34 -0
- package/template/.pi/skills/yss-antdv-next-design/references/fact-pack.md +38 -0
- package/template/.pi/skills/yss-antdv-next-design/scripts/collect-antdv-next-facts.mjs +213 -0
- package/template/.pi/skills/yss-antdv-next-design/scripts/validate-fact-pack.mjs +168 -0
- package/template/.pi/skills/yss-antdv-next-design/tests/run-scenarios.mjs +139 -0
- package/template/.pi/skills/yss-application/SKILL.md +6 -0
- package/template/.pi/skills/yss-application/references/profiles/layered-mvc-service.md +3 -0
- package/template/.pi/skills/yss-application/references/profiles/mvc-data-analysis-v1.md +3 -0
- package/template/.pi/skills/yss-application/references/profiles/target-domain-model.md +3 -0
- package/template/.pi/skills/yss-components/SKILL.md +1 -1
- package/template/.pi/skills/yss-ddd-scaffold-generator/SKILL.md +3 -4
- package/template/.pi/skills/yss-ddd-scaffold-generator/assets/templates/config/application.yml.template +0 -13
- package/template/.pi/skills/yss-ddd-scaffold-generator/assets/templates/pom/bootstrap-pom.xml.template +13 -0
- package/template/.pi/skills/yss-ddd-scaffold-generator/references/USAGE_EXAMPLES.md +13 -4
- package/template/.pi/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-parent/SKILL.md +1 -1
- package/template/.pi/skills/yss-ddd-scaffold-generator/scripts/first-slice-compatibility.test.mjs +21 -7
- package/template/.pi/skills/yss-ddd-scaffold-generator/scripts/generate_scaffold.mjs +37 -15
- package/template/.pi/skills/yss-ddd-scaffold-generator/scripts/run_first_slice_verification.mjs +22 -10
- package/template/.pi/skills/yss-ddd-scaffold-generator/scripts/run_scaffold_verification.mjs +14 -2
- package/template/.pi/skills/yss-ddd-scaffold-generator/scripts/scaffold-generator.test.mjs +41 -12
- package/template/.pi/skills/yss-design-system/SKILL.md +25 -22
- package/template/.pi/skills/yss-design-system/references/design-qa-theme.md +22 -24
- package/template/.pi/skills/yss-design-system/references/design-system.md +39 -56
- package/template/.pi/skills/yss-domain/SKILL.md +1 -1
- package/template/.pi/skills/yss-dto/SKILL.md +1 -0
- package/template/.pi/skills/yss-exception/SKILL.md +1 -0
- package/template/.pi/skills/yss-frontend-scaffold-generator/SKILL.md +1 -1
- package/template/.pi/skills/yss-implementation-contract-compiler/SKILL.md +8 -2
- package/template/.pi/skills/yss-implementation-contract-compiler/references/boundaries.md +16 -8
- package/template/.pi/skills/yss-implementation-contract-compiler/references/compiler-contract.yaml +72 -19
- package/template/.pi/skills/yss-implementation-contract-compiler/references/slice-implementation-contract.md +5 -1
- package/template/.pi/skills/yss-implementation-contract-compiler/references/yss-skill-execution-result.md +2 -0
- package/template/.pi/skills/yss-implementation-contract-compiler/tests/backend-profiles.test.mjs +45 -0
- package/template/.pi/skills/yss-implementation-contract-compiler/tests/compiler-scenarios.test.mjs +8 -6
- package/template/.pi/skills/yss-layered-mvc-scaffold-generator/SKILL.md +64 -0
- package/template/.pi/skills/yss-layered-mvc-scaffold-generator/agents/openai.yaml +4 -0
- package/template/.pi/skills/yss-layered-mvc-scaffold-generator/references/architecture.md +29 -0
- package/template/.pi/skills/yss-layered-mvc-scaffold-generator/scripts/generate_and_verify_scaffold.mjs +61 -0
- package/template/.pi/skills/yss-layered-mvc-scaffold-generator/scripts/generate_scaffold.mjs +315 -0
- package/template/.pi/skills/yss-layered-mvc-scaffold-generator/scripts/run_scaffold_verification.mjs +30 -0
- package/template/.pi/skills/yss-layered-mvc-scaffold-generator/scripts/scaffold-generator.test.mjs +159 -0
- package/template/.pi/skills/yss-mvc-data-analysis-project-initializer/SKILL.md +22 -0
- package/template/.pi/skills/yss-mvc-data-analysis-project-initializer/scripts/generate_project.mjs +77 -0
- package/template/.pi/skills/yss-mvc-data-analysis-project-initializer/scripts/run_scaffold_verification.mjs +9 -0
- package/template/.pi/skills/yss-mvc-scaffold-generator/SKILL.md +3 -82
- package/template/.pi/skills/yss-mvc-scaffold-generator/references/history/generate_project.mjs.txt +137 -0
- package/template/.pi/skills/yss-mvc-scaffold-generator/references/history/generate_project.test.mjs.txt +341 -0
- package/template/.pi/skills/yss-mvc-scaffold-generator/references/history/skill.md +87 -0
- package/template/.pi/skills/yss-mvc-scaffold-generator/scripts/generate_project.mjs +2 -135
- package/template/.pi/skills/yss-mvc-scaffold-generator/scripts/generate_project.test.mjs +4 -332
- package/template/.pi/skills/yss-mvc-scaffold-generator/scripts/lib/envelope.mjs +11 -3
- package/template/.pi/skills/yss-mvc-scaffold-generator/scripts/lib/envelope.test.mjs +36 -0
- package/template/.pi/skills/yss-mybatis/SKILL.md +2 -2
- package/template/.pi/skills/yss-product-lifecycle/SKILL.md +31 -7
- package/template/.pi/skills/yss-product-lifecycle/references/artifact-dependencies.md +3 -0
- package/template/.pi/skills/yss-product-lifecycle/references/matt-yss-adapter.md +4 -6
- package/template/.pi/skills/yss-product-lifecycle/references/orchestration-contract.yaml +119 -46
- package/template/.pi/skills/yss-product-lifecycle/references/orchestration.md +9 -3
- package/template/.pi/skills/yss-product-lifecycle/references/state-model.md +7 -2
- package/template/.pi/skills/yss-product-lifecycle/references/user-decisions.md +56 -0
- package/template/.pi/skills/yss-prototype-stage/SKILL.md +9 -8
- package/template/.pi/skills/yss-prototype-stage/references/product-design-adapter.md +33 -10
- package/template/.pi/skills/yss-prototype-stage/references/prototype-profile-routing.md +10 -8
- package/template/.pi/skills/yss-prototype-stage/scripts/prototype-contract.mjs +129 -22
- package/template/.pi/skills/yss-prototype-stage/scripts/visual-baseline-contract.mjs +314 -0
- package/template/.pi/skills/yss-prototype-stage/tests/run-scenarios.mjs +96 -17
- package/template/.pi/skills/yss-repository/SKILL.md +6 -0
- package/template/.pi/skills/yss-repository/references/profiles/layered-mvc-service.md +3 -0
- package/template/.pi/skills/yss-repository/references/profiles/mvc-data-analysis-v1.md +3 -0
- package/template/.pi/skills/yss-repository/references/profiles/target-domain-model.md +3 -0
- package/template/.pi/skills/yss-skill-source-index-refresh/references/source-map-config.md +0 -1
- package/template/.pi/skills/yss-skill-source-index-refresh/scripts/refresh-yss-skill-index.mjs +1 -1
- package/template/.pi/skills/yss-stage-decision/SKILL.md +16 -12
- package/template/.pi/skills/yss-stage-decision/references/domain-strategy-contract.md +16 -10
- package/template/.pi/skills/yss-stage-decision/references/domain-strategy.schema.json +23 -5
- package/template/.pi/skills/yss-stage-decision/references/stage-decision-package-contract.md +5 -2
- package/template/.pi/skills/yss-stage-decision/references/stage-decision-package.schema.json +16 -4
- package/template/.pi/skills/yss-stage-decision/references/validation-rules.md +1 -1
- package/template/.pi/skills/yss-stage-decision/scripts/migrate-context-references.mjs +62 -0
- package/template/.pi/skills/yss-stage-decision/scripts/validate-domain-strategy.mjs +18 -7
- package/template/.pi/skills/yss-stage-decision/scripts/validate-stage-decision-package.mjs +20 -9
- package/template/.pi/skills/yss-stage-decision/tests/fixtures/domain-strategy-approval.yaml +1 -1
- package/template/.pi/skills/yss-stage-decision/tests/fixtures/stage-decision-approval.yaml +1 -1
- package/template/.pi/skills/yss-stage-decision/tests/fixtures/valid-stage-decision-package.yaml +12 -7
- package/template/.pi/skills/yss-stage-decision/tests/fixtures/valid-supplier-domain.yaml +9 -4
- package/template/.pi/skills/yss-stage-decision/tests/run-scenarios.mjs +134 -56
- package/template/.pi/skills/yss-tactical-design/SKILL.md +8 -2
- package/template/.pi/skills/yss-tactical-design/references/output-template.md +3 -0
- package/template/.pi/skills/yss-tactical-design/references/tactical-design-contract.md +3 -1
- package/template/.pi/skills/yss-tactical-design/scripts/validate-tactical-design.mjs +10 -2
- package/template/.pi/skills/yss-ui/SKILL.md +1 -2
- package/template/.pi/skills/yss-ui-business-page-generation/SKILL.md +3 -3
- package/template/.pi/skills/yss-validation/SKILL.md +1 -0
- package/template/.pi/skills/yss-web-controller/SKILL.md +6 -0
- package/template/.pi/skills/yss-web-controller/references/profiles/layered-mvc-service.md +3 -0
- package/template/.pi/skills/yss-web-controller/references/profiles/mvc-data-analysis-v1.md +3 -0
- package/template/.pi/skills/yss-web-controller/references/profiles/target-domain-model.md +3 -0
- package/template/.pi/skills/yss-web-controller/references/web-generation-contract.schema.json +3 -2
- package/template/.pi/skills/yss-web-controller/scripts/generate_controller.mjs +27 -10
- package/template/.pi/skills/yss-web-controller/scripts/generate_controller.test.mjs +29 -1
- package/template/.qoder/skills/alibaba-java-code-style/SKILL.md +1 -0
- package/template/.qoder/skills/code-review/references/yss-review-standards.md +1 -1
- package/template/.qoder/skills/domain-modeling/CONTEXT-FORMAT.md +37 -42
- package/template/.qoder/skills/domain-modeling/SKILL.md +10 -26
- package/template/.qoder/skills/grill-with-docs/SKILL.md +6 -5
- package/template/.qoder/skills/lombok/SKILL.md +2 -1
- package/template/.qoder/skills/mapstruct/SKILL.md +3 -2
- package/template/.qoder/skills/setup-matt-pocock-skills/SKILL.md +5 -6
- package/template/.qoder/skills/setup-matt-pocock-skills/domain.md +6 -20
- package/template/.qoder/skills/wait-what/SKILL.md +1 -1
- package/template/.qoder/skills/yss-antdv-next-design/SKILL.md +48 -0
- package/template/.qoder/skills/yss-antdv-next-design/references/boundaries.md +25 -0
- package/template/.qoder/skills/yss-antdv-next-design/references/cli-matrix.md +34 -0
- package/template/.qoder/skills/yss-antdv-next-design/references/fact-pack.md +38 -0
- package/template/.qoder/skills/yss-antdv-next-design/scripts/collect-antdv-next-facts.mjs +213 -0
- package/template/.qoder/skills/yss-antdv-next-design/scripts/validate-fact-pack.mjs +168 -0
- package/template/.qoder/skills/yss-antdv-next-design/tests/run-scenarios.mjs +139 -0
- package/template/.qoder/skills/yss-application/SKILL.md +6 -0
- package/template/.qoder/skills/yss-application/references/profiles/layered-mvc-service.md +3 -0
- package/template/.qoder/skills/yss-application/references/profiles/mvc-data-analysis-v1.md +3 -0
- package/template/.qoder/skills/yss-application/references/profiles/target-domain-model.md +3 -0
- package/template/.qoder/skills/yss-components/SKILL.md +1 -1
- package/template/.qoder/skills/yss-ddd-scaffold-generator/SKILL.md +3 -4
- package/template/.qoder/skills/yss-ddd-scaffold-generator/assets/templates/config/application.yml.template +0 -13
- package/template/.qoder/skills/yss-ddd-scaffold-generator/assets/templates/pom/bootstrap-pom.xml.template +13 -0
- package/template/.qoder/skills/yss-ddd-scaffold-generator/references/USAGE_EXAMPLES.md +13 -4
- package/template/.qoder/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-parent/SKILL.md +1 -1
- package/template/.qoder/skills/yss-ddd-scaffold-generator/scripts/first-slice-compatibility.test.mjs +21 -7
- package/template/.qoder/skills/yss-ddd-scaffold-generator/scripts/generate_scaffold.mjs +37 -15
- package/template/.qoder/skills/yss-ddd-scaffold-generator/scripts/run_first_slice_verification.mjs +22 -10
- package/template/.qoder/skills/yss-ddd-scaffold-generator/scripts/run_scaffold_verification.mjs +14 -2
- package/template/.qoder/skills/yss-ddd-scaffold-generator/scripts/scaffold-generator.test.mjs +41 -12
- package/template/.qoder/skills/yss-design-system/SKILL.md +25 -22
- package/template/.qoder/skills/yss-design-system/references/design-qa-theme.md +22 -24
- package/template/.qoder/skills/yss-design-system/references/design-system.md +39 -56
- package/template/.qoder/skills/yss-domain/SKILL.md +1 -1
- package/template/.qoder/skills/yss-dto/SKILL.md +1 -0
- package/template/.qoder/skills/yss-exception/SKILL.md +1 -0
- package/template/.qoder/skills/yss-frontend-scaffold-generator/SKILL.md +1 -1
- package/template/.qoder/skills/yss-implementation-contract-compiler/SKILL.md +8 -2
- package/template/.qoder/skills/yss-implementation-contract-compiler/references/boundaries.md +16 -8
- package/template/.qoder/skills/yss-implementation-contract-compiler/references/compiler-contract.yaml +72 -19
- package/template/.qoder/skills/yss-implementation-contract-compiler/references/slice-implementation-contract.md +5 -1
- package/template/.qoder/skills/yss-implementation-contract-compiler/references/yss-skill-execution-result.md +2 -0
- package/template/.qoder/skills/yss-implementation-contract-compiler/tests/backend-profiles.test.mjs +45 -0
- package/template/.qoder/skills/yss-implementation-contract-compiler/tests/compiler-scenarios.test.mjs +8 -6
- package/template/.qoder/skills/yss-layered-mvc-scaffold-generator/SKILL.md +64 -0
- package/template/.qoder/skills/yss-layered-mvc-scaffold-generator/agents/openai.yaml +4 -0
- package/template/.qoder/skills/yss-layered-mvc-scaffold-generator/references/architecture.md +29 -0
- package/template/.qoder/skills/yss-layered-mvc-scaffold-generator/scripts/generate_and_verify_scaffold.mjs +61 -0
- package/template/.qoder/skills/yss-layered-mvc-scaffold-generator/scripts/generate_scaffold.mjs +315 -0
- package/template/.qoder/skills/yss-layered-mvc-scaffold-generator/scripts/run_scaffold_verification.mjs +30 -0
- package/template/.qoder/skills/yss-layered-mvc-scaffold-generator/scripts/scaffold-generator.test.mjs +159 -0
- package/template/.qoder/skills/yss-mvc-data-analysis-project-initializer/SKILL.md +22 -0
- package/template/.qoder/skills/yss-mvc-data-analysis-project-initializer/scripts/generate_project.mjs +77 -0
- package/template/.qoder/skills/yss-mvc-data-analysis-project-initializer/scripts/run_scaffold_verification.mjs +9 -0
- package/template/.qoder/skills/yss-mvc-scaffold-generator/SKILL.md +3 -82
- package/template/.qoder/skills/yss-mvc-scaffold-generator/references/history/generate_project.mjs.txt +137 -0
- package/template/.qoder/skills/yss-mvc-scaffold-generator/references/history/generate_project.test.mjs.txt +341 -0
- package/template/.qoder/skills/yss-mvc-scaffold-generator/references/history/skill.md +87 -0
- package/template/.qoder/skills/yss-mvc-scaffold-generator/scripts/generate_project.mjs +2 -135
- package/template/.qoder/skills/yss-mvc-scaffold-generator/scripts/generate_project.test.mjs +4 -332
- package/template/.qoder/skills/yss-mvc-scaffold-generator/scripts/lib/envelope.mjs +11 -3
- package/template/.qoder/skills/yss-mvc-scaffold-generator/scripts/lib/envelope.test.mjs +36 -0
- package/template/.qoder/skills/yss-mybatis/SKILL.md +2 -2
- package/template/.qoder/skills/yss-product-lifecycle/SKILL.md +31 -7
- package/template/.qoder/skills/yss-product-lifecycle/references/artifact-dependencies.md +3 -0
- package/template/.qoder/skills/yss-product-lifecycle/references/matt-yss-adapter.md +4 -6
- package/template/.qoder/skills/yss-product-lifecycle/references/orchestration-contract.yaml +119 -46
- package/template/.qoder/skills/yss-product-lifecycle/references/orchestration.md +9 -3
- package/template/.qoder/skills/yss-product-lifecycle/references/state-model.md +7 -2
- package/template/.qoder/skills/yss-product-lifecycle/references/user-decisions.md +56 -0
- package/template/.qoder/skills/yss-prototype-stage/SKILL.md +9 -8
- package/template/.qoder/skills/yss-prototype-stage/references/product-design-adapter.md +33 -10
- package/template/.qoder/skills/yss-prototype-stage/references/prototype-profile-routing.md +10 -8
- package/template/.qoder/skills/yss-prototype-stage/scripts/prototype-contract.mjs +129 -22
- package/template/.qoder/skills/yss-prototype-stage/scripts/visual-baseline-contract.mjs +314 -0
- package/template/.qoder/skills/yss-prototype-stage/tests/run-scenarios.mjs +96 -17
- package/template/.qoder/skills/yss-repository/SKILL.md +6 -0
- package/template/.qoder/skills/yss-repository/references/profiles/layered-mvc-service.md +3 -0
- package/template/.qoder/skills/yss-repository/references/profiles/mvc-data-analysis-v1.md +3 -0
- package/template/.qoder/skills/yss-repository/references/profiles/target-domain-model.md +3 -0
- package/template/.qoder/skills/yss-skill-source-index-refresh/references/source-map-config.md +0 -1
- package/template/.qoder/skills/yss-skill-source-index-refresh/scripts/refresh-yss-skill-index.mjs +1 -1
- package/template/.qoder/skills/yss-stage-decision/SKILL.md +16 -12
- package/template/.qoder/skills/yss-stage-decision/references/domain-strategy-contract.md +16 -10
- package/template/.qoder/skills/yss-stage-decision/references/domain-strategy.schema.json +23 -5
- package/template/.qoder/skills/yss-stage-decision/references/stage-decision-package-contract.md +5 -2
- package/template/.qoder/skills/yss-stage-decision/references/stage-decision-package.schema.json +16 -4
- package/template/.qoder/skills/yss-stage-decision/references/validation-rules.md +1 -1
- package/template/.qoder/skills/yss-stage-decision/scripts/migrate-context-references.mjs +62 -0
- package/template/.qoder/skills/yss-stage-decision/scripts/validate-domain-strategy.mjs +18 -7
- package/template/.qoder/skills/yss-stage-decision/scripts/validate-stage-decision-package.mjs +20 -9
- package/template/.qoder/skills/yss-stage-decision/tests/fixtures/domain-strategy-approval.yaml +1 -1
- package/template/.qoder/skills/yss-stage-decision/tests/fixtures/stage-decision-approval.yaml +1 -1
- package/template/.qoder/skills/yss-stage-decision/tests/fixtures/valid-stage-decision-package.yaml +12 -7
- package/template/.qoder/skills/yss-stage-decision/tests/fixtures/valid-supplier-domain.yaml +9 -4
- package/template/.qoder/skills/yss-stage-decision/tests/run-scenarios.mjs +134 -56
- package/template/.qoder/skills/yss-tactical-design/SKILL.md +8 -2
- package/template/.qoder/skills/yss-tactical-design/references/output-template.md +3 -0
- package/template/.qoder/skills/yss-tactical-design/references/tactical-design-contract.md +3 -1
- package/template/.qoder/skills/yss-tactical-design/scripts/validate-tactical-design.mjs +10 -2
- package/template/.qoder/skills/yss-ui/SKILL.md +1 -2
- package/template/.qoder/skills/yss-ui-business-page-generation/SKILL.md +3 -3
- package/template/.qoder/skills/yss-validation/SKILL.md +1 -0
- package/template/.qoder/skills/yss-web-controller/SKILL.md +6 -0
- package/template/.qoder/skills/yss-web-controller/references/profiles/layered-mvc-service.md +3 -0
- package/template/.qoder/skills/yss-web-controller/references/profiles/mvc-data-analysis-v1.md +3 -0
- package/template/.qoder/skills/yss-web-controller/references/profiles/target-domain-model.md +3 -0
- package/template/.qoder/skills/yss-web-controller/references/web-generation-contract.schema.json +3 -2
- package/template/.qoder/skills/yss-web-controller/scripts/generate_controller.mjs +27 -10
- package/template/.qoder/skills/yss-web-controller/scripts/generate_controller.test.mjs +29 -1
- package/template/.trae/skills/alibaba-java-code-style/SKILL.md +1 -0
- package/template/.trae/skills/code-review/references/yss-review-standards.md +1 -1
- package/template/.trae/skills/domain-modeling/CONTEXT-FORMAT.md +37 -42
- package/template/.trae/skills/domain-modeling/SKILL.md +10 -26
- package/template/.trae/skills/grill-with-docs/SKILL.md +6 -5
- package/template/.trae/skills/lombok/SKILL.md +2 -1
- package/template/.trae/skills/mapstruct/SKILL.md +3 -2
- package/template/.trae/skills/setup-matt-pocock-skills/SKILL.md +5 -6
- package/template/.trae/skills/setup-matt-pocock-skills/domain.md +6 -20
- package/template/.trae/skills/wait-what/SKILL.md +1 -1
- package/template/.trae/skills/yss-antdv-next-design/SKILL.md +48 -0
- package/template/.trae/skills/yss-antdv-next-design/references/boundaries.md +25 -0
- package/template/.trae/skills/yss-antdv-next-design/references/cli-matrix.md +34 -0
- package/template/.trae/skills/yss-antdv-next-design/references/fact-pack.md +38 -0
- package/template/.trae/skills/yss-antdv-next-design/scripts/collect-antdv-next-facts.mjs +213 -0
- package/template/.trae/skills/yss-antdv-next-design/scripts/validate-fact-pack.mjs +168 -0
- package/template/.trae/skills/yss-antdv-next-design/tests/run-scenarios.mjs +139 -0
- package/template/.trae/skills/yss-application/SKILL.md +6 -0
- package/template/.trae/skills/yss-application/references/profiles/layered-mvc-service.md +3 -0
- package/template/.trae/skills/yss-application/references/profiles/mvc-data-analysis-v1.md +3 -0
- package/template/.trae/skills/yss-application/references/profiles/target-domain-model.md +3 -0
- package/template/.trae/skills/yss-components/SKILL.md +1 -1
- package/template/.trae/skills/yss-ddd-scaffold-generator/SKILL.md +3 -4
- package/template/.trae/skills/yss-ddd-scaffold-generator/assets/templates/config/application.yml.template +0 -13
- package/template/.trae/skills/yss-ddd-scaffold-generator/assets/templates/pom/bootstrap-pom.xml.template +13 -0
- package/template/.trae/skills/yss-ddd-scaffold-generator/references/USAGE_EXAMPLES.md +13 -4
- package/template/.trae/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-parent/SKILL.md +1 -1
- package/template/.trae/skills/yss-ddd-scaffold-generator/scripts/first-slice-compatibility.test.mjs +21 -7
- package/template/.trae/skills/yss-ddd-scaffold-generator/scripts/generate_scaffold.mjs +37 -15
- package/template/.trae/skills/yss-ddd-scaffold-generator/scripts/run_first_slice_verification.mjs +22 -10
- package/template/.trae/skills/yss-ddd-scaffold-generator/scripts/run_scaffold_verification.mjs +14 -2
- package/template/.trae/skills/yss-ddd-scaffold-generator/scripts/scaffold-generator.test.mjs +41 -12
- package/template/.trae/skills/yss-design-system/SKILL.md +25 -22
- package/template/.trae/skills/yss-design-system/references/design-qa-theme.md +22 -24
- package/template/.trae/skills/yss-design-system/references/design-system.md +39 -56
- package/template/.trae/skills/yss-domain/SKILL.md +1 -1
- package/template/.trae/skills/yss-dto/SKILL.md +1 -0
- package/template/.trae/skills/yss-exception/SKILL.md +1 -0
- package/template/.trae/skills/yss-frontend-scaffold-generator/SKILL.md +1 -1
- package/template/.trae/skills/yss-implementation-contract-compiler/SKILL.md +8 -2
- package/template/.trae/skills/yss-implementation-contract-compiler/references/boundaries.md +16 -8
- package/template/.trae/skills/yss-implementation-contract-compiler/references/compiler-contract.yaml +72 -19
- package/template/.trae/skills/yss-implementation-contract-compiler/references/slice-implementation-contract.md +5 -1
- package/template/.trae/skills/yss-implementation-contract-compiler/references/yss-skill-execution-result.md +2 -0
- package/template/.trae/skills/yss-implementation-contract-compiler/tests/backend-profiles.test.mjs +45 -0
- package/template/.trae/skills/yss-implementation-contract-compiler/tests/compiler-scenarios.test.mjs +8 -6
- package/template/.trae/skills/yss-layered-mvc-scaffold-generator/SKILL.md +64 -0
- package/template/.trae/skills/yss-layered-mvc-scaffold-generator/agents/openai.yaml +4 -0
- package/template/.trae/skills/yss-layered-mvc-scaffold-generator/references/architecture.md +29 -0
- package/template/.trae/skills/yss-layered-mvc-scaffold-generator/scripts/generate_and_verify_scaffold.mjs +61 -0
- package/template/.trae/skills/yss-layered-mvc-scaffold-generator/scripts/generate_scaffold.mjs +315 -0
- package/template/.trae/skills/yss-layered-mvc-scaffold-generator/scripts/run_scaffold_verification.mjs +30 -0
- package/template/.trae/skills/yss-layered-mvc-scaffold-generator/scripts/scaffold-generator.test.mjs +159 -0
- package/template/.trae/skills/yss-mvc-data-analysis-project-initializer/SKILL.md +22 -0
- package/template/.trae/skills/yss-mvc-data-analysis-project-initializer/scripts/generate_project.mjs +77 -0
- package/template/.trae/skills/yss-mvc-data-analysis-project-initializer/scripts/run_scaffold_verification.mjs +9 -0
- package/template/.trae/skills/yss-mvc-scaffold-generator/SKILL.md +3 -82
- package/template/.trae/skills/yss-mvc-scaffold-generator/references/history/generate_project.mjs.txt +137 -0
- package/template/.trae/skills/yss-mvc-scaffold-generator/references/history/generate_project.test.mjs.txt +341 -0
- package/template/.trae/skills/yss-mvc-scaffold-generator/references/history/skill.md +87 -0
- package/template/.trae/skills/yss-mvc-scaffold-generator/scripts/generate_project.mjs +2 -135
- package/template/.trae/skills/yss-mvc-scaffold-generator/scripts/generate_project.test.mjs +4 -332
- package/template/.trae/skills/yss-mvc-scaffold-generator/scripts/lib/envelope.mjs +11 -3
- package/template/.trae/skills/yss-mvc-scaffold-generator/scripts/lib/envelope.test.mjs +36 -0
- package/template/.trae/skills/yss-mybatis/SKILL.md +2 -2
- package/template/.trae/skills/yss-product-lifecycle/SKILL.md +31 -7
- package/template/.trae/skills/yss-product-lifecycle/references/artifact-dependencies.md +3 -0
- package/template/.trae/skills/yss-product-lifecycle/references/matt-yss-adapter.md +4 -6
- package/template/.trae/skills/yss-product-lifecycle/references/orchestration-contract.yaml +119 -46
- package/template/.trae/skills/yss-product-lifecycle/references/orchestration.md +9 -3
- package/template/.trae/skills/yss-product-lifecycle/references/state-model.md +7 -2
- package/template/.trae/skills/yss-product-lifecycle/references/user-decisions.md +56 -0
- package/template/.trae/skills/yss-prototype-stage/SKILL.md +9 -8
- package/template/.trae/skills/yss-prototype-stage/references/product-design-adapter.md +33 -10
- package/template/.trae/skills/yss-prototype-stage/references/prototype-profile-routing.md +10 -8
- package/template/.trae/skills/yss-prototype-stage/scripts/prototype-contract.mjs +129 -22
- package/template/.trae/skills/yss-prototype-stage/scripts/visual-baseline-contract.mjs +314 -0
- package/template/.trae/skills/yss-prototype-stage/tests/run-scenarios.mjs +96 -17
- package/template/.trae/skills/yss-repository/SKILL.md +6 -0
- package/template/.trae/skills/yss-repository/references/profiles/layered-mvc-service.md +3 -0
- package/template/.trae/skills/yss-repository/references/profiles/mvc-data-analysis-v1.md +3 -0
- package/template/.trae/skills/yss-repository/references/profiles/target-domain-model.md +3 -0
- package/template/.trae/skills/yss-skill-source-index-refresh/references/source-map-config.md +0 -1
- package/template/.trae/skills/yss-skill-source-index-refresh/scripts/refresh-yss-skill-index.mjs +1 -1
- package/template/.trae/skills/yss-stage-decision/SKILL.md +16 -12
- package/template/.trae/skills/yss-stage-decision/references/domain-strategy-contract.md +16 -10
- package/template/.trae/skills/yss-stage-decision/references/domain-strategy.schema.json +23 -5
- package/template/.trae/skills/yss-stage-decision/references/stage-decision-package-contract.md +5 -2
- package/template/.trae/skills/yss-stage-decision/references/stage-decision-package.schema.json +16 -4
- package/template/.trae/skills/yss-stage-decision/references/validation-rules.md +1 -1
- package/template/.trae/skills/yss-stage-decision/scripts/migrate-context-references.mjs +62 -0
- package/template/.trae/skills/yss-stage-decision/scripts/validate-domain-strategy.mjs +18 -7
- package/template/.trae/skills/yss-stage-decision/scripts/validate-stage-decision-package.mjs +20 -9
- package/template/.trae/skills/yss-stage-decision/tests/fixtures/domain-strategy-approval.yaml +1 -1
- package/template/.trae/skills/yss-stage-decision/tests/fixtures/stage-decision-approval.yaml +1 -1
- package/template/.trae/skills/yss-stage-decision/tests/fixtures/valid-stage-decision-package.yaml +12 -7
- package/template/.trae/skills/yss-stage-decision/tests/fixtures/valid-supplier-domain.yaml +9 -4
- package/template/.trae/skills/yss-stage-decision/tests/run-scenarios.mjs +134 -56
- package/template/.trae/skills/yss-tactical-design/SKILL.md +8 -2
- package/template/.trae/skills/yss-tactical-design/references/output-template.md +3 -0
- package/template/.trae/skills/yss-tactical-design/references/tactical-design-contract.md +3 -1
- package/template/.trae/skills/yss-tactical-design/scripts/validate-tactical-design.mjs +10 -2
- package/template/.trae/skills/yss-ui/SKILL.md +1 -2
- package/template/.trae/skills/yss-ui-business-page-generation/SKILL.md +3 -3
- package/template/.trae/skills/yss-validation/SKILL.md +1 -0
- package/template/.trae/skills/yss-web-controller/SKILL.md +6 -0
- package/template/.trae/skills/yss-web-controller/references/profiles/layered-mvc-service.md +3 -0
- package/template/.trae/skills/yss-web-controller/references/profiles/mvc-data-analysis-v1.md +3 -0
- package/template/.trae/skills/yss-web-controller/references/profiles/target-domain-model.md +3 -0
- package/template/.trae/skills/yss-web-controller/references/web-generation-contract.schema.json +3 -2
- package/template/.trae/skills/yss-web-controller/scripts/generate_controller.mjs +27 -10
- package/template/.trae/skills/yss-web-controller/scripts/generate_controller.test.mjs +29 -1
- package/template/AGENTS.md +52 -91
- package/template/CONTEXT.md +15 -5
- package/template/DESIGN.md +85 -41
- package/template/__yss_dotfile__.gitignore +1 -0
- package/template/docs/agents/backend-architecture-profiles.md +25 -0
- package/template/docs/agents/digital-human-roles.md +3 -3
- package/template/docs/agents/digital-human-roles.yaml +46 -13
- package/template/docs/agents/domain.md +7 -6
- package/template/docs/agents/skill-migrations.md +20 -2
- package/template/docs/agents/skills-maintenance.md +3 -3
- package/template/docs/agents/strategic-design-skills-integration.md +6 -1
- package/template/docs/agents/yss-skill-registry.yaml +78 -94
- package/template/docs/agents/yss-ui-skills-integration.md +3 -3
- package/template/docs/api/templates/openapi-draft-review-checklist.md +2 -2
- package/template/docs/architecture/templates/engineering-baseline-review-template.md +18 -6
- package/template/docs/design/README.md +9 -6
- package/template/docs/design/design-system-sync.yaml +1 -1
- package/template/docs/design/design.md +86 -118
- package/template/docs/design/facts/antdv-next/1.5.2/cli-help.txt +38 -0
- package/template/docs/design/facts/antdv-next/1.5.2/component-list.json +434 -0
- package/template/docs/design/facts/antdv-next/1.5.2/components/Alert/demo-basic.json +7 -0
- package/template/docs/design/facts/antdv-next/1.5.2/components/Alert/info.json +246 -0
- package/template/docs/design/facts/antdv-next/1.5.2/components/Alert/semantic.json +40 -0
- package/template/docs/design/facts/antdv-next/1.5.2/components/Alert/token.json +32 -0
- package/template/docs/design/facts/antdv-next/1.5.2/components/Button/demo-basic.json +7 -0
- package/template/docs/design/facts/antdv-next/1.5.2/components/Button/info.json +190 -0
- package/template/docs/design/facts/antdv-next/1.5.2/components/Button/semantic.json +20 -0
- package/template/docs/design/facts/antdv-next/1.5.2/components/Button/token.json +256 -0
- package/template/docs/design/facts/antdv-next/1.5.2/components/Input/demo-basic.json +7 -0
- package/template/docs/design/facts/antdv-next/1.5.2/components/Input/info.json +460 -0
- package/template/docs/design/facts/antdv-next/1.5.2/components/Input/semantic.json +70 -0
- package/template/docs/design/facts/antdv-next/1.5.2/components/Input/token.json +123 -0
- package/template/docs/design/facts/antdv-next/1.5.2/components/Modal/demo-basic.json +7 -0
- package/template/docs/design/facts/antdv-next/1.5.2/components/Modal/info.json +646 -0
- package/template/docs/design/facts/antdv-next/1.5.2/components/Modal/semantic.json +50 -0
- package/template/docs/design/facts/antdv-next/1.5.2/components/Modal/token.json +130 -0
- package/template/docs/design/facts/antdv-next/1.5.2/components/Select/demo-basic.json +7 -0
- package/template/docs/design/facts/antdv-next/1.5.2/components/Select/info.json +640 -0
- package/template/docs/design/facts/antdv-next/1.5.2/components/Select/semantic.json +70 -0
- package/template/docs/design/facts/antdv-next/1.5.2/components/Select/token.json +172 -0
- package/template/docs/design/facts/antdv-next/1.5.2/components/Table/demo-basic.json +7 -0
- package/template/docs/design/facts/antdv-next/1.5.2/components/Table/info.json +1010 -0
- package/template/docs/design/facts/antdv-next/1.5.2/components/Table/semantic.json +70 -0
- package/template/docs/design/facts/antdv-next/1.5.2/components/Table/token.json +263 -0
- package/template/docs/design/facts/antdv-next/1.5.2/components/Tag/demo-basic.json +7 -0
- package/template/docs/design/facts/antdv-next/1.5.2/components/Tag/info.json +321 -0
- package/template/docs/design/facts/antdv-next/1.5.2/components/Tag/semantic.json +25 -0
- package/template/docs/design/facts/antdv-next/1.5.2/components/Tag/token.json +25 -0
- package/template/docs/design/facts/antdv-next/1.5.2/design-md.json +3 -0
- package/template/docs/design/facts/antdv-next/1.5.2/manifest.json +215 -0
- package/template/docs/design/facts/antdv-next/1.5.2/resolution-probe.json +5 -0
- package/template/docs/design/preview-dark.html +170 -7
- package/template/docs/design/preview.css +730 -0
- package/template/docs/design/preview.html +168 -10
- package/template/docs/design/preview.js +71 -0
- package/template/docs/design/schemas/visual-baseline.schema.json +66 -0
- package/template/docs/design/templates/interaction-spec-template.md +1 -1
- package/template/docs/design/templates/product-overview-design-template.md +6 -6
- package/template/docs/design/templates/prototype-evidence-template.yaml +21 -8
- package/template/docs/design/templates/prototype-review-checklist.md +1 -1
- package/template/docs/design/templates/visual-baseline-template.yaml +70 -0
- package/template/docs/design/tokens/.design-md-projection.json +3 -3
- package/template/docs/design/tokens/theme.json +2 -2
- package/template/docs/design/tokens/variables.css +5 -0
- package/template/docs/process/harness-executive-blueprint.md +1 -1
- package/template/docs/process/harness-process-tailoring.md +1 -0
- package/template/docs/process/lifecycle-artifact-map.md +5 -4
- package/template/docs/process/lifecycle-registry-baseline.json +7 -5
- package/template/docs/process/lifecycle-registry.yaml +22 -0
- package/template/docs/process/schemas/backend-architecture-identity.schema.json +19 -0
- package/template/docs/process/schemas/context-reconciliation.schema.json +57 -0
- package/template/docs/process/schemas/digital-human-task-package.schema.json +10 -0
- package/template/docs/process/schemas/frontend-implementation-evidence.schema.json +62 -29
- package/template/docs/process/schemas/lifecycle-checkpoint.schema.json +16 -2
- package/template/docs/process/schemas/lifecycle-registry.schema.json +4 -4
- package/template/docs/process/schemas/scaffold-architecture-decisions.schema.json +68 -0
- package/template/docs/process/schemas/strategic-design-handoff.schema.json +670 -0
- package/template/docs/process/schemas/strategic-handoff-domain-strategy.schema.json +146 -0
- package/template/docs/process/schemas/strategic-handoff-export.schema.json +295 -0
- package/template/docs/process/schemas/strategic-handoff-package.schema.json +97 -0
- package/template/docs/process/schemas/strategic-handoff-stage-decision-package.schema.json +98 -0
- package/template/docs/process/schemas/user-decision.schema.json +357 -0
- package/template/docs/process/strategic-handoff-package.md +56 -0
- package/template/docs/process/template-verification-profiles.yaml +60 -1
- package/template/docs/process/templates/context-reconciliation-template.yaml +18 -0
- package/template/docs/process/templates/frontend-implementation-plan-template.yaml +11 -5
- package/template/docs/process/templates/frontend-implementation-verification-template.yaml +25 -5
- package/template/docs/process/templates/lifecycle-checkpoint-template.yaml +9 -0
- package/template/docs/process/templates/scaffold-architecture-decisions-template.yaml +32 -0
- package/template/docs/process/templates/stage-checkpoint-template.md +5 -0
- package/template/docs/process/templates/user-decision-template.yaml +30 -0
- package/template/docs/templates/approval-record-template.yaml +4 -0
- package/template/docs/templates/build-architecture-checklist-template.md +3 -3
- package/template/docs/templates/implementation-repo-registry-template.md +3 -1
- package/template/docs/templates/implementation-routing-template.md +8 -6
- package/template/docs/templates/requirement-freeze-template.md +1 -1
- package/template/docs/templates/review-report-template.md +1 -1
- package/template/docs/templates/spec-template.md +5 -5
- package/template/docs/user-guide//346/210/230/346/234/257/350/256/276/350/256/241/345/255/220/351/241/271/347/233/256/347/224/250/346/210/267/346/211/213/345/206/214.md +3 -1
- package/template/docs/user-guide//347/224/250/346/210/267/346/211/213/345/206/214.md +1 -1
- package/template/scripts/fixtures/strategic-handoff/base-stage.json +91 -0
- package/template/scripts/fixtures/strategic-handoff/base-strategy.json +205 -0
- package/template/scripts/fixtures/strategic-handoff/fixture.mjs +57 -0
- package/template/scripts/fixtures/strategic-handoff/source-roles.json +528 -0
- package/template/scripts/fixtures/user-decision/build-fixture.mjs +61 -0
- package/template/scripts/lib/approval-record.mjs +32 -1
- package/template/scripts/lib/backend-architecture.mjs +43 -0
- package/template/scripts/lib/context-contract.mjs +203 -0
- package/template/scripts/lib/digital-human-roles.mjs +21 -3
- package/template/scripts/lib/first-slice-architecture.mjs +23 -0
- package/template/scripts/lib/implementation-contract-compiler.mjs +34 -1
- package/template/scripts/lib/lifecycle-registry.mjs +14 -6
- package/template/scripts/lib/lifecycle-transition.mjs +19 -4
- package/template/scripts/lib/scaffold-local-database.mjs +26 -0
- package/template/scripts/lib/scenario-checks.mjs +25 -12
- package/template/scripts/lib/skill-governance.mjs +25 -10
- package/template/scripts/lib/skill-registry.mjs +1 -1
- package/template/scripts/lib/skill-supply-chain.mjs +1 -1
- package/template/scripts/lib/strategic-handoff-consumption.mjs +76 -0
- package/template/scripts/lib/strategic-handoff-io.mjs +75 -0
- package/template/scripts/lib/strategic-handoff-rules.mjs +37 -0
- package/template/scripts/lib/strategic-handoff-zip.py +52 -0
- package/template/scripts/lib/strategic-handoff.mjs +259 -0
- package/template/scripts/lib/task-package.mjs +10 -2
- package/template/scripts/lib/user-decision.mjs +210 -0
- package/template/scripts/strategic-handoff +14 -0
- package/template/scripts/sync-strategic-handoff-tools +18 -0
- package/template/scripts/verify-approval-record +5 -4
- package/template/scripts/verify-business-language-scenarios +59 -0
- package/template/scripts/verify-context-contract +15 -0
- package/template/scripts/verify-context-contract-scenarios +105 -0
- package/template/scripts/verify-context-reconciliation +58 -0
- package/template/scripts/verify-context-reconciliation-scenarios +69 -0
- package/template/scripts/verify-digital-human-roles-scenarios +1 -1
- package/template/scripts/verify-frontend-implementation-evidence +31 -8
- package/template/scripts/verify-frontend-implementation-evidence-scenarios +56 -0
- package/template/scripts/verify-grill-with-docs-context-scenarios +15 -0
- package/template/scripts/verify-lifecycle-checkpoint +9 -1
- package/template/scripts/verify-lifecycle-transition-scenarios +13 -3
- package/template/scripts/verify-retired-skill-ids +30 -4
- package/template/scripts/verify-scaffold-architecture-decision-scenarios +30 -0
- package/template/scripts/verify-scaffold-architecture-decisions +61 -0
- package/template/scripts/verify-scaffold-generator-scenarios +74 -3
- package/template/scripts/verify-strategic-context-import +65 -0
- package/template/scripts/verify-strategic-context-import-scenarios +50 -0
- package/template/scripts/verify-strategic-handoff-consumption +10 -0
- package/template/scripts/verify-strategic-handoff-package-scenarios +102 -0
- package/template/scripts/verify-subagent-task-package-scenarios +17 -3
- package/template/scripts/verify-template-verification-scenarios +6 -1
- package/template/scripts/verify-user-decision +17 -0
- package/template/scripts/verify-user-decision-scenarios +103 -0
- package/template/skills-lock.json +77 -270
- package/template/yss-public-skills.json +4 -4
- package/template.snapshot.json +4 -4
- package/template/.agents/skills/ask-matt/PHASE-BOUNDARIES.md +0 -55
- package/template/.agents/skills/ask-matt/SKILL.md +0 -95
- package/template/.agents/skills/ask-matt/agents/openai.yaml +0 -5
- package/template/.agents/skills/dispatching-parallel-agents/SKILL.md +0 -185
- package/template/.agents/skills/loop-me/SKILL.md +0 -32
- package/template/.agents/skills/loop-me/agents/openai.yaml +0 -5
- package/template/.agents/skills/migrate-to-shoehorn/SKILL.md +0 -118
- package/template/.agents/skills/migrate-to-shoehorn/agents/openai.yaml +0 -3
- package/template/.agents/skills/prototype-page-acceptance/SKILL.md +0 -62
- package/template/.agents/skills/scaffold-exercises/SKILL.md +0 -106
- package/template/.agents/skills/scaffold-exercises/agents/openai.yaml +0 -3
- package/template/.agents/skills/setup-pre-commit/SKILL.md +0 -91
- package/template/.agents/skills/setup-pre-commit/agents/openai.yaml +0 -3
- package/template/.agents/skills/setup-ts-deep-modules/SKILL.md +0 -102
- package/template/.agents/skills/setup-ts-deep-modules/agents/openai.yaml +0 -5
- package/template/.agents/skills/setup-ts-deep-modules/dependency-cruiser.config.cjs +0 -95
- package/template/.agents/skills/teach/GLOSSARY-FORMAT.md +0 -35
- package/template/.agents/skills/teach/LEARNING-RECORD-FORMAT.md +0 -46
- package/template/.agents/skills/teach/MISSION-FORMAT.md +0 -31
- package/template/.agents/skills/teach/RESOURCES-FORMAT.md +0 -32
- package/template/.agents/skills/teach/SKILL.md +0 -140
- package/template/.agents/skills/teach/agents/openai.yaml +0 -5
- package/template/.agents/skills/writing-beats/SKILL.md +0 -67
- package/template/.agents/skills/writing-beats/agents/openai.yaml +0 -5
- package/template/.agents/skills/writing-fragments/SKILL.md +0 -79
- package/template/.agents/skills/writing-fragments/agents/openai.yaml +0 -5
- package/template/.agents/skills/writing-shape/SKILL.md +0 -79
- package/template/.agents/skills/writing-shape/agents/openai.yaml +0 -5
- package/template/.agents/skills/yss-microapp-commit/SKILL.md +0 -201
- package/template/.agents/skills/yss-microapp-commit/agents/openai.yaml +0 -5
- package/template/.agents/skills/yss-microapp-commit/references/scope-mapping.md +0 -204
- package/template/.agents/skills/yss-page-module-development/SKILL.md +0 -165
- package/template/.agents/skills/yss-page-module-development/agents/openai.yaml +0 -5
- package/template/.agents/skills/yss-page-module-development/examples/AdvancedFormPage/constant.ts +0 -32
- package/template/.agents/skills/yss-page-module-development/examples/AdvancedFormPage/hooks/useRuleConfig.ts +0 -158
- package/template/.agents/skills/yss-page-module-development/examples/AdvancedFormPage/index.vue +0 -188
- package/template/.agents/skills/yss-page-module-development/examples/AdvancedFormPage/schemas/ruleConfigSchema.ts +0 -256
- package/template/.agents/skills/yss-page-module-development/examples/AdvancedFormPage/style.less +0 -76
- package/template/.agents/skills/yss-page-module-development/examples/StandardListPage/constant.ts +0 -128
- package/template/.agents/skills/yss-page-module-development/examples/StandardListPage/hooks/useQualityRuleList.ts +0 -144
- package/template/.agents/skills/yss-page-module-development/examples/StandardListPage/hooks/useRuleActions.ts +0 -141
- package/template/.agents/skills/yss-page-module-development/examples/StandardListPage/index.vue +0 -175
- package/template/.agents/skills/yss-page-module-development/examples/StandardListPage/style.less +0 -83
- package/template/.agents/skills/yss-page-module-development/references/component-map.md +0 -34
- package/template/.agents/skills/yss-page-module-development/references/frontend-docs.md +0 -11
- package/template/.agents/skills/yss-page-module-development/references/hooks-map.md +0 -11
- package/template/.agents/skills/yss-page-module-development/references/utils-map.md +0 -14
- package/template/.claude/skills/ask-matt/PHASE-BOUNDARIES.md +0 -55
- package/template/.claude/skills/ask-matt/SKILL.md +0 -95
- package/template/.claude/skills/ask-matt/agents/openai.yaml +0 -5
- package/template/.claude/skills/dispatching-parallel-agents/SKILL.md +0 -185
- package/template/.claude/skills/loop-me/SKILL.md +0 -32
- package/template/.claude/skills/loop-me/agents/openai.yaml +0 -5
- package/template/.claude/skills/migrate-to-shoehorn/SKILL.md +0 -118
- package/template/.claude/skills/migrate-to-shoehorn/agents/openai.yaml +0 -3
- package/template/.claude/skills/prototype-page-acceptance/SKILL.md +0 -62
- package/template/.claude/skills/scaffold-exercises/SKILL.md +0 -106
- package/template/.claude/skills/scaffold-exercises/agents/openai.yaml +0 -3
- package/template/.claude/skills/setup-pre-commit/SKILL.md +0 -91
- package/template/.claude/skills/setup-pre-commit/agents/openai.yaml +0 -3
- package/template/.claude/skills/setup-ts-deep-modules/SKILL.md +0 -102
- package/template/.claude/skills/setup-ts-deep-modules/agents/openai.yaml +0 -5
- package/template/.claude/skills/setup-ts-deep-modules/dependency-cruiser.config.cjs +0 -95
- package/template/.claude/skills/teach/GLOSSARY-FORMAT.md +0 -35
- package/template/.claude/skills/teach/LEARNING-RECORD-FORMAT.md +0 -46
- package/template/.claude/skills/teach/MISSION-FORMAT.md +0 -31
- package/template/.claude/skills/teach/RESOURCES-FORMAT.md +0 -32
- package/template/.claude/skills/teach/SKILL.md +0 -140
- package/template/.claude/skills/teach/agents/openai.yaml +0 -5
- package/template/.claude/skills/writing-beats/SKILL.md +0 -67
- package/template/.claude/skills/writing-beats/agents/openai.yaml +0 -5
- package/template/.claude/skills/writing-fragments/SKILL.md +0 -79
- package/template/.claude/skills/writing-fragments/agents/openai.yaml +0 -5
- package/template/.claude/skills/writing-shape/SKILL.md +0 -79
- package/template/.claude/skills/writing-shape/agents/openai.yaml +0 -5
- package/template/.claude/skills/yss-microapp-commit/SKILL.md +0 -201
- package/template/.claude/skills/yss-microapp-commit/agents/openai.yaml +0 -5
- package/template/.claude/skills/yss-microapp-commit/references/scope-mapping.md +0 -204
- package/template/.claude/skills/yss-page-module-development/SKILL.md +0 -165
- package/template/.claude/skills/yss-page-module-development/agents/openai.yaml +0 -5
- package/template/.claude/skills/yss-page-module-development/examples/AdvancedFormPage/constant.ts +0 -32
- package/template/.claude/skills/yss-page-module-development/examples/AdvancedFormPage/hooks/useRuleConfig.ts +0 -158
- package/template/.claude/skills/yss-page-module-development/examples/AdvancedFormPage/index.vue +0 -188
- package/template/.claude/skills/yss-page-module-development/examples/AdvancedFormPage/schemas/ruleConfigSchema.ts +0 -256
- package/template/.claude/skills/yss-page-module-development/examples/AdvancedFormPage/style.less +0 -76
- package/template/.claude/skills/yss-page-module-development/examples/StandardListPage/constant.ts +0 -128
- package/template/.claude/skills/yss-page-module-development/examples/StandardListPage/hooks/useQualityRuleList.ts +0 -144
- package/template/.claude/skills/yss-page-module-development/examples/StandardListPage/hooks/useRuleActions.ts +0 -141
- package/template/.claude/skills/yss-page-module-development/examples/StandardListPage/index.vue +0 -175
- package/template/.claude/skills/yss-page-module-development/examples/StandardListPage/style.less +0 -83
- package/template/.claude/skills/yss-page-module-development/references/component-map.md +0 -34
- package/template/.claude/skills/yss-page-module-development/references/frontend-docs.md +0 -11
- package/template/.claude/skills/yss-page-module-development/references/hooks-map.md +0 -11
- package/template/.claude/skills/yss-page-module-development/references/utils-map.md +0 -14
- package/template/.codex/skills/ask-matt/PHASE-BOUNDARIES.md +0 -55
- package/template/.codex/skills/ask-matt/SKILL.md +0 -95
- package/template/.codex/skills/ask-matt/agents/openai.yaml +0 -5
- package/template/.codex/skills/dispatching-parallel-agents/SKILL.md +0 -185
- package/template/.codex/skills/loop-me/SKILL.md +0 -32
- package/template/.codex/skills/loop-me/agents/openai.yaml +0 -5
- package/template/.codex/skills/migrate-to-shoehorn/SKILL.md +0 -118
- package/template/.codex/skills/migrate-to-shoehorn/agents/openai.yaml +0 -3
- package/template/.codex/skills/prototype-page-acceptance/SKILL.md +0 -62
- package/template/.codex/skills/scaffold-exercises/SKILL.md +0 -106
- package/template/.codex/skills/scaffold-exercises/agents/openai.yaml +0 -3
- package/template/.codex/skills/setup-pre-commit/SKILL.md +0 -91
- package/template/.codex/skills/setup-pre-commit/agents/openai.yaml +0 -3
- package/template/.codex/skills/setup-ts-deep-modules/SKILL.md +0 -102
- package/template/.codex/skills/setup-ts-deep-modules/agents/openai.yaml +0 -5
- package/template/.codex/skills/setup-ts-deep-modules/dependency-cruiser.config.cjs +0 -95
- package/template/.codex/skills/teach/GLOSSARY-FORMAT.md +0 -35
- package/template/.codex/skills/teach/LEARNING-RECORD-FORMAT.md +0 -46
- package/template/.codex/skills/teach/MISSION-FORMAT.md +0 -31
- package/template/.codex/skills/teach/RESOURCES-FORMAT.md +0 -32
- package/template/.codex/skills/teach/SKILL.md +0 -140
- package/template/.codex/skills/teach/agents/openai.yaml +0 -5
- package/template/.codex/skills/writing-beats/SKILL.md +0 -67
- package/template/.codex/skills/writing-beats/agents/openai.yaml +0 -5
- package/template/.codex/skills/writing-fragments/SKILL.md +0 -79
- package/template/.codex/skills/writing-fragments/agents/openai.yaml +0 -5
- package/template/.codex/skills/writing-shape/SKILL.md +0 -79
- package/template/.codex/skills/writing-shape/agents/openai.yaml +0 -5
- package/template/.codex/skills/yss-microapp-commit/SKILL.md +0 -201
- package/template/.codex/skills/yss-microapp-commit/agents/openai.yaml +0 -5
- package/template/.codex/skills/yss-microapp-commit/references/scope-mapping.md +0 -204
- package/template/.codex/skills/yss-page-module-development/SKILL.md +0 -165
- package/template/.codex/skills/yss-page-module-development/agents/openai.yaml +0 -5
- package/template/.codex/skills/yss-page-module-development/examples/AdvancedFormPage/constant.ts +0 -32
- package/template/.codex/skills/yss-page-module-development/examples/AdvancedFormPage/hooks/useRuleConfig.ts +0 -158
- package/template/.codex/skills/yss-page-module-development/examples/AdvancedFormPage/index.vue +0 -188
- package/template/.codex/skills/yss-page-module-development/examples/AdvancedFormPage/schemas/ruleConfigSchema.ts +0 -256
- package/template/.codex/skills/yss-page-module-development/examples/AdvancedFormPage/style.less +0 -76
- package/template/.codex/skills/yss-page-module-development/examples/StandardListPage/constant.ts +0 -128
- package/template/.codex/skills/yss-page-module-development/examples/StandardListPage/hooks/useQualityRuleList.ts +0 -144
- package/template/.codex/skills/yss-page-module-development/examples/StandardListPage/hooks/useRuleActions.ts +0 -141
- package/template/.codex/skills/yss-page-module-development/examples/StandardListPage/index.vue +0 -175
- package/template/.codex/skills/yss-page-module-development/examples/StandardListPage/style.less +0 -83
- package/template/.codex/skills/yss-page-module-development/references/component-map.md +0 -34
- package/template/.codex/skills/yss-page-module-development/references/frontend-docs.md +0 -11
- package/template/.codex/skills/yss-page-module-development/references/hooks-map.md +0 -11
- package/template/.codex/skills/yss-page-module-development/references/utils-map.md +0 -14
- package/template/.cursor/skills/ask-matt/PHASE-BOUNDARIES.md +0 -55
- package/template/.cursor/skills/ask-matt/SKILL.md +0 -95
- package/template/.cursor/skills/ask-matt/agents/openai.yaml +0 -5
- package/template/.cursor/skills/dispatching-parallel-agents/SKILL.md +0 -185
- package/template/.cursor/skills/loop-me/SKILL.md +0 -32
- package/template/.cursor/skills/loop-me/agents/openai.yaml +0 -5
- package/template/.cursor/skills/migrate-to-shoehorn/SKILL.md +0 -118
- package/template/.cursor/skills/migrate-to-shoehorn/agents/openai.yaml +0 -3
- package/template/.cursor/skills/prototype-page-acceptance/SKILL.md +0 -62
- package/template/.cursor/skills/scaffold-exercises/SKILL.md +0 -106
- package/template/.cursor/skills/scaffold-exercises/agents/openai.yaml +0 -3
- package/template/.cursor/skills/setup-pre-commit/SKILL.md +0 -91
- package/template/.cursor/skills/setup-pre-commit/agents/openai.yaml +0 -3
- package/template/.cursor/skills/setup-ts-deep-modules/SKILL.md +0 -102
- package/template/.cursor/skills/setup-ts-deep-modules/agents/openai.yaml +0 -5
- package/template/.cursor/skills/setup-ts-deep-modules/dependency-cruiser.config.cjs +0 -95
- package/template/.cursor/skills/teach/GLOSSARY-FORMAT.md +0 -35
- package/template/.cursor/skills/teach/LEARNING-RECORD-FORMAT.md +0 -46
- package/template/.cursor/skills/teach/MISSION-FORMAT.md +0 -31
- package/template/.cursor/skills/teach/RESOURCES-FORMAT.md +0 -32
- package/template/.cursor/skills/teach/SKILL.md +0 -140
- package/template/.cursor/skills/teach/agents/openai.yaml +0 -5
- package/template/.cursor/skills/writing-beats/SKILL.md +0 -67
- package/template/.cursor/skills/writing-beats/agents/openai.yaml +0 -5
- package/template/.cursor/skills/writing-fragments/SKILL.md +0 -79
- package/template/.cursor/skills/writing-fragments/agents/openai.yaml +0 -5
- package/template/.cursor/skills/writing-shape/SKILL.md +0 -79
- package/template/.cursor/skills/writing-shape/agents/openai.yaml +0 -5
- package/template/.cursor/skills/yss-microapp-commit/SKILL.md +0 -201
- package/template/.cursor/skills/yss-microapp-commit/agents/openai.yaml +0 -5
- package/template/.cursor/skills/yss-microapp-commit/references/scope-mapping.md +0 -204
- package/template/.cursor/skills/yss-page-module-development/SKILL.md +0 -165
- package/template/.cursor/skills/yss-page-module-development/agents/openai.yaml +0 -5
- package/template/.cursor/skills/yss-page-module-development/examples/AdvancedFormPage/constant.ts +0 -32
- package/template/.cursor/skills/yss-page-module-development/examples/AdvancedFormPage/hooks/useRuleConfig.ts +0 -158
- package/template/.cursor/skills/yss-page-module-development/examples/AdvancedFormPage/index.vue +0 -188
- package/template/.cursor/skills/yss-page-module-development/examples/AdvancedFormPage/schemas/ruleConfigSchema.ts +0 -256
- package/template/.cursor/skills/yss-page-module-development/examples/AdvancedFormPage/style.less +0 -76
- package/template/.cursor/skills/yss-page-module-development/examples/StandardListPage/constant.ts +0 -128
- package/template/.cursor/skills/yss-page-module-development/examples/StandardListPage/hooks/useQualityRuleList.ts +0 -144
- package/template/.cursor/skills/yss-page-module-development/examples/StandardListPage/hooks/useRuleActions.ts +0 -141
- package/template/.cursor/skills/yss-page-module-development/examples/StandardListPage/index.vue +0 -175
- package/template/.cursor/skills/yss-page-module-development/examples/StandardListPage/style.less +0 -83
- package/template/.cursor/skills/yss-page-module-development/references/component-map.md +0 -34
- package/template/.cursor/skills/yss-page-module-development/references/frontend-docs.md +0 -11
- package/template/.cursor/skills/yss-page-module-development/references/hooks-map.md +0 -11
- package/template/.cursor/skills/yss-page-module-development/references/utils-map.md +0 -14
- package/template/.pi/skills/ask-matt/PHASE-BOUNDARIES.md +0 -55
- package/template/.pi/skills/ask-matt/SKILL.md +0 -95
- package/template/.pi/skills/ask-matt/agents/openai.yaml +0 -5
- package/template/.pi/skills/dispatching-parallel-agents/SKILL.md +0 -185
- package/template/.pi/skills/loop-me/SKILL.md +0 -32
- package/template/.pi/skills/loop-me/agents/openai.yaml +0 -5
- package/template/.pi/skills/migrate-to-shoehorn/SKILL.md +0 -118
- package/template/.pi/skills/migrate-to-shoehorn/agents/openai.yaml +0 -3
- package/template/.pi/skills/prototype-page-acceptance/SKILL.md +0 -62
- package/template/.pi/skills/scaffold-exercises/SKILL.md +0 -106
- package/template/.pi/skills/scaffold-exercises/agents/openai.yaml +0 -3
- package/template/.pi/skills/setup-pre-commit/SKILL.md +0 -91
- package/template/.pi/skills/setup-pre-commit/agents/openai.yaml +0 -3
- package/template/.pi/skills/setup-ts-deep-modules/SKILL.md +0 -102
- package/template/.pi/skills/setup-ts-deep-modules/agents/openai.yaml +0 -5
- package/template/.pi/skills/setup-ts-deep-modules/dependency-cruiser.config.cjs +0 -95
- package/template/.pi/skills/teach/GLOSSARY-FORMAT.md +0 -35
- package/template/.pi/skills/teach/LEARNING-RECORD-FORMAT.md +0 -46
- package/template/.pi/skills/teach/MISSION-FORMAT.md +0 -31
- package/template/.pi/skills/teach/RESOURCES-FORMAT.md +0 -32
- package/template/.pi/skills/teach/SKILL.md +0 -140
- package/template/.pi/skills/teach/agents/openai.yaml +0 -5
- package/template/.pi/skills/writing-beats/SKILL.md +0 -67
- package/template/.pi/skills/writing-beats/agents/openai.yaml +0 -5
- package/template/.pi/skills/writing-fragments/SKILL.md +0 -79
- package/template/.pi/skills/writing-fragments/agents/openai.yaml +0 -5
- package/template/.pi/skills/writing-shape/SKILL.md +0 -79
- package/template/.pi/skills/writing-shape/agents/openai.yaml +0 -5
- package/template/.pi/skills/yss-microapp-commit/SKILL.md +0 -201
- package/template/.pi/skills/yss-microapp-commit/agents/openai.yaml +0 -5
- package/template/.pi/skills/yss-microapp-commit/references/scope-mapping.md +0 -204
- package/template/.pi/skills/yss-page-module-development/SKILL.md +0 -165
- package/template/.pi/skills/yss-page-module-development/agents/openai.yaml +0 -5
- package/template/.pi/skills/yss-page-module-development/examples/AdvancedFormPage/constant.ts +0 -32
- package/template/.pi/skills/yss-page-module-development/examples/AdvancedFormPage/hooks/useRuleConfig.ts +0 -158
- package/template/.pi/skills/yss-page-module-development/examples/AdvancedFormPage/index.vue +0 -188
- package/template/.pi/skills/yss-page-module-development/examples/AdvancedFormPage/schemas/ruleConfigSchema.ts +0 -256
- package/template/.pi/skills/yss-page-module-development/examples/AdvancedFormPage/style.less +0 -76
- package/template/.pi/skills/yss-page-module-development/examples/StandardListPage/constant.ts +0 -128
- package/template/.pi/skills/yss-page-module-development/examples/StandardListPage/hooks/useQualityRuleList.ts +0 -144
- package/template/.pi/skills/yss-page-module-development/examples/StandardListPage/hooks/useRuleActions.ts +0 -141
- package/template/.pi/skills/yss-page-module-development/examples/StandardListPage/index.vue +0 -175
- package/template/.pi/skills/yss-page-module-development/examples/StandardListPage/style.less +0 -83
- package/template/.pi/skills/yss-page-module-development/references/component-map.md +0 -34
- package/template/.pi/skills/yss-page-module-development/references/frontend-docs.md +0 -11
- package/template/.pi/skills/yss-page-module-development/references/hooks-map.md +0 -11
- package/template/.pi/skills/yss-page-module-development/references/utils-map.md +0 -14
- package/template/.qoder/skills/ask-matt/PHASE-BOUNDARIES.md +0 -55
- package/template/.qoder/skills/ask-matt/SKILL.md +0 -95
- package/template/.qoder/skills/ask-matt/agents/openai.yaml +0 -5
- package/template/.qoder/skills/dispatching-parallel-agents/SKILL.md +0 -185
- package/template/.qoder/skills/loop-me/SKILL.md +0 -32
- package/template/.qoder/skills/loop-me/agents/openai.yaml +0 -5
- package/template/.qoder/skills/migrate-to-shoehorn/SKILL.md +0 -118
- package/template/.qoder/skills/migrate-to-shoehorn/agents/openai.yaml +0 -3
- package/template/.qoder/skills/prototype-page-acceptance/SKILL.md +0 -62
- package/template/.qoder/skills/scaffold-exercises/SKILL.md +0 -106
- package/template/.qoder/skills/scaffold-exercises/agents/openai.yaml +0 -3
- package/template/.qoder/skills/setup-pre-commit/SKILL.md +0 -91
- package/template/.qoder/skills/setup-pre-commit/agents/openai.yaml +0 -3
- package/template/.qoder/skills/setup-ts-deep-modules/SKILL.md +0 -102
- package/template/.qoder/skills/setup-ts-deep-modules/agents/openai.yaml +0 -5
- package/template/.qoder/skills/setup-ts-deep-modules/dependency-cruiser.config.cjs +0 -95
- package/template/.qoder/skills/teach/GLOSSARY-FORMAT.md +0 -35
- package/template/.qoder/skills/teach/LEARNING-RECORD-FORMAT.md +0 -46
- package/template/.qoder/skills/teach/MISSION-FORMAT.md +0 -31
- package/template/.qoder/skills/teach/RESOURCES-FORMAT.md +0 -32
- package/template/.qoder/skills/teach/SKILL.md +0 -140
- package/template/.qoder/skills/teach/agents/openai.yaml +0 -5
- package/template/.qoder/skills/writing-beats/SKILL.md +0 -67
- package/template/.qoder/skills/writing-beats/agents/openai.yaml +0 -5
- package/template/.qoder/skills/writing-fragments/SKILL.md +0 -79
- package/template/.qoder/skills/writing-fragments/agents/openai.yaml +0 -5
- package/template/.qoder/skills/writing-shape/SKILL.md +0 -79
- package/template/.qoder/skills/writing-shape/agents/openai.yaml +0 -5
- package/template/.qoder/skills/yss-microapp-commit/SKILL.md +0 -201
- package/template/.qoder/skills/yss-microapp-commit/agents/openai.yaml +0 -5
- package/template/.qoder/skills/yss-microapp-commit/references/scope-mapping.md +0 -204
- package/template/.qoder/skills/yss-page-module-development/SKILL.md +0 -165
- package/template/.qoder/skills/yss-page-module-development/agents/openai.yaml +0 -5
- package/template/.qoder/skills/yss-page-module-development/examples/AdvancedFormPage/constant.ts +0 -32
- package/template/.qoder/skills/yss-page-module-development/examples/AdvancedFormPage/hooks/useRuleConfig.ts +0 -158
- package/template/.qoder/skills/yss-page-module-development/examples/AdvancedFormPage/index.vue +0 -188
- package/template/.qoder/skills/yss-page-module-development/examples/AdvancedFormPage/schemas/ruleConfigSchema.ts +0 -256
- package/template/.qoder/skills/yss-page-module-development/examples/AdvancedFormPage/style.less +0 -76
- package/template/.qoder/skills/yss-page-module-development/examples/StandardListPage/constant.ts +0 -128
- package/template/.qoder/skills/yss-page-module-development/examples/StandardListPage/hooks/useQualityRuleList.ts +0 -144
- package/template/.qoder/skills/yss-page-module-development/examples/StandardListPage/hooks/useRuleActions.ts +0 -141
- package/template/.qoder/skills/yss-page-module-development/examples/StandardListPage/index.vue +0 -175
- package/template/.qoder/skills/yss-page-module-development/examples/StandardListPage/style.less +0 -83
- package/template/.qoder/skills/yss-page-module-development/references/component-map.md +0 -34
- package/template/.qoder/skills/yss-page-module-development/references/frontend-docs.md +0 -11
- package/template/.qoder/skills/yss-page-module-development/references/hooks-map.md +0 -11
- package/template/.qoder/skills/yss-page-module-development/references/utils-map.md +0 -14
- package/template/.trae/skills/ask-matt/PHASE-BOUNDARIES.md +0 -55
- package/template/.trae/skills/ask-matt/SKILL.md +0 -95
- package/template/.trae/skills/ask-matt/agents/openai.yaml +0 -5
- package/template/.trae/skills/dispatching-parallel-agents/SKILL.md +0 -185
- package/template/.trae/skills/loop-me/SKILL.md +0 -32
- package/template/.trae/skills/loop-me/agents/openai.yaml +0 -5
- package/template/.trae/skills/migrate-to-shoehorn/SKILL.md +0 -118
- package/template/.trae/skills/migrate-to-shoehorn/agents/openai.yaml +0 -3
- package/template/.trae/skills/prototype-page-acceptance/SKILL.md +0 -62
- package/template/.trae/skills/scaffold-exercises/SKILL.md +0 -106
- package/template/.trae/skills/scaffold-exercises/agents/openai.yaml +0 -3
- package/template/.trae/skills/setup-pre-commit/SKILL.md +0 -91
- package/template/.trae/skills/setup-pre-commit/agents/openai.yaml +0 -3
- package/template/.trae/skills/setup-ts-deep-modules/SKILL.md +0 -102
- package/template/.trae/skills/setup-ts-deep-modules/agents/openai.yaml +0 -5
- package/template/.trae/skills/setup-ts-deep-modules/dependency-cruiser.config.cjs +0 -95
- package/template/.trae/skills/teach/GLOSSARY-FORMAT.md +0 -35
- package/template/.trae/skills/teach/LEARNING-RECORD-FORMAT.md +0 -46
- package/template/.trae/skills/teach/MISSION-FORMAT.md +0 -31
- package/template/.trae/skills/teach/RESOURCES-FORMAT.md +0 -32
- package/template/.trae/skills/teach/SKILL.md +0 -140
- package/template/.trae/skills/teach/agents/openai.yaml +0 -5
- package/template/.trae/skills/writing-beats/SKILL.md +0 -67
- package/template/.trae/skills/writing-beats/agents/openai.yaml +0 -5
- package/template/.trae/skills/writing-fragments/SKILL.md +0 -79
- package/template/.trae/skills/writing-fragments/agents/openai.yaml +0 -5
- package/template/.trae/skills/writing-shape/SKILL.md +0 -79
- package/template/.trae/skills/writing-shape/agents/openai.yaml +0 -5
- package/template/.trae/skills/yss-microapp-commit/SKILL.md +0 -201
- package/template/.trae/skills/yss-microapp-commit/agents/openai.yaml +0 -5
- package/template/.trae/skills/yss-microapp-commit/references/scope-mapping.md +0 -204
- package/template/.trae/skills/yss-page-module-development/SKILL.md +0 -165
- package/template/.trae/skills/yss-page-module-development/agents/openai.yaml +0 -5
- package/template/.trae/skills/yss-page-module-development/examples/AdvancedFormPage/constant.ts +0 -32
- package/template/.trae/skills/yss-page-module-development/examples/AdvancedFormPage/hooks/useRuleConfig.ts +0 -158
- package/template/.trae/skills/yss-page-module-development/examples/AdvancedFormPage/index.vue +0 -188
- package/template/.trae/skills/yss-page-module-development/examples/AdvancedFormPage/schemas/ruleConfigSchema.ts +0 -256
- package/template/.trae/skills/yss-page-module-development/examples/AdvancedFormPage/style.less +0 -76
- package/template/.trae/skills/yss-page-module-development/examples/StandardListPage/constant.ts +0 -128
- package/template/.trae/skills/yss-page-module-development/examples/StandardListPage/hooks/useQualityRuleList.ts +0 -144
- package/template/.trae/skills/yss-page-module-development/examples/StandardListPage/hooks/useRuleActions.ts +0 -141
- package/template/.trae/skills/yss-page-module-development/examples/StandardListPage/index.vue +0 -175
- package/template/.trae/skills/yss-page-module-development/examples/StandardListPage/style.less +0 -83
- package/template/.trae/skills/yss-page-module-development/references/component-map.md +0 -34
- package/template/.trae/skills/yss-page-module-development/references/frontend-docs.md +0 -11
- package/template/.trae/skills/yss-page-module-development/references/hooks-map.md +0 -11
- package/template/.trae/skills/yss-page-module-development/references/utils-map.md +0 -14
|
@@ -0,0 +1,259 @@
|
|
|
1
|
+
import { existsSync, lstatSync, readFileSync, mkdirSync, mkdtempSync, renameSync, rmSync, cpSync } from 'node:fs';
|
|
2
|
+
import path from 'node:path';
|
|
3
|
+
import { tmpdir } from 'node:os';
|
|
4
|
+
import { ensure, canonical, digest, hash, json, parse, read, safe, relative, files, write, project, schema, archive, ROOT, sourceApprovalPolicy } from './strategic-handoff-io.mjs';
|
|
5
|
+
import { parseContextSource, parseContextContract, resolveContextTermRefs } from './context-contract.mjs';
|
|
6
|
+
import { countersignRuleForGate } from './digital-human-roles.mjs';
|
|
7
|
+
import { validateApprovalRecord } from './approval-record.mjs';
|
|
8
|
+
import { treeDigest } from './strategic-handoff-io.mjs';
|
|
9
|
+
import { validateVisualBaseline } from '../../.agents/skills/yss-prototype-stage/scripts/visual-baseline-contract.mjs';
|
|
10
|
+
import { extractTraceability, compareIndexes } from './strategic-handoff-rules.mjs';
|
|
11
|
+
const MAX_BYTES = 512 * 1024 * 1024;
|
|
12
|
+
const own = (a,b) => JSON.stringify(canonical(a)) === JSON.stringify(canonical(b));
|
|
13
|
+
const nonempty = x => typeof x === 'string' && x.trim();
|
|
14
|
+
const bytesDigest = (bytes, kind) => kind === 'canonical-json' ? digest(parse(bytes)) : kind === 'sha256-bytes' ? hash(bytes) : (() => { throw new TypeError(`未知摘要算法: ${kind}`); })();
|
|
15
|
+
|
|
16
|
+
async function sourceApproval(record, roles, root) {
|
|
17
|
+
const options={rolesDoc:roles,requireApproved:true,root,read:ref=>readFileSync(safe(root,path.relative(root,ref).split(path.sep).join('/')))};
|
|
18
|
+
if (roles.user_decision_policy.gates.includes(record.gate_id)) {
|
|
19
|
+
ensure(existsSync(path.join(ROOT,'scripts/lib/user-decision.mjs')), '接收工具不支持源用户决定策略,请升级工具后验包');
|
|
20
|
+
const { assertUserDecisionRequirement } = await import('./user-decision.mjs');
|
|
21
|
+
assertUserDecisionRequirement({boundary:record.gate_id,subject_ref:record.subject_ref,scope:record.approval_scope,user_decision_ref:record.user_decision_ref},options);
|
|
22
|
+
}
|
|
23
|
+
validateApprovalRecord(record,options);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
function snapshot(snapshot, source) {
|
|
27
|
+
ensure(snapshot?.context_ref === 'CONTEXT.md' && snapshot.context_schema_version === 1, '源 context snapshot 合同无效');
|
|
28
|
+
const terms = resolveContextTermRefs(source, snapshot.term_refs);
|
|
29
|
+
ensure(snapshot.document_digest === source.document_digest && snapshot.referenced_terms_digest === terms.referenced_terms_digest, '源 CONTEXT snapshot 摘要过期');
|
|
30
|
+
}
|
|
31
|
+
function checkDelta(handoff, source) {
|
|
32
|
+
const used = new Set();
|
|
33
|
+
for (const op of ['added','updated','deprecated']) for (const term of handoff.context_delta[op]) {
|
|
34
|
+
ensure(!used.has(term.term_ref), '术语增量跨分类重复'); used.add(term.term_ref);
|
|
35
|
+
ensure(handoff.source_context_snapshot.term_refs.includes(term.term_ref), `源 snapshot 未引用增量术语: ${term.term_ref}`);
|
|
36
|
+
const actual = source.terms_by_ref.get(term.term_ref);
|
|
37
|
+
ensure(actual, `源术语不存在: ${term.term_ref}`);
|
|
38
|
+
for (const key of ['term','meaning','english_identifier','context_id','forbidden_aliases']) ensure(own(actual[key],term[key]), `源术语增量不一致: ${term.term_ref}.${key}`);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
function localDependency(from, href) {
|
|
42
|
+
if (!href || /^(?:#|https?:|mailto:|data:)/i.test(href)) return null;
|
|
43
|
+
ensure(!/^[a-z][a-z0-9+.-]*:/i.test(href), `不支持的资源协议: ${href}`);
|
|
44
|
+
const clean = decodeURIComponent(href.split(/[?#]/)[0]);
|
|
45
|
+
ensure(!clean.startsWith('/'), `资源必须使用相对路径: ${href}`);
|
|
46
|
+
return relative(path.posix.normalize(path.posix.join(path.posix.dirname(from), clean)));
|
|
47
|
+
}
|
|
48
|
+
function documentLinks(ref, bytes) {
|
|
49
|
+
const text = String(bytes); const result = [];
|
|
50
|
+
if (/\.md$/i.test(ref)) for (const match of text.matchAll(/!?\[[^\]]*\]\(<?([^\s)>]+)>?(?:\s+[^)]*)?\)/g)) { const p=localDependency(ref,match[1]); if(p)result.push(p); }
|
|
51
|
+
return result;
|
|
52
|
+
}
|
|
53
|
+
function previewFiles(root, config) {
|
|
54
|
+
ensure(['H1','H2'].includes(config?.profile), 'package_export.prototype.profile 必须是 H1/H2');
|
|
55
|
+
const preview = safe(root, config.preview_root);
|
|
56
|
+
ensure(lstatSync(preview).isDirectory(), 'preview_root 必须为目录');
|
|
57
|
+
const entry = safe(root, config.entry_ref);
|
|
58
|
+
ensure(entry.startsWith(`${preview}${path.sep}`), '预览入口必须在 preview_root 内');
|
|
59
|
+
const included = files(root, config.preview_root);
|
|
60
|
+
// Structural closure plus an independently captured offline-browser receipt.
|
|
61
|
+
for (const ref of included.filter(x => /\.(html|css)$/i.test(x))) {
|
|
62
|
+
const text=readFileSync(safe(root,ref),'utf8');
|
|
63
|
+
const matches=[...text.matchAll(/(?:src|href)\s*=\s*["']([^"']+)["']/gi), ...text.matchAll(/url\(\s*["']?([^\s)'";]+)["']?\s*\)/gi)];
|
|
64
|
+
for (const match of matches) {
|
|
65
|
+
ensure(!/^(?:https?:)?\/\//i.test(match[1]), `离线预览包含远程资源: ${ref}`);
|
|
66
|
+
const dependency=localDependency(ref,match[1]); if(dependency)ensure(included.includes(dependency),`离线预览资源未打包: ${dependency}`);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
if (config.profile === 'H2') {
|
|
70
|
+
safe(root,config.lock_ref); const source=safe(root,config.source_root);
|
|
71
|
+
ensure(lstatSync(source).isDirectory() && config.lock_ref.startsWith(`${config.source_root}/`), 'H2 缺少源码/锁文件');
|
|
72
|
+
ensure(!files(root,config.source_root).some(x => x.split('/').some(p => ['node_modules','.git'].includes(p))), 'H2 source_root 必须为不含依赖缓存的源码交付目录');
|
|
73
|
+
ensure(config.source_digest===treeDigest(root,config.source_root), 'H2 源码/锁文件批准摘要已过期');
|
|
74
|
+
}
|
|
75
|
+
ensure(config.verification_digest===hash(readFileSync(safe(root,config.verification_ref))), '离线验证记录批准摘要已过期');
|
|
76
|
+
const receipt=read(safe(root,config.verification_ref));
|
|
77
|
+
ensure(receipt.network_mode === 'offline' && receipt.exit_code === 0 && nonempty(receipt.command) && nonempty(receipt.executed_at) && Array.isArray(receipt.case_ids) && receipt.case_ids.length && Array.isArray(receipt.evidence_refs) && receipt.evidence_refs.length, '缺少实际离线浏览验证证据');
|
|
78
|
+
const tree=treeDigest(root,config.preview_root);
|
|
79
|
+
ensure(receipt.preview_digest===tree, '离线预览验证证据已过期');
|
|
80
|
+
for(const ref of receipt.evidence_refs)safe(root,ref);
|
|
81
|
+
return receipt;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export async function inspectSource(root, handoffRef) {
|
|
85
|
+
const handoff=read(safe(root,handoffRef));
|
|
86
|
+
schema(handoff,'docs/process/schemas/strategic-design-handoff.schema.json');
|
|
87
|
+
ensure(handoff.status==='approved', '交接包尚未批准');
|
|
88
|
+
const config=handoff.package_export;
|
|
89
|
+
schema(config,'docs/process/schemas/strategic-handoff-export.schema.json');
|
|
90
|
+
const source=parseContextSource(readFileSync(safe(root,'CONTEXT.md'),'utf8'));
|
|
91
|
+
snapshot(handoff.source_context_snapshot,source); checkDelta(handoff,source);
|
|
92
|
+
const strategy=read(safe(root,handoff.source.domain_strategy_ref.persisted_ref));
|
|
93
|
+
const stage=read(safe(root,handoff.source.stage_decision_package_ref.persisted_ref));
|
|
94
|
+
schema(strategy,'docs/process/schemas/strategic-handoff-domain-strategy.schema.json');
|
|
95
|
+
schema(stage,'docs/process/schemas/strategic-handoff-stage-decision-package.schema.json');
|
|
96
|
+
snapshot(strategy.context_snapshot,source); snapshot(stage.context_snapshot,source);
|
|
97
|
+
ensure(strategy.status==='approved' && stage.status==='approved', '战略合同/方案决策包尚未批准');
|
|
98
|
+
ensure(strategy.domain_strategy_id===handoff.source.domain_strategy_ref.id && strategy.domain_version===handoff.source.domain_strategy_ref.version, '战略身份/版本不一致');
|
|
99
|
+
ensure(stage.stage_decision_id===handoff.source.stage_decision_package_ref.id && stage.package_version===handoff.source.stage_decision_package_ref.version, '阶段包身份/版本不一致');
|
|
100
|
+
ensure(stage.domain_strategy_ref.domain_strategy_id===strategy.domain_strategy_id && stage.domain_strategy_ref.domain_version===strategy.domain_version && stage.domain_strategy_ref.status==='approved' && stage.domain_strategy_ref.persisted_ref===handoff.source.domain_strategy_ref.persisted_ref && stage.domain_strategy_ref.digest===digest(strategy), '阶段包引用的战略内容不一致');
|
|
101
|
+
ensure(!(stage.unresolved_items || []).some(x=>x.type==='blocker'), '阶段包含 blocker');
|
|
102
|
+
const indexes=extractTraceability(strategy);
|
|
103
|
+
const sourceRoles=read(safe(root,'docs/agents/digital-human-roles.yaml'));
|
|
104
|
+
const roles=sourceApprovalPolicy(sourceRoles);
|
|
105
|
+
for (const [artifact, version] of [[strategy,strategy.domain_version],[stage,stage.package_version]]) {
|
|
106
|
+
if(artifact.approval) { const record=read(safe(root,artifact.approval.approval_ref));await sourceApproval(record,roles,root);ensure(artifact.approval.current_version===version,'资产内置批准版本过期'); }
|
|
107
|
+
}
|
|
108
|
+
const terminalGate=countersignRuleForGate(roles.gate_policy,'gate.strategic-design-handoff-approved')?'gate.strategic-design-handoff-approved':'gate.stage-decision-package-approved';
|
|
109
|
+
const expectedGates={domain_strategy_ref:'gate.domain-strategy-approved',stage_decision_package_ref:'gate.stage-decision-package-approved',spec_ref:'gate.spec-baseline-approved',prototype_ref:'gate.user-confirmation',visual_baseline_ref:'gate.user-confirmation',business_ticket_set_ref:terminalGate,handoff:terminalGate};
|
|
110
|
+
const bindings={...handoff.source,handoff:{id:handoff.handoff_id,version:handoff.handoff_version,persisted_ref:handoffRef,status:'approved'}};
|
|
111
|
+
for(const [key,ref] of Object.entries(bindings)) {
|
|
112
|
+
const approval=config.approvals[key];
|
|
113
|
+
ensure(approval,`缺少资产批准绑定: ${key}`);
|
|
114
|
+
ensure(approval.gate_id===expectedGates[key],`资产使用错误批准门禁: ${key}`);
|
|
115
|
+
const bytes=key==='visual_baseline_ref'?null:readFileSync(safe(root,ref.persisted_ref));
|
|
116
|
+
let actual;
|
|
117
|
+
if(key==='visual_baseline_ref') {
|
|
118
|
+
const baseline=read(safe(root,`${ref.persisted_ref}/${ref.manifest_ref}`));
|
|
119
|
+
const result=await validateVisualBaseline(baseline,{bundleRoot:safe(root,ref.persisted_ref)});
|
|
120
|
+
ensure(!result.errors.length,`视觉基线无效: ${result.errors.join('; ')}`);
|
|
121
|
+
ensure(baseline.baseline_id===ref.baseline_id && baseline.version===ref.version && own([...ref.case_ids].sort(),baseline.cases.map(x=>x.case_id).sort()),'视觉基线身份不一致');
|
|
122
|
+
actual=baseline.bundle.digest;
|
|
123
|
+
} else actual=bytesDigest(bytes,approval.digest_kind);
|
|
124
|
+
if(key!=='handoff')ensure(ref.digest===actual,`源资产摘要过期: ${key}`);
|
|
125
|
+
const record=read(safe(root,approval.record_ref));
|
|
126
|
+
await sourceApproval(record,roles,root);
|
|
127
|
+
ensure(record.gate_id===approval.gate_id,`批准门禁不匹配: ${key}`);
|
|
128
|
+
ensure((record.artifact_bindings || []).some(x=>x.id===(ref.id||ref.baseline_id) && x.version===ref.version && x.digest===actual),`批准记录未绑定当前资产: ${key}`);
|
|
129
|
+
}
|
|
130
|
+
const receipt=previewFiles(root,config.prototype);
|
|
131
|
+
ensure(handoff.source.visual_baseline_ref.case_ids.every(id=>receipt.case_ids.includes(id)), '离线验证未覆盖视觉基线 case');
|
|
132
|
+
return {handoff,config,indexes,strategy,stage};
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
function collect(root, handoffRef, handoff, config) {
|
|
136
|
+
const collected=new Map(), queue=[handoffRef,'CONTEXT.md','docs/agents/digital-human-roles.yaml',...Object.values(handoff.source).map(x=>x.persisted_ref),...Object.values(config.approvals).map(x=>x.record_ref),...handoff.evidence_and_version_digests,...config.additional_files,config.prototype.preview_root,config.prototype.verification_ref];
|
|
137
|
+
if(config.prototype.profile==='H2')queue.push(config.prototype.source_root,config.prototype.lock_ref);
|
|
138
|
+
const symbolic=config.reference_map || {};
|
|
139
|
+
const enqueue=ref=> { if(symbolic[ref])queue.push(symbolic[ref]); else if(/^https?:\/\//i.test(ref))return; else if(ref.startsWith('evidence.'))throw new TypeError(`未解析 evidence ID: ${ref}`); else if(ref.includes('/') || /\.(?:md|yaml|json|html|png|txt|log)$/.test(ref))queue.push(ref); };
|
|
140
|
+
function refs(value,key='') {
|
|
141
|
+
if(Array.isArray(value)) { if(key==='evidence_refs') value.forEach(enqueue); else value.forEach(v=>refs(v,key)); }
|
|
142
|
+
else if(value && typeof value==='object') for(const [k,v]of Object.entries(value)) { if(['approval_ref','persisted_ref','user_decision_ref'].includes(k)&&typeof v==='string')enqueue(v); else if(k==='ref'&&typeof v==='string'&&!/^[a-z]+:\/\//i.test(v))enqueue(v); else refs(v,k); }
|
|
143
|
+
}
|
|
144
|
+
while(queue.length) {
|
|
145
|
+
const ref=symbolic[queue[0]]||queue[0]; queue.shift(); if(/^https?:\/\//i.test(ref))continue; relative(ref);
|
|
146
|
+
if(collected.has(ref))continue;
|
|
147
|
+
const full=safe(root,ref),stat=lstatSync(full);
|
|
148
|
+
if(stat.isDirectory()) { queue.push(...files(root,ref)); continue; }
|
|
149
|
+
ensure(stat.isFile() && stat.size<=MAX_BYTES,`源文件类型/大小无效: ${ref}`);
|
|
150
|
+
const bytes=readFileSync(full); collected.set(ref,bytes);
|
|
151
|
+
ensure(collected.size<=20000 && [...collected.values()].reduce((n,b)=>n+b.length,0)<=MAX_BYTES,'交接包大小超限');
|
|
152
|
+
if(/\.(yaml|yml|json)$/.test(ref))refs(parse(bytes));
|
|
153
|
+
queue.push(...documentLinks(ref,bytes));
|
|
154
|
+
}
|
|
155
|
+
return collected;
|
|
156
|
+
}
|
|
157
|
+
function materialize(bundleRoot, manifest, destination) {
|
|
158
|
+
for(const file of manifest.files.filter(x=>x.original_ref))write(destination,file.original_ref,readFileSync(safe(bundleRoot,file.path)));
|
|
159
|
+
}
|
|
160
|
+
export async function openBundle(input, action) {
|
|
161
|
+
const temp=mkdtempSync(path.join(tmpdir(),'yss-handoff-'));
|
|
162
|
+
try {
|
|
163
|
+
ensure(existsSync(input) && !lstatSync(input).isSymbolicLink(),'交接包不存在或是 symlink');
|
|
164
|
+
let root=path.resolve(input);
|
|
165
|
+
if(lstatSync(root).isFile()){ root=path.join(temp,'unpacked');mkdirSync(root);archive('unpack',path.resolve(input),root); }
|
|
166
|
+
const manifest=read(safe(root,'manifest.json'));
|
|
167
|
+
schema(manifest,'docs/process/schemas/strategic-handoff-package.schema.json');
|
|
168
|
+
const {bundle_digest,...body}=manifest;ensure(bundle_digest===digest(body),'包清单摘要不一致');
|
|
169
|
+
const paths=manifest.files.map(x=>x.path);
|
|
170
|
+
ensure(new Set(paths.map(x=>x.toLowerCase())).size===paths.length,'包文件路径重复');
|
|
171
|
+
ensure(own([...paths,'manifest.json'].sort(),files(root).sort()),'包文件缺失或存在未登记文件');
|
|
172
|
+
ensure(manifest.files.length<=20000 && manifest.files.reduce((n,f)=>n+f.size_bytes,0)<=MAX_BYTES,'包大小超限');
|
|
173
|
+
for(const file of manifest.files){const bytes=readFileSync(safe(root,file.path));ensure(bytes.length===file.size_bytes && hash(bytes)===file.sha256,`文件摘要不一致: ${file.path}`);if(file.original_ref)relative(file.original_ref);}
|
|
174
|
+
const originals=manifest.files.filter(x=>x.original_ref).map(x=>x.original_ref);
|
|
175
|
+
ensure(new Set(originals.map(x=>x.toLowerCase())).size===originals.length,'源路径重复');
|
|
176
|
+
const source=path.join(temp,'source');mkdirSync(source);materialize(root,manifest,source);
|
|
177
|
+
const inspected=await inspectSource(source,manifest.handoff_ref);
|
|
178
|
+
ensure(manifest.bundle_id===inspected.handoff.handoff_id && manifest.version===inspected.handoff.handoff_version,'包身份与源交接不一致');
|
|
179
|
+
ensure(own(read(safe(root,'indexes/rules.json')),inspected.indexes.rules) && own(read(safe(root,'indexes/scenarios.json')),inspected.indexes.scenarios),'规则/场景索引与源资产不一致');
|
|
180
|
+
const expected=collect(source,manifest.handoff_ref,inspected.handoff,inspected.config);
|
|
181
|
+
ensure(own([...expected.keys()].sort(),originals.sort()),'源快照闭包不一致');
|
|
182
|
+
const changes=read(safe(root,'indexes/changes.json'));
|
|
183
|
+
ensure(own(changes.previous_bundle,manifest.previous_bundle), '版本差异的前版绑定不一致');
|
|
184
|
+
let previousIndexes;
|
|
185
|
+
if(manifest.previous_bundle){
|
|
186
|
+
const previous=read(safe(root,'indexes/previous-manifest.json'));const{bundle_digest:previousDigest,...previousBody}=previous;
|
|
187
|
+
ensure(previousDigest===digest(previousBody)&&previousDigest===manifest.previous_bundle.digest&&previous.bundle_id===manifest.bundle_id&&previous.version===manifest.previous_bundle.version&&Number(previous.version.slice(1))<Number(manifest.version.slice(1)),'前版清单绑定无效');
|
|
188
|
+
previousIndexes={};
|
|
189
|
+
for(const kind of ['rules','scenarios']){const bytes=readFileSync(safe(root,`indexes/previous-${kind}.json`));const priorFile=previous.files.find(x=>x.path===`indexes/${kind}.json`);ensure(priorFile&&priorFile.sha256===hash(bytes)&&priorFile.size_bytes===bytes.length,'前版索引摘要无效');previousIndexes[kind]=parse(bytes);}
|
|
190
|
+
}
|
|
191
|
+
ensure(own(changes,{previous_bundle:manifest.previous_bundle,...compareIndexes(inspected.indexes,previousIndexes)}),'版本差异与实际索引不一致');
|
|
192
|
+
return await action({root,manifest,...inspected,changes});
|
|
193
|
+
} finally {rmSync(temp,{recursive:true,force:true});}
|
|
194
|
+
}
|
|
195
|
+
export async function exportBundle({sourceRoot,handoffRef,output,zip=false,previous}) {
|
|
196
|
+
const root=project(sourceRoot); parseContextContract({root}); relative(handoffRef);
|
|
197
|
+
const current=await inspectSource(root,handoffRef);
|
|
198
|
+
let prior=null;
|
|
199
|
+
if(previous)prior=await openBundle(previous, b=>({manifest:b.manifest,indexes:b.indexes,handoff:b.handoff,rulesBytes:readFileSync(safe(b.root,'indexes/rules.json')),scenariosBytes:readFileSync(safe(b.root,'indexes/scenarios.json'))}));
|
|
200
|
+
if(prior){ensure(prior.manifest.bundle_id===current.handoff.handoff_id,'前版属于不同交接');ensure(Number(current.handoff.handoff_version.slice(1))>Number(prior.manifest.version.slice(1)),'更新必须提升交接版本');for(const[key,ref]of Object.entries(current.handoff.source)){const old=prior.handoff.source[key];if(old.digest!==ref.digest)ensure(old.version!==ref.version,`源资产内容变化必须提升版本: ${key}`);}}
|
|
201
|
+
const previousBundle=prior?{bundle_id:prior.manifest.bundle_id,version:prior.manifest.version,digest:prior.manifest.bundle_digest}:null;
|
|
202
|
+
const snapshotFiles=collect(root,handoffRef,current.handoff,current.config);
|
|
203
|
+
const target=path.resolve(output);
|
|
204
|
+
ensure(!existsSync(target) && (!zip||!existsSync(`${target}.zip`)),'输出已存在,禁止覆盖');
|
|
205
|
+
ensure(target!==root && !root.startsWith(`${target}${path.sep}`),'输出不能覆盖源仓');
|
|
206
|
+
mkdirSync(path.dirname(target),{recursive:true});
|
|
207
|
+
ensure(path.resolve(path.dirname(target))===path.dirname(target),'输出路径无效');
|
|
208
|
+
const staging=mkdtempSync(path.join(path.dirname(target),'.handoff-staging-'));
|
|
209
|
+
try {
|
|
210
|
+
const entries=[];
|
|
211
|
+
const put=(ref,bytes,original)=>{write(staging,ref,bytes);entries.push({path:ref,sha256:hash(bytes),size_bytes:bytes.length,...(original?{original_ref:original}:{})});};
|
|
212
|
+
for(const [ref,bytes]of [...snapshotFiles].sort(([a],[b])=>a.localeCompare(b))) {
|
|
213
|
+
const dest=ref===handoffRef?'handoff.yaml':ref==='CONTEXT.md'?'payload/source-context.snapshot.md':`payload/files/${ref}`;
|
|
214
|
+
ensure(!dest.endsWith('/CONTEXT.md'),'只允许源根词汇快照,禁止嵌套 CONTEXT.md');put(dest,bytes,ref);
|
|
215
|
+
}
|
|
216
|
+
put('indexes/rules.json',Buffer.from(json(current.indexes.rules)));
|
|
217
|
+
put('indexes/scenarios.json',Buffer.from(json(current.indexes.scenarios)));
|
|
218
|
+
put('indexes/changes.json',Buffer.from(json({previous_bundle:previousBundle,...compareIndexes(current.indexes,prior?.indexes)})));
|
|
219
|
+
if(prior){put('indexes/previous-manifest.json',Buffer.from(json(prior.manifest)));put('indexes/previous-rules.json',prior.rulesBytes);put('indexes/previous-scenarios.json',prior.scenariosBytes);}
|
|
220
|
+
const body={schema_version:1,bundle_id:current.handoff.handoff_id,version:current.handoff.handoff_version,handoff_ref:handoffRef,previous_bundle:previousBundle,files:entries.sort((a,b)=>a.path.localeCompare(b.path))};
|
|
221
|
+
const manifest={...body,bundle_digest:digest(body)};write(staging,'manifest.json',json(manifest));
|
|
222
|
+
await openBundle(staging,()=>null);
|
|
223
|
+
// Recheck every captured source byte before publishing the immutable directory.
|
|
224
|
+
for(const [ref,bytes]of snapshotFiles)ensure(hash(readFileSync(safe(root,ref)))===hash(bytes),`导出期间源文件变化: ${ref}`);
|
|
225
|
+
if(zip)archive('pack',staging,`${staging}.zip`);
|
|
226
|
+
ensure(!existsSync(target),'输出并发冲突');renameSync(staging,target);
|
|
227
|
+
if(zip)renameSync(`${staging}.zip`,`${target}.zip`);
|
|
228
|
+
return {result:'exported',bundle_id:manifest.bundle_id,version:manifest.version,bundle_digest:manifest.bundle_digest,output:target,...(zip?{zip:`${target}.zip`,zip_sha256:hash(readFileSync(`${target}.zip`))}:{})};
|
|
229
|
+
} finally {rmSync(staging,{recursive:true,force:true});rmSync(`${staging}.zip`,{force:true});}
|
|
230
|
+
}
|
|
231
|
+
export async function importBundle({bundle,targetRoot}) {
|
|
232
|
+
const target=project(targetRoot);const context=parseContextContract({root:target});
|
|
233
|
+
return openBundle(bundle,async b=>{
|
|
234
|
+
const rel=`docs/handoffs/${b.manifest.bundle_id}/${b.manifest.version}`,dest=safe(target,rel,{missing:true});
|
|
235
|
+
if(existsSync(dest)) {
|
|
236
|
+
const receipt=read(safe(dest,'import-receipt.json'));
|
|
237
|
+
ensure(receipt.bundle_digest===b.manifest.bundle_digest,'同 ID/version 内容冲突');
|
|
238
|
+
await openBundle(safe(dest,'package'),()=>null);
|
|
239
|
+
return {result:'already-imported',receipt_ref:`${rel}/import-receipt.json`};
|
|
240
|
+
}
|
|
241
|
+
const terms=[];
|
|
242
|
+
for(const operation of ['added','updated','deprecated'])for(const expected of b.handoff.context_delta[operation]) {
|
|
243
|
+
const actual=context.terms_by_ref.get(expected.term_ref);
|
|
244
|
+
const equal=actual&&['term','meaning','english_identifier','context_id','forbidden_aliases'].every(key=>own(expected[key],actual[key]));
|
|
245
|
+
terms.push({operation,term_ref:expected.term_ref,expected,current:actual||null,status:operation==='deprecated'?(actual?'pending':'matched'):(equal?'matched':actual?'conflict':'pending')});
|
|
246
|
+
}
|
|
247
|
+
const rows=[...b.indexes.rules.map(x=>({source_id:x.rule_id,source_digest:x.source_digest,kind:'rule'})),...b.indexes.scenarios.filter(x=>x.critical).map(x=>({source_id:x.scenario_id,source_digest:x.source_digest,kind:'scenario'}))].map(x=>({...x,disposition:'pending',tactical_refs:[],test_seam_refs:[],evidence_refs:[],dependent_slice_refs:[],dependency_status:'unknown'}));
|
|
248
|
+
mkdirSync(path.dirname(dest),{recursive:true});const stage=mkdtempSync(path.join(path.dirname(dest),'.import-staging-'));
|
|
249
|
+
try {
|
|
250
|
+
cpSync(b.root,path.join(stage,'package'),{recursive:true,errorOnExist:true,force:false});
|
|
251
|
+
const receipt={schema_version:1,bundle_id:b.manifest.bundle_id,version:b.manifest.version,bundle_digest:b.manifest.bundle_digest,package_ref:`${rel}/package`,target_context_digest:context.document_digest,status:'pending-context-reconciliation'};
|
|
252
|
+
write(stage,'import-receipt.json',json(receipt));write(stage,'context-reconciliation-draft.json',json({schema_version:1,status:'draft',import_receipt_ref:`${rel}/import-receipt.json`,target_context_digest:context.document_digest,terms}));
|
|
253
|
+
write(stage,'tactical-traceability-draft.json',json({schema_version:1,import_receipt_ref:`${rel}/import-receipt.json`,bundle_digest:b.manifest.bundle_digest,rows}));
|
|
254
|
+
write(stage,'upstream-change-impact.json',json({schema_version:1,previous_bundle:b.manifest.previous_bundle,changed_source_ids:[...b.changes.updated,...b.changes.removed],added_source_ids:b.changes.added,status:'requires-lifecycle-reconciliation',policy:'mark-dependent-tactical-and-slice-contracts-stale; unknown-dependency-blocks-all'}));
|
|
255
|
+
ensure(!existsSync(dest),'导入并发冲突');renameSync(stage,dest);
|
|
256
|
+
return {result:'imported-pending-reconciliation',receipt_ref:`${rel}/import-receipt.json`,traceability_ref:`${rel}/tactical-traceability-draft.json`};
|
|
257
|
+
}finally{rmSync(stage,{recursive:true,force:true});}
|
|
258
|
+
});
|
|
259
|
+
}
|
|
@@ -4,6 +4,7 @@ import { parseDocument } from "../vendor/yaml.mjs";
|
|
|
4
4
|
import { loadDigitalHumanRoles, taskPackageDefaults } from "./digital-human-roles.mjs";
|
|
5
5
|
import { loadRegistry, ROOT } from "./lifecycle-registry.mjs";
|
|
6
6
|
import { loadMaintenanceCheckpoint, validateMaintenanceCheckpoint } from "./maintenance-intensity.mjs";
|
|
7
|
+
import { assertImplementationDecision } from "./user-decision.mjs";
|
|
7
8
|
import { validateNextRoute } from "./lifecycle-transition.mjs";
|
|
8
9
|
import { LEGACY_TASK_PACKAGE_SCHEMA, TASK_PACKAGE_SCHEMA, validateTaskPackageSchema } from "./task-package-schema.mjs";
|
|
9
10
|
|
|
@@ -79,12 +80,18 @@ function validateCommon(value, registry, lifecycle) {
|
|
|
79
80
|
if (completed) {
|
|
80
81
|
if (!value.result || value.result.result !== "completed") fail("resolved/完成任务必须返回 result=completed 的 Workflow Execution Result");
|
|
81
82
|
if (value.workflow_status !== "resolved") fail("result=completed 的任务包必须处于 resolved 状态");
|
|
82
|
-
for (const field of ["result_schema", "work_unit", "workflow_reference", "skill", "changed_files", "evidence_refs", "deferred_seams", "drift", "violation", "new_impacts", "stale_candidates", "next_route", "blocking_signals"]) {
|
|
83
|
+
for (const field of ["result_schema", "work_unit", "workflow_reference", "skill", "changed_files", "context_reconciliation", "evidence_refs", "deferred_seams", "drift", "violation", "new_impacts", "stale_candidates", "next_route", "blocking_signals"]) {
|
|
83
84
|
if (value.result[field] === undefined) fail(`result=completed 时 ${field} 不能为空`);
|
|
84
85
|
}
|
|
85
86
|
if (value.result.result_schema !== "workflow-execution-result-v1") fail("result_schema 必须为 workflow-execution-result-v1");
|
|
86
87
|
if (value.result.work_unit !== value.work_unit_id) fail("Workflow Execution Result.work_unit 必须与任务包 work_unit_id 一致");
|
|
87
|
-
const
|
|
88
|
+
const reconciliation = value.result.context_reconciliation;
|
|
89
|
+
const expectedReconciliationStatus = value.contract.kind === "template-maintenance" ? "not-applicable" : "reconciled";
|
|
90
|
+
if (reconciliation?.status !== expectedReconciliationStatus) fail(`result=completed 时 context_reconciliation.status 必须为 ${expectedReconciliationStatus}`);
|
|
91
|
+
assertReadableEvidenceRef(reconciliation.ref, "context_reconciliation.ref");
|
|
92
|
+
if (!value.result.evidence_refs.includes(reconciliation.ref)) fail("context_reconciliation.ref 必须包含在 result.evidence_refs 中");
|
|
93
|
+
if (expectedReconciliationStatus === "not-applicable" && !reconciliation.reason) fail("template-maintenance 的 context_reconciliation 必须说明 reason");
|
|
94
|
+
const routeResult = validateNextRoute(value.result.work_unit, value.result.next_route, value.result);
|
|
88
95
|
if (routeResult.result !== "allowed") fail(`Workflow Execution Result next_route 非法: ${routeResult.blocking_signals.join(", ")}`);
|
|
89
96
|
value.expected_evidence_files.forEach((ref) => assertReadableEvidenceRef(ref, "expected_evidence_files"));
|
|
90
97
|
if (value.verification_results.length === 0) fail("已完成任务必须包含 verification_results");
|
|
@@ -169,6 +176,7 @@ function validateContract(value, registry, lifecycle) {
|
|
|
169
176
|
for (const field of ["role_id", "runtime_id", "task_package_ref", "contract_id", "contract_version", "allowed_write_paths"]) if (sliceUnit[field] === undefined) fail(`Slice Contract work_unit 缺少 ${field}`);
|
|
170
177
|
if (sliceUnit.role_id !== value.role_id || sliceUnit.runtime_id !== value.runtime_id || sliceUnit.contract_id !== contract.contract_id || sliceUnit.contract_version !== contract.contract_version || sliceUnit.task_package_ref !== value.work_unit_id) fail("任务包与 Slice Contract work_unit 不一致");
|
|
171
178
|
for (const allowed of value.allowed_write_paths) if (!sliceUnit.allowed_write_paths.includes(allowed)) fail(`allowed_write_paths 未获 Slice Contract 授权: ${allowed}`);
|
|
179
|
+
if (value.execution_state === "Worker") assertImplementationDecision({ slice_contract_ref: contract.slice_contract_ref, vertical_slice_ticket_ref: slice.lifecycle_refs.ticket, user_decisions: value.user_decisions });
|
|
172
180
|
}
|
|
173
181
|
|
|
174
182
|
export function validateTaskPackage(value, { rolesDoc, lifecycleDoc } = {}) {
|
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
import { createHash } from "node:crypto";
|
|
2
|
+
import { readFileSync } from "node:fs";
|
|
3
|
+
import path from "node:path";
|
|
4
|
+
import { parseDocument } from "../vendor/yaml.mjs";
|
|
5
|
+
import { ROOT } from "./lifecycle-registry.mjs";
|
|
6
|
+
import { loadDigitalHumanRoles } from "./digital-human-roles.mjs";
|
|
7
|
+
import { validateJsonSchema } from "./json-schema.mjs";
|
|
8
|
+
|
|
9
|
+
export function decisionError(code, detail) {
|
|
10
|
+
const error = new TypeError(`${code}: ${detail}`);
|
|
11
|
+
error.code = code;
|
|
12
|
+
throw error;
|
|
13
|
+
}
|
|
14
|
+
const requireText = (value, label) => {
|
|
15
|
+
if (typeof value !== "string" || !value.trim()) decisionError("user-decision-missing", label);
|
|
16
|
+
};
|
|
17
|
+
const canonical = (value) => Array.isArray(value) ? value.map(canonical) : value && typeof value === "object"
|
|
18
|
+
? Object.fromEntries(Object.keys(value).sort().map((key) => [key, canonical(value[key])])) : value;
|
|
19
|
+
export const decisionDigest = (value) => `sha256:${createHash("sha256").update(typeof value === "string" || Buffer.isBuffer(value) ? value : JSON.stringify(canonical(value))).digest("hex")}`;
|
|
20
|
+
export function requestDigest(request) {
|
|
21
|
+
const { presented_source, ...snapshot } = request;
|
|
22
|
+
return decisionDigest(snapshot);
|
|
23
|
+
}
|
|
24
|
+
export function decisionIO({ root = ROOT, read = (ref) => readFileSync(ref), ...rest } = {}) {
|
|
25
|
+
const resolve = (ref) => /^(?:https?:|\w+:\/\/)/.test(ref) ? ref : path.resolve(root, ref);
|
|
26
|
+
const bytes = (ref) => {
|
|
27
|
+
requireText(ref, "可读引用");
|
|
28
|
+
try { return read(resolve(ref)); } catch { decisionError("user-decision-source-unreadable", ref); }
|
|
29
|
+
};
|
|
30
|
+
const document = (ref) => {
|
|
31
|
+
const doc = parseDocument(String(bytes(ref)), { maxAliasCount: 0, uniqueKeys: true });
|
|
32
|
+
if (doc.errors.length || !doc.toJS()) decisionError("user-decision-source-invalid", ref);
|
|
33
|
+
return doc.toJS({ maxAliasCount: 0 });
|
|
34
|
+
};
|
|
35
|
+
return { root, bytes, document, ...rest };
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
// A capture preserves original author/time/text/reference. It is evidence, not an identity signature.
|
|
39
|
+
function messageFromSource(source, io, policy) {
|
|
40
|
+
if (!source || !policy.source_kinds.includes(source.kind)) decisionError("user-decision-source-invalid", "需要原始消息、会话导出或用户确认文件");
|
|
41
|
+
const raw = io.bytes(source.ref);
|
|
42
|
+
if (decisionDigest(raw) !== source.digest) decisionError("user-decision-source-changed", source.ref);
|
|
43
|
+
const parsed = parseDocument(String(raw), { maxAliasCount: 0, uniqueKeys: true });
|
|
44
|
+
if (parsed.errors.length) decisionError("user-decision-source-invalid", source.ref);
|
|
45
|
+
const capture = parsed.toJS({ maxAliasCount: 0 });
|
|
46
|
+
if (capture?.source_kind !== source.kind || !Array.isArray(capture.messages)) decisionError("user-decision-source-invalid", "来源不是原始消息封装");
|
|
47
|
+
const matches = capture.messages.filter((message) => message.id === source.message_id);
|
|
48
|
+
if (matches.length !== 1) decisionError("user-decision-source-invalid", "消息 ID 缺失或重复");
|
|
49
|
+
const message = matches[0];
|
|
50
|
+
for (const field of ["principal_ref", "original_ref", "sent_at", "text"]) requireText(message[field], `原始消息 ${field}`);
|
|
51
|
+
if (!Number.isFinite(Date.parse(message.sent_at))) decisionError("user-decision-source-invalid", "原始消息时间无效");
|
|
52
|
+
return { ...message, _preceding_message: capture.messages[capture.messages.indexOf(message) - 1] };
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export function renderDecisionRequest(request) {
|
|
56
|
+
return [
|
|
57
|
+
`决定请求 ${request.id} (${requestDigest(request)})`,
|
|
58
|
+
`提问者:${request.requester_ref}`,
|
|
59
|
+
...request.items.flatMap((item) => [
|
|
60
|
+
`事项 ${item.id} / ${item.boundary}:${item.title}`,
|
|
61
|
+
`资产:${item.subject.ref};版本:${item.subject.version};摘要:${item.subject.digest}`,
|
|
62
|
+
`依据:${item.basis.map((asset) => `${asset.ref}@${asset.version} (${asset.digest})`).join(";") || "无额外依据"}`,
|
|
63
|
+
`关键变化:${item.changes}`,
|
|
64
|
+
`范围:${item.scope.join(";")}`,
|
|
65
|
+
`风险:${item.risks.join(";") || "已评估,无已知残余风险"}`,
|
|
66
|
+
`推荐方案:${item.recommendation}`,
|
|
67
|
+
`批准后动作:${item.next_actions.join(";")}`,
|
|
68
|
+
`回复负责人:${item.responder_ref}`,
|
|
69
|
+
]),
|
|
70
|
+
"请明确批准、拒绝或提出修改;多事项回复须说明事项,或明确批准以上全部事项。",
|
|
71
|
+
].join("\n");
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
function checkAsset(asset, io) {
|
|
75
|
+
if (decisionDigest(io.bytes(asset.ref)) !== asset.digest) decisionError("user-decision-stale", asset.ref);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export function validateUserDecision(record, options = {}) {
|
|
79
|
+
const io = decisionIO(options);
|
|
80
|
+
const policy = (options.rolesDoc || loadDigitalHumanRoles()).user_decision_policy;
|
|
81
|
+
validateJsonSchema(record, path.join(ROOT, "docs/process/schemas/user-decision.schema.json"), { label: "用户决定记录" });
|
|
82
|
+
const { request, responses } = record;
|
|
83
|
+
const originalRequest = messageFromSource(request.requester_source, io, policy);
|
|
84
|
+
if (originalRequest.actor_kind !== "biological-human" || originalRequest.principal_ref !== request.requester_ref) decisionError("user-decision-responder-mismatch", "提问者来源不匹配");
|
|
85
|
+
const presentation = messageFromSource(request.presented_source, io, policy);
|
|
86
|
+
const presentedFields = request.items.flatMap((item) => [item.title, item.subject.ref, item.subject.version, item.changes, item.recommendation, ...item.scope, ...item.risks, ...item.next_actions, ...item.basis.flatMap((asset) => [asset.ref, asset.version])]);
|
|
87
|
+
// Preserve equivalent historical presentations without requiring a new templated message.
|
|
88
|
+
if (presentation.text !== renderDecisionRequest(request) && !presentedFields.every((field) => presentation.text.includes(field))) decisionError("user-decision-presentation-mismatch", "原始展示未覆盖当前资产、版本、变化、风险、范围和后续动作");
|
|
89
|
+
if (Date.parse(presentation.sent_at) < Date.parse(originalRequest.sent_at)) decisionError("user-decision-source-invalid", "展示时间早于用户请求");
|
|
90
|
+
const items = new Map();
|
|
91
|
+
for (const item of request.items) {
|
|
92
|
+
if (items.has(item.id)) decisionError("user-decision-ambiguous", "事项 ID 重复");
|
|
93
|
+
items.set(item.id, item);
|
|
94
|
+
if (item.responder_ref !== request.requester_ref) {
|
|
95
|
+
const delegated = messageFromSource(item.delegation_source, io, policy);
|
|
96
|
+
if (delegated.actor_kind !== "biological-human" || delegated.principal_ref !== request.requester_ref || !delegated.text.includes(item.responder_ref) || !delegated.text.includes(item.id)) decisionError("user-decision-delegation-invalid", "负责人须有提问者指向该事项的指定原文");
|
|
97
|
+
if (Date.parse(delegated.sent_at) > Date.parse(presentation.sent_at)) decisionError("user-decision-delegation-invalid", "须先指定负责人再展示当前请求");
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
const outcomes = new Map();
|
|
101
|
+
const messageIds = new Set();
|
|
102
|
+
let previousTime = -Infinity;
|
|
103
|
+
for (const response of responses) {
|
|
104
|
+
const source = messageFromSource(response.source, io, policy);
|
|
105
|
+
const identity = `${response.source.ref}#${response.source.message_id}`;
|
|
106
|
+
if (messageIds.has(identity)) decisionError("user-decision-ambiguous", "回复消息重复");
|
|
107
|
+
messageIds.add(identity);
|
|
108
|
+
if (source.reply_to !== presentation.original_ref && source.request_digest !== requestDigest(request) && !(source._preceding_message?.original_ref === presentation.original_ref && source._preceding_message?.text === presentation.text)) decisionError("user-decision-subject-mismatch", "原始回复没有指向当前请求的来源关联");
|
|
109
|
+
if (source.actor_kind !== "biological-human" || source.principal_ref !== response.principal_ref || source.sent_at !== response.responded_at || source.text !== response.text) decisionError("user-decision-responder-mismatch", "记录与原始回复身份、时间或原文不一致");
|
|
110
|
+
if (response.request_digest !== requestDigest(request)) decisionError("user-decision-stale", "回复绑定的请求快照已变化");
|
|
111
|
+
const time = Date.parse(response.responded_at);
|
|
112
|
+
if (time < Date.parse(presentation.sent_at) || time < previousTime) decisionError("user-decision-source-invalid", "回复须在展示之后并按原始时间排序");
|
|
113
|
+
previousTime = time;
|
|
114
|
+
if (response.decision === "approved") {
|
|
115
|
+
const explicit = source.decision === "approved" && Array.isArray(source.item_ids) && response.item_ids.every((id) => source.item_ids.includes(id));
|
|
116
|
+
if (!explicit && (!/(同意|批准|确认|接受|可以|好的|^好[。!!\s]*$|\b(?:approve|approved|agree|agreed|accept|yes|ok)\b)/i.test(source.text) || /(不同意|不批准|拒绝|反对|不要|需[要]?修改|请修改|暂不|reject|decline|do not approve|don't approve|disagree)/i.test(source.text))) decisionError("user-decision-ambiguous", "原文不能明确支持批准结论");
|
|
117
|
+
if (!explicit && response.selection === "explicit-all" && items.size > 1 && !/(全部|所有|\ball\b)/i.test(source.text)) decisionError("user-decision-ambiguous", "批量批准原文必须明确全部事项");
|
|
118
|
+
if (!explicit && response.selection === "explicit-items" && items.size > 1 && response.item_ids.some((id) => !source.text.includes(id) && !source.text.includes(items.get(id)?.title))) decisionError("user-decision-ambiguous", "原文未指向所选事项");
|
|
119
|
+
}
|
|
120
|
+
if (response.selection === "single" && items.size !== 1) decisionError("user-decision-ambiguous", "多事项不能用单项回复");
|
|
121
|
+
if (items.size > 1 && /^(继续|continue|go ahead)[。.!!\s]*$/i.test(response.text.trim())) decisionError("user-decision-ambiguous", "继续不能解释为批准全部事项");
|
|
122
|
+
if (response.selection === "explicit-all" && (response.item_ids.length !== items.size || [...items.keys()].some((id) => !response.item_ids.includes(id)))) decisionError("user-decision-ambiguous", "全部批准必须枚举全部事项");
|
|
123
|
+
for (const id of response.item_ids) {
|
|
124
|
+
const item = items.get(id);
|
|
125
|
+
if (!item) decisionError("user-decision-subject-mismatch", id);
|
|
126
|
+
if (item.responder_ref !== response.principal_ref) decisionError("user-decision-responder-mismatch", id);
|
|
127
|
+
if (response.decision === "approved" && (response.approved_scope.length === 0 || response.approved_scope.some((scope) => !response.item_ids.some((selected) => items.get(selected)?.scope.includes(scope))))) decisionError("user-decision-scope-mismatch", id);
|
|
128
|
+
const previous = outcomes.get(id);
|
|
129
|
+
if (response.decision === "approved" && previous?.decision === "approved") {
|
|
130
|
+
outcomes.set(id, { ...response, approved_scope: [...new Set([...previous.approved_scope, ...response.approved_scope])] });
|
|
131
|
+
} else outcomes.set(id, response);
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
const validated = [];
|
|
135
|
+
for (const expected of options.expected || []) {
|
|
136
|
+
requireText(expected.boundary, "当前决定边界");
|
|
137
|
+
requireText(expected.subject_ref, "当前资产引用");
|
|
138
|
+
if (!Array.isArray(expected.scope) || expected.scope.length === 0) decisionError("user-decision-scope-mismatch", "当前批准范围缺失");
|
|
139
|
+
const matches = request.items.filter((item) => item.boundary === expected.boundary && item.subject.ref === expected.subject_ref && expected.scope.every((scope) => item.scope.includes(scope)));
|
|
140
|
+
if (matches.length !== 1) decisionError("user-decision-subject-mismatch", expected.boundary);
|
|
141
|
+
const item = matches[0];
|
|
142
|
+
checkAsset(item.subject, io);
|
|
143
|
+
item.basis.forEach((asset) => checkAsset(asset, io));
|
|
144
|
+
const answer = outcomes.get(item.id);
|
|
145
|
+
if (!answer) decisionError("user-decision-response-required", item.id);
|
|
146
|
+
if (answer.decision !== "approved") decisionError("user-decision-not-approved", `${item.id}: ${answer.decision}`);
|
|
147
|
+
if (!expected.scope.every((scope) => answer.approved_scope.includes(scope))) decisionError("user-decision-scope-mismatch", item.id);
|
|
148
|
+
validated.push({ item_id: item.id, boundary: expected.boundary, principal_ref: answer.principal_ref, scope: expected.scope });
|
|
149
|
+
}
|
|
150
|
+
return { request_id: request.id, validated, outcomes: Object.fromEntries([...outcomes].map(([id, answer]) => [id, answer.decision])) };
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
export function verifyUserDecisionFile(ref, options = {}) {
|
|
154
|
+
const io = decisionIO(options);
|
|
155
|
+
requireText(ref, "user_decision_ref");
|
|
156
|
+
return validateUserDecision(io.document(ref), options);
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
export function assertUserDecisionRequirement(requirement, options = {}) {
|
|
160
|
+
if (!requirement) decisionError("user-decision-response-required", "缺少当前决定及其范围");
|
|
161
|
+
return verifyUserDecisionFile(requirement.user_decision_ref, { ...options, expected: [requirement] });
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
export function assertWorkUnitUserDecision(workUnit, state, options = {}) {
|
|
165
|
+
const policy = (options.rolesDoc || loadDigitalHumanRoles()).user_decision_policy;
|
|
166
|
+
const boundaries = [...(policy.work_unit_gates?.[workUnit] || []), ...(policy.work_units[workUnit] ? [policy.work_units[workUnit]] : [])];
|
|
167
|
+
for (const boundary of boundaries) {
|
|
168
|
+
const notApplicable = state?.user_decision_not_applicable?.find((item) => item.boundary === boundary);
|
|
169
|
+
// Only existing conditional technical gates may be untriggered; an executed business decision cannot be skipped.
|
|
170
|
+
if (workUnit === "work-unit.technical-analysis" && notApplicable?.reason?.trim()) continue;
|
|
171
|
+
const requirement = state?.user_decisions?.find((item) => item.boundary === boundary);
|
|
172
|
+
if (!requirement) decisionError("user-decision-response-required", boundary);
|
|
173
|
+
assertUserDecisionRequirement(requirement, options);
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
export function assertImplementationDecision(state, options = {}) {
|
|
178
|
+
const requirement = state?.user_decisions?.find((item) => item.boundary === "implementation-scope");
|
|
179
|
+
const ticketRef = state?.vertical_slice_ticket_ref;
|
|
180
|
+
if (!requirement || !requirement.scope?.includes(ticketRef)) decisionError("user-decision-scope-mismatch", "实施范围必须包含当前切片");
|
|
181
|
+
assertUserDecisionRequirement(requirement, options);
|
|
182
|
+
const io = decisionIO(options);
|
|
183
|
+
const manifest = io.document(requirement.subject_ref);
|
|
184
|
+
const slices = manifest.slices?.filter((slice) => slice.ticket_ref === ticketRef);
|
|
185
|
+
if (manifest.kind !== "implementation-scope" || slices?.length !== 1) decisionError("user-decision-subject-mismatch", "实施范围清单未绑定当前切片");
|
|
186
|
+
const slice = slices[0];
|
|
187
|
+
requireText(state.slice_contract_ref, "当前持久化 Slice 合同引用");
|
|
188
|
+
if (state.slice_contract_ref !== slice.contract?.ref) decisionError("user-decision-subject-mismatch", "当前合同不在批准清单中");
|
|
189
|
+
checkAsset(slice.contract, io);
|
|
190
|
+
const content = io.document(slice.contract.ref);
|
|
191
|
+
const contract = content.slice_contract || content;
|
|
192
|
+
if (contract.lifecycle_refs?.ticket !== ticketRef) decisionError("user-decision-subject-mismatch", "持久化合同的切片引用不匹配");
|
|
193
|
+
for (const [manifestKey, contractKey] of [["repositories", "project_roots"], ["allowed_write_paths", "allowed_write_paths"]]) {
|
|
194
|
+
if (!Array.isArray(slice[manifestKey]) || slice[manifestKey].length === 0 || JSON.stringify([...slice[manifestKey]].sort()) !== JSON.stringify([...(contract.common?.[contractKey] || [])].sort())) decisionError("user-decision-scope-mismatch", manifestKey);
|
|
195
|
+
}
|
|
196
|
+
if (!Array.isArray(slice.baselines) || !slice.baselines.some((asset) => asset.ref === contract.lifecycle_refs?.engineering_baseline)) decisionError("user-decision-scope-mismatch", "工程基线缺失");
|
|
197
|
+
slice.baselines.forEach((asset) => checkAsset(asset, io));
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
export function scaffoldDecisionSnapshot(decision) {
|
|
201
|
+
const { user_confirmation, status, decision_inputs_digest, ...inputs } = decision;
|
|
202
|
+
return inputs;
|
|
203
|
+
}
|
|
204
|
+
export function assertScaffoldUserDecision(decision, options = {}) {
|
|
205
|
+
const confirmation = decision.user_confirmation || {};
|
|
206
|
+
const requirement = { boundary: "scaffold-choice", subject_ref: confirmation.decision_subject_ref, scope: [decision.project_id, decision.confirmed_architecture, decision.decision_inputs_digest], user_decision_ref: confirmation.user_decision_ref };
|
|
207
|
+
assertUserDecisionRequirement(requirement, options);
|
|
208
|
+
const io = decisionIO(options);
|
|
209
|
+
if (decisionDigest(io.document(requirement.subject_ref)) !== decisionDigest(scaffoldDecisionSnapshot(decision))) decisionError("user-decision-stale", "脚手架输入与用户所见快照不一致");
|
|
210
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { parseArgs } from 'node:util';
|
|
3
|
+
import path from 'node:path';
|
|
4
|
+
import { exportBundle, openBundle, importBundle } from './lib/strategic-handoff.mjs';
|
|
5
|
+
try {
|
|
6
|
+
const {values,positionals}=parseArgs({allowPositionals:true,strict:true,options:{'source-root':{type:'string'},handoff:{type:'string'},output:{type:'string'},zip:{type:'boolean'},previous:{type:'string'},bundle:{type:'string'},'target-root':{type:'string'}}});
|
|
7
|
+
const [command]=positionals;
|
|
8
|
+
let result;
|
|
9
|
+
if(command==='export'&&values['source-root']&&values.handoff&&values.output)result=await exportBundle({sourceRoot:values['source-root'],handoffRef:values.handoff,output:values.output,zip:values.zip,previous:values.previous});
|
|
10
|
+
else if(command==='verify'&&values.bundle)result=await openBundle(path.resolve(values.bundle),b=>({result:'verified',bundle_id:b.manifest.bundle_id,version:b.manifest.version,bundle_digest:b.manifest.bundle_digest,rules:b.indexes.rules.length,scenarios:b.indexes.scenarios.length}));
|
|
11
|
+
else if(command==='import'&&values.bundle&&values['target-root'])result=await importBundle({bundle:path.resolve(values.bundle),targetRoot:values['target-root']});
|
|
12
|
+
else throw new TypeError('用法: strategic-handoff export --source-root <repo> --handoff <relative-file> --output <new-dir> [--zip] [--previous <bundle>] | verify --bundle <dir|zip> | import --bundle <dir|zip> --target-root <repo>');
|
|
13
|
+
process.stdout.write(`${JSON.stringify(result,null,2)}\n`);
|
|
14
|
+
}catch(error){process.stderr.write(`${JSON.stringify({result:'blocked',error:error.message})}\n`);process.exitCode=1;}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// Main-template-owned shared handoff implementation; never edits runtime skill projections.
|
|
3
|
+
import { readFileSync, writeFileSync, mkdirSync, existsSync, chmodSync, readdirSync } from 'node:fs';
|
|
4
|
+
import path from 'node:path';
|
|
5
|
+
import { inspectWorkingTreeScope } from './lib/repository-scope-policy.mjs';
|
|
6
|
+
const root=path.resolve(import.meta.dirname,'..');
|
|
7
|
+
const check=process.argv.includes('--check');
|
|
8
|
+
const targets=['submodules/yss-harness-design-agent','submodules/yss-harness-dev-agent'];
|
|
9
|
+
const shared=['scripts/strategic-handoff','scripts/verify-strategic-handoff-consumption','scripts/verify-strategic-handoff-package-scenarios','scripts/verify-strategic-context-import','scripts/verify-strategic-context-import-scenarios','scripts/lib/context-contract.mjs','docs/process/strategic-handoff-package.md','docs/process/schemas/strategic-design-handoff.schema.json',...readdirSync(path.join(root,'scripts/lib')).filter(x=>x.startsWith('strategic-handoff-')||x==='strategic-handoff.mjs').map(x=>`scripts/lib/${x}`),...readdirSync(path.join(root,'docs/process/schemas')).filter(x=>x.startsWith('strategic-handoff-')).map(x=>`docs/process/schemas/${x}`),...readdirSync(path.join(root,'scripts/fixtures/strategic-handoff')).map(x=>`scripts/fixtures/strategic-handoff/${x}`)];
|
|
10
|
+
let differences=[];
|
|
11
|
+
function sync(source,dest){const bytes=readFileSync(source);if(!existsSync(dest)||!bytes.equals(readFileSync(dest))){differences.push(path.relative(root,dest));if(!check){mkdirSync(path.dirname(dest),{recursive:true});writeFileSync(dest,bytes);}}if(!check&&path.basename(path.dirname(dest))==='scripts'&&!path.extname(dest))chmodSync(dest,0o755);}
|
|
12
|
+
for(const kind of ['domain-strategy','stage-decision-package'])sync(path.join(root,`.agents/skills/yss-stage-decision/references/${kind}.schema.json`),path.join(root,`docs/process/schemas/strategic-handoff-${kind}.schema.json`));
|
|
13
|
+
for(const target of targets){
|
|
14
|
+
if(!existsSync(path.join(root,target,'.git')))continue;
|
|
15
|
+
if(!check){const state=inspectWorkingTreeScope(root,{project_root:target,repository_scope:'git-submodule',checkout_state:'attached-branch'});if(!state.writable)throw new Error(`${target}: ${state.violation}`);}
|
|
16
|
+
for(const ref of new Set(shared))sync(path.join(root,ref),path.join(root,target,ref));
|
|
17
|
+
}
|
|
18
|
+
if(check&&differences.length){process.stderr.write(`交接工具同步漂移: ${differences.join(', ')}\n`);process.exitCode=1;}else process.stdout.write(`战略交接共享工具 ${check?'同步检查通过':`同步 ${differences.length} 文件`}\n`);
|
|
@@ -3,10 +3,11 @@ import { parseArgs } from "node:util";
|
|
|
3
3
|
import { validateApprovalRecordFile } from "./lib/approval-record.mjs";
|
|
4
4
|
|
|
5
5
|
try {
|
|
6
|
-
const { positionals } = parseArgs({ allowPositionals: true, strict: true });
|
|
7
|
-
if (positionals.length !== 1) throw new TypeError("用法: scripts/verify-approval-record <approval-record.yaml>");
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
const { positionals, values } = parseArgs({ allowPositionals: true, strict: true, options: { "require-approved": { type: "boolean" }, history: { type: "boolean" } } });
|
|
7
|
+
if (positionals.length !== 1) throw new TypeError("用法: scripts/verify-approval-record [--require-approved | --history] <approval-record.yaml>");
|
|
8
|
+
if (values.history && values["require-approved"]) throw new TypeError("--history 不能用于当前批准校验");
|
|
9
|
+
validateApprovalRecordFile(positionals[0], { requireApproved: !values.history });
|
|
10
|
+
process.stdout.write(!values.history ? "会签及当前用户决定校验通过\n" : "会签记录结构校验通过(不构成放行)\n");
|
|
10
11
|
} catch (error) {
|
|
11
12
|
process.stderr.write(`会签记录校验失败: ${error.message}\n`);
|
|
12
13
|
process.exitCode = 1;
|