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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: theme-token-usage
|
|
3
|
-
description:
|
|
3
|
+
description: "实现或修复 Vue3 YSS UI 主题、交互状态色与动态换肤;用于 token 映射和硬编码色值审查。"
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# YSS UI 主题 Token 使用 Skill
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: to-tickets
|
|
3
|
-
description:
|
|
3
|
+
description: "显式调用时,将已确认的 Plan 或 Spec 拆成带依赖的垂直切片 Ticket,并按配置的 tracker 持久化。"
|
|
4
4
|
disable-model-invocation: true
|
|
5
5
|
---
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: using-git-worktrees
|
|
3
|
-
description:
|
|
3
|
+
description: "Set up Git worktree isolation when requested or when concurrent work needs a separate checkout."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Using Git Worktrees
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: wayfinder
|
|
3
|
-
description:
|
|
3
|
+
description: "显式调用时,为跨多个会话的大型工作建立决策地图,逐项收敛后交回主流程。"
|
|
4
4
|
disable-model-invocation: true
|
|
5
5
|
---
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: yedit-table-usage
|
|
3
|
-
description:
|
|
3
|
+
description: "配置或修复 YSS UI YEditTable 的行内编辑、候选联动、增删行、校验与查看态。"
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# YEditTable 使用
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: yss-api-integration
|
|
3
|
-
description:
|
|
3
|
+
description: "在 Vue3 YSS UI 中对接 Orval API;核验生成方法、mutator、错误反馈、loading 与长整型精度。"
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# API 集成 Skill
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: yss-audit-log
|
|
3
|
-
description:
|
|
3
|
+
description: "接入或排查 YSS AuditLog 的 SpEL 摘要、异步发布、订阅注册与审计投递。"
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# yss-audit-log
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: yss-cache
|
|
3
|
-
description:
|
|
3
|
+
description: "接入或排查 YSS QueryCache、UpdateCache、ClearCache、TTL、缓存后端与一致性问题。"
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# yss-cache
|
|
@@ -21,6 +21,19 @@ description: 用于生成完整的 YSS DDD 多模块后端脚手架。当用户
|
|
|
21
21
|
- 只补持久层时,优先 `yss-repository`。
|
|
22
22
|
- 只补 Web 层时,优先 `yss-web-controller`。
|
|
23
23
|
|
|
24
|
+
## Spring Boot / Java 平台选择
|
|
25
|
+
|
|
26
|
+
调用本技能时先展示 `scripts/backend-platforms` 的精确版本清单及兼容状态。由生命周期编排器把架构、Spring Boot、Java 和 YSS 父 POM/BOM 合并展示并取得真实用户确认;生成器不提问、不猜版本、不使用 `x` 或 `latest`。已有批准且当前的选择展示摘要后复用。
|
|
27
|
+
|
|
28
|
+
- 候选平台:Boot 2.7.18 / Java 8,Boot 3.5.16 / Java 17 或 21,Boot 4.1.1 / Java 17 或 21。新 Boot 默认推荐 Java 17;候选不等于可生成。
|
|
29
|
+
- 独立子项目可继承主项目组合或覆盖,必须逐项目确认(允许一次确认明确列出的项目);同一 Maven Reactor 使用一个平台。
|
|
30
|
+
- 只开放共享兼容清单中已有真实 YSS 构建、依赖和启动证据的组合。缺少兼容父 POM、BOM、starter 或相应能力证据即 `blocked`;不替换官方组件、不降级回退。
|
|
31
|
+
- 新生成合同必须有 `platform_configuration` v2,与架构决策、Maven 坐标及兼容条目摘要一致。Boot、Java、YSS 坐标或依赖配方变化时回生命周期重新确认并编译合同;仅追加同配置验证记录不重复确认,仍核验证据有效性。
|
|
32
|
+
- Spring MVC、Servlet、Validation、Jackson 和 starter 坐标消费共享平台清单;Boot 3.5 / 4.1 拒绝 Java 8/11。Jakarta 转换不包括 `javax.sql` 等 Java SE API。
|
|
33
|
+
- 平台候选维护验证产物标记 `platform_verification=candidate`,不能交给业务生成、升级完成等级或进入首切片验证。测试夹具不证明 YSS 兼容。
|
|
34
|
+
|
|
35
|
+
版本清单、合同字段、候选验证和支持晋级规则见 仓库共享合同 `docs/engineering/backend-platforms.md`。
|
|
36
|
+
|
|
24
37
|
## 优先流程
|
|
25
38
|
|
|
26
39
|
1. 确认服务级 `scaffold_request_id`、已由用户确认且生命周期批准的 `domain-driven` 架构选择及 digest、项目名、基础包名、Maven 项目坐标、父 POM GAV、YSS Components BOM 版本、输出目录和批准 Profile。Java `base_package` 与 Maven `group_id` 是两个独立输入,不得相互推导;脚手架发生在 Ticket 正式化前,不使用 `slice_id` 伪造切片身份。
|
|
@@ -84,12 +97,12 @@ node scripts/run_first_slice_verification.mjs \
|
|
|
84
97
|
- 不要在 skill 里硬编码用户业务字段或真实连接信息。
|
|
85
98
|
- 生成后要检查依赖关系是否仍符合分层约束。
|
|
86
99
|
- 生成时的静态依赖由技能注册表与 实现合同编译器 共同约束为 `yss-backend-scaffold-parent`、`alibaba-java-code-style`。生成后必须回到 实现合同编译器,并按批准切片加载 `yss-domain`、`yss-application`、`yss-repository`、`yss-mybatis`、`yss-web-controller`、`yss-dto`、`yss-exception`、`yss-validation`、`mapstruct`、`lombok`、`alibaba-java-code-style` 等实际命中的行为 skill。
|
|
87
|
-
-
|
|
100
|
+
- 验证数据库固定 H2,生产数据库 `not-bound`;后续存储接入按批准的切片合同执行。
|
|
88
101
|
- 生成后的后端工程必须使用项目根目录 `./mvnw ...` 执行构建、测试、运行和 CI 验证;不得在 README、实施记录、Ticket、Review 或 Release 中默认写裸 `mvn ...`。既有仓库确实无法使用 wrapper 时,必须记录受控例外。
|
|
89
102
|
- 原型确认后,`scaffold_status=required` 才能进入本 skill;本 skill 的生成边界是工程结构、POM、配置、Wrapper 和机械模板,不是业务实现。
|
|
90
103
|
- 脚手架合同必须携带 `contract_id`、`contract_version`、实现合同编译器 draft 引用、生命周期批准引用、持久化引用、当前版本、允许写路径、预期证据文件和验证命令;字段缺失或版本过期时阻断。
|
|
91
104
|
- 新脚手架只接受统一 Project Scaffold Contract schema v4,并必须以原始字节摘要绑定批准且当前的 Technical Design、Data Architecture Decision v1、API Contract Decision v1 和真实工程合同批准记录。API `required` 必须闭包绑定同一 OpenAPI YAML 字节的 Validation、独立 Review、Freeze 与工程批准;`not-applicable` 必须绑定评估、明确原因和证据且禁止空占位资产。历史 schema v3/v2 仅用于 Manifest 只读验证和补齐 API 对账后的恢复审计,不用于新生成。
|
|
92
|
-
-
|
|
105
|
+
- DDD 固定 `target-domain-model`、`mybatis-plus`、H2 验证、`web` DTO、`yss-internal`;平台与 Validation 命名空间由共享清单约束。普通 MyBatis、独立 client module、client-in-domain 和其他旧架构仍为 `unsupported`。
|
|
93
106
|
- 运行生成器必须传入 `--contract-file`;生成器会校验合同 `status=approved`、`current_version`、`primary_skill`、`controlled-generation`、实际输出路径和固定三条验证命令,不接受仅凭任意字符串引用的放行。
|
|
94
107
|
- 生成项目必须写入 Manifest v4 `.yss/scaffold-generation.json`,记录技术、数据与 API 设计门禁、架构选择及 digest、生成器、合同 digest、Target Profile、模块闭包、模板 digest、下游完整 skill tree digest、generator-owned 文件 hash、严格 `generation_policy` 和完成等级;清单缺失或不一致时不得交给后续 实现合同编译器。
|
|
95
108
|
- `first-slice-verified` 只能由 `run_first_slice_verification.mjs` 写入。手工改 Manifest、只生成 Controller、只通过局部模块测试或仅有结构扫描都不能升级完成等级。
|
package/template/.pi/skills/yss-ddd-scaffold-generator/assets/templates/pom/parent-pom.xml.template
CHANGED
|
@@ -20,16 +20,18 @@
|
|
|
20
20
|
|
|
21
21
|
<properties>
|
|
22
22
|
<yss-components.version>{{yss_components_version}}</yss-components.version>
|
|
23
|
-
<
|
|
24
|
-
<
|
|
23
|
+
<java.version>{{java_version}}</java.version>
|
|
24
|
+
<spring-boot.version>{{boot_version}}</spring-boot.version>
|
|
25
|
+
<maven.compiler.source>{{java_version}}</maven.compiler.source>
|
|
26
|
+
<maven.compiler.target>{{java_version}}</maven.compiler.target>
|
|
25
27
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
|
26
|
-
<mapstruct.version>
|
|
27
|
-
<lombok.version>
|
|
28
|
-
<lombok-mapstruct-binding.version>
|
|
29
|
-
<swagger-annotations-v3.version>
|
|
30
|
-
<archunit.version>
|
|
31
|
-
<maven-compiler-plugin.version>
|
|
32
|
-
<maven-enforcer-plugin.version>
|
|
28
|
+
<mapstruct.version>{{mapstruct_version}}</mapstruct.version>
|
|
29
|
+
<lombok.version>{{lombok_version}}</lombok.version>
|
|
30
|
+
<lombok-mapstruct-binding.version>{{lombok_mapstruct_binding_version}}</lombok-mapstruct-binding.version>
|
|
31
|
+
<swagger-annotations-v3.version>{{swagger_version}}</swagger-annotations-v3.version>
|
|
32
|
+
<archunit.version>{{archunit_version}}</archunit.version>
|
|
33
|
+
<maven-compiler-plugin.version>{{compiler_version}}</maven-compiler-plugin.version>
|
|
34
|
+
<maven-enforcer-plugin.version>{{enforcer_version}}</maven-enforcer-plugin.version>
|
|
33
35
|
</properties>
|
|
34
36
|
|
|
35
37
|
<modules>
|
|
@@ -42,6 +44,7 @@
|
|
|
42
44
|
|
|
43
45
|
<dependencyManagement>
|
|
44
46
|
<dependencies>
|
|
47
|
+
<dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-dependencies</artifactId><version>{{boot_version}}</version><type>pom</type><scope>import</scope></dependency>
|
|
45
48
|
<dependency>
|
|
46
49
|
<groupId>com.yss.cloud</groupId>
|
|
47
50
|
<artifactId>yss-components-bom</artifactId>
|
|
@@ -94,6 +97,8 @@
|
|
|
94
97
|
|
|
95
98
|
<build>
|
|
96
99
|
<plugins>
|
|
100
|
+
<plugin><groupId>org.springframework.boot</groupId><artifactId>spring-boot-maven-plugin</artifactId><version>{{boot_version}}</version></plugin>
|
|
101
|
+
<plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-surefire-plugin</artifactId><version>{{surefire_version}}</version></plugin>
|
|
97
102
|
<plugin>
|
|
98
103
|
<groupId>org.apache.maven.plugins</groupId>
|
|
99
104
|
<artifactId>maven-compiler-plugin</artifactId>
|
|
@@ -129,7 +134,7 @@
|
|
|
129
134
|
<goals><goal>enforce</goal></goals>
|
|
130
135
|
<configuration>
|
|
131
136
|
<rules>
|
|
132
|
-
<requireJavaVersion><version>
|
|
137
|
+
<requireJavaVersion><version>{{java_range}}</version></requireJavaVersion>
|
|
133
138
|
<requireMavenVersion><version>[3.6.3,)</version></requireMavenVersion>
|
|
134
139
|
<reactorModuleConvergence/>
|
|
135
140
|
<dependencyConvergence/>
|
package/template/.pi/skills/yss-ddd-scaffold-generator/assets/templates/pom/web-pom.xml.template
CHANGED
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
</dependency>
|
|
20
20
|
<dependency>
|
|
21
21
|
<groupId>org.springframework.boot</groupId>
|
|
22
|
-
<artifactId>
|
|
22
|
+
<artifactId>{{web_starter}}</artifactId>
|
|
23
23
|
</dependency>
|
|
24
24
|
<dependency>
|
|
25
25
|
<groupId>org.springframework.boot</groupId>
|
|
@@ -45,13 +45,13 @@
|
|
|
45
45
|
</dependency>
|
|
46
46
|
<dependency>
|
|
47
47
|
<groupId>io.swagger.core.v3</groupId>
|
|
48
|
-
<artifactId>
|
|
48
|
+
<artifactId>{{swagger_artifact}}</artifactId>
|
|
49
49
|
<version>${swagger-annotations-v3.version}</version>
|
|
50
50
|
<scope>compile</scope>
|
|
51
51
|
</dependency>
|
|
52
52
|
<dependency>
|
|
53
53
|
<groupId>org.springframework.boot</groupId>
|
|
54
|
-
<artifactId>
|
|
54
|
+
<artifactId>{{web_test_starter}}</artifactId>
|
|
55
55
|
<scope>test</scope>
|
|
56
56
|
</dependency>
|
|
57
57
|
</dependencies>
|
|
@@ -11,9 +11,9 @@ description: YSS DDD scaffold Engineering Baseline entry for profile, module, de
|
|
|
11
11
|
|
|
12
12
|
- Architecture: `target-domain-model`
|
|
13
13
|
- Persistence: `mybatis-plus`
|
|
14
|
-
-
|
|
15
|
-
- Platform: `
|
|
16
|
-
- Validation namespace: `javax`
|
|
14
|
+
- Verification database: `h2`; production database: `not-bound`
|
|
15
|
+
- Platform: approved `platform_configuration` v2 from the shared backend platform catalog
|
|
16
|
+
- Validation namespace: derived from that platform (`javax` for Boot 2.7; `jakarta` for Boot 3.5/4.1)
|
|
17
17
|
- DTO placement: `web`
|
|
18
18
|
- Repository: `yss-internal`
|
|
19
19
|
|
package/template/.pi/skills/yss-ddd-scaffold-generator/scripts/first-slice-compatibility.test.mjs
CHANGED
|
@@ -80,13 +80,17 @@ async function prepareGoldenProject(t) {
|
|
|
80
80
|
attachDesignPrerequisites(root, contract);
|
|
81
81
|
await writeFile(contractFile, `${JSON.stringify(contract, null, 2)}\n`);
|
|
82
82
|
const args = ["--project-name", "golden-service", "--base-package", "com.yss.golden", "--output-dir", output, "--contract-id", "golden-scaffold-1", "--contract-version", "1", "--approval-ref", contract.lifecycle_approval_ref, "--compiler-draft-ref", "compiler-golden-1", "--persisted-ref", "persisted-golden-1", "--contract-file", contractFile, "--group-id", "com.yss.datamiddle", "--project-version", "1.0.0-SNAPSHOT", "--parent-group-id", "com.yss.datamiddle", "--parent-artifact-id", "yss-datamiddle-parent", "--parent-version", "2.0.0-SNAPSHOT", "--yss-components-version", "2.0.0-SNAPSHOT"];
|
|
83
|
-
const generated = await execute(process.execPath, [generator, ...args]);
|
|
83
|
+
const generated = await execute(process.execPath, [path.resolve(scripts, "../../../../scripts/fixtures/backend-scaffold/generate-candidate.mjs"), generator, ...args]);
|
|
84
84
|
assert.equal(generated.code, 0, generated.stderr);
|
|
85
85
|
const project = path.join(output, "golden-service");
|
|
86
86
|
const manifestPath = path.join(project, ".yss", "scaffold-generation.json");
|
|
87
87
|
const emptyVerificationPath = path.join(root, "empty-scaffold-verification.json");
|
|
88
88
|
await writeFile(emptyVerificationPath, JSON.stringify({ status: "passed", completion_level: "empty-scaffold-verified", commands: ["./mvnw validate", "./mvnw test", "./mvnw package"] }));
|
|
89
89
|
const manifest = JSON.parse(await readFile(manifestPath, "utf8"));
|
|
90
|
+
// Legacy Manifest compatibility fixture only; this does not qualify a new platform.
|
|
91
|
+
delete manifest.platform_configuration;
|
|
92
|
+
delete manifest.platform_verification;
|
|
93
|
+
delete manifest.architecture_identity.platform_configuration;
|
|
90
94
|
manifest.completion_level = "empty-scaffold-verified";
|
|
91
95
|
manifest.empty_scaffold_verification_ref = emptyVerificationPath;
|
|
92
96
|
await writeFile(manifestPath, `${JSON.stringify(manifest, null, 2)}\n`);
|
package/template/.pi/skills/yss-ddd-scaffold-generator/scripts/first-slice-verification.test.mjs
CHANGED
|
@@ -54,7 +54,9 @@ async function fixture({ omitGatewayImpl = false, omitReadiness = false } = {})
|
|
|
54
54
|
const manifestPath = path.join(project, ".yss", "scaffold-generation.json");
|
|
55
55
|
const contractPath = path.join(root, "slice-contract.json");
|
|
56
56
|
await mkdir(path.dirname(manifestPath), { recursive: true });
|
|
57
|
+
const architectureIdentity = { architecture_family: "domain-driven", architecture_profile: "target-domain-model", generator_skill: "yss-ddd-scaffold-generator", requested_capabilities: [], resolved_modules: ["domain", "application", "infrastructure", "adapter", "bootstrap"], contract_digest: "a".repeat(64), verification_database: "h2", production_database: "not-bound" };
|
|
57
58
|
await writeFile(manifestPath, JSON.stringify({
|
|
59
|
+
architecture_identity: architectureIdentity,
|
|
58
60
|
schema_version: 2,
|
|
59
61
|
contract_id: "scaffold-1",
|
|
60
62
|
contract_version: 1,
|
|
@@ -79,7 +81,8 @@ async function fixture({ omitGatewayImpl = false, omitReadiness = false } = {})
|
|
|
79
81
|
maven_coordinates_source: "approved-contract"
|
|
80
82
|
}));
|
|
81
83
|
await writeFile(contractPath, JSON.stringify({
|
|
82
|
-
|
|
84
|
+
architecture_identity: architectureIdentity,
|
|
85
|
+
schema_version: 2,
|
|
83
86
|
contract_id: "slice-1",
|
|
84
87
|
contract_version: 1,
|
|
85
88
|
slice_id: "quality-rule-first-slice",
|
|
@@ -87,7 +90,7 @@ async function fixture({ omitGatewayImpl = false, omitReadiness = false } = {})
|
|
|
87
90
|
readiness: { blockers: [], stale_inputs: [] },
|
|
88
91
|
common: { required_skills: requiredSkills },
|
|
89
92
|
backend: { status: "required", affected_layers: ["domain", "application", "infrastructure", "web"], required_skills: requiredSkills },
|
|
90
|
-
work_units: [{ id: "slice-backend", contract_id: "slice-1", contract_version: 1, work_unit: { primary_skill: "yss-domain" } }]
|
|
93
|
+
work_units: [{ architecture_identity: architectureIdentity, id: "slice-backend", contract_id: "slice-1", contract_version: 1, work_unit: { primary_skill: "yss-domain" } }]
|
|
91
94
|
}));
|
|
92
95
|
await write(project, "mvnw", "#!/bin/sh\nexit 0\n");
|
|
93
96
|
await chmod(path.join(project, "mvnw"), 0o755);
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
/** YSS DDD 后端纯工程骨架生成器;只生成工程结构,不生成任何业务行为。 */
|
|
3
|
+
import { platformSourceFingerprint, generatedTreeDigest } from "../../../../scripts/lib/backend-platform-provenance.mjs";
|
|
4
|
+
import { assertContractPlatform, platformTemplateVars, platformSmokeTest } from "../../../../scripts/lib/backend-platform.mjs";
|
|
3
5
|
import { assertScaffoldUserDecision } from "../../../../scripts/lib/user-decision.mjs";
|
|
4
6
|
import { createHash } from "node:crypto";
|
|
5
7
|
import { chmod, cp, lstat, mkdir, mkdtemp, readFile, readdir, rename, rm, stat, writeFile, copyFile } from "node:fs/promises";
|
|
@@ -27,8 +29,6 @@ const SUPPORTED_PROFILES = Object.freeze({
|
|
|
27
29
|
persistence: "mybatis-plus",
|
|
28
30
|
verification_database: "h2",
|
|
29
31
|
production_database: "not-bound",
|
|
30
|
-
platform: "spring-boot-2.7-jdk8",
|
|
31
|
-
validation_namespace: "javax",
|
|
32
32
|
dto_placement: "web",
|
|
33
33
|
repository: "yss-internal"
|
|
34
34
|
});
|
|
@@ -56,14 +56,14 @@ function usage(error) {
|
|
|
56
56
|
`用法: node scripts/generate_scaffold.mjs --project-name <kebab-case> --base-package <package> --output-dir <dir> --contract-file <json> [选项]\n\n` +
|
|
57
57
|
`必填合同元数据: --contract-id --contract-version --approval-ref --compiler-draft-ref --persisted-ref\n` +
|
|
58
58
|
`Maven 坐标: --group-id --project-version --parent-group-id --parent-artifact-id --parent-version --yss-components-version\n` +
|
|
59
|
-
`固定 Profile: target-domain-model / mybatis-plus /
|
|
59
|
+
`固定 Profile: target-domain-model / mybatis-plus / approved Boot/Java platform / derived validation namespace / web / yss-internal\n` +
|
|
60
60
|
`本生成器严格 initialize-only;--force 和任何已有项目目标均为 unsupported。\n` +
|
|
61
61
|
`--with-example 已禁用;--without-example 仅保留为无操作参数。`;
|
|
62
62
|
if (error) process.stderr.write(`错误: ${error}\n\n`);
|
|
63
63
|
process.stdout.write(`${text}\n`);
|
|
64
64
|
}
|
|
65
65
|
|
|
66
|
-
function parseArgs(argv) {
|
|
66
|
+
export function parseArgs(argv) {
|
|
67
67
|
const options = { force: false, withExample: false };
|
|
68
68
|
const mapping = new Map([
|
|
69
69
|
["--project-name", "projectName"], ["--base-package", "basePackage"], ["--output-dir", "outputDir"],
|
|
@@ -130,8 +130,9 @@ async function treeDigest(root) {
|
|
|
130
130
|
return hash.digest("hex");
|
|
131
131
|
}
|
|
132
132
|
|
|
133
|
-
class ScaffoldGenerator {
|
|
134
|
-
constructor(options) {
|
|
133
|
+
export class ScaffoldGenerator {
|
|
134
|
+
constructor(options, platformOptions = {}) {
|
|
135
|
+
this.platformOptions = platformOptions;
|
|
135
136
|
this.options = options;
|
|
136
137
|
this.projectName = options.projectName;
|
|
137
138
|
this.basePackage = options.basePackage;
|
|
@@ -258,6 +259,7 @@ class ScaffoldGenerator {
|
|
|
258
259
|
if (!decision.user_confirmation || Object.values(decision.user_confirmation).some((value) => !isPresent(value))) fail("架构决策缺少完整用户确认记录");
|
|
259
260
|
assertScaffoldUserDecision(decision);
|
|
260
261
|
this.designPrerequisites = await validateBackendScaffoldPrerequisites(contract, { contractFile: this.contractFile });
|
|
262
|
+
this.platform = assertContractPlatform(contract, decision, { ...this.platformOptions, requireVerified: this.platformOptions.candidate !== true }).profile;
|
|
261
263
|
const generationPolicy = contract.generation_policy;
|
|
262
264
|
if (!generationPolicy || generationPolicy.mode !== "initialize-only" || generationPolicy.existing_target !== "unsupported" || generationPolicy.old_project_migration !== "unsupported" || generationPolicy.template_upgrade !== "unsupported") fail("脚手架合同 generation_policy 必须声明 initialize-only,且 existing_target、old_project_migration、template_upgrade 均为 unsupported");
|
|
263
265
|
this.contractDigest = sha256(contractText);
|
|
@@ -306,7 +308,7 @@ class ScaffoldGenerator {
|
|
|
306
308
|
|
|
307
309
|
templateVars() {
|
|
308
310
|
const coordinates = this.mavenCoordinates;
|
|
309
|
-
return { project_name: this.projectName, application_class_name: this.applicationClassName, base_package: this.basePackage, group_id: coordinates.group_id, project_version: coordinates.project_version, parent_group_id: coordinates.parent.group_id, parent_artifact_id: coordinates.parent.artifact_id, parent_version: coordinates.parent.version, yss_components_version: coordinates.yss_components_version, project_description: `${this.projectName} service`, author: this.author, date: this.date, db_dependency: "" };
|
|
311
|
+
return { ...platformTemplateVars(this.platform), project_name: this.projectName, application_class_name: this.applicationClassName, base_package: this.basePackage, group_id: coordinates.group_id, project_version: coordinates.project_version, parent_group_id: coordinates.parent.group_id, parent_artifact_id: coordinates.parent.artifact_id, parent_version: coordinates.parent.version, yss_components_version: coordinates.yss_components_version, project_description: `${this.projectName} service`, author: this.author, date: this.date, db_dependency: "" };
|
|
310
312
|
}
|
|
311
313
|
render(text) { let output = text; for (const [key, value] of Object.entries(this.templateVars())) output = output.replaceAll(`{{${key}}}`, String(value)); return output; }
|
|
312
314
|
async renderTemplate(template, output) { if (!await isFile(template)) fail(`模板文件不存在: ${template}`); await writeText(output, this.render(await readFile(template, "utf8"))); }
|
|
@@ -333,6 +335,7 @@ class ScaffoldGenerator {
|
|
|
333
335
|
const source = path.join(this.javaTemplateDir, "bootstrap-application.java.template");
|
|
334
336
|
const target = path.join(this.projectRoot, this.bootstrapMainSource);
|
|
335
337
|
await this.renderTemplate(source, target);
|
|
338
|
+
await writeText(path.join(this.projectRoot, `${this.projectName}-bootstrap/src/test/java/${this.basePackage.replaceAll(".", "/")}/PlatformIntegrationTest.java`), platformSmokeTest(this.basePackage, this.platform));
|
|
336
339
|
console.log(`\n☕ 生成机械启动入口...\n ✓ ${this.applicationClassName}.java`);
|
|
337
340
|
}
|
|
338
341
|
async generateArchitectureRules() {
|
|
@@ -351,7 +354,7 @@ class ScaffoldGenerator {
|
|
|
351
354
|
generateDatabaseScripts() { console.log("\n🗃️ 保留数据库目录布局...\n ✓ db/(业务 schema 和初始化数据由批准切片合同生成)"); }
|
|
352
355
|
async generateDocumentation() {
|
|
353
356
|
console.log("\n📚 生成项目文档...");
|
|
354
|
-
await writeText(path.join(this.projectRoot, "README.md"), this.render("# {{project_name}}\n\n## 模块说明\n\n- {{project_name}}-domain\n- {{project_name}}-application\n- {{project_name}}-infrastructure\n- {{project_name}}-adapter\n- {{project_name}}-bootstrap\n\n业务 API、领域模型、数据结构和权限行为必须在冻结的 Slice Implementation Contract 下,由对应 YSS skill 逐切片实现。\n\n## 快速开始\n\n```bash\ncd {{project_name}}\n./mvnw clean compile\n./mvnw -Pscaffold-local spring-boot:run -pl {{project_name}}-bootstrap -Dspring-boot.run.profiles=scaffold-local\n```\n"));
|
|
357
|
+
await writeText(path.join(this.projectRoot, "README.md"), this.render("# {{project_name}}\n\n平台:Spring Boot {{boot_version}} / Java {{java_version}}。\n\n## 模块说明\n\n- {{project_name}}-domain\n- {{project_name}}-application\n- {{project_name}}-infrastructure\n- {{project_name}}-adapter\n- {{project_name}}-bootstrap\n\n业务 API、领域模型、数据结构和权限行为必须在冻结的 Slice Implementation Contract 下,由对应 YSS skill 逐切片实现。\n\n## 快速开始\n\n```bash\ncd {{project_name}}\n./mvnw clean compile\n./mvnw -Pscaffold-local spring-boot:run -pl {{project_name}}-bootstrap -Dspring-boot.run.profiles=scaffold-local\n```\n"));
|
|
355
358
|
console.log(" ✓ README.md");
|
|
356
359
|
}
|
|
357
360
|
async writeGenerationManifest() {
|
|
@@ -368,7 +371,7 @@ class ScaffoldGenerator {
|
|
|
368
371
|
}
|
|
369
372
|
const scaffoldParent = path.join(SKILL_ROOT, "references", "yss-backend-scaffold-parent", "SKILL.md");
|
|
370
373
|
const compilerContract = path.join(REPOSITORY_ROOT, ".agents", "skills", "yss-implementation-contract-compiler", "references", "compiler-contract.yaml");
|
|
371
|
-
const manifest = { schema_version: 4, kind: "backend-scaffold", architecture_profile: contract.architecture_profile, architecture_identity: scaffoldArchitectureIdentity(contract, this.contractDigest), contract_id: this.options.contractId, contract_version: this.options.contractVersion, scaffold_request_id: contract.scaffold_request_id, architecture_family: contract.architecture_family, generator_skill: contract.generator_skill, decision_id: contract.decision_id, decision_digest: contract.decision_digest, module_profile: contract.module_profile, design_prerequisites: this.designPrerequisites, approval_ref: this.options.approvalRef, compiler_draft_ref: this.options.compilerDraftRef, persisted_ref: this.options.persistedRef, contract_file_ref: this.contractFile, contract_digest: this.contractDigest, lifecycle_approval_ref: contract.lifecycle_approval_ref, current_version: contract.current_version, approver: contract.approval.approver, allowed_write_paths: contract.allowed_write_paths, expected_evidence_files: contract.expected_evidence_files, project_name: this.projectName, base_package: this.basePackage, bootstrap_main_class: `${this.basePackage}.${this.applicationClassName}`, bootstrap_main_source: this.bootstrapMainSource, maven_coordinates: this.mavenCoordinates, maven_coordinates_source: this.mavenCoordinatesSource, profiles: this.profiles, generation_mode: "controlled-generation", completion_level: "generated", generator: { id: "yss-ddd-scaffold-generator", template_digest: await treeDigest(path.join(SKILL_ROOT, "assets")) }, ownership: { generated_files: generatedFiles, user_owned_globs: ["**/src/main/java/**", "**/src/test/java/**", "db/**"] }, readiness: { downstream_skills: downstream, contracts: { scaffold_parent: sha256(await readFile(scaffoldParent)), compiler_contract: sha256(await readFile(compilerContract)) }, architecture_ruleset: sha256(await readFile(path.join(this.javaTemplateDir, "architecture-rules-test.java.template"))) }, generation_policy: { mode: "initialize-only", existing_target: "unsupported", old_project_migration: "unsupported", template_upgrade: "unsupported" }, verification_commands: COMMANDS, generated_at: isoNow() };
|
|
374
|
+
const manifest = { source_fingerprint: platformSourceFingerprint(contract.architecture_family), generated_tree_digest: generatedTreeDigest(this.projectRoot, { ownership: { generated_files: generatedFiles } }), platform_verification: this.platformOptions.candidate === true ? "candidate" : "verified", platform_configuration: contract.platform_configuration, schema_version: 4, kind: "backend-scaffold", architecture_profile: contract.architecture_profile, architecture_identity: scaffoldArchitectureIdentity(contract, this.contractDigest), contract_id: this.options.contractId, contract_version: this.options.contractVersion, scaffold_request_id: contract.scaffold_request_id, architecture_family: contract.architecture_family, generator_skill: contract.generator_skill, decision_id: contract.decision_id, decision_digest: contract.decision_digest, module_profile: contract.module_profile, design_prerequisites: this.designPrerequisites, approval_ref: this.options.approvalRef, compiler_draft_ref: this.options.compilerDraftRef, persisted_ref: this.options.persistedRef, contract_file_ref: this.contractFile, contract_digest: this.contractDigest, lifecycle_approval_ref: contract.lifecycle_approval_ref, current_version: contract.current_version, approver: contract.approval.approver, allowed_write_paths: contract.allowed_write_paths, expected_evidence_files: contract.expected_evidence_files, project_name: this.projectName, base_package: this.basePackage, bootstrap_main_class: `${this.basePackage}.${this.applicationClassName}`, bootstrap_main_source: this.bootstrapMainSource, maven_coordinates: this.mavenCoordinates, maven_coordinates_source: this.mavenCoordinatesSource, profiles: this.profiles, generation_mode: "controlled-generation", completion_level: "generated", generator: { id: "yss-ddd-scaffold-generator", template_digest: await treeDigest(path.join(SKILL_ROOT, "assets")) }, ownership: { generated_files: generatedFiles, user_owned_globs: ["**/src/main/java/**", "**/src/test/java/**", "db/**"] }, readiness: { downstream_skills: downstream, contracts: { scaffold_parent: sha256(await readFile(scaffoldParent)), compiler_contract: sha256(await readFile(compilerContract)) }, architecture_ruleset: sha256(await readFile(path.join(this.javaTemplateDir, "architecture-rules-test.java.template"))) }, generation_policy: { mode: "initialize-only", existing_target: "unsupported", old_project_migration: "unsupported", template_upgrade: "unsupported" }, verification_commands: COMMANDS, generated_at: isoNow() };
|
|
372
375
|
await writeText(path.join(this.projectRoot, ".yss", "scaffold-generation.json"), `${JSON.stringify(manifest, null, 2)}\n`); console.log(" ✓ .yss/scaffold-generation.json");
|
|
373
376
|
}
|
|
374
377
|
async copyWrapperFiles() {
|
|
@@ -387,4 +390,4 @@ class ScaffoldGenerator {
|
|
|
387
390
|
}
|
|
388
391
|
|
|
389
392
|
async function main() { let options; try { options = parseArgs(process.argv.slice(2)); if (options.help) { usage(); return 0; } await new ScaffoldGenerator(options).generate(); return 0; } catch (error) { process.stderr.write(`\n❌ 生成失败: ${error.message}\n`); return 1; } }
|
|
390
|
-
process.exitCode = await main();
|
|
393
|
+
if (process.argv[1] === fileURLToPath(import.meta.url)) process.exitCode = await main();
|
package/template/.pi/skills/yss-ddd-scaffold-generator/scripts/run_first_slice_verification.mjs
CHANGED
|
@@ -126,6 +126,7 @@ export async function runFirstSliceVerification(projectRoot, evidenceDir, sliceC
|
|
|
126
126
|
if (!await isFile(sliceContractFile)) throw new Error(`missing Slice Implementation Contract: ${sliceContractFile}`);
|
|
127
127
|
const manifest = JSON.parse(await readFile(manifestPath, "utf8"));
|
|
128
128
|
const contract = JSON.parse(await readFile(sliceContractFile, "utf8"));
|
|
129
|
+
if (manifest.platform_verification === "candidate") throw new Error("backend-platform: candidate scaffold cannot become first-slice-verified");
|
|
129
130
|
const adapter = manifest.architecture_family === "layered-mvc" ? mvcFirstSliceProfile(manifest.architecture_identity ?? {}) : { skills: REQUIRED_SKILLS, layers: REQUIRED_LAYERS, artifacts: ARTIFACT_CHECKS };
|
|
130
131
|
const contractFailures = invalidContractReasons(contract, adapter.skills, adapter.layers);
|
|
131
132
|
try {
|
|
@@ -145,7 +146,7 @@ export async function runFirstSliceVerification(projectRoot, evidenceDir, sliceC
|
|
|
145
146
|
}
|
|
146
147
|
|
|
147
148
|
const mavenEvidence = path.join(evidenceDir, "maven");
|
|
148
|
-
const wrapper = await runScaffoldVerification(projectRoot, mavenEvidence, environment);
|
|
149
|
+
const wrapper = await runScaffoldVerification(projectRoot, mavenEvidence, environment, { firstSlice: true });
|
|
149
150
|
const passed = wrapper.status === "passed";
|
|
150
151
|
const report = { verification_mode: "first-slice", project_root: projectRoot, slice_contract_ref: sliceContractFile, scaffold_manifest_ref: manifestPath, generated_at: isoNow(), status: passed ? "passed" : "failed", failure_category: wrapper.failure_category, completion_level: passed ? "first-slice-verified" : manifest.completion_level, contract_failures: [], missing_artifacts: [], downstream_skill_drift: [], commands: wrapper.commands };
|
|
151
152
|
await writeJsonAtomic(reportPath, report);
|
package/template/.pi/skills/yss-ddd-scaffold-generator/scripts/run_scaffold_verification.mjs
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
/** 在生成项目根目录实际执行 YSS 脚手架的固定验证命令并留证。 */
|
|
3
|
+
import { assertSourceFingerprint, generatedTreeDigest } from "../../../../scripts/lib/backend-platform-provenance.mjs";
|
|
4
|
+
import { assertContractPlatform, assertPlatformAgreement, platformDigest } from "../../../../scripts/lib/backend-platform.mjs";
|
|
5
|
+
import { verifyPlatformDependencies, verifyPlatformStartup, verifyPlatformTests, platformEvidenceArtifacts } from "../../../../scripts/lib/backend-platform-verification.mjs";
|
|
3
6
|
import { mkdir, readFile, stat, writeFile } from "node:fs/promises";
|
|
4
7
|
import path from "node:path";
|
|
5
8
|
import process from "node:process";
|
|
@@ -59,12 +62,30 @@ function validateManifest(manifest) {
|
|
|
59
62
|
if (manifest.schema_version === 4 ? manifest.current_version !== true : manifest.current_version !== manifest.contract_version) throw new Error("脚手架生成元数据清单不是当前合同版本");
|
|
60
63
|
if (JSON.stringify(manifest.verification_commands) !== JSON.stringify(COMMANDS)) throw new Error("脚手架生成元数据清单验证命令不符合固定合同");
|
|
61
64
|
}
|
|
62
|
-
export async function run(projectRoot, evidenceDir, environment = process.env, { timeoutMs = 0, signal } = {}) {
|
|
65
|
+
export async function run(projectRoot, evidenceDir, environment = process.env, { timeoutMs = 0, signal, platformOptions = {}, firstSlice = false } = {}) {
|
|
63
66
|
const wrapper = path.join(projectRoot, "mvnw"), manifestPath = path.join(projectRoot, ".yss", "scaffold-generation.json");
|
|
64
67
|
if (!await isFile(wrapper)) throw new Error(`项目根目录缺少 Maven wrapper: ${wrapper}`);
|
|
65
68
|
if (!await isFile(manifestPath)) throw new Error(`项目根目录缺少脚手架生成元数据清单: ${manifestPath}`);
|
|
66
69
|
let manifest; try { manifest = JSON.parse(await readFile(manifestPath, "utf8")); } catch { throw new Error(`脚手架生成元数据清单无法读取或不是合法 JSON: ${manifestPath}`); }
|
|
67
70
|
validateManifest(manifest);
|
|
71
|
+
let selectedPlatform, selectedEntry;
|
|
72
|
+
if (manifest.platform_verification && !manifest.platform_configuration) throw new Error("backend-platform: Manifest missing platform_configuration");
|
|
73
|
+
if (manifest.platform_configuration) {
|
|
74
|
+
if (manifest.platform_verification === "candidate" && platformOptions.candidate !== true) throw new Error("backend-platform: candidate scaffold cannot enter production verification");
|
|
75
|
+
const contractBytes = await readFile(manifest.contract_file_ref);
|
|
76
|
+
if (platformDigest(contractBytes).replace(/^sha256:/, "") !== manifest.contract_digest.replace(/^sha256:/, "")) throw new Error("backend-platform: contract digest drift");
|
|
77
|
+
const contract = JSON.parse(contractBytes);
|
|
78
|
+
assertPlatformAgreement(manifest.platform_configuration, contract.platform_configuration);
|
|
79
|
+
if (firstSlice) {
|
|
80
|
+
if (manifest.platform_verification !== "verified" || manifest.completion_level !== "empty-scaffold-verified") throw new Error("backend-platform: first slice requires a verified empty scaffold");
|
|
81
|
+
} else {
|
|
82
|
+
const relativeEvidence = path.relative(path.resolve(projectRoot), path.resolve(evidenceDir));
|
|
83
|
+
if (!relativeEvidence || (!relativeEvidence.startsWith(`..${path.sep}`) && relativeEvidence !== ".." && !path.isAbsolute(relativeEvidence))) throw new Error("backend-platform: empty scaffold evidence must be outside the generated project");
|
|
84
|
+
assertSourceFingerprint(manifest.source_fingerprint, manifest.architecture_family);
|
|
85
|
+
if (generatedTreeDigest(projectRoot, manifest) !== manifest.generated_tree_digest) throw new Error("backend-platform: generated tree drift");
|
|
86
|
+
}
|
|
87
|
+
({ profile: selectedPlatform, entry: selectedEntry } = assertContractPlatform(contract, null, { ...platformOptions, requireVerified: platformOptions.candidate !== true }));
|
|
88
|
+
}
|
|
68
89
|
await mkdir(evidenceDir, { recursive: true });
|
|
69
90
|
const mavenConfig = await readTextIfPresent(path.join(projectRoot, ".mvn", "maven.config"));
|
|
70
91
|
const preflight = {
|
|
@@ -86,6 +107,7 @@ export async function run(projectRoot, evidenceDir, environment = process.env, {
|
|
|
86
107
|
if (!preflight.maven_repository_url_configured) failed.push("repository-url-not-configured");
|
|
87
108
|
if (!preflight.maven_repository_credentials_configured) failed.push("repository-credentials-not-configured");
|
|
88
109
|
if (failed.length) return { verification_mode: "controlled-generation", project_root: projectRoot, scaffold_manifest_ref: manifestPath, generated_at: isoNow(), status: "failed", failure_category: "verification-preflight", completion_level: "generated", preflight: { ...preflight, failures: failed }, commands: [] };
|
|
110
|
+
const verificationStartedAt = Date.now();
|
|
89
111
|
const commands = [];
|
|
90
112
|
for (const phase of PHASES) {
|
|
91
113
|
const stdoutPath = path.join(evidenceDir, `mvnw-${phase}.stdout.log`);
|
|
@@ -109,15 +131,25 @@ export async function run(projectRoot, evidenceDir, environment = process.env, {
|
|
|
109
131
|
stderr_ref: stderrPath
|
|
110
132
|
});
|
|
111
133
|
}
|
|
112
|
-
|
|
134
|
+
let failureCategory = commands.find((item) => item.failure_category)?.failure_category ?? null;
|
|
135
|
+
const platformDependencies = selectedPlatform && failureCategory === null ? await verifyPlatformDependencies(projectRoot, evidenceDir, selectedPlatform, environment, { timeoutMs, signal, manifest, components: selectedEntry.components }) : null;
|
|
136
|
+
if (platformDependencies?.status === "failed") failureCategory = "platform-dependencies";
|
|
137
|
+
const integrationTests = selectedPlatform && failureCategory === null ? await verifyPlatformTests(projectRoot, evidenceDir, manifest, verificationStartedAt) : null;
|
|
138
|
+
if (integrationTests?.status === "failed") failureCategory = "platform-integration-tests";
|
|
139
|
+
const startup = selectedPlatform && failureCategory === null ? await verifyPlatformStartup(projectRoot, evidenceDir, manifest, environment, { timeoutMs, signal, runtimeArtifacts: platformDependencies.runtime_artifacts, providedLombokVersion: selectedPlatform.versions.lombok }) : null;
|
|
140
|
+
if (startup?.status === "failed") failureCategory = "platform-startup";
|
|
141
|
+
if (selectedPlatform && !firstSlice && generatedTreeDigest(projectRoot, manifest) !== manifest.generated_tree_digest) throw new Error("backend-platform: Maven modified generated source bytes");
|
|
113
142
|
return {
|
|
143
|
+
verification_scope: firstSlice ? "first-slice" : "empty-scaffold",
|
|
144
|
+
...(selectedPlatform && !firstSlice ? { recipe_digest: manifest.platform_configuration.compatibility_digest, source_fingerprint: manifest.source_fingerprint, generated_tree_digest: manifest.generated_tree_digest, evidence_artifacts: await platformEvidenceArtifacts(evidenceDir), verified_capabilities: manifest.module_profile?.requested_capabilities ?? [], integration_tests: integrationTests } : {}),
|
|
145
|
+
...(selectedPlatform ? { spring_boot_version: selectedPlatform.spring_boot_version, java_version: selectedPlatform.java_version, parent: manifest.platform_configuration.parent, bom: manifest.platform_configuration.bom, architecture_family: manifest.architecture_family, platform_dependencies: platformDependencies, dependency_check: platformDependencies?.status ?? "not-executed", startup, startup_check: startup?.status ?? "not-executed", platform_verification: manifest.platform_verification } : {}),
|
|
114
146
|
verification_mode: "controlled-generation",
|
|
115
147
|
project_root: projectRoot,
|
|
116
148
|
scaffold_manifest_ref: manifestPath,
|
|
117
149
|
generated_at: isoNow(),
|
|
118
150
|
status: failureCategory === null ? "passed" : "failed",
|
|
119
151
|
failure_category: failureCategory,
|
|
120
|
-
completion_level: failureCategory === null ? "empty-scaffold-verified" : "generated",
|
|
152
|
+
completion_level: firstSlice ? manifest.completion_level : failureCategory === null && manifest.platform_verification !== "candidate" ? "empty-scaffold-verified" : "generated",
|
|
121
153
|
preflight,
|
|
122
154
|
commands
|
|
123
155
|
};
|
|
@@ -16,7 +16,7 @@ import { attachDesignPrerequisites } from "../../../../scripts/fixtures/backend-
|
|
|
16
16
|
const scripts = path.dirname(fileURLToPath(import.meta.url));
|
|
17
17
|
const generator = path.join(scripts, "generate_scaffold.mjs");
|
|
18
18
|
const workflow = path.join(scripts, "generate_and_verify_scaffold.mjs");
|
|
19
|
-
const command = (args, options = {}) => new Promise((resolve) => execFile(process.execPath, [generator, ...args], { encoding: "utf8", ...options }, (error, stdout, stderr) => resolve({ code: error?.code ?? 0, stdout, stderr })));
|
|
19
|
+
const command = (args, options = {}) => new Promise((resolve) => execFile(process.execPath, [path.resolve(scripts, "../../../../scripts/fixtures/backend-scaffold/generate-candidate.mjs"), generator, ...args], { encoding: "utf8", ...options }, (error, stdout, stderr) => resolve({ code: error?.code ?? 0, stdout, stderr })));
|
|
20
20
|
const workflowCommand = (args, options = {}) => new Promise((resolve) => execFile(process.execPath, [workflow, ...args], { encoding: "utf8", ...options }, (error, stdout, stderr) => resolve({ code: error?.code ?? 0, stdout, stderr })));
|
|
21
21
|
async function treeDigest(root) {
|
|
22
22
|
const hash = createHash("sha256");
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: yss-dto
|
|
3
|
-
description:
|
|
3
|
+
description: "实现或核验 YSS Result、PageResult、PageQuery、CommandDTO、QueryDTO 及 wire 边界。"
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# yss-dto
|
|
@@ -91,3 +91,7 @@ description: Use when YSS `Result`, `SingleResult`, `MultiResult`, `PageResult`,
|
|
|
91
91
|
- DTO/VO 必须消费冻结 OpenAPI/no-impact record 和批准合同,写入合同允许路径。
|
|
92
92
|
- POJO 样板可 `controlled-generation`;校验、权限输入、错误结构和序列化行为必须由对应 `behavior-tdd` 工作单元覆盖。
|
|
93
93
|
- 必须加载合同要求的 `lombok`、`mapstruct` 和 `alibaba-java-code-style`,并按统一 `YSS Skill Execution Result` 返回文件、契约测试和偏离。
|
|
94
|
+
|
|
95
|
+
## 新脚手架平台约束
|
|
96
|
+
|
|
97
|
+
消费批准切片架构身份中的 `platform_configuration`,与工程 Manifest 核对后使用对应 YSS 组件。Boot 2.7 使用 `javax` Web/Validation API;Boot 3.5/4.1 使用 `jakarta`。Boot 4 按 Jackson 3、对应自动配置和 starter 适配;不替换 `javax.sql` 等 Java SE 包。平台不一致、兼容条目缺失或候选未验证时回合同编译器阻断,不在业务实现中升级或替换组件。详见 仓库共享合同 `docs/engineering/backend-platforms.md`。
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: yss-exception
|
|
3
|
-
description:
|
|
3
|
+
description: "接入或排查 YSS 统一异常、错误码、异常处理器与 exception starter。"
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# yss-exception
|
|
@@ -56,3 +56,7 @@ Read `references/source-index.md` as a path-hint index whenever the task depends
|
|
|
56
56
|
- Do not invent class names or configuration keys without checking the source index.
|
|
57
57
|
- Do not replace component extension points with business-local framework code.
|
|
58
58
|
- Do not broaden the task into unrelated YSS components unless the user asks.
|
|
59
|
+
|
|
60
|
+
## 新脚手架平台约束
|
|
61
|
+
|
|
62
|
+
消费批准切片架构身份中的 `platform_configuration`,与工程 Manifest 核对后使用对应 YSS 组件。Boot 2.7 使用 `javax` Web/Validation API;Boot 3.5/4.1 使用 `jakarta`。Boot 4 按 Jackson 3、对应自动配置和 starter 适配;不替换 `javax.sql` 等 Java SE 包。平台不一致、兼容条目缺失或候选未验证时回合同编译器阻断,不在业务实现中升级或替换组件。详见 仓库共享合同 `docs/engineering/backend-platforms.md`。
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: yss-formily-schema-generator
|
|
3
|
-
description:
|
|
3
|
+
description: "从需求或设计图生成 YFormily JSON Schema 与表单代码;仅用于生产表单实现。"
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# YssFormily Schema Generator
|