create-yss-spec 2.2.3 → 2.2.4
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 +5 -5
- 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 +5 -5
- 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 +5 -5
- 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 +5 -5
- 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 +5 -5
- 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 +5 -5
- 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 +5 -5
- 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 +5 -5
- 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 +2 -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 +35 -3
- package/template.snapshot.json +4 -4
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schema_version": 1,
|
|
3
3
|
"registry_id": "yss.lifecycle",
|
|
4
|
-
"semantic_sha256": "
|
|
4
|
+
"semantic_sha256": "49ca553e83efb9cffae220d9e6fca434b1d27096126a640f8f8e172e048808df",
|
|
5
5
|
"published_ids": [
|
|
6
6
|
"artifact.architecture-review",
|
|
7
7
|
"artifact.data-architecture",
|
|
8
8
|
"artifact.discovery-record",
|
|
9
|
+
"artifact.domain-strategy",
|
|
9
10
|
"artifact.engineering-baseline",
|
|
10
11
|
"artifact.frontend-implementation-plan",
|
|
11
12
|
"artifact.frontend-implementation-verification",
|
|
@@ -24,7 +25,9 @@
|
|
|
24
25
|
"artifact.slice-implementation-contract",
|
|
25
26
|
"artifact.spec",
|
|
26
27
|
"artifact.spec-delta",
|
|
28
|
+
"artifact.stage-decision-package",
|
|
27
29
|
"artifact.state-matrix",
|
|
30
|
+
"artifact.tactical-design",
|
|
28
31
|
"artifact.vertical-slice-ticket",
|
|
29
32
|
"evidence.antd-cli-validation",
|
|
30
33
|
"evidence.approval-record",
|
|
@@ -32,6 +35,7 @@
|
|
|
32
35
|
"evidence.checkpoint-and-rollback",
|
|
33
36
|
"evidence.contract-approval",
|
|
34
37
|
"evidence.design-review-result",
|
|
38
|
+
"evidence.domain-strategy-review",
|
|
35
39
|
"evidence.fresh-verification",
|
|
36
40
|
"evidence.frontend-implementation-verification",
|
|
37
41
|
"evidence.impact-assessment",
|
|
@@ -40,9 +44,12 @@
|
|
|
40
44
|
"evidence.prototype-confirmation",
|
|
41
45
|
"evidence.prototype-review-result",
|
|
42
46
|
"evidence.repository-identity-check",
|
|
47
|
+
"evidence.stage-decision-package",
|
|
48
|
+
"evidence.tactical-design-review",
|
|
43
49
|
"evidence.yss-skill-execution-result",
|
|
44
50
|
"gate.architecture-reviewed",
|
|
45
51
|
"gate.design-reviewed",
|
|
52
|
+
"gate.domain-strategy-approved",
|
|
46
53
|
"gate.engineering-baseline-accepted",
|
|
47
54
|
"gate.frontend-implementation-verified",
|
|
48
55
|
"gate.openapi-draft-reviewed",
|
|
@@ -54,6 +61,7 @@
|
|
|
54
61
|
"gate.slice-contract-approved",
|
|
55
62
|
"gate.slice-ready-for-agent",
|
|
56
63
|
"gate.spec-baseline-approved",
|
|
64
|
+
"gate.stage-decision-package-approved",
|
|
57
65
|
"gate.user-confirmation",
|
|
58
66
|
"stage.discovery",
|
|
59
67
|
"stage.entry-triage",
|
|
@@ -67,6 +75,7 @@
|
|
|
67
75
|
"work-unit.code-review",
|
|
68
76
|
"work-unit.discovery-opportunity",
|
|
69
77
|
"work-unit.discovery-requirements",
|
|
78
|
+
"work-unit.domain-strategy-design",
|
|
70
79
|
"work-unit.entry-triage",
|
|
71
80
|
"work-unit.fresh-verification",
|
|
72
81
|
"work-unit.independent-review",
|
|
@@ -80,6 +89,7 @@
|
|
|
80
89
|
"work-unit.slice-implementation",
|
|
81
90
|
"work-unit.spec-synthesis",
|
|
82
91
|
"work-unit.ssot-update",
|
|
92
|
+
"work-unit.stage-decision",
|
|
83
93
|
"work-unit.technical-analysis",
|
|
84
94
|
"work-unit.ticket-decomposition",
|
|
85
95
|
"work-unit.template-snapshot-build"
|
|
@@ -48,6 +48,15 @@ evidence:
|
|
|
48
48
|
- id: evidence.impact-assessment
|
|
49
49
|
name: 影响面分析记录
|
|
50
50
|
description: 受影响仓库、资产、风险与最近可信阶段。
|
|
51
|
+
- id: evidence.domain-strategy-review
|
|
52
|
+
name: DDD 战略设计评审证据
|
|
53
|
+
description: 子域、限界上下文、统一语言、Context Map、场景和不变量的结构化评审结果。
|
|
54
|
+
- id: evidence.tactical-design-review
|
|
55
|
+
name: DDD 战术设计评审证据
|
|
56
|
+
description: 聚合、Entity、Value Object、不变量、状态机、一致性、Gateway 与 API 隔离的结构化评审结果。
|
|
57
|
+
- id: evidence.stage-decision-package
|
|
58
|
+
name: 阶段决策包验证证据
|
|
59
|
+
description: 阶段决策包的 Schema、引用、语义一致性、影响传播和下游消费验证结果。
|
|
51
60
|
- id: evidence.maintenance-intensity-checkpoint
|
|
52
61
|
name: 模板维护强度 checkpoint
|
|
53
62
|
description: template-source 变更的 L1 / L2 / L3 分级、触发项、最低验证证据、review 模式和升级记录。
|
|
@@ -97,6 +106,17 @@ gates:
|
|
|
97
106
|
stage: stage.entry-triage
|
|
98
107
|
trigger: 每次进入流程。
|
|
99
108
|
evidence: [evidence.repository-identity-check]
|
|
109
|
+
- id: gate.domain-strategy-approved
|
|
110
|
+
name: DDD 战略设计批准
|
|
111
|
+
stage: stage.discovery
|
|
112
|
+
trigger: 存在 DDD 战略设计影响或需要确定领域边界、统一语言和核心规则。
|
|
113
|
+
evidence: [evidence.domain-strategy-review, evidence.approval-record]
|
|
114
|
+
- id: gate.stage-decision-package-approved
|
|
115
|
+
name: 阶段决策包批准
|
|
116
|
+
stage: stage.discovery
|
|
117
|
+
trigger: Discovery 到 Spec 入口需要稳定的阶段决策合同。
|
|
118
|
+
evidence: [evidence.stage-decision-package, evidence.approval-record]
|
|
119
|
+
requires_gates: [gate.domain-strategy-approved]
|
|
100
120
|
- id: gate.spec-baseline-approved
|
|
101
121
|
name: Spec 基线批准
|
|
102
122
|
stage: stage.spec-architecture
|
|
@@ -169,6 +189,14 @@ artifacts:
|
|
|
169
189
|
name: 影响面分析
|
|
170
190
|
stage: stage.entry-triage
|
|
171
191
|
trigger: 每次变更。
|
|
192
|
+
- id: artifact.domain-strategy
|
|
193
|
+
name: DDD 战略设计
|
|
194
|
+
stage: stage.discovery
|
|
195
|
+
trigger: 新产品/模块、跨上下文功能、统一语言冲突、服务边界或核心规则变化。
|
|
196
|
+
- id: artifact.stage-decision-package
|
|
197
|
+
name: 阶段决策包
|
|
198
|
+
stage: stage.discovery
|
|
199
|
+
trigger: Discovery 到 Spec 入口需要结构化上游决策。
|
|
172
200
|
- id: artifact.discovery-record
|
|
173
201
|
name: Discovery 记录
|
|
174
202
|
stage: stage.discovery
|
|
@@ -229,6 +257,10 @@ artifacts:
|
|
|
229
257
|
name: 架构审查记录
|
|
230
258
|
stage: stage.system-data-engineering
|
|
231
259
|
trigger: 高风险或跨边界变化。
|
|
260
|
+
- id: artifact.tactical-design
|
|
261
|
+
name: DDD 战术设计
|
|
262
|
+
stage: stage.system-data-engineering
|
|
263
|
+
trigger: 聚合边界、状态机、一致性或持久化映射复杂到无法在系统概要设计的 Tactical DDD Check 中清楚表达。
|
|
232
264
|
- id: artifact.spec-delta
|
|
233
265
|
name: Spec Delta
|
|
234
266
|
stage: stage.spec-architecture
|
|
@@ -319,6 +351,18 @@ work_units:
|
|
|
319
351
|
input: 机会结论、用户反馈和领域词汇。
|
|
320
352
|
output: 用户、MVP、非目标、成功标准、测试 seam 和未决项。
|
|
321
353
|
completion: frontier 清空;用户确认;无 runnable blocker。
|
|
354
|
+
- id: work-unit.domain-strategy-design
|
|
355
|
+
name: DDD 战略设计
|
|
356
|
+
scope: project-instance
|
|
357
|
+
input: 已澄清的业务场景、领域词汇、约束和现有上下文。
|
|
358
|
+
output: 子域、限界上下文、Context Map、统一语言、事件、核心领域概念候选和不变量。
|
|
359
|
+
completion: 边界、语义方向、规则所有权和关键场景可审查;无未解释冲突。
|
|
360
|
+
- id: work-unit.stage-decision
|
|
361
|
+
name: 阶段决策包综合
|
|
362
|
+
scope: project-instance
|
|
363
|
+
input: Discovery、DDD 战略设计、产品和商务输入。
|
|
364
|
+
output: 带版本、digest、证据和下游映射的阶段决策包。
|
|
365
|
+
completion: 必填字段、引用、影响面和下游消费验证通过;批准门禁完成。
|
|
322
366
|
- id: work-unit.spec-synthesis
|
|
323
367
|
name: Spec 综合
|
|
324
368
|
scope: project-instance
|
|
@@ -335,8 +379,8 @@ work_units:
|
|
|
335
379
|
name: 技术分析与契约冻结
|
|
336
380
|
scope: project-instance
|
|
337
381
|
input: Spec、原型、API/数据/工程影响面。
|
|
338
|
-
output: OpenAPI
|
|
339
|
-
completion: 命中契约已冻结;无 API
|
|
382
|
+
output: OpenAPI、数据架构、Tactical DDD Check、工程基线、架构审查和 Slice 合同草案。
|
|
383
|
+
completion: 命中契约已冻结;无 API 影响有可读记录;命中领域影响时战术模型无未解释冲突;工程基线通过。
|
|
340
384
|
- id: work-unit.ticket-decomposition
|
|
341
385
|
name: 垂直切片 Ticket 正式化
|
|
342
386
|
scope: project-instance
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://yss.dev/schemas/digital-human-task-package.schema.json",
|
|
4
|
+
"title": "YSS Digital Human Task Package",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"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"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"schema_version": { "const": 1 },
|
|
10
|
+
"task_id": { "type": "string", "minLength": 1, "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]*$" },
|
|
11
|
+
"work_unit_id": { "type": "string", "minLength": 1, "pattern": "^work-unit\\.[a-z0-9][a-z0-9-]*$" },
|
|
12
|
+
"actor_id": { "type": "string", "minLength": 1, "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]*$" },
|
|
13
|
+
"role_id": { "type": "string", "pattern": "^role\\.[a-z0-9][a-z0-9-]*$" },
|
|
14
|
+
"runtime_id": { "type": "string", "pattern": "^runtime\\.[a-z0-9][a-z0-9-]*$" },
|
|
15
|
+
"execution_state": { "enum": ["Explorer", "Drafter", "Worker", "Reviewer", "Verifier"] },
|
|
16
|
+
"workflow_status": { "enum": ["not-started", "active", "paused", "resolved", "failed"] },
|
|
17
|
+
"stage_id": { "type": "string", "pattern": "^stage\\.[a-z0-9][a-z0-9-]*$" },
|
|
18
|
+
"feature_id": { "type": "string", "minLength": 1 },
|
|
19
|
+
"skill_source": {
|
|
20
|
+
"type": "object", "additionalProperties": false,
|
|
21
|
+
"required": ["registry_ref", "defaults_ref", "core_skills", "forbidden_skills"],
|
|
22
|
+
"properties": {
|
|
23
|
+
"registry_ref": { "const": "docs/agents/digital-human-roles.yaml" },
|
|
24
|
+
"defaults_ref": { "type": "string", "minLength": 1 },
|
|
25
|
+
"core_skills": { "type": "array", "minItems": 1, "uniqueItems": true, "items": { "type": "string", "minLength": 1 } },
|
|
26
|
+
"forbidden_skills": { "type": "array", "minItems": 1, "uniqueItems": true, "items": { "type": "string", "minLength": 1 } }
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
"contract": {
|
|
30
|
+
"type": "object", "additionalProperties": false,
|
|
31
|
+
"required": ["kind", "contract_id", "contract_version", "status", "contract_ref"],
|
|
32
|
+
"properties": {
|
|
33
|
+
"kind": { "enum": ["lifecycle-work-unit", "slice-implementation", "template-maintenance"] },
|
|
34
|
+
"contract_id": { "type": "string", "minLength": 1 },
|
|
35
|
+
"contract_version": { "type": "integer", "minimum": 1 },
|
|
36
|
+
"status": { "enum": ["issued", "stale", "blocked"] },
|
|
37
|
+
"contract_ref": { "type": "string", "minLength": 1 },
|
|
38
|
+
"lifecycle_ref": { "type": "string", "minLength": 1 },
|
|
39
|
+
"slice_contract_ref": { "type": "string", "minLength": 1 },
|
|
40
|
+
"maintenance_ref": { "type": "string", "minLength": 1 },
|
|
41
|
+
"artifact_refs": { "type": "array", "items": { "type": "string", "minLength": 1 } },
|
|
42
|
+
"gate_refs": { "type": "array", "items": { "type": "string", "minLength": 1 } }
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
"inputs": { "type": "array", "minItems": 1, "items": { "type": "string", "minLength": 1 } },
|
|
46
|
+
"objective": { "type": "string", "minLength": 1 },
|
|
47
|
+
"allowed_write_paths": { "type": "array", "minItems": 1, "uniqueItems": true, "items": { "type": "string", "minLength": 1 } },
|
|
48
|
+
"forbidden_actions": { "type": "array", "minItems": 1, "uniqueItems": true, "items": { "type": "string", "minLength": 1 } },
|
|
49
|
+
"expected_outputs": { "type": "array", "minItems": 1, "items": { "type": "string", "minLength": 1 } },
|
|
50
|
+
"expected_evidence_files": { "type": "array", "minItems": 1, "uniqueItems": true, "items": { "type": "string", "minLength": 1 } },
|
|
51
|
+
"verification_commands": { "type": "array", "minItems": 1, "items": { "type": "string", "minLength": 1 } },
|
|
52
|
+
"verification_results": {
|
|
53
|
+
"type": "array", "items": {
|
|
54
|
+
"type": "object", "additionalProperties": false,
|
|
55
|
+
"required": ["command", "exit_code", "executed_at", "evidence_ref"],
|
|
56
|
+
"properties": {
|
|
57
|
+
"command": { "type": "string", "minLength": 1 },
|
|
58
|
+
"exit_code": { "type": "integer", "minimum": 0 },
|
|
59
|
+
"duration_ms": { "type": "integer", "minimum": 0 },
|
|
60
|
+
"executed_at": { "type": "string", "minLength": 1 },
|
|
61
|
+
"evidence_ref": { "type": "string", "minLength": 1 },
|
|
62
|
+
"stdout_ref": { "type": "string", "minLength": 1 },
|
|
63
|
+
"stderr_ref": { "type": "string", "minLength": 1 }
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
"review_context": {
|
|
68
|
+
"type": "object", "additionalProperties": false, "required": ["implementation_actor_id"],
|
|
69
|
+
"properties": { "implementation_actor_id": { "type": "string", "minLength": 1 }, "implementation_task_id": { "type": "string", "minLength": 1 } }
|
|
70
|
+
},
|
|
71
|
+
"downstream_consumers": { "type": "array", "minItems": 1, "items": { "type": "string", "minLength": 1 } },
|
|
72
|
+
"convergence": {
|
|
73
|
+
"type": "object", "additionalProperties": false, "required": ["parent_work_unit", "convergence_ref"],
|
|
74
|
+
"properties": {
|
|
75
|
+
"parent_work_unit": { "type": "string", "pattern": "^work-unit\\.[a-z0-9][a-z0-9-]*$" },
|
|
76
|
+
"convergence_ref": { "type": "string", "minLength": 1 },
|
|
77
|
+
"conflict_escalation": { "type": "string", "minLength": 1 }
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
"result": {
|
|
81
|
+
"type": "object", "additionalProperties": false,
|
|
82
|
+
"properties": {
|
|
83
|
+
"result_schema": { "const": "workflow-execution-result-v1" },
|
|
84
|
+
"work_unit": { "type": "string", "minLength": 1 },
|
|
85
|
+
"workflow_reference": { "type": "string", "minLength": 1 },
|
|
86
|
+
"result": { "enum": ["completed", "blocked", "needs-human", "failed"] },
|
|
87
|
+
"skill": { "type": "string", "minLength": 1 },
|
|
88
|
+
"changed_files": { "type": "array", "items": { "type": "string", "minLength": 1 } },
|
|
89
|
+
"changed_artifacts": { "type": "array", "items": { "type": "string", "minLength": 1 } },
|
|
90
|
+
"evidence_refs": { "type": "array", "items": { "type": "string", "minLength": 1 } },
|
|
91
|
+
"deferred_seams": { "type": "array", "items": { "type": "string", "minLength": 1 } },
|
|
92
|
+
"drift": { "type": "array", "items": { "type": "string", "minLength": 1 } },
|
|
93
|
+
"violation": { "type": "array", "items": { "type": "string", "minLength": 1 } },
|
|
94
|
+
"new_impacts": { "type": "array", "items": { "type": "string", "minLength": 1 } },
|
|
95
|
+
"stale_candidates": { "type": "array", "items": { "type": "string", "minLength": 1 } },
|
|
96
|
+
"next_route": { "type": ["string", "null"], "minLength": 1 },
|
|
97
|
+
"blocking_signals": { "type": "array", "items": { "type": "string", "minLength": 1 } }
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
"allOf": [
|
|
102
|
+
{ "if": { "properties": { "contract": { "properties": { "kind": { "const": "lifecycle-work-unit" } } } } }, "then": { "required": ["stage_id"], "properties": { "contract": { "required": ["lifecycle_ref"] } } } },
|
|
103
|
+
{ "if": { "properties": { "contract": { "properties": { "kind": { "const": "slice-implementation" } } } } }, "then": { "required": ["stage_id"], "properties": { "contract": { "required": ["slice_contract_ref"] } } } },
|
|
104
|
+
{ "if": { "properties": { "contract": { "properties": { "kind": { "const": "template-maintenance" } } } } }, "then": { "properties": { "contract": { "required": ["maintenance_ref"] } } } },
|
|
105
|
+
{ "if": { "properties": { "execution_state": { "const": "Reviewer" } } }, "then": { "required": ["review_context"] } }
|
|
106
|
+
]
|
|
107
|
+
}
|
|
@@ -6,8 +6,8 @@ Subagent 和其它运行时实例只接收边界清晰的任务包。主控数
|
|
|
6
6
|
|
|
7
7
|
## 任务包
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
凡主控向数字人角色或独立运行时正式派发生命周期工作单元,都必须使用 `docs/process/schemas/digital-human-task-package.schema.json` 定义的任务包,并写明 `task_id`、`work_unit_id`、`actor_id`、数字人角色 ID、`runtime_id`、执行态、工作流状态、从 `docs/agents/digital-human-roles.yaml` 复制的 `core_skills` / `forbidden_skills`(可用 `taskPackageDefaults`)、合同类型和版本、输入资产、目标、允许写路径、禁止事项、验收标准、验证命令及其实际退出码 / 执行时间 / 证据引用、下游消费者和汇合方式。`slice-implementation` 才额外绑定 Slice Implementation Contract;禁止手写第二套技能包;任务包由 `scripts/verify-digital-human-task-package` 校验,`scripts/verify-subagent-task-package` 仅为兼容入口。
|
|
10
10
|
|
|
11
11
|
## 汇合
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
返回结果必须符合 `workflow-execution-result-v1`,至少包括 `work_unit`、`workflow_reference`、`result`、`skill`、`changed_files` / `changed_artifacts`、`evidence_refs`、实际验证结果、`deferred_seams`、`drift`、`violation`、`new_impacts`、`stale_candidates`、`blocking_signals` 和 `next_route`。主控必须重新执行 fresh verification,并在集中 checkpoint 中保留阶段因果。会签写入 `docs/.scratch/<feature>/gates/<gate-id>-approval.yaml`(形状见 `docs/templates/approval-record-template.yaml`),不能用聊天表情代替。恢复前校验 `scripts/verify-approval-record`。
|
|
@@ -3,7 +3,9 @@ status: template
|
|
|
3
3
|
owner: ai
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
#
|
|
6
|
+
# Digital Human Task Package:<task_id>
|
|
7
|
+
|
|
8
|
+
> Canonical contract: `docs/process/schemas/digital-human-task-package.schema.json`。本文件路径保留为兼容入口。
|
|
7
9
|
|
|
8
10
|
> 用于主控 Agent 派发 subagent 前固定输入、输出、写范围和验收标准。没有任务包边界时,不得派发 subagent。
|
|
9
11
|
|
|
@@ -11,7 +13,10 @@ owner: ai
|
|
|
11
13
|
|
|
12
14
|
| 字段 | 内容 |
|
|
13
15
|
|---|---|
|
|
16
|
+
| schema_version | `1` |
|
|
14
17
|
| task_id | |
|
|
18
|
+
| work_unit_id | 对应生命周期注册表的 `work_units[].id`;实现子任务对应 Slice Contract 的 `work_units[].id` |
|
|
19
|
+
| actor_id | 当前运行时实例标识;Reviewer 必须与实现者不同 |
|
|
15
20
|
| Feature / Change | |
|
|
16
21
|
| 生命周期阶段 | |
|
|
17
22
|
| 对应门禁 | |
|
|
@@ -23,6 +28,8 @@ owner: ai
|
|
|
23
28
|
| forbidden_skills | 从角色表复制,禁止手写 |
|
|
24
29
|
| subagent 角色 | Explorer / Drafter / Worker / Reviewer / Verifier |
|
|
25
30
|
| 任务类型 | explore / draft / work / review / verify |
|
|
31
|
+
| execution_state | 与 subagent 角色一致;由主控派发 |
|
|
32
|
+
| workflow_status | not-started / active / paused / resolved / failed |
|
|
26
33
|
|
|
27
34
|
## 2. 输入资产
|
|
28
35
|
|
|
@@ -35,11 +42,36 @@ owner: ai
|
|
|
35
42
|
| Ticket / Slice / Checklist | | |
|
|
36
43
|
| 代码 / 命令 / 其他 | | |
|
|
37
44
|
|
|
45
|
+
## 2.1 合同与技能来源
|
|
46
|
+
|
|
47
|
+
| 字段 | 内容 |
|
|
48
|
+
|---|---|
|
|
49
|
+
| contract_id | |
|
|
50
|
+
| contract_version | |
|
|
51
|
+
| contract_kind | `lifecycle-work-unit` / `slice-implementation` / `template-maintenance` |
|
|
52
|
+
| contract_status | `issued` / `stale` / `blocked`;不替代生命周期门禁批准 |
|
|
53
|
+
| contract_ref | |
|
|
54
|
+
| lifecycle_ref | 生命周期工作单元使用 |
|
|
55
|
+
| Slice Implementation Contract | 仅 `slice-implementation` 填写 |
|
|
56
|
+
| maintenance_ref | 仅 `template-maintenance` 填写维护 checkpoint |
|
|
57
|
+
| 技能注册表 | `docs/agents/digital-human-roles.yaml` |
|
|
58
|
+
| 技能默认值 | `taskPackageDefaults(<role_id>)` |
|
|
59
|
+
|
|
38
60
|
## 3. 输出要求
|
|
39
61
|
|
|
40
62
|
| 输出 | 路径 / 链接 | 完成标准 |
|
|
41
63
|
|---|---|---|
|
|
42
64
|
| | | |
|
|
65
|
+
| expected_evidence_files | | |
|
|
66
|
+
|
|
67
|
+
## 3.1 下游与汇合
|
|
68
|
+
|
|
69
|
+
| 字段 | 内容 |
|
|
70
|
+
|---|---|
|
|
71
|
+
| downstream_consumers | |
|
|
72
|
+
| parent_work_unit | `<work-unit.id>` |
|
|
73
|
+
| convergence_ref | |
|
|
74
|
+
| conflict_escalation | |
|
|
43
75
|
|
|
44
76
|
## 4. 写范围
|
|
45
77
|
|
|
@@ -77,6 +109,12 @@ owner: ai
|
|
|
77
109
|
| 主控 Agent 合并动作 | 采纳 / 部分采纳 / 不采纳 / 需返工 |
|
|
78
110
|
| 未采纳原因 | |
|
|
79
111
|
|
|
112
|
+
## 7.1 实际验证结果
|
|
113
|
+
|
|
114
|
+
| 命令 | exit_code | executed_at | evidence_ref |
|
|
115
|
+
|---|---:|---|---|
|
|
116
|
+
| | | | |
|
|
117
|
+
|
|
80
118
|
## 8. 子代理最终回复格式
|
|
81
119
|
|
|
82
120
|
```markdown
|
|
@@ -0,0 +1,259 @@
|
|
|
1
|
+
import { existsSync, readFileSync } from "node:fs";
|
|
2
|
+
import { parseDocument } from "../vendor/yaml.mjs";
|
|
3
|
+
|
|
4
|
+
const IMPLEMENTATION_WORK_UNIT = "work-unit.slice-implementation";
|
|
5
|
+
const TICKET_DECOMPOSITION_WORK_UNIT = "work-unit.ticket-decomposition";
|
|
6
|
+
|
|
7
|
+
function deepFreeze(value) {
|
|
8
|
+
if (!value || typeof value !== "object" || Object.isFrozen(value)) return value;
|
|
9
|
+
Object.freeze(value);
|
|
10
|
+
for (const child of Object.values(value)) deepFreeze(child);
|
|
11
|
+
return value;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
const NEXT_ROUTES = deepFreeze({
|
|
15
|
+
"work-unit.entry-triage": ["work-unit.discovery-opportunity", "work-unit.discovery-requirements"],
|
|
16
|
+
"work-unit.ssot-update": ["work-unit.skill-projection-sync", "work-unit.intensity-aware-verification"],
|
|
17
|
+
"work-unit.skill-projection-sync": ["work-unit.template-snapshot-build", "work-unit.intensity-aware-verification"],
|
|
18
|
+
"work-unit.template-snapshot-build": ["work-unit.attach-sync-integration", "work-unit.intensity-aware-verification"],
|
|
19
|
+
"work-unit.attach-sync-integration": ["work-unit.intensity-aware-verification"],
|
|
20
|
+
"work-unit.intensity-aware-verification": ["work-unit.intensity-aware-review"],
|
|
21
|
+
"work-unit.intensity-aware-review": ["work-unit.release-and-rollback"],
|
|
22
|
+
"work-unit.release-and-rollback": [],
|
|
23
|
+
"work-unit.discovery-opportunity": ["work-unit.discovery-requirements", "work-unit.domain-strategy-design", "work-unit.stage-decision", "work-unit.spec-synthesis"],
|
|
24
|
+
"work-unit.discovery-requirements": ["work-unit.domain-strategy-design", "work-unit.stage-decision", "work-unit.spec-synthesis"],
|
|
25
|
+
"work-unit.domain-strategy-design": ["work-unit.stage-decision", "work-unit.spec-synthesis"],
|
|
26
|
+
"work-unit.stage-decision": ["work-unit.spec-synthesis"],
|
|
27
|
+
"work-unit.spec-synthesis": ["work-unit.prototype-design", "work-unit.technical-analysis", TICKET_DECOMPOSITION_WORK_UNIT],
|
|
28
|
+
"work-unit.prototype-design": ["work-unit.technical-analysis", TICKET_DECOMPOSITION_WORK_UNIT],
|
|
29
|
+
"work-unit.technical-analysis": [TICKET_DECOMPOSITION_WORK_UNIT],
|
|
30
|
+
[TICKET_DECOMPOSITION_WORK_UNIT]: [IMPLEMENTATION_WORK_UNIT],
|
|
31
|
+
[IMPLEMENTATION_WORK_UNIT]: ["work-unit.frontend-implementation-verification", "work-unit.code-review"],
|
|
32
|
+
"work-unit.frontend-implementation-verification": ["work-unit.code-review"],
|
|
33
|
+
"work-unit.code-review": ["work-unit.release-and-retrospective", IMPLEMENTATION_WORK_UNIT],
|
|
34
|
+
"work-unit.release-and-retrospective": [],
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
const BLOCKING_SIGNALS = Object.freeze({
|
|
38
|
+
invalidRoute: "illegal-next-route",
|
|
39
|
+
implementationBeforeTickets: "ticket-formalization-required",
|
|
40
|
+
invalidPredecessor: "invalid-implementation-predecessor",
|
|
41
|
+
decompositionIncomplete: "ticket-decomposition-incomplete",
|
|
42
|
+
decompositionRefMissing: "ticket-decomposition-result-ref-missing",
|
|
43
|
+
missingSlice: "vertical-slice-ticket-required",
|
|
44
|
+
sliceRefMissing: "vertical-slice-ticket-ref-missing",
|
|
45
|
+
parentTicket: "parent-ticket-forbidden",
|
|
46
|
+
wrongKind: "vertical-slice-ticket-kind-invalid",
|
|
47
|
+
kindMissing: "vertical-slice-ticket-kind-missing",
|
|
48
|
+
unreadableSlice: "vertical-slice-ticket-unreadable",
|
|
49
|
+
wrongRole: "ticket-not-ready-for-agent",
|
|
50
|
+
roleMissing: "vertical-slice-ticket-role-missing",
|
|
51
|
+
contractMismatch: "slice-contract-ticket-mismatch",
|
|
52
|
+
contractNotApproved: "slice-contract-not-approved",
|
|
53
|
+
contractNotPersisted: "slice-contract-not-persisted",
|
|
54
|
+
contractNotCurrent: "slice-contract-not-current",
|
|
55
|
+
missingEvidence: "ticket-formalization-evidence-missing",
|
|
56
|
+
stale: "ticket-formalization-stale",
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
const allowedResult = (evidenceRefs = []) => ({
|
|
60
|
+
result: "allowed",
|
|
61
|
+
blocking_signals: [],
|
|
62
|
+
missing_requirements: [],
|
|
63
|
+
evidence_refs: evidenceRefs,
|
|
64
|
+
next_work_unit: null,
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
const blockedResult = (signals, missing = [], evidenceRefs = []) => ({
|
|
68
|
+
result: "blocked",
|
|
69
|
+
blocking_signals: [...new Set(signals)],
|
|
70
|
+
missing_requirements: [...new Set(missing)],
|
|
71
|
+
evidence_refs: evidenceRefs,
|
|
72
|
+
next_work_unit: null,
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
function hasText(value) {
|
|
76
|
+
return typeof value === "string" && value.trim().length > 0;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
function isReadable(ref, exists) {
|
|
80
|
+
return hasText(ref) && exists(ref);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
function readDecompositionResult(ref, read) {
|
|
84
|
+
if (!hasText(ref)) return null;
|
|
85
|
+
try {
|
|
86
|
+
const document = parseDocument(read(ref), { maxAliasCount: 0, uniqueKeys: true });
|
|
87
|
+
if (document.errors.length > 0) return null;
|
|
88
|
+
const value = document.toJS({ maxAliasCount: 0 });
|
|
89
|
+
return value && typeof value === "object" && !Array.isArray(value) ? value : null;
|
|
90
|
+
} catch {
|
|
91
|
+
return null;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
function validateTicketPath(ref) {
|
|
96
|
+
if (!hasText(ref)) return false;
|
|
97
|
+
return /^docs\/\.scratch\/[^/]+\/issues\/[^/]+\.md$/.test(ref);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
function validateTicketReference(ref, trackerKind) {
|
|
101
|
+
if (trackerKind === "github" || trackerKind === "gitlab") {
|
|
102
|
+
return /^(https?:\/\/|(?:github|gitlab):)[^\s]+$/.test(ref);
|
|
103
|
+
}
|
|
104
|
+
return validateTicketPath(ref);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* Validate a lifecycle work-unit transition without mutating state.
|
|
109
|
+
* `nextRoute` is null only for a terminal work unit. A blocked or needs-human
|
|
110
|
+
* Workflow Execution Result may omit a route; completed results are checked
|
|
111
|
+
* by `validateWorkflowExecutionResult` before this function is called.
|
|
112
|
+
*/
|
|
113
|
+
export function validateNextRoute(currentWorkUnit, nextRoute) {
|
|
114
|
+
const routes = NEXT_ROUTES[currentWorkUnit];
|
|
115
|
+
if (!routes) return blockedResult([BLOCKING_SIGNALS.invalidRoute], ["known_current_work_unit"]);
|
|
116
|
+
if (nextRoute === null && routes.length === 0) return allowedResult();
|
|
117
|
+
if (!hasText(nextRoute) || !routes.includes(nextRoute)) {
|
|
118
|
+
const signals = [BLOCKING_SIGNALS.invalidRoute];
|
|
119
|
+
if (nextRoute === IMPLEMENTATION_WORK_UNIT && currentWorkUnit !== TICKET_DECOMPOSITION_WORK_UNIT) {
|
|
120
|
+
signals.push(BLOCKING_SIGNALS.implementationBeforeTickets);
|
|
121
|
+
}
|
|
122
|
+
return blockedResult(signals, ["allowed_next_route"]);
|
|
123
|
+
}
|
|
124
|
+
return allowedResult();
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* Validate that Ticket formalization produced a real, implementable vertical slice.
|
|
129
|
+
* `exists` is injectable so external adapters can resolve their own tracker refs.
|
|
130
|
+
*/
|
|
131
|
+
export function validateTicketFormalization(state, { exists = existsSync, read = (ref) => readFileSync(ref, "utf8") } = {}) {
|
|
132
|
+
const decomposition = state?.ticket_decomposition_result;
|
|
133
|
+
const ticket = state?.vertical_slice_ticket;
|
|
134
|
+
const contract = state?.slice_contract;
|
|
135
|
+
const decompositionRef = state?.ticket_decomposition_result_ref;
|
|
136
|
+
const sliceRef = state?.vertical_slice_ticket_ref;
|
|
137
|
+
const sliceRole = state?.vertical_slice_ticket_role;
|
|
138
|
+
const sliceKind = state?.vertical_slice_ticket_kind;
|
|
139
|
+
const trackerKind = state?.tracker_kind ?? "local-markdown";
|
|
140
|
+
const evidenceRefs = decomposition?.evidence_refs ?? [];
|
|
141
|
+
const persistedDecomposition = readDecompositionResult(decompositionRef, read);
|
|
142
|
+
const signals = [];
|
|
143
|
+
const missing = [];
|
|
144
|
+
|
|
145
|
+
if (decomposition?.result !== "completed") {
|
|
146
|
+
signals.push(BLOCKING_SIGNALS.decompositionIncomplete);
|
|
147
|
+
missing.push("ticket_decomposition_result.result=completed");
|
|
148
|
+
}
|
|
149
|
+
if (!persistedDecomposition || persistedDecomposition.result_schema !== "workflow-execution-result-v1" || persistedDecomposition.result !== "completed" || persistedDecomposition.work_unit !== TICKET_DECOMPOSITION_WORK_UNIT) {
|
|
150
|
+
signals.push(BLOCKING_SIGNALS.decompositionIncomplete);
|
|
151
|
+
missing.push("ticket_decomposition_result_ref must contain completed work-unit.ticket-decomposition result");
|
|
152
|
+
}
|
|
153
|
+
if (persistedDecomposition && Array.isArray(persistedDecomposition.evidence_refs)) {
|
|
154
|
+
if (persistedDecomposition.evidence_refs.some((ref) => !isReadable(ref, exists))) {
|
|
155
|
+
signals.push(BLOCKING_SIGNALS.missingEvidence);
|
|
156
|
+
missing.push("persisted decomposition result evidence_refs must be readable");
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
if (!isReadable(decompositionRef, exists) || !evidenceRefs.includes(decompositionRef)) {
|
|
160
|
+
signals.push(BLOCKING_SIGNALS.decompositionRefMissing);
|
|
161
|
+
missing.push("readable ticket_decomposition_result_ref included in evidence_refs");
|
|
162
|
+
}
|
|
163
|
+
if (!Array.isArray(evidenceRefs) || evidenceRefs.length === 0 || evidenceRefs.some((ref) => !isReadable(ref, exists))) {
|
|
164
|
+
signals.push(BLOCKING_SIGNALS.missingEvidence);
|
|
165
|
+
missing.push("readable ticket_decomposition_result.evidence_refs");
|
|
166
|
+
}
|
|
167
|
+
if (!hasText(sliceRef)) {
|
|
168
|
+
signals.push(BLOCKING_SIGNALS.sliceRefMissing);
|
|
169
|
+
missing.push("vertical_slice_ticket_ref");
|
|
170
|
+
}
|
|
171
|
+
if (!hasText(sliceKind)) {
|
|
172
|
+
signals.push(BLOCKING_SIGNALS.kindMissing);
|
|
173
|
+
missing.push("vertical_slice_ticket_kind");
|
|
174
|
+
}
|
|
175
|
+
if (!hasText(sliceRole)) {
|
|
176
|
+
signals.push(BLOCKING_SIGNALS.roleMissing);
|
|
177
|
+
missing.push("vertical_slice_ticket_role");
|
|
178
|
+
}
|
|
179
|
+
if (!ticket || !hasText(ticket.ref)) {
|
|
180
|
+
signals.push(BLOCKING_SIGNALS.missingSlice);
|
|
181
|
+
missing.push("vertical_slice_ticket.ref");
|
|
182
|
+
} else {
|
|
183
|
+
if (sliceRef !== ticket.ref) {
|
|
184
|
+
signals.push(BLOCKING_SIGNALS.contractMismatch);
|
|
185
|
+
missing.push("vertical_slice_ticket_ref=vertical_slice_ticket.ref");
|
|
186
|
+
}
|
|
187
|
+
if (sliceKind !== ticket.kind) {
|
|
188
|
+
signals.push(BLOCKING_SIGNALS.wrongKind);
|
|
189
|
+
missing.push("vertical_slice_ticket_kind=vertical_slice_ticket.kind");
|
|
190
|
+
}
|
|
191
|
+
if (sliceRole !== ticket.role) {
|
|
192
|
+
signals.push(BLOCKING_SIGNALS.wrongRole);
|
|
193
|
+
missing.push("vertical_slice_ticket_role=vertical_slice_ticket.role");
|
|
194
|
+
}
|
|
195
|
+
if (!validateTicketReference(ticket.ref, trackerKind)) {
|
|
196
|
+
signals.push(ticket.kind === "parent-ticket" || ticket.ref.endsWith("/parent-ticket.md") ? BLOCKING_SIGNALS.parentTicket : BLOCKING_SIGNALS.missingSlice);
|
|
197
|
+
missing.push(trackerKind === "local-markdown" ? "vertical_slice_ticket.ref under docs/.scratch/<feature>/issues/" : "remote tracker Ticket reference");
|
|
198
|
+
}
|
|
199
|
+
if (ticket.kind === "parent-ticket" || ticket.ref.endsWith("/parent-ticket.md")) {
|
|
200
|
+
signals.push(BLOCKING_SIGNALS.parentTicket);
|
|
201
|
+
missing.push("vertical_slice_ticket.kind=vertical-slice-ticket");
|
|
202
|
+
} else if (ticket.kind !== "vertical-slice-ticket") {
|
|
203
|
+
signals.push(BLOCKING_SIGNALS.wrongKind);
|
|
204
|
+
missing.push("vertical_slice_ticket.kind=vertical-slice-ticket");
|
|
205
|
+
}
|
|
206
|
+
if (ticket.role !== "ready-for-agent") {
|
|
207
|
+
signals.push(BLOCKING_SIGNALS.wrongRole);
|
|
208
|
+
missing.push("vertical_slice_ticket.role=ready-for-agent");
|
|
209
|
+
}
|
|
210
|
+
if (trackerKind === "local-markdown" && !isReadable(ticket.ref, exists)) {
|
|
211
|
+
signals.push(BLOCKING_SIGNALS.unreadableSlice);
|
|
212
|
+
missing.push("readable vertical_slice_ticket.ref");
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
if (!contract || !hasText(contract.ticket_ref) || contract.ticket_ref !== ticket?.ref) {
|
|
216
|
+
signals.push(BLOCKING_SIGNALS.contractMismatch);
|
|
217
|
+
missing.push("slice_contract.ticket_ref=vertical_slice_ticket.ref");
|
|
218
|
+
}
|
|
219
|
+
if (contract?.status !== "approved") {
|
|
220
|
+
signals.push(BLOCKING_SIGNALS.contractNotApproved);
|
|
221
|
+
missing.push("slice_contract.status=approved");
|
|
222
|
+
}
|
|
223
|
+
if (contract?.persisted !== true) {
|
|
224
|
+
signals.push(BLOCKING_SIGNALS.contractNotPersisted);
|
|
225
|
+
missing.push("slice_contract.persisted=true");
|
|
226
|
+
}
|
|
227
|
+
if (contract?.current_version !== true) {
|
|
228
|
+
signals.push(BLOCKING_SIGNALS.contractNotCurrent);
|
|
229
|
+
missing.push("slice_contract.current_version=true");
|
|
230
|
+
}
|
|
231
|
+
if (state?.stale === true || (Array.isArray(state?.stale_inputs) && state.stale_inputs.length > 0)) {
|
|
232
|
+
signals.push(BLOCKING_SIGNALS.stale);
|
|
233
|
+
missing.push("ticket formalization inputs are current");
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
return signals.length === 0 ? allowedResult(evidenceRefs) : blockedResult(signals, missing, evidenceRefs);
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
/**
|
|
240
|
+
* Validate the complete implementation entry seam after ready-for-agent promotion.
|
|
241
|
+
*/
|
|
242
|
+
export function validateImplementationEntry(state, options = {}) {
|
|
243
|
+
const ticketResult = validateTicketFormalization(state, options);
|
|
244
|
+
if (ticketResult.result === "blocked") return ticketResult;
|
|
245
|
+
if (state?.predecessor_work_unit !== TICKET_DECOMPOSITION_WORK_UNIT) {
|
|
246
|
+
return blockedResult([BLOCKING_SIGNALS.invalidPredecessor], ["predecessor_work_unit=work-unit.ticket-decomposition"], ticketResult.evidence_refs);
|
|
247
|
+
}
|
|
248
|
+
if (state?.ready_for_agent !== true) {
|
|
249
|
+
return blockedResult([BLOCKING_SIGNALS.wrongRole], ["ready_for_agent=true"], ticketResult.evidence_refs);
|
|
250
|
+
}
|
|
251
|
+
return ticketResult;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
export const lifecycleTransitionContract = Object.freeze({
|
|
255
|
+
implementation_work_unit: IMPLEMENTATION_WORK_UNIT,
|
|
256
|
+
ticket_decomposition_work_unit: TICKET_DECOMPOSITION_WORK_UNIT,
|
|
257
|
+
next_routes: NEXT_ROUTES,
|
|
258
|
+
blocking_signals: BLOCKING_SIGNALS,
|
|
259
|
+
});
|