@bonesofspring/ai-rules 0.2.40 → 0.2.42
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 +358 -329
- package/package.json +1 -1
- package/presets/_shared/ai-local/scripts/derive-gate-signals.mjs +7 -0
- package/presets/_shared/core/agent-team/agent-artifact-contracts.md +1 -0
- package/presets/_shared/hooks/chain-team-phases.sh.tmpl +62 -5
- package/presets/claude/android-kotlin/agents/ci-investigator.md +1 -1
- package/presets/claude/android-kotlin/agents/debugger.md +1 -1
- package/presets/claude/android-kotlin/agents/feature-developer.md +1 -1
- package/presets/claude/android-kotlin/agents/migration-specialist.md +1 -1
- package/presets/claude/android-kotlin/agents/performance-auditor.md +1 -1
- package/presets/claude/android-kotlin/agents/qa-tester.md +1 -1
- package/presets/claude/android-kotlin/agents/task-analyst.md +1 -1
- package/presets/claude/android-kotlin/agents/task-router.md +1 -1
- package/presets/claude/android-kotlin/agents/tech-writer.md +1 -1
- package/presets/claude/android-kotlin/agents/unit-test-generator.md +1 -1
- package/presets/claude/android-kotlin/agents/unit-test-healer.md +1 -1
- package/presets/claude/android-kotlin/agents/unit-test-planner.md +1 -1
- package/presets/claude/android-kotlin/commands/task.md +1 -0
- package/presets/claude/android-kotlin/hooks/chain-team-phases.sh +62 -5
- package/presets/claude/android-kotlin/team/README.md +1 -1
- package/presets/claude/go/agents/feature-developer.md +1 -1
- package/presets/claude/go/agents/task-analyst.md +1 -1
- package/presets/claude/go/agents/task-router.md +1 -1
- package/presets/claude/go/commands/task.md +1 -0
- package/presets/claude/go/hooks/chain-team-phases.sh +62 -5
- package/presets/claude/go/team/README.md +1 -1
- package/presets/claude/ios-swift/agents/feature-developer.md +1 -1
- package/presets/claude/ios-swift/agents/task-analyst.md +1 -1
- package/presets/claude/ios-swift/agents/task-router.md +1 -1
- package/presets/claude/ios-swift/commands/task.md +1 -0
- package/presets/claude/ios-swift/hooks/chain-team-phases.sh +62 -5
- package/presets/claude/ios-swift/team/README.md +1 -1
- package/presets/claude/java/agents/feature-developer.md +1 -1
- package/presets/claude/java/agents/task-analyst.md +1 -1
- package/presets/claude/java/agents/task-router.md +1 -1
- package/presets/claude/java/commands/task.md +1 -0
- package/presets/claude/java/hooks/chain-team-phases.sh +62 -5
- package/presets/claude/java/team/README.md +1 -1
- package/presets/claude/mcp-ts/agents/feature-developer.md +1 -1
- package/presets/claude/mcp-ts/agents/task-analyst.md +1 -1
- package/presets/claude/mcp-ts/agents/task-router.md +1 -1
- package/presets/claude/mcp-ts/commands/task.md +1 -0
- package/presets/claude/mcp-ts/hooks/chain-team-phases.sh +62 -5
- package/presets/claude/mcp-ts/team/README.md +1 -1
- package/presets/claude/next/agents/ci-investigator.md +1 -1
- package/presets/claude/next/agents/debugger.md +1 -1
- package/presets/claude/next/agents/feature-developer.md +1 -1
- package/presets/claude/next/agents/migration-specialist.md +1 -1
- package/presets/claude/next/agents/performance-auditor.md +1 -1
- package/presets/claude/next/agents/qa-tester.md +1 -1
- package/presets/claude/next/agents/solution-architect.md +1 -1
- package/presets/claude/next/agents/task-analyst.md +1 -1
- package/presets/claude/next/agents/task-router.md +1 -1
- package/presets/claude/next/agents/tech-writer.md +1 -1
- package/presets/claude/next/agents/unit-test-generator.md +1 -1
- package/presets/claude/next/agents/unit-test-healer.md +1 -1
- package/presets/claude/next/agents/unit-test-planner.md +1 -1
- package/presets/claude/next/commands/task.md +2 -0
- package/presets/claude/next/hooks/chain-team-phases.sh +62 -5
- package/presets/claude/next/team/README.md +1 -1
- package/presets/claude/nuxt/agents/ci-investigator.md +1 -1
- package/presets/claude/nuxt/agents/debugger.md +1 -1
- package/presets/claude/nuxt/agents/feature-developer.md +1 -1
- package/presets/claude/nuxt/agents/migration-specialist.md +1 -1
- package/presets/claude/nuxt/agents/performance-auditor.md +1 -1
- package/presets/claude/nuxt/agents/qa-tester.md +1 -1
- package/presets/claude/nuxt/agents/solution-architect.md +1 -1
- package/presets/claude/nuxt/agents/task-analyst.md +1 -1
- package/presets/claude/nuxt/agents/task-router.md +1 -1
- package/presets/claude/nuxt/agents/tech-writer.md +1 -1
- package/presets/claude/nuxt/agents/unit-test-generator.md +1 -1
- package/presets/claude/nuxt/agents/unit-test-healer.md +1 -1
- package/presets/claude/nuxt/agents/unit-test-planner.md +1 -1
- package/presets/claude/nuxt/commands/task.md +1 -0
- package/presets/claude/nuxt/hooks/chain-team-phases.sh +62 -5
- package/presets/claude/nuxt/team/README.md +1 -1
- package/presets/claude/php-hexagonal/agents/feature-developer.md +1 -1
- package/presets/claude/php-hexagonal/agents/task-analyst.md +1 -1
- package/presets/claude/php-hexagonal/agents/task-router.md +1 -1
- package/presets/claude/php-hexagonal/commands/task.md +1 -0
- package/presets/claude/php-hexagonal/hooks/chain-team-phases.sh +62 -5
- package/presets/claude/php-hexagonal/team/README.md +1 -1
- package/presets/claude/php-laravel/agents/feature-developer.md +1 -1
- package/presets/claude/php-laravel/agents/task-analyst.md +1 -1
- package/presets/claude/php-laravel/agents/task-router.md +1 -1
- package/presets/claude/php-laravel/commands/task.md +1 -0
- package/presets/claude/php-laravel/hooks/chain-team-phases.sh +62 -5
- package/presets/claude/php-laravel/team/README.md +1 -1
- package/presets/claude/svelte/agents/ci-investigator.md +1 -1
- package/presets/claude/svelte/agents/debugger.md +1 -1
- package/presets/claude/svelte/agents/feature-developer.md +1 -1
- package/presets/claude/svelte/agents/migration-specialist.md +1 -1
- package/presets/claude/svelte/agents/performance-auditor.md +1 -1
- package/presets/claude/svelte/agents/qa-tester.md +1 -1
- package/presets/claude/svelte/agents/solution-architect.md +1 -1
- package/presets/claude/svelte/agents/task-analyst.md +1 -1
- package/presets/claude/svelte/agents/task-router.md +1 -1
- package/presets/claude/svelte/agents/tech-writer.md +1 -1
- package/presets/claude/svelte/agents/unit-test-generator.md +1 -1
- package/presets/claude/svelte/agents/unit-test-healer.md +1 -1
- package/presets/claude/svelte/agents/unit-test-planner.md +1 -1
- package/presets/claude/svelte/commands/task.md +1 -0
- package/presets/claude/svelte/hooks/chain-team-phases.sh +62 -5
- package/presets/claude/svelte/team/README.md +1 -1
- package/presets/cursor/android-kotlin/agents/ci-investigator.md +1 -1
- package/presets/cursor/android-kotlin/agents/debugger.md +1 -1
- package/presets/cursor/android-kotlin/agents/feature-developer.md +1 -1
- package/presets/cursor/android-kotlin/agents/migration-specialist.md +1 -1
- package/presets/cursor/android-kotlin/agents/performance-auditor.md +1 -1
- package/presets/cursor/android-kotlin/agents/qa-tester.md +1 -1
- package/presets/cursor/android-kotlin/agents/task-analyst.md +1 -1
- package/presets/cursor/android-kotlin/agents/task-router.md +1 -1
- package/presets/cursor/android-kotlin/agents/tech-writer.md +1 -1
- package/presets/cursor/android-kotlin/agents/unit-test-generator.md +1 -1
- package/presets/cursor/android-kotlin/agents/unit-test-healer.md +1 -1
- package/presets/cursor/android-kotlin/agents/unit-test-planner.md +1 -1
- package/presets/cursor/android-kotlin/commands/task.md +1 -0
- package/presets/cursor/android-kotlin/hooks/chain-team-phases.sh +62 -5
- package/presets/cursor/android-kotlin/team/README.md +1 -1
- package/presets/cursor/go/agents/feature-developer.md +1 -1
- package/presets/cursor/go/agents/task-analyst.md +1 -1
- package/presets/cursor/go/agents/task-router.md +1 -1
- package/presets/cursor/go/commands/task.md +1 -0
- package/presets/cursor/go/hooks/chain-team-phases.sh +62 -5
- package/presets/cursor/go/team/README.md +1 -1
- package/presets/cursor/ios-swift/agents/feature-developer.md +1 -1
- package/presets/cursor/ios-swift/agents/task-analyst.md +1 -1
- package/presets/cursor/ios-swift/agents/task-router.md +1 -1
- package/presets/cursor/ios-swift/commands/task.md +1 -0
- package/presets/cursor/ios-swift/hooks/chain-team-phases.sh +62 -5
- package/presets/cursor/ios-swift/team/README.md +1 -1
- package/presets/cursor/java/agents/feature-developer.md +1 -1
- package/presets/cursor/java/agents/task-analyst.md +1 -1
- package/presets/cursor/java/agents/task-router.md +1 -1
- package/presets/cursor/java/commands/task.md +1 -0
- package/presets/cursor/java/hooks/chain-team-phases.sh +62 -5
- package/presets/cursor/java/team/README.md +1 -1
- package/presets/cursor/mcp-ts/agents/feature-developer.md +1 -1
- package/presets/cursor/mcp-ts/agents/task-analyst.md +1 -1
- package/presets/cursor/mcp-ts/agents/task-router.md +1 -1
- package/presets/cursor/mcp-ts/commands/task.md +1 -0
- package/presets/cursor/mcp-ts/hooks/chain-team-phases.sh +62 -5
- package/presets/cursor/mcp-ts/team/README.md +1 -1
- package/presets/cursor/next/agents/ci-investigator.md +1 -1
- package/presets/cursor/next/agents/debugger.md +1 -1
- package/presets/cursor/next/agents/feature-developer.md +1 -1
- package/presets/cursor/next/agents/migration-specialist.md +1 -1
- package/presets/cursor/next/agents/performance-auditor.md +1 -1
- package/presets/cursor/next/agents/qa-tester.md +1 -1
- package/presets/cursor/next/agents/solution-architect.md +1 -1
- package/presets/cursor/next/agents/task-analyst.md +1 -1
- package/presets/cursor/next/agents/task-router.md +1 -1
- package/presets/cursor/next/agents/tech-writer.md +1 -1
- package/presets/cursor/next/agents/unit-test-generator.md +1 -1
- package/presets/cursor/next/agents/unit-test-healer.md +1 -1
- package/presets/cursor/next/agents/unit-test-planner.md +1 -1
- package/presets/cursor/next/commands/task.md +1 -0
- package/presets/cursor/next/hooks/chain-team-phases.sh +62 -5
- package/presets/cursor/next/team/README.md +1 -1
- package/presets/cursor/nuxt/agents/ci-investigator.md +1 -1
- package/presets/cursor/nuxt/agents/debugger.md +1 -1
- package/presets/cursor/nuxt/agents/feature-developer.md +1 -1
- package/presets/cursor/nuxt/agents/migration-specialist.md +1 -1
- package/presets/cursor/nuxt/agents/performance-auditor.md +1 -1
- package/presets/cursor/nuxt/agents/qa-tester.md +1 -1
- package/presets/cursor/nuxt/agents/solution-architect.md +1 -1
- package/presets/cursor/nuxt/agents/task-analyst.md +1 -1
- package/presets/cursor/nuxt/agents/task-router.md +1 -1
- package/presets/cursor/nuxt/agents/tech-writer.md +1 -1
- package/presets/cursor/nuxt/agents/unit-test-generator.md +1 -1
- package/presets/cursor/nuxt/agents/unit-test-healer.md +1 -1
- package/presets/cursor/nuxt/agents/unit-test-planner.md +1 -1
- package/presets/cursor/nuxt/commands/task.md +1 -0
- package/presets/cursor/nuxt/hooks/chain-team-phases.sh +62 -5
- package/presets/cursor/nuxt/team/README.md +1 -1
- package/presets/cursor/php-hexagonal/agents/feature-developer.md +1 -1
- package/presets/cursor/php-hexagonal/agents/task-analyst.md +1 -1
- package/presets/cursor/php-hexagonal/agents/task-router.md +1 -1
- package/presets/cursor/php-hexagonal/commands/task.md +1 -0
- package/presets/cursor/php-hexagonal/hooks/chain-team-phases.sh +62 -5
- package/presets/cursor/php-hexagonal/team/README.md +1 -1
- package/presets/cursor/php-laravel/agents/feature-developer.md +1 -1
- package/presets/cursor/php-laravel/agents/task-analyst.md +1 -1
- package/presets/cursor/php-laravel/agents/task-router.md +1 -1
- package/presets/cursor/php-laravel/commands/task.md +1 -0
- package/presets/cursor/php-laravel/hooks/chain-team-phases.sh +62 -5
- package/presets/cursor/php-laravel/team/README.md +1 -1
- package/presets/cursor/svelte/agents/ci-investigator.md +1 -1
- package/presets/cursor/svelte/agents/debugger.md +1 -1
- package/presets/cursor/svelte/agents/feature-developer.md +1 -1
- package/presets/cursor/svelte/agents/migration-specialist.md +1 -1
- package/presets/cursor/svelte/agents/performance-auditor.md +1 -1
- package/presets/cursor/svelte/agents/qa-tester.md +1 -1
- package/presets/cursor/svelte/agents/solution-architect.md +1 -1
- package/presets/cursor/svelte/agents/task-analyst.md +1 -1
- package/presets/cursor/svelte/agents/task-router.md +1 -1
- package/presets/cursor/svelte/agents/tech-writer.md +1 -1
- package/presets/cursor/svelte/agents/unit-test-generator.md +1 -1
- package/presets/cursor/svelte/agents/unit-test-healer.md +1 -1
- package/presets/cursor/svelte/agents/unit-test-planner.md +1 -1
- package/presets/cursor/svelte/commands/task.md +1 -0
- package/presets/cursor/svelte/hooks/chain-team-phases.sh +62 -5
- package/presets/cursor/svelte/team/README.md +1 -1
- package/presets/mavis/android-kotlin/adapter-map.json +1 -1
- package/presets/mavis/android-kotlin/agents/ci-investigator.md +1 -1
- package/presets/mavis/android-kotlin/agents/debugger.md +1 -1
- package/presets/mavis/android-kotlin/agents/feature-developer.md +1 -1
- package/presets/mavis/android-kotlin/agents/migration-specialist.md +1 -1
- package/presets/mavis/android-kotlin/agents/performance-auditor.md +1 -1
- package/presets/mavis/android-kotlin/agents/qa-tester.md +1 -1
- package/presets/mavis/android-kotlin/agents/task-analyst.md +1 -1
- package/presets/mavis/android-kotlin/agents/task-router.md +1 -1
- package/presets/mavis/android-kotlin/agents/tech-writer.md +1 -1
- package/presets/mavis/android-kotlin/agents/unit-test-generator.md +1 -1
- package/presets/mavis/android-kotlin/agents/unit-test-healer.md +1 -1
- package/presets/mavis/android-kotlin/agents/unit-test-planner.md +1 -1
- package/presets/mavis/android-kotlin/commands/task.md +1 -0
- package/presets/mavis/android-kotlin/hooks/chain-team-phases.sh +62 -5
- package/presets/mavis/android-kotlin/team/README.md +1 -1
- package/presets/mavis/go/adapter-map.json +1 -1
- package/presets/mavis/go/agents/feature-developer.md +1 -1
- package/presets/mavis/go/agents/task-analyst.md +1 -1
- package/presets/mavis/go/agents/task-router.md +1 -1
- package/presets/mavis/go/commands/task.md +1 -0
- package/presets/mavis/go/hooks/chain-team-phases.sh +62 -5
- package/presets/mavis/go/team/README.md +1 -1
- package/presets/mavis/ios-swift/adapter-map.json +1 -1
- package/presets/mavis/ios-swift/agents/feature-developer.md +1 -1
- package/presets/mavis/ios-swift/agents/task-analyst.md +1 -1
- package/presets/mavis/ios-swift/agents/task-router.md +1 -1
- package/presets/mavis/ios-swift/commands/task.md +1 -0
- package/presets/mavis/ios-swift/hooks/chain-team-phases.sh +62 -5
- package/presets/mavis/ios-swift/team/README.md +1 -1
- package/presets/mavis/java/adapter-map.json +1 -1
- package/presets/mavis/java/agents/feature-developer.md +1 -1
- package/presets/mavis/java/agents/task-analyst.md +1 -1
- package/presets/mavis/java/agents/task-router.md +1 -1
- package/presets/mavis/java/commands/task.md +1 -0
- package/presets/mavis/java/hooks/chain-team-phases.sh +62 -5
- package/presets/mavis/java/team/README.md +1 -1
- package/presets/mavis/mcp-ts/adapter-map.json +1 -1
- package/presets/mavis/mcp-ts/agents/feature-developer.md +1 -1
- package/presets/mavis/mcp-ts/agents/task-analyst.md +1 -1
- package/presets/mavis/mcp-ts/agents/task-router.md +1 -1
- package/presets/mavis/mcp-ts/commands/task.md +1 -0
- package/presets/mavis/mcp-ts/hooks/chain-team-phases.sh +62 -5
- package/presets/mavis/mcp-ts/team/README.md +1 -1
- package/presets/mavis/next/adapter-map.json +1 -1
- package/presets/mavis/next/agents/ci-investigator.md +1 -1
- package/presets/mavis/next/agents/debugger.md +1 -1
- package/presets/mavis/next/agents/feature-developer.md +1 -1
- package/presets/mavis/next/agents/migration-specialist.md +1 -1
- package/presets/mavis/next/agents/performance-auditor.md +1 -1
- package/presets/mavis/next/agents/qa-tester.md +1 -1
- package/presets/mavis/next/agents/solution-architect.md +1 -1
- package/presets/mavis/next/agents/task-analyst.md +1 -1
- package/presets/mavis/next/agents/task-router.md +1 -1
- package/presets/mavis/next/agents/tech-writer.md +1 -1
- package/presets/mavis/next/agents/unit-test-generator.md +1 -1
- package/presets/mavis/next/agents/unit-test-healer.md +1 -1
- package/presets/mavis/next/agents/unit-test-planner.md +1 -1
- package/presets/mavis/next/commands/task.md +1 -0
- package/presets/mavis/next/hooks/chain-team-phases.sh +62 -5
- package/presets/mavis/next/team/README.md +1 -1
- package/presets/mavis/nuxt/adapter-map.json +1 -1
- package/presets/mavis/nuxt/agents/ci-investigator.md +1 -1
- package/presets/mavis/nuxt/agents/debugger.md +1 -1
- package/presets/mavis/nuxt/agents/feature-developer.md +1 -1
- package/presets/mavis/nuxt/agents/migration-specialist.md +1 -1
- package/presets/mavis/nuxt/agents/performance-auditor.md +1 -1
- package/presets/mavis/nuxt/agents/qa-tester.md +1 -1
- package/presets/mavis/nuxt/agents/solution-architect.md +1 -1
- package/presets/mavis/nuxt/agents/task-analyst.md +1 -1
- package/presets/mavis/nuxt/agents/task-router.md +1 -1
- package/presets/mavis/nuxt/agents/tech-writer.md +1 -1
- package/presets/mavis/nuxt/agents/unit-test-generator.md +1 -1
- package/presets/mavis/nuxt/agents/unit-test-healer.md +1 -1
- package/presets/mavis/nuxt/agents/unit-test-planner.md +1 -1
- package/presets/mavis/nuxt/commands/task.md +1 -0
- package/presets/mavis/nuxt/hooks/chain-team-phases.sh +62 -5
- package/presets/mavis/nuxt/team/README.md +1 -1
- package/presets/mavis/php-hexagonal/adapter-map.json +1 -1
- package/presets/mavis/php-hexagonal/agents/feature-developer.md +1 -1
- package/presets/mavis/php-hexagonal/agents/task-analyst.md +1 -1
- package/presets/mavis/php-hexagonal/agents/task-router.md +1 -1
- package/presets/mavis/php-hexagonal/commands/task.md +1 -0
- package/presets/mavis/php-hexagonal/hooks/chain-team-phases.sh +62 -5
- package/presets/mavis/php-hexagonal/team/README.md +1 -1
- package/presets/mavis/php-laravel/adapter-map.json +1 -1
- package/presets/mavis/php-laravel/agents/feature-developer.md +1 -1
- package/presets/mavis/php-laravel/agents/task-analyst.md +1 -1
- package/presets/mavis/php-laravel/agents/task-router.md +1 -1
- package/presets/mavis/php-laravel/commands/task.md +1 -0
- package/presets/mavis/php-laravel/hooks/chain-team-phases.sh +62 -5
- package/presets/mavis/php-laravel/team/README.md +1 -1
- package/presets/mavis/svelte/adapter-map.json +1 -1
- package/presets/mavis/svelte/agents/ci-investigator.md +1 -1
- package/presets/mavis/svelte/agents/debugger.md +1 -1
- package/presets/mavis/svelte/agents/feature-developer.md +1 -1
- package/presets/mavis/svelte/agents/migration-specialist.md +1 -1
- package/presets/mavis/svelte/agents/performance-auditor.md +1 -1
- package/presets/mavis/svelte/agents/qa-tester.md +1 -1
- package/presets/mavis/svelte/agents/solution-architect.md +1 -1
- package/presets/mavis/svelte/agents/task-analyst.md +1 -1
- package/presets/mavis/svelte/agents/task-router.md +1 -1
- package/presets/mavis/svelte/agents/tech-writer.md +1 -1
- package/presets/mavis/svelte/agents/unit-test-generator.md +1 -1
- package/presets/mavis/svelte/agents/unit-test-healer.md +1 -1
- package/presets/mavis/svelte/agents/unit-test-planner.md +1 -1
- package/presets/mavis/svelte/commands/task.md +1 -0
- package/presets/mavis/svelte/hooks/chain-team-phases.sh +62 -5
- package/presets/mavis/svelte/team/README.md +1 -1
- package/presets/opencode/android-kotlin/adapter-map.json +1 -1
- package/presets/opencode/android-kotlin/agents/ci-investigator.md +1 -1
- package/presets/opencode/android-kotlin/agents/debugger.md +1 -1
- package/presets/opencode/android-kotlin/agents/feature-developer.md +1 -1
- package/presets/opencode/android-kotlin/agents/migration-specialist.md +1 -1
- package/presets/opencode/android-kotlin/agents/performance-auditor.md +1 -1
- package/presets/opencode/android-kotlin/agents/qa-tester.md +1 -1
- package/presets/opencode/android-kotlin/agents/task-analyst.md +1 -1
- package/presets/opencode/android-kotlin/agents/task-router.md +1 -1
- package/presets/opencode/android-kotlin/agents/tech-writer.md +1 -1
- package/presets/opencode/android-kotlin/agents/unit-test-generator.md +1 -1
- package/presets/opencode/android-kotlin/agents/unit-test-healer.md +1 -1
- package/presets/opencode/android-kotlin/agents/unit-test-planner.md +1 -1
- package/presets/opencode/android-kotlin/commands/task.md +1 -0
- package/presets/opencode/android-kotlin/hooks/chain-team-phases.sh +62 -5
- package/presets/opencode/android-kotlin/team/README.md +1 -1
- package/presets/opencode/go/adapter-map.json +1 -1
- package/presets/opencode/go/agents/feature-developer.md +1 -1
- package/presets/opencode/go/agents/task-analyst.md +1 -1
- package/presets/opencode/go/agents/task-router.md +1 -1
- package/presets/opencode/go/commands/task.md +1 -0
- package/presets/opencode/go/hooks/chain-team-phases.sh +62 -5
- package/presets/opencode/go/team/README.md +1 -1
- package/presets/opencode/ios-swift/adapter-map.json +1 -1
- package/presets/opencode/ios-swift/agents/feature-developer.md +1 -1
- package/presets/opencode/ios-swift/agents/task-analyst.md +1 -1
- package/presets/opencode/ios-swift/agents/task-router.md +1 -1
- package/presets/opencode/ios-swift/commands/task.md +1 -0
- package/presets/opencode/ios-swift/hooks/chain-team-phases.sh +62 -5
- package/presets/opencode/ios-swift/team/README.md +1 -1
- package/presets/opencode/java/adapter-map.json +1 -1
- package/presets/opencode/java/agents/feature-developer.md +1 -1
- package/presets/opencode/java/agents/task-analyst.md +1 -1
- package/presets/opencode/java/agents/task-router.md +1 -1
- package/presets/opencode/java/commands/task.md +1 -0
- package/presets/opencode/java/hooks/chain-team-phases.sh +62 -5
- package/presets/opencode/java/team/README.md +1 -1
- package/presets/opencode/mcp-ts/adapter-map.json +1 -1
- package/presets/opencode/mcp-ts/agents/feature-developer.md +1 -1
- package/presets/opencode/mcp-ts/agents/task-analyst.md +1 -1
- package/presets/opencode/mcp-ts/agents/task-router.md +1 -1
- package/presets/opencode/mcp-ts/commands/task.md +1 -0
- package/presets/opencode/mcp-ts/hooks/chain-team-phases.sh +62 -5
- package/presets/opencode/mcp-ts/team/README.md +1 -1
- package/presets/opencode/next/adapter-map.json +1 -1
- package/presets/opencode/next/agents/ci-investigator.md +1 -1
- package/presets/opencode/next/agents/debugger.md +1 -1
- package/presets/opencode/next/agents/feature-developer.md +1 -1
- package/presets/opencode/next/agents/migration-specialist.md +1 -1
- package/presets/opencode/next/agents/performance-auditor.md +1 -1
- package/presets/opencode/next/agents/qa-tester.md +1 -1
- package/presets/opencode/next/agents/solution-architect.md +1 -1
- package/presets/opencode/next/agents/task-analyst.md +1 -1
- package/presets/opencode/next/agents/task-router.md +1 -1
- package/presets/opencode/next/agents/tech-writer.md +1 -1
- package/presets/opencode/next/agents/unit-test-generator.md +1 -1
- package/presets/opencode/next/agents/unit-test-healer.md +1 -1
- package/presets/opencode/next/agents/unit-test-planner.md +1 -1
- package/presets/opencode/next/commands/task.md +1 -0
- package/presets/opencode/next/hooks/chain-team-phases.sh +62 -5
- package/presets/opencode/next/team/README.md +1 -1
- package/presets/opencode/nuxt/adapter-map.json +1 -1
- package/presets/opencode/nuxt/agents/ci-investigator.md +1 -1
- package/presets/opencode/nuxt/agents/debugger.md +1 -1
- package/presets/opencode/nuxt/agents/feature-developer.md +1 -1
- package/presets/opencode/nuxt/agents/migration-specialist.md +1 -1
- package/presets/opencode/nuxt/agents/performance-auditor.md +1 -1
- package/presets/opencode/nuxt/agents/qa-tester.md +1 -1
- package/presets/opencode/nuxt/agents/solution-architect.md +1 -1
- package/presets/opencode/nuxt/agents/task-analyst.md +1 -1
- package/presets/opencode/nuxt/agents/task-router.md +1 -1
- package/presets/opencode/nuxt/agents/tech-writer.md +1 -1
- package/presets/opencode/nuxt/agents/unit-test-generator.md +1 -1
- package/presets/opencode/nuxt/agents/unit-test-healer.md +1 -1
- package/presets/opencode/nuxt/agents/unit-test-planner.md +1 -1
- package/presets/opencode/nuxt/commands/task.md +1 -0
- package/presets/opencode/nuxt/hooks/chain-team-phases.sh +62 -5
- package/presets/opencode/nuxt/team/README.md +1 -1
- package/presets/opencode/php-hexagonal/adapter-map.json +1 -1
- package/presets/opencode/php-hexagonal/agents/feature-developer.md +1 -1
- package/presets/opencode/php-hexagonal/agents/task-analyst.md +1 -1
- package/presets/opencode/php-hexagonal/agents/task-router.md +1 -1
- package/presets/opencode/php-hexagonal/commands/task.md +1 -0
- package/presets/opencode/php-hexagonal/hooks/chain-team-phases.sh +62 -5
- package/presets/opencode/php-hexagonal/team/README.md +1 -1
- package/presets/opencode/php-laravel/adapter-map.json +1 -1
- package/presets/opencode/php-laravel/agents/feature-developer.md +1 -1
- package/presets/opencode/php-laravel/agents/task-analyst.md +1 -1
- package/presets/opencode/php-laravel/agents/task-router.md +1 -1
- package/presets/opencode/php-laravel/commands/task.md +1 -0
- package/presets/opencode/php-laravel/hooks/chain-team-phases.sh +62 -5
- package/presets/opencode/php-laravel/team/README.md +1 -1
- package/presets/opencode/svelte/adapter-map.json +1 -1
- package/presets/opencode/svelte/agents/ci-investigator.md +1 -1
- package/presets/opencode/svelte/agents/debugger.md +1 -1
- package/presets/opencode/svelte/agents/feature-developer.md +1 -1
- package/presets/opencode/svelte/agents/migration-specialist.md +1 -1
- package/presets/opencode/svelte/agents/performance-auditor.md +1 -1
- package/presets/opencode/svelte/agents/qa-tester.md +1 -1
- package/presets/opencode/svelte/agents/solution-architect.md +1 -1
- package/presets/opencode/svelte/agents/task-analyst.md +1 -1
- package/presets/opencode/svelte/agents/task-router.md +1 -1
- package/presets/opencode/svelte/agents/tech-writer.md +1 -1
- package/presets/opencode/svelte/agents/unit-test-generator.md +1 -1
- package/presets/opencode/svelte/agents/unit-test-healer.md +1 -1
- package/presets/opencode/svelte/agents/unit-test-planner.md +1 -1
- package/presets/opencode/svelte/commands/task.md +1 -0
- package/presets/opencode/svelte/hooks/chain-team-phases.sh +62 -5
- package/presets/opencode/svelte/team/README.md +1 -1
|
@@ -453,7 +453,21 @@ function endHumanGateIfResumed() {
|
|
|
453
453
|
appendMetric({ type: 'human_gate_ended', at: now, gateStartedEventId: status.activeHumanGateEventId, source: 'hook', attributionConfidence: 'high' });
|
|
454
454
|
delete status.activeHumanGateEventId;
|
|
455
455
|
}
|
|
456
|
-
function completeTaskMetrics() {
|
|
456
|
+
function completeTaskMetrics() {
|
|
457
|
+
// Two hook processes can both enter completion before either writes the
|
|
458
|
+
// event. The metrics lock serializes them; the second sees the first write.
|
|
459
|
+
mutateMetrics((metrics) => {
|
|
460
|
+
if (metrics.events.some((event) => event && event.type === 'task_completed')) return;
|
|
461
|
+
metrics.events.push({
|
|
462
|
+
eventId: `${metrics.task.runId}:${Date.now()}:${Math.random().toString(16).slice(2)}`,
|
|
463
|
+
type: 'task_completed',
|
|
464
|
+
at: now,
|
|
465
|
+
outcome: status.state === 'completed' ? 'completed' : 'unknown',
|
|
466
|
+
source: 'hook',
|
|
467
|
+
attributionConfidence: 'high',
|
|
468
|
+
});
|
|
469
|
+
});
|
|
470
|
+
}
|
|
457
471
|
function recordSkippedStep(step, stepIndex) {
|
|
458
472
|
for (const agent of getStepAgents(step)) {
|
|
459
473
|
const runId = status.metricsRunId || `${slug}-${Date.now()}-${Math.random().toString(16).slice(2)}`;
|
|
@@ -641,7 +655,7 @@ function handoffForWave(units, waveId) {
|
|
|
641
655
|
`Invoke IN PARALLEL (one message, multiple Task calls): ${labels.join(' AND ')} for slug "${slug}"${waveId ? ` (waveId=${waveId})` : ''}. ` +
|
|
642
656
|
`Each agent writes its artifact and owned receipt; the hook records slot joins from stops. Do not mutate status.json lifecycle fields. ` +
|
|
643
657
|
`Artifact inputs: ${inputIds.length > 0 ? inputIds.join(', ') : 'manifest defaults'}; owned output IDs: ${outputIds.join('; ')}. ` +
|
|
644
|
-
`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
|
|
658
|
+
`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. ${receiptPathClause()}`
|
|
645
659
|
);
|
|
646
660
|
}
|
|
647
661
|
function blockedNotice(blockedIndex, agent) {
|
|
@@ -657,12 +671,22 @@ function noProgressNotice() {
|
|
|
657
671
|
const pending = pendingStepIndexes().map((index) => steps[index].id || `step-${index}`);
|
|
658
672
|
return `No schedulable step remains for slug "${slug}" (unsatisfied: ${pending.join(', ')}). Resume only via /task-continue ${slug}.`;
|
|
659
673
|
}
|
|
674
|
+
function deferReason(wave, deferred) {
|
|
675
|
+
const sameAgent = deferred.some((index) => wave.some((chosen) => {
|
|
676
|
+
const left = getStepAgents(steps[chosen]);
|
|
677
|
+
return getStepAgents(steps[index]).some((agent) => left.includes(agent));
|
|
678
|
+
}));
|
|
679
|
+
if (sameAgent) return 'same agent already in the wave';
|
|
680
|
+
const missingScope = [...wave, ...deferred].some((index) => declaredScopes(steps[index]).length === 0);
|
|
681
|
+
if (missingScope) return 'writeScopes undeclared';
|
|
682
|
+
return 'writeScopes overlap';
|
|
683
|
+
}
|
|
660
684
|
function dispatchReadyWave(prefixMessage) {
|
|
661
685
|
const ready = computeReadySteps();
|
|
662
686
|
if (ready.length === 0) return false;
|
|
663
687
|
const { wave, deferred } = selectWave(ready);
|
|
664
688
|
if (deferred.length > 0) {
|
|
665
|
-
appendMetric({ type: 'parallel_conflict_deferred', at: now, stepIndex: wave[0], deferredStepIndexes: deferred, reason:
|
|
689
|
+
appendMetric({ type: 'parallel_conflict_deferred', at: now, stepIndex: wave[0], deferredStepIndexes: deferred, reason: deferReason(wave, deferred), source: 'hook', attributionConfidence: 'fallback' });
|
|
666
690
|
}
|
|
667
691
|
// Slot-filtered dispatch: only unsatisfied (stepIndex, agent) slots are invoked.
|
|
668
692
|
const units = wave.flatMap((stepIndex) => unsatisfiedAgents(stepIndex).map((agent) => ({ stepIndex, agent })));
|
|
@@ -810,9 +834,12 @@ function metricsHandoff(agent) {
|
|
|
810
834
|
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.';
|
|
811
835
|
}
|
|
812
836
|
|
|
837
|
+
function receiptPathClause() {
|
|
838
|
+
return 'authoritativePaths are relative to the task folder (brief.md), not the repo root; put external files in evidencePaths.';
|
|
839
|
+
}
|
|
813
840
|
function artifactHandoff(step, agent) {
|
|
814
841
|
const inputIds = Array.isArray(step?.artifactInputIds) ? step.artifactInputIds.join(', ') : 'manifest defaults';
|
|
815
|
-
return ` Artifact inputs: ${inputIds}; owned output ID: ${artifactOutputIdFor(step, agent)}. Bind the terminal receipt to the supplied attemptId
|
|
842
|
+
return ` Artifact inputs: ${inputIds}; owned output ID: ${artifactOutputIdFor(step, agent)}. Bind the terminal receipt to the supplied attemptId. ${receiptPathClause()}`;
|
|
816
843
|
}
|
|
817
844
|
|
|
818
845
|
function handoffForAgent(agent, scope, step = null) {
|
|
@@ -830,7 +857,7 @@ function handoffForParallelStep(step) {
|
|
|
830
857
|
`Invoke IN PARALLEL (one message, multiple Task calls): ${agents.join(' AND ')} for slug "${slug}". ` +
|
|
831
858
|
`Each agent writes its artifact and owned receipt; the hook records parallelCompleted from stops. Do not mutate status.json lifecycle fields. ` +
|
|
832
859
|
`Artifact inputs: ${Array.isArray(step.artifactInputIds) ? step.artifactInputIds.join(', ') : 'manifest defaults'}; owned output IDs: ${agents.map((agent) => `${agent}=${artifactOutputIdFor(step, agent)}`).join('; ')}. ` +
|
|
833
|
-
`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
|
|
860
|
+
`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. ${receiptPathClause()}`
|
|
834
861
|
);
|
|
835
862
|
}
|
|
836
863
|
|
|
@@ -839,9 +866,35 @@ function hasGateAfter(agent, humanGates) {
|
|
|
839
866
|
}
|
|
840
867
|
|
|
841
868
|
function hasGateAfterStep(step, humanGates) {
|
|
869
|
+
if (!Array.isArray(humanGates) || !step) return false;
|
|
870
|
+
if (typeof step.id === 'string' && step.id.length > 0 && humanGates.includes(`after:${step.id}`)) return true;
|
|
842
871
|
return getStepAgents(step).some((a) => hasGateAfter(a, humanGates));
|
|
843
872
|
}
|
|
844
873
|
|
|
874
|
+
// A followup loop of the subagent that just finished arrives with no attemptId
|
|
875
|
+
// and no receipt for the attempt this same transition opened. That stop is not
|
|
876
|
+
// the next agent. A stop more than 15s later, still without a receipt, is a
|
|
877
|
+
// real missing receipt and must stall.
|
|
878
|
+
function isSchedulingEcho() {
|
|
879
|
+
if (typeof hookInput.attemptId === 'string' && hookInput.attemptId.length > 0) return false;
|
|
880
|
+
const entries = Object.entries(status.activeAttempts || {});
|
|
881
|
+
if (entries.length !== 1) return false;
|
|
882
|
+
const [attemptId, entry] = entries[0];
|
|
883
|
+
const previous = status.lastCompletedAttempt;
|
|
884
|
+
if (!previous || previous.completedAt !== entry.startedAt) return false;
|
|
885
|
+
const ageMs = Date.parse(now) - Date.parse(entry.startedAt);
|
|
886
|
+
if (!Number.isFinite(ageMs) || ageMs < 0 || ageMs > 15000) return false;
|
|
887
|
+
const previousJoined = Object.values(status.joinedSlots || {}).some((slot) => slot && slot.attemptId === previous.attemptId);
|
|
888
|
+
const linearAdvance = !isGraphMode() && typeof entry.stepIndex === 'number' && entry.stepIndex > 0;
|
|
889
|
+
if (!previousJoined && !linearAdvance) return false;
|
|
890
|
+
try {
|
|
891
|
+
const manifest = JSON.parse(fs.readFileSync(path.join(taskDir, 'artifact-manifest.json'), 'utf8'));
|
|
892
|
+
const artifacts = Array.isArray(manifest.artifacts) ? manifest.artifacts : [];
|
|
893
|
+
if (artifacts.some((item) => item && item.receipt && item.receipt.attemptId === attemptId)) return false;
|
|
894
|
+
} catch {}
|
|
895
|
+
return true;
|
|
896
|
+
}
|
|
897
|
+
|
|
845
898
|
function legacyFlow() {
|
|
846
899
|
if (status.phase === 'analysis') {
|
|
847
900
|
process.stdout.write('{}');
|
|
@@ -1059,6 +1112,10 @@ if (pipelineParseError) {
|
|
|
1059
1112
|
}
|
|
1060
1113
|
|
|
1061
1114
|
steps = pipeline.steps || [];
|
|
1115
|
+
if (isSchedulingEcho()) {
|
|
1116
|
+
process.stdout.write('{}');
|
|
1117
|
+
process.exit(0);
|
|
1118
|
+
}
|
|
1062
1119
|
const initialIdx = typeof status.pipelineIndex === 'number' ? status.pipelineIndex : 0;
|
|
1063
1120
|
const initialStep = steps[initialIdx];
|
|
1064
1121
|
const activeAttemptCountBeforeFinish = Object.keys(status.activeAttempts || {}).length;
|
|
@@ -87,7 +87,7 @@ Same JSON on Claude, Mavis, or OpenCode: `bash .<tool>/hooks/chain-team-phases.s
|
|
|
87
87
|
## Contracts
|
|
88
88
|
|
|
89
89
|
- **Manifest field name:** receipts go in `artifacts[]`. Anything written under `entries` is ignored — the hook reads only `artifacts` and prints a dual-read warning naming the file. See `agent-team/agent-artifact-contracts.md` § Schema field name.
|
|
90
|
-
- **Evidence paths:** `authoritativePaths[]`
|
|
90
|
+
- **Evidence paths:** `authoritativePaths[]` is relative to the task directory (`brief.md`). A repo-root path (`.ai.local/team/tasks/<slug>/brief.md`) is rejected. Put anything outside the task directory — e.g. `openspec/changes/**` — in `evidencePaths[]`.
|
|
91
91
|
- Manifest schema: shared core `agent-team/agent-artifact-contracts.md`. Read it first; producers upsert only their IDs.
|
|
92
92
|
- Metrics: append-only allowlisted events — `agent-team/agent-task-metrics.md`. Aggregate: `node node_modules/@bonesofspring/ai-rules/scripts/aggregate-agent-task-metrics.mjs --team-root .ai.local/team`.
|
|
93
93
|
- Commit `.ai.local/team/` templates (and slugs if you want them in clones).
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"platform": "mavis",
|
|
4
4
|
"stack": "go",
|
|
5
5
|
"semanticSource": "cursor/go",
|
|
6
|
-
"sourceRevision": "
|
|
6
|
+
"sourceRevision": "3f1ea9faeb2ed0719744de111dcc466780f2aa04b2033c106e8e66540360eb80",
|
|
7
7
|
"entries": [
|
|
8
8
|
{
|
|
9
9
|
"source": "AGENTS.md",
|
|
@@ -131,7 +131,7 @@ Load requestable rule `mcp-usage` when verifying third-party library APIs (Conte
|
|
|
131
131
|
|
|
132
132
|
- **Authoritative inputs:** read `.ai.local/team/tasks/<slug>/artifact-manifest.json` first; consume handoff `artifactInputIds` when supplied, otherwise consume the items in `manifest.artifacts[]` for `brief.md`, `decomposition.md`, current scope, and applicable prior findings.
|
|
133
133
|
- **Owned outputs:** `implementation.md` plus changed implementation/test paths; upsert only the entry in `manifest.artifacts[]` assigned by handoff (`artifactOutputId`; fallback `implementation`) and preserve all foreign items in `manifest.artifacts[]`.
|
|
134
|
-
- **Terminal receipt:** cover applicable AC/task IDs, list authoritative evidence paths, and emit `completed` or `blocked`. Bind it to the supplied `attemptId` when present.
|
|
134
|
+
- **Terminal receipt:** cover applicable AC/task IDs, list authoritative evidence paths, and emit `completed` or `blocked`. Bind it to the supplied `attemptId` when present. `authoritativePaths` are relative to the task folder (`brief.md`), not the repo root; put external files in `evidencePaths`.
|
|
135
135
|
- **Shared state:** never create or mutate `status.json` or `metrics.json`; the orchestration runtime/hook owns lifecycle, gates, retries, attempts, and timestamps.
|
|
136
136
|
|
|
137
137
|
## Receipt binding
|
|
@@ -120,5 +120,5 @@ If the prompt/brief has a tracker URL (Linear/Jira/Notion/…) and that MCP is r
|
|
|
120
120
|
|
|
121
121
|
- **Authoritative inputs:** read `.ai.local/team/tasks/<slug>/artifact-manifest.json` first; consume `pipeline.json`, the manifest routing entry, user-approved decisions, and any authoritative architecture/approval entries.
|
|
122
122
|
- **Owned outputs:** `brief.md` and `decomposition.md`; upsert only the entry in `manifest.artifacts[]` assigned by handoff (`artifactOutputId`; fallback `analysis`) and preserve all foreign items in `manifest.artifacts[]`.
|
|
123
|
-
- **Terminal receipt:** cover applicable AC/task IDs, list authoritative evidence paths, and emit `completed` or `blocked`. Bind it to the supplied `attemptId` when present.
|
|
123
|
+
- **Terminal receipt:** cover applicable AC/task IDs, list authoritative evidence paths, and emit `completed` or `blocked`. Bind it to the supplied `attemptId` when present. `authoritativePaths` are relative to the task folder (`brief.md`), not the repo root; put external files in `evidencePaths`.
|
|
124
124
|
- **Shared state:** never create or mutate `status.json` or `metrics.json`; the orchestration runtime/hook owns lifecycle, gates, retries, attempts, and timestamps.
|
|
@@ -168,5 +168,5 @@ Return the routing receipt to the orchestrator. The orchestration runtime/hook e
|
|
|
168
168
|
|
|
169
169
|
- **Authoritative inputs:** read `.ai.local/team/tasks/<slug>/artifact-manifest.json` first; consume the user request and any existing authoritative task/decision entries.
|
|
170
170
|
- **Owned outputs:** `pipeline.json` and the routing entry in `manifest.artifacts[]`; upsert only the entry in `manifest.artifacts[]` assigned by handoff (`artifactOutputId`; fallback `routing`) and preserve all foreign items in `manifest.artifacts[]`.
|
|
171
|
-
- **Terminal receipt:** cover applicable AC/task IDs, list authoritative evidence paths, and emit `completed` or `blocked`. Bind it to the supplied `attemptId` when present.
|
|
171
|
+
- **Terminal receipt:** cover applicable AC/task IDs, list authoritative evidence paths, and emit `completed` or `blocked`. Bind it to the supplied `attemptId` when present. `authoritativePaths` are relative to the task folder (`brief.md`), not the repo root; put external files in `evidencePaths`.
|
|
172
172
|
- **Shared state:** never create or mutate `status.json` or `metrics.json`; the orchestration runtime/hook owns lifecycle, gates, retries, attempts, and timestamps.
|
|
@@ -452,7 +452,21 @@ function endHumanGateIfResumed() {
|
|
|
452
452
|
appendMetric({ type: 'human_gate_ended', at: now, gateStartedEventId: status.activeHumanGateEventId, source: 'hook', attributionConfidence: 'high' });
|
|
453
453
|
delete status.activeHumanGateEventId;
|
|
454
454
|
}
|
|
455
|
-
function completeTaskMetrics() {
|
|
455
|
+
function completeTaskMetrics() {
|
|
456
|
+
// Two hook processes can both enter completion before either writes the
|
|
457
|
+
// event. The metrics lock serializes them; the second sees the first write.
|
|
458
|
+
mutateMetrics((metrics) => {
|
|
459
|
+
if (metrics.events.some((event) => event && event.type === 'task_completed')) return;
|
|
460
|
+
metrics.events.push({
|
|
461
|
+
eventId: `${metrics.task.runId}:${Date.now()}:${Math.random().toString(16).slice(2)}`,
|
|
462
|
+
type: 'task_completed',
|
|
463
|
+
at: now,
|
|
464
|
+
outcome: status.state === 'completed' ? 'completed' : 'unknown',
|
|
465
|
+
source: 'hook',
|
|
466
|
+
attributionConfidence: 'high',
|
|
467
|
+
});
|
|
468
|
+
});
|
|
469
|
+
}
|
|
456
470
|
function recordSkippedStep(step, stepIndex) {
|
|
457
471
|
for (const agent of getStepAgents(step)) {
|
|
458
472
|
const runId = status.metricsRunId || `${slug}-${Date.now()}-${Math.random().toString(16).slice(2)}`;
|
|
@@ -640,7 +654,7 @@ function handoffForWave(units, waveId) {
|
|
|
640
654
|
`Invoke IN PARALLEL (one message, multiple Task calls): ${labels.join(' AND ')} for slug "${slug}"${waveId ? ` (waveId=${waveId})` : ''}. ` +
|
|
641
655
|
`Each agent writes its artifact and owned receipt; the hook records slot joins from stops. Do not mutate status.json lifecycle fields. ` +
|
|
642
656
|
`Artifact inputs: ${inputIds.length > 0 ? inputIds.join(', ') : 'manifest defaults'}; owned output IDs: ${outputIds.join('; ')}. ` +
|
|
643
|
-
`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
|
|
657
|
+
`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. ${receiptPathClause()}`
|
|
644
658
|
);
|
|
645
659
|
}
|
|
646
660
|
function blockedNotice(blockedIndex, agent) {
|
|
@@ -656,12 +670,22 @@ function noProgressNotice() {
|
|
|
656
670
|
const pending = pendingStepIndexes().map((index) => steps[index].id || `step-${index}`);
|
|
657
671
|
return `No schedulable step remains for slug "${slug}" (unsatisfied: ${pending.join(', ')}). Resume only via /task-continue ${slug}.`;
|
|
658
672
|
}
|
|
673
|
+
function deferReason(wave, deferred) {
|
|
674
|
+
const sameAgent = deferred.some((index) => wave.some((chosen) => {
|
|
675
|
+
const left = getStepAgents(steps[chosen]);
|
|
676
|
+
return getStepAgents(steps[index]).some((agent) => left.includes(agent));
|
|
677
|
+
}));
|
|
678
|
+
if (sameAgent) return 'same agent already in the wave';
|
|
679
|
+
const missingScope = [...wave, ...deferred].some((index) => declaredScopes(steps[index]).length === 0);
|
|
680
|
+
if (missingScope) return 'writeScopes undeclared';
|
|
681
|
+
return 'writeScopes overlap';
|
|
682
|
+
}
|
|
659
683
|
function dispatchReadyWave(prefixMessage) {
|
|
660
684
|
const ready = computeReadySteps();
|
|
661
685
|
if (ready.length === 0) return false;
|
|
662
686
|
const { wave, deferred } = selectWave(ready);
|
|
663
687
|
if (deferred.length > 0) {
|
|
664
|
-
appendMetric({ type: 'parallel_conflict_deferred', at: now, stepIndex: wave[0], deferredStepIndexes: deferred, reason:
|
|
688
|
+
appendMetric({ type: 'parallel_conflict_deferred', at: now, stepIndex: wave[0], deferredStepIndexes: deferred, reason: deferReason(wave, deferred), source: 'hook', attributionConfidence: 'fallback' });
|
|
665
689
|
}
|
|
666
690
|
// Slot-filtered dispatch: only unsatisfied (stepIndex, agent) slots are invoked.
|
|
667
691
|
const units = wave.flatMap((stepIndex) => unsatisfiedAgents(stepIndex).map((agent) => ({ stepIndex, agent })));
|
|
@@ -805,9 +829,12 @@ function metricsHandoff(agent) {
|
|
|
805
829
|
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.';
|
|
806
830
|
}
|
|
807
831
|
|
|
832
|
+
function receiptPathClause() {
|
|
833
|
+
return 'authoritativePaths are relative to the task folder (brief.md), not the repo root; put external files in evidencePaths.';
|
|
834
|
+
}
|
|
808
835
|
function artifactHandoff(step, agent) {
|
|
809
836
|
const inputIds = Array.isArray(step?.artifactInputIds) ? step.artifactInputIds.join(', ') : 'manifest defaults';
|
|
810
|
-
return ` Artifact inputs: ${inputIds}; owned output ID: ${artifactOutputIdFor(step, agent)}. Bind the terminal receipt to the supplied attemptId
|
|
837
|
+
return ` Artifact inputs: ${inputIds}; owned output ID: ${artifactOutputIdFor(step, agent)}. Bind the terminal receipt to the supplied attemptId. ${receiptPathClause()}`;
|
|
811
838
|
}
|
|
812
839
|
|
|
813
840
|
function handoffForAgent(agent, scope, step = null) {
|
|
@@ -825,7 +852,7 @@ function handoffForParallelStep(step) {
|
|
|
825
852
|
`Invoke IN PARALLEL (one message, multiple Task calls): ${agents.join(' AND ')} for slug "${slug}". ` +
|
|
826
853
|
`Each agent writes its artifact and owned receipt; the hook records parallelCompleted from stops. Do not mutate status.json lifecycle fields. ` +
|
|
827
854
|
`Artifact inputs: ${Array.isArray(step.artifactInputIds) ? step.artifactInputIds.join(', ') : 'manifest defaults'}; owned output IDs: ${agents.map((agent) => `${agent}=${artifactOutputIdFor(step, agent)}`).join('; ')}. ` +
|
|
828
|
-
`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
|
|
855
|
+
`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. ${receiptPathClause()}`
|
|
829
856
|
);
|
|
830
857
|
}
|
|
831
858
|
|
|
@@ -834,9 +861,35 @@ function hasGateAfter(agent, humanGates) {
|
|
|
834
861
|
}
|
|
835
862
|
|
|
836
863
|
function hasGateAfterStep(step, humanGates) {
|
|
864
|
+
if (!Array.isArray(humanGates) || !step) return false;
|
|
865
|
+
if (typeof step.id === 'string' && step.id.length > 0 && humanGates.includes(`after:${step.id}`)) return true;
|
|
837
866
|
return getStepAgents(step).some((a) => hasGateAfter(a, humanGates));
|
|
838
867
|
}
|
|
839
868
|
|
|
869
|
+
// A followup loop of the subagent that just finished arrives with no attemptId
|
|
870
|
+
// and no receipt for the attempt this same transition opened. That stop is not
|
|
871
|
+
// the next agent. A stop more than 15s later, still without a receipt, is a
|
|
872
|
+
// real missing receipt and must stall.
|
|
873
|
+
function isSchedulingEcho() {
|
|
874
|
+
if (typeof hookInput.attemptId === 'string' && hookInput.attemptId.length > 0) return false;
|
|
875
|
+
const entries = Object.entries(status.activeAttempts || {});
|
|
876
|
+
if (entries.length !== 1) return false;
|
|
877
|
+
const [attemptId, entry] = entries[0];
|
|
878
|
+
const previous = status.lastCompletedAttempt;
|
|
879
|
+
if (!previous || previous.completedAt !== entry.startedAt) return false;
|
|
880
|
+
const ageMs = Date.parse(now) - Date.parse(entry.startedAt);
|
|
881
|
+
if (!Number.isFinite(ageMs) || ageMs < 0 || ageMs > 15000) return false;
|
|
882
|
+
const previousJoined = Object.values(status.joinedSlots || {}).some((slot) => slot && slot.attemptId === previous.attemptId);
|
|
883
|
+
const linearAdvance = !isGraphMode() && typeof entry.stepIndex === 'number' && entry.stepIndex > 0;
|
|
884
|
+
if (!previousJoined && !linearAdvance) return false;
|
|
885
|
+
try {
|
|
886
|
+
const manifest = JSON.parse(fs.readFileSync(path.join(taskDir, 'artifact-manifest.json'), 'utf8'));
|
|
887
|
+
const artifacts = Array.isArray(manifest.artifacts) ? manifest.artifacts : [];
|
|
888
|
+
if (artifacts.some((item) => item && item.receipt && item.receipt.attemptId === attemptId)) return false;
|
|
889
|
+
} catch {}
|
|
890
|
+
return true;
|
|
891
|
+
}
|
|
892
|
+
|
|
840
893
|
function legacyFlow() {
|
|
841
894
|
if (status.phase === 'analysis') {
|
|
842
895
|
process.stdout.write('{}');
|
|
@@ -1054,6 +1107,10 @@ if (pipelineParseError) {
|
|
|
1054
1107
|
}
|
|
1055
1108
|
|
|
1056
1109
|
steps = pipeline.steps || [];
|
|
1110
|
+
if (isSchedulingEcho()) {
|
|
1111
|
+
process.stdout.write('{}');
|
|
1112
|
+
process.exit(0);
|
|
1113
|
+
}
|
|
1057
1114
|
const initialIdx = typeof status.pipelineIndex === 'number' ? status.pipelineIndex : 0;
|
|
1058
1115
|
const initialStep = steps[initialIdx];
|
|
1059
1116
|
const activeAttemptCountBeforeFinish = Object.keys(status.activeAttempts || {}).length;
|
|
@@ -87,7 +87,7 @@ Same JSON on Claude, Mavis, or OpenCode: `bash .<tool>/hooks/chain-team-phases.s
|
|
|
87
87
|
## Contracts
|
|
88
88
|
|
|
89
89
|
- **Manifest field name:** receipts go in `artifacts[]`. Anything written under `entries` is ignored — the hook reads only `artifacts` and prints a dual-read warning naming the file. See `agent-team/agent-artifact-contracts.md` § Schema field name.
|
|
90
|
-
- **Evidence paths:** `authoritativePaths[]`
|
|
90
|
+
- **Evidence paths:** `authoritativePaths[]` is relative to the task directory (`brief.md`). A repo-root path (`.ai.local/team/tasks/<slug>/brief.md`) is rejected. Put anything outside the task directory — e.g. `openspec/changes/**` — in `evidencePaths[]`.
|
|
91
91
|
- Manifest schema: shared core `agent-team/agent-artifact-contracts.md`. Read it first; producers upsert only their IDs.
|
|
92
92
|
- Metrics: append-only allowlisted events — `agent-team/agent-task-metrics.md`. Aggregate: `node node_modules/@bonesofspring/ai-rules/scripts/aggregate-agent-task-metrics.mjs --team-root .ai.local/team`.
|
|
93
93
|
- Commit `.ai.local/team/` templates (and slugs if you want them in clones).
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"platform": "mavis",
|
|
4
4
|
"stack": "ios-swift",
|
|
5
5
|
"semanticSource": "cursor/ios-swift",
|
|
6
|
-
"sourceRevision": "
|
|
6
|
+
"sourceRevision": "bac825df3c3aea0e993af53cac908279f7769550d644c8cff3a0562fe20d1637",
|
|
7
7
|
"entries": [
|
|
8
8
|
{
|
|
9
9
|
"source": "AGENTS.md",
|
|
@@ -144,5 +144,5 @@ Load requestable rule `mcp-usage` when verifying third-party library APIs (Conte
|
|
|
144
144
|
|
|
145
145
|
- **Authoritative inputs:** read `.ai.local/team/tasks/<slug>/artifact-manifest.json` first; consume handoff `artifactInputIds` when supplied, otherwise consume the items in `manifest.artifacts[]` for `brief.md`, `decomposition.md`, current scope, and applicable prior findings.
|
|
146
146
|
- **Owned outputs:** `implementation.md` plus changed implementation/test paths; upsert only the entry in `manifest.artifacts[]` assigned by handoff (`artifactOutputId`; fallback `implementation`) and preserve all foreign items in `manifest.artifacts[]`.
|
|
147
|
-
- **Terminal receipt:** cover applicable AC/task IDs, list authoritative evidence paths, and emit `completed` or `blocked`. Bind it to the supplied `attemptId` when present.
|
|
147
|
+
- **Terminal receipt:** cover applicable AC/task IDs, list authoritative evidence paths, and emit `completed` or `blocked`. Bind it to the supplied `attemptId` when present. `authoritativePaths` are relative to the task folder (`brief.md`), not the repo root; put external files in `evidencePaths`.
|
|
148
148
|
- **Shared state:** never create or mutate `status.json` or `metrics.json`; the orchestration runtime/hook owns lifecycle, gates, retries, attempts, and timestamps.
|
|
@@ -141,5 +141,5 @@ If the prompt/brief has a tracker URL (Linear/Jira/Notion/…) and that MCP is r
|
|
|
141
141
|
|
|
142
142
|
- **Authoritative inputs:** read `.ai.local/team/tasks/<slug>/artifact-manifest.json` first; consume `pipeline.json`, the manifest routing entry, user-approved decisions, and any authoritative architecture/approval entries.
|
|
143
143
|
- **Owned outputs:** `brief.md` and `decomposition.md` (plus `ux-design.md` when produced); upsert only the entry in `manifest.artifacts[]` assigned by handoff (`artifactOutputId`; fallback `analysis`) and preserve all foreign items in `manifest.artifacts[]`.
|
|
144
|
-
- **Terminal receipt:** cover applicable AC/task IDs, list authoritative evidence paths, and emit `completed` or `blocked`. Bind it to the supplied `attemptId` when present.
|
|
144
|
+
- **Terminal receipt:** cover applicable AC/task IDs, list authoritative evidence paths, and emit `completed` or `blocked`. Bind it to the supplied `attemptId` when present. `authoritativePaths` are relative to the task folder (`brief.md`), not the repo root; put external files in `evidencePaths`.
|
|
145
145
|
- **Shared state:** never create or mutate `status.json` or `metrics.json`; the orchestration runtime/hook owns lifecycle, gates, retries, attempts, and timestamps.
|
|
@@ -179,5 +179,5 @@ Return the routing receipt to the orchestrator. The orchestration runtime/hook e
|
|
|
179
179
|
|
|
180
180
|
- **Authoritative inputs:** read `.ai.local/team/tasks/<slug>/artifact-manifest.json` first; consume the user request and any existing authoritative task/decision entries.
|
|
181
181
|
- **Owned outputs:** `pipeline.json` and the routing entry in `manifest.artifacts[]`; upsert only the entry in `manifest.artifacts[]` assigned by handoff (`artifactOutputId`; fallback `routing`) and preserve all foreign items in `manifest.artifacts[]`.
|
|
182
|
-
- **Terminal receipt:** cover applicable AC/task IDs, list authoritative evidence paths, and emit `completed` or `blocked`. Bind it to the supplied `attemptId` when present.
|
|
182
|
+
- **Terminal receipt:** cover applicable AC/task IDs, list authoritative evidence paths, and emit `completed` or `blocked`. Bind it to the supplied `attemptId` when present. `authoritativePaths` are relative to the task folder (`brief.md`), not the repo root; put external files in `evidencePaths`.
|
|
183
183
|
- **Shared state:** never create or mutate `status.json` or `metrics.json`; the orchestration runtime/hook owns lifecycle, gates, retries, attempts, and timestamps.
|
|
@@ -453,7 +453,21 @@ function endHumanGateIfResumed() {
|
|
|
453
453
|
appendMetric({ type: 'human_gate_ended', at: now, gateStartedEventId: status.activeHumanGateEventId, source: 'hook', attributionConfidence: 'high' });
|
|
454
454
|
delete status.activeHumanGateEventId;
|
|
455
455
|
}
|
|
456
|
-
function completeTaskMetrics() {
|
|
456
|
+
function completeTaskMetrics() {
|
|
457
|
+
// Two hook processes can both enter completion before either writes the
|
|
458
|
+
// event. The metrics lock serializes them; the second sees the first write.
|
|
459
|
+
mutateMetrics((metrics) => {
|
|
460
|
+
if (metrics.events.some((event) => event && event.type === 'task_completed')) return;
|
|
461
|
+
metrics.events.push({
|
|
462
|
+
eventId: `${metrics.task.runId}:${Date.now()}:${Math.random().toString(16).slice(2)}`,
|
|
463
|
+
type: 'task_completed',
|
|
464
|
+
at: now,
|
|
465
|
+
outcome: status.state === 'completed' ? 'completed' : 'unknown',
|
|
466
|
+
source: 'hook',
|
|
467
|
+
attributionConfidence: 'high',
|
|
468
|
+
});
|
|
469
|
+
});
|
|
470
|
+
}
|
|
457
471
|
function recordSkippedStep(step, stepIndex) {
|
|
458
472
|
for (const agent of getStepAgents(step)) {
|
|
459
473
|
const runId = status.metricsRunId || `${slug}-${Date.now()}-${Math.random().toString(16).slice(2)}`;
|
|
@@ -641,7 +655,7 @@ function handoffForWave(units, waveId) {
|
|
|
641
655
|
`Invoke IN PARALLEL (one message, multiple Task calls): ${labels.join(' AND ')} for slug "${slug}"${waveId ? ` (waveId=${waveId})` : ''}. ` +
|
|
642
656
|
`Each agent writes its artifact and owned receipt; the hook records slot joins from stops. Do not mutate status.json lifecycle fields. ` +
|
|
643
657
|
`Artifact inputs: ${inputIds.length > 0 ? inputIds.join(', ') : 'manifest defaults'}; owned output IDs: ${outputIds.join('; ')}. ` +
|
|
644
|
-
`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
|
|
658
|
+
`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. ${receiptPathClause()}`
|
|
645
659
|
);
|
|
646
660
|
}
|
|
647
661
|
function blockedNotice(blockedIndex, agent) {
|
|
@@ -657,12 +671,22 @@ function noProgressNotice() {
|
|
|
657
671
|
const pending = pendingStepIndexes().map((index) => steps[index].id || `step-${index}`);
|
|
658
672
|
return `No schedulable step remains for slug "${slug}" (unsatisfied: ${pending.join(', ')}). Resume only via /task-continue ${slug}.`;
|
|
659
673
|
}
|
|
674
|
+
function deferReason(wave, deferred) {
|
|
675
|
+
const sameAgent = deferred.some((index) => wave.some((chosen) => {
|
|
676
|
+
const left = getStepAgents(steps[chosen]);
|
|
677
|
+
return getStepAgents(steps[index]).some((agent) => left.includes(agent));
|
|
678
|
+
}));
|
|
679
|
+
if (sameAgent) return 'same agent already in the wave';
|
|
680
|
+
const missingScope = [...wave, ...deferred].some((index) => declaredScopes(steps[index]).length === 0);
|
|
681
|
+
if (missingScope) return 'writeScopes undeclared';
|
|
682
|
+
return 'writeScopes overlap';
|
|
683
|
+
}
|
|
660
684
|
function dispatchReadyWave(prefixMessage) {
|
|
661
685
|
const ready = computeReadySteps();
|
|
662
686
|
if (ready.length === 0) return false;
|
|
663
687
|
const { wave, deferred } = selectWave(ready);
|
|
664
688
|
if (deferred.length > 0) {
|
|
665
|
-
appendMetric({ type: 'parallel_conflict_deferred', at: now, stepIndex: wave[0], deferredStepIndexes: deferred, reason:
|
|
689
|
+
appendMetric({ type: 'parallel_conflict_deferred', at: now, stepIndex: wave[0], deferredStepIndexes: deferred, reason: deferReason(wave, deferred), source: 'hook', attributionConfidence: 'fallback' });
|
|
666
690
|
}
|
|
667
691
|
// Slot-filtered dispatch: only unsatisfied (stepIndex, agent) slots are invoked.
|
|
668
692
|
const units = wave.flatMap((stepIndex) => unsatisfiedAgents(stepIndex).map((agent) => ({ stepIndex, agent })));
|
|
@@ -810,9 +834,12 @@ function metricsHandoff(agent) {
|
|
|
810
834
|
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.';
|
|
811
835
|
}
|
|
812
836
|
|
|
837
|
+
function receiptPathClause() {
|
|
838
|
+
return 'authoritativePaths are relative to the task folder (brief.md), not the repo root; put external files in evidencePaths.';
|
|
839
|
+
}
|
|
813
840
|
function artifactHandoff(step, agent) {
|
|
814
841
|
const inputIds = Array.isArray(step?.artifactInputIds) ? step.artifactInputIds.join(', ') : 'manifest defaults';
|
|
815
|
-
return ` Artifact inputs: ${inputIds}; owned output ID: ${artifactOutputIdFor(step, agent)}. Bind the terminal receipt to the supplied attemptId
|
|
842
|
+
return ` Artifact inputs: ${inputIds}; owned output ID: ${artifactOutputIdFor(step, agent)}. Bind the terminal receipt to the supplied attemptId. ${receiptPathClause()}`;
|
|
816
843
|
}
|
|
817
844
|
|
|
818
845
|
function handoffForAgent(agent, scope, step = null) {
|
|
@@ -830,7 +857,7 @@ function handoffForParallelStep(step) {
|
|
|
830
857
|
`Invoke IN PARALLEL (one message, multiple Task calls): ${agents.join(' AND ')} for slug "${slug}". ` +
|
|
831
858
|
`Each agent writes its artifact and owned receipt; the hook records parallelCompleted from stops. Do not mutate status.json lifecycle fields. ` +
|
|
832
859
|
`Artifact inputs: ${Array.isArray(step.artifactInputIds) ? step.artifactInputIds.join(', ') : 'manifest defaults'}; owned output IDs: ${agents.map((agent) => `${agent}=${artifactOutputIdFor(step, agent)}`).join('; ')}. ` +
|
|
833
|
-
`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
|
|
860
|
+
`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. ${receiptPathClause()}`
|
|
834
861
|
);
|
|
835
862
|
}
|
|
836
863
|
|
|
@@ -839,9 +866,35 @@ function hasGateAfter(agent, humanGates) {
|
|
|
839
866
|
}
|
|
840
867
|
|
|
841
868
|
function hasGateAfterStep(step, humanGates) {
|
|
869
|
+
if (!Array.isArray(humanGates) || !step) return false;
|
|
870
|
+
if (typeof step.id === 'string' && step.id.length > 0 && humanGates.includes(`after:${step.id}`)) return true;
|
|
842
871
|
return getStepAgents(step).some((a) => hasGateAfter(a, humanGates));
|
|
843
872
|
}
|
|
844
873
|
|
|
874
|
+
// A followup loop of the subagent that just finished arrives with no attemptId
|
|
875
|
+
// and no receipt for the attempt this same transition opened. That stop is not
|
|
876
|
+
// the next agent. A stop more than 15s later, still without a receipt, is a
|
|
877
|
+
// real missing receipt and must stall.
|
|
878
|
+
function isSchedulingEcho() {
|
|
879
|
+
if (typeof hookInput.attemptId === 'string' && hookInput.attemptId.length > 0) return false;
|
|
880
|
+
const entries = Object.entries(status.activeAttempts || {});
|
|
881
|
+
if (entries.length !== 1) return false;
|
|
882
|
+
const [attemptId, entry] = entries[0];
|
|
883
|
+
const previous = status.lastCompletedAttempt;
|
|
884
|
+
if (!previous || previous.completedAt !== entry.startedAt) return false;
|
|
885
|
+
const ageMs = Date.parse(now) - Date.parse(entry.startedAt);
|
|
886
|
+
if (!Number.isFinite(ageMs) || ageMs < 0 || ageMs > 15000) return false;
|
|
887
|
+
const previousJoined = Object.values(status.joinedSlots || {}).some((slot) => slot && slot.attemptId === previous.attemptId);
|
|
888
|
+
const linearAdvance = !isGraphMode() && typeof entry.stepIndex === 'number' && entry.stepIndex > 0;
|
|
889
|
+
if (!previousJoined && !linearAdvance) return false;
|
|
890
|
+
try {
|
|
891
|
+
const manifest = JSON.parse(fs.readFileSync(path.join(taskDir, 'artifact-manifest.json'), 'utf8'));
|
|
892
|
+
const artifacts = Array.isArray(manifest.artifacts) ? manifest.artifacts : [];
|
|
893
|
+
if (artifacts.some((item) => item && item.receipt && item.receipt.attemptId === attemptId)) return false;
|
|
894
|
+
} catch {}
|
|
895
|
+
return true;
|
|
896
|
+
}
|
|
897
|
+
|
|
845
898
|
function legacyFlow() {
|
|
846
899
|
if (status.phase === 'analysis') {
|
|
847
900
|
process.stdout.write('{}');
|
|
@@ -1059,6 +1112,10 @@ if (pipelineParseError) {
|
|
|
1059
1112
|
}
|
|
1060
1113
|
|
|
1061
1114
|
steps = pipeline.steps || [];
|
|
1115
|
+
if (isSchedulingEcho()) {
|
|
1116
|
+
process.stdout.write('{}');
|
|
1117
|
+
process.exit(0);
|
|
1118
|
+
}
|
|
1062
1119
|
const initialIdx = typeof status.pipelineIndex === 'number' ? status.pipelineIndex : 0;
|
|
1063
1120
|
const initialStep = steps[initialIdx];
|
|
1064
1121
|
const activeAttemptCountBeforeFinish = Object.keys(status.activeAttempts || {}).length;
|
|
@@ -87,7 +87,7 @@ Same JSON on Claude, Mavis, or OpenCode: `bash .<tool>/hooks/chain-team-phases.s
|
|
|
87
87
|
## Contracts
|
|
88
88
|
|
|
89
89
|
- **Manifest field name:** receipts go in `artifacts[]`. Anything written under `entries` is ignored — the hook reads only `artifacts` and prints a dual-read warning naming the file. See `agent-team/agent-artifact-contracts.md` § Schema field name.
|
|
90
|
-
- **Evidence paths:** `authoritativePaths[]`
|
|
90
|
+
- **Evidence paths:** `authoritativePaths[]` is relative to the task directory (`brief.md`). A repo-root path (`.ai.local/team/tasks/<slug>/brief.md`) is rejected. Put anything outside the task directory — e.g. `openspec/changes/**` — in `evidencePaths[]`.
|
|
91
91
|
- Manifest schema: shared core `agent-team/agent-artifact-contracts.md`. Read it first; producers upsert only their IDs.
|
|
92
92
|
- Metrics: append-only allowlisted events — `agent-team/agent-task-metrics.md`. Aggregate: `node node_modules/@bonesofspring/ai-rules/scripts/aggregate-agent-task-metrics.mjs --team-root .ai.local/team`.
|
|
93
93
|
- Commit `.ai.local/team/` templates (and slugs if you want them in clones).
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"platform": "mavis",
|
|
4
4
|
"stack": "java",
|
|
5
5
|
"semanticSource": "cursor/java",
|
|
6
|
-
"sourceRevision": "
|
|
6
|
+
"sourceRevision": "d6ddd8f94b434f9be5f4129e797a6c7a27a1ee151444fc53c1b22cd14b612aeb",
|
|
7
7
|
"entries": [
|
|
8
8
|
{
|
|
9
9
|
"source": "AGENTS.md",
|
|
@@ -131,7 +131,7 @@ Load requestable rule `mcp-usage` when verifying third-party library APIs (Conte
|
|
|
131
131
|
|
|
132
132
|
- **Authoritative inputs:** read `.ai.local/team/tasks/<slug>/artifact-manifest.json` first; consume handoff `artifactInputIds` when supplied, otherwise consume the items in `manifest.artifacts[]` for `brief.md`, `decomposition.md`, current scope, and applicable prior findings.
|
|
133
133
|
- **Owned outputs:** `implementation.md` plus changed implementation/test paths; upsert only the entry in `manifest.artifacts[]` assigned by handoff (`artifactOutputId`; fallback `implementation`) and preserve all foreign items in `manifest.artifacts[]`.
|
|
134
|
-
- **Terminal receipt:** cover applicable AC/task IDs, list authoritative evidence paths, and emit `completed` or `blocked`. Bind it to the supplied `attemptId` when present.
|
|
134
|
+
- **Terminal receipt:** cover applicable AC/task IDs, list authoritative evidence paths, and emit `completed` or `blocked`. Bind it to the supplied `attemptId` when present. `authoritativePaths` are relative to the task folder (`brief.md`), not the repo root; put external files in `evidencePaths`.
|
|
135
135
|
- **Shared state:** never create or mutate `status.json` or `metrics.json`; the orchestration runtime/hook owns lifecycle, gates, retries, attempts, and timestamps.
|
|
136
136
|
|
|
137
137
|
## Receipt binding
|
|
@@ -120,5 +120,5 @@ If the prompt/brief has a tracker URL (Linear/Jira/Notion/…) and that MCP is r
|
|
|
120
120
|
|
|
121
121
|
- **Authoritative inputs:** read `.ai.local/team/tasks/<slug>/artifact-manifest.json` first; consume `pipeline.json`, the manifest routing entry, user-approved decisions, and any authoritative architecture/approval entries.
|
|
122
122
|
- **Owned outputs:** `brief.md` and `decomposition.md`; upsert only the entry in `manifest.artifacts[]` assigned by handoff (`artifactOutputId`; fallback `analysis`) and preserve all foreign items in `manifest.artifacts[]`.
|
|
123
|
-
- **Terminal receipt:** cover applicable AC/task IDs, list authoritative evidence paths, and emit `completed` or `blocked`. Bind it to the supplied `attemptId` when present.
|
|
123
|
+
- **Terminal receipt:** cover applicable AC/task IDs, list authoritative evidence paths, and emit `completed` or `blocked`. Bind it to the supplied `attemptId` when present. `authoritativePaths` are relative to the task folder (`brief.md`), not the repo root; put external files in `evidencePaths`.
|
|
124
124
|
- **Shared state:** never create or mutate `status.json` or `metrics.json`; the orchestration runtime/hook owns lifecycle, gates, retries, attempts, and timestamps.
|
|
@@ -168,5 +168,5 @@ Return the routing receipt to the orchestrator. The orchestration runtime/hook e
|
|
|
168
168
|
|
|
169
169
|
- **Authoritative inputs:** read `.ai.local/team/tasks/<slug>/artifact-manifest.json` first; consume the user request and any existing authoritative task/decision entries.
|
|
170
170
|
- **Owned outputs:** `pipeline.json` and the routing entry in `manifest.artifacts[]`; upsert only the entry in `manifest.artifacts[]` assigned by handoff (`artifactOutputId`; fallback `routing`) and preserve all foreign items in `manifest.artifacts[]`.
|
|
171
|
-
- **Terminal receipt:** cover applicable AC/task IDs, list authoritative evidence paths, and emit `completed` or `blocked`. Bind it to the supplied `attemptId` when present.
|
|
171
|
+
- **Terminal receipt:** cover applicable AC/task IDs, list authoritative evidence paths, and emit `completed` or `blocked`. Bind it to the supplied `attemptId` when present. `authoritativePaths` are relative to the task folder (`brief.md`), not the repo root; put external files in `evidencePaths`.
|
|
172
172
|
- **Shared state:** never create or mutate `status.json` or `metrics.json`; the orchestration runtime/hook owns lifecycle, gates, retries, attempts, and timestamps.
|