@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
|
@@ -30,10 +30,21 @@
|
|
|
30
30
|
|
|
31
31
|
Bootstrap `tasks/<slug>/` by **writing** artifacts (Write tool), not Shell `mkdir`. Cursor sandbox → `Operation not permitted` otherwise (worse on Desktop/Documents).
|
|
32
32
|
|
|
33
|
+
## Artifact manifest and receipts
|
|
34
|
+
|
|
35
|
+
Each slug stores one context index at `.cursor/team/tasks/<slug>/artifact-manifest.json`. Schema v1 is defined by shared core `agent-team/agent-artifact-contracts.md`: every entry declares its producer, status, authoritative paths, acceptance-criteria IDs, decomposition task IDs, timestamps, and a terminal completion receipt.
|
|
36
|
+
|
|
37
|
+
Producer/consumer rules:
|
|
38
|
+
|
|
39
|
+
- Read the manifest first and use only the authoritative inputs needed by the current step; fall back to `brief.md`, `decomposition.md`, and `pipeline.json` when it is missing or stale, and report that gap.
|
|
40
|
+
- Producers upsert only their stable entry IDs, preserve foreign entries, and finish with `completed`, `blocked`, `changes_requested`, or `validation_failed` receipt evidence.
|
|
41
|
+
- The router owns `pipeline.json` and its routing entry; analyst, developer, verifier, and reviewer own their named outputs and receipts. Consumers do not edit another producer's receipt.
|
|
42
|
+
- Agents do not mutate `status.json` or `metrics.json`. The orchestration runtime/hook is their single writer. Parallel receipt merges are serialized by the parent/orchestrator.
|
|
43
|
+
|
|
33
44
|
## Local metrics ledger
|
|
34
45
|
|
|
35
|
-
`metrics.json` is an append-only schema-v1 event ledger for one task run. It contains only allowlisted IDs, task dimensions, timestamps, outcomes, and attribution confidence—never prompts, secrets, file paths, or contents. The
|
|
46
|
+
`metrics.json` is an append-only schema-v1 event ledger for one task run. It contains only allowlisted IDs, task dimensions, timestamps, outcomes, and attribution confidence—never prompts, secrets, file paths, or contents. The orchestration runtime writes `task_started` / `attempt_started`; the hook records host-clock completion and human-gate edges under a per-task lock with temp-and-rename.
|
|
36
47
|
|
|
37
|
-
`status.json.activeAttempts` is a transient timing bridge keyed by `attemptId`; `lastCompletedAttempt` is diagnostic. For parallel stops, the hook must use a stable payload identity or the sole active attempt. Otherwise an explicit `.metrics-receipts.json` receipt is fallback data marked `source: agent`, `attributionConfidence: fallback`; it must never guess from `currentAgent`.
|
|
48
|
+
`status.json.activeAttempts` is a transient timing bridge keyed by `attemptId`; `lastCompletedAttempt` is diagnostic; `parallelOutcomes` holds per-agent outcomes for the current parallel join until the step advances. For parallel stops, the hook must use a stable payload identity or the sole active attempt. Otherwise an explicit `.metrics-receipts.json` receipt is fallback data marked `source: agent`, `attributionConfidence: fallback`; it must never guess from `currentAgent`.
|
|
38
49
|
|
|
39
50
|
Aggregate with `node packages/ai-rules/scripts/aggregate-agent-task-metrics.mjs --team-root .cursor/team`. It reports role/agent count, completed count, total/average duration, distinct completed run IDs, separate human-gate wait, and incomplete artifacts.
|
|
@@ -35,7 +35,7 @@ When validating **ios-swift preset** changes (or `scope: preset-structure-valida
|
|
|
35
35
|
3. **Forbidden handoff strings** in ios-swift `chain-team-phases.sh` (Cursor + Claude): `playwright-test-`, `playwright-agents`, `playwright-e2e`, `user-playwright`, `app/__tests__/e2e`, and positive yarn lint recipes (`lint:js` / `lint:css` as commands to run — negation prose alone is not enough; prefer zero occurrences). See `preset-no-cross-stack-leakage.mdc`.
|
|
36
36
|
4. **Required handoff stems:** `AGENT_HANDOFF` must include `xcuitest-test-planner` (or generator/healer) and `build-verifier` text must mention `xcodebuild` or `post-change-build` / `xcode-tooling`.
|
|
37
37
|
5. **Roster:** 21 agent stems; no `playwright-test-*` files under ios-swift `agents/`.
|
|
38
|
-
6. **Twin presence (hard):** Cursor rule change → Claude twin present **same PR** — **FAIL** if missing (next, ios-swift, go, java, mcp-ts, php-hexagonal, and php-laravel).
|
|
38
|
+
6. **Twin presence (hard):** Cursor rule change → Claude twin present **same PR** — **FAIL** if missing (next, nuxt, svelte, ios-swift, go, java, mcp-ts, php-hexagonal, and php-laravel).
|
|
39
39
|
7. **Mapping / README:** `claude/ios-swift/rules/README.md` mapping table present; core→stack mapping documented when `_shared` consumers exist.
|
|
40
40
|
8. **shared-core consumers:** if `_shared/core/**` changed, every matching `<!-- shared-core: … -->` consumer in this PR must be updated (or intentional fork documented).
|
|
41
41
|
9. **Session-start body budget:** sum of the **3** intended always-on / session-start rule bodies ≤ **140** lines (stretch ≤120); do **not** include `**/README.md` — record in report.
|
|
@@ -47,7 +47,7 @@ When validating **ios-swift preset** changes (or `scope: preset-structure-valida
|
|
|
47
47
|
- **Thin aliases:** `agent-team-intake`, `technical-retro` may be <15 body lines. Enforce ≥15 on **domain** rules (navigation, persistence, security, modules, networking, UI).
|
|
48
48
|
- Embed vs lineage modes: `docs/PRESET-CONTRIBUTION.md`, `_shared/README.md`.
|
|
49
49
|
|
|
50
|
-
12. **Root AGENTS template:** each installable preset (`cursor|claude` × `next|ios-swift|go|java|mcp-ts|php-hexagonal`) must ship `REPO_AGENTS.md` when validating preset packaging → **FAIL** if missing.
|
|
50
|
+
12. **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` when validating preset packaging → **FAIL** if missing.
|
|
51
51
|
13. **Hooks cookbook:** default `hooks.json` must **not** reference `hooks/examples/` → **FAIL** if it does.
|
|
52
52
|
14. **No react-performance on ios/go/java:** skill directory / required handoff must be absent under ios-swift, go, java, mcp-ts, php-hexagonal, and php-laravel → **FAIL** (leakage). Prefer `check:preset-leakage`.
|
|
53
53
|
15. **Rule eval (WARN):** `scripts/check-rule-eval.mjs` / `yarn check:rule-eval` should exist for maintainers; smoke optional. Hard fail only when the opt-in eval job runs — not part of default `check:preset-structure`.
|
|
@@ -75,4 +75,11 @@ PASS | FAIL
|
|
|
75
75
|
|
|
76
76
|
## On completion
|
|
77
77
|
|
|
78
|
-
|
|
78
|
+
Write the owned validation receipt (`completed` or `validation_failed`). Do not fix code — report only; the runtime owns `status.json`.
|
|
79
|
+
|
|
80
|
+
## Artifact contract
|
|
81
|
+
|
|
82
|
+
- **Authoritative inputs:** read `.cursor/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.
|
|
83
|
+
- **Owned outputs:** `validation-report.md`; upsert only the manifest entry assigned by handoff (`artifactOutputId`; fallback `validation`) and preserve all foreign entries.
|
|
84
|
+
- **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.
|
|
85
|
+
- **Shared state:** never create or mutate `status.json` or `metrics.json`; the orchestration runtime/hook owns lifecycle, gates, retries, attempts, and timestamps.
|
|
@@ -5,7 +5,7 @@ readonly: false
|
|
|
5
5
|
model: fast
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
-
You are a senior iOS / Swift / SwiftUI code reviewer. You may write only review artifacts under `.cursor/team/**` and
|
|
8
|
+
You are a senior iOS / Swift / SwiftUI code reviewer. You may write only review artifacts under `.cursor/team/**` and terminal receipts; do not modify production code.
|
|
9
9
|
|
|
10
10
|
## Inputs
|
|
11
11
|
|
|
@@ -58,22 +58,17 @@ APPROVE | APPROVE_WITH_NOTES | REQUEST_CHANGES
|
|
|
58
58
|
|
|
59
59
|
## On completion
|
|
60
60
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
```json
|
|
64
|
-
{
|
|
65
|
-
"slug": "<slug>",
|
|
66
|
-
"currentAgent": "code-reviewer",
|
|
67
|
-
"phase": "executing",
|
|
68
|
-
"state": "completed",
|
|
69
|
-
"updatedAt": "<ISO8601>"
|
|
70
|
-
}
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
If **REQUEST_CHANGES**, set `"state": "changes_requested"` (hook will re-invoke feature-developer).
|
|
61
|
+
Write the owned terminal receipt described under **Artifact contract**. If **REQUEST_CHANGES**, emit receipt outcome `changes_requested`; the hook decides retry state.
|
|
74
62
|
|
|
75
63
|
Do not mix this output with retrospective facilitation — keep review and retro separate.
|
|
76
64
|
|
|
77
65
|
## Design guidance
|
|
78
66
|
|
|
79
67
|
- Load `design-guidance` (rule stem) when assessing structure, smells, or pattern fit.
|
|
68
|
+
|
|
69
|
+
## Artifact contract
|
|
70
|
+
|
|
71
|
+
- **Authoritative inputs:** read `.cursor/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.
|
|
72
|
+
- **Owned outputs:** `review.md`; upsert only the manifest entry assigned by handoff (`artifactOutputId`; fallback `review`) and preserve all foreign entries.
|
|
73
|
+
- **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.
|
|
74
|
+
- **Shared state:** never create or mutate `status.json` or `metrics.json`; the orchestration runtime/hook owns lifecycle, gates, retries, attempts, and timestamps.
|
|
@@ -45,7 +45,7 @@ When copying from `next` into `ios-swift` (or another stack):
|
|
|
45
45
|
|
|
46
46
|
## On completion
|
|
47
47
|
|
|
48
|
-
|
|
48
|
+
Emit the owned implementation receipt with outcome `completed`. Handoff by layer + gaps for verifier/reviewer. No formal code review.
|
|
49
49
|
|
|
50
50
|
## Design guidance
|
|
51
51
|
|
|
@@ -54,3 +54,10 @@ When copying from `next` into `ios-swift` (or another stack):
|
|
|
54
54
|
## Anti-sycophancy discipline
|
|
55
55
|
|
|
56
56
|
- When writing or changing code, load / follow rule `anti-sycophancy-discipline`.
|
|
57
|
+
|
|
58
|
+
## Artifact contract
|
|
59
|
+
|
|
60
|
+
- **Authoritative inputs:** read `.cursor/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.
|
|
61
|
+
- **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.
|
|
62
|
+
- **Terminal receipt:** cover applicable AC/task IDs, list authoritative evidence paths, and emit `completed` or `blocked`. Bind it to the supplied `attemptId` when present.
|
|
63
|
+
- **Shared state:** never create or mutate `status.json` or `metrics.json`; the orchestration runtime/hook owns lifecycle, gates, retries, attempts, and timestamps.
|
|
@@ -20,10 +20,17 @@ Ask only blocking questions (AC gaps, Feature scope, platforms, offline/auth, AP
|
|
|
20
20
|
|
|
21
21
|
1. `brief.md` — goal, AC, out of scope, assumptions.
|
|
22
22
|
2. `decomposition.md` — ordered WPs with Depends on / Done when; mark unit/UI test WPs.
|
|
23
|
-
3.
|
|
23
|
+
3. Emit the analysis receipt; the runtime applies the configured analyst human gate.
|
|
24
24
|
|
|
25
25
|
Do not invent architecture stacks (TCA, SwiftData, …) — frame «как в репо».
|
|
26
26
|
|
|
27
27
|
## Design guidance (optional)
|
|
28
28
|
|
|
29
29
|
- Optional: Load `design-guidance` (rule stem) when assessing structure, smells, or pattern fit — only when decomposing refactor/architecture tasks (not default).
|
|
30
|
+
|
|
31
|
+
## Artifact contract
|
|
32
|
+
|
|
33
|
+
- **Authoritative inputs:** read `.cursor/team/tasks/<slug>/artifact-manifest.json` first; consume `pipeline.json`, the manifest routing entry, user-approved decisions, and any authoritative architecture/approval entries.
|
|
34
|
+
- **Owned outputs:** `brief.md` and `decomposition.md`; upsert only the manifest entry assigned by handoff (`artifactOutputId`; fallback `analysis`) and preserve all foreign entries.
|
|
35
|
+
- **Terminal receipt:** cover applicable AC/task IDs, list authoritative evidence paths, and emit `completed` or `blocked`. Bind it to the supplied `attemptId` when present.
|
|
36
|
+
- **Shared state:** never create or mutate `status.json` or `metrics.json`; the orchestration runtime/hook owns lifecycle, gates, retries, attempts, and timestamps.
|
|
@@ -40,6 +40,27 @@ You are a task router for an **iOS Swift/SwiftUI** agent team. You **do not** im
|
|
|
40
40
|
|
|
41
41
|
**Never skip `build-verifier`** after developer when Swift/Xcode sources changed.
|
|
42
42
|
|
|
43
|
+
## Routing decision rubric
|
|
44
|
+
|
|
45
|
+
Keep top-level `profile` and emit this top-level object in every new `pipeline.json`:
|
|
46
|
+
|
|
47
|
+
```json
|
|
48
|
+
"routingDecision": {
|
|
49
|
+
"complexity": "low | moderate | high",
|
|
50
|
+
"riskFlags": [],
|
|
51
|
+
"routingReasons": ["Concrete request signal and its routing consequence."],
|
|
52
|
+
"estimatedWorkPackages": 1,
|
|
53
|
+
"openDecisionCount": 0
|
|
54
|
+
}
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
- `low`: one bounded layer/file set, explicit AC, reversible, no risk flags/open decisions → `light` when verification policy permits.
|
|
58
|
+
- `moderate`: adjacent concerns or a regression/refactor with known boundaries → usually `standard`.
|
|
59
|
+
- `high`: cross-layer/public contract, security, migration/destructive or concurrency/state risk, broad UI-test surface, unclear AC, or multiple work packages → usually `full`.
|
|
60
|
+
- Use concrete flags: `public-contract`, `cross-layer`, `security-sensitive`, `migration`, `destructive`, `concurrency-state`, `external-dependency`, `unclear-acceptance-criteria`, `broad-test-surface`, `behavior-regression`.
|
|
61
|
+
- `routingReasons` must be non-empty and explain profile, gates, specialists, skips, or checkpoints; never write “standard by default.”
|
|
62
|
+
- `estimatedWorkPackages` is an integer ≥1; `openDecisionCount` is an integer ≥0. Do not lower complexity because implementation is familiar.
|
|
63
|
+
|
|
43
64
|
## Model tiers (`steps[].model`)
|
|
44
65
|
|
|
45
66
|
Optional: `"model": "cheap" | "standard" | "strong"`. Same policy as **cursor/next** `task-router.md`:
|
|
@@ -64,12 +85,19 @@ Fixtures: `.cursor/team/fixtures/` (feature-full, feature-light, bugfix-standard
|
|
|
64
85
|
|
|
65
86
|
## Output
|
|
66
87
|
|
|
67
|
-
Write `.cursor/team/tasks/<slug>/pipeline.json` and
|
|
88
|
+
Write `.cursor/team/tasks/<slug>/pipeline.json` and initialize the routing entry in `artifact-manifest.json`; set `.cursor/team/active-task.json`. The orchestration runtime creates and owns `status.json`.
|
|
68
89
|
|
|
69
90
|
## Handoff
|
|
70
91
|
|
|
71
92
|
Intent + steps table + skipped + gates → invoke `steps[0].agent` (unless retro).
|
|
72
93
|
|
|
73
|
-
##
|
|
94
|
+
## Runtime initialization
|
|
95
|
+
|
|
96
|
+
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.
|
|
97
|
+
|
|
98
|
+
## Artifact contract
|
|
74
99
|
|
|
75
|
-
|
|
100
|
+
- **Authoritative inputs:** read `.cursor/team/tasks/<slug>/artifact-manifest.json` first; consume the user request and any existing authoritative task/decision entries.
|
|
101
|
+
- **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.
|
|
102
|
+
- **Terminal receipt:** cover applicable AC/task IDs, list authoritative evidence paths, and emit `completed` or `blocked`. Bind it to the supplied `attemptId` when present.
|
|
103
|
+
- **Shared state:** never create or mutate `status.json` or `metrics.json`; the orchestration runtime/hook owns lifecycle, gates, retries, attempts, and timestamps.
|
|
@@ -25,14 +25,16 @@ description: Route a natural-language task through the agent-team pipeline: task
|
|
|
25
25
|
|
|
26
26
|
## Алгоритм
|
|
27
27
|
|
|
28
|
-
1. **Slug** — kebab-case из описания (≤48 символов). Создай `.cursor/team/tasks/<slug>/` через **Write** (например
|
|
28
|
+
1. **Slug** — kebab-case из описания (≤48 символов). Создай `.cursor/team/tasks/<slug>/` через **Write** (например placeholder `pipeline.json` или пустой marker) — runtime/hook владеет `status.json` — **не** через Shell `mkdir` (песочница → `Operation not permitted`).
|
|
29
29
|
2. **Router** — вызови subagent **task-router** с описанием задачи и путём к slug.
|
|
30
30
|
3. **План** — покажи пользователю таблицу из `pipeline.json`: intent, steps, skipped, humanGates.
|
|
31
31
|
4. **Intent retro** — если `intent === "retro"`, выполни `/technical-retro` и **остановись**.
|
|
32
|
-
5. **Старт** —
|
|
33
|
-
-
|
|
34
|
-
-
|
|
35
|
-
|
|
32
|
+
5. **Старт** — после router:
|
|
33
|
+
- подтверди `pipeline.json` и `active-task.json`;
|
|
34
|
+
- **не** пиши 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` вручную;
|
|
35
|
+
- вызови subagent для `pipeline.steps[0].agent` (slug, пути к артефактам, scope).
|
|
36
|
+
6. **После каждого агента** — дождись hook handoff / reconciliation terminal receipt → `status.state`; не запускай следующий шаг, пока `status.json` не отражает handoff (или пока нет `followup_message` от hook).
|
|
37
|
+
7. **Human gate** — если после текущего шага есть gate в `humanGates` (`after:<agent>`), после завершения агента **остановись** и попроси `/task-continue <slug>` (или `/feature-continue <slug>`).
|
|
36
38
|
|
|
37
39
|
## Не делать
|
|
38
40
|
|
|
@@ -51,4 +53,4 @@ description: Route a natural-language task through the agent-team pipeline: task
|
|
|
51
53
|
|
|
52
54
|
## Metrics
|
|
53
55
|
|
|
54
|
-
|
|
56
|
+
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.
|
|
@@ -122,6 +122,27 @@ function roleFor(agent) {
|
|
|
122
122
|
if (/writer/.test(agent || '')) return 'docs';
|
|
123
123
|
return 'implementation';
|
|
124
124
|
}
|
|
125
|
+
const DEFAULT_ARTIFACT_OUTPUT_IDS = {
|
|
126
|
+
'task-router': 'routing',
|
|
127
|
+
'task-analyst': 'analysis',
|
|
128
|
+
'solution-architect': 'architecture',
|
|
129
|
+
'migration-specialist': 'migration-plan',
|
|
130
|
+
debugger: 'debug',
|
|
131
|
+
'ci-investigator': 'ci',
|
|
132
|
+
'feature-developer': 'implementation',
|
|
133
|
+
'build-verifier': 'validation',
|
|
134
|
+
'code-reviewer': 'review',
|
|
135
|
+
'security-reviewer': 'security-review',
|
|
136
|
+
'accessibility-reviewer': 'a11y-review',
|
|
137
|
+
'performance-auditor': 'perf-report',
|
|
138
|
+
'api-contract-reviewer': 'api-contract-review',
|
|
139
|
+
'tech-writer': 'documentation',
|
|
140
|
+
};
|
|
141
|
+
function artifactOutputIdFor(step, agent) {
|
|
142
|
+
if (step && typeof step.artifactOutputId === 'string') return step.artifactOutputId;
|
|
143
|
+
if (step?.artifactOutputIds && typeof step.artifactOutputIds[agent] === 'string') return step.artifactOutputIds[agent];
|
|
144
|
+
return DEFAULT_ARTIFACT_OUTPUT_IDS[agent] || agent;
|
|
145
|
+
}
|
|
125
146
|
function activateAttempts(step, stepIndex) {
|
|
126
147
|
const active = { ...(status.activeAttempts || {}) }; const agents = getStepAgents(step);
|
|
127
148
|
const parallelGroupId = step.parallel && agents.length > 1 ? `${status.metricsRunId || slug}:step-${stepIndex}` : null;
|
|
@@ -144,11 +165,61 @@ function resolvedAttempt() {
|
|
|
144
165
|
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 {}
|
|
145
166
|
return null;
|
|
146
167
|
}
|
|
168
|
+
function readBoundReceiptOutcome(agent, step, resolved) {
|
|
169
|
+
if (!agent || !resolved) return { outcome: null, receiptRequired: false };
|
|
170
|
+
const manifestPath = path.join(taskDir, 'artifact-manifest.json');
|
|
171
|
+
if (!fs.existsSync(manifestPath)) return { outcome: null, receiptRequired: false };
|
|
172
|
+
try {
|
|
173
|
+
const manifest = JSON.parse(fs.readFileSync(manifestPath, 'utf8'));
|
|
174
|
+
const artifacts = Array.isArray(manifest.artifacts) ? manifest.artifacts : [];
|
|
175
|
+
const expectedOutputId = artifactOutputIdFor(step, agent);
|
|
176
|
+
const attemptStartedAt = Date.parse(resolved.entry.startedAt);
|
|
177
|
+
const owned = artifacts
|
|
178
|
+
.filter((entry) => {
|
|
179
|
+
if (!entry || entry.producer !== agent || !entry.receipt || typeof entry.receipt.outcome !== 'string') return false;
|
|
180
|
+
const boundByAttempt = typeof entry.receipt.attemptId === 'string' && entry.receipt.attemptId === resolved.attemptId;
|
|
181
|
+
const boundByOutput = entry.receipt.attemptId == null && entry.id === expectedOutputId;
|
|
182
|
+
if (!boundByAttempt && !boundByOutput) return false;
|
|
183
|
+
const terminalAt = Date.parse(entry.timestamps?.completedAt || entry.timestamps?.updatedAt || '');
|
|
184
|
+
return Number.isFinite(terminalAt) && (!Number.isFinite(attemptStartedAt) || terminalAt >= attemptStartedAt);
|
|
185
|
+
})
|
|
186
|
+
.sort((a, b) => {
|
|
187
|
+
const ta = Date.parse(a.timestamps?.completedAt || a.timestamps?.updatedAt || 0) || 0;
|
|
188
|
+
const tb = Date.parse(b.timestamps?.completedAt || b.timestamps?.updatedAt || 0) || 0;
|
|
189
|
+
return tb - ta;
|
|
190
|
+
});
|
|
191
|
+
return { outcome: owned[0]?.receipt?.outcome || null, receiptRequired: true };
|
|
192
|
+
} catch {
|
|
193
|
+
return { outcome: null, receiptRequired: false };
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
function reconcileStatusFromManifest(agent, step, resolved) {
|
|
197
|
+
const terminal = new Set(['completed', 'blocked', 'changes_requested', 'validation_failed']);
|
|
198
|
+
const { outcome, receiptRequired } = readBoundReceiptOutcome(agent, step, resolved);
|
|
199
|
+
if (terminal.has(outcome)) {
|
|
200
|
+
status.state = outcome;
|
|
201
|
+
return outcome;
|
|
202
|
+
}
|
|
203
|
+
if (receiptRequired) {
|
|
204
|
+
status.state = 'awaiting_artifact_receipt';
|
|
205
|
+
status.phase = 'blocked';
|
|
206
|
+
return status.state;
|
|
207
|
+
}
|
|
208
|
+
if (terminal.has(status.state)) return status.state;
|
|
209
|
+
// Host reported subagent completed and no blocking receipt → treat as completed for metrics/advance.
|
|
210
|
+
if (hookInput.status === 'completed') {
|
|
211
|
+
status.state = 'completed';
|
|
212
|
+
return 'completed';
|
|
213
|
+
}
|
|
214
|
+
return status.state;
|
|
215
|
+
}
|
|
216
|
+
|
|
147
217
|
function finishActiveAttempt() {
|
|
148
218
|
const resolved = resolvedAttempt(); if (!resolved) return null;
|
|
149
219
|
const durationMs = Date.parse(now) - Date.parse(resolved.entry.startedAt);
|
|
150
|
-
|
|
151
|
-
|
|
220
|
+
const outcome = ['completed', 'blocked', 'changes_requested', 'validation_failed'].includes(status.state) ? status.state : 'unknown';
|
|
221
|
+
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 });
|
|
222
|
+
const active = { ...(status.activeAttempts || {}) }; delete active[resolved.attemptId]; status.activeAttempts = active; status.lastCompletedAttempt = { attemptId: resolved.attemptId, completedAt: now }; return { ...resolved, outcome };
|
|
152
223
|
}
|
|
153
224
|
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; }
|
|
154
225
|
function endHumanGateIfResumed() {
|
|
@@ -217,56 +288,56 @@ function findNextExecutableStep(steps, startIdx, dir) {
|
|
|
217
288
|
const AGENT_HANDOFF = {
|
|
218
289
|
'task-analyst': (s) =>
|
|
219
290
|
`Invoke task-analyst for slug "${s}". Write brief.md and decomposition.md under .cursor/team/tasks/${s}/. ` +
|
|
220
|
-
`
|
|
291
|
+
`Upsert the analysis receipt in artifact-manifest.json; do not mutate status.json lifecycle fields. Do not use legacy phase analysis.`,
|
|
221
292
|
debugger: (s) =>
|
|
222
293
|
`Invoke debugger subagent for slug "${s}". Investigate root cause; write debug-report.md with fixApplied: true/false. ` +
|
|
223
|
-
`
|
|
294
|
+
`Upsert the owned terminal receipt in artifact-manifest.json; do not mutate status.json lifecycle fields.`,
|
|
224
295
|
'solution-architect': (s) =>
|
|
225
|
-
`Invoke solution-architect for slug "${s}". Read brief.md; write architecture.md.
|
|
296
|
+
`Invoke solution-architect for slug "${s}". Read brief.md; write architecture.md. Upsert the owned terminal receipt in artifact-manifest.json; do not mutate status.json lifecycle fields.`,
|
|
226
297
|
'migration-specialist': (s) =>
|
|
227
|
-
`Invoke migration-specialist for slug "${s}". Read brief.md; write migration-plan.md.
|
|
298
|
+
`Invoke migration-specialist for slug "${s}". Read brief.md; write migration-plan.md. Upsert the owned terminal receipt in artifact-manifest.json; do not mutate status.json lifecycle fields.`,
|
|
228
299
|
'api-contract-reviewer': (s) =>
|
|
229
|
-
`Invoke api-contract-reviewer (readonly) for slug "${s}". Write api-contract-review.md.
|
|
300
|
+
`Invoke api-contract-reviewer (readonly) for slug "${s}". Write api-contract-review.md. Upsert the owned terminal receipt in artifact-manifest.json; do not mutate status.json lifecycle fields.`,
|
|
230
301
|
'ci-investigator': (s) =>
|
|
231
302
|
`Invoke ci-investigator for slug "${s}". Diagnose CI failure; write ci-report.md; apply minimal fix. ` +
|
|
232
|
-
`Use ci-investigation skill.
|
|
303
|
+
`Use ci-investigation skill. Upsert the owned terminal receipt in artifact-manifest.json; do not mutate status.json lifecycle fields.`,
|
|
233
304
|
'feature-developer': (s) =>
|
|
234
305
|
`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. ` +
|
|
235
306
|
`Follow feature-delivery-workflow.mdc and reference-features.mdc. Prefer Features/Presentation/Domain/Data (or SPM module) paths over app/src. ` +
|
|
236
|
-
`Include XCTest/Swift Testing unit coverage for mappers/logic before handoff.
|
|
307
|
+
`Include XCTest/Swift Testing unit coverage for mappers/logic before handoff. Upsert the owned terminal receipt in artifact-manifest.json; do not mutate status.json lifecycle fields.`,
|
|
237
308
|
'build-verifier': (s) =>
|
|
238
309
|
`Invoke build-verifier (readonly) for slug "${s}". Follow xcode-tooling.mdc and post-change-build.mdc. ` +
|
|
239
310
|
`Run xcodebuild (or swift build/test for SPM-only), SwiftLint/SwiftFormat if configured, and targeted unit smoke — never yarn/ESLint/Stylelint from app/. ` +
|
|
240
|
-
`Write validation-report.md
|
|
311
|
+
`Write validation-report.md and emit receipt outcome completed or validation_failed. Do not edit production code.`,
|
|
241
312
|
'accessibility-reviewer': (s) =>
|
|
242
|
-
`Invoke accessibility-reviewer (readonly) for slug "${s}". Review Presentation/SwiftUI (or UIKit) diff for VoiceOver/Dynamic Type/accessibilityIdentifier; write a11y-review.md.
|
|
313
|
+
`Invoke accessibility-reviewer (readonly) for slug "${s}". Review Presentation/SwiftUI (or UIKit) diff for VoiceOver/Dynamic Type/accessibilityIdentifier; write a11y-review.md. Upsert the owned terminal receipt in artifact-manifest.json; do not mutate status.json lifecycle fields.`,
|
|
243
314
|
'performance-auditor': (s) =>
|
|
244
|
-
`Invoke performance-auditor (readonly) for slug "${s}". Audit launch/SwiftUI performance risks; write perf-report.md.
|
|
315
|
+
`Invoke performance-auditor (readonly) for slug "${s}". Audit launch/SwiftUI performance 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. ` +
|
|
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}". Write security-review.md.
|
|
320
|
+
`Invoke security-reviewer (readonly) for slug "${s}". 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 XCTest and XCUITest (*UITests) per brief. Follow tests-ui.mdc and skill xcuitest-e2e.
|
|
323
|
+
`Add/update XCTest and XCUITest (*UITests) per brief. Follow tests-ui.mdc and skill xcuitest-e2e. 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 XCTest/Swift Testing. Use unit-testing skill.
|
|
325
|
+
`Invoke unit-test-planner for slug "${s}". Write unit-test-plan.md for XCTest/Swift Testing. 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 *Tests from unit-test-plan.md. Use unit-testing skill.
|
|
327
|
+
`Invoke unit-test-generator for slug "${s}". Implement *Tests from unit-test-plan.md. 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
|
'xcuitest-test-planner': (s) =>
|
|
260
331
|
`Invoke xcuitest-test-planner for slug "${s}". Create/update XCUITest plans (*UITests / *.cases.md if used). ` +
|
|
261
|
-
`Follow tests-ui.mdc and the xcuitest-e2e skill. Do not use Playwright MCP.
|
|
332
|
+
`Follow tests-ui.mdc and the xcuitest-e2e skill. Do not use Playwright MCP. Upsert the owned terminal receipt in artifact-manifest.json; do not mutate status.json lifecycle fields.`,
|
|
262
333
|
'xcuitest-test-generator': (s) =>
|
|
263
334
|
`Invoke xcuitest-test-generator for slug "${s}". Generate/update *UITests from matching plans/*.cases.md. ` +
|
|
264
|
-
`Follow tests-ui.mdc and the xcuitest-e2e skill. Do not use Playwright MCP.
|
|
335
|
+
`Follow tests-ui.mdc and the xcuitest-e2e skill. Do not use Playwright MCP. Upsert the owned terminal receipt in artifact-manifest.json; do not mutate status.json lifecycle fields.`,
|
|
265
336
|
'xcuitest-test-healer': (s) =>
|
|
266
337
|
`Invoke xcuitest-test-healer for slug "${s}". Fix failing/flaky XCUITest while preserving plan assertions. ` +
|
|
267
|
-
`Follow tests-ui.mdc, xcuitest-e2e, and debug-investigation. Do not use Playwright MCP.
|
|
338
|
+
`Follow tests-ui.mdc, xcuitest-e2e, and debug-investigation. Do not use Playwright MCP. 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,73 @@ 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
|
+
|
|
575
|
+
if (currentStep?.parallel && stepAgents.length > 1) {
|
|
576
|
+
const done = [...(status.parallelCompleted || [])];
|
|
577
|
+
const outcomes = { ...(status.parallelOutcomes || {}) };
|
|
578
|
+
if (finishedAttempt && completedAgent) {
|
|
579
|
+
if (!done.includes(completedAgent)) done.push(completedAgent);
|
|
580
|
+
outcomes[completedAgent] = {
|
|
581
|
+
outcome: finishedAttempt.outcome || status.state,
|
|
582
|
+
attemptId: finishedAttempt.attemptId,
|
|
583
|
+
confidence: finishedAttempt.confidence,
|
|
584
|
+
};
|
|
585
|
+
}
|
|
586
|
+
writeStatus({ parallelCompleted: done, parallelOutcomes: outcomes });
|
|
587
|
+
const remaining = stepAgents.filter((agent) => !done.includes(agent));
|
|
588
|
+
if (remaining.length > 0) {
|
|
589
|
+
process.stdout.write('{}');
|
|
590
|
+
process.exit(0);
|
|
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
|
+
writeStatus({ parallelCompleted: [], parallelOutcomes: {}, state: 'completed' });
|
|
623
|
+
}
|
|
624
|
+
|
|
625
|
+
if (status.state === 'blocked') {
|
|
626
|
+
writeStatus({ state: 'blocked', phase: 'blocked', currentAgent: completedAgent });
|
|
627
|
+
process.stdout.write('{}');
|
|
628
|
+
process.exit(0);
|
|
629
|
+
}
|
|
630
|
+
|
|
631
|
+
if (status.state === 'changes_requested') {
|
|
632
|
+
const reviewer = status.currentAgent || finishedAttempt?.entry?.agent;
|
|
633
|
+
if (!reviewer) {
|
|
634
|
+
process.stdout.write('{}');
|
|
635
|
+
process.exit(0);
|
|
636
|
+
}
|
|
477
637
|
const retryAfterFixStepIndex = typeof status.pipelineIndex === 'number' ? status.pipelineIndex : 0;
|
|
478
638
|
const developerIndex = scheduleRetry('feature-developer', reviewer, finishedAttempt);
|
|
479
639
|
writeStatus({
|
|
@@ -484,7 +644,7 @@ if (status.state === 'changes_requested' && REVIEW_AGENTS.has(status.currentAgen
|
|
|
484
644
|
retryAfterFix: reviewer,
|
|
485
645
|
retryAfterFixStepIndex,
|
|
486
646
|
});
|
|
487
|
-
out(handoffForAgent('feature-developer') + ` After fixes, re-run ${reviewer}.`);
|
|
647
|
+
out(handoffForAgent('feature-developer', steps[developerIndex]?.scope, steps[developerIndex]) + ` After fixes, re-run ${reviewer}.`);
|
|
488
648
|
process.exit(0);
|
|
489
649
|
}
|
|
490
650
|
|
|
@@ -499,7 +659,7 @@ if (status.state === 'validation_failed' && status.currentAgent === 'build-verif
|
|
|
499
659
|
retryAfterFix: 'build-verifier',
|
|
500
660
|
retryAfterFixStepIndex,
|
|
501
661
|
});
|
|
502
|
-
out(handoffForAgent('feature-developer') + ' Read validation-report.md. After fixes, re-run build-verifier.');
|
|
662
|
+
out(handoffForAgent('feature-developer', steps[developerIndex]?.scope, steps[developerIndex]) + ' Read validation-report.md. After fixes, re-run build-verifier.');
|
|
503
663
|
process.exit(0);
|
|
504
664
|
}
|
|
505
665
|
|
|
@@ -507,35 +667,16 @@ if (status.state === 'completed' && status.retryAfterFix) {
|
|
|
507
667
|
const retry = status.retryAfterFix;
|
|
508
668
|
const retryIndex = scheduleRetry(retry, null, finishedAttempt, status.retryAfterFixStepIndex);
|
|
509
669
|
writeStatus({ pipelineIndex: retryIndex, currentAgent: retry, state: 'in_progress', retryAfterFix: null, retryAfterFixStepIndex: null });
|
|
510
|
-
out(handoffForAgent(retry));
|
|
670
|
+
out(handoffForAgent(retry, steps[retryIndex]?.scope, steps[retryIndex]));
|
|
511
671
|
process.exit(0);
|
|
512
672
|
}
|
|
513
673
|
|
|
514
|
-
const idx = typeof status.pipelineIndex === 'number' ? status.pipelineIndex : 0;
|
|
515
|
-
const currentStep = steps[idx];
|
|
516
674
|
if (!currentStep) {
|
|
517
675
|
writeStatus({ phase: 'done', state: 'completed', currentAgent: null });
|
|
518
676
|
out(`Pipeline complete for "${slug}". Run /technical-retro ${slug}.`);
|
|
519
677
|
process.exit(0);
|
|
520
678
|
}
|
|
521
679
|
|
|
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
680
|
if (hasGateAfterStep(currentStep, pipeline.humanGates)) {
|
|
540
681
|
beginHumanGate();
|
|
541
682
|
writeStatus({
|
|
@@ -577,6 +718,6 @@ writeStatus({
|
|
|
577
718
|
if (nextStep.parallel && nextAgents.length > 1) {
|
|
578
719
|
out(handoffForParallelStep(nextStep));
|
|
579
720
|
} else {
|
|
580
|
-
out(handoffForAgent(nextAgents[0], nextStep.scope));
|
|
721
|
+
out(handoffForAgent(nextAgents[0], nextStep.scope, nextStep));
|
|
581
722
|
}
|
|
582
723
|
NODE
|