create-yss-spec 2.2.2 → 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 +9 -9
- 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 +3 -3
- package/template/.agents/skills/yss-product-lifecycle/references/orchestration-contract.yaml +139 -4
- package/template/.agents/skills/yss-product-lifecycle/references/orchestration.md +8 -5
- package/template/.agents/skills/yss-product-lifecycle/references/state-model.md +9 -4
- package/template/.agents/skills/yss-router/SKILL.md +5 -3
- package/template/.agents/skills/yss-router/references/router-contract.yaml +18 -3
- package/template/.agents/skills/yss-router/references/slice-implementation-contract.md +59 -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 +9 -9
- 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 +3 -3
- package/template/.claude/skills/yss-product-lifecycle/references/orchestration-contract.yaml +139 -4
- package/template/.claude/skills/yss-product-lifecycle/references/orchestration.md +8 -5
- package/template/.claude/skills/yss-product-lifecycle/references/state-model.md +9 -4
- package/template/.claude/skills/yss-router/SKILL.md +5 -3
- package/template/.claude/skills/yss-router/references/router-contract.yaml +18 -3
- package/template/.claude/skills/yss-router/references/slice-implementation-contract.md +59 -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 +9 -9
- 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 +3 -3
- package/template/.codex/skills/yss-product-lifecycle/references/orchestration-contract.yaml +139 -4
- package/template/.codex/skills/yss-product-lifecycle/references/orchestration.md +8 -5
- package/template/.codex/skills/yss-product-lifecycle/references/state-model.md +9 -4
- package/template/.codex/skills/yss-router/SKILL.md +5 -3
- package/template/.codex/skills/yss-router/references/router-contract.yaml +18 -3
- package/template/.codex/skills/yss-router/references/slice-implementation-contract.md +59 -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 +9 -9
- 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 +3 -3
- package/template/.cursor/skills/yss-product-lifecycle/references/orchestration-contract.yaml +139 -4
- package/template/.cursor/skills/yss-product-lifecycle/references/orchestration.md +8 -5
- package/template/.cursor/skills/yss-product-lifecycle/references/state-model.md +9 -4
- package/template/.cursor/skills/yss-router/SKILL.md +5 -3
- package/template/.cursor/skills/yss-router/references/router-contract.yaml +18 -3
- package/template/.cursor/skills/yss-router/references/slice-implementation-contract.md +59 -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 +9 -9
- 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 +3 -3
- package/template/.hermes/skills/yss-product-lifecycle/references/orchestration-contract.yaml +139 -4
- package/template/.hermes/skills/yss-product-lifecycle/references/orchestration.md +8 -5
- package/template/.hermes/skills/yss-product-lifecycle/references/state-model.md +9 -4
- package/template/.hermes/skills/yss-router/SKILL.md +5 -3
- package/template/.hermes/skills/yss-router/references/router-contract.yaml +18 -3
- package/template/.hermes/skills/yss-router/references/slice-implementation-contract.md +59 -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 +9 -9
- 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 +3 -3
- package/template/.pi/skills/yss-product-lifecycle/references/orchestration-contract.yaml +139 -4
- package/template/.pi/skills/yss-product-lifecycle/references/orchestration.md +8 -5
- package/template/.pi/skills/yss-product-lifecycle/references/state-model.md +9 -4
- package/template/.pi/skills/yss-router/SKILL.md +5 -3
- package/template/.pi/skills/yss-router/references/router-contract.yaml +18 -3
- package/template/.pi/skills/yss-router/references/slice-implementation-contract.md +59 -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 +9 -9
- 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 +3 -3
- package/template/.qoder/skills/yss-product-lifecycle/references/orchestration-contract.yaml +139 -4
- package/template/.qoder/skills/yss-product-lifecycle/references/orchestration.md +8 -5
- package/template/.qoder/skills/yss-product-lifecycle/references/state-model.md +9 -4
- package/template/.qoder/skills/yss-router/SKILL.md +5 -3
- package/template/.qoder/skills/yss-router/references/router-contract.yaml +18 -3
- package/template/.qoder/skills/yss-router/references/slice-implementation-contract.md +59 -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 +9 -9
- 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 +3 -3
- package/template/.trae/skills/yss-product-lifecycle/references/orchestration-contract.yaml +139 -4
- package/template/.trae/skills/yss-product-lifecycle/references/orchestration.md +8 -5
- package/template/.trae/skills/yss-product-lifecycle/references/state-model.md +9 -4
- package/template/.trae/skills/yss-router/SKILL.md +5 -3
- package/template/.trae/skills/yss-router/references/router-contract.yaml +18 -3
- package/template/.trae/skills/yss-router/references/slice-implementation-contract.md +59 -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 +8 -4
- package/template/CONTEXT.md +14 -2
- package/template/docs/agents/digital-human-roles.md +83 -0
- package/template/docs/agents/digital-human-roles.yaml +259 -0
- package/template/docs/agents/triage-labels.md +5 -5
- 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/lifecycle-checkpoint.schema.json +2 -1
- package/template/docs/process/schemas/subagent-task-package.schema.json +6 -0
- package/template/docs/process/subagent-collaboration.md +5 -3
- package/template/docs/process/templates/stage-checkpoint-template.md +3 -1
- package/template/docs/templates/approval-record-template.yaml +14 -0
- package/template/docs/templates/digital-human-runtime-profile-template.md +38 -0
- package/template/docs/templates/grok-bot-profile-template.md +24 -0
- package/template/docs/templates/implementation-routing-template.md +3 -3
- package/template/docs/templates/local-parent-ticket-template.md +8 -0
- package/template/docs/templates/subagent-task-package-template.md +43 -1
- package/template/docs/templates/vertical-slice-ticket-template.md +7 -0
- package/template/docs/user-guide//344/272/247/345/223/201/347/240/224/345/217/221/345/205/250/347/224/237/345/221/275/345/221/250/346/234/237/346/234/200/344/275/263/345/256/236/350/267/265.md +2 -0
- package/template/scripts/lib/approval-record.mjs +123 -0
- package/template/scripts/lib/digital-human-roles.mjs +398 -0
- 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-approval-record +13 -0
- package/template/scripts/verify-digital-human-roles +10 -0
- package/template/scripts/verify-digital-human-roles-scenarios +147 -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-checkpoint +2 -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 +16 -2
- package/template/skills-lock.json +35 -3
- package/template.snapshot.json +4 -4
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
# Subagent 协作规则
|
|
2
2
|
|
|
3
|
-
Subagent
|
|
3
|
+
Subagent 和其它运行时实例只接收边界清晰的任务包。主控数字人负责仓库身份、门禁计算、Ticket 状态、Git checkpoint 和完成结论。数字人角色、`runtime_id` 与 Explorer / Drafter / Worker / Reviewer / Verifier 执行态正交,任务包必须同时写明。
|
|
4
|
+
|
|
5
|
+
写入范围不得与其他执行者重叠;实现者不得同时担任同一切片的独立审查者,也不得会签自己起草的资产。写隔离以任务包为准。某运行时若共享磁盘或会话,不得把不同实例当成安全边界。
|
|
4
6
|
|
|
5
7
|
## 任务包
|
|
6
8
|
|
|
7
|
-
|
|
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` 仅为兼容入口。
|
|
8
10
|
|
|
9
11
|
## 汇合
|
|
10
12
|
|
|
11
|
-
|
|
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`。
|
|
@@ -14,6 +14,8 @@ gates:
|
|
|
14
14
|
<stable-gate-id>:
|
|
15
15
|
status: <not-evaluated|blocked|ready-for-human|approved|stale|not-applicable>
|
|
16
16
|
reason: <why this status applies>
|
|
17
|
+
evidence_refs: []
|
|
18
|
+
approval_ref: <docs/.scratch/<feature>/gates/<gate-id>-approval.yaml when approved countersign gate>
|
|
17
19
|
phase_boundary:
|
|
18
20
|
decision: <continue|clear|handoff|subagent|compact>
|
|
19
21
|
reason: <decision evidence>
|
|
@@ -41,4 +43,4 @@ blockers: []
|
|
|
41
43
|
rollback: []
|
|
42
44
|
```
|
|
43
45
|
|
|
44
|
-
阶段 checkpoint
|
|
46
|
+
阶段 checkpoint 只在会签暂停、handoff、进入实现、合并或发布边界集中回写;出现阻塞、责任人变化或资产单独批准时立即回写,并保留阶段因果。`paused-human-gate` 表示等待 YAML `gate_policy` 指定的会签人(数字人或生物人),不是「必须是生物人」。会签桶内门禁标为 `approved` 时必须有可读的 `approval_ref`。
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
schema_version: 1
|
|
2
|
+
gate_id: gate.spec-baseline-approved
|
|
3
|
+
decision: approved
|
|
4
|
+
actor_kind: digital-human
|
|
5
|
+
role_id: role.product-manager
|
|
6
|
+
runtime_id: runtime.generic
|
|
7
|
+
runtime_instance_ref: "runtime.generic:role.product-manager"
|
|
8
|
+
principal_ref: "instance:role.product-manager"
|
|
9
|
+
drafter_role_id: role.requirements-manager
|
|
10
|
+
countersigner_role_ids:
|
|
11
|
+
- role.product-manager
|
|
12
|
+
evidence_refs: []
|
|
13
|
+
biological_veto: false
|
|
14
|
+
notes: 会签必须可读取;起草者不得出现在 countersigner_role_ids。运行时表情/reaction 无效。
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# 数字人运行时 Profile:<数字人角色>
|
|
2
|
+
|
|
3
|
+
> 从 `docs/agents/digital-human-roles.yaml` 复制 title / description / skill。不要手写第二套职责。先选 `runtime_id`,再按该运行时适配器落地。
|
|
4
|
+
|
|
5
|
+
## 绑定
|
|
6
|
+
|
|
7
|
+
| 字段 | 内容 |
|
|
8
|
+
|---|---|
|
|
9
|
+
| 数字人角色 ID | `role.` |
|
|
10
|
+
| 运行时 | `runtime.generic` / `runtime.skill-projection` / `runtime.grok` / 新增适配器 |
|
|
11
|
+
| title | YAML `title` |
|
|
12
|
+
| description | YAML `description` 全文,加上本 `project-instance` 仓库路径 |
|
|
13
|
+
| 兼任 | 仅主控默认兼任 `role.project-manager`,直到 `dual_hat_split_when` |
|
|
14
|
+
| 仓库路径 | 本 `project-instance` 的 git 根路径 |
|
|
15
|
+
|
|
16
|
+
## Skills
|
|
17
|
+
|
|
18
|
+
- 启用:YAML `core_skills`(投影根从 `.agents/skills` 加载同名 skill)
|
|
19
|
+
- 保持关闭:YAML `forbidden_skills`
|
|
20
|
+
- 账户或客户端能发现更多 skill,不等于该数字人可用
|
|
21
|
+
|
|
22
|
+
## `project-instance` 绑定清单
|
|
23
|
+
|
|
24
|
+
模板仓只 `publish-singleton-profiles`。实例仓按本表 duplicate,禁止按功能再拆实例。外部 `create-yss-spec` 尚未接管此步骤。
|
|
25
|
+
|
|
26
|
+
- [ ] 从 YAML 复制 `title`、`description`、`core_skills`、`forbidden_skills`,不手写第二套职责
|
|
27
|
+
- [ ] 选择一个 `runtime_id`(`runtime.generic` / `runtime.skill-projection` / `runtime.grok`)
|
|
28
|
+
- [ ] `description` 末尾写明本仓库路径
|
|
29
|
+
- [ ] 会签文件落在 `docs/.scratch/<feature>/gates/<gate-id>-approval.yaml`
|
|
30
|
+
- [ ] 未命中 `dual_hat_split_when` 时,主控与项目经理共用同一实例
|
|
31
|
+
|
|
32
|
+
## 协同
|
|
33
|
+
|
|
34
|
+
- 人默认只跟主控说话。
|
|
35
|
+
- 逻辑协作组以 YAML `stage_groups` 为准。
|
|
36
|
+
- 当前运行时若声明了 `max_collaboration_group_size` 且 `overflow=one-to-one-handoff`,超员时改 1:1,不改逻辑组。
|
|
37
|
+
- 会签按 YAML `gate_policy` 写 `docs/templates/approval-record-template.yaml`,填 `runtime_id` 与 `principal_ref`。恢复前跑 `scripts/verify-approval-record`。
|
|
38
|
+
- 权威产物写 git。
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Grok Bot Profile:<数字人角色>
|
|
2
|
+
|
|
3
|
+
> 这是 `runtime.grok` 适配模板。角色职责仍以 `docs/agents/digital-human-roles.yaml` 为准。通用流程见 `docs/templates/digital-human-runtime-profile-template.md`。
|
|
4
|
+
|
|
5
|
+
## Profile
|
|
6
|
+
|
|
7
|
+
| 字段 | 内容 |
|
|
8
|
+
|---|---|
|
|
9
|
+
| 数字人角色 ID | `role.` |
|
|
10
|
+
| runtime_id | `runtime.grok` |
|
|
11
|
+
| Grok title | YAML `title` |
|
|
12
|
+
| Description | YAML `description` 全文,加上本 `project-instance` 仓库路径 |
|
|
13
|
+
| 兼任 | 仅主控默认兼任 `role.project-manager`,直到 `dual_hat_split_when` |
|
|
14
|
+
|
|
15
|
+
## Skills
|
|
16
|
+
|
|
17
|
+
- 在 Grok **Settings → Plugins → Yours** 仅为该 Bot 启用 `core_skills`
|
|
18
|
+
- `forbidden_skills` 保持关闭
|
|
19
|
+
|
|
20
|
+
## Grok 约束
|
|
21
|
+
|
|
22
|
+
- 群聊 2–6 人。逻辑协作组更大时用 1:1 异步交接,不要改 YAML `stage_groups`。
|
|
23
|
+
- 全部 Bot 共享云计算机。写范围只写在任务包里。
|
|
24
|
+
- 发邮件、改生产等走 Grok Allow;不等于生命周期门禁已过。会签写 git 记录并跑 `scripts/verify-approval-record`。
|
|
@@ -275,9 +275,9 @@ owner: ai
|
|
|
275
275
|
|
|
276
276
|
## 6. Subagent 执行计划
|
|
277
277
|
|
|
278
|
-
| task_id | subagent 角色 | 责任范围 | 允许修改文件 / 模块 | 禁止事项 | 输出回填位置 |
|
|
279
|
-
|
|
280
|
-
| | Explorer / Drafter / Worker / Reviewer / Verifier | frontend / backend / test / review /
|
|
278
|
+
| task_id | 数字人角色 | runtime_id | core_skills(从角色表复制) | subagent 角色 | 责任范围 | 允许修改文件 / 模块 | 禁止事项 | 输出回填位置 |
|
|
279
|
+
|---|---|---|---|---|---|---|---|---|
|
|
280
|
+
| | role.frontend-engineer | runtime.skill-projection | 从 YAML `core_skills` 复制 | Explorer / Drafter / Worker / Reviewer / Verifier | frontend / backend / test / review / docs | | 不得 Freeze / 不得覆盖他人改动 / 不得会签自己的草稿 | |
|
|
281
281
|
|
|
282
282
|
| 并行风险 | 缓解措施 | 合并负责人 | 状态 |
|
|
283
283
|
|---|---|---|---|
|
|
@@ -46,6 +46,14 @@ Status: ready-for-human
|
|
|
46
46
|
- Verification:`docs/.scratch/<feature>/verification/`
|
|
47
47
|
- Vertical slices:`docs/.scratch/<feature>/issues/`
|
|
48
48
|
|
|
49
|
+
## 会签
|
|
50
|
+
|
|
51
|
+
会签记录写在 `docs/.scratch/<feature>/gates/<gate-id>-approval.yaml`。会签桶内门禁标为 `approved` 前必须通过 `scripts/verify-approval-record`。
|
|
52
|
+
|
|
53
|
+
| 门禁 | 记录路径 | 会签角色 | 状态 |
|
|
54
|
+
|---|---|---|---|
|
|
55
|
+
| | `docs/.scratch/<feature>/gates/<gate-id>-approval.yaml` | 见 `docs/agents/digital-human-roles.yaml` | pending / approved / blocked / not-applicable |
|
|
56
|
+
|
|
49
57
|
## 阻塞关系
|
|
50
58
|
|
|
51
59
|
- 无 / 被 `<ticket-path>` 阻塞
|
|
@@ -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,14 +13,23 @@ 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
|
| 对应门禁 | |
|
|
18
23
|
| Ticket / MR / PR | |
|
|
19
24
|
| 主控 Agent | |
|
|
25
|
+
| 数字人角色 | `role.` 见 `docs/agents/digital-human-roles.yaml` |
|
|
26
|
+
| runtime_id | `runtime.generic` / `runtime.skill-projection` / `runtime.grok` |
|
|
27
|
+
| core_skills | 从角色表复制,禁止手写 |
|
|
28
|
+
| forbidden_skills | 从角色表复制,禁止手写 |
|
|
20
29
|
| subagent 角色 | Explorer / Drafter / Worker / Reviewer / Verifier |
|
|
21
30
|
| 任务类型 | explore / draft / work / review / verify |
|
|
31
|
+
| execution_state | 与 subagent 角色一致;由主控派发 |
|
|
32
|
+
| workflow_status | not-started / active / paused / resolved / failed |
|
|
22
33
|
|
|
23
34
|
## 2. 输入资产
|
|
24
35
|
|
|
@@ -31,11 +42,36 @@ owner: ai
|
|
|
31
42
|
| Ticket / Slice / Checklist | | |
|
|
32
43
|
| 代码 / 命令 / 其他 | | |
|
|
33
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
|
+
|
|
34
60
|
## 3. 输出要求
|
|
35
61
|
|
|
36
62
|
| 输出 | 路径 / 链接 | 完成标准 |
|
|
37
63
|
|---|---|---|
|
|
38
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 | |
|
|
39
75
|
|
|
40
76
|
## 4. 写范围
|
|
41
77
|
|
|
@@ -73,6 +109,12 @@ owner: ai
|
|
|
73
109
|
| 主控 Agent 合并动作 | 采纳 / 部分采纳 / 不采纳 / 需返工 |
|
|
74
110
|
| 未采纳原因 | |
|
|
75
111
|
|
|
112
|
+
## 7.1 实际验证结果
|
|
113
|
+
|
|
114
|
+
| 命令 | exit_code | executed_at | evidence_ref |
|
|
115
|
+
|---|---:|---|---|
|
|
116
|
+
| | | | |
|
|
117
|
+
|
|
76
118
|
## 8. 子代理最终回复格式
|
|
77
119
|
|
|
78
120
|
```markdown
|
|
@@ -53,6 +53,7 @@ Status: ready-for-human
|
|
|
53
53
|
| contract_ref | |
|
|
54
54
|
| Router 状态 | draft / blocked / ready-for-lifecycle-review |
|
|
55
55
|
| 生命周期批准状态 | pending / approved / rejected |
|
|
56
|
+
| suggested_owner_role_id | `role.frontend-engineer` / `role.backend-engineer` / `role.test-engineer`(Router 建议,编排器派活) |
|
|
56
57
|
| Build Architecture Checklist | |
|
|
57
58
|
|
|
58
59
|
> Router 不得自行将合同批准或将本 Ticket 推进为 `ready-for-agent`。只有生命周期编排器核验并持久化当前版本合同、清除阻塞边后,才能推进状态。
|
|
@@ -107,6 +108,12 @@ Status: ready-for-human
|
|
|
107
108
|
|
|
108
109
|
出现 `drift`、`violation` 或非空 `new_impacts` 时暂停受影响工作单元,不得先完成代码再补合同;更新合同版本并通过生命周期审查后才能恢复。
|
|
109
110
|
|
|
111
|
+
## 会签
|
|
112
|
+
|
|
113
|
+
| 门禁 | 记录路径 | 会签角色 | 状态 |
|
|
114
|
+
|---|---|---|---|
|
|
115
|
+
| | `docs/.scratch/<feature>/gates/<gate-id>-approval.yaml` | 见 `docs/agents/digital-human-roles.yaml` | pending / approved / blocked / not-applicable |
|
|
116
|
+
|
|
110
117
|
## 状态
|
|
111
118
|
|
|
112
119
|
`ready-for-agent`
|
|
@@ -197,6 +197,8 @@ agents 是角色分工,不是越多越好。只有当任务边界清楚、上
|
|
|
197
197
|
|
|
198
198
|
Agent 交接必须写成自包含 brief,不能只丢一句“继续上面的”。推荐使用 `docs/templates/agent-brief-template.md`。
|
|
199
199
|
|
|
200
|
+
职称数字人(前端工程师、产品经理等)是叠加在上表职能分工上的配置,权威清单和会签级别见 `docs/agents/digital-human-roles.yaml`。不要用职称实例替换生命周期编排器。阶段协作组是逻辑成员;Grok 等平台的群聊人数上限只约束该运行时如何开会,不改角色表。
|
|
201
|
+
|
|
200
202
|
Agent brief 最少包含:
|
|
201
203
|
|
|
202
204
|
- 背景和相关资产路径。
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import { existsSync, readFileSync } from "node:fs";
|
|
2
|
+
import path from "node:path";
|
|
3
|
+
import { parseDocument } from "../vendor/yaml.mjs";
|
|
4
|
+
import {
|
|
5
|
+
BIOLOGICAL_ROLE_ID,
|
|
6
|
+
countersignRuleForGate,
|
|
7
|
+
loadDigitalHumanRoles,
|
|
8
|
+
collectCountersignGateIds
|
|
9
|
+
} from "./digital-human-roles.mjs";
|
|
10
|
+
import { ROOT } from "./lifecycle-registry.mjs";
|
|
11
|
+
|
|
12
|
+
const DECISIONS = new Set(["approved", "rejected", "vetoed"]);
|
|
13
|
+
const ACTOR_KINDS = new Set(["digital-human", "biological-human", "orchestrator"]);
|
|
14
|
+
|
|
15
|
+
function fail(message) {
|
|
16
|
+
throw new TypeError(message);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
function requireString(value, field) {
|
|
20
|
+
if (typeof value !== "string" || !value.trim()) fail(`${field} 不能为空`);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
function yamlFromFile(filePath, label) {
|
|
24
|
+
let source;
|
|
25
|
+
try {
|
|
26
|
+
source = readFileSync(filePath, "utf8");
|
|
27
|
+
} catch (error) {
|
|
28
|
+
if (error.code === "ENOENT") fail(`缺少${label}: ${filePath}`);
|
|
29
|
+
throw error;
|
|
30
|
+
}
|
|
31
|
+
const document = parseDocument(source, { maxAliasCount: 0, uniqueKeys: true });
|
|
32
|
+
if (document.errors.length > 0) fail(`无法解析${label}: ${document.errors[0].message}`);
|
|
33
|
+
const value = document.toJS({ maxAliasCount: 0 });
|
|
34
|
+
if (!value || typeof value !== "object" || Array.isArray(value)) fail(`${label}必须是对象`);
|
|
35
|
+
return value;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export function loadApprovalRecord(filePath) {
|
|
39
|
+
return yamlFromFile(filePath, "会签记录");
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export function resolveApprovalRef(approvalRef, fromFile = ROOT) {
|
|
43
|
+
requireString(approvalRef, "approval_ref");
|
|
44
|
+
if (path.isAbsolute(approvalRef)) return approvalRef;
|
|
45
|
+
const fromRoot = path.join(ROOT, approvalRef);
|
|
46
|
+
if (existsSync(fromRoot)) return fromRoot;
|
|
47
|
+
return path.resolve(path.dirname(fromFile), approvalRef);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export function validateApprovalRecord(record, { rolesDoc, requireApproved = false } = {}) {
|
|
51
|
+
if (!record || typeof record !== "object" || Array.isArray(record)) fail("会签记录必须是对象");
|
|
52
|
+
if (record.schema_version !== 1) fail("会签记录 schema_version 必须为 1");
|
|
53
|
+
requireString(record.gate_id, "gate_id");
|
|
54
|
+
requireString(record.decision, "decision");
|
|
55
|
+
if (!DECISIONS.has(record.decision)) fail("decision 必须是 approved、rejected 或 vetoed");
|
|
56
|
+
requireString(record.actor_kind, "actor_kind");
|
|
57
|
+
if (!ACTOR_KINDS.has(record.actor_kind)) fail("actor_kind 无效");
|
|
58
|
+
requireString(record.role_id, "role_id");
|
|
59
|
+
requireString(record.runtime_id, "runtime_id");
|
|
60
|
+
requireString(record.principal_ref, "principal_ref");
|
|
61
|
+
|
|
62
|
+
const registry = rolesDoc || loadDigitalHumanRoles();
|
|
63
|
+
const runtimeIds = new Set((registry.runtimes || []).map((runtime) => runtime.id));
|
|
64
|
+
if (!runtimeIds.has(record.runtime_id)) fail(`未知 runtime_id: ${record.runtime_id}`);
|
|
65
|
+
if (record.actor_kind === "orchestrator") fail("编排器门禁不使用会签记录关闭");
|
|
66
|
+
|
|
67
|
+
const rule = countersignRuleForGate(registry.gate_policy, record.gate_id);
|
|
68
|
+
if (!rule) fail(`${record.gate_id} 不是会签门禁;evidence_only / orchestrator 门禁不写 approval-record`);
|
|
69
|
+
|
|
70
|
+
if (requireApproved && record.decision !== "approved") {
|
|
71
|
+
fail(`${record.gate_id} 会签 decision 必须为 approved 才能关闭门禁`);
|
|
72
|
+
}
|
|
73
|
+
if (record.decision === "approved" && record.biological_veto === true) {
|
|
74
|
+
fail(`${record.gate_id} 已被生物人否决,不能标为 approved`);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
if (rule.bucket === "biological_human") {
|
|
78
|
+
if (record.actor_kind !== "biological-human") fail(`${record.gate_id} 必须由生物人会签`);
|
|
79
|
+
if (record.role_id !== BIOLOGICAL_ROLE_ID) fail(`${record.gate_id} 的 role_id 必须为 ${BIOLOGICAL_ROLE_ID}`);
|
|
80
|
+
return rule;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
if (record.actor_kind !== "digital-human") fail(`${record.gate_id} 必须由数字人会签`);
|
|
84
|
+
if (!rule.countersigners.includes(record.role_id)) {
|
|
85
|
+
fail(`${record.gate_id} 会签角色必须是 ${rule.countersigners.join(" / ")}`);
|
|
86
|
+
}
|
|
87
|
+
if (rule.drafter && record.role_id === rule.drafter) fail(`${record.gate_id} 起草者不得会签自己`);
|
|
88
|
+
if (Array.isArray(record.countersigner_role_ids) && rule.drafter && record.countersigner_role_ids.includes(rule.drafter)) {
|
|
89
|
+
fail(`${record.gate_id} 起草者不得出现在 countersigner_role_ids`);
|
|
90
|
+
}
|
|
91
|
+
if (rule.drafter && record.drafter_role_id && record.drafter_role_id !== rule.drafter) {
|
|
92
|
+
fail(`${record.gate_id} drafter_role_id 必须为 ${rule.drafter}`);
|
|
93
|
+
}
|
|
94
|
+
return rule;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
export function validateApprovalRecordFile(filePath, options = {}) {
|
|
98
|
+
return validateApprovalRecord(loadApprovalRecord(filePath), options);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
export function assertApprovedGateHasValidApproval(gateId, gateState, { checkpointPath } = {}) {
|
|
102
|
+
const rolesDoc = loadDigitalHumanRoles();
|
|
103
|
+
const countersignGates = new Set(collectCountersignGateIds(rolesDoc.gate_policy));
|
|
104
|
+
if (!countersignGates.has(gateId)) return;
|
|
105
|
+
if (!gateState || typeof gateState !== "object") fail(`${gateId} 缺少门禁状态`);
|
|
106
|
+
if (gateState.status !== "approved") return;
|
|
107
|
+
if (!gateState.approval_ref || !String(gateState.approval_ref).trim()) {
|
|
108
|
+
fail(`${gateId} 已 approved 但缺少 approval_ref`);
|
|
109
|
+
}
|
|
110
|
+
const resolved = resolveApprovalRef(gateState.approval_ref, checkpointPath || ROOT);
|
|
111
|
+
if (!existsSync(resolved)) fail(`${gateId} 的 approval_ref 不可读: ${gateState.approval_ref}`);
|
|
112
|
+
const record = loadApprovalRecord(resolved);
|
|
113
|
+
if (record.gate_id !== gateId) fail(`${gateId} 的会签记录 gate_id 不匹配`);
|
|
114
|
+
validateApprovalRecord(record, { rolesDoc, requireApproved: true });
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
export function assertCheckpointApprovals(checkpoint, checkpointPath) {
|
|
118
|
+
const gates = checkpoint?.gates;
|
|
119
|
+
if (!gates || typeof gates !== "object") return;
|
|
120
|
+
for (const [gateId, state] of Object.entries(gates)) {
|
|
121
|
+
assertApprovedGateHasValidApproval(gateId, state, { checkpointPath });
|
|
122
|
+
}
|
|
123
|
+
}
|