create-yss-spec 2.2.10 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/package.json +1 -1
- package/template/.agents/skills/ask-matt/SKILL.md +1 -1
- package/template/.agents/skills/wayfinder/SKILL.md +2 -2
- package/template/.agents/skills/yss-ddd-scaffold-generator/SKILL.md +14 -3
- package/template/.agents/skills/yss-ddd-scaffold-generator/references/ARCHITECTURE.md +3 -3
- package/template/.agents/skills/yss-ddd-scaffold-generator/references/USAGE_EXAMPLES.md +12 -1
- package/template/.agents/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-parent/SKILL.md +2 -1
- package/template/.agents/skills/yss-ddd-scaffold-generator/scripts/first-slice-compatibility.test.mjs +45 -11
- package/template/.agents/skills/yss-ddd-scaffold-generator/scripts/first-slice-verification.test.mjs +164 -0
- package/template/.agents/skills/yss-ddd-scaffold-generator/scripts/generate_scaffold.mjs +18 -4
- package/template/.agents/skills/yss-ddd-scaffold-generator/scripts/run_first_slice_verification.mjs +172 -0
- package/template/.agents/skills/yss-ddd-scaffold-generator/scripts/scaffold-generator.test.mjs +14 -1
- package/template/.agents/skills/yss-domain/SKILL.md +2 -1
- package/template/.agents/skills/yss-domain/agents/openai.yaml +2 -2
- package/template/.agents/skills/yss-domain/references/domain-layer-guide.md +2 -0
- package/template/.agents/skills/yss-dto/SKILL.md +6 -0
- package/template/.agents/skills/yss-dto/references/openapi-wire-profile.yaml +6 -0
- package/template/.agents/skills/yss-product-lifecycle/SKILL.md +1 -1
- package/template/.agents/skills/yss-product-lifecycle/references/matt-yss-adapter.md +2 -2
- package/template/.agents/skills/yss-product-lifecycle/references/orchestration-contract.yaml +12 -10
- package/template/.agents/skills/yss-product-lifecycle/references/orchestration.md +2 -2
- package/template/.agents/skills/yss-repository/SKILL.md +15 -13
- package/template/.agents/skills/yss-repository/agents/openai.yaml +2 -2
- package/template/.agents/skills/yss-repository/references/infrastructure-layer-guide.md +1 -1
- package/template/.agents/skills/yss-research/SKILL.md +73 -0
- package/template/.agents/skills/yss-research/agents/openai.yaml +3 -0
- package/template/.agents/skills/yss-research/assets/evidence-template.yaml +68 -0
- package/template/.agents/skills/yss-research/assets/research-brief-template.md +36 -0
- package/template/.agents/skills/yss-research/references/evidence-contract.md +42 -0
- package/template/.agents/skills/yss-research/scripts/validate-research-package.mjs +128 -0
- package/template/.agents/skills/yss-research/tests/run-scenarios.mjs +81 -0
- package/template/.agents/skills/yss-router/references/router-contract.yaml +7 -3
- package/template/.agents/skills/yss-stage-decision/SKILL.md +2 -1
- package/template/.agents/skills/yss-web-controller/SKILL.md +16 -10
- package/template/.agents/skills/yss-web-controller/agents/openai.yaml +2 -2
- package/template/.agents/skills/yss-web-controller/assets/templates/Controller.java.template +11 -11
- package/template/.agents/skills/yss-web-controller/assets/templates/WebConvertor.java.template +4 -7
- package/template/.agents/skills/yss-web-controller/assets/templates/web/dto/CreateRequest.java.template +2 -2
- package/template/.agents/skills/yss-web-controller/assets/templates/web/dto/PageRequest.java.template +4 -7
- package/template/.agents/skills/yss-web-controller/assets/templates/web/dto/UpdateRequest.java.template +2 -2
- package/template/.agents/skills/yss-web-controller/references/web-adapter-layer-guide.md +6 -4
- package/template/.agents/skills/yss-web-controller/references/web-generation-contract.schema.json +97 -0
- package/template/.agents/skills/yss-web-controller/scripts/generate_controller.mjs +141 -20
- package/template/.agents/skills/yss-web-controller/scripts/generate_controller.test.mjs +131 -35
- package/template/.claude/skills/ask-matt/SKILL.md +1 -1
- package/template/.claude/skills/wayfinder/SKILL.md +2 -2
- package/template/.claude/skills/yss-ddd-scaffold-generator/SKILL.md +14 -3
- package/template/.claude/skills/yss-ddd-scaffold-generator/references/ARCHITECTURE.md +3 -3
- package/template/.claude/skills/yss-ddd-scaffold-generator/references/USAGE_EXAMPLES.md +12 -1
- package/template/.claude/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-parent/SKILL.md +2 -1
- package/template/.claude/skills/yss-ddd-scaffold-generator/scripts/first-slice-compatibility.test.mjs +45 -11
- package/template/.claude/skills/yss-ddd-scaffold-generator/scripts/first-slice-verification.test.mjs +164 -0
- package/template/.claude/skills/yss-ddd-scaffold-generator/scripts/generate_scaffold.mjs +18 -4
- package/template/.claude/skills/yss-ddd-scaffold-generator/scripts/run_first_slice_verification.mjs +172 -0
- package/template/.claude/skills/yss-ddd-scaffold-generator/scripts/scaffold-generator.test.mjs +14 -1
- package/template/.claude/skills/yss-domain/SKILL.md +2 -1
- package/template/.claude/skills/yss-domain/agents/openai.yaml +2 -2
- package/template/.claude/skills/yss-domain/references/domain-layer-guide.md +2 -0
- package/template/.claude/skills/yss-dto/SKILL.md +6 -0
- package/template/.claude/skills/yss-dto/references/openapi-wire-profile.yaml +6 -0
- package/template/.claude/skills/yss-product-lifecycle/SKILL.md +1 -1
- package/template/.claude/skills/yss-product-lifecycle/references/matt-yss-adapter.md +2 -2
- package/template/.claude/skills/yss-product-lifecycle/references/orchestration-contract.yaml +12 -10
- package/template/.claude/skills/yss-product-lifecycle/references/orchestration.md +2 -2
- package/template/.claude/skills/yss-repository/SKILL.md +15 -13
- package/template/.claude/skills/yss-repository/agents/openai.yaml +2 -2
- package/template/.claude/skills/yss-repository/references/infrastructure-layer-guide.md +1 -1
- package/template/.claude/skills/yss-research/SKILL.md +73 -0
- package/template/.claude/skills/yss-research/agents/openai.yaml +3 -0
- package/template/.claude/skills/yss-research/assets/evidence-template.yaml +68 -0
- package/template/.claude/skills/yss-research/assets/research-brief-template.md +36 -0
- package/template/.claude/skills/yss-research/references/evidence-contract.md +42 -0
- package/template/.claude/skills/yss-research/scripts/validate-research-package.mjs +128 -0
- package/template/.claude/skills/yss-research/tests/run-scenarios.mjs +81 -0
- package/template/.claude/skills/yss-router/references/router-contract.yaml +7 -3
- package/template/.claude/skills/yss-stage-decision/SKILL.md +2 -1
- package/template/.claude/skills/yss-web-controller/SKILL.md +16 -10
- package/template/.claude/skills/yss-web-controller/agents/openai.yaml +2 -2
- package/template/.claude/skills/yss-web-controller/assets/templates/Controller.java.template +11 -11
- package/template/.claude/skills/yss-web-controller/assets/templates/WebConvertor.java.template +4 -7
- package/template/.claude/skills/yss-web-controller/assets/templates/web/dto/CreateRequest.java.template +2 -2
- package/template/.claude/skills/yss-web-controller/assets/templates/web/dto/PageRequest.java.template +4 -7
- package/template/.claude/skills/yss-web-controller/assets/templates/web/dto/UpdateRequest.java.template +2 -2
- package/template/.claude/skills/yss-web-controller/references/web-adapter-layer-guide.md +6 -4
- package/template/.claude/skills/yss-web-controller/references/web-generation-contract.schema.json +97 -0
- package/template/.claude/skills/yss-web-controller/scripts/generate_controller.mjs +141 -20
- package/template/.claude/skills/yss-web-controller/scripts/generate_controller.test.mjs +131 -35
- package/template/.codex/skills/ask-matt/SKILL.md +1 -1
- package/template/.codex/skills/product-design/package.json +4 -2
- package/template/.codex/skills/product-design/skills/research/SKILL.md +22 -0
- package/template/.codex/skills/product-design/skills/research/assets/evidence-template.yaml +65 -0
- package/template/.codex/skills/product-design/skills/research/assets/research-brief-template.md +33 -0
- package/template/.codex/skills/product-design/skills/research/references/evidence-audited.md +80 -0
- package/template/.codex/skills/product-design/skills/research/scripts/validate-research-package.mjs +149 -0
- package/template/.codex/skills/product-design/skills/research/tests/run-scenarios.mjs +72 -0
- package/template/.codex/skills/wayfinder/SKILL.md +2 -2
- package/template/.codex/skills/yss-ddd-scaffold-generator/SKILL.md +14 -3
- package/template/.codex/skills/yss-ddd-scaffold-generator/references/ARCHITECTURE.md +3 -3
- package/template/.codex/skills/yss-ddd-scaffold-generator/references/USAGE_EXAMPLES.md +12 -1
- package/template/.codex/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-parent/SKILL.md +2 -1
- package/template/.codex/skills/yss-ddd-scaffold-generator/scripts/first-slice-compatibility.test.mjs +45 -11
- package/template/.codex/skills/yss-ddd-scaffold-generator/scripts/first-slice-verification.test.mjs +164 -0
- package/template/.codex/skills/yss-ddd-scaffold-generator/scripts/generate_scaffold.mjs +18 -4
- package/template/.codex/skills/yss-ddd-scaffold-generator/scripts/run_first_slice_verification.mjs +172 -0
- package/template/.codex/skills/yss-ddd-scaffold-generator/scripts/scaffold-generator.test.mjs +14 -1
- package/template/.codex/skills/yss-domain/SKILL.md +2 -1
- package/template/.codex/skills/yss-domain/agents/openai.yaml +2 -2
- package/template/.codex/skills/yss-domain/references/domain-layer-guide.md +2 -0
- package/template/.codex/skills/yss-dto/SKILL.md +6 -0
- package/template/.codex/skills/yss-dto/references/openapi-wire-profile.yaml +6 -0
- package/template/.codex/skills/yss-product-lifecycle/SKILL.md +1 -1
- package/template/.codex/skills/yss-product-lifecycle/references/matt-yss-adapter.md +2 -2
- package/template/.codex/skills/yss-product-lifecycle/references/orchestration-contract.yaml +12 -10
- package/template/.codex/skills/yss-product-lifecycle/references/orchestration.md +2 -2
- package/template/.codex/skills/yss-repository/SKILL.md +15 -13
- package/template/.codex/skills/yss-repository/agents/openai.yaml +2 -2
- package/template/.codex/skills/yss-repository/references/infrastructure-layer-guide.md +1 -1
- package/template/.codex/skills/yss-research/SKILL.md +73 -0
- package/template/.codex/skills/yss-research/agents/openai.yaml +3 -0
- package/template/.codex/skills/yss-research/assets/evidence-template.yaml +68 -0
- package/template/.codex/skills/yss-research/assets/research-brief-template.md +36 -0
- package/template/.codex/skills/yss-research/references/evidence-contract.md +42 -0
- package/template/.codex/skills/yss-research/scripts/validate-research-package.mjs +128 -0
- package/template/.codex/skills/yss-research/tests/run-scenarios.mjs +81 -0
- package/template/.codex/skills/yss-router/references/router-contract.yaml +7 -3
- package/template/.codex/skills/yss-stage-decision/SKILL.md +2 -1
- package/template/.codex/skills/yss-web-controller/SKILL.md +16 -10
- package/template/.codex/skills/yss-web-controller/agents/openai.yaml +2 -2
- package/template/.codex/skills/yss-web-controller/assets/templates/Controller.java.template +11 -11
- package/template/.codex/skills/yss-web-controller/assets/templates/WebConvertor.java.template +4 -7
- package/template/.codex/skills/yss-web-controller/assets/templates/web/dto/CreateRequest.java.template +2 -2
- package/template/.codex/skills/yss-web-controller/assets/templates/web/dto/PageRequest.java.template +4 -7
- package/template/.codex/skills/yss-web-controller/assets/templates/web/dto/UpdateRequest.java.template +2 -2
- package/template/.codex/skills/yss-web-controller/references/web-adapter-layer-guide.md +6 -4
- package/template/.codex/skills/yss-web-controller/references/web-generation-contract.schema.json +97 -0
- package/template/.codex/skills/yss-web-controller/scripts/generate_controller.mjs +141 -20
- package/template/.codex/skills/yss-web-controller/scripts/generate_controller.test.mjs +131 -35
- package/template/.cursor/skills/ask-matt/SKILL.md +1 -1
- package/template/.cursor/skills/wayfinder/SKILL.md +2 -2
- package/template/.cursor/skills/yss-ddd-scaffold-generator/SKILL.md +14 -3
- package/template/.cursor/skills/yss-ddd-scaffold-generator/references/ARCHITECTURE.md +3 -3
- package/template/.cursor/skills/yss-ddd-scaffold-generator/references/USAGE_EXAMPLES.md +12 -1
- package/template/.cursor/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-parent/SKILL.md +2 -1
- package/template/.cursor/skills/yss-ddd-scaffold-generator/scripts/first-slice-compatibility.test.mjs +45 -11
- package/template/.cursor/skills/yss-ddd-scaffold-generator/scripts/first-slice-verification.test.mjs +164 -0
- package/template/.cursor/skills/yss-ddd-scaffold-generator/scripts/generate_scaffold.mjs +18 -4
- package/template/.cursor/skills/yss-ddd-scaffold-generator/scripts/run_first_slice_verification.mjs +172 -0
- package/template/.cursor/skills/yss-ddd-scaffold-generator/scripts/scaffold-generator.test.mjs +14 -1
- package/template/.cursor/skills/yss-domain/SKILL.md +2 -1
- package/template/.cursor/skills/yss-domain/agents/openai.yaml +2 -2
- package/template/.cursor/skills/yss-domain/references/domain-layer-guide.md +2 -0
- package/template/.cursor/skills/yss-dto/SKILL.md +6 -0
- package/template/.cursor/skills/yss-dto/references/openapi-wire-profile.yaml +6 -0
- package/template/.cursor/skills/yss-product-lifecycle/SKILL.md +1 -1
- package/template/.cursor/skills/yss-product-lifecycle/references/matt-yss-adapter.md +2 -2
- package/template/.cursor/skills/yss-product-lifecycle/references/orchestration-contract.yaml +12 -10
- package/template/.cursor/skills/yss-product-lifecycle/references/orchestration.md +2 -2
- package/template/.cursor/skills/yss-repository/SKILL.md +15 -13
- package/template/.cursor/skills/yss-repository/agents/openai.yaml +2 -2
- package/template/.cursor/skills/yss-repository/references/infrastructure-layer-guide.md +1 -1
- package/template/.cursor/skills/yss-research/SKILL.md +73 -0
- package/template/.cursor/skills/yss-research/agents/openai.yaml +3 -0
- package/template/.cursor/skills/yss-research/assets/evidence-template.yaml +68 -0
- package/template/.cursor/skills/yss-research/assets/research-brief-template.md +36 -0
- package/template/.cursor/skills/yss-research/references/evidence-contract.md +42 -0
- package/template/.cursor/skills/yss-research/scripts/validate-research-package.mjs +128 -0
- package/template/.cursor/skills/yss-research/tests/run-scenarios.mjs +81 -0
- package/template/.cursor/skills/yss-router/references/router-contract.yaml +7 -3
- package/template/.cursor/skills/yss-stage-decision/SKILL.md +2 -1
- package/template/.cursor/skills/yss-web-controller/SKILL.md +16 -10
- package/template/.cursor/skills/yss-web-controller/agents/openai.yaml +2 -2
- package/template/.cursor/skills/yss-web-controller/assets/templates/Controller.java.template +11 -11
- package/template/.cursor/skills/yss-web-controller/assets/templates/WebConvertor.java.template +4 -7
- package/template/.cursor/skills/yss-web-controller/assets/templates/web/dto/CreateRequest.java.template +2 -2
- package/template/.cursor/skills/yss-web-controller/assets/templates/web/dto/PageRequest.java.template +4 -7
- package/template/.cursor/skills/yss-web-controller/assets/templates/web/dto/UpdateRequest.java.template +2 -2
- package/template/.cursor/skills/yss-web-controller/references/web-adapter-layer-guide.md +6 -4
- package/template/.cursor/skills/yss-web-controller/references/web-generation-contract.schema.json +97 -0
- package/template/.cursor/skills/yss-web-controller/scripts/generate_controller.mjs +141 -20
- package/template/.cursor/skills/yss-web-controller/scripts/generate_controller.test.mjs +131 -35
- package/template/.hermes/skills/ask-matt/SKILL.md +1 -1
- package/template/.hermes/skills/wayfinder/SKILL.md +2 -2
- package/template/.hermes/skills/yss-ddd-scaffold-generator/SKILL.md +14 -3
- package/template/.hermes/skills/yss-ddd-scaffold-generator/references/ARCHITECTURE.md +3 -3
- package/template/.hermes/skills/yss-ddd-scaffold-generator/references/USAGE_EXAMPLES.md +12 -1
- package/template/.hermes/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-parent/SKILL.md +2 -1
- package/template/.hermes/skills/yss-ddd-scaffold-generator/scripts/first-slice-compatibility.test.mjs +45 -11
- package/template/.hermes/skills/yss-ddd-scaffold-generator/scripts/first-slice-verification.test.mjs +164 -0
- package/template/.hermes/skills/yss-ddd-scaffold-generator/scripts/generate_scaffold.mjs +18 -4
- package/template/.hermes/skills/yss-ddd-scaffold-generator/scripts/run_first_slice_verification.mjs +172 -0
- package/template/.hermes/skills/yss-ddd-scaffold-generator/scripts/scaffold-generator.test.mjs +14 -1
- package/template/.hermes/skills/yss-domain/SKILL.md +2 -1
- package/template/.hermes/skills/yss-domain/agents/openai.yaml +2 -2
- package/template/.hermes/skills/yss-domain/references/domain-layer-guide.md +2 -0
- package/template/.hermes/skills/yss-dto/SKILL.md +6 -0
- package/template/.hermes/skills/yss-dto/references/openapi-wire-profile.yaml +6 -0
- package/template/.hermes/skills/yss-product-lifecycle/SKILL.md +1 -1
- package/template/.hermes/skills/yss-product-lifecycle/references/matt-yss-adapter.md +2 -2
- package/template/.hermes/skills/yss-product-lifecycle/references/orchestration-contract.yaml +12 -10
- package/template/.hermes/skills/yss-product-lifecycle/references/orchestration.md +2 -2
- package/template/.hermes/skills/yss-repository/SKILL.md +15 -13
- package/template/.hermes/skills/yss-repository/agents/openai.yaml +2 -2
- package/template/.hermes/skills/yss-repository/references/infrastructure-layer-guide.md +1 -1
- package/template/.hermes/skills/yss-research/SKILL.md +73 -0
- package/template/.hermes/skills/yss-research/agents/openai.yaml +3 -0
- package/template/.hermes/skills/yss-research/assets/evidence-template.yaml +68 -0
- package/template/.hermes/skills/yss-research/assets/research-brief-template.md +36 -0
- package/template/.hermes/skills/yss-research/references/evidence-contract.md +42 -0
- package/template/.hermes/skills/yss-research/scripts/validate-research-package.mjs +128 -0
- package/template/.hermes/skills/yss-research/tests/run-scenarios.mjs +81 -0
- package/template/.hermes/skills/yss-router/references/router-contract.yaml +7 -3
- package/template/.hermes/skills/yss-stage-decision/SKILL.md +2 -1
- package/template/.hermes/skills/yss-web-controller/SKILL.md +16 -10
- package/template/.hermes/skills/yss-web-controller/agents/openai.yaml +2 -2
- package/template/.hermes/skills/yss-web-controller/assets/templates/Controller.java.template +11 -11
- package/template/.hermes/skills/yss-web-controller/assets/templates/WebConvertor.java.template +4 -7
- package/template/.hermes/skills/yss-web-controller/assets/templates/web/dto/CreateRequest.java.template +2 -2
- package/template/.hermes/skills/yss-web-controller/assets/templates/web/dto/PageRequest.java.template +4 -7
- package/template/.hermes/skills/yss-web-controller/assets/templates/web/dto/UpdateRequest.java.template +2 -2
- package/template/.hermes/skills/yss-web-controller/references/web-adapter-layer-guide.md +6 -4
- package/template/.hermes/skills/yss-web-controller/references/web-generation-contract.schema.json +97 -0
- package/template/.hermes/skills/yss-web-controller/scripts/generate_controller.mjs +141 -20
- package/template/.hermes/skills/yss-web-controller/scripts/generate_controller.test.mjs +131 -35
- package/template/.pi/skills/ask-matt/SKILL.md +1 -1
- package/template/.pi/skills/wayfinder/SKILL.md +2 -2
- package/template/.pi/skills/yss-ddd-scaffold-generator/SKILL.md +14 -3
- package/template/.pi/skills/yss-ddd-scaffold-generator/references/ARCHITECTURE.md +3 -3
- package/template/.pi/skills/yss-ddd-scaffold-generator/references/USAGE_EXAMPLES.md +12 -1
- package/template/.pi/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-parent/SKILL.md +2 -1
- package/template/.pi/skills/yss-ddd-scaffold-generator/scripts/first-slice-compatibility.test.mjs +45 -11
- package/template/.pi/skills/yss-ddd-scaffold-generator/scripts/first-slice-verification.test.mjs +164 -0
- package/template/.pi/skills/yss-ddd-scaffold-generator/scripts/generate_scaffold.mjs +18 -4
- package/template/.pi/skills/yss-ddd-scaffold-generator/scripts/run_first_slice_verification.mjs +172 -0
- package/template/.pi/skills/yss-ddd-scaffold-generator/scripts/scaffold-generator.test.mjs +14 -1
- package/template/.pi/skills/yss-domain/SKILL.md +2 -1
- package/template/.pi/skills/yss-domain/agents/openai.yaml +2 -2
- package/template/.pi/skills/yss-domain/references/domain-layer-guide.md +2 -0
- package/template/.pi/skills/yss-dto/SKILL.md +6 -0
- package/template/.pi/skills/yss-dto/references/openapi-wire-profile.yaml +6 -0
- package/template/.pi/skills/yss-product-lifecycle/SKILL.md +1 -1
- package/template/.pi/skills/yss-product-lifecycle/references/matt-yss-adapter.md +2 -2
- package/template/.pi/skills/yss-product-lifecycle/references/orchestration-contract.yaml +12 -10
- package/template/.pi/skills/yss-product-lifecycle/references/orchestration.md +2 -2
- package/template/.pi/skills/yss-repository/SKILL.md +15 -13
- package/template/.pi/skills/yss-repository/agents/openai.yaml +2 -2
- package/template/.pi/skills/yss-repository/references/infrastructure-layer-guide.md +1 -1
- package/template/.pi/skills/yss-research/SKILL.md +73 -0
- package/template/.pi/skills/yss-research/agents/openai.yaml +3 -0
- package/template/.pi/skills/yss-research/assets/evidence-template.yaml +68 -0
- package/template/.pi/skills/yss-research/assets/research-brief-template.md +36 -0
- package/template/.pi/skills/yss-research/references/evidence-contract.md +42 -0
- package/template/.pi/skills/yss-research/scripts/validate-research-package.mjs +128 -0
- package/template/.pi/skills/yss-research/tests/run-scenarios.mjs +81 -0
- package/template/.pi/skills/yss-router/references/router-contract.yaml +7 -3
- package/template/.pi/skills/yss-stage-decision/SKILL.md +2 -1
- package/template/.pi/skills/yss-web-controller/SKILL.md +16 -10
- package/template/.pi/skills/yss-web-controller/agents/openai.yaml +2 -2
- package/template/.pi/skills/yss-web-controller/assets/templates/Controller.java.template +11 -11
- package/template/.pi/skills/yss-web-controller/assets/templates/WebConvertor.java.template +4 -7
- package/template/.pi/skills/yss-web-controller/assets/templates/web/dto/CreateRequest.java.template +2 -2
- package/template/.pi/skills/yss-web-controller/assets/templates/web/dto/PageRequest.java.template +4 -7
- package/template/.pi/skills/yss-web-controller/assets/templates/web/dto/UpdateRequest.java.template +2 -2
- package/template/.pi/skills/yss-web-controller/references/web-adapter-layer-guide.md +6 -4
- package/template/.pi/skills/yss-web-controller/references/web-generation-contract.schema.json +97 -0
- package/template/.pi/skills/yss-web-controller/scripts/generate_controller.mjs +141 -20
- package/template/.pi/skills/yss-web-controller/scripts/generate_controller.test.mjs +131 -35
- package/template/.qoder/skills/ask-matt/SKILL.md +1 -1
- package/template/.qoder/skills/wayfinder/SKILL.md +2 -2
- package/template/.qoder/skills/yss-ddd-scaffold-generator/SKILL.md +14 -3
- package/template/.qoder/skills/yss-ddd-scaffold-generator/references/ARCHITECTURE.md +3 -3
- package/template/.qoder/skills/yss-ddd-scaffold-generator/references/USAGE_EXAMPLES.md +12 -1
- package/template/.qoder/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-parent/SKILL.md +2 -1
- package/template/.qoder/skills/yss-ddd-scaffold-generator/scripts/first-slice-compatibility.test.mjs +45 -11
- package/template/.qoder/skills/yss-ddd-scaffold-generator/scripts/first-slice-verification.test.mjs +164 -0
- package/template/.qoder/skills/yss-ddd-scaffold-generator/scripts/generate_scaffold.mjs +18 -4
- package/template/.qoder/skills/yss-ddd-scaffold-generator/scripts/run_first_slice_verification.mjs +172 -0
- package/template/.qoder/skills/yss-ddd-scaffold-generator/scripts/scaffold-generator.test.mjs +14 -1
- package/template/.qoder/skills/yss-domain/SKILL.md +2 -1
- package/template/.qoder/skills/yss-domain/agents/openai.yaml +2 -2
- package/template/.qoder/skills/yss-domain/references/domain-layer-guide.md +2 -0
- package/template/.qoder/skills/yss-dto/SKILL.md +6 -0
- package/template/.qoder/skills/yss-dto/references/openapi-wire-profile.yaml +6 -0
- package/template/.qoder/skills/yss-product-lifecycle/SKILL.md +1 -1
- package/template/.qoder/skills/yss-product-lifecycle/references/matt-yss-adapter.md +2 -2
- package/template/.qoder/skills/yss-product-lifecycle/references/orchestration-contract.yaml +12 -10
- package/template/.qoder/skills/yss-product-lifecycle/references/orchestration.md +2 -2
- package/template/.qoder/skills/yss-repository/SKILL.md +15 -13
- package/template/.qoder/skills/yss-repository/agents/openai.yaml +2 -2
- package/template/.qoder/skills/yss-repository/references/infrastructure-layer-guide.md +1 -1
- package/template/.qoder/skills/yss-research/SKILL.md +73 -0
- package/template/.qoder/skills/yss-research/agents/openai.yaml +3 -0
- package/template/.qoder/skills/yss-research/assets/evidence-template.yaml +68 -0
- package/template/.qoder/skills/yss-research/assets/research-brief-template.md +36 -0
- package/template/.qoder/skills/yss-research/references/evidence-contract.md +42 -0
- package/template/.qoder/skills/yss-research/scripts/validate-research-package.mjs +128 -0
- package/template/.qoder/skills/yss-research/tests/run-scenarios.mjs +81 -0
- package/template/.qoder/skills/yss-router/references/router-contract.yaml +7 -3
- package/template/.qoder/skills/yss-stage-decision/SKILL.md +2 -1
- package/template/.qoder/skills/yss-web-controller/SKILL.md +16 -10
- package/template/.qoder/skills/yss-web-controller/agents/openai.yaml +2 -2
- package/template/.qoder/skills/yss-web-controller/assets/templates/Controller.java.template +11 -11
- package/template/.qoder/skills/yss-web-controller/assets/templates/WebConvertor.java.template +4 -7
- package/template/.qoder/skills/yss-web-controller/assets/templates/web/dto/CreateRequest.java.template +2 -2
- package/template/.qoder/skills/yss-web-controller/assets/templates/web/dto/PageRequest.java.template +4 -7
- package/template/.qoder/skills/yss-web-controller/assets/templates/web/dto/UpdateRequest.java.template +2 -2
- package/template/.qoder/skills/yss-web-controller/references/web-adapter-layer-guide.md +6 -4
- package/template/.qoder/skills/yss-web-controller/references/web-generation-contract.schema.json +97 -0
- package/template/.qoder/skills/yss-web-controller/scripts/generate_controller.mjs +141 -20
- package/template/.qoder/skills/yss-web-controller/scripts/generate_controller.test.mjs +131 -35
- package/template/.trae/skills/ask-matt/SKILL.md +1 -1
- package/template/.trae/skills/wayfinder/SKILL.md +2 -2
- package/template/.trae/skills/yss-ddd-scaffold-generator/SKILL.md +14 -3
- package/template/.trae/skills/yss-ddd-scaffold-generator/references/ARCHITECTURE.md +3 -3
- package/template/.trae/skills/yss-ddd-scaffold-generator/references/USAGE_EXAMPLES.md +12 -1
- package/template/.trae/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-parent/SKILL.md +2 -1
- package/template/.trae/skills/yss-ddd-scaffold-generator/scripts/first-slice-compatibility.test.mjs +45 -11
- package/template/.trae/skills/yss-ddd-scaffold-generator/scripts/first-slice-verification.test.mjs +164 -0
- package/template/.trae/skills/yss-ddd-scaffold-generator/scripts/generate_scaffold.mjs +18 -4
- package/template/.trae/skills/yss-ddd-scaffold-generator/scripts/run_first_slice_verification.mjs +172 -0
- package/template/.trae/skills/yss-ddd-scaffold-generator/scripts/scaffold-generator.test.mjs +14 -1
- package/template/.trae/skills/yss-domain/SKILL.md +2 -1
- package/template/.trae/skills/yss-domain/agents/openai.yaml +2 -2
- package/template/.trae/skills/yss-domain/references/domain-layer-guide.md +2 -0
- package/template/.trae/skills/yss-dto/SKILL.md +6 -0
- package/template/.trae/skills/yss-dto/references/openapi-wire-profile.yaml +6 -0
- package/template/.trae/skills/yss-product-lifecycle/SKILL.md +1 -1
- package/template/.trae/skills/yss-product-lifecycle/references/matt-yss-adapter.md +2 -2
- package/template/.trae/skills/yss-product-lifecycle/references/orchestration-contract.yaml +12 -10
- package/template/.trae/skills/yss-product-lifecycle/references/orchestration.md +2 -2
- package/template/.trae/skills/yss-repository/SKILL.md +15 -13
- package/template/.trae/skills/yss-repository/agents/openai.yaml +2 -2
- package/template/.trae/skills/yss-repository/references/infrastructure-layer-guide.md +1 -1
- package/template/.trae/skills/yss-research/SKILL.md +73 -0
- package/template/.trae/skills/yss-research/agents/openai.yaml +3 -0
- package/template/.trae/skills/yss-research/assets/evidence-template.yaml +68 -0
- package/template/.trae/skills/yss-research/assets/research-brief-template.md +36 -0
- package/template/.trae/skills/yss-research/references/evidence-contract.md +42 -0
- package/template/.trae/skills/yss-research/scripts/validate-research-package.mjs +128 -0
- package/template/.trae/skills/yss-research/tests/run-scenarios.mjs +81 -0
- package/template/.trae/skills/yss-router/references/router-contract.yaml +7 -3
- package/template/.trae/skills/yss-stage-decision/SKILL.md +2 -1
- package/template/.trae/skills/yss-web-controller/SKILL.md +16 -10
- package/template/.trae/skills/yss-web-controller/agents/openai.yaml +2 -2
- package/template/.trae/skills/yss-web-controller/assets/templates/Controller.java.template +11 -11
- package/template/.trae/skills/yss-web-controller/assets/templates/WebConvertor.java.template +4 -7
- package/template/.trae/skills/yss-web-controller/assets/templates/web/dto/CreateRequest.java.template +2 -2
- package/template/.trae/skills/yss-web-controller/assets/templates/web/dto/PageRequest.java.template +4 -7
- package/template/.trae/skills/yss-web-controller/assets/templates/web/dto/UpdateRequest.java.template +2 -2
- package/template/.trae/skills/yss-web-controller/references/web-adapter-layer-guide.md +6 -4
- package/template/.trae/skills/yss-web-controller/references/web-generation-contract.schema.json +97 -0
- package/template/.trae/skills/yss-web-controller/scripts/generate_controller.mjs +141 -20
- package/template/.trae/skills/yss-web-controller/scripts/generate_controller.test.mjs +131 -35
- package/template/AGENTS.md +2 -2
- package/template/CONTEXT.md +1 -1
- package/template/docs/agents/digital-human-roles.yaml +2 -2
- package/template/docs/agents/yss-skill-registry.yaml +18 -3
- package/template/docs/process/MATT-POCOCK-ENGINEERING-SKILLS.md +1 -0
- package/template/docs/user-guide//347/224/250/346/210/267/346/211/213/345/206/214.md +1 -1
- package/template/scripts/lib/scenario-checks.mjs +8 -4
- package/template/scripts/lib/skill-registry.mjs +49 -5
- package/template/scripts/lib/skill-supply-chain.mjs +3 -2
- package/template/scripts/verify-yss-dto-openapi-profile +8 -0
- package/template/skills-lock.json +30 -30
- package/template.snapshot.json +4 -4
- package/template/.agents/skills/research/SKILL.md +0 -12
- package/template/.agents/skills/research/agents/openai.yaml +0 -3
- package/template/.claude/skills/research/SKILL.md +0 -12
- package/template/.claude/skills/research/agents/openai.yaml +0 -3
- package/template/.codex/skills/research/SKILL.md +0 -12
- package/template/.codex/skills/research/agents/openai.yaml +0 -3
- package/template/.cursor/skills/research/SKILL.md +0 -12
- package/template/.cursor/skills/research/agents/openai.yaml +0 -3
- package/template/.hermes/skills/research/SKILL.md +0 -12
- package/template/.hermes/skills/research/agents/openai.yaml +0 -3
- package/template/.pi/skills/research/SKILL.md +0 -12
- package/template/.pi/skills/research/agents/openai.yaml +0 -3
- package/template/.qoder/skills/research/SKILL.md +0 -12
- package/template/.qoder/skills/research/agents/openai.yaml +0 -3
- package/template/.trae/skills/research/SKILL.md +0 -12
- package/template/.trae/skills/research/agents/openai.yaml +0 -3
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { mkdtempSync, readFileSync, rmSync, writeFileSync } from "node:fs";
|
|
3
|
+
import { tmpdir } from "node:os";
|
|
4
|
+
import path from "node:path";
|
|
5
|
+
import { spawnSync } from "node:child_process";
|
|
6
|
+
import { fileURLToPath } from "node:url";
|
|
7
|
+
|
|
8
|
+
const root = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "..");
|
|
9
|
+
const validator = path.join(root, "scripts/validate-research-package.mjs");
|
|
10
|
+
const template = JSON.parse(readFileSync(path.join(root, "assets/evidence-template.yaml"), "utf8"));
|
|
11
|
+
const directory = mkdtempSync(path.join(tmpdir(), "yss-research-"));
|
|
12
|
+
const brief = path.join(directory, "sample-research-brief.md");
|
|
13
|
+
const evidence = path.join(directory, "sample-evidence.yaml");
|
|
14
|
+
const headings = ["Research Scope", "Executive Read", "Findings", "Counter-Signals", "Source Map", "Decision Handoff", "Evidence Limitations"];
|
|
15
|
+
|
|
16
|
+
function run(payload, status, expected) {
|
|
17
|
+
writeFileSync(brief, `${headings.map((heading) => `## ${heading}`).join("\n\n")}\n\n${payload.claims.map((claim) => claim.id).join(" ")}\n`);
|
|
18
|
+
writeFileSync(evidence, `${JSON.stringify(payload, null, 2)}\n`);
|
|
19
|
+
const result = spawnSync(process.execPath, [validator, brief, evidence], { encoding: "utf8" });
|
|
20
|
+
if (result.status !== status || !`${result.stdout}${result.stderr}`.includes(expected)) throw new Error(`expected ${status}/${expected}, got ${result.status}: ${result.stdout}${result.stderr}`);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
try {
|
|
24
|
+
template.scope.topic = "Example strategy question";
|
|
25
|
+
template.scope.audience = "Product team";
|
|
26
|
+
template.scope.time_horizon = "Last 12 months";
|
|
27
|
+
template.scope.research_questions = ["Which problem should the domain address?"];
|
|
28
|
+
template.scope.inclusion_criteria = ["Direct experience in scope"];
|
|
29
|
+
template.scope.exclusion_criteria = ["Untraceable reposts"];
|
|
30
|
+
template.ownership.downstream_owner = "yss-stage-decision";
|
|
31
|
+
template.search_log[0].channel = "Support records";
|
|
32
|
+
template.search_log[0].query_or_corpus = "failed approval workflow";
|
|
33
|
+
template.search_log[0].searched_at = "2026-09-03";
|
|
34
|
+
template.search_log[1].channel = "Support records";
|
|
35
|
+
template.search_log[1].query_or_corpus = "successful approval workflow";
|
|
36
|
+
template.search_log[1].searched_at = "2026-09-03";
|
|
37
|
+
template.evidence_items[0].source_class = "support";
|
|
38
|
+
template.evidence_items[0].source_ref = "support-case-001";
|
|
39
|
+
template.evidence_items[0].locator = "event-3";
|
|
40
|
+
template.evidence_items[0].observed_at = "2026-09-03";
|
|
41
|
+
template.evidence_items[0].evidence_date = "2026-08-30";
|
|
42
|
+
template.evidence_items[0].observation = "The approval stopped when the owner was missing.";
|
|
43
|
+
template.evidence_items[0].limitations = ["Single support case"];
|
|
44
|
+
template.claims[0].statement = "A missing owner can block the approval workflow.";
|
|
45
|
+
run(template, 0, "YSS research package valid");
|
|
46
|
+
|
|
47
|
+
const falseStrategyBackground = structuredClone(template);
|
|
48
|
+
falseStrategyBackground.claims[0].decision_bearing = false;
|
|
49
|
+
run(falseStrategyBackground, 1, "strategy claim kind must be decision-bearing");
|
|
50
|
+
|
|
51
|
+
const unsupported = structuredClone(template);
|
|
52
|
+
unsupported.claims[0].audit_status = "unsupported";
|
|
53
|
+
unsupported.claims[0].disposition = "publish";
|
|
54
|
+
run(unsupported, 1, "must use needs-deeper-research");
|
|
55
|
+
|
|
56
|
+
const unsupportedDecision = structuredClone(template);
|
|
57
|
+
unsupportedDecision.claims[0].audit_status = "unsupported";
|
|
58
|
+
unsupportedDecision.claims[0].disposition = "needs-deeper-research";
|
|
59
|
+
run(unsupportedDecision, 1, "decision-bearing and cannot remain unsupported");
|
|
60
|
+
|
|
61
|
+
const falseCounter = structuredClone(template);
|
|
62
|
+
falseCounter.claims[0].counter_signal_refs = ["search-001"];
|
|
63
|
+
run(falseCounter, 1, "counter-signal search must have result none-found");
|
|
64
|
+
|
|
65
|
+
const technicalWithoutPrimary = structuredClone(template);
|
|
66
|
+
technicalWithoutPrimary.profile = "technical-evidence";
|
|
67
|
+
technicalWithoutPrimary.claims[0].claim_kind = "technical-fact";
|
|
68
|
+
run(technicalWithoutPrimary, 1, "technical claim without primary evidence");
|
|
69
|
+
|
|
70
|
+
const leadOnly = structuredClone(template);
|
|
71
|
+
leadOnly.evidence_items[0].source_level = "lead-only";
|
|
72
|
+
run(leadOnly, 1, "uses lead-only evidence as support");
|
|
73
|
+
|
|
74
|
+
const unaudited = structuredClone(template);
|
|
75
|
+
unaudited.audit_summary.audited_claim_ids = [];
|
|
76
|
+
run(unaudited, 1, "must be a non-empty array");
|
|
77
|
+
|
|
78
|
+
process.stdout.write("YSS research scenarios passed (8)\n");
|
|
79
|
+
} finally {
|
|
80
|
+
rmSync(directory, { recursive: true, force: true });
|
|
81
|
+
}
|
|
@@ -5,6 +5,7 @@ skill_aliases:
|
|
|
5
5
|
api-integration: yss-api-integration
|
|
6
6
|
microapp-commit: yss-microapp-commit
|
|
7
7
|
page-module-development: yss-page-module-development
|
|
8
|
+
research: yss-research
|
|
8
9
|
use-table-height: yss-use-table-height
|
|
9
10
|
use-tree-height: yss-use-tree-height
|
|
10
11
|
implementation_path_policy:
|
|
@@ -197,10 +198,10 @@ dependency_closure:
|
|
|
197
198
|
always: [alibaba-java-code-style]
|
|
198
199
|
when_conversion: [mapstruct, lombok]
|
|
199
200
|
yss-repository:
|
|
200
|
-
always: [mapstruct, lombok, alibaba-java-code-style]
|
|
201
|
-
when_mybatis: [yss-mybatis]
|
|
201
|
+
always: [yss-mybatis, mapstruct, lombok, alibaba-java-code-style]
|
|
202
202
|
yss-web-controller:
|
|
203
|
-
always: [yss-dto, mapstruct, lombok, alibaba-java-code-style]
|
|
203
|
+
always: [yss-dto, yss-validation, mapstruct, lombok, alibaba-java-code-style]
|
|
204
|
+
when_error_mapping: [yss-exception]
|
|
204
205
|
yss-userinfo:
|
|
205
206
|
always: [yss-dto]
|
|
206
207
|
when_cache_lookup: [yss-cache]
|
|
@@ -245,8 +246,11 @@ end_to_end_backend_required:
|
|
|
245
246
|
- yss-domain
|
|
246
247
|
- yss-application
|
|
247
248
|
- yss-repository
|
|
249
|
+
- yss-mybatis
|
|
248
250
|
- yss-web-controller
|
|
249
251
|
- yss-dto
|
|
252
|
+
- yss-exception
|
|
253
|
+
- yss-validation
|
|
250
254
|
- mapstruct
|
|
251
255
|
- lombok
|
|
252
256
|
- alibaba-java-code-style
|
|
@@ -17,7 +17,7 @@ description: 编排 Discovery 到 Spec 入口的阶段决策与 DDD 战略设计
|
|
|
17
17
|
## 执行顺序
|
|
18
18
|
|
|
19
19
|
1. 读取 `yss-project.yaml`、`CONTEXT.md`、既有 Discovery/Spec、ADR 和父 Ticket/checkpoint。
|
|
20
|
-
2. 分离事实、决策、假设、约束和未决项;技术事实走 `research`,市场/竞品事实走 `competitive-intelligence`。
|
|
20
|
+
2. 分离事实、决策、假设、约束和未决项;技术事实走 `yss-research` 的 `technical-evidence`,领域边界、业务规则、MVP、非目标、成功标准或阶段推进依据等决策证据走 `strategy-evidence`,市场/竞品事实走 `competitive-intelligence`。
|
|
21
21
|
3. 从业务场景、事件、规则、责任人和失败路径识别子域及限界上下文,不从数据库表或调用链直接反推边界。
|
|
22
22
|
4. 为每个上下文建立本地统一语言;为跨上下文关系记录语义上游/下游、业务决策权、技术传输方向和翻译责任。
|
|
23
23
|
5. 记录核心领域概念候选,不提前锁定 Entity 或 Aggregate。
|
|
@@ -31,6 +31,7 @@ description: 编排 Discovery 到 Spec 入口的阶段决策与 DDD 战略设计
|
|
|
31
31
|
## 产物与批准
|
|
32
32
|
|
|
33
33
|
- DDD 资产是事实源,阶段决策包只通过 `domain_strategy_ref` 引用它们。
|
|
34
|
+
- 进入 `gate.domain-strategy-approved` 或 `gate.stage-decision-package-approved` 的外部决策证据必须引用通过校验的 `yss-research` `evidence-audited` 研究包;研究包只提供证据,不得直接修改本技能资产或批准门禁。
|
|
34
35
|
- `stage_decision_package` 必须经过 `draft → ready-for-human → approved`;起草者不得自签。
|
|
35
36
|
- 建议门禁为 `gate.domain-strategy-approved` 和 `gate.stage-decision-package-approved`,实际状态由 `yss-product-lifecycle` 维护;阶段包批准引用必须通过 `scripts/verify-approval-record`,不得用不可读路径或聊天确认替代。
|
|
36
37
|
- 下游只能消费批准且版本当前的包;发现语义冲突返回 `drift` / `new_impacts`,不得静默修改上游。
|
|
@@ -16,16 +16,17 @@ description: Use when generating or refactoring YSS Web Adapter Controllers, req
|
|
|
16
16
|
## 不适用
|
|
17
17
|
|
|
18
18
|
- 用户只是要新增一个手写复杂接口,不一定要用脚本。
|
|
19
|
-
-
|
|
19
|
+
- 用户还没有稳定的 Application Service、冻结 OpenAPI 或 metadata,先回 Router 补 `yss-application` / `yss-domain` 和相应合同输入。
|
|
20
20
|
|
|
21
21
|
## 优先流程
|
|
22
22
|
|
|
23
|
-
1. 先确认冻结 OpenAPI
|
|
24
|
-
2.
|
|
25
|
-
3. 涉及
|
|
26
|
-
4.
|
|
27
|
-
5.
|
|
28
|
-
6.
|
|
23
|
+
1. 先确认冻结 OpenAPI、批准且版本当前的 Web generation contract schema v2、Application Service 接口、metadata、基础包、模块名、领域 segment 和 web 落盘目录;合同必须绑定 Slice `contract_id` / `contract_version` / `slice_id`、`yss-dto` wire profile 引用与 digest、允许写路径、证据与验证命令。
|
|
24
|
+
2. 加载并遵守 `yss-dto` 与 `yss-validation`;错误映射影响命中时再加载 `yss-exception`。
|
|
25
|
+
3. 涉及 DTO / VO / CMD / Query POJO 样板代码时,加载并遵守 `lombok`。
|
|
26
|
+
4. 涉及 Domain / Application Result 到 VO / DTO 或 CMD / Query 到输入模型的转换时,加载并遵守 `mapstruct`。
|
|
27
|
+
5. 运行 `node scripts/generate_controller.mjs`。
|
|
28
|
+
6. 生成后检查路径、命名、返回值包装、Application Service 引用、`@Valid`、Lombok 注解和 MapStruct WebConvertor 是否对齐项目。
|
|
29
|
+
7. 对复杂接口做少量手工修正,不在 skill 中承诺自动覆盖全部业务逻辑。
|
|
29
30
|
|
|
30
31
|
## 推荐命令
|
|
31
32
|
|
|
@@ -33,6 +34,8 @@ description: Use when generating or refactoring YSS Web Adapter Controllers, req
|
|
|
33
34
|
node scripts/generate_controller.mjs \
|
|
34
35
|
--metadata-file /path/metadata.json \
|
|
35
36
|
--contract-file /path/approved-web-generation-contract.json \
|
|
37
|
+
--dto-wire-profile-file /path/to/yss-dto/references/openapi-wire-profile.yaml \
|
|
38
|
+
--scaffold-manifest-file /path/service/.yss/scaffold-generation.json \
|
|
36
39
|
--base-package com.yss.demo \
|
|
37
40
|
--module-name demo \
|
|
38
41
|
--domain-segment example \
|
|
@@ -53,18 +56,21 @@ node scripts/generate_controller.mjs \
|
|
|
53
56
|
## 约束
|
|
54
57
|
|
|
55
58
|
- 生成代码只依赖既有 Application Service;读写操作都禁止绕过 Application。复杂查询经 Application Query Port 接入 Infrastructure。
|
|
56
|
-
-
|
|
59
|
+
- 返回包装类、分页默认值、允许字段与 `PageResult.of(...)` 参数语义必须消费合同绑定的 `yss-dto/references/openapi-wire-profile.yaml`;Web skill 不复制或自行维护第二套协议。
|
|
57
60
|
- DTO / VO / CMD / Query 默认用 Lombok 处理 getter/setter、constructor、builder 和日志样板;不要在 Controller 内部类或非约定包临时定义主要 DTO / VO。
|
|
58
61
|
- `WebConvertor` 使用 `@Mapper(componentModel = "spring")` 和构造器注入;禁止静态 `INSTANCE`、在 Controller / Application 中大段手写字段赋值、使用 `BeanUtils.copyProperties` 或反射式通用拷贝。
|
|
59
62
|
- HTTP Request 不继承会暴露内部协作字段的 `PageQuery`;只生成冻结 OpenAPI allowlist 字段,禁止把 `offset`、`needTotalCount`、`tempTotalCount` 变成客户端输入。
|
|
63
|
+
- `fields.<table>.pagination` 必须显式列出 `yss-dto` wire profile 允许暴露的字段子集;模板不得无条件生成字段或自行定义默认值。
|
|
60
64
|
- 先跑脚本,再按项目规范做少量手调。
|
|
61
65
|
- `javax` / `jakarta` validation namespace 必须来自工程基线,不得按记忆选择。
|
|
62
66
|
- 若用户只是要改单个 Controller,先看现有代码,不要盲覆盖整个目录。
|
|
63
|
-
- 脚本是 initialize-only
|
|
67
|
+
- 脚本是 initialize-only;写入前先规划全部目标并校验 `allowed_write_paths`,任一目标已存在或传入 `--force` 时整体返回 `unsupported`。落盘使用排他创建和失败回滚,不得留下部分文件;旧项目迁移不属于该生成器。
|
|
68
|
+
- `integration_mode=existing-project` 保留已登记工程的 Boot 2/Boot 3 能力;`integration_mode=scaffold-v2` 必须提供 `--scaffold-manifest-file`,且 Manifest 已达到 `empty-scaffold-verified`,Profile、基础包和标准 Web module 路径全部一致。
|
|
64
69
|
|
|
65
70
|
## 按需读取
|
|
66
71
|
|
|
67
72
|
- 分层开发规范:`references/web-adapter-layer-guide.md`
|
|
73
|
+
- Web 生成合同 schema:`references/web-generation-contract.schema.json`
|
|
68
74
|
- 生成脚本:`scripts/generate_controller.mjs`
|
|
69
75
|
- Controller 模板:`assets/templates/Controller.java.template`
|
|
70
76
|
- Convertor 模板:`assets/templates/WebConvertor.java.template`
|
|
@@ -73,7 +79,7 @@ node scripts/generate_controller.mjs \
|
|
|
73
79
|
|
|
74
80
|
## 阶段 7 合同
|
|
75
81
|
|
|
76
|
-
-
|
|
82
|
+
- 只消费已批准且当前的 schema v2 Web generation contract 和冻结 OpenAPI/no-impact record;schema v1 为 `unsupported`,不得自动升级,也不得用 Controller 或半成品 backend 反向定义产品契约。
|
|
77
83
|
- DTO/VO/WebConvertor 机械骨架可用 `controlled-generation`;权限、错误映射、校验语义和接口行为必须使用 `behavior-tdd`。
|
|
78
84
|
- 写入必须位于合同 `allowed_write_paths`,并提供 Controller、DTO/VO、WebConvertor、契约/API 测试和实际验证结果。
|
|
79
85
|
- 按统一 `YSS Skill Execution Result` 返回偏离与新增影响;出现新 API/schema、权限或响应包装变化时暂停并回到 Router/生命周期。
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
version: 1
|
|
2
2
|
interface:
|
|
3
3
|
display_name: "YSS Web Controller"
|
|
4
|
-
short_description: "Web Controller、DTO
|
|
5
|
-
default_prompt: "Use $yss-web-controller
|
|
4
|
+
short_description: "按批准 Slice/Web 合同生成 Controller、Wire DTO 与 Convertor"
|
|
5
|
+
default_prompt: "Use $yss-web-controller with an approved schema v2 Web generation contract, frozen OpenAPI, stable Application interfaces, and allowed write paths to generate YSS REST adapters atomically."
|
|
@@ -3,8 +3,8 @@ package ${base_package}.rest;
|
|
|
3
3
|
${application_service_import}
|
|
4
4
|
${dto_imports}
|
|
5
5
|
${web_convertor_import}
|
|
6
|
-
import
|
|
7
|
-
import
|
|
6
|
+
import ${page_result_type};
|
|
7
|
+
import ${single_result_type};
|
|
8
8
|
import lombok.RequiredArgsConstructor;
|
|
9
9
|
import org.springframework.web.bind.annotation.*;
|
|
10
10
|
import io.swagger.v3.oas.annotations.Operation;
|
|
@@ -30,7 +30,7 @@ public class ${domain_class}Controller {
|
|
|
30
30
|
*/
|
|
31
31
|
@PostMapping("/page")
|
|
32
32
|
@Operation(summary = "分页查询")
|
|
33
|
-
public
|
|
33
|
+
public ${page_result_simple_name}<${response_class}> page(@Valid @RequestBody ${page_request_class} request) {
|
|
34
34
|
return webConvertor.toResponsePage(${query_call});
|
|
35
35
|
}
|
|
36
36
|
|
|
@@ -39,8 +39,8 @@ public class ${domain_class}Controller {
|
|
|
39
39
|
*/
|
|
40
40
|
@GetMapping("/{id}")
|
|
41
41
|
@Operation(summary = "详情查询")
|
|
42
|
-
public
|
|
43
|
-
return
|
|
42
|
+
public ${single_result_simple_name}<${response_class}> detail(@PathVariable Long id) {
|
|
43
|
+
return ${single_result_simple_name}.${single_result_factory_method}(webConvertor.toResponse(${detail_call}));
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
/**
|
|
@@ -48,8 +48,8 @@ public class ${domain_class}Controller {
|
|
|
48
48
|
*/
|
|
49
49
|
@PostMapping
|
|
50
50
|
@Operation(summary = "新增")
|
|
51
|
-
public
|
|
52
|
-
return
|
|
51
|
+
public ${single_result_simple_name}<Long> add(@Valid @RequestBody ${create_request_class} request) {
|
|
52
|
+
return ${single_result_simple_name}.${single_result_factory_method}(${add_call});
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
/**
|
|
@@ -57,8 +57,8 @@ public class ${domain_class}Controller {
|
|
|
57
57
|
*/
|
|
58
58
|
@PutMapping
|
|
59
59
|
@Operation(summary = "更新")
|
|
60
|
-
public
|
|
61
|
-
return
|
|
60
|
+
public ${single_result_simple_name}<Boolean> update(@Valid @RequestBody ${update_request_class} request) {
|
|
61
|
+
return ${single_result_simple_name}.${single_result_factory_method}(${update_call});
|
|
62
62
|
}
|
|
63
63
|
|
|
64
64
|
/**
|
|
@@ -66,7 +66,7 @@ public class ${domain_class}Controller {
|
|
|
66
66
|
*/
|
|
67
67
|
@DeleteMapping("/{id}")
|
|
68
68
|
@Operation(summary = "删除")
|
|
69
|
-
public
|
|
70
|
-
return
|
|
69
|
+
public ${single_result_simple_name}<Boolean> delete(@PathVariable Long id) {
|
|
70
|
+
return ${single_result_simple_name}.${single_result_factory_method}(${delete_call});
|
|
71
71
|
}
|
|
72
72
|
}
|
package/template/.qoder/skills/yss-web-controller/assets/templates/WebConvertor.java.template
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
package ${base_package}.rest.convertor;
|
|
2
2
|
|
|
3
|
-
import
|
|
3
|
+
import ${page_result_type};
|
|
4
4
|
${application_type_imports}
|
|
5
5
|
import ${base_package}.rest.dto.request.${domain_class}CreateRequest;
|
|
6
6
|
import ${base_package}.rest.dto.request.${domain_class}UpdateRequest;
|
|
@@ -22,12 +22,9 @@ public interface ${web_convertor_class} {
|
|
|
22
22
|
|
|
23
23
|
List<${domain_class}Response> toResponses(List<${domain_class}Result> source);
|
|
24
24
|
|
|
25
|
-
default
|
|
26
|
-
return
|
|
27
|
-
|
|
28
|
-
source.getTotalCount(),
|
|
29
|
-
source.getPageSize(),
|
|
30
|
-
source.getPageIndex()
|
|
25
|
+
default ${page_result_simple_name}<${domain_class}Response> toResponsePage(${page_result_simple_name}<${domain_class}Result> source) {
|
|
26
|
+
return ${page_result_simple_name}.${page_result_factory_method}(
|
|
27
|
+
${page_result_factory_arguments}
|
|
31
28
|
);
|
|
32
29
|
}
|
|
33
30
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
package ${base_package}.rest.dto.request;
|
|
2
2
|
|
|
3
|
-
import
|
|
3
|
+
import ${command_dto_type};
|
|
4
4
|
import lombok.Getter;
|
|
5
5
|
import lombok.Setter;
|
|
6
6
|
import ${validation_namespace}.validation.constraints.NotBlank;
|
|
@@ -13,7 +13,7 @@ import java.time.LocalDate;
|
|
|
13
13
|
/** ${domain_desc}新增请求。字段来自批准的 OpenAPI allowlist。 */
|
|
14
14
|
@Getter
|
|
15
15
|
@Setter
|
|
16
|
-
public class ${domain_class}CreateRequest extends
|
|
16
|
+
public class ${domain_class}CreateRequest extends ${command_dto_simple_name} {
|
|
17
17
|
|
|
18
18
|
${field_declarations}
|
|
19
19
|
}
|
package/template/.qoder/skills/yss-web-controller/assets/templates/web/dto/PageRequest.java.template
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
package ${base_package}.rest.dto.request;
|
|
2
2
|
|
|
3
|
-
import
|
|
3
|
+
import ${query_dto_type};
|
|
4
4
|
import lombok.Getter;
|
|
5
5
|
import lombok.Setter;
|
|
6
|
+
import ${validation_namespace}.validation.constraints.Pattern;
|
|
6
7
|
import java.util.Date;
|
|
7
8
|
import java.math.BigDecimal;
|
|
8
9
|
import java.time.LocalDateTime;
|
|
@@ -13,12 +14,8 @@ import java.time.LocalDate;
|
|
|
13
14
|
*/
|
|
14
15
|
@Getter
|
|
15
16
|
@Setter
|
|
16
|
-
public class ${domain_class}PageRequest extends
|
|
17
|
-
|
|
18
|
-
private int pageSize = 20;
|
|
19
|
-
private String orderBy;
|
|
20
|
-
private String orderDirection;
|
|
21
|
-
private String groupBy;
|
|
17
|
+
public class ${domain_class}PageRequest extends ${query_dto_simple_name} {
|
|
18
|
+
${pagination_field_declarations}
|
|
22
19
|
|
|
23
20
|
${field_declarations}
|
|
24
21
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
package ${base_package}.rest.dto.request;
|
|
2
2
|
|
|
3
|
-
import
|
|
3
|
+
import ${command_dto_type};
|
|
4
4
|
import lombok.Getter;
|
|
5
5
|
import lombok.Setter;
|
|
6
6
|
import ${validation_namespace}.validation.constraints.NotBlank;
|
|
@@ -13,7 +13,7 @@ import java.time.LocalDate;
|
|
|
13
13
|
/** ${domain_desc}更新请求。字段来自批准的 OpenAPI allowlist。 */
|
|
14
14
|
@Getter
|
|
15
15
|
@Setter
|
|
16
|
-
public class ${domain_class}UpdateRequest extends
|
|
16
|
+
public class ${domain_class}UpdateRequest extends ${command_dto_simple_name} {
|
|
17
17
|
|
|
18
18
|
${field_declarations}
|
|
19
19
|
}
|
|
@@ -20,7 +20,7 @@ DTO 固定属于 Web module。独立 client module 与把 client DTO 放进 Doma
|
|
|
20
20
|
|
|
21
21
|
- Request/Response 字段必须来自冻结 OpenAPI 和批准 allowlist。
|
|
22
22
|
- 数据库 metadata 只补充 Java 类型候选,不能自行扩大公开字段。
|
|
23
|
-
- Web Page Request 不继承含内部协作字段的 `PageQuery
|
|
23
|
+
- Web Page Request 不继承含内部协作字段的 `PageQuery`;分页字段、默认值、枚举和禁用字段全部来自合同绑定且 digest 匹配的 `yss-dto` wire profile,再与 `fields.<table>.pagination` allowlist 取交集。Web Adapter 不维护第二份分页协议。
|
|
24
24
|
- `orderBy` / `groupBy` 必须在 Application/Infrastructure 映射到数据库列白名单。
|
|
25
25
|
- `offset`、`needTotalCount`、`tempTotalCount` 禁止进入 HTTP 绑定面。
|
|
26
26
|
|
|
@@ -70,9 +70,11 @@ public interface QualityRuleWebConvertor {
|
|
|
70
70
|
|
|
71
71
|
## 6. 生成门禁
|
|
72
72
|
|
|
73
|
-
- `generate_controller.mjs`
|
|
74
|
-
-
|
|
75
|
-
-
|
|
73
|
+
- `generate_controller.mjs` 只消费 `schema_version=2`、`status=approved` 且 `current_version=contract_version` 的 Web generation contract;schema v1 为 `unsupported`。
|
|
74
|
+
- `references/web-generation-contract.schema.json` 是 Web generation contract v2 的机器可读结构合同;生成器仍执行跨字段、文件系统与 Manifest 语义校验。
|
|
75
|
+
- 合同必须声明 Slice `contract_id/contract_version/slice_id`、`integration_mode`、`implementation_project_root`、`allowed_write_paths`、预期证据、验证命令、`base_package`、`module_name`、`domain_segment`、Application Service package、`target-domain-model`、平台/validation Profile、`dto_placement=web`、`dto_wire_profile_ref/digest`、OpenAPI Freeze 引用和每张表的 create/update/query/pagination/response allowlist;CLI 身份必须逐项匹配。
|
|
76
|
+
- `scaffold-v2` 模式必须绑定已达 `empty-scaffold-verified` 或 `first-slice-verified` 的 Manifest,并校验标准 Web module 路径和所有 Profile;`existing-project` 模式不得伪造 scaffold manifest。
|
|
77
|
+
- 生成器是 initialize-only,必须在写入前规划全部目标并校验每个目标位于批准写路径;任一文件已存在或传入 `--force` 时整体阻断。落盘使用排他创建,任一步失败都回滚本次已创建文件,不允许部分成功。
|
|
76
78
|
- 权限、校验语义、异常行为和复杂查询仍使用 `behavior-tdd`,不能由 metadata 猜测。
|
|
77
79
|
|
|
78
80
|
## 7. 验证
|
package/template/.qoder/skills/yss-web-controller/references/web-generation-contract.schema.json
ADDED
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://yss.local/schemas/web-generation-contract.schema.json",
|
|
4
|
+
"title": "YSS Web Generation Contract",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": [
|
|
8
|
+
"schema_version",
|
|
9
|
+
"contract_id",
|
|
10
|
+
"contract_version",
|
|
11
|
+
"current_version",
|
|
12
|
+
"slice_id",
|
|
13
|
+
"status",
|
|
14
|
+
"integration_mode",
|
|
15
|
+
"implementation_project_root",
|
|
16
|
+
"base_package",
|
|
17
|
+
"module_name",
|
|
18
|
+
"domain_segment",
|
|
19
|
+
"application_service_package",
|
|
20
|
+
"architecture_profile",
|
|
21
|
+
"platform_profile",
|
|
22
|
+
"validation_namespace",
|
|
23
|
+
"dto_placement",
|
|
24
|
+
"dto_wire_profile_ref",
|
|
25
|
+
"dto_wire_profile_digest",
|
|
26
|
+
"openapi_freeze_ref",
|
|
27
|
+
"allowed_write_paths",
|
|
28
|
+
"expected_evidence_files",
|
|
29
|
+
"verification_commands",
|
|
30
|
+
"fields"
|
|
31
|
+
],
|
|
32
|
+
"properties": {
|
|
33
|
+
"schema_version": { "const": 2 },
|
|
34
|
+
"contract_id": { "$ref": "#/$defs/nonEmptyString" },
|
|
35
|
+
"contract_version": { "type": "integer", "minimum": 1 },
|
|
36
|
+
"current_version": { "type": "integer", "minimum": 1 },
|
|
37
|
+
"slice_id": { "$ref": "#/$defs/nonEmptyString" },
|
|
38
|
+
"status": { "const": "approved" },
|
|
39
|
+
"integration_mode": { "enum": ["existing-project", "scaffold-v2"] },
|
|
40
|
+
"implementation_project_root": { "$ref": "#/$defs/nonEmptyString" },
|
|
41
|
+
"scaffold_manifest_ref": { "$ref": "#/$defs/nonEmptyString" },
|
|
42
|
+
"base_package": { "$ref": "#/$defs/nonEmptyString" },
|
|
43
|
+
"module_name": { "$ref": "#/$defs/nonEmptyString" },
|
|
44
|
+
"domain_segment": { "$ref": "#/$defs/nonEmptyString" },
|
|
45
|
+
"application_service_package": { "$ref": "#/$defs/nonEmptyString" },
|
|
46
|
+
"architecture_profile": { "const": "target-domain-model" },
|
|
47
|
+
"platform_profile": { "enum": ["spring-boot-2.7-jdk8", "spring-boot-3-jdk17"] },
|
|
48
|
+
"validation_namespace": { "enum": ["javax", "jakarta"] },
|
|
49
|
+
"dto_placement": { "const": "web" },
|
|
50
|
+
"dto_wire_profile_ref": { "$ref": "#/$defs/nonEmptyString" },
|
|
51
|
+
"dto_wire_profile_digest": { "type": "string", "pattern": "^[a-f0-9]{64}$" },
|
|
52
|
+
"openapi_freeze_ref": { "$ref": "#/$defs/nonEmptyString" },
|
|
53
|
+
"allowed_write_paths": { "$ref": "#/$defs/nonEmptyStringArray" },
|
|
54
|
+
"expected_evidence_files": { "$ref": "#/$defs/nonEmptyStringArray" },
|
|
55
|
+
"verification_commands": { "$ref": "#/$defs/nonEmptyStringArray" },
|
|
56
|
+
"fields": {
|
|
57
|
+
"type": "object",
|
|
58
|
+
"minProperties": 1,
|
|
59
|
+
"additionalProperties": {
|
|
60
|
+
"type": "object",
|
|
61
|
+
"additionalProperties": false,
|
|
62
|
+
"required": ["create", "update", "query", "pagination", "response"],
|
|
63
|
+
"properties": {
|
|
64
|
+
"create": { "$ref": "#/$defs/stringArray" },
|
|
65
|
+
"update": { "$ref": "#/$defs/stringArray" },
|
|
66
|
+
"query": { "$ref": "#/$defs/stringArray" },
|
|
67
|
+
"pagination": {
|
|
68
|
+
"type": "array",
|
|
69
|
+
"uniqueItems": true,
|
|
70
|
+
"items": { "$ref": "#/$defs/nonEmptyString" }
|
|
71
|
+
},
|
|
72
|
+
"response": { "$ref": "#/$defs/stringArray" }
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
"allOf": [
|
|
78
|
+
{
|
|
79
|
+
"if": { "properties": { "integration_mode": { "const": "scaffold-v2" } } },
|
|
80
|
+
"then": { "required": ["scaffold_manifest_ref"] },
|
|
81
|
+
"else": { "not": { "required": ["scaffold_manifest_ref"] } }
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
"if": { "properties": { "platform_profile": { "const": "spring-boot-2.7-jdk8" } } },
|
|
85
|
+
"then": { "properties": { "validation_namespace": { "const": "javax" } } }
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
"if": { "properties": { "platform_profile": { "const": "spring-boot-3-jdk17" } } },
|
|
89
|
+
"then": { "properties": { "validation_namespace": { "const": "jakarta" } } }
|
|
90
|
+
}
|
|
91
|
+
],
|
|
92
|
+
"$defs": {
|
|
93
|
+
"nonEmptyString": { "type": "string", "minLength": 1 },
|
|
94
|
+
"stringArray": { "type": "array", "uniqueItems": true, "items": { "$ref": "#/$defs/nonEmptyString" } },
|
|
95
|
+
"nonEmptyStringArray": { "type": "array", "minItems": 1, "uniqueItems": true, "items": { "$ref": "#/$defs/nonEmptyString" } }
|
|
96
|
+
}
|
|
97
|
+
}
|