@bonesofspring/ai-rules 0.2.44 → 0.2.45
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 +36 -1
- package/bin/lib/engine-scripts.js +6 -1
- package/docs/MAVIS.md +1 -1
- package/docs/OPENCODE.md +1 -1
- package/package.json +1 -1
- package/presets/_shared/ai-local/scripts/efficacy-oracle.mjs +10 -2
- package/presets/_shared/ai-local/scripts/manifest.mjs +341 -0
- package/presets/_shared/core/agent-team/agent-artifact-contracts.md +22 -0
- package/presets/_shared/core/agent-team/agent-team-orchestrator.md +11 -2
- package/presets/_shared/core/review/code-review-mr.md +9 -0
- package/presets/_shared/hooks/chain-team-phases.sh.tmpl +2 -2
- package/presets/claude/android-kotlin/agents/build-verifier.md +1 -1
- package/presets/claude/android-kotlin/agents/code-reviewer.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/qa-tester.md +1 -1
- package/presets/claude/android-kotlin/hooks/chain-team-phases.sh +2 -2
- package/presets/claude/android-kotlin/rules/tooling-and-review/agent-team-orchestrator.md +11 -2
- package/presets/claude/android-kotlin/rules/tooling-and-review/code-review.md +9 -0
- package/presets/claude/android-kotlin/team/README.md +17 -0
- package/presets/claude/go/agents/build-verifier.md +1 -1
- package/presets/claude/go/agents/code-reviewer.md +1 -1
- package/presets/claude/go/agents/debugger.md +1 -1
- package/presets/claude/go/agents/feature-developer.md +1 -1
- package/presets/claude/go/agents/qa-tester.md +1 -1
- package/presets/claude/go/hooks/chain-team-phases.sh +2 -2
- package/presets/claude/go/rules/tooling-and-review/agent-team-orchestrator.md +11 -2
- package/presets/claude/go/rules/tooling-and-review/code-review.md +9 -0
- package/presets/claude/go/team/README.md +17 -0
- package/presets/claude/ios-swift/agents/build-verifier.md +1 -1
- package/presets/claude/ios-swift/agents/code-reviewer.md +1 -1
- package/presets/claude/ios-swift/agents/debugger.md +1 -1
- package/presets/claude/ios-swift/agents/feature-developer.md +1 -1
- package/presets/claude/ios-swift/agents/qa-tester.md +1 -1
- package/presets/claude/ios-swift/hooks/chain-team-phases.sh +2 -2
- package/presets/claude/ios-swift/rules/tooling-and-review/agent-team-orchestrator.md +11 -2
- package/presets/claude/ios-swift/rules/tooling-and-review/code-review.md +9 -0
- package/presets/claude/ios-swift/team/README.md +17 -0
- package/presets/claude/java/agents/build-verifier.md +1 -1
- package/presets/claude/java/agents/code-reviewer.md +1 -1
- package/presets/claude/java/agents/debugger.md +1 -1
- package/presets/claude/java/agents/feature-developer.md +1 -1
- package/presets/claude/java/agents/qa-tester.md +1 -1
- package/presets/claude/java/hooks/chain-team-phases.sh +2 -2
- package/presets/claude/java/rules/tooling-and-review/agent-team-orchestrator.md +11 -2
- package/presets/claude/java/rules/tooling-and-review/code-review.md +9 -0
- package/presets/claude/java/team/README.md +17 -0
- package/presets/claude/mcp-ts/agents/build-verifier.md +1 -1
- package/presets/claude/mcp-ts/agents/feature-developer.md +1 -1
- package/presets/claude/mcp-ts/hooks/chain-team-phases.sh +2 -2
- package/presets/claude/mcp-ts/rules/tooling-and-review/agent-team-orchestrator.md +11 -2
- package/presets/claude/mcp-ts/rules/tooling-and-review/code-review.md +9 -0
- package/presets/claude/mcp-ts/team/README.md +17 -0
- package/presets/claude/next/agents/build-verifier.md +1 -1
- package/presets/claude/next/agents/code-reviewer.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/qa-tester.md +1 -1
- package/presets/claude/next/agents/security-reviewer.md +5 -0
- package/presets/claude/next/hooks/chain-team-phases.sh +2 -2
- package/presets/claude/next/rules/tooling-and-review/agent-team-orchestrator.md +11 -2
- package/presets/claude/next/rules/tooling-and-review/code-review-mr.md +9 -0
- package/presets/claude/next/team/README.md +17 -0
- package/presets/claude/nuxt/agents/build-verifier.md +1 -1
- package/presets/claude/nuxt/agents/code-reviewer.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/qa-tester.md +1 -1
- package/presets/claude/nuxt/hooks/chain-team-phases.sh +2 -2
- package/presets/claude/nuxt/rules/tooling-and-review/agent-team-orchestrator.md +11 -2
- package/presets/claude/nuxt/rules/tooling-and-review/code-review-mr.md +9 -0
- package/presets/claude/nuxt/team/README.md +17 -0
- package/presets/claude/php-hexagonal/agents/build-verifier.md +1 -1
- package/presets/claude/php-hexagonal/agents/code-reviewer.md +1 -1
- package/presets/claude/php-hexagonal/agents/debugger.md +1 -1
- package/presets/claude/php-hexagonal/agents/feature-developer.md +1 -1
- package/presets/claude/php-hexagonal/agents/qa-tester.md +1 -1
- package/presets/claude/php-hexagonal/hooks/chain-team-phases.sh +2 -2
- package/presets/claude/php-hexagonal/rules/tooling-and-review/agent-team-orchestrator.md +11 -2
- package/presets/claude/php-hexagonal/rules/tooling-and-review/code-review.md +9 -0
- package/presets/claude/php-hexagonal/team/README.md +17 -0
- package/presets/claude/php-laravel/agents/build-verifier.md +1 -1
- package/presets/claude/php-laravel/agents/code-reviewer.md +1 -1
- package/presets/claude/php-laravel/agents/debugger.md +1 -1
- package/presets/claude/php-laravel/agents/feature-developer.md +1 -1
- package/presets/claude/php-laravel/agents/qa-tester.md +1 -1
- package/presets/claude/php-laravel/hooks/chain-team-phases.sh +2 -2
- package/presets/claude/php-laravel/rules/tooling-and-review/agent-team-orchestrator.md +11 -2
- package/presets/claude/php-laravel/rules/tooling-and-review/code-review.md +9 -0
- package/presets/claude/php-laravel/team/README.md +17 -0
- package/presets/claude/svelte/agents/build-verifier.md +1 -1
- package/presets/claude/svelte/agents/code-reviewer.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/qa-tester.md +1 -1
- package/presets/claude/svelte/hooks/chain-team-phases.sh +2 -2
- package/presets/claude/svelte/rules/tooling-and-review/agent-team-orchestrator.md +11 -2
- package/presets/claude/svelte/rules/tooling-and-review/code-review-mr.md +9 -0
- package/presets/claude/svelte/team/README.md +17 -0
- package/presets/cursor/android-kotlin/agents/build-verifier.md +1 -1
- package/presets/cursor/android-kotlin/agents/code-reviewer.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/qa-tester.md +1 -1
- package/presets/cursor/android-kotlin/hooks/chain-team-phases.sh +2 -2
- package/presets/cursor/android-kotlin/rules/agent-team-orchestrator.mdc +1 -1
- package/presets/cursor/android-kotlin/rules/code-review-mr.mdc +9 -0
- package/presets/cursor/android-kotlin/team/README.md +17 -0
- package/presets/cursor/go/agents/build-verifier.md +1 -1
- package/presets/cursor/go/agents/code-reviewer.md +1 -1
- package/presets/cursor/go/agents/debugger.md +1 -1
- package/presets/cursor/go/agents/feature-developer.md +1 -1
- package/presets/cursor/go/agents/qa-tester.md +1 -1
- package/presets/cursor/go/hooks/chain-team-phases.sh +2 -2
- package/presets/cursor/go/rules/agent-team-orchestrator.mdc +1 -1
- package/presets/cursor/go/rules/code-review-mr.mdc +9 -0
- package/presets/cursor/go/team/README.md +17 -0
- package/presets/cursor/ios-swift/agents/build-verifier.md +1 -1
- package/presets/cursor/ios-swift/agents/code-reviewer.md +1 -1
- package/presets/cursor/ios-swift/agents/debugger.md +1 -1
- package/presets/cursor/ios-swift/agents/feature-developer.md +1 -1
- package/presets/cursor/ios-swift/agents/qa-tester.md +1 -1
- package/presets/cursor/ios-swift/hooks/chain-team-phases.sh +2 -2
- package/presets/cursor/ios-swift/rules/agent-team-orchestrator.mdc +1 -1
- package/presets/cursor/ios-swift/rules/code-review-mr.mdc +9 -0
- package/presets/cursor/ios-swift/team/README.md +17 -0
- package/presets/cursor/java/agents/build-verifier.md +1 -1
- package/presets/cursor/java/agents/code-reviewer.md +1 -1
- package/presets/cursor/java/agents/debugger.md +1 -1
- package/presets/cursor/java/agents/feature-developer.md +1 -1
- package/presets/cursor/java/agents/qa-tester.md +1 -1
- package/presets/cursor/java/hooks/chain-team-phases.sh +2 -2
- package/presets/cursor/java/rules/agent-team-orchestrator.mdc +1 -1
- package/presets/cursor/java/rules/code-review-mr.mdc +9 -0
- package/presets/cursor/java/team/README.md +17 -0
- package/presets/cursor/mcp-ts/agents/build-verifier.md +1 -1
- package/presets/cursor/mcp-ts/agents/feature-developer.md +1 -1
- package/presets/cursor/mcp-ts/hooks/chain-team-phases.sh +2 -2
- package/presets/cursor/mcp-ts/rules/agent-team-orchestrator.mdc +1 -1
- package/presets/cursor/mcp-ts/rules/code-review-mr.mdc +9 -0
- package/presets/cursor/mcp-ts/team/README.md +17 -0
- package/presets/cursor/next/agents/build-verifier.md +1 -1
- package/presets/cursor/next/agents/code-reviewer.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/qa-tester.md +1 -1
- package/presets/cursor/next/agents/security-reviewer.md +5 -0
- package/presets/cursor/next/hooks/chain-team-phases.sh +2 -2
- package/presets/cursor/next/rules/agent-team-orchestrator.mdc +1 -1
- package/presets/cursor/next/rules/code-review-mr.mdc +9 -0
- package/presets/cursor/next/team/README.md +17 -0
- package/presets/cursor/nuxt/agents/build-verifier.md +1 -1
- package/presets/cursor/nuxt/agents/code-reviewer.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/qa-tester.md +1 -1
- package/presets/cursor/nuxt/hooks/chain-team-phases.sh +2 -2
- package/presets/cursor/nuxt/rules/agent-team-orchestrator.mdc +1 -1
- package/presets/cursor/nuxt/rules/code-review-mr.mdc +9 -0
- package/presets/cursor/nuxt/team/README.md +17 -0
- package/presets/cursor/php-hexagonal/agents/build-verifier.md +1 -1
- package/presets/cursor/php-hexagonal/agents/code-reviewer.md +1 -1
- package/presets/cursor/php-hexagonal/agents/debugger.md +1 -1
- package/presets/cursor/php-hexagonal/agents/feature-developer.md +1 -1
- package/presets/cursor/php-hexagonal/agents/qa-tester.md +1 -1
- package/presets/cursor/php-hexagonal/hooks/chain-team-phases.sh +2 -2
- package/presets/cursor/php-hexagonal/rules/agent-team-orchestrator.mdc +1 -1
- package/presets/cursor/php-hexagonal/rules/code-review-mr.mdc +9 -0
- package/presets/cursor/php-hexagonal/team/README.md +17 -0
- package/presets/cursor/php-laravel/agents/build-verifier.md +1 -1
- package/presets/cursor/php-laravel/agents/code-reviewer.md +1 -1
- package/presets/cursor/php-laravel/agents/debugger.md +1 -1
- package/presets/cursor/php-laravel/agents/feature-developer.md +1 -1
- package/presets/cursor/php-laravel/agents/qa-tester.md +1 -1
- package/presets/cursor/php-laravel/hooks/chain-team-phases.sh +2 -2
- package/presets/cursor/php-laravel/rules/agent-team-orchestrator.mdc +1 -1
- package/presets/cursor/php-laravel/rules/code-review-mr.mdc +9 -0
- package/presets/cursor/php-laravel/team/README.md +17 -0
- package/presets/cursor/svelte/agents/build-verifier.md +1 -1
- package/presets/cursor/svelte/agents/code-reviewer.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/qa-tester.md +1 -1
- package/presets/cursor/svelte/hooks/chain-team-phases.sh +2 -2
- package/presets/cursor/svelte/rules/agent-team-orchestrator.mdc +1 -1
- package/presets/cursor/svelte/rules/code-review-mr.mdc +9 -0
- package/presets/cursor/svelte/team/README.md +17 -0
- package/presets/mavis/android-kotlin/adapter-map.json +1 -1
- package/presets/mavis/android-kotlin/agents/build-verifier.md +1 -1
- package/presets/mavis/android-kotlin/agents/code-reviewer.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/qa-tester.md +1 -1
- package/presets/mavis/android-kotlin/hooks/chain-team-phases.sh +2 -2
- package/presets/mavis/android-kotlin/rules/agent-team-orchestrator.md +11 -2
- package/presets/mavis/android-kotlin/rules/code-review-mr.md +9 -0
- package/presets/mavis/android-kotlin/team/README.md +17 -0
- package/presets/mavis/go/adapter-map.json +1 -1
- package/presets/mavis/go/agents/build-verifier.md +1 -1
- package/presets/mavis/go/agents/code-reviewer.md +1 -1
- package/presets/mavis/go/agents/debugger.md +1 -1
- package/presets/mavis/go/agents/feature-developer.md +1 -1
- package/presets/mavis/go/agents/qa-tester.md +1 -1
- package/presets/mavis/go/hooks/chain-team-phases.sh +2 -2
- package/presets/mavis/go/rules/agent-team-orchestrator.md +11 -2
- package/presets/mavis/go/rules/code-review-mr.md +9 -0
- package/presets/mavis/go/team/README.md +17 -0
- package/presets/mavis/ios-swift/adapter-map.json +1 -1
- package/presets/mavis/ios-swift/agents/build-verifier.md +1 -1
- package/presets/mavis/ios-swift/agents/code-reviewer.md +1 -1
- package/presets/mavis/ios-swift/agents/debugger.md +1 -1
- package/presets/mavis/ios-swift/agents/feature-developer.md +1 -1
- package/presets/mavis/ios-swift/agents/qa-tester.md +1 -1
- package/presets/mavis/ios-swift/hooks/chain-team-phases.sh +2 -2
- package/presets/mavis/ios-swift/rules/agent-team-orchestrator.md +11 -2
- package/presets/mavis/ios-swift/rules/code-review-mr.md +9 -0
- package/presets/mavis/ios-swift/team/README.md +17 -0
- package/presets/mavis/java/adapter-map.json +1 -1
- package/presets/mavis/java/agents/build-verifier.md +1 -1
- package/presets/mavis/java/agents/code-reviewer.md +1 -1
- package/presets/mavis/java/agents/debugger.md +1 -1
- package/presets/mavis/java/agents/feature-developer.md +1 -1
- package/presets/mavis/java/agents/qa-tester.md +1 -1
- package/presets/mavis/java/hooks/chain-team-phases.sh +2 -2
- package/presets/mavis/java/rules/agent-team-orchestrator.md +11 -2
- package/presets/mavis/java/rules/code-review-mr.md +9 -0
- package/presets/mavis/java/team/README.md +17 -0
- package/presets/mavis/mcp-ts/adapter-map.json +1 -1
- package/presets/mavis/mcp-ts/agents/build-verifier.md +1 -1
- package/presets/mavis/mcp-ts/agents/feature-developer.md +1 -1
- package/presets/mavis/mcp-ts/hooks/chain-team-phases.sh +2 -2
- package/presets/mavis/mcp-ts/rules/agent-team-orchestrator.md +11 -2
- package/presets/mavis/mcp-ts/rules/code-review-mr.md +9 -0
- package/presets/mavis/mcp-ts/team/README.md +17 -0
- package/presets/mavis/next/adapter-map.json +1 -1
- package/presets/mavis/next/agents/build-verifier.md +1 -1
- package/presets/mavis/next/agents/code-reviewer.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/qa-tester.md +1 -1
- package/presets/mavis/next/agents/security-reviewer.md +5 -0
- package/presets/mavis/next/hooks/chain-team-phases.sh +2 -2
- package/presets/mavis/next/rules/agent-team-orchestrator.md +11 -2
- package/presets/mavis/next/rules/code-review-mr.md +9 -0
- package/presets/mavis/next/team/README.md +17 -0
- package/presets/mavis/nuxt/adapter-map.json +1 -1
- package/presets/mavis/nuxt/agents/build-verifier.md +1 -1
- package/presets/mavis/nuxt/agents/code-reviewer.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/qa-tester.md +1 -1
- package/presets/mavis/nuxt/hooks/chain-team-phases.sh +2 -2
- package/presets/mavis/nuxt/rules/agent-team-orchestrator.md +11 -2
- package/presets/mavis/nuxt/rules/code-review-mr.md +9 -0
- package/presets/mavis/nuxt/team/README.md +17 -0
- package/presets/mavis/php-hexagonal/adapter-map.json +1 -1
- package/presets/mavis/php-hexagonal/agents/build-verifier.md +1 -1
- package/presets/mavis/php-hexagonal/agents/code-reviewer.md +1 -1
- package/presets/mavis/php-hexagonal/agents/debugger.md +1 -1
- package/presets/mavis/php-hexagonal/agents/feature-developer.md +1 -1
- package/presets/mavis/php-hexagonal/agents/qa-tester.md +1 -1
- package/presets/mavis/php-hexagonal/hooks/chain-team-phases.sh +2 -2
- package/presets/mavis/php-hexagonal/rules/agent-team-orchestrator.md +11 -2
- package/presets/mavis/php-hexagonal/rules/code-review-mr.md +9 -0
- package/presets/mavis/php-hexagonal/team/README.md +17 -0
- package/presets/mavis/php-laravel/adapter-map.json +1 -1
- package/presets/mavis/php-laravel/agents/build-verifier.md +1 -1
- package/presets/mavis/php-laravel/agents/code-reviewer.md +1 -1
- package/presets/mavis/php-laravel/agents/debugger.md +1 -1
- package/presets/mavis/php-laravel/agents/feature-developer.md +1 -1
- package/presets/mavis/php-laravel/agents/qa-tester.md +1 -1
- package/presets/mavis/php-laravel/hooks/chain-team-phases.sh +2 -2
- package/presets/mavis/php-laravel/rules/agent-team-orchestrator.md +11 -2
- package/presets/mavis/php-laravel/rules/code-review-mr.md +9 -0
- package/presets/mavis/php-laravel/team/README.md +17 -0
- package/presets/mavis/svelte/adapter-map.json +1 -1
- package/presets/mavis/svelte/agents/build-verifier.md +1 -1
- package/presets/mavis/svelte/agents/code-reviewer.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/qa-tester.md +1 -1
- package/presets/mavis/svelte/hooks/chain-team-phases.sh +2 -2
- package/presets/mavis/svelte/rules/agent-team-orchestrator.md +11 -2
- package/presets/mavis/svelte/rules/code-review-mr.md +9 -0
- package/presets/mavis/svelte/team/README.md +17 -0
- package/presets/opencode/android-kotlin/adapter-map.json +1 -1
- package/presets/opencode/android-kotlin/agents/build-verifier.md +1 -1
- package/presets/opencode/android-kotlin/agents/code-reviewer.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/qa-tester.md +1 -1
- package/presets/opencode/android-kotlin/hooks/chain-team-phases.sh +2 -2
- package/presets/opencode/android-kotlin/rules/agent-team-orchestrator.md +11 -2
- package/presets/opencode/android-kotlin/rules/code-review-mr.md +9 -0
- package/presets/opencode/android-kotlin/team/README.md +17 -0
- package/presets/opencode/go/adapter-map.json +1 -1
- package/presets/opencode/go/agents/build-verifier.md +1 -1
- package/presets/opencode/go/agents/code-reviewer.md +1 -1
- package/presets/opencode/go/agents/debugger.md +1 -1
- package/presets/opencode/go/agents/feature-developer.md +1 -1
- package/presets/opencode/go/agents/qa-tester.md +1 -1
- package/presets/opencode/go/hooks/chain-team-phases.sh +2 -2
- package/presets/opencode/go/rules/agent-team-orchestrator.md +11 -2
- package/presets/opencode/go/rules/code-review-mr.md +9 -0
- package/presets/opencode/go/team/README.md +17 -0
- package/presets/opencode/ios-swift/adapter-map.json +1 -1
- package/presets/opencode/ios-swift/agents/build-verifier.md +1 -1
- package/presets/opencode/ios-swift/agents/code-reviewer.md +1 -1
- package/presets/opencode/ios-swift/agents/debugger.md +1 -1
- package/presets/opencode/ios-swift/agents/feature-developer.md +1 -1
- package/presets/opencode/ios-swift/agents/qa-tester.md +1 -1
- package/presets/opencode/ios-swift/hooks/chain-team-phases.sh +2 -2
- package/presets/opencode/ios-swift/rules/agent-team-orchestrator.md +11 -2
- package/presets/opencode/ios-swift/rules/code-review-mr.md +9 -0
- package/presets/opencode/ios-swift/team/README.md +17 -0
- package/presets/opencode/java/adapter-map.json +1 -1
- package/presets/opencode/java/agents/build-verifier.md +1 -1
- package/presets/opencode/java/agents/code-reviewer.md +1 -1
- package/presets/opencode/java/agents/debugger.md +1 -1
- package/presets/opencode/java/agents/feature-developer.md +1 -1
- package/presets/opencode/java/agents/qa-tester.md +1 -1
- package/presets/opencode/java/hooks/chain-team-phases.sh +2 -2
- package/presets/opencode/java/rules/agent-team-orchestrator.md +11 -2
- package/presets/opencode/java/rules/code-review-mr.md +9 -0
- package/presets/opencode/java/team/README.md +17 -0
- package/presets/opencode/mcp-ts/adapter-map.json +1 -1
- package/presets/opencode/mcp-ts/agents/build-verifier.md +1 -1
- package/presets/opencode/mcp-ts/agents/feature-developer.md +1 -1
- package/presets/opencode/mcp-ts/hooks/chain-team-phases.sh +2 -2
- package/presets/opencode/mcp-ts/rules/agent-team-orchestrator.md +11 -2
- package/presets/opencode/mcp-ts/rules/code-review-mr.md +9 -0
- package/presets/opencode/mcp-ts/team/README.md +17 -0
- package/presets/opencode/next/adapter-map.json +1 -1
- package/presets/opencode/next/agents/build-verifier.md +1 -1
- package/presets/opencode/next/agents/code-reviewer.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/qa-tester.md +1 -1
- package/presets/opencode/next/agents/security-reviewer.md +5 -0
- package/presets/opencode/next/hooks/chain-team-phases.sh +2 -2
- package/presets/opencode/next/rules/agent-team-orchestrator.md +11 -2
- package/presets/opencode/next/rules/code-review-mr.md +9 -0
- package/presets/opencode/next/team/README.md +17 -0
- package/presets/opencode/nuxt/adapter-map.json +1 -1
- package/presets/opencode/nuxt/agents/build-verifier.md +1 -1
- package/presets/opencode/nuxt/agents/code-reviewer.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/qa-tester.md +1 -1
- package/presets/opencode/nuxt/hooks/chain-team-phases.sh +2 -2
- package/presets/opencode/nuxt/rules/agent-team-orchestrator.md +11 -2
- package/presets/opencode/nuxt/rules/code-review-mr.md +9 -0
- package/presets/opencode/nuxt/team/README.md +17 -0
- package/presets/opencode/php-hexagonal/adapter-map.json +1 -1
- package/presets/opencode/php-hexagonal/agents/build-verifier.md +1 -1
- package/presets/opencode/php-hexagonal/agents/code-reviewer.md +1 -1
- package/presets/opencode/php-hexagonal/agents/debugger.md +1 -1
- package/presets/opencode/php-hexagonal/agents/feature-developer.md +1 -1
- package/presets/opencode/php-hexagonal/agents/qa-tester.md +1 -1
- package/presets/opencode/php-hexagonal/hooks/chain-team-phases.sh +2 -2
- package/presets/opencode/php-hexagonal/rules/agent-team-orchestrator.md +11 -2
- package/presets/opencode/php-hexagonal/rules/code-review-mr.md +9 -0
- package/presets/opencode/php-hexagonal/team/README.md +17 -0
- package/presets/opencode/php-laravel/adapter-map.json +1 -1
- package/presets/opencode/php-laravel/agents/build-verifier.md +1 -1
- package/presets/opencode/php-laravel/agents/code-reviewer.md +1 -1
- package/presets/opencode/php-laravel/agents/debugger.md +1 -1
- package/presets/opencode/php-laravel/agents/feature-developer.md +1 -1
- package/presets/opencode/php-laravel/agents/qa-tester.md +1 -1
- package/presets/opencode/php-laravel/hooks/chain-team-phases.sh +2 -2
- package/presets/opencode/php-laravel/rules/agent-team-orchestrator.md +11 -2
- package/presets/opencode/php-laravel/rules/code-review-mr.md +9 -0
- package/presets/opencode/php-laravel/team/README.md +17 -0
- package/presets/opencode/svelte/adapter-map.json +1 -1
- package/presets/opencode/svelte/agents/build-verifier.md +1 -1
- package/presets/opencode/svelte/agents/code-reviewer.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/qa-tester.md +1 -1
- package/presets/opencode/svelte/hooks/chain-team-phases.sh +2 -2
- package/presets/opencode/svelte/rules/agent-team-orchestrator.md +11 -2
- package/presets/opencode/svelte/rules/code-review-mr.md +9 -0
- package/presets/opencode/svelte/team/README.md +17 -0
|
@@ -129,12 +129,21 @@ Each slug has one `artifact-manifest.json` at `.ai.local/team/tasks/<slug>/`. Th
|
|
|
129
129
|
|
|
130
130
|
- Read the manifest before broad prior-artifact discovery. Each step receives authoritative input entry IDs, owns named output entry IDs, and finishes with one terminal receipt linked to AC/task IDs.
|
|
131
131
|
- Markdown remains detailed evidence; the manifest points to authoritative paths and records producer, status, timestamps, outcome, and evidence paths.
|
|
132
|
-
- Agents upsert only the items they own in `manifest.artifacts[]` and preserve all foreign items in that array. Parallel agents use distinct IDs; the parent/
|
|
132
|
+
- Agents upsert only the items they own in `manifest.artifacts[]` and preserve all foreign items in that array. Parallel agents use distinct IDs. Every write is a whole-file merge through `node .ai.local/scripts/manifest.mjs upsert …` under `.manifest.lock` (see the installed `team/README.md` § artifact-manifest.json — write protocol); the parent does not need to serialize merges, and a fragment/replace edit of the JSON is forbidden. The top-level array key is `artifacts` — not `entries`; see `agent-artifact-contracts.md` for the schema callout.
|
|
133
133
|
- The orchestration runtime/hook is the single writer for `status.json` lifecycle fields and `metrics.json`. Agents read status for eligibility but never rewrite unrelated state, gate, retry, attempt, timestamp, or metrics fields.
|
|
134
134
|
- Missing/stale manifests are reported as a handoff gap; fall back to `brief.md`, `decomposition.md`, and `pipeline.json` rather than inventing authority.
|
|
135
135
|
|
|
136
|
-
##
|
|
136
|
+
## Out-of-band producer passes
|
|
137
|
+
|
|
138
|
+
A producer invoked outside `pipeline.json.steps` — a remediation pass after a reviewer finding, a manual fix, a re-run of one agent — is still a run artifact, not an informal turn.
|
|
137
139
|
|
|
140
|
+
- Record it as one `event:` line in `.memlog.md`: the trigger, the agent, the files touched, and the gate that was re-run.
|
|
141
|
+
- Upsert its receipt into `artifact-manifest.json` as its own owned entry, never folded into the previous step's entry, with `outcome` and `evidencePaths`.
|
|
142
|
+
- Do not invent an `attemptId` for it. An id the hook did not allocate cannot be reconciled by the metrics ledger; leave the receipt unbound and let the `.memlog.md` line carry the provenance.
|
|
143
|
+
- Re-run the affected gate (the step's `build-verifier` or the owned check) after the pass. An unverified pass is not a delivery.
|
|
144
|
+
- Prefer the routed path: a `changes_requested` receipt already re-dispatches the developer and keeps the ledger intact. Out-of-band work is the fallback, used when the finding arrives after the gate or comes from a human.
|
|
145
|
+
|
|
146
|
+
## Plan revision (replanning)
|
|
138
147
|
Replanning is a **named, auditable operation** — never a silent reorder. Trigger it when an evaluation oracle fails twice on the same task, when scope or requirements change, or when a previously unknown dependency/consumer is discovered. Procedure: append `decision: replan rev N → N+1` (with the reason) to `.memlog.md`, update `decomposition.md` (task add/remove or dependency change) and any optional plan fields, then **re-run the affected gate**. Scope-changing revisions return to the human gate.
|
|
139
148
|
|
|
140
149
|
## Context budget & checkpoint/resume
|
|
@@ -39,6 +39,15 @@ Procedure details live in skill `code-review`. Required shape:
|
|
|
39
39
|
- Vague («looks risky») is not a finding — cite evidence or ask for surrounding file context.
|
|
40
40
|
- End with a verdict on its own line: **`Safe to merge | needs changes | reject`**.
|
|
41
41
|
|
|
42
|
+
## Verdict and terminal receipt
|
|
43
|
+
|
|
44
|
+
The verdict and the receipt are the same decision expressed twice — never let a fixable defect hide behind "notes".
|
|
45
|
+
|
|
46
|
+
- Any `blocker` or `important` finding (a scale that names `high`/`medium` maps them here) means the MR is **not** mergeable as-is: emit receipt outcome `changes_requested` so the orchestrator runs its existing developer retry, not `completed`.
|
|
47
|
+
- Reserve a notes-only verdict for `nit`/informational items. Reporting a non-cosmetic fixable defect as a note converts it into unplanned out-of-band work and leaves it unrecorded in the run ledger.
|
|
48
|
+
- A divergence between the frozen spec/design and the shipped code is a finding, never a note: cite the spec line and the code line in the same finding.
|
|
49
|
+
- Before freezing a wire contract, confirm the stated behaviour against the repository's existing handler/decoder convention; a spec that contradicts the codebase convention is the same finding class.
|
|
50
|
+
|
|
42
51
|
## Stack notes
|
|
43
52
|
|
|
44
53
|
- Hexagonal boundaries: `architecture-boundaries`, `domain-layer`, ports vs adapters; Spring/JPA only at edges.
|
|
@@ -56,6 +56,23 @@ Bootstrap a slug by **writing** `pipeline.json` (editor Write tool). Do not `mkd
|
|
|
56
56
|
|
|
57
57
|
Prefer `phase: executing`. States: `in_progress`, `completed`, `awaiting_approval` (`/task-continue`), `changes_requested`, `validation_failed`, `blocked` (graph mode still dispatches independent ready steps), `awaiting_artifact_receipt`.
|
|
58
58
|
|
|
59
|
+
## artifact-manifest.json — write protocol
|
|
60
|
+
|
|
61
|
+
The manifest is a **whole-file merge target**. Producers rewrite it, and every write refreshes `updatedAt`, so a fragment/replace edit of the JSON fails its match and aborts the receipt. Merge by entry `id` and rewrite the file:
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
node .ai.local/scripts/manifest.mjs upsert --slug <slug> --id <id> --producer <agent> \
|
|
65
|
+
--outcome completed --paths brief.md,decomposition.md --acs AC-1 --tasks T1 --attempt <attemptId>
|
|
66
|
+
node .ai.local/scripts/manifest.mjs check --slug <slug>
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
- Absent file → `manifest.mjs init --slug <slug>` (the hook seeds the same skeleton).
|
|
70
|
+
- Never patch the JSON with a fragment/replace edit (`edit`, `str_replace`, `apply_patch`): a foreign parallel write or a refreshed `updatedAt` breaks the match, the produced artifact ends up without a receipt, and the step stalls in `awaiting_artifact_receipt`.
|
|
71
|
+
- Merge or parse error → re-read and merge again, at most twice, then report `blocked` with the error. Never leave the file truncated.
|
|
72
|
+
- Parallel wave → the writer holds `.manifest.lock` in the task directory, so concurrent producers serialize; a hand-written merge must take the same lock.
|
|
73
|
+
- Plan closure → tick (`- [ ]` → `- [x]`) every `tasks.md` row this receipt closes, in the same turn. An unticked row makes `openspec list` report stale progress and hides the exit criteria from the next agent.
|
|
74
|
+
- Schema and completion conventions: `agent-team/agent-artifact-contracts.md`.
|
|
75
|
+
|
|
59
76
|
## Commands
|
|
60
77
|
|
|
61
78
|
```bash
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"platform": "opencode",
|
|
4
4
|
"stack": "mcp-ts",
|
|
5
5
|
"semanticSource": "cursor/mcp-ts",
|
|
6
|
-
"sourceRevision": "
|
|
6
|
+
"sourceRevision": "c40648ba58e0501cc044c16e77b7c2819fa7a841136793aac3341cdc080ee038",
|
|
7
7
|
"entries": [
|
|
8
8
|
{
|
|
9
9
|
"source": "AGENTS.md",
|
|
@@ -75,4 +75,4 @@ A self-review defect that changes the output appends one `review-ledger.md` row
|
|
|
75
75
|
|
|
76
76
|
## Receipt binding
|
|
77
77
|
|
|
78
|
-
> **Receipt binding.** When writing the terminal receipt to `artifact-manifest.json`, set `entry.receipt.attemptId = <attemptId supplied by the orchestrator>` (the orchestrator provides this via `attemptId` on invocation). The hook at `chain-team-phases.sh:readBoundReceiptOutcome` rejects entries whose `attemptId` does not match the current attempt, or whose `Date.parse(timestamps.completedAt) < Date.parse(attemptStartedAt)`.
|
|
78
|
+
> **Receipt binding.** When writing the terminal receipt to `artifact-manifest.json`, set `entry.receipt.attemptId = <attemptId supplied by the orchestrator>` (the orchestrator provides this via `attemptId` on invocation). The hook at `chain-team-phases.sh:readBoundReceiptOutcome` rejects entries whose `attemptId` does not match the current attempt, or whose `Date.parse(timestamps.completedAt) < Date.parse(attemptStartedAt)`. A missing or stale attemptId causes `awaiting_artifact_receipt` stalls. Write the receipt as a whole-file merge — `node .ai.local/scripts/manifest.mjs upsert --slug <slug> --id <id> --producer <agent> --outcome <outcome> --attempt <attemptId> …` — and never patch the JSON with a fragment/replace edit: a foreign parallel write or a refreshed `updatedAt` breaks the match and aborts the receipt mid-task. If the merge or parse fails, re-read and merge again (at most twice), then report `blocked` with the error. <!-- shared-core: receipt-binding -->
|
|
@@ -138,4 +138,4 @@ Load requestable rule `mcp-usage` when verifying third-party library APIs (Conte
|
|
|
138
138
|
|
|
139
139
|
## Receipt binding
|
|
140
140
|
|
|
141
|
-
> **Receipt binding.** When writing the terminal receipt to `artifact-manifest.json`, set `entry.receipt.attemptId = <attemptId supplied by the orchestrator>` (the orchestrator provides this via `attemptId` on invocation). The hook at `chain-team-phases.sh:readBoundReceiptOutcome` rejects entries whose `attemptId` does not match the current attempt, or whose `Date.parse(timestamps.completedAt) < Date.parse(attemptStartedAt)`.
|
|
141
|
+
> **Receipt binding.** When writing the terminal receipt to `artifact-manifest.json`, set `entry.receipt.attemptId = <attemptId supplied by the orchestrator>` (the orchestrator provides this via `attemptId` on invocation). The hook at `chain-team-phases.sh:readBoundReceiptOutcome` rejects entries whose `attemptId` does not match the current attempt, or whose `Date.parse(timestamps.completedAt) < Date.parse(attemptStartedAt)`. A missing or stale attemptId causes `awaiting_artifact_receipt` stalls. Write the receipt as a whole-file merge — `node .ai.local/scripts/manifest.mjs upsert --slug <slug> --id <id> --producer <agent> --outcome <outcome> --attempt <attemptId> …` — and never patch the JSON with a fragment/replace edit: a foreign parallel write or a refreshed `updatedAt` breaks the match and aborts the receipt mid-task. If the merge or parse fails, re-read and merge again (at most twice), then report `blocked` with the error. <!-- shared-core: receipt-binding -->
|
|
@@ -730,9 +730,9 @@ function readBoundReceiptOutcome(agent, step, resolved) {
|
|
|
730
730
|
const seeded = writeSkeletonManifest(manifestPath);
|
|
731
731
|
const stepIndex = typeof resolved.entry.stepIndex === 'number' ? resolved.entry.stepIndex : 0;
|
|
732
732
|
if (seeded) {
|
|
733
|
-
return { outcome: null, receiptRequired: true, stallMessage: `[chain-team-phases] ${slug}: artifact-manifest.json is missing and the skeleton could not be written (${seeded}). Create .ai.local/
|
|
733
|
+
return { outcome: null, receiptRequired: true, stallMessage: `[chain-team-phases] ${slug}: artifact-manifest.json is missing and the skeleton could not be written (${seeded}). Create it with "node .ai.local/scripts/manifest.mjs init --slug ${slug}", then merge the receipt for artifactOutputId "${expectedOutputId}" with "node .ai.local/scripts/manifest.mjs upsert --slug ${slug} --id ${expectedOutputId} --producer ${agent} --outcome completed --paths <artifact>.md" (whole-file merge; never patch the JSON), then resume with: /task-continue ${slug}` };
|
|
734
734
|
}
|
|
735
|
-
return { outcome: null, receiptRequired: true, stallMessage: `[chain-team-phases] ${slug}: no artifact-manifest.json for step ${stepIndex} (${agent}). Wrote a skeleton {schemaVersion:1, slug, artifacts:[]}. Expected artifactOutputId "${expectedOutputId}". Write the artifact
|
|
735
|
+
return { outcome: null, receiptRequired: true, stallMessage: `[chain-team-phases] ${slug}: no artifact-manifest.json for step ${stepIndex} (${agent}). Wrote a skeleton {schemaVersion:1, slug, artifacts:[]}. Expected artifactOutputId "${expectedOutputId}". Write the artifact, then merge its receipt with "node .ai.local/scripts/manifest.mjs upsert --slug ${slug} --id ${expectedOutputId} --producer ${agent} --outcome completed --paths <artifact>.md" (whole-file merge; never patch the JSON), then resume with: /task-continue ${slug}` };
|
|
736
736
|
}
|
|
737
737
|
try {
|
|
738
738
|
const manifest = JSON.parse(fs.readFileSync(manifestPath, 'utf8'));
|
|
@@ -129,12 +129,21 @@ Each slug has one `artifact-manifest.json` at `.ai.local/team/tasks/<slug>/`. Th
|
|
|
129
129
|
|
|
130
130
|
- Read the manifest before broad prior-artifact discovery. Each step receives authoritative input entry IDs, owns named output entry IDs, and finishes with one terminal receipt linked to AC/task IDs.
|
|
131
131
|
- Markdown remains detailed evidence; the manifest points to authoritative paths and records producer, status, timestamps, outcome, and evidence paths.
|
|
132
|
-
- Agents upsert only the items they own in `manifest.artifacts[]` and preserve all foreign items in that array. Parallel agents use distinct IDs; the parent/
|
|
132
|
+
- Agents upsert only the items they own in `manifest.artifacts[]` and preserve all foreign items in that array. Parallel agents use distinct IDs. Every write is a whole-file merge through `node .ai.local/scripts/manifest.mjs upsert …` under `.manifest.lock` (see the installed `team/README.md` § artifact-manifest.json — write protocol); the parent does not need to serialize merges, and a fragment/replace edit of the JSON is forbidden. The top-level array key is `artifacts` — not `entries`; see `agent-artifact-contracts.md` for the schema callout.
|
|
133
133
|
- The orchestration runtime/hook is the single writer for `status.json` lifecycle fields and `metrics.json`. Agents read status for eligibility but never rewrite unrelated state, gate, retry, attempt, timestamp, or metrics fields.
|
|
134
134
|
- Missing/stale manifests are reported as a handoff gap; fall back to `brief.md`, `decomposition.md`, and `pipeline.json` rather than inventing authority.
|
|
135
135
|
|
|
136
|
-
##
|
|
136
|
+
## Out-of-band producer passes
|
|
137
|
+
|
|
138
|
+
A producer invoked outside `pipeline.json.steps` — a remediation pass after a reviewer finding, a manual fix, a re-run of one agent — is still a run artifact, not an informal turn.
|
|
137
139
|
|
|
140
|
+
- Record it as one `event:` line in `.memlog.md`: the trigger, the agent, the files touched, and the gate that was re-run.
|
|
141
|
+
- Upsert its receipt into `artifact-manifest.json` as its own owned entry, never folded into the previous step's entry, with `outcome` and `evidencePaths`.
|
|
142
|
+
- Do not invent an `attemptId` for it. An id the hook did not allocate cannot be reconciled by the metrics ledger; leave the receipt unbound and let the `.memlog.md` line carry the provenance.
|
|
143
|
+
- Re-run the affected gate (the step's `build-verifier` or the owned check) after the pass. An unverified pass is not a delivery.
|
|
144
|
+
- Prefer the routed path: a `changes_requested` receipt already re-dispatches the developer and keeps the ledger intact. Out-of-band work is the fallback, used when the finding arrives after the gate or comes from a human.
|
|
145
|
+
|
|
146
|
+
## Plan revision (replanning)
|
|
138
147
|
Replanning is a **named, auditable operation** — never a silent reorder. Trigger it when an evaluation oracle fails twice on the same task, when scope or requirements change, or when a previously unknown dependency/consumer is discovered. Procedure: append `decision: replan rev N → N+1` (with the reason) to `.memlog.md`, update `decomposition.md` (task add/remove or dependency change) and any optional plan fields, then **re-run the affected gate**. Scope-changing revisions return to the human gate.
|
|
139
148
|
|
|
140
149
|
## Context budget & checkpoint/resume
|
|
@@ -39,6 +39,15 @@ Procedure details live in skill `code-review`. Required shape:
|
|
|
39
39
|
- Vague («looks risky») is not a finding — cite evidence or ask for surrounding file context.
|
|
40
40
|
- End with a verdict on its own line: **`Safe to merge | needs changes | reject`**.
|
|
41
41
|
|
|
42
|
+
## Verdict and terminal receipt
|
|
43
|
+
|
|
44
|
+
The verdict and the receipt are the same decision expressed twice — never let a fixable defect hide behind "notes".
|
|
45
|
+
|
|
46
|
+
- Any `blocker` or `important` finding (a scale that names `high`/`medium` maps them here) means the MR is **not** mergeable as-is: emit receipt outcome `changes_requested` so the orchestrator runs its existing developer retry, not `completed`.
|
|
47
|
+
- Reserve a notes-only verdict for `nit`/informational items. Reporting a non-cosmetic fixable defect as a note converts it into unplanned out-of-band work and leaves it unrecorded in the run ledger.
|
|
48
|
+
- A divergence between the frozen spec/design and the shipped code is a finding, never a note: cite the spec line and the code line in the same finding.
|
|
49
|
+
- Before freezing a wire contract, confirm the stated behaviour against the repository's existing handler/decoder convention; a spec that contradicts the codebase convention is the same finding class.
|
|
50
|
+
|
|
42
51
|
## Stack notes
|
|
43
52
|
|
|
44
53
|
- Check MCP boundaries: registration vs handler vs capability; schema/contract stability; no secret leakage.
|
|
@@ -56,6 +56,23 @@ Bootstrap a slug by **writing** `pipeline.json` (editor Write tool). Do not `mkd
|
|
|
56
56
|
|
|
57
57
|
Prefer `phase: executing`. States: `in_progress`, `completed`, `awaiting_approval` (`/task-continue`), `changes_requested`, `validation_failed`, `blocked` (graph mode still dispatches independent ready steps), `awaiting_artifact_receipt`.
|
|
58
58
|
|
|
59
|
+
## artifact-manifest.json — write protocol
|
|
60
|
+
|
|
61
|
+
The manifest is a **whole-file merge target**. Producers rewrite it, and every write refreshes `updatedAt`, so a fragment/replace edit of the JSON fails its match and aborts the receipt. Merge by entry `id` and rewrite the file:
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
node .ai.local/scripts/manifest.mjs upsert --slug <slug> --id <id> --producer <agent> \
|
|
65
|
+
--outcome completed --paths brief.md,decomposition.md --acs AC-1 --tasks T1 --attempt <attemptId>
|
|
66
|
+
node .ai.local/scripts/manifest.mjs check --slug <slug>
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
- Absent file → `manifest.mjs init --slug <slug>` (the hook seeds the same skeleton).
|
|
70
|
+
- Never patch the JSON with a fragment/replace edit (`edit`, `str_replace`, `apply_patch`): a foreign parallel write or a refreshed `updatedAt` breaks the match, the produced artifact ends up without a receipt, and the step stalls in `awaiting_artifact_receipt`.
|
|
71
|
+
- Merge or parse error → re-read and merge again, at most twice, then report `blocked` with the error. Never leave the file truncated.
|
|
72
|
+
- Parallel wave → the writer holds `.manifest.lock` in the task directory, so concurrent producers serialize; a hand-written merge must take the same lock.
|
|
73
|
+
- Plan closure → tick (`- [ ]` → `- [x]`) every `tasks.md` row this receipt closes, in the same turn. An unticked row makes `openspec list` report stale progress and hides the exit criteria from the next agent.
|
|
74
|
+
- Schema and completion conventions: `agent-team/agent-artifact-contracts.md`.
|
|
75
|
+
|
|
59
76
|
## Commands
|
|
60
77
|
|
|
61
78
|
```bash
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"platform": "opencode",
|
|
4
4
|
"stack": "next",
|
|
5
5
|
"semanticSource": "cursor/next",
|
|
6
|
-
"sourceRevision": "
|
|
6
|
+
"sourceRevision": "18cc3e4d68fa2d1bd4173802cd2bce02d079159f19a434b91a83954d2eb4a829",
|
|
7
7
|
"entries": [
|
|
8
8
|
{
|
|
9
9
|
"source": "AGENTS.md",
|
|
@@ -114,7 +114,7 @@ Write the owned terminal receipt described under **Artifact contract**. If **FAI
|
|
|
114
114
|
|
|
115
115
|
Do not fix code — report only. Do not advance to code-reviewer until PASS.
|
|
116
116
|
|
|
117
|
-
**Receipt binding.** When writing the terminal receipt to `artifact-manifest.json`, set `entry.receipt.attemptId = <attemptId supplied by the orchestrator>` (the orchestrator provides this via `attemptId` on invocation). The hook at `chain-team-phases.sh:readBoundReceiptOutcome` rejects entries whose `attemptId` does not match the current attempt, or whose `Date.parse(timestamps.completedAt) < Date.parse(attemptStartedAt)`.
|
|
117
|
+
**Receipt binding.** When writing the terminal receipt to `artifact-manifest.json`, set `entry.receipt.attemptId = <attemptId supplied by the orchestrator>` (the orchestrator provides this via `attemptId` on invocation). The hook at `chain-team-phases.sh:readBoundReceiptOutcome` rejects entries whose `attemptId` does not match the current attempt, or whose `Date.parse(timestamps.completedAt) < Date.parse(attemptStartedAt)`. A missing or stale attemptId causes `awaiting_artifact_receipt` stalls. Write the receipt as a whole-file merge — `node .ai.local/scripts/manifest.mjs upsert --slug <slug> --id <id> --producer <agent> --outcome <outcome> --attempt <attemptId> …` — and never patch the JSON with a fragment/replace edit: a foreign parallel write or a refreshed `updatedAt` breaks the match and aborts the receipt mid-task. If the merge or parse fails, re-read and merge again (at most twice), then report `blocked` with the error. <!-- shared-core: receipt-binding -->
|
|
118
118
|
|
|
119
119
|
## Artifact contract
|
|
120
120
|
|
|
@@ -116,7 +116,7 @@ Write the owned terminal receipt described under **Artifact contract**. If **REQ
|
|
|
116
116
|
|
|
117
117
|
Do not mix this output with retrospective facilitation — keep review and retro separate.
|
|
118
118
|
|
|
119
|
-
**Receipt binding.** When writing the terminal receipt to `artifact-manifest.json`, set `entry.receipt.attemptId = <attemptId supplied by the orchestrator>` (the orchestrator provides this via `attemptId` on invocation). The hook at `chain-team-phases.sh:readBoundReceiptOutcome` rejects entries whose `attemptId` does not match the current attempt, or whose `Date.parse(timestamps.completedAt) < Date.parse(attemptStartedAt)`.
|
|
119
|
+
**Receipt binding.** When writing the terminal receipt to `artifact-manifest.json`, set `entry.receipt.attemptId = <attemptId supplied by the orchestrator>` (the orchestrator provides this via `attemptId` on invocation). The hook at `chain-team-phases.sh:readBoundReceiptOutcome` rejects entries whose `attemptId` does not match the current attempt, or whose `Date.parse(timestamps.completedAt) < Date.parse(attemptStartedAt)`. A missing or stale attemptId causes `awaiting_artifact_receipt` stalls. Write the receipt as a whole-file merge — `node .ai.local/scripts/manifest.mjs upsert --slug <slug> --id <id> --producer <agent> --outcome <outcome> --attempt <attemptId> …` — and never patch the JSON with a fragment/replace edit: a foreign parallel write or a refreshed `updatedAt` breaks the match and aborts the receipt mid-task. If the merge or parse fails, re-read and merge again (at most twice), then report `blocked` with the error. <!-- shared-core: receipt-binding -->
|
|
120
120
|
|
|
121
121
|
## Design guidance
|
|
122
122
|
|
|
@@ -140,4 +140,4 @@ Do not perform formal code review or write e2e plans — those are separate agen
|
|
|
140
140
|
|
|
141
141
|
## Receipt binding
|
|
142
142
|
|
|
143
|
-
> **Receipt binding.** When writing the terminal receipt to `artifact-manifest.json`, set `entry.receipt.attemptId = <attemptId supplied by the orchestrator>` (the orchestrator provides this via `attemptId` on invocation). The hook at `chain-team-phases.sh:readBoundReceiptOutcome` rejects entries whose `attemptId` does not match the current attempt, or whose `Date.parse(timestamps.completedAt) < Date.parse(attemptStartedAt)`.
|
|
143
|
+
> **Receipt binding.** When writing the terminal receipt to `artifact-manifest.json`, set `entry.receipt.attemptId = <attemptId supplied by the orchestrator>` (the orchestrator provides this via `attemptId` on invocation). The hook at `chain-team-phases.sh:readBoundReceiptOutcome` rejects entries whose `attemptId` does not match the current attempt, or whose `Date.parse(timestamps.completedAt) < Date.parse(attemptStartedAt)`. A missing or stale attemptId causes `awaiting_artifact_receipt` stalls. Write the receipt as a whole-file merge — `node .ai.local/scripts/manifest.mjs upsert --slug <slug> --id <id> --producer <agent> --outcome <outcome> --attempt <attemptId> …` — and never patch the JSON with a fragment/replace edit: a foreign parallel write or a refreshed `updatedAt` breaks the match and aborts the receipt mid-task. If the merge or parse fails, re-read and merge again (at most twice), then report `blocked` with the error. <!-- shared-core: receipt-binding -->
|
|
@@ -95,7 +95,7 @@ Emit the owned implementation receipt with outcome `completed`. Handoff: tasks d
|
|
|
95
95
|
|
|
96
96
|
Do not perform formal code review — that is the code-reviewer subagent's job.
|
|
97
97
|
|
|
98
|
-
**Receipt binding.** When writing the terminal receipt to `artifact-manifest.json`, set `entry.receipt.attemptId = <attemptId supplied by the orchestrator>` (the orchestrator provides this via `attemptId` on invocation). The hook at `chain-team-phases.sh:readBoundReceiptOutcome` rejects entries whose `attemptId` does not match the current attempt, or whose `Date.parse(timestamps.completedAt) < Date.parse(attemptStartedAt)`.
|
|
98
|
+
**Receipt binding.** When writing the terminal receipt to `artifact-manifest.json`, set `entry.receipt.attemptId = <attemptId supplied by the orchestrator>` (the orchestrator provides this via `attemptId` on invocation). The hook at `chain-team-phases.sh:readBoundReceiptOutcome` rejects entries whose `attemptId` does not match the current attempt, or whose `Date.parse(timestamps.completedAt) < Date.parse(attemptStartedAt)`. A missing or stale attemptId causes `awaiting_artifact_receipt` stalls. Write the receipt as a whole-file merge — `node .ai.local/scripts/manifest.mjs upsert --slug <slug> --id <id> --producer <agent> --outcome <outcome> --attempt <attemptId> …` — and never patch the JSON with a fragment/replace edit: a foreign parallel write or a refreshed `updatedAt` breaks the match and aborts the receipt mid-task. If the merge or parse fails, re-read and merge again (at most twice), then report `blocked` with the error. <!-- shared-core: receipt-binding -->
|
|
99
99
|
|
|
100
100
|
## Design guidance
|
|
101
101
|
|
|
@@ -85,4 +85,4 @@ Provide summary:
|
|
|
85
85
|
|
|
86
86
|
## Receipt binding
|
|
87
87
|
|
|
88
|
-
> **Receipt binding.** When writing the terminal receipt to `artifact-manifest.json`, set `entry.receipt.attemptId = <attemptId supplied by the orchestrator>` (the orchestrator provides this via `attemptId` on invocation). The hook at `chain-team-phases.sh:readBoundReceiptOutcome` rejects entries whose `attemptId` does not match the current attempt, or whose `Date.parse(timestamps.completedAt) < Date.parse(attemptStartedAt)`.
|
|
88
|
+
> **Receipt binding.** When writing the terminal receipt to `artifact-manifest.json`, set `entry.receipt.attemptId = <attemptId supplied by the orchestrator>` (the orchestrator provides this via `attemptId` on invocation). The hook at `chain-team-phases.sh:readBoundReceiptOutcome` rejects entries whose `attemptId` does not match the current attempt, or whose `Date.parse(timestamps.completedAt) < Date.parse(attemptStartedAt)`. A missing or stale attemptId causes `awaiting_artifact_receipt` stalls. Write the receipt as a whole-file merge — `node .ai.local/scripts/manifest.mjs upsert --slug <slug> --id <id> --producer <agent> --outcome <outcome> --attempt <attemptId> …` — and never patch the JSON with a fragment/replace edit: a foreign parallel write or a refreshed `updatedAt` breaks the match and aborts the receipt mid-task. If the merge or parse fails, re-read and merge again (at most twice), then report `blocked` with the error. <!-- shared-core: receipt-binding -->
|
|
@@ -63,6 +63,11 @@ Write `.ai.local/team/tasks/<slug>/security-review.md`:
|
|
|
63
63
|
## Verdict
|
|
64
64
|
PASS | PASS_WITH_NOTES | FAIL
|
|
65
65
|
|
|
66
|
+
`PASS_WITH_NOTES` is for `low`/informational findings only. A `medium`, `high` or
|
|
67
|
+
`blocker` finding makes the verdict `FAIL`, and `FAIL` emits receipt outcome
|
|
68
|
+
`changes_requested` so the orchestrator runs its existing developer retry — a
|
|
69
|
+
fixable non-cosmetic finding must never be filed as a note.
|
|
70
|
+
|
|
66
71
|
## Critical (must fix before merge)
|
|
67
72
|
- ...
|
|
68
73
|
|
|
@@ -743,9 +743,9 @@ function readBoundReceiptOutcome(agent, step, resolved) {
|
|
|
743
743
|
const seeded = writeSkeletonManifest(manifestPath);
|
|
744
744
|
const stepIndex = typeof resolved.entry.stepIndex === 'number' ? resolved.entry.stepIndex : 0;
|
|
745
745
|
if (seeded) {
|
|
746
|
-
return { outcome: null, receiptRequired: true, stallMessage: `[chain-team-phases] ${slug}: artifact-manifest.json is missing and the skeleton could not be written (${seeded}). Create .ai.local/
|
|
746
|
+
return { outcome: null, receiptRequired: true, stallMessage: `[chain-team-phases] ${slug}: artifact-manifest.json is missing and the skeleton could not be written (${seeded}). Create it with "node .ai.local/scripts/manifest.mjs init --slug ${slug}", then merge the receipt for artifactOutputId "${expectedOutputId}" with "node .ai.local/scripts/manifest.mjs upsert --slug ${slug} --id ${expectedOutputId} --producer ${agent} --outcome completed --paths <artifact>.md" (whole-file merge; never patch the JSON), then resume with: /task-continue ${slug}` };
|
|
747
747
|
}
|
|
748
|
-
return { outcome: null, receiptRequired: true, stallMessage: `[chain-team-phases] ${slug}: no artifact-manifest.json for step ${stepIndex} (${agent}). Wrote a skeleton {schemaVersion:1, slug, artifacts:[]}. Expected artifactOutputId "${expectedOutputId}". Write the artifact
|
|
748
|
+
return { outcome: null, receiptRequired: true, stallMessage: `[chain-team-phases] ${slug}: no artifact-manifest.json for step ${stepIndex} (${agent}). Wrote a skeleton {schemaVersion:1, slug, artifacts:[]}. Expected artifactOutputId "${expectedOutputId}". Write the artifact, then merge its receipt with "node .ai.local/scripts/manifest.mjs upsert --slug ${slug} --id ${expectedOutputId} --producer ${agent} --outcome completed --paths <artifact>.md" (whole-file merge; never patch the JSON), then resume with: /task-continue ${slug}` };
|
|
749
749
|
}
|
|
750
750
|
try {
|
|
751
751
|
const manifest = JSON.parse(fs.readFileSync(manifestPath, 'utf8'));
|
|
@@ -129,12 +129,21 @@ Each slug has one `artifact-manifest.json` at `.ai.local/team/tasks/<slug>/`. Th
|
|
|
129
129
|
|
|
130
130
|
- Read the manifest before broad prior-artifact discovery. Each step receives authoritative input entry IDs, owns named output entry IDs, and finishes with one terminal receipt linked to AC/task IDs.
|
|
131
131
|
- Markdown remains detailed evidence; the manifest points to authoritative paths and records producer, status, timestamps, outcome, and evidence paths.
|
|
132
|
-
- Agents upsert only the items they own in `manifest.artifacts[]` and preserve all foreign items in that array. Parallel agents use distinct IDs; the parent/
|
|
132
|
+
- Agents upsert only the items they own in `manifest.artifacts[]` and preserve all foreign items in that array. Parallel agents use distinct IDs. Every write is a whole-file merge through `node .ai.local/scripts/manifest.mjs upsert …` under `.manifest.lock` (see the installed `team/README.md` § artifact-manifest.json — write protocol); the parent does not need to serialize merges, and a fragment/replace edit of the JSON is forbidden. The top-level array key is `artifacts` — not `entries`; see `agent-artifact-contracts.md` for the schema callout.
|
|
133
133
|
- The orchestration runtime/hook is the single writer for `status.json` lifecycle fields and `metrics.json`. Agents read status for eligibility but never rewrite unrelated state, gate, retry, attempt, timestamp, or metrics fields.
|
|
134
134
|
- Missing/stale manifests are reported as a handoff gap; fall back to `brief.md`, `decomposition.md`, and `pipeline.json` rather than inventing authority.
|
|
135
135
|
|
|
136
|
-
##
|
|
136
|
+
## Out-of-band producer passes
|
|
137
|
+
|
|
138
|
+
A producer invoked outside `pipeline.json.steps` — a remediation pass after a reviewer finding, a manual fix, a re-run of one agent — is still a run artifact, not an informal turn.
|
|
137
139
|
|
|
140
|
+
- Record it as one `event:` line in `.memlog.md`: the trigger, the agent, the files touched, and the gate that was re-run.
|
|
141
|
+
- Upsert its receipt into `artifact-manifest.json` as its own owned entry, never folded into the previous step's entry, with `outcome` and `evidencePaths`.
|
|
142
|
+
- Do not invent an `attemptId` for it. An id the hook did not allocate cannot be reconciled by the metrics ledger; leave the receipt unbound and let the `.memlog.md` line carry the provenance.
|
|
143
|
+
- Re-run the affected gate (the step's `build-verifier` or the owned check) after the pass. An unverified pass is not a delivery.
|
|
144
|
+
- Prefer the routed path: a `changes_requested` receipt already re-dispatches the developer and keeps the ledger intact. Out-of-band work is the fallback, used when the finding arrives after the gate or comes from a human.
|
|
145
|
+
|
|
146
|
+
## Plan revision (replanning)
|
|
138
147
|
Replanning is a **named, auditable operation** — never a silent reorder. Trigger it when an evaluation oracle fails twice on the same task, when scope or requirements change, or when a previously unknown dependency/consumer is discovered. Procedure: append `decision: replan rev N → N+1` (with the reason) to `.memlog.md`, update `decomposition.md` (task add/remove or dependency change) and any optional plan fields, then **re-run the affected gate**. Scope-changing revisions return to the human gate.
|
|
139
148
|
|
|
140
149
|
## Context budget & checkpoint/resume
|
|
@@ -39,6 +39,15 @@ Procedure details live in skill `code-review`. Required shape:
|
|
|
39
39
|
- Vague («looks risky») is not a finding — cite evidence or ask for surrounding file context.
|
|
40
40
|
- End with a verdict on its own line: **`Safe to merge | needs changes | reject`**.
|
|
41
41
|
|
|
42
|
+
## Verdict and terminal receipt
|
|
43
|
+
|
|
44
|
+
The verdict and the receipt are the same decision expressed twice — never let a fixable defect hide behind "notes".
|
|
45
|
+
|
|
46
|
+
- Any `blocker` or `important` finding (a scale that names `high`/`medium` maps them here) means the MR is **not** mergeable as-is: emit receipt outcome `changes_requested` so the orchestrator runs its existing developer retry, not `completed`.
|
|
47
|
+
- Reserve a notes-only verdict for `nit`/informational items. Reporting a non-cosmetic fixable defect as a note converts it into unplanned out-of-band work and leaves it unrecorded in the run ledger.
|
|
48
|
+
- A divergence between the frozen spec/design and the shipped code is a finding, never a note: cite the spec line and the code line in the same finding.
|
|
49
|
+
- Before freezing a wire contract, confirm the stated behaviour against the repository's existing handler/decoder convention; a spec that contradicts the codebase convention is the same finding class.
|
|
50
|
+
|
|
42
51
|
## Stack notes
|
|
43
52
|
|
|
44
53
|
On-demand rule for review flows. **Procedure and output format:** skill `code-review`.
|
|
@@ -57,6 +57,23 @@ Bootstrap a slug by **writing** `pipeline.json` (editor Write tool). Do not `mkd
|
|
|
57
57
|
|
|
58
58
|
Prefer `phase: executing`. States: `in_progress`, `completed`, `awaiting_approval` (`/task-continue`), `changes_requested`, `validation_failed`, `blocked` (graph mode still dispatches independent ready steps), `awaiting_artifact_receipt`.
|
|
59
59
|
|
|
60
|
+
## artifact-manifest.json — write protocol
|
|
61
|
+
|
|
62
|
+
The manifest is a **whole-file merge target**. Producers rewrite it, and every write refreshes `updatedAt`, so a fragment/replace edit of the JSON fails its match and aborts the receipt. Merge by entry `id` and rewrite the file:
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
node .ai.local/scripts/manifest.mjs upsert --slug <slug> --id <id> --producer <agent> \
|
|
66
|
+
--outcome completed --paths brief.md,decomposition.md --acs AC-1 --tasks T1 --attempt <attemptId>
|
|
67
|
+
node .ai.local/scripts/manifest.mjs check --slug <slug>
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
- Absent file → `manifest.mjs init --slug <slug>` (the hook seeds the same skeleton).
|
|
71
|
+
- Never patch the JSON with a fragment/replace edit (`edit`, `str_replace`, `apply_patch`): a foreign parallel write or a refreshed `updatedAt` breaks the match, the produced artifact ends up without a receipt, and the step stalls in `awaiting_artifact_receipt`.
|
|
72
|
+
- Merge or parse error → re-read and merge again, at most twice, then report `blocked` with the error. Never leave the file truncated.
|
|
73
|
+
- Parallel wave → the writer holds `.manifest.lock` in the task directory, so concurrent producers serialize; a hand-written merge must take the same lock.
|
|
74
|
+
- Plan closure → tick (`- [ ]` → `- [x]`) every `tasks.md` row this receipt closes, in the same turn. An unticked row makes `openspec list` report stale progress and hides the exit criteria from the next agent.
|
|
75
|
+
- Schema and completion conventions: `agent-team/agent-artifact-contracts.md`.
|
|
76
|
+
|
|
60
77
|
## Commands
|
|
61
78
|
|
|
62
79
|
```bash
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"platform": "opencode",
|
|
4
4
|
"stack": "nuxt",
|
|
5
5
|
"semanticSource": "cursor/nuxt",
|
|
6
|
-
"sourceRevision": "
|
|
6
|
+
"sourceRevision": "421f616cc96404b752c6b243f7c730da9768e9fdd036000761743201cfee749f",
|
|
7
7
|
"entries": [
|
|
8
8
|
{
|
|
9
9
|
"source": "AGENTS.md",
|
|
@@ -101,7 +101,7 @@ Write the owned terminal receipt described under **Artifact contract**. If **FAI
|
|
|
101
101
|
|
|
102
102
|
Do not fix code — report only. Do not advance to code-reviewer until PASS.
|
|
103
103
|
|
|
104
|
-
**Receipt binding.** When writing the terminal receipt to `artifact-manifest.json`, set `entry.receipt.attemptId = <attemptId supplied by the orchestrator>` (the orchestrator provides this via `attemptId` on invocation). The hook at `chain-team-phases.sh:readBoundReceiptOutcome` rejects entries whose `attemptId` does not match the current attempt, or whose `Date.parse(timestamps.completedAt) < Date.parse(attemptStartedAt)`.
|
|
104
|
+
**Receipt binding.** When writing the terminal receipt to `artifact-manifest.json`, set `entry.receipt.attemptId = <attemptId supplied by the orchestrator>` (the orchestrator provides this via `attemptId` on invocation). The hook at `chain-team-phases.sh:readBoundReceiptOutcome` rejects entries whose `attemptId` does not match the current attempt, or whose `Date.parse(timestamps.completedAt) < Date.parse(attemptStartedAt)`. A missing or stale attemptId causes `awaiting_artifact_receipt` stalls. Write the receipt as a whole-file merge — `node .ai.local/scripts/manifest.mjs upsert --slug <slug> --id <id> --producer <agent> --outcome <outcome> --attempt <attemptId> …` — and never patch the JSON with a fragment/replace edit: a foreign parallel write or a refreshed `updatedAt` breaks the match and aborts the receipt mid-task. If the merge or parse fails, re-read and merge again (at most twice), then report `blocked` with the error. <!-- shared-core: receipt-binding -->
|
|
105
105
|
|
|
106
106
|
## Artifact contract
|
|
107
107
|
|
|
@@ -100,7 +100,7 @@ Write the owned terminal receipt described under **Artifact contract**. If **REQ
|
|
|
100
100
|
|
|
101
101
|
Do not mix this output with retrospective facilitation — keep review and retro separate.
|
|
102
102
|
|
|
103
|
-
**Receipt binding.** When writing the terminal receipt to `artifact-manifest.json`, set `entry.receipt.attemptId = <attemptId supplied by the orchestrator>` (the orchestrator provides this via `attemptId` on invocation). The hook at `chain-team-phases.sh:readBoundReceiptOutcome` rejects entries whose `attemptId` does not match the current attempt, or whose `Date.parse(timestamps.completedAt) < Date.parse(attemptStartedAt)`.
|
|
103
|
+
**Receipt binding.** When writing the terminal receipt to `artifact-manifest.json`, set `entry.receipt.attemptId = <attemptId supplied by the orchestrator>` (the orchestrator provides this via `attemptId` on invocation). The hook at `chain-team-phases.sh:readBoundReceiptOutcome` rejects entries whose `attemptId` does not match the current attempt, or whose `Date.parse(timestamps.completedAt) < Date.parse(attemptStartedAt)`. A missing or stale attemptId causes `awaiting_artifact_receipt` stalls. Write the receipt as a whole-file merge — `node .ai.local/scripts/manifest.mjs upsert --slug <slug> --id <id> --producer <agent> --outcome <outcome> --attempt <attemptId> …` — and never patch the JSON with a fragment/replace edit: a foreign parallel write or a refreshed `updatedAt` breaks the match and aborts the receipt mid-task. If the merge or parse fails, re-read and merge again (at most twice), then report `blocked` with the error. <!-- shared-core: receipt-binding -->
|
|
104
104
|
|
|
105
105
|
## Design guidance
|
|
106
106
|
|
|
@@ -140,4 +140,4 @@ Do not perform formal code review or write e2e plans — those are separate agen
|
|
|
140
140
|
|
|
141
141
|
## Receipt binding
|
|
142
142
|
|
|
143
|
-
> **Receipt binding.** When writing the terminal receipt to `artifact-manifest.json`, set `entry.receipt.attemptId = <attemptId supplied by the orchestrator>` (the orchestrator provides this via `attemptId` on invocation). The hook at `chain-team-phases.sh:readBoundReceiptOutcome` rejects entries whose `attemptId` does not match the current attempt, or whose `Date.parse(timestamps.completedAt) < Date.parse(attemptStartedAt)`.
|
|
143
|
+
> **Receipt binding.** When writing the terminal receipt to `artifact-manifest.json`, set `entry.receipt.attemptId = <attemptId supplied by the orchestrator>` (the orchestrator provides this via `attemptId` on invocation). The hook at `chain-team-phases.sh:readBoundReceiptOutcome` rejects entries whose `attemptId` does not match the current attempt, or whose `Date.parse(timestamps.completedAt) < Date.parse(attemptStartedAt)`. A missing or stale attemptId causes `awaiting_artifact_receipt` stalls. Write the receipt as a whole-file merge — `node .ai.local/scripts/manifest.mjs upsert --slug <slug> --id <id> --producer <agent> --outcome <outcome> --attempt <attemptId> …` — and never patch the JSON with a fragment/replace edit: a foreign parallel write or a refreshed `updatedAt` breaks the match and aborts the receipt mid-task. If the merge or parse fails, re-read and merge again (at most twice), then report `blocked` with the error. <!-- shared-core: receipt-binding -->
|
|
@@ -83,7 +83,7 @@ Emit the owned implementation receipt with outcome `completed`. Handoff: tasks d
|
|
|
83
83
|
|
|
84
84
|
Do not perform formal code review — that is the code-reviewer subagent's job.
|
|
85
85
|
|
|
86
|
-
**Receipt binding.** When writing the terminal receipt to `artifact-manifest.json`, set `entry.receipt.attemptId = <attemptId supplied by the orchestrator>` (the orchestrator provides this via `attemptId` on invocation). The hook at `chain-team-phases.sh:readBoundReceiptOutcome` rejects entries whose `attemptId` does not match the current attempt, or whose `Date.parse(timestamps.completedAt) < Date.parse(attemptStartedAt)`.
|
|
86
|
+
**Receipt binding.** When writing the terminal receipt to `artifact-manifest.json`, set `entry.receipt.attemptId = <attemptId supplied by the orchestrator>` (the orchestrator provides this via `attemptId` on invocation). The hook at `chain-team-phases.sh:readBoundReceiptOutcome` rejects entries whose `attemptId` does not match the current attempt, or whose `Date.parse(timestamps.completedAt) < Date.parse(attemptStartedAt)`. A missing or stale attemptId causes `awaiting_artifact_receipt` stalls. Write the receipt as a whole-file merge — `node .ai.local/scripts/manifest.mjs upsert --slug <slug> --id <id> --producer <agent> --outcome <outcome> --attempt <attemptId> …` — and never patch the JSON with a fragment/replace edit: a foreign parallel write or a refreshed `updatedAt` breaks the match and aborts the receipt mid-task. If the merge or parse fails, re-read and merge again (at most twice), then report `blocked` with the error. <!-- shared-core: receipt-binding -->
|
|
87
87
|
|
|
88
88
|
## Design guidance
|
|
89
89
|
|
|
@@ -85,4 +85,4 @@ Provide summary:
|
|
|
85
85
|
|
|
86
86
|
## Receipt binding
|
|
87
87
|
|
|
88
|
-
> **Receipt binding.** When writing the terminal receipt to `artifact-manifest.json`, set `entry.receipt.attemptId = <attemptId supplied by the orchestrator>` (the orchestrator provides this via `attemptId` on invocation). The hook at `chain-team-phases.sh:readBoundReceiptOutcome` rejects entries whose `attemptId` does not match the current attempt, or whose `Date.parse(timestamps.completedAt) < Date.parse(attemptStartedAt)`.
|
|
88
|
+
> **Receipt binding.** When writing the terminal receipt to `artifact-manifest.json`, set `entry.receipt.attemptId = <attemptId supplied by the orchestrator>` (the orchestrator provides this via `attemptId` on invocation). The hook at `chain-team-phases.sh:readBoundReceiptOutcome` rejects entries whose `attemptId` does not match the current attempt, or whose `Date.parse(timestamps.completedAt) < Date.parse(attemptStartedAt)`. A missing or stale attemptId causes `awaiting_artifact_receipt` stalls. Write the receipt as a whole-file merge — `node .ai.local/scripts/manifest.mjs upsert --slug <slug> --id <id> --producer <agent> --outcome <outcome> --attempt <attemptId> …` — and never patch the JSON with a fragment/replace edit: a foreign parallel write or a refreshed `updatedAt` breaks the match and aborts the receipt mid-task. If the merge or parse fails, re-read and merge again (at most twice), then report `blocked` with the error. <!-- shared-core: receipt-binding -->
|
|
@@ -743,9 +743,9 @@ function readBoundReceiptOutcome(agent, step, resolved) {
|
|
|
743
743
|
const seeded = writeSkeletonManifest(manifestPath);
|
|
744
744
|
const stepIndex = typeof resolved.entry.stepIndex === 'number' ? resolved.entry.stepIndex : 0;
|
|
745
745
|
if (seeded) {
|
|
746
|
-
return { outcome: null, receiptRequired: true, stallMessage: `[chain-team-phases] ${slug}: artifact-manifest.json is missing and the skeleton could not be written (${seeded}). Create .ai.local/
|
|
746
|
+
return { outcome: null, receiptRequired: true, stallMessage: `[chain-team-phases] ${slug}: artifact-manifest.json is missing and the skeleton could not be written (${seeded}). Create it with "node .ai.local/scripts/manifest.mjs init --slug ${slug}", then merge the receipt for artifactOutputId "${expectedOutputId}" with "node .ai.local/scripts/manifest.mjs upsert --slug ${slug} --id ${expectedOutputId} --producer ${agent} --outcome completed --paths <artifact>.md" (whole-file merge; never patch the JSON), then resume with: /task-continue ${slug}` };
|
|
747
747
|
}
|
|
748
|
-
return { outcome: null, receiptRequired: true, stallMessage: `[chain-team-phases] ${slug}: no artifact-manifest.json for step ${stepIndex} (${agent}). Wrote a skeleton {schemaVersion:1, slug, artifacts:[]}. Expected artifactOutputId "${expectedOutputId}". Write the artifact
|
|
748
|
+
return { outcome: null, receiptRequired: true, stallMessage: `[chain-team-phases] ${slug}: no artifact-manifest.json for step ${stepIndex} (${agent}). Wrote a skeleton {schemaVersion:1, slug, artifacts:[]}. Expected artifactOutputId "${expectedOutputId}". Write the artifact, then merge its receipt with "node .ai.local/scripts/manifest.mjs upsert --slug ${slug} --id ${expectedOutputId} --producer ${agent} --outcome completed --paths <artifact>.md" (whole-file merge; never patch the JSON), then resume with: /task-continue ${slug}` };
|
|
749
749
|
}
|
|
750
750
|
try {
|
|
751
751
|
const manifest = JSON.parse(fs.readFileSync(manifestPath, 'utf8'));
|
|
@@ -129,12 +129,21 @@ Each slug has one `artifact-manifest.json` at `.ai.local/team/tasks/<slug>/`. Th
|
|
|
129
129
|
|
|
130
130
|
- Read the manifest before broad prior-artifact discovery. Each step receives authoritative input entry IDs, owns named output entry IDs, and finishes with one terminal receipt linked to AC/task IDs.
|
|
131
131
|
- Markdown remains detailed evidence; the manifest points to authoritative paths and records producer, status, timestamps, outcome, and evidence paths.
|
|
132
|
-
- Agents upsert only the items they own in `manifest.artifacts[]` and preserve all foreign items in that array. Parallel agents use distinct IDs; the parent/
|
|
132
|
+
- Agents upsert only the items they own in `manifest.artifacts[]` and preserve all foreign items in that array. Parallel agents use distinct IDs. Every write is a whole-file merge through `node .ai.local/scripts/manifest.mjs upsert …` under `.manifest.lock` (see the installed `team/README.md` § artifact-manifest.json — write protocol); the parent does not need to serialize merges, and a fragment/replace edit of the JSON is forbidden. The top-level array key is `artifacts` — not `entries`; see `agent-artifact-contracts.md` for the schema callout.
|
|
133
133
|
- The orchestration runtime/hook is the single writer for `status.json` lifecycle fields and `metrics.json`. Agents read status for eligibility but never rewrite unrelated state, gate, retry, attempt, timestamp, or metrics fields.
|
|
134
134
|
- Missing/stale manifests are reported as a handoff gap; fall back to `brief.md`, `decomposition.md`, and `pipeline.json` rather than inventing authority.
|
|
135
135
|
|
|
136
|
-
##
|
|
136
|
+
## Out-of-band producer passes
|
|
137
|
+
|
|
138
|
+
A producer invoked outside `pipeline.json.steps` — a remediation pass after a reviewer finding, a manual fix, a re-run of one agent — is still a run artifact, not an informal turn.
|
|
137
139
|
|
|
140
|
+
- Record it as one `event:` line in `.memlog.md`: the trigger, the agent, the files touched, and the gate that was re-run.
|
|
141
|
+
- Upsert its receipt into `artifact-manifest.json` as its own owned entry, never folded into the previous step's entry, with `outcome` and `evidencePaths`.
|
|
142
|
+
- Do not invent an `attemptId` for it. An id the hook did not allocate cannot be reconciled by the metrics ledger; leave the receipt unbound and let the `.memlog.md` line carry the provenance.
|
|
143
|
+
- Re-run the affected gate (the step's `build-verifier` or the owned check) after the pass. An unverified pass is not a delivery.
|
|
144
|
+
- Prefer the routed path: a `changes_requested` receipt already re-dispatches the developer and keeps the ledger intact. Out-of-band work is the fallback, used when the finding arrives after the gate or comes from a human.
|
|
145
|
+
|
|
146
|
+
## Plan revision (replanning)
|
|
138
147
|
Replanning is a **named, auditable operation** — never a silent reorder. Trigger it when an evaluation oracle fails twice on the same task, when scope or requirements change, or when a previously unknown dependency/consumer is discovered. Procedure: append `decision: replan rev N → N+1` (with the reason) to `.memlog.md`, update `decomposition.md` (task add/remove or dependency change) and any optional plan fields, then **re-run the affected gate**. Scope-changing revisions return to the human gate.
|
|
139
148
|
|
|
140
149
|
## Context budget & checkpoint/resume
|
|
@@ -39,6 +39,15 @@ Procedure details live in skill `code-review`. Required shape:
|
|
|
39
39
|
- Vague («looks risky») is not a finding — cite evidence or ask for surrounding file context.
|
|
40
40
|
- End with a verdict on its own line: **`Safe to merge | needs changes | reject`**.
|
|
41
41
|
|
|
42
|
+
## Verdict and terminal receipt
|
|
43
|
+
|
|
44
|
+
The verdict and the receipt are the same decision expressed twice — never let a fixable defect hide behind "notes".
|
|
45
|
+
|
|
46
|
+
- Any `blocker` or `important` finding (a scale that names `high`/`medium` maps them here) means the MR is **not** mergeable as-is: emit receipt outcome `changes_requested` so the orchestrator runs its existing developer retry, not `completed`.
|
|
47
|
+
- Reserve a notes-only verdict for `nit`/informational items. Reporting a non-cosmetic fixable defect as a note converts it into unplanned out-of-band work and leaves it unrecorded in the run ledger.
|
|
48
|
+
- A divergence between the frozen spec/design and the shipped code is a finding, never a note: cite the spec line and the code line in the same finding.
|
|
49
|
+
- Before freezing a wire contract, confirm the stated behaviour against the repository's existing handler/decoder convention; a spec that contradicts the codebase convention is the same finding class.
|
|
50
|
+
|
|
42
51
|
## Stack notes
|
|
43
52
|
|
|
44
53
|
On-demand rule for review flows. **Procedure and output format:** skill `code-review`.
|
|
@@ -56,6 +56,23 @@ Bootstrap a slug by **writing** `pipeline.json` (editor Write tool). Do not `mkd
|
|
|
56
56
|
|
|
57
57
|
Prefer `phase: executing`. States: `in_progress`, `completed`, `awaiting_approval` (`/task-continue`), `changes_requested`, `validation_failed`, `blocked` (graph mode still dispatches independent ready steps), `awaiting_artifact_receipt`.
|
|
58
58
|
|
|
59
|
+
## artifact-manifest.json — write protocol
|
|
60
|
+
|
|
61
|
+
The manifest is a **whole-file merge target**. Producers rewrite it, and every write refreshes `updatedAt`, so a fragment/replace edit of the JSON fails its match and aborts the receipt. Merge by entry `id` and rewrite the file:
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
node .ai.local/scripts/manifest.mjs upsert --slug <slug> --id <id> --producer <agent> \
|
|
65
|
+
--outcome completed --paths brief.md,decomposition.md --acs AC-1 --tasks T1 --attempt <attemptId>
|
|
66
|
+
node .ai.local/scripts/manifest.mjs check --slug <slug>
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
- Absent file → `manifest.mjs init --slug <slug>` (the hook seeds the same skeleton).
|
|
70
|
+
- Never patch the JSON with a fragment/replace edit (`edit`, `str_replace`, `apply_patch`): a foreign parallel write or a refreshed `updatedAt` breaks the match, the produced artifact ends up without a receipt, and the step stalls in `awaiting_artifact_receipt`.
|
|
71
|
+
- Merge or parse error → re-read and merge again, at most twice, then report `blocked` with the error. Never leave the file truncated.
|
|
72
|
+
- Parallel wave → the writer holds `.manifest.lock` in the task directory, so concurrent producers serialize; a hand-written merge must take the same lock.
|
|
73
|
+
- Plan closure → tick (`- [ ]` → `- [x]`) every `tasks.md` row this receipt closes, in the same turn. An unticked row makes `openspec list` report stale progress and hides the exit criteria from the next agent.
|
|
74
|
+
- Schema and completion conventions: `agent-team/agent-artifact-contracts.md`.
|
|
75
|
+
|
|
59
76
|
## Commands
|
|
60
77
|
|
|
61
78
|
```bash
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"platform": "opencode",
|
|
4
4
|
"stack": "php-hexagonal",
|
|
5
5
|
"semanticSource": "cursor/php-hexagonal",
|
|
6
|
-
"sourceRevision": "
|
|
6
|
+
"sourceRevision": "e118efe3bf2de7e776e8722eea91adc3949fdf1b8da97e437dd637828db5af95",
|
|
7
7
|
"entries": [
|
|
8
8
|
{
|
|
9
9
|
"source": "AGENTS.md",
|
|
@@ -74,4 +74,4 @@ A self-review defect that changes the output appends one `review-ledger.md` row
|
|
|
74
74
|
|
|
75
75
|
## Receipt binding
|
|
76
76
|
|
|
77
|
-
> **Receipt binding.** When writing the terminal receipt to `artifact-manifest.json`, set `entry.receipt.attemptId = <attemptId supplied by the orchestrator>` (the orchestrator provides this via `attemptId` on invocation). The hook at `chain-team-phases.sh:readBoundReceiptOutcome` rejects entries whose `attemptId` does not match the current attempt, or whose `Date.parse(timestamps.completedAt) < Date.parse(attemptStartedAt)`.
|
|
77
|
+
> **Receipt binding.** When writing the terminal receipt to `artifact-manifest.json`, set `entry.receipt.attemptId = <attemptId supplied by the orchestrator>` (the orchestrator provides this via `attemptId` on invocation). The hook at `chain-team-phases.sh:readBoundReceiptOutcome` rejects entries whose `attemptId` does not match the current attempt, or whose `Date.parse(timestamps.completedAt) < Date.parse(attemptStartedAt)`. A missing or stale attemptId causes `awaiting_artifact_receipt` stalls. Write the receipt as a whole-file merge — `node .ai.local/scripts/manifest.mjs upsert --slug <slug> --id <id> --producer <agent> --outcome <outcome> --attempt <attemptId> …` — and never patch the JSON with a fragment/replace edit: a foreign parallel write or a refreshed `updatedAt` breaks the match and aborts the receipt mid-task. If the merge or parse fails, re-read and merge again (at most twice), then report `blocked` with the error. <!-- shared-core: receipt-binding -->
|
|
@@ -95,4 +95,4 @@ Write `.ai.local/team/tasks/<slug>/review.md` with verdict APPROVE | REQUEST_CHA
|
|
|
95
95
|
|
|
96
96
|
## Receipt binding
|
|
97
97
|
|
|
98
|
-
> **Receipt binding.** When writing the terminal receipt to `artifact-manifest.json`, set `entry.receipt.attemptId = <attemptId supplied by the orchestrator>` (the orchestrator provides this via `attemptId` on invocation). The hook at `chain-team-phases.sh:readBoundReceiptOutcome` rejects entries whose `attemptId` does not match the current attempt, or whose `Date.parse(timestamps.completedAt) < Date.parse(attemptStartedAt)`.
|
|
98
|
+
> **Receipt binding.** When writing the terminal receipt to `artifact-manifest.json`, set `entry.receipt.attemptId = <attemptId supplied by the orchestrator>` (the orchestrator provides this via `attemptId` on invocation). The hook at `chain-team-phases.sh:readBoundReceiptOutcome` rejects entries whose `attemptId` does not match the current attempt, or whose `Date.parse(timestamps.completedAt) < Date.parse(attemptStartedAt)`. A missing or stale attemptId causes `awaiting_artifact_receipt` stalls. Write the receipt as a whole-file merge — `node .ai.local/scripts/manifest.mjs upsert --slug <slug> --id <id> --producer <agent> --outcome <outcome> --attempt <attemptId> …` — and never patch the JSON with a fragment/replace edit: a foreign parallel write or a refreshed `updatedAt` breaks the match and aborts the receipt mid-task. If the merge or parse fails, re-read and merge again (at most twice), then report `blocked` with the error. <!-- shared-core: receipt-binding -->
|
|
@@ -98,4 +98,4 @@ If a Sentry/Datadog (or similar) MCP is ready and the task is a production error
|
|
|
98
98
|
|
|
99
99
|
## Receipt binding
|
|
100
100
|
|
|
101
|
-
> **Receipt binding.** When writing the terminal receipt to `artifact-manifest.json`, set `entry.receipt.attemptId = <attemptId supplied by the orchestrator>` (the orchestrator provides this via `attemptId` on invocation). The hook at `chain-team-phases.sh:readBoundReceiptOutcome` rejects entries whose `attemptId` does not match the current attempt, or whose `Date.parse(timestamps.completedAt) < Date.parse(attemptStartedAt)`.
|
|
101
|
+
> **Receipt binding.** When writing the terminal receipt to `artifact-manifest.json`, set `entry.receipt.attemptId = <attemptId supplied by the orchestrator>` (the orchestrator provides this via `attemptId` on invocation). The hook at `chain-team-phases.sh:readBoundReceiptOutcome` rejects entries whose `attemptId` does not match the current attempt, or whose `Date.parse(timestamps.completedAt) < Date.parse(attemptStartedAt)`. A missing or stale attemptId causes `awaiting_artifact_receipt` stalls. Write the receipt as a whole-file merge — `node .ai.local/scripts/manifest.mjs upsert --slug <slug> --id <id> --producer <agent> --outcome <outcome> --attempt <attemptId> …` — and never patch the JSON with a fragment/replace edit: a foreign parallel write or a refreshed `updatedAt` breaks the match and aborts the receipt mid-task. If the merge or parse fails, re-read and merge again (at most twice), then report `blocked` with the error. <!-- shared-core: receipt-binding -->
|
|
@@ -144,4 +144,4 @@ Load requestable rule `mcp-usage` when verifying third-party library APIs (Conte
|
|
|
144
144
|
|
|
145
145
|
## Receipt binding
|
|
146
146
|
|
|
147
|
-
> **Receipt binding.** When writing the terminal receipt to `artifact-manifest.json`, set `entry.receipt.attemptId = <attemptId supplied by the orchestrator>` (the orchestrator provides this via `attemptId` on invocation). The hook at `chain-team-phases.sh:readBoundReceiptOutcome` rejects entries whose `attemptId` does not match the current attempt, or whose `Date.parse(timestamps.completedAt) < Date.parse(attemptStartedAt)`.
|
|
147
|
+
> **Receipt binding.** When writing the terminal receipt to `artifact-manifest.json`, set `entry.receipt.attemptId = <attemptId supplied by the orchestrator>` (the orchestrator provides this via `attemptId` on invocation). The hook at `chain-team-phases.sh:readBoundReceiptOutcome` rejects entries whose `attemptId` does not match the current attempt, or whose `Date.parse(timestamps.completedAt) < Date.parse(attemptStartedAt)`. A missing or stale attemptId causes `awaiting_artifact_receipt` stalls. Write the receipt as a whole-file merge — `node .ai.local/scripts/manifest.mjs upsert --slug <slug> --id <id> --producer <agent> --outcome <outcome> --attempt <attemptId> …` — and never patch the JSON with a fragment/replace edit: a foreign parallel write or a refreshed `updatedAt` breaks the match and aborts the receipt mid-task. If the merge or parse fails, re-read and merge again (at most twice), then report `blocked` with the error. <!-- shared-core: receipt-binding -->
|
|
@@ -53,4 +53,4 @@ Coordinate with existing plans under `.ai.local/team/tasks/<slug>/`.
|
|
|
53
53
|
|
|
54
54
|
## Receipt binding
|
|
55
55
|
|
|
56
|
-
> **Receipt binding.** When writing the terminal receipt to `artifact-manifest.json`, set `entry.receipt.attemptId = <attemptId supplied by the orchestrator>` (the orchestrator provides this via `attemptId` on invocation). The hook at `chain-team-phases.sh:readBoundReceiptOutcome` rejects entries whose `attemptId` does not match the current attempt, or whose `Date.parse(timestamps.completedAt) < Date.parse(attemptStartedAt)`.
|
|
56
|
+
> **Receipt binding.** When writing the terminal receipt to `artifact-manifest.json`, set `entry.receipt.attemptId = <attemptId supplied by the orchestrator>` (the orchestrator provides this via `attemptId` on invocation). The hook at `chain-team-phases.sh:readBoundReceiptOutcome` rejects entries whose `attemptId` does not match the current attempt, or whose `Date.parse(timestamps.completedAt) < Date.parse(attemptStartedAt)`. A missing or stale attemptId causes `awaiting_artifact_receipt` stalls. Write the receipt as a whole-file merge — `node .ai.local/scripts/manifest.mjs upsert --slug <slug> --id <id> --producer <agent> --outcome <outcome> --attempt <attemptId> …` — and never patch the JSON with a fragment/replace edit: a foreign parallel write or a refreshed `updatedAt` breaks the match and aborts the receipt mid-task. If the merge or parse fails, re-read and merge again (at most twice), then report `blocked` with the error. <!-- shared-core: receipt-binding -->
|
|
@@ -743,9 +743,9 @@ function readBoundReceiptOutcome(agent, step, resolved) {
|
|
|
743
743
|
const seeded = writeSkeletonManifest(manifestPath);
|
|
744
744
|
const stepIndex = typeof resolved.entry.stepIndex === 'number' ? resolved.entry.stepIndex : 0;
|
|
745
745
|
if (seeded) {
|
|
746
|
-
return { outcome: null, receiptRequired: true, stallMessage: `[chain-team-phases] ${slug}: artifact-manifest.json is missing and the skeleton could not be written (${seeded}). Create .ai.local/
|
|
746
|
+
return { outcome: null, receiptRequired: true, stallMessage: `[chain-team-phases] ${slug}: artifact-manifest.json is missing and the skeleton could not be written (${seeded}). Create it with "node .ai.local/scripts/manifest.mjs init --slug ${slug}", then merge the receipt for artifactOutputId "${expectedOutputId}" with "node .ai.local/scripts/manifest.mjs upsert --slug ${slug} --id ${expectedOutputId} --producer ${agent} --outcome completed --paths <artifact>.md" (whole-file merge; never patch the JSON), then resume with: /task-continue ${slug}` };
|
|
747
747
|
}
|
|
748
|
-
return { outcome: null, receiptRequired: true, stallMessage: `[chain-team-phases] ${slug}: no artifact-manifest.json for step ${stepIndex} (${agent}). Wrote a skeleton {schemaVersion:1, slug, artifacts:[]}. Expected artifactOutputId "${expectedOutputId}". Write the artifact
|
|
748
|
+
return { outcome: null, receiptRequired: true, stallMessage: `[chain-team-phases] ${slug}: no artifact-manifest.json for step ${stepIndex} (${agent}). Wrote a skeleton {schemaVersion:1, slug, artifacts:[]}. Expected artifactOutputId "${expectedOutputId}". Write the artifact, then merge its receipt with "node .ai.local/scripts/manifest.mjs upsert --slug ${slug} --id ${expectedOutputId} --producer ${agent} --outcome completed --paths <artifact>.md" (whole-file merge; never patch the JSON), then resume with: /task-continue ${slug}` };
|
|
749
749
|
}
|
|
750
750
|
try {
|
|
751
751
|
const manifest = JSON.parse(fs.readFileSync(manifestPath, 'utf8'));
|