create-yss-spec 3.5.6 → 3.5.8
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/bin/create-yss-spec.js +3 -1
- package/cli-core.lock.json +10 -6
- package/package.json +4 -1
- package/src/api/_sync-service.js +3 -1
- package/src/command-runner.mjs +44 -9
- package/src/content-identity.js +111 -0
- package/src/runtime-store.mjs +650 -0
- package/src/template/asset-runtime.js +4 -1
- package/src/template/instance-runtime.js +23 -7
- package/src/validation/metadata.js +8 -0
- package/template/.agents/skills/.strategic-design-skills-manifest.json +1 -1
- package/template/.agents/skills/alibaba-java-code-style/SKILL.md +30 -36
- package/template/.agents/skills/archify/SKILL.md +2 -2
- package/template/.agents/skills/archify/scripts/yss-safe-deliver.mjs +10 -6
- package/template/.agents/skills/archify/test/yss-safe-deliver.test.mjs +9 -2
- package/template/.agents/skills/code-review/SKILL.md +19 -11
- package/template/.agents/skills/code-review/references/candidate-capture.md +1 -1
- package/template/.agents/skills/code-review/references/legacy-convergence.md +3 -1
- package/template/.agents/skills/code-review/references/review-axis-checklists.md +2 -0
- package/template/.agents/skills/code-review/references/yss-review-standards.md +4 -2
- package/template/.agents/skills/competitive-intelligence/SKILL.md +32 -74
- package/template/.agents/skills/file-export-download/SKILL.md +4 -73
- package/template/.agents/skills/file-export-download/references/binary-contract-example.md +26 -0
- package/template/.agents/skills/file-export-download/references/download-call-example.md +45 -0
- package/template/.agents/skills/formily-foundation/SKILL.md +6 -105
- package/template/.agents/skills/formily-foundation/references/async-save-example.md +57 -0
- package/template/.agents/skills/formily-foundation/references/query-layout.md +50 -0
- package/template/.agents/skills/formily-linkage-effects/SKILL.md +3 -116
- package/template/.agents/skills/formily-linkage-effects/references/linkage-example.md +116 -0
- package/template/.agents/skills/formily-mode-slot-detail/SKILL.md +3 -81
- package/template/.agents/skills/formily-mode-slot-detail/references/mode-slot-example.md +81 -0
- package/template/.agents/skills/formily-step-flow/SKILL.md +3 -143
- package/template/.agents/skills/formily-step-flow/references/step-flow-example.md +143 -0
- package/template/.agents/skills/handoff/SKILL.md +3 -1
- package/template/.agents/skills/i-have-adhd/SKILL.md +2 -2
- package/template/.agents/skills/i-have-adhd/references/yss-adaptation.md +2 -2
- package/template/.agents/skills/i-have-adhd/tests/verify-integration.mjs +7 -2
- package/template/.agents/skills/implement/SKILL.md +2 -2
- package/template/.agents/skills/llm-wiki/references/transactions.md +2 -2
- package/template/.agents/skills/llm-wiki/scripts/core.mjs +40 -2
- package/template/.agents/skills/llm-wiki/scripts/transaction.mjs +30 -27
- package/template/.agents/skills/llm-wiki/scripts/v2.test.mjs +38 -2
- package/template/.agents/skills/lombok/SKILL.md +2 -0
- package/template/.agents/skills/mapstruct/SKILL.md +2 -0
- package/template/.agents/skills/tdd/SKILL.md +2 -2
- package/template/.agents/skills/theme-token-usage/SKILL.md +6 -5
- package/template/.agents/skills/wayfinder/references/chart-map.md +2 -2
- package/template/.agents/skills/wayfinder/references/ticket-types.md +1 -1
- package/template/.agents/skills/yss-api-integration/SKILL.md +13 -50
- package/template/.agents/skills/yss-api-integration/references/orval-list-example.md +38 -0
- package/template/.agents/skills/yss-application/SKILL.md +11 -5
- package/template/.agents/skills/yss-audit-log/SKILL.md +8 -6
- package/template/.agents/skills/yss-audit-log/references/README.md +5 -5
- package/template/.agents/skills/yss-cache/SKILL.md +4 -4
- package/template/.agents/skills/yss-ddd-scaffold-generator/SKILL.md +7 -8
- package/template/.agents/skills/yss-ddd-scaffold-generator/references/USAGE_EXAMPLES.md +13 -6
- package/template/.agents/skills/yss-ddd-scaffold-generator/references/command-examples.md +2 -0
- package/template/.agents/skills/yss-ddd-scaffold-generator/scripts/scaffold-generator.test.mjs +28 -1
- package/template/.agents/skills/yss-design-system/SKILL.md +2 -2
- package/template/.agents/skills/yss-distributed-id/SKILL.md +4 -4
- package/template/.agents/skills/yss-dto/SKILL.md +9 -9
- package/template/.agents/skills/yss-dto/references/README.md +4 -4
- package/template/.agents/skills/yss-dto/references/wire-validation-checklist.md +4 -4
- package/template/.agents/skills/yss-excel-mvc/SKILL.md +4 -4
- package/template/.agents/skills/yss-exception/SKILL.md +42 -48
- package/template/.agents/skills/yss-formily-schema-generator/SKILL.md +26 -170
- package/template/.agents/skills/yss-formily-schema-generator/references/workflow.md +49 -193
- package/template/.agents/skills/yss-frontend-scaffold-generator/SKILL.md +14 -10
- package/template/.agents/skills/yss-implementation-contract-compiler/SKILL.md +2 -6
- package/template/.agents/skills/yss-implementation-contract-compiler/references/yss-skill-execution-result.md +15 -1
- package/template/.agents/skills/yss-layered-mvc-scaffold-generator/SKILL.md +1 -1
- package/template/.agents/skills/yss-mybatis/SKILL.md +4 -4
- package/template/.agents/skills/yss-openapi-draft-review/SKILL.md +6 -4
- package/template/.agents/skills/yss-openapi-draft-review/references/review-output.md +2 -0
- package/template/.agents/skills/yss-openapi-draft-review/references/semantic-review.md +3 -3
- package/template/.agents/skills/yss-openapi-governance/SKILL.md +5 -7
- package/template/.agents/skills/yss-openapi-governance/references/governance-output.md +2 -0
- package/template/.agents/skills/yss-openapi-governance/references/governance-workflow.md +3 -3
- package/template/.agents/skills/yss-product-lifecycle/SKILL.md +23 -21
- package/template/.agents/skills/yss-product-lifecycle/references/artifact-dependencies.md +1 -1
- package/template/.agents/skills/yss-product-lifecycle/references/matt-yss-adapter.md +25 -5
- package/template/.agents/skills/yss-product-lifecycle/references/orchestration-contract.yaml +100 -4
- package/template/.agents/skills/yss-product-lifecycle/references/orchestration.md +35 -12
- package/template/.agents/skills/yss-product-lifecycle/references/state-model.md +3 -1
- package/template/.agents/skills/yss-product-lifecycle/references/user-decisions.md +3 -3
- package/template/.agents/skills/yss-prototype-stage/SKILL.md +1 -5
- package/template/.agents/skills/yss-repository/SKILL.md +2 -2
- package/template/.agents/skills/yss-research/SKILL.md +39 -48
- package/template/.agents/skills/yss-research/assets/competitive-evidence-template.yaml +146 -0
- package/template/.agents/skills/yss-research/references/competitive-analysis.md +76 -0
- package/template/.agents/skills/yss-research/references/competitive-analysis.schema.json +324 -0
- package/template/.agents/skills/yss-research/references/evidence-contract.md +8 -0
- package/template/.agents/skills/yss-research/scripts/lib/competitive-analysis.mjs +185 -0
- package/template/.agents/skills/yss-research/scripts/render-competitive-outputs.mjs +16 -0
- package/template/.agents/skills/yss-research/scripts/validate-research-package.mjs +6 -2
- package/template/.agents/skills/yss-research/tests/competitive-scenarios.test.mjs +270 -0
- package/template/.agents/skills/yss-resilience4j/SKILL.md +25 -31
- package/template/.agents/skills/yss-security-algorithm/SKILL.md +37 -43
- package/template/.agents/skills/yss-skill-source-index-refresh/SKILL.md +29 -36
- package/template/.agents/skills/yss-skill-source-index-refresh/references/backend-component-platform-compatibility.md +1 -1
- package/template/.agents/skills/yss-stage-decision/SKILL.md +2 -5
- package/template/.agents/skills/yss-tactical-design/SKILL.md +1 -1
- package/template/.agents/skills/yss-tactical-design/references/output-template.md +3 -3
- package/template/.agents/skills/yss-tactical-design/references/tactical-design-contract.md +1 -1
- package/template/.agents/skills/yss-technical-design/SKILL.md +6 -5
- package/template/.agents/skills/yss-ui/SKILL.md +7 -1
- package/template/.agents/skills/yss-ui/assets/docs/guide/gitlab-ci-integration.md +2 -2
- package/template/.agents/skills/yss-ui/references/checklist.md +38 -96
- package/template/.agents/skills/yss-ui/references/component-routing.md +3 -1
- package/template/.agents/skills/yss-ui/references/quick-recipes.md +17 -272
- package/template/.agents/skills/yss-ui/references/specialized-components.md +3 -3
- package/template/.agents/skills/yss-ui-business-page-generation/SKILL.md +1 -1
- package/template/.agents/skills/yss-up-springboot3/SKILL.md +19 -21
- package/template/.agents/skills/yss-userinfo/SKILL.md +27 -33
- package/template/.agents/skills/yss-validation/SKILL.md +26 -32
- package/template/.agents/skills/yss-web-controller/SKILL.md +11 -44
- package/template/.agents/skills/yss-web-controller/references/crud-generation.md +38 -0
- package/template/.agents/skills/ytable-usage/SKILL.md +2 -2
- package/template/.agents/skills/ytree-usage/SKILL.md +2 -80
- package/template/.agents/skills/ytree-usage/references/tree-and-confirmation-example.md +81 -0
- package/template/.codex/skills/alibaba-java-code-style/SKILL.md +30 -36
- package/template/.codex/skills/archify/SKILL.md +2 -2
- package/template/.codex/skills/archify/scripts/yss-safe-deliver.mjs +10 -6
- package/template/.codex/skills/archify/test/yss-safe-deliver.test.mjs +9 -2
- package/template/.codex/skills/code-review/SKILL.md +19 -11
- package/template/.codex/skills/code-review/references/candidate-capture.md +1 -1
- package/template/.codex/skills/code-review/references/legacy-convergence.md +3 -1
- package/template/.codex/skills/code-review/references/review-axis-checklists.md +2 -0
- package/template/.codex/skills/code-review/references/yss-review-standards.md +4 -2
- package/template/.codex/skills/competitive-intelligence/SKILL.md +32 -74
- package/template/.codex/skills/file-export-download/SKILL.md +4 -73
- package/template/.codex/skills/file-export-download/references/binary-contract-example.md +26 -0
- package/template/.codex/skills/file-export-download/references/download-call-example.md +45 -0
- package/template/.codex/skills/formily-foundation/SKILL.md +6 -105
- package/template/.codex/skills/formily-foundation/references/async-save-example.md +57 -0
- package/template/.codex/skills/formily-foundation/references/query-layout.md +50 -0
- package/template/.codex/skills/formily-linkage-effects/SKILL.md +3 -116
- package/template/.codex/skills/formily-linkage-effects/references/linkage-example.md +116 -0
- package/template/.codex/skills/formily-mode-slot-detail/SKILL.md +3 -81
- package/template/.codex/skills/formily-mode-slot-detail/references/mode-slot-example.md +81 -0
- package/template/.codex/skills/formily-step-flow/SKILL.md +3 -143
- package/template/.codex/skills/formily-step-flow/references/step-flow-example.md +143 -0
- package/template/.codex/skills/handoff/SKILL.md +3 -1
- package/template/.codex/skills/i-have-adhd/SKILL.md +2 -2
- package/template/.codex/skills/i-have-adhd/references/yss-adaptation.md +2 -2
- package/template/.codex/skills/i-have-adhd/tests/verify-integration.mjs +7 -2
- package/template/.codex/skills/implement/SKILL.md +2 -2
- package/template/.codex/skills/llm-wiki/references/transactions.md +2 -2
- package/template/.codex/skills/llm-wiki/scripts/core.mjs +40 -2
- package/template/.codex/skills/llm-wiki/scripts/transaction.mjs +30 -27
- package/template/.codex/skills/llm-wiki/scripts/v2.test.mjs +38 -2
- package/template/.codex/skills/lombok/SKILL.md +2 -0
- package/template/.codex/skills/mapstruct/SKILL.md +2 -0
- package/template/.codex/skills/product-design/references/communication-protocol.md +3 -3
- package/template/.codex/skills/product-design/references/critical-overrides.md +4 -5
- package/template/.codex/skills/product-design/skills/audit/SKILL.md +2 -4
- package/template/.codex/skills/product-design/skills/get-context/SKILL.md +6 -8
- package/template/.codex/skills/product-design/skills/ideate/SKILL.md +3 -3
- package/template/.codex/skills/product-design/skills/image-to-code/SKILL.md +3 -5
- package/template/.codex/skills/product-design/skills/index/SKILL.md +1 -1
- package/template/.codex/skills/product-design/skills/prototype/SKILL.md +2 -4
- package/template/.codex/skills/product-design/skills/research/SKILL.md +4 -6
- package/template/.codex/skills/product-design/skills/research/assets/research-brief-template.md +3 -3
- package/template/.codex/skills/product-design/skills/share/SKILL.md +2 -4
- package/template/.codex/skills/product-design/skills/url-to-code/SKILL.md +2 -4
- package/template/.codex/skills/product-design/skills/user-context/SKILL.md +1 -1
- package/template/.codex/skills/tdd/SKILL.md +2 -2
- package/template/.codex/skills/theme-token-usage/SKILL.md +6 -5
- package/template/.codex/skills/wayfinder/references/chart-map.md +2 -2
- package/template/.codex/skills/wayfinder/references/ticket-types.md +1 -1
- package/template/.codex/skills/yss-api-integration/SKILL.md +13 -50
- package/template/.codex/skills/yss-api-integration/references/orval-list-example.md +38 -0
- package/template/.codex/skills/yss-application/SKILL.md +11 -5
- package/template/.codex/skills/yss-audit-log/SKILL.md +8 -6
- package/template/.codex/skills/yss-audit-log/references/README.md +5 -5
- package/template/.codex/skills/yss-cache/SKILL.md +4 -4
- package/template/.codex/skills/yss-ddd-scaffold-generator/SKILL.md +7 -8
- package/template/.codex/skills/yss-ddd-scaffold-generator/references/USAGE_EXAMPLES.md +13 -6
- package/template/.codex/skills/yss-ddd-scaffold-generator/references/command-examples.md +2 -0
- package/template/.codex/skills/yss-ddd-scaffold-generator/scripts/scaffold-generator.test.mjs +28 -1
- package/template/.codex/skills/yss-design-system/SKILL.md +2 -2
- package/template/.codex/skills/yss-distributed-id/SKILL.md +4 -4
- package/template/.codex/skills/yss-dto/SKILL.md +9 -9
- package/template/.codex/skills/yss-dto/references/README.md +4 -4
- package/template/.codex/skills/yss-dto/references/wire-validation-checklist.md +4 -4
- package/template/.codex/skills/yss-excel-mvc/SKILL.md +4 -4
- package/template/.codex/skills/yss-exception/SKILL.md +42 -48
- package/template/.codex/skills/yss-formily-schema-generator/SKILL.md +26 -170
- package/template/.codex/skills/yss-formily-schema-generator/references/workflow.md +49 -193
- package/template/.codex/skills/yss-frontend-scaffold-generator/SKILL.md +14 -10
- package/template/.codex/skills/yss-implementation-contract-compiler/SKILL.md +2 -6
- package/template/.codex/skills/yss-implementation-contract-compiler/references/yss-skill-execution-result.md +15 -1
- package/template/.codex/skills/yss-layered-mvc-scaffold-generator/SKILL.md +1 -1
- package/template/.codex/skills/yss-mybatis/SKILL.md +4 -4
- package/template/.codex/skills/yss-openapi-draft-review/SKILL.md +6 -4
- package/template/.codex/skills/yss-openapi-draft-review/references/review-output.md +2 -0
- package/template/.codex/skills/yss-openapi-draft-review/references/semantic-review.md +3 -3
- package/template/.codex/skills/yss-openapi-governance/SKILL.md +5 -7
- package/template/.codex/skills/yss-openapi-governance/references/governance-output.md +2 -0
- package/template/.codex/skills/yss-openapi-governance/references/governance-workflow.md +3 -3
- package/template/.codex/skills/yss-product-lifecycle/SKILL.md +23 -21
- package/template/.codex/skills/yss-product-lifecycle/references/artifact-dependencies.md +1 -1
- package/template/.codex/skills/yss-product-lifecycle/references/matt-yss-adapter.md +25 -5
- package/template/.codex/skills/yss-product-lifecycle/references/orchestration-contract.yaml +100 -4
- package/template/.codex/skills/yss-product-lifecycle/references/orchestration.md +35 -12
- package/template/.codex/skills/yss-product-lifecycle/references/state-model.md +3 -1
- package/template/.codex/skills/yss-product-lifecycle/references/user-decisions.md +3 -3
- package/template/.codex/skills/yss-prototype-stage/SKILL.md +1 -5
- package/template/.codex/skills/yss-repository/SKILL.md +2 -2
- package/template/.codex/skills/yss-research/SKILL.md +39 -48
- package/template/.codex/skills/yss-research/assets/competitive-evidence-template.yaml +146 -0
- package/template/.codex/skills/yss-research/references/competitive-analysis.md +76 -0
- package/template/.codex/skills/yss-research/references/competitive-analysis.schema.json +324 -0
- package/template/.codex/skills/yss-research/references/evidence-contract.md +8 -0
- package/template/.codex/skills/yss-research/scripts/lib/competitive-analysis.mjs +185 -0
- package/template/.codex/skills/yss-research/scripts/render-competitive-outputs.mjs +16 -0
- package/template/.codex/skills/yss-research/scripts/validate-research-package.mjs +6 -2
- package/template/.codex/skills/yss-research/tests/competitive-scenarios.test.mjs +270 -0
- package/template/.codex/skills/yss-resilience4j/SKILL.md +25 -31
- package/template/.codex/skills/yss-security-algorithm/SKILL.md +37 -43
- package/template/.codex/skills/yss-skill-source-index-refresh/SKILL.md +29 -36
- package/template/.codex/skills/yss-skill-source-index-refresh/references/backend-component-platform-compatibility.md +1 -1
- package/template/.codex/skills/yss-stage-decision/SKILL.md +2 -5
- package/template/.codex/skills/yss-tactical-design/SKILL.md +1 -1
- package/template/.codex/skills/yss-tactical-design/references/output-template.md +3 -3
- package/template/.codex/skills/yss-tactical-design/references/tactical-design-contract.md +1 -1
- package/template/.codex/skills/yss-technical-design/SKILL.md +6 -5
- package/template/.codex/skills/yss-ui/SKILL.md +7 -1
- package/template/.codex/skills/yss-ui/assets/docs/guide/gitlab-ci-integration.md +2 -2
- package/template/.codex/skills/yss-ui/references/checklist.md +38 -96
- package/template/.codex/skills/yss-ui/references/component-routing.md +3 -1
- package/template/.codex/skills/yss-ui/references/quick-recipes.md +17 -272
- package/template/.codex/skills/yss-ui/references/specialized-components.md +3 -3
- package/template/.codex/skills/yss-ui-business-page-generation/SKILL.md +1 -1
- package/template/.codex/skills/yss-up-springboot3/SKILL.md +19 -21
- package/template/.codex/skills/yss-userinfo/SKILL.md +27 -33
- package/template/.codex/skills/yss-validation/SKILL.md +26 -32
- package/template/.codex/skills/yss-web-controller/SKILL.md +11 -44
- package/template/.codex/skills/yss-web-controller/references/crud-generation.md +38 -0
- package/template/.codex/skills/ytable-usage/SKILL.md +2 -2
- package/template/.codex/skills/ytree-usage/SKILL.md +2 -80
- package/template/.codex/skills/ytree-usage/references/tree-and-confirmation-example.md +81 -0
- package/template/.cursor/skills/alibaba-java-code-style/SKILL.md +30 -36
- package/template/.cursor/skills/archify/SKILL.md +2 -2
- package/template/.cursor/skills/archify/scripts/yss-safe-deliver.mjs +10 -6
- package/template/.cursor/skills/archify/test/yss-safe-deliver.test.mjs +9 -2
- package/template/.cursor/skills/code-review/SKILL.md +19 -11
- package/template/.cursor/skills/code-review/references/candidate-capture.md +1 -1
- package/template/.cursor/skills/code-review/references/legacy-convergence.md +3 -1
- package/template/.cursor/skills/code-review/references/review-axis-checklists.md +2 -0
- package/template/.cursor/skills/code-review/references/yss-review-standards.md +4 -2
- package/template/.cursor/skills/competitive-intelligence/SKILL.md +32 -74
- package/template/.cursor/skills/file-export-download/SKILL.md +4 -73
- package/template/.cursor/skills/file-export-download/references/binary-contract-example.md +26 -0
- package/template/.cursor/skills/file-export-download/references/download-call-example.md +45 -0
- package/template/.cursor/skills/formily-foundation/SKILL.md +6 -105
- package/template/.cursor/skills/formily-foundation/references/async-save-example.md +57 -0
- package/template/.cursor/skills/formily-foundation/references/query-layout.md +50 -0
- package/template/.cursor/skills/formily-linkage-effects/SKILL.md +3 -116
- package/template/.cursor/skills/formily-linkage-effects/references/linkage-example.md +116 -0
- package/template/.cursor/skills/formily-mode-slot-detail/SKILL.md +3 -81
- package/template/.cursor/skills/formily-mode-slot-detail/references/mode-slot-example.md +81 -0
- package/template/.cursor/skills/formily-step-flow/SKILL.md +3 -143
- package/template/.cursor/skills/formily-step-flow/references/step-flow-example.md +143 -0
- package/template/.cursor/skills/handoff/SKILL.md +3 -1
- package/template/.cursor/skills/i-have-adhd/SKILL.md +2 -2
- package/template/.cursor/skills/i-have-adhd/references/yss-adaptation.md +2 -2
- package/template/.cursor/skills/i-have-adhd/tests/verify-integration.mjs +7 -2
- package/template/.cursor/skills/implement/SKILL.md +2 -2
- package/template/.cursor/skills/llm-wiki/references/transactions.md +2 -2
- package/template/.cursor/skills/llm-wiki/scripts/core.mjs +40 -2
- package/template/.cursor/skills/llm-wiki/scripts/transaction.mjs +30 -27
- package/template/.cursor/skills/llm-wiki/scripts/v2.test.mjs +38 -2
- package/template/.cursor/skills/lombok/SKILL.md +2 -0
- package/template/.cursor/skills/mapstruct/SKILL.md +2 -0
- package/template/.cursor/skills/tdd/SKILL.md +2 -2
- package/template/.cursor/skills/theme-token-usage/SKILL.md +6 -5
- package/template/.cursor/skills/wayfinder/references/chart-map.md +2 -2
- package/template/.cursor/skills/wayfinder/references/ticket-types.md +1 -1
- package/template/.cursor/skills/yss-api-integration/SKILL.md +13 -50
- package/template/.cursor/skills/yss-api-integration/references/orval-list-example.md +38 -0
- package/template/.cursor/skills/yss-application/SKILL.md +11 -5
- package/template/.cursor/skills/yss-audit-log/SKILL.md +8 -6
- package/template/.cursor/skills/yss-audit-log/references/README.md +5 -5
- package/template/.cursor/skills/yss-cache/SKILL.md +4 -4
- package/template/.cursor/skills/yss-ddd-scaffold-generator/SKILL.md +7 -8
- package/template/.cursor/skills/yss-ddd-scaffold-generator/references/USAGE_EXAMPLES.md +13 -6
- package/template/.cursor/skills/yss-ddd-scaffold-generator/references/command-examples.md +2 -0
- package/template/.cursor/skills/yss-ddd-scaffold-generator/scripts/scaffold-generator.test.mjs +28 -1
- package/template/.cursor/skills/yss-design-system/SKILL.md +2 -2
- package/template/.cursor/skills/yss-distributed-id/SKILL.md +4 -4
- package/template/.cursor/skills/yss-dto/SKILL.md +9 -9
- package/template/.cursor/skills/yss-dto/references/README.md +4 -4
- package/template/.cursor/skills/yss-dto/references/wire-validation-checklist.md +4 -4
- package/template/.cursor/skills/yss-excel-mvc/SKILL.md +4 -4
- package/template/.cursor/skills/yss-exception/SKILL.md +42 -48
- package/template/.cursor/skills/yss-formily-schema-generator/SKILL.md +26 -170
- package/template/.cursor/skills/yss-formily-schema-generator/references/workflow.md +49 -193
- package/template/.cursor/skills/yss-frontend-scaffold-generator/SKILL.md +14 -10
- package/template/.cursor/skills/yss-implementation-contract-compiler/SKILL.md +2 -6
- package/template/.cursor/skills/yss-implementation-contract-compiler/references/yss-skill-execution-result.md +15 -1
- package/template/.cursor/skills/yss-layered-mvc-scaffold-generator/SKILL.md +1 -1
- package/template/.cursor/skills/yss-mybatis/SKILL.md +4 -4
- package/template/.cursor/skills/yss-openapi-draft-review/SKILL.md +6 -4
- package/template/.cursor/skills/yss-openapi-draft-review/references/review-output.md +2 -0
- package/template/.cursor/skills/yss-openapi-draft-review/references/semantic-review.md +3 -3
- package/template/.cursor/skills/yss-openapi-governance/SKILL.md +5 -7
- package/template/.cursor/skills/yss-openapi-governance/references/governance-output.md +2 -0
- package/template/.cursor/skills/yss-openapi-governance/references/governance-workflow.md +3 -3
- package/template/.cursor/skills/yss-product-lifecycle/SKILL.md +23 -21
- package/template/.cursor/skills/yss-product-lifecycle/references/artifact-dependencies.md +1 -1
- package/template/.cursor/skills/yss-product-lifecycle/references/matt-yss-adapter.md +25 -5
- package/template/.cursor/skills/yss-product-lifecycle/references/orchestration-contract.yaml +100 -4
- package/template/.cursor/skills/yss-product-lifecycle/references/orchestration.md +35 -12
- package/template/.cursor/skills/yss-product-lifecycle/references/state-model.md +3 -1
- package/template/.cursor/skills/yss-product-lifecycle/references/user-decisions.md +3 -3
- package/template/.cursor/skills/yss-prototype-stage/SKILL.md +1 -5
- package/template/.cursor/skills/yss-repository/SKILL.md +2 -2
- package/template/.cursor/skills/yss-research/SKILL.md +39 -48
- package/template/.cursor/skills/yss-research/assets/competitive-evidence-template.yaml +146 -0
- package/template/.cursor/skills/yss-research/references/competitive-analysis.md +76 -0
- package/template/.cursor/skills/yss-research/references/competitive-analysis.schema.json +324 -0
- package/template/.cursor/skills/yss-research/references/evidence-contract.md +8 -0
- package/template/.cursor/skills/yss-research/scripts/lib/competitive-analysis.mjs +185 -0
- package/template/.cursor/skills/yss-research/scripts/render-competitive-outputs.mjs +16 -0
- package/template/.cursor/skills/yss-research/scripts/validate-research-package.mjs +6 -2
- package/template/.cursor/skills/yss-research/tests/competitive-scenarios.test.mjs +270 -0
- package/template/.cursor/skills/yss-resilience4j/SKILL.md +25 -31
- package/template/.cursor/skills/yss-security-algorithm/SKILL.md +37 -43
- package/template/.cursor/skills/yss-skill-source-index-refresh/SKILL.md +29 -36
- package/template/.cursor/skills/yss-skill-source-index-refresh/references/backend-component-platform-compatibility.md +1 -1
- package/template/.cursor/skills/yss-stage-decision/SKILL.md +2 -5
- package/template/.cursor/skills/yss-tactical-design/SKILL.md +1 -1
- package/template/.cursor/skills/yss-tactical-design/references/output-template.md +3 -3
- package/template/.cursor/skills/yss-tactical-design/references/tactical-design-contract.md +1 -1
- package/template/.cursor/skills/yss-technical-design/SKILL.md +6 -5
- package/template/.cursor/skills/yss-ui/SKILL.md +7 -1
- package/template/.cursor/skills/yss-ui/assets/docs/guide/gitlab-ci-integration.md +2 -2
- package/template/.cursor/skills/yss-ui/references/checklist.md +38 -96
- package/template/.cursor/skills/yss-ui/references/component-routing.md +3 -1
- package/template/.cursor/skills/yss-ui/references/quick-recipes.md +17 -272
- package/template/.cursor/skills/yss-ui/references/specialized-components.md +3 -3
- package/template/.cursor/skills/yss-ui-business-page-generation/SKILL.md +1 -1
- package/template/.cursor/skills/yss-up-springboot3/SKILL.md +19 -21
- package/template/.cursor/skills/yss-userinfo/SKILL.md +27 -33
- package/template/.cursor/skills/yss-validation/SKILL.md +26 -32
- package/template/.cursor/skills/yss-web-controller/SKILL.md +11 -44
- package/template/.cursor/skills/yss-web-controller/references/crud-generation.md +38 -0
- package/template/.cursor/skills/ytable-usage/SKILL.md +2 -2
- package/template/.cursor/skills/ytree-usage/SKILL.md +2 -80
- package/template/.cursor/skills/ytree-usage/references/tree-and-confirmation-example.md +81 -0
- package/template/.pi/skills/alibaba-java-code-style/SKILL.md +30 -36
- package/template/.pi/skills/archify/SKILL.md +2 -2
- package/template/.pi/skills/archify/scripts/yss-safe-deliver.mjs +10 -6
- package/template/.pi/skills/archify/test/yss-safe-deliver.test.mjs +9 -2
- package/template/.pi/skills/code-review/SKILL.md +19 -11
- package/template/.pi/skills/code-review/references/candidate-capture.md +1 -1
- package/template/.pi/skills/code-review/references/legacy-convergence.md +3 -1
- package/template/.pi/skills/code-review/references/review-axis-checklists.md +2 -0
- package/template/.pi/skills/code-review/references/yss-review-standards.md +4 -2
- package/template/.pi/skills/competitive-intelligence/SKILL.md +32 -74
- package/template/.pi/skills/file-export-download/SKILL.md +4 -73
- package/template/.pi/skills/file-export-download/references/binary-contract-example.md +26 -0
- package/template/.pi/skills/file-export-download/references/download-call-example.md +45 -0
- package/template/.pi/skills/formily-foundation/SKILL.md +6 -105
- package/template/.pi/skills/formily-foundation/references/async-save-example.md +57 -0
- package/template/.pi/skills/formily-foundation/references/query-layout.md +50 -0
- package/template/.pi/skills/formily-linkage-effects/SKILL.md +3 -116
- package/template/.pi/skills/formily-linkage-effects/references/linkage-example.md +116 -0
- package/template/.pi/skills/formily-mode-slot-detail/SKILL.md +3 -81
- package/template/.pi/skills/formily-mode-slot-detail/references/mode-slot-example.md +81 -0
- package/template/.pi/skills/formily-step-flow/SKILL.md +3 -143
- package/template/.pi/skills/formily-step-flow/references/step-flow-example.md +143 -0
- package/template/.pi/skills/handoff/SKILL.md +3 -1
- package/template/.pi/skills/i-have-adhd/SKILL.md +2 -2
- package/template/.pi/skills/i-have-adhd/references/yss-adaptation.md +2 -2
- package/template/.pi/skills/i-have-adhd/tests/verify-integration.mjs +7 -2
- package/template/.pi/skills/implement/SKILL.md +2 -2
- package/template/.pi/skills/llm-wiki/references/transactions.md +2 -2
- package/template/.pi/skills/llm-wiki/scripts/core.mjs +40 -2
- package/template/.pi/skills/llm-wiki/scripts/transaction.mjs +30 -27
- package/template/.pi/skills/llm-wiki/scripts/v2.test.mjs +38 -2
- package/template/.pi/skills/lombok/SKILL.md +2 -0
- package/template/.pi/skills/mapstruct/SKILL.md +2 -0
- package/template/.pi/skills/tdd/SKILL.md +2 -2
- package/template/.pi/skills/theme-token-usage/SKILL.md +6 -5
- package/template/.pi/skills/wayfinder/references/chart-map.md +2 -2
- package/template/.pi/skills/wayfinder/references/ticket-types.md +1 -1
- package/template/.pi/skills/yss-api-integration/SKILL.md +13 -50
- package/template/.pi/skills/yss-api-integration/references/orval-list-example.md +38 -0
- package/template/.pi/skills/yss-application/SKILL.md +11 -5
- package/template/.pi/skills/yss-audit-log/SKILL.md +8 -6
- package/template/.pi/skills/yss-audit-log/references/README.md +5 -5
- package/template/.pi/skills/yss-cache/SKILL.md +4 -4
- package/template/.pi/skills/yss-ddd-scaffold-generator/SKILL.md +7 -8
- package/template/.pi/skills/yss-ddd-scaffold-generator/references/USAGE_EXAMPLES.md +13 -6
- package/template/.pi/skills/yss-ddd-scaffold-generator/references/command-examples.md +2 -0
- package/template/.pi/skills/yss-ddd-scaffold-generator/scripts/scaffold-generator.test.mjs +28 -1
- package/template/.pi/skills/yss-design-system/SKILL.md +2 -2
- package/template/.pi/skills/yss-distributed-id/SKILL.md +4 -4
- package/template/.pi/skills/yss-dto/SKILL.md +9 -9
- package/template/.pi/skills/yss-dto/references/README.md +4 -4
- package/template/.pi/skills/yss-dto/references/wire-validation-checklist.md +4 -4
- package/template/.pi/skills/yss-excel-mvc/SKILL.md +4 -4
- package/template/.pi/skills/yss-exception/SKILL.md +42 -48
- package/template/.pi/skills/yss-formily-schema-generator/SKILL.md +26 -170
- package/template/.pi/skills/yss-formily-schema-generator/references/workflow.md +49 -193
- package/template/.pi/skills/yss-frontend-scaffold-generator/SKILL.md +14 -10
- package/template/.pi/skills/yss-implementation-contract-compiler/SKILL.md +2 -6
- package/template/.pi/skills/yss-implementation-contract-compiler/references/yss-skill-execution-result.md +15 -1
- package/template/.pi/skills/yss-layered-mvc-scaffold-generator/SKILL.md +1 -1
- package/template/.pi/skills/yss-mybatis/SKILL.md +4 -4
- package/template/.pi/skills/yss-openapi-draft-review/SKILL.md +6 -4
- package/template/.pi/skills/yss-openapi-draft-review/references/review-output.md +2 -0
- package/template/.pi/skills/yss-openapi-draft-review/references/semantic-review.md +3 -3
- package/template/.pi/skills/yss-openapi-governance/SKILL.md +5 -7
- package/template/.pi/skills/yss-openapi-governance/references/governance-output.md +2 -0
- package/template/.pi/skills/yss-openapi-governance/references/governance-workflow.md +3 -3
- package/template/.pi/skills/yss-product-lifecycle/SKILL.md +23 -21
- package/template/.pi/skills/yss-product-lifecycle/references/artifact-dependencies.md +1 -1
- package/template/.pi/skills/yss-product-lifecycle/references/matt-yss-adapter.md +25 -5
- package/template/.pi/skills/yss-product-lifecycle/references/orchestration-contract.yaml +100 -4
- package/template/.pi/skills/yss-product-lifecycle/references/orchestration.md +35 -12
- package/template/.pi/skills/yss-product-lifecycle/references/state-model.md +3 -1
- package/template/.pi/skills/yss-product-lifecycle/references/user-decisions.md +3 -3
- package/template/.pi/skills/yss-prototype-stage/SKILL.md +1 -5
- package/template/.pi/skills/yss-repository/SKILL.md +2 -2
- package/template/.pi/skills/yss-research/SKILL.md +39 -48
- package/template/.pi/skills/yss-research/assets/competitive-evidence-template.yaml +146 -0
- package/template/.pi/skills/yss-research/references/competitive-analysis.md +76 -0
- package/template/.pi/skills/yss-research/references/competitive-analysis.schema.json +324 -0
- package/template/.pi/skills/yss-research/references/evidence-contract.md +8 -0
- package/template/.pi/skills/yss-research/scripts/lib/competitive-analysis.mjs +185 -0
- package/template/.pi/skills/yss-research/scripts/render-competitive-outputs.mjs +16 -0
- package/template/.pi/skills/yss-research/scripts/validate-research-package.mjs +6 -2
- package/template/.pi/skills/yss-research/tests/competitive-scenarios.test.mjs +270 -0
- package/template/.pi/skills/yss-resilience4j/SKILL.md +25 -31
- package/template/.pi/skills/yss-security-algorithm/SKILL.md +37 -43
- package/template/.pi/skills/yss-skill-source-index-refresh/SKILL.md +29 -36
- package/template/.pi/skills/yss-skill-source-index-refresh/references/backend-component-platform-compatibility.md +1 -1
- package/template/.pi/skills/yss-stage-decision/SKILL.md +2 -5
- package/template/.pi/skills/yss-tactical-design/SKILL.md +1 -1
- package/template/.pi/skills/yss-tactical-design/references/output-template.md +3 -3
- package/template/.pi/skills/yss-tactical-design/references/tactical-design-contract.md +1 -1
- package/template/.pi/skills/yss-technical-design/SKILL.md +6 -5
- package/template/.pi/skills/yss-ui/SKILL.md +7 -1
- package/template/.pi/skills/yss-ui/assets/docs/guide/gitlab-ci-integration.md +2 -2
- package/template/.pi/skills/yss-ui/references/checklist.md +38 -96
- package/template/.pi/skills/yss-ui/references/component-routing.md +3 -1
- package/template/.pi/skills/yss-ui/references/quick-recipes.md +17 -272
- package/template/.pi/skills/yss-ui/references/specialized-components.md +3 -3
- package/template/.pi/skills/yss-ui-business-page-generation/SKILL.md +1 -1
- package/template/.pi/skills/yss-up-springboot3/SKILL.md +19 -21
- package/template/.pi/skills/yss-userinfo/SKILL.md +27 -33
- package/template/.pi/skills/yss-validation/SKILL.md +26 -32
- package/template/.pi/skills/yss-web-controller/SKILL.md +11 -44
- package/template/.pi/skills/yss-web-controller/references/crud-generation.md +38 -0
- package/template/.pi/skills/ytable-usage/SKILL.md +2 -2
- package/template/.pi/skills/ytree-usage/SKILL.md +2 -80
- package/template/.pi/skills/ytree-usage/references/tree-and-confirmation-example.md +81 -0
- package/template/.template-spec/agents/backend-architecture-profiles.md +1 -1
- package/template/.template-spec/agents/digital-human-roles.md +5 -1
- package/template/.template-spec/agents/digital-human-roles.yaml +49 -1
- package/template/.template-spec/engineering/backend-platforms.json +1 -1
- package/template/.template-spec/plan/templates/competitive-analysis-template.md +38 -36
- package/template/.template-spec/plan/templates/competitive-matrix-template.md +37 -17
- package/template/.template-spec/process/document-writing.md +22 -3
- package/template/.template-spec/process/harness-process-tailoring.md +5 -1
- package/template/.template-spec/process/implementation-repo-integration.md +26 -8
- package/template/.template-spec/process/research-completion.md +2 -0
- package/template/.template-spec/process/runtime-storage.md +78 -0
- package/template/.template-spec/process/schemas/approval-context.schema.json +67 -0
- package/template/.template-spec/process/schemas/approval-record.schema.json +179 -16
- package/template/.template-spec/process/schemas/backend-delivery.schema.json +16 -0
- package/template/.template-spec/process/schemas/delivery-preflight-input.schema.json +4 -0
- package/template/.template-spec/process/schemas/digital-human-task-package.schema.json +236 -1
- package/template/.template-spec/process/schemas/implementation-repository-preparation-result.schema.json +335 -52
- package/template/.template-spec/process/schemas/lifecycle-checkpoint.schema.json +11 -0
- package/template/.template-spec/process/schemas/project-scaffold-contract.schema.json +3 -0
- package/template/.template-spec/process/schemas/review-bundle.schema.json +347 -35
- package/template/.template-spec/process/schemas/strategic-design-handoff-v3.schema.json +504 -0
- package/template/.template-spec/process/schemas/strategic-design-handoff-v4.schema.json +544 -8
- package/template/.template-spec/process/schemas/strategic-design-handoff-v5.schema.json +616 -0
- package/template/.template-spec/process/schemas/strategic-design-handoff.schema.json +616 -0
- package/template/.template-spec/process/schemas/strategic-handoff-domain-strategy-v3.schema.json +712 -109
- package/template/.template-spec/process/schemas/strategic-handoff-domain-strategy.schema.json +595 -90
- package/template/.template-spec/process/schemas/strategic-handoff-export-v2.schema.json +448 -0
- package/template/.template-spec/process/schemas/strategic-handoff-export.schema.json +392 -0
- package/template/.template-spec/process/schemas/strategic-handoff-stage-decision-package-v3.schema.json +556 -83
- package/template/.template-spec/process/schemas/strategic-handoff-stage-decision-package.schema.json +418 -57
- package/template/.template-spec/process/subagent-collaboration.md +7 -1
- package/template/.template-spec/templates/approval-record-template.json +7 -3
- package/template/.template-spec/templates/approval-record-template.yaml +8 -2
- package/template/.template-spec/templates/examples/lifecycle-writing-examples.md +92 -2
- package/template/.template-spec/templates/retro-report-template.md +10 -3
- package/template/.template-spec/templates/review-bundle-template.yaml +19 -10
- package/template/AGENTS.md +4 -3
- package/template/CONTEXT.md +2 -2
- package/template/README.md +2 -2
- package/template/scripts/advance-maintenance-iteration +51 -0
- package/template/scripts/lib/approval-checkpoint-discovery.mjs +26 -0
- package/template/scripts/lib/approval-consumption.mjs +35 -0
- package/template/scripts/lib/approval-current.mjs +111 -0
- package/template/scripts/lib/approval-record-io.mjs +56 -0
- package/template/scripts/lib/approval-record.mjs +79 -184
- package/template/scripts/lib/approved-execution-context.mjs +8 -6
- package/template/scripts/lib/asset-transactions.mjs +5 -1
- package/template/scripts/lib/backend-delivery.mjs +1 -1
- package/template/scripts/lib/backend-review.mjs +2 -1
- package/template/scripts/lib/backend-scaffold-prerequisites.mjs +3 -2
- package/template/scripts/lib/business-ticket-lifecycle.mjs +2 -1
- package/template/scripts/lib/checkpoint-commit.mjs +50 -0
- package/template/scripts/lib/command-runner.mjs +44 -9
- package/template/scripts/lib/content-identity.mjs +273 -0
- package/template/scripts/lib/delivery-preflight.mjs +2 -1
- package/template/scripts/lib/digital-human-roles.mjs +12 -5
- package/template/scripts/lib/drift-report.mjs +110 -0
- package/template/scripts/lib/existing-backend-architecture.mjs +4 -1
- package/template/scripts/lib/lifecycle-context-query.mjs +172 -11
- package/template/scripts/lib/lifecycle-controls.mjs +9 -19
- package/template/scripts/lib/lifecycle-presentation.mjs +5 -0
- package/template/scripts/lib/lifecycle-status.mjs +63 -12
- package/template/scripts/lib/lifecycle-transition.mjs +2 -1
- package/template/scripts/lib/maintenance-candidate.mjs +24 -30
- package/template/scripts/lib/maintenance-research.mjs +52 -8
- package/template/scripts/lib/maintenance-storage.mjs +81 -0
- package/template/scripts/lib/plan-spec-entry.mjs +2 -1
- package/template/scripts/lib/project-governance.mjs +2 -1
- package/template/scripts/lib/read-only-intake.mjs +44 -9
- package/template/scripts/lib/review-capabilities.mjs +234 -0
- package/template/scripts/lib/review-package.mjs +100 -0
- package/template/scripts/lib/runtime-store.mjs +650 -0
- package/template/scripts/lib/skill-registry.mjs +4 -4
- package/template/scripts/lib/strategic-handoff.mjs +22 -9
- package/template/scripts/lib/task-package.mjs +47 -16
- package/template/scripts/lifecycle-status +26 -1
- package/template/scripts/maintenance-path +11 -0
- package/template/scripts/prepare-review-package +8 -0
- package/template/scripts/project-ci +13 -3
- package/template/scripts/query-lifecycle-context +8 -1
- package/template/scripts/run-read-only-intake +2 -2
- package/template/scripts/runtime-store +40 -0
- package/template/scripts/verify-approval-record +21 -13
- package/template/scripts/verify-lifecycle-checkpoint +7 -3
- package/template/scripts/verify-project-instance +21 -1
- package/template/skills-lock.json +62 -61
- package/template.snapshot.json +4 -4
- package/vendor/cli-core/cli.mjs +2 -0
- package/vendor/cli-core/command-runner.mjs +44 -9
- package/vendor/cli-core/package.json +1 -1
- package/vendor/cli-core/runtime-store.mjs +650 -0
- package/vendor/cli-core/scaffold.mjs +4 -2
|
@@ -5,52 +5,46 @@ description: "接入或排查 YSS CurrentUserProvider、已认证 SecurityContex
|
|
|
5
5
|
|
|
6
6
|
# yss-userinfo
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
处理已认证当前用户、受信网关适配、自定义 `CurrentUserProvider` 和后台空上下文;身份来源须符合当前平台契约。
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
## 平台与源码门禁
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
接入、修改、代码生成或提供精确类名/配置前,必须读取并执行 [共享平台与源码门禁](../yss-skill-source-index-refresh/references/backend-component-platform-compatibility.md),以 `--skill yss-userinfo` 校验批准的平台线及匹配源码根。缺失、错配或漂移返回 `blocked`;不跨代回退,不在业务实现中升级、降级或替换组件。只读分诊可继续,但须标注未完成源码核验,不能据此宣称跨 Boot/JDK 兼容。
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
- Generated index: `references/source-index.md`
|
|
16
|
-
- Component path hints: `yss-microservice-components/yss-component-userinfo-starter`
|
|
14
|
+
## 源码定位
|
|
17
15
|
|
|
18
|
-
|
|
16
|
+
按 [源码定位策略](../yss-skill-source-index-refresh/references/source-location.md) 确认真实位置,再从 [平台索引](references/source-index.md) 定位当前任务需要的源码。`yss-microservice-components/yss-component-userinfo-starter` 仅是模块路径提示。
|
|
19
17
|
|
|
20
|
-
##
|
|
18
|
+
## 工作流
|
|
21
19
|
|
|
22
20
|
1. 先按已批准平台线读取对应索引;以下当前行为针对 `boot3-java17`,Boot 2 旧工程只按其独立索引做只读分诊和迁移。
|
|
23
|
-
2.
|
|
24
|
-
3.
|
|
21
|
+
2. 区分已认证当前用户、显式受信网关、自定义 `CurrentUserProvider` 与非 REST/后台 fallback。
|
|
22
|
+
3. 按所选任务核验 `CurrentUserProvider`、对应 provider、兼容 facade `AuthUserInfoUtil` 及 `DmUser` / `DmUserDetails`,不无条件读取所有实现。
|
|
25
23
|
4. 默认使用 `SecurityContextCurrentUserProvider`,只消费 Spring Security 已认证且非 anonymous 的 `Authentication`。JWT 的 signature、issuer、audience、expiry 与算法校验必须在资源服务器认证链完成。
|
|
26
24
|
5. `AuthUserInfoUtil` 是由 `CurrentUserProvider` 驱动的兼容 facade;业务代码可继续调用 `userInfo()`、`userName()`、`userCode()` 或 `currentUserJson()`,但不得自行解析 Header、JWT payload 或 Redis 身份缓存。
|
|
27
25
|
6. 只有显式启用 `yss.userinfo.trusted-gateway.enabled` 且配置非空 `trusted-proxies` 时,才启用 `TrustedGatewayHeaderCurrentUserProvider`;它只接受 remote address 在 allow-list 中的请求,并且 SecurityContext 结果优先。
|
|
28
|
-
7.
|
|
29
|
-
|
|
30
|
-
## Source-Backed Notes
|
|
26
|
+
7. 定时/后台任务的 provider 为空时,兼容 facade 返回独立的 `system` fallback;它不是已认证 system principal。
|
|
31
27
|
|
|
32
|
-
|
|
33
|
-
- Trusted gateway header names are `X-Username`, `X-Usercode`, and `X-LoginDisplayName`; the adapter requires a trusted proxy allow-list and a nonblank username.
|
|
34
|
-
- `UserInfoAutoConfiguration` installs SecurityContext as the default and composes the optional gateway provider behind it. A project-supplied `CurrentUserProvider` remains the explicit extension seam.
|
|
35
|
-
- The Boot 3 component does not parse an unverified Bearer payload and does not use Redis as an authentication fallback. Cache behavior is outside this identity provider contract.
|
|
28
|
+
## 平台行为核验
|
|
36
29
|
|
|
37
|
-
|
|
30
|
+
- `SecurityContextCurrentUserProvider` 支持 `UserInfo` principal 与已认证的 `OAuth2AuthenticatedPrincipal`;claim 映射在认证后进行。
|
|
31
|
+
- 受信网关 Header 为 `X-Username`、`X-Usercode` 和 `X-LoginDisplayName`;适配器要求可信代理 allow-list 与非空 username。
|
|
32
|
+
- `UserInfoAutoConfiguration` 默认使用 SecurityContext,再组合可选网关 provider;工程自定义 `CurrentUserProvider` 是显式扩展 seam。
|
|
33
|
+
- Boot 3 不解析未验证 Bearer payload,不以 Redis 作为认证 fallback;缓存行为不属于此身份 provider 合同。
|
|
38
34
|
|
|
39
|
-
|
|
40
|
-
- Request context exists before relying on servlet headers.
|
|
41
|
-
- Spring Security has authenticated the request before the provider reads the principal.
|
|
42
|
-
- When trusted gateway mode is enabled, at least one proxy address is allow-listed and untrusted remote addresses are rejected.
|
|
43
|
-
- Business code does not duplicate JWT or header parsing logic.
|
|
44
|
-
- SecurityContext/gateway/background precedence and empty-result behavior are covered by tests; `system` fallback is distinguished from an authenticated system user.
|
|
45
|
-
- User info propagation is tested for REST calls and async/background execution separately.
|
|
35
|
+
## 验收
|
|
46
36
|
|
|
47
|
-
|
|
37
|
+
- 核验所需依赖或 starter 已进入实际工程。
|
|
38
|
+
- 使用 Servlet Header 前核验 request context 存在。
|
|
39
|
+
- Provider 读取 principal 前,Spring Security 已完成请求认证。
|
|
40
|
+
- 受信网关启用时,至少一个代理地址进入 allow-list,且拒绝不可信 remote address。
|
|
41
|
+
- 业务代码不重复 JWT 或 Header 解析。
|
|
42
|
+
- 测试覆盖 SecurityContext/网关/后台的优先级与空结果,区分 `system` fallback 和已认证 system 用户。
|
|
43
|
+
- REST 与异步/后台执行分别验证用户信息传播。
|
|
48
44
|
|
|
49
|
-
|
|
50
|
-
- Do not replace component extension points with business-local framework code.
|
|
51
|
-
- Do not treat raw `Authorization` payloads or gateway headers as authenticated identity.
|
|
52
|
-
- Do not broaden the task into unrelated YSS components unless the user asks.
|
|
53
|
-
|
|
54
|
-
## 平台与源码门禁
|
|
45
|
+
## 修改边界
|
|
55
46
|
|
|
56
|
-
|
|
47
|
+
- 类名和配置 key 先核验当前索引与源码,不凭记忆补造。
|
|
48
|
+
- 使用组件已有扩展 seam,不以业务本地框架代码替换。
|
|
49
|
+
- 原始 `Authorization` payload 与网关 Header 不能直接作为已认证身份。
|
|
50
|
+
- 保持当前组件任务范围;扩展到其他组件须有用户要求或重新路由依据。
|
|
@@ -5,52 +5,46 @@ description: "接入或排查 YSS Bean Validation、校验消息与校验错误
|
|
|
5
5
|
|
|
6
6
|
# yss-validation
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
处理 YSS Bean Validation 注解、消息资源和校验失败映射;先区分 DTO 校验与当前不可用的历史 EL/parser 请求。
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
## 平台与源码门禁
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
接入、修改、代码生成或提供精确类名/配置前,必须读取并执行 [共享平台与源码门禁](../yss-skill-source-index-refresh/references/backend-component-platform-compatibility.md),以 `--skill yss-validation` 校验批准的平台线及匹配源码根。缺失、错配或漂移返回 `blocked`;不跨代回退,不在业务实现中升级、降级或替换组件。只读分诊可继续,但须标注未完成源码核验,不能据此宣称跨 Boot/JDK 兼容。
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
- Generated index: `references/source-index.md`
|
|
16
|
-
- Component path hints: `yss-microservice-components/yss-component-validation-jsr303`
|
|
14
|
+
## 源码定位
|
|
17
15
|
|
|
18
|
-
|
|
16
|
+
按 [源码定位策略](../yss-skill-source-index-refresh/references/source-location.md) 确认真实位置,再从 [平台索引](references/source-index.md) 定位当前任务需要的源码。`yss-microservice-components/yss-component-validation-jsr303` 仅是模块路径提示。
|
|
19
17
|
|
|
20
|
-
##
|
|
18
|
+
## 工作流
|
|
21
19
|
|
|
22
|
-
1.
|
|
23
|
-
2.
|
|
20
|
+
1. 区分 JSR-303 注解校验与表达式/EL parser 请求。
|
|
21
|
+
2. 从批准平台索引核验实际 POM、校验消息资源、消费 Controller 注解及匹配的异常 Advice。当前模块 README 为空,不作为前置证据。
|
|
24
22
|
3. 当前组件仓不存在历史 `yss-component-validation-engine-parent`;表达式、LiteFlow EL 或 `ExpressParserFactory` 请求返回 `blocked`,先确认真实组件来源和生命周期影响,不以旧索引或通用知识生成实现。
|
|
25
|
-
4.
|
|
23
|
+
4. 校验失败映射保持当前工程的 service/API 错误合同。
|
|
26
24
|
5. 消费工程基线选择 javax/jakarta,不自行升级 Java/Boot。MVC 输入校验放在 server/client,业务不变量由 service/core 验证;不生成 DDD Domain。HTTP 失败形态由 server 的合同测试验证。
|
|
27
25
|
|
|
28
|
-
##
|
|
26
|
+
## 能力边界
|
|
29
27
|
|
|
30
|
-
- `validation-jsr303
|
|
28
|
+
- `validation-jsr303` 当前聚合依赖与消息资源,没有本地 Validator、Advice 或自动配置 Java 实现。
|
|
31
29
|
- 历史 `validation-el-parser` / `ExpressParserFactory`:当前源码根不存在,状态为 `blocked`,不得作为可用 capability。
|
|
32
30
|
|
|
33
|
-
##
|
|
34
|
-
|
|
35
|
-
- If an EL/parser capability is requested, stop and resolve its actual repository/module instead of assuming the removed path.
|
|
36
|
-
- If validation annotations do not fire, check controller/service validation annotations and Spring validation starter wiring before editing parser code.
|
|
37
|
-
- The component README is empty; use the POM, message resources, Controller annotations, and `GlobalExceptionAdvice` as current evidence.
|
|
38
|
-
- If behavior differs between expression validation and DTO validation, route the problem to the correct submodule first.
|
|
31
|
+
## 排障
|
|
39
32
|
|
|
40
|
-
|
|
33
|
+
- EL/parser 请求停止实施并确认真实仓库/模块,不假设已移除路径仍存在。
|
|
34
|
+
- 注解未生效时先检查 Controller/service 校验注解和 Spring validation starter 装配,不先改 parser 代码。
|
|
35
|
+
- 当前证据使用 POM、消息资源、Controller 注解和 `GlobalExceptionAdvice`。
|
|
36
|
+
- 表达式校验与 DTO 校验行为不一致时先确认对应模块,再路由问题。
|
|
41
37
|
|
|
42
|
-
|
|
43
|
-
- JSR-303 and unavailable expression-validation requests are not mixed in the same fix.
|
|
44
|
-
- No class, parser or configuration is attributed to the absent historical module.
|
|
45
|
-
- Validation errors preserve readable messages for Chinese business users.
|
|
46
|
-
- Existing project conventions are reused before adding new wrappers.
|
|
38
|
+
## 验收
|
|
47
39
|
|
|
48
|
-
|
|
40
|
+
- 核验所需依赖或 starter 已进入实际工程。
|
|
41
|
+
- JSR-303 与不可用的表达式校验不混入同一整改。
|
|
42
|
+
- 不将类、parser 或配置归给不存在的历史模块。
|
|
43
|
+
- 校验错误保留中文业务用户可理解的消息。
|
|
44
|
+
- 新增包装前先复用工程既有约定。
|
|
49
45
|
|
|
50
|
-
|
|
51
|
-
- Do not replace component extension points with business-local framework code.
|
|
52
|
-
- Do not broaden the task into unrelated YSS components unless the user asks.
|
|
53
|
-
|
|
54
|
-
## 平台与源码门禁
|
|
46
|
+
## 修改边界
|
|
55
47
|
|
|
56
|
-
|
|
48
|
+
- 类名和配置 key 先核验当前索引与源码,不凭记忆补造。
|
|
49
|
+
- 使用组件已有扩展 seam,不以业务本地框架代码替换。
|
|
50
|
+
- 保持当前组件任务范围;扩展到其他组件须有用户要求或重新路由依据。
|
|
@@ -5,13 +5,17 @@ description: "按冻结合同与稳定 Application 接口生成或重构 YSS Con
|
|
|
5
5
|
|
|
6
6
|
# yss-web-controller
|
|
7
7
|
|
|
8
|
-
##
|
|
8
|
+
## 任务分流
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
- 只读审计读取实际入口和现有契约,缺用例 seam、契约或批准证据时记录缺口;不要求先补 Slice、生成 Manifest 或 metadata。
|
|
11
|
+
- 既有整改消费批准且当前的 Slice、冻结 API/no-impact 与稳定用例 seam;缺必要输入回实现合同编译器补齐。
|
|
12
|
+
- 仅新建 CRUD 要求 Web generation contract、metadata 并调用 initialize-only 生成器。认证、回调、Cookie、下载或流式接口可手工适配,不强制 CRUD 脚本或 metadata。
|
|
11
13
|
|
|
12
|
-
|
|
14
|
+
## 架构分流
|
|
15
|
+
|
|
16
|
+
将 `architecture_identity` 与当前工程基线和仓库登记核对;仅生成式来源核对脚手架 Manifest,既有来源使用登记及独立工程观测。再且只读取 `references/profiles/<architecture_profile>.md`。生成式分支为 target-domain-model、layered-mvc-service、mvc-data-analysis-v1;既有分支为 existing-domain-driven-maven、existing-layered-mvc-maven。成熟度以注册表为准,不能把 draft 称为受支持。MVC 不执行下文 DDD 专属规则,也不加载其分层 guide;组件、安全、批准合同、允许路径及执行证据规则共用。
|
|
13
17
|
|
|
14
|
-
|
|
18
|
+
以下 Application / Domain Gateway / Infrastructure / Web module 叙述仅适用于 target-domain-model;MVC 的 service/core/repository/server/client 所有权由所选 Profile 引用定义。
|
|
15
19
|
|
|
16
20
|
## 何时使用
|
|
17
21
|
|
|
@@ -19,46 +23,9 @@ description: "按冻结合同与稳定 Application 接口生成或重构 YSS Con
|
|
|
19
23
|
- 用户要根据冻结 OpenAPI 字段合同、metadata 和稳定 Application 接口生成 Request / Response / Controller / WebConvertor。
|
|
20
24
|
- 用户要求统一 Web Adapter 风格、返回值和接口路径。
|
|
21
25
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
- 只读审计可以记录用例 seam 或契约缺失。既有整改缺少批准 Slice、稳定用例 seam 或接口契约时,回实现合同编译器补齐;仅新建 CRUD 生成要求 metadata,不因缺 metadata 拒绝既有代码审计或手工接口整改。
|
|
27
|
-
|
|
28
|
-
## 新建 CRUD 生成流程
|
|
29
|
-
|
|
30
|
-
1. 先确认冻结 OpenAPI、批准且版本当前的 Web generation contract schema v2、Application Service 接口、metadata、基础包、模块名、领域 segment 和 web 落盘目录;合同必须绑定 Slice `contract_id` / `contract_version` / `slice_id`、`yss-dto` wire profile 引用与 digest、允许写路径、证据与验证命令。
|
|
31
|
-
2. 加载并遵守 `yss-dto` 与 `yss-validation`;错误映射影响命中时再加载 `yss-exception`。
|
|
32
|
-
3. 涉及 DTO / VO / CMD / Query POJO 样板代码时,加载并遵守 `lombok`。
|
|
33
|
-
4. 涉及 Domain / Application Result 到 VO / DTO 或 CMD / Query 到输入模型的转换时,加载并遵守 `mapstruct`。
|
|
34
|
-
5. 运行 `node scripts/generate_controller.mjs`。
|
|
35
|
-
6. 生成后检查路径、命名、返回值包装、Application Service 引用、`@Valid`、Lombok 注解和 MapStruct WebConvertor 是否对齐项目。
|
|
36
|
-
7. 对复杂接口做少量手工修正,不在 skill 中承诺自动覆盖全部业务逻辑。
|
|
37
|
-
|
|
38
|
-
## 推荐命令
|
|
39
|
-
|
|
40
|
-
```bash
|
|
41
|
-
node scripts/generate_controller.mjs \
|
|
42
|
-
--metadata-file /path/metadata.json \
|
|
43
|
-
--contract-file /path/approved-web-generation-contract.json \
|
|
44
|
-
--dto-wire-profile-file /path/to/yss-dto/references/openapi-wire-profile.yaml \
|
|
45
|
-
--scaffold-manifest-file /path/service/.yss/scaffold-generation.json \
|
|
46
|
-
--base-package com.yss.demo \
|
|
47
|
-
--module-name demo \
|
|
48
|
-
--domain-segment example \
|
|
49
|
-
--web-project-dir /path/demo-adapter/demo-web \
|
|
50
|
-
--application-service-package com.yss.demo.application.service \
|
|
51
|
-
--validation-namespace <resolved-platform-namespace>
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
## 输出预期
|
|
55
|
-
|
|
56
|
-
- `rest/dto/request/*CreateRequest.java`
|
|
57
|
-
- `rest/dto/request/*UpdateRequest.java`
|
|
58
|
-
- `rest/dto/request/*PageRequest.java`
|
|
59
|
-
- `rest/dto/response/*Response.java`
|
|
60
|
-
- `rest/*Controller.java`
|
|
61
|
-
- `rest/convertor/*WebConvertor.java`
|
|
26
|
+
## 新建 CRUD 生成
|
|
27
|
+
|
|
28
|
+
仅新建 CRUD 在输入齐备后必须读取 [生成流程与命令](references/crud-generation.md),核验 schema v2 Web generation contract、metadata、绑定的 wire profile 与允许路径,再运行 initialize-only 生成器并检查完整输出。复杂接口仍按批准合同补足实现,不以生成成功替代行为验证。
|
|
62
29
|
|
|
63
30
|
## 约束
|
|
64
31
|
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# 新建 CRUD 生成与核验
|
|
2
|
+
|
|
3
|
+
仅在新建 CRUD 且入口的批准合同、冻结 API 与稳定用例 seam 已齐备时读取。只读审计、既有整改和手工协议适配不运行初始化生成器。以下命令从 Skill 根目录执行;参数消费当前合同与工程平台解析值,示例不授予写入或覆盖权限。
|
|
4
|
+
|
|
5
|
+
## 新建 CRUD 生成流程
|
|
6
|
+
|
|
7
|
+
1. 先确认冻结 OpenAPI、批准且版本当前的 Web generation contract schema v2、Application Service 接口、metadata、基础包、模块名、领域 segment 和 web 落盘目录;合同必须绑定 Slice `contract_id` / `contract_version` / `slice_id`、`yss-dto` wire profile 引用与 digest、允许写路径、证据与验证命令。
|
|
8
|
+
2. 加载并遵守 `yss-dto` 与 `yss-validation`;错误映射影响命中时再加载 `yss-exception`。
|
|
9
|
+
3. 涉及 DTO / VO / CMD / Query POJO 样板代码时,加载并遵守 `lombok`。
|
|
10
|
+
4. 涉及 Domain / Application Result 到 VO / DTO 或 CMD / Query 到输入模型的转换时,加载并遵守 `mapstruct`。
|
|
11
|
+
5. 运行 `node scripts/generate_controller.mjs`。
|
|
12
|
+
6. 生成后检查路径、命名、返回值包装、Application Service 引用、`@Valid`、Lombok 注解和 MapStruct WebConvertor 是否对齐项目。
|
|
13
|
+
7. 对复杂接口做少量手工修正,不在 skill 中承诺自动覆盖全部业务逻辑。
|
|
14
|
+
|
|
15
|
+
## 推荐命令
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
node scripts/generate_controller.mjs \
|
|
19
|
+
--metadata-file /path/metadata.json \
|
|
20
|
+
--contract-file /path/approved-web-generation-contract.json \
|
|
21
|
+
--dto-wire-profile-file /path/to/yss-dto/references/openapi-wire-profile.yaml \
|
|
22
|
+
--scaffold-manifest-file /path/service/.yss/scaffold-generation.json \
|
|
23
|
+
--base-package com.yss.demo \
|
|
24
|
+
--module-name demo \
|
|
25
|
+
--domain-segment example \
|
|
26
|
+
--web-project-dir /path/demo-adapter/demo-web \
|
|
27
|
+
--application-service-package com.yss.demo.application.service \
|
|
28
|
+
--validation-namespace <resolved-platform-namespace>
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## 输出预期
|
|
32
|
+
|
|
33
|
+
- `rest/dto/request/*CreateRequest.java`
|
|
34
|
+
- `rest/dto/request/*UpdateRequest.java`
|
|
35
|
+
- `rest/dto/request/*PageRequest.java`
|
|
36
|
+
- `rest/dto/response/*Response.java`
|
|
37
|
+
- `rest/*Controller.java`
|
|
38
|
+
- `rest/convertor/*WebConvertor.java`
|
|
@@ -33,7 +33,7 @@ description: "配置或修复 YSS UI YTable 的列表查询、列、分页、行
|
|
|
33
33
|
- 行键使用 `:row-config="{ keyField: 'id', useKey: true }"`,不臆造 `row-key` Prop。
|
|
34
34
|
- 新增、导入、批量操作等主按钮直接放入 `#toolbar-right` 或 `#toolbar-left` 插槽即可自动渲染工具栏;**无需配置 `:toolbar-config="{ custom: true }"`**,避免无端展示列设置图标;**仅在业务明确需要列设置时才传入 `:toolbar-config="{ custom: true }"`**。
|
|
35
35
|
- 删除、启停、发布等危险操作使用 `actionConfig.buttons[].isConfirm = true`,不默认使用 `Modal.confirm`。
|
|
36
|
-
-
|
|
36
|
+
- 纯列配置集中到 `constant.ts`;需要调用组件 Hook 的操作配置使用工厂函数注入回调,禁止在 `constant.ts` 直接引用组件局部的 `openEdit/deleteItem`。按职责和依赖拆分,不用配置行数决定拆分。
|
|
37
37
|
- 远程筛选必须提供稳定 `filters`,设置 `filterMethod: () => true` 禁用本地二次过滤,并监听 `filter-change`。
|
|
38
38
|
- 自适应滚动列表绑定 `:height="tableHeight"`;`pageable`、工具栏分别对应 `withPagination: true`、`withToolbar: true`。纯短表不强制引入高度 Hook。
|
|
39
39
|
- `mutator.ts` 已对网络错误和 `success === false` 统一 `message.error` 并 reject。API Hook 不再检查 `success === false`,不在 `else/catch` 重复 `message.error`;用 `finally` 恢复 loading,让异常继续中断流程。
|
|
@@ -55,7 +55,7 @@ description: "配置或修复 YSS UI YTable 的列表查询、列、分页、行
|
|
|
55
55
|
## 交付检查清单
|
|
56
56
|
|
|
57
57
|
- [ ] 分页状态和 `page-change` 参数均使用 `current/pageSize`,未使用 `currentPage`;`filter-change` 与 YTable 真实 API 一致。
|
|
58
|
-
- [ ]
|
|
58
|
+
- [ ] 启用多选时,列已配置 `type: 'checkbox'`,已设置 `:row-config="{ keyField: 'xxx', useKey: true }"`,批量按钮绑定了 `selectedRowKeys.length === 0` 禁用。
|
|
59
59
|
- [ ] 批量成功后,所有实际受控选择字段与表格可见勾选均已清空;内部缓存存在时已通过 `clearSelection()` 清除。
|
|
60
60
|
- [ ] 未使用虚构 `request/searchParams/row-key` Props,也未把 `refresh()` 当成远程请求。
|
|
61
61
|
- [ ] 工具栏、字典翻译、操作确认与高度偏移均与实际开关一致。
|
|
@@ -36,87 +36,9 @@ description: "配置或修复 YSS UI YTree 的字段映射、搜索、选中与
|
|
|
36
36
|
- 左树右表优先组合 `YSplitPane + YCard + YTree + YTable`;切换节点时同步查询条件并把右表分页重置为第 1 页。
|
|
37
37
|
- 节点删除 API 的错误由 `mutator.ts` 统一提示并 reject;不在 `else/catch` 重复 `message.error`。
|
|
38
38
|
|
|
39
|
-
##
|
|
39
|
+
## 按需示例
|
|
40
40
|
|
|
41
|
-
|
|
42
|
-
<script setup lang="ts">
|
|
43
|
-
import { ref } from 'vue';
|
|
44
|
-
import { YTree, type YTreeActionItem } from '@yss-ui/components';
|
|
45
|
-
import { useTreeHeight, YTREE_SEARCH_HEIGHT } from '@yss-ui/hooks';
|
|
46
|
-
|
|
47
|
-
/** 树节点数据。 */
|
|
48
|
-
interface TreeNode {
|
|
49
|
-
id: string;
|
|
50
|
-
name: string;
|
|
51
|
-
children?: TreeNode[];
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
const emit = defineEmits<{
|
|
55
|
-
create: [node: TreeNode];
|
|
56
|
-
edit: [node: TreeNode];
|
|
57
|
-
}>();
|
|
58
|
-
const treeAreaRef = ref<HTMLDivElement>();
|
|
59
|
-
const treeData = ref<TreeNode[]>([]);
|
|
60
|
-
const searchValue = ref('');
|
|
61
|
-
const selectedKeys = ref<Array<string | number>>([]);
|
|
62
|
-
const { treeHeight } = useTreeHeight(treeAreaRef, {
|
|
63
|
-
extraOffset: YTREE_SEARCH_HEIGHT,
|
|
64
|
-
});
|
|
65
|
-
|
|
66
|
-
/** 生成当前节点的非危险操作。 */
|
|
67
|
-
const getNodeActions = (): YTreeActionItem[] => [
|
|
68
|
-
{ key: 'add', label: '新增子节点' },
|
|
69
|
-
{ key: 'edit', label: '编辑' },
|
|
70
|
-
];
|
|
71
|
-
|
|
72
|
-
/** 处理 YTree 动作事件。 */
|
|
73
|
-
const handleTreeAction = ({ key, node }: { key: string; node: TreeNode }) => {
|
|
74
|
-
if (key === 'add') emit('create', node);
|
|
75
|
-
if (key === 'edit') emit('edit', node);
|
|
76
|
-
};
|
|
77
|
-
</script>
|
|
78
|
-
|
|
79
|
-
<template>
|
|
80
|
-
<div ref="treeAreaRef" class="tree-area">
|
|
81
|
-
<YTree
|
|
82
|
-
:height="treeHeight"
|
|
83
|
-
:tree-data="treeData"
|
|
84
|
-
:field-names="{ title: 'name', key: 'id', children: 'children' }"
|
|
85
|
-
filterable
|
|
86
|
-
show-actions
|
|
87
|
-
v-model:searchValue="searchValue"
|
|
88
|
-
v-model:selectedKeys="selectedKeys"
|
|
89
|
-
:get-node-actions="getNodeActions"
|
|
90
|
-
@action="handleTreeAction"
|
|
91
|
-
/>
|
|
92
|
-
</div>
|
|
93
|
-
</template>
|
|
94
|
-
|
|
95
|
-
<style scoped lang="less">
|
|
96
|
-
@import './style.less';
|
|
97
|
-
</style>
|
|
98
|
-
```
|
|
99
|
-
|
|
100
|
-
```less
|
|
101
|
-
/* style.less */
|
|
102
|
-
.tree-area {
|
|
103
|
-
flex: 1;
|
|
104
|
-
min-height: 0;
|
|
105
|
-
overflow: hidden;
|
|
106
|
-
}
|
|
107
|
-
```
|
|
108
|
-
|
|
109
|
-
## 删除确认边界
|
|
110
|
-
|
|
111
|
-
```vue
|
|
112
|
-
<template #node-suffix="{ node }">
|
|
113
|
-
<Popconfirm title="确认删除该节点吗?" ok-text="确定" cancel-text="取消" @confirm="handleDelete(node)">
|
|
114
|
-
<YButton type="link" @click.stop>删除</YButton>
|
|
115
|
-
</Popconfirm>
|
|
116
|
-
</template>
|
|
117
|
-
```
|
|
118
|
-
|
|
119
|
-
`Popconfirm` 从 `ant-design-vue` 导入,`YButton` 从 `@yss-ui/components` 导入。如果每个节点都展示删除会过密,把同样的 `Popconfirm` 放到选中节点的页面工具栏。
|
|
41
|
+
首次组合受控树、高度与节点动作,或实现删除确认时,读取 [树与删除确认示例](references/tree-and-confirmation-example.md)。简单字段映射修改无需加载整段示例。
|
|
120
42
|
|
|
121
43
|
## 交付检查清单
|
|
122
44
|
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
## 标准代码骨架
|
|
2
|
+
|
|
3
|
+
```vue
|
|
4
|
+
<script setup lang="ts">
|
|
5
|
+
import { ref } from 'vue';
|
|
6
|
+
import { YTree, type YTreeActionItem } from '@yss-ui/components';
|
|
7
|
+
import { useTreeHeight, YTREE_SEARCH_HEIGHT } from '@yss-ui/hooks';
|
|
8
|
+
|
|
9
|
+
/** 树节点数据。 */
|
|
10
|
+
interface TreeNode {
|
|
11
|
+
id: string;
|
|
12
|
+
name: string;
|
|
13
|
+
children?: TreeNode[];
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
const emit = defineEmits<{
|
|
17
|
+
create: [node: TreeNode];
|
|
18
|
+
edit: [node: TreeNode];
|
|
19
|
+
}>();
|
|
20
|
+
const treeAreaRef = ref<HTMLDivElement>();
|
|
21
|
+
const treeData = ref<TreeNode[]>([]);
|
|
22
|
+
const searchValue = ref('');
|
|
23
|
+
const selectedKeys = ref<Array<string | number>>([]);
|
|
24
|
+
const { treeHeight } = useTreeHeight(treeAreaRef, {
|
|
25
|
+
extraOffset: YTREE_SEARCH_HEIGHT,
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
/** 生成当前节点的非危险操作。 */
|
|
29
|
+
const getNodeActions = (): YTreeActionItem[] => [
|
|
30
|
+
{ key: 'add', label: '新增子节点' },
|
|
31
|
+
{ key: 'edit', label: '编辑' },
|
|
32
|
+
];
|
|
33
|
+
|
|
34
|
+
/** 处理 YTree 动作事件。 */
|
|
35
|
+
const handleTreeAction = ({ key, node }: { key: string; node: TreeNode }) => {
|
|
36
|
+
if (key === 'add') emit('create', node);
|
|
37
|
+
if (key === 'edit') emit('edit', node);
|
|
38
|
+
};
|
|
39
|
+
</script>
|
|
40
|
+
|
|
41
|
+
<template>
|
|
42
|
+
<div ref="treeAreaRef" class="tree-area">
|
|
43
|
+
<YTree
|
|
44
|
+
:height="treeHeight"
|
|
45
|
+
:tree-data="treeData"
|
|
46
|
+
:field-names="{ title: 'name', key: 'id', children: 'children' }"
|
|
47
|
+
filterable
|
|
48
|
+
show-actions
|
|
49
|
+
v-model:searchValue="searchValue"
|
|
50
|
+
v-model:selectedKeys="selectedKeys"
|
|
51
|
+
:get-node-actions="getNodeActions"
|
|
52
|
+
@action="handleTreeAction"
|
|
53
|
+
/>
|
|
54
|
+
</div>
|
|
55
|
+
</template>
|
|
56
|
+
|
|
57
|
+
<style scoped lang="less">
|
|
58
|
+
@import './style.less';
|
|
59
|
+
</style>
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
```less
|
|
63
|
+
/* style.less */
|
|
64
|
+
.tree-area {
|
|
65
|
+
flex: 1;
|
|
66
|
+
min-height: 0;
|
|
67
|
+
overflow: hidden;
|
|
68
|
+
}
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
## 删除确认边界
|
|
72
|
+
|
|
73
|
+
```vue
|
|
74
|
+
<template #node-suffix="{ node }">
|
|
75
|
+
<Popconfirm title="确认删除该节点吗?" ok-text="确定" cancel-text="取消" @confirm="handleDelete(node)">
|
|
76
|
+
<YButton type="link" @click.stop>删除</YButton>
|
|
77
|
+
</Popconfirm>
|
|
78
|
+
</template>
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
`Popconfirm` 从 `ant-design-vue` 导入,`YButton` 从 `@yss-ui/components` 导入。如果每个节点都展示删除会过密,把同样的 `Popconfirm` 放到选中节点的页面工具栏。
|
|
@@ -3,50 +3,44 @@ name: alibaba-java-code-style
|
|
|
3
3
|
description: 应用阿里巴巴 Java 手册审查或实现 Java 代码;按当前项目框架与数据库基线选择适用规范。
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
#
|
|
6
|
+
# 阿里巴巴 Java 规范
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
本 Skill 从用户提供的《阿里巴巴 Java 开发手册》1.4.0 提炼适用规范。`mandatory` 违规阻断审查,除非仓库 `AGENTS.md`、安全约束或现有框架约定明确要求不同模式;例外须有依据。`recommended` / `reference` 保留建议等级,不因进入下文检查提要变为强制规则。
|
|
9
9
|
|
|
10
|
-
##
|
|
10
|
+
## 工作流
|
|
11
11
|
|
|
12
|
-
1.
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
2. Apply mandatory rules first, then use recommended rules to improve maintainability, performance, and readability.
|
|
17
|
-
3. When reviewing, report mandatory violations as findings. Mention recommended violations when they create real risk or are already in the changed area.
|
|
18
|
-
4. When implementing, prefer the repository's existing framework helpers and code generation skills over inventing new local infrastructure.
|
|
19
|
-
5. For auth, payment, encryption, SQL, migrations or public-library changes, check the current contract and actual authorization. Continue an already authorized repair with its required verification; produce a draft or `TODO-HUMAN-REVIEW` only for a real missing decision or approval, and identify that gap.
|
|
12
|
+
1. 按影响面读取对应规范:Java 命名、常量、OOP、集合、并发、控制流和注释读 [Java 编程](references/java-programming.md);异常、日志、测试或安全读 [可靠性与安全](references/reliability-test-security.md);MySQL、ORM/MyBatis、Maven、分层、服务器/JVM 或设计资产读 [工程与数据库](references/database-engineering-design.md)。
|
|
13
|
+
2. 先执行适用 mandatory,再按实际风险采用 recommended;审查报告保留规则等级。建议仅在产生真实风险或处于本次范围时报告。
|
|
14
|
+
3. 实现优先复用工程框架与已有生成能力,不新增重复基础设施。
|
|
15
|
+
4. 认证、付款、加密、SQL、迁移或公共库变更先核验当前合同及实际授权。已授权修复继续完成适用验证;仅真实缺决定或批准时形成草案 / `TODO-HUMAN-REVIEW`,并说明缺口。
|
|
20
16
|
|
|
21
|
-
##
|
|
17
|
+
## 适用原则
|
|
22
18
|
|
|
23
19
|
- 先消费 architecture_identity 与工程 Java/数据库基线。MVC 分层按 `.template-spec/agents/backend-architecture-profiles.md`;MySQL 专属方言规则仅对批准的 MySQL 存储生效,不能要求 H2 骨架引入 MySQL 驱动。YSS 包装、命名及处理器差异逐项记录基线例外,安全、权限、敏感信息与 SQL 参数绑定不得豁免。
|
|
24
|
-
-
|
|
25
|
-
-
|
|
26
|
-
-
|
|
27
|
-
-
|
|
28
|
-
-
|
|
29
|
-
-
|
|
30
|
-
|
|
31
|
-
##
|
|
32
|
-
|
|
33
|
-
-
|
|
34
|
-
-
|
|
35
|
-
-
|
|
36
|
-
-
|
|
37
|
-
-
|
|
38
|
-
-
|
|
39
|
-
-
|
|
40
|
-
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
Based on the user-provided PDF: `阿里巴巴 Java 开发手册` version 1.4.0, Alibaba Group technical team, update date 2018-05-20.
|
|
20
|
+
- 名称使用清晰英文标识并遵循当前 Java 分层约定。
|
|
21
|
+
- 核验 null、相等、包装类型比较、集合和并发的运行时边界,不能以编译通过代替行为正确。
|
|
22
|
+
- 日志有诊断用途,并控制 CPU、磁盘和告警成本。
|
|
23
|
+
- 单元测试自动、独立、可重复,围绕公开行为验证。
|
|
24
|
+
- SQL 使用参数绑定与显式 ORM 映射,不依赖字符串拼接。
|
|
25
|
+
- 按已登记架构保持职责:Web/controller 校验和适配,service/manager 编排业务,DAO/repository 持有持久化。
|
|
26
|
+
|
|
27
|
+
## 检查提要
|
|
28
|
+
|
|
29
|
+
- 命名与格式:camel case、常量、包名、括号、间距、行长、UTF-8/Unix 换行;类型后缀和 boolean 命名符合适用规范。
|
|
30
|
+
- 对象语义:`equals/hashCode`、包装类型比较、`toString`、`serialVersionUID`、构造器、可见性和访问器。
|
|
31
|
+
- 集合:`subList`、`Arrays.asList`、`toArray`、foreach 删除、null map 和 comparator 的边界。
|
|
32
|
+
- 并发:命名线程池、生产 `Executors` 工厂限制、锁顺序、日期格式和定时任务。
|
|
33
|
+
- 异常:正确分层、上下文与堆栈、避免重复日志、不吞异常、不用于普通控制流。
|
|
34
|
+
- 测试:断言、外部依赖隔离、`src/test/java` 与边界/正确/设计/错误场景。
|
|
35
|
+
- 安全:按真实输入与认证方式核验校验、授权、转义、CSRF、限流和 SQL 参数绑定,不能泛用某项检查豁免其他风险。
|
|
36
|
+
- MySQL:仅适用存储核验显式字段、映射、索引、时间戳与 `#{}` 绑定,以及危险级联、存储过程、`select *` 和分页边界。
|
|
37
|
+
|
|
38
|
+
## 来源
|
|
39
|
+
|
|
40
|
+
用户提供的《阿里巴巴 Java 开发手册》1.4.0,阿里巴巴集团技术团队,更新于 2018-05-20;具体条款等级保留在对应 references 中。
|
|
47
41
|
|
|
48
42
|
## 阶段 7 执行结果
|
|
49
43
|
|
|
50
44
|
- 消费当前合同版本、changed files 和 verification results,只审查合同允许范围。
|
|
51
|
-
-
|
|
45
|
+
- 适用 mandatory violation 返回 `violation`,附文件/位置/规则证据;高风险项仅在当前合同确有未满足人工决定或批准要求时保留 `TODO-HUMAN-REVIEW`。
|
|
52
46
|
- 按统一 `YSS Skill Execution Result` 返回审查证据、偏离和新增安全/SQL/公共 API 影响,不得仅输出“符合规范”。
|
|
@@ -25,10 +25,10 @@ When the current repository contains `yss-project.yaml`, these rules override th
|
|
|
25
25
|
node .agents/skills/archify/scripts/yss-safe-deliver.mjs <type> docs/architecture/diagrams/<diagram-id>/<diagram-id>.archify.json docs/architecture/diagrams/<diagram-id>/<diagram-id>.html --quality showcase
|
|
26
26
|
|
|
27
27
|
# template-source
|
|
28
|
-
node .agents/skills/archify/scripts/yss-safe-deliver.mjs <type>
|
|
28
|
+
node .agents/skills/archify/scripts/yss-safe-deliver.mjs <type> "$(scripts/maintenance-path diagrams/<diagram-id>/<diagram-id>.archify.json)" "$(scripts/maintenance-path diagrams/<diagram-id>/<diagram-id>.html)" --quality showcase
|
|
29
29
|
```
|
|
30
30
|
|
|
31
|
-
- For a `project-instance`, stable source and output must be the matching pair `docs/architecture/diagrams/<diagram-id>/<diagram-id>.archify.json` and `<diagram-id>.html`. For a `template-source`, use
|
|
31
|
+
- For a `project-instance`, stable source and output must be the matching pair `docs/architecture/diagrams/<diagram-id>/<diagram-id>.archify.json` and `<diagram-id>.html`. For a `template-source`, use the current workspace's external `maintenance:diagrams/<diagram-id>/` (resolve with `scripts/maintenance-path`). The wrapper writes `<diagram-id>.receipt.json` only after successful delivery. Temporary exploration may target the operating-system temporary directory.
|
|
32
32
|
- The safe wrapper rejects `--open`, non-HTML targets, symlink escapes, unrelated existing files, and stable source/output pairs outside those roots. Do not bypass it with the raw `deliver` or `preview` commands in a YSS repository.
|
|
33
33
|
|
|
34
34
|
## Fast authoring path
|
|
@@ -4,7 +4,7 @@ import { spawnSync } from 'node:child_process';
|
|
|
4
4
|
import fs from 'node:fs';
|
|
5
5
|
import os from 'node:os';
|
|
6
6
|
import path from 'node:path';
|
|
7
|
-
import { fileURLToPath } from 'node:url';
|
|
7
|
+
import { fileURLToPath, pathToFileURL } from 'node:url';
|
|
8
8
|
|
|
9
9
|
const scriptDirectory = path.dirname(fileURLToPath(import.meta.url));
|
|
10
10
|
const skillRoot = path.resolve(scriptDirectory, '..');
|
|
@@ -93,11 +93,12 @@ function assertReplaceableReceipt(receipt) {
|
|
|
93
93
|
if (parsed?.yssArchifyReceipt !== true) fail(`拒绝覆盖非 YSS Archify receipt: ${receipt}`);
|
|
94
94
|
}
|
|
95
95
|
|
|
96
|
-
function stableContract(projectRoot, mode, input, output) {
|
|
96
|
+
async function stableContract(projectRoot, mode, input, output) {
|
|
97
97
|
const relativeBase = mode === 'project-instance'
|
|
98
98
|
? 'docs/architecture/diagrams'
|
|
99
|
-
: '
|
|
100
|
-
const base = path.join(projectRoot, relativeBase)
|
|
99
|
+
: 'maintenance:diagrams';
|
|
100
|
+
const base = mode === 'project-instance' ? path.join(projectRoot, relativeBase)
|
|
101
|
+
: (await import(pathToFileURL(path.join(projectRoot, 'scripts/lib/maintenance-storage.mjs')).href)).resolveMaintenanceOutput(relativeBase, { root: projectRoot });
|
|
101
102
|
const relativeOutput = path.relative(base, output);
|
|
102
103
|
const segments = relativeOutput.split(path.sep);
|
|
103
104
|
if (segments.length !== 2 || !diagramIdPattern.test(segments[0])) {
|
|
@@ -139,7 +140,10 @@ const temporaryBase = fs.realpathSync(os.tmpdir());
|
|
|
139
140
|
// parent symlink resolves into the OS temporary directory. Otherwise the
|
|
140
141
|
// temporary-delivery exception could be used to escape the stable output root.
|
|
141
142
|
const requestedWithinProject = requestedProjectRoot !== null;
|
|
142
|
-
const
|
|
143
|
+
const projectMode = projectRoot ? repositoryMode(projectRoot) : null;
|
|
144
|
+
const templateDiagramBase = projectMode === 'template-source'
|
|
145
|
+
? (await import(pathToFileURL(path.join(projectRoot, 'scripts/lib/maintenance-storage.mjs')).href)).resolveMaintenanceOutput('maintenance:diagrams', { root: projectRoot }) : null;
|
|
146
|
+
const isTemporary = !requestedWithinProject && isWithin(temporaryBase, output) && !(templateDiagramBase && isWithin(templateDiagramBase, output));
|
|
143
147
|
let mode = null;
|
|
144
148
|
let receipt;
|
|
145
149
|
let allowedBase;
|
|
@@ -150,7 +154,7 @@ if (isTemporary) {
|
|
|
150
154
|
} else {
|
|
151
155
|
if (!projectRoot) fail('稳定交付必须从包含 yss-project.yaml 的仓库内运行');
|
|
152
156
|
mode = repositoryMode(projectRoot);
|
|
153
|
-
const contract = stableContract(projectRoot, mode, input, output);
|
|
157
|
+
const contract = await stableContract(projectRoot, mode, input, output);
|
|
154
158
|
allowedBase = contract.base;
|
|
155
159
|
receipt = contract.receipt;
|
|
156
160
|
}
|