create-yss-spec 3.5.5 → 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/README.md +2 -0
- package/bin/create-yss-spec.js +3 -1
- package/cli-core.lock.json +11 -7
- 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 +7 -2
- package/src/template/instance-runtime.js +27 -9
- 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
- package/vendor/cli-core/tests/package-contract.mjs +14 -0
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
## 标准代码骨架
|
|
2
|
+
|
|
3
|
+
```vue
|
|
4
|
+
<script setup lang="ts">
|
|
5
|
+
import type { DataField, Form, IFieldState } from '@formily/core';
|
|
6
|
+
import { createForm, onFieldInit, onFieldValueChange, onFormSubmitValidateFailed } from '@formily/core';
|
|
7
|
+
import { YFormily, type ISchema } from '@yss-ui/components';
|
|
8
|
+
import { message } from 'ant-design-vue';
|
|
9
|
+
|
|
10
|
+
/** 下拉选项。 */
|
|
11
|
+
interface OptionItem {
|
|
12
|
+
label: string;
|
|
13
|
+
value: string;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/** 根据省份返回城市选项。 */
|
|
17
|
+
const getCityOptions = (province?: string): OptionItem[] =>
|
|
18
|
+
province === 'zhejiang'
|
|
19
|
+
? [{ label: '杭州', value: 'hangzhou' }]
|
|
20
|
+
: province === 'jiangsu'
|
|
21
|
+
? [{ label: '南京', value: 'nanjing' }]
|
|
22
|
+
: [];
|
|
23
|
+
|
|
24
|
+
/** 同步城市选项并清理已经失效的旧值。 */
|
|
25
|
+
const syncCity = (field: DataField) => {
|
|
26
|
+
const options = getCityOptions(field.value as string | undefined);
|
|
27
|
+
field.form.setFieldState('city', (state: IFieldState) => {
|
|
28
|
+
state.dataSource = options;
|
|
29
|
+
if (!options.some(item => item.value === state.value)) state.value = undefined;
|
|
30
|
+
});
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
/** 外部 Form 实例,用于承载表单级 effects。 */
|
|
34
|
+
const form: Form = createForm({
|
|
35
|
+
values: { province: 'zhejiang', city: 'hangzhou' },
|
|
36
|
+
effects() {
|
|
37
|
+
onFieldInit('province', field => syncCity(field as DataField));
|
|
38
|
+
onFieldValueChange('province', field => syncCity(field as DataField));
|
|
39
|
+
onFormSubmitValidateFailed(() => {
|
|
40
|
+
const feedbacks = form.queryFeedbacks({ type: 'error' });
|
|
41
|
+
message.error(feedbacks[0]?.messages?.[0] ?? '请检查表单');
|
|
42
|
+
});
|
|
43
|
+
},
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
/** 表单保存回调 Props。 */
|
|
47
|
+
interface SaveFormProps {
|
|
48
|
+
onSave: (values: Record<string, any>) => Promise<void>;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/** 表单保存回调。 */
|
|
52
|
+
const props = defineProps<SaveFormProps>();
|
|
53
|
+
|
|
54
|
+
/** 校验通过后提交;API 错误由 mutator 统一提示。 */
|
|
55
|
+
const onSubmit = (values: Record<string, any>) => {
|
|
56
|
+
return props.onSave(values);
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
/** 级联表单 Schema。 */
|
|
60
|
+
const schema: ISchema = {
|
|
61
|
+
type: 'object',
|
|
62
|
+
properties: {
|
|
63
|
+
layout: {
|
|
64
|
+
type: 'void',
|
|
65
|
+
'x-component': 'FormLayout',
|
|
66
|
+
'x-component-props': { layout: 'horizontal', labelWidth: 120, labelAlign: 'right' },
|
|
67
|
+
properties: {
|
|
68
|
+
grid: {
|
|
69
|
+
type: 'void',
|
|
70
|
+
'x-component': 'FormGrid',
|
|
71
|
+
'x-component-props': { maxColumns: 2, minColumns: 1, minWidth: 320 },
|
|
72
|
+
properties: {
|
|
73
|
+
province: {
|
|
74
|
+
type: 'string',
|
|
75
|
+
title: '省份',
|
|
76
|
+
required: true,
|
|
77
|
+
enum: [
|
|
78
|
+
{ label: '浙江', value: 'zhejiang' },
|
|
79
|
+
{ label: '江苏', value: 'jiangsu' },
|
|
80
|
+
],
|
|
81
|
+
'x-decorator': 'FormItem',
|
|
82
|
+
'x-component': 'Select',
|
|
83
|
+
},
|
|
84
|
+
city: {
|
|
85
|
+
type: 'string',
|
|
86
|
+
title: '城市',
|
|
87
|
+
required: true,
|
|
88
|
+
'x-decorator': 'FormItem',
|
|
89
|
+
'x-component': 'Select',
|
|
90
|
+
},
|
|
91
|
+
actions: {
|
|
92
|
+
type: 'void',
|
|
93
|
+
'x-decorator': 'FormItem',
|
|
94
|
+
'x-decorator-props': { gridSpan: 2, colon: false },
|
|
95
|
+
'x-component': 'AutoButtonGroup',
|
|
96
|
+
properties: {
|
|
97
|
+
submit: {
|
|
98
|
+
type: 'void',
|
|
99
|
+
'x-component': 'Submit',
|
|
100
|
+
'x-content': '提交',
|
|
101
|
+
'x-component-props': { onSubmit: '{{ onSubmit }}' },
|
|
102
|
+
},
|
|
103
|
+
},
|
|
104
|
+
},
|
|
105
|
+
},
|
|
106
|
+
},
|
|
107
|
+
},
|
|
108
|
+
},
|
|
109
|
+
},
|
|
110
|
+
};
|
|
111
|
+
</script>
|
|
112
|
+
|
|
113
|
+
<template>
|
|
114
|
+
<YFormily :schema="schema" :form="form" :scope="{ onSubmit }" />
|
|
115
|
+
</template>
|
|
116
|
+
```
|
|
@@ -3,7 +3,7 @@ name: formily-mode-slot-detail
|
|
|
3
3
|
description: 指导 YFormily 新增、编辑、查看三态与插槽渲染;当配置 mode 0/1/2、查看态只读、详情页 Descriptions 展示、detail-options、Schema Slot 或详情字段插槽时使用。
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
#
|
|
6
|
+
# YFormily 三态与插槽
|
|
7
7
|
|
|
8
8
|
## 触发条件
|
|
9
9
|
|
|
@@ -35,87 +35,9 @@ description: 指导 YFormily 新增、编辑、查看三态与插槽渲染;当
|
|
|
35
35
|
- 加载详情的 Orval API 错误已由 `mutator.ts` 统一 `message.error` 并 reject,业务 `else`/`catch` 禁止重复提示。
|
|
36
36
|
- 分步需求默认走 `formily-step-flow`,不在本 skill 中给 `FormStep` 默认方案。
|
|
37
37
|
|
|
38
|
-
##
|
|
38
|
+
## 按需示例
|
|
39
39
|
|
|
40
|
-
|
|
41
|
-
<script setup lang="ts">
|
|
42
|
-
import { YMonaco, YFormily, type ISchema } from '@yss-ui/components';
|
|
43
|
-
import { ref } from 'vue';
|
|
44
|
-
|
|
45
|
-
/** YFormily 业务模式。 */
|
|
46
|
-
type FormMode = 0 | 1 | 2;
|
|
47
|
-
|
|
48
|
-
/** 当前表单模式。 */
|
|
49
|
-
const mode = ref<FormMode>(0);
|
|
50
|
-
|
|
51
|
-
/** 编辑和查看回填值。 */
|
|
52
|
-
const initialValues = {
|
|
53
|
-
user: { email: 'user@example.com' },
|
|
54
|
-
sql: 'select * from users',
|
|
55
|
-
};
|
|
56
|
-
|
|
57
|
-
/** 编辑与详情共用的 Schema。 */
|
|
58
|
-
const schema: ISchema = {
|
|
59
|
-
type: 'object',
|
|
60
|
-
properties: {
|
|
61
|
-
layout: {
|
|
62
|
-
type: 'void',
|
|
63
|
-
'x-component': 'FormLayout',
|
|
64
|
-
'x-component-props': { layout: 'horizontal', labelWidth: 120, labelAlign: 'right' },
|
|
65
|
-
properties: {
|
|
66
|
-
grid: {
|
|
67
|
-
type: 'void',
|
|
68
|
-
'x-component': 'FormGrid',
|
|
69
|
-
'x-component-props': { maxColumns: 2, minColumns: 1, minWidth: 320 },
|
|
70
|
-
properties: {
|
|
71
|
-
user: {
|
|
72
|
-
type: 'object',
|
|
73
|
-
properties: {
|
|
74
|
-
email: {
|
|
75
|
-
type: 'string',
|
|
76
|
-
title: '邮箱',
|
|
77
|
-
'x-decorator': 'FormItem',
|
|
78
|
-
'x-component': 'Input',
|
|
79
|
-
},
|
|
80
|
-
},
|
|
81
|
-
},
|
|
82
|
-
sql: {
|
|
83
|
-
type: 'string',
|
|
84
|
-
title: 'SQL',
|
|
85
|
-
'x-decorator': 'FormItem',
|
|
86
|
-
'x-decorator-props': { gridSpan: 2 },
|
|
87
|
-
'x-component': 'Slot',
|
|
88
|
-
'x-component-props': { name: 'sql' },
|
|
89
|
-
},
|
|
90
|
-
},
|
|
91
|
-
},
|
|
92
|
-
},
|
|
93
|
-
},
|
|
94
|
-
},
|
|
95
|
-
};
|
|
96
|
-
</script>
|
|
97
|
-
|
|
98
|
-
<template>
|
|
99
|
-
<YFormily
|
|
100
|
-
:schema="schema"
|
|
101
|
-
:initial-values="initialValues"
|
|
102
|
-
:mode="mode"
|
|
103
|
-
:detail-options="{ bordered: true, maxColumns: 3, minColumns: 1, minWidth: 260 }"
|
|
104
|
-
>
|
|
105
|
-
<template #sql="{ value, onChange }">
|
|
106
|
-
<YMonaco :model-value="value" language="sql" @change="onChange" />
|
|
107
|
-
</template>
|
|
108
|
-
|
|
109
|
-
<template #detail-user-email="{ value }">
|
|
110
|
-
<a :href="`mailto:${value}`">{{ value }}</a>
|
|
111
|
-
</template>
|
|
112
|
-
|
|
113
|
-
<template #detail-sql="{ value }">
|
|
114
|
-
<YMonaco :model-value="value" language="sql" readonly />
|
|
115
|
-
</template>
|
|
116
|
-
</YFormily>
|
|
117
|
-
</template>
|
|
118
|
-
```
|
|
40
|
+
首次组合三态、编辑 Slot 与详情插槽,或排查字段路径时,读取 [三态与双通道插槽示例](references/mode-slot-example.md)。示例不替代目标工程的导出与版本核验。
|
|
119
41
|
|
|
120
42
|
## 交付检查清单
|
|
121
43
|
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
## 标准代码骨架
|
|
2
|
+
|
|
3
|
+
```vue
|
|
4
|
+
<script setup lang="ts">
|
|
5
|
+
import { YMonaco, YFormily, type ISchema } from '@yss-ui/components';
|
|
6
|
+
import { ref } from 'vue';
|
|
7
|
+
|
|
8
|
+
/** YFormily 业务模式。 */
|
|
9
|
+
type FormMode = 0 | 1 | 2;
|
|
10
|
+
|
|
11
|
+
/** 当前表单模式。 */
|
|
12
|
+
const mode = ref<FormMode>(0);
|
|
13
|
+
|
|
14
|
+
/** 编辑和查看回填值。 */
|
|
15
|
+
const initialValues = {
|
|
16
|
+
user: { email: 'user@example.com' },
|
|
17
|
+
sql: 'select * from users',
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
/** 编辑与详情共用的 Schema。 */
|
|
21
|
+
const schema: ISchema = {
|
|
22
|
+
type: 'object',
|
|
23
|
+
properties: {
|
|
24
|
+
layout: {
|
|
25
|
+
type: 'void',
|
|
26
|
+
'x-component': 'FormLayout',
|
|
27
|
+
'x-component-props': { layout: 'horizontal', labelWidth: 120, labelAlign: 'right' },
|
|
28
|
+
properties: {
|
|
29
|
+
grid: {
|
|
30
|
+
type: 'void',
|
|
31
|
+
'x-component': 'FormGrid',
|
|
32
|
+
'x-component-props': { maxColumns: 2, minColumns: 1, minWidth: 320 },
|
|
33
|
+
properties: {
|
|
34
|
+
user: {
|
|
35
|
+
type: 'object',
|
|
36
|
+
properties: {
|
|
37
|
+
email: {
|
|
38
|
+
type: 'string',
|
|
39
|
+
title: '邮箱',
|
|
40
|
+
'x-decorator': 'FormItem',
|
|
41
|
+
'x-component': 'Input',
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
sql: {
|
|
46
|
+
type: 'string',
|
|
47
|
+
title: 'SQL',
|
|
48
|
+
'x-decorator': 'FormItem',
|
|
49
|
+
'x-decorator-props': { gridSpan: 2 },
|
|
50
|
+
'x-component': 'Slot',
|
|
51
|
+
'x-component-props': { name: 'sql' },
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
};
|
|
59
|
+
</script>
|
|
60
|
+
|
|
61
|
+
<template>
|
|
62
|
+
<YFormily
|
|
63
|
+
:schema="schema"
|
|
64
|
+
:initial-values="initialValues"
|
|
65
|
+
:mode="mode"
|
|
66
|
+
:detail-options="{ bordered: true, maxColumns: 3, minColumns: 1, minWidth: 260 }"
|
|
67
|
+
>
|
|
68
|
+
<template #sql="{ value, onChange }">
|
|
69
|
+
<YMonaco :model-value="value" language="sql" @change="onChange" />
|
|
70
|
+
</template>
|
|
71
|
+
|
|
72
|
+
<template #detail-user-email="{ value }">
|
|
73
|
+
<a :href="`mailto:${value}`">{{ value }}</a>
|
|
74
|
+
</template>
|
|
75
|
+
|
|
76
|
+
<template #detail-sql="{ value }">
|
|
77
|
+
<YMonaco :model-value="value" language="sql" readonly />
|
|
78
|
+
</template>
|
|
79
|
+
</YFormily>
|
|
80
|
+
</template>
|
|
81
|
+
```
|
|
@@ -3,7 +3,7 @@ name: formily-step-flow
|
|
|
3
3
|
description: 指导 YSS UI 分步表单与流程录入;当需要 Ant Design Vue Steps、多 YFormily 独立校验、跨步数据保留、确认预览或最终聚合提交时使用。
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
#
|
|
6
|
+
# YFormily 分步流程
|
|
7
7
|
|
|
8
8
|
## 触发条件
|
|
9
9
|
|
|
@@ -32,149 +32,9 @@ description: 指导 YSS UI 分步表单与流程录入;当需要 Ant Design Vu
|
|
|
32
32
|
- 最终 API 提交只聚合业务步骤,禁止把纯确认步骤当作新数据源。
|
|
33
33
|
- Orval API 的网络错误及 `success === false` 业务错误已由 `mutator.ts` 统一 `message.error` 并 reject;最终提交的 `else`/`catch` 禁止重复提示,loading 放在 `finally` 恢复。
|
|
34
34
|
|
|
35
|
-
##
|
|
35
|
+
## 按需示例
|
|
36
36
|
|
|
37
|
-
|
|
38
|
-
<script setup lang="ts">
|
|
39
|
-
import { YButton, YFormily, type ISchema } from '@yss-ui/components';
|
|
40
|
-
import { Steps as ASteps } from 'ant-design-vue';
|
|
41
|
-
import { computed, reactive, ref } from 'vue';
|
|
42
|
-
|
|
43
|
-
/** YFormily 对外提交能力。 */
|
|
44
|
-
interface YssFormilyExpose {
|
|
45
|
-
submit: () => Promise<Record<string, any>>;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
/** 分步表单数据。 */
|
|
49
|
-
interface StepFormData {
|
|
50
|
-
step1: { name: string };
|
|
51
|
-
step2: { level: string };
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
/** 分步表单提交回调 Props。 */
|
|
55
|
-
interface StepFlowProps {
|
|
56
|
-
onSubmit: (values: StepFormData) => Promise<void>;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
/** 分步表单提交回调。 */
|
|
60
|
-
const props = defineProps<StepFlowProps>();
|
|
61
|
-
/** 当前步骤,从 0 开始。 */
|
|
62
|
-
const currentStep = ref(0);
|
|
63
|
-
/** 最终提交状态。 */
|
|
64
|
-
const submitting = ref(false);
|
|
65
|
-
/** 第一步表单实例。 */
|
|
66
|
-
const step1Ref = ref<YssFormilyExpose>();
|
|
67
|
-
/** 第二步表单实例。 */
|
|
68
|
-
const step2Ref = ref<YssFormilyExpose>();
|
|
69
|
-
/** 步骤导航配置。 */
|
|
70
|
-
const stepItems = [{ title: '基础信息' }, { title: '策略配置' }, { title: '确认提交' }];
|
|
71
|
-
/** 跨步唯一数据源。 */
|
|
72
|
-
const formData = reactive<StepFormData>({
|
|
73
|
-
step1: { name: '' },
|
|
74
|
-
step2: { level: 'normal' },
|
|
75
|
-
});
|
|
76
|
-
|
|
77
|
-
/** 创建符合业务三层布局约定的步骤 Schema。 */
|
|
78
|
-
const createStepSchema = (properties: Record<string, ISchema>): ISchema => ({
|
|
79
|
-
type: 'object',
|
|
80
|
-
properties: {
|
|
81
|
-
layout: {
|
|
82
|
-
type: 'void',
|
|
83
|
-
'x-component': 'FormLayout',
|
|
84
|
-
'x-component-props': { layout: 'horizontal', labelWidth: 120, labelAlign: 'right' },
|
|
85
|
-
properties: {
|
|
86
|
-
grid: {
|
|
87
|
-
type: 'void',
|
|
88
|
-
'x-component': 'FormGrid',
|
|
89
|
-
'x-component-props': { maxColumns: 2, minColumns: 1, minWidth: 320 },
|
|
90
|
-
properties,
|
|
91
|
-
},
|
|
92
|
-
},
|
|
93
|
-
},
|
|
94
|
-
},
|
|
95
|
-
});
|
|
96
|
-
|
|
97
|
-
/** 第一步 Schema。 */
|
|
98
|
-
const step1Schema = createStepSchema({
|
|
99
|
-
name: {
|
|
100
|
-
type: 'string',
|
|
101
|
-
title: '任务名称',
|
|
102
|
-
required: true,
|
|
103
|
-
'x-validator': [{ required: true, whitespace: true, message: '请输入任务名称' }],
|
|
104
|
-
'x-decorator': 'FormItem',
|
|
105
|
-
'x-component': 'Input',
|
|
106
|
-
},
|
|
107
|
-
});
|
|
108
|
-
/** 第二步 Schema。 */
|
|
109
|
-
const step2Schema = createStepSchema({
|
|
110
|
-
level: {
|
|
111
|
-
type: 'string',
|
|
112
|
-
title: '策略等级',
|
|
113
|
-
required: true,
|
|
114
|
-
enum: [
|
|
115
|
-
{ label: '普通', value: 'normal' },
|
|
116
|
-
{ label: '严格', value: 'strict' },
|
|
117
|
-
],
|
|
118
|
-
'x-decorator': 'FormItem',
|
|
119
|
-
'x-component': 'Select',
|
|
120
|
-
},
|
|
121
|
-
});
|
|
122
|
-
/** 确认步骤 Schema。 */
|
|
123
|
-
const confirmSchema = createStepSchema({
|
|
124
|
-
name: { type: 'string', title: '任务名称', 'x-decorator': 'FormItem', 'x-component': 'Input' },
|
|
125
|
-
level: { type: 'string', title: '策略等级', 'x-decorator': 'FormItem', 'x-component': 'Input' },
|
|
126
|
-
});
|
|
127
|
-
/** 确认步骤展示数据。 */
|
|
128
|
-
const confirmValues = computed(() => ({ name: formData.step1.name, level: formData.step2.level }));
|
|
129
|
-
|
|
130
|
-
/** 校验当前步骤,成功后前进。 */
|
|
131
|
-
const next = async () => {
|
|
132
|
-
const currentRef = currentStep.value === 0 ? step1Ref.value : step2Ref.value;
|
|
133
|
-
if (!currentRef) return;
|
|
134
|
-
try {
|
|
135
|
-
await currentRef.submit();
|
|
136
|
-
currentStep.value += 1;
|
|
137
|
-
} catch {
|
|
138
|
-
return;
|
|
139
|
-
}
|
|
140
|
-
};
|
|
141
|
-
|
|
142
|
-
/** 返回上一步。 */
|
|
143
|
-
const back = () => {
|
|
144
|
-
currentStep.value = Math.max(0, currentStep.value - 1);
|
|
145
|
-
};
|
|
146
|
-
|
|
147
|
-
/** 提交全部步骤数据。 */
|
|
148
|
-
const submitAll = async () => {
|
|
149
|
-
submitting.value = true;
|
|
150
|
-
try {
|
|
151
|
-
await props.onSubmit({ step1: { ...formData.step1 }, step2: { ...formData.step2 } });
|
|
152
|
-
} finally {
|
|
153
|
-
submitting.value = false;
|
|
154
|
-
}
|
|
155
|
-
};
|
|
156
|
-
</script>
|
|
157
|
-
|
|
158
|
-
<template>
|
|
159
|
-
<ASteps :current="currentStep" :items="stepItems" />
|
|
160
|
-
|
|
161
|
-
<YFormily v-if="currentStep === 0" ref="step1Ref" v-model="formData.step1" :schema="step1Schema" />
|
|
162
|
-
<YFormily v-else-if="currentStep === 1" ref="step2Ref" v-model="formData.step2" :schema="step2Schema" />
|
|
163
|
-
<YFormily
|
|
164
|
-
v-else
|
|
165
|
-
:schema="confirmSchema"
|
|
166
|
-
:initial-values="confirmValues"
|
|
167
|
-
:mode="2"
|
|
168
|
-
:detail-options="{ bordered: true, maxColumns: 2, minColumns: 1, minWidth: 320 }"
|
|
169
|
-
/>
|
|
170
|
-
|
|
171
|
-
<YButton :disabled="currentStep === 0" @click="back">上一步</YButton>
|
|
172
|
-
<YButton v-if="currentStep < 2" type="primary" @click="next">下一步</YButton>
|
|
173
|
-
<YButton v-else type="primary" :loading="submitting" @click="submitAll">提交</YButton>
|
|
174
|
-
</template>
|
|
175
|
-
```
|
|
176
|
-
|
|
177
|
-
当 schema、步骤状态和页面编排难以独立理解或验证时,分别拆到 `constant.ts`、`hooks/useStepFlow.ts`;以职责清晰和状态可测试为准,不按固定行数拆分。
|
|
37
|
+
首次组织分步实例、聚合数据和确认页,或排查步骤回填时,读取 [分步表单组合示例](references/step-flow-example.md)。按业务阶段拆 schema、Hook 与私有视图,不按固定行数拆分。
|
|
178
38
|
|
|
179
39
|
## 交付检查清单
|
|
180
40
|
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
## 标准代码骨架
|
|
2
|
+
|
|
3
|
+
```vue
|
|
4
|
+
<script setup lang="ts">
|
|
5
|
+
import { YButton, YFormily, type ISchema } from '@yss-ui/components';
|
|
6
|
+
import { Steps as ASteps } from 'ant-design-vue';
|
|
7
|
+
import { computed, reactive, ref } from 'vue';
|
|
8
|
+
|
|
9
|
+
/** YFormily 对外提交能力。 */
|
|
10
|
+
interface YssFormilyExpose {
|
|
11
|
+
submit: () => Promise<Record<string, any>>;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
/** 分步表单数据。 */
|
|
15
|
+
interface StepFormData {
|
|
16
|
+
step1: { name: string };
|
|
17
|
+
step2: { level: string };
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/** 分步表单提交回调 Props。 */
|
|
21
|
+
interface StepFlowProps {
|
|
22
|
+
onSubmit: (values: StepFormData) => Promise<void>;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/** 分步表单提交回调。 */
|
|
26
|
+
const props = defineProps<StepFlowProps>();
|
|
27
|
+
/** 当前步骤,从 0 开始。 */
|
|
28
|
+
const currentStep = ref(0);
|
|
29
|
+
/** 最终提交状态。 */
|
|
30
|
+
const submitting = ref(false);
|
|
31
|
+
/** 第一步表单实例。 */
|
|
32
|
+
const step1Ref = ref<YssFormilyExpose>();
|
|
33
|
+
/** 第二步表单实例。 */
|
|
34
|
+
const step2Ref = ref<YssFormilyExpose>();
|
|
35
|
+
/** 步骤导航配置。 */
|
|
36
|
+
const stepItems = [{ title: '基础信息' }, { title: '策略配置' }, { title: '确认提交' }];
|
|
37
|
+
/** 跨步唯一数据源。 */
|
|
38
|
+
const formData = reactive<StepFormData>({
|
|
39
|
+
step1: { name: '' },
|
|
40
|
+
step2: { level: 'normal' },
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
/** 创建符合业务三层布局约定的步骤 Schema。 */
|
|
44
|
+
const createStepSchema = (properties: Record<string, ISchema>): ISchema => ({
|
|
45
|
+
type: 'object',
|
|
46
|
+
properties: {
|
|
47
|
+
layout: {
|
|
48
|
+
type: 'void',
|
|
49
|
+
'x-component': 'FormLayout',
|
|
50
|
+
'x-component-props': { layout: 'horizontal', labelWidth: 120, labelAlign: 'right' },
|
|
51
|
+
properties: {
|
|
52
|
+
grid: {
|
|
53
|
+
type: 'void',
|
|
54
|
+
'x-component': 'FormGrid',
|
|
55
|
+
'x-component-props': { maxColumns: 2, minColumns: 1, minWidth: 320 },
|
|
56
|
+
properties,
|
|
57
|
+
},
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
/** 第一步 Schema。 */
|
|
64
|
+
const step1Schema = createStepSchema({
|
|
65
|
+
name: {
|
|
66
|
+
type: 'string',
|
|
67
|
+
title: '任务名称',
|
|
68
|
+
required: true,
|
|
69
|
+
'x-validator': [{ required: true, whitespace: true, message: '请输入任务名称' }],
|
|
70
|
+
'x-decorator': 'FormItem',
|
|
71
|
+
'x-component': 'Input',
|
|
72
|
+
},
|
|
73
|
+
});
|
|
74
|
+
/** 第二步 Schema。 */
|
|
75
|
+
const step2Schema = createStepSchema({
|
|
76
|
+
level: {
|
|
77
|
+
type: 'string',
|
|
78
|
+
title: '策略等级',
|
|
79
|
+
required: true,
|
|
80
|
+
enum: [
|
|
81
|
+
{ label: '普通', value: 'normal' },
|
|
82
|
+
{ label: '严格', value: 'strict' },
|
|
83
|
+
],
|
|
84
|
+
'x-decorator': 'FormItem',
|
|
85
|
+
'x-component': 'Select',
|
|
86
|
+
},
|
|
87
|
+
});
|
|
88
|
+
/** 确认步骤 Schema。 */
|
|
89
|
+
const confirmSchema = createStepSchema({
|
|
90
|
+
name: { type: 'string', title: '任务名称', 'x-decorator': 'FormItem', 'x-component': 'Input' },
|
|
91
|
+
level: { type: 'string', title: '策略等级', 'x-decorator': 'FormItem', 'x-component': 'Input' },
|
|
92
|
+
});
|
|
93
|
+
/** 确认步骤展示数据。 */
|
|
94
|
+
const confirmValues = computed(() => ({ name: formData.step1.name, level: formData.step2.level }));
|
|
95
|
+
|
|
96
|
+
/** 校验当前步骤,成功后前进。 */
|
|
97
|
+
const next = async () => {
|
|
98
|
+
const currentRef = currentStep.value === 0 ? step1Ref.value : step2Ref.value;
|
|
99
|
+
if (!currentRef) return;
|
|
100
|
+
try {
|
|
101
|
+
await currentRef.submit();
|
|
102
|
+
currentStep.value += 1;
|
|
103
|
+
} catch {
|
|
104
|
+
return;
|
|
105
|
+
}
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
/** 返回上一步。 */
|
|
109
|
+
const back = () => {
|
|
110
|
+
currentStep.value = Math.max(0, currentStep.value - 1);
|
|
111
|
+
};
|
|
112
|
+
|
|
113
|
+
/** 提交全部步骤数据。 */
|
|
114
|
+
const submitAll = async () => {
|
|
115
|
+
submitting.value = true;
|
|
116
|
+
try {
|
|
117
|
+
await props.onSubmit({ step1: { ...formData.step1 }, step2: { ...formData.step2 } });
|
|
118
|
+
} finally {
|
|
119
|
+
submitting.value = false;
|
|
120
|
+
}
|
|
121
|
+
};
|
|
122
|
+
</script>
|
|
123
|
+
|
|
124
|
+
<template>
|
|
125
|
+
<ASteps :current="currentStep" :items="stepItems" />
|
|
126
|
+
|
|
127
|
+
<YFormily v-if="currentStep === 0" ref="step1Ref" v-model="formData.step1" :schema="step1Schema" />
|
|
128
|
+
<YFormily v-else-if="currentStep === 1" ref="step2Ref" v-model="formData.step2" :schema="step2Schema" />
|
|
129
|
+
<YFormily
|
|
130
|
+
v-else
|
|
131
|
+
:schema="confirmSchema"
|
|
132
|
+
:initial-values="confirmValues"
|
|
133
|
+
:mode="2"
|
|
134
|
+
:detail-options="{ bordered: true, maxColumns: 2, minColumns: 1, minWidth: 320 }"
|
|
135
|
+
/>
|
|
136
|
+
|
|
137
|
+
<YButton :disabled="currentStep === 0" @click="back">上一步</YButton>
|
|
138
|
+
<YButton v-if="currentStep < 2" type="primary" @click="next">下一步</YButton>
|
|
139
|
+
<YButton v-else type="primary" :loading="submitting" @click="submitAll">提交</YButton>
|
|
140
|
+
</template>
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
当 schema、步骤状态和页面编排难以独立理解或验证时,分别拆到 `constant.ts`、`hooks/useStepFlow.ts`;以职责清晰和状态可测试为准,不按固定行数拆分。
|
|
@@ -5,7 +5,9 @@ argument-hint: "What will the next session be used for?"
|
|
|
5
5
|
disable-model-invocation: true
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
-
Write a handoff document
|
|
8
|
+
Write a handoff document so a fresh agent can continue the current objective. Save to the temporary directory of the user's OS, then return its actual absolute path.
|
|
9
|
+
|
|
10
|
+
Record the current objective, completed work, remaining work and blockers, existing authorization scope, and the next executable action. Distinguish verified results from planned or unexecuted checks. Preserve the references and versions needed to resume; a handoff does not grant approval, implementation, commit, push or release authority.
|
|
9
11
|
|
|
10
12
|
Include a "suggested skills" section in the document, which suggests skills that the agent should invoke.
|
|
11
13
|
|
|
@@ -10,13 +10,13 @@ license: MIT
|
|
|
10
10
|
|
|
11
11
|
## 触发与作用域
|
|
12
12
|
|
|
13
|
-
调用者在当前工作包含研究结论、Plan、Spec、设计说明、契约解释正文、Ticket
|
|
13
|
+
调用者在当前工作包含研究结论、Plan、Spec、设计说明、契约解释正文、Ticket、审查、PR / MR 描述、交接、发布或复盘时,设置条件 `lifecycle-document-output` 并加载本技能。进度与会签表达也属于文档输出;纯代码修改、命令执行和后续无关会话不激活此条件。
|
|
14
14
|
|
|
15
15
|
每次调用只覆盖输入指定的文档或报告。工作结束即结束本次作用域;用户后续要求正常表达或不使用本技能时遵从当前要求,不继承先前启用状态。不假设读者具有任何诊断。
|
|
16
16
|
|
|
17
17
|
## 执行
|
|
18
18
|
|
|
19
|
-
1.
|
|
19
|
+
1. 接收产物类型、读者、允许改动范围和可读权威输入;先读共用规范,再读取对应阶段或 PR / MR 描述指引。字段、版本或规则来源不明确时保留缺口并回交原所有者,不补造业务决定。
|
|
20
20
|
2. 先写当前问题、结论或交付行为,再提供依据和必要细节;按顺序动作、规则比较和因果说明选择编号、表格或段落。删除无信息的修饰和重复,不设置字数或规则数量上限。
|
|
21
21
|
3. 对照输入核查主体、条件、例外、量词、范围、数值、证据、未决项、责任、时点和依赖。保持原 API 标识、schema、冻结行为、状态及批准证据;发现冲突时交回所有者,不以润色名义修复事实。
|
|
22
22
|
4. 返回调整后的正文及必要的缺口说明,由原工作单元执行现有验证。明确区分已验证结果、估算和未知原因;未执行测试不写通过,多项实质阻塞全部保留。已授权工作由原执行者继续,不把可完成的操作转交用户。
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# i-have-adhd 的 YSS 适配
|
|
2
2
|
|
|
3
|
-
上游:`ayghri/i-have-adhd`;固定 revision:`
|
|
3
|
+
上游:`ayghri/i-have-adhd`;固定 revision:`839872f9d1cd634fed642b4589ce7226199cc15f`;许可证见技能目录 `LICENSE`。
|
|
4
4
|
|
|
5
|
-
原始文件来自 [固定版本目录](https://github.com/ayghri/i-have-adhd/tree/
|
|
5
|
+
原始文件来自 [固定版本目录](https://github.com/ayghri/i-have-adhd/tree/839872f9d1cd634fed642b4589ce7226199cc15f/skills/i-have-adhd)。2026-10-03 核验该提交与先前 `7b9069b39972e269e61bd95c2f66ebb90cac6a02` 的技能目录树和三个文件原字节一致;本轮更新来源记录并修复 YSS 消费指引。未经改写的来源基线保存在模板维护证据中;`upstream-files.json` 记录逐文件 SHA-256,`skills-lock.json` 记录上游目录哈希和当前技能目录哈希。基线不进入实例默认加载面。
|
|
6
6
|
|
|
7
7
|
| 上游行为 | YSS 适配 |
|
|
8
8
|
|---|---|
|
|
@@ -15,11 +15,13 @@ assert.ok(registry.invocation_contract.overrides['i-have-adhd'].exclusion_condit
|
|
|
15
15
|
assert.ok(registry.invocation_contract.overrides['i-have-adhd'].exclusion_conditions.includes('user-disabled'));
|
|
16
16
|
const entry=read('.agents/skills/i-have-adhd/SKILL.md');
|
|
17
17
|
assert.ok(!entry.includes('disable-model-invocation: true'));
|
|
18
|
+
assert.ok(entry.includes('PR / MR 描述'),'PR / MR description remains current document work');
|
|
18
19
|
assert.equal(parse(read('.agents/skills/i-have-adhd/agents/openai.yaml')).policy.allow_implicit_invocation,true);
|
|
19
20
|
const lock=JSON.parse(read('skills-lock.json'));
|
|
20
21
|
const locked=lock.skills.shared['i-have-adhd'];
|
|
21
22
|
assert.equal(locked.source,'ayghri/i-have-adhd');
|
|
22
|
-
assert.equal(locked.sourceRevision,'
|
|
23
|
+
assert.equal(locked.sourceRevision,'839872f9d1cd634fed642b4589ce7226199cc15f');
|
|
24
|
+
assert.ok(read('.agents/skills/i-have-adhd/references/yss-adaptation.md').includes(locked.sourceRevision),'adaptation provenance follows the locked source revision');
|
|
23
25
|
assert.notEqual(locked.upstreamHash,locked.effectiveHash);
|
|
24
26
|
const {treeHash}=await import(pathToFileURL(path.join(root,'scripts/lib/skill-supply-chain.mjs')));
|
|
25
27
|
assert.equal(treeHash(path.join(root,'.agents/skills/i-have-adhd')),locked.effectiveHash);
|
|
@@ -58,6 +60,9 @@ if(fs.existsSync(compiler)) {
|
|
|
58
60
|
assert.ok(on.required_skills.includes('i-have-adhd'));
|
|
59
61
|
assert.ok(!next.required_skills.includes('i-have-adhd'));
|
|
60
62
|
assert.equal(on.status,'draft');
|
|
61
|
-
|
|
63
|
+
// PR / MR drafting uses the same caller-provided document condition exercised by on/next.
|
|
64
|
+
assert.deepEqual(next.required_skills,off.required_skills);
|
|
65
|
+
assert.equal(next.status,'draft');
|
|
66
|
+
console.log('PASS: actual resolver excludes code-only, includes the caller-provided document condition also used for PR / MR drafts, does not persist that condition or approve the contract. Model classification of PR / MR work is not measured.');
|
|
62
67
|
} else console.log('N/A: this strategic-only template has no implementation compiler; conditional route verified in registry and orchestration contract.');
|
|
63
68
|
console.log(`PASS: source, license metadata, ${locked.targets.length} projections, ${callers.length} callers, scope and readable writing inputs. Model output quality not measured.`);
|