create-yss-spec 3.5.6 → 3.5.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/create-yss-spec.js +3 -1
- package/cli-core.lock.json +10 -6
- package/package.json +4 -1
- package/src/api/_sync-service.js +3 -1
- package/src/command-runner.mjs +44 -9
- package/src/commands/doctor.js +40 -0
- package/src/commands/skills.js +7 -2
- package/src/content-identity.js +111 -0
- package/src/runtime-store.mjs +650 -0
- package/src/template/asset-runtime.js +124 -22
- package/src/template/instance-runtime.js +23 -7
- package/src/validation/metadata.js +8 -0
- package/template/.agents/skills/.strategic-design-skills-manifest.json +3 -3
- 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 +4 -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 +32 -26
- 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 +28 -6
- package/template/.agents/skills/yss-product-lifecycle/references/orchestration-contract.yaml +143 -4
- package/template/.agents/skills/yss-product-lifecycle/references/orchestration.md +38 -13
- package/template/.agents/skills/yss-product-lifecycle/references/plan-requirements.md +7 -6
- 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-prototype-stage/scripts/verify-prototype-design.mjs +1 -0
- 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-stage-decision/scripts/validate-domain-strategy.mjs +8 -5
- package/template/.agents/skills/yss-stage-decision/scripts/validate-stage-decision-package.mjs +8 -5
- package/template/.agents/skills/yss-stage-decision/tests/run-scenarios.mjs +83 -13
- 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 +4 -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 +32 -26
- 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 +28 -6
- package/template/.codex/skills/yss-product-lifecycle/references/orchestration-contract.yaml +143 -4
- package/template/.codex/skills/yss-product-lifecycle/references/orchestration.md +38 -13
- package/template/.codex/skills/yss-product-lifecycle/references/plan-requirements.md +7 -6
- 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-prototype-stage/scripts/verify-prototype-design.mjs +1 -0
- 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-stage-decision/scripts/validate-domain-strategy.mjs +8 -5
- package/template/.codex/skills/yss-stage-decision/scripts/validate-stage-decision-package.mjs +8 -5
- package/template/.codex/skills/yss-stage-decision/tests/run-scenarios.mjs +83 -13
- 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 +4 -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 +32 -26
- 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 +28 -6
- package/template/.cursor/skills/yss-product-lifecycle/references/orchestration-contract.yaml +143 -4
- package/template/.cursor/skills/yss-product-lifecycle/references/orchestration.md +38 -13
- package/template/.cursor/skills/yss-product-lifecycle/references/plan-requirements.md +7 -6
- 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-prototype-stage/scripts/verify-prototype-design.mjs +1 -0
- 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-stage-decision/scripts/validate-domain-strategy.mjs +8 -5
- package/template/.cursor/skills/yss-stage-decision/scripts/validate-stage-decision-package.mjs +8 -5
- package/template/.cursor/skills/yss-stage-decision/tests/run-scenarios.mjs +83 -13
- 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 +4 -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 +32 -26
- 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 +28 -6
- package/template/.pi/skills/yss-product-lifecycle/references/orchestration-contract.yaml +143 -4
- package/template/.pi/skills/yss-product-lifecycle/references/orchestration.md +38 -13
- package/template/.pi/skills/yss-product-lifecycle/references/plan-requirements.md +7 -6
- 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-prototype-stage/scripts/verify-prototype-design.mjs +1 -0
- 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-stage-decision/scripts/validate-domain-strategy.mjs +8 -5
- package/template/.pi/skills/yss-stage-decision/scripts/validate-stage-decision-package.mjs +8 -5
- package/template/.pi/skills/yss-stage-decision/tests/run-scenarios.mjs +83 -13
- 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/entry-review.md +2 -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/plan/templates/plan-template.md +11 -5
- 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/script-execution.md +37 -0
- 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/.template-spec/user-guide//347/224/250/346/210/267/346/211/213/345/206/214.md +2 -0
- 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 +64 -63
- 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
|
@@ -0,0 +1,324 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://yss.example/schemas/competitive-analysis-v1.schema.json",
|
|
4
|
+
"title": "YSS competitive analysis evidence extension v1",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": [
|
|
8
|
+
"schema_version",
|
|
9
|
+
"output_selection",
|
|
10
|
+
"as_of",
|
|
11
|
+
"comparison_scope",
|
|
12
|
+
"competitors",
|
|
13
|
+
"capabilities",
|
|
14
|
+
"assessments",
|
|
15
|
+
"artifacts"
|
|
16
|
+
],
|
|
17
|
+
"properties": {
|
|
18
|
+
"schema_version": {
|
|
19
|
+
"const": 1
|
|
20
|
+
},
|
|
21
|
+
"output_selection": {
|
|
22
|
+
"enum": [
|
|
23
|
+
"matrix",
|
|
24
|
+
"report",
|
|
25
|
+
"both"
|
|
26
|
+
]
|
|
27
|
+
},
|
|
28
|
+
"as_of": {
|
|
29
|
+
"type": "string",
|
|
30
|
+
"format": "date"
|
|
31
|
+
},
|
|
32
|
+
"comparison_scope": {
|
|
33
|
+
"$ref": "#/$defs/text"
|
|
34
|
+
},
|
|
35
|
+
"competitors": {
|
|
36
|
+
"type": "array",
|
|
37
|
+
"minItems": 1,
|
|
38
|
+
"items": {
|
|
39
|
+
"type": "object",
|
|
40
|
+
"additionalProperties": false,
|
|
41
|
+
"required": [
|
|
42
|
+
"id",
|
|
43
|
+
"name",
|
|
44
|
+
"type",
|
|
45
|
+
"product",
|
|
46
|
+
"version",
|
|
47
|
+
"edition",
|
|
48
|
+
"region"
|
|
49
|
+
],
|
|
50
|
+
"properties": {
|
|
51
|
+
"id": {
|
|
52
|
+
"$ref": "#/$defs/id"
|
|
53
|
+
},
|
|
54
|
+
"name": {
|
|
55
|
+
"$ref": "#/$defs/text"
|
|
56
|
+
},
|
|
57
|
+
"type": {
|
|
58
|
+
"enum": [
|
|
59
|
+
"direct",
|
|
60
|
+
"indirect",
|
|
61
|
+
"substitute",
|
|
62
|
+
"adjacent",
|
|
63
|
+
"our-product"
|
|
64
|
+
]
|
|
65
|
+
},
|
|
66
|
+
"product": {
|
|
67
|
+
"$ref": "#/$defs/text"
|
|
68
|
+
},
|
|
69
|
+
"version": {
|
|
70
|
+
"$ref": "#/$defs/text"
|
|
71
|
+
},
|
|
72
|
+
"edition": {
|
|
73
|
+
"$ref": "#/$defs/text"
|
|
74
|
+
},
|
|
75
|
+
"region": {
|
|
76
|
+
"$ref": "#/$defs/text"
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
"capabilities": {
|
|
82
|
+
"type": "array",
|
|
83
|
+
"minItems": 1,
|
|
84
|
+
"items": {
|
|
85
|
+
"type": "object",
|
|
86
|
+
"additionalProperties": false,
|
|
87
|
+
"required": [
|
|
88
|
+
"id",
|
|
89
|
+
"module",
|
|
90
|
+
"name",
|
|
91
|
+
"definition",
|
|
92
|
+
"user_value"
|
|
93
|
+
],
|
|
94
|
+
"properties": {
|
|
95
|
+
"id": {
|
|
96
|
+
"$ref": "#/$defs/id"
|
|
97
|
+
},
|
|
98
|
+
"module": {
|
|
99
|
+
"$ref": "#/$defs/text"
|
|
100
|
+
},
|
|
101
|
+
"name": {
|
|
102
|
+
"$ref": "#/$defs/text"
|
|
103
|
+
},
|
|
104
|
+
"definition": {
|
|
105
|
+
"$ref": "#/$defs/text"
|
|
106
|
+
},
|
|
107
|
+
"user_value": {
|
|
108
|
+
"$ref": "#/$defs/text"
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
"assessments": {
|
|
114
|
+
"type": "array",
|
|
115
|
+
"minItems": 1,
|
|
116
|
+
"items": {
|
|
117
|
+
"type": "object",
|
|
118
|
+
"additionalProperties": false,
|
|
119
|
+
"required": [
|
|
120
|
+
"competitor_id",
|
|
121
|
+
"capability_id",
|
|
122
|
+
"status",
|
|
123
|
+
"claim_refs",
|
|
124
|
+
"limitations",
|
|
125
|
+
"gap"
|
|
126
|
+
],
|
|
127
|
+
"properties": {
|
|
128
|
+
"competitor_id": {
|
|
129
|
+
"$ref": "#/$defs/id"
|
|
130
|
+
},
|
|
131
|
+
"capability_id": {
|
|
132
|
+
"$ref": "#/$defs/id"
|
|
133
|
+
},
|
|
134
|
+
"status": {
|
|
135
|
+
"enum": [
|
|
136
|
+
"supported",
|
|
137
|
+
"partial",
|
|
138
|
+
"absent",
|
|
139
|
+
"unknown"
|
|
140
|
+
]
|
|
141
|
+
},
|
|
142
|
+
"claim_refs": {
|
|
143
|
+
"type": "array",
|
|
144
|
+
"uniqueItems": true,
|
|
145
|
+
"items": {
|
|
146
|
+
"$ref": "#/$defs/text"
|
|
147
|
+
}
|
|
148
|
+
},
|
|
149
|
+
"limitations": {
|
|
150
|
+
"type": "array",
|
|
151
|
+
"uniqueItems": true,
|
|
152
|
+
"items": {
|
|
153
|
+
"$ref": "#/$defs/text"
|
|
154
|
+
}
|
|
155
|
+
},
|
|
156
|
+
"gap": {
|
|
157
|
+
"oneOf": [
|
|
158
|
+
{
|
|
159
|
+
"type": "null"
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
"$ref": "#/$defs/gap"
|
|
163
|
+
}
|
|
164
|
+
]
|
|
165
|
+
}
|
|
166
|
+
},
|
|
167
|
+
"allOf": [
|
|
168
|
+
{
|
|
169
|
+
"if": {
|
|
170
|
+
"properties": {
|
|
171
|
+
"status": {
|
|
172
|
+
"const": "unknown"
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
},
|
|
176
|
+
"then": {
|
|
177
|
+
"properties": {
|
|
178
|
+
"gap": {
|
|
179
|
+
"$ref": "#/$defs/gap"
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
},
|
|
183
|
+
"else": {
|
|
184
|
+
"properties": {
|
|
185
|
+
"claim_refs": {
|
|
186
|
+
"minItems": 1
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
"if": {
|
|
193
|
+
"properties": {
|
|
194
|
+
"status": {
|
|
195
|
+
"const": "partial"
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
},
|
|
199
|
+
"then": {
|
|
200
|
+
"properties": {
|
|
201
|
+
"limitations": {
|
|
202
|
+
"minItems": 1
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
]
|
|
208
|
+
}
|
|
209
|
+
},
|
|
210
|
+
"artifacts": {
|
|
211
|
+
"type": "object",
|
|
212
|
+
"additionalProperties": false,
|
|
213
|
+
"properties": {
|
|
214
|
+
"matrix": {
|
|
215
|
+
"$ref": "#/$defs/filename"
|
|
216
|
+
},
|
|
217
|
+
"report": {
|
|
218
|
+
"$ref": "#/$defs/filename"
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
},
|
|
223
|
+
"allOf": [
|
|
224
|
+
{
|
|
225
|
+
"if": {
|
|
226
|
+
"properties": {
|
|
227
|
+
"output_selection": {
|
|
228
|
+
"const": "matrix"
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
},
|
|
232
|
+
"then": {
|
|
233
|
+
"properties": {
|
|
234
|
+
"artifacts": {
|
|
235
|
+
"required": [
|
|
236
|
+
"matrix"
|
|
237
|
+
],
|
|
238
|
+
"properties": {
|
|
239
|
+
"report": false
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
},
|
|
245
|
+
{
|
|
246
|
+
"if": {
|
|
247
|
+
"properties": {
|
|
248
|
+
"output_selection": {
|
|
249
|
+
"const": "report"
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
},
|
|
253
|
+
"then": {
|
|
254
|
+
"properties": {
|
|
255
|
+
"artifacts": {
|
|
256
|
+
"required": [
|
|
257
|
+
"report"
|
|
258
|
+
],
|
|
259
|
+
"properties": {
|
|
260
|
+
"matrix": false
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
},
|
|
266
|
+
{
|
|
267
|
+
"if": {
|
|
268
|
+
"properties": {
|
|
269
|
+
"output_selection": {
|
|
270
|
+
"const": "both"
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
},
|
|
274
|
+
"then": {
|
|
275
|
+
"properties": {
|
|
276
|
+
"artifacts": {
|
|
277
|
+
"required": [
|
|
278
|
+
"matrix",
|
|
279
|
+
"report"
|
|
280
|
+
]
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
],
|
|
286
|
+
"$defs": {
|
|
287
|
+
"text": {
|
|
288
|
+
"type": "string",
|
|
289
|
+
"minLength": 1,
|
|
290
|
+
"pattern": "\\S"
|
|
291
|
+
},
|
|
292
|
+
"id": {
|
|
293
|
+
"type": "string",
|
|
294
|
+
"pattern": "^[a-z][a-z0-9._-]*$",
|
|
295
|
+
"not": {
|
|
296
|
+
"pattern": "\\s"
|
|
297
|
+
}
|
|
298
|
+
},
|
|
299
|
+
"filename": {
|
|
300
|
+
"type": "string",
|
|
301
|
+
"minLength": 1,
|
|
302
|
+
"pattern": "^[^/\\\\]+\\.md$",
|
|
303
|
+
"not": {
|
|
304
|
+
"pattern": "[\\u0000-\\u001f\\u007f]"
|
|
305
|
+
}
|
|
306
|
+
},
|
|
307
|
+
"gap": {
|
|
308
|
+
"type": "object",
|
|
309
|
+
"additionalProperties": false,
|
|
310
|
+
"required": [
|
|
311
|
+
"reason",
|
|
312
|
+
"next_step"
|
|
313
|
+
],
|
|
314
|
+
"properties": {
|
|
315
|
+
"reason": {
|
|
316
|
+
"$ref": "#/$defs/text"
|
|
317
|
+
},
|
|
318
|
+
"next_step": {
|
|
319
|
+
"$ref": "#/$defs/text"
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
}
|
|
@@ -37,6 +37,14 @@ The package names its downstream owner and optional decision reference. It does
|
|
|
37
37
|
|
|
38
38
|
The evidence file uses JSON syntax, which is valid YAML 1.2, so validation is portable and dependency-free.
|
|
39
39
|
|
|
40
|
+
## 竞品附属产物
|
|
41
|
+
|
|
42
|
+
现有 evidence v1 可选增加 `competitive_analysis`,合同见 [competitive-analysis.md](competitive-analysis.md)。不含扩展的历史包保持原校验行为;`search_log`、`evidence_items`、`claims` 仍是唯一台账。完整 JSON Schema 校验后,检查比较覆盖、Claim 引用、状态条件、选定文件和工具管理区一致性。
|
|
43
|
+
|
|
44
|
+
`yss-research` 持有研究包,`competitive-intelligence` 执行专项分析。审计模式保留 brief / evidence 双文件,按 `matrix / report / both` 追加功能矩阵和深度报告;附属报告不能替代简报。确定的能力状态必须引用适用范围内的已审计 Claim;未知必须记录原因和补证计划。`none-found` 不能证明不支持。
|
|
45
|
+
|
|
46
|
+
矩阵和报告共用结构化结果,工具只更新唯一完整管理区,区外分析正文保留。历史文件没有管理区时拒绝覆盖。正式收尾条件追加选定产物及新增校验依赖的摘要;当前字节漂移后旧验证失效。机械一致性不替代来源语义审核,研究产物不授予下游批准。
|
|
47
|
+
|
|
40
48
|
## Design provenance
|
|
41
49
|
|
|
42
50
|
The Search Log, evidence passport, and claim-source alignment concepts are adapted from [Academic Research Skills](https://github.com/Imbad0202/academic-research-skills). This YSS contract omits academic writing, publication, fixed agent teams, and cross-model review machinery, and retains YSS lifecycle ownership boundaries.
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
import { lstatSync, readFileSync, realpathSync } from 'node:fs';
|
|
2
|
+
import path from 'node:path';
|
|
3
|
+
import { fileURLToPath } from 'node:url';
|
|
4
|
+
import { validateJsonSchema } from '../../../../../scripts/lib/json-schema.mjs';
|
|
5
|
+
|
|
6
|
+
const skillRoot = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '../..');
|
|
7
|
+
const repositoryRoot = path.resolve(skillRoot, '../../..');
|
|
8
|
+
const schemaFile = path.join(skillRoot, 'references/competitive-analysis.schema.json');
|
|
9
|
+
const START = '<!-- YSS-COMPETITIVE:START -->';
|
|
10
|
+
const END = '<!-- YSS-COMPETITIVE:END -->';
|
|
11
|
+
const SYMBOLS = { supported: '✅ 明确支持', partial: '⚠️ 部分支持', absent: '❌ 明确不支持', unknown: '❓ 未知' };
|
|
12
|
+
const TYPES = { direct: '直接竞品', indirect: '间接竞品', substitute: '替代方案', adjacent: '相邻产品', 'our-product': '本方产品' };
|
|
13
|
+
|
|
14
|
+
function fail(message) { throw new TypeError(`competitive_analysis: ${message}`); }
|
|
15
|
+
function indexById(items, label) {
|
|
16
|
+
const result = new Map();
|
|
17
|
+
for (const item of items) {
|
|
18
|
+
if (result.has(item.id)) fail(`${label} contains duplicate id: ${item.id}`);
|
|
19
|
+
result.set(item.id, item);
|
|
20
|
+
}
|
|
21
|
+
return result;
|
|
22
|
+
}
|
|
23
|
+
function fileInfo(file) {
|
|
24
|
+
try { return lstatSync(file); } catch (error) { if (error.code === 'ENOENT') return null; throw error; }
|
|
25
|
+
}
|
|
26
|
+
function evidenceSlug(evidenceFile) {
|
|
27
|
+
const name = path.basename(evidenceFile);
|
|
28
|
+
if (!name.endsWith('-evidence.yaml') || name === '-evidence.yaml') fail('expected <slug>-evidence.yaml');
|
|
29
|
+
return name.slice(0, -'-evidence.yaml'.length);
|
|
30
|
+
}
|
|
31
|
+
function artifactPath(evidenceFile, filename, kind) {
|
|
32
|
+
const evidencePath = path.resolve(evidenceFile);
|
|
33
|
+
const slug = evidenceSlug(evidencePath);
|
|
34
|
+
const expected = `${slug}-competitive-${kind === 'matrix' ? 'matrix' : 'analysis'}.md`;
|
|
35
|
+
if (filename !== expected || path.basename(filename) !== filename || filename.includes('\\')) fail(`artifacts.${kind} must be adjacent same-slug filename: ${expected}`);
|
|
36
|
+
const directory = path.dirname(evidencePath);
|
|
37
|
+
const output = path.resolve(directory, filename);
|
|
38
|
+
if (path.dirname(output) !== directory) fail(`artifacts.${kind} escapes evidence directory`);
|
|
39
|
+
const info = fileInfo(output);
|
|
40
|
+
if (info?.isSymbolicLink()) fail(`artifacts.${kind} symbolic link is not allowed: ${filename}`);
|
|
41
|
+
if (info && !info.isFile()) fail(`artifacts.${kind} must be a regular file: ${filename}`);
|
|
42
|
+
if (info && path.dirname(realpathSync(output)) !== realpathSync(directory)) fail(`artifacts.${kind} escapes real evidence directory`);
|
|
43
|
+
return output;
|
|
44
|
+
}
|
|
45
|
+
function selectedArtifacts(extension, evidenceFile) {
|
|
46
|
+
return Object.entries(extension.artifacts).map(([kind, filename]) => ({ kind, filename, file: artifactPath(evidenceFile, filename, kind) }));
|
|
47
|
+
}
|
|
48
|
+
function validateStructure(data) {
|
|
49
|
+
if (!Object.hasOwn(data, 'competitive_analysis')) return null;
|
|
50
|
+
try { validateJsonSchema(data.competitive_analysis, schemaFile); } catch (error) { fail(`Schema: ${error.message}`); }
|
|
51
|
+
return data.competitive_analysis;
|
|
52
|
+
}
|
|
53
|
+
function validateReferences(data, extension) {
|
|
54
|
+
const competitors = indexById(extension.competitors, 'competitors');
|
|
55
|
+
const capabilities = indexById(extension.capabilities, 'capabilities');
|
|
56
|
+
const claims = indexById(data.claims || [], 'claims');
|
|
57
|
+
const evidence = indexById(data.evidence_items || [], 'evidence_items');
|
|
58
|
+
const searches = indexById(data.search_log || [], 'search_log');
|
|
59
|
+
const audited = new Set(data.audit_summary?.audited_claim_ids || []);
|
|
60
|
+
const pairs = new Set();
|
|
61
|
+
for (const assessment of extension.assessments) {
|
|
62
|
+
const label = `${assessment.competitor_id}/${assessment.capability_id}`;
|
|
63
|
+
if (!competitors.has(assessment.competitor_id)) fail(`${label} has unknown competitor_id`);
|
|
64
|
+
if (!capabilities.has(assessment.capability_id)) fail(`${label} has unknown capability_id`);
|
|
65
|
+
if (pairs.has(label)) fail(`assessments contains duplicate pair: ${label}`);
|
|
66
|
+
pairs.add(label);
|
|
67
|
+
for (const ref of assessment.claim_refs) {
|
|
68
|
+
const claim = claims.get(ref);
|
|
69
|
+
if (!claim) fail(`${label} has unresolved claim ref: ${ref}`);
|
|
70
|
+
if (assessment.status === 'unknown') continue;
|
|
71
|
+
if (data.audit_summary?.status !== 'complete' || !audited.has(ref) || !['supported', 'partially-supported'].includes(claim.audit_status)) fail(`${label} requires an audited supported claim: ${ref}`);
|
|
72
|
+
if (claim.audit_status === 'partially-supported' && (claim.disposition !== 'qualify' || assessment.limitations.length === 0)) fail(`${label} partially-supported claim must use qualify and assessment limitations: ${ref}`);
|
|
73
|
+
if (!Array.isArray(claim.evidence_refs) || claim.evidence_refs.length === 0) fail(`${label} claim requires supporting evidence: ${ref}`);
|
|
74
|
+
for (const evidenceRef of claim.evidence_refs) {
|
|
75
|
+
const item = evidence.get(evidenceRef);
|
|
76
|
+
if (!item || item.stance !== 'support' || item.source_level === 'lead-only') fail(`${label} has invalid supporting evidence: ${evidenceRef}`);
|
|
77
|
+
if (assessment.status === 'absent' && (['search', 'search-log', 'search-result'].includes(item.source_class) || searches.get(item.source_ref)?.result === 'none-found')) fail(`${label} absent cannot use none-found search as absence evidence: ${evidenceRef}`);
|
|
78
|
+
}
|
|
79
|
+
if (claim.claim_kind === 'technical-fact' && !claim.evidence_refs.some(evidenceRef => evidence.get(evidenceRef).source_level === 'primary')) fail(`${label} technical-fact claim requires primary supporting evidence: ${ref}`);
|
|
80
|
+
}
|
|
81
|
+
const competitor = competitors.get(assessment.competitor_id);
|
|
82
|
+
if (assessment.status !== 'unknown' && ['version', 'edition', 'region'].some(field => ['unknown', '未知'].includes(competitor[field].trim().toLowerCase())) && assessment.limitations.length === 0) fail(`${label} unknown version/edition/region requires limitations`);
|
|
83
|
+
}
|
|
84
|
+
for (const competitor of competitors.keys()) for (const capability of capabilities.keys()) {
|
|
85
|
+
if (!pairs.has(`${competitor}/${capability}`)) fail(`missing assessment coverage: ${competitor}/${capability}`);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
function cell(value) {
|
|
89
|
+
return String(value).replaceAll('&', '&').replaceAll('<', '<').replaceAll('>', '>').replaceAll('\\', '\\\\').replaceAll('|', '\\|').replaceAll('[', '\\[').replaceAll(']', '\\]').replace(/\r?\n/g, '<br>');
|
|
90
|
+
}
|
|
91
|
+
function table(headers, rows) {
|
|
92
|
+
return [`| ${headers.map(cell).join(' | ')} |`, `| ${headers.map(() => '---').join(' | ')} |`, ...rows.map(row => `| ${row.map(cell).join(' | ')} |`)].join('\n');
|
|
93
|
+
}
|
|
94
|
+
function managedBody(data, kind) {
|
|
95
|
+
const extension = data.competitive_analysis;
|
|
96
|
+
const lines = [
|
|
97
|
+
`调研截至日期:${cell(extension.as_of)}`,
|
|
98
|
+
`比较范围:${cell(extension.comparison_scope)}`,
|
|
99
|
+
'本区由证据台账生成;结构与引用校验不替代来源语义审核。',
|
|
100
|
+
'',
|
|
101
|
+
'### 比较对象与适用范围',
|
|
102
|
+
'',
|
|
103
|
+
table(['竞品 ID', '竞品', '类型', '产品', '版本', '套餐', '地区'], extension.competitors.map(item => [item.id, item.name, TYPES[item.type], item.product, item.version, item.edition, item.region])),
|
|
104
|
+
'',
|
|
105
|
+
'### 能力定义',
|
|
106
|
+
'',
|
|
107
|
+
table(['能力 ID', '功能模块', '功能点', '定义', '用户价值'], extension.capabilities.map(item => [item.id, item.module, item.name, item.definition, item.user_value])),
|
|
108
|
+
''
|
|
109
|
+
];
|
|
110
|
+
if (kind === 'report' && extension.output_selection === 'both') {
|
|
111
|
+
lines.push(`完整功能矩阵:[${cell(extension.artifacts.matrix)}](<${encodeURI(extension.artifacts.matrix)}>)`, '');
|
|
112
|
+
} else {
|
|
113
|
+
const pairs = new Map(extension.assessments.map(item => [`${item.competitor_id}/${item.capability_id}`, item]));
|
|
114
|
+
lines.push('### 功能比较', '', table(['功能模块', '能力 ID / 功能点', ...extension.competitors.map(item => `${item.id} / ${item.name}`)], extension.capabilities.map(capability => [capability.module, `${capability.id} / ${capability.name}`, ...extension.competitors.map(competitor => {
|
|
115
|
+
const assessment = pairs.get(`${competitor.id}/${capability.id}`);
|
|
116
|
+
return `${SYMBOLS[assessment.status]};Claim: ${assessment.claim_refs.join(', ') || '无(来源缺口见下表)'}`;
|
|
117
|
+
})])), '', '状态:✅ 明确支持;⚠️ 在注明条件下部分支持;❌ 有明确不支持证据;❓ 尚未确认。未搜索到资料不构成不支持证据。', '');
|
|
118
|
+
}
|
|
119
|
+
lines.push('### 限定条件与补证计划', '', table(['竞品 / 能力', '状态', 'Claim', '限定条件', '来源缺口', '补证计划'], extension.assessments.map(item => [`${item.competitor_id}/${item.capability_id}`, SYMBOLS[item.status], item.claim_refs.join(', ') || '无', item.limitations.join(';') || '无已登记限定', item.gap?.reason || '无已登记缺口', item.gap?.next_step || '无'])), '');
|
|
120
|
+
const claims = new Map((data.claims || []).map(item => [item.id, item]));
|
|
121
|
+
const refs = [...new Set(extension.assessments.flatMap(item => item.claim_refs))];
|
|
122
|
+
lines.push('### Claim 与证据摘要', '', table(['Claim', '陈述', '审核 / 处置', '支持证据', '反证 / 反向搜索'], refs.map(ref => {
|
|
123
|
+
const claim = claims.get(ref);
|
|
124
|
+
return [ref, claim.statement, `${claim.audit_status} / ${claim.disposition}`, claim.evidence_refs.join(', '), claim.counter_signal_refs.join(', ')];
|
|
125
|
+
})), '');
|
|
126
|
+
const evidenceRefs = new Set(refs.flatMap(ref => [...claims.get(ref).evidence_refs, ...claims.get(ref).counter_signal_refs]));
|
|
127
|
+
lines.push(table(['证据 / 搜索 ID', '来源与定位', '日期', '观察 / 搜索结果', '限制'], [...evidenceRefs].map(ref => {
|
|
128
|
+
const item = (data.evidence_items || []).find(entry => entry.id === ref);
|
|
129
|
+
if (item) return [ref, `${item.source_ref} / ${item.locator}`, item.evidence_date || item.observed_at, item.observation, (item.limitations || []).join(';') || '无已登记限制'];
|
|
130
|
+
const search = (data.search_log || []).find(entry => entry.id === ref);
|
|
131
|
+
return [ref, `${search.channel} / ${search.query_or_corpus}`, search.searched_at, search.result, '搜索结果仅记录反向检索,不能证明能力缺失'];
|
|
132
|
+
})));
|
|
133
|
+
return `${START}\n${lines.join('\n')}\n${END}`;
|
|
134
|
+
}
|
|
135
|
+
function managedRegion(content, label) {
|
|
136
|
+
if (content.split(START).length !== 2 || content.split(END).length !== 2) fail(`${label} requires exactly one complete managed region; refusing to overwrite an unmarked legacy file`);
|
|
137
|
+
const start = content.indexOf(START), end = content.indexOf(END);
|
|
138
|
+
if (end < start) fail(`${label} managed region markers are out of order`);
|
|
139
|
+
return { start, end: end + END.length, text: content.slice(start, end + END.length) };
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
/** Validate the complete extension Schema before references and current artifacts. */
|
|
143
|
+
export function validateCompetitiveAnalysis(data, evidenceFile, { checkArtifacts = true } = {}) {
|
|
144
|
+
const extension = validateStructure(data);
|
|
145
|
+
if (!extension) return { enabled: false, artifacts: [] };
|
|
146
|
+
validateReferences(data, extension);
|
|
147
|
+
const artifacts = selectedArtifacts(extension, evidenceFile);
|
|
148
|
+
if (checkArtifacts) for (const artifact of artifacts) {
|
|
149
|
+
if (!fileInfo(artifact.file)) fail(`missing output artifact: ${artifact.filename}`);
|
|
150
|
+
const content = readFileSync(artifact.file, 'utf8');
|
|
151
|
+
if (managedRegion(content, artifact.filename).text !== managedBody(data, artifact.kind)) fail(`managed content drift: ${artifact.filename}; rerun render-competitive-outputs.mjs`);
|
|
152
|
+
}
|
|
153
|
+
return { enabled: true, output_selection: extension.output_selection, artifacts: artifacts.map(item => item.file), competitors: extension.competitors.length, capabilities: extension.capabilities.length, assessments: extension.assessments.length };
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
/** Preflight all outputs before the CLI writes any file, preserving manual prose. */
|
|
157
|
+
export function prepareCompetitiveOutputs(data, evidenceFile) {
|
|
158
|
+
validateCompetitiveAnalysis(data, evidenceFile, { checkArtifacts: false });
|
|
159
|
+
if (!Object.hasOwn(data, 'competitive_analysis')) fail('evidence package has no competitive_analysis extension');
|
|
160
|
+
return selectedArtifacts(data.competitive_analysis, evidenceFile).map(artifact => {
|
|
161
|
+
const templateFile = path.join(repositoryRoot, `.template-spec/plan/templates/competitive-${artifact.kind === 'matrix' ? 'matrix' : 'analysis'}-template.md`);
|
|
162
|
+
const content = readFileSync(fileInfo(artifact.file) ? artifact.file : templateFile, 'utf8');
|
|
163
|
+
const region = managedRegion(content, artifact.filename);
|
|
164
|
+
return { ...artifact, content: `${content.slice(0, region.start)}${managedBody(data, artifact.kind)}${content.slice(region.end)}` };
|
|
165
|
+
});
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
/** Files whose current bytes govern competitive output verification. */
|
|
169
|
+
export function competitiveVerificationFiles(evidenceFile, { root = repositoryRoot } = {}) {
|
|
170
|
+
const data = JSON.parse(readFileSync(evidenceFile, 'utf8'));
|
|
171
|
+
const extension = validateStructure(data);
|
|
172
|
+
if (!extension) return [];
|
|
173
|
+
const artifacts = selectedArtifacts(extension, evidenceFile).map(item => item.file);
|
|
174
|
+
const dependencies = [
|
|
175
|
+
'.agents/skills/yss-research/references/competitive-analysis.schema.json',
|
|
176
|
+
'.agents/skills/yss-research/scripts/lib/competitive-analysis.mjs',
|
|
177
|
+
'.agents/skills/yss-research/scripts/render-competitive-outputs.mjs',
|
|
178
|
+
'.template-spec/plan/templates/competitive-matrix-template.md',
|
|
179
|
+
'.template-spec/plan/templates/competitive-analysis-template.md',
|
|
180
|
+
'scripts/lib/json-schema.mjs',
|
|
181
|
+
'scripts/lib/validation-phase.mjs'
|
|
182
|
+
].map(ref => path.resolve(root, ref));
|
|
183
|
+
for (const file of [...artifacts, ...dependencies]) readFileSync(file);
|
|
184
|
+
return [...artifacts, ...dependencies];
|
|
185
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { readFileSync, writeFileSync } from 'node:fs';
|
|
3
|
+
import path from 'node:path';
|
|
4
|
+
import { prepareCompetitiveOutputs } from './lib/competitive-analysis.mjs';
|
|
5
|
+
|
|
6
|
+
try {
|
|
7
|
+
if (process.argv.length !== 3) throw new TypeError('usage: render-competitive-outputs.mjs <slug>-evidence.yaml');
|
|
8
|
+
const evidenceFile = path.resolve(process.argv[2]);
|
|
9
|
+
const data = JSON.parse(readFileSync(evidenceFile, 'utf8'));
|
|
10
|
+
const outputs = prepareCompetitiveOutputs(data, evidenceFile);
|
|
11
|
+
for (const output of outputs) writeFileSync(output.file, output.content, 'utf8');
|
|
12
|
+
process.stdout.write(`YSS competitive outputs rendered (${outputs.map(output => output.filename).join(', ')})\n`);
|
|
13
|
+
} catch (error) {
|
|
14
|
+
process.stderr.write(`YSS competitive outputs invalid: ${error.message}\n`);
|
|
15
|
+
process.exitCode = 1;
|
|
16
|
+
}
|
|
@@ -33,7 +33,7 @@ function readEvidence(file) {
|
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
function validate(briefFile, evidenceFile) {
|
|
36
|
+
async function validate(briefFile, evidenceFile) {
|
|
37
37
|
if (!briefFile || !evidenceFile) fail("usage: validate-research-package.mjs <brief.md> <evidence.yaml>");
|
|
38
38
|
const briefPath = path.resolve(briefFile);
|
|
39
39
|
const evidencePath = path.resolve(evidenceFile);
|
|
@@ -116,11 +116,15 @@ function validate(briefFile, evidenceFile) {
|
|
|
116
116
|
if (claim.decision_bearing && !audited.has(id)) fail(`audit_summary is missing decision-bearing claim: ${id}`);
|
|
117
117
|
if (claim.decision_bearing && claim.audit_status === "not-audited") fail(`${id} remains not-audited`);
|
|
118
118
|
});
|
|
119
|
+
if (Object.hasOwn(data, "competitive_analysis")) {
|
|
120
|
+
const { validateCompetitiveAnalysis } = await import('./lib/competitive-analysis.mjs');
|
|
121
|
+
validateCompetitiveAnalysis(data, evidencePath);
|
|
122
|
+
}
|
|
119
123
|
return { claims: claims.size, evidence: evidence.size, searches: searches.size, profile: data.profile };
|
|
120
124
|
}
|
|
121
125
|
|
|
122
126
|
try {
|
|
123
|
-
const result = validate(process.argv[2], process.argv[3]);
|
|
127
|
+
const result = await validate(process.argv[2], process.argv[3]);
|
|
124
128
|
process.stdout.write(`YSS research package valid (${result.profile}, ${result.claims} claims, ${result.evidence} evidence items, ${result.searches} searches)\n`);
|
|
125
129
|
} catch (error) {
|
|
126
130
|
process.stderr.write(`YSS research package invalid: ${error.message}\n`);
|