create-yss-spec 2.2.3 → 2.2.5
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 +17 -1
- package/package.json +1 -1
- package/src/cli.js +15 -1
- package/src/self-update.js +277 -0
- package/template/.agents/skills/yss-domain/SKILL.md +5 -4
- package/template/.agents/skills/yss-product-lifecycle/SKILL.md +15 -14
- package/template/.agents/skills/yss-product-lifecycle/references/artifact-dependencies.md +4 -0
- 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 +139 -4
- package/template/.agents/skills/yss-product-lifecycle/references/orchestration.md +6 -3
- package/template/.agents/skills/yss-product-lifecycle/references/state-model.md +7 -2
- package/template/.agents/skills/yss-router/SKILL.md +4 -2
- package/template/.agents/skills/yss-router/references/router-contract.yaml +18 -3
- package/template/.agents/skills/yss-router/references/slice-implementation-contract.md +58 -1
- package/template/.agents/skills/yss-stage-decision/SKILL.md +50 -0
- package/template/.agents/skills/yss-stage-decision/references/domain-strategy-contract.md +26 -0
- package/template/.agents/skills/yss-stage-decision/references/domain-strategy.schema.json +128 -0
- package/template/.agents/skills/yss-stage-decision/references/stage-decision-package-contract.md +19 -0
- package/template/.agents/skills/yss-stage-decision/references/stage-decision-package.schema.json +86 -0
- package/template/.agents/skills/yss-stage-decision/references/validation-rules.md +18 -0
- package/template/.agents/skills/yss-stage-decision/scripts/validate-domain-strategy.mjs +169 -0
- package/template/.agents/skills/yss-stage-decision/scripts/validate-stage-decision-package.mjs +100 -0
- package/template/.agents/skills/yss-stage-decision/tests/fixtures/domain-strategy-approval.yaml +15 -0
- package/template/.agents/skills/yss-stage-decision/tests/fixtures/invalid-direction.yaml +58 -0
- package/template/.agents/skills/yss-stage-decision/tests/fixtures/invalid-stage-decision-blocker.yaml +44 -0
- package/template/.agents/skills/yss-stage-decision/tests/fixtures/stage-decision-approval.yaml +15 -0
- package/template/.agents/skills/yss-stage-decision/tests/fixtures/valid-stage-decision-package.yaml +49 -0
- package/template/.agents/skills/yss-stage-decision/tests/fixtures/valid-supplier-domain.yaml +108 -0
- package/template/.agents/skills/yss-stage-decision/tests/run-scenarios.mjs +68 -0
- package/template/.agents/skills/yss-tactical-design/SKILL.md +33 -0
- package/template/.agents/skills/yss-tactical-design/agents/openai.yaml +4 -0
- package/template/.agents/skills/yss-tactical-design/references/output-template.md +28 -0
- package/template/.agents/skills/yss-tactical-design/references/tactical-design-contract.md +41 -0
- package/template/.agents/skills/yss-tactical-design/references/tactical-design.schema.json +31 -0
- package/template/.agents/skills/yss-tactical-design/references/validation-rules.md +13 -0
- package/template/.agents/skills/yss-tactical-design/scripts/validate-tactical-design.mjs +213 -0
- package/template/.agents/skills/yss-tactical-design/tests/fixtures/invalid-api-leaks-aggregate.yaml +21 -0
- package/template/.agents/skills/yss-tactical-design/tests/fixtures/invalid-missing-consistency-policy.yaml +21 -0
- package/template/.agents/skills/yss-tactical-design/tests/fixtures/invalid-missing-invariant.yaml +21 -0
- package/template/.agents/skills/yss-tactical-design/tests/fixtures/invalid-stale-upstream-ref.yaml +21 -0
- package/template/.agents/skills/yss-tactical-design/tests/fixtures/invalid-strategic-as-tactical.yaml +21 -0
- package/template/.agents/skills/yss-tactical-design/tests/fixtures/valid-tactical-design.yaml +80 -0
- package/template/.agents/skills/yss-tactical-design/tests/run-scenarios.mjs +47 -0
- package/template/.claude/skills/yss-domain/SKILL.md +5 -4
- package/template/.claude/skills/yss-product-lifecycle/SKILL.md +15 -14
- package/template/.claude/skills/yss-product-lifecycle/references/artifact-dependencies.md +4 -0
- 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 +139 -4
- package/template/.claude/skills/yss-product-lifecycle/references/orchestration.md +6 -3
- package/template/.claude/skills/yss-product-lifecycle/references/state-model.md +7 -2
- package/template/.claude/skills/yss-router/SKILL.md +4 -2
- package/template/.claude/skills/yss-router/references/router-contract.yaml +18 -3
- package/template/.claude/skills/yss-router/references/slice-implementation-contract.md +58 -1
- package/template/.claude/skills/yss-stage-decision/SKILL.md +50 -0
- package/template/.claude/skills/yss-stage-decision/references/domain-strategy-contract.md +26 -0
- package/template/.claude/skills/yss-stage-decision/references/domain-strategy.schema.json +128 -0
- package/template/.claude/skills/yss-stage-decision/references/stage-decision-package-contract.md +19 -0
- package/template/.claude/skills/yss-stage-decision/references/stage-decision-package.schema.json +86 -0
- package/template/.claude/skills/yss-stage-decision/references/validation-rules.md +18 -0
- package/template/.claude/skills/yss-stage-decision/scripts/validate-domain-strategy.mjs +169 -0
- package/template/.claude/skills/yss-stage-decision/scripts/validate-stage-decision-package.mjs +100 -0
- package/template/.claude/skills/yss-stage-decision/tests/fixtures/domain-strategy-approval.yaml +15 -0
- package/template/.claude/skills/yss-stage-decision/tests/fixtures/invalid-direction.yaml +58 -0
- package/template/.claude/skills/yss-stage-decision/tests/fixtures/invalid-stage-decision-blocker.yaml +44 -0
- package/template/.claude/skills/yss-stage-decision/tests/fixtures/stage-decision-approval.yaml +15 -0
- package/template/.claude/skills/yss-stage-decision/tests/fixtures/valid-stage-decision-package.yaml +49 -0
- package/template/.claude/skills/yss-stage-decision/tests/fixtures/valid-supplier-domain.yaml +108 -0
- package/template/.claude/skills/yss-stage-decision/tests/run-scenarios.mjs +68 -0
- package/template/.claude/skills/yss-tactical-design/SKILL.md +33 -0
- package/template/.claude/skills/yss-tactical-design/agents/openai.yaml +4 -0
- package/template/.claude/skills/yss-tactical-design/references/output-template.md +28 -0
- package/template/.claude/skills/yss-tactical-design/references/tactical-design-contract.md +41 -0
- package/template/.claude/skills/yss-tactical-design/references/tactical-design.schema.json +31 -0
- package/template/.claude/skills/yss-tactical-design/references/validation-rules.md +13 -0
- package/template/.claude/skills/yss-tactical-design/scripts/validate-tactical-design.mjs +213 -0
- package/template/.claude/skills/yss-tactical-design/tests/fixtures/invalid-api-leaks-aggregate.yaml +21 -0
- package/template/.claude/skills/yss-tactical-design/tests/fixtures/invalid-missing-consistency-policy.yaml +21 -0
- package/template/.claude/skills/yss-tactical-design/tests/fixtures/invalid-missing-invariant.yaml +21 -0
- package/template/.claude/skills/yss-tactical-design/tests/fixtures/invalid-stale-upstream-ref.yaml +21 -0
- package/template/.claude/skills/yss-tactical-design/tests/fixtures/invalid-strategic-as-tactical.yaml +21 -0
- package/template/.claude/skills/yss-tactical-design/tests/fixtures/valid-tactical-design.yaml +80 -0
- package/template/.claude/skills/yss-tactical-design/tests/run-scenarios.mjs +47 -0
- package/template/.codex/skills/yss-domain/SKILL.md +5 -4
- package/template/.codex/skills/yss-product-lifecycle/SKILL.md +15 -14
- package/template/.codex/skills/yss-product-lifecycle/references/artifact-dependencies.md +4 -0
- 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 +139 -4
- package/template/.codex/skills/yss-product-lifecycle/references/orchestration.md +6 -3
- package/template/.codex/skills/yss-product-lifecycle/references/state-model.md +7 -2
- package/template/.codex/skills/yss-router/SKILL.md +4 -2
- package/template/.codex/skills/yss-router/references/router-contract.yaml +18 -3
- package/template/.codex/skills/yss-router/references/slice-implementation-contract.md +58 -1
- package/template/.codex/skills/yss-stage-decision/SKILL.md +50 -0
- package/template/.codex/skills/yss-stage-decision/references/domain-strategy-contract.md +26 -0
- package/template/.codex/skills/yss-stage-decision/references/domain-strategy.schema.json +128 -0
- package/template/.codex/skills/yss-stage-decision/references/stage-decision-package-contract.md +19 -0
- package/template/.codex/skills/yss-stage-decision/references/stage-decision-package.schema.json +86 -0
- package/template/.codex/skills/yss-stage-decision/references/validation-rules.md +18 -0
- package/template/.codex/skills/yss-stage-decision/scripts/validate-domain-strategy.mjs +169 -0
- package/template/.codex/skills/yss-stage-decision/scripts/validate-stage-decision-package.mjs +100 -0
- package/template/.codex/skills/yss-stage-decision/tests/fixtures/domain-strategy-approval.yaml +15 -0
- package/template/.codex/skills/yss-stage-decision/tests/fixtures/invalid-direction.yaml +58 -0
- package/template/.codex/skills/yss-stage-decision/tests/fixtures/invalid-stage-decision-blocker.yaml +44 -0
- package/template/.codex/skills/yss-stage-decision/tests/fixtures/stage-decision-approval.yaml +15 -0
- package/template/.codex/skills/yss-stage-decision/tests/fixtures/valid-stage-decision-package.yaml +49 -0
- package/template/.codex/skills/yss-stage-decision/tests/fixtures/valid-supplier-domain.yaml +108 -0
- package/template/.codex/skills/yss-stage-decision/tests/run-scenarios.mjs +68 -0
- package/template/.codex/skills/yss-tactical-design/SKILL.md +33 -0
- package/template/.codex/skills/yss-tactical-design/agents/openai.yaml +4 -0
- package/template/.codex/skills/yss-tactical-design/references/output-template.md +28 -0
- package/template/.codex/skills/yss-tactical-design/references/tactical-design-contract.md +41 -0
- package/template/.codex/skills/yss-tactical-design/references/tactical-design.schema.json +31 -0
- package/template/.codex/skills/yss-tactical-design/references/validation-rules.md +13 -0
- package/template/.codex/skills/yss-tactical-design/scripts/validate-tactical-design.mjs +213 -0
- package/template/.codex/skills/yss-tactical-design/tests/fixtures/invalid-api-leaks-aggregate.yaml +21 -0
- package/template/.codex/skills/yss-tactical-design/tests/fixtures/invalid-missing-consistency-policy.yaml +21 -0
- package/template/.codex/skills/yss-tactical-design/tests/fixtures/invalid-missing-invariant.yaml +21 -0
- package/template/.codex/skills/yss-tactical-design/tests/fixtures/invalid-stale-upstream-ref.yaml +21 -0
- package/template/.codex/skills/yss-tactical-design/tests/fixtures/invalid-strategic-as-tactical.yaml +21 -0
- package/template/.codex/skills/yss-tactical-design/tests/fixtures/valid-tactical-design.yaml +80 -0
- package/template/.codex/skills/yss-tactical-design/tests/run-scenarios.mjs +47 -0
- package/template/.cursor/skills/yss-domain/SKILL.md +5 -4
- package/template/.cursor/skills/yss-product-lifecycle/SKILL.md +15 -14
- package/template/.cursor/skills/yss-product-lifecycle/references/artifact-dependencies.md +4 -0
- 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 +139 -4
- package/template/.cursor/skills/yss-product-lifecycle/references/orchestration.md +6 -3
- package/template/.cursor/skills/yss-product-lifecycle/references/state-model.md +7 -2
- package/template/.cursor/skills/yss-router/SKILL.md +4 -2
- package/template/.cursor/skills/yss-router/references/router-contract.yaml +18 -3
- package/template/.cursor/skills/yss-router/references/slice-implementation-contract.md +58 -1
- package/template/.cursor/skills/yss-stage-decision/SKILL.md +50 -0
- package/template/.cursor/skills/yss-stage-decision/references/domain-strategy-contract.md +26 -0
- package/template/.cursor/skills/yss-stage-decision/references/domain-strategy.schema.json +128 -0
- package/template/.cursor/skills/yss-stage-decision/references/stage-decision-package-contract.md +19 -0
- package/template/.cursor/skills/yss-stage-decision/references/stage-decision-package.schema.json +86 -0
- package/template/.cursor/skills/yss-stage-decision/references/validation-rules.md +18 -0
- package/template/.cursor/skills/yss-stage-decision/scripts/validate-domain-strategy.mjs +169 -0
- package/template/.cursor/skills/yss-stage-decision/scripts/validate-stage-decision-package.mjs +100 -0
- package/template/.cursor/skills/yss-stage-decision/tests/fixtures/domain-strategy-approval.yaml +15 -0
- package/template/.cursor/skills/yss-stage-decision/tests/fixtures/invalid-direction.yaml +58 -0
- package/template/.cursor/skills/yss-stage-decision/tests/fixtures/invalid-stage-decision-blocker.yaml +44 -0
- package/template/.cursor/skills/yss-stage-decision/tests/fixtures/stage-decision-approval.yaml +15 -0
- package/template/.cursor/skills/yss-stage-decision/tests/fixtures/valid-stage-decision-package.yaml +49 -0
- package/template/.cursor/skills/yss-stage-decision/tests/fixtures/valid-supplier-domain.yaml +108 -0
- package/template/.cursor/skills/yss-stage-decision/tests/run-scenarios.mjs +68 -0
- package/template/.cursor/skills/yss-tactical-design/SKILL.md +33 -0
- package/template/.cursor/skills/yss-tactical-design/agents/openai.yaml +4 -0
- package/template/.cursor/skills/yss-tactical-design/references/output-template.md +28 -0
- package/template/.cursor/skills/yss-tactical-design/references/tactical-design-contract.md +41 -0
- package/template/.cursor/skills/yss-tactical-design/references/tactical-design.schema.json +31 -0
- package/template/.cursor/skills/yss-tactical-design/references/validation-rules.md +13 -0
- package/template/.cursor/skills/yss-tactical-design/scripts/validate-tactical-design.mjs +213 -0
- package/template/.cursor/skills/yss-tactical-design/tests/fixtures/invalid-api-leaks-aggregate.yaml +21 -0
- package/template/.cursor/skills/yss-tactical-design/tests/fixtures/invalid-missing-consistency-policy.yaml +21 -0
- package/template/.cursor/skills/yss-tactical-design/tests/fixtures/invalid-missing-invariant.yaml +21 -0
- package/template/.cursor/skills/yss-tactical-design/tests/fixtures/invalid-stale-upstream-ref.yaml +21 -0
- package/template/.cursor/skills/yss-tactical-design/tests/fixtures/invalid-strategic-as-tactical.yaml +21 -0
- package/template/.cursor/skills/yss-tactical-design/tests/fixtures/valid-tactical-design.yaml +80 -0
- package/template/.cursor/skills/yss-tactical-design/tests/run-scenarios.mjs +47 -0
- package/template/.hermes/skills/yss-domain/SKILL.md +5 -4
- package/template/.hermes/skills/yss-product-lifecycle/SKILL.md +15 -14
- package/template/.hermes/skills/yss-product-lifecycle/references/artifact-dependencies.md +4 -0
- 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 +139 -4
- package/template/.hermes/skills/yss-product-lifecycle/references/orchestration.md +6 -3
- package/template/.hermes/skills/yss-product-lifecycle/references/state-model.md +7 -2
- package/template/.hermes/skills/yss-router/SKILL.md +4 -2
- package/template/.hermes/skills/yss-router/references/router-contract.yaml +18 -3
- package/template/.hermes/skills/yss-router/references/slice-implementation-contract.md +58 -1
- package/template/.hermes/skills/yss-stage-decision/SKILL.md +50 -0
- package/template/.hermes/skills/yss-stage-decision/references/domain-strategy-contract.md +26 -0
- package/template/.hermes/skills/yss-stage-decision/references/domain-strategy.schema.json +128 -0
- package/template/.hermes/skills/yss-stage-decision/references/stage-decision-package-contract.md +19 -0
- package/template/.hermes/skills/yss-stage-decision/references/stage-decision-package.schema.json +86 -0
- package/template/.hermes/skills/yss-stage-decision/references/validation-rules.md +18 -0
- package/template/.hermes/skills/yss-stage-decision/scripts/validate-domain-strategy.mjs +169 -0
- package/template/.hermes/skills/yss-stage-decision/scripts/validate-stage-decision-package.mjs +100 -0
- package/template/.hermes/skills/yss-stage-decision/tests/fixtures/domain-strategy-approval.yaml +15 -0
- package/template/.hermes/skills/yss-stage-decision/tests/fixtures/invalid-direction.yaml +58 -0
- package/template/.hermes/skills/yss-stage-decision/tests/fixtures/invalid-stage-decision-blocker.yaml +44 -0
- package/template/.hermes/skills/yss-stage-decision/tests/fixtures/stage-decision-approval.yaml +15 -0
- package/template/.hermes/skills/yss-stage-decision/tests/fixtures/valid-stage-decision-package.yaml +49 -0
- package/template/.hermes/skills/yss-stage-decision/tests/fixtures/valid-supplier-domain.yaml +108 -0
- package/template/.hermes/skills/yss-stage-decision/tests/run-scenarios.mjs +68 -0
- package/template/.hermes/skills/yss-tactical-design/SKILL.md +33 -0
- package/template/.hermes/skills/yss-tactical-design/agents/openai.yaml +4 -0
- package/template/.hermes/skills/yss-tactical-design/references/output-template.md +28 -0
- package/template/.hermes/skills/yss-tactical-design/references/tactical-design-contract.md +41 -0
- package/template/.hermes/skills/yss-tactical-design/references/tactical-design.schema.json +31 -0
- package/template/.hermes/skills/yss-tactical-design/references/validation-rules.md +13 -0
- package/template/.hermes/skills/yss-tactical-design/scripts/validate-tactical-design.mjs +213 -0
- package/template/.hermes/skills/yss-tactical-design/tests/fixtures/invalid-api-leaks-aggregate.yaml +21 -0
- package/template/.hermes/skills/yss-tactical-design/tests/fixtures/invalid-missing-consistency-policy.yaml +21 -0
- package/template/.hermes/skills/yss-tactical-design/tests/fixtures/invalid-missing-invariant.yaml +21 -0
- package/template/.hermes/skills/yss-tactical-design/tests/fixtures/invalid-stale-upstream-ref.yaml +21 -0
- package/template/.hermes/skills/yss-tactical-design/tests/fixtures/invalid-strategic-as-tactical.yaml +21 -0
- package/template/.hermes/skills/yss-tactical-design/tests/fixtures/valid-tactical-design.yaml +80 -0
- package/template/.hermes/skills/yss-tactical-design/tests/run-scenarios.mjs +47 -0
- package/template/.pi/skills/yss-domain/SKILL.md +5 -4
- package/template/.pi/skills/yss-product-lifecycle/SKILL.md +15 -14
- package/template/.pi/skills/yss-product-lifecycle/references/artifact-dependencies.md +4 -0
- 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 +139 -4
- package/template/.pi/skills/yss-product-lifecycle/references/orchestration.md +6 -3
- package/template/.pi/skills/yss-product-lifecycle/references/state-model.md +7 -2
- package/template/.pi/skills/yss-router/SKILL.md +4 -2
- package/template/.pi/skills/yss-router/references/router-contract.yaml +18 -3
- package/template/.pi/skills/yss-router/references/slice-implementation-contract.md +58 -1
- package/template/.pi/skills/yss-stage-decision/SKILL.md +50 -0
- package/template/.pi/skills/yss-stage-decision/references/domain-strategy-contract.md +26 -0
- package/template/.pi/skills/yss-stage-decision/references/domain-strategy.schema.json +128 -0
- package/template/.pi/skills/yss-stage-decision/references/stage-decision-package-contract.md +19 -0
- package/template/.pi/skills/yss-stage-decision/references/stage-decision-package.schema.json +86 -0
- package/template/.pi/skills/yss-stage-decision/references/validation-rules.md +18 -0
- package/template/.pi/skills/yss-stage-decision/scripts/validate-domain-strategy.mjs +169 -0
- package/template/.pi/skills/yss-stage-decision/scripts/validate-stage-decision-package.mjs +100 -0
- package/template/.pi/skills/yss-stage-decision/tests/fixtures/domain-strategy-approval.yaml +15 -0
- package/template/.pi/skills/yss-stage-decision/tests/fixtures/invalid-direction.yaml +58 -0
- package/template/.pi/skills/yss-stage-decision/tests/fixtures/invalid-stage-decision-blocker.yaml +44 -0
- package/template/.pi/skills/yss-stage-decision/tests/fixtures/stage-decision-approval.yaml +15 -0
- package/template/.pi/skills/yss-stage-decision/tests/fixtures/valid-stage-decision-package.yaml +49 -0
- package/template/.pi/skills/yss-stage-decision/tests/fixtures/valid-supplier-domain.yaml +108 -0
- package/template/.pi/skills/yss-stage-decision/tests/run-scenarios.mjs +68 -0
- package/template/.pi/skills/yss-tactical-design/SKILL.md +33 -0
- package/template/.pi/skills/yss-tactical-design/agents/openai.yaml +4 -0
- package/template/.pi/skills/yss-tactical-design/references/output-template.md +28 -0
- package/template/.pi/skills/yss-tactical-design/references/tactical-design-contract.md +41 -0
- package/template/.pi/skills/yss-tactical-design/references/tactical-design.schema.json +31 -0
- package/template/.pi/skills/yss-tactical-design/references/validation-rules.md +13 -0
- package/template/.pi/skills/yss-tactical-design/scripts/validate-tactical-design.mjs +213 -0
- package/template/.pi/skills/yss-tactical-design/tests/fixtures/invalid-api-leaks-aggregate.yaml +21 -0
- package/template/.pi/skills/yss-tactical-design/tests/fixtures/invalid-missing-consistency-policy.yaml +21 -0
- package/template/.pi/skills/yss-tactical-design/tests/fixtures/invalid-missing-invariant.yaml +21 -0
- package/template/.pi/skills/yss-tactical-design/tests/fixtures/invalid-stale-upstream-ref.yaml +21 -0
- package/template/.pi/skills/yss-tactical-design/tests/fixtures/invalid-strategic-as-tactical.yaml +21 -0
- package/template/.pi/skills/yss-tactical-design/tests/fixtures/valid-tactical-design.yaml +80 -0
- package/template/.pi/skills/yss-tactical-design/tests/run-scenarios.mjs +47 -0
- package/template/.qoder/skills/yss-domain/SKILL.md +5 -4
- package/template/.qoder/skills/yss-product-lifecycle/SKILL.md +15 -14
- package/template/.qoder/skills/yss-product-lifecycle/references/artifact-dependencies.md +4 -0
- 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 +139 -4
- package/template/.qoder/skills/yss-product-lifecycle/references/orchestration.md +6 -3
- package/template/.qoder/skills/yss-product-lifecycle/references/state-model.md +7 -2
- package/template/.qoder/skills/yss-router/SKILL.md +4 -2
- package/template/.qoder/skills/yss-router/references/router-contract.yaml +18 -3
- package/template/.qoder/skills/yss-router/references/slice-implementation-contract.md +58 -1
- package/template/.qoder/skills/yss-stage-decision/SKILL.md +50 -0
- package/template/.qoder/skills/yss-stage-decision/references/domain-strategy-contract.md +26 -0
- package/template/.qoder/skills/yss-stage-decision/references/domain-strategy.schema.json +128 -0
- package/template/.qoder/skills/yss-stage-decision/references/stage-decision-package-contract.md +19 -0
- package/template/.qoder/skills/yss-stage-decision/references/stage-decision-package.schema.json +86 -0
- package/template/.qoder/skills/yss-stage-decision/references/validation-rules.md +18 -0
- package/template/.qoder/skills/yss-stage-decision/scripts/validate-domain-strategy.mjs +169 -0
- package/template/.qoder/skills/yss-stage-decision/scripts/validate-stage-decision-package.mjs +100 -0
- package/template/.qoder/skills/yss-stage-decision/tests/fixtures/domain-strategy-approval.yaml +15 -0
- package/template/.qoder/skills/yss-stage-decision/tests/fixtures/invalid-direction.yaml +58 -0
- package/template/.qoder/skills/yss-stage-decision/tests/fixtures/invalid-stage-decision-blocker.yaml +44 -0
- package/template/.qoder/skills/yss-stage-decision/tests/fixtures/stage-decision-approval.yaml +15 -0
- package/template/.qoder/skills/yss-stage-decision/tests/fixtures/valid-stage-decision-package.yaml +49 -0
- package/template/.qoder/skills/yss-stage-decision/tests/fixtures/valid-supplier-domain.yaml +108 -0
- package/template/.qoder/skills/yss-stage-decision/tests/run-scenarios.mjs +68 -0
- package/template/.qoder/skills/yss-tactical-design/SKILL.md +33 -0
- package/template/.qoder/skills/yss-tactical-design/agents/openai.yaml +4 -0
- package/template/.qoder/skills/yss-tactical-design/references/output-template.md +28 -0
- package/template/.qoder/skills/yss-tactical-design/references/tactical-design-contract.md +41 -0
- package/template/.qoder/skills/yss-tactical-design/references/tactical-design.schema.json +31 -0
- package/template/.qoder/skills/yss-tactical-design/references/validation-rules.md +13 -0
- package/template/.qoder/skills/yss-tactical-design/scripts/validate-tactical-design.mjs +213 -0
- package/template/.qoder/skills/yss-tactical-design/tests/fixtures/invalid-api-leaks-aggregate.yaml +21 -0
- package/template/.qoder/skills/yss-tactical-design/tests/fixtures/invalid-missing-consistency-policy.yaml +21 -0
- package/template/.qoder/skills/yss-tactical-design/tests/fixtures/invalid-missing-invariant.yaml +21 -0
- package/template/.qoder/skills/yss-tactical-design/tests/fixtures/invalid-stale-upstream-ref.yaml +21 -0
- package/template/.qoder/skills/yss-tactical-design/tests/fixtures/invalid-strategic-as-tactical.yaml +21 -0
- package/template/.qoder/skills/yss-tactical-design/tests/fixtures/valid-tactical-design.yaml +80 -0
- package/template/.qoder/skills/yss-tactical-design/tests/run-scenarios.mjs +47 -0
- package/template/.trae/skills/yss-domain/SKILL.md +5 -4
- package/template/.trae/skills/yss-product-lifecycle/SKILL.md +15 -14
- package/template/.trae/skills/yss-product-lifecycle/references/artifact-dependencies.md +4 -0
- 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 +139 -4
- package/template/.trae/skills/yss-product-lifecycle/references/orchestration.md +6 -3
- package/template/.trae/skills/yss-product-lifecycle/references/state-model.md +7 -2
- package/template/.trae/skills/yss-router/SKILL.md +4 -2
- package/template/.trae/skills/yss-router/references/router-contract.yaml +18 -3
- package/template/.trae/skills/yss-router/references/slice-implementation-contract.md +58 -1
- package/template/.trae/skills/yss-stage-decision/SKILL.md +50 -0
- package/template/.trae/skills/yss-stage-decision/references/domain-strategy-contract.md +26 -0
- package/template/.trae/skills/yss-stage-decision/references/domain-strategy.schema.json +128 -0
- package/template/.trae/skills/yss-stage-decision/references/stage-decision-package-contract.md +19 -0
- package/template/.trae/skills/yss-stage-decision/references/stage-decision-package.schema.json +86 -0
- package/template/.trae/skills/yss-stage-decision/references/validation-rules.md +18 -0
- package/template/.trae/skills/yss-stage-decision/scripts/validate-domain-strategy.mjs +169 -0
- package/template/.trae/skills/yss-stage-decision/scripts/validate-stage-decision-package.mjs +100 -0
- package/template/.trae/skills/yss-stage-decision/tests/fixtures/domain-strategy-approval.yaml +15 -0
- package/template/.trae/skills/yss-stage-decision/tests/fixtures/invalid-direction.yaml +58 -0
- package/template/.trae/skills/yss-stage-decision/tests/fixtures/invalid-stage-decision-blocker.yaml +44 -0
- package/template/.trae/skills/yss-stage-decision/tests/fixtures/stage-decision-approval.yaml +15 -0
- package/template/.trae/skills/yss-stage-decision/tests/fixtures/valid-stage-decision-package.yaml +49 -0
- package/template/.trae/skills/yss-stage-decision/tests/fixtures/valid-supplier-domain.yaml +108 -0
- package/template/.trae/skills/yss-stage-decision/tests/run-scenarios.mjs +68 -0
- package/template/.trae/skills/yss-tactical-design/SKILL.md +33 -0
- package/template/.trae/skills/yss-tactical-design/agents/openai.yaml +4 -0
- package/template/.trae/skills/yss-tactical-design/references/output-template.md +28 -0
- package/template/.trae/skills/yss-tactical-design/references/tactical-design-contract.md +41 -0
- package/template/.trae/skills/yss-tactical-design/references/tactical-design.schema.json +31 -0
- package/template/.trae/skills/yss-tactical-design/references/validation-rules.md +13 -0
- package/template/.trae/skills/yss-tactical-design/scripts/validate-tactical-design.mjs +213 -0
- package/template/.trae/skills/yss-tactical-design/tests/fixtures/invalid-api-leaks-aggregate.yaml +21 -0
- package/template/.trae/skills/yss-tactical-design/tests/fixtures/invalid-missing-consistency-policy.yaml +21 -0
- package/template/.trae/skills/yss-tactical-design/tests/fixtures/invalid-missing-invariant.yaml +21 -0
- package/template/.trae/skills/yss-tactical-design/tests/fixtures/invalid-stale-upstream-ref.yaml +21 -0
- package/template/.trae/skills/yss-tactical-design/tests/fixtures/invalid-strategic-as-tactical.yaml +21 -0
- package/template/.trae/skills/yss-tactical-design/tests/fixtures/valid-tactical-design.yaml +80 -0
- package/template/.trae/skills/yss-tactical-design/tests/run-scenarios.mjs +47 -0
- package/template/AGENTS.md +22 -5
- package/template/CONTEXT.md +1 -1
- package/template/docs/agents/README.md +1 -1
- package/template/docs/agents/digital-human-roles.md +2 -2
- package/template/docs/agents/digital-human-roles.yaml +7 -1
- package/template/docs/agents/yss-skill-registry.yaml +12 -0
- package/template/docs/architecture/templates/system-overview-design-template.md +1 -0
- package/template/docs/process/lifecycle-artifact-map.md +8 -0
- package/template/docs/process/lifecycle-registry-baseline.json +11 -1
- package/template/docs/process/lifecycle-registry.yaml +46 -2
- package/template/docs/process/schemas/digital-human-task-package.schema.json +107 -0
- package/template/docs/process/schemas/subagent-task-package.schema.json +6 -0
- package/template/docs/process/subagent-collaboration.md +2 -2
- package/template/docs/templates/subagent-task-package-template.md +39 -1
- package/template/scripts/lib/lifecycle-transition.mjs +259 -0
- package/template/scripts/lib/scenario-checks.mjs +96 -2
- package/template/scripts/lib/task-package.mjs +214 -0
- package/template/scripts/verify-digital-human-task-package +14 -0
- package/template/scripts/verify-digital-human-task-package-scenarios +8 -0
- package/template/scripts/verify-lifecycle-transition-scenarios +105 -0
- package/template/scripts/verify-subagent-task-package +8 -0
- package/template/scripts/verify-subagent-task-package-scenarios +196 -0
- package/template/scripts/verify-template +13 -2
- package/template/skills-lock.json +36 -4
- package/template.snapshot.json +4 -4
package/template/.cursor/skills/yss-product-lifecycle/references/orchestration-contract.yaml
CHANGED
|
@@ -100,6 +100,71 @@ workflow_execution_result:
|
|
|
100
100
|
workflow_reference:
|
|
101
101
|
required: [source, skill, invocation_mode]
|
|
102
102
|
allowed_sources: [yss-product-lifecycle, mattpocock/skills]
|
|
103
|
+
next_route:
|
|
104
|
+
validator: scripts/lib/lifecycle-transition.mjs
|
|
105
|
+
function: validateNextRoute
|
|
106
|
+
implementation_predecessor: work-unit.ticket-decomposition
|
|
107
|
+
null_allowed_when: [blocked, needs-human, failed, terminal_completed]
|
|
108
|
+
work_unit_requirements:
|
|
109
|
+
work-unit.ticket-decomposition:
|
|
110
|
+
completed_requires: [vertical_slice_ticket_ref, ticket_decomposition_result_ref]
|
|
111
|
+
work-unit.slice-implementation:
|
|
112
|
+
required: [predecessor_work_unit, ticket_decomposition_result_ref, ticket_decomposition_result_status, vertical_slice_ticket_ref, vertical_slice_ticket_role, vertical_slice_ticket_kind, slice_contract_ticket_ref, slice_contract_status]
|
|
113
|
+
boolean_required: [ready_for_agent, slice_contract_persisted, slice_contract_current_version]
|
|
114
|
+
validator: scripts/lib/lifecycle-transition.mjs
|
|
115
|
+
function: validateImplementationEntry
|
|
116
|
+
|
|
117
|
+
task_package:
|
|
118
|
+
schema_version: 1
|
|
119
|
+
applies_to: all-formal-digital-human-dispatches
|
|
120
|
+
schema_ref: docs/process/schemas/digital-human-task-package.schema.json
|
|
121
|
+
compatibility_schema_ref: docs/process/schemas/subagent-task-package.schema.json
|
|
122
|
+
validator: scripts/verify-digital-human-task-package
|
|
123
|
+
compatibility_validator: scripts/verify-subagent-task-package
|
|
124
|
+
persistence_layout: docs/.scratch/<feature>/task-packages/<task-id>.yaml
|
|
125
|
+
required: [schema_version, task_id, work_unit_id, actor_id, role_id, runtime_id, execution_state, workflow_status, skill_source, contract, inputs, objective, allowed_write_paths, forbidden_actions, expected_outputs, expected_evidence_files, verification_commands, verification_results, downstream_consumers, convergence]
|
|
126
|
+
execution_states: [Explorer, Drafter, Worker, Reviewer, Verifier]
|
|
127
|
+
workflow_statuses: [not-started, active, paused, resolved, failed]
|
|
128
|
+
skill_source:
|
|
129
|
+
registry_ref: docs/agents/digital-human-roles.yaml
|
|
130
|
+
defaults: taskPackageDefaults(role_id)
|
|
131
|
+
copy_required: [core_skills, forbidden_skills]
|
|
132
|
+
contract:
|
|
133
|
+
kinds: [lifecycle-work-unit, slice-implementation, template-maintenance]
|
|
134
|
+
required: [kind, contract_id, contract_version, status, contract_ref]
|
|
135
|
+
status_at_dispatch: issued
|
|
136
|
+
status_after_change: [stale, blocked]
|
|
137
|
+
lifecycle-work-unit:
|
|
138
|
+
required: [lifecycle_ref]
|
|
139
|
+
forbidden: [slice_contract_ref, maintenance_ref]
|
|
140
|
+
template_source_work_unit: forbidden
|
|
141
|
+
slice-implementation:
|
|
142
|
+
required: [slice_contract_ref]
|
|
143
|
+
must_match_current_slice_contract: true
|
|
144
|
+
version_mismatch: blocked
|
|
145
|
+
stage: stage.vertical-slice-implementation
|
|
146
|
+
parent_work_unit: work-unit.slice-implementation
|
|
147
|
+
work_unit_must_be_declared_in_slice_contract: true
|
|
148
|
+
template-maintenance:
|
|
149
|
+
required: [maintenance_ref]
|
|
150
|
+
forbidden: [slice_contract_ref, lifecycle_ref]
|
|
151
|
+
dispatch:
|
|
152
|
+
owner: role.lifecycle-orchestrator
|
|
153
|
+
mode: orchestrator-one-to-one
|
|
154
|
+
per_feature_instances: forbidden
|
|
155
|
+
write_isolation:
|
|
156
|
+
policy: task-package-policy
|
|
157
|
+
changed_files_must_be_within_allowed_paths: true
|
|
158
|
+
shared_workspace_is_not_security_boundary: true
|
|
159
|
+
downstream:
|
|
160
|
+
formal_channel: [task_package_ref, contract_ref, evidence_refs, workflow_execution_result]
|
|
161
|
+
direct_chat_is_not_formal_evidence: true
|
|
162
|
+
stale:
|
|
163
|
+
owner: yss-product-lifecycle
|
|
164
|
+
on_contract_change: [mark_downstream_stale, remove_ready-for-agent, reroute]
|
|
165
|
+
compatibility:
|
|
166
|
+
legacy_results: read-only-normalize
|
|
167
|
+
schema_version: 1
|
|
103
168
|
|
|
104
169
|
# Matt user-invoked skills remain explicit user entry points. Lifecycle work units
|
|
105
170
|
# may prepare, validate and accept their results, but cannot invoke them or create
|
|
@@ -146,6 +211,22 @@ work_unit_routes:
|
|
|
146
211
|
skills: [grilling, domain-modeling]
|
|
147
212
|
applies_when: requirements_or_domain_boundary_unclear
|
|
148
213
|
not_applicable_reason: requirements_already_confirmed
|
|
214
|
+
work-unit.domain-strategy-design:
|
|
215
|
+
native: {source: yss-product-lifecycle, skill: yss-stage-decision, invocation_mode: model-invoked}
|
|
216
|
+
primary_skill: yss-stage-decision
|
|
217
|
+
supporting_skills: [domain-modeling, research, grilling]
|
|
218
|
+
skills: [yss-stage-decision, domain-modeling, research, grilling]
|
|
219
|
+
human_gate: domain-strategy-approved
|
|
220
|
+
applies_when: domain_boundary_or_language_or_core_rule_impact
|
|
221
|
+
not_applicable_reason: no_domain_strategy_impact
|
|
222
|
+
work-unit.stage-decision:
|
|
223
|
+
native: {source: yss-product-lifecycle, skill: yss-stage-decision, invocation_mode: model-invoked}
|
|
224
|
+
primary_skill: yss-stage-decision
|
|
225
|
+
supporting_skills: [domain-modeling]
|
|
226
|
+
skills: [yss-stage-decision, domain-modeling]
|
|
227
|
+
human_gate: stage-decision-package-approved
|
|
228
|
+
applies_when: discovery_to_spec_requires_stable_decision_package
|
|
229
|
+
not_applicable_reason: existing_approved_stage_decision_current
|
|
149
230
|
work-unit.spec-synthesis:
|
|
150
231
|
native: {source: yss-product-lifecycle, skill: yss-product-lifecycle, invocation_mode: model-invoked}
|
|
151
232
|
primary_skill: yss-product-lifecycle
|
|
@@ -166,8 +247,17 @@ work_unit_routes:
|
|
|
166
247
|
work-unit.technical-analysis:
|
|
167
248
|
native: {source: yss-product-lifecycle, skill: yss-product-lifecycle, invocation_mode: model-invoked}
|
|
168
249
|
primary_skill: yss-router
|
|
169
|
-
supporting_skills: [yss-openapi-governance, yss-openapi-draft-review, codebase-design, implementation-repo-onboarding]
|
|
170
|
-
skills: [yss-openapi-governance, yss-openapi-draft-review, codebase-design, implementation-repo-onboarding, yss-router]
|
|
250
|
+
supporting_skills: [yss-openapi-governance, yss-openapi-draft-review, codebase-design, implementation-repo-onboarding, yss-tactical-design]
|
|
251
|
+
skills: [yss-openapi-governance, yss-openapi-draft-review, codebase-design, implementation-repo-onboarding, yss-tactical-design, yss-router]
|
|
252
|
+
tactical_ddd:
|
|
253
|
+
applies_when: [aggregate-impact, state-machine-impact, invariant-impact, consistency-impact, domain-event-impact, gateway-boundary-impact, persistence-mapping-impact]
|
|
254
|
+
not_applicable_reason: no_tactical_ddd_impact
|
|
255
|
+
default_artifact: system-overview-design.tactical-ddd-check
|
|
256
|
+
standalone_artifact: artifact.tactical-design
|
|
257
|
+
review_evidence: evidence.tactical-design-review
|
|
258
|
+
statuses: [draft, ready-for-human, approved, blocked, stale, drift, new_impacts, not-applicable]
|
|
259
|
+
approved_by: yss-product-lifecycle
|
|
260
|
+
forbidden: [self-approval, ready-for-agent, production-code-generation]
|
|
171
261
|
human_gate: openapi-freeze_if_api_impact
|
|
172
262
|
applies_when: technical_or_contract_impact
|
|
173
263
|
not_applicable_reason: no_technical_or_contract_impact
|
|
@@ -179,6 +269,7 @@ work_unit_routes:
|
|
|
179
269
|
skills: [yss-router]
|
|
180
270
|
applies_when: frozen_scope_ready_for_slicing
|
|
181
271
|
not_applicable_reason: contract_or_scope_not_frozen
|
|
272
|
+
must_complete_before: work-unit.slice-implementation
|
|
182
273
|
work-unit.slice-implementation:
|
|
183
274
|
native: {source: yss-product-lifecycle, skill: yss-product-lifecycle, invocation_mode: model-invoked}
|
|
184
275
|
primary_skill: yss-router
|
|
@@ -206,6 +297,7 @@ work_unit_routes:
|
|
|
206
297
|
theme_impact: no_theme_impact
|
|
207
298
|
applies_when: ready_for_agent
|
|
208
299
|
not_applicable_reason: slice_contract_not_approved
|
|
300
|
+
requires_completed_work_units: [work-unit.ticket-decomposition]
|
|
209
301
|
work-unit.frontend-implementation-verification:
|
|
210
302
|
native: {source: yss-product-lifecycle, skill: yss-product-lifecycle, invocation_mode: model-invoked}
|
|
211
303
|
primary_skill: yss-ui
|
|
@@ -239,9 +331,49 @@ compatibility_flow_preconditions:
|
|
|
239
331
|
output: vertical-slice-tickets
|
|
240
332
|
output_role: ready-for-human
|
|
241
333
|
implement:
|
|
242
|
-
required: [ready_for_agent, slice_contract_approved, slice_contract_persisted, slice_contract_current_version, build_architecture_checklist, implementation_repo, implementation_branch, ci, verification_commands, rollback_point, backend_slice_contract_if_applicable, backend_scaffold_policy_satisfied, frontend_implementation_plan_if_ui_impact]
|
|
334
|
+
required: [ready_for_agent, predecessor_work_unit, ticket_decomposition_result_ref, ticket_decomposition_result_status, vertical_slice_ticket_ref, vertical_slice_ticket_role, vertical_slice_ticket_kind, slice_contract_approved, slice_contract_persisted, slice_contract_current_version, build_architecture_checklist, implementation_repo, implementation_branch, ci, verification_commands, rollback_point, backend_slice_contract_if_applicable, backend_scaffold_policy_satisfied, frontend_implementation_plan_if_ui_impact]
|
|
243
335
|
applies_to_single_session: true
|
|
244
336
|
|
|
337
|
+
ticket_formalization:
|
|
338
|
+
implementation_predecessor: work-unit.ticket-decomposition
|
|
339
|
+
result_ref_required: true
|
|
340
|
+
result_must_be: completed
|
|
341
|
+
evidence_refs_required: true
|
|
342
|
+
vertical_slice_ticket:
|
|
343
|
+
kind: vertical-slice-ticket
|
|
344
|
+
role_before_promotion: ready-for-human
|
|
345
|
+
role_for_implementation: ready-for-agent
|
|
346
|
+
local_ref_pattern: '^docs/\\.scratch/[^/]+/issues/[^/]+\\.md$'
|
|
347
|
+
parent_ticket_ref_forbidden: true
|
|
348
|
+
slice_contract_binding:
|
|
349
|
+
ticket_ref_must_equal: vertical_slice_ticket_ref
|
|
350
|
+
status: approved
|
|
351
|
+
persisted: true
|
|
352
|
+
current_version: true
|
|
353
|
+
validator:
|
|
354
|
+
module: scripts/lib/lifecycle-transition.mjs
|
|
355
|
+
functions: [validateNextRoute, validateTicketFormalization, validateImplementationEntry]
|
|
356
|
+
|
|
357
|
+
transition_graph:
|
|
358
|
+
validator: scripts/lib/lifecycle-transition.mjs
|
|
359
|
+
implementation_requires_predecessor: work-unit.ticket-decomposition
|
|
360
|
+
routes:
|
|
361
|
+
work-unit.ssot-update: [work-unit.skill-projection-sync, work-unit.intensity-aware-verification]
|
|
362
|
+
work-unit.skill-projection-sync: [work-unit.template-snapshot-build, work-unit.intensity-aware-verification]
|
|
363
|
+
work-unit.template-snapshot-build: [work-unit.attach-sync-integration, work-unit.intensity-aware-verification]
|
|
364
|
+
work-unit.attach-sync-integration: [work-unit.intensity-aware-verification]
|
|
365
|
+
work-unit.intensity-aware-verification: [work-unit.intensity-aware-review]
|
|
366
|
+
work-unit.intensity-aware-review: [work-unit.release-and-rollback]
|
|
367
|
+
work-unit.release-and-rollback: []
|
|
368
|
+
work-unit.spec-synthesis: [work-unit.prototype-design, work-unit.technical-analysis, work-unit.ticket-decomposition]
|
|
369
|
+
work-unit.prototype-design: [work-unit.technical-analysis, work-unit.ticket-decomposition]
|
|
370
|
+
work-unit.technical-analysis: [work-unit.ticket-decomposition]
|
|
371
|
+
work-unit.ticket-decomposition: [work-unit.slice-implementation]
|
|
372
|
+
forbidden_shortcuts:
|
|
373
|
+
- {from: work-unit.spec-synthesis, to: work-unit.slice-implementation}
|
|
374
|
+
- {from: work-unit.prototype-design, to: work-unit.slice-implementation}
|
|
375
|
+
- {from: work-unit.technical-analysis, to: work-unit.slice-implementation}
|
|
376
|
+
|
|
245
377
|
grill_exit:
|
|
246
378
|
required: [frontier_empty, facts_resolved_or_routed, decisions_confirmed, shared_understanding_confirmed, no_unresolved_runnable_blocker]
|
|
247
379
|
facts_resolved_or_routed:
|
|
@@ -467,7 +599,10 @@ wayfinder_completion:
|
|
|
467
599
|
required: [no_open_children, no_open_blocked_or_claimed_children, no_fog, destination_clear]
|
|
468
600
|
|
|
469
601
|
ready_for_agent:
|
|
470
|
-
required: [gates_satisfied, no_stale_artifacts, blockers_closed, implementation_context_ready, implementation_repo, implementation_branch, ci, verification_commands, rollback_point, slice_contract_approved, slice_contract_persisted, slice_contract_current_version, build_architecture_checklist, backend_slice_contract_if_applicable, backend_scaffold_policy_satisfied, frontend_implementation_plan_if_ui_impact]
|
|
602
|
+
required: [gates_satisfied, no_stale_artifacts, blockers_closed, implementation_context_ready, implementation_repo, implementation_branch, ci, verification_commands, rollback_point, predecessor_work_unit, ticket_decomposition_result_ref, ticket_decomposition_result_status, vertical_slice_ticket_ref, vertical_slice_ticket_role, vertical_slice_ticket_kind, slice_contract_approved, slice_contract_persisted, slice_contract_current_version, build_architecture_checklist, backend_slice_contract_if_applicable, backend_scaffold_policy_satisfied, frontend_implementation_plan_if_ui_impact]
|
|
603
|
+
ticket_formalization_validator: scripts/lib/lifecycle-transition.mjs
|
|
604
|
+
requires_vertical_slice_ticket: true
|
|
605
|
+
parent_ticket_as_implementation_ref: forbidden
|
|
471
606
|
|
|
472
607
|
frontend_implementation_plan:
|
|
473
608
|
applies_when: [ui_impact]
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
1. 识别模式、仓库身份、任务规模和影响面。
|
|
6
6
|
2. `setup readiness`:每个任务只执行一次,核对 tracker、五态标签和领域文档布局,并在本轮缓存结果;仅在 tracker、主远端、真实标签或配置变化时重查。
|
|
7
7
|
3. 加载父 Ticket/checkpoint 与真实资产,计算最近可信阶段。
|
|
8
|
-
4. 评估资产、门禁和 `stale
|
|
9
|
-
5.
|
|
8
|
+
4. 评估资产、门禁和 `stale`,选择第一个未阻塞工作单元。进入 `work-unit.slice-implementation` 前,必须先通过 `scripts/lib/lifecycle-transition.mjs` 的 Ticket 正式化、垂直切片绑定和合法 `next_route` 校验;父 Ticket、缺少垂直切片或 `ready-for-human` 的切片一律 `blocked`。
|
|
9
|
+
5. 执行最小生命周期工作单元:主控先按 `docs/process/schemas/digital-human-task-package.schema.json` 编译并校验任务包,再只实际调用允许的 model-invoked skill;原生工作单元可直接持有正式资产,Matt 兼容 user-invoked skill 仅作为 workflow reference,仍由用户显式启动。将结果归一化为 `Workflow Execution Result`,验收输出并回写状态与证据。任务包的 `contract.kind` 按工作单元选择;只有实现子任务使用 `slice-implementation` 并消费 Slice Implementation Contract,其他阶段不伪造该合同。
|
|
10
10
|
6. 若仍在授权和自动推进边界内,回到第 3 步;否则暂停。
|
|
11
11
|
|
|
12
12
|
不要仅输出下一个提示词后结束 `orchestrate`/`resume`。不要因进入业务代码阶段而退出主控;应把实现交给专项 skill,并在返回后继续核验。
|
|
@@ -51,9 +51,12 @@ tracker 选择和冲突按 `docs/agents/issue-tracker.md` 裁决:已持久化
|
|
|
51
51
|
|
|
52
52
|
## Matt flow 进入条件
|
|
53
53
|
|
|
54
|
+
- `work-unit.technical-analysis` 命中聚合、状态机、不变量、一致性、Domain Event、Gateway 或持久化映射影响时,先调度 `yss-tactical-design` 完成 Tactical DDD Check;默认嵌入系统概要设计 / 数据架构,复杂场景才生成 `artifact.tactical-design`。无领域影响记录 `not-applicable`。该 skill 只返回设计合同和验证结果,批准仍由生命周期编排器维护,发现 `stale`、`drift` 或 `new_impacts` 时不得继续 Ticket 正式化。
|
|
55
|
+
|
|
54
56
|
- `work-unit.discovery-requirements` 实际调用 `grilling` 和 `domain-modeling`;`work-unit.discovery-opportunity` 按事实类型路由 `competitive-intelligence` 或 `research`。生命周期原生工作单元默认负责 Spec、Ticket 和实现资产;`to-spec`、`to-tickets`、`implement` 仅保留为显式兼容入口,结果必须回交生命周期验收。
|
|
55
|
-
- 原生 `work-unit.ticket-decomposition` 只能在 OpenAPI Freeze 或无 API 影响记录后创建垂直切片,初始 Ticket 状态统一为 `ready-for-human`;生命周期复算完整公式后才能提升 `ready-for-agent
|
|
57
|
+
- 原生 `work-unit.ticket-decomposition` 只能在 OpenAPI Freeze 或无 API 影响记录后创建垂直切片,初始 Ticket 状态统一为 `ready-for-human`;生命周期复算完整公式后才能提升 `ready-for-agent`。该工作单元必须返回 `ticket_decomposition_result_ref` 和垂直切片引用,并作为实现的必经前置证据。
|
|
56
58
|
- 原生 `work-unit.slice-implementation` 必须在生命周期批准并持久化 Slice Implementation Contract 和 Build Architecture Checklist 后执行;用户显式 `implement` 仍走兼容入口,不得绕过生命周期。
|
|
59
|
+
- `Workflow Execution Result.next_route` 必须通过生命周期转换校验;Spec、原型和技术分析不得直接跳转到 `work-unit.slice-implementation`,只能先进入 `work-unit.ticket-decomposition`。
|
|
57
60
|
- `implement` 遇到 backend `scaffold_status=required` 时,还必须满足原型确认后的脚手架策略:脚手架 Execution Result、`yss-backend-scaffold-parent` 基线、Wrapper 验证和 Router 合同重编译均已回写;否则停在工程基线,不得写业务代码。
|
|
58
61
|
- `Workflow Execution Result` 出现 `drift`、`new_impacts`、`stale_candidates`、`violation`、`missing_evidence`、空 `evidence_refs` 或缺少必需字段时暂停当前工作单元;旧结果只能先经只读兼容 adapter 归一化。
|
|
59
62
|
|
|
@@ -38,10 +38,15 @@ phase_boundary:
|
|
|
38
38
|
|
|
39
39
|
```text
|
|
40
40
|
required gates ∈ {approved, not-applicable}
|
|
41
|
-
AND related artifacts 不含 stale
|
|
41
|
+
AND related artifacts 不含 stale(若命中领域影响,`artifact.tactical-design` 或嵌入式 Tactical DDD Check 引用必须为当前版本)
|
|
42
42
|
AND blocking edges 全部关闭
|
|
43
43
|
AND implementation repo/branch/CI/test/rollback 已明确
|
|
44
|
+
AND `work-unit.ticket-decomposition` 已返回 `completed`,且其 `ticket_decomposition_result_ref` 证据可读取
|
|
45
|
+
AND `vertical_slice_ticket_ref` 指向 `docs/.scratch/<feature>/issues/` 下的垂直切片 Ticket
|
|
46
|
+
AND `vertical_slice_ticket_kind=vertical-slice-ticket` 且 `vertical_slice_ticket_role=ready-for-agent`
|
|
47
|
+
AND `vertical_slice_ticket_ref` 不得指向 `parent-ticket.md`
|
|
44
48
|
AND Slice Implementation Contract 已由生命周期编排器批准并持久化
|
|
49
|
+
AND Slice Implementation Contract 的 `ticket_ref` 与 `vertical_slice_ticket_ref` 完全一致
|
|
45
50
|
AND 当前工作单元消费的 contract_id/version 与最新批准版本一致
|
|
46
51
|
AND Backend Slice Implementation Contract(后端适用)和 Build Architecture Checklist 已完成
|
|
47
52
|
AND backend 影响且 scaffold_status=required 时,原型确认后的脚手架策略、`yss-backend-scaffold-parent` 基线、Wrapper 验证和 Router 重编译均已完成
|
|
@@ -53,7 +58,7 @@ AND UI 影响切片的前端实现还原计划已通过 schema 校验、`templat
|
|
|
53
58
|
|
|
54
59
|
发布前还必须满足所有已触发门禁均为 `approved` 或 `not-applicable`;UI 影响切片必须额外通过 `gate.frontend-implementation-verified`,不能只凭 fresh verification 和回滚点放行。
|
|
55
60
|
|
|
56
|
-
用户显式运行 `to-tickets` 后,垂直切片初始 Ticket 状态固定为 `ready-for-human
|
|
61
|
+
用户显式运行 `to-tickets` 后,垂直切片初始 Ticket 状态固定为 `ready-for-human`。原生路径执行 `work-unit.ticket-decomposition` 时同样必须产生等价的垂直切片和 `Workflow Execution Result` 证据。只有 `yss-product-lifecycle` 复算上述公式全部为真后,才能把它提升为 `ready-for-agent`;生命周期不会自动调用 `to-tickets`,但不得跳过 Ticket 正式化工作单元。其默认标签也不参与该裁决。
|
|
57
62
|
|
|
58
63
|
## Review 与 Git 授权状态
|
|
59
64
|
|
|
@@ -13,20 +13,21 @@ description: Use when a YSS vertical slice is entering implementation, spans mul
|
|
|
13
13
|
|
|
14
14
|
## 编译循环
|
|
15
15
|
|
|
16
|
-
1. 判断 frontend/backend/API/data/cross-repo 影响,并逐项填写 backend `component_impacts`。
|
|
16
|
+
1. 判断 frontend/backend/API/data/domain/cross-repo 影响,并逐项填写 backend `component_impacts`;命中聚合、状态机、不变量、一致性、Domain Event、Gateway 或持久化映射时加入 `yss-tactical-design`。
|
|
17
17
|
2. 检查工程存在性和核心/长尾 skill 可用性。
|
|
18
18
|
3. 选择主 skill,并按 [router-contract.yaml](references/router-contract.yaml) 计算强制依赖闭包。
|
|
19
19
|
4. 为切片生成基线合同;为当前行为生成工作单元增量路由。
|
|
20
20
|
5. 选择 `behavior-tdd` 或 `controlled-generation`。
|
|
21
21
|
6. 输出 `draft`、`blocked` 或 `ready-for-lifecycle-review`,交生命周期编排器核验和持久化。
|
|
22
22
|
|
|
23
|
-
合同结构见 [slice-implementation-contract.md](references/slice-implementation-contract.md),专项返回协议见 [yss-skill-execution-result.md](references/yss-skill-execution-result.md)
|
|
23
|
+
合同结构见 [slice-implementation-contract.md](references/slice-implementation-contract.md),专项返回协议见 [yss-skill-execution-result.md](references/yss-skill-execution-result.md)。前端、后端和测试子任务必须由生命周期主控从批准的 Slice Contract 编译任务包;任务包 schema 为 `docs/process/schemas/subagent-task-package.schema.json`,技能列表必须来自 `taskPackageDefaults`,不能由 Router 或执行 Agent 另行手写。
|
|
24
24
|
|
|
25
25
|
## 硬规则
|
|
26
26
|
|
|
27
27
|
- Router 不得输出 `approved`、`ready-for-agent` 或 `completed`。
|
|
28
28
|
- UI 影响缺少正式原型确认时,不得路由页面实现。
|
|
29
29
|
- Repository/数据模型影响缺少数据架构时,不得路由持久化实现。
|
|
30
|
+
- 领域影响缺少批准且版本当前的 tactical-design contract 时,不得路由 Domain 实现;无领域影响必须记录 `not-applicable`。
|
|
30
31
|
- API 变化必须回到生命周期 Draft/Review/Freeze;半成品 backend 不得冒充稳定 source of truth。
|
|
31
32
|
- 后端端到端切片必须包含 Application;对象/POJO 影响按契约自动补 `mapstruct`、`lombok`、`alibaba-java-code-style`。
|
|
32
33
|
- Harness 内实现路径必须落在 `apps/backend/<project>/` 或 `apps/frontend/<project>/` 的具体项目目录;`apps/backend/`、`apps/frontend/` 只能作为容器,`app/backend/`、`app/frontend/` 及其子路径一律阻断。外部实现仓库使用其登记的真实项目根路径。`git-submodule` 使用 `implementation_path_policy: git-submodule-harness-apps`,空 gitlink、detached HEAD 或 `--force` 覆盖挂载点不得脚手架;`inspectWorkingTreeScope.writable` 必须为显式布尔值。
|
|
@@ -36,6 +37,7 @@ description: Use when a YSS vertical slice is entering implementation, spans mul
|
|
|
36
37
|
- 脚手架合同在 Router 阶段只能是 `draft` / `ready-for-lifecycle-review` / `blocked`;只有生命周期编排器可以把已持久化脚手架合同标记为 `approved`。脚手架合同只覆盖业务代码前的工程骨架工作单元;生成、基线校验和 Router 重编译完成后,它不能替代脚手架后的 Slice Implementation Contract。
|
|
37
38
|
- 脚手架输出消费批准的脚手架合同;脚手架后的所有生成后端代码都必须绑定当前批准且版本当前的 Slice Implementation Contract、主 YSS skill、依赖闭包、允许写路径、预期证据和 YSS Skill Execution Result。打印命令、`./mvnw validate` 单项通过或脚手架成功不能替代合同批准;生成范围从机械内容变成业务行为时触发完整重路由。
|
|
38
39
|
- 专项结果中的越界路径、缺失证据、`drift`、`violation` 或 `new_impacts` 必须阻断或重路由。
|
|
40
|
+
- 前后端子任务必须使用同一 `contract_id/contract_version`,并在任务包中记录 `role_id`、`runtime_id`、`execution_state`、`allowed_write_paths`、`downstream_consumers` 和 `convergence_ref`;版本不一致或汇合引用缺失时输出 `blocked`。
|
|
39
41
|
- 长尾 skill 不可用时显式 `blocked`,不得用通用知识假装已应用 YSS 规范。
|
|
40
42
|
|
|
41
43
|
## 三级路由
|
|
@@ -66,11 +66,11 @@ exclusive_flags:
|
|
|
66
66
|
|
|
67
67
|
slice_contract_required:
|
|
68
68
|
root: [schema_version, contract_id, contract_version, slice_id, status, lifecycle_refs, readiness, common, frontend, backend, contract, cross_repo, work_units]
|
|
69
|
-
lifecycle_refs: [spec, ticket, requirement_freeze, low_fidelity_review, prototype_review, high_fidelity_html, prototype_verification, antd_cli_evidence, browser_verification_evidence, prototype_confirmation, openapi_freeze_or_no_impact, architecture_review, data_architecture, engineering_baseline, build_architecture_checklist, implementation_repository, frontend_repository, backend_repository, maven_wrapper]
|
|
69
|
+
lifecycle_refs: [spec, ticket, requirement_freeze, low_fidelity_review, prototype_review, high_fidelity_html, prototype_verification, antd_cli_evidence, browser_verification_evidence, prototype_confirmation, openapi_freeze_or_no_impact, architecture_review, data_architecture, tactical_design, engineering_baseline, build_architecture_checklist, implementation_repository, frontend_repository, backend_repository, maven_wrapper]
|
|
70
70
|
readiness: [blockers, stale_inputs, not_applicable]
|
|
71
71
|
common: [impacted_areas, implementation_path_policy, project_roots, required_skills, optional_skills, unavailable_skills, allowed_write_paths, forbidden_patterns, expected_evidence_files, verification_commands, human_review_points, full_reroute_triggers]
|
|
72
72
|
frontend: [status, required_skills, approved_prototype_ref, state_matrix_ref, allowed_write_paths, component_test_seams, e2e_paths]
|
|
73
|
-
backend: [status, affected_layers, component_impacts, required_skills, application_boundary, transaction_boundary, persistence_strategy, allowed_write_paths, forbidden_patterns, expected_evidence_files, seam_deferred, verification_commands]
|
|
73
|
+
backend: [status, affected_layers, component_impacts, required_skills, application_boundary, transaction_boundary, persistence_strategy, allowed_write_paths, forbidden_patterns, expected_evidence_files, seam_deferred, verification_commands, tactical_ddd]
|
|
74
74
|
contract: [api_impact, freeze_ref, no_api_impact_ref, generated_clients, contract_tests, regeneration_commands]
|
|
75
75
|
cross_repo: [repositories, delivery_order, integration_verification, rollback_order]
|
|
76
76
|
|
|
@@ -91,6 +91,7 @@ lifecycle_ref_by_readiness:
|
|
|
91
91
|
openapi_freeze: openapi_freeze_or_no_impact
|
|
92
92
|
no_api_impact_record: openapi_freeze_or_no_impact
|
|
93
93
|
data_architecture: data_architecture
|
|
94
|
+
tactical_design: tactical_design
|
|
94
95
|
engineering_baseline: engineering_baseline
|
|
95
96
|
backend_repository: backend_repository
|
|
96
97
|
maven_wrapper: maven_wrapper
|
|
@@ -135,6 +136,10 @@ applicable_subcontract_nonempty:
|
|
|
135
136
|
backend:
|
|
136
137
|
scalar: [application_boundary, transaction_boundary, persistence_strategy]
|
|
137
138
|
array: [affected_layers, required_skills, allowed_write_paths, forbidden_patterns, expected_evidence_files, verification_commands]
|
|
139
|
+
conditional_tactical_ddd:
|
|
140
|
+
when: [aggregate-impact, state-machine-impact, invariant-impact, consistency-impact, domain-event-impact, gateway-boundary-impact, persistence-mapping-impact]
|
|
141
|
+
scalar: [tactical_design_ref, tactical_design_version, gateway_boundary_ref]
|
|
142
|
+
array: [aggregate_refs, invariant_refs, state_behavior_refs, domain_test_seams, application_test_seams]
|
|
138
143
|
contract_api:
|
|
139
144
|
scalar: [freeze_ref]
|
|
140
145
|
array: [contract_tests]
|
|
@@ -148,8 +153,12 @@ dependency_closure:
|
|
|
148
153
|
always: [yss-backend-scaffold-parent, alibaba-java-code-style]
|
|
149
154
|
yss-domain:
|
|
150
155
|
always: [alibaba-java-code-style]
|
|
151
|
-
when_modeling: [domain-modeling]
|
|
156
|
+
when_modeling: [domain-modeling, yss-tactical-design]
|
|
152
157
|
when_pojo: [lombok]
|
|
158
|
+
yss-tactical-design:
|
|
159
|
+
always: [domain-modeling]
|
|
160
|
+
when_api_impact: [yss-openapi-draft-review]
|
|
161
|
+
when_data_impact: [yss-repository]
|
|
153
162
|
yss-application:
|
|
154
163
|
always: [alibaba-java-code-style]
|
|
155
164
|
when_conversion: [mapstruct, lombok]
|
|
@@ -218,6 +227,12 @@ full_reroute_triggers:
|
|
|
218
227
|
- data-model-impact
|
|
219
228
|
- new-write-path
|
|
220
229
|
- new-repository
|
|
230
|
+
- aggregate-impact
|
|
231
|
+
- invariant-impact
|
|
232
|
+
- consistency-impact
|
|
233
|
+
- domain-event-impact
|
|
234
|
+
- gateway-boundary-impact
|
|
235
|
+
- persistence-mapping-impact
|
|
221
236
|
- new-required-skill
|
|
222
237
|
- not-applicable-invalidated
|
|
223
238
|
- architecture-drift
|
|
@@ -25,6 +25,7 @@ slice_contract:
|
|
|
25
25
|
architecture_review:
|
|
26
26
|
data_architecture:
|
|
27
27
|
engineering_baseline:
|
|
28
|
+
tactical_design:
|
|
28
29
|
build_architecture_checklist:
|
|
29
30
|
implementation_repository:
|
|
30
31
|
frontend_repository:
|
|
@@ -70,6 +71,24 @@ slice_contract:
|
|
|
70
71
|
application_boundary:
|
|
71
72
|
transaction_boundary:
|
|
72
73
|
persistence_strategy:
|
|
74
|
+
tactical_design_ref:
|
|
75
|
+
tactical_design_version:
|
|
76
|
+
aggregate_refs: []
|
|
77
|
+
invariant_refs: []
|
|
78
|
+
state_behavior_refs: []
|
|
79
|
+
gateway_boundary_ref:
|
|
80
|
+
domain_test_seams: []
|
|
81
|
+
application_test_seams: []
|
|
82
|
+
tactical_ddd:
|
|
83
|
+
status: not-applicable
|
|
84
|
+
tactical_design_ref:
|
|
85
|
+
tactical_design_version:
|
|
86
|
+
aggregate_refs: []
|
|
87
|
+
invariant_refs: []
|
|
88
|
+
state_behavior_refs: []
|
|
89
|
+
gateway_boundary_ref:
|
|
90
|
+
domain_test_seams: []
|
|
91
|
+
application_test_seams: []
|
|
73
92
|
allowed_write_paths: []
|
|
74
93
|
forbidden_patterns: []
|
|
75
94
|
expected_evidence_files: []
|
|
@@ -87,7 +106,43 @@ slice_contract:
|
|
|
87
106
|
delivery_order: []
|
|
88
107
|
integration_verification: []
|
|
89
108
|
rollback_order: []
|
|
90
|
-
work_units:
|
|
109
|
+
work_units:
|
|
110
|
+
- id: slice-frontend
|
|
111
|
+
role_id: role.frontend-engineer
|
|
112
|
+
runtime_id: runtime.skill-projection
|
|
113
|
+
execution_state: Worker
|
|
114
|
+
workflow_status: not-started
|
|
115
|
+
task_package_ref:
|
|
116
|
+
contract_id: # must equal slice_contract.contract_id
|
|
117
|
+
contract_version: # must equal slice_contract.contract_version
|
|
118
|
+
downstream_consumers: []
|
|
119
|
+
convergence_ref:
|
|
120
|
+
work_unit:
|
|
121
|
+
behavior:
|
|
122
|
+
primary_skill:
|
|
123
|
+
supporting_skills: []
|
|
124
|
+
tdd_mode: behavior-tdd
|
|
125
|
+
allowed_write_paths: []
|
|
126
|
+
expected_evidence: []
|
|
127
|
+
verification_commands: []
|
|
128
|
+
- id: slice-backend
|
|
129
|
+
role_id: role.backend-engineer
|
|
130
|
+
runtime_id: runtime.skill-projection
|
|
131
|
+
execution_state: Worker
|
|
132
|
+
workflow_status: not-started
|
|
133
|
+
task_package_ref:
|
|
134
|
+
contract_id:
|
|
135
|
+
contract_version:
|
|
136
|
+
downstream_consumers: []
|
|
137
|
+
convergence_ref:
|
|
138
|
+
work_unit:
|
|
139
|
+
behavior:
|
|
140
|
+
primary_skill:
|
|
141
|
+
supporting_skills: []
|
|
142
|
+
tdd_mode: behavior-tdd
|
|
143
|
+
allowed_write_paths: []
|
|
144
|
+
expected_evidence: []
|
|
145
|
+
verification_commands: []
|
|
91
146
|
```
|
|
92
147
|
|
|
93
148
|
工作单元:
|
|
@@ -112,3 +167,5 @@ work_unit:
|
|
|
112
167
|
```
|
|
113
168
|
|
|
114
169
|
`controlled_generation` 仅在 `tdd_mode: controlled-generation` 时必填;其他模式标记 `not-applicable`。明确写入需求的权限业务行为仍使用 `behavior-tdd`;API schema 与 database schema 分别触发契约或数据架构回退,不得用一个含糊的 schema 类型决定路线。
|
|
170
|
+
|
|
171
|
+
`work_units` 中的前端、后端和测试任务是切片级子任务,不是新的生命周期阶段。每个子任务必须引用独立任务包;任务包只能消费同一份已批准且版本当前的 Slice Contract。`workflow_status` 追踪执行过程,不能替代生命周期状态;`contract_id` 或 `contract_version` 不一致时必须阻断并回到 Router。
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: yss-stage-decision
|
|
3
|
+
description: 编排 Discovery 到 Spec 入口的阶段决策与 DDD 战略设计;当需求、领域边界、统一语言或下游影响尚未稳定时使用。
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# YSS Stage Decision
|
|
7
|
+
|
|
8
|
+
`yss-stage-decision` 是由 `yss-product-lifecycle` 调度的上游决策技能空间,负责把需求、产品、商务输入和 DDD 战略设计结果整理成可审查、可版本化、可被下游消费的阶段决策包。它不替代生命周期主控,也不生成产品代码、原型、OpenAPI 或垂直切片 Ticket。
|
|
9
|
+
|
|
10
|
+
## 适用边界
|
|
11
|
+
|
|
12
|
+
- 适用于 `project-instance` 的 Discovery → Spec 入口。
|
|
13
|
+
- `template-source` 只维护本技能、Schema、验证器和合成 Fixture,不生成具体产品领域资产。
|
|
14
|
+
- DDD 工作单元只做子域、限界上下文、Context Map、统一语言、关键场景、事件、核心领域概念候选和业务不变量。
|
|
15
|
+
- Entity、Aggregate、Repository、Java 类、数据库表和 OpenAPI Freeze 留给下游工作单元。
|
|
16
|
+
|
|
17
|
+
## 执行顺序
|
|
18
|
+
|
|
19
|
+
1. 读取 `yss-project.yaml`、`CONTEXT.md`、既有 Discovery/Spec、ADR 和父 Ticket/checkpoint。
|
|
20
|
+
2. 分离事实、决策、假设、约束和未决项;技术事实走 `research`,市场/竞品事实走 `competitive-intelligence`。
|
|
21
|
+
3. 从业务场景、事件、规则、责任人和失败路径识别子域及限界上下文,不从数据库表或调用链直接反推边界。
|
|
22
|
+
4. 为每个上下文建立本地统一语言;为跨上下文关系记录语义上游/下游、业务决策权、技术传输方向和翻译责任。
|
|
23
|
+
5. 记录核心领域概念候选,不提前锁定 Entity 或 Aggregate。
|
|
24
|
+
6. 生成 `domain_strategy` 和 `stage_decision_package`,绑定版本、digest、证据和下游影响映射。
|
|
25
|
+
7. 运行 Schema、引用、语义一致性和传播验证;发现关键冲突时返回 `blocked`,不得生成 `approved` 包。
|
|
26
|
+
|
|
27
|
+
## 语义方向规则
|
|
28
|
+
|
|
29
|
+
`semantic_upstream` 是拥有业务规则、决策语义或权威模型的一方;`semantic_downstream` 是消费、适配或依赖该语义的一方。二者不等于 HTTP、事件或数据库的技术方向。每条 Context Map 关系必须独立记录 `transport_direction` 和 `translation_responsibility`;同一对上下文可以存在多条相反方向的语义边。
|
|
30
|
+
|
|
31
|
+
## 产物与批准
|
|
32
|
+
|
|
33
|
+
- DDD 资产是事实源,阶段决策包只通过 `domain_strategy_ref` 引用它们。
|
|
34
|
+
- `stage_decision_package` 必须经过 `draft → ready-for-human → approved`;起草者不得自签。
|
|
35
|
+
- 建议门禁为 `gate.domain-strategy-approved` 和 `gate.stage-decision-package-approved`,实际状态由 `yss-product-lifecycle` 维护;阶段包批准引用必须通过 `scripts/verify-approval-record`,不得用不可读路径或聊天确认替代。
|
|
36
|
+
- 下游只能消费批准且版本当前的包;发现语义冲突返回 `drift` / `new_impacts`,不得静默修改上游。
|
|
37
|
+
|
|
38
|
+
## 结果合同
|
|
39
|
+
|
|
40
|
+
返回标准 `Workflow Execution Result`,至少包含 `work_unit`、`workflow_reference`、`result`、`evidence_refs`、`changed_artifacts`、`new_impacts`、`stale_candidates`、`next_route` 和 `blocking_signals`。`blocked` 必须包含冲突、责任人、恢复条件和下一工作单元。
|
|
41
|
+
|
|
42
|
+
## 禁止事项
|
|
43
|
+
|
|
44
|
+
- 不把阶段包当作第二套领域事实源。
|
|
45
|
+
- 不按数据库、微服务、菜单或 HTTP 调用方向自动划分上下文。
|
|
46
|
+
- 不把同名术语强行合并为全局概念。
|
|
47
|
+
- 不在战略设计阶段生成 Entity、Aggregate、Repository、生产代码或 API 契约。
|
|
48
|
+
- 不把模板 Fixture 当作具体项目的业务事实。
|
|
49
|
+
|
|
50
|
+
详细合同、字段和验证规则见 `references/domain-strategy-contract.md`、`references/stage-decision-package-contract.md` 与 `references/validation-rules.md`。机器可读合同分别为 `references/domain-strategy.schema.json` 和 `references/stage-decision-package.schema.json`;对应验证器为 `scripts/validate-domain-strategy.mjs` 与 `scripts/validate-stage-decision-package.mjs`。
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# DDD 战略设计合同
|
|
2
|
+
|
|
3
|
+
## 顶层结构
|
|
4
|
+
|
|
5
|
+
机器可读合同使用 `references/domain-strategy.schema.json`。顶层必须包含:
|
|
6
|
+
|
|
7
|
+
- `schema_version`、`domain_strategy_id`、`domain_version`、`status`;
|
|
8
|
+
- `contexts`、`subdomains`、`relationships`、`scenarios`;
|
|
9
|
+
- `concept_candidates`、`invariants`、`terminology_refs`;
|
|
10
|
+
- `downstream_mapping`、`evidence_refs`、`approval`。
|
|
11
|
+
|
|
12
|
+
## 上下文
|
|
13
|
+
|
|
14
|
+
每个上下文声明 `context_id`、职责边界、非职责、子域分类、模型所有者、关键场景和本地词汇引用。`context_id` 是稳定身份,不得使用代码模块、数据库 schema 或菜单路径替代。
|
|
15
|
+
|
|
16
|
+
## 关系
|
|
17
|
+
|
|
18
|
+
关系必须声明 `relationship_pattern`、`semantic_upstream`、`semantic_downstream`、`business_authority`、`model_change_impact`、`transport_direction` 和 `translation_responsibility`。语义方向与技术方向可以不同;关系模式只能使用合同中列出的 DDD 模式。
|
|
19
|
+
|
|
20
|
+
## 核心概念
|
|
21
|
+
|
|
22
|
+
使用 `domain_concept_candidate` 表达战略阶段的核心概念候选,记录身份特征、生命周期、不变量引用、可能的战术角色和置信度。不得在该合同中把概念直接批准为 Entity 或 Aggregate Root。
|
|
23
|
+
|
|
24
|
+
## 阶段决策包
|
|
25
|
+
|
|
26
|
+
阶段包应通过 `domain_strategy_ref` 引用 DDD 合同的当前版本和 digest,并使用 `domain_to_downstream_mapping` 描述领域变化对 Spec、设计、API、数据、Ticket 和测试 seam 的传播。
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://yss.local/schemas/domain-strategy-v1.json",
|
|
4
|
+
"title": "YSS DDD Strategic Design",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"required": ["schema_version", "domain_strategy_id", "domain_version", "status", "contexts", "subdomains", "relationships", "scenarios", "concept_candidates", "invariants", "terminology_refs", "downstream_mapping", "evidence_refs", "approval"],
|
|
7
|
+
"properties": {
|
|
8
|
+
"schema_version": {"const": 1},
|
|
9
|
+
"domain_strategy_id": {"type": "string", "pattern": "^domain-strategy\\.[a-z0-9][a-z0-9-]*$"},
|
|
10
|
+
"domain_version": {"type": "string", "pattern": "^v[0-9]+$"},
|
|
11
|
+
"status": {"enum": ["draft", "ready-for-human", "approved", "stale", "blocked"]},
|
|
12
|
+
"contexts": {"type": "array", "minItems": 1, "items": {"$ref": "#/$defs/context"}},
|
|
13
|
+
"subdomains": {"type": "array", "minItems": 1, "items": {"$ref": "#/$defs/subdomain"}},
|
|
14
|
+
"relationships": {"type": "array", "items": {"$ref": "#/$defs/relationship"}},
|
|
15
|
+
"scenarios": {"type": "array", "minItems": 1, "items": {"$ref": "#/$defs/scenario"}},
|
|
16
|
+
"concept_candidates": {"type": "array", "items": {"$ref": "#/$defs/concept"}},
|
|
17
|
+
"invariants": {"type": "array", "items": {"$ref": "#/$defs/invariant"}},
|
|
18
|
+
"terminology_refs": {"type": "array", "items": {"type": "string", "minLength": 1}},
|
|
19
|
+
"downstream_mapping": {"type": "array", "items": {"$ref": "#/$defs/mapping"}},
|
|
20
|
+
"evidence_refs": {"type": "array", "minItems": 1, "items": {"type": "string", "minLength": 1}},
|
|
21
|
+
"approval": {"$ref": "#/$defs/approval"}
|
|
22
|
+
},
|
|
23
|
+
"$defs": {
|
|
24
|
+
"context": {
|
|
25
|
+
"type": "object",
|
|
26
|
+
"required": ["context_id", "name", "responsibilities", "non_responsibilities", "subdomain_type", "owner", "status"],
|
|
27
|
+
"properties": {
|
|
28
|
+
"context_id": {"type": "string", "pattern": "^[A-Z][A-Za-z0-9]+$"},
|
|
29
|
+
"name": {"type": "string", "minLength": 1},
|
|
30
|
+
"responsibilities": {"type": "array", "minItems": 1, "items": {"type": "string", "minLength": 1}},
|
|
31
|
+
"non_responsibilities": {"type": "array", "items": {"type": "string", "minLength": 1}},
|
|
32
|
+
"subdomain_type": {"enum": ["Core Domain", "Supporting Subdomain", "Generic Subdomain"]},
|
|
33
|
+
"owner": {"type": "string", "minLength": 1},
|
|
34
|
+
"status": {"enum": ["candidate", "confirmed", "stale"]}
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
"subdomain": {
|
|
38
|
+
"type": "object",
|
|
39
|
+
"required": ["subdomain_id", "name", "type", "rationale", "evidence_refs"],
|
|
40
|
+
"properties": {
|
|
41
|
+
"subdomain_id": {"type": "string", "pattern": "^subdomain\\.[a-z0-9][a-z0-9-]*$"},
|
|
42
|
+
"name": {"type": "string", "minLength": 1},
|
|
43
|
+
"type": {"enum": ["Core Domain", "Supporting Subdomain", "Generic Subdomain"]},
|
|
44
|
+
"rationale": {"type": "string", "minLength": 1},
|
|
45
|
+
"evidence_refs": {"type": "array", "minItems": 1, "items": {"type": "string", "minLength": 1}}
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
"relationship": {
|
|
49
|
+
"type": "object",
|
|
50
|
+
"required": ["relationship_id", "from_context", "to_context", "relationship_pattern", "semantic_upstream", "semantic_downstream", "business_authority", "model_change_impact", "transport_direction", "translation_responsibility", "direction_explanation"],
|
|
51
|
+
"properties": {
|
|
52
|
+
"relationship_id": {"type": "string", "pattern": "^relationship\\.[a-z0-9][a-z0-9-]*$"},
|
|
53
|
+
"from_context": {"type": "string", "pattern": "^[A-Z][A-Za-z0-9]+$"},
|
|
54
|
+
"to_context": {"type": "string", "pattern": "^[A-Z][A-Za-z0-9]+$"},
|
|
55
|
+
"relationship_pattern": {"enum": ["Partnership", "Customer/Supplier", "Conformist", "Anti-Corruption Layer", "Open Host Service", "Published Language", "Shared Kernel", "Separate Ways"]},
|
|
56
|
+
"semantic_upstream": {"type": "string", "pattern": "^[A-Z][A-Za-z0-9]+$"},
|
|
57
|
+
"semantic_downstream": {"type": "string", "pattern": "^[A-Z][A-Za-z0-9]+$"},
|
|
58
|
+
"business_authority": {"type": "string", "minLength": 1},
|
|
59
|
+
"model_change_impact": {"type": "string", "minLength": 1},
|
|
60
|
+
"transport_direction": {"type": "string", "minLength": 1},
|
|
61
|
+
"translation_responsibility": {"type": "string", "minLength": 1},
|
|
62
|
+
"direction_explanation": {"type": "string", "minLength": 1}
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
"scenario": {
|
|
66
|
+
"type": "object",
|
|
67
|
+
"required": ["scenario_id", "actor", "preconditions", "commands", "rules", "events", "failure_results", "responsible_context", "consumers", "status"],
|
|
68
|
+
"properties": {
|
|
69
|
+
"scenario_id": {"type": "string", "pattern": "^scenario\\.[a-z0-9][a-z0-9-]*$"},
|
|
70
|
+
"actor": {"type": "string", "minLength": 1},
|
|
71
|
+
"preconditions": {"type": "array", "items": {"type": "string"}},
|
|
72
|
+
"commands": {"type": "array", "minItems": 1, "items": {"type": "string"}},
|
|
73
|
+
"rules": {"type": "array", "minItems": 1, "items": {"type": "string"}},
|
|
74
|
+
"events": {"type": "array", "items": {"type": "string"}},
|
|
75
|
+
"failure_results": {"type": "array", "minItems": 1, "items": {"type": "string"}},
|
|
76
|
+
"responsible_context": {"type": "string", "pattern": "^[A-Z][A-Za-z0-9]+$"},
|
|
77
|
+
"consumers": {"type": "array", "items": {"type": "string", "pattern": "^[A-Z][A-Za-z0-9]+$"}},
|
|
78
|
+
"status": {"enum": ["candidate", "confirmed", "stale"]}
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
"concept": {
|
|
82
|
+
"type": "object",
|
|
83
|
+
"required": ["concept_id", "name", "context_id", "identity_features", "lifecycle", "confidence", "status"],
|
|
84
|
+
"properties": {
|
|
85
|
+
"concept_id": {"type": "string", "pattern": "^domain-concept\\.[a-z0-9][a-z0-9-]*$"},
|
|
86
|
+
"name": {"type": "string", "minLength": 1},
|
|
87
|
+
"context_id": {"type": "string", "pattern": "^[A-Z][A-Za-z0-9]+$"},
|
|
88
|
+
"identity_features": {"type": "array", "minItems": 1, "items": {"type": "string"}},
|
|
89
|
+
"lifecycle": {"type": "array", "minItems": 1, "items": {"type": "string"}},
|
|
90
|
+
"invariant_refs": {"type": "array", "items": {"type": "string"}},
|
|
91
|
+
"possible_tactical_role": {"type": "string"},
|
|
92
|
+
"confidence": {"enum": ["low", "medium", "high"]},
|
|
93
|
+
"status": {"enum": ["candidate", "confirmed", "stale"]}
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
"invariant": {
|
|
97
|
+
"type": "object",
|
|
98
|
+
"required": ["invariant_id", "statement", "responsible_context", "scenario_refs", "verification_method"],
|
|
99
|
+
"properties": {
|
|
100
|
+
"invariant_id": {"type": "string", "pattern": "^invariant\\.[a-z0-9][a-z0-9-]*$"},
|
|
101
|
+
"statement": {"type": "string", "minLength": 1},
|
|
102
|
+
"responsible_context": {"type": "string", "pattern": "^[A-Z][A-Za-z0-9]+$"},
|
|
103
|
+
"scenario_refs": {"type": "array", "minItems": 1, "items": {"type": "string"}},
|
|
104
|
+
"verification_method": {"type": "string", "minLength": 1}
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
"mapping": {
|
|
108
|
+
"type": "object",
|
|
109
|
+
"required": ["domain_change", "impacts", "propagation", "reapproval_condition"],
|
|
110
|
+
"properties": {
|
|
111
|
+
"domain_change": {"type": "string", "minLength": 1},
|
|
112
|
+
"impacts": {"type": "array", "minItems": 1, "items": {"type": "string"}},
|
|
113
|
+
"propagation": {"enum": ["direct", "transitive", "stale"]},
|
|
114
|
+
"reapproval_condition": {"type": "string", "minLength": 1}
|
|
115
|
+
}
|
|
116
|
+
},
|
|
117
|
+
"approval": {
|
|
118
|
+
"type": "object",
|
|
119
|
+
"required": ["approval_ref", "approver", "persisted_ref", "current_version"],
|
|
120
|
+
"properties": {
|
|
121
|
+
"approval_ref": {"type": "string", "minLength": 1},
|
|
122
|
+
"approver": {"type": "string", "minLength": 1},
|
|
123
|
+
"persisted_ref": {"type": "string", "minLength": 1},
|
|
124
|
+
"current_version": {"type": "string", "pattern": "^v[0-9]+$"}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
}
|