@bonesofspring/ai-rules 0.2.12 → 0.2.14
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/CHANGELOG.md +32 -0
- package/README.md +6 -2
- package/bin/cli.js +4 -0
- package/package.json +1 -1
- package/presets/_shared/README.md +1 -1
- package/presets/_shared/core/agent-team/agent-artifact-contracts.md +114 -0
- package/presets/_shared/core/agent-team/agent-team-orchestrator.md +64 -5
- package/presets/_shared/core/meta/preset-layering.md +1 -1
- package/presets/_shared/core/meta/preset-no-cross-stack-leakage.md +15 -1
- package/presets/_shared/core/meta/preset-pr-checklist.md +1 -1
- package/presets/_shared/core/meta/preset-twin-sync.md +4 -0
- package/presets/claude/go/agents/build-verifier.md +10 -3
- package/presets/claude/go/agents/code-reviewer.md +8 -1
- package/presets/claude/go/agents/feature-developer.md +8 -1
- package/presets/claude/go/agents/task-analyst.md +8 -1
- package/presets/claude/go/agents/task-router.md +33 -5
- package/presets/claude/go/commands/task.md +8 -6
- package/presets/claude/go/hooks/chain-team-phases.sh +195 -53
- package/presets/claude/go/rules/tooling-and-review/agent-team-orchestrator.md +30 -5
- package/presets/claude/go/rules/tooling-and-review/preset-layering.md +2 -1
- package/presets/claude/go/rules/tooling-and-review/preset-no-cross-stack-leakage.md +16 -1
- package/presets/claude/go/rules/tooling-and-review/preset-pr-checklist.md +2 -1
- package/presets/claude/go/rules/tooling-and-review/preset-token-budget.md +1 -0
- package/presets/claude/go/rules/tooling-and-review/preset-twin-sync.md +5 -0
- package/presets/claude/go/team/README.md +13 -2
- package/presets/claude/ios-swift/agents/build-verifier.md +10 -3
- package/presets/claude/ios-swift/agents/code-reviewer.md +9 -14
- package/presets/claude/ios-swift/agents/feature-developer.md +8 -1
- package/presets/claude/ios-swift/agents/task-analyst.md +8 -1
- package/presets/claude/ios-swift/agents/task-router.md +31 -3
- package/presets/claude/ios-swift/commands/task.md +8 -6
- package/presets/claude/ios-swift/hooks/chain-team-phases.sh +177 -54
- package/presets/claude/ios-swift/rules/tooling-and-review/agent-team-orchestrator.md +33 -2
- package/presets/claude/ios-swift/rules/tooling-and-review/preset-layering.md +2 -1
- package/presets/claude/ios-swift/rules/tooling-and-review/preset-no-cross-stack-leakage.md +16 -1
- package/presets/claude/ios-swift/rules/tooling-and-review/preset-pr-checklist.md +2 -1
- package/presets/claude/ios-swift/rules/tooling-and-review/preset-token-budget.md +1 -0
- package/presets/claude/ios-swift/rules/tooling-and-review/preset-twin-sync.md +5 -0
- package/presets/claude/ios-swift/team/README.md +13 -2
- package/presets/claude/java/agents/build-verifier.md +9 -2
- package/presets/claude/java/agents/code-reviewer.md +8 -1
- package/presets/claude/java/agents/feature-developer.md +8 -1
- package/presets/claude/java/agents/task-analyst.md +8 -1
- package/presets/claude/java/agents/task-router.md +31 -3
- package/presets/claude/java/commands/task.md +8 -6
- package/presets/claude/java/hooks/chain-team-phases.sh +195 -53
- package/presets/claude/java/rules/tooling-and-review/agent-team-orchestrator.md +30 -5
- package/presets/claude/java/rules/tooling-and-review/preset-layering.md +2 -1
- package/presets/claude/java/rules/tooling-and-review/preset-no-cross-stack-leakage.md +16 -1
- package/presets/claude/java/rules/tooling-and-review/preset-pr-checklist.md +2 -1
- package/presets/claude/java/rules/tooling-and-review/preset-token-budget.md +1 -0
- package/presets/claude/java/rules/tooling-and-review/preset-twin-sync.md +5 -0
- package/presets/claude/java/team/README.md +13 -2
- package/presets/claude/mcp-ts/agents/build-verifier.md +10 -3
- package/presets/claude/mcp-ts/agents/feature-developer.md +7 -1
- package/presets/claude/mcp-ts/agents/task-analyst.md +8 -1
- package/presets/claude/mcp-ts/agents/task-router.md +33 -5
- package/presets/claude/mcp-ts/commands/task.md +8 -6
- package/presets/claude/mcp-ts/hooks/chain-team-phases.sh +181 -39
- package/presets/claude/mcp-ts/rules/tooling-and-review/agent-team-orchestrator.md +30 -5
- package/presets/claude/mcp-ts/rules/tooling-and-review/preset-layering.md +2 -1
- package/presets/claude/mcp-ts/rules/tooling-and-review/preset-no-cross-stack-leakage.md +16 -1
- package/presets/claude/mcp-ts/rules/tooling-and-review/preset-pr-checklist.md +2 -1
- package/presets/claude/mcp-ts/rules/tooling-and-review/preset-token-budget.md +1 -0
- package/presets/claude/mcp-ts/rules/tooling-and-review/preset-twin-sync.md +5 -0
- package/presets/claude/mcp-ts/team/README.md +13 -2
- package/presets/claude/next/agents/accessibility-reviewer.md +6 -12
- package/presets/claude/next/agents/api-contract-reviewer.md +6 -12
- package/presets/claude/next/agents/build-verifier.md +10 -14
- package/presets/claude/next/agents/ci-investigator.md +7 -13
- package/presets/claude/next/agents/code-reviewer.md +9 -14
- package/presets/claude/next/agents/debugger.md +6 -12
- package/presets/claude/next/agents/feature-developer.md +8 -1
- package/presets/claude/next/agents/migration-specialist.md +6 -12
- package/presets/claude/next/agents/performance-auditor.md +5 -11
- package/presets/claude/next/agents/qa-tester.md +6 -12
- package/presets/claude/next/agents/security-reviewer.md +6 -12
- package/presets/claude/next/agents/solution-architect.md +6 -12
- package/presets/claude/next/agents/task-analyst.md +10 -16
- package/presets/claude/next/agents/task-router.md +31 -3
- package/presets/claude/next/agents/tech-writer.md +6 -13
- package/presets/claude/next/agents/unit-test-generator.md +6 -10
- package/presets/claude/next/agents/unit-test-healer.md +6 -10
- package/presets/claude/next/agents/unit-test-planner.md +5 -11
- package/presets/claude/next/commands/task.md +8 -6
- package/presets/claude/next/hooks/chain-team-phases.sh +197 -54
- package/presets/claude/next/rules/tooling-and-review/agent-team-orchestrator.md +29 -4
- package/presets/claude/next/rules/tooling-and-review/preset-layering.md +2 -1
- package/presets/claude/next/rules/tooling-and-review/preset-no-cross-stack-leakage.md +16 -1
- package/presets/claude/next/rules/tooling-and-review/preset-pr-checklist.md +2 -1
- package/presets/claude/next/rules/tooling-and-review/preset-token-budget.md +1 -0
- package/presets/claude/next/rules/tooling-and-review/preset-twin-sync.md +5 -0
- package/presets/claude/next/team/README.md +15 -3
- package/presets/claude/next/team/fixtures/artifact-manifest.example.json +61 -0
- package/presets/claude/next/team/fixtures/bugfix-standard.json +10 -0
- package/presets/claude/next/team/fixtures/feature-full.json +10 -0
- package/presets/claude/next/team/fixtures/feature-light.json +10 -0
- package/presets/claude/nuxt/CLAUDE.md +39 -0
- package/presets/claude/nuxt/MCP.md +16 -0
- package/presets/claude/nuxt/README.md +39 -0
- package/presets/claude/nuxt/REPO_AGENTS.md +49 -0
- package/presets/claude/nuxt/agents/README.md +199 -0
- package/presets/claude/nuxt/agents/accessibility-reviewer.md +59 -0
- package/presets/claude/nuxt/agents/api-contract-reviewer.md +63 -0
- package/presets/claude/nuxt/agents/build-verifier.md +89 -0
- package/presets/claude/nuxt/agents/ci-investigator.md +60 -0
- package/presets/claude/nuxt/agents/code-reviewer.md +62 -0
- package/presets/claude/nuxt/agents/codebase-analyzer.md +28 -0
- package/presets/claude/nuxt/agents/debugger.md +65 -0
- package/presets/claude/nuxt/agents/feature-developer.md +59 -0
- package/presets/claude/nuxt/agents/migration-specialist.md +67 -0
- package/presets/claude/nuxt/agents/performance-auditor.md +66 -0
- package/presets/claude/nuxt/agents/playwright-test-generator.md +75 -0
- package/presets/claude/nuxt/agents/playwright-test-healer.md +61 -0
- package/presets/claude/nuxt/agents/playwright-test-planner.md +67 -0
- package/presets/claude/nuxt/agents/qa-tester.md +54 -0
- package/presets/claude/nuxt/agents/security-reviewer.md +60 -0
- package/presets/claude/nuxt/agents/solution-architect.md +68 -0
- package/presets/claude/nuxt/agents/task-analyst.md +109 -0
- package/presets/claude/nuxt/agents/task-router.md +140 -0
- package/presets/claude/nuxt/agents/tech-writer.md +54 -0
- package/presets/claude/nuxt/agents/unit-test-generator.md +37 -0
- package/presets/claude/nuxt/agents/unit-test-healer.md +38 -0
- package/presets/claude/nuxt/agents/unit-test-planner.md +60 -0
- package/presets/claude/nuxt/commands/README.md +13 -0
- package/presets/claude/nuxt/commands/feature-continue.md +51 -0
- package/presets/claude/nuxt/commands/feature-start.md +30 -0
- package/presets/claude/nuxt/commands/task-continue.md +50 -0
- package/presets/claude/nuxt/commands/task.md +56 -0
- package/presets/claude/nuxt/commands/technical-retro.md +62 -0
- package/presets/claude/nuxt/hooks/README.md +14 -0
- package/presets/claude/nuxt/hooks/chain-team-phases.sh +723 -0
- package/presets/claude/nuxt/hooks/examples/README.md +18 -0
- package/presets/claude/nuxt/hooks/examples/format-edited.example.sh +11 -0
- package/presets/claude/nuxt/hooks/examples/secret-guard.example.sh +10 -0
- package/presets/claude/nuxt/hooks/examples/test-on-save.example.sh +8 -0
- package/presets/claude/nuxt/hooks/guard-shell-command.sh +77 -0
- package/presets/claude/nuxt/mcp.json +20 -0
- package/presets/claude/nuxt/rules/README.md +90 -0
- package/presets/claude/nuxt/rules/anti-hallucination/vue-nuxt-anti-hallucination.md +72 -0
- package/presets/claude/nuxt/rules/api-and-data/README.md +9 -0
- package/presets/claude/nuxt/rules/api-and-data/api-services.md +76 -0
- package/presets/claude/nuxt/rules/api-and-data/http-client.md +16 -0
- package/presets/claude/nuxt/rules/api-and-data/store-pinia.md +67 -0
- package/presets/claude/nuxt/rules/architecture/README.md +12 -0
- package/presets/claude/nuxt/rules/architecture/architecture-boundaries-ui.md +15 -0
- package/presets/claude/nuxt/rules/architecture/architecture-boundaries.md +98 -0
- package/presets/claude/nuxt/rules/architecture/feature-delivery-workflow.md +88 -0
- package/presets/claude/nuxt/rules/architecture/layer-barrel-exports.md +71 -0
- package/presets/claude/nuxt/rules/architecture/public-imports.md +60 -0
- package/presets/claude/nuxt/rules/architecture/reference-features.md +49 -0
- package/presets/claude/nuxt/rules/stack/README.md +12 -0
- package/presets/claude/nuxt/rules/stack/navigation-router-ui.md +14 -0
- package/presets/claude/nuxt/rules/stack/navigation-router.md +59 -0
- package/presets/claude/nuxt/rules/stack/no-type-assertion.md +61 -0
- package/presets/claude/nuxt/rules/stack/nuxt-app-core.md +43 -0
- package/presets/claude/nuxt/rules/stack/nuxt-pages-routing.md +39 -0
- package/presets/claude/nuxt/rules/stack/script-setup-conventions.md +12 -0
- package/presets/claude/nuxt/rules/stack/types-jsdoc.md +40 -0
- package/presets/claude/nuxt/rules/testing/README.md +11 -0
- package/presets/claude/nuxt/rules/testing/playwright-agents.md +78 -0
- package/presets/claude/nuxt/rules/testing/tests-e2e-structure.md +49 -0
- package/presets/claude/nuxt/rules/testing/tests-unit.md +75 -0
- package/presets/claude/nuxt/rules/tooling-and-review/README.md +15 -0
- package/presets/claude/nuxt/rules/tooling-and-review/agent-team-intake.md +15 -0
- package/presets/claude/nuxt/rules/tooling-and-review/agent-team-orchestrator.md +191 -0
- package/presets/claude/nuxt/rules/tooling-and-review/anti-sycophancy-discipline.md +33 -0
- package/presets/claude/nuxt/rules/tooling-and-review/code-quality.md +49 -0
- package/presets/claude/nuxt/rules/tooling-and-review/code-review-mr.md +63 -0
- package/presets/claude/nuxt/rules/tooling-and-review/design-guidance.md +114 -0
- package/presets/claude/nuxt/rules/tooling-and-review/package-manager.md +16 -0
- package/presets/claude/nuxt/rules/tooling-and-review/post-change-lint.md +43 -0
- package/presets/claude/nuxt/rules/tooling-and-review/preset-layering.md +32 -0
- package/presets/claude/nuxt/rules/tooling-and-review/preset-no-cross-stack-leakage.md +79 -0
- package/presets/claude/nuxt/rules/tooling-and-review/preset-pr-checklist.md +35 -0
- package/presets/claude/nuxt/rules/tooling-and-review/preset-token-budget.md +39 -0
- package/presets/claude/nuxt/rules/tooling-and-review/preset-twin-sync.md +50 -0
- package/presets/claude/nuxt/rules/tooling-and-review/security-nuxt.md +37 -0
- package/presets/claude/nuxt/rules/tooling-and-review/technical-retro.md +15 -0
- package/presets/claude/nuxt/rules/ui-and-accessibility/README.md +12 -0
- package/presets/claude/nuxt/rules/ui-and-accessibility/css-property-order.md +11 -0
- package/presets/claude/nuxt/rules/ui-and-accessibility/no-v-bind-spread.md +12 -0
- package/presets/claude/nuxt/rules/ui-and-accessibility/vue-a11y-coding.md +16 -0
- package/presets/claude/nuxt/rules/ui-and-accessibility/vue-ui.md +34 -0
- package/presets/claude/nuxt/skills/README.md +17 -0
- package/presets/claude/nuxt/skills/ci-investigation/SKILL.md +36 -0
- package/presets/claude/nuxt/skills/code-review/SKILL.md +38 -0
- package/presets/claude/nuxt/skills/debug-investigation/SKILL.md +32 -0
- package/presets/claude/nuxt/skills/feature-delivery/SKILL.md +34 -0
- package/presets/claude/nuxt/skills/playwright-e2e/SKILL.md +37 -0
- package/presets/claude/nuxt/skills/technical-retro/SKILL.md +54 -0
- package/presets/claude/nuxt/skills/unit-testing/SKILL.md +32 -0
- package/presets/claude/nuxt/skills/vue-performance/SKILL.md +53 -0
- package/presets/claude/nuxt/skills/write-adr/SKILL.md +41 -0
- package/presets/claude/nuxt/team/README.md +136 -0
- package/presets/claude/nuxt/team/conventions.md +21 -0
- package/presets/claude/nuxt/team/fixtures/artifact-manifest.example.json +61 -0
- package/presets/claude/nuxt/team/fixtures/bugfix-standard.json +25 -0
- package/presets/claude/nuxt/team/fixtures/feature-full.json +28 -0
- package/presets/claude/nuxt/team/fixtures/feature-light.json +27 -0
- package/presets/claude/nuxt/team/tasks/.gitkeep +1 -0
- package/presets/claude/php-hexagonal/agents/build-verifier.md +10 -3
- package/presets/claude/php-hexagonal/agents/code-reviewer.md +8 -1
- package/presets/claude/php-hexagonal/agents/feature-developer.md +8 -1
- package/presets/claude/php-hexagonal/agents/task-analyst.md +8 -1
- package/presets/claude/php-hexagonal/agents/task-router.md +31 -3
- package/presets/claude/php-hexagonal/commands/task.md +8 -6
- package/presets/claude/php-hexagonal/hooks/README.md +1 -1
- package/presets/claude/php-hexagonal/hooks/chain-team-phases.sh +195 -53
- package/presets/claude/php-hexagonal/rules/tooling-and-review/agent-team-orchestrator.md +30 -5
- package/presets/claude/php-hexagonal/rules/tooling-and-review/preset-layering.md +2 -1
- package/presets/claude/php-hexagonal/rules/tooling-and-review/preset-no-cross-stack-leakage.md +16 -1
- package/presets/claude/php-hexagonal/rules/tooling-and-review/preset-pr-checklist.md +2 -1
- package/presets/claude/php-hexagonal/rules/tooling-and-review/preset-token-budget.md +1 -0
- package/presets/claude/php-hexagonal/rules/tooling-and-review/preset-twin-sync.md +5 -0
- package/presets/claude/php-hexagonal/team/README.md +13 -2
- package/presets/claude/php-laravel/agents/build-verifier.md +10 -3
- package/presets/claude/php-laravel/agents/code-reviewer.md +8 -1
- package/presets/claude/php-laravel/agents/feature-developer.md +8 -1
- package/presets/claude/php-laravel/agents/task-analyst.md +8 -1
- package/presets/claude/php-laravel/agents/task-router.md +31 -3
- package/presets/claude/php-laravel/commands/task.md +8 -6
- package/presets/claude/php-laravel/hooks/chain-team-phases.sh +195 -53
- package/presets/claude/php-laravel/rules/tooling-and-review/agent-team-orchestrator.md +30 -5
- package/presets/claude/php-laravel/rules/tooling-and-review/preset-layering.md +2 -1
- package/presets/claude/php-laravel/rules/tooling-and-review/preset-no-cross-stack-leakage.md +16 -1
- package/presets/claude/php-laravel/rules/tooling-and-review/preset-pr-checklist.md +2 -1
- package/presets/claude/php-laravel/rules/tooling-and-review/preset-token-budget.md +1 -0
- package/presets/claude/php-laravel/rules/tooling-and-review/preset-twin-sync.md +5 -0
- package/presets/claude/php-laravel/team/README.md +13 -2
- package/presets/claude/svelte/CLAUDE.md +39 -0
- package/presets/claude/svelte/MCP.md +16 -0
- package/presets/claude/svelte/README.md +13 -0
- package/presets/claude/svelte/REPO_AGENTS.md +49 -0
- package/presets/claude/svelte/agents/README.md +199 -0
- package/presets/claude/svelte/agents/accessibility-reviewer.md +59 -0
- package/presets/claude/svelte/agents/api-contract-reviewer.md +63 -0
- package/presets/claude/svelte/agents/build-verifier.md +89 -0
- package/presets/claude/svelte/agents/ci-investigator.md +60 -0
- package/presets/claude/svelte/agents/code-reviewer.md +62 -0
- package/presets/claude/svelte/agents/codebase-analyzer.md +28 -0
- package/presets/claude/svelte/agents/debugger.md +65 -0
- package/presets/claude/svelte/agents/feature-developer.md +59 -0
- package/presets/claude/svelte/agents/migration-specialist.md +67 -0
- package/presets/claude/svelte/agents/performance-auditor.md +66 -0
- package/presets/claude/svelte/agents/playwright-test-generator.md +75 -0
- package/presets/claude/svelte/agents/playwright-test-healer.md +61 -0
- package/presets/claude/svelte/agents/playwright-test-planner.md +67 -0
- package/presets/claude/svelte/agents/qa-tester.md +54 -0
- package/presets/claude/svelte/agents/security-reviewer.md +60 -0
- package/presets/claude/svelte/agents/solution-architect.md +68 -0
- package/presets/claude/svelte/agents/task-analyst.md +109 -0
- package/presets/claude/svelte/agents/task-router.md +140 -0
- package/presets/claude/svelte/agents/tech-writer.md +54 -0
- package/presets/claude/svelte/agents/unit-test-generator.md +37 -0
- package/presets/claude/svelte/agents/unit-test-healer.md +38 -0
- package/presets/claude/svelte/agents/unit-test-planner.md +60 -0
- package/presets/claude/svelte/commands/README.md +13 -0
- package/presets/claude/svelte/commands/feature-continue.md +51 -0
- package/presets/claude/svelte/commands/feature-start.md +30 -0
- package/presets/claude/svelte/commands/task-continue.md +50 -0
- package/presets/claude/svelte/commands/task.md +56 -0
- package/presets/claude/svelte/commands/technical-retro.md +62 -0
- package/presets/claude/svelte/hooks/README.md +14 -0
- package/presets/claude/svelte/hooks/chain-team-phases.sh +723 -0
- package/presets/claude/svelte/hooks/examples/README.md +18 -0
- package/presets/claude/svelte/hooks/examples/format-edited.example.sh +13 -0
- package/presets/claude/svelte/hooks/examples/secret-guard.example.sh +10 -0
- package/presets/claude/svelte/hooks/examples/test-on-save.example.sh +14 -0
- package/presets/claude/svelte/hooks/guard-shell-command.sh +77 -0
- package/presets/claude/svelte/mcp.json +20 -0
- package/presets/claude/svelte/rules/README.md +90 -0
- package/presets/claude/svelte/rules/anti-hallucination/svelte-sveltekit-anti-hallucination.md +71 -0
- package/presets/claude/svelte/rules/api-and-data/README.md +9 -0
- package/presets/claude/svelte/rules/api-and-data/api-services.md +45 -0
- package/presets/claude/svelte/rules/api-and-data/http-client.md +17 -0
- package/presets/claude/svelte/rules/api-and-data/store-svelte.md +67 -0
- package/presets/claude/svelte/rules/architecture/README.md +12 -0
- package/presets/claude/svelte/rules/architecture/architecture-boundaries-ui.md +16 -0
- package/presets/claude/svelte/rules/architecture/architecture-boundaries.md +65 -0
- package/presets/claude/svelte/rules/architecture/feature-delivery-workflow.md +61 -0
- package/presets/claude/svelte/rules/architecture/layer-barrel-exports.md +73 -0
- package/presets/claude/svelte/rules/architecture/public-imports.md +43 -0
- package/presets/claude/svelte/rules/architecture/reference-features.md +50 -0
- package/presets/claude/svelte/rules/stack/README.md +12 -0
- package/presets/claude/svelte/rules/stack/navigation-router-ui.md +26 -0
- package/presets/claude/svelte/rules/stack/navigation-router.md +41 -0
- package/presets/claude/svelte/rules/stack/no-type-assertion.md +59 -0
- package/presets/claude/svelte/rules/stack/svelte-app-core.md +44 -0
- package/presets/claude/svelte/rules/stack/svelte-script-conventions.md +33 -0
- package/presets/claude/svelte/rules/stack/sveltekit-routing.md +40 -0
- package/presets/claude/svelte/rules/stack/types-jsdoc.md +42 -0
- package/presets/claude/svelte/rules/testing/README.md +11 -0
- package/presets/claude/svelte/rules/testing/playwright-agents.md +80 -0
- package/presets/claude/svelte/rules/testing/tests-e2e-structure.md +51 -0
- package/presets/claude/svelte/rules/testing/tests-unit.md +40 -0
- package/presets/claude/svelte/rules/tooling-and-review/README.md +15 -0
- package/presets/claude/svelte/rules/tooling-and-review/agent-team-intake.md +17 -0
- package/presets/claude/svelte/rules/tooling-and-review/agent-team-orchestrator.md +193 -0
- package/presets/claude/svelte/rules/tooling-and-review/anti-sycophancy-discipline.md +29 -0
- package/presets/claude/svelte/rules/tooling-and-review/code-quality.md +50 -0
- package/presets/claude/svelte/rules/tooling-and-review/code-review-mr.md +64 -0
- package/presets/claude/svelte/rules/tooling-and-review/design-guidance.md +110 -0
- package/presets/claude/svelte/rules/tooling-and-review/package-manager.md +17 -0
- package/presets/claude/svelte/rules/tooling-and-review/post-change-lint.md +44 -0
- package/presets/claude/svelte/rules/tooling-and-review/preset-layering.md +36 -0
- package/presets/claude/svelte/rules/tooling-and-review/preset-no-cross-stack-leakage.md +83 -0
- package/presets/claude/svelte/rules/tooling-and-review/preset-pr-checklist.md +39 -0
- package/presets/claude/svelte/rules/tooling-and-review/preset-token-budget.md +41 -0
- package/presets/claude/svelte/rules/tooling-and-review/preset-twin-sync.md +54 -0
- package/presets/claude/svelte/rules/tooling-and-review/security-sveltekit.md +41 -0
- package/presets/claude/svelte/rules/tooling-and-review/technical-retro.md +17 -0
- package/presets/claude/svelte/rules/ui-and-accessibility/README.md +12 -0
- package/presets/claude/svelte/rules/ui-and-accessibility/css-property-order.md +12 -0
- package/presets/claude/svelte/rules/ui-and-accessibility/no-rest-props-spread.md +32 -0
- package/presets/claude/svelte/rules/ui-and-accessibility/svelte-a11y-coding.md +28 -0
- package/presets/claude/svelte/rules/ui-and-accessibility/svelte-ui.md +38 -0
- package/presets/claude/svelte/skills/README.md +17 -0
- package/presets/claude/svelte/skills/ci-investigation/SKILL.md +36 -0
- package/presets/claude/svelte/skills/code-review/SKILL.md +38 -0
- package/presets/claude/svelte/skills/debug-investigation/SKILL.md +32 -0
- package/presets/claude/svelte/skills/feature-delivery/SKILL.md +34 -0
- package/presets/claude/svelte/skills/playwright-e2e/SKILL.md +37 -0
- package/presets/claude/svelte/skills/svelte-performance/SKILL.md +52 -0
- package/presets/claude/svelte/skills/technical-retro/SKILL.md +54 -0
- package/presets/claude/svelte/skills/unit-testing/SKILL.md +32 -0
- package/presets/claude/svelte/skills/write-adr/SKILL.md +41 -0
- package/presets/claude/svelte/team/README.md +136 -0
- package/presets/claude/svelte/team/conventions.md +21 -0
- package/presets/claude/svelte/team/fixtures/artifact-manifest.example.json +61 -0
- package/presets/claude/svelte/team/fixtures/bugfix-standard.json +25 -0
- package/presets/claude/svelte/team/fixtures/feature-full.json +28 -0
- package/presets/claude/svelte/team/fixtures/feature-light.json +27 -0
- package/presets/claude/svelte/team/tasks/.gitkeep +1 -0
- package/presets/cursor/go/agents/build-verifier.md +9 -2
- package/presets/cursor/go/agents/code-reviewer.md +8 -1
- package/presets/cursor/go/agents/feature-developer.md +8 -1
- package/presets/cursor/go/agents/task-analyst.md +8 -1
- package/presets/cursor/go/agents/task-router.md +31 -3
- package/presets/cursor/go/commands/task.md +8 -6
- package/presets/cursor/go/hooks/chain-team-phases.sh +195 -53
- package/presets/cursor/go/rules/agent-team-orchestrator.mdc +30 -5
- package/presets/cursor/go/rules/preset-layering.mdc +2 -1
- package/presets/cursor/go/rules/preset-no-cross-stack-leakage.mdc +16 -1
- package/presets/cursor/go/rules/preset-pr-checklist.mdc +2 -1
- package/presets/cursor/go/rules/preset-token-budget.mdc +1 -0
- package/presets/cursor/go/rules/preset-twin-sync.mdc +5 -0
- package/presets/cursor/go/team/README.md +13 -2
- package/presets/cursor/ios-swift/agents/build-verifier.md +10 -3
- package/presets/cursor/ios-swift/agents/code-reviewer.md +9 -14
- package/presets/cursor/ios-swift/agents/feature-developer.md +8 -1
- package/presets/cursor/ios-swift/agents/task-analyst.md +8 -1
- package/presets/cursor/ios-swift/agents/task-router.md +31 -3
- package/presets/cursor/ios-swift/commands/task.md +8 -6
- package/presets/cursor/ios-swift/hooks/chain-team-phases.sh +195 -54
- package/presets/cursor/ios-swift/rules/agent-team-orchestrator.mdc +23 -2
- package/presets/cursor/ios-swift/rules/preset-layering.mdc +2 -1
- package/presets/cursor/ios-swift/rules/preset-no-cross-stack-leakage.mdc +16 -1
- package/presets/cursor/ios-swift/rules/preset-pr-checklist.mdc +2 -1
- package/presets/cursor/ios-swift/rules/preset-token-budget.mdc +1 -0
- package/presets/cursor/ios-swift/rules/preset-twin-sync.mdc +5 -0
- package/presets/cursor/ios-swift/team/README.md +13 -2
- package/presets/cursor/java/agents/build-verifier.md +9 -2
- package/presets/cursor/java/agents/code-reviewer.md +8 -1
- package/presets/cursor/java/agents/feature-developer.md +8 -1
- package/presets/cursor/java/agents/task-analyst.md +8 -1
- package/presets/cursor/java/agents/task-router.md +31 -3
- package/presets/cursor/java/commands/task.md +8 -6
- package/presets/cursor/java/hooks/chain-team-phases.sh +195 -53
- package/presets/cursor/java/rules/agent-team-orchestrator.mdc +30 -5
- package/presets/cursor/java/rules/preset-layering.mdc +2 -1
- package/presets/cursor/java/rules/preset-no-cross-stack-leakage.mdc +16 -1
- package/presets/cursor/java/rules/preset-pr-checklist.mdc +2 -1
- package/presets/cursor/java/rules/preset-token-budget.mdc +1 -0
- package/presets/cursor/java/rules/preset-twin-sync.mdc +5 -0
- package/presets/cursor/java/team/README.md +13 -2
- package/presets/cursor/mcp-ts/agents/build-verifier.md +9 -2
- package/presets/cursor/mcp-ts/agents/feature-developer.md +7 -1
- package/presets/cursor/mcp-ts/agents/task-analyst.md +8 -1
- package/presets/cursor/mcp-ts/agents/task-router.md +31 -3
- package/presets/cursor/mcp-ts/commands/task.md +8 -6
- package/presets/cursor/mcp-ts/hooks/chain-team-phases.sh +181 -39
- package/presets/cursor/mcp-ts/rules/agent-team-orchestrator.mdc +30 -5
- package/presets/cursor/mcp-ts/rules/preset-layering.mdc +2 -1
- package/presets/cursor/mcp-ts/rules/preset-no-cross-stack-leakage.mdc +16 -1
- package/presets/cursor/mcp-ts/rules/preset-pr-checklist.mdc +2 -1
- package/presets/cursor/mcp-ts/rules/preset-token-budget.mdc +1 -0
- package/presets/cursor/mcp-ts/rules/preset-twin-sync.mdc +5 -0
- package/presets/cursor/mcp-ts/team/README.md +13 -2
- package/presets/cursor/next/agents/accessibility-reviewer.md +7 -14
- package/presets/cursor/next/agents/api-contract-reviewer.md +7 -14
- package/presets/cursor/next/agents/build-verifier.md +10 -15
- package/presets/cursor/next/agents/ci-investigator.md +7 -14
- package/presets/cursor/next/agents/code-reviewer.md +9 -14
- package/presets/cursor/next/agents/debugger.md +6 -12
- package/presets/cursor/next/agents/feature-developer.md +8 -1
- package/presets/cursor/next/agents/migration-specialist.md +7 -14
- package/presets/cursor/next/agents/performance-auditor.md +6 -13
- package/presets/cursor/next/agents/qa-tester.md +6 -13
- package/presets/cursor/next/agents/security-reviewer.md +7 -14
- package/presets/cursor/next/agents/solution-architect.md +6 -12
- package/presets/cursor/next/agents/task-analyst.md +10 -16
- package/presets/cursor/next/agents/task-router.md +31 -3
- package/presets/cursor/next/agents/tech-writer.md +6 -13
- package/presets/cursor/next/agents/unit-test-generator.md +6 -11
- package/presets/cursor/next/agents/unit-test-healer.md +6 -11
- package/presets/cursor/next/agents/unit-test-planner.md +6 -13
- package/presets/cursor/next/commands/task.md +8 -6
- package/presets/cursor/next/hooks/chain-team-phases.sh +197 -54
- package/presets/cursor/next/rules/agent-team-orchestrator.mdc +30 -5
- package/presets/cursor/next/rules/preset-layering.mdc +2 -1
- package/presets/cursor/next/rules/preset-no-cross-stack-leakage.mdc +16 -1
- package/presets/cursor/next/rules/preset-pr-checklist.mdc +2 -1
- package/presets/cursor/next/rules/preset-token-budget.mdc +1 -0
- package/presets/cursor/next/rules/preset-twin-sync.mdc +5 -0
- package/presets/cursor/next/team/README.md +16 -4
- package/presets/cursor/next/team/fixtures/artifact-manifest.example.json +61 -0
- package/presets/cursor/next/team/fixtures/bugfix-standard.json +10 -0
- package/presets/cursor/next/team/fixtures/feature-full.json +10 -0
- package/presets/cursor/next/team/fixtures/feature-light.json +10 -0
- package/presets/cursor/nuxt/AGENTS.md +39 -0
- package/presets/cursor/nuxt/BUGBOT.md +14 -0
- package/presets/cursor/nuxt/MCP.md +16 -0
- package/presets/cursor/nuxt/README.md +47 -0
- package/presets/cursor/nuxt/REPO_AGENTS.md +49 -0
- package/presets/cursor/nuxt/agents/README.md +206 -0
- package/presets/cursor/nuxt/agents/accessibility-reviewer.md +60 -0
- package/presets/cursor/nuxt/agents/api-contract-reviewer.md +64 -0
- package/presets/cursor/nuxt/agents/build-verifier.md +90 -0
- package/presets/cursor/nuxt/agents/ci-investigator.md +61 -0
- package/presets/cursor/nuxt/agents/code-reviewer.md +63 -0
- package/presets/cursor/nuxt/agents/codebase-analyzer.md +28 -0
- package/presets/cursor/nuxt/agents/debugger.md +66 -0
- package/presets/cursor/nuxt/agents/feature-developer.md +60 -0
- package/presets/cursor/nuxt/agents/migration-specialist.md +68 -0
- package/presets/cursor/nuxt/agents/performance-auditor.md +67 -0
- package/presets/cursor/nuxt/agents/playwright-test-generator.md +27 -0
- package/presets/cursor/nuxt/agents/playwright-test-healer.md +27 -0
- package/presets/cursor/nuxt/agents/playwright-test-planner.md +28 -0
- package/presets/cursor/nuxt/agents/qa-tester.md +55 -0
- package/presets/cursor/nuxt/agents/security-reviewer.md +61 -0
- package/presets/cursor/nuxt/agents/solution-architect.md +69 -0
- package/presets/cursor/nuxt/agents/task-analyst.md +110 -0
- package/presets/cursor/nuxt/agents/task-router.md +141 -0
- package/presets/cursor/nuxt/agents/tech-writer.md +55 -0
- package/presets/cursor/nuxt/agents/unit-test-generator.md +38 -0
- package/presets/cursor/nuxt/agents/unit-test-healer.md +39 -0
- package/presets/cursor/nuxt/agents/unit-test-planner.md +61 -0
- package/presets/cursor/nuxt/commands/README.md +51 -0
- package/presets/cursor/nuxt/commands/feature-continue.md +19 -0
- package/presets/cursor/nuxt/commands/feature-start.md +33 -0
- package/presets/cursor/nuxt/commands/task-continue.md +50 -0
- package/presets/cursor/nuxt/commands/task.md +56 -0
- package/presets/cursor/nuxt/commands/technical-retro.md +85 -0
- package/presets/cursor/nuxt/hooks/README.md +12 -0
- package/presets/cursor/nuxt/hooks/chain-team-phases.sh +727 -0
- package/presets/cursor/nuxt/hooks/examples/README.md +18 -0
- package/presets/cursor/nuxt/hooks/examples/format-edited.example.sh +11 -0
- package/presets/cursor/nuxt/hooks/examples/secret-guard.example.sh +10 -0
- package/presets/cursor/nuxt/hooks/examples/test-on-save.example.sh +8 -0
- package/presets/cursor/nuxt/hooks/guard-shell-command.sh +77 -0
- package/presets/cursor/nuxt/hooks.json +17 -0
- package/presets/cursor/nuxt/mcp.json +19 -0
- package/presets/cursor/nuxt/rules/README.md +108 -0
- package/presets/cursor/nuxt/rules/agent-team-intake.mdc +16 -0
- package/presets/cursor/nuxt/rules/agent-team-orchestrator.mdc +192 -0
- package/presets/cursor/nuxt/rules/anti-sycophancy-discipline.mdc +30 -0
- package/presets/cursor/nuxt/rules/api-services.mdc +79 -0
- package/presets/cursor/nuxt/rules/architecture-boundaries-ui.mdc +15 -0
- package/presets/cursor/nuxt/rules/architecture-boundaries.mdc +97 -0
- package/presets/cursor/nuxt/rules/code-quality-and-refactoring.mdc +51 -0
- package/presets/cursor/nuxt/rules/code-review-mr.mdc +58 -0
- package/presets/cursor/nuxt/rules/css-property-order-stylelint.mdc +12 -0
- package/presets/cursor/nuxt/rules/design-guidance.mdc +111 -0
- package/presets/cursor/nuxt/rules/feature-delivery-workflow.mdc +83 -0
- package/presets/cursor/nuxt/rules/http-client.mdc +15 -0
- package/presets/cursor/nuxt/rules/layer-barrel-exports.mdc +74 -0
- package/presets/cursor/nuxt/rules/navigation-router-stack.mdc +61 -0
- package/presets/cursor/nuxt/rules/navigation-router-ui.mdc +16 -0
- package/presets/cursor/nuxt/rules/no-type-assertion-as-import-export.mdc +60 -0
- package/presets/cursor/nuxt/rules/no-v-bind-spread.mdc +13 -0
- package/presets/cursor/nuxt/rules/nuxt-app-core.mdc +45 -0
- package/presets/cursor/nuxt/rules/nuxt-pages-routing.mdc +37 -0
- package/presets/cursor/nuxt/rules/package-manager.mdc +18 -0
- package/presets/cursor/nuxt/rules/playwright-agents.mdc +80 -0
- package/presets/cursor/nuxt/rules/post-change-lint.mdc +42 -0
- package/presets/cursor/nuxt/rules/preset-layering.mdc +37 -0
- package/presets/cursor/nuxt/rules/preset-no-cross-stack-leakage.mdc +84 -0
- package/presets/cursor/nuxt/rules/preset-pr-checklist.mdc +40 -0
- package/presets/cursor/nuxt/rules/preset-token-budget.mdc +42 -0
- package/presets/cursor/nuxt/rules/preset-twin-sync.mdc +55 -0
- package/presets/cursor/nuxt/rules/public-imports.mdc +62 -0
- package/presets/cursor/nuxt/rules/reference-features.mdc +49 -0
- package/presets/cursor/nuxt/rules/script-setup-conventions.mdc +13 -0
- package/presets/cursor/nuxt/rules/security-nuxt.mdc +34 -0
- package/presets/cursor/nuxt/rules/store-pinia.mdc +68 -0
- package/presets/cursor/nuxt/rules/technical-retro.mdc +16 -0
- package/presets/cursor/nuxt/rules/tests-e2e-structure.mdc +51 -0
- package/presets/cursor/nuxt/rules/tests-unit.mdc +78 -0
- package/presets/cursor/nuxt/rules/types-jsdoc.mdc +42 -0
- package/presets/cursor/nuxt/rules/vue-a11y-coding.mdc +15 -0
- package/presets/cursor/nuxt/rules/vue-nuxt-anti-hallucination.mdc +68 -0
- package/presets/cursor/nuxt/rules/vue-ui.mdc +33 -0
- package/presets/cursor/nuxt/skills/README.md +17 -0
- package/presets/cursor/nuxt/skills/ci-investigation/SKILL.md +36 -0
- package/presets/cursor/nuxt/skills/code-review/SKILL.md +38 -0
- package/presets/cursor/nuxt/skills/debug-investigation/SKILL.md +32 -0
- package/presets/cursor/nuxt/skills/feature-delivery/SKILL.md +34 -0
- package/presets/cursor/nuxt/skills/playwright-e2e/SKILL.md +37 -0
- package/presets/cursor/nuxt/skills/technical-retro/SKILL.md +54 -0
- package/presets/cursor/nuxt/skills/unit-testing/SKILL.md +32 -0
- package/presets/cursor/nuxt/skills/vue-performance/SKILL.md +53 -0
- package/presets/cursor/nuxt/skills/write-adr/SKILL.md +41 -0
- package/presets/cursor/nuxt/team/README.md +140 -0
- package/presets/cursor/nuxt/team/conventions.md +21 -0
- package/presets/cursor/nuxt/team/fixtures/artifact-manifest.example.json +61 -0
- package/presets/cursor/nuxt/team/fixtures/bugfix-standard.json +25 -0
- package/presets/cursor/nuxt/team/fixtures/feature-full.json +28 -0
- package/presets/cursor/nuxt/team/fixtures/feature-light.json +27 -0
- package/presets/cursor/nuxt/team/fixtures/metrics-scenarios/tasks/human-gate/metrics.json +69 -0
- package/presets/cursor/nuxt/team/fixtures/metrics-scenarios/tasks/missing-ledger/status.json +5 -0
- package/presets/cursor/nuxt/team/fixtures/metrics-scenarios/tasks/parallel-receipts/metrics.json +79 -0
- package/presets/cursor/nuxt/team/fixtures/metrics-scenarios/tasks/serial-retry/metrics.json +124 -0
- package/presets/cursor/nuxt/team/fixtures/metrics-scenarios/tasks/validation-failed/metrics.json +124 -0
- package/presets/cursor/nuxt/team/fixtures/metrics.example.json +54 -0
- package/presets/cursor/nuxt/team/tasks/.gitkeep +0 -0
- package/presets/cursor/php-hexagonal/agents/build-verifier.md +9 -2
- package/presets/cursor/php-hexagonal/agents/code-reviewer.md +8 -1
- package/presets/cursor/php-hexagonal/agents/feature-developer.md +8 -1
- package/presets/cursor/php-hexagonal/agents/task-analyst.md +8 -1
- package/presets/cursor/php-hexagonal/agents/task-router.md +31 -3
- package/presets/cursor/php-hexagonal/commands/task.md +8 -6
- package/presets/cursor/php-hexagonal/hooks/chain-team-phases.sh +195 -53
- package/presets/cursor/php-hexagonal/rules/agent-team-orchestrator.mdc +30 -5
- package/presets/cursor/php-hexagonal/rules/preset-layering.mdc +2 -1
- package/presets/cursor/php-hexagonal/rules/preset-no-cross-stack-leakage.mdc +16 -1
- package/presets/cursor/php-hexagonal/rules/preset-pr-checklist.mdc +2 -1
- package/presets/cursor/php-hexagonal/rules/preset-token-budget.mdc +1 -0
- package/presets/cursor/php-hexagonal/rules/preset-twin-sync.mdc +5 -0
- package/presets/cursor/php-hexagonal/team/README.md +13 -2
- package/presets/cursor/php-laravel/agents/build-verifier.md +9 -2
- package/presets/cursor/php-laravel/agents/code-reviewer.md +8 -1
- package/presets/cursor/php-laravel/agents/feature-developer.md +8 -1
- package/presets/cursor/php-laravel/agents/task-analyst.md +8 -1
- package/presets/cursor/php-laravel/agents/task-router.md +31 -3
- package/presets/cursor/php-laravel/commands/task.md +8 -6
- package/presets/cursor/php-laravel/hooks/chain-team-phases.sh +195 -53
- package/presets/cursor/php-laravel/rules/agent-team-orchestrator.mdc +30 -5
- package/presets/cursor/php-laravel/rules/preset-layering.mdc +2 -1
- package/presets/cursor/php-laravel/rules/preset-no-cross-stack-leakage.mdc +16 -1
- package/presets/cursor/php-laravel/rules/preset-pr-checklist.mdc +2 -1
- package/presets/cursor/php-laravel/rules/preset-token-budget.mdc +1 -0
- package/presets/cursor/php-laravel/rules/preset-twin-sync.mdc +5 -0
- package/presets/cursor/php-laravel/team/README.md +13 -2
- package/presets/cursor/svelte/AGENTS.md +39 -0
- package/presets/cursor/svelte/BUGBOT.md +14 -0
- package/presets/cursor/svelte/MCP.md +16 -0
- package/presets/cursor/svelte/README.md +47 -0
- package/presets/cursor/svelte/REPO_AGENTS.md +49 -0
- package/presets/cursor/svelte/agents/README.md +206 -0
- package/presets/cursor/svelte/agents/accessibility-reviewer.md +60 -0
- package/presets/cursor/svelte/agents/api-contract-reviewer.md +64 -0
- package/presets/cursor/svelte/agents/build-verifier.md +90 -0
- package/presets/cursor/svelte/agents/ci-investigator.md +61 -0
- package/presets/cursor/svelte/agents/code-reviewer.md +63 -0
- package/presets/cursor/svelte/agents/codebase-analyzer.md +28 -0
- package/presets/cursor/svelte/agents/debugger.md +66 -0
- package/presets/cursor/svelte/agents/feature-developer.md +60 -0
- package/presets/cursor/svelte/agents/migration-specialist.md +68 -0
- package/presets/cursor/svelte/agents/performance-auditor.md +67 -0
- package/presets/cursor/svelte/agents/playwright-test-generator.md +27 -0
- package/presets/cursor/svelte/agents/playwright-test-healer.md +27 -0
- package/presets/cursor/svelte/agents/playwright-test-planner.md +28 -0
- package/presets/cursor/svelte/agents/qa-tester.md +55 -0
- package/presets/cursor/svelte/agents/security-reviewer.md +61 -0
- package/presets/cursor/svelte/agents/solution-architect.md +69 -0
- package/presets/cursor/svelte/agents/task-analyst.md +110 -0
- package/presets/cursor/svelte/agents/task-router.md +141 -0
- package/presets/cursor/svelte/agents/tech-writer.md +55 -0
- package/presets/cursor/svelte/agents/unit-test-generator.md +38 -0
- package/presets/cursor/svelte/agents/unit-test-healer.md +39 -0
- package/presets/cursor/svelte/agents/unit-test-planner.md +61 -0
- package/presets/cursor/svelte/commands/README.md +51 -0
- package/presets/cursor/svelte/commands/feature-continue.md +19 -0
- package/presets/cursor/svelte/commands/feature-start.md +33 -0
- package/presets/cursor/svelte/commands/task-continue.md +50 -0
- package/presets/cursor/svelte/commands/task.md +56 -0
- package/presets/cursor/svelte/commands/technical-retro.md +85 -0
- package/presets/cursor/svelte/hooks/README.md +12 -0
- package/presets/cursor/svelte/hooks/chain-team-phases.sh +727 -0
- package/presets/cursor/svelte/hooks/examples/README.md +18 -0
- package/presets/cursor/svelte/hooks/examples/format-edited.example.sh +13 -0
- package/presets/cursor/svelte/hooks/examples/secret-guard.example.sh +10 -0
- package/presets/cursor/svelte/hooks/examples/test-on-save.example.sh +14 -0
- package/presets/cursor/svelte/hooks/guard-shell-command.sh +77 -0
- package/presets/cursor/svelte/hooks.json +17 -0
- package/presets/cursor/svelte/mcp.json +19 -0
- package/presets/cursor/svelte/rules/README.md +86 -0
- package/presets/cursor/svelte/rules/agent-team-intake.mdc +16 -0
- package/presets/cursor/svelte/rules/agent-team-orchestrator.mdc +192 -0
- package/presets/cursor/svelte/rules/anti-sycophancy-discipline.mdc +30 -0
- package/presets/cursor/svelte/rules/api-services.mdc +46 -0
- package/presets/cursor/svelte/rules/architecture-boundaries-ui.mdc +15 -0
- package/presets/cursor/svelte/rules/architecture-boundaries.mdc +61 -0
- package/presets/cursor/svelte/rules/code-quality-and-refactoring.mdc +51 -0
- package/presets/cursor/svelte/rules/code-review-mr.mdc +58 -0
- package/presets/cursor/svelte/rules/css-property-order-stylelint.mdc +12 -0
- package/presets/cursor/svelte/rules/design-guidance.mdc +111 -0
- package/presets/cursor/svelte/rules/feature-delivery-workflow.mdc +55 -0
- package/presets/cursor/svelte/rules/http-client.mdc +16 -0
- package/presets/cursor/svelte/rules/layer-barrel-exports.mdc +74 -0
- package/presets/cursor/svelte/rules/navigation-router-stack.mdc +40 -0
- package/presets/cursor/svelte/rules/navigation-router-ui.mdc +25 -0
- package/presets/cursor/svelte/rules/no-rest-props-spread.mdc +32 -0
- package/presets/cursor/svelte/rules/no-type-assertion-as-import-export.mdc +60 -0
- package/presets/cursor/svelte/rules/package-manager.mdc +18 -0
- package/presets/cursor/svelte/rules/playwright-agents.mdc +80 -0
- package/presets/cursor/svelte/rules/post-change-lint.mdc +42 -0
- package/presets/cursor/svelte/rules/preset-layering.mdc +37 -0
- package/presets/cursor/svelte/rules/preset-no-cross-stack-leakage.mdc +84 -0
- package/presets/cursor/svelte/rules/preset-pr-checklist.mdc +40 -0
- package/presets/cursor/svelte/rules/preset-token-budget.mdc +42 -0
- package/presets/cursor/svelte/rules/preset-twin-sync.mdc +55 -0
- package/presets/cursor/svelte/rules/public-imports.mdc +45 -0
- package/presets/cursor/svelte/rules/reference-features.mdc +51 -0
- package/presets/cursor/svelte/rules/security-sveltekit.mdc +38 -0
- package/presets/cursor/svelte/rules/store-svelte.mdc +66 -0
- package/presets/cursor/svelte/rules/svelte-a11y-coding.mdc +27 -0
- package/presets/cursor/svelte/rules/svelte-app-core.mdc +45 -0
- package/presets/cursor/svelte/rules/svelte-script-conventions.mdc +33 -0
- package/presets/cursor/svelte/rules/svelte-sveltekit-anti-hallucination.mdc +69 -0
- package/presets/cursor/svelte/rules/svelte-ui.mdc +37 -0
- package/presets/cursor/svelte/rules/sveltekit-routing.mdc +39 -0
- package/presets/cursor/svelte/rules/technical-retro.mdc +16 -0
- package/presets/cursor/svelte/rules/tests-e2e-structure.mdc +51 -0
- package/presets/cursor/svelte/rules/tests-unit.mdc +42 -0
- package/presets/cursor/svelte/rules/types-jsdoc.mdc +42 -0
- package/presets/cursor/svelte/skills/README.md +17 -0
- package/presets/cursor/svelte/skills/ci-investigation/SKILL.md +36 -0
- package/presets/cursor/svelte/skills/code-review/SKILL.md +38 -0
- package/presets/cursor/svelte/skills/debug-investigation/SKILL.md +32 -0
- package/presets/cursor/svelte/skills/feature-delivery/SKILL.md +34 -0
- package/presets/cursor/svelte/skills/playwright-e2e/SKILL.md +37 -0
- package/presets/cursor/svelte/skills/svelte-performance/SKILL.md +52 -0
- package/presets/cursor/svelte/skills/technical-retro/SKILL.md +54 -0
- package/presets/cursor/svelte/skills/unit-testing/SKILL.md +32 -0
- package/presets/cursor/svelte/skills/write-adr/SKILL.md +41 -0
- package/presets/cursor/svelte/team/README.md +140 -0
- package/presets/cursor/svelte/team/conventions.md +21 -0
- package/presets/cursor/svelte/team/fixtures/artifact-manifest.example.json +61 -0
- package/presets/cursor/svelte/team/fixtures/bugfix-standard.json +25 -0
- package/presets/cursor/svelte/team/fixtures/feature-full.json +28 -0
- package/presets/cursor/svelte/team/fixtures/feature-light.json +27 -0
- package/presets/cursor/svelte/team/fixtures/metrics-scenarios/tasks/human-gate/metrics.json +69 -0
- package/presets/cursor/svelte/team/fixtures/metrics-scenarios/tasks/missing-ledger/status.json +5 -0
- package/presets/cursor/svelte/team/fixtures/metrics-scenarios/tasks/parallel-receipts/metrics.json +79 -0
- package/presets/cursor/svelte/team/fixtures/metrics-scenarios/tasks/serial-retry/metrics.json +124 -0
- package/presets/cursor/svelte/team/fixtures/metrics-scenarios/tasks/validation-failed/metrics.json +124 -0
- package/presets/cursor/svelte/team/fixtures/metrics.example.json +54 -0
- package/presets/cursor/svelte/team/tasks/.gitkeep +0 -0
|
@@ -12,8 +12,8 @@ You are the build verifier for **PHP hexagonal** services (and for **ai-rules pr
|
|
|
12
12
|
1. Detect Composer from `composer.json` / `composer.lock`; prefer Composer scripts when present.
|
|
13
13
|
2. Run from module/project root: `composer test` or `vendor/bin/phpunit` (or Pest if that is the repo default / CI).
|
|
14
14
|
3. If present in **repo or CI**: formatter + static analysis (PHP-CS-Fixer, Pint, PHPStan, Psalm, or project-equivalent) per `php-tooling` / `post-change-test`. Mirror CI gates locally when configs/scripts exist; do **not** invent a tool the repo does not use.
|
|
15
|
-
4. Write `.
|
|
16
|
-
5. On failure:
|
|
15
|
+
4. Write `.claude/team/tasks/<slug>/validation-report.md` with commands + results.
|
|
16
|
+
5. On failure: emit receipt outcome `validation_failed` — do **not** patch production code (developer retries).
|
|
17
17
|
|
|
18
18
|
**Never** require Playwright, XCUITest, `lint:js`/`lint:css`, `xcodebuild`/`SwiftLint`, `mvn`, or `gradlew` as the PHP gate.
|
|
19
19
|
|
|
@@ -36,10 +36,17 @@ Hard gates for the **php-hexagonal** stack (and peers):
|
|
|
36
36
|
|
|
37
37
|
Also document:
|
|
38
38
|
|
|
39
|
-
1. **Root AGENTS template:** each installable preset (`cursor|claude` × `next|ios-swift|go|java|mcp-ts|php-hexagonal`) must ship `REPO_AGENTS.md` → **FAIL** if missing.
|
|
39
|
+
1. **Root AGENTS template:** each installable preset (`cursor|claude` × `next|nuxt|svelte|ios-swift|go|java|mcp-ts|php-hexagonal|php-laravel`) must ship `REPO_AGENTS.md` → **FAIL** if missing.
|
|
40
40
|
2. **Hooks cookbook:** default `hooks.json` must **not** reference `hooks/examples/` → **FAIL** if it does.
|
|
41
41
|
3. **No react-performance / Playwright / a11y on backend stacks:** skill directory / required handoff must be absent under go, java, php-hexagonal, php-laravel, mcp-ts → **FAIL** (leakage). Prefer `check:preset-leakage`.
|
|
42
42
|
4. **Shared-core drift (hard in `check:preset-structure`):** `check-shared-core-drift` with `AI_RULES_DRIFT_FAIL=1`.
|
|
43
43
|
5. **Rule eval (WARN):** `yarn check:rule-eval` is **next-only** (`eval/next/`); optional for maintainers; not part of default `check:preset-structure`. Missing php-hexagonal eval stems is not a FAIL.
|
|
44
44
|
|
|
45
45
|
Document PASS/FAIL in `validation-report.md`.
|
|
46
|
+
|
|
47
|
+
## Artifact contract
|
|
48
|
+
|
|
49
|
+
- **Authoritative inputs:** read `.claude/team/tasks/<slug>/artifact-manifest.json` first; consume handoff `artifactInputIds` when supplied, otherwise consume the manifest entries for brief/decomposition, implementation evidence, pipeline scope, and changed files.
|
|
50
|
+
- **Owned outputs:** `validation-report.md`; upsert only the manifest entry assigned by handoff (`artifactOutputId`; fallback `validation`) and preserve all foreign entries.
|
|
51
|
+
- **Terminal receipt:** cover applicable AC/task IDs, list authoritative evidence paths, and emit `completed` or `validation_failed`. Bind it to the supplied `attemptId` when present.
|
|
52
|
+
- **Shared state:** never create or mutate `status.json` or `metrics.json`; the orchestration runtime/hook owns lifecycle, gates, retries, attempts, and timestamps.
|
|
@@ -33,8 +33,15 @@ Apply skill `code-review` and `code-review-mr.mdc`. Weigh `architecture-boundari
|
|
|
33
33
|
|
|
34
34
|
## Artifact
|
|
35
35
|
|
|
36
|
-
Write `.claude/team/tasks/<slug>/review.md` with verdict APPROVE | REQUEST_CHANGES, findings by severity, AC coverage. Update
|
|
36
|
+
Write `.claude/team/tasks/<slug>/review.md` with verdict APPROVE | REQUEST_CHANGES, findings by severity, AC coverage. Update the owned terminal receipt accordingly.
|
|
37
37
|
|
|
38
38
|
## Design guidance
|
|
39
39
|
|
|
40
40
|
- Load `design-guidance` (rule stem) when assessing structure, smells, or pattern fit.
|
|
41
|
+
|
|
42
|
+
## Artifact contract
|
|
43
|
+
|
|
44
|
+
- **Authoritative inputs:** read `.claude/team/tasks/<slug>/artifact-manifest.json` first; consume handoff `artifactInputIds` when supplied, otherwise consume the manifest entries for brief/decomposition, implementation, validation evidence, and the scoped git diff.
|
|
45
|
+
- **Owned outputs:** `review.md`; upsert only the manifest entry assigned by handoff (`artifactOutputId`; fallback `review`) and preserve all foreign entries.
|
|
46
|
+
- **Terminal receipt:** cover applicable AC/task IDs, list authoritative evidence paths, and emit `completed` or `changes_requested`. Bind it to the supplied `attemptId` when present.
|
|
47
|
+
- **Shared state:** never create or mutate `status.json` or `metrics.json`; the orchestration runtime/hook owns lifecycle, gates, retries, attempts, and timestamps.
|
|
@@ -36,7 +36,7 @@ Implement PHP features following hexagonal boundaries.
|
|
|
36
36
|
|
|
37
37
|
When editing ai-rules `presets/**/php-hexagonal/**`, keep Cursor/Claude twins in sync and preserve chain fork ≠ next/ios-swift/go/java/mcp-ts (see `preset-no-cross-stack-leakage`).
|
|
38
38
|
|
|
39
|
-
Update `.claude/team/tasks/<slug>/implementation.md` and
|
|
39
|
+
Update `.claude/team/tasks/<slug>/implementation.md` and the owned implementation receipt.
|
|
40
40
|
|
|
41
41
|
## Design guidance
|
|
42
42
|
|
|
@@ -45,3 +45,10 @@ Update `.claude/team/tasks/<slug>/implementation.md` and `status.json`.
|
|
|
45
45
|
## Anti-sycophancy discipline
|
|
46
46
|
|
|
47
47
|
- When writing or changing code, load / follow rule `anti-sycophancy-discipline`.
|
|
48
|
+
|
|
49
|
+
## Artifact contract
|
|
50
|
+
|
|
51
|
+
- **Authoritative inputs:** read `.claude/team/tasks/<slug>/artifact-manifest.json` first; consume handoff `artifactInputIds` when supplied, otherwise consume the manifest entries for `brief.md`, `decomposition.md`, current scope, and applicable prior findings.
|
|
52
|
+
- **Owned outputs:** `implementation.md` plus changed implementation/test paths; upsert only the manifest entry assigned by handoff (`artifactOutputId`; fallback `implementation`) and preserve all foreign entries.
|
|
53
|
+
- **Terminal receipt:** cover applicable AC/task IDs, list authoritative evidence paths, and emit `completed` or `blocked`. Bind it to the supplied `attemptId` when present.
|
|
54
|
+
- **Shared state:** never create or mutate `status.json` or `metrics.json`; the orchestration runtime/hook owns lifecycle, gates, retries, attempts, and timestamps.
|
|
@@ -18,8 +18,15 @@ Use domain, application/ports, driving/driven adapters, composition root — not
|
|
|
18
18
|
|
|
19
19
|
## Gates
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
Emit an analysis receipt; the runtime applies any configured human gate.
|
|
22
22
|
|
|
23
23
|
## Design guidance (optional)
|
|
24
24
|
|
|
25
25
|
- Optional: Load `design-guidance` (rule stem) when assessing structure, smells, or pattern fit — only when decomposing refactor/architecture tasks (not default).
|
|
26
|
+
|
|
27
|
+
## Artifact contract
|
|
28
|
+
|
|
29
|
+
- **Authoritative inputs:** read `.claude/team/tasks/<slug>/artifact-manifest.json` first; consume `pipeline.json`, the manifest routing entry, user-approved decisions, and any authoritative architecture/approval entries.
|
|
30
|
+
- **Owned outputs:** `brief.md` and `decomposition.md`; upsert only the manifest entry assigned by handoff (`artifactOutputId`; fallback `analysis`) and preserve all foreign entries.
|
|
31
|
+
- **Terminal receipt:** cover applicable AC/task IDs, list authoritative evidence paths, and emit `completed` or `blocked`. Bind it to the supplied `attemptId` when present.
|
|
32
|
+
- **Shared state:** never create or mutate `status.json` or `metrics.json`; the orchestration runtime/hook owns lifecycle, gates, retries, attempts, and timestamps.
|
|
@@ -39,6 +39,27 @@ You are a task router for a **PHP hexagonal backend** agent team. You **do not**
|
|
|
39
39
|
|
|
40
40
|
**Never skip `build-verifier`** after developer when PHP sources changed.
|
|
41
41
|
|
|
42
|
+
## Routing decision rubric
|
|
43
|
+
|
|
44
|
+
Keep top-level `profile` and emit this top-level object in every new `pipeline.json`:
|
|
45
|
+
|
|
46
|
+
```json
|
|
47
|
+
"routingDecision": {
|
|
48
|
+
"complexity": "low | moderate | high",
|
|
49
|
+
"riskFlags": [],
|
|
50
|
+
"routingReasons": ["Concrete request signal and its routing consequence."],
|
|
51
|
+
"estimatedWorkPackages": 1,
|
|
52
|
+
"openDecisionCount": 0
|
|
53
|
+
}
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
- `low`: one bounded layer/file set, explicit AC, reversible, no risk flags/open decisions → `light` when verification policy permits.
|
|
57
|
+
- `moderate`: adjacent concerns or a regression/refactor with known boundaries → usually `standard`.
|
|
58
|
+
- `high`: cross-layer/public contract, security, migration/destructive or concurrency/state risk, broad integration-test surface, unclear AC, or multiple work packages → usually `full`.
|
|
59
|
+
- Use concrete flags: `public-contract`, `cross-layer`, `security-sensitive`, `migration`, `destructive`, `concurrency-state`, `external-dependency`, `unclear-acceptance-criteria`, `broad-test-surface`, `behavior-regression`.
|
|
60
|
+
- `routingReasons` must be non-empty and explain profile, gates, specialists, skips, or checkpoints; never write “standard by default.”
|
|
61
|
+
- `estimatedWorkPackages` is an integer ≥1; `openDecisionCount` is an integer ≥0. Do not lower complexity because implementation is familiar.
|
|
62
|
+
|
|
42
63
|
## Model tiers (`steps[].model`)
|
|
43
64
|
|
|
44
65
|
Optional: `"model": "cheap" | "standard" | "strong"`. Same policy as other presets:
|
|
@@ -62,12 +83,19 @@ Fixtures: `.claude/team/fixtures/` (feature-full, feature-light, bugfix-standard
|
|
|
62
83
|
|
|
63
84
|
## Output
|
|
64
85
|
|
|
65
|
-
Write `.claude/team/tasks/<slug>/pipeline.json` and
|
|
86
|
+
Write `.claude/team/tasks/<slug>/pipeline.json` and initialize the routing entry in `artifact-manifest.json`; set `.claude/team/active-task.json`. The orchestration runtime creates and owns `status.json`.
|
|
66
87
|
|
|
67
88
|
## Handoff
|
|
68
89
|
|
|
69
90
|
Intent + steps table + skipped + gates → invoke `steps[0].agent` (unless retro).
|
|
70
91
|
|
|
71
|
-
##
|
|
92
|
+
## Runtime initialization
|
|
93
|
+
|
|
94
|
+
Return the routing receipt to the orchestrator. The orchestration runtime/hook exclusively initializes and updates `status.json`, `metrics.json`, attempt identities, and gate lifecycle; the router does not write those shared runtime files.
|
|
95
|
+
|
|
96
|
+
## Artifact contract
|
|
72
97
|
|
|
73
|
-
|
|
98
|
+
- **Authoritative inputs:** read `.claude/team/tasks/<slug>/artifact-manifest.json` first; consume the user request and any existing authoritative task/decision entries.
|
|
99
|
+
- **Owned outputs:** `pipeline.json` and the routing manifest entry; upsert only the manifest entry assigned by handoff (`artifactOutputId`; fallback `routing`) and preserve all foreign entries.
|
|
100
|
+
- **Terminal receipt:** cover applicable AC/task IDs, list authoritative evidence paths, and emit `completed` or `blocked`. Bind it to the supplied `attemptId` when present.
|
|
101
|
+
- **Shared state:** never create or mutate `status.json` or `metrics.json`; the orchestration runtime/hook owns lifecycle, gates, retries, attempts, and timestamps.
|
|
@@ -24,14 +24,16 @@ description: Route a natural-language task through the agent-team pipeline: task
|
|
|
24
24
|
|
|
25
25
|
## Алгоритм
|
|
26
26
|
|
|
27
|
-
1. **Slug** — kebab-case из описания (≤48 символов). Создай `.claude/team/tasks/<slug>/` через запись файла (Write / Edit) — **не** полагайся на Shell `mkdir` как единственный способ создать каталог.
|
|
27
|
+
1. **Slug** — kebab-case из описания (≤48 символов). Создай `.claude/team/tasks/<slug>/` через запись файла (Write / Edit); runtime/hook владеет `status.json` — **не** полагайся на Shell `mkdir` как единственный способ создать каталог.
|
|
28
28
|
2. **Router** — вызови subagent **task-router** с описанием задачи и путём к slug.
|
|
29
29
|
3. **План** — покажи пользователю таблицу из `pipeline.json`: intent, steps, skipped, humanGates.
|
|
30
30
|
4. **Intent retro** — если `intent === "retro"`, выполни `/technical-retro` и **остановись**.
|
|
31
|
-
5. **Старт** —
|
|
32
|
-
-
|
|
33
|
-
-
|
|
34
|
-
|
|
31
|
+
5. **Старт** — после router:
|
|
32
|
+
- подтверди `pipeline.json` и `active-task.json`;
|
|
33
|
+
- **не** пиши lifecycle-поля `status.json` / `metrics.json` сам — их владеет orchestration runtime/hook (см. **agent-artifact-contracts**). Если `status.json` отсутствует, допустим только минимальный bootstrap (`slug`, `intent`, `pipelineIndex: 0`, `currentAgent: steps[0]`, `state: in_progress`) — **не** увеличивай `pipelineIndex` вручную;
|
|
34
|
+
- вызови subagent для `pipeline.steps[0].agent` (slug, пути к артефактам, scope).
|
|
35
|
+
6. **После каждого агента** — дождись hook handoff / reconciliation terminal receipt → `status.state`; не запускай следующий шаг, пока `status.json` не отражает handoff (или пока нет `followup_message` от hook).
|
|
36
|
+
7. **Human gate** — если после текущего шага есть gate в `humanGates` (`after:<agent>`), после завершения агента **остановись** и попроси `/task-continue <slug>` (или `/feature-continue <slug>`).
|
|
35
37
|
|
|
36
38
|
## Не делать
|
|
37
39
|
|
|
@@ -50,4 +52,4 @@ description: Route a natural-language task through the agent-team pipeline: task
|
|
|
50
52
|
|
|
51
53
|
## Metrics
|
|
52
54
|
|
|
53
|
-
|
|
55
|
+
Runtime/hook owns `metrics.json` and `status.json` attempt ledgers. Before the first invocation ensure `task_started` and one `activeAttempts[attemptId]` + `attempt_started` exist (router/runtime bootstrap — parent must not invent parallel indices). On `/task-continue`, run the installed chain hook `end_human_gate` action (or wrapper) so `human_gate_ended` lands before the next attempt. Do not calculate durations in agents.
|
|
@@ -13,4 +13,4 @@ Claude Code may not use Cursor `hooks.json`. Wire scripts per project docs when
|
|
|
13
13
|
|
|
14
14
|
Example scripts live in `hooks/examples/` (secret-guard, format-edited, test-on-save). They are **not** auto-enabled.
|
|
15
15
|
|
|
16
|
-
To wire in Claude Code: copy an `.example.sh` into `hooks/`, make executable, and register per [Claude Code hooks](https://code.claude.com/docs/en/hooks) for your project. Keep stack-safe recipes (this preset: **
|
|
16
|
+
To wire in Claude Code: copy an `.example.sh` into `hooks/`, make executable, and register per [Claude Code hooks](https://code.claude.com/docs/en/hooks) for your project. Keep stack-safe recipes (this preset: **php-hexagonal**). Cursor twin examples under `presets/cursor/php-hexagonal/hooks/examples/` are the same allowlist forks.
|
|
@@ -124,6 +124,27 @@ function roleFor(agent) {
|
|
|
124
124
|
if (/writer/.test(agent || '')) return 'docs';
|
|
125
125
|
return 'implementation';
|
|
126
126
|
}
|
|
127
|
+
const DEFAULT_ARTIFACT_OUTPUT_IDS = {
|
|
128
|
+
'task-router': 'routing',
|
|
129
|
+
'task-analyst': 'analysis',
|
|
130
|
+
'solution-architect': 'architecture',
|
|
131
|
+
'migration-specialist': 'migration-plan',
|
|
132
|
+
debugger: 'debug',
|
|
133
|
+
'ci-investigator': 'ci',
|
|
134
|
+
'feature-developer': 'implementation',
|
|
135
|
+
'build-verifier': 'validation',
|
|
136
|
+
'code-reviewer': 'review',
|
|
137
|
+
'security-reviewer': 'security-review',
|
|
138
|
+
'accessibility-reviewer': 'a11y-review',
|
|
139
|
+
'performance-auditor': 'perf-report',
|
|
140
|
+
'api-contract-reviewer': 'api-contract-review',
|
|
141
|
+
'tech-writer': 'documentation',
|
|
142
|
+
};
|
|
143
|
+
function artifactOutputIdFor(step, agent) {
|
|
144
|
+
if (step && typeof step.artifactOutputId === 'string') return step.artifactOutputId;
|
|
145
|
+
if (step?.artifactOutputIds && typeof step.artifactOutputIds[agent] === 'string') return step.artifactOutputIds[agent];
|
|
146
|
+
return DEFAULT_ARTIFACT_OUTPUT_IDS[agent] || agent;
|
|
147
|
+
}
|
|
127
148
|
function activateAttempts(step, stepIndex) {
|
|
128
149
|
const active = { ...(status.activeAttempts || {}) }; const agents = getStepAgents(step);
|
|
129
150
|
const parallelGroupId = step.parallel && agents.length > 1 ? `${status.metricsRunId || slug}:step-${stepIndex}` : null;
|
|
@@ -146,11 +167,61 @@ function resolvedAttempt() {
|
|
|
146
167
|
try { const receipts = JSON.parse(fs.readFileSync(path.join(taskDir, '.metrics-receipts.json'), 'utf8')); const receipt = Array.isArray(receipts) ? receipts.find((item) => active[item.attemptId]) : null; if (receipt) return { attemptId: receipt.attemptId, entry: active[receipt.attemptId], confidence: 'fallback', source: 'agent' }; } catch {}
|
|
147
168
|
return null;
|
|
148
169
|
}
|
|
170
|
+
function readBoundReceiptOutcome(agent, step, resolved) {
|
|
171
|
+
if (!agent || !resolved) return { outcome: null, receiptRequired: false };
|
|
172
|
+
const manifestPath = path.join(taskDir, 'artifact-manifest.json');
|
|
173
|
+
if (!fs.existsSync(manifestPath)) return { outcome: null, receiptRequired: false };
|
|
174
|
+
try {
|
|
175
|
+
const manifest = JSON.parse(fs.readFileSync(manifestPath, 'utf8'));
|
|
176
|
+
const artifacts = Array.isArray(manifest.artifacts) ? manifest.artifacts : [];
|
|
177
|
+
const expectedOutputId = artifactOutputIdFor(step, agent);
|
|
178
|
+
const attemptStartedAt = Date.parse(resolved.entry.startedAt);
|
|
179
|
+
const owned = artifacts
|
|
180
|
+
.filter((entry) => {
|
|
181
|
+
if (!entry || entry.producer !== agent || !entry.receipt || typeof entry.receipt.outcome !== 'string') return false;
|
|
182
|
+
const boundByAttempt = typeof entry.receipt.attemptId === 'string' && entry.receipt.attemptId === resolved.attemptId;
|
|
183
|
+
const boundByOutput = entry.receipt.attemptId == null && entry.id === expectedOutputId;
|
|
184
|
+
if (!boundByAttempt && !boundByOutput) return false;
|
|
185
|
+
const terminalAt = Date.parse(entry.timestamps?.completedAt || entry.timestamps?.updatedAt || '');
|
|
186
|
+
return Number.isFinite(terminalAt) && (!Number.isFinite(attemptStartedAt) || terminalAt >= attemptStartedAt);
|
|
187
|
+
})
|
|
188
|
+
.sort((a, b) => {
|
|
189
|
+
const ta = Date.parse(a.timestamps?.completedAt || a.timestamps?.updatedAt || 0) || 0;
|
|
190
|
+
const tb = Date.parse(b.timestamps?.completedAt || b.timestamps?.updatedAt || 0) || 0;
|
|
191
|
+
return tb - ta;
|
|
192
|
+
});
|
|
193
|
+
return { outcome: owned[0]?.receipt?.outcome || null, receiptRequired: true };
|
|
194
|
+
} catch {
|
|
195
|
+
return { outcome: null, receiptRequired: false };
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
function reconcileStatusFromManifest(agent, step, resolved) {
|
|
199
|
+
const terminal = new Set(['completed', 'blocked', 'changes_requested', 'validation_failed']);
|
|
200
|
+
const { outcome, receiptRequired } = readBoundReceiptOutcome(agent, step, resolved);
|
|
201
|
+
if (terminal.has(outcome)) {
|
|
202
|
+
status.state = outcome;
|
|
203
|
+
return outcome;
|
|
204
|
+
}
|
|
205
|
+
if (receiptRequired) {
|
|
206
|
+
status.state = 'awaiting_artifact_receipt';
|
|
207
|
+
status.phase = 'blocked';
|
|
208
|
+
return status.state;
|
|
209
|
+
}
|
|
210
|
+
if (terminal.has(status.state)) return status.state;
|
|
211
|
+
// Host reported subagent completed and no blocking receipt → treat as completed for metrics/advance.
|
|
212
|
+
if (hookInput.status === 'completed') {
|
|
213
|
+
status.state = 'completed';
|
|
214
|
+
return 'completed';
|
|
215
|
+
}
|
|
216
|
+
return status.state;
|
|
217
|
+
}
|
|
218
|
+
|
|
149
219
|
function finishActiveAttempt() {
|
|
150
220
|
const resolved = resolvedAttempt(); if (!resolved) return null;
|
|
151
221
|
const durationMs = Date.parse(now) - Date.parse(resolved.entry.startedAt);
|
|
152
|
-
|
|
153
|
-
|
|
222
|
+
const outcome = ['completed', 'blocked', 'changes_requested', 'validation_failed'].includes(status.state) ? status.state : 'unknown';
|
|
223
|
+
appendMetric({ type: 'attempt_finished', at: now, attemptId: resolved.attemptId, outcome, durationMs: Number.isFinite(durationMs) && durationMs >= 0 ? durationMs : null, retryAfterFix: status.retryAfterFix || null, source: resolved.source || 'hook', attributionConfidence: resolved.confidence });
|
|
224
|
+
const active = { ...(status.activeAttempts || {}) }; delete active[resolved.attemptId]; status.activeAttempts = active; status.lastCompletedAttempt = { attemptId: resolved.attemptId, completedAt: now }; return { ...resolved, outcome };
|
|
154
225
|
}
|
|
155
226
|
function beginHumanGate() { const eventId = `${status.metricsRunId || slug}:gate:${Date.now()}`; appendMetric({ eventId, type: 'human_gate_started', at: now, source: 'hook', attributionConfidence: 'high' }); status.activeHumanGateEventId = eventId; }
|
|
156
227
|
function endHumanGateIfResumed() {
|
|
@@ -219,54 +290,54 @@ function findNextExecutableStep(steps, startIdx, dir) {
|
|
|
219
290
|
const AGENT_HANDOFF = {
|
|
220
291
|
'task-analyst': (s) =>
|
|
221
292
|
`Invoke task-analyst for slug "${s}". Write brief.md and decomposition.md under .claude/team/tasks/${s}/. ` +
|
|
222
|
-
`
|
|
293
|
+
`Upsert the analysis receipt in artifact-manifest.json; do not mutate status.json lifecycle fields. Do not use legacy phase analysis.`,
|
|
223
294
|
debugger: (s) =>
|
|
224
295
|
`Invoke debugger subagent for slug "${s}". Investigate root cause with composer test / vendor/bin/phpunit / logs; write debug-report.md with fixApplied: true/false. ` +
|
|
225
|
-
`
|
|
296
|
+
`Upsert the owned terminal receipt in artifact-manifest.json; do not mutate status.json lifecycle fields.`,
|
|
226
297
|
'solution-architect': (s) =>
|
|
227
|
-
`Invoke solution-architect for slug "${s}". Read brief.md; write architecture.md for PHP hexagonal layers.
|
|
298
|
+
`Invoke solution-architect for slug "${s}". Read brief.md; write architecture.md for PHP hexagonal layers. Upsert the owned terminal receipt in artifact-manifest.json; do not mutate status.json lifecycle fields.`,
|
|
228
299
|
'migration-specialist': (s) =>
|
|
229
|
-
`Invoke migration-specialist for slug "${s}". Read brief.md; write migration-plan.md for PHP build/toolchain.
|
|
300
|
+
`Invoke migration-specialist for slug "${s}". Read brief.md; write migration-plan.md for PHP build/toolchain. Upsert the owned terminal receipt in artifact-manifest.json; do not mutate status.json lifecycle fields.`,
|
|
230
301
|
'api-contract-reviewer': (s) =>
|
|
231
|
-
`Invoke api-contract-reviewer (readonly) for slug "${s}". Review OpenAPI/Protobuf vs adapters; write api-contract-review.md.
|
|
302
|
+
`Invoke api-contract-reviewer (readonly) for slug "${s}". Review OpenAPI/Protobuf vs adapters; write api-contract-review.md. Upsert the owned terminal receipt in artifact-manifest.json; do not mutate status.json lifecycle fields.`,
|
|
232
303
|
'ci-investigator': (s) =>
|
|
233
304
|
`Invoke ci-investigator for slug "${s}". Diagnose CI failure (composer test / vendor/bin/phpunit / phpstan or preset-structure); write ci-report.md; apply minimal fix. ` +
|
|
234
|
-
`Use ci-investigation skill.
|
|
305
|
+
`Use ci-investigation skill. Upsert the owned terminal receipt in artifact-manifest.json; do not mutate status.json lifecycle fields.`,
|
|
235
306
|
'feature-developer': (s) =>
|
|
236
307
|
`Invoke feature-developer for slug "${s}". Read brief.md, decomposition.md, validation-report.md, review.md, architecture.md, migration-plan.md, api-contract-review.md, debug-report.md if present. ` +
|
|
237
308
|
`Follow feature-delivery-workflow.mdc and reference-features.mdc. Prefer src domain|application|adapters and Composition/Composition/* composition root. ` +
|
|
238
|
-
`Include PHPUnit/Pest via composer test coverage for domain/use cases before handoff.
|
|
309
|
+
`Include PHPUnit/Pest via composer test coverage for domain/use cases before handoff. Upsert the owned terminal receipt in artifact-manifest.json; do not mutate status.json lifecycle fields.`,
|
|
239
310
|
'build-verifier': (s) =>
|
|
240
311
|
`Invoke build-verifier (readonly) for slug "${s}". Follow php-tooling.mdc and post-change-test.mdc. ` +
|
|
241
312
|
`Run composer test / vendor/bin/phpunit and configured static analysis if present in repo/CI — never yarn/ESLint/Stylelint. ` +
|
|
242
|
-
`For preset packaging: yarn check:preset-structure. Write validation-report.md
|
|
313
|
+
`For preset packaging: yarn check:preset-structure. Write validation-report.md and emit receipt outcome completed or validation_failed. Do not edit production code.`,
|
|
243
314
|
'performance-auditor': (s) =>
|
|
244
|
-
`Invoke performance-auditor (readonly) for slug "${s}". Audit PHP hot paths/allocs/DB N+1/profiler/JFR risks; write perf-report.md.
|
|
315
|
+
`Invoke performance-auditor (readonly) for slug "${s}". Audit PHP hot paths/allocs/DB N+1/profiler/JFR risks; write perf-report.md. Upsert the owned terminal receipt in artifact-manifest.json; do not mutate status.json lifecycle fields.`,
|
|
245
316
|
'code-reviewer': (s) =>
|
|
246
317
|
`Invoke code-reviewer subagent (readonly) for slug "${s}". Review git diff vs brief.md per code-review-mr.mdc (hexagonal boundaries). ` +
|
|
247
|
-
`
|
|
318
|
+
`Upsert the owned terminal receipt in artifact-manifest.json; do not mutate status.json lifecycle fields.`,
|
|
248
319
|
'security-reviewer': (s) =>
|
|
249
|
-
`Invoke security-reviewer (readonly) for slug "${s}". Follow security-php.mdc; write security-review.md.
|
|
320
|
+
`Invoke security-reviewer (readonly) for slug "${s}". Follow security-php.mdc; write security-review.md. Upsert the owned terminal receipt in artifact-manifest.json; do not mutate status.json lifecycle fields.`,
|
|
250
321
|
'qa-tester': (s, scope) =>
|
|
251
322
|
`Invoke qa-tester for slug "${s}"${scope ? ` (scope: ${scope})` : ''}. ` +
|
|
252
|
-
`Add/update PHPUnit unit and integration tests per brief. Follow tests-unit.mdc, tests-integration.mdc, and skill integration-testing.
|
|
323
|
+
`Add/update PHPUnit unit and integration tests per brief. Follow tests-unit.mdc, tests-integration.mdc, and skill integration-testing. Upsert the owned terminal receipt in artifact-manifest.json; do not mutate status.json lifecycle fields.`,
|
|
253
324
|
'unit-test-planner': (s) =>
|
|
254
|
-
`Invoke unit-test-planner for slug "${s}". Write unit-test-plan.md for PHPUnit/Pest via composer test. Use unit-testing skill.
|
|
325
|
+
`Invoke unit-test-planner for slug "${s}". Write unit-test-plan.md for PHPUnit/Pest via composer test. Use unit-testing skill. Upsert the owned terminal receipt in artifact-manifest.json; do not mutate status.json lifecycle fields.`,
|
|
255
326
|
'unit-test-generator': (s) =>
|
|
256
|
-
`Invoke unit-test-generator for slug "${s}". Implement *Test.php / *Tests.php from unit-test-plan.md under tests. Use unit-testing skill.
|
|
327
|
+
`Invoke unit-test-generator for slug "${s}". Implement *Test.php / *Tests.php from unit-test-plan.md under tests. Use unit-testing skill. Upsert the owned terminal receipt in artifact-manifest.json; do not mutate status.json lifecycle fields.`,
|
|
257
328
|
'unit-test-healer': (s) =>
|
|
258
|
-
`Invoke unit-test-healer for slug "${s}". Fix failing unit tests. Use unit-testing and debug-investigation skills.
|
|
329
|
+
`Invoke unit-test-healer for slug "${s}". Fix failing unit tests. Use unit-testing and debug-investigation skills. Upsert the owned terminal receipt in artifact-manifest.json; do not mutate status.json lifecycle fields.`,
|
|
259
330
|
'integration-test-planner': (s) =>
|
|
260
331
|
`Invoke integration-test-planner for slug "${s}". Create/update integration test plans (HTTP controller tests/integration DB fixtures/testcontainers/adapter contracts). ` +
|
|
261
|
-
`Follow tests-integration.mdc and the integration-testing skill. Do not use browser e2e tooling.
|
|
332
|
+
`Follow tests-integration.mdc and the integration-testing skill. Do not use browser e2e tooling. Upsert the owned terminal receipt in artifact-manifest.json; do not mutate status.json lifecycle fields.`,
|
|
262
333
|
'integration-test-generator': (s) =>
|
|
263
334
|
`Invoke integration-test-generator for slug "${s}". Generate/update *IT.php / *IntegrationTest.php from plans. ` +
|
|
264
|
-
`Follow tests-integration.mdc and the integration-testing skill. Do not use browser e2e tooling.
|
|
335
|
+
`Follow tests-integration.mdc and the integration-testing skill. Do not use browser e2e tooling. Upsert the owned terminal receipt in artifact-manifest.json; do not mutate status.json lifecycle fields.`,
|
|
265
336
|
'integration-test-healer': (s) =>
|
|
266
337
|
`Invoke integration-test-healer for slug "${s}". Fix failing/flaky integration tests while preserving plan assertions. ` +
|
|
267
|
-
`Follow tests-integration.mdc, integration-testing, and debug-investigation. Do not use browser e2e tooling.
|
|
338
|
+
`Follow tests-integration.mdc, integration-testing, and debug-investigation. Do not use browser e2e tooling. Upsert the owned terminal receipt in artifact-manifest.json; do not mutate status.json lifecycle fields.`,
|
|
268
339
|
'tech-writer': (s) =>
|
|
269
|
-
`Invoke tech-writer for slug "${s}". Write documentation.md from task artifacts.
|
|
340
|
+
`Invoke tech-writer for slug "${s}". Write documentation.md from task artifacts. Upsert the owned terminal receipt in artifact-manifest.json; do not mutate status.json lifecycle fields.`,
|
|
270
341
|
};
|
|
271
342
|
|
|
272
343
|
const REVIEW_AGENTS = new Set([
|
|
@@ -279,15 +350,20 @@ const REVIEW_AGENTS = new Set([
|
|
|
279
350
|
function metricsHandoff(agent) {
|
|
280
351
|
const matches = Object.entries(status.activeAttempts || {}).filter(([, entry]) => entry.agent === agent);
|
|
281
352
|
if (matches.length === 1) {
|
|
282
|
-
return ` Metrics attemptId: ${matches[0][0]};
|
|
353
|
+
return ` Metrics attemptId: ${matches[0][0]}; write owned artifact-manifest receipt outcome. If the hook cannot identify a parallel stop, append a minimal { attemptId, outcome } receipt to .metrics-receipts.json; do not mutate status.json or calculate duration.`;
|
|
283
354
|
}
|
|
284
355
|
return ' Metrics: use the supplied attemptId when available; for a parallel completion, write a minimal { attemptId, outcome } receipt to .metrics-receipts.json rather than relying on currentAgent. Do not calculate duration.';
|
|
285
356
|
}
|
|
286
357
|
|
|
287
|
-
function
|
|
358
|
+
function artifactHandoff(step, agent) {
|
|
359
|
+
const inputIds = Array.isArray(step?.artifactInputIds) ? step.artifactInputIds.join(', ') : 'manifest defaults';
|
|
360
|
+
return ` Artifact inputs: ${inputIds}; owned output ID: ${artifactOutputIdFor(step, agent)}. Bind the terminal receipt to the supplied attemptId.`;
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
function handoffForAgent(agent, scope, step = null) {
|
|
288
364
|
const fn = AGENT_HANDOFF[agent];
|
|
289
|
-
const handoff = fn ? fn(slug, scope) : `Invoke ${agent} subagent for slug "${slug}".
|
|
290
|
-
return handoff + metricsHandoff(agent);
|
|
365
|
+
const handoff = fn ? fn(slug, scope) : `Invoke ${agent} subagent for slug "${slug}". Upsert the owned terminal receipt in artifact-manifest.json; do not mutate status.json lifecycle fields.`;
|
|
366
|
+
return handoff + artifactHandoff(step, agent) + metricsHandoff(agent);
|
|
291
367
|
}
|
|
292
368
|
|
|
293
369
|
function handoffForParallelStep(step) {
|
|
@@ -297,7 +373,8 @@ function handoffForParallelStep(step) {
|
|
|
297
373
|
.map(([attemptId, entry]) => `${entry.agent}=${attemptId}`);
|
|
298
374
|
return (
|
|
299
375
|
`Invoke IN PARALLEL (one message, multiple Task calls): ${agents.join(' AND ')} for slug "${slug}". ` +
|
|
300
|
-
`Each agent writes its artifact and
|
|
376
|
+
`Each agent writes its artifact and owned receipt; the hook records parallelCompleted from stops. Do not mutate status.json lifecycle fields. ` +
|
|
377
|
+
`Artifact inputs: ${Array.isArray(step.artifactInputIds) ? step.artifactInputIds.join(', ') : 'manifest defaults'}; owned output IDs: ${agents.map((agent) => `${agent}=${artifactOutputIdFor(step, agent)}`).join('; ')}. ` +
|
|
301
378
|
`Metrics attemptIds: ${attemptIds.join('; ')}. If the hook cannot identify a parallel stop, append a minimal { attemptId, outcome } receipt to .metrics-receipts.json; do not calculate duration.`
|
|
302
379
|
);
|
|
303
380
|
}
|
|
@@ -336,8 +413,12 @@ function legacyFlow() {
|
|
|
336
413
|
appendMetric({ type: 'retry_scheduled', at: now, attemptId: predecessorAttemptId, nextAgent: agent, retryAfterFix: retryAfterFix || null, source: 'hook', attributionConfidence: 'unknown' });
|
|
337
414
|
activateAttempts({ agent }, stepIndex);
|
|
338
415
|
}
|
|
339
|
-
if (status.state === 'changes_requested'
|
|
416
|
+
if (status.state === 'changes_requested') {
|
|
340
417
|
const reviewer = status.currentAgent;
|
|
418
|
+
if (!reviewer) {
|
|
419
|
+
process.stdout.write('{}');
|
|
420
|
+
process.exit(0);
|
|
421
|
+
}
|
|
341
422
|
scheduleLegacyRetry('feature-developer', reviewer);
|
|
342
423
|
writeStatus({
|
|
343
424
|
currentAgent: 'feature-developer',
|
|
@@ -411,7 +492,7 @@ if (hookInput.action === 'end_human_gate') {
|
|
|
411
492
|
parallelCompleted: [],
|
|
412
493
|
});
|
|
413
494
|
if (resumeNext.step.parallel && resumeAgents.length > 1) out(handoffForParallelStep(resumeNext.step));
|
|
414
|
-
else out(handoffForAgent(resumeAgents[0], resumeNext.step.scope));
|
|
495
|
+
else out(handoffForAgent(resumeAgents[0], resumeNext.step.scope, resumeNext.step));
|
|
415
496
|
process.exit(0);
|
|
416
497
|
}
|
|
417
498
|
}
|
|
@@ -440,6 +521,19 @@ const steps = pipeline.steps || [];
|
|
|
440
521
|
const initialIdx = typeof status.pipelineIndex === 'number' ? status.pipelineIndex : 0;
|
|
441
522
|
const initialStep = steps[initialIdx];
|
|
442
523
|
const activeAttemptCountBeforeFinish = Object.keys(status.activeAttempts || {}).length;
|
|
524
|
+
const completingAgentHint = (() => {
|
|
525
|
+
const resolved = resolvedAttempt();
|
|
526
|
+
if (resolved?.entry?.agent) return resolved.entry.agent;
|
|
527
|
+
if (status.currentAgent) return status.currentAgent;
|
|
528
|
+
return getStepAgents(initialStep)[0];
|
|
529
|
+
})();
|
|
530
|
+
const reconcilingAttempt = resolvedAttempt();
|
|
531
|
+
reconcileStatusFromManifest(completingAgentHint, initialStep, reconcilingAttempt);
|
|
532
|
+
if (status.state === 'awaiting_artifact_receipt') {
|
|
533
|
+
writeStatus({});
|
|
534
|
+
process.stdout.write('{}');
|
|
535
|
+
process.exit(0);
|
|
536
|
+
}
|
|
443
537
|
const finishedAttempt = finishActiveAttempt();
|
|
444
538
|
if (!finishedAttempt && (hookInput.attemptId || activeAttemptCountBeforeFinish > 0)) {
|
|
445
539
|
process.stdout.write('{}');
|
|
@@ -447,6 +541,7 @@ if (!finishedAttempt && (hookInput.attemptId || activeAttemptCountBeforeFinish >
|
|
|
447
541
|
}
|
|
448
542
|
endHumanGateIfResumed();
|
|
449
543
|
if (steps.length === 0 || pipeline.autoChain === false) {
|
|
544
|
+
writeStatus({});
|
|
450
545
|
process.stdout.write('{}');
|
|
451
546
|
process.exit(0);
|
|
452
547
|
}
|
|
@@ -472,8 +567,74 @@ function scheduleRetry(agent, retryAfterFix, predecessor, explicitStepIndex = nu
|
|
|
472
567
|
return stepIndex;
|
|
473
568
|
}
|
|
474
569
|
|
|
475
|
-
|
|
476
|
-
|
|
570
|
+
const idx = typeof status.pipelineIndex === 'number' ? status.pipelineIndex : 0;
|
|
571
|
+
const currentStep = steps[idx];
|
|
572
|
+
const completedAgent = finishedAttempt?.entry?.agent || status.currentAgent || getStepAgents(currentStep)[0];
|
|
573
|
+
const stepAgents = getStepAgents(currentStep);
|
|
574
|
+
if (currentStep?.parallel && stepAgents.length > 1) {
|
|
575
|
+
const done = [...(status.parallelCompleted || [])];
|
|
576
|
+
const outcomes = { ...(status.parallelOutcomes || {}) };
|
|
577
|
+
if (finishedAttempt && completedAgent) {
|
|
578
|
+
if (!done.includes(completedAgent)) done.push(completedAgent);
|
|
579
|
+
outcomes[completedAgent] = {
|
|
580
|
+
outcome: finishedAttempt.outcome || status.state,
|
|
581
|
+
attemptId: finishedAttempt.attemptId,
|
|
582
|
+
confidence: finishedAttempt.confidence,
|
|
583
|
+
};
|
|
584
|
+
}
|
|
585
|
+
writeStatus({ parallelCompleted: done, parallelOutcomes: outcomes });
|
|
586
|
+
const remaining = stepAgents.filter((agent) => !done.includes(agent));
|
|
587
|
+
if (remaining.length > 0) {
|
|
588
|
+
process.stdout.write('{}');
|
|
589
|
+
process.exit(0);
|
|
590
|
+
}
|
|
591
|
+
|
|
592
|
+
const blockedProducer = stepAgents.find((agent) => outcomes[agent]?.outcome === 'blocked');
|
|
593
|
+
if (blockedProducer) {
|
|
594
|
+
writeStatus({ parallelCompleted: [], parallelOutcomes: {}, state: 'blocked', phase: 'blocked', currentAgent: blockedProducer });
|
|
595
|
+
process.stdout.write('{}');
|
|
596
|
+
process.exit(0);
|
|
597
|
+
}
|
|
598
|
+
|
|
599
|
+
const retryReviewer = stepAgents.find((agent) => outcomes[agent]?.outcome === 'changes_requested');
|
|
600
|
+
if (retryReviewer) {
|
|
601
|
+
const retryAfterFixStepIndex = idx;
|
|
602
|
+
const predecessor = outcomes[retryReviewer]
|
|
603
|
+
? {
|
|
604
|
+
attemptId: outcomes[retryReviewer].attemptId,
|
|
605
|
+
confidence: outcomes[retryReviewer].confidence,
|
|
606
|
+
}
|
|
607
|
+
: finishedAttempt;
|
|
608
|
+
const developerIndex = scheduleRetry('feature-developer', retryReviewer, predecessor);
|
|
609
|
+
writeStatus({
|
|
610
|
+
pipelineIndex: developerIndex,
|
|
611
|
+
currentAgent: 'feature-developer',
|
|
612
|
+
state: 'in_progress',
|
|
613
|
+
phase: 'executing',
|
|
614
|
+
retryAfterFix: retryReviewer,
|
|
615
|
+
retryAfterFixStepIndex,
|
|
616
|
+
parallelCompleted: [],
|
|
617
|
+
parallelOutcomes: {},
|
|
618
|
+
});
|
|
619
|
+
out(handoffForAgent('feature-developer', steps[developerIndex]?.scope, steps[developerIndex]) + ` After fixes, re-run ${retryReviewer}.`);
|
|
620
|
+
process.exit(0);
|
|
621
|
+
}
|
|
622
|
+
|
|
623
|
+
writeStatus({ parallelCompleted: [], parallelOutcomes: {}, state: 'completed' });
|
|
624
|
+
}
|
|
625
|
+
|
|
626
|
+
if (status.state === 'blocked') {
|
|
627
|
+
writeStatus({ state: 'blocked', phase: 'blocked', currentAgent: completedAgent });
|
|
628
|
+
process.stdout.write('{}');
|
|
629
|
+
process.exit(0);
|
|
630
|
+
}
|
|
631
|
+
|
|
632
|
+
if (status.state === 'changes_requested') {
|
|
633
|
+
const reviewer = status.currentAgent || finishedAttempt?.entry?.agent;
|
|
634
|
+
if (!reviewer) {
|
|
635
|
+
process.stdout.write('{}');
|
|
636
|
+
process.exit(0);
|
|
637
|
+
}
|
|
477
638
|
const retryAfterFixStepIndex = typeof status.pipelineIndex === 'number' ? status.pipelineIndex : 0;
|
|
478
639
|
const developerIndex = scheduleRetry('feature-developer', reviewer, finishedAttempt);
|
|
479
640
|
writeStatus({
|
|
@@ -484,7 +645,7 @@ if (status.state === 'changes_requested' && REVIEW_AGENTS.has(status.currentAgen
|
|
|
484
645
|
retryAfterFix: reviewer,
|
|
485
646
|
retryAfterFixStepIndex,
|
|
486
647
|
});
|
|
487
|
-
out(handoffForAgent('feature-developer') + ` After fixes, re-run ${reviewer}.`);
|
|
648
|
+
out(handoffForAgent('feature-developer', steps[developerIndex]?.scope, steps[developerIndex]) + ` After fixes, re-run ${reviewer}.`);
|
|
488
649
|
process.exit(0);
|
|
489
650
|
}
|
|
490
651
|
|
|
@@ -499,7 +660,7 @@ if (status.state === 'validation_failed' && status.currentAgent === 'build-verif
|
|
|
499
660
|
retryAfterFix: 'build-verifier',
|
|
500
661
|
retryAfterFixStepIndex,
|
|
501
662
|
});
|
|
502
|
-
out(handoffForAgent('feature-developer') + ' Read validation-report.md. After fixes, re-run build-verifier.');
|
|
663
|
+
out(handoffForAgent('feature-developer', steps[developerIndex]?.scope, steps[developerIndex]) + ' Read validation-report.md. After fixes, re-run build-verifier.');
|
|
503
664
|
process.exit(0);
|
|
504
665
|
}
|
|
505
666
|
|
|
@@ -507,35 +668,16 @@ if (status.state === 'completed' && status.retryAfterFix) {
|
|
|
507
668
|
const retry = status.retryAfterFix;
|
|
508
669
|
const retryIndex = scheduleRetry(retry, null, finishedAttempt, status.retryAfterFixStepIndex);
|
|
509
670
|
writeStatus({ pipelineIndex: retryIndex, currentAgent: retry, state: 'in_progress', retryAfterFix: null, retryAfterFixStepIndex: null });
|
|
510
|
-
out(handoffForAgent(retry));
|
|
671
|
+
out(handoffForAgent(retry, steps[retryIndex]?.scope, steps[retryIndex]));
|
|
511
672
|
process.exit(0);
|
|
512
673
|
}
|
|
513
674
|
|
|
514
|
-
const idx = typeof status.pipelineIndex === 'number' ? status.pipelineIndex : 0;
|
|
515
|
-
const currentStep = steps[idx];
|
|
516
675
|
if (!currentStep) {
|
|
517
676
|
writeStatus({ phase: 'done', state: 'completed', currentAgent: null });
|
|
518
677
|
out(`Pipeline complete for "${slug}". Run /technical-retro ${slug}.`);
|
|
519
678
|
process.exit(0);
|
|
520
679
|
}
|
|
521
680
|
|
|
522
|
-
const completedAgent = finishedAttempt?.entry?.agent || status.currentAgent || getStepAgents(currentStep)[0];
|
|
523
|
-
const stepAgents = getStepAgents(currentStep);
|
|
524
|
-
|
|
525
|
-
if (currentStep.parallel && stepAgents.length > 1) {
|
|
526
|
-
const done = [...(status.parallelCompleted || [])];
|
|
527
|
-
if (completedAgent && !done.includes(completedAgent)) {
|
|
528
|
-
done.push(completedAgent);
|
|
529
|
-
}
|
|
530
|
-
writeStatus({ parallelCompleted: done });
|
|
531
|
-
const remaining = stepAgents.filter((a) => !done.includes(a));
|
|
532
|
-
if (remaining.length > 0) {
|
|
533
|
-
process.stdout.write('{}');
|
|
534
|
-
process.exit(0);
|
|
535
|
-
}
|
|
536
|
-
writeStatus({ parallelCompleted: [] });
|
|
537
|
-
}
|
|
538
|
-
|
|
539
681
|
if (hasGateAfterStep(currentStep, pipeline.humanGates)) {
|
|
540
682
|
beginHumanGate();
|
|
541
683
|
writeStatus({
|
|
@@ -577,6 +719,6 @@ writeStatus({
|
|
|
577
719
|
if (nextStep.parallel && nextAgents.length > 1) {
|
|
578
720
|
out(handoffForParallelStep(nextStep));
|
|
579
721
|
} else {
|
|
580
|
-
out(handoffForAgent(nextAgents[0], nextStep.scope));
|
|
722
|
+
out(handoffForAgent(nextAgents[0], nextStep.scope, nextStep));
|
|
581
723
|
}
|
|
582
724
|
NODE
|