create-yss-spec 2.2.9 → 2.2.10
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 +1 -1
- package/template/.agents/mcp_config.json +8 -0
- package/template/.agents/rules/yss-ai-skills.md +3 -1
- package/template/.agents/skills/.yss-skills-manifest.json +51 -25
- package/template/.agents/skills/code-review/references/yss-review-standards.md +3 -3
- package/template/.agents/skills/component-selection-imports/SKILL.md +2 -2
- package/template/.agents/skills/frontend-commit/SKILL.md +1 -1
- package/template/.agents/skills/yss-api-integration/SKILL.md +85 -339
- package/template/.agents/skills/yss-application/SKILL.md +7 -5
- package/template/.agents/skills/yss-application/references/application-layer-guide.md +60 -105
- package/template/.agents/skills/yss-components/SKILL.md +1 -1
- package/template/.agents/skills/yss-ddd-scaffold-generator/SKILL.md +27 -13
- package/template/.agents/skills/yss-ddd-scaffold-generator/assets/templates/config/application-local.yml.template +8 -0
- package/template/.agents/skills/yss-ddd-scaffold-generator/assets/templates/config/application.yml.template +2 -3
- package/template/.agents/skills/yss-ddd-scaffold-generator/assets/templates/java/architecture-rules-test.java.template +36 -0
- package/template/.agents/skills/yss-ddd-scaffold-generator/assets/templates/java/bootstrap-application.java.template +15 -0
- package/template/.agents/skills/yss-ddd-scaffold-generator/assets/templates/pom/adapter-pom.xml.template +3 -3
- package/template/.agents/skills/yss-ddd-scaffold-generator/assets/templates/pom/application-pom.xml.template +13 -4
- package/template/.agents/skills/yss-ddd-scaffold-generator/assets/templates/pom/bootstrap-pom.xml.template +24 -4
- package/template/.agents/skills/yss-ddd-scaffold-generator/assets/templates/pom/domain-pom.xml.template +6 -20
- package/template/.agents/skills/yss-ddd-scaffold-generator/assets/templates/pom/infrastructure-pom.xml.template +26 -6
- package/template/.agents/skills/yss-ddd-scaffold-generator/assets/templates/pom/parent-pom.xml.template +70 -10
- package/template/.agents/skills/yss-ddd-scaffold-generator/assets/templates/pom/web-pom.xml.template +24 -10
- package/template/.agents/skills/yss-ddd-scaffold-generator/assets/wrapper/.mvn/maven.config +2 -3
- package/template/.agents/skills/yss-ddd-scaffold-generator/assets/wrapper/.mvn/settings.xml +18 -105
- package/template/.agents/skills/yss-ddd-scaffold-generator/assets/wrapper/.mvn/wrapper/maven-wrapper.properties +4 -2
- package/template/.agents/skills/yss-ddd-scaffold-generator/references/ARCHITECTURE.md +78 -156
- package/template/.agents/skills/yss-ddd-scaffold-generator/references/USAGE_EXAMPLES.md +83 -389
- package/template/.agents/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-adapter/SKILL.md +20 -188
- package/template/.agents/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-parent/SKILL.md +41 -122
- package/template/.agents/skills/yss-ddd-scaffold-generator/scripts/first-slice-compatibility.test.mjs +191 -0
- package/template/.agents/skills/yss-ddd-scaffold-generator/scripts/generate_and_verify_scaffold.mjs +126 -0
- package/template/.agents/skills/yss-ddd-scaffold-generator/scripts/generate_scaffold.mjs +139 -42
- package/template/.agents/skills/yss-ddd-scaffold-generator/scripts/run_scaffold_verification.mjs +87 -7
- package/template/.agents/skills/yss-ddd-scaffold-generator/scripts/scaffold-generator.test.mjs +322 -12
- package/template/.agents/skills/yss-design-system/SKILL.md +2 -2
- package/template/.agents/skills/yss-design-system/references/design-system.md +2 -2
- package/template/.agents/skills/yss-domain/SKILL.md +3 -3
- package/template/.agents/skills/yss-domain/references/domain-layer-guide.md +61 -236
- package/template/.agents/skills/yss-dto/SKILL.md +5 -5
- package/template/.agents/skills/yss-dto/references/README.md +2 -2
- package/template/.agents/skills/yss-dto/references/openapi-wire-profile.yaml +3 -3
- package/template/.agents/skills/yss-exception/SKILL.md +2 -0
- package/template/.agents/skills/yss-formily/SKILL.md +1 -1
- package/template/.agents/skills/yss-mybatis/SKILL.md +2 -2
- package/template/.agents/skills/yss-page-module-development/SKILL.md +2 -0
- package/template/.agents/skills/yss-product-lifecycle/references/orchestration-contract.yaml +42 -11
- package/template/.agents/skills/yss-repository/SKILL.md +7 -5
- package/template/.agents/skills/yss-repository/references/infrastructure-layer-guide.md +70 -155
- package/template/.agents/skills/yss-router/references/router-contract.yaml +41 -7
- package/template/.agents/skills/yss-ui/SKILL.md +6 -5
- package/template/.agents/skills/yss-ui/references/component-routing.md +1 -1
- package/template/.agents/skills/yss-ui-business-page-generation/SKILL.md +159 -0
- package/template/.agents/skills/yss-ui-business-page-generation/references/component-map.md +39 -0
- package/template/.agents/skills/yss-ui-business-page-generation/references/hooks-map.md +70 -0
- package/template/.agents/skills/yss-ui-business-page-generation/references/utils-map.md +51 -0
- package/template/.agents/skills/yss-use-table-height/SKILL.md +78 -297
- package/template/.agents/skills/yss-use-tree-height/SKILL.md +51 -393
- package/template/.agents/skills/yss-web-controller/SKILL.md +12 -11
- package/template/.agents/skills/yss-web-controller/assets/templates/Controller.java.template +15 -16
- package/template/.agents/skills/yss-web-controller/assets/templates/WebConvertor.java.template +21 -11
- package/template/{.claude/skills/yss-web-controller/assets/templates/domain/dto/cmd/AddCmd.java.template → .agents/skills/yss-web-controller/assets/templates/web/dto/CreateRequest.java.template} +7 -11
- package/template/.agents/skills/yss-web-controller/assets/templates/web/dto/PageRequest.java.template +24 -0
- package/template/.agents/skills/yss-web-controller/assets/templates/web/dto/Response.java.template +18 -0
- package/template/.agents/skills/yss-web-controller/assets/templates/{domain/dto/cmd/AddCmd.java.template → web/dto/UpdateRequest.java.template} +7 -11
- package/template/.agents/skills/yss-web-controller/references/web-adapter-layer-guide.md +61 -145
- package/template/.agents/skills/yss-web-controller/scripts/generate_controller.mjs +45 -17
- package/template/.agents/skills/yss-web-controller/scripts/generate_controller.test.mjs +44 -3
- package/template/.claude/skills/code-review/references/yss-review-standards.md +3 -3
- package/template/.claude/skills/component-selection-imports/SKILL.md +2 -2
- package/template/.claude/skills/frontend-commit/SKILL.md +1 -1
- package/template/.claude/skills/yss-api-integration/SKILL.md +85 -339
- package/template/.claude/skills/yss-application/SKILL.md +7 -5
- package/template/.claude/skills/yss-application/references/application-layer-guide.md +60 -105
- package/template/.claude/skills/yss-components/SKILL.md +1 -1
- package/template/.claude/skills/yss-ddd-scaffold-generator/SKILL.md +27 -13
- package/template/.claude/skills/yss-ddd-scaffold-generator/assets/templates/config/application-local.yml.template +8 -0
- package/template/.claude/skills/yss-ddd-scaffold-generator/assets/templates/config/application.yml.template +2 -3
- package/template/.claude/skills/yss-ddd-scaffold-generator/assets/templates/java/architecture-rules-test.java.template +36 -0
- package/template/.claude/skills/yss-ddd-scaffold-generator/assets/templates/java/bootstrap-application.java.template +15 -0
- package/template/.claude/skills/yss-ddd-scaffold-generator/assets/templates/pom/adapter-pom.xml.template +3 -3
- package/template/.claude/skills/yss-ddd-scaffold-generator/assets/templates/pom/application-pom.xml.template +13 -4
- package/template/.claude/skills/yss-ddd-scaffold-generator/assets/templates/pom/bootstrap-pom.xml.template +24 -4
- package/template/.claude/skills/yss-ddd-scaffold-generator/assets/templates/pom/domain-pom.xml.template +6 -20
- package/template/.claude/skills/yss-ddd-scaffold-generator/assets/templates/pom/infrastructure-pom.xml.template +26 -6
- package/template/.claude/skills/yss-ddd-scaffold-generator/assets/templates/pom/parent-pom.xml.template +70 -10
- package/template/.claude/skills/yss-ddd-scaffold-generator/assets/templates/pom/web-pom.xml.template +24 -10
- package/template/.claude/skills/yss-ddd-scaffold-generator/assets/wrapper/.mvn/maven.config +2 -3
- package/template/.claude/skills/yss-ddd-scaffold-generator/assets/wrapper/.mvn/settings.xml +18 -105
- package/template/.claude/skills/yss-ddd-scaffold-generator/assets/wrapper/.mvn/wrapper/maven-wrapper.properties +4 -2
- package/template/.claude/skills/yss-ddd-scaffold-generator/references/ARCHITECTURE.md +78 -156
- package/template/.claude/skills/yss-ddd-scaffold-generator/references/USAGE_EXAMPLES.md +83 -389
- package/template/.claude/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-adapter/SKILL.md +20 -188
- package/template/.claude/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-parent/SKILL.md +41 -122
- package/template/.claude/skills/yss-ddd-scaffold-generator/scripts/first-slice-compatibility.test.mjs +191 -0
- package/template/.claude/skills/yss-ddd-scaffold-generator/scripts/generate_and_verify_scaffold.mjs +126 -0
- package/template/.claude/skills/yss-ddd-scaffold-generator/scripts/generate_scaffold.mjs +139 -42
- package/template/.claude/skills/yss-ddd-scaffold-generator/scripts/run_scaffold_verification.mjs +87 -7
- package/template/.claude/skills/yss-ddd-scaffold-generator/scripts/scaffold-generator.test.mjs +322 -12
- package/template/.claude/skills/yss-design-system/SKILL.md +2 -2
- package/template/.claude/skills/yss-design-system/references/design-system.md +2 -2
- package/template/.claude/skills/yss-domain/SKILL.md +3 -3
- package/template/.claude/skills/yss-domain/references/domain-layer-guide.md +61 -236
- package/template/.claude/skills/yss-dto/SKILL.md +5 -5
- package/template/.claude/skills/yss-dto/references/README.md +2 -2
- package/template/.claude/skills/yss-dto/references/openapi-wire-profile.yaml +3 -3
- package/template/.claude/skills/yss-exception/SKILL.md +2 -0
- package/template/.claude/skills/yss-formily/SKILL.md +1 -1
- package/template/.claude/skills/yss-mybatis/SKILL.md +2 -2
- package/template/.claude/skills/yss-page-module-development/SKILL.md +2 -0
- package/template/.claude/skills/yss-product-lifecycle/references/orchestration-contract.yaml +42 -11
- package/template/.claude/skills/yss-repository/SKILL.md +7 -5
- package/template/.claude/skills/yss-repository/references/infrastructure-layer-guide.md +70 -155
- package/template/.claude/skills/yss-router/references/router-contract.yaml +41 -7
- package/template/.claude/skills/yss-ui/SKILL.md +6 -5
- package/template/.claude/skills/yss-ui/references/component-routing.md +1 -1
- package/template/.claude/skills/yss-ui-business-page-generation/SKILL.md +159 -0
- package/template/.claude/skills/yss-ui-business-page-generation/references/component-map.md +39 -0
- package/template/.claude/skills/yss-ui-business-page-generation/references/hooks-map.md +70 -0
- package/template/.claude/skills/yss-ui-business-page-generation/references/utils-map.md +51 -0
- package/template/.claude/skills/yss-use-table-height/SKILL.md +78 -297
- package/template/.claude/skills/yss-use-tree-height/SKILL.md +51 -393
- package/template/.claude/skills/yss-web-controller/SKILL.md +12 -11
- package/template/.claude/skills/yss-web-controller/assets/templates/Controller.java.template +15 -16
- package/template/.claude/skills/yss-web-controller/assets/templates/WebConvertor.java.template +21 -11
- package/template/{.codex/skills/yss-web-controller/assets/templates/domain/dto/cmd/AddCmd.java.template → .claude/skills/yss-web-controller/assets/templates/web/dto/CreateRequest.java.template} +7 -11
- package/template/.claude/skills/yss-web-controller/assets/templates/web/dto/PageRequest.java.template +24 -0
- package/template/.claude/skills/yss-web-controller/assets/templates/web/dto/Response.java.template +18 -0
- package/template/{.cursor/skills/yss-web-controller/assets/templates/domain/dto/cmd/AddCmd.java.template → .claude/skills/yss-web-controller/assets/templates/web/dto/UpdateRequest.java.template} +7 -11
- package/template/.claude/skills/yss-web-controller/references/web-adapter-layer-guide.md +61 -145
- package/template/.claude/skills/yss-web-controller/scripts/generate_controller.mjs +45 -17
- package/template/.claude/skills/yss-web-controller/scripts/generate_controller.test.mjs +44 -3
- package/template/.codex/skills/code-review/references/yss-review-standards.md +3 -3
- package/template/.codex/skills/component-selection-imports/SKILL.md +2 -2
- package/template/.codex/skills/frontend-commit/SKILL.md +1 -1
- package/template/.codex/skills/yss-api-integration/SKILL.md +85 -339
- package/template/.codex/skills/yss-application/SKILL.md +7 -5
- package/template/.codex/skills/yss-application/references/application-layer-guide.md +60 -105
- package/template/.codex/skills/yss-components/SKILL.md +1 -1
- package/template/.codex/skills/yss-ddd-scaffold-generator/SKILL.md +27 -13
- package/template/.codex/skills/yss-ddd-scaffold-generator/assets/templates/config/application-local.yml.template +8 -0
- package/template/.codex/skills/yss-ddd-scaffold-generator/assets/templates/config/application.yml.template +2 -3
- package/template/.codex/skills/yss-ddd-scaffold-generator/assets/templates/java/architecture-rules-test.java.template +36 -0
- package/template/.codex/skills/yss-ddd-scaffold-generator/assets/templates/java/bootstrap-application.java.template +15 -0
- package/template/.codex/skills/yss-ddd-scaffold-generator/assets/templates/pom/adapter-pom.xml.template +3 -3
- package/template/.codex/skills/yss-ddd-scaffold-generator/assets/templates/pom/application-pom.xml.template +13 -4
- package/template/.codex/skills/yss-ddd-scaffold-generator/assets/templates/pom/bootstrap-pom.xml.template +24 -4
- package/template/.codex/skills/yss-ddd-scaffold-generator/assets/templates/pom/domain-pom.xml.template +6 -20
- package/template/.codex/skills/yss-ddd-scaffold-generator/assets/templates/pom/infrastructure-pom.xml.template +26 -6
- package/template/.codex/skills/yss-ddd-scaffold-generator/assets/templates/pom/parent-pom.xml.template +70 -10
- package/template/.codex/skills/yss-ddd-scaffold-generator/assets/templates/pom/web-pom.xml.template +24 -10
- package/template/.codex/skills/yss-ddd-scaffold-generator/assets/wrapper/.mvn/maven.config +2 -3
- package/template/.codex/skills/yss-ddd-scaffold-generator/assets/wrapper/.mvn/settings.xml +18 -105
- package/template/.codex/skills/yss-ddd-scaffold-generator/assets/wrapper/.mvn/wrapper/maven-wrapper.properties +4 -2
- package/template/.codex/skills/yss-ddd-scaffold-generator/references/ARCHITECTURE.md +78 -156
- package/template/.codex/skills/yss-ddd-scaffold-generator/references/USAGE_EXAMPLES.md +83 -389
- package/template/.codex/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-adapter/SKILL.md +20 -188
- package/template/.codex/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-parent/SKILL.md +41 -122
- package/template/.codex/skills/yss-ddd-scaffold-generator/scripts/first-slice-compatibility.test.mjs +191 -0
- package/template/.codex/skills/yss-ddd-scaffold-generator/scripts/generate_and_verify_scaffold.mjs +126 -0
- package/template/.codex/skills/yss-ddd-scaffold-generator/scripts/generate_scaffold.mjs +139 -42
- package/template/.codex/skills/yss-ddd-scaffold-generator/scripts/run_scaffold_verification.mjs +87 -7
- package/template/.codex/skills/yss-ddd-scaffold-generator/scripts/scaffold-generator.test.mjs +322 -12
- package/template/.codex/skills/yss-design-system/SKILL.md +2 -2
- package/template/.codex/skills/yss-design-system/references/design-system.md +2 -2
- package/template/.codex/skills/yss-domain/SKILL.md +3 -3
- package/template/.codex/skills/yss-domain/references/domain-layer-guide.md +61 -236
- package/template/.codex/skills/yss-dto/SKILL.md +5 -5
- package/template/.codex/skills/yss-dto/references/README.md +2 -2
- package/template/.codex/skills/yss-dto/references/openapi-wire-profile.yaml +3 -3
- package/template/.codex/skills/yss-exception/SKILL.md +2 -0
- package/template/.codex/skills/yss-formily/SKILL.md +1 -1
- package/template/.codex/skills/yss-mybatis/SKILL.md +2 -2
- package/template/.codex/skills/yss-page-module-development/SKILL.md +2 -0
- package/template/.codex/skills/yss-product-lifecycle/references/orchestration-contract.yaml +42 -11
- package/template/.codex/skills/yss-repository/SKILL.md +7 -5
- package/template/.codex/skills/yss-repository/references/infrastructure-layer-guide.md +70 -155
- package/template/.codex/skills/yss-router/references/router-contract.yaml +41 -7
- package/template/.codex/skills/yss-ui/SKILL.md +6 -5
- package/template/.codex/skills/yss-ui/references/component-routing.md +1 -1
- package/template/.codex/skills/yss-ui-business-page-generation/SKILL.md +159 -0
- package/template/.codex/skills/yss-ui-business-page-generation/references/component-map.md +39 -0
- package/template/.codex/skills/yss-ui-business-page-generation/references/hooks-map.md +70 -0
- package/template/.codex/skills/yss-ui-business-page-generation/references/utils-map.md +51 -0
- package/template/.codex/skills/yss-use-table-height/SKILL.md +78 -297
- package/template/.codex/skills/yss-use-tree-height/SKILL.md +51 -393
- package/template/.codex/skills/yss-web-controller/SKILL.md +12 -11
- package/template/.codex/skills/yss-web-controller/assets/templates/Controller.java.template +15 -16
- package/template/.codex/skills/yss-web-controller/assets/templates/WebConvertor.java.template +21 -11
- package/template/.codex/skills/yss-web-controller/assets/templates/web/dto/CreateRequest.java.template +19 -0
- package/template/.codex/skills/yss-web-controller/assets/templates/web/dto/PageRequest.java.template +24 -0
- package/template/.codex/skills/yss-web-controller/assets/templates/web/dto/Response.java.template +18 -0
- package/template/.codex/skills/yss-web-controller/assets/templates/web/dto/UpdateRequest.java.template +19 -0
- package/template/.codex/skills/yss-web-controller/references/web-adapter-layer-guide.md +61 -145
- package/template/.codex/skills/yss-web-controller/scripts/generate_controller.mjs +45 -17
- package/template/.codex/skills/yss-web-controller/scripts/generate_controller.test.mjs +44 -3
- package/template/.cursor/mcp.json +8 -0
- package/template/.cursor/skills/code-review/references/yss-review-standards.md +3 -3
- package/template/.cursor/skills/component-selection-imports/SKILL.md +2 -2
- package/template/.cursor/skills/frontend-commit/SKILL.md +1 -1
- package/template/.cursor/skills/yss-api-integration/SKILL.md +85 -339
- package/template/.cursor/skills/yss-application/SKILL.md +7 -5
- package/template/.cursor/skills/yss-application/references/application-layer-guide.md +60 -105
- package/template/.cursor/skills/yss-components/SKILL.md +1 -1
- package/template/.cursor/skills/yss-ddd-scaffold-generator/SKILL.md +27 -13
- package/template/.cursor/skills/yss-ddd-scaffold-generator/assets/templates/config/application-local.yml.template +8 -0
- package/template/.cursor/skills/yss-ddd-scaffold-generator/assets/templates/config/application.yml.template +2 -3
- package/template/.cursor/skills/yss-ddd-scaffold-generator/assets/templates/java/architecture-rules-test.java.template +36 -0
- package/template/.cursor/skills/yss-ddd-scaffold-generator/assets/templates/java/bootstrap-application.java.template +15 -0
- package/template/.cursor/skills/yss-ddd-scaffold-generator/assets/templates/pom/adapter-pom.xml.template +3 -3
- package/template/.cursor/skills/yss-ddd-scaffold-generator/assets/templates/pom/application-pom.xml.template +13 -4
- package/template/.cursor/skills/yss-ddd-scaffold-generator/assets/templates/pom/bootstrap-pom.xml.template +24 -4
- package/template/.cursor/skills/yss-ddd-scaffold-generator/assets/templates/pom/domain-pom.xml.template +6 -20
- package/template/.cursor/skills/yss-ddd-scaffold-generator/assets/templates/pom/infrastructure-pom.xml.template +26 -6
- package/template/.cursor/skills/yss-ddd-scaffold-generator/assets/templates/pom/parent-pom.xml.template +70 -10
- package/template/.cursor/skills/yss-ddd-scaffold-generator/assets/templates/pom/web-pom.xml.template +24 -10
- package/template/.cursor/skills/yss-ddd-scaffold-generator/assets/wrapper/.mvn/maven.config +2 -3
- package/template/.cursor/skills/yss-ddd-scaffold-generator/assets/wrapper/.mvn/settings.xml +18 -105
- package/template/.cursor/skills/yss-ddd-scaffold-generator/assets/wrapper/.mvn/wrapper/maven-wrapper.properties +4 -2
- package/template/.cursor/skills/yss-ddd-scaffold-generator/references/ARCHITECTURE.md +78 -156
- package/template/.cursor/skills/yss-ddd-scaffold-generator/references/USAGE_EXAMPLES.md +83 -389
- package/template/.cursor/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-adapter/SKILL.md +20 -188
- package/template/.cursor/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-parent/SKILL.md +41 -122
- package/template/.cursor/skills/yss-ddd-scaffold-generator/scripts/first-slice-compatibility.test.mjs +191 -0
- package/template/.cursor/skills/yss-ddd-scaffold-generator/scripts/generate_and_verify_scaffold.mjs +126 -0
- package/template/.cursor/skills/yss-ddd-scaffold-generator/scripts/generate_scaffold.mjs +139 -42
- package/template/.cursor/skills/yss-ddd-scaffold-generator/scripts/run_scaffold_verification.mjs +87 -7
- package/template/.cursor/skills/yss-ddd-scaffold-generator/scripts/scaffold-generator.test.mjs +322 -12
- package/template/.cursor/skills/yss-design-system/SKILL.md +2 -2
- package/template/.cursor/skills/yss-design-system/references/design-system.md +2 -2
- package/template/.cursor/skills/yss-domain/SKILL.md +3 -3
- package/template/.cursor/skills/yss-domain/references/domain-layer-guide.md +61 -236
- package/template/.cursor/skills/yss-dto/SKILL.md +5 -5
- package/template/.cursor/skills/yss-dto/references/README.md +2 -2
- package/template/.cursor/skills/yss-dto/references/openapi-wire-profile.yaml +3 -3
- package/template/.cursor/skills/yss-exception/SKILL.md +2 -0
- package/template/.cursor/skills/yss-formily/SKILL.md +1 -1
- package/template/.cursor/skills/yss-mybatis/SKILL.md +2 -2
- package/template/.cursor/skills/yss-page-module-development/SKILL.md +2 -0
- package/template/.cursor/skills/yss-product-lifecycle/references/orchestration-contract.yaml +42 -11
- package/template/.cursor/skills/yss-repository/SKILL.md +7 -5
- package/template/.cursor/skills/yss-repository/references/infrastructure-layer-guide.md +70 -155
- package/template/.cursor/skills/yss-router/references/router-contract.yaml +41 -7
- package/template/.cursor/skills/yss-ui/SKILL.md +6 -5
- package/template/.cursor/skills/yss-ui/references/component-routing.md +1 -1
- package/template/.cursor/skills/yss-ui-business-page-generation/SKILL.md +159 -0
- package/template/.cursor/skills/yss-ui-business-page-generation/references/component-map.md +39 -0
- package/template/.cursor/skills/yss-ui-business-page-generation/references/hooks-map.md +70 -0
- package/template/.cursor/skills/yss-ui-business-page-generation/references/utils-map.md +51 -0
- package/template/.cursor/skills/yss-use-table-height/SKILL.md +78 -297
- package/template/.cursor/skills/yss-use-tree-height/SKILL.md +51 -393
- package/template/.cursor/skills/yss-web-controller/SKILL.md +12 -11
- package/template/.cursor/skills/yss-web-controller/assets/templates/Controller.java.template +15 -16
- package/template/.cursor/skills/yss-web-controller/assets/templates/WebConvertor.java.template +21 -11
- package/template/.cursor/skills/yss-web-controller/assets/templates/web/dto/CreateRequest.java.template +19 -0
- package/template/.cursor/skills/yss-web-controller/assets/templates/web/dto/PageRequest.java.template +24 -0
- package/template/.cursor/skills/yss-web-controller/assets/templates/web/dto/Response.java.template +18 -0
- package/template/.cursor/skills/yss-web-controller/assets/templates/web/dto/UpdateRequest.java.template +19 -0
- package/template/.cursor/skills/yss-web-controller/references/web-adapter-layer-guide.md +61 -145
- package/template/.cursor/skills/yss-web-controller/scripts/generate_controller.mjs +45 -17
- package/template/.cursor/skills/yss-web-controller/scripts/generate_controller.test.mjs +44 -3
- package/template/.cursorrules +9 -5
- package/template/.gemini/settings.json +8 -0
- package/template/.hermes/skills/code-review/references/yss-review-standards.md +3 -3
- package/template/.hermes/skills/component-selection-imports/SKILL.md +2 -2
- package/template/.hermes/skills/frontend-commit/SKILL.md +1 -1
- package/template/.hermes/skills/yss-api-integration/SKILL.md +85 -339
- package/template/.hermes/skills/yss-application/SKILL.md +7 -5
- package/template/.hermes/skills/yss-application/references/application-layer-guide.md +60 -105
- package/template/.hermes/skills/yss-components/SKILL.md +1 -1
- package/template/.hermes/skills/yss-ddd-scaffold-generator/SKILL.md +27 -13
- package/template/.hermes/skills/yss-ddd-scaffold-generator/assets/templates/config/application-local.yml.template +8 -0
- package/template/.hermes/skills/yss-ddd-scaffold-generator/assets/templates/config/application.yml.template +2 -3
- package/template/.hermes/skills/yss-ddd-scaffold-generator/assets/templates/java/architecture-rules-test.java.template +36 -0
- package/template/.hermes/skills/yss-ddd-scaffold-generator/assets/templates/java/bootstrap-application.java.template +15 -0
- package/template/.hermes/skills/yss-ddd-scaffold-generator/assets/templates/pom/adapter-pom.xml.template +3 -3
- package/template/.hermes/skills/yss-ddd-scaffold-generator/assets/templates/pom/application-pom.xml.template +13 -4
- package/template/.hermes/skills/yss-ddd-scaffold-generator/assets/templates/pom/bootstrap-pom.xml.template +24 -4
- package/template/.hermes/skills/yss-ddd-scaffold-generator/assets/templates/pom/domain-pom.xml.template +6 -20
- package/template/.hermes/skills/yss-ddd-scaffold-generator/assets/templates/pom/infrastructure-pom.xml.template +26 -6
- package/template/.hermes/skills/yss-ddd-scaffold-generator/assets/templates/pom/parent-pom.xml.template +70 -10
- package/template/.hermes/skills/yss-ddd-scaffold-generator/assets/templates/pom/web-pom.xml.template +24 -10
- package/template/.hermes/skills/yss-ddd-scaffold-generator/assets/wrapper/.mvn/maven.config +2 -3
- package/template/.hermes/skills/yss-ddd-scaffold-generator/assets/wrapper/.mvn/settings.xml +18 -105
- package/template/.hermes/skills/yss-ddd-scaffold-generator/assets/wrapper/.mvn/wrapper/maven-wrapper.properties +4 -2
- package/template/.hermes/skills/yss-ddd-scaffold-generator/references/ARCHITECTURE.md +78 -156
- package/template/.hermes/skills/yss-ddd-scaffold-generator/references/USAGE_EXAMPLES.md +83 -389
- package/template/.hermes/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-adapter/SKILL.md +20 -188
- package/template/.hermes/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-parent/SKILL.md +41 -122
- package/template/.hermes/skills/yss-ddd-scaffold-generator/scripts/first-slice-compatibility.test.mjs +191 -0
- package/template/.hermes/skills/yss-ddd-scaffold-generator/scripts/generate_and_verify_scaffold.mjs +126 -0
- package/template/.hermes/skills/yss-ddd-scaffold-generator/scripts/generate_scaffold.mjs +139 -42
- package/template/.hermes/skills/yss-ddd-scaffold-generator/scripts/run_scaffold_verification.mjs +87 -7
- package/template/.hermes/skills/yss-ddd-scaffold-generator/scripts/scaffold-generator.test.mjs +322 -12
- package/template/.hermes/skills/yss-design-system/SKILL.md +2 -2
- package/template/.hermes/skills/yss-design-system/references/design-system.md +2 -2
- package/template/.hermes/skills/yss-domain/SKILL.md +3 -3
- package/template/.hermes/skills/yss-domain/references/domain-layer-guide.md +61 -236
- package/template/.hermes/skills/yss-dto/SKILL.md +5 -5
- package/template/.hermes/skills/yss-dto/references/README.md +2 -2
- package/template/.hermes/skills/yss-dto/references/openapi-wire-profile.yaml +3 -3
- package/template/.hermes/skills/yss-exception/SKILL.md +2 -0
- package/template/.hermes/skills/yss-formily/SKILL.md +1 -1
- package/template/.hermes/skills/yss-mybatis/SKILL.md +2 -2
- package/template/.hermes/skills/yss-page-module-development/SKILL.md +2 -0
- package/template/.hermes/skills/yss-product-lifecycle/references/orchestration-contract.yaml +42 -11
- package/template/.hermes/skills/yss-repository/SKILL.md +7 -5
- package/template/.hermes/skills/yss-repository/references/infrastructure-layer-guide.md +70 -155
- package/template/.hermes/skills/yss-router/references/router-contract.yaml +41 -7
- package/template/.hermes/skills/yss-ui/SKILL.md +6 -5
- package/template/.hermes/skills/yss-ui/references/component-routing.md +1 -1
- package/template/.hermes/skills/yss-ui-business-page-generation/SKILL.md +159 -0
- package/template/.hermes/skills/yss-ui-business-page-generation/references/component-map.md +39 -0
- package/template/.hermes/skills/yss-ui-business-page-generation/references/hooks-map.md +70 -0
- package/template/.hermes/skills/yss-ui-business-page-generation/references/utils-map.md +51 -0
- package/template/.hermes/skills/yss-use-table-height/SKILL.md +78 -297
- package/template/.hermes/skills/yss-use-tree-height/SKILL.md +51 -393
- package/template/.hermes/skills/yss-web-controller/SKILL.md +12 -11
- package/template/.hermes/skills/yss-web-controller/assets/templates/Controller.java.template +15 -16
- package/template/.hermes/skills/yss-web-controller/assets/templates/WebConvertor.java.template +21 -11
- package/template/.hermes/skills/yss-web-controller/assets/templates/web/dto/CreateRequest.java.template +19 -0
- package/template/.hermes/skills/yss-web-controller/assets/templates/web/dto/PageRequest.java.template +24 -0
- package/template/.hermes/skills/yss-web-controller/assets/templates/web/dto/Response.java.template +18 -0
- package/template/.hermes/skills/yss-web-controller/assets/templates/web/dto/UpdateRequest.java.template +19 -0
- package/template/.hermes/skills/yss-web-controller/references/web-adapter-layer-guide.md +61 -145
- package/template/.hermes/skills/yss-web-controller/scripts/generate_controller.mjs +45 -17
- package/template/.hermes/skills/yss-web-controller/scripts/generate_controller.test.mjs +44 -3
- package/template/.kiro/settings/mcp.json +8 -0
- package/template/.mcp.json +8 -0
- package/template/.pi/skills/code-review/references/yss-review-standards.md +3 -3
- package/template/.pi/skills/component-selection-imports/SKILL.md +2 -2
- package/template/.pi/skills/frontend-commit/SKILL.md +1 -1
- package/template/.pi/skills/yss-api-integration/SKILL.md +85 -339
- package/template/.pi/skills/yss-application/SKILL.md +7 -5
- package/template/.pi/skills/yss-application/references/application-layer-guide.md +60 -105
- package/template/.pi/skills/yss-components/SKILL.md +1 -1
- package/template/.pi/skills/yss-ddd-scaffold-generator/SKILL.md +27 -13
- package/template/.pi/skills/yss-ddd-scaffold-generator/assets/templates/config/application-local.yml.template +8 -0
- package/template/.pi/skills/yss-ddd-scaffold-generator/assets/templates/config/application.yml.template +2 -3
- package/template/.pi/skills/yss-ddd-scaffold-generator/assets/templates/java/architecture-rules-test.java.template +36 -0
- package/template/.pi/skills/yss-ddd-scaffold-generator/assets/templates/java/bootstrap-application.java.template +15 -0
- package/template/.pi/skills/yss-ddd-scaffold-generator/assets/templates/pom/adapter-pom.xml.template +3 -3
- package/template/.pi/skills/yss-ddd-scaffold-generator/assets/templates/pom/application-pom.xml.template +13 -4
- package/template/.pi/skills/yss-ddd-scaffold-generator/assets/templates/pom/bootstrap-pom.xml.template +24 -4
- package/template/.pi/skills/yss-ddd-scaffold-generator/assets/templates/pom/domain-pom.xml.template +6 -20
- package/template/.pi/skills/yss-ddd-scaffold-generator/assets/templates/pom/infrastructure-pom.xml.template +26 -6
- package/template/.pi/skills/yss-ddd-scaffold-generator/assets/templates/pom/parent-pom.xml.template +70 -10
- package/template/.pi/skills/yss-ddd-scaffold-generator/assets/templates/pom/web-pom.xml.template +24 -10
- package/template/.pi/skills/yss-ddd-scaffold-generator/assets/wrapper/.mvn/maven.config +2 -3
- package/template/.pi/skills/yss-ddd-scaffold-generator/assets/wrapper/.mvn/settings.xml +18 -105
- package/template/.pi/skills/yss-ddd-scaffold-generator/assets/wrapper/.mvn/wrapper/maven-wrapper.properties +4 -2
- package/template/.pi/skills/yss-ddd-scaffold-generator/references/ARCHITECTURE.md +78 -156
- package/template/.pi/skills/yss-ddd-scaffold-generator/references/USAGE_EXAMPLES.md +83 -389
- package/template/.pi/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-adapter/SKILL.md +20 -188
- package/template/.pi/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-parent/SKILL.md +41 -122
- package/template/.pi/skills/yss-ddd-scaffold-generator/scripts/first-slice-compatibility.test.mjs +191 -0
- package/template/.pi/skills/yss-ddd-scaffold-generator/scripts/generate_and_verify_scaffold.mjs +126 -0
- package/template/.pi/skills/yss-ddd-scaffold-generator/scripts/generate_scaffold.mjs +139 -42
- package/template/.pi/skills/yss-ddd-scaffold-generator/scripts/run_scaffold_verification.mjs +87 -7
- package/template/.pi/skills/yss-ddd-scaffold-generator/scripts/scaffold-generator.test.mjs +322 -12
- package/template/.pi/skills/yss-design-system/SKILL.md +2 -2
- package/template/.pi/skills/yss-design-system/references/design-system.md +2 -2
- package/template/.pi/skills/yss-domain/SKILL.md +3 -3
- package/template/.pi/skills/yss-domain/references/domain-layer-guide.md +61 -236
- package/template/.pi/skills/yss-dto/SKILL.md +5 -5
- package/template/.pi/skills/yss-dto/references/README.md +2 -2
- package/template/.pi/skills/yss-dto/references/openapi-wire-profile.yaml +3 -3
- package/template/.pi/skills/yss-exception/SKILL.md +2 -0
- package/template/.pi/skills/yss-formily/SKILL.md +1 -1
- package/template/.pi/skills/yss-mybatis/SKILL.md +2 -2
- package/template/.pi/skills/yss-page-module-development/SKILL.md +2 -0
- package/template/.pi/skills/yss-product-lifecycle/references/orchestration-contract.yaml +42 -11
- package/template/.pi/skills/yss-repository/SKILL.md +7 -5
- package/template/.pi/skills/yss-repository/references/infrastructure-layer-guide.md +70 -155
- package/template/.pi/skills/yss-router/references/router-contract.yaml +41 -7
- package/template/.pi/skills/yss-ui/SKILL.md +6 -5
- package/template/.pi/skills/yss-ui/references/component-routing.md +1 -1
- package/template/.pi/skills/yss-ui-business-page-generation/SKILL.md +159 -0
- package/template/.pi/skills/yss-ui-business-page-generation/references/component-map.md +39 -0
- package/template/.pi/skills/yss-ui-business-page-generation/references/hooks-map.md +70 -0
- package/template/.pi/skills/yss-ui-business-page-generation/references/utils-map.md +51 -0
- package/template/.pi/skills/yss-use-table-height/SKILL.md +78 -297
- package/template/.pi/skills/yss-use-tree-height/SKILL.md +51 -393
- package/template/.pi/skills/yss-web-controller/SKILL.md +12 -11
- package/template/.pi/skills/yss-web-controller/assets/templates/Controller.java.template +15 -16
- package/template/.pi/skills/yss-web-controller/assets/templates/WebConvertor.java.template +21 -11
- package/template/.pi/skills/yss-web-controller/assets/templates/web/dto/CreateRequest.java.template +19 -0
- package/template/.pi/skills/yss-web-controller/assets/templates/web/dto/PageRequest.java.template +24 -0
- package/template/.pi/skills/yss-web-controller/assets/templates/web/dto/Response.java.template +18 -0
- package/template/.pi/skills/yss-web-controller/assets/templates/web/dto/UpdateRequest.java.template +19 -0
- package/template/.pi/skills/yss-web-controller/references/web-adapter-layer-guide.md +61 -145
- package/template/.pi/skills/yss-web-controller/scripts/generate_controller.mjs +45 -17
- package/template/.pi/skills/yss-web-controller/scripts/generate_controller.test.mjs +44 -3
- package/template/.qoder/skills/code-review/references/yss-review-standards.md +3 -3
- package/template/.qoder/skills/component-selection-imports/SKILL.md +2 -2
- package/template/.qoder/skills/frontend-commit/SKILL.md +1 -1
- package/template/.qoder/skills/yss-api-integration/SKILL.md +85 -339
- package/template/.qoder/skills/yss-application/SKILL.md +7 -5
- package/template/.qoder/skills/yss-application/references/application-layer-guide.md +60 -105
- package/template/.qoder/skills/yss-components/SKILL.md +1 -1
- package/template/.qoder/skills/yss-ddd-scaffold-generator/SKILL.md +27 -13
- package/template/.qoder/skills/yss-ddd-scaffold-generator/assets/templates/config/application-local.yml.template +8 -0
- package/template/.qoder/skills/yss-ddd-scaffold-generator/assets/templates/config/application.yml.template +2 -3
- package/template/.qoder/skills/yss-ddd-scaffold-generator/assets/templates/java/architecture-rules-test.java.template +36 -0
- package/template/.qoder/skills/yss-ddd-scaffold-generator/assets/templates/java/bootstrap-application.java.template +15 -0
- package/template/.qoder/skills/yss-ddd-scaffold-generator/assets/templates/pom/adapter-pom.xml.template +3 -3
- package/template/.qoder/skills/yss-ddd-scaffold-generator/assets/templates/pom/application-pom.xml.template +13 -4
- package/template/.qoder/skills/yss-ddd-scaffold-generator/assets/templates/pom/bootstrap-pom.xml.template +24 -4
- package/template/.qoder/skills/yss-ddd-scaffold-generator/assets/templates/pom/domain-pom.xml.template +6 -20
- package/template/.qoder/skills/yss-ddd-scaffold-generator/assets/templates/pom/infrastructure-pom.xml.template +26 -6
- package/template/.qoder/skills/yss-ddd-scaffold-generator/assets/templates/pom/parent-pom.xml.template +70 -10
- package/template/.qoder/skills/yss-ddd-scaffold-generator/assets/templates/pom/web-pom.xml.template +24 -10
- package/template/.qoder/skills/yss-ddd-scaffold-generator/assets/wrapper/.mvn/maven.config +2 -3
- package/template/.qoder/skills/yss-ddd-scaffold-generator/assets/wrapper/.mvn/settings.xml +18 -105
- package/template/.qoder/skills/yss-ddd-scaffold-generator/assets/wrapper/.mvn/wrapper/maven-wrapper.properties +4 -2
- package/template/.qoder/skills/yss-ddd-scaffold-generator/references/ARCHITECTURE.md +78 -156
- package/template/.qoder/skills/yss-ddd-scaffold-generator/references/USAGE_EXAMPLES.md +83 -389
- package/template/.qoder/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-adapter/SKILL.md +20 -188
- package/template/.qoder/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-parent/SKILL.md +41 -122
- package/template/.qoder/skills/yss-ddd-scaffold-generator/scripts/first-slice-compatibility.test.mjs +191 -0
- package/template/.qoder/skills/yss-ddd-scaffold-generator/scripts/generate_and_verify_scaffold.mjs +126 -0
- package/template/.qoder/skills/yss-ddd-scaffold-generator/scripts/generate_scaffold.mjs +139 -42
- package/template/.qoder/skills/yss-ddd-scaffold-generator/scripts/run_scaffold_verification.mjs +87 -7
- package/template/.qoder/skills/yss-ddd-scaffold-generator/scripts/scaffold-generator.test.mjs +322 -12
- package/template/.qoder/skills/yss-design-system/SKILL.md +2 -2
- package/template/.qoder/skills/yss-design-system/references/design-system.md +2 -2
- package/template/.qoder/skills/yss-domain/SKILL.md +3 -3
- package/template/.qoder/skills/yss-domain/references/domain-layer-guide.md +61 -236
- package/template/.qoder/skills/yss-dto/SKILL.md +5 -5
- package/template/.qoder/skills/yss-dto/references/README.md +2 -2
- package/template/.qoder/skills/yss-dto/references/openapi-wire-profile.yaml +3 -3
- package/template/.qoder/skills/yss-exception/SKILL.md +2 -0
- package/template/.qoder/skills/yss-formily/SKILL.md +1 -1
- package/template/.qoder/skills/yss-mybatis/SKILL.md +2 -2
- package/template/.qoder/skills/yss-page-module-development/SKILL.md +2 -0
- package/template/.qoder/skills/yss-product-lifecycle/references/orchestration-contract.yaml +42 -11
- package/template/.qoder/skills/yss-repository/SKILL.md +7 -5
- package/template/.qoder/skills/yss-repository/references/infrastructure-layer-guide.md +70 -155
- package/template/.qoder/skills/yss-router/references/router-contract.yaml +41 -7
- package/template/.qoder/skills/yss-ui/SKILL.md +6 -5
- package/template/.qoder/skills/yss-ui/references/component-routing.md +1 -1
- package/template/.qoder/skills/yss-ui-business-page-generation/SKILL.md +159 -0
- package/template/.qoder/skills/yss-ui-business-page-generation/references/component-map.md +39 -0
- package/template/.qoder/skills/yss-ui-business-page-generation/references/hooks-map.md +70 -0
- package/template/.qoder/skills/yss-ui-business-page-generation/references/utils-map.md +51 -0
- package/template/.qoder/skills/yss-use-table-height/SKILL.md +78 -297
- package/template/.qoder/skills/yss-use-tree-height/SKILL.md +51 -393
- package/template/.qoder/skills/yss-web-controller/SKILL.md +12 -11
- package/template/.qoder/skills/yss-web-controller/assets/templates/Controller.java.template +15 -16
- package/template/.qoder/skills/yss-web-controller/assets/templates/WebConvertor.java.template +21 -11
- package/template/.qoder/skills/yss-web-controller/assets/templates/web/dto/CreateRequest.java.template +19 -0
- package/template/.qoder/skills/yss-web-controller/assets/templates/web/dto/PageRequest.java.template +24 -0
- package/template/.qoder/skills/yss-web-controller/assets/templates/web/dto/Response.java.template +18 -0
- package/template/.qoder/skills/yss-web-controller/assets/templates/web/dto/UpdateRequest.java.template +19 -0
- package/template/.qoder/skills/yss-web-controller/references/web-adapter-layer-guide.md +61 -145
- package/template/.qoder/skills/yss-web-controller/scripts/generate_controller.mjs +45 -17
- package/template/.qoder/skills/yss-web-controller/scripts/generate_controller.test.mjs +44 -3
- package/template/.trae/skills/code-review/references/yss-review-standards.md +3 -3
- package/template/.trae/skills/component-selection-imports/SKILL.md +2 -2
- package/template/.trae/skills/frontend-commit/SKILL.md +1 -1
- package/template/.trae/skills/yss-api-integration/SKILL.md +85 -339
- package/template/.trae/skills/yss-application/SKILL.md +7 -5
- package/template/.trae/skills/yss-application/references/application-layer-guide.md +60 -105
- package/template/.trae/skills/yss-components/SKILL.md +1 -1
- package/template/.trae/skills/yss-ddd-scaffold-generator/SKILL.md +27 -13
- package/template/.trae/skills/yss-ddd-scaffold-generator/assets/templates/config/application-local.yml.template +8 -0
- package/template/.trae/skills/yss-ddd-scaffold-generator/assets/templates/config/application.yml.template +2 -3
- package/template/.trae/skills/yss-ddd-scaffold-generator/assets/templates/java/architecture-rules-test.java.template +36 -0
- package/template/.trae/skills/yss-ddd-scaffold-generator/assets/templates/java/bootstrap-application.java.template +15 -0
- package/template/.trae/skills/yss-ddd-scaffold-generator/assets/templates/pom/adapter-pom.xml.template +3 -3
- package/template/.trae/skills/yss-ddd-scaffold-generator/assets/templates/pom/application-pom.xml.template +13 -4
- package/template/.trae/skills/yss-ddd-scaffold-generator/assets/templates/pom/bootstrap-pom.xml.template +24 -4
- package/template/.trae/skills/yss-ddd-scaffold-generator/assets/templates/pom/domain-pom.xml.template +6 -20
- package/template/.trae/skills/yss-ddd-scaffold-generator/assets/templates/pom/infrastructure-pom.xml.template +26 -6
- package/template/.trae/skills/yss-ddd-scaffold-generator/assets/templates/pom/parent-pom.xml.template +70 -10
- package/template/.trae/skills/yss-ddd-scaffold-generator/assets/templates/pom/web-pom.xml.template +24 -10
- package/template/.trae/skills/yss-ddd-scaffold-generator/assets/wrapper/.mvn/maven.config +2 -3
- package/template/.trae/skills/yss-ddd-scaffold-generator/assets/wrapper/.mvn/settings.xml +18 -105
- package/template/.trae/skills/yss-ddd-scaffold-generator/assets/wrapper/.mvn/wrapper/maven-wrapper.properties +4 -2
- package/template/.trae/skills/yss-ddd-scaffold-generator/references/ARCHITECTURE.md +78 -156
- package/template/.trae/skills/yss-ddd-scaffold-generator/references/USAGE_EXAMPLES.md +83 -389
- package/template/.trae/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-adapter/SKILL.md +20 -188
- package/template/.trae/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-parent/SKILL.md +41 -122
- package/template/.trae/skills/yss-ddd-scaffold-generator/scripts/first-slice-compatibility.test.mjs +191 -0
- package/template/.trae/skills/yss-ddd-scaffold-generator/scripts/generate_and_verify_scaffold.mjs +126 -0
- package/template/.trae/skills/yss-ddd-scaffold-generator/scripts/generate_scaffold.mjs +139 -42
- package/template/.trae/skills/yss-ddd-scaffold-generator/scripts/run_scaffold_verification.mjs +87 -7
- package/template/.trae/skills/yss-ddd-scaffold-generator/scripts/scaffold-generator.test.mjs +322 -12
- package/template/.trae/skills/yss-design-system/SKILL.md +2 -2
- package/template/.trae/skills/yss-design-system/references/design-system.md +2 -2
- package/template/.trae/skills/yss-domain/SKILL.md +3 -3
- package/template/.trae/skills/yss-domain/references/domain-layer-guide.md +61 -236
- package/template/.trae/skills/yss-dto/SKILL.md +5 -5
- package/template/.trae/skills/yss-dto/references/README.md +2 -2
- package/template/.trae/skills/yss-dto/references/openapi-wire-profile.yaml +3 -3
- package/template/.trae/skills/yss-exception/SKILL.md +2 -0
- package/template/.trae/skills/yss-formily/SKILL.md +1 -1
- package/template/.trae/skills/yss-mybatis/SKILL.md +2 -2
- package/template/.trae/skills/yss-page-module-development/SKILL.md +2 -0
- package/template/.trae/skills/yss-product-lifecycle/references/orchestration-contract.yaml +42 -11
- package/template/.trae/skills/yss-repository/SKILL.md +7 -5
- package/template/.trae/skills/yss-repository/references/infrastructure-layer-guide.md +70 -155
- package/template/.trae/skills/yss-router/references/router-contract.yaml +41 -7
- package/template/.trae/skills/yss-ui/SKILL.md +6 -5
- package/template/.trae/skills/yss-ui/references/component-routing.md +1 -1
- package/template/.trae/skills/yss-ui-business-page-generation/SKILL.md +159 -0
- package/template/.trae/skills/yss-ui-business-page-generation/references/component-map.md +39 -0
- package/template/.trae/skills/yss-ui-business-page-generation/references/hooks-map.md +70 -0
- package/template/.trae/skills/yss-ui-business-page-generation/references/utils-map.md +51 -0
- package/template/.trae/skills/yss-use-table-height/SKILL.md +78 -297
- package/template/.trae/skills/yss-use-tree-height/SKILL.md +51 -393
- package/template/.trae/skills/yss-web-controller/SKILL.md +12 -11
- package/template/.trae/skills/yss-web-controller/assets/templates/Controller.java.template +15 -16
- package/template/.trae/skills/yss-web-controller/assets/templates/WebConvertor.java.template +21 -11
- package/template/.trae/skills/yss-web-controller/assets/templates/web/dto/CreateRequest.java.template +19 -0
- package/template/.trae/skills/yss-web-controller/assets/templates/web/dto/PageRequest.java.template +24 -0
- package/template/.trae/skills/yss-web-controller/assets/templates/web/dto/Response.java.template +18 -0
- package/template/.trae/skills/yss-web-controller/assets/templates/web/dto/UpdateRequest.java.template +19 -0
- package/template/.trae/skills/yss-web-controller/references/web-adapter-layer-guide.md +61 -145
- package/template/.trae/skills/yss-web-controller/scripts/generate_controller.mjs +45 -17
- package/template/.trae/skills/yss-web-controller/scripts/generate_controller.test.mjs +44 -3
- package/template/.vscode/mcp.json +8 -0
- package/template/README.md +3 -0
- package/template/docs/agents/digital-human-roles.yaml +1 -1
- package/template/docs/agents/skills-maintenance.md +7 -4
- package/template/docs/agents/yss-skill-registry.yaml +7 -1
- package/template/docs/agents/yss-ui-skills-integration.md +24 -0
- package/template/docs/process/template-verification-profiles.yaml +11 -0
- package/template/docs/templates/implementation-routing-template.md +5 -3
- package/template/docs/templates/review-report-template.md +2 -2
- package/template/docs/user-guide/yss-ui-mcp.md +43 -0
- package/template/scripts/lib/scenario-checks.mjs +3 -3
- package/template/scripts/lib/skill-governance.mjs +36 -2
- package/template/scripts/lib/skill-registry.mjs +2 -1
- package/template/scripts/lib/skill-supply-chain.mjs +72 -1
- package/template/scripts/verify-scaffold-generator-scenarios +150 -44
- package/template/scripts/verify-skill-governance +1 -1
- package/template/scripts/verify-upstream-skill-source +38 -3
- package/template/scripts/verify-yss-dto-openapi-profile +4 -2
- package/template/skills-lock.json +159 -84
- package/template/yss-public-skills.json +2 -0
- package/template.manifest.json +4 -0
- package/template.snapshot.json +5 -5
- package/template/.agents/skills/yss-ddd-scaffold-generator/assets/templates/config/parent-pom.xml.template +0 -84
- package/template/.agents/skills/yss-web-controller/assets/templates/domain/dto/cmd/UpdateCmd.java.template +0 -23
- package/template/.agents/skills/yss-web-controller/assets/templates/domain/dto/query/PageQuery.java.template +0 -21
- package/template/.agents/skills/yss-web-controller/assets/templates/domain/vo/VO.java.template +0 -20
- package/template/.claude/skills/yss-ddd-scaffold-generator/assets/templates/config/parent-pom.xml.template +0 -84
- package/template/.claude/skills/yss-web-controller/assets/templates/domain/dto/cmd/UpdateCmd.java.template +0 -23
- package/template/.claude/skills/yss-web-controller/assets/templates/domain/dto/query/PageQuery.java.template +0 -21
- package/template/.claude/skills/yss-web-controller/assets/templates/domain/vo/VO.java.template +0 -20
- package/template/.codex/skills/yss-ddd-scaffold-generator/assets/templates/config/parent-pom.xml.template +0 -84
- package/template/.codex/skills/yss-web-controller/assets/templates/domain/dto/cmd/UpdateCmd.java.template +0 -23
- package/template/.codex/skills/yss-web-controller/assets/templates/domain/dto/query/PageQuery.java.template +0 -21
- package/template/.codex/skills/yss-web-controller/assets/templates/domain/vo/VO.java.template +0 -20
- package/template/.cursor/skills/yss-ddd-scaffold-generator/assets/templates/config/parent-pom.xml.template +0 -84
- package/template/.cursor/skills/yss-web-controller/assets/templates/domain/dto/cmd/UpdateCmd.java.template +0 -23
- package/template/.cursor/skills/yss-web-controller/assets/templates/domain/dto/query/PageQuery.java.template +0 -21
- package/template/.cursor/skills/yss-web-controller/assets/templates/domain/vo/VO.java.template +0 -20
- package/template/.hermes/skills/yss-ddd-scaffold-generator/assets/templates/config/parent-pom.xml.template +0 -84
- package/template/.hermes/skills/yss-web-controller/assets/templates/domain/dto/cmd/AddCmd.java.template +0 -23
- package/template/.hermes/skills/yss-web-controller/assets/templates/domain/dto/cmd/UpdateCmd.java.template +0 -23
- package/template/.hermes/skills/yss-web-controller/assets/templates/domain/dto/query/PageQuery.java.template +0 -21
- package/template/.hermes/skills/yss-web-controller/assets/templates/domain/vo/VO.java.template +0 -20
- package/template/.pi/skills/yss-ddd-scaffold-generator/assets/templates/config/parent-pom.xml.template +0 -84
- package/template/.pi/skills/yss-web-controller/assets/templates/domain/dto/cmd/AddCmd.java.template +0 -23
- package/template/.pi/skills/yss-web-controller/assets/templates/domain/dto/cmd/UpdateCmd.java.template +0 -23
- package/template/.pi/skills/yss-web-controller/assets/templates/domain/dto/query/PageQuery.java.template +0 -21
- package/template/.pi/skills/yss-web-controller/assets/templates/domain/vo/VO.java.template +0 -20
- package/template/.qoder/skills/yss-ddd-scaffold-generator/assets/templates/config/parent-pom.xml.template +0 -84
- package/template/.qoder/skills/yss-web-controller/assets/templates/domain/dto/cmd/AddCmd.java.template +0 -23
- package/template/.qoder/skills/yss-web-controller/assets/templates/domain/dto/cmd/UpdateCmd.java.template +0 -23
- package/template/.qoder/skills/yss-web-controller/assets/templates/domain/dto/query/PageQuery.java.template +0 -21
- package/template/.qoder/skills/yss-web-controller/assets/templates/domain/vo/VO.java.template +0 -20
- package/template/.trae/skills/yss-ddd-scaffold-generator/assets/templates/config/parent-pom.xml.template +0 -84
- package/template/.trae/skills/yss-web-controller/assets/templates/domain/dto/cmd/AddCmd.java.template +0 -23
- package/template/.trae/skills/yss-web-controller/assets/templates/domain/dto/cmd/UpdateCmd.java.template +0 -23
- package/template/.trae/skills/yss-web-controller/assets/templates/domain/dto/query/PageQuery.java.template +0 -21
- package/template/.trae/skills/yss-web-controller/assets/templates/domain/vo/VO.java.template +0 -20
package/template/.claude/skills/yss-ddd-scaffold-generator/scripts/generate_and_verify_scaffold.mjs
ADDED
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/** 在同一个受控工作流中生成脚手架并执行真实 Maven Wrapper 验证。 */
|
|
3
|
+
import { execFile } from "node:child_process";
|
|
4
|
+
import { mkdir, readFile, writeFile } from "node:fs/promises";
|
|
5
|
+
import path from "node:path";
|
|
6
|
+
import process from "node:process";
|
|
7
|
+
import { fileURLToPath } from "node:url";
|
|
8
|
+
|
|
9
|
+
import { run } from "./run_scaffold_verification.mjs";
|
|
10
|
+
|
|
11
|
+
const SCRIPT_DIR = path.dirname(fileURLToPath(import.meta.url));
|
|
12
|
+
const GENERATOR = path.join(SCRIPT_DIR, "generate_scaffold.mjs");
|
|
13
|
+
const isoNow = () => new Date().toISOString();
|
|
14
|
+
|
|
15
|
+
function parseArgs(argv) {
|
|
16
|
+
const generatorArgs = [];
|
|
17
|
+
let evidenceDir;
|
|
18
|
+
let projectName;
|
|
19
|
+
let outputDir;
|
|
20
|
+
for (let index = 0; index < argv.length; index += 1) {
|
|
21
|
+
const original = argv[index];
|
|
22
|
+
const [flag, inlineValue] = original.split(/=(.*)/s, 2);
|
|
23
|
+
let value = inlineValue;
|
|
24
|
+
if (["--evidence-dir", "--project-name", "--output-dir"].includes(flag) && value === undefined) value = argv[index + 1];
|
|
25
|
+
if (flag === "--evidence-dir") {
|
|
26
|
+
if (!value || value.startsWith("--")) throw new Error("参数 --evidence-dir 缺少值");
|
|
27
|
+
evidenceDir = path.resolve(value);
|
|
28
|
+
if (inlineValue === undefined) index += 1;
|
|
29
|
+
continue;
|
|
30
|
+
}
|
|
31
|
+
generatorArgs.push(original);
|
|
32
|
+
if (["--project-name", "--output-dir"].includes(flag) && inlineValue === undefined) {
|
|
33
|
+
if (!value || value.startsWith("--")) throw new Error(`参数 ${flag} 缺少值`);
|
|
34
|
+
generatorArgs.push(value);
|
|
35
|
+
index += 1;
|
|
36
|
+
}
|
|
37
|
+
if (flag === "--project-name") projectName = value;
|
|
38
|
+
if (flag === "--output-dir") outputDir = value;
|
|
39
|
+
}
|
|
40
|
+
if (!evidenceDir) throw new Error("必须提供 --evidence-dir");
|
|
41
|
+
if (!projectName || !outputDir) throw new Error("必须提供 --project-name 和 --output-dir");
|
|
42
|
+
return { evidenceDir, generatorArgs, projectRoot: path.join(path.resolve(outputDir), projectName) };
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
function executeGenerator(args) {
|
|
46
|
+
return new Promise((resolve) => {
|
|
47
|
+
execFile(process.execPath, [GENERATOR, ...args], { encoding: "utf8" }, (error, stdout, stderr) => {
|
|
48
|
+
resolve({ exitCode: error?.code ?? 0, stdout, stderr });
|
|
49
|
+
});
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
async function writeJson(target, value) {
|
|
54
|
+
await mkdir(path.dirname(target), { recursive: true });
|
|
55
|
+
await writeFile(target, `${JSON.stringify(value, null, 2)}\n`, "utf8");
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
async function main() {
|
|
59
|
+
let args;
|
|
60
|
+
try {
|
|
61
|
+
args = parseArgs(process.argv.slice(2));
|
|
62
|
+
} catch (error) {
|
|
63
|
+
process.stderr.write(`❌ 脚手架工作流无法执行: ${error.message}\n`);
|
|
64
|
+
return 1;
|
|
65
|
+
}
|
|
66
|
+
await mkdir(args.evidenceDir, { recursive: true });
|
|
67
|
+
const workflowPath = path.join(args.evidenceDir, "scaffold-workflow.json");
|
|
68
|
+
const verificationPath = path.join(args.evidenceDir, "scaffold-verification.json");
|
|
69
|
+
const generation = await executeGenerator(args.generatorArgs);
|
|
70
|
+
await writeFile(path.join(args.evidenceDir, "scaffold-generation.stdout.log"), generation.stdout, "utf8");
|
|
71
|
+
await writeFile(path.join(args.evidenceDir, "scaffold-generation.stderr.log"), generation.stderr, "utf8");
|
|
72
|
+
process.stdout.write(generation.stdout);
|
|
73
|
+
process.stderr.write(generation.stderr);
|
|
74
|
+
if (generation.exitCode !== 0) {
|
|
75
|
+
await writeJson(workflowPath, {
|
|
76
|
+
workflow_mode: "controlled-generation",
|
|
77
|
+
generated_at: isoNow(),
|
|
78
|
+
project_root: args.projectRoot,
|
|
79
|
+
status: "blocked",
|
|
80
|
+
failure_category: "generation",
|
|
81
|
+
generation_exit_code: generation.exitCode,
|
|
82
|
+
verification_ref: null
|
|
83
|
+
});
|
|
84
|
+
return 1;
|
|
85
|
+
}
|
|
86
|
+
try {
|
|
87
|
+
const verification = await run(args.projectRoot, args.evidenceDir);
|
|
88
|
+
await writeJson(verificationPath, verification);
|
|
89
|
+
const passed = verification.status === "passed";
|
|
90
|
+
if (passed) {
|
|
91
|
+
const manifestPath = path.join(args.projectRoot, ".yss", "scaffold-generation.json");
|
|
92
|
+
const manifest = JSON.parse(await readFile(manifestPath, "utf8"));
|
|
93
|
+
manifest.completion_level = "empty-scaffold-verified";
|
|
94
|
+
manifest.empty_scaffold_verification_ref = verificationPath;
|
|
95
|
+
manifest.empty_scaffold_verified_at = isoNow();
|
|
96
|
+
await writeJson(manifestPath, manifest);
|
|
97
|
+
}
|
|
98
|
+
await writeJson(workflowPath, {
|
|
99
|
+
workflow_mode: "controlled-generation",
|
|
100
|
+
generated_at: isoNow(),
|
|
101
|
+
project_root: args.projectRoot,
|
|
102
|
+
status: passed ? "completed" : "blocked",
|
|
103
|
+
failure_category: verification.failure_category,
|
|
104
|
+
generation_exit_code: generation.exitCode,
|
|
105
|
+
verification_ref: verificationPath
|
|
106
|
+
});
|
|
107
|
+
if (passed) process.stdout.write(`✅ 脚手架生成与验证完成: ${args.projectRoot}\n`);
|
|
108
|
+
else process.stderr.write(`❌ 脚手架验证失败,已阻断: ${verification.failure_category}\n`);
|
|
109
|
+
return passed ? 0 : 1;
|
|
110
|
+
} catch (error) {
|
|
111
|
+
await writeJson(workflowPath, {
|
|
112
|
+
workflow_mode: "controlled-generation",
|
|
113
|
+
generated_at: isoNow(),
|
|
114
|
+
project_root: args.projectRoot,
|
|
115
|
+
status: "blocked",
|
|
116
|
+
failure_category: "verification-preflight",
|
|
117
|
+
generation_exit_code: generation.exitCode,
|
|
118
|
+
verification_ref: verificationPath,
|
|
119
|
+
error: error.message
|
|
120
|
+
});
|
|
121
|
+
process.stderr.write(`❌ 脚手架验证无法执行,已阻断: ${error.message}\n`);
|
|
122
|
+
return 1;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
process.exitCode = await main();
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
/** YSS DDD 后端纯工程骨架生成器;只生成工程结构,不生成任何业务行为。 */
|
|
3
|
+
import { createHash } from "node:crypto";
|
|
3
4
|
import { chmod, cp, lstat, mkdir, mkdtemp, readFile, readdir, rename, rm, stat, writeFile, copyFile } from "node:fs/promises";
|
|
4
5
|
import path from "node:path";
|
|
5
6
|
import process from "node:process";
|
|
@@ -15,17 +16,29 @@ const SCRIPT_DIR = path.dirname(fileURLToPath(import.meta.url));
|
|
|
15
16
|
const SKILL_ROOT = path.resolve(SCRIPT_DIR, "..");
|
|
16
17
|
const REPOSITORY_ROOT = path.resolve(SCRIPT_DIR, "../../../..");
|
|
17
18
|
const COMMANDS = ["./mvnw validate", "./mvnw test", "./mvnw package"];
|
|
18
|
-
|
|
19
|
+
const SUPPORTED_PROFILES = Object.freeze({
|
|
20
|
+
architecture: "target-domain-model",
|
|
21
|
+
persistence: "mybatis-plus",
|
|
22
|
+
database: "mysql",
|
|
23
|
+
platform: "spring-boot-2.7-jdk8",
|
|
24
|
+
validation_namespace: "javax",
|
|
25
|
+
dto_placement: "web",
|
|
26
|
+
repository: "yss-internal"
|
|
27
|
+
});
|
|
28
|
+
const DOWNSTREAM_SKILLS = ["yss-domain", "yss-application", "yss-repository", "yss-mybatis", "yss-dto", "yss-exception", "yss-web-controller"];
|
|
19
29
|
function fail(message) { throw new Error(message); }
|
|
20
30
|
function isoNow() { return new Date().toISOString(); }
|
|
21
31
|
function localDate() { return new Date().toISOString().slice(0, 10); }
|
|
22
|
-
function
|
|
32
|
+
function toUpperCamel(value) { return value.split("-").map((part) => `${part[0].toUpperCase()}${part.slice(1)}`).join(""); }
|
|
33
|
+
function sha256(content) { return createHash("sha256").update(content).digest("hex"); }
|
|
23
34
|
function usage(error) {
|
|
24
35
|
const text = `YSS DDD 脚手架生成器\n\n` +
|
|
25
36
|
`用法: node scripts/generate_scaffold.mjs --project-name <kebab-case> --base-package <package> --output-dir <dir> --contract-file <json> [选项]\n\n` +
|
|
26
37
|
`必填合同元数据: --contract-id --contract-version --approval-ref --router-draft-ref --persisted-ref\n` +
|
|
27
|
-
|
|
28
|
-
|
|
38
|
+
`Maven 坐标: --group-id --project-version --parent-group-id --parent-artifact-id --parent-version --yss-components-version\n` +
|
|
39
|
+
`固定 Profile: target-domain-model / mybatis-plus / spring-boot-2.7-jdk8 / javax / web / yss-internal\n` +
|
|
40
|
+
`本生成器严格 initialize-only;--force 和任何已有项目目标均为 unsupported。\n` +
|
|
41
|
+
`--with-example 已禁用;--without-example 仅保留为无操作参数。`;
|
|
29
42
|
if (error) process.stderr.write(`错误: ${error}\n\n`);
|
|
30
43
|
process.stdout.write(`${text}\n`);
|
|
31
44
|
}
|
|
@@ -36,7 +49,10 @@ function parseArgs(argv) {
|
|
|
36
49
|
["--project-name", "projectName"], ["--base-package", "basePackage"], ["--output-dir", "outputDir"],
|
|
37
50
|
["--database", "database"], ["--contract-id", "contractId"], ["--contract-version", "contractVersion"],
|
|
38
51
|
["--approval-ref", "approvalRef"], ["--router-draft-ref", "routerDraftRef"], ["--persisted-ref", "persistedRef"],
|
|
39
|
-
["--contract-file", "contractFile"],
|
|
52
|
+
["--contract-file", "contractFile"],
|
|
53
|
+
["--group-id", "groupId"], ["--project-version", "projectVersion"], ["--parent-group-id", "parentGroupId"],
|
|
54
|
+
["--parent-artifact-id", "parentArtifactId"], ["--parent-version", "parentVersion"],
|
|
55
|
+
["--yss-components-version", "yssComponentsVersion"],
|
|
40
56
|
]);
|
|
41
57
|
for (let index = 0; index < argv.length; index += 1) {
|
|
42
58
|
let token = argv[index];
|
|
@@ -54,7 +70,7 @@ function parseArgs(argv) {
|
|
|
54
70
|
}
|
|
55
71
|
if (options.help) return options;
|
|
56
72
|
for (const [flag, key] of mapping) {
|
|
57
|
-
if (["database", "overwriteScope", "rollbackRef", "contractId", "contractVersion", "approvalRef", "routerDraftRef", "persistedRef"].includes(key)) continue;
|
|
73
|
+
if (["database", "overwriteScope", "rollbackRef", "contractId", "contractVersion", "approvalRef", "routerDraftRef", "persistedRef", "groupId", "projectVersion", "parentGroupId", "parentArtifactId", "parentVersion", "yssComponentsVersion"].includes(key)) continue;
|
|
58
74
|
if (!options[key]) fail(`缺少必填参数: ${flag}`);
|
|
59
75
|
}
|
|
60
76
|
if (options.database !== "mysql") fail("参数 --database 只支持 mysql");
|
|
@@ -63,15 +79,37 @@ function parseArgs(argv) {
|
|
|
63
79
|
if (options.contractVersion !== undefined && (!/^\d+$/.test(options.contractVersion) || Number(options.contractVersion) < 1)) fail("--contract-version(必须为正整数)");
|
|
64
80
|
if (options.contractVersion !== undefined) options.contractVersion = Number(options.contractVersion);
|
|
65
81
|
if (options.withExample) fail("--with-example 已禁用;业务代码必须由批准的 YSS Slice skill 逐切片生成");
|
|
82
|
+
if (options.force) fail("unsupported: initialize-only 脚手架禁止 --force,也不承担旧项目迁移或模板升级");
|
|
66
83
|
return options;
|
|
67
84
|
}
|
|
68
85
|
|
|
69
86
|
async function exists(target) { try { await lstat(target); return true; } catch (error) { if (error.code === "ENOENT") return false; throw error; } }
|
|
70
87
|
async function isFile(target) { try { return (await stat(target)).isFile(); } catch (error) { if (error.code === "ENOENT") return false; throw error; } }
|
|
71
|
-
async function nonEmpty(target) { const info = await lstat(target); return !info.isDirectory() || (await readdir(target)).length > 0; }
|
|
72
88
|
async function readJson(target, message) { try { return JSON.parse(await readFile(target, "utf8")); } catch (error) { fail(`${message}: ${target}`); } }
|
|
73
89
|
async function writeText(target, content) { await mkdir(path.dirname(target), { recursive: true }); await writeFile(target, content, "utf8"); }
|
|
74
90
|
function isPresent(value) { return value !== undefined && value !== null && value !== "" && (!Array.isArray(value) || value.length > 0); }
|
|
91
|
+
function isWithin(parent, target) { const relative = path.relative(parent, target); return relative === "" || (!relative.startsWith("..") && !path.isAbsolute(relative)); }
|
|
92
|
+
async function fileEntries(root, { exclude = new Set() } = {}) {
|
|
93
|
+
const output = [];
|
|
94
|
+
const visit = async (directory) => {
|
|
95
|
+
for (const entry of (await readdir(directory, { withFileTypes: true })).sort((left, right) => left.name.localeCompare(right.name))) {
|
|
96
|
+
const absolute = path.join(directory, entry.name);
|
|
97
|
+
const relative = path.relative(root, absolute).split(path.sep).join("/");
|
|
98
|
+
if (exclude.has(relative)) continue;
|
|
99
|
+
if (entry.isDirectory()) await visit(absolute);
|
|
100
|
+
else if (entry.isFile()) output.push({ absolute, relative });
|
|
101
|
+
}
|
|
102
|
+
};
|
|
103
|
+
await visit(root);
|
|
104
|
+
return output;
|
|
105
|
+
}
|
|
106
|
+
async function treeDigest(root) {
|
|
107
|
+
const hash = createHash("sha256");
|
|
108
|
+
for (const entry of await fileEntries(root)) {
|
|
109
|
+
hash.update(entry.relative).update("\0").update(await readFile(entry.absolute)).update("\0");
|
|
110
|
+
}
|
|
111
|
+
return hash.digest("hex");
|
|
112
|
+
}
|
|
75
113
|
|
|
76
114
|
class ScaffoldGenerator {
|
|
77
115
|
constructor(options) {
|
|
@@ -84,13 +122,19 @@ class ScaffoldGenerator {
|
|
|
84
122
|
this.projectRoot = this.finalProjectRoot;
|
|
85
123
|
this.templateRoot = path.join(SKILL_ROOT, "assets", "templates");
|
|
86
124
|
this.configTemplateDir = path.join(this.templateRoot, "config");
|
|
125
|
+
this.javaTemplateDir = path.join(this.templateRoot, "java");
|
|
87
126
|
this.pomTemplateDir = path.join(this.templateRoot, "pom");
|
|
88
127
|
this.packagePath = this.basePackage.replaceAll(".", path.sep);
|
|
89
128
|
this.author = process.env.USER || "yss-team";
|
|
90
129
|
this.date = localDate();
|
|
91
|
-
this.groupId = this.basePackage.split(".").slice(0, 2).join(".");
|
|
92
130
|
this.dbName = this.projectName.replaceAll("-", "_");
|
|
131
|
+
this.applicationClassName = `${toUpperCamel(this.projectName)}Application`;
|
|
132
|
+
this.bootstrapMainSource = `${this.projectName}-bootstrap/src/main/java/${this.basePackage.replaceAll(".", "/")}/${this.applicationClassName}.java`;
|
|
93
133
|
this.scaffoldContract = undefined;
|
|
134
|
+
this.mavenCoordinates = undefined;
|
|
135
|
+
this.mavenCoordinatesSource = "approved-contract";
|
|
136
|
+
this.contractDigest = undefined;
|
|
137
|
+
this.profiles = structuredClone(SUPPORTED_PROFILES);
|
|
94
138
|
}
|
|
95
139
|
|
|
96
140
|
gitRootForOutput() {
|
|
@@ -108,30 +152,22 @@ class ScaffoldGenerator {
|
|
|
108
152
|
const gitlinkViolation = gitSubmoduleScaffoldViolation(gitRoot, this.outputDir, this.projectName, { force: this.options.force });
|
|
109
153
|
if (gitlinkViolation) fail(gitlinkViolation);
|
|
110
154
|
this.refuseGitlinkAsRegularDirectory(gitRoot, this.finalProjectRoot);
|
|
155
|
+
await this.validateContractMetadata();
|
|
111
156
|
const targetExists = await exists(this.finalProjectRoot);
|
|
112
157
|
if (targetExists) {
|
|
113
158
|
this.refuseGitlinkAsRegularDirectory(gitRoot, this.finalProjectRoot);
|
|
114
|
-
|
|
159
|
+
fail(`unsupported: initialize-only 脚手架只创建全新项目,拒绝已存在目标: ${this.finalProjectRoot}`);
|
|
115
160
|
}
|
|
116
|
-
await this.validateContractMetadata();
|
|
117
|
-
if (targetExists && await nonEmpty(this.finalProjectRoot) && this.options.force) this.validateForceMetadata();
|
|
118
161
|
await mkdir(this.outputDir, { recursive: true });
|
|
119
162
|
const stagingRoot = await mkdtemp(path.join(this.outputDir, `.${this.projectName}.staging-`));
|
|
120
163
|
this.projectRoot = path.join(stagingRoot, this.projectName);
|
|
121
164
|
try {
|
|
122
165
|
console.log(`🚀 开始生成项目: ${this.projectName}\n📦 基础包名: ${this.basePackage}\n📁 输出目录: ${this.outputDir}\n`);
|
|
123
|
-
await this.createProjectStructure(); await this.generatePomFiles(); await this.generateConfigFiles();
|
|
124
|
-
this.generateDatabaseScripts(); await this.generateDocumentation(); await this.
|
|
125
|
-
await this.
|
|
126
|
-
let backupPath;
|
|
127
|
-
if (await exists(this.finalProjectRoot)) {
|
|
128
|
-
this.refuseGitlinkAsRegularDirectory(gitRoot, this.finalProjectRoot);
|
|
129
|
-
backupPath = path.join(this.outputDir, `.${this.projectName}.backup-${backupStamp()}`);
|
|
130
|
-
await rename(this.finalProjectRoot, backupPath);
|
|
131
|
-
}
|
|
166
|
+
await this.createProjectStructure(); await this.generatePomFiles(); await this.generateBootstrapSource(); await this.generateArchitectureRules(); await this.generateConfigFiles();
|
|
167
|
+
this.generateDatabaseScripts(); await this.generateDocumentation(); await this.copyWrapperFiles();
|
|
168
|
+
await this.writeGenerationManifest(); await this.validateGeneratedArtifacts();
|
|
132
169
|
await rename(this.projectRoot, this.finalProjectRoot); this.projectRoot = this.finalProjectRoot;
|
|
133
|
-
console.log(`\n✅
|
|
134
|
-
if (backupPath) console.log(`♻️ 原项目备份: ${backupPath}`);
|
|
170
|
+
console.log(`\n✅ 工程文件生成完成,等待受控 Maven 验证\n📂 项目位置: ${this.projectRoot}`);
|
|
135
171
|
console.log(`\n🎯 下一步:\n cd ${this.projectRoot}\n ./mvnw validate\n ./mvnw test\n ./mvnw package\n ./mvnw spring-boot:run -pl ${this.projectName}-bootstrap`);
|
|
136
172
|
} catch (error) { await rm(stagingRoot, { recursive: true, force: true }); throw error; }
|
|
137
173
|
}
|
|
@@ -148,15 +184,17 @@ class ScaffoldGenerator {
|
|
|
148
184
|
|
|
149
185
|
async validateContractMetadata() {
|
|
150
186
|
if (!await isFile(this.contractFile)) fail("必须提供已持久化的结构化脚手架合同 JSON 文件: --contract-file");
|
|
151
|
-
const
|
|
187
|
+
const contractText = await readFile(this.contractFile, "utf8");
|
|
188
|
+
let contract; try { contract = JSON.parse(contractText); } catch { fail(`脚手架合同文件无法读取或不是合法 JSON: ${this.contractFile}`); }
|
|
152
189
|
if (!contract || Array.isArray(contract) || typeof contract !== "object") fail("脚手架合同必须是 JSON 对象");
|
|
190
|
+
if (contract.schema_version !== 2) fail(`unsupported: scaffold contract schema_version=${contract.schema_version};只接受 Target Profile schema v2,不提供自动升级`);
|
|
153
191
|
const requiredMetadata = [["--contract-id", this.options.contractId], ["--contract-version", this.options.contractVersion], ["--approval-ref", this.options.approvalRef], ["--router-draft-ref", this.options.routerDraftRef], ["--persisted-ref", this.options.persistedRef]];
|
|
154
192
|
const missing = requiredMetadata.filter(([, value]) => !isPresent(value)).map(([flag]) => flag);
|
|
155
193
|
if (missing.length) fail(`生成项目必须提供当前已批准脚手架合同的完整元数据: ${missing.join(", ")}`);
|
|
156
|
-
const required = ["schema_version", "contract_id", "contract_version", "
|
|
194
|
+
const required = ["schema_version", "contract_id", "contract_version", "scaffold_request_id", "status", "router_draft_ref", "lifecycle_approval_ref", "persisted_ref", "current_version", "implementation_repository", "backend_repository", "scaffold_status", "project_name", "target_output_dir", "base_package", "maven_coordinates", "profiles", "allowed_write_paths", "expected_evidence_files", "verification_commands", "approval", "work_unit", "generation_policy"];
|
|
157
195
|
const missingFields = required.filter((field) => !isPresent(contract[field]));
|
|
158
196
|
if (missingFields.length) fail(`脚手架合同缺少结构化字段: ${missingFields.join(", ")}`);
|
|
159
|
-
if (contract.
|
|
197
|
+
if (contract.status !== "approved") fail("脚手架合同必须已由生命周期批准");
|
|
160
198
|
if (contract.contract_id !== this.options.contractId) fail("--contract-id 与脚手架合同不一致");
|
|
161
199
|
if (contract.contract_version !== this.options.contractVersion) fail("--contract-version 与脚手架合同不一致");
|
|
162
200
|
if (contract.current_version !== contract.contract_version) fail("脚手架合同版本不是当前版本");
|
|
@@ -164,10 +202,13 @@ class ScaffoldGenerator {
|
|
|
164
202
|
if (contract.persisted_ref !== this.options.persistedRef) fail("--persisted-ref 与脚手架合同不一致");
|
|
165
203
|
if (contract.lifecycle_approval_ref !== this.options.approvalRef) fail("--approval-ref 与脚手架合同不一致");
|
|
166
204
|
if (contract.scaffold_status !== "required") fail("脚手架生成器只接受 scaffold_status=required");
|
|
205
|
+
if (contract.project_name !== this.projectName) fail("--project-name 与脚手架合同不一致");
|
|
206
|
+
if (contract.base_package !== this.basePackage) fail("--base-package 与脚手架合同不一致");
|
|
167
207
|
if (!["allowed_write_paths", "expected_evidence_files", "verification_commands"].every((field) => Array.isArray(contract[field]) && contract[field].length)) fail("脚手架合同的 allowed_write_paths、expected_evidence_files、verification_commands 必须非空");
|
|
168
208
|
if (!contract.expected_evidence_files.map(String).join(" ").includes(".yss/scaffold-generation.json")) fail("脚手架合同 expected_evidence_files 必须包含 .yss/scaffold-generation.json");
|
|
169
|
-
|
|
170
|
-
|
|
209
|
+
if (path.resolve(String(contract.target_output_dir)) !== this.outputDir) fail("脚手架合同 target_output_dir 与 --output-dir 不一致");
|
|
210
|
+
const allowedRoots = contract.allowed_write_paths.map((item) => path.resolve(this.outputDir, String(item)));
|
|
211
|
+
if (!allowedRoots.some((root) => isWithin(root, this.finalProjectRoot))) fail("实际项目根不在脚手架合同 allowed_write_paths 内");
|
|
171
212
|
if (JSON.stringify(contract.verification_commands) !== JSON.stringify(COMMANDS)) fail("脚手架合同验证命令必须固定为三条项目根目录 ./mvnw 命令");
|
|
172
213
|
const approval = contract.approval;
|
|
173
214
|
if (!approval || typeof approval !== "object" || ["approval_ref", "approver", "persisted_ref", "current_version"].some((field) => !isPresent(approval[field]))) fail("脚手架合同 approval 记录不完整");
|
|
@@ -178,23 +219,57 @@ class ScaffoldGenerator {
|
|
|
178
219
|
if (!workUnit || typeof workUnit !== "object" || workFields.some((field) => !isPresent(workUnit[field]))) fail("脚手架合同 work_unit 结构不完整");
|
|
179
220
|
if (workUnit.primary_skill !== "yss-ddd-scaffold-generator" || workUnit.tdd_mode !== "controlled-generation" || workUnit.controlled_generation !== true) fail("脚手架合同 work_unit 必须绑定本 skill 和 controlled-generation");
|
|
180
221
|
if (JSON.stringify(workUnit.verification_commands) !== JSON.stringify(contract.verification_commands) || JSON.stringify(workUnit.allowed_write_paths) !== JSON.stringify(contract.allowed_write_paths)) fail("脚手架合同 work_unit 与根级验证/写路径约束不一致");
|
|
181
|
-
|
|
182
|
-
|
|
222
|
+
this.validateMavenCoordinates(contract);
|
|
223
|
+
this.validateProfiles(contract.profiles);
|
|
224
|
+
const generationPolicy = contract.generation_policy;
|
|
225
|
+
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");
|
|
226
|
+
this.contractDigest = sha256(contractText);
|
|
183
227
|
this.scaffoldContract = contract;
|
|
184
228
|
}
|
|
185
229
|
|
|
186
|
-
|
|
187
|
-
if (!
|
|
188
|
-
const
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
230
|
+
validateProfiles(profiles) {
|
|
231
|
+
if (!profiles || typeof profiles !== "object") fail("脚手架合同 profiles 结构不完整");
|
|
232
|
+
for (const [name, expected] of Object.entries(SUPPORTED_PROFILES)) {
|
|
233
|
+
if (!isPresent(profiles[name])) fail(`脚手架合同 profiles 缺少 ${name}`);
|
|
234
|
+
if (profiles[name] !== expected) {
|
|
235
|
+
if (name === "persistence") fail(`unsupported persistence profile: ${profiles[name]};只支持 ${expected}`);
|
|
236
|
+
fail(`unsupported ${name} profile: ${profiles[name]};只支持 ${expected}`);
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
this.profiles = structuredClone(profiles);
|
|
240
|
+
if (this.options.database !== profiles.database) fail("--database 与脚手架合同 profiles.database 不一致");
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
validateMavenCoordinates(contract) {
|
|
244
|
+
const optionValues = [
|
|
245
|
+
this.options.groupId,
|
|
246
|
+
this.options.projectVersion,
|
|
247
|
+
this.options.parentGroupId,
|
|
248
|
+
this.options.parentArtifactId,
|
|
249
|
+
this.options.parentVersion,
|
|
250
|
+
this.options.yssComponentsVersion
|
|
251
|
+
];
|
|
252
|
+
const providedCount = optionValues.filter(isPresent).length;
|
|
253
|
+
if (providedCount !== 0 && providedCount !== optionValues.length) {
|
|
254
|
+
fail("显式 Maven 坐标必须完整提供 groupId、项目版本、父 POM 坐标和 YSS Components 版本");
|
|
255
|
+
}
|
|
256
|
+
const coordinates = contract.maven_coordinates;
|
|
257
|
+
const parent = coordinates.parent;
|
|
258
|
+
const values = [coordinates.group_id, coordinates.project_version, parent?.group_id, parent?.artifact_id, parent?.version, coordinates.yss_components_version];
|
|
259
|
+
if (values.some((value) => !isPresent(value))) fail("脚手架合同 maven_coordinates 必须包含项目 groupId/version、父 POM GAV 和 YSS Components 版本");
|
|
260
|
+
if (providedCount !== optionValues.length) fail("合同包含 maven_coordinates 时必须传入完整 Maven 坐标参数");
|
|
261
|
+
if (JSON.stringify(values) !== JSON.stringify(optionValues)) fail("命令行 Maven 坐标与已批准脚手架合同不一致");
|
|
262
|
+
const coordinatePattern = /^[A-Za-z0-9_.-]+$/;
|
|
263
|
+
if (values.some((value) => !coordinatePattern.test(String(value)))) fail("Maven 坐标只能包含字母、数字、点、下划线和连字符");
|
|
264
|
+
this.mavenCoordinates = structuredClone(coordinates);
|
|
265
|
+
this.mavenCoordinatesSource = "approved-contract";
|
|
192
266
|
}
|
|
193
267
|
|
|
194
268
|
templateVars() {
|
|
195
269
|
const database = this.options.database;
|
|
196
270
|
const dependency = database === "mysql" ? `<dependency>\n <groupId>com.mysql</groupId>\n <artifactId>mysql-connector-j</artifactId>\n <version>8.4.0</version>\n <scope>compile</scope>\n</dependency>` : "";
|
|
197
|
-
|
|
271
|
+
const coordinates = this.mavenCoordinates;
|
|
272
|
+
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, database, driver_class: "com.mysql.cj.jdbc.Driver", db_name: this.dbName, jdbc_url: `jdbc:mysql://localhost:3306/${this.dbName}?useUnicode=true&characterEncoding=utf8&serverTimezone=Asia/Shanghai`, db_dependency: dependency };
|
|
198
273
|
}
|
|
199
274
|
render(text) { let output = text; for (const [key, value] of Object.entries(this.templateVars())) output = output.replaceAll(`{{${key}}}`, String(value)); return output; }
|
|
200
275
|
async renderTemplate(template, output) { if (!await isFile(template)) fail(`模板文件不存在: ${template}`); await writeText(output, this.render(await readFile(template, "utf8"))); }
|
|
@@ -217,10 +292,22 @@ class ScaffoldGenerator {
|
|
|
217
292
|
await Promise.all([[pom("parent-pom.xml.template"), path.join(this.projectRoot, "pom.xml")], [pom("domain-pom.xml.template"), target(`${this.projectName}-domain`)], [pom("application-pom.xml.template"), target(`${this.projectName}-application`)], [pom("infrastructure-pom.xml.template"), target(`${this.projectName}-infrastructure`)], [pom("adapter-pom.xml.template"), target(`${this.projectName}-adapter`)], [pom("web-pom.xml.template"), target(path.join(`${this.projectName}-adapter`, `${this.projectName}-web`))], [pom("bootstrap-pom.xml.template"), target(`${this.projectName}-bootstrap`)]].map(([from, to]) => this.renderTemplate(from, to)));
|
|
218
293
|
console.log(" ✓ 父级 pom.xml\n ✓ domain pom.xml\n ✓ application pom.xml\n ✓ infrastructure pom.xml\n ✓ adapter pom.xml\n ✓ web pom.xml\n ✓ bootstrap pom.xml");
|
|
219
294
|
}
|
|
295
|
+
async generateBootstrapSource() {
|
|
296
|
+
const source = path.join(this.javaTemplateDir, "bootstrap-application.java.template");
|
|
297
|
+
const target = path.join(this.projectRoot, this.bootstrapMainSource);
|
|
298
|
+
await this.renderTemplate(source, target);
|
|
299
|
+
console.log(`\n☕ 生成机械启动入口...\n ✓ ${this.applicationClassName}.java`);
|
|
300
|
+
}
|
|
301
|
+
async generateArchitectureRules() {
|
|
302
|
+
const source = path.join(this.javaTemplateDir, "architecture-rules-test.java.template");
|
|
303
|
+
const target = path.join(this.projectRoot, `${this.projectName}-bootstrap`, "src", "test", "java", this.packagePath, "ArchitectureRulesTest.java");
|
|
304
|
+
await this.renderTemplate(source, target);
|
|
305
|
+
console.log(" ✓ ArchitectureRulesTest.java");
|
|
306
|
+
}
|
|
220
307
|
async generateConfigFiles() {
|
|
221
308
|
console.log("\n⚙️ 生成配置文件..."); const base = path.join(this.projectRoot, `${this.projectName}-bootstrap`, "src/main/resources");
|
|
222
|
-
await Promise.all([["application.yml.template", "application.yml"], ["logback-spring.xml.template", "logback-spring.xml"]].map(([from, to]) => this.renderTemplate(path.join(this.configTemplateDir, from), path.join(base, to))));
|
|
223
|
-
console.log(" ✓ application.yml\n ✓ logback-spring.xml");
|
|
309
|
+
await Promise.all([["application.yml.template", "application.yml"], ["application-local.yml.template", "application-local.yml"], ["logback-spring.xml.template", "logback-spring.xml"]].map(([from, to]) => this.renderTemplate(path.join(this.configTemplateDir, from), path.join(base, to))));
|
|
310
|
+
console.log(" ✓ application.yml\n ✓ application-local.yml\n ✓ logback-spring.xml");
|
|
224
311
|
}
|
|
225
312
|
generateDatabaseScripts() { console.log("\n🗃️ 保留数据库目录布局...\n ✓ db/(业务 schema 和初始化数据由批准切片合同生成)"); }
|
|
226
313
|
async generateDocumentation() {
|
|
@@ -230,7 +317,17 @@ class ScaffoldGenerator {
|
|
|
230
317
|
}
|
|
231
318
|
async writeGenerationManifest() {
|
|
232
319
|
const contract = this.scaffoldContract;
|
|
233
|
-
const
|
|
320
|
+
const manifestRelative = ".yss/scaffold-generation.json";
|
|
321
|
+
const generatedFiles = [];
|
|
322
|
+
for (const entry of await fileEntries(this.projectRoot, { exclude: new Set([manifestRelative]) })) {
|
|
323
|
+
generatedFiles.push({ path: entry.relative, owner: "generator", sha256: sha256(await readFile(entry.absolute)) });
|
|
324
|
+
}
|
|
325
|
+
const downstream = {};
|
|
326
|
+
for (const skill of DOWNSTREAM_SKILLS) {
|
|
327
|
+
const skillFile = path.join(REPOSITORY_ROOT, ".agents", "skills", skill, "SKILL.md");
|
|
328
|
+
downstream[skill] = await isFile(skillFile) ? sha256(await readFile(skillFile)) : "unavailable";
|
|
329
|
+
}
|
|
330
|
+
const manifest = { schema_version: 2, contract_id: this.options.contractId, contract_version: this.options.contractVersion, scaffold_request_id: contract.scaffold_request_id, approval_ref: this.options.approvalRef, router_draft_ref: this.options.routerDraftRef, 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, database: this.options.database, 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, 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() };
|
|
234
331
|
await writeText(path.join(this.projectRoot, ".yss", "scaffold-generation.json"), `${JSON.stringify(manifest, null, 2)}\n`); console.log(" ✓ .yss/scaffold-generation.json");
|
|
235
332
|
}
|
|
236
333
|
async copyWrapperFiles() {
|
|
@@ -239,10 +336,10 @@ class ScaffoldGenerator {
|
|
|
239
336
|
if (await exists(path.join(wrapper, ".mvn"))) await cp(path.join(wrapper, ".mvn"), path.join(this.projectRoot, ".mvn"), { recursive: true, force: true });
|
|
240
337
|
}
|
|
241
338
|
async validateGeneratedArtifacts() {
|
|
242
|
-
const required = [path.join(this.projectRoot, "pom.xml"), path.join(this.projectRoot, `${this.projectName}-bootstrap`, "pom.xml"), path.join(this.projectRoot, "mvnw"), path.join(this.projectRoot, ".yss", "scaffold-generation.json")];
|
|
339
|
+
const required = [path.join(this.projectRoot, "pom.xml"), path.join(this.projectRoot, `${this.projectName}-bootstrap`, "pom.xml"), path.join(this.projectRoot, this.bootstrapMainSource), path.join(this.projectRoot, "mvnw"), path.join(this.projectRoot, ".yss", "scaffold-generation.json")];
|
|
243
340
|
const missing = []; for (const target of required) if (!await isFile(target)) missing.push(target); if (missing.length) fail(`生成产物缺失: ${missing.join(", ")}`);
|
|
244
|
-
const manifest = await readJson(required[
|
|
245
|
-
if (manifest.contract_id !== this.options.contractId || manifest.contract_version !== this.options.contractVersion || manifest.current_version !== this.options.contractVersion || manifest.generation_mode !== "controlled-generation" || JSON.stringify(manifest.verification_commands) !== JSON.stringify(COMMANDS)) fail("
|
|
341
|
+
const manifest = await readJson(required[4], "脚手架生成元数据清单无法读取");
|
|
342
|
+
if (manifest.schema_version !== 2 || manifest.contract_id !== this.options.contractId || manifest.contract_version !== this.options.contractVersion || manifest.current_version !== this.options.contractVersion || manifest.generation_mode !== "controlled-generation" || manifest.bootstrap_main_class !== `${this.basePackage}.${this.applicationClassName}` || manifest.bootstrap_main_source !== this.bootstrapMainSource || manifest.profiles.architecture !== SUPPORTED_PROFILES.architecture || manifest.generation_policy.mode !== "initialize-only" || manifest.generation_policy.existing_target !== "unsupported" || JSON.stringify(manifest.verification_commands) !== JSON.stringify(COMMANDS)) fail("脚手架生成元数据清单与当前批准合同、Target Profile、initialize-only 边界、机械启动入口或固定验证命令不一致");
|
|
246
343
|
const stack = [this.projectRoot], binary = new Set([".class", ".db", ".jar", ".png", ".jpg", ".jpeg", ".gif"]);
|
|
247
344
|
while (stack.length) { const dir = stack.pop(); for (const entry of await readdir(dir, { withFileTypes: true })) { const target = path.join(dir, entry.name); if (entry.isDirectory()) { stack.push(target); continue; } if (!entry.isFile() || binary.has(path.extname(entry.name))) continue; const content = await readFile(target, "utf8"); if (content.includes("{{") || content.includes("root/root")) fail(`生成文件包含未替换占位符或明文凭据: ${target}`); } }
|
|
248
345
|
}
|
package/template/.claude/skills/yss-ddd-scaffold-generator/scripts/run_scaffold_verification.mjs
CHANGED
|
@@ -10,23 +10,103 @@ const COMMANDS = PHASES.map((phase) => `./mvnw ${phase}`);
|
|
|
10
10
|
const isoNow = () => new Date().toISOString();
|
|
11
11
|
async function isFile(target) { try { return (await stat(target)).isFile(); } catch (error) { if (error.code === "ENOENT") return false; throw error; } }
|
|
12
12
|
async function writeText(target, content) { await mkdir(path.dirname(target), { recursive: true }); await writeFile(target, content, "utf8"); }
|
|
13
|
+
async function isExecutable(target) {
|
|
14
|
+
try { const info = await stat(target); return info.isFile() && Boolean(info.mode & 0o111); }
|
|
15
|
+
catch (error) { if (error.code === "ENOENT") return false; throw error; }
|
|
16
|
+
}
|
|
17
|
+
async function readTextIfPresent(target) { try { return await readFile(target, "utf8"); } catch (error) { if (error.code === "ENOENT") return ""; throw error; } }
|
|
18
|
+
function configured(value) { return typeof value === "string" && value.trim().length > 0; }
|
|
19
|
+
function redactSecrets(text, environment = process.env) {
|
|
20
|
+
let output = text;
|
|
21
|
+
for (const name of ["MAVEN_REPO_USERNAME", "MAVEN_REPO_PASSWORD"]) {
|
|
22
|
+
const value = environment[name];
|
|
23
|
+
if (configured(value)) output = output.replaceAll(value, `[REDACTED:${name}]`);
|
|
24
|
+
}
|
|
25
|
+
return output;
|
|
26
|
+
}
|
|
27
|
+
function classifyFailure(phase, outcome) {
|
|
28
|
+
if (outcome.exitCode === 0) return null;
|
|
29
|
+
const output = `${outcome.stdout}\n${outcome.stderr}`.replaceAll(/\u001B\[[0-9;]*m/g, "");
|
|
30
|
+
if (/Non-resolvable parent POM|Could not transfer artifact|Could not resolve (?:dependencies|artifact)|status code: 401|\bUnauthorized\b|PKIX path building failed|Name or service not known|Unknown host/i.test(output)) return "repository-access";
|
|
31
|
+
if (/Unable to find main class|mainClass.*(?:not found|missing)/i.test(output)) return "bootstrap-entrypoint";
|
|
32
|
+
if (/COMPILATION ERROR|Compilation failure|maven-compiler-plugin/i.test(output)) return "compilation";
|
|
33
|
+
if (phase === "validate") return "project-model";
|
|
34
|
+
if (phase === "test") return "test-failure";
|
|
35
|
+
if (phase === "package") return "packaging";
|
|
36
|
+
return "maven-execution";
|
|
37
|
+
}
|
|
13
38
|
function parseArgs(argv) { const result = {}; for (let index = 0; index < argv.length; index += 1) { let token = argv[index]; if (token === "--help" || token === "-h") { result.help = true; continue; } const equals = token.indexOf("="); let value; if (equals !== -1) { value = token.slice(equals + 1); token = token.slice(0, equals); } if (!["--project-root", "--evidence-dir"].includes(token)) throw new Error(`不支持的参数: ${token}`); if (value === undefined) value = argv[++index]; if (!value || value.startsWith("--")) throw new Error(`参数 ${token} 缺少值`); result[token === "--project-root" ? "projectRoot" : "evidenceDir"] = path.resolve(value); } if (result.help) return result; if (!result.projectRoot || !result.evidenceDir) throw new Error("必须提供 --project-root 和 --evidence-dir"); return result; }
|
|
14
39
|
function validateManifest(manifest) {
|
|
15
|
-
|
|
40
|
+
if (manifest.schema_version !== 2) throw new Error(`unsupported: scaffold Manifest schema_version=${manifest.schema_version};只验证 Target Profile v2`);
|
|
41
|
+
const required = ["schema_version", "contract_id", "contract_version", "scaffold_request_id", "contract_digest", "profiles", "ownership", "readiness", "generation_policy", "completion_level", "approval_ref", "approver", "lifecycle_approval_ref", "router_draft_ref", "persisted_ref", "contract_file_ref", "current_version", "allowed_write_paths", "expected_evidence_files", "verification_commands", "generation_mode"];
|
|
16
42
|
const missing = required.filter((field) => manifest[field] === undefined || manifest[field] === null || manifest[field] === "");
|
|
17
43
|
if (manifest.generation_mode !== "controlled-generation" || missing.length) throw new Error(`脚手架生成元数据清单不完整或不是 controlled-generation: ${missing.join(", ")}`);
|
|
44
|
+
if (manifest.profiles.architecture !== "target-domain-model" || manifest.generation_policy.mode !== "initialize-only" || manifest.generation_policy.existing_target !== "unsupported" || manifest.generation_policy.old_project_migration !== "unsupported" || manifest.generation_policy.template_upgrade !== "unsupported") throw new Error("Manifest v2 必须声明 Target Profile 与严格 initialize-only;已有目标、旧项目迁移和模板升级均须为 unsupported");
|
|
18
45
|
if (manifest.current_version !== manifest.contract_version) throw new Error("脚手架生成元数据清单不是当前合同版本");
|
|
19
46
|
if (JSON.stringify(manifest.verification_commands) !== JSON.stringify(COMMANDS)) throw new Error("脚手架生成元数据清单验证命令不符合固定合同");
|
|
20
47
|
}
|
|
21
|
-
function execute(wrapper, phase, cwd) { return new Promise((resolve) => { const child = spawn(wrapper, [phase], { cwd, stdio: ["ignore", "pipe", "pipe"] }); let stdout = "", stderr = ""; child.stdout.on("data", (chunk) => { stdout += chunk; }); child.stderr.on("data", (chunk) => { stderr += chunk; }); child.on("error", (error) => resolve({ exitCode: 127, stdout: "", stderr: String(error) })); child.on("close", (code) => resolve({ exitCode: code ?? 1, stdout, stderr })); }); }
|
|
22
|
-
export async function run(projectRoot, evidenceDir) {
|
|
48
|
+
function execute(wrapper, phase, cwd, environment) { return new Promise((resolve) => { const child = spawn(wrapper, [phase], { cwd, env: environment, stdio: ["ignore", "pipe", "pipe"] }); let stdout = "", stderr = ""; child.stdout.on("data", (chunk) => { stdout += chunk; }); child.stderr.on("data", (chunk) => { stderr += chunk; }); child.on("error", (error) => resolve({ exitCode: 127, stdout: "", stderr: String(error) })); child.on("close", (code) => resolve({ exitCode: code ?? 1, stdout, stderr })); }); }
|
|
49
|
+
export async function run(projectRoot, evidenceDir, environment = process.env) {
|
|
23
50
|
const wrapper = path.join(projectRoot, "mvnw"), manifestPath = path.join(projectRoot, ".yss", "scaffold-generation.json");
|
|
24
51
|
if (!await isFile(wrapper)) throw new Error(`项目根目录缺少 Maven wrapper: ${wrapper}`);
|
|
25
52
|
if (!await isFile(manifestPath)) throw new Error(`项目根目录缺少脚手架生成元数据清单: ${manifestPath}`);
|
|
26
53
|
let manifest; try { manifest = JSON.parse(await readFile(manifestPath, "utf8")); } catch { throw new Error(`脚手架生成元数据清单无法读取或不是合法 JSON: ${manifestPath}`); }
|
|
27
|
-
validateManifest(manifest);
|
|
28
|
-
|
|
29
|
-
|
|
54
|
+
validateManifest(manifest);
|
|
55
|
+
await mkdir(evidenceDir, { recursive: true });
|
|
56
|
+
const mavenConfig = await readTextIfPresent(path.join(projectRoot, ".mvn", "maven.config"));
|
|
57
|
+
const preflight = {
|
|
58
|
+
wrapper_exists: true,
|
|
59
|
+
wrapper_executable: await isExecutable(wrapper),
|
|
60
|
+
java_home_configured: configured(environment.JAVA_HOME),
|
|
61
|
+
maven_repository_credentials_configured: configured(environment.MAVEN_REPO_USERNAME) && configured(environment.MAVEN_REPO_PASSWORD),
|
|
62
|
+
maven_repository_url_configured: configured(environment.YSS_MAVEN_REPOSITORY_URL),
|
|
63
|
+
project_settings_present: await isFile(path.join(projectRoot, ".mvn", "settings.xml")),
|
|
64
|
+
project_maven_config_present: await isFile(path.join(projectRoot, ".mvn", "maven.config")),
|
|
65
|
+
project_settings_wired: /(?:^|\s)-(?:s|-settings)\s+\.mvn\/settings\.xml(?:\s|$)/m.test(mavenConfig),
|
|
66
|
+
repository_profile: manifest.profiles.repository,
|
|
67
|
+
repository_profile_wired: /(?:^|\s)-(?:P|-activate-profiles)\s+yss-internal(?:\s|$)/m.test(mavenConfig),
|
|
68
|
+
maven_coordinates_source: manifest.maven_coordinates_source
|
|
69
|
+
};
|
|
70
|
+
const failed = [];
|
|
71
|
+
if (!preflight.wrapper_executable) failed.push("wrapper-not-executable");
|
|
72
|
+
if (!preflight.project_settings_present || !preflight.project_maven_config_present || !preflight.project_settings_wired || !preflight.repository_profile_wired) failed.push("repository-profile-not-wired");
|
|
73
|
+
if (!preflight.maven_repository_url_configured) failed.push("repository-url-not-configured");
|
|
74
|
+
if (!preflight.maven_repository_credentials_configured) failed.push("repository-credentials-not-configured");
|
|
75
|
+
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: [] };
|
|
76
|
+
const commands = [];
|
|
77
|
+
for (const phase of PHASES) {
|
|
78
|
+
const stdoutPath = path.join(evidenceDir, `mvnw-${phase}.stdout.log`);
|
|
79
|
+
const stderrPath = path.join(evidenceDir, `mvnw-${phase}.stderr.log`);
|
|
80
|
+
const startedAt = isoNow();
|
|
81
|
+
const started = process.hrtime.bigint();
|
|
82
|
+
const outcome = await execute(wrapper, phase, projectRoot, environment);
|
|
83
|
+
const durationMs = Number(process.hrtime.bigint() - started) / 1e6;
|
|
84
|
+
await writeText(stdoutPath, redactSecrets(outcome.stdout, environment));
|
|
85
|
+
await writeText(stderrPath, redactSecrets(outcome.stderr, environment));
|
|
86
|
+
commands.push({
|
|
87
|
+
command: `./mvnw ${phase}`,
|
|
88
|
+
phase,
|
|
89
|
+
exit_code: outcome.exitCode,
|
|
90
|
+
failure_category: classifyFailure(phase, outcome),
|
|
91
|
+
duration_ms: Number(durationMs.toFixed(3)),
|
|
92
|
+
started_at: startedAt,
|
|
93
|
+
executed_at: isoNow(),
|
|
94
|
+
stdout_ref: stdoutPath,
|
|
95
|
+
stderr_ref: stderrPath
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
const failureCategory = commands.find((item) => item.failure_category)?.failure_category ?? null;
|
|
99
|
+
return {
|
|
100
|
+
verification_mode: "controlled-generation",
|
|
101
|
+
project_root: projectRoot,
|
|
102
|
+
scaffold_manifest_ref: manifestPath,
|
|
103
|
+
generated_at: isoNow(),
|
|
104
|
+
status: failureCategory === null ? "passed" : "failed",
|
|
105
|
+
failure_category: failureCategory,
|
|
106
|
+
completion_level: failureCategory === null ? "empty-scaffold-verified" : "generated",
|
|
107
|
+
preflight,
|
|
108
|
+
commands
|
|
109
|
+
};
|
|
30
110
|
}
|
|
31
|
-
async function main() { let args; try { args = parseArgs(process.argv.slice(2)); if (args.help) { console.log("运行 YSS 脚手架真实验证命令\n用法: node scripts/run_scaffold_verification.mjs --project-root <dir> --evidence-dir <dir>"); return 0; } const reportPath = path.join(args.evidenceDir, "scaffold-verification.json"); try { const report = await run(args.projectRoot, args.evidenceDir); await writeText(reportPath, `${JSON.stringify(report, null, 2)}\n`); console.log(`${report.status}: ${reportPath}`); return report.status === "passed" ? 0 : 1; } catch (error) { const report = { verification_mode: "controlled-generation", project_root: args.projectRoot, generated_at: isoNow(), status: "failed", error: error.message, commands: [] }; await writeText(reportPath, `${JSON.stringify(report, null, 2)}\n`); process.stderr.write(`❌ 脚手架验证无法执行: ${error.message}\n`); return 1; } } catch (error) { process.stderr.write(`❌ 脚手架验证无法执行: ${error.message}\n`); return 1; } }
|
|
111
|
+
async function main() { let args; try { args = parseArgs(process.argv.slice(2)); if (args.help) { console.log("运行 YSS 脚手架真实验证命令\n用法: node scripts/run_scaffold_verification.mjs --project-root <dir> --evidence-dir <dir>"); return 0; } const reportPath = path.join(args.evidenceDir, "scaffold-verification.json"); try { const report = await run(args.projectRoot, args.evidenceDir); await writeText(reportPath, `${JSON.stringify(report, null, 2)}\n`); console.log(`${report.status}: ${reportPath}`); return report.status === "passed" ? 0 : 1; } catch (error) { const report = { verification_mode: "controlled-generation", project_root: args.projectRoot, generated_at: isoNow(), status: "failed", failure_category: "verification-preflight", error: error.message, commands: [] }; await writeText(reportPath, `${JSON.stringify(report, null, 2)}\n`); process.stderr.write(`❌ 脚手架验证无法执行: ${error.message}\n`); return 1; } } catch (error) { process.stderr.write(`❌ 脚手架验证无法执行: ${error.message}\n`); return 1; } }
|
|
32
112
|
if (process.argv[1] && import.meta.url === new URL(`file://${process.argv[1]}`).href) process.exitCode = await main();
|