create-yss-spec 3.4.1 → 3.4.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/package.json +2 -2
- package/template/.agents/skills/.strategic-design-skills-manifest.json +1 -1
- package/template/.agents/skills/archify/SKILL.md +1 -1
- package/template/.agents/skills/code-review/SKILL.md +12 -8
- package/template/.agents/skills/file-export-download/SKILL.md +1 -1
- package/template/.agents/skills/frontend-commit/SKILL.md +1 -1
- package/template/.agents/skills/java-backend-commit/SKILL.md +1 -1
- package/template/.agents/skills/llm-wiki/SKILL.md +1 -6
- package/template/.agents/skills/lombok/SKILL.md +10 -336
- package/template/.agents/skills/lombok/references/annotation-examples.md +307 -0
- package/template/.agents/skills/maintaining-skills/SKILL.md +2 -1
- package/template/.agents/skills/maintaining-skills/references/authoring.md +27 -0
- package/template/.agents/skills/mapstruct/SKILL.md +11 -318
- package/template/.agents/skills/mapstruct/references/annotation-examples.md +300 -0
- package/template/.agents/skills/page-form-module/SKILL.md +1 -1
- package/template/.agents/skills/page-skeleton/SKILL.md +1 -1
- package/template/.agents/skills/theme-token-usage/SKILL.md +1 -1
- package/template/.agents/skills/to-tickets/SKILL.md +1 -1
- package/template/.agents/skills/using-git-worktrees/SKILL.md +1 -1
- package/template/.agents/skills/wayfinder/SKILL.md +1 -1
- package/template/.agents/skills/yedit-table-usage/SKILL.md +1 -1
- package/template/.agents/skills/yss-api-integration/SKILL.md +1 -1
- package/template/.agents/skills/yss-audit-log/SKILL.md +1 -1
- package/template/.agents/skills/yss-cache/SKILL.md +1 -1
- package/template/.agents/skills/yss-ddd-scaffold-generator/SKILL.md +15 -2
- package/template/.agents/skills/yss-ddd-scaffold-generator/assets/templates/pom/application-pom.xml.template +1 -1
- package/template/.agents/skills/yss-ddd-scaffold-generator/assets/templates/pom/parent-pom.xml.template +15 -10
- package/template/.agents/skills/yss-ddd-scaffold-generator/assets/templates/pom/web-pom.xml.template +3 -3
- package/template/.agents/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-parent/SKILL.md +3 -3
- package/template/.agents/skills/yss-ddd-scaffold-generator/scripts/first-slice-compatibility.test.mjs +5 -1
- package/template/.agents/skills/yss-ddd-scaffold-generator/scripts/first-slice-verification.test.mjs +5 -2
- package/template/.agents/skills/yss-ddd-scaffold-generator/scripts/generate_scaffold.mjs +13 -10
- package/template/.agents/skills/yss-ddd-scaffold-generator/scripts/run_first_slice_verification.mjs +2 -1
- package/template/.agents/skills/yss-ddd-scaffold-generator/scripts/run_scaffold_verification.mjs +35 -3
- package/template/.agents/skills/yss-ddd-scaffold-generator/scripts/scaffold-generator.test.mjs +1 -1
- package/template/.agents/skills/yss-distributed-id/SKILL.md +1 -1
- package/template/.agents/skills/yss-dto/SKILL.md +5 -1
- package/template/.agents/skills/yss-excel-mvc/SKILL.md +1 -1
- package/template/.agents/skills/yss-exception/SKILL.md +5 -1
- package/template/.agents/skills/yss-formily-schema-generator/SKILL.md +1 -1
- package/template/.agents/skills/yss-implementation-contract-compiler/SKILL.md +13 -5
- package/template/.agents/skills/yss-implementation-contract-compiler/agents/openai.yaml +1 -1
- package/template/.agents/skills/yss-implementation-contract-compiler/references/compiler-contract.yaml +16 -0
- package/template/.agents/skills/yss-implementation-contract-compiler/references/slice-implementation-contract-v2.md +214 -0
- package/template/.agents/skills/yss-implementation-contract-compiler/references/slice-implementation-contract.md +66 -204
- package/template/.agents/skills/yss-layered-mvc-scaffold-generator/SKILL.md +15 -2
- package/template/.agents/skills/yss-layered-mvc-scaffold-generator/scripts/generate_scaffold.mjs +28 -19
- package/template/.agents/skills/yss-layered-mvc-scaffold-generator/scripts/scaffold-generator.test.mjs +10 -10
- package/template/.agents/skills/yss-mybatis/SKILL.md +4 -0
- package/template/.agents/skills/yss-openapi-draft-review/SKILL.md +1 -1
- package/template/.agents/skills/yss-openapi-governance/SKILL.md +1 -1
- package/template/.agents/skills/yss-product-lifecycle/SKILL.md +4 -4
- package/template/.agents/skills/yss-product-lifecycle/references/orchestration-contract.yaml +7 -2
- package/template/.agents/skills/yss-product-lifecycle/references/orchestration.md +4 -0
- package/template/.agents/skills/yss-product-lifecycle/references/state-model.md +2 -0
- package/template/.agents/skills/yss-product-lifecycle/references/user-decisions.md +23 -3
- package/template/.agents/skills/yss-prototype-stage/SKILL.md +1 -1
- package/template/.agents/skills/yss-repository/SKILL.md +4 -0
- package/template/.agents/skills/yss-research/SKILL.md +1 -1
- package/template/.agents/skills/yss-resilience4j/SKILL.md +1 -1
- package/template/.agents/skills/yss-security-algorithm/SKILL.md +1 -1
- package/template/.agents/skills/yss-tactical-design/SKILL.md +4 -0
- package/template/.agents/skills/yss-technical-design/SKILL.md +4 -0
- package/template/.agents/skills/yss-technical-design/scripts/validate-technical-design.mjs +2 -2
- package/template/.agents/skills/yss-ui/SKILL.md +1 -1
- package/template/.agents/skills/yss-ui-business-page-generation/SKILL.md +1 -1
- package/template/.agents/skills/yss-up-springboot3/SKILL.md +1 -1
- package/template/.agents/skills/yss-use-table-height/SKILL.md +1 -1
- package/template/.agents/skills/yss-use-tree-height/SKILL.md +1 -1
- package/template/.agents/skills/yss-userinfo/SKILL.md +1 -1
- package/template/.agents/skills/yss-validation/SKILL.md +5 -1
- package/template/.agents/skills/yss-web-controller/SKILL.md +5 -1
- package/template/.agents/skills/yss-web-controller/scripts/generate_controller.mjs +5 -2
- package/template/.agents/skills/ytable-usage/SKILL.md +1 -1
- package/template/.agents/skills/ytree-usage/SKILL.md +1 -1
- package/template/.codex/skills/archify/SKILL.md +1 -1
- package/template/.codex/skills/code-review/SKILL.md +12 -8
- package/template/.codex/skills/data-analytics/skills/analyze-data-quality/SKILL.md +1 -1
- package/template/.codex/skills/data-analytics/skills/build-dashboard/SKILL.md +1 -1
- package/template/.codex/skills/data-analytics/skills/build-report/SKILL.md +1 -1
- package/template/.codex/skills/data-analytics/skills/design-kpis/SKILL.md +1 -1
- package/template/.codex/skills/data-analytics/skills/gather-business-context/SKILL.md +1 -1
- package/template/.codex/skills/data-analytics/skills/index/SKILL.md +1 -1
- package/template/.codex/skills/data-analytics/skills/jupyter-notebooks/SKILL.md +1 -1
- package/template/.codex/skills/data-analytics/skills/kpi-reporting/SKILL.md +1 -1
- package/template/.codex/skills/data-analytics/skills/market-sizing/SKILL.md +1 -1
- package/template/.codex/skills/data-analytics/skills/metric-diagnostics/SKILL.md +1 -1
- package/template/.codex/skills/data-analytics/skills/product-business-analysis/SKILL.md +1 -1
- package/template/.codex/skills/data-analytics/skills/spreadsheets/SKILL.md +1 -1
- package/template/.codex/skills/data-analytics/skills/validate-data/SKILL.md +1 -1
- package/template/.codex/skills/data-analytics/skills/visualize-data/SKILL.md +1 -1
- package/template/.codex/skills/file-export-download/SKILL.md +1 -1
- package/template/.codex/skills/frontend-commit/SKILL.md +1 -1
- package/template/.codex/skills/java-backend-commit/SKILL.md +1 -1
- package/template/.codex/skills/llm-wiki/SKILL.md +1 -6
- package/template/.codex/skills/lombok/SKILL.md +10 -336
- package/template/.codex/skills/lombok/references/annotation-examples.md +307 -0
- package/template/.codex/skills/maintaining-skills/SKILL.md +2 -1
- package/template/.codex/skills/maintaining-skills/references/authoring.md +27 -0
- package/template/.codex/skills/mapstruct/SKILL.md +11 -318
- package/template/.codex/skills/mapstruct/references/annotation-examples.md +300 -0
- package/template/.codex/skills/page-form-module/SKILL.md +1 -1
- package/template/.codex/skills/page-skeleton/SKILL.md +1 -1
- package/template/.codex/skills/product-design/skills/audit/SKILL.md +1 -1
- package/template/.codex/skills/product-design/skills/design-qa/SKILL.md +1 -1
- package/template/.codex/skills/product-design/skills/get-context/SKILL.md +1 -1
- package/template/.codex/skills/product-design/skills/ideate/SKILL.md +1 -1
- package/template/.codex/skills/product-design/skills/image-to-code/SKILL.md +1 -1
- package/template/.codex/skills/product-design/skills/index/SKILL.md +1 -1
- package/template/.codex/skills/product-design/skills/prototype/SKILL.md +1 -1
- package/template/.codex/skills/product-design/skills/research/SKILL.md +1 -1
- package/template/.codex/skills/product-design/skills/user-context/SKILL.md +1 -1
- package/template/.codex/skills/theme-token-usage/SKILL.md +1 -1
- package/template/.codex/skills/to-tickets/SKILL.md +1 -1
- package/template/.codex/skills/using-git-worktrees/SKILL.md +1 -1
- package/template/.codex/skills/wayfinder/SKILL.md +1 -1
- package/template/.codex/skills/yedit-table-usage/SKILL.md +1 -1
- package/template/.codex/skills/yss-api-integration/SKILL.md +1 -1
- package/template/.codex/skills/yss-audit-log/SKILL.md +1 -1
- package/template/.codex/skills/yss-cache/SKILL.md +1 -1
- package/template/.codex/skills/yss-ddd-scaffold-generator/SKILL.md +15 -2
- package/template/.codex/skills/yss-ddd-scaffold-generator/assets/templates/pom/application-pom.xml.template +1 -1
- package/template/.codex/skills/yss-ddd-scaffold-generator/assets/templates/pom/parent-pom.xml.template +15 -10
- package/template/.codex/skills/yss-ddd-scaffold-generator/assets/templates/pom/web-pom.xml.template +3 -3
- package/template/.codex/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-parent/SKILL.md +3 -3
- package/template/.codex/skills/yss-ddd-scaffold-generator/scripts/first-slice-compatibility.test.mjs +5 -1
- package/template/.codex/skills/yss-ddd-scaffold-generator/scripts/first-slice-verification.test.mjs +5 -2
- package/template/.codex/skills/yss-ddd-scaffold-generator/scripts/generate_scaffold.mjs +13 -10
- package/template/.codex/skills/yss-ddd-scaffold-generator/scripts/run_first_slice_verification.mjs +2 -1
- package/template/.codex/skills/yss-ddd-scaffold-generator/scripts/run_scaffold_verification.mjs +35 -3
- package/template/.codex/skills/yss-ddd-scaffold-generator/scripts/scaffold-generator.test.mjs +1 -1
- package/template/.codex/skills/yss-distributed-id/SKILL.md +1 -1
- package/template/.codex/skills/yss-dto/SKILL.md +5 -1
- package/template/.codex/skills/yss-excel-mvc/SKILL.md +1 -1
- package/template/.codex/skills/yss-exception/SKILL.md +5 -1
- package/template/.codex/skills/yss-formily-schema-generator/SKILL.md +1 -1
- package/template/.codex/skills/yss-implementation-contract-compiler/SKILL.md +13 -5
- package/template/.codex/skills/yss-implementation-contract-compiler/agents/openai.yaml +1 -1
- package/template/.codex/skills/yss-implementation-contract-compiler/references/compiler-contract.yaml +16 -0
- package/template/.codex/skills/yss-implementation-contract-compiler/references/slice-implementation-contract-v2.md +214 -0
- package/template/.codex/skills/yss-implementation-contract-compiler/references/slice-implementation-contract.md +66 -204
- package/template/.codex/skills/yss-layered-mvc-scaffold-generator/SKILL.md +15 -2
- package/template/.codex/skills/yss-layered-mvc-scaffold-generator/scripts/generate_scaffold.mjs +28 -19
- package/template/.codex/skills/yss-layered-mvc-scaffold-generator/scripts/scaffold-generator.test.mjs +10 -10
- package/template/.codex/skills/yss-mybatis/SKILL.md +4 -0
- package/template/.codex/skills/yss-openapi-draft-review/SKILL.md +1 -1
- package/template/.codex/skills/yss-openapi-governance/SKILL.md +1 -1
- package/template/.codex/skills/yss-product-lifecycle/SKILL.md +4 -4
- package/template/.codex/skills/yss-product-lifecycle/references/orchestration-contract.yaml +7 -2
- package/template/.codex/skills/yss-product-lifecycle/references/orchestration.md +4 -0
- package/template/.codex/skills/yss-product-lifecycle/references/state-model.md +2 -0
- package/template/.codex/skills/yss-product-lifecycle/references/user-decisions.md +23 -3
- package/template/.codex/skills/yss-prototype-stage/SKILL.md +1 -1
- package/template/.codex/skills/yss-repository/SKILL.md +4 -0
- package/template/.codex/skills/yss-research/SKILL.md +1 -1
- package/template/.codex/skills/yss-resilience4j/SKILL.md +1 -1
- package/template/.codex/skills/yss-security-algorithm/SKILL.md +1 -1
- package/template/.codex/skills/yss-tactical-design/SKILL.md +4 -0
- package/template/.codex/skills/yss-technical-design/SKILL.md +4 -0
- package/template/.codex/skills/yss-technical-design/scripts/validate-technical-design.mjs +2 -2
- package/template/.codex/skills/yss-ui/SKILL.md +1 -1
- package/template/.codex/skills/yss-ui-business-page-generation/SKILL.md +1 -1
- package/template/.codex/skills/yss-up-springboot3/SKILL.md +1 -1
- package/template/.codex/skills/yss-use-table-height/SKILL.md +1 -1
- package/template/.codex/skills/yss-use-tree-height/SKILL.md +1 -1
- package/template/.codex/skills/yss-userinfo/SKILL.md +1 -1
- package/template/.codex/skills/yss-validation/SKILL.md +5 -1
- package/template/.codex/skills/yss-web-controller/SKILL.md +5 -1
- package/template/.codex/skills/yss-web-controller/scripts/generate_controller.mjs +5 -2
- package/template/.codex/skills/ytable-usage/SKILL.md +1 -1
- package/template/.codex/skills/ytree-usage/SKILL.md +1 -1
- package/template/.cursor/skills/archify/SKILL.md +1 -1
- package/template/.cursor/skills/code-review/SKILL.md +12 -8
- package/template/.cursor/skills/file-export-download/SKILL.md +1 -1
- package/template/.cursor/skills/frontend-commit/SKILL.md +1 -1
- package/template/.cursor/skills/java-backend-commit/SKILL.md +1 -1
- package/template/.cursor/skills/llm-wiki/SKILL.md +1 -6
- package/template/.cursor/skills/lombok/SKILL.md +10 -336
- package/template/.cursor/skills/lombok/references/annotation-examples.md +307 -0
- package/template/.cursor/skills/maintaining-skills/SKILL.md +2 -1
- package/template/.cursor/skills/maintaining-skills/references/authoring.md +27 -0
- package/template/.cursor/skills/mapstruct/SKILL.md +11 -318
- package/template/.cursor/skills/mapstruct/references/annotation-examples.md +300 -0
- package/template/.cursor/skills/page-form-module/SKILL.md +1 -1
- package/template/.cursor/skills/page-skeleton/SKILL.md +1 -1
- package/template/.cursor/skills/theme-token-usage/SKILL.md +1 -1
- package/template/.cursor/skills/to-tickets/SKILL.md +1 -1
- package/template/.cursor/skills/using-git-worktrees/SKILL.md +1 -1
- package/template/.cursor/skills/wayfinder/SKILL.md +1 -1
- package/template/.cursor/skills/yedit-table-usage/SKILL.md +1 -1
- package/template/.cursor/skills/yss-api-integration/SKILL.md +1 -1
- package/template/.cursor/skills/yss-audit-log/SKILL.md +1 -1
- package/template/.cursor/skills/yss-cache/SKILL.md +1 -1
- package/template/.cursor/skills/yss-ddd-scaffold-generator/SKILL.md +15 -2
- package/template/.cursor/skills/yss-ddd-scaffold-generator/assets/templates/pom/application-pom.xml.template +1 -1
- package/template/.cursor/skills/yss-ddd-scaffold-generator/assets/templates/pom/parent-pom.xml.template +15 -10
- package/template/.cursor/skills/yss-ddd-scaffold-generator/assets/templates/pom/web-pom.xml.template +3 -3
- package/template/.cursor/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-parent/SKILL.md +3 -3
- package/template/.cursor/skills/yss-ddd-scaffold-generator/scripts/first-slice-compatibility.test.mjs +5 -1
- package/template/.cursor/skills/yss-ddd-scaffold-generator/scripts/first-slice-verification.test.mjs +5 -2
- package/template/.cursor/skills/yss-ddd-scaffold-generator/scripts/generate_scaffold.mjs +13 -10
- package/template/.cursor/skills/yss-ddd-scaffold-generator/scripts/run_first_slice_verification.mjs +2 -1
- package/template/.cursor/skills/yss-ddd-scaffold-generator/scripts/run_scaffold_verification.mjs +35 -3
- package/template/.cursor/skills/yss-ddd-scaffold-generator/scripts/scaffold-generator.test.mjs +1 -1
- package/template/.cursor/skills/yss-distributed-id/SKILL.md +1 -1
- package/template/.cursor/skills/yss-dto/SKILL.md +5 -1
- package/template/.cursor/skills/yss-excel-mvc/SKILL.md +1 -1
- package/template/.cursor/skills/yss-exception/SKILL.md +5 -1
- package/template/.cursor/skills/yss-formily-schema-generator/SKILL.md +1 -1
- package/template/.cursor/skills/yss-implementation-contract-compiler/SKILL.md +13 -5
- package/template/.cursor/skills/yss-implementation-contract-compiler/agents/openai.yaml +1 -1
- package/template/.cursor/skills/yss-implementation-contract-compiler/references/compiler-contract.yaml +16 -0
- package/template/.cursor/skills/yss-implementation-contract-compiler/references/slice-implementation-contract-v2.md +214 -0
- package/template/.cursor/skills/yss-implementation-contract-compiler/references/slice-implementation-contract.md +66 -204
- package/template/.cursor/skills/yss-layered-mvc-scaffold-generator/SKILL.md +15 -2
- package/template/.cursor/skills/yss-layered-mvc-scaffold-generator/scripts/generate_scaffold.mjs +28 -19
- package/template/.cursor/skills/yss-layered-mvc-scaffold-generator/scripts/scaffold-generator.test.mjs +10 -10
- package/template/.cursor/skills/yss-mybatis/SKILL.md +4 -0
- package/template/.cursor/skills/yss-openapi-draft-review/SKILL.md +1 -1
- package/template/.cursor/skills/yss-openapi-governance/SKILL.md +1 -1
- package/template/.cursor/skills/yss-product-lifecycle/SKILL.md +4 -4
- package/template/.cursor/skills/yss-product-lifecycle/references/orchestration-contract.yaml +7 -2
- package/template/.cursor/skills/yss-product-lifecycle/references/orchestration.md +4 -0
- package/template/.cursor/skills/yss-product-lifecycle/references/state-model.md +2 -0
- package/template/.cursor/skills/yss-product-lifecycle/references/user-decisions.md +23 -3
- package/template/.cursor/skills/yss-prototype-stage/SKILL.md +1 -1
- package/template/.cursor/skills/yss-repository/SKILL.md +4 -0
- package/template/.cursor/skills/yss-research/SKILL.md +1 -1
- package/template/.cursor/skills/yss-resilience4j/SKILL.md +1 -1
- package/template/.cursor/skills/yss-security-algorithm/SKILL.md +1 -1
- package/template/.cursor/skills/yss-tactical-design/SKILL.md +4 -0
- package/template/.cursor/skills/yss-technical-design/SKILL.md +4 -0
- package/template/.cursor/skills/yss-technical-design/scripts/validate-technical-design.mjs +2 -2
- package/template/.cursor/skills/yss-ui/SKILL.md +1 -1
- package/template/.cursor/skills/yss-ui-business-page-generation/SKILL.md +1 -1
- package/template/.cursor/skills/yss-up-springboot3/SKILL.md +1 -1
- package/template/.cursor/skills/yss-use-table-height/SKILL.md +1 -1
- package/template/.cursor/skills/yss-use-tree-height/SKILL.md +1 -1
- package/template/.cursor/skills/yss-userinfo/SKILL.md +1 -1
- package/template/.cursor/skills/yss-validation/SKILL.md +5 -1
- package/template/.cursor/skills/yss-web-controller/SKILL.md +5 -1
- package/template/.cursor/skills/yss-web-controller/scripts/generate_controller.mjs +5 -2
- package/template/.cursor/skills/ytable-usage/SKILL.md +1 -1
- package/template/.cursor/skills/ytree-usage/SKILL.md +1 -1
- package/template/.pi/skills/archify/SKILL.md +1 -1
- package/template/.pi/skills/code-review/SKILL.md +12 -8
- package/template/.pi/skills/file-export-download/SKILL.md +1 -1
- package/template/.pi/skills/frontend-commit/SKILL.md +1 -1
- package/template/.pi/skills/java-backend-commit/SKILL.md +1 -1
- package/template/.pi/skills/llm-wiki/SKILL.md +1 -6
- package/template/.pi/skills/lombok/SKILL.md +10 -336
- package/template/.pi/skills/lombok/references/annotation-examples.md +307 -0
- package/template/.pi/skills/maintaining-skills/SKILL.md +2 -1
- package/template/.pi/skills/maintaining-skills/references/authoring.md +27 -0
- package/template/.pi/skills/mapstruct/SKILL.md +11 -318
- package/template/.pi/skills/mapstruct/references/annotation-examples.md +300 -0
- package/template/.pi/skills/page-form-module/SKILL.md +1 -1
- package/template/.pi/skills/page-skeleton/SKILL.md +1 -1
- package/template/.pi/skills/theme-token-usage/SKILL.md +1 -1
- package/template/.pi/skills/to-tickets/SKILL.md +1 -1
- package/template/.pi/skills/using-git-worktrees/SKILL.md +1 -1
- package/template/.pi/skills/wayfinder/SKILL.md +1 -1
- package/template/.pi/skills/yedit-table-usage/SKILL.md +1 -1
- package/template/.pi/skills/yss-api-integration/SKILL.md +1 -1
- package/template/.pi/skills/yss-audit-log/SKILL.md +1 -1
- package/template/.pi/skills/yss-cache/SKILL.md +1 -1
- package/template/.pi/skills/yss-ddd-scaffold-generator/SKILL.md +15 -2
- package/template/.pi/skills/yss-ddd-scaffold-generator/assets/templates/pom/application-pom.xml.template +1 -1
- package/template/.pi/skills/yss-ddd-scaffold-generator/assets/templates/pom/parent-pom.xml.template +15 -10
- package/template/.pi/skills/yss-ddd-scaffold-generator/assets/templates/pom/web-pom.xml.template +3 -3
- package/template/.pi/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-parent/SKILL.md +3 -3
- package/template/.pi/skills/yss-ddd-scaffold-generator/scripts/first-slice-compatibility.test.mjs +5 -1
- package/template/.pi/skills/yss-ddd-scaffold-generator/scripts/first-slice-verification.test.mjs +5 -2
- package/template/.pi/skills/yss-ddd-scaffold-generator/scripts/generate_scaffold.mjs +13 -10
- package/template/.pi/skills/yss-ddd-scaffold-generator/scripts/run_first_slice_verification.mjs +2 -1
- package/template/.pi/skills/yss-ddd-scaffold-generator/scripts/run_scaffold_verification.mjs +35 -3
- package/template/.pi/skills/yss-ddd-scaffold-generator/scripts/scaffold-generator.test.mjs +1 -1
- package/template/.pi/skills/yss-distributed-id/SKILL.md +1 -1
- package/template/.pi/skills/yss-dto/SKILL.md +5 -1
- package/template/.pi/skills/yss-excel-mvc/SKILL.md +1 -1
- package/template/.pi/skills/yss-exception/SKILL.md +5 -1
- package/template/.pi/skills/yss-formily-schema-generator/SKILL.md +1 -1
- package/template/.pi/skills/yss-implementation-contract-compiler/SKILL.md +13 -5
- package/template/.pi/skills/yss-implementation-contract-compiler/agents/openai.yaml +1 -1
- package/template/.pi/skills/yss-implementation-contract-compiler/references/compiler-contract.yaml +16 -0
- package/template/.pi/skills/yss-implementation-contract-compiler/references/slice-implementation-contract-v2.md +214 -0
- package/template/.pi/skills/yss-implementation-contract-compiler/references/slice-implementation-contract.md +66 -204
- package/template/.pi/skills/yss-layered-mvc-scaffold-generator/SKILL.md +15 -2
- package/template/.pi/skills/yss-layered-mvc-scaffold-generator/scripts/generate_scaffold.mjs +28 -19
- package/template/.pi/skills/yss-layered-mvc-scaffold-generator/scripts/scaffold-generator.test.mjs +10 -10
- package/template/.pi/skills/yss-mybatis/SKILL.md +4 -0
- package/template/.pi/skills/yss-openapi-draft-review/SKILL.md +1 -1
- package/template/.pi/skills/yss-openapi-governance/SKILL.md +1 -1
- package/template/.pi/skills/yss-product-lifecycle/SKILL.md +4 -4
- package/template/.pi/skills/yss-product-lifecycle/references/orchestration-contract.yaml +7 -2
- package/template/.pi/skills/yss-product-lifecycle/references/orchestration.md +4 -0
- package/template/.pi/skills/yss-product-lifecycle/references/state-model.md +2 -0
- package/template/.pi/skills/yss-product-lifecycle/references/user-decisions.md +23 -3
- package/template/.pi/skills/yss-prototype-stage/SKILL.md +1 -1
- package/template/.pi/skills/yss-repository/SKILL.md +4 -0
- package/template/.pi/skills/yss-research/SKILL.md +1 -1
- package/template/.pi/skills/yss-resilience4j/SKILL.md +1 -1
- package/template/.pi/skills/yss-security-algorithm/SKILL.md +1 -1
- package/template/.pi/skills/yss-tactical-design/SKILL.md +4 -0
- package/template/.pi/skills/yss-technical-design/SKILL.md +4 -0
- package/template/.pi/skills/yss-technical-design/scripts/validate-technical-design.mjs +2 -2
- package/template/.pi/skills/yss-ui/SKILL.md +1 -1
- package/template/.pi/skills/yss-ui-business-page-generation/SKILL.md +1 -1
- package/template/.pi/skills/yss-up-springboot3/SKILL.md +1 -1
- package/template/.pi/skills/yss-use-table-height/SKILL.md +1 -1
- package/template/.pi/skills/yss-use-tree-height/SKILL.md +1 -1
- package/template/.pi/skills/yss-userinfo/SKILL.md +1 -1
- package/template/.pi/skills/yss-validation/SKILL.md +5 -1
- package/template/.pi/skills/yss-web-controller/SKILL.md +5 -1
- package/template/.pi/skills/yss-web-controller/scripts/generate_controller.mjs +5 -2
- package/template/.pi/skills/ytable-usage/SKILL.md +1 -1
- package/template/.pi/skills/ytree-usage/SKILL.md +1 -1
- package/template/AGENTS.md +1 -0
- package/template/CONTEXT.md +2 -1
- package/template/docs/agents/backend-architecture-profiles.md +1 -1
- package/template/docs/agents/digital-human-roles.yaml +25 -1
- package/template/docs/agents/issue-tracker.md +2 -0
- package/template/docs/engineering/backend-platforms.json +174 -0
- package/template/docs/engineering/backend-platforms.md +77 -0
- package/template/docs/process/MATT-POCOCK-ENGINEERING-SKILLS.md +1 -0
- package/template/docs/process/harness-process-tailoring.md +9 -1
- package/template/docs/process/lifecycle-artifact-map.md +4 -4
- package/template/docs/process/lifecycle-registry-baseline.json +1 -1
- package/template/docs/process/lifecycle-registry.yaml +4 -4
- package/template/docs/process/schemas/backend-architecture-identity.schema.json +91 -0
- package/template/docs/process/schemas/digital-human-task-package.schema.json +2 -1
- package/template/docs/process/schemas/lifecycle-checkpoint.schema.json +4 -0
- package/template/docs/process/schemas/project-scaffold-contract.schema.json +602 -83
- package/template/docs/process/schemas/scaffold-architecture-decisions.schema.json +323 -39
- package/template/docs/process/schemas/slice-implementation-contract-v3.schema.json +925 -0
- package/template/docs/templates/approval-record-template.yaml +2 -0
- package/template/docs/templates/vertical-slice-ticket-template.md +22 -31
- package/template/scripts/backend-platforms +14 -0
- package/template/scripts/lib/approval-record.mjs +32 -6
- package/template/scripts/lib/approved-execution-context.mjs +31 -8
- package/template/scripts/lib/backend-architecture.mjs +6 -0
- package/template/scripts/lib/backend-platform-provenance.mjs +67 -0
- package/template/scripts/lib/backend-platform-verification.mjs +210 -0
- package/template/scripts/lib/backend-platform.mjs +175 -0
- package/template/scripts/lib/backend-scaffold-prerequisites.mjs +1 -1
- package/template/scripts/lib/decision-continuation.mjs +79 -0
- package/template/scripts/lib/delivery-preflight.mjs +6 -5
- package/template/scripts/lib/digital-human-roles.mjs +10 -0
- package/template/scripts/lib/frontend-delivery-boundary.mjs +3 -0
- package/template/scripts/lib/implementation-contract-compiler.mjs +42 -9
- package/template/scripts/lib/lifecycle-controls.mjs +2 -2
- package/template/scripts/lib/lifecycle-transition.mjs +3 -1
- package/template/scripts/lib/plan-spec-entry.mjs +3 -3
- package/template/scripts/lib/scaffold-local-database.mjs +1 -0
- package/template/scripts/lib/slice-applicability.mjs +10 -0
- package/template/scripts/lib/slice-contract-preparation.mjs +257 -0
- package/template/scripts/lib/slice-contract-views.mjs +52 -0
- package/template/scripts/lib/slice-contract.mjs +211 -0
- package/template/scripts/lib/slice-repositories.mjs +49 -0
- package/template/scripts/lib/slice-task-package.mjs +66 -0
- package/template/scripts/lib/strategic-handoff.mjs +12 -1
- package/template/scripts/lib/task-package.mjs +6 -2
- package/template/scripts/lib/technical-design-boundary.mjs +1 -0
- package/template/scripts/lib/user-decision-reuse.mjs +1 -0
- package/template/scripts/lib/user-decision.mjs +4 -1
- package/template/scripts/preflight-delivery +2 -2
- package/template/scripts/slice-contract +30 -0
- package/template/scripts/verify-backend-platform-matrix +69 -0
- package/template/scripts/verify-scaffold-architecture-decisions +5 -0
- package/template/scripts/verify-user-decision +7 -2
- package/template/skills-lock.json +60 -55
- package/template.snapshot.json +3 -3
|
@@ -1,22 +1,9 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: lombok
|
|
3
|
-
description:
|
|
4
|
-
Project Lombok for reducing Java boilerplate. Covers annotations for getters,
|
|
5
|
-
setters, constructors, builders, logging, and more. Based on production
|
|
6
|
-
patterns from castellino and gestionale-presenze projects.
|
|
7
|
-
|
|
8
|
-
USE WHEN: user mentions "lombok", "@Data", "@Builder", "@Slf4j", asks about
|
|
9
|
-
"boilerplate reduction", "getters/setters", "@RequiredArgsConstructor", "@Value"
|
|
10
|
-
|
|
11
|
-
DO NOT USE FOR: Java language features - use `java` skill instead
|
|
12
|
-
DO NOT USE FOR: MapStruct integration - use `mapstruct` skill
|
|
13
|
-
DO NOT USE FOR: Spring annotations - use `backend-spring-boot` skill
|
|
14
|
-
allowed-tools: Read, Grep, Glob, Write, Edit
|
|
3
|
+
description: "配置或排查 Lombok 注解、构造器、Builder 和注解处理器;按对象身份与敏感字段选择生成范围。"
|
|
15
4
|
---
|
|
16
5
|
# Project Lombok
|
|
17
6
|
|
|
18
|
-
> **Deep Knowledge**: Use `mcp__documentation__fetch_docs` with technology: `lombok` for comprehensive documentation.
|
|
19
|
-
|
|
20
7
|
## YSS 阶段 7 执行结果
|
|
21
8
|
|
|
22
9
|
- 消费工程 Java 与处理器基线;三个新后端 Profile 为 Java 8。MapStruct binding 进入 annotationProcessorPaths,不作为业务依赖单独引入;示例不授权升级依赖。MVC PO 的身份/敏感字段风险与 DDD 相同,不能默认全量 @Data。
|
|
@@ -24,329 +11,16 @@ allowed-tools: Read, Grep, Glob, Write, Edit
|
|
|
24
11
|
- 受控生成必须记录对象类型、选用/排除注解、实体关系和敏感字段风险、编译/测试实际结果。
|
|
25
12
|
- 按 `yss-implementation-contract-compiler` 的统一 Execution Result 返回 changed files、证据、偏离和新增影响;`@Data` 实体风险、处理器配置缺失或越界路径返回 `violation`。
|
|
26
13
|
|
|
27
|
-
##
|
|
28
|
-
|
|
29
|
-
```xml
|
|
30
|
-
<dependency>
|
|
31
|
-
<groupId>org.projectlombok</groupId>
|
|
32
|
-
<artifactId>lombok</artifactId>
|
|
33
|
-
<version>1.18.34</version>
|
|
34
|
-
<optional>true</optional>
|
|
35
|
-
</dependency>
|
|
36
|
-
|
|
37
|
-
<!-- For MapStruct compatibility -->
|
|
38
|
-
<dependency>
|
|
39
|
-
<groupId>org.projectlombok</groupId>
|
|
40
|
-
<artifactId>lombok-mapstruct-binding</artifactId>
|
|
41
|
-
<version>0.2.0</version>
|
|
42
|
-
</dependency>
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
## Common Annotations
|
|
46
|
-
|
|
47
|
-
### @Data (All-in-One)
|
|
48
|
-
|
|
49
|
-
```java
|
|
50
|
-
@Data
|
|
51
|
-
public class User {
|
|
52
|
-
private Long id;
|
|
53
|
-
private String name;
|
|
54
|
-
private String email;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
// Generates:
|
|
58
|
-
// - @Getter for all fields
|
|
59
|
-
// - @Setter for all non-final fields
|
|
60
|
-
// - @ToString
|
|
61
|
-
// - @EqualsAndHashCode
|
|
62
|
-
// - @RequiredArgsConstructor
|
|
63
|
-
```
|
|
64
|
-
|
|
65
|
-
### @Getter / @Setter
|
|
66
|
-
|
|
67
|
-
```java
|
|
68
|
-
public class User {
|
|
69
|
-
@Getter @Setter
|
|
70
|
-
private String name;
|
|
71
|
-
|
|
72
|
-
@Getter // Read-only
|
|
73
|
-
private final String email;
|
|
74
|
-
|
|
75
|
-
@Setter(AccessLevel.PROTECTED)
|
|
76
|
-
private String internalId;
|
|
77
|
-
}
|
|
78
|
-
```
|
|
79
|
-
|
|
80
|
-
### @NoArgsConstructor / @AllArgsConstructor / @RequiredArgsConstructor
|
|
81
|
-
|
|
82
|
-
```java
|
|
83
|
-
@NoArgsConstructor
|
|
84
|
-
@AllArgsConstructor
|
|
85
|
-
public class User {
|
|
86
|
-
private Long id;
|
|
87
|
-
private String name;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
@RequiredArgsConstructor
|
|
91
|
-
public class UserService {
|
|
92
|
-
private final UserRepository userRepository; // Included in constructor
|
|
93
|
-
private final UserMapper userMapper; // Included in constructor
|
|
94
|
-
private String cacheName; // NOT included
|
|
95
|
-
}
|
|
96
|
-
```
|
|
97
|
-
|
|
98
|
-
### @Builder
|
|
99
|
-
|
|
100
|
-
```java
|
|
101
|
-
@Data
|
|
102
|
-
@Builder
|
|
103
|
-
public class User {
|
|
104
|
-
private Long id;
|
|
105
|
-
private String name;
|
|
106
|
-
private String email;
|
|
107
|
-
@Builder.Default
|
|
108
|
-
private UserStatus status = UserStatus.ACTIVE;
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
// Usage
|
|
112
|
-
User user = User.builder()
|
|
113
|
-
.name("John")
|
|
114
|
-
.email("john@example.com")
|
|
115
|
-
.build();
|
|
116
|
-
|
|
117
|
-
// With toBuilder for updates
|
|
118
|
-
User updated = user.toBuilder()
|
|
119
|
-
.name("Jane")
|
|
120
|
-
.build();
|
|
121
|
-
```
|
|
122
|
-
|
|
123
|
-
### @Value (Immutable)
|
|
124
|
-
|
|
125
|
-
```java
|
|
126
|
-
@Value
|
|
127
|
-
public class UserResponse {
|
|
128
|
-
Long id;
|
|
129
|
-
String name;
|
|
130
|
-
String email;
|
|
131
|
-
LocalDateTime createdAt;
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
// Generates:
|
|
135
|
-
// - All fields are private final
|
|
136
|
-
// - @AllArgsConstructor
|
|
137
|
-
// - @Getter (no setters)
|
|
138
|
-
// - @ToString
|
|
139
|
-
// - @EqualsAndHashCode
|
|
140
|
-
```
|
|
141
|
-
|
|
142
|
-
## Entity Pattern
|
|
143
|
-
|
|
144
|
-
```java
|
|
145
|
-
@Entity
|
|
146
|
-
@Table(name = "users")
|
|
147
|
-
@Getter
|
|
148
|
-
@Setter
|
|
149
|
-
@NoArgsConstructor(access = AccessLevel.PROTECTED)
|
|
150
|
-
@AllArgsConstructor(access = AccessLevel.PRIVATE)
|
|
151
|
-
@Builder
|
|
152
|
-
@EntityListeners(AuditingEntityListener.class)
|
|
153
|
-
public class User {
|
|
154
|
-
|
|
155
|
-
@Id
|
|
156
|
-
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
|
157
|
-
private Long id;
|
|
158
|
-
|
|
159
|
-
@Column(nullable = false)
|
|
160
|
-
private String name;
|
|
161
|
-
|
|
162
|
-
@Column(unique = true, nullable = false)
|
|
163
|
-
private String email;
|
|
164
|
-
|
|
165
|
-
@Enumerated(EnumType.STRING)
|
|
166
|
-
@Builder.Default
|
|
167
|
-
private UserStatus status = UserStatus.ACTIVE;
|
|
168
|
-
|
|
169
|
-
@CreatedDate
|
|
170
|
-
@Column(updatable = false)
|
|
171
|
-
private LocalDateTime createdAt;
|
|
172
|
-
|
|
173
|
-
@LastModifiedDate
|
|
174
|
-
private LocalDateTime updatedAt;
|
|
175
|
-
|
|
176
|
-
@ManyToOne(fetch = FetchType.LAZY)
|
|
177
|
-
@JoinColumn(name = "department_id")
|
|
178
|
-
private Department department;
|
|
179
|
-
}
|
|
180
|
-
```
|
|
181
|
-
|
|
182
|
-
JPA/DDD entities must not default to `@Data`; choose equality and `toString` deliberately from stable identity and exclude lazy, relationship, and sensitive fields.
|
|
14
|
+
## 按需读取
|
|
183
15
|
|
|
184
|
-
|
|
16
|
+
先确认当前任务涉及的对象与批准合同,只读取对应参考段落:
|
|
185
17
|
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
private final UserRepository userRepository;
|
|
193
|
-
private final UserMapper userMapper;
|
|
194
|
-
private final PasswordEncoder passwordEncoder;
|
|
195
|
-
|
|
196
|
-
@Override
|
|
197
|
-
public UserResponse create(CreateUserRequest dto) {
|
|
198
|
-
log.info("Creating user: {}", dto.getEmail());
|
|
199
|
-
User user = userMapper.toEntity(dto);
|
|
200
|
-
return userMapper.toResponse(userRepository.save(user));
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
```
|
|
204
|
-
|
|
205
|
-
## Logging
|
|
206
|
-
|
|
207
|
-
```java
|
|
208
|
-
@Slf4j // SLF4J logger
|
|
209
|
-
public class UserService {
|
|
210
|
-
public void process() {
|
|
211
|
-
log.info("Processing...");
|
|
212
|
-
log.debug("Debug info: {}", data);
|
|
213
|
-
log.error("Error occurred", exception);
|
|
214
|
-
}
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
@Log4j2 // Log4j2 logger
|
|
218
|
-
@CommonsLog // Apache Commons Logging
|
|
219
|
-
@JBossLog // JBoss Logging
|
|
220
|
-
```
|
|
221
|
-
|
|
222
|
-
## DTO Pattern
|
|
223
|
-
|
|
224
|
-
```java
|
|
225
|
-
// Request DTO
|
|
226
|
-
@Data
|
|
227
|
-
public class CreateUserRequest {
|
|
228
|
-
@NotBlank
|
|
229
|
-
private String name;
|
|
230
|
-
@Email
|
|
231
|
-
private String email;
|
|
232
|
-
@Size(min = 8)
|
|
233
|
-
private String password;
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
// Response DTO (immutable)
|
|
237
|
-
@Value
|
|
238
|
-
@Builder
|
|
239
|
-
public class UserResponse {
|
|
240
|
-
Long id;
|
|
241
|
-
String name;
|
|
242
|
-
String email;
|
|
243
|
-
UserStatus status;
|
|
244
|
-
LocalDateTime createdAt;
|
|
245
|
-
}
|
|
246
|
-
```
|
|
247
|
-
|
|
248
|
-
## @Cleanup
|
|
249
|
-
|
|
250
|
-
```java
|
|
251
|
-
public void readFile(String path) throws IOException {
|
|
252
|
-
@Cleanup InputStream in = new FileInputStream(path);
|
|
253
|
-
// in.close() called automatically
|
|
254
|
-
}
|
|
255
|
-
```
|
|
256
|
-
|
|
257
|
-
## @SneakyThrows
|
|
258
|
-
|
|
259
|
-
```java
|
|
260
|
-
@SneakyThrows // Wraps checked exception
|
|
261
|
-
public String readConfig() {
|
|
262
|
-
return new String(Files.readAllBytes(Paths.get("config.json")), StandardCharsets.UTF_8);
|
|
263
|
-
}
|
|
264
|
-
```
|
|
265
|
-
|
|
266
|
-
## @Synchronized
|
|
267
|
-
|
|
268
|
-
```java
|
|
269
|
-
public class Counter {
|
|
270
|
-
@Synchronized
|
|
271
|
-
public void increment() {
|
|
272
|
-
// Thread-safe
|
|
273
|
-
}
|
|
274
|
-
}
|
|
275
|
-
```
|
|
276
|
-
|
|
277
|
-
## @With (Immutable Updates)
|
|
278
|
-
|
|
279
|
-
```java
|
|
280
|
-
@Value
|
|
281
|
-
@With
|
|
282
|
-
public class Point {
|
|
283
|
-
int x;
|
|
284
|
-
int y;
|
|
285
|
-
}
|
|
286
|
-
|
|
287
|
-
Point p1 = new Point(1, 2);
|
|
288
|
-
Point p2 = p1.withX(5); // Point(5, 2)
|
|
289
|
-
```
|
|
290
|
-
|
|
291
|
-
## Key Annotations
|
|
292
|
-
|
|
293
|
-
| Annotation | Purpose |
|
|
294
|
-
|------------|---------|
|
|
295
|
-
| `@Data` | Getter, Setter, ToString, Equals, Constructor |
|
|
296
|
-
| `@Value` | Immutable class |
|
|
297
|
-
| `@Builder` | Builder pattern |
|
|
298
|
-
| `@RequiredArgsConstructor` | Constructor for final fields |
|
|
299
|
-
| `@Slf4j` | Logger field |
|
|
300
|
-
| `@ToString.Exclude` | Exclude from toString |
|
|
301
|
-
| `@EqualsAndHashCode.Exclude` | Exclude from equals/hashCode |
|
|
302
|
-
|
|
303
|
-
---
|
|
304
|
-
|
|
305
|
-
## When NOT to Use This Skill
|
|
306
|
-
|
|
307
|
-
| Scenario | Use Instead |
|
|
308
|
-
|----------|-------------|
|
|
309
|
-
| Java core language | `java` skill |
|
|
310
|
-
| MapStruct mapping | `mapstruct` skill |
|
|
311
|
-
| Spring annotations | `backend-spring-boot` skill |
|
|
312
|
-
| JPA entities complex logic | Manual implementation |
|
|
313
|
-
| Public API design | Explicit methods for clarity |
|
|
314
|
-
|
|
315
|
-
---
|
|
316
|
-
|
|
317
|
-
## Anti-Patterns
|
|
318
|
-
|
|
319
|
-
| Anti-Pattern | Why It's Bad | Correct Approach |
|
|
320
|
-
|--------------|--------------|------------------|
|
|
321
|
-
| @Data on JPA entities | toString/equals issues | Use @Getter/@Setter selectively |
|
|
322
|
-
| Not excluding lazy relations | LazyInitializationException | Use @ToString.Exclude |
|
|
323
|
-
| @EqualsAndHashCode on entities | Proxy issues | Use @EqualsAndHashCode(onlyExplicitlyIncluded = true) |
|
|
324
|
-
| @SneakyThrows everywhere | Hides exceptions | Use proper exception handling |
|
|
325
|
-
| @Builder without @Default | Null fields | Add @Builder.Default |
|
|
326
|
-
| @Value with mutable fields | Breaks immutability | Use only immutable types |
|
|
327
|
-
| Mixing @Data and manual methods | Confusing API | Be consistent |
|
|
328
|
-
| Not configuring in lombok.config | Inconsistent behavior | Use lombok.config file |
|
|
329
|
-
|
|
330
|
-
---
|
|
331
|
-
|
|
332
|
-
## Quick Troubleshooting
|
|
333
|
-
|
|
334
|
-
| Issue | Cause | Solution |
|
|
335
|
-
|-------|-------|----------|
|
|
336
|
-
| "Cannot find symbol" for getters | IDE not processing | Enable annotation processing |
|
|
337
|
-
| LazyInitializationException | toString on lazy relation | Add @ToString.Exclude |
|
|
338
|
-
| MapStruct not working | Wrong processor order | Lombok before MapStruct |
|
|
339
|
-
| Builder missing fields | No @Builder.Default | Add defaults or check config |
|
|
340
|
-
| StackOverflowError in equals | Circular reference | Exclude relation fields |
|
|
341
|
-
| IDE shows errors but compiles | IDE cache | Invalidate caches/restart |
|
|
342
|
-
| @Slf4j logger not found | SLF4J not in classpath | Add SLF4J dependency |
|
|
343
|
-
| Generated code not visible | delombok needed | Run delombok task |
|
|
344
|
-
|
|
345
|
-
---
|
|
18
|
+
| 任务 | 参考 |
|
|
19
|
+
|---|---|
|
|
20
|
+
| 构造器、Builder、默认值或不可变对象 | [Common Annotations](references/annotation-examples.md#common-annotations) |
|
|
21
|
+
| 实体身份、关联与敏感字段 | [Entity Pattern](references/annotation-examples.md#entity-pattern) |
|
|
22
|
+
| 注解处理器与 MapStruct 集成 | [Maven Configuration](references/annotation-examples.md#maven-configuration),映射逻辑交给 `mapstruct` |
|
|
346
23
|
|
|
347
|
-
|
|
348
|
-
- [Lombok Documentation](https://projectlombok.org/features/)
|
|
349
|
-
- [Stable Features](https://projectlombok.org/features/all)
|
|
350
|
-
- [Configuration](https://projectlombok.org/features/configuration)
|
|
24
|
+
选择注解前核查生成的 equals/hashCode/toString 是否符合对象身份与数据边界。敏感字段不能进入生成的 toString 或日志;实体不默认使用全量 `@Data`。依赖和处理器版本复用工程基线,修改生成行为后编译受影响模块,并验证实际生成的访问器、构造器或身份行为。
|
|
351
25
|
|
|
352
|
-
|
|
26
|
+
查第三方行为时使用 `yss-research`,来源为 [Lombok 官方文档](https://projectlombok.org/features/);不假定某个 MCP 工具已安装。
|
|
@@ -0,0 +1,307 @@
|
|
|
1
|
+
# lombok 条件参考
|
|
2
|
+
|
|
3
|
+
仅在需要具体注解或配置示例时定位对应章节。示例业务名与版本不是工程基线;按批准合同替换,禁止直接复制成业务实现。
|
|
4
|
+
|
|
5
|
+
## Maven Configuration
|
|
6
|
+
|
|
7
|
+
复用工程父 POM 中已批准的 Lombok 版本与编译插件配置。Lombok 依赖按工程策略使用 provided 或 optional;使用显式注解处理器路径的项目,将 Lombok 放入 `annotationProcessorPaths`。
|
|
8
|
+
|
|
9
|
+
与 MapStruct 共用时,在同一处理器配置中核验 Lombok、MapStruct processor 和适用的 lombok-mapstruct-binding;binding 不作为业务依赖单独引入。具体配置参见 [MapStruct 配置示例](../../mapstruct/references/annotation-examples.md#maven-configuration),示例版本仍由当前工程基线替换。
|
|
10
|
+
|
|
11
|
+
## Common Annotations
|
|
12
|
+
|
|
13
|
+
### @Data (All-in-One)
|
|
14
|
+
|
|
15
|
+
```java
|
|
16
|
+
@Data
|
|
17
|
+
public class User {
|
|
18
|
+
private Long id;
|
|
19
|
+
private String name;
|
|
20
|
+
private String email;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
// Generates:
|
|
24
|
+
// - @Getter for all fields
|
|
25
|
+
// - @Setter for all non-final fields
|
|
26
|
+
// - @ToString
|
|
27
|
+
// - @EqualsAndHashCode
|
|
28
|
+
// - @RequiredArgsConstructor
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
### @Getter / @Setter
|
|
32
|
+
|
|
33
|
+
```java
|
|
34
|
+
public class User {
|
|
35
|
+
@Getter @Setter
|
|
36
|
+
private String name;
|
|
37
|
+
|
|
38
|
+
@Getter // Read-only
|
|
39
|
+
private final String email;
|
|
40
|
+
|
|
41
|
+
@Setter(AccessLevel.PROTECTED)
|
|
42
|
+
private String internalId;
|
|
43
|
+
}
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### @NoArgsConstructor / @AllArgsConstructor / @RequiredArgsConstructor
|
|
47
|
+
|
|
48
|
+
```java
|
|
49
|
+
@NoArgsConstructor
|
|
50
|
+
@AllArgsConstructor
|
|
51
|
+
public class User {
|
|
52
|
+
private Long id;
|
|
53
|
+
private String name;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
@RequiredArgsConstructor
|
|
57
|
+
public class UserService {
|
|
58
|
+
private final UserRepository userRepository; // Included in constructor
|
|
59
|
+
private final UserMapper userMapper; // Included in constructor
|
|
60
|
+
private String cacheName; // NOT included
|
|
61
|
+
}
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
### @Builder
|
|
65
|
+
|
|
66
|
+
```java
|
|
67
|
+
@Data
|
|
68
|
+
@Builder
|
|
69
|
+
public class User {
|
|
70
|
+
private Long id;
|
|
71
|
+
private String name;
|
|
72
|
+
private String email;
|
|
73
|
+
@Builder.Default
|
|
74
|
+
private UserStatus status = UserStatus.ACTIVE;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
// Usage
|
|
78
|
+
User user = User.builder()
|
|
79
|
+
.name("John")
|
|
80
|
+
.email("john@example.com")
|
|
81
|
+
.build();
|
|
82
|
+
|
|
83
|
+
// With toBuilder for updates
|
|
84
|
+
User updated = user.toBuilder()
|
|
85
|
+
.name("Jane")
|
|
86
|
+
.build();
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
### @Value (Immutable)
|
|
90
|
+
|
|
91
|
+
```java
|
|
92
|
+
@Value
|
|
93
|
+
public class UserResponse {
|
|
94
|
+
Long id;
|
|
95
|
+
String name;
|
|
96
|
+
String email;
|
|
97
|
+
LocalDateTime createdAt;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
// Generates:
|
|
101
|
+
// - All fields are private final
|
|
102
|
+
// - @AllArgsConstructor
|
|
103
|
+
// - @Getter (no setters)
|
|
104
|
+
// - @ToString
|
|
105
|
+
// - @EqualsAndHashCode
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
## Entity Pattern
|
|
109
|
+
|
|
110
|
+
```java
|
|
111
|
+
@Entity
|
|
112
|
+
@Table(name = "users")
|
|
113
|
+
@Getter
|
|
114
|
+
@Setter
|
|
115
|
+
@NoArgsConstructor(access = AccessLevel.PROTECTED)
|
|
116
|
+
@AllArgsConstructor(access = AccessLevel.PRIVATE)
|
|
117
|
+
@Builder
|
|
118
|
+
@EntityListeners(AuditingEntityListener.class)
|
|
119
|
+
public class User {
|
|
120
|
+
|
|
121
|
+
@Id
|
|
122
|
+
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
|
123
|
+
private Long id;
|
|
124
|
+
|
|
125
|
+
@Column(nullable = false)
|
|
126
|
+
private String name;
|
|
127
|
+
|
|
128
|
+
@Column(unique = true, nullable = false)
|
|
129
|
+
private String email;
|
|
130
|
+
|
|
131
|
+
@Enumerated(EnumType.STRING)
|
|
132
|
+
@Builder.Default
|
|
133
|
+
private UserStatus status = UserStatus.ACTIVE;
|
|
134
|
+
|
|
135
|
+
@CreatedDate
|
|
136
|
+
@Column(updatable = false)
|
|
137
|
+
private LocalDateTime createdAt;
|
|
138
|
+
|
|
139
|
+
@LastModifiedDate
|
|
140
|
+
private LocalDateTime updatedAt;
|
|
141
|
+
|
|
142
|
+
@ManyToOne(fetch = FetchType.LAZY)
|
|
143
|
+
@JoinColumn(name = "department_id")
|
|
144
|
+
private Department department;
|
|
145
|
+
}
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
JPA/DDD entities must not default to `@Data`; choose equality and `toString` deliberately from stable identity and exclude lazy, relationship, and sensitive fields.
|
|
149
|
+
|
|
150
|
+
## Service Pattern with Constructor Injection
|
|
151
|
+
|
|
152
|
+
```java
|
|
153
|
+
@Service
|
|
154
|
+
@RequiredArgsConstructor
|
|
155
|
+
@Slf4j
|
|
156
|
+
public class UserServiceImpl implements UserService {
|
|
157
|
+
|
|
158
|
+
private final UserRepository userRepository;
|
|
159
|
+
private final UserMapper userMapper;
|
|
160
|
+
private final PasswordEncoder passwordEncoder;
|
|
161
|
+
|
|
162
|
+
@Override
|
|
163
|
+
public UserResponse create(CreateUserRequest dto) {
|
|
164
|
+
log.info("Creating user");
|
|
165
|
+
User user = userMapper.toEntity(dto);
|
|
166
|
+
return userMapper.toResponse(userRepository.save(user));
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
## Logging
|
|
172
|
+
|
|
173
|
+
```java
|
|
174
|
+
@Slf4j // SLF4J logger
|
|
175
|
+
public class UserService {
|
|
176
|
+
public void process() {
|
|
177
|
+
log.info("Processing...");
|
|
178
|
+
log.debug("Processing completed");
|
|
179
|
+
log.error("Error occurred", exception);
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
@Log4j2 // Log4j2 logger
|
|
184
|
+
@CommonsLog // Apache Commons Logging
|
|
185
|
+
@JBossLog // JBoss Logging
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
## DTO Pattern
|
|
189
|
+
|
|
190
|
+
```java
|
|
191
|
+
// Request DTO
|
|
192
|
+
@Getter
|
|
193
|
+
@Setter
|
|
194
|
+
@ToString(onlyExplicitlyIncluded = true)
|
|
195
|
+
public class CreateUserRequest {
|
|
196
|
+
@NotBlank
|
|
197
|
+
private String name;
|
|
198
|
+
@Email
|
|
199
|
+
private String email;
|
|
200
|
+
@Size(min = 8)
|
|
201
|
+
private String password;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
// Response DTO (immutable)
|
|
205
|
+
@Value
|
|
206
|
+
@Builder
|
|
207
|
+
public class UserResponse {
|
|
208
|
+
Long id;
|
|
209
|
+
String name;
|
|
210
|
+
String email;
|
|
211
|
+
UserStatus status;
|
|
212
|
+
LocalDateTime createdAt;
|
|
213
|
+
}
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
## @Cleanup
|
|
217
|
+
|
|
218
|
+
```java
|
|
219
|
+
public void readFile(String path) throws IOException {
|
|
220
|
+
@Cleanup InputStream in = new FileInputStream(path);
|
|
221
|
+
// in.close() called automatically
|
|
222
|
+
}
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
## @SneakyThrows
|
|
226
|
+
|
|
227
|
+
```java
|
|
228
|
+
@SneakyThrows // Wraps checked exception
|
|
229
|
+
public String readConfig() {
|
|
230
|
+
return new String(Files.readAllBytes(Paths.get("config.json")), StandardCharsets.UTF_8);
|
|
231
|
+
}
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
## @Synchronized
|
|
235
|
+
|
|
236
|
+
```java
|
|
237
|
+
public class Counter {
|
|
238
|
+
@Synchronized
|
|
239
|
+
public void increment() {
|
|
240
|
+
// Thread-safe
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
```
|
|
244
|
+
|
|
245
|
+
## @With (Immutable Updates)
|
|
246
|
+
|
|
247
|
+
```java
|
|
248
|
+
@Value
|
|
249
|
+
@With
|
|
250
|
+
public class Point {
|
|
251
|
+
int x;
|
|
252
|
+
int y;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
Point p1 = new Point(1, 2);
|
|
256
|
+
Point p2 = p1.withX(5); // Point(5, 2)
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
## Key Annotations
|
|
260
|
+
|
|
261
|
+
| Annotation | Purpose |
|
|
262
|
+
|------------|---------|
|
|
263
|
+
| `@Data` | Getter, Setter, ToString, Equals, Constructor |
|
|
264
|
+
| `@Value` | Immutable class |
|
|
265
|
+
| `@Builder` | Builder pattern |
|
|
266
|
+
| `@RequiredArgsConstructor` | Constructor for final fields |
|
|
267
|
+
| `@Slf4j` | Logger field |
|
|
268
|
+
| `@ToString.Exclude` | Exclude from toString |
|
|
269
|
+
| `@EqualsAndHashCode.Exclude` | Exclude from equals/hashCode |
|
|
270
|
+
|
|
271
|
+
---
|
|
272
|
+
|
|
273
|
+
|
|
274
|
+
## Anti-Patterns
|
|
275
|
+
|
|
276
|
+
| Anti-Pattern | Why It's Bad | Correct Approach |
|
|
277
|
+
|--------------|--------------|------------------|
|
|
278
|
+
| @Data on JPA entities | toString/equals issues | Use @Getter/@Setter selectively |
|
|
279
|
+
| Not excluding lazy relations | LazyInitializationException | Use @ToString.Exclude |
|
|
280
|
+
| @EqualsAndHashCode on entities | Proxy issues | Use @EqualsAndHashCode(onlyExplicitlyIncluded = true) |
|
|
281
|
+
| @SneakyThrows everywhere | Hides exceptions | Use proper exception handling |
|
|
282
|
+
| @Builder without @Default | Null fields | Add @Builder.Default |
|
|
283
|
+
| @Value with mutable fields | Breaks immutability | Use only immutable types |
|
|
284
|
+
| Mixing @Data and manual methods | Confusing API | Be consistent |
|
|
285
|
+
| Not configuring in lombok.config | Inconsistent behavior | Use lombok.config file |
|
|
286
|
+
|
|
287
|
+
---
|
|
288
|
+
|
|
289
|
+
## Quick Troubleshooting
|
|
290
|
+
|
|
291
|
+
| Issue | Cause | Solution |
|
|
292
|
+
|-------|-------|----------|
|
|
293
|
+
| "Cannot find symbol" for getters | IDE not processing | Enable annotation processing |
|
|
294
|
+
| LazyInitializationException | toString on lazy relation | Add @ToString.Exclude |
|
|
295
|
+
| MapStruct not working | Wrong processor order | Lombok before MapStruct |
|
|
296
|
+
| Builder missing fields | No @Builder.Default | Add defaults or check config |
|
|
297
|
+
| StackOverflowError in equals | Circular reference | Exclude relation fields |
|
|
298
|
+
| IDE shows errors but compiles | IDE cache | Invalidate caches/restart |
|
|
299
|
+
| @Slf4j logger not found | SLF4J not in classpath | Add SLF4J dependency |
|
|
300
|
+
| Generated code not visible | delombok needed | Run delombok task |
|
|
301
|
+
|
|
302
|
+
---
|
|
303
|
+
|
|
304
|
+
## Reference Documentation
|
|
305
|
+
- [Lombok Documentation](https://projectlombok.org/features/)
|
|
306
|
+
- [Stable Features](https://projectlombok.org/features/all)
|
|
307
|
+
- [Configuration](https://projectlombok.org/features/configuration)
|
|
@@ -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
|
|