@bonesofspring/ai-rules 0.2.43 → 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 +40 -2
- package/bin/lib/engine-scripts.js +6 -1
- package/docs/LOCAL-OVERLAY.md +3 -3
- package/docs/MAVIS.md +1 -1
- package/docs/OPENCODE.md +1 -1
- package/docs/PRESET-CONTRIBUTION.md +2 -2
- package/docs/PRESET-ENGLISH-STYLE.md +1 -1
- package/package.json +1 -1
- package/presets/_shared/README.md +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 +23 -1
- package/presets/_shared/core/agent-team/agent-team-intake.md +1 -1
- package/presets/_shared/core/agent-team/agent-team-orchestrator.md +13 -4
- package/presets/_shared/core/agent-team/language-policy.md +24 -16
- 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/REPO_AGENTS.md +1 -3
- 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/commands/task.md +1 -3
- package/presets/claude/android-kotlin/hooks/chain-team-phases.sh +2 -2
- package/presets/claude/android-kotlin/rules/stack/android-app-core.md +1 -3
- package/presets/claude/android-kotlin/rules/tooling-and-review/agent-team-intake.md +1 -1
- package/presets/claude/android-kotlin/rules/tooling-and-review/agent-team-orchestrator.md +13 -4
- package/presets/claude/android-kotlin/rules/tooling-and-review/ai-local-overlay.md +1 -1
- package/presets/claude/android-kotlin/rules/tooling-and-review/code-review.md +9 -0
- package/presets/claude/android-kotlin/rules/tooling-and-review/language-policy.md +25 -17
- package/presets/claude/android-kotlin/team/README.md +17 -0
- package/presets/claude/go/REPO_AGENTS.md +1 -3
- 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/commands/task.md +1 -3
- package/presets/claude/go/hooks/chain-team-phases.sh +2 -2
- package/presets/claude/go/rules/stack/go-app-core.md +1 -3
- package/presets/claude/go/rules/tooling-and-review/agent-team-intake.md +1 -1
- package/presets/claude/go/rules/tooling-and-review/agent-team-orchestrator.md +13 -4
- package/presets/claude/go/rules/tooling-and-review/ai-local-overlay.md +1 -1
- package/presets/claude/go/rules/tooling-and-review/code-review.md +9 -0
- package/presets/claude/go/rules/tooling-and-review/language-policy.md +25 -17
- package/presets/claude/go/team/README.md +17 -0
- package/presets/claude/ios-swift/REPO_AGENTS.md +1 -3
- 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/commands/task.md +1 -3
- package/presets/claude/ios-swift/hooks/chain-team-phases.sh +2 -2
- package/presets/claude/ios-swift/rules/stack/ios-app-core.md +1 -3
- package/presets/claude/ios-swift/rules/tooling-and-review/agent-team-intake.md +1 -1
- package/presets/claude/ios-swift/rules/tooling-and-review/agent-team-orchestrator.md +13 -4
- package/presets/claude/ios-swift/rules/tooling-and-review/ai-local-overlay.md +1 -1
- package/presets/claude/ios-swift/rules/tooling-and-review/code-review.md +9 -0
- package/presets/claude/ios-swift/rules/tooling-and-review/language-policy.md +25 -17
- package/presets/claude/ios-swift/team/README.md +17 -0
- package/presets/claude/java/REPO_AGENTS.md +1 -3
- 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/commands/task.md +1 -3
- package/presets/claude/java/hooks/chain-team-phases.sh +2 -2
- package/presets/claude/java/rules/stack/java-app-core.md +1 -3
- package/presets/claude/java/rules/tooling-and-review/agent-team-intake.md +1 -1
- package/presets/claude/java/rules/tooling-and-review/agent-team-orchestrator.md +13 -4
- package/presets/claude/java/rules/tooling-and-review/ai-local-overlay.md +1 -1
- package/presets/claude/java/rules/tooling-and-review/code-review.md +9 -0
- package/presets/claude/java/rules/tooling-and-review/language-policy.md +25 -17
- package/presets/claude/java/team/README.md +17 -0
- package/presets/claude/mcp-ts/REPO_AGENTS.md +1 -3
- 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/commands/task.md +1 -3
- package/presets/claude/mcp-ts/hooks/chain-team-phases.sh +2 -2
- package/presets/claude/mcp-ts/rules/stack/mcp-ts-app-core.md +1 -3
- package/presets/claude/mcp-ts/rules/tooling-and-review/agent-team-intake.md +1 -1
- package/presets/claude/mcp-ts/rules/tooling-and-review/agent-team-orchestrator.md +13 -4
- package/presets/claude/mcp-ts/rules/tooling-and-review/ai-local-overlay.md +1 -1
- package/presets/claude/mcp-ts/rules/tooling-and-review/code-review.md +9 -0
- package/presets/claude/mcp-ts/rules/tooling-and-review/language-policy.md +25 -17
- package/presets/claude/mcp-ts/team/README.md +17 -0
- package/presets/claude/next/REPO_AGENTS.md +1 -3
- 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/commands/task.md +1 -3
- package/presets/claude/next/hooks/chain-team-phases.sh +2 -2
- package/presets/claude/next/rules/stack/next-app-core.md +1 -3
- package/presets/claude/next/rules/tooling-and-review/agent-team-intake.md +1 -1
- package/presets/claude/next/rules/tooling-and-review/agent-team-orchestrator.md +13 -4
- package/presets/claude/next/rules/tooling-and-review/ai-local-overlay.md +1 -1
- package/presets/claude/next/rules/tooling-and-review/code-review-mr.md +9 -0
- package/presets/claude/next/rules/tooling-and-review/language-policy.md +25 -17
- package/presets/claude/next/team/README.md +17 -0
- package/presets/claude/nuxt/REPO_AGENTS.md +1 -3
- 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/commands/task.md +1 -3
- package/presets/claude/nuxt/hooks/chain-team-phases.sh +2 -2
- package/presets/claude/nuxt/rules/stack/nuxt-app-core.md +1 -3
- package/presets/claude/nuxt/rules/tooling-and-review/agent-team-intake.md +1 -1
- package/presets/claude/nuxt/rules/tooling-and-review/agent-team-orchestrator.md +13 -4
- package/presets/claude/nuxt/rules/tooling-and-review/ai-local-overlay.md +1 -1
- package/presets/claude/nuxt/rules/tooling-and-review/code-review-mr.md +9 -0
- package/presets/claude/nuxt/rules/tooling-and-review/language-policy.md +25 -17
- package/presets/claude/nuxt/team/README.md +17 -0
- package/presets/claude/php-hexagonal/REPO_AGENTS.md +1 -3
- 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/commands/task.md +1 -3
- package/presets/claude/php-hexagonal/hooks/chain-team-phases.sh +2 -2
- package/presets/claude/php-hexagonal/rules/stack/php-app-core.md +1 -3
- package/presets/claude/php-hexagonal/rules/tooling-and-review/agent-team-intake.md +1 -1
- package/presets/claude/php-hexagonal/rules/tooling-and-review/agent-team-orchestrator.md +13 -4
- package/presets/claude/php-hexagonal/rules/tooling-and-review/ai-local-overlay.md +1 -1
- package/presets/claude/php-hexagonal/rules/tooling-and-review/code-review.md +9 -0
- package/presets/claude/php-hexagonal/rules/tooling-and-review/language-policy.md +25 -17
- package/presets/claude/php-hexagonal/team/README.md +17 -0
- package/presets/claude/php-laravel/REPO_AGENTS.md +1 -3
- 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/commands/task.md +1 -3
- package/presets/claude/php-laravel/hooks/chain-team-phases.sh +2 -2
- package/presets/claude/php-laravel/rules/stack/laravel-app-core.md +1 -3
- package/presets/claude/php-laravel/rules/tooling-and-review/agent-team-intake.md +1 -1
- package/presets/claude/php-laravel/rules/tooling-and-review/agent-team-orchestrator.md +13 -4
- package/presets/claude/php-laravel/rules/tooling-and-review/ai-local-overlay.md +1 -1
- package/presets/claude/php-laravel/rules/tooling-and-review/code-review.md +9 -0
- package/presets/claude/php-laravel/rules/tooling-and-review/language-policy.md +25 -17
- package/presets/claude/php-laravel/team/README.md +17 -0
- package/presets/claude/svelte/REPO_AGENTS.md +1 -3
- 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/commands/task.md +1 -3
- package/presets/claude/svelte/hooks/chain-team-phases.sh +2 -2
- package/presets/claude/svelte/rules/stack/svelte-app-core.md +1 -3
- package/presets/claude/svelte/rules/tooling-and-review/agent-team-intake.md +1 -1
- package/presets/claude/svelte/rules/tooling-and-review/agent-team-orchestrator.md +13 -4
- package/presets/claude/svelte/rules/tooling-and-review/ai-local-overlay.md +1 -1
- package/presets/claude/svelte/rules/tooling-and-review/code-review-mr.md +9 -0
- package/presets/claude/svelte/rules/tooling-and-review/language-policy.md +25 -17
- package/presets/claude/svelte/team/README.md +17 -0
- package/presets/cursor/android-kotlin/REPO_AGENTS.md +1 -3
- 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/commands/task.md +1 -3
- package/presets/cursor/android-kotlin/hooks/chain-team-phases.sh +2 -2
- package/presets/cursor/android-kotlin/rules/agent-team-intake.mdc +1 -1
- package/presets/cursor/android-kotlin/rules/agent-team-orchestrator.mdc +3 -10
- package/presets/cursor/android-kotlin/rules/ai-local-overlay.mdc +1 -1
- package/presets/cursor/android-kotlin/rules/android-app-core.mdc +1 -3
- package/presets/cursor/android-kotlin/rules/code-review-mr.mdc +9 -0
- package/presets/cursor/android-kotlin/rules/language-policy.mdc +25 -17
- package/presets/cursor/android-kotlin/team/README.md +17 -0
- package/presets/cursor/go/REPO_AGENTS.md +1 -3
- 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/commands/task.md +1 -3
- package/presets/cursor/go/hooks/chain-team-phases.sh +2 -2
- package/presets/cursor/go/rules/agent-team-intake.mdc +1 -1
- package/presets/cursor/go/rules/agent-team-orchestrator.mdc +3 -10
- package/presets/cursor/go/rules/ai-local-overlay.mdc +1 -1
- package/presets/cursor/go/rules/code-review-mr.mdc +9 -0
- package/presets/cursor/go/rules/go-app-core.mdc +1 -3
- package/presets/cursor/go/rules/language-policy.mdc +25 -17
- package/presets/cursor/go/team/README.md +17 -0
- package/presets/cursor/ios-swift/REPO_AGENTS.md +1 -3
- 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/commands/task.md +1 -3
- package/presets/cursor/ios-swift/hooks/chain-team-phases.sh +2 -2
- package/presets/cursor/ios-swift/rules/agent-team-intake.mdc +1 -1
- package/presets/cursor/ios-swift/rules/agent-team-orchestrator.mdc +3 -10
- package/presets/cursor/ios-swift/rules/ai-local-overlay.mdc +1 -1
- package/presets/cursor/ios-swift/rules/code-review-mr.mdc +9 -0
- package/presets/cursor/ios-swift/rules/ios-app-core.mdc +1 -3
- package/presets/cursor/ios-swift/rules/language-policy.mdc +25 -17
- package/presets/cursor/ios-swift/team/README.md +17 -0
- package/presets/cursor/java/REPO_AGENTS.md +1 -3
- 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/commands/task.md +1 -3
- package/presets/cursor/java/hooks/chain-team-phases.sh +2 -2
- package/presets/cursor/java/rules/agent-team-intake.mdc +1 -1
- package/presets/cursor/java/rules/agent-team-orchestrator.mdc +3 -10
- package/presets/cursor/java/rules/ai-local-overlay.mdc +1 -1
- package/presets/cursor/java/rules/code-review-mr.mdc +9 -0
- package/presets/cursor/java/rules/java-app-core.mdc +1 -3
- package/presets/cursor/java/rules/language-policy.mdc +25 -17
- package/presets/cursor/java/team/README.md +17 -0
- package/presets/cursor/mcp-ts/REPO_AGENTS.md +1 -3
- 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/commands/task.md +1 -3
- package/presets/cursor/mcp-ts/hooks/chain-team-phases.sh +2 -2
- package/presets/cursor/mcp-ts/rules/agent-team-intake.mdc +1 -1
- package/presets/cursor/mcp-ts/rules/agent-team-orchestrator.mdc +3 -10
- package/presets/cursor/mcp-ts/rules/ai-local-overlay.mdc +1 -1
- package/presets/cursor/mcp-ts/rules/code-review-mr.mdc +9 -0
- package/presets/cursor/mcp-ts/rules/language-policy.mdc +25 -17
- package/presets/cursor/mcp-ts/rules/mcp-ts-app-core.mdc +1 -3
- package/presets/cursor/mcp-ts/team/README.md +17 -0
- package/presets/cursor/next/REPO_AGENTS.md +1 -3
- 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/commands/task.md +1 -3
- package/presets/cursor/next/hooks/chain-team-phases.sh +2 -2
- package/presets/cursor/next/rules/agent-team-intake.mdc +1 -1
- package/presets/cursor/next/rules/agent-team-orchestrator.mdc +3 -10
- package/presets/cursor/next/rules/ai-local-overlay.mdc +1 -1
- package/presets/cursor/next/rules/code-review-mr.mdc +9 -0
- package/presets/cursor/next/rules/language-policy.mdc +25 -17
- package/presets/cursor/next/rules/next-app-core.mdc +1 -3
- package/presets/cursor/next/team/README.md +17 -0
- package/presets/cursor/nuxt/REPO_AGENTS.md +1 -3
- 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/commands/task.md +1 -3
- package/presets/cursor/nuxt/hooks/chain-team-phases.sh +2 -2
- package/presets/cursor/nuxt/rules/agent-team-intake.mdc +1 -1
- package/presets/cursor/nuxt/rules/agent-team-orchestrator.mdc +3 -10
- package/presets/cursor/nuxt/rules/ai-local-overlay.mdc +1 -1
- package/presets/cursor/nuxt/rules/code-review-mr.mdc +9 -0
- package/presets/cursor/nuxt/rules/language-policy.mdc +25 -17
- package/presets/cursor/nuxt/rules/nuxt-app-core.mdc +1 -3
- package/presets/cursor/nuxt/team/README.md +17 -0
- package/presets/cursor/php-hexagonal/REPO_AGENTS.md +1 -3
- 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/commands/task.md +1 -3
- package/presets/cursor/php-hexagonal/hooks/chain-team-phases.sh +2 -2
- package/presets/cursor/php-hexagonal/rules/agent-team-intake.mdc +1 -1
- package/presets/cursor/php-hexagonal/rules/agent-team-orchestrator.mdc +3 -10
- package/presets/cursor/php-hexagonal/rules/ai-local-overlay.mdc +1 -1
- package/presets/cursor/php-hexagonal/rules/code-review-mr.mdc +9 -0
- package/presets/cursor/php-hexagonal/rules/language-policy.mdc +25 -17
- package/presets/cursor/php-hexagonal/rules/php-app-core.mdc +1 -3
- package/presets/cursor/php-hexagonal/team/README.md +17 -0
- package/presets/cursor/php-laravel/REPO_AGENTS.md +1 -3
- 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/commands/task.md +1 -3
- package/presets/cursor/php-laravel/hooks/chain-team-phases.sh +2 -2
- package/presets/cursor/php-laravel/rules/agent-team-intake.mdc +1 -1
- package/presets/cursor/php-laravel/rules/agent-team-orchestrator.mdc +3 -10
- package/presets/cursor/php-laravel/rules/ai-local-overlay.mdc +1 -1
- package/presets/cursor/php-laravel/rules/code-review-mr.mdc +9 -0
- package/presets/cursor/php-laravel/rules/language-policy.mdc +25 -17
- package/presets/cursor/php-laravel/rules/laravel-app-core.mdc +1 -3
- package/presets/cursor/php-laravel/team/README.md +17 -0
- package/presets/cursor/svelte/REPO_AGENTS.md +1 -3
- 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/commands/task.md +1 -3
- package/presets/cursor/svelte/hooks/chain-team-phases.sh +2 -2
- package/presets/cursor/svelte/rules/agent-team-intake.mdc +1 -1
- package/presets/cursor/svelte/rules/agent-team-orchestrator.mdc +3 -10
- package/presets/cursor/svelte/rules/ai-local-overlay.mdc +1 -1
- package/presets/cursor/svelte/rules/code-review-mr.mdc +9 -0
- package/presets/cursor/svelte/rules/language-policy.mdc +25 -17
- package/presets/cursor/svelte/rules/svelte-app-core.mdc +1 -3
- package/presets/cursor/svelte/team/README.md +17 -0
- package/presets/mavis/android-kotlin/REPO_AGENTS.md +1 -3
- 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/commands/task.md +1 -3
- package/presets/mavis/android-kotlin/hooks/chain-team-phases.sh +2 -2
- package/presets/mavis/android-kotlin/rules/agent-team-intake.md +1 -1
- package/presets/mavis/android-kotlin/rules/agent-team-orchestrator.md +13 -4
- package/presets/mavis/android-kotlin/rules/ai-local-overlay.md +1 -1
- package/presets/mavis/android-kotlin/rules/android-app-core.md +1 -3
- package/presets/mavis/android-kotlin/rules/code-review-mr.md +9 -0
- package/presets/mavis/android-kotlin/rules/language-policy.md +24 -16
- package/presets/mavis/android-kotlin/team/README.md +17 -0
- package/presets/mavis/go/REPO_AGENTS.md +1 -3
- 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/commands/task.md +1 -3
- package/presets/mavis/go/hooks/chain-team-phases.sh +2 -2
- package/presets/mavis/go/rules/agent-team-intake.md +1 -1
- package/presets/mavis/go/rules/agent-team-orchestrator.md +13 -4
- package/presets/mavis/go/rules/ai-local-overlay.md +1 -1
- package/presets/mavis/go/rules/code-review-mr.md +9 -0
- package/presets/mavis/go/rules/go-app-core.md +1 -3
- package/presets/mavis/go/rules/language-policy.md +24 -16
- package/presets/mavis/go/team/README.md +17 -0
- package/presets/mavis/ios-swift/REPO_AGENTS.md +1 -3
- 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/commands/task.md +1 -3
- package/presets/mavis/ios-swift/hooks/chain-team-phases.sh +2 -2
- package/presets/mavis/ios-swift/rules/agent-team-intake.md +1 -1
- package/presets/mavis/ios-swift/rules/agent-team-orchestrator.md +13 -4
- package/presets/mavis/ios-swift/rules/ai-local-overlay.md +1 -1
- package/presets/mavis/ios-swift/rules/code-review-mr.md +9 -0
- package/presets/mavis/ios-swift/rules/ios-app-core.md +1 -3
- package/presets/mavis/ios-swift/rules/language-policy.md +24 -16
- package/presets/mavis/ios-swift/team/README.md +17 -0
- package/presets/mavis/java/REPO_AGENTS.md +1 -3
- 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/commands/task.md +1 -3
- package/presets/mavis/java/hooks/chain-team-phases.sh +2 -2
- package/presets/mavis/java/rules/agent-team-intake.md +1 -1
- package/presets/mavis/java/rules/agent-team-orchestrator.md +13 -4
- package/presets/mavis/java/rules/ai-local-overlay.md +1 -1
- package/presets/mavis/java/rules/code-review-mr.md +9 -0
- package/presets/mavis/java/rules/java-app-core.md +1 -3
- package/presets/mavis/java/rules/language-policy.md +24 -16
- package/presets/mavis/java/team/README.md +17 -0
- package/presets/mavis/mcp-ts/REPO_AGENTS.md +1 -3
- 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/commands/task.md +1 -3
- package/presets/mavis/mcp-ts/hooks/chain-team-phases.sh +2 -2
- package/presets/mavis/mcp-ts/rules/agent-team-intake.md +1 -1
- package/presets/mavis/mcp-ts/rules/agent-team-orchestrator.md +13 -4
- package/presets/mavis/mcp-ts/rules/ai-local-overlay.md +1 -1
- package/presets/mavis/mcp-ts/rules/code-review-mr.md +9 -0
- package/presets/mavis/mcp-ts/rules/language-policy.md +24 -16
- package/presets/mavis/mcp-ts/rules/mcp-ts-app-core.md +1 -3
- package/presets/mavis/mcp-ts/team/README.md +17 -0
- package/presets/mavis/next/REPO_AGENTS.md +1 -3
- 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/commands/task.md +1 -3
- package/presets/mavis/next/hooks/chain-team-phases.sh +2 -2
- package/presets/mavis/next/rules/agent-team-intake.md +1 -1
- package/presets/mavis/next/rules/agent-team-orchestrator.md +13 -4
- package/presets/mavis/next/rules/ai-local-overlay.md +1 -1
- package/presets/mavis/next/rules/code-review-mr.md +9 -0
- package/presets/mavis/next/rules/language-policy.md +24 -16
- package/presets/mavis/next/rules/next-app-core.md +1 -3
- package/presets/mavis/next/team/README.md +17 -0
- package/presets/mavis/nuxt/REPO_AGENTS.md +1 -3
- 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/commands/task.md +1 -3
- package/presets/mavis/nuxt/hooks/chain-team-phases.sh +2 -2
- package/presets/mavis/nuxt/rules/agent-team-intake.md +1 -1
- package/presets/mavis/nuxt/rules/agent-team-orchestrator.md +13 -4
- package/presets/mavis/nuxt/rules/ai-local-overlay.md +1 -1
- package/presets/mavis/nuxt/rules/code-review-mr.md +9 -0
- package/presets/mavis/nuxt/rules/language-policy.md +24 -16
- package/presets/mavis/nuxt/rules/nuxt-app-core.md +1 -3
- package/presets/mavis/nuxt/team/README.md +17 -0
- package/presets/mavis/php-hexagonal/REPO_AGENTS.md +1 -3
- 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/commands/task.md +1 -3
- package/presets/mavis/php-hexagonal/hooks/chain-team-phases.sh +2 -2
- package/presets/mavis/php-hexagonal/rules/agent-team-intake.md +1 -1
- package/presets/mavis/php-hexagonal/rules/agent-team-orchestrator.md +13 -4
- package/presets/mavis/php-hexagonal/rules/ai-local-overlay.md +1 -1
- package/presets/mavis/php-hexagonal/rules/code-review-mr.md +9 -0
- package/presets/mavis/php-hexagonal/rules/language-policy.md +24 -16
- package/presets/mavis/php-hexagonal/rules/php-app-core.md +1 -3
- package/presets/mavis/php-hexagonal/team/README.md +17 -0
- package/presets/mavis/php-laravel/REPO_AGENTS.md +1 -3
- 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/commands/task.md +1 -3
- package/presets/mavis/php-laravel/hooks/chain-team-phases.sh +2 -2
- package/presets/mavis/php-laravel/rules/agent-team-intake.md +1 -1
- package/presets/mavis/php-laravel/rules/agent-team-orchestrator.md +13 -4
- package/presets/mavis/php-laravel/rules/ai-local-overlay.md +1 -1
- package/presets/mavis/php-laravel/rules/code-review-mr.md +9 -0
- package/presets/mavis/php-laravel/rules/language-policy.md +24 -16
- package/presets/mavis/php-laravel/rules/laravel-app-core.md +1 -3
- package/presets/mavis/php-laravel/team/README.md +17 -0
- package/presets/mavis/svelte/REPO_AGENTS.md +1 -3
- 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/commands/task.md +1 -3
- package/presets/mavis/svelte/hooks/chain-team-phases.sh +2 -2
- package/presets/mavis/svelte/rules/agent-team-intake.md +1 -1
- package/presets/mavis/svelte/rules/agent-team-orchestrator.md +13 -4
- package/presets/mavis/svelte/rules/ai-local-overlay.md +1 -1
- package/presets/mavis/svelte/rules/code-review-mr.md +9 -0
- package/presets/mavis/svelte/rules/language-policy.md +24 -16
- package/presets/mavis/svelte/rules/svelte-app-core.md +1 -3
- package/presets/mavis/svelte/team/README.md +17 -0
- package/presets/opencode/android-kotlin/REPO_AGENTS.md +1 -3
- 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/commands/task.md +1 -3
- package/presets/opencode/android-kotlin/hooks/chain-team-phases.sh +2 -2
- package/presets/opencode/android-kotlin/rules/agent-team-intake.md +1 -1
- package/presets/opencode/android-kotlin/rules/agent-team-orchestrator.md +13 -4
- package/presets/opencode/android-kotlin/rules/ai-local-overlay.md +1 -1
- package/presets/opencode/android-kotlin/rules/android-app-core.md +1 -3
- package/presets/opencode/android-kotlin/rules/code-review-mr.md +9 -0
- package/presets/opencode/android-kotlin/rules/language-policy.md +24 -16
- package/presets/opencode/android-kotlin/team/README.md +17 -0
- package/presets/opencode/go/REPO_AGENTS.md +1 -3
- 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/commands/task.md +1 -3
- package/presets/opencode/go/hooks/chain-team-phases.sh +2 -2
- package/presets/opencode/go/rules/agent-team-intake.md +1 -1
- package/presets/opencode/go/rules/agent-team-orchestrator.md +13 -4
- package/presets/opencode/go/rules/ai-local-overlay.md +1 -1
- package/presets/opencode/go/rules/code-review-mr.md +9 -0
- package/presets/opencode/go/rules/go-app-core.md +1 -3
- package/presets/opencode/go/rules/language-policy.md +24 -16
- package/presets/opencode/go/team/README.md +17 -0
- package/presets/opencode/ios-swift/REPO_AGENTS.md +1 -3
- 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/commands/task.md +1 -3
- package/presets/opencode/ios-swift/hooks/chain-team-phases.sh +2 -2
- package/presets/opencode/ios-swift/rules/agent-team-intake.md +1 -1
- package/presets/opencode/ios-swift/rules/agent-team-orchestrator.md +13 -4
- package/presets/opencode/ios-swift/rules/ai-local-overlay.md +1 -1
- package/presets/opencode/ios-swift/rules/code-review-mr.md +9 -0
- package/presets/opencode/ios-swift/rules/ios-app-core.md +1 -3
- package/presets/opencode/ios-swift/rules/language-policy.md +24 -16
- package/presets/opencode/ios-swift/team/README.md +17 -0
- package/presets/opencode/java/REPO_AGENTS.md +1 -3
- 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/commands/task.md +1 -3
- package/presets/opencode/java/hooks/chain-team-phases.sh +2 -2
- package/presets/opencode/java/rules/agent-team-intake.md +1 -1
- package/presets/opencode/java/rules/agent-team-orchestrator.md +13 -4
- package/presets/opencode/java/rules/ai-local-overlay.md +1 -1
- package/presets/opencode/java/rules/code-review-mr.md +9 -0
- package/presets/opencode/java/rules/java-app-core.md +1 -3
- package/presets/opencode/java/rules/language-policy.md +24 -16
- package/presets/opencode/java/team/README.md +17 -0
- package/presets/opencode/mcp-ts/REPO_AGENTS.md +1 -3
- 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/commands/task.md +1 -3
- package/presets/opencode/mcp-ts/hooks/chain-team-phases.sh +2 -2
- package/presets/opencode/mcp-ts/rules/agent-team-intake.md +1 -1
- package/presets/opencode/mcp-ts/rules/agent-team-orchestrator.md +13 -4
- package/presets/opencode/mcp-ts/rules/ai-local-overlay.md +1 -1
- package/presets/opencode/mcp-ts/rules/code-review-mr.md +9 -0
- package/presets/opencode/mcp-ts/rules/language-policy.md +24 -16
- package/presets/opencode/mcp-ts/rules/mcp-ts-app-core.md +1 -3
- package/presets/opencode/mcp-ts/team/README.md +17 -0
- package/presets/opencode/next/REPO_AGENTS.md +1 -3
- 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/commands/task.md +1 -3
- package/presets/opencode/next/hooks/chain-team-phases.sh +2 -2
- package/presets/opencode/next/rules/agent-team-intake.md +1 -1
- package/presets/opencode/next/rules/agent-team-orchestrator.md +13 -4
- package/presets/opencode/next/rules/ai-local-overlay.md +1 -1
- package/presets/opencode/next/rules/code-review-mr.md +9 -0
- package/presets/opencode/next/rules/language-policy.md +24 -16
- package/presets/opencode/next/rules/next-app-core.md +1 -3
- package/presets/opencode/next/team/README.md +17 -0
- package/presets/opencode/nuxt/REPO_AGENTS.md +1 -3
- 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/commands/task.md +1 -3
- package/presets/opencode/nuxt/hooks/chain-team-phases.sh +2 -2
- package/presets/opencode/nuxt/rules/agent-team-intake.md +1 -1
- package/presets/opencode/nuxt/rules/agent-team-orchestrator.md +13 -4
- package/presets/opencode/nuxt/rules/ai-local-overlay.md +1 -1
- package/presets/opencode/nuxt/rules/code-review-mr.md +9 -0
- package/presets/opencode/nuxt/rules/language-policy.md +24 -16
- package/presets/opencode/nuxt/rules/nuxt-app-core.md +1 -3
- package/presets/opencode/nuxt/team/README.md +17 -0
- package/presets/opencode/php-hexagonal/REPO_AGENTS.md +1 -3
- 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/commands/task.md +1 -3
- package/presets/opencode/php-hexagonal/hooks/chain-team-phases.sh +2 -2
- package/presets/opencode/php-hexagonal/rules/agent-team-intake.md +1 -1
- package/presets/opencode/php-hexagonal/rules/agent-team-orchestrator.md +13 -4
- package/presets/opencode/php-hexagonal/rules/ai-local-overlay.md +1 -1
- package/presets/opencode/php-hexagonal/rules/code-review-mr.md +9 -0
- package/presets/opencode/php-hexagonal/rules/language-policy.md +24 -16
- package/presets/opencode/php-hexagonal/rules/php-app-core.md +1 -3
- package/presets/opencode/php-hexagonal/team/README.md +17 -0
- package/presets/opencode/php-laravel/REPO_AGENTS.md +1 -3
- 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/commands/task.md +1 -3
- package/presets/opencode/php-laravel/hooks/chain-team-phases.sh +2 -2
- package/presets/opencode/php-laravel/rules/agent-team-intake.md +1 -1
- package/presets/opencode/php-laravel/rules/agent-team-orchestrator.md +13 -4
- package/presets/opencode/php-laravel/rules/ai-local-overlay.md +1 -1
- package/presets/opencode/php-laravel/rules/code-review-mr.md +9 -0
- package/presets/opencode/php-laravel/rules/language-policy.md +24 -16
- package/presets/opencode/php-laravel/rules/laravel-app-core.md +1 -3
- package/presets/opencode/php-laravel/team/README.md +17 -0
- package/presets/opencode/svelte/REPO_AGENTS.md +1 -3
- 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/commands/task.md +1 -3
- package/presets/opencode/svelte/hooks/chain-team-phases.sh +2 -2
- package/presets/opencode/svelte/rules/agent-team-intake.md +1 -1
- package/presets/opencode/svelte/rules/agent-team-orchestrator.md +13 -4
- package/presets/opencode/svelte/rules/ai-local-overlay.md +1 -1
- package/presets/opencode/svelte/rules/code-review-mr.md +9 -0
- package/presets/opencode/svelte/rules/language-policy.md +24 -16
- package/presets/opencode/svelte/rules/svelte-app-core.md +1 -3
- package/presets/opencode/svelte/team/README.md +17 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,8 +1,46 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
##
|
|
3
|
+
## 0.2.45
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
### The manifest is a whole-file merge, not a fragment edit
|
|
6
|
+
|
|
7
|
+
- **Why.** Agents patched `artifact-manifest.json` with a reconstructed fragment. Any parallel producer write or refreshed `updatedAt` broke the match: the receipt aborted mid-task and the step stalled in `awaiting_artifact_receipt`.
|
|
8
|
+
- **Writer.** `init` seeds `.ai.local/scripts/manifest.mjs` (`init` / `upsert` / `get` / `check`). It merges by entry `id` under `.manifest.lock`, writes a temp file plus rename, rejects absolute, `..`, and repo-root `authoritativePaths`, and exits 2 without a write on invalid JSON. Direct invocation compares realpaths, so a symlinked or tmpdir checkout no longer no-ops silently.
|
|
9
|
+
- **Contract.** Shared core gains § Manifest write protocol; every `team/README.md` ships § artifact-manifest.json — write protocol; the receipt-binding callout in every owning-agent prompt names the writer and forbids a fragment/replace edit. Hook stall messages name the exact `manifest.mjs upsert` command instead of `Write the artifact and its receipt`.
|
|
10
|
+
- **Gate.** `check-manifest-write-protocol.mjs` plus `test-manifest-write-protocol.mjs` (five negative surfaces) and `test-manifest-writer.mjs` (merge, guards, parse safety, concurrent writers) run inside `check:preset-structure`.
|
|
11
|
+
|
|
12
|
+
### A fixable finding cannot hide behind "notes"
|
|
13
|
+
|
|
14
|
+
- **Why.** A review run filed a `medium` defect as `PASS_WITH_NOTES` / "approve with notes", emitted receipt `completed`, and the pipeline's existing retry never fired. The fix happened out of band: no attempt id, no `build-verifier` re-run, nothing in the run ledger.
|
|
15
|
+
- **Contract.** `code-review-mr` gains § Verdict and terminal receipt: any `blocker`/`important` (`high`/`medium`) finding emits `changes_requested`, which the orchestrator already routes as a developer retry. A notes-only verdict is reserved for `nit`/informational. A spec-vs-code divergence, and a wire contract that contradicts the repository's existing handler/decoder convention, are findings of that class.
|
|
16
|
+
- **Agents.** `security-reviewer` states the same mapping next to its verdict: `PASS_WITH_NOTES` is `low`-only, `medium` and above is `FAIL` + `changes_requested`.
|
|
17
|
+
|
|
18
|
+
### The efficacy oracle ignores non-task entries
|
|
19
|
+
|
|
20
|
+
- **Why.** A `.gitkeep` (or any plain file) in `.ai.local/team/tasks/` made `readAllTasks` read `<file>/metrics.json`, throw `ENOTDIR`, record a task error and downgrade every verdict to `insufficient-data (metrics parse error)` — so the self-learning verdict was permanently unusable in a repo that keeps a placeholder in the tasks folder.
|
|
21
|
+
- **Fix.** Non-directory entries are skipped before the ledger read, and `ENOTDIR` is treated like `ENOENT`. Real read failures still fail the verdict.
|
|
22
|
+
- **Gate.** `scripts/test-efficacy-oracle.mjs` pins the discovery contract (skipped file, skipped ledger-less task, surviving read error) and runs inside `check-preset-structure`.
|
|
23
|
+
|
|
24
|
+
### A producer outside the step graph is still a run artifact
|
|
25
|
+
|
|
26
|
+
- **Why.** A security finding and a review finding each led to a developer pass that existed only in chat: no attempt id, no `build-verifier` re-run, no ledger row. The receipt carried a hand-made label (`security-fix:attempt-1`) that no metrics reader can reconcile.
|
|
27
|
+
- **Contract.** `agent-team-orchestrator` gains § Out-of-band producer passes: one `.memlog.md` `event:` line (trigger, agent, files, gate re-run), its own manifest entry, no invented `attemptId`, and a re-run of the affected gate. The routed path — `changes_requested` re-dispatching the developer — stays the default.
|
|
28
|
+
|
|
29
|
+
### A closed receipt ticks its own plan rows
|
|
30
|
+
|
|
31
|
+
- **Why.** `tasks.md` boxes stayed open through the whole run and were ticked only at closure, so `openspec list` reported `0/24` while 24 tasks were done.
|
|
32
|
+
- **Contract.** `agent-artifact-contracts` § Completion receipts and the installed `team/README.md` write protocol require the producer to tick every row its receipt closes in the same turn.
|
|
33
|
+
|
|
34
|
+
### Upgrade
|
|
35
|
+
|
|
36
|
+
- `npx @bonesofspring/ai-rules update` seeds `.ai.local/scripts/manifest.mjs` and replaces `hooks/chain-team-phases.sh`, the managed rules, the agent prompts, and `team/README.md`, so the manifest writer, the named stall command, the verdict mapping, and the out-of-band pass rules land on re-init. Seeding is skip-if-exists, so delete an existing `.ai.local/scripts/manifest.mjs` to take the package copy.
|
|
37
|
+
|
|
38
|
+
## 0.2.44
|
|
39
|
+
|
|
40
|
+
### Dialogue language resolves on every user message
|
|
41
|
+
|
|
42
|
+
- **Always-on.** `ai-local-overlay`, each stack app-core, and root `AGENTS.md` resolve the user-facing language on every user message, including a question and a message without a slash command. `/task` and the other commands reuse that tag and, when a task exists, record `language:` in `prompt.md`.
|
|
43
|
+
- **Requestable detail.** `language-policy` stays requestable. `next` keeps its four always-on rules. The structural gate requires the `every user message` anchor on the always-on surfaces.
|
|
6
44
|
|
|
7
45
|
## 0.2.43
|
|
8
46
|
|
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The shipped
|
|
2
|
+
* The shipped `.ai.local/scripts/` set, declared once.
|
|
3
3
|
*
|
|
4
4
|
* `init` seeds exactly these files into a consumer's `.ai.local/scripts/`, and
|
|
5
5
|
* the monorepo dogfood copy is mirrored from the same source by
|
|
6
6
|
* `scripts/lib/engine-mirror.mjs`. An explicit list — never a glob — keeps the
|
|
7
7
|
* repo-local tooling (the `*.test.mjs` suites and `requirements-*.mjs`) out of
|
|
8
8
|
* the shipped set.
|
|
9
|
+
*
|
|
10
|
+
* `manifest.mjs` is the deterministic writer for
|
|
11
|
+
* `.ai.local/team/tasks/<slug>/artifact-manifest.json`; producers call it
|
|
12
|
+
* instead of patching the JSON, which is a whole-file merge target.
|
|
9
13
|
*/
|
|
10
14
|
const ENGINE_SCRIPTS = [
|
|
11
15
|
'run.mjs',
|
|
@@ -14,6 +18,7 @@ const ENGINE_SCRIPTS = [
|
|
|
14
18
|
'rule-improver.mjs',
|
|
15
19
|
'derive-gate-signals.mjs',
|
|
16
20
|
'efficacy-oracle.mjs',
|
|
21
|
+
'manifest.mjs',
|
|
17
22
|
];
|
|
18
23
|
|
|
19
24
|
/** Preset-root-relative directory holding the engine source of truth. */
|
package/docs/LOCAL-OVERLAY.md
CHANGED
|
@@ -172,9 +172,9 @@ A single markdown file (no header conventions). The `## Language` setting is opt
|
|
|
172
172
|
`conventions.md` also carries the optional **dialogue-language setting** for agents:
|
|
173
173
|
|
|
174
174
|
- **`## Language` section** — a bullet whose value is a **BCP-47** tag (default `en`). Every user-facing interaction the agent sends (clarifying questions, plan/human-gate prompts, `/task-continue`, status answers, summaries, escalations) uses that language. Development, reasoning, and all artifacts (including `prompt.md` and `review.md`) stay **English**.
|
|
175
|
-
- **Resolution order** — the `.ai.local` setting
|
|
176
|
-
- **Conflict** — a `.ai.local` setting wins over a
|
|
177
|
-
- **Persistence** — the resolved tag is recorded
|
|
175
|
+
- **Resolution order** — on every user message, before the reply, including a question and a message without a slash command. An active task's stored tag wins; else the `.ai.local` setting; else the agent infers the language from the prompt; else English. A mixed-language prompt uses the **dominant** language. In a monorepo the **nearest** `.ai.local` wins. Commands reuse that resolution.
|
|
176
|
+
- **Conflict** — a `.ai.local` setting wins over a later prompt in another language; the mismatch is surfaced once, never as a blocking question. Agents never ask you to confirm a language.
|
|
177
|
+
- **Persistence** — when a task exists, the resolved tag is recorded as an additive `language: <BCP-47>` line in `.ai.local/team/tasks/<slug>/prompt.md` (plus a `.memlog.md` `event:`) and reused for the whole task. A message with no task still resolves. Reference rule: `agent-team/language-policy`.
|
|
178
178
|
|
|
179
179
|
**Behavior-change note (existing consumers):** an English-only prompt with no `## Language` setting still resolves to **English**, so default behavior is unchanged. The setting pins a language explicitly; adding it is opt-in and needs no other config. The change is about the agent's **runtime output** language only — preset prose and all artifacts remain English (`docs/PRESET-ENGLISH-STYLE.md`).
|
|
180
180
|
|
package/docs/MAVIS.md
CHANGED
|
@@ -58,7 +58,7 @@ Parse `mcode exec --output-format json` as the `exec.result` wrapper (see [compa
|
|
|
58
58
|
File-based orchestration under `.ai.local/team/` mirrors Cursor/Claude:
|
|
59
59
|
|
|
60
60
|
1. Start work via the task procedure (`.mavis/commands/task.md`) or `task-router` agent.
|
|
61
|
-
2. Producers write artifacts and upsert `artifact-manifest.json`
|
|
61
|
+
2. Producers write artifacts and merge their receipt with `node .ai.local/scripts/manifest.mjs upsert …` (whole-file merge; never a fragment edit of `artifact-manifest.json`).
|
|
62
62
|
3. **Do not** mutate `status.json` / `metrics.json` lifecycle fields from agent prompts — the chain hook owns them.
|
|
63
63
|
4. After each producer receipt, run the chain runner:
|
|
64
64
|
|
package/docs/OPENCODE.md
CHANGED
|
@@ -69,7 +69,7 @@ Do not pin a model in this preset — use the operator’s OpenCode provider con
|
|
|
69
69
|
File-based orchestration under `.ai.local/team/` mirrors Cursor/Claude:
|
|
70
70
|
|
|
71
71
|
1. Start work with `/task` (`.opencode/commands/task.md`).
|
|
72
|
-
2. Producers write artifacts and upsert `artifact-manifest.json`
|
|
72
|
+
2. Producers write artifacts and merge their receipt with `node .ai.local/scripts/manifest.mjs upsert …` (whole-file merge; never a fragment edit of `artifact-manifest.json`).
|
|
73
73
|
3. **Do not** mutate `status.json` / `metrics.json` lifecycle fields from agent prompts — the chain runner owns them.
|
|
74
74
|
4. After each producer receipt, run:
|
|
75
75
|
|
|
@@ -99,7 +99,7 @@ Sync marker (after frontmatter in platform files):
|
|
|
99
99
|
|
|
100
100
|
**Prompt-persistence contract (always-on behavior):** every task persists the user's **verbatim** original prompt at `.ai.local/team/tasks/<slug>/prompt.md` (write-if-absent) — written by the `/task` **Slug** bootstrap and, for non-`/task` work requests, by `agent-team-intake`. Every **subsequent user-authored** prompt for the same slug (a new message while the slug is active, `/task-continue` arguments, human-gate feedback, a clarification answer) is appended verbatim by the orchestrator only to the **append-only** `.ai.local/team/tasks/<slug>/prompt-log.md` ledger — `seq` = current max + 1, created on the first follow-up (absence is valid), never rewritten or duplicated; machine-generated hook `followup_message` and empty/argument-less invocations are excluded. It rides existing bodies (`agent-team-orchestrator` + `agent-team-intake` rules, `commands/task.md` + `commands/task-continue.md`) and adds **no** always-on rule. Register both paths on the manifest `routing` entry — never in `artifacts[]` bodies (`core/agent-team/agent-artifact-contracts.md` § Prompt artifact / § Prompt log). The obligation is anchored on the **always-on** root entry `REPO_AGENTS.md` → `AGENTS.md` (native always-on for every platform), because the A–D consumers (`commands/task.md`, `agent-team-intake`, `agent-team-orchestrator`) are all `referenced`/lazy and only fire under `/task`. Enforced by `scripts/check-preset-prompt-persistence.sh` (wired into `check-preset-structure.sh`), which now also asserts the `REPO_AGENTS.md` clause (check **E**).
|
|
101
101
|
|
|
102
|
-
**Native-language policy (always-on behavior):** development, reasoning, and every artifact stay **English**; every user-facing interaction (clarifying questions, plan/human-gate prompts, `/task-continue`, status answers, summaries, escalations) is written in the user's **native language**.
|
|
102
|
+
**Native-language policy (always-on behavior):** development, reasoning, and every artifact stay **English**; every user-facing interaction (clarifying questions, plan/human-gate prompts, `/task-continue`, status answers, summaries, escalations) is written in the user's **native language**. Resolution runs on every user message, including a question and a message without a slash command, from the always-on surfaces before any command runs. Order: an active task's `language:` tag, else `.ai.local/conventions.md` `## Language` (nearest `.ai.local` wins), else the prompt language (mixed → dominant), else English. When a task exists, that tag is persisted as an additive `language: <BCP-47>` line in the `prompt.md` header (+ a `.memlog.md` `event:`; never `status.json` / `metrics.json` / an `artifacts[]` body). Commands reuse the tag; they do not own resolution. The detailed rule is a **requestable** EMBED stem (`core/agent-team/language-policy.md`); the resolution clause rides existing always-on bodies (`ai-local-overlay`, the stack `<stack>-app-core`, root `REPO_AGENTS.md` → `AGENTS.md`) and adds **no** new always-on slot. Enforced by `scripts/check-preset-language-policy.sh` (wired into `check-preset-structure.sh`), which requires the `every user message` anchor on those always-on bodies. Runtime output language is **orthogonal** to preset prose language — the prose stays English (`docs/PRESET-ENGLISH-STYLE.md`).
|
|
103
103
|
|
|
104
104
|
Intentional fork / mode change: document in PR (and optionally in validation-report).
|
|
105
105
|
|
|
@@ -391,7 +391,7 @@ Load these when editing files under `packages/ai-rules/presets/**`, `.cursor/**`
|
|
|
391
391
|
| `scripts/check-preset-leakage.sh` / `yarn check:preset-leakage` | **FAIL** on forbidden stems in `hooks/**/*.sh` (recursive), wrong-stack agent filenames, or **positive** (non-negation) agent body mentions; **FAIL** if chain scripts are byte-identical across stacks. Explicit **negation** of forbidden stems in agent bodies is **suppressed** (INFO summary count only — not a merge blocker). Non-negation mentions in `build-verifier` → **WARN only**. |
|
|
392
392
|
| `scripts/check-preset-prompt-persistence.sh` / `yarn check:preset-structure` | **FAIL** if the prompt-persistence contract (`prompt.md` + the append-only `prompt-log.md` ledger, both on the `routing` entry) is missing from any platform × stack command (`task.md` + `task-continue.md`), orchestrator, or intake body, from the **always-on** root `REPO_AGENTS.md` entry (check **E** — reachability without `/task`), or a core `agent-artifact-contracts` anchor (`## Prompt artifact` / `## Prompt log`) is gone; **refuses vacuous PASS** when the iteration set is empty. Wired into `check-preset-structure.sh` next to `goal-contract`; fixture `test-preset-prompt-persistence-fixtures.mjs`. |
|
|
393
393
|
| `scripts/check-preset-reachability.sh` / `yarn check:preset-reachability` | **FAIL** if a non-`preset-*` OpenCode/Mavis rule is reachable by neither a direct reference (entry / agent / command / skill) nor the transitive closure of rule→rule references from the `root-entry` rules. `preset-*` meta rules are exempt as preset-authoring-only. **Refuses vacuous PASS** on an empty iteration set. Wired into `check-preset-structure.sh` next to `prompt-persistence`. |
|
|
394
|
-
| `scripts/check-preset-language-policy.sh` / `yarn check:preset-structure` | **FAIL** if the native-language policy is absent: the core `_shared/core/agent-team/language-policy.md` tokens, the `language-policy` consumer + `<!-- shared-core -->` marker, the Cursor `globs:`/`alwaysApply: false` + Claude `paths:` shape, the `## Language` setting home (with a BCP-47 marker) in `ai-local/conventions.md`, the always-on anchors (`ai-local-overlay` + `<app-core>`
|
|
394
|
+
| `scripts/check-preset-language-policy.sh` / `yarn check:preset-structure` | **FAIL** if the native-language policy is absent: the core `_shared/core/agent-team/language-policy.md` tokens, the `language-policy` consumer + `<!-- shared-core -->` marker, the Cursor `globs:`/`alwaysApply: false` + Claude `paths:` shape, the `## Language` setting home (with a BCP-47 marker) in `ai-local/conventions.md`, the always-on anchors (`ai-local-overlay` + `<app-core>` + `REPO_AGENTS.md` must contain `native language` and `every user message`), or the `language:` persistence token in `commands/task.md`; **refuses vacuous PASS** when the iteration set is empty. Wired into `check-preset-structure.sh` next to `goal-contract` / `prompt-persistence`; fixture `test-preset-language-policy-fixtures.mjs`. |
|
|
395
395
|
| `scripts/check-preset-self-review-contract.sh` / `yarn check:preset-structure` | **FAIL** if the producer-side self-review / context-hygiene contract is absent: the core `_shared/core/quality/self-review-and-context-hygiene.md` tokens (G0 non-vacuous guard), the `<!-- shared-core: quality/self-review-and-context-hygiene.md -->` marker on `task-analyst` / `feature-developer` / `build-verifier` (×10) and on `debugger` / `code-reviewer` where present (skip-if-absent → `mcp-ts`), the `Self-review` + `re-anchor` tokens on every orchestrator rule, `Self-review` in `team/README.md` + `commands/task.md`, and leakage-free core + docs; **refuses vacuous PASS** when the iteration set is empty. Wired into `check-preset-structure.sh` next to `goal-contract`; fixture `test-preset-self-review-contract-fixtures.mjs`. |
|
|
396
396
|
| `scripts/check-anti-hallucination-coverage.mjs` | **FAIL** when the shared contract, a Cursor load-line embed, a writer stack floor, or a generated Rules-to-load stem is missing. Writer roles are `implementer`, `unit-test`, `e2e`, `qa`, and `reviewer` (`code-reviewer` loads `STACK_FLOOR_STEMS` plus the contract). `/task` and the orchestrator must not name a floor stem. Does not scan consumer `app/**` and does not call Context7. Fixture `test-anti-hallucination-coverage.mjs` deletes `anti-hallucination-contract` from `next.reviewer` in memory and expects FAIL mentioning `next` and `reviewer`. Wired into `check-preset-structure.sh` immediately after `check-claude-agent-blocks.mjs`. |
|
|
397
397
|
| `scripts/check-preset-structure.sh` / `yarn check:preset-structure` | Orchestrator: twin-map + token-budget + leakage + shared-core drift + anti-hallucination coverage (**all hard**; drift via `AI_RULES_DRIFT_FAIL=1`). Does **not** run rule-eval. |
|
|
@@ -24,7 +24,7 @@ The same rule covers code comments and agent-produced artifacts (see `quality/co
|
|
|
24
24
|
Two languages are **orthogonal** and must not be conflated:
|
|
25
25
|
|
|
26
26
|
- **Preset prose language** — the text inside `packages/ai-rules/presets/**` is **English** (this guide). Rule bodies, agents, skills, commands, and package docs are never translated.
|
|
27
|
-
- **Runtime output language** — the language an agent uses to *talk to the user* at run time. The `language-policy` contract makes every user-facing interaction (questions, gate prompts, `/task-continue`, status, summaries, escalations) use the user's native language
|
|
27
|
+
- **Runtime output language** — the language an agent uses to *talk to the user* at run time. The `language-policy` contract makes every user-facing interaction (questions, gate prompts, `/task-continue`, status, summaries, escalations) use the user's native language. Resolution runs on every user message from the always-on surfaces (`.ai.local/conventions.md` `## Language`, else the prompt language, else English), including a message that is not a slash command, and is persisted per task in the `prompt.md` header when a task exists.
|
|
28
28
|
|
|
29
29
|
Consequence: a non-English speaker is answered in their language while the code, reasoning, and every artifact (`brief.md`, `review.md`, the `prompt.md` header, and this preset prose) stay **English**. The policy does **not** introduce non-English text into preset files — runtime dialogue never lives in the presets. The i18n audit below still applies: a retained non-English *example* inside a rule needs an `<!-- i18n-keep: … -->` marker.
|
|
30
30
|
|
package/package.json
CHANGED
|
@@ -24,7 +24,7 @@ Every core file is classified in `scripts/_lib/embed-stems.json` as **embed**, *
|
|
|
24
24
|
|
|
25
25
|
Every task persists the user’s **verbatim** original prompt at `.ai.local/team/tasks/<slug>/prompt.md` (write-if-absent), and every **subsequent user-authored** prompt is appended verbatim to the **append-only** `.ai.local/team/tasks/<slug>/prompt-log.md` ledger (orchestrator-only, `seq` = max + 1, created on first follow-up; hook `followup_message` excluded). The contract lives in `core/agent-team/` (orchestrator + intake rules and `agent-artifact-contracts.md` § Prompt artifact / § Prompt log); both paths are registered on the `routing` manifest entry — never in `artifacts[]` bodies.
|
|
26
26
|
|
|
27
|
-
Every user-facing interaction runs in the user's **native language
|
|
27
|
+
Every user-facing interaction runs in the user's **native language**. Resolution happens on every user message — a question, a one-liner, or a slash command — from the always-on surfaces, before any command runs. Order: an active task's `language:` tag, else the `.ai.local/conventions.md` `## Language` setting (nearest `.ai.local` wins), else the prompt language (mixed → dominant), else English. When a task exists, that tag is persisted as an additive `language: <BCP-47>` line in the `prompt.md` header (+ a `.memlog.md` `event:`). Development, reasoning, and all artifacts stay **English**. The detailed contract is the requestable EMBED stem `core/agent-team/language-policy.md`; the resolution clause rides the always-on `ai-local-overlay`, `<stack>-app-core`, and root `REPO_AGENTS.md` → `AGENTS.md` surfaces (no new always-on slot). Commands reuse the resolved tag; they do not own resolution.
|
|
28
28
|
|
|
29
29
|
## Folders
|
|
30
30
|
|
|
@@ -381,14 +381,22 @@ export function readAllTasks(tasksDir) {
|
|
|
381
381
|
throw error;
|
|
382
382
|
}
|
|
383
383
|
for (const name of names) {
|
|
384
|
-
const
|
|
384
|
+
const taskPath = path.join(tasksDir, name);
|
|
385
|
+
// A plain file (`.gitkeep`, a stray note) is not a task directory: reading
|
|
386
|
+
// `<file>/metrics.json` throws ENOTDIR, which is not ENOENT and would fail
|
|
387
|
+
// the whole verdict with "metrics parse error".
|
|
388
|
+
let isDir = false;
|
|
389
|
+
try { isDir = fs.statSync(taskPath).isDirectory(); } catch { isDir = false; }
|
|
390
|
+
if (!isDir) continue;
|
|
391
|
+
|
|
392
|
+
const metricsPath = path.join(taskPath, 'metrics.json');
|
|
385
393
|
let raw;
|
|
386
394
|
try {
|
|
387
395
|
raw = fs.readFileSync(metricsPath, 'utf8');
|
|
388
396
|
} catch (error) {
|
|
389
397
|
// A task dir without metrics.json yet is normal (in-flight); any other
|
|
390
398
|
// read error is real and must fail the verdict, not shrink the cohort.
|
|
391
|
-
if (error && error.code === 'ENOENT') continue;
|
|
399
|
+
if (error && (error.code === 'ENOENT' || error.code === 'ENOTDIR')) continue;
|
|
392
400
|
errors.push({ task: name, reason: error instanceof Error ? error.message : String(error) });
|
|
393
401
|
continue;
|
|
394
402
|
}
|
|
@@ -0,0 +1,341 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Deterministic writer for `.ai.local/team/tasks/<slug>/artifact-manifest.json`.
|
|
3
|
+
*
|
|
4
|
+
* The manifest is a whole-file merge target: producers rewrite it, so a
|
|
5
|
+
* substring/replace edit over a reconstructed JSON fragment fails as soon as a
|
|
6
|
+
* parallel producer writes or `updatedAt` moves. This CLI does read → merge by
|
|
7
|
+
* entry id → atomic write under the shared exclusive lock, which is the only
|
|
8
|
+
* supported write path for producers and the hook's stall hint.
|
|
9
|
+
*
|
|
10
|
+
* Commands:
|
|
11
|
+
* init --slug <slug> create the skeleton when absent
|
|
12
|
+
* upsert --slug <slug> --id <id> --producer <agent> … merge one owned entry + receipt
|
|
13
|
+
* get --slug <slug> --id <id> print one entry
|
|
14
|
+
* check --slug <slug> validate; exit 1 on any problem
|
|
15
|
+
*
|
|
16
|
+
* Exit codes: 0 ok, 1 usage/validation, 2 manifest parse error (nothing written).
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
import fs from 'node:fs';
|
|
20
|
+
import path from 'node:path';
|
|
21
|
+
import { fileURLToPath } from 'node:url';
|
|
22
|
+
|
|
23
|
+
import { acquireLock, releaseLock } from './lock.mjs';
|
|
24
|
+
|
|
25
|
+
export const MANIFEST_FILE = 'artifact-manifest.json';
|
|
26
|
+
export const DEFAULT_TEAM_ROOT = path.join(process.cwd(), '.ai.local', 'team');
|
|
27
|
+
|
|
28
|
+
const ARTIFACT_STATUSES = ['planned', 'in_progress', 'completed', 'blocked', 'superseded'];
|
|
29
|
+
const TERMINAL_STATUSES = new Set(['completed', 'blocked', 'superseded']);
|
|
30
|
+
const OUTCOMES = ['completed', 'blocked', 'changes_requested', 'validation_failed'];
|
|
31
|
+
// `changes_requested` / `validation_failed` block the pipeline but keep their own
|
|
32
|
+
// outcome vocabulary, so the artifact status is `blocked` (agent-artifact-contracts).
|
|
33
|
+
const BLOCKING_OUTCOMES = new Set(['changes_requested', 'validation_failed']);
|
|
34
|
+
|
|
35
|
+
const USAGE = `usage:
|
|
36
|
+
manifest.mjs init --slug <slug> [--root <team-dir>]
|
|
37
|
+
manifest.mjs upsert --slug <slug> --id <id> --producer <agent> [--status <status>]
|
|
38
|
+
[--outcome <outcome>] [--summary "<text>"] [--paths a.md,b.md]
|
|
39
|
+
[--evidence c.md] [--acs AC-1,AC-2] [--tasks T1,T2]
|
|
40
|
+
[--attempt <attemptId>] [--root <team-dir>]
|
|
41
|
+
manifest.mjs get --slug <slug> --id <id> [--root <team-dir>]
|
|
42
|
+
manifest.mjs check --slug <slug> [--root <team-dir>]`;
|
|
43
|
+
|
|
44
|
+
const fail = (message, code = 1) => {
|
|
45
|
+
const error = new Error(message);
|
|
46
|
+
error.exitCode = code;
|
|
47
|
+
throw error;
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
const isRecord = (value) => value !== null && typeof value === 'object' && !Array.isArray(value);
|
|
51
|
+
|
|
52
|
+
const parseArgs = (argv) => {
|
|
53
|
+
const [command, ...rest] = argv;
|
|
54
|
+
const flags = {};
|
|
55
|
+
for (let index = 0; index < rest.length; index += 1) {
|
|
56
|
+
const token = rest[index];
|
|
57
|
+
if (!token.startsWith('--')) fail(`unexpected argument "${token}"`);
|
|
58
|
+
const [name, inline] = token.slice(2).split('=');
|
|
59
|
+
if (inline !== undefined) {
|
|
60
|
+
flags[name] = inline;
|
|
61
|
+
continue;
|
|
62
|
+
}
|
|
63
|
+
const next = rest[index + 1];
|
|
64
|
+
if (next === undefined || next.startsWith('--')) fail(`flag --${name} needs a value`);
|
|
65
|
+
flags[name] = next;
|
|
66
|
+
index += 1;
|
|
67
|
+
}
|
|
68
|
+
return { command, flags };
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
const csv = (value) =>
|
|
72
|
+
(value || '')
|
|
73
|
+
.split(',')
|
|
74
|
+
.map((item) => item.trim())
|
|
75
|
+
.filter(Boolean);
|
|
76
|
+
|
|
77
|
+
export const manifestPath = (slug, teamRoot = DEFAULT_TEAM_ROOT) =>
|
|
78
|
+
path.join(teamRoot, 'tasks', slug, MANIFEST_FILE);
|
|
79
|
+
|
|
80
|
+
/** Task-directory-relative path guard; mirrors the hook's receipt rejection. */
|
|
81
|
+
export function assertAuthoritativePath(value, slug) {
|
|
82
|
+
if (typeof value !== 'string' || value.trim() === '') fail('authoritativePaths entries must be non-empty strings');
|
|
83
|
+
const candidate = value.trim();
|
|
84
|
+
if (path.isAbsolute(candidate)) {
|
|
85
|
+
fail(`authoritativePaths must be relative to the task directory, got absolute "${candidate}"`);
|
|
86
|
+
}
|
|
87
|
+
const normalized = candidate.split(path.sep).join('/');
|
|
88
|
+
if (normalized === '..' || normalized.startsWith('../')) {
|
|
89
|
+
fail(`authoritativePaths must stay inside the task directory, got "${candidate}"`);
|
|
90
|
+
}
|
|
91
|
+
if (normalized.startsWith('.ai.local/team/tasks/')) {
|
|
92
|
+
fail(
|
|
93
|
+
`authoritativePaths are task-relative ("brief.md"), got the repo-root form "${candidate}" — use evidencePaths for anything outside the task directory`,
|
|
94
|
+
);
|
|
95
|
+
}
|
|
96
|
+
if (normalized.startsWith('archive/')) fail(`authoritativePaths must point at current files, got archived "${candidate}"`);
|
|
97
|
+
void slug;
|
|
98
|
+
return normalized;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
const skeleton = (slug) => ({
|
|
102
|
+
schemaVersion: 1,
|
|
103
|
+
slug,
|
|
104
|
+
updatedAt: new Date().toISOString(),
|
|
105
|
+
artifacts: [],
|
|
106
|
+
});
|
|
107
|
+
|
|
108
|
+
/** Read the manifest; `{ manifest, exists }`. Throws exitCode 2 on invalid JSON. */
|
|
109
|
+
export function readManifest(slug, teamRoot = DEFAULT_TEAM_ROOT) {
|
|
110
|
+
const filePath = manifestPath(slug, teamRoot);
|
|
111
|
+
if (!fs.existsSync(filePath)) return { manifest: skeleton(slug), exists: false, filePath };
|
|
112
|
+
const raw = fs.readFileSync(filePath, 'utf8');
|
|
113
|
+
let parsed;
|
|
114
|
+
try {
|
|
115
|
+
parsed = JSON.parse(raw);
|
|
116
|
+
} catch (error) {
|
|
117
|
+
fail(
|
|
118
|
+
`${filePath}: invalid JSON (${error.message}). Re-read the file and repair it before retrying; nothing was written.`,
|
|
119
|
+
2,
|
|
120
|
+
);
|
|
121
|
+
}
|
|
122
|
+
if (!isRecord(parsed)) fail(`${filePath}: top level must be an object`, 2);
|
|
123
|
+
if (parsed.entries !== undefined) {
|
|
124
|
+
process.stderr.write(
|
|
125
|
+
`WARNING: ${filePath} has a top-level "entries" key; the schema reads only "artifacts". ` +
|
|
126
|
+
'Re-run the merge with this writer to drop the stray key.\n',
|
|
127
|
+
);
|
|
128
|
+
}
|
|
129
|
+
if (!Array.isArray(parsed.artifacts)) parsed.artifacts = [];
|
|
130
|
+
return { manifest: parsed, exists: true, filePath };
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
/** Atomic whole-file write: temp file in the same directory, then rename. */
|
|
134
|
+
export function writeManifestSync(filePath, manifest) {
|
|
135
|
+
fs.mkdirSync(path.dirname(filePath), { recursive: true });
|
|
136
|
+
const temporary = `${filePath}.${process.pid}.tmp`;
|
|
137
|
+
fs.writeFileSync(temporary, `${JSON.stringify(manifest, null, 2)}\n`, 'utf8');
|
|
138
|
+
fs.renameSync(temporary, filePath);
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
function mergeEntry(manifest, entry) {
|
|
142
|
+
const index = manifest.artifacts.findIndex((item) => isRecord(item) && item.id === entry.id);
|
|
143
|
+
const previous = index >= 0 ? manifest.artifacts[index] : null;
|
|
144
|
+
const now = new Date().toISOString();
|
|
145
|
+
const timestamps = {
|
|
146
|
+
...(isRecord(previous?.timestamps) ? previous.timestamps : {}),
|
|
147
|
+
createdAt: previous?.timestamps?.createdAt || now,
|
|
148
|
+
updatedAt: now,
|
|
149
|
+
};
|
|
150
|
+
if (TERMINAL_STATUSES.has(entry.status)) timestamps.completedAt = now;
|
|
151
|
+
const merged = {
|
|
152
|
+
...(previous || {}),
|
|
153
|
+
...entry,
|
|
154
|
+
timestamps,
|
|
155
|
+
};
|
|
156
|
+
if (index >= 0) manifest.artifacts[index] = merged;
|
|
157
|
+
else manifest.artifacts.push(merged);
|
|
158
|
+
return merged;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
/**
|
|
162
|
+
* Merge one owned entry into the manifest. Exported for fixtures; the CLI is
|
|
163
|
+
* the supported entry point.
|
|
164
|
+
*/
|
|
165
|
+
export function upsertManifestEntry({ slug, entry, teamRoot = DEFAULT_TEAM_ROOT }) {
|
|
166
|
+
const { manifest, filePath } = readManifest(slug, teamRoot);
|
|
167
|
+
delete manifest.entries;
|
|
168
|
+
manifest.schemaVersion = manifest.schemaVersion || 1;
|
|
169
|
+
manifest.slug = manifest.slug || slug;
|
|
170
|
+
const merged = mergeEntry(manifest, entry);
|
|
171
|
+
manifest.updatedAt = new Date().toISOString();
|
|
172
|
+
writeManifestSync(filePath, manifest);
|
|
173
|
+
return { filePath, entry: merged };
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
const buildEntry = (flags, slug) => {
|
|
177
|
+
const id = flags.id;
|
|
178
|
+
const producer = flags.producer;
|
|
179
|
+
if (!id) fail('--id is required');
|
|
180
|
+
if (!producer) fail('--producer is required');
|
|
181
|
+
const outcome = flags.outcome;
|
|
182
|
+
if (outcome && !OUTCOMES.includes(outcome)) fail(`--outcome must be one of ${OUTCOMES.join(' | ')}`);
|
|
183
|
+
let status = flags.status || (outcome ? 'completed' : 'in_progress');
|
|
184
|
+
if (outcome && BLOCKING_OUTCOMES.has(outcome)) status = 'blocked';
|
|
185
|
+
if (!ARTIFACT_STATUSES.includes(status)) fail(`--status must be one of ${ARTIFACT_STATUSES.join(' | ')}`);
|
|
186
|
+
if (TERMINAL_STATUSES.has(status) && !outcome) fail(`--outcome is required when --status is ${status}`);
|
|
187
|
+
const authoritativePaths = csv(flags.paths).map((value) => assertAuthoritativePath(value, slug));
|
|
188
|
+
if (authoritativePaths.length === 0) fail('--paths is required (comma-separated task-relative paths)');
|
|
189
|
+
const entry = {
|
|
190
|
+
id,
|
|
191
|
+
producer,
|
|
192
|
+
status,
|
|
193
|
+
authoritativePaths,
|
|
194
|
+
acceptanceCriteriaIds: csv(flags.acs),
|
|
195
|
+
taskIds: csv(flags.tasks),
|
|
196
|
+
};
|
|
197
|
+
if (outcome) {
|
|
198
|
+
entry.receipt = {
|
|
199
|
+
outcome,
|
|
200
|
+
summary: flags.summary || `${producer} ${outcome} (${id})`,
|
|
201
|
+
evidencePaths: csv(flags.evidence).length > 0 ? csv(flags.evidence) : authoritativePaths,
|
|
202
|
+
};
|
|
203
|
+
if (flags.attempt) entry.receipt.attemptId = flags.attempt;
|
|
204
|
+
if (flags.claim) entry.receipt.claim = flags.claim;
|
|
205
|
+
if (flags['context-files']) entry.receipt.contextFiles = csv(flags['context-files']);
|
|
206
|
+
}
|
|
207
|
+
return entry;
|
|
208
|
+
};
|
|
209
|
+
|
|
210
|
+
/** Schema check used by `check` and by fixtures. Returns a list of problem strings. */
|
|
211
|
+
export function validateManifest(manifest, slug) {
|
|
212
|
+
const problems = [];
|
|
213
|
+
if (!isRecord(manifest)) return ['top level must be an object'];
|
|
214
|
+
if (manifest.schemaVersion !== 1) problems.push('schemaVersion must be 1');
|
|
215
|
+
if (manifest.slug !== slug) problems.push(`slug must match the task directory ("${slug}")`);
|
|
216
|
+
if (typeof manifest.updatedAt !== 'string' || Number.isNaN(Date.parse(manifest.updatedAt))) {
|
|
217
|
+
problems.push('updatedAt must be an ISO 8601 timestamp');
|
|
218
|
+
}
|
|
219
|
+
if (!Array.isArray(manifest.artifacts)) return [...problems, 'artifacts must be an array'];
|
|
220
|
+
if (manifest.entries !== undefined) problems.push('top-level "entries" is not part of the schema; merge into "artifacts"');
|
|
221
|
+
const seen = new Set();
|
|
222
|
+
manifest.artifacts.forEach((entry, index) => {
|
|
223
|
+
const at = `artifacts[${index}]`;
|
|
224
|
+
if (!isRecord(entry)) {
|
|
225
|
+
problems.push(`${at} must be an object`);
|
|
226
|
+
return;
|
|
227
|
+
}
|
|
228
|
+
if (typeof entry.id !== 'string' || entry.id === '') problems.push(`${at}.id is required`);
|
|
229
|
+
else if (seen.has(entry.id)) problems.push(`${at}.id "${entry.id}" is duplicated`);
|
|
230
|
+
else seen.add(entry.id);
|
|
231
|
+
if (typeof entry.producer !== 'string' || entry.producer === '') problems.push(`${at}.producer is required`);
|
|
232
|
+
if (!ARTIFACT_STATUSES.includes(entry.status)) problems.push(`${at}.status must be one of ${ARTIFACT_STATUSES.join(' | ')}`);
|
|
233
|
+
if (!Array.isArray(entry.authoritativePaths) || entry.authoritativePaths.length === 0) {
|
|
234
|
+
problems.push(`${at}.authoritativePaths must be a non-empty array`);
|
|
235
|
+
} else {
|
|
236
|
+
for (const value of entry.authoritativePaths) {
|
|
237
|
+
try {
|
|
238
|
+
assertAuthoritativePath(value, slug);
|
|
239
|
+
} catch (error) {
|
|
240
|
+
problems.push(`${at}.authoritativePaths: ${error.message}`);
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
for (const key of ['acceptanceCriteriaIds', 'taskIds']) {
|
|
245
|
+
if (!Array.isArray(entry[key])) problems.push(`${at}.${key} must be an array (may be empty)`);
|
|
246
|
+
}
|
|
247
|
+
if (!isRecord(entry.timestamps) || typeof entry.timestamps.updatedAt !== 'string') {
|
|
248
|
+
problems.push(`${at}.timestamps.updatedAt is required`);
|
|
249
|
+
}
|
|
250
|
+
if (TERMINAL_STATUSES.has(entry.status)) {
|
|
251
|
+
if (!isRecord(entry.receipt) || !OUTCOMES.includes(entry.receipt.outcome)) {
|
|
252
|
+
problems.push(`${at}.receipt.outcome is required when status is ${entry.status}`);
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
});
|
|
256
|
+
return problems;
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
export function runCli(argv) {
|
|
260
|
+
const { command, flags } = parseArgs(argv);
|
|
261
|
+
if (!command || command === '--help' || command === 'help') {
|
|
262
|
+
process.stdout.write(`${USAGE}\n`);
|
|
263
|
+
return 0;
|
|
264
|
+
}
|
|
265
|
+
const slug = flags.slug;
|
|
266
|
+
if (!slug) fail('--slug is required');
|
|
267
|
+
const teamRoot = flags.root ? path.resolve(flags.root) : DEFAULT_TEAM_ROOT;
|
|
268
|
+
const taskDir = path.join(teamRoot, 'tasks', slug);
|
|
269
|
+
|
|
270
|
+
if (command === 'init') {
|
|
271
|
+
const filePath = manifestPath(slug, teamRoot);
|
|
272
|
+
if (fs.existsSync(filePath)) {
|
|
273
|
+
process.stdout.write(`${filePath} already exists; left untouched\n`);
|
|
274
|
+
return 0;
|
|
275
|
+
}
|
|
276
|
+
writeManifestSync(filePath, skeleton(slug));
|
|
277
|
+
process.stdout.write(`${filePath} created\n`);
|
|
278
|
+
return 0;
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
if (command === 'get') {
|
|
282
|
+
if (!flags.id) fail('--id is required');
|
|
283
|
+
const { manifest } = readManifest(slug, teamRoot);
|
|
284
|
+
const entry = manifest.artifacts.find((item) => isRecord(item) && item.id === flags.id);
|
|
285
|
+
if (!entry) fail(`no artifact entry with id "${flags.id}" in ${manifestPath(slug, teamRoot)}`, 2);
|
|
286
|
+
process.stdout.write(`${JSON.stringify(entry, null, 2)}\n`);
|
|
287
|
+
return 0;
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
if (command === 'check') {
|
|
291
|
+
const { manifest, filePath, exists } = readManifest(slug, teamRoot);
|
|
292
|
+
if (!exists) fail(`${filePath} does not exist; run "manifest.mjs init --slug ${slug}" first`);
|
|
293
|
+
const problems = validateManifest(manifest, slug);
|
|
294
|
+
if (problems.length > 0) {
|
|
295
|
+
for (const problem of problems) process.stdout.write(`${filePath}: ${problem}\n`);
|
|
296
|
+
return 1;
|
|
297
|
+
}
|
|
298
|
+
process.stdout.write(`${filePath}: ok (${manifest.artifacts.length} entries)\n`);
|
|
299
|
+
return 0;
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
if (command === 'upsert') {
|
|
303
|
+
const entry = buildEntry(flags, slug);
|
|
304
|
+
fs.mkdirSync(taskDir, { recursive: true });
|
|
305
|
+
const lockPath = path.join(taskDir, '.manifest.lock');
|
|
306
|
+
const token = acquireLock(lockPath, { timeoutMs: 5000 });
|
|
307
|
+
let result;
|
|
308
|
+
try {
|
|
309
|
+
result = upsertManifestEntry({ slug, entry, teamRoot });
|
|
310
|
+
} finally {
|
|
311
|
+
releaseLock(lockPath, token);
|
|
312
|
+
}
|
|
313
|
+
process.stdout.write(
|
|
314
|
+
`${result.filePath}: ${result.entry.id} → ${result.entry.status}` +
|
|
315
|
+
`${result.entry.receipt ? ` (${result.entry.receipt.outcome})` : ''}\n`,
|
|
316
|
+
);
|
|
317
|
+
return 0;
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
fail(`unknown command "${command}"\n${USAGE}`);
|
|
321
|
+
return 1;
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
const invokedDirectly = (() => {
|
|
325
|
+
if (!process.argv[1]) return false;
|
|
326
|
+
try {
|
|
327
|
+
// Compare realpaths: a tmpdir / symlinked checkout path would otherwise
|
|
328
|
+
// skip the CLI silently while still exiting 0.
|
|
329
|
+
return fs.realpathSync(process.argv[1]) === fs.realpathSync(fileURLToPath(import.meta.url));
|
|
330
|
+
} catch {
|
|
331
|
+
return false;
|
|
332
|
+
}
|
|
333
|
+
})();
|
|
334
|
+
if (invokedDirectly) {
|
|
335
|
+
try {
|
|
336
|
+
process.exitCode = runCli(process.argv.slice(2));
|
|
337
|
+
} catch (error) {
|
|
338
|
+
process.stderr.write(`${error.message}\n`);
|
|
339
|
+
process.exitCode = error.exitCode || 1;
|
|
340
|
+
}
|
|
341
|
+
}
|
|
@@ -81,6 +81,9 @@ A producer finishes its step by upserting only its owned artifact entry and term
|
|
|
81
81
|
|
|
82
82
|
> **Receipt binding (owner prompts).** Each owning-agent prompt (`feature-developer`, `build-verifier`, `code-reviewer`, `debugger`, `qa-tester` across `cursor/` and `claude/` platforms × 10 stacks) carries the same one-paragraph callout under `## On completion` (or appended as `## Receipt binding` when no `On completion` section exists). When writing the terminal receipt, set `entry.receipt.attemptId = <attemptId supplied by the orchestrator>`. 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.
|
|
83
83
|
|
|
84
|
+
> **Plan closure is part of the receipt.** When the change carries `openspec/changes/<id>/tasks.md`, the producing agent ticks (`- [ ]` → `- [x]`) every row it closed in the same turn as the receipt. A closed receipt with unticked rows makes `openspec list` report stale progress and hides the real exit criteria from the next agent; the owner reconciles it before the next handoff and names the gap when it cannot.
|
|
85
|
+
|
|
86
|
+
|
|
84
87
|
## Ownership and writes
|
|
85
88
|
|
|
86
89
|
- Agents own their output artifacts and their items in `manifest.artifacts[]` (with their receipts). They merge by stable `id` and preserve all foreign items.
|
|
@@ -91,6 +94,25 @@ A producer finishes its step by upserting only its owned artifact entry and term
|
|
|
91
94
|
- Parallel producers need distinct entry IDs. Their parent/orchestrator serializes manifest merges; agents must not use the shared manifest as a concurrency lock.
|
|
92
95
|
- Re-dispatch after a retry is **slot-filtered**: only unsatisfied `(stepIndex, agent)` slots are re-invoked. A satisfied sibling keeps its entry and its terminal metric and is never re-run; the hook resolves the producer through the step graph when one exists.
|
|
93
96
|
|
|
97
|
+
## Manifest write protocol
|
|
98
|
+
|
|
99
|
+
The manifest is a **whole-file merge target**, never a substring patch. Producers rewrite it while other producers rewrite it, and every write refreshes root `updatedAt`, so a reconstructed fragment stops matching.
|
|
100
|
+
|
|
101
|
+
1. Read the file; when it is absent create the skeleton `{ "schemaVersion": 1, "slug": "<slug>", "updatedAt": "<iso>", "artifacts": [] }`. The hook seeds the same skeleton when a receipt is missing (`chain-team-phases.sh` › `readBoundReceiptOutcome`).
|
|
102
|
+
2. Merge by stable `entry.id` **in memory**: replace the owned entry, keep every foreign item and every unknown field you do not own, then refresh root `updatedAt`.
|
|
103
|
+
3. Write the whole file atomically (temp file in the task directory, then rename). Read → merge → write in one process call; never carry a snapshot across steps or turns.
|
|
104
|
+
4. Use the shipped writer (`init` seeds it at `.ai.local/scripts/manifest.mjs`):
|
|
105
|
+
```bash
|
|
106
|
+
node .ai.local/scripts/manifest.mjs upsert --slug <slug> --id <id> --producer <agent> \
|
|
107
|
+
--status completed --outcome completed --paths brief.md,decomposition.md \
|
|
108
|
+
--acs AC-1 --tasks T1 --attempt <attemptId>
|
|
109
|
+
node .ai.local/scripts/manifest.mjs check --slug <slug>
|
|
110
|
+
```
|
|
111
|
+
It rejects absolute paths, `..` escapes, and repo-root `authoritativePaths`, and it drops a stray top-level `entries` key.
|
|
112
|
+
5. Never patch the JSON with a fragment/replace edit (`edit`, `str_replace`, `apply_patch`). A single-byte mismatch aborts the receipt mid-task, leaves the manifest out of sync with the produced artifact, and stalls the step in `awaiting_artifact_receipt`.
|
|
113
|
+
6. A failed merge or parse is a retry signal, not a guess signal: re-read, merge again, at most twice, then report `blocked` with the parse/merge error. Never leave the file truncated or half-written.
|
|
114
|
+
7. Parallel wave: the writer holds `.manifest.lock` in the task directory, so concurrent producers serialize. A hand-written merge must take the same lock. Entry `id` uniqueness stays the only shared invariant — the manifest is not a coordination lock.
|
|
115
|
+
|
|
94
116
|
## Figma contract artifact
|
|
95
117
|
|
|
96
118
|
A UI task with a Figma mockup persists a machine-readable **Figma contract** alongside the human review:
|
|
@@ -126,7 +148,7 @@ Every task persists the **verbatim original user prompt** — whether or not `/t
|
|
|
126
148
|
|
|
127
149
|
**Verbatim semantics:** the fenced `text` block is the source of truth. The header is additive only and must never alter, translate, or paraphrase the user's words (the requester's language is preserved; the header stays English). The persisted prompt is a task-folder artifact subject to the no-local-paths discipline — any redaction is an explicit owner decision, never silent.
|
|
128
150
|
|
|
129
|
-
**Dialogue language (`language: <BCP-47>`):** the header also carries the task's resolved user-facing language (see **language-policy**).
|
|
151
|
+
**Dialogue language (`language: <BCP-47>`):** the header also carries the task's resolved user-facing language (see **language-policy**). The always-on rule resolves it on every user message (`.ai.local` `## Language` → prompt language → English; mixed → dominant; nearest `.ai.local` wins). When a task starts, that tag is recorded once and reused by every later step and `/task-continue`. A later correction is an append-only `.memlog.md` `event:` line — the fenced verbatim block stays frozen. The value never lives in `status.json`, `metrics.json`, or an `artifacts[]` body (see Context index conventions 7 and the hook-only lifecycle contract).
|
|
130
152
|
|
|
131
153
|
## Prompt log
|
|
132
154
|
|
|
@@ -7,6 +7,6 @@ When the user message looks like a **work request** (implement, add, fix, refact
|
|
|
7
7
|
3. Pure questions (“how does X work”, “explain”) — prefer agent **`codebase-analyzer`** (explain-as-is); trivial one-liners may be answered inline. Do not open `/task`.
|
|
8
8
|
4. A work request now runs the planning workflow — **goal frame → requirements → information-sufficiency → decompose** (dependency graph / epics); see **task-framing** and **plan-graph**.
|
|
9
9
|
5. Every **work request** — with or without `/task`, and even when the user says “no pipeline” / “just do it” — persists the **verbatim** original prompt at `.ai.local/team/tasks/<slug>/prompt.md`. Prefer `/task` (its **Slug** step writes it). If handling inline without `/task`, first create the slug dir and write `prompt.md` (write-if-absent), then proceed. Pure questions and trivial one-liners are not work requests → no file. On an inline follow-up for an existing slug (no `/task`) where the user authors new text, append it verbatim to `.ai.local/team/tasks/<slug>/prompt-log.md` (`seq` = max + 1; create on first append; exclude machine-generated and empty/argument-less invocations).
|
|
10
|
-
6. **
|
|
10
|
+
6. **Reuse the dialogue language already resolved on this turn** (always-on `ai-local-overlay` / **language-policy**). A question and a message without a slash command still resolve before you speak. When this request writes `prompt.md`, persist that tag once in the header (`language: <BCP-47>`) + a `.memlog.md` `event:` line. Development, reasoning, and artifacts stay English. The setting wins over a mid-task prompt switch (surface it once, never ask). See **language-policy**.
|
|
11
11
|
|
|
12
12
|
Exceptions: user explicitly says “no pipeline”, “just do it”, or continues an active slug.
|