create-yss-spec 3.4.1 → 3.4.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/package.json +2 -2
- package/template/.agents/skills/.strategic-design-skills-manifest.json +1 -1
- package/template/.agents/skills/archify/SKILL.md +1 -1
- package/template/.agents/skills/code-review/SKILL.md +12 -8
- package/template/.agents/skills/file-export-download/SKILL.md +1 -1
- package/template/.agents/skills/frontend-commit/SKILL.md +1 -1
- package/template/.agents/skills/java-backend-commit/SKILL.md +1 -1
- package/template/.agents/skills/llm-wiki/SKILL.md +1 -6
- package/template/.agents/skills/lombok/SKILL.md +10 -336
- package/template/.agents/skills/lombok/references/annotation-examples.md +307 -0
- package/template/.agents/skills/maintaining-skills/SKILL.md +2 -1
- package/template/.agents/skills/maintaining-skills/references/authoring.md +27 -0
- package/template/.agents/skills/mapstruct/SKILL.md +11 -318
- package/template/.agents/skills/mapstruct/references/annotation-examples.md +300 -0
- package/template/.agents/skills/page-form-module/SKILL.md +1 -1
- package/template/.agents/skills/page-skeleton/SKILL.md +1 -1
- package/template/.agents/skills/theme-token-usage/SKILL.md +1 -1
- package/template/.agents/skills/to-tickets/SKILL.md +1 -1
- package/template/.agents/skills/using-git-worktrees/SKILL.md +1 -1
- package/template/.agents/skills/wayfinder/SKILL.md +1 -1
- package/template/.agents/skills/yedit-table-usage/SKILL.md +1 -1
- package/template/.agents/skills/yss-api-integration/SKILL.md +1 -1
- package/template/.agents/skills/yss-audit-log/SKILL.md +1 -1
- package/template/.agents/skills/yss-cache/SKILL.md +1 -1
- package/template/.agents/skills/yss-ddd-scaffold-generator/SKILL.md +15 -2
- package/template/.agents/skills/yss-ddd-scaffold-generator/assets/templates/pom/application-pom.xml.template +1 -1
- package/template/.agents/skills/yss-ddd-scaffold-generator/assets/templates/pom/parent-pom.xml.template +15 -10
- package/template/.agents/skills/yss-ddd-scaffold-generator/assets/templates/pom/web-pom.xml.template +3 -3
- package/template/.agents/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-parent/SKILL.md +3 -3
- package/template/.agents/skills/yss-ddd-scaffold-generator/scripts/first-slice-compatibility.test.mjs +5 -1
- package/template/.agents/skills/yss-ddd-scaffold-generator/scripts/first-slice-verification.test.mjs +5 -2
- package/template/.agents/skills/yss-ddd-scaffold-generator/scripts/generate_scaffold.mjs +13 -10
- package/template/.agents/skills/yss-ddd-scaffold-generator/scripts/run_first_slice_verification.mjs +2 -1
- package/template/.agents/skills/yss-ddd-scaffold-generator/scripts/run_scaffold_verification.mjs +35 -3
- package/template/.agents/skills/yss-ddd-scaffold-generator/scripts/scaffold-generator.test.mjs +1 -1
- package/template/.agents/skills/yss-distributed-id/SKILL.md +1 -1
- package/template/.agents/skills/yss-dto/SKILL.md +5 -1
- package/template/.agents/skills/yss-excel-mvc/SKILL.md +1 -1
- package/template/.agents/skills/yss-exception/SKILL.md +5 -1
- package/template/.agents/skills/yss-formily-schema-generator/SKILL.md +1 -1
- package/template/.agents/skills/yss-implementation-contract-compiler/SKILL.md +13 -5
- package/template/.agents/skills/yss-implementation-contract-compiler/agents/openai.yaml +1 -1
- package/template/.agents/skills/yss-implementation-contract-compiler/references/compiler-contract.yaml +16 -0
- package/template/.agents/skills/yss-implementation-contract-compiler/references/slice-implementation-contract-v2.md +214 -0
- package/template/.agents/skills/yss-implementation-contract-compiler/references/slice-implementation-contract.md +66 -204
- package/template/.agents/skills/yss-layered-mvc-scaffold-generator/SKILL.md +15 -2
- package/template/.agents/skills/yss-layered-mvc-scaffold-generator/scripts/generate_scaffold.mjs +28 -19
- package/template/.agents/skills/yss-layered-mvc-scaffold-generator/scripts/scaffold-generator.test.mjs +10 -10
- package/template/.agents/skills/yss-mybatis/SKILL.md +4 -0
- package/template/.agents/skills/yss-openapi-draft-review/SKILL.md +1 -1
- package/template/.agents/skills/yss-openapi-governance/SKILL.md +1 -1
- package/template/.agents/skills/yss-product-lifecycle/SKILL.md +4 -4
- package/template/.agents/skills/yss-product-lifecycle/references/orchestration-contract.yaml +7 -2
- package/template/.agents/skills/yss-product-lifecycle/references/orchestration.md +4 -0
- package/template/.agents/skills/yss-product-lifecycle/references/state-model.md +2 -0
- package/template/.agents/skills/yss-product-lifecycle/references/user-decisions.md +23 -3
- package/template/.agents/skills/yss-prototype-stage/SKILL.md +1 -1
- package/template/.agents/skills/yss-repository/SKILL.md +4 -0
- package/template/.agents/skills/yss-research/SKILL.md +1 -1
- package/template/.agents/skills/yss-resilience4j/SKILL.md +1 -1
- package/template/.agents/skills/yss-security-algorithm/SKILL.md +1 -1
- package/template/.agents/skills/yss-tactical-design/SKILL.md +4 -0
- package/template/.agents/skills/yss-technical-design/SKILL.md +4 -0
- package/template/.agents/skills/yss-technical-design/scripts/validate-technical-design.mjs +2 -2
- package/template/.agents/skills/yss-ui/SKILL.md +1 -1
- package/template/.agents/skills/yss-ui-business-page-generation/SKILL.md +1 -1
- package/template/.agents/skills/yss-up-springboot3/SKILL.md +1 -1
- package/template/.agents/skills/yss-use-table-height/SKILL.md +1 -1
- package/template/.agents/skills/yss-use-tree-height/SKILL.md +1 -1
- package/template/.agents/skills/yss-userinfo/SKILL.md +1 -1
- package/template/.agents/skills/yss-validation/SKILL.md +5 -1
- package/template/.agents/skills/yss-web-controller/SKILL.md +5 -1
- package/template/.agents/skills/yss-web-controller/scripts/generate_controller.mjs +5 -2
- package/template/.agents/skills/ytable-usage/SKILL.md +1 -1
- package/template/.agents/skills/ytree-usage/SKILL.md +1 -1
- package/template/.codex/skills/archify/SKILL.md +1 -1
- package/template/.codex/skills/code-review/SKILL.md +12 -8
- package/template/.codex/skills/data-analytics/skills/analyze-data-quality/SKILL.md +1 -1
- package/template/.codex/skills/data-analytics/skills/build-dashboard/SKILL.md +1 -1
- package/template/.codex/skills/data-analytics/skills/build-report/SKILL.md +1 -1
- package/template/.codex/skills/data-analytics/skills/design-kpis/SKILL.md +1 -1
- package/template/.codex/skills/data-analytics/skills/gather-business-context/SKILL.md +1 -1
- package/template/.codex/skills/data-analytics/skills/index/SKILL.md +1 -1
- package/template/.codex/skills/data-analytics/skills/jupyter-notebooks/SKILL.md +1 -1
- package/template/.codex/skills/data-analytics/skills/kpi-reporting/SKILL.md +1 -1
- package/template/.codex/skills/data-analytics/skills/market-sizing/SKILL.md +1 -1
- package/template/.codex/skills/data-analytics/skills/metric-diagnostics/SKILL.md +1 -1
- package/template/.codex/skills/data-analytics/skills/product-business-analysis/SKILL.md +1 -1
- package/template/.codex/skills/data-analytics/skills/spreadsheets/SKILL.md +1 -1
- package/template/.codex/skills/data-analytics/skills/validate-data/SKILL.md +1 -1
- package/template/.codex/skills/data-analytics/skills/visualize-data/SKILL.md +1 -1
- package/template/.codex/skills/file-export-download/SKILL.md +1 -1
- package/template/.codex/skills/frontend-commit/SKILL.md +1 -1
- package/template/.codex/skills/java-backend-commit/SKILL.md +1 -1
- package/template/.codex/skills/llm-wiki/SKILL.md +1 -6
- package/template/.codex/skills/lombok/SKILL.md +10 -336
- package/template/.codex/skills/lombok/references/annotation-examples.md +307 -0
- package/template/.codex/skills/maintaining-skills/SKILL.md +2 -1
- package/template/.codex/skills/maintaining-skills/references/authoring.md +27 -0
- package/template/.codex/skills/mapstruct/SKILL.md +11 -318
- package/template/.codex/skills/mapstruct/references/annotation-examples.md +300 -0
- package/template/.codex/skills/page-form-module/SKILL.md +1 -1
- package/template/.codex/skills/page-skeleton/SKILL.md +1 -1
- package/template/.codex/skills/product-design/skills/audit/SKILL.md +1 -1
- package/template/.codex/skills/product-design/skills/design-qa/SKILL.md +1 -1
- package/template/.codex/skills/product-design/skills/get-context/SKILL.md +1 -1
- package/template/.codex/skills/product-design/skills/ideate/SKILL.md +1 -1
- package/template/.codex/skills/product-design/skills/image-to-code/SKILL.md +1 -1
- package/template/.codex/skills/product-design/skills/index/SKILL.md +1 -1
- package/template/.codex/skills/product-design/skills/prototype/SKILL.md +1 -1
- package/template/.codex/skills/product-design/skills/research/SKILL.md +1 -1
- package/template/.codex/skills/product-design/skills/user-context/SKILL.md +1 -1
- package/template/.codex/skills/theme-token-usage/SKILL.md +1 -1
- package/template/.codex/skills/to-tickets/SKILL.md +1 -1
- package/template/.codex/skills/using-git-worktrees/SKILL.md +1 -1
- package/template/.codex/skills/wayfinder/SKILL.md +1 -1
- package/template/.codex/skills/yedit-table-usage/SKILL.md +1 -1
- package/template/.codex/skills/yss-api-integration/SKILL.md +1 -1
- package/template/.codex/skills/yss-audit-log/SKILL.md +1 -1
- package/template/.codex/skills/yss-cache/SKILL.md +1 -1
- package/template/.codex/skills/yss-ddd-scaffold-generator/SKILL.md +15 -2
- package/template/.codex/skills/yss-ddd-scaffold-generator/assets/templates/pom/application-pom.xml.template +1 -1
- package/template/.codex/skills/yss-ddd-scaffold-generator/assets/templates/pom/parent-pom.xml.template +15 -10
- package/template/.codex/skills/yss-ddd-scaffold-generator/assets/templates/pom/web-pom.xml.template +3 -3
- package/template/.codex/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-parent/SKILL.md +3 -3
- package/template/.codex/skills/yss-ddd-scaffold-generator/scripts/first-slice-compatibility.test.mjs +5 -1
- package/template/.codex/skills/yss-ddd-scaffold-generator/scripts/first-slice-verification.test.mjs +5 -2
- package/template/.codex/skills/yss-ddd-scaffold-generator/scripts/generate_scaffold.mjs +13 -10
- package/template/.codex/skills/yss-ddd-scaffold-generator/scripts/run_first_slice_verification.mjs +2 -1
- package/template/.codex/skills/yss-ddd-scaffold-generator/scripts/run_scaffold_verification.mjs +35 -3
- package/template/.codex/skills/yss-ddd-scaffold-generator/scripts/scaffold-generator.test.mjs +1 -1
- package/template/.codex/skills/yss-distributed-id/SKILL.md +1 -1
- package/template/.codex/skills/yss-dto/SKILL.md +5 -1
- package/template/.codex/skills/yss-excel-mvc/SKILL.md +1 -1
- package/template/.codex/skills/yss-exception/SKILL.md +5 -1
- package/template/.codex/skills/yss-formily-schema-generator/SKILL.md +1 -1
- package/template/.codex/skills/yss-implementation-contract-compiler/SKILL.md +13 -5
- package/template/.codex/skills/yss-implementation-contract-compiler/agents/openai.yaml +1 -1
- package/template/.codex/skills/yss-implementation-contract-compiler/references/compiler-contract.yaml +16 -0
- package/template/.codex/skills/yss-implementation-contract-compiler/references/slice-implementation-contract-v2.md +214 -0
- package/template/.codex/skills/yss-implementation-contract-compiler/references/slice-implementation-contract.md +66 -204
- package/template/.codex/skills/yss-layered-mvc-scaffold-generator/SKILL.md +15 -2
- package/template/.codex/skills/yss-layered-mvc-scaffold-generator/scripts/generate_scaffold.mjs +28 -19
- package/template/.codex/skills/yss-layered-mvc-scaffold-generator/scripts/scaffold-generator.test.mjs +10 -10
- package/template/.codex/skills/yss-mybatis/SKILL.md +4 -0
- package/template/.codex/skills/yss-openapi-draft-review/SKILL.md +1 -1
- package/template/.codex/skills/yss-openapi-governance/SKILL.md +1 -1
- package/template/.codex/skills/yss-product-lifecycle/SKILL.md +4 -4
- package/template/.codex/skills/yss-product-lifecycle/references/orchestration-contract.yaml +7 -2
- package/template/.codex/skills/yss-product-lifecycle/references/orchestration.md +4 -0
- package/template/.codex/skills/yss-product-lifecycle/references/state-model.md +2 -0
- package/template/.codex/skills/yss-product-lifecycle/references/user-decisions.md +23 -3
- package/template/.codex/skills/yss-prototype-stage/SKILL.md +1 -1
- package/template/.codex/skills/yss-repository/SKILL.md +4 -0
- package/template/.codex/skills/yss-research/SKILL.md +1 -1
- package/template/.codex/skills/yss-resilience4j/SKILL.md +1 -1
- package/template/.codex/skills/yss-security-algorithm/SKILL.md +1 -1
- package/template/.codex/skills/yss-tactical-design/SKILL.md +4 -0
- package/template/.codex/skills/yss-technical-design/SKILL.md +4 -0
- package/template/.codex/skills/yss-technical-design/scripts/validate-technical-design.mjs +2 -2
- package/template/.codex/skills/yss-ui/SKILL.md +1 -1
- package/template/.codex/skills/yss-ui-business-page-generation/SKILL.md +1 -1
- package/template/.codex/skills/yss-up-springboot3/SKILL.md +1 -1
- package/template/.codex/skills/yss-use-table-height/SKILL.md +1 -1
- package/template/.codex/skills/yss-use-tree-height/SKILL.md +1 -1
- package/template/.codex/skills/yss-userinfo/SKILL.md +1 -1
- package/template/.codex/skills/yss-validation/SKILL.md +5 -1
- package/template/.codex/skills/yss-web-controller/SKILL.md +5 -1
- package/template/.codex/skills/yss-web-controller/scripts/generate_controller.mjs +5 -2
- package/template/.codex/skills/ytable-usage/SKILL.md +1 -1
- package/template/.codex/skills/ytree-usage/SKILL.md +1 -1
- package/template/.cursor/skills/archify/SKILL.md +1 -1
- package/template/.cursor/skills/code-review/SKILL.md +12 -8
- package/template/.cursor/skills/file-export-download/SKILL.md +1 -1
- package/template/.cursor/skills/frontend-commit/SKILL.md +1 -1
- package/template/.cursor/skills/java-backend-commit/SKILL.md +1 -1
- package/template/.cursor/skills/llm-wiki/SKILL.md +1 -6
- package/template/.cursor/skills/lombok/SKILL.md +10 -336
- package/template/.cursor/skills/lombok/references/annotation-examples.md +307 -0
- package/template/.cursor/skills/maintaining-skills/SKILL.md +2 -1
- package/template/.cursor/skills/maintaining-skills/references/authoring.md +27 -0
- package/template/.cursor/skills/mapstruct/SKILL.md +11 -318
- package/template/.cursor/skills/mapstruct/references/annotation-examples.md +300 -0
- package/template/.cursor/skills/page-form-module/SKILL.md +1 -1
- package/template/.cursor/skills/page-skeleton/SKILL.md +1 -1
- package/template/.cursor/skills/theme-token-usage/SKILL.md +1 -1
- package/template/.cursor/skills/to-tickets/SKILL.md +1 -1
- package/template/.cursor/skills/using-git-worktrees/SKILL.md +1 -1
- package/template/.cursor/skills/wayfinder/SKILL.md +1 -1
- package/template/.cursor/skills/yedit-table-usage/SKILL.md +1 -1
- package/template/.cursor/skills/yss-api-integration/SKILL.md +1 -1
- package/template/.cursor/skills/yss-audit-log/SKILL.md +1 -1
- package/template/.cursor/skills/yss-cache/SKILL.md +1 -1
- package/template/.cursor/skills/yss-ddd-scaffold-generator/SKILL.md +15 -2
- package/template/.cursor/skills/yss-ddd-scaffold-generator/assets/templates/pom/application-pom.xml.template +1 -1
- package/template/.cursor/skills/yss-ddd-scaffold-generator/assets/templates/pom/parent-pom.xml.template +15 -10
- package/template/.cursor/skills/yss-ddd-scaffold-generator/assets/templates/pom/web-pom.xml.template +3 -3
- package/template/.cursor/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-parent/SKILL.md +3 -3
- package/template/.cursor/skills/yss-ddd-scaffold-generator/scripts/first-slice-compatibility.test.mjs +5 -1
- package/template/.cursor/skills/yss-ddd-scaffold-generator/scripts/first-slice-verification.test.mjs +5 -2
- package/template/.cursor/skills/yss-ddd-scaffold-generator/scripts/generate_scaffold.mjs +13 -10
- package/template/.cursor/skills/yss-ddd-scaffold-generator/scripts/run_first_slice_verification.mjs +2 -1
- package/template/.cursor/skills/yss-ddd-scaffold-generator/scripts/run_scaffold_verification.mjs +35 -3
- package/template/.cursor/skills/yss-ddd-scaffold-generator/scripts/scaffold-generator.test.mjs +1 -1
- package/template/.cursor/skills/yss-distributed-id/SKILL.md +1 -1
- package/template/.cursor/skills/yss-dto/SKILL.md +5 -1
- package/template/.cursor/skills/yss-excel-mvc/SKILL.md +1 -1
- package/template/.cursor/skills/yss-exception/SKILL.md +5 -1
- package/template/.cursor/skills/yss-formily-schema-generator/SKILL.md +1 -1
- package/template/.cursor/skills/yss-implementation-contract-compiler/SKILL.md +13 -5
- package/template/.cursor/skills/yss-implementation-contract-compiler/agents/openai.yaml +1 -1
- package/template/.cursor/skills/yss-implementation-contract-compiler/references/compiler-contract.yaml +16 -0
- package/template/.cursor/skills/yss-implementation-contract-compiler/references/slice-implementation-contract-v2.md +214 -0
- package/template/.cursor/skills/yss-implementation-contract-compiler/references/slice-implementation-contract.md +66 -204
- package/template/.cursor/skills/yss-layered-mvc-scaffold-generator/SKILL.md +15 -2
- package/template/.cursor/skills/yss-layered-mvc-scaffold-generator/scripts/generate_scaffold.mjs +28 -19
- package/template/.cursor/skills/yss-layered-mvc-scaffold-generator/scripts/scaffold-generator.test.mjs +10 -10
- package/template/.cursor/skills/yss-mybatis/SKILL.md +4 -0
- package/template/.cursor/skills/yss-openapi-draft-review/SKILL.md +1 -1
- package/template/.cursor/skills/yss-openapi-governance/SKILL.md +1 -1
- package/template/.cursor/skills/yss-product-lifecycle/SKILL.md +4 -4
- package/template/.cursor/skills/yss-product-lifecycle/references/orchestration-contract.yaml +7 -2
- package/template/.cursor/skills/yss-product-lifecycle/references/orchestration.md +4 -0
- package/template/.cursor/skills/yss-product-lifecycle/references/state-model.md +2 -0
- package/template/.cursor/skills/yss-product-lifecycle/references/user-decisions.md +23 -3
- package/template/.cursor/skills/yss-prototype-stage/SKILL.md +1 -1
- package/template/.cursor/skills/yss-repository/SKILL.md +4 -0
- package/template/.cursor/skills/yss-research/SKILL.md +1 -1
- package/template/.cursor/skills/yss-resilience4j/SKILL.md +1 -1
- package/template/.cursor/skills/yss-security-algorithm/SKILL.md +1 -1
- package/template/.cursor/skills/yss-tactical-design/SKILL.md +4 -0
- package/template/.cursor/skills/yss-technical-design/SKILL.md +4 -0
- package/template/.cursor/skills/yss-technical-design/scripts/validate-technical-design.mjs +2 -2
- package/template/.cursor/skills/yss-ui/SKILL.md +1 -1
- package/template/.cursor/skills/yss-ui-business-page-generation/SKILL.md +1 -1
- package/template/.cursor/skills/yss-up-springboot3/SKILL.md +1 -1
- package/template/.cursor/skills/yss-use-table-height/SKILL.md +1 -1
- package/template/.cursor/skills/yss-use-tree-height/SKILL.md +1 -1
- package/template/.cursor/skills/yss-userinfo/SKILL.md +1 -1
- package/template/.cursor/skills/yss-validation/SKILL.md +5 -1
- package/template/.cursor/skills/yss-web-controller/SKILL.md +5 -1
- package/template/.cursor/skills/yss-web-controller/scripts/generate_controller.mjs +5 -2
- package/template/.cursor/skills/ytable-usage/SKILL.md +1 -1
- package/template/.cursor/skills/ytree-usage/SKILL.md +1 -1
- package/template/.pi/skills/archify/SKILL.md +1 -1
- package/template/.pi/skills/code-review/SKILL.md +12 -8
- package/template/.pi/skills/file-export-download/SKILL.md +1 -1
- package/template/.pi/skills/frontend-commit/SKILL.md +1 -1
- package/template/.pi/skills/java-backend-commit/SKILL.md +1 -1
- package/template/.pi/skills/llm-wiki/SKILL.md +1 -6
- package/template/.pi/skills/lombok/SKILL.md +10 -336
- package/template/.pi/skills/lombok/references/annotation-examples.md +307 -0
- package/template/.pi/skills/maintaining-skills/SKILL.md +2 -1
- package/template/.pi/skills/maintaining-skills/references/authoring.md +27 -0
- package/template/.pi/skills/mapstruct/SKILL.md +11 -318
- package/template/.pi/skills/mapstruct/references/annotation-examples.md +300 -0
- package/template/.pi/skills/page-form-module/SKILL.md +1 -1
- package/template/.pi/skills/page-skeleton/SKILL.md +1 -1
- package/template/.pi/skills/theme-token-usage/SKILL.md +1 -1
- package/template/.pi/skills/to-tickets/SKILL.md +1 -1
- package/template/.pi/skills/using-git-worktrees/SKILL.md +1 -1
- package/template/.pi/skills/wayfinder/SKILL.md +1 -1
- package/template/.pi/skills/yedit-table-usage/SKILL.md +1 -1
- package/template/.pi/skills/yss-api-integration/SKILL.md +1 -1
- package/template/.pi/skills/yss-audit-log/SKILL.md +1 -1
- package/template/.pi/skills/yss-cache/SKILL.md +1 -1
- package/template/.pi/skills/yss-ddd-scaffold-generator/SKILL.md +15 -2
- package/template/.pi/skills/yss-ddd-scaffold-generator/assets/templates/pom/application-pom.xml.template +1 -1
- package/template/.pi/skills/yss-ddd-scaffold-generator/assets/templates/pom/parent-pom.xml.template +15 -10
- package/template/.pi/skills/yss-ddd-scaffold-generator/assets/templates/pom/web-pom.xml.template +3 -3
- package/template/.pi/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-parent/SKILL.md +3 -3
- package/template/.pi/skills/yss-ddd-scaffold-generator/scripts/first-slice-compatibility.test.mjs +5 -1
- package/template/.pi/skills/yss-ddd-scaffold-generator/scripts/first-slice-verification.test.mjs +5 -2
- package/template/.pi/skills/yss-ddd-scaffold-generator/scripts/generate_scaffold.mjs +13 -10
- package/template/.pi/skills/yss-ddd-scaffold-generator/scripts/run_first_slice_verification.mjs +2 -1
- package/template/.pi/skills/yss-ddd-scaffold-generator/scripts/run_scaffold_verification.mjs +35 -3
- package/template/.pi/skills/yss-ddd-scaffold-generator/scripts/scaffold-generator.test.mjs +1 -1
- package/template/.pi/skills/yss-distributed-id/SKILL.md +1 -1
- package/template/.pi/skills/yss-dto/SKILL.md +5 -1
- package/template/.pi/skills/yss-excel-mvc/SKILL.md +1 -1
- package/template/.pi/skills/yss-exception/SKILL.md +5 -1
- package/template/.pi/skills/yss-formily-schema-generator/SKILL.md +1 -1
- package/template/.pi/skills/yss-implementation-contract-compiler/SKILL.md +13 -5
- package/template/.pi/skills/yss-implementation-contract-compiler/agents/openai.yaml +1 -1
- package/template/.pi/skills/yss-implementation-contract-compiler/references/compiler-contract.yaml +16 -0
- package/template/.pi/skills/yss-implementation-contract-compiler/references/slice-implementation-contract-v2.md +214 -0
- package/template/.pi/skills/yss-implementation-contract-compiler/references/slice-implementation-contract.md +66 -204
- package/template/.pi/skills/yss-layered-mvc-scaffold-generator/SKILL.md +15 -2
- package/template/.pi/skills/yss-layered-mvc-scaffold-generator/scripts/generate_scaffold.mjs +28 -19
- package/template/.pi/skills/yss-layered-mvc-scaffold-generator/scripts/scaffold-generator.test.mjs +10 -10
- package/template/.pi/skills/yss-mybatis/SKILL.md +4 -0
- package/template/.pi/skills/yss-openapi-draft-review/SKILL.md +1 -1
- package/template/.pi/skills/yss-openapi-governance/SKILL.md +1 -1
- package/template/.pi/skills/yss-product-lifecycle/SKILL.md +4 -4
- package/template/.pi/skills/yss-product-lifecycle/references/orchestration-contract.yaml +7 -2
- package/template/.pi/skills/yss-product-lifecycle/references/orchestration.md +4 -0
- package/template/.pi/skills/yss-product-lifecycle/references/state-model.md +2 -0
- package/template/.pi/skills/yss-product-lifecycle/references/user-decisions.md +23 -3
- package/template/.pi/skills/yss-prototype-stage/SKILL.md +1 -1
- package/template/.pi/skills/yss-repository/SKILL.md +4 -0
- package/template/.pi/skills/yss-research/SKILL.md +1 -1
- package/template/.pi/skills/yss-resilience4j/SKILL.md +1 -1
- package/template/.pi/skills/yss-security-algorithm/SKILL.md +1 -1
- package/template/.pi/skills/yss-tactical-design/SKILL.md +4 -0
- package/template/.pi/skills/yss-technical-design/SKILL.md +4 -0
- package/template/.pi/skills/yss-technical-design/scripts/validate-technical-design.mjs +2 -2
- package/template/.pi/skills/yss-ui/SKILL.md +1 -1
- package/template/.pi/skills/yss-ui-business-page-generation/SKILL.md +1 -1
- package/template/.pi/skills/yss-up-springboot3/SKILL.md +1 -1
- package/template/.pi/skills/yss-use-table-height/SKILL.md +1 -1
- package/template/.pi/skills/yss-use-tree-height/SKILL.md +1 -1
- package/template/.pi/skills/yss-userinfo/SKILL.md +1 -1
- package/template/.pi/skills/yss-validation/SKILL.md +5 -1
- package/template/.pi/skills/yss-web-controller/SKILL.md +5 -1
- package/template/.pi/skills/yss-web-controller/scripts/generate_controller.mjs +5 -2
- package/template/.pi/skills/ytable-usage/SKILL.md +1 -1
- package/template/.pi/skills/ytree-usage/SKILL.md +1 -1
- package/template/AGENTS.md +1 -0
- package/template/CONTEXT.md +2 -1
- package/template/docs/agents/backend-architecture-profiles.md +1 -1
- package/template/docs/agents/digital-human-roles.yaml +25 -1
- package/template/docs/agents/issue-tracker.md +2 -0
- package/template/docs/engineering/backend-platforms.json +174 -0
- package/template/docs/engineering/backend-platforms.md +77 -0
- package/template/docs/process/MATT-POCOCK-ENGINEERING-SKILLS.md +1 -0
- package/template/docs/process/harness-process-tailoring.md +9 -1
- package/template/docs/process/lifecycle-artifact-map.md +4 -4
- package/template/docs/process/lifecycle-registry-baseline.json +1 -1
- package/template/docs/process/lifecycle-registry.yaml +4 -4
- package/template/docs/process/schemas/backend-architecture-identity.schema.json +91 -0
- package/template/docs/process/schemas/digital-human-task-package.schema.json +2 -1
- package/template/docs/process/schemas/lifecycle-checkpoint.schema.json +4 -0
- package/template/docs/process/schemas/project-scaffold-contract.schema.json +602 -83
- package/template/docs/process/schemas/scaffold-architecture-decisions.schema.json +323 -39
- package/template/docs/process/schemas/slice-implementation-contract-v3.schema.json +925 -0
- package/template/docs/templates/approval-record-template.yaml +2 -0
- package/template/docs/templates/vertical-slice-ticket-template.md +22 -31
- package/template/scripts/backend-platforms +14 -0
- package/template/scripts/lib/approval-record.mjs +32 -6
- package/template/scripts/lib/approved-execution-context.mjs +31 -8
- package/template/scripts/lib/backend-architecture.mjs +6 -0
- package/template/scripts/lib/backend-platform-provenance.mjs +67 -0
- package/template/scripts/lib/backend-platform-verification.mjs +210 -0
- package/template/scripts/lib/backend-platform.mjs +175 -0
- package/template/scripts/lib/backend-scaffold-prerequisites.mjs +1 -1
- package/template/scripts/lib/decision-continuation.mjs +79 -0
- package/template/scripts/lib/delivery-preflight.mjs +6 -5
- package/template/scripts/lib/digital-human-roles.mjs +10 -0
- package/template/scripts/lib/frontend-delivery-boundary.mjs +3 -0
- package/template/scripts/lib/implementation-contract-compiler.mjs +42 -9
- package/template/scripts/lib/lifecycle-controls.mjs +2 -2
- package/template/scripts/lib/lifecycle-transition.mjs +3 -1
- package/template/scripts/lib/plan-spec-entry.mjs +3 -3
- package/template/scripts/lib/scaffold-local-database.mjs +1 -0
- package/template/scripts/lib/slice-applicability.mjs +10 -0
- package/template/scripts/lib/slice-contract-preparation.mjs +257 -0
- package/template/scripts/lib/slice-contract-views.mjs +52 -0
- package/template/scripts/lib/slice-contract.mjs +211 -0
- package/template/scripts/lib/slice-repositories.mjs +49 -0
- package/template/scripts/lib/slice-task-package.mjs +66 -0
- package/template/scripts/lib/strategic-handoff.mjs +12 -1
- package/template/scripts/lib/task-package.mjs +6 -2
- package/template/scripts/lib/technical-design-boundary.mjs +1 -0
- package/template/scripts/lib/user-decision-reuse.mjs +1 -0
- package/template/scripts/lib/user-decision.mjs +4 -1
- package/template/scripts/preflight-delivery +2 -2
- package/template/scripts/slice-contract +30 -0
- package/template/scripts/verify-backend-platform-matrix +69 -0
- package/template/scripts/verify-scaffold-architecture-decisions +5 -0
- package/template/scripts/verify-user-decision +7 -2
- package/template/skills-lock.json +60 -55
- package/template.snapshot.json +3 -3
|
@@ -11,13 +11,14 @@ Create skills that add useful, non-obvious guidance without constraining unrelat
|
|
|
11
11
|
|
|
12
12
|
1. Inspect the skill's callers, ownership, projections, and validation policy before editing. Preserve user intent, authorization boundaries, supported runtimes, and existing metadata unless the requested change requires otherwise.
|
|
13
13
|
2. Assume the Agent already has general reasoning and tool competence. Record only domain knowledge, decision criteria, fragile invariants, or repeatable operations that materially improve outcomes. Do not turn one example or past failure into a universal rule.
|
|
14
|
-
3. Keep discovery precise: use a lowercase hyphenated name and a concise description
|
|
14
|
+
3. Keep discovery precise: use a lowercase hyphenated name and a concise description with the distinguishing task and trigger first. Avoid broad keyword lists that attract unrelated requests. For discovery or prompt redesign, use [authoring guidance](references/authoring.md).
|
|
15
15
|
4. Keep `SKILL.md` as short as the task permits. Put conditional detail in `references/`, deterministic repeated operations in `scripts/`, and files intended for generated output in `assets/`. Create only resources with a concrete use.
|
|
16
16
|
5. Match specificity and validation to risk. Prefer outcome and decision criteria when several approaches are valid; use fixed steps or absolute rules only for correctness, safety, permissions, or genuinely fragile workflows.
|
|
17
17
|
6. Follow the repository's declared maintenance and review policy. If none exists, run structural validation plus focused checks of the behavior or invariant changed. Use independent forward testing only when complexity or risk makes it meaningful; do not require a failing baseline for every ordinary edit.
|
|
18
18
|
7. After changes, validate frontmatter, naming, references, scripts, projections, locks, and affected callers. Retire obsolete names and resources unless the repository explicitly requires compatibility.
|
|
19
19
|
8. When a repository declares staged template verification, default the implementation loop to its fast impact profile and stop at `implementation-ready`. Promote explicitly to `review-ready`; do not create frozen candidates, review packages, or release evidence during ordinary iteration. Unknown paths and changes to the verification framework itself must fail safe to the full profile.
|
|
20
20
|
9. For template maintenance, let the repository intensity policy determine verification evidence. Independent review is opt-in, never implied by an intensity level; record maintainer self-check and the required fresh verification without creating a frozen candidate during ordinary iteration. Before release, run the repository's full `scripts/verify-template` gate once; historical formal-review records remain read-only compatible.
|
|
21
|
+
10. Carry the authorized change through affected callers, projections and focused verification. A first edit is not completion. Reuse the user's existing authorization for routine local corrections; stop at a real missing input, authority boundary, or the requested deliverable. New user constraints steer the remaining work without discarding completed work.
|
|
21
22
|
|
|
22
23
|
## Boundaries
|
|
23
24
|
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# Skill authoring and discovery
|
|
2
|
+
|
|
3
|
+
Use this reference when changing a skill's trigger, prompt structure or runtime metadata. These are authoring criteria, not a replacement for the host repository's approval or verification policy.
|
|
4
|
+
|
|
5
|
+
## Discovery
|
|
6
|
+
|
|
7
|
+
- Front-load the distinctive capability and triggering task. Put implementation inventories, output formats and background in the body. Avoid universal triggers such as every code edit or every database mention.
|
|
8
|
+
- Keep a working narrow description unchanged when shortening would lose its boundary. There is no universal character or line limit in this guidance.
|
|
9
|
+
- For explicitly invoked compatibility entries, preserve existing invocation metadata and include `policy.allow_implicit_invocation: false` in `agents/openai.yaml` for Codex. Keep any existing interface and dependency metadata. This policy controls implicit selection, not authorization to perform external actions.
|
|
10
|
+
- Keep source, projection and compatibility entry identities distinct. Do not delete generated runtime roots just because the current client also discovers the canonical root.
|
|
11
|
+
|
|
12
|
+
## Instructions
|
|
13
|
+
|
|
14
|
+
- State the necessary inputs, result, fragile invariants and completion evidence. Let the agent choose routine steps within the authorized scope.
|
|
15
|
+
- Put conditional examples and detailed variants in named reference sections; explain when to read each. Keep essential permission and correctness constraints visible in the entry.
|
|
16
|
+
- Reference the owning repository rule rather than repeating a second policy. Remove unavailable tool names and unregistered skill dependencies; describe the capability and fallback instead.
|
|
17
|
+
- Preserve support for other models and runtimes. Do not encode a model name, reasoning effort or assumed tool availability into shared workflow rules unless the task is specifically a runtime configuration change.
|
|
18
|
+
|
|
19
|
+
## Evaluate the change
|
|
20
|
+
|
|
21
|
+
Use realistic prompts covering a direct request, a paraphrase, a neighboring task that should not trigger, an explicit compatibility request and any permission boundary affected. Review whether the description selects the right entry and whether required references are reachable. Keep structural checks separate from observed model behavior: a metadata or keyword check is not an end-to-end model evaluation.
|
|
22
|
+
|
|
23
|
+
Run the checks warranted by the change and the repository policy. After success, repeat only when a new edit, failure or unresolved concern requires it. Do not replace required suites with a smaller check or infer release readiness from reduced prompt length.
|
|
24
|
+
|
|
25
|
+
## Sources
|
|
26
|
+
|
|
27
|
+
Authoring guidance reviewed on 2026-09-16: [OpenAI's Astra Skills guidance](https://developers.openai.com/blog/rethinking-skills-and-prompts-for-gpt-6-astra) and [Codex Skills documentation](https://developers.openai.com/codex/skills). These support concise discovery and conditional loading; repository-specific gates remain local decisions.
|
|
@@ -1,22 +1,9 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: mapstruct
|
|
3
|
-
description:
|
|
4
|
-
MapStruct Java mapping framework. Covers basic mappers, update mappings,
|
|
5
|
-
nested objects, collections, custom methods, and Lombok integration.
|
|
6
|
-
Based on castellino and gestionale-presenze production patterns.
|
|
7
|
-
|
|
8
|
-
USE WHEN: user mentions "mapstruct", "@Mapper", "@Mapping", asks about
|
|
9
|
-
"DTO mapping", "entity conversion", "@MappingTarget", "nested mapping"
|
|
10
|
-
|
|
11
|
-
DO NOT USE FOR: Java language - use `java` skill instead
|
|
12
|
-
DO NOT USE FOR: Lombok - use `lombok` skill instead
|
|
13
|
-
DO NOT USE FOR: JPA entities - use JPA-specific skills
|
|
14
|
-
allowed-tools: Read, Grep, Glob, Write, Edit
|
|
3
|
+
description: "实现或排查 MapStruct DTO、PO、Domain 映射及 Lombok 集成;核验字段完整性与更新语义。"
|
|
15
4
|
---
|
|
16
5
|
# MapStruct Object Mapping
|
|
17
6
|
|
|
18
|
-
> **Deep Knowledge**: Use `mcp__documentation__fetch_docs` with technology: `mapstruct` for comprehensive documentation.
|
|
19
|
-
|
|
20
7
|
## YSS 阶段 7 执行结果
|
|
21
8
|
|
|
22
9
|
- Java、依赖与处理器版本来自工程基线,不从下面通用示例推断。三个新后端 Profile 为 Java 8;MVC 的 wire/internal 转换在 server,core/service 不依赖 client,Repository 不依赖上层 DTO。采用 Spring Bean 和构造器注入,显式映射或忽略字段;禁止通过全局 IGNORE 掩盖合同字段遗漏。
|
|
@@ -24,312 +11,18 @@ allowed-tools: Read, Grep, Glob, Write, Edit
|
|
|
24
11
|
- 受控生成必须记录 source/target、忽略字段、更新语义、Lombok processor 配置和 mapper 行为测试。
|
|
25
12
|
- 按 `yss-implementation-contract-compiler` 的统一 Execution Result 返回生成/源文件、测试和实际验证;未映射字段、反射/BeanUtils 退化或越界路径返回 `violation`。
|
|
26
13
|
|
|
27
|
-
##
|
|
28
|
-
|
|
29
|
-
```java
|
|
30
|
-
@Mapper(componentModel = "spring", unmappedTargetPolicy = ReportingPolicy.IGNORE)
|
|
31
|
-
public interface UserMapper {
|
|
32
|
-
|
|
33
|
-
UserResponse toResponse(User user);
|
|
34
|
-
|
|
35
|
-
List<UserResponse> toResponseList(List<User> users);
|
|
36
|
-
|
|
37
|
-
@Mapping(target = "id", ignore = true)
|
|
38
|
-
@Mapping(target = "createdAt", ignore = true)
|
|
39
|
-
@Mapping(target = "updatedAt", ignore = true)
|
|
40
|
-
@Mapping(target = "password", ignore = true)
|
|
41
|
-
User toEntity(CreateUserRequest dto);
|
|
42
|
-
}
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
## Update Mapping
|
|
46
|
-
|
|
47
|
-
```java
|
|
48
|
-
@Mapper(componentModel = "spring", unmappedTargetPolicy = ReportingPolicy.IGNORE)
|
|
49
|
-
public interface UserMapper {
|
|
50
|
-
|
|
51
|
-
// Partial update - ignores null values
|
|
52
|
-
@BeanMapping(nullValuePropertyMappingStrategy = NullValuePropertyMappingStrategy.IGNORE)
|
|
53
|
-
void updateEntity(UpdateUserRequest dto, @MappingTarget User user);
|
|
54
|
-
|
|
55
|
-
// Full update - sets all fields including nulls
|
|
56
|
-
void updateEntityFull(UpdateUserRequest dto, @MappingTarget User user);
|
|
57
|
-
}
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
## Field Mapping
|
|
61
|
-
|
|
62
|
-
```java
|
|
63
|
-
@Mapper(componentModel = "spring")
|
|
64
|
-
public interface OrderMapper {
|
|
65
|
-
|
|
66
|
-
// Different field names
|
|
67
|
-
@Mapping(source = "customer.name", target = "customerName")
|
|
68
|
-
@Mapping(source = "customer.email", target = "customerEmail")
|
|
69
|
-
@Mapping(source = "items", target = "orderItems")
|
|
70
|
-
OrderResponse toResponse(Order order);
|
|
71
|
-
|
|
72
|
-
// Constant values
|
|
73
|
-
@Mapping(target = "status", constant = "PENDING")
|
|
74
|
-
@Mapping(target = "createdAt", expression = "java(java.time.LocalDateTime.now())")
|
|
75
|
-
Order toEntity(CreateOrderRequest dto);
|
|
76
|
-
|
|
77
|
-
// Expression
|
|
78
|
-
@Mapping(target = "fullName", expression = "java(user.getFirstName() + \" \" + user.getLastName())")
|
|
79
|
-
UserResponse toResponse(User user);
|
|
80
|
-
|
|
81
|
-
// Date formatting
|
|
82
|
-
@Mapping(source = "createdAt", target = "createdDate", dateFormat = "yyyy-MM-dd")
|
|
83
|
-
OrderResponse toResponse(Order order);
|
|
84
|
-
}
|
|
85
|
-
```
|
|
86
|
-
|
|
87
|
-
## Nested Objects
|
|
88
|
-
|
|
89
|
-
```java
|
|
90
|
-
@Mapper(componentModel = "spring", uses = {AddressMapper.class, ItemMapper.class})
|
|
91
|
-
public interface OrderMapper {
|
|
92
|
-
|
|
93
|
-
// Uses AddressMapper for address field
|
|
94
|
-
// Uses ItemMapper for items collection
|
|
95
|
-
OrderResponse toResponse(Order order);
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
@Mapper(componentModel = "spring")
|
|
99
|
-
public interface AddressMapper {
|
|
100
|
-
AddressResponse toResponse(Address address);
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
@Mapper(componentModel = "spring")
|
|
104
|
-
public interface ItemMapper {
|
|
105
|
-
ItemResponse toResponse(Item item);
|
|
106
|
-
}
|
|
107
|
-
```
|
|
108
|
-
|
|
109
|
-
## Enum Mapping
|
|
110
|
-
|
|
111
|
-
```java
|
|
112
|
-
@Mapper(componentModel = "spring")
|
|
113
|
-
public interface StatusMapper {
|
|
114
|
-
|
|
115
|
-
@ValueMappings({
|
|
116
|
-
@ValueMapping(source = "ACTIVE", target = "ENABLED"),
|
|
117
|
-
@ValueMapping(source = "INACTIVE", target = "DISABLED"),
|
|
118
|
-
@ValueMapping(source = MappingConstants.ANY_REMAINING, target = "UNKNOWN")
|
|
119
|
-
})
|
|
120
|
-
ExternalStatus toExternalStatus(InternalStatus status);
|
|
121
|
-
}
|
|
122
|
-
```
|
|
123
|
-
|
|
124
|
-
## Custom Methods
|
|
125
|
-
|
|
126
|
-
```java
|
|
127
|
-
@Mapper(componentModel = "spring")
|
|
128
|
-
public abstract class UserMapper {
|
|
129
|
-
|
|
130
|
-
@Autowired
|
|
131
|
-
protected RoleRepository roleRepository;
|
|
132
|
-
|
|
133
|
-
public abstract UserResponse toResponse(User user);
|
|
134
|
-
|
|
135
|
-
@Mapping(target = "roles", source = "roleIds")
|
|
136
|
-
public abstract User toEntity(CreateUserRequest dto);
|
|
137
|
-
|
|
138
|
-
// Custom mapping method
|
|
139
|
-
protected Set<Role> mapRoles(Set<Long> roleIds) {
|
|
140
|
-
if (roleIds == null) return new HashSet<>();
|
|
141
|
-
return roleIds.stream()
|
|
142
|
-
.map(id -> roleRepository.findById(id)
|
|
143
|
-
.orElseThrow(() -> new ResourceNotFoundException("Role", "id", id)))
|
|
144
|
-
.collect(Collectors.toSet());
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
```
|
|
148
|
-
|
|
149
|
-
## Collection Mapping
|
|
150
|
-
|
|
151
|
-
```java
|
|
152
|
-
@Mapper(componentModel = "spring")
|
|
153
|
-
public interface ProductMapper {
|
|
14
|
+
## 按需读取
|
|
154
15
|
|
|
155
|
-
|
|
16
|
+
先确认当前任务涉及的对象与批准合同,只读取对应参考段落:
|
|
156
17
|
|
|
157
|
-
|
|
18
|
+
| 任务 | 参考 |
|
|
19
|
+
|---|---|
|
|
20
|
+
| 字段、嵌套对象或集合转换 | [Basic Mapper / Field Mapping / Collection Mapping](references/annotation-examples.md) |
|
|
21
|
+
| 局部或全量更新、null 语义 | [Update Mapping](references/annotation-examples.md#update-mapping) |
|
|
22
|
+
| 编译不生成实现或 Lombok 集成 | [Maven Configuration](references/annotation-examples.md#maven-configuration) |
|
|
158
23
|
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
// Page mapping
|
|
162
|
-
default Page<ProductResponse> toResponsePage(Page<Product> products) {
|
|
163
|
-
return products.map(this::toResponse);
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
```
|
|
167
|
-
|
|
168
|
-
## After/Before Mapping
|
|
169
|
-
|
|
170
|
-
```java
|
|
171
|
-
@Mapper(componentModel = "spring")
|
|
172
|
-
public abstract class UserMapper {
|
|
173
|
-
|
|
174
|
-
@AfterMapping
|
|
175
|
-
protected void afterMapping(@MappingTarget UserResponse response, User user) {
|
|
176
|
-
response.setDisplayName(user.getFirstName() + " " + user.getLastName().charAt(0) + ".");
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
@BeforeMapping
|
|
180
|
-
protected void beforeMapping(CreateUserRequest dto) {
|
|
181
|
-
if (dto.getEmail() != null) {
|
|
182
|
-
dto.setEmail(dto.getEmail().toLowerCase().trim());
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
```
|
|
187
|
-
|
|
188
|
-
## Conditional Mapping
|
|
189
|
-
|
|
190
|
-
```java
|
|
191
|
-
@Mapper(componentModel = "spring")
|
|
192
|
-
public abstract class UserMapper {
|
|
193
|
-
|
|
194
|
-
@Condition
|
|
195
|
-
public boolean isNotEmpty(String value) {
|
|
196
|
-
return value != null && !value.trim().isEmpty();
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
// Only maps non-empty strings
|
|
200
|
-
UserResponse toResponse(User user);
|
|
201
|
-
}
|
|
202
|
-
```
|
|
203
|
-
|
|
204
|
-
## Maven Configuration
|
|
205
|
-
|
|
206
|
-
```xml
|
|
207
|
-
<properties>
|
|
208
|
-
<mapstruct.version>1.6.2</mapstruct.version>
|
|
209
|
-
<lombok.version>1.18.30</lombok.version>
|
|
210
|
-
</properties>
|
|
211
|
-
|
|
212
|
-
<dependencies>
|
|
213
|
-
<dependency>
|
|
214
|
-
<groupId>org.mapstruct</groupId>
|
|
215
|
-
<artifactId>mapstruct</artifactId>
|
|
216
|
-
<version>${mapstruct.version}</version>
|
|
217
|
-
</dependency>
|
|
218
|
-
|
|
219
|
-
<dependency>
|
|
220
|
-
<groupId>org.projectlombok</groupId>
|
|
221
|
-
<artifactId>lombok</artifactId>
|
|
222
|
-
<version>${lombok.version}</version>
|
|
223
|
-
<optional>true</optional>
|
|
224
|
-
</dependency>
|
|
225
|
-
</dependencies>
|
|
226
|
-
|
|
227
|
-
<build>
|
|
228
|
-
<plugins>
|
|
229
|
-
<plugin>
|
|
230
|
-
<groupId>org.apache.maven.plugins</groupId>
|
|
231
|
-
<artifactId>maven-compiler-plugin</artifactId>
|
|
232
|
-
<version>3.13.0</version>
|
|
233
|
-
<configuration>
|
|
234
|
-
<source>${maven.compiler.source}</source>
|
|
235
|
-
<target>${maven.compiler.target}</target>
|
|
236
|
-
<annotationProcessorPaths>
|
|
237
|
-
<!-- Order matters: Lombok first -->
|
|
238
|
-
<path>
|
|
239
|
-
<groupId>org.projectlombok</groupId>
|
|
240
|
-
<artifactId>lombok</artifactId>
|
|
241
|
-
<version>${lombok.version}</version>
|
|
242
|
-
</path>
|
|
243
|
-
<path>
|
|
244
|
-
<groupId>org.mapstruct</groupId>
|
|
245
|
-
<artifactId>mapstruct-processor</artifactId>
|
|
246
|
-
<version>${mapstruct.version}</version>
|
|
247
|
-
</path>
|
|
248
|
-
<path>
|
|
249
|
-
<groupId>org.projectlombok</groupId>
|
|
250
|
-
<artifactId>lombok-mapstruct-binding</artifactId>
|
|
251
|
-
<version>0.2.0</version>
|
|
252
|
-
</path>
|
|
253
|
-
</annotationProcessorPaths>
|
|
254
|
-
<compilerArgs>
|
|
255
|
-
<arg>-Amapstruct.defaultComponentModel=spring</arg>
|
|
256
|
-
</compilerArgs>
|
|
257
|
-
</configuration>
|
|
258
|
-
</plugin>
|
|
259
|
-
</plugins>
|
|
260
|
-
</build>
|
|
261
|
-
```
|
|
262
|
-
|
|
263
|
-
## Key Annotations
|
|
264
|
-
|
|
265
|
-
| Annotation | Purpose |
|
|
266
|
-
|------------|---------|
|
|
267
|
-
| `@Mapper` | Define mapper interface/abstract class |
|
|
268
|
-
| `@Mapping` | Field-level mapping configuration |
|
|
269
|
-
| `@MappingTarget` | Update existing object |
|
|
270
|
-
| `@BeanMapping` | Bean-level mapping settings |
|
|
271
|
-
| `@AfterMapping` | Post-processing method |
|
|
272
|
-
| `@BeforeMapping` | Pre-processing method |
|
|
273
|
-
| `@Condition` | Conditional mapping |
|
|
274
|
-
| `@ValueMapping` | Enum value mapping |
|
|
275
|
-
|
|
276
|
-
## Best Practices
|
|
277
|
-
|
|
278
|
-
1. Use `componentModel = "spring"` for Spring injection
|
|
279
|
-
2. Use `unmappedTargetPolicy = ReportingPolicy.IGNORE` for DTOs with fewer fields
|
|
280
|
-
3. Always exclude `id`, `createdAt`, `updatedAt` when mapping from DTOs
|
|
281
|
-
4. Use `@MappingTarget` for partial updates
|
|
282
|
-
5. Order annotation processors: Lombok → MapStruct → Binding
|
|
283
|
-
6. Use abstract classes instead of interfaces for custom logic
|
|
284
|
-
7. Use `@Condition` for conditional mapping logic
|
|
285
|
-
|
|
286
|
-
---
|
|
287
|
-
|
|
288
|
-
## When NOT to Use This Skill
|
|
289
|
-
|
|
290
|
-
| Scenario | Use Instead |
|
|
291
|
-
|----------|-------------|
|
|
292
|
-
| Java language features | `java` skill |
|
|
293
|
-
| Lombok annotations | `lombok` skill |
|
|
294
|
-
| Spring configuration | `backend-spring-boot` skill |
|
|
295
|
-
| JPA entity operations | JPA-specific skills |
|
|
296
|
-
| Simple copying outside YSS contracts | Explicit manual mapping; in YSS slices follow the contract and never fall back to `BeanUtils.copyProperties` |
|
|
297
|
-
|
|
298
|
-
---
|
|
299
|
-
|
|
300
|
-
## Anti-Patterns
|
|
301
|
-
|
|
302
|
-
| Anti-Pattern | Why It's Bad | Correct Approach |
|
|
303
|
-
|--------------|--------------|------------------|
|
|
304
|
-
| Mapping entities to entities | Breaks change tracking | Map DTO to entity |
|
|
305
|
-
| Not using @MappingTarget | Inefficient updates | Use for partial updates |
|
|
306
|
-
| Complex logic in expressions | Hard to test | Use custom methods |
|
|
307
|
-
| Ignoring all unmapped | Misses fields silently | Use WARN or ERROR policy |
|
|
308
|
-
| Not excluding audit fields | Overwrites metadata | Exclude id, timestamps |
|
|
309
|
-
| Circular references | StackOverflowError | Break cycles with custom mapping |
|
|
310
|
-
| Using interfaces for custom logic | Can't inject dependencies | Use abstract classes |
|
|
311
|
-
| Not testing mappers | Runtime mapping errors | Write mapper tests |
|
|
312
|
-
|
|
313
|
-
---
|
|
314
|
-
|
|
315
|
-
## Quick Troubleshooting
|
|
316
|
-
|
|
317
|
-
| Issue | Cause | Solution |
|
|
318
|
-
|-------|-------|----------|
|
|
319
|
-
| "Cannot find implementation" | Annotation processing failed | Check processor configuration |
|
|
320
|
-
| Lombok fields not found | Wrong processor order | Lombok before MapStruct |
|
|
321
|
-
| Mapper not autowired | Wrong componentModel | Use componentModel = "spring" |
|
|
322
|
-
| Circular dependency | Mappers reference each other | Use @Lazy or refactor |
|
|
323
|
-
| UnmappedTargetProperty warning | Missing mapping | Add @Mapping or ignore policy |
|
|
324
|
-
| NullPointerException in mapping | Null source | Add null checks or NullValuePropertyMappingStrategy |
|
|
325
|
-
| Custom method not called | Wrong signature | Match method parameters exactly |
|
|
326
|
-
| Generated code not updated | IDE cache | Clean and rebuild project |
|
|
327
|
-
|
|
328
|
-
---
|
|
24
|
+
优先复用工程已有 MapperConfig。新增目标字段须显式映射或按合同忽略,不能用全局 `ReportingPolicy.IGNORE` 消除遗漏。局部更新与全量替换的 null 语义来自合同,不能从示例推断。
|
|
329
25
|
|
|
330
|
-
|
|
331
|
-
- [MapStruct Reference](https://mapstruct.org/documentation/stable/reference/html/)
|
|
332
|
-
- [Spring Integration](https://mapstruct.org/documentation/stable/reference/html/#spring)
|
|
333
|
-
- [Lombok Integration](https://mapstruct.org/faq/#can-i-use-mapstruct-together-with-project-lombok)
|
|
26
|
+
按变更验证字段覆盖、null、更新和边界值;处理器调整需实际编译。不要把所有参考示例当作必跑清单。
|
|
334
27
|
|
|
335
|
-
|
|
28
|
+
查第三方行为时使用 `yss-research`,来源为 [MapStruct 官方文档](https://mapstruct.org/documentation/stable/reference/html/);不假定某个 MCP 工具已安装。
|