create-yss-spec 3.4.1 → 3.4.3
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 +1 -1
- package/package.json +2 -2
- package/template/.agents/skills/.strategic-design-skills-manifest.json +1 -1
- package/template/.agents/skills/archify/SKILL.md +1 -1
- package/template/.agents/skills/code-review/SKILL.md +12 -8
- package/template/.agents/skills/file-export-download/SKILL.md +1 -1
- package/template/.agents/skills/frontend-commit/SKILL.md +1 -1
- package/template/.agents/skills/java-backend-commit/SKILL.md +1 -1
- package/template/.agents/skills/llm-wiki/SKILL.md +1 -6
- package/template/.agents/skills/lombok/SKILL.md +10 -336
- package/template/.agents/skills/lombok/references/annotation-examples.md +307 -0
- package/template/.agents/skills/maintaining-skills/SKILL.md +2 -1
- package/template/.agents/skills/maintaining-skills/references/authoring.md +27 -0
- package/template/.agents/skills/mapstruct/SKILL.md +11 -318
- package/template/.agents/skills/mapstruct/references/annotation-examples.md +300 -0
- package/template/.agents/skills/page-form-module/SKILL.md +1 -1
- package/template/.agents/skills/page-skeleton/SKILL.md +1 -1
- package/template/.agents/skills/theme-token-usage/SKILL.md +1 -1
- package/template/.agents/skills/to-tickets/SKILL.md +1 -1
- package/template/.agents/skills/using-git-worktrees/SKILL.md +1 -1
- package/template/.agents/skills/wayfinder/SKILL.md +1 -1
- package/template/.agents/skills/yedit-table-usage/SKILL.md +1 -1
- package/template/.agents/skills/yss-api-integration/SKILL.md +1 -1
- package/template/.agents/skills/yss-audit-log/SKILL.md +1 -1
- package/template/.agents/skills/yss-cache/SKILL.md +1 -1
- package/template/.agents/skills/yss-ddd-scaffold-generator/SKILL.md +15 -2
- package/template/.agents/skills/yss-ddd-scaffold-generator/assets/templates/pom/application-pom.xml.template +1 -1
- package/template/.agents/skills/yss-ddd-scaffold-generator/assets/templates/pom/parent-pom.xml.template +15 -10
- package/template/.agents/skills/yss-ddd-scaffold-generator/assets/templates/pom/web-pom.xml.template +3 -3
- package/template/.agents/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-parent/SKILL.md +3 -3
- package/template/.agents/skills/yss-ddd-scaffold-generator/scripts/first-slice-compatibility.test.mjs +5 -1
- package/template/.agents/skills/yss-ddd-scaffold-generator/scripts/first-slice-verification.test.mjs +5 -2
- package/template/.agents/skills/yss-ddd-scaffold-generator/scripts/generate_scaffold.mjs +13 -10
- package/template/.agents/skills/yss-ddd-scaffold-generator/scripts/run_first_slice_verification.mjs +2 -1
- package/template/.agents/skills/yss-ddd-scaffold-generator/scripts/run_scaffold_verification.mjs +35 -3
- package/template/.agents/skills/yss-ddd-scaffold-generator/scripts/scaffold-generator.test.mjs +1 -1
- package/template/.agents/skills/yss-distributed-id/SKILL.md +1 -1
- package/template/.agents/skills/yss-dto/SKILL.md +5 -1
- package/template/.agents/skills/yss-excel-mvc/SKILL.md +1 -1
- package/template/.agents/skills/yss-exception/SKILL.md +5 -1
- package/template/.agents/skills/yss-formily-schema-generator/SKILL.md +1 -1
- package/template/.agents/skills/yss-implementation-contract-compiler/SKILL.md +13 -5
- package/template/.agents/skills/yss-implementation-contract-compiler/agents/openai.yaml +1 -1
- package/template/.agents/skills/yss-implementation-contract-compiler/references/compiler-contract.yaml +16 -0
- package/template/.agents/skills/yss-implementation-contract-compiler/references/slice-implementation-contract-v2.md +214 -0
- package/template/.agents/skills/yss-implementation-contract-compiler/references/slice-implementation-contract.md +66 -204
- package/template/.agents/skills/yss-layered-mvc-scaffold-generator/SKILL.md +15 -2
- package/template/.agents/skills/yss-layered-mvc-scaffold-generator/scripts/generate_scaffold.mjs +28 -19
- package/template/.agents/skills/yss-layered-mvc-scaffold-generator/scripts/scaffold-generator.test.mjs +10 -10
- package/template/.agents/skills/yss-mybatis/SKILL.md +4 -0
- package/template/.agents/skills/yss-openapi-draft-review/SKILL.md +1 -1
- package/template/.agents/skills/yss-openapi-governance/SKILL.md +1 -1
- package/template/.agents/skills/yss-product-lifecycle/SKILL.md +4 -4
- package/template/.agents/skills/yss-product-lifecycle/references/orchestration-contract.yaml +7 -2
- package/template/.agents/skills/yss-product-lifecycle/references/orchestration.md +4 -0
- package/template/.agents/skills/yss-product-lifecycle/references/state-model.md +2 -0
- package/template/.agents/skills/yss-product-lifecycle/references/user-decisions.md +23 -3
- package/template/.agents/skills/yss-prototype-stage/SKILL.md +1 -1
- package/template/.agents/skills/yss-repository/SKILL.md +4 -0
- package/template/.agents/skills/yss-research/SKILL.md +1 -1
- package/template/.agents/skills/yss-resilience4j/SKILL.md +1 -1
- package/template/.agents/skills/yss-security-algorithm/SKILL.md +1 -1
- package/template/.agents/skills/yss-tactical-design/SKILL.md +4 -0
- package/template/.agents/skills/yss-technical-design/SKILL.md +4 -0
- package/template/.agents/skills/yss-technical-design/scripts/validate-technical-design.mjs +2 -2
- package/template/.agents/skills/yss-ui/SKILL.md +1 -1
- package/template/.agents/skills/yss-ui-business-page-generation/SKILL.md +1 -1
- package/template/.agents/skills/yss-up-springboot3/SKILL.md +1 -1
- package/template/.agents/skills/yss-use-table-height/SKILL.md +1 -1
- package/template/.agents/skills/yss-use-tree-height/SKILL.md +1 -1
- package/template/.agents/skills/yss-userinfo/SKILL.md +1 -1
- package/template/.agents/skills/yss-validation/SKILL.md +5 -1
- package/template/.agents/skills/yss-web-controller/SKILL.md +5 -1
- package/template/.agents/skills/yss-web-controller/scripts/generate_controller.mjs +5 -2
- package/template/.agents/skills/ytable-usage/SKILL.md +1 -1
- package/template/.agents/skills/ytree-usage/SKILL.md +1 -1
- package/template/.codex/skills/archify/SKILL.md +1 -1
- package/template/.codex/skills/code-review/SKILL.md +12 -8
- package/template/.codex/skills/data-analytics/skills/analyze-data-quality/SKILL.md +1 -1
- package/template/.codex/skills/data-analytics/skills/build-dashboard/SKILL.md +1 -1
- package/template/.codex/skills/data-analytics/skills/build-report/SKILL.md +1 -1
- package/template/.codex/skills/data-analytics/skills/design-kpis/SKILL.md +1 -1
- package/template/.codex/skills/data-analytics/skills/gather-business-context/SKILL.md +1 -1
- package/template/.codex/skills/data-analytics/skills/index/SKILL.md +1 -1
- package/template/.codex/skills/data-analytics/skills/jupyter-notebooks/SKILL.md +1 -1
- package/template/.codex/skills/data-analytics/skills/kpi-reporting/SKILL.md +1 -1
- package/template/.codex/skills/data-analytics/skills/market-sizing/SKILL.md +1 -1
- package/template/.codex/skills/data-analytics/skills/metric-diagnostics/SKILL.md +1 -1
- package/template/.codex/skills/data-analytics/skills/product-business-analysis/SKILL.md +1 -1
- package/template/.codex/skills/data-analytics/skills/spreadsheets/SKILL.md +1 -1
- package/template/.codex/skills/data-analytics/skills/validate-data/SKILL.md +1 -1
- package/template/.codex/skills/data-analytics/skills/visualize-data/SKILL.md +1 -1
- package/template/.codex/skills/file-export-download/SKILL.md +1 -1
- package/template/.codex/skills/frontend-commit/SKILL.md +1 -1
- package/template/.codex/skills/java-backend-commit/SKILL.md +1 -1
- package/template/.codex/skills/llm-wiki/SKILL.md +1 -6
- package/template/.codex/skills/lombok/SKILL.md +10 -336
- package/template/.codex/skills/lombok/references/annotation-examples.md +307 -0
- package/template/.codex/skills/maintaining-skills/SKILL.md +2 -1
- package/template/.codex/skills/maintaining-skills/references/authoring.md +27 -0
- package/template/.codex/skills/mapstruct/SKILL.md +11 -318
- package/template/.codex/skills/mapstruct/references/annotation-examples.md +300 -0
- package/template/.codex/skills/page-form-module/SKILL.md +1 -1
- package/template/.codex/skills/page-skeleton/SKILL.md +1 -1
- package/template/.codex/skills/product-design/skills/audit/SKILL.md +1 -1
- package/template/.codex/skills/product-design/skills/design-qa/SKILL.md +1 -1
- package/template/.codex/skills/product-design/skills/get-context/SKILL.md +1 -1
- package/template/.codex/skills/product-design/skills/ideate/SKILL.md +1 -1
- package/template/.codex/skills/product-design/skills/image-to-code/SKILL.md +1 -1
- package/template/.codex/skills/product-design/skills/index/SKILL.md +1 -1
- package/template/.codex/skills/product-design/skills/prototype/SKILL.md +1 -1
- package/template/.codex/skills/product-design/skills/research/SKILL.md +1 -1
- package/template/.codex/skills/product-design/skills/user-context/SKILL.md +1 -1
- package/template/.codex/skills/theme-token-usage/SKILL.md +1 -1
- package/template/.codex/skills/to-tickets/SKILL.md +1 -1
- package/template/.codex/skills/using-git-worktrees/SKILL.md +1 -1
- package/template/.codex/skills/wayfinder/SKILL.md +1 -1
- package/template/.codex/skills/yedit-table-usage/SKILL.md +1 -1
- package/template/.codex/skills/yss-api-integration/SKILL.md +1 -1
- package/template/.codex/skills/yss-audit-log/SKILL.md +1 -1
- package/template/.codex/skills/yss-cache/SKILL.md +1 -1
- package/template/.codex/skills/yss-ddd-scaffold-generator/SKILL.md +15 -2
- package/template/.codex/skills/yss-ddd-scaffold-generator/assets/templates/pom/application-pom.xml.template +1 -1
- package/template/.codex/skills/yss-ddd-scaffold-generator/assets/templates/pom/parent-pom.xml.template +15 -10
- package/template/.codex/skills/yss-ddd-scaffold-generator/assets/templates/pom/web-pom.xml.template +3 -3
- package/template/.codex/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-parent/SKILL.md +3 -3
- package/template/.codex/skills/yss-ddd-scaffold-generator/scripts/first-slice-compatibility.test.mjs +5 -1
- package/template/.codex/skills/yss-ddd-scaffold-generator/scripts/first-slice-verification.test.mjs +5 -2
- package/template/.codex/skills/yss-ddd-scaffold-generator/scripts/generate_scaffold.mjs +13 -10
- package/template/.codex/skills/yss-ddd-scaffold-generator/scripts/run_first_slice_verification.mjs +2 -1
- package/template/.codex/skills/yss-ddd-scaffold-generator/scripts/run_scaffold_verification.mjs +35 -3
- package/template/.codex/skills/yss-ddd-scaffold-generator/scripts/scaffold-generator.test.mjs +1 -1
- package/template/.codex/skills/yss-distributed-id/SKILL.md +1 -1
- package/template/.codex/skills/yss-dto/SKILL.md +5 -1
- package/template/.codex/skills/yss-excel-mvc/SKILL.md +1 -1
- package/template/.codex/skills/yss-exception/SKILL.md +5 -1
- package/template/.codex/skills/yss-formily-schema-generator/SKILL.md +1 -1
- package/template/.codex/skills/yss-implementation-contract-compiler/SKILL.md +13 -5
- package/template/.codex/skills/yss-implementation-contract-compiler/agents/openai.yaml +1 -1
- package/template/.codex/skills/yss-implementation-contract-compiler/references/compiler-contract.yaml +16 -0
- package/template/.codex/skills/yss-implementation-contract-compiler/references/slice-implementation-contract-v2.md +214 -0
- package/template/.codex/skills/yss-implementation-contract-compiler/references/slice-implementation-contract.md +66 -204
- package/template/.codex/skills/yss-layered-mvc-scaffold-generator/SKILL.md +15 -2
- package/template/.codex/skills/yss-layered-mvc-scaffold-generator/scripts/generate_scaffold.mjs +28 -19
- package/template/.codex/skills/yss-layered-mvc-scaffold-generator/scripts/scaffold-generator.test.mjs +10 -10
- package/template/.codex/skills/yss-mybatis/SKILL.md +4 -0
- package/template/.codex/skills/yss-openapi-draft-review/SKILL.md +1 -1
- package/template/.codex/skills/yss-openapi-governance/SKILL.md +1 -1
- package/template/.codex/skills/yss-product-lifecycle/SKILL.md +4 -4
- package/template/.codex/skills/yss-product-lifecycle/references/orchestration-contract.yaml +7 -2
- package/template/.codex/skills/yss-product-lifecycle/references/orchestration.md +4 -0
- package/template/.codex/skills/yss-product-lifecycle/references/state-model.md +2 -0
- package/template/.codex/skills/yss-product-lifecycle/references/user-decisions.md +23 -3
- package/template/.codex/skills/yss-prototype-stage/SKILL.md +1 -1
- package/template/.codex/skills/yss-repository/SKILL.md +4 -0
- package/template/.codex/skills/yss-research/SKILL.md +1 -1
- package/template/.codex/skills/yss-resilience4j/SKILL.md +1 -1
- package/template/.codex/skills/yss-security-algorithm/SKILL.md +1 -1
- package/template/.codex/skills/yss-tactical-design/SKILL.md +4 -0
- package/template/.codex/skills/yss-technical-design/SKILL.md +4 -0
- package/template/.codex/skills/yss-technical-design/scripts/validate-technical-design.mjs +2 -2
- package/template/.codex/skills/yss-ui/SKILL.md +1 -1
- package/template/.codex/skills/yss-ui-business-page-generation/SKILL.md +1 -1
- package/template/.codex/skills/yss-up-springboot3/SKILL.md +1 -1
- package/template/.codex/skills/yss-use-table-height/SKILL.md +1 -1
- package/template/.codex/skills/yss-use-tree-height/SKILL.md +1 -1
- package/template/.codex/skills/yss-userinfo/SKILL.md +1 -1
- package/template/.codex/skills/yss-validation/SKILL.md +5 -1
- package/template/.codex/skills/yss-web-controller/SKILL.md +5 -1
- package/template/.codex/skills/yss-web-controller/scripts/generate_controller.mjs +5 -2
- package/template/.codex/skills/ytable-usage/SKILL.md +1 -1
- package/template/.codex/skills/ytree-usage/SKILL.md +1 -1
- package/template/.cursor/skills/archify/SKILL.md +1 -1
- package/template/.cursor/skills/code-review/SKILL.md +12 -8
- package/template/.cursor/skills/file-export-download/SKILL.md +1 -1
- package/template/.cursor/skills/frontend-commit/SKILL.md +1 -1
- package/template/.cursor/skills/java-backend-commit/SKILL.md +1 -1
- package/template/.cursor/skills/llm-wiki/SKILL.md +1 -6
- package/template/.cursor/skills/lombok/SKILL.md +10 -336
- package/template/.cursor/skills/lombok/references/annotation-examples.md +307 -0
- package/template/.cursor/skills/maintaining-skills/SKILL.md +2 -1
- package/template/.cursor/skills/maintaining-skills/references/authoring.md +27 -0
- package/template/.cursor/skills/mapstruct/SKILL.md +11 -318
- package/template/.cursor/skills/mapstruct/references/annotation-examples.md +300 -0
- package/template/.cursor/skills/page-form-module/SKILL.md +1 -1
- package/template/.cursor/skills/page-skeleton/SKILL.md +1 -1
- package/template/.cursor/skills/theme-token-usage/SKILL.md +1 -1
- package/template/.cursor/skills/to-tickets/SKILL.md +1 -1
- package/template/.cursor/skills/using-git-worktrees/SKILL.md +1 -1
- package/template/.cursor/skills/wayfinder/SKILL.md +1 -1
- package/template/.cursor/skills/yedit-table-usage/SKILL.md +1 -1
- package/template/.cursor/skills/yss-api-integration/SKILL.md +1 -1
- package/template/.cursor/skills/yss-audit-log/SKILL.md +1 -1
- package/template/.cursor/skills/yss-cache/SKILL.md +1 -1
- package/template/.cursor/skills/yss-ddd-scaffold-generator/SKILL.md +15 -2
- package/template/.cursor/skills/yss-ddd-scaffold-generator/assets/templates/pom/application-pom.xml.template +1 -1
- package/template/.cursor/skills/yss-ddd-scaffold-generator/assets/templates/pom/parent-pom.xml.template +15 -10
- package/template/.cursor/skills/yss-ddd-scaffold-generator/assets/templates/pom/web-pom.xml.template +3 -3
- package/template/.cursor/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-parent/SKILL.md +3 -3
- package/template/.cursor/skills/yss-ddd-scaffold-generator/scripts/first-slice-compatibility.test.mjs +5 -1
- package/template/.cursor/skills/yss-ddd-scaffold-generator/scripts/first-slice-verification.test.mjs +5 -2
- package/template/.cursor/skills/yss-ddd-scaffold-generator/scripts/generate_scaffold.mjs +13 -10
- package/template/.cursor/skills/yss-ddd-scaffold-generator/scripts/run_first_slice_verification.mjs +2 -1
- package/template/.cursor/skills/yss-ddd-scaffold-generator/scripts/run_scaffold_verification.mjs +35 -3
- package/template/.cursor/skills/yss-ddd-scaffold-generator/scripts/scaffold-generator.test.mjs +1 -1
- package/template/.cursor/skills/yss-distributed-id/SKILL.md +1 -1
- package/template/.cursor/skills/yss-dto/SKILL.md +5 -1
- package/template/.cursor/skills/yss-excel-mvc/SKILL.md +1 -1
- package/template/.cursor/skills/yss-exception/SKILL.md +5 -1
- package/template/.cursor/skills/yss-formily-schema-generator/SKILL.md +1 -1
- package/template/.cursor/skills/yss-implementation-contract-compiler/SKILL.md +13 -5
- package/template/.cursor/skills/yss-implementation-contract-compiler/agents/openai.yaml +1 -1
- package/template/.cursor/skills/yss-implementation-contract-compiler/references/compiler-contract.yaml +16 -0
- package/template/.cursor/skills/yss-implementation-contract-compiler/references/slice-implementation-contract-v2.md +214 -0
- package/template/.cursor/skills/yss-implementation-contract-compiler/references/slice-implementation-contract.md +66 -204
- package/template/.cursor/skills/yss-layered-mvc-scaffold-generator/SKILL.md +15 -2
- package/template/.cursor/skills/yss-layered-mvc-scaffold-generator/scripts/generate_scaffold.mjs +28 -19
- package/template/.cursor/skills/yss-layered-mvc-scaffold-generator/scripts/scaffold-generator.test.mjs +10 -10
- package/template/.cursor/skills/yss-mybatis/SKILL.md +4 -0
- package/template/.cursor/skills/yss-openapi-draft-review/SKILL.md +1 -1
- package/template/.cursor/skills/yss-openapi-governance/SKILL.md +1 -1
- package/template/.cursor/skills/yss-product-lifecycle/SKILL.md +4 -4
- package/template/.cursor/skills/yss-product-lifecycle/references/orchestration-contract.yaml +7 -2
- package/template/.cursor/skills/yss-product-lifecycle/references/orchestration.md +4 -0
- package/template/.cursor/skills/yss-product-lifecycle/references/state-model.md +2 -0
- package/template/.cursor/skills/yss-product-lifecycle/references/user-decisions.md +23 -3
- package/template/.cursor/skills/yss-prototype-stage/SKILL.md +1 -1
- package/template/.cursor/skills/yss-repository/SKILL.md +4 -0
- package/template/.cursor/skills/yss-research/SKILL.md +1 -1
- package/template/.cursor/skills/yss-resilience4j/SKILL.md +1 -1
- package/template/.cursor/skills/yss-security-algorithm/SKILL.md +1 -1
- package/template/.cursor/skills/yss-tactical-design/SKILL.md +4 -0
- package/template/.cursor/skills/yss-technical-design/SKILL.md +4 -0
- package/template/.cursor/skills/yss-technical-design/scripts/validate-technical-design.mjs +2 -2
- package/template/.cursor/skills/yss-ui/SKILL.md +1 -1
- package/template/.cursor/skills/yss-ui-business-page-generation/SKILL.md +1 -1
- package/template/.cursor/skills/yss-up-springboot3/SKILL.md +1 -1
- package/template/.cursor/skills/yss-use-table-height/SKILL.md +1 -1
- package/template/.cursor/skills/yss-use-tree-height/SKILL.md +1 -1
- package/template/.cursor/skills/yss-userinfo/SKILL.md +1 -1
- package/template/.cursor/skills/yss-validation/SKILL.md +5 -1
- package/template/.cursor/skills/yss-web-controller/SKILL.md +5 -1
- package/template/.cursor/skills/yss-web-controller/scripts/generate_controller.mjs +5 -2
- package/template/.cursor/skills/ytable-usage/SKILL.md +1 -1
- package/template/.cursor/skills/ytree-usage/SKILL.md +1 -1
- package/template/.pi/skills/archify/SKILL.md +1 -1
- package/template/.pi/skills/code-review/SKILL.md +12 -8
- package/template/.pi/skills/file-export-download/SKILL.md +1 -1
- package/template/.pi/skills/frontend-commit/SKILL.md +1 -1
- package/template/.pi/skills/java-backend-commit/SKILL.md +1 -1
- package/template/.pi/skills/llm-wiki/SKILL.md +1 -6
- package/template/.pi/skills/lombok/SKILL.md +10 -336
- package/template/.pi/skills/lombok/references/annotation-examples.md +307 -0
- package/template/.pi/skills/maintaining-skills/SKILL.md +2 -1
- package/template/.pi/skills/maintaining-skills/references/authoring.md +27 -0
- package/template/.pi/skills/mapstruct/SKILL.md +11 -318
- package/template/.pi/skills/mapstruct/references/annotation-examples.md +300 -0
- package/template/.pi/skills/page-form-module/SKILL.md +1 -1
- package/template/.pi/skills/page-skeleton/SKILL.md +1 -1
- package/template/.pi/skills/theme-token-usage/SKILL.md +1 -1
- package/template/.pi/skills/to-tickets/SKILL.md +1 -1
- package/template/.pi/skills/using-git-worktrees/SKILL.md +1 -1
- package/template/.pi/skills/wayfinder/SKILL.md +1 -1
- package/template/.pi/skills/yedit-table-usage/SKILL.md +1 -1
- package/template/.pi/skills/yss-api-integration/SKILL.md +1 -1
- package/template/.pi/skills/yss-audit-log/SKILL.md +1 -1
- package/template/.pi/skills/yss-cache/SKILL.md +1 -1
- package/template/.pi/skills/yss-ddd-scaffold-generator/SKILL.md +15 -2
- package/template/.pi/skills/yss-ddd-scaffold-generator/assets/templates/pom/application-pom.xml.template +1 -1
- package/template/.pi/skills/yss-ddd-scaffold-generator/assets/templates/pom/parent-pom.xml.template +15 -10
- package/template/.pi/skills/yss-ddd-scaffold-generator/assets/templates/pom/web-pom.xml.template +3 -3
- package/template/.pi/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-parent/SKILL.md +3 -3
- package/template/.pi/skills/yss-ddd-scaffold-generator/scripts/first-slice-compatibility.test.mjs +5 -1
- package/template/.pi/skills/yss-ddd-scaffold-generator/scripts/first-slice-verification.test.mjs +5 -2
- package/template/.pi/skills/yss-ddd-scaffold-generator/scripts/generate_scaffold.mjs +13 -10
- package/template/.pi/skills/yss-ddd-scaffold-generator/scripts/run_first_slice_verification.mjs +2 -1
- package/template/.pi/skills/yss-ddd-scaffold-generator/scripts/run_scaffold_verification.mjs +35 -3
- package/template/.pi/skills/yss-ddd-scaffold-generator/scripts/scaffold-generator.test.mjs +1 -1
- package/template/.pi/skills/yss-distributed-id/SKILL.md +1 -1
- package/template/.pi/skills/yss-dto/SKILL.md +5 -1
- package/template/.pi/skills/yss-excel-mvc/SKILL.md +1 -1
- package/template/.pi/skills/yss-exception/SKILL.md +5 -1
- package/template/.pi/skills/yss-formily-schema-generator/SKILL.md +1 -1
- package/template/.pi/skills/yss-implementation-contract-compiler/SKILL.md +13 -5
- package/template/.pi/skills/yss-implementation-contract-compiler/agents/openai.yaml +1 -1
- package/template/.pi/skills/yss-implementation-contract-compiler/references/compiler-contract.yaml +16 -0
- package/template/.pi/skills/yss-implementation-contract-compiler/references/slice-implementation-contract-v2.md +214 -0
- package/template/.pi/skills/yss-implementation-contract-compiler/references/slice-implementation-contract.md +66 -204
- package/template/.pi/skills/yss-layered-mvc-scaffold-generator/SKILL.md +15 -2
- package/template/.pi/skills/yss-layered-mvc-scaffold-generator/scripts/generate_scaffold.mjs +28 -19
- package/template/.pi/skills/yss-layered-mvc-scaffold-generator/scripts/scaffold-generator.test.mjs +10 -10
- package/template/.pi/skills/yss-mybatis/SKILL.md +4 -0
- package/template/.pi/skills/yss-openapi-draft-review/SKILL.md +1 -1
- package/template/.pi/skills/yss-openapi-governance/SKILL.md +1 -1
- package/template/.pi/skills/yss-product-lifecycle/SKILL.md +4 -4
- package/template/.pi/skills/yss-product-lifecycle/references/orchestration-contract.yaml +7 -2
- package/template/.pi/skills/yss-product-lifecycle/references/orchestration.md +4 -0
- package/template/.pi/skills/yss-product-lifecycle/references/state-model.md +2 -0
- package/template/.pi/skills/yss-product-lifecycle/references/user-decisions.md +23 -3
- package/template/.pi/skills/yss-prototype-stage/SKILL.md +1 -1
- package/template/.pi/skills/yss-repository/SKILL.md +4 -0
- package/template/.pi/skills/yss-research/SKILL.md +1 -1
- package/template/.pi/skills/yss-resilience4j/SKILL.md +1 -1
- package/template/.pi/skills/yss-security-algorithm/SKILL.md +1 -1
- package/template/.pi/skills/yss-tactical-design/SKILL.md +4 -0
- package/template/.pi/skills/yss-technical-design/SKILL.md +4 -0
- package/template/.pi/skills/yss-technical-design/scripts/validate-technical-design.mjs +2 -2
- package/template/.pi/skills/yss-ui/SKILL.md +1 -1
- package/template/.pi/skills/yss-ui-business-page-generation/SKILL.md +1 -1
- package/template/.pi/skills/yss-up-springboot3/SKILL.md +1 -1
- package/template/.pi/skills/yss-use-table-height/SKILL.md +1 -1
- package/template/.pi/skills/yss-use-tree-height/SKILL.md +1 -1
- package/template/.pi/skills/yss-userinfo/SKILL.md +1 -1
- package/template/.pi/skills/yss-validation/SKILL.md +5 -1
- package/template/.pi/skills/yss-web-controller/SKILL.md +5 -1
- package/template/.pi/skills/yss-web-controller/scripts/generate_controller.mjs +5 -2
- package/template/.pi/skills/ytable-usage/SKILL.md +1 -1
- package/template/.pi/skills/ytree-usage/SKILL.md +1 -1
- package/template/AGENTS.md +1 -0
- package/template/CONTEXT.md +2 -1
- package/template/docs/agents/backend-architecture-profiles.md +1 -1
- package/template/docs/agents/digital-human-roles.yaml +25 -1
- package/template/docs/agents/issue-tracker.md +2 -0
- package/template/docs/engineering/backend-platforms.json +174 -0
- package/template/docs/engineering/backend-platforms.md +77 -0
- package/template/docs/process/MATT-POCOCK-ENGINEERING-SKILLS.md +1 -0
- package/template/docs/process/harness-process-tailoring.md +9 -1
- package/template/docs/process/lifecycle-artifact-map.md +4 -4
- package/template/docs/process/lifecycle-registry-baseline.json +1 -1
- package/template/docs/process/lifecycle-registry.yaml +4 -4
- package/template/docs/process/schemas/backend-architecture-identity.schema.json +91 -0
- package/template/docs/process/schemas/digital-human-task-package.schema.json +2 -1
- package/template/docs/process/schemas/lifecycle-checkpoint.schema.json +4 -0
- package/template/docs/process/schemas/project-scaffold-contract.schema.json +602 -83
- package/template/docs/process/schemas/scaffold-architecture-decisions.schema.json +323 -39
- package/template/docs/process/schemas/slice-implementation-contract-v3.schema.json +925 -0
- package/template/docs/templates/approval-record-template.yaml +2 -0
- package/template/docs/templates/vertical-slice-ticket-template.md +22 -31
- package/template/scripts/backend-platforms +14 -0
- package/template/scripts/lib/approval-record.mjs +32 -6
- package/template/scripts/lib/approved-execution-context.mjs +31 -8
- package/template/scripts/lib/backend-architecture.mjs +6 -0
- package/template/scripts/lib/backend-platform-provenance.mjs +67 -0
- package/template/scripts/lib/backend-platform-verification.mjs +210 -0
- package/template/scripts/lib/backend-platform.mjs +175 -0
- package/template/scripts/lib/backend-scaffold-prerequisites.mjs +1 -1
- package/template/scripts/lib/decision-continuation.mjs +79 -0
- package/template/scripts/lib/delivery-preflight.mjs +6 -5
- package/template/scripts/lib/digital-human-roles.mjs +10 -0
- package/template/scripts/lib/frontend-delivery-boundary.mjs +3 -0
- package/template/scripts/lib/implementation-contract-compiler.mjs +42 -9
- package/template/scripts/lib/lifecycle-controls.mjs +2 -2
- package/template/scripts/lib/lifecycle-transition.mjs +3 -1
- package/template/scripts/lib/plan-spec-entry.mjs +3 -3
- package/template/scripts/lib/scaffold-local-database.mjs +1 -0
- package/template/scripts/lib/slice-applicability.mjs +10 -0
- package/template/scripts/lib/slice-contract-preparation.mjs +257 -0
- package/template/scripts/lib/slice-contract-views.mjs +52 -0
- package/template/scripts/lib/slice-contract.mjs +211 -0
- package/template/scripts/lib/slice-repositories.mjs +49 -0
- package/template/scripts/lib/slice-task-package.mjs +66 -0
- package/template/scripts/lib/strategic-handoff.mjs +12 -1
- package/template/scripts/lib/task-package.mjs +6 -2
- package/template/scripts/lib/technical-design-boundary.mjs +1 -0
- package/template/scripts/lib/user-decision-reuse.mjs +1 -0
- package/template/scripts/lib/user-decision.mjs +4 -1
- package/template/scripts/preflight-delivery +2 -2
- package/template/scripts/slice-contract +30 -0
- package/template/scripts/verify-backend-platform-matrix +69 -0
- package/template/scripts/verify-scaffold-architecture-decisions +5 -0
- package/template/scripts/verify-user-decision +7 -2
- package/template/skills-lock.json +60 -55
- package/template.snapshot.json +3 -3
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import {enforceHarnessTaskScope} from './harness-execution-scope.mjs';
|
|
2
|
+
import { readFileSync } from 'node:fs';
|
|
3
|
+
import { ROOT, hash, safe, digest } from './strategic-handoff-io.mjs';
|
|
4
|
+
import { normalizeSliceContract, withinSlicePath, parseSliceYaml } from './slice-contract.mjs';
|
|
5
|
+
import { createApprovedExecutionContext, assertApprovedExecutionContext } from './approved-execution-context.mjs';
|
|
6
|
+
import { assertImplementationDecision } from './user-decision.mjs';
|
|
7
|
+
import { taskPackageDefaults, loadDigitalHumanRoles } from './digital-human-roles.mjs';
|
|
8
|
+
import { validateTaskPackageSchema } from './task-package-schema.mjs';
|
|
9
|
+
const fail=message=>{throw new TypeError(message);};
|
|
10
|
+
const equalArrays=(a,b)=>Array.isArray(a)&&a.length===b.length&&a.every((x,i)=>x===b[i]);
|
|
11
|
+
function generateTaskPackageDefaults(roleId,overrides,{rolesDoc}={}) {
|
|
12
|
+
const defaults=taskPackageDefaults(roleId,rolesDoc||loadDigitalHumanRoles());
|
|
13
|
+
return {schema_version:1,role_id:roleId,skill_source:{registry_ref:'docs/agents/digital-human-roles.yaml',defaults_ref:`taskPackageDefaults(${roleId})`,core_skills:defaults.core_skills,forbidden_skills:defaults.forbidden_skills},...overrides};
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/** Compile dispatch from the approved YAML. Only runtime identity and task ID come from the caller. */
|
|
17
|
+
export function compileSliceTaskPackage(binding,{root=ROOT,work_unit_id,task_id,actor_id,runtime_id,execution_state='Worker',rolesDoc,user_decisions}={}) {
|
|
18
|
+
const actualRoles=parseSliceYaml(readFileSync(safe(root,'docs/agents/digital-human-roles.yaml')));
|
|
19
|
+
if(rolesDoc&&digest(rolesDoc)!==digest(actualRoles))fail('调用方不能替换接收端角色能力');
|
|
20
|
+
rolesDoc=actualRoles;
|
|
21
|
+
if(!actualRoles.runtimes.some(runtime=>runtime.id===runtime_id))fail('接收端不支持该 runtime_id');
|
|
22
|
+
const execution=createApprovedExecutionContext(binding,{root,work_unit_id});
|
|
23
|
+
const {contract}=assertApprovedExecutionContext(execution,{root});
|
|
24
|
+
if(contract.schema_version!==3)fail('v3 派发编译入口只接受 v3;v2 保留原派发路径');
|
|
25
|
+
const unit=contract.work_units.find(item=>item.id===work_unit_id);
|
|
26
|
+
if(!unit)fail('未找到指定 Slice 工作单元');
|
|
27
|
+
const checkpoint=readSliceDispatchApproval(root,binding.approval_ref);
|
|
28
|
+
const decisions=user_decisions||checkpoint.human_review?.user_decisions;
|
|
29
|
+
const output=generateTaskPackageDefaults(unit.role_id,{
|
|
30
|
+
task_id,work_unit_id,actor_id,runtime_id,execution_state,workflow_status:'not-started',stage_id:'stage.vertical-slice-implementation',
|
|
31
|
+
contract:{kind:'slice-implementation',contract_id:contract.contract_id,contract_version:contract.contract_version,status:'issued',contract_ref:binding.ref,slice_contract_ref:binding.ref,gate_refs:[binding.approval_ref]},
|
|
32
|
+
inputs:[binding.ref,...new Set(Object.values(contract.lifecycle_refs))],
|
|
33
|
+
objective:`${unit.behavior}(执行目录:${unit.project_root};完整约束读取 ${binding.ref})`,
|
|
34
|
+
allowed_write_paths:unit.allowed_write_paths,forbidden_actions:[...unit.work_unit.forbidden_patterns,'来源过期、越界、缺证据、验证失败或新增影响时停止并回交'],
|
|
35
|
+
expected_outputs:[unit.behavior],expected_evidence_files:unit.work_unit.expected_evidence,verification_commands:unit.work_unit.verification_commands,verification_results:[],
|
|
36
|
+
downstream_consumers:unit.downstream_consumers||['role.lifecycle-orchestrator'],convergence:{parent_work_unit:'work-unit.slice-implementation',convergence_ref:unit.convergence_ref||binding.approval_ref,conflict_escalation:'返回生命周期主控'},user_decisions:decisions
|
|
37
|
+
},{rolesDoc});
|
|
38
|
+
enforceHarnessTaskScope(output,{root});
|
|
39
|
+
validateTaskPackageSchema(output);
|
|
40
|
+
assertSliceV3TaskPackage(output,contract,{root});
|
|
41
|
+
return output;
|
|
42
|
+
}
|
|
43
|
+
function readSliceDispatchApproval(root,ref) {return parseSliceYaml(readFileSync(safe(root,ref)));}
|
|
44
|
+
export function assertSliceV3TaskPackage(value,slice,{root=ROOT}={}) {
|
|
45
|
+
enforceHarnessTaskScope(value,{root});
|
|
46
|
+
const contract=value.contract;
|
|
47
|
+
const current=normalizeSliceContract(slice,{root});
|
|
48
|
+
const roles=parseSliceYaml(readFileSync(safe(root,'docs/agents/digital-human-roles.yaml'))),defaults=taskPackageDefaults(value.role_id,roles);
|
|
49
|
+
if(!roles.runtimes.some(runtime=>runtime.id===value.runtime_id)||!defaults.stages.includes(value.stage_id))fail('接收端角色或运行时不支持当前任务');
|
|
50
|
+
if(!equalArrays(value.skill_source.core_skills,defaults.core_skills)||!equalArrays(value.skill_source.forbidden_skills,defaults.forbidden_skills))fail('任务角色能力与接收端不一致');
|
|
51
|
+
const unit=current.work_units.find(item=>item.id===value.work_unit_id);
|
|
52
|
+
if(unit&&[unit.primary_skill,...(unit.supporting_skills||[])].some(skill=>defaults.forbidden_skills.includes(skill)))fail('工作单元使用接收角色禁用 Skill');
|
|
53
|
+
if(!unit||unit.role_id!==value.role_id||current.contract_id!==contract.contract_id||current.contract_version!==contract.contract_version)fail('任务身份与 Slice v3 不一致');
|
|
54
|
+
if(!Array.isArray(contract.gate_refs)||contract.gate_refs.length!==1)fail('Slice v3 派发需要唯一批准 checkpoint 引用');
|
|
55
|
+
const bytes=readFileSync(safe(root,contract.slice_contract_ref));
|
|
56
|
+
const execution=createApprovedExecutionContext({ref:contract.slice_contract_ref,digest:hash(bytes),id:current.contract_id,version:current.contract_version,approval_ref:contract.gate_refs[0]},{root,work_unit_id:value.work_unit_id});
|
|
57
|
+
assertApprovedExecutionContext(execution,{root,contract:current});
|
|
58
|
+
for(const allowed of value.allowed_write_paths)if(!unit.allowed_write_paths.some(parent=>withinSlicePath(allowed,parent)))fail('任务写范围超出 Slice v3');
|
|
59
|
+
for(const key of ['verification_commands','expected_evidence_files']) {
|
|
60
|
+
const required=key==='verification_commands'?unit.work_unit.verification_commands:unit.work_unit.expected_evidence;
|
|
61
|
+
if(!equalArrays(value[key],required))fail(`任务包遗漏或替换 Slice v3 ${key}`);
|
|
62
|
+
}
|
|
63
|
+
for(const item of unit.work_unit.forbidden_patterns)if(!value.forbidden_actions.includes(item))fail('任务包遗漏全局约束');
|
|
64
|
+
if(value.execution_state==='Worker')assertImplementationDecision({slice_contract_ref:contract.slice_contract_ref,vertical_slice_ticket_ref:current.lifecycle_refs.ticket,user_decisions:value.user_decisions},{root});
|
|
65
|
+
return value;
|
|
66
|
+
}
|
|
@@ -75,6 +75,17 @@ export async function sourceApproval(record, roles, root) {
|
|
|
75
75
|
const { assertApprovalUserDecision } = await import('./user-decision-reuse.mjs');
|
|
76
76
|
assertApprovalUserDecision(record, roles, options);
|
|
77
77
|
}
|
|
78
|
+
// Older dedicated receivers retain their own lifecycle policy. Normalize only
|
|
79
|
+
// this already-verified source approval, without granting local capabilities.
|
|
80
|
+
if (record.continuation_ref) {
|
|
81
|
+
ensure(roles.user_decision_policy.gates.includes(record.gate_id), '未登记的源延续批准边界');
|
|
82
|
+
const reviewers = roles.gate_policy.continuation_reviews?.[record.gate_id];
|
|
83
|
+
ensure(reviewers?.includes(record.role_id) && record.drafter_principal_ref && record.drafter_principal_ref !== record.principal_ref, '源授权延续缺少独立审查身份');
|
|
84
|
+
options.rolesDoc = structuredClone(roles);
|
|
85
|
+
const policy = options.rolesDoc.gate_policy;
|
|
86
|
+
policy.dual_digital_human = (policy.dual_digital_human || []).filter(x => x.gate !== record.gate_id);
|
|
87
|
+
policy.digital_human_review = [...(policy.digital_human_review || []).filter(x => x.gate !== record.gate_id), { gate: record.gate_id, countersigners: reviewers }];
|
|
88
|
+
}
|
|
78
89
|
validateApprovalRecord(record,options);
|
|
79
90
|
}
|
|
80
91
|
|
|
@@ -217,7 +228,7 @@ function collect(root, handoffRef, handoff, config) {
|
|
|
217
228
|
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); };
|
|
218
229
|
function refs(value,key='') {
|
|
219
230
|
if(Array.isArray(value)) { if(key==='evidence_refs') value.forEach(enqueue); else value.forEach(v=>refs(v,key)); }
|
|
220
|
-
else if(value && typeof value==='object') for(const [k,v]of Object.entries(value)) { if(['approval_ref','persisted_ref','user_decision_ref','decision_reuse_ref','scope_ref','subject_ref','delivery_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); }
|
|
231
|
+
else if(value && typeof value==='object') for(const [k,v]of Object.entries(value)) { if(['approval_ref','persisted_ref','user_decision_ref','decision_reuse_ref','continuation_ref','plan_continuation_ref','scope_ref','subject_ref','delivery_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); }
|
|
221
232
|
}
|
|
222
233
|
let totalBytes = 0;
|
|
223
234
|
while(queue.length) {
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import { normalizeSliceContract } from './slice-contract.mjs';
|
|
2
|
+
import { assertSliceV3TaskPackage } from './slice-task-package.mjs';
|
|
3
|
+
export { compileSliceTaskPackage, assertSliceV3TaskPackage } from './slice-task-package.mjs';
|
|
1
4
|
import { existsSync, readFileSync } from "node:fs";
|
|
2
5
|
import path from "node:path";
|
|
3
6
|
import { parseDocument } from "../vendor/yaml.mjs";
|
|
@@ -178,11 +181,12 @@ function validateContract(value, registry, lifecycle) {
|
|
|
178
181
|
const contractPath = assertSafeRelativePath(contract.slice_contract_ref, "contract.slice_contract_ref");
|
|
179
182
|
if (!existsSync(contractPath)) fail(`Slice Implementation Contract 不存在: ${contract.slice_contract_ref}`);
|
|
180
183
|
const document = parseYaml(readFileSync(contractPath, "utf8"), "Slice Implementation Contract");
|
|
181
|
-
const slice = document
|
|
182
|
-
if (slice.schema_version
|
|
184
|
+
const slice = normalizeSliceContract(document,{root:ROOT});
|
|
185
|
+
if (![2,3].includes(slice.schema_version) || typeof slice.slice_id !== "string" || !slice.lifecycle_refs || !slice.readiness || !Array.isArray(slice.work_units)) fail("Slice Implementation Contract 需要 schema v2 及 slice_id/lifecycle_refs/readiness/work_units");
|
|
183
186
|
if (slice.contract_id !== contract.contract_id || slice.contract_version !== contract.contract_version || slice.status !== "approved") fail("Slice Contract 必须是当前 approved 版本");
|
|
184
187
|
const sliceUnit = slice.work_units.find((item) => item && item.id === value.work_unit_id);
|
|
185
188
|
if (!sliceUnit) fail(`Slice Implementation Contract 缺少 work_unit_id: ${value.work_unit_id}`);
|
|
189
|
+
if(slice.schema_version===3)return assertSliceV3TaskPackage(value,slice,{root:ROOT});
|
|
186
190
|
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}`);
|
|
187
191
|
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) fail("任务包与 Slice Contract work_unit 不一致");
|
|
188
192
|
for (const allowed of value.allowed_write_paths) if (!sliceUnit.allowed_write_paths.includes(allowed)) fail(`allowed_write_paths 未获 Slice Contract 授权: ${allowed}`);
|
|
@@ -24,6 +24,7 @@ export function enforceTechnicalDesign(state = {}, { root = ROOT, execution, rea
|
|
|
24
24
|
if(execution){
|
|
25
25
|
assertApprovedExecutionContext(execution,{root,technicalDesign:data,architectureIdentity:state.architecture_identity,sliceId:state.slice_id});
|
|
26
26
|
const approved=approvedExecutionBinding(execution);
|
|
27
|
+
if(approved.work_unit_id)args.push('--work-unit',approved.work_unit_id);
|
|
27
28
|
args.push('--approved-slice',approved.ref,'--approved-slice-digest',approved.digest,'--approved-slice-approval',approved.approval_ref);
|
|
28
29
|
}
|
|
29
30
|
const verified = spawnSync(process.execPath, args, { cwd: root, encoding: 'utf8', timeout: 60000, maxBuffer: 2 * 1024 * 1024 });
|
|
@@ -8,6 +8,7 @@ const sameSet = (a,b) => Array.isArray(a) && Array.isArray(b) && a.length === ne
|
|
|
8
8
|
export function assertApprovalUserDecision(record, roles, options = {}) {
|
|
9
9
|
const policy = roles.user_decision_policy;
|
|
10
10
|
const io = decisionIO(options);
|
|
11
|
+
if (record.continuation_ref) return assertUserDecisionRequirement({boundary:record.gate_id,subject_ref:record.subject_ref,scope:record.approval_scope,continuation_ref:record.continuation_ref}, {...options,rolesDoc:roles});
|
|
11
12
|
if (policy.required_capabilities?.some(id => id !== DECISION_REUSE_CAPABILITY)) fail('接收工具不支持源用户决定策略,请升级');
|
|
12
13
|
if (!record.decision_reuse_ref) return assertUserDecisionRequirement({boundary:record.gate_id,subject_ref:record.subject_ref,scope:record.approval_scope,user_decision_ref:record.user_decision_ref}, {...options,rolesDoc:roles});
|
|
13
14
|
if (record.gate_id !== 'gate.strategic-design-handoff-approved' || !policy.required_capabilities?.includes(DECISION_REUSE_CAPABILITY)) fail('未登记的复用边界或能力');
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { normalizeSliceContract } from './slice-contract.mjs';
|
|
1
2
|
import { createHash } from "node:crypto";
|
|
2
3
|
import { readFileSync } from "node:fs";
|
|
3
4
|
import path from "node:path";
|
|
@@ -5,6 +6,7 @@ import { parseDocument } from "../vendor/yaml.mjs";
|
|
|
5
6
|
import { ROOT } from "./lifecycle-registry.mjs";
|
|
6
7
|
import { loadDigitalHumanRoles } from "./digital-human-roles.mjs";
|
|
7
8
|
import { validateJsonSchema } from "./json-schema.mjs";
|
|
9
|
+
import { assertDecisionContinuation } from './decision-continuation.mjs';
|
|
8
10
|
|
|
9
11
|
export function decisionError(code, detail) {
|
|
10
12
|
const error = new TypeError(`${code}: ${detail}`);
|
|
@@ -161,6 +163,7 @@ export function verifyUserDecisionFile(ref, options = {}) {
|
|
|
161
163
|
|
|
162
164
|
export function assertUserDecisionRequirement(requirement, options = {}) {
|
|
163
165
|
if (!requirement) decisionError("user-decision-response-required", "缺少当前决定及其范围");
|
|
166
|
+
if (requirement.continuation_ref) return assertDecisionContinuation(requirement, options.rolesDoc || loadDigitalHumanRoles(), options);
|
|
164
167
|
return verifyUserDecisionFile(requirement.user_decision_ref, { ...options, expected: [requirement] });
|
|
165
168
|
}
|
|
166
169
|
|
|
@@ -191,7 +194,7 @@ export function assertImplementationDecision(state, options = {}) {
|
|
|
191
194
|
if (state.slice_contract_ref !== slice.contract?.ref) decisionError("user-decision-subject-mismatch", "当前合同不在批准清单中");
|
|
192
195
|
checkAsset(slice.contract, io);
|
|
193
196
|
const content = io.document(slice.contract.ref);
|
|
194
|
-
const contract = content.slice_contract || content;
|
|
197
|
+
const contract = content.slice_contract?.schema_version === 3 || content.schema_version === 3 ? normalizeSliceContract(content, { root: options.root || ROOT }) : content.slice_contract || content;
|
|
195
198
|
if (contract.lifecycle_refs?.ticket !== ticketRef) decisionError("user-decision-subject-mismatch", "持久化合同的切片引用不匹配");
|
|
196
199
|
for (const [manifestKey, contractKey] of [["repositories", "project_roots"], ["allowed_write_paths", "allowed_write_paths"]]) {
|
|
197
200
|
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);
|
|
@@ -6,9 +6,9 @@ import { preflightDelivery, invalidPreflightInput } from './lib/delivery-preflig
|
|
|
6
6
|
|
|
7
7
|
let result;
|
|
8
8
|
try {
|
|
9
|
-
const {values}=parseArgs({options:{input:{type:'string'},stage:{type:'string'},json:{type:'boolean'}},strict:true});
|
|
9
|
+
const {values}=parseArgs({options:{input:{type:'string'},stage:{type:'string'},'work-unit':{type:'string'},json:{type:'boolean'}},strict:true});
|
|
10
10
|
if(!values.input||!values.stage) throw new TypeError('必须提供 --input <file> 和 --stage prepare|build|export|accept');
|
|
11
|
-
result=await preflightDelivery(read(path.resolve(values.input)),{stage:values.stage,root:process.cwd()});
|
|
11
|
+
result=await preflightDelivery(read(path.resolve(values.input)),{stage:values.stage,root:process.cwd(),work_unit_id:values['work-unit']});
|
|
12
12
|
} catch(error) { result=invalidPreflightInput(error.message); }
|
|
13
13
|
process.stdout.write(`${JSON.stringify(result,null,2)}\n`);
|
|
14
14
|
process.exitCode=result.exit_code;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import fs from 'node:fs';
|
|
3
|
+
import path from 'node:path';
|
|
4
|
+
import { prepareSliceImplementationContract, migrateSliceContractV2, persistSliceDraft } from './lib/slice-contract-preparation.mjs';
|
|
5
|
+
import { renderSliceContractView, diffSliceContracts } from './lib/slice-contract-views.mjs';
|
|
6
|
+
import { parseSliceYaml, readSliceContract } from './lib/slice-contract.mjs';
|
|
7
|
+
|
|
8
|
+
try {
|
|
9
|
+
const args=process.argv.slice(2),mode=args.shift(),options={},positional=[];
|
|
10
|
+
for(let i=0;i<args.length;i++) {
|
|
11
|
+
if(args[i]==='--json'){options.json=true;continue;}
|
|
12
|
+
if(args[i].startsWith('--')) {
|
|
13
|
+
const key=args[i].slice(2);if(!['root','input','output','unit','before-root'].includes(key)||!args[i+1])throw new Error(`未知或缺值参数 ${args[i]}`);
|
|
14
|
+
options[key]=args[++i];
|
|
15
|
+
}else positional.push(args[i]);
|
|
16
|
+
}
|
|
17
|
+
const root=path.resolve(options.root||process.cwd());
|
|
18
|
+
let result;
|
|
19
|
+
if(mode==='prepare'||mode==='migrate') {
|
|
20
|
+
const input=options.input?parseSliceYaml(fs.readFileSync(path.resolve(root,options.input))):{};
|
|
21
|
+
if(mode==='prepare')result=prepareSliceImplementationContract({...input,root,ticket_ref:positional[0]});
|
|
22
|
+
else result=migrateSliceContractV2(readSliceContract(positional[0],{root}).raw,{...input,root});
|
|
23
|
+
if(options.output)persistSliceDraft(result,options.output,{root});
|
|
24
|
+
if(result.report.blockers.length)process.exitCode=1;
|
|
25
|
+
}else if(mode==='view')result=renderSliceContractView(positional[0],{root,unit_id:options.unit});
|
|
26
|
+
else if(mode==='diff')result=diffSliceContracts(positional[0],positional[1],{root,beforeRoot:options['before-root']?path.resolve(options['before-root']):root});
|
|
27
|
+
else if(mode==='verify')result={read_only:true,approval_validity:'not-checked',...readSliceContract(positional[0],{root}).binding};
|
|
28
|
+
else throw new Error('用法: scripts/slice-contract prepare <ticket> --input <补充.yaml> --output <新合同.yaml> | migrate <v2.yaml> --input <补充.yaml> --output <新合同.yaml> | view <合同.yaml> [--unit <id>] | diff <旧合同> <新合同> | verify <合同> [--root <项目根>]');
|
|
29
|
+
process.stdout.write(options.json||!result.markdown?`${JSON.stringify(result,null,2)}\n`:`${result.markdown}\n`);
|
|
30
|
+
}catch(error){process.stderr.write(`${error.message}\n`);process.exitCode=1;}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// Maintenance-only candidate verification. Never updates the supported catalog or approvals.
|
|
3
|
+
import { assertResumableCandidate } from "./lib/backend-platform-provenance.mjs";
|
|
4
|
+
import { readFile, mkdir, writeFile } from "node:fs/promises";
|
|
5
|
+
import { spawnSync } from "node:child_process";
|
|
6
|
+
import path from "node:path";
|
|
7
|
+
import { parseArgs } from "node:util";
|
|
8
|
+
import { loadBackendPlatforms, assertJavaPlatform, platformDigest } from "./lib/backend-platform.mjs";
|
|
9
|
+
import { ScaffoldGenerator, parseArgs as dddArgs } from "../.agents/skills/yss-ddd-scaffold-generator/scripts/generate_scaffold.mjs";
|
|
10
|
+
import { generate, validateContract as validateMvcContract, parseArgs as mvcArgs } from "../.agents/skills/yss-layered-mvc-scaffold-generator/scripts/generate_scaffold.mjs";
|
|
11
|
+
import { run } from "../.agents/skills/yss-ddd-scaffold-generator/scripts/run_scaffold_verification.mjs";
|
|
12
|
+
|
|
13
|
+
const { values } = parseArgs({ options: { "evidence-dir": { type: "string" }, inputs: { type: "string" }, resume: { type: "boolean", default: false } }, strict: true });
|
|
14
|
+
if (!values["evidence-dir"]) throw new Error("--evidence-dir is required; optional --inputs points to real approved contracts and candidate catalog");
|
|
15
|
+
const evidence = path.resolve(values["evidence-dir"]);
|
|
16
|
+
await mkdir(evidence, { recursive: true });
|
|
17
|
+
const input = values.inputs ? JSON.parse(await readFile(path.resolve(values.inputs), "utf8")) : {};
|
|
18
|
+
const inputRoot = values.inputs ? path.dirname(path.resolve(values.inputs)) : process.cwd();
|
|
19
|
+
const catalog = input.catalog_ref ? JSON.parse(await readFile(path.resolve(inputRoot, input.catalog_ref), "utf8")) : loadBackendPlatforms();
|
|
20
|
+
if (catalog.schema_version !== 1 || catalog.kind !== "backend-platform-catalog" || !Array.isArray(catalog.compatibility) || platformDigest(catalog.profiles) !== platformDigest(loadBackendPlatforms().profiles)) throw new Error("candidate input must preserve the maintained platform profiles; only supply actual YSS combinations");
|
|
21
|
+
const keys = new Set();
|
|
22
|
+
for (const item of input.combinations ?? []) {
|
|
23
|
+
const key = `${item.profile_id}:${item.spring_boot_version}:${item.architecture_family}`;
|
|
24
|
+
if (keys.has(key) || !catalog.profiles.some(p => p.id === item.profile_id && p.spring_boot_version === item.spring_boot_version) || !["domain-driven", "layered-mvc"].includes(item.architecture_family)) throw new Error("duplicate or unknown exact matrix combination");
|
|
25
|
+
keys.add(key);
|
|
26
|
+
}
|
|
27
|
+
const rows = [];
|
|
28
|
+
for (const profile of loadBackendPlatforms().profiles) for (const family of ["domain-driven", "layered-mvc"]) {
|
|
29
|
+
const row = { profile_id: profile.id, spring_boot_version: profile.spring_boot_version, java_version: profile.java_version, architecture_family: family, status: "blocked", blockers: [], commands: [], executed_at: new Date().toISOString() };
|
|
30
|
+
const configuration = input.combinations?.find(item => item.profile_id === profile.id && item.spring_boot_version === profile.spring_boot_version && item.architecture_family === family);
|
|
31
|
+
for (const key of ["YSS_MAVEN_REPOSITORY_URL", "MAVEN_REPO_USERNAME", "MAVEN_REPO_PASSWORD"]) if (!process.env[key]) row.blockers.push(`missing environment: ${key}`);
|
|
32
|
+
if (!configuration?.contract_ref) row.blockers.push("missing real approved scaffold contract/YSS compatibility coordinates");
|
|
33
|
+
const javaHome = input.java_homes?.[String(profile.java_version)];
|
|
34
|
+
if (!javaHome) row.blockers.push(`missing explicit java_homes.${profile.java_version}`);
|
|
35
|
+
else {
|
|
36
|
+
try { const result = spawnSync(path.join(javaHome, "bin/java"), ["-version"], { encoding: "utf8" }); if (result.status !== 0) throw new Error("java -version failed"); assertJavaPlatform(`${result.stdout}\n${result.stderr}`, { java_version: profile.java_version }); row.java_preflight = "passed"; }
|
|
37
|
+
catch (error) {
|
|
38
|
+
row.blockers.push(`JDK preflight: ${error.message}`);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
if (!row.blockers.length) {
|
|
42
|
+
const dir = path.join(evidence, `${profile.id}-${profile.spring_boot_version}-${family}-${Date.now()}`); await mkdir(dir, { recursive: true });
|
|
43
|
+
try {
|
|
44
|
+
const contractFile = path.resolve(inputRoot, configuration.contract_ref);
|
|
45
|
+
const contractBytes = await readFile(contractFile);
|
|
46
|
+
const contract = JSON.parse(contractBytes);
|
|
47
|
+
if (contract.architecture_family !== family || contract.platform_configuration?.profile_id !== profile.id || contract.platform_configuration?.spring_boot_version !== profile.spring_boot_version) throw new Error("matrix/contract identity mismatch");
|
|
48
|
+
const c = contract.maven_coordinates;
|
|
49
|
+
const pairs = { "project-name": contract.project_name, "base-package": contract.base_package, "output-dir": contract.target_output_dir, "contract-file": contractFile, "contract-id": contract.contract_id, "contract-version": contract.contract_version, "approval-ref": contract.lifecycle_approval_ref, "compiler-draft-ref": contract.compiler_draft_ref, "persisted-ref": contract.persisted_ref, "group-id": c.group_id, "project-version": c.project_version, "parent-group-id": c.parent.group_id, "parent-artifact-id": c.parent.artifact_id, "parent-version": c.parent.version, "yss-components-version": c.yss_components_version };
|
|
50
|
+
const args = Object.entries(pairs).flatMap(([key, value]) => [`--${key}`, String(value)]);
|
|
51
|
+
const platformOptions = { catalog, root: inputRoot, candidate: true };
|
|
52
|
+
if (values.resume) {
|
|
53
|
+
// Revalidate current approval/design sources without invoking any generation writes.
|
|
54
|
+
if (family === "domain-driven") await new ScaffoldGenerator(dddArgs(args), platformOptions).validateContractMetadata();
|
|
55
|
+
else await validateMvcContract(mvcArgs(args), "yss-layered-mvc-scaffold-generator", "layered-mvc-service", platformOptions);
|
|
56
|
+
assertResumableCandidate(path.join(contract.target_output_dir, contract.project_name), contract, contractBytes);
|
|
57
|
+
} else if (family === "domain-driven") await new ScaffoldGenerator(dddArgs(args), platformOptions).generate();
|
|
58
|
+
else await generate(mvcArgs(args), { platformOptions });
|
|
59
|
+
const report = await run(path.join(contract.target_output_dir, contract.project_name), dir, { ...process.env, JAVA_HOME: javaHome }, { timeoutMs: 180000, platformOptions });
|
|
60
|
+
await writeFile(path.join(dir, "scaffold-verification.json"), JSON.stringify(report, null, 2));
|
|
61
|
+
Object.assign(row, report, { evidence_ref: path.join(dir, "scaffold-verification.json") });
|
|
62
|
+
} catch (error) { row.blockers.push(error.message); }
|
|
63
|
+
}
|
|
64
|
+
rows.push(row);
|
|
65
|
+
}
|
|
66
|
+
const report = { schema_version: 1, kind: "backend-platform-matrix", generated_at: new Date().toISOString(), status: rows.every(row => row.status === "passed") ? "passed" : "blocked", combinations: rows };
|
|
67
|
+
await writeFile(path.join(evidence, "platform-matrix.json"), JSON.stringify(report, null, 2));
|
|
68
|
+
process.stdout.write(`${report.status}: ${path.join(evidence, "platform-matrix.json")}\n`);
|
|
69
|
+
if (report.status !== "passed") process.exitCode = 1;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
import { platformProfile } from "./lib/backend-platform.mjs";
|
|
2
3
|
import { readFileSync } from "node:fs";
|
|
3
4
|
import path from "node:path";
|
|
4
5
|
import { parseArgs } from "node:util";
|
|
@@ -35,6 +36,10 @@ try {
|
|
|
35
36
|
if (ids.has(decision.decision_id) || projects.has(decision.project_id)) throw new TypeError("decision_id 与 project_id 必须唯一");
|
|
36
37
|
ids.add(decision.decision_id);
|
|
37
38
|
projects.set(decision.project_id, decision);
|
|
39
|
+
if (decision.platform_configuration) {
|
|
40
|
+
const profile = platformProfile(decision.platform_profile, undefined, decision.platform_configuration.spring_boot_version);
|
|
41
|
+
if (decision.platform_configuration.profile_id !== profile.id || decision.platform_configuration.spring_boot_version !== profile.spring_boot_version || decision.platform_configuration.java_version !== profile.java_version) throw new TypeError("platform_configuration 与平台选择不一致");
|
|
42
|
+
} else if (decision.platform_profile !== "spring-boot-2.7-jdk8") throw new TypeError("新平台缺少 platform_configuration");
|
|
38
43
|
const confirmed = ["user-confirmed", "lifecycle-approved", "consumed"].includes(decision.status);
|
|
39
44
|
const confirmation = decision.user_confirmation;
|
|
40
45
|
if (confirmed && (!decision.confirmed_architecture || Object.values(confirmation).some((item) => item === null || item === ""))) throw new TypeError(`${decision.project_id} 已确认状态必须提供完整用户确认引用`);
|
|
@@ -1,16 +1,21 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { parseArgs } from "node:util";
|
|
3
|
-
import { decisionIO, verifyUserDecisionFile } from "./lib/user-decision.mjs";
|
|
3
|
+
import { decisionIO, verifyUserDecisionFile, assertUserDecisionRequirement } from "./lib/user-decision.mjs";
|
|
4
4
|
try {
|
|
5
|
-
const { positionals, values } = parseArgs({ allowPositionals: true, options: { root: { type: "string" }, requirements: { type: "string" } } });
|
|
5
|
+
const { positionals, values } = parseArgs({ allowPositionals: true, options: { root: { type: "string" }, requirements: { type: "string" }, continuation: { type: 'boolean' } } });
|
|
6
6
|
if (positionals.length !== 1) throw new TypeError("用法: scripts/verify-user-decision [--root <repo>] [--requirements <当前事项.json>] <record.yaml>");
|
|
7
7
|
const options = values.root ? { root: values.root } : {};
|
|
8
8
|
const io = decisionIO(options);
|
|
9
9
|
const record = io.document(positionals[0]);
|
|
10
|
+
if (values.continuation) {
|
|
11
|
+
assertUserDecisionRequirement(record, options);
|
|
12
|
+
process.stdout.write('已有授权与当前延续范围校验通过\n');
|
|
13
|
+
} else {
|
|
10
14
|
// No requirements means verify every requested item for approval; partial approvals need explicit current requirements.
|
|
11
15
|
options.expected = values.requirements ? io.document(values.requirements) : record.request.items.map((item) => ({ boundary: item.boundary, subject_ref: item.subject.ref, scope: item.scope }));
|
|
12
16
|
verifyUserDecisionFile(positionals[0], options);
|
|
13
17
|
process.stdout.write("用户决定及当前批准范围校验通过\n");
|
|
18
|
+
}
|
|
14
19
|
} catch (error) {
|
|
15
20
|
process.stderr.write(`用户决定校验失败: ${error.message}\n`);
|
|
16
21
|
process.exitCode = 1;
|