@bonesofspring/ai-rules 0.2.56 → 0.2.60
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 +116 -1
- package/README.md +68 -3
- package/bin/cli.js +399 -27
- package/bin/lib/engine-scripts.js +3 -0
- package/bin/lib/mcp/catalog.js +97 -0
- package/bin/lib/mcp/clients.js +35 -2
- package/bin/lib/mcp/credentials.js +85 -1
- package/bin/lib/mcp/doctor.js +93 -17
- package/bin/lib/mcp/registry.js +10 -4
- package/bin/lib/seed-ai-local-team.js +8 -5
- package/docs/MCP-CATALOG.md +56 -0
- package/docs/MCP-SETUP.md +38 -6
- package/docs/PRESET-CONTRIBUTION.md +14 -1
- package/docs/TEAM-DB.md +34 -1
- package/docs/openapi/team-db.v1.json +17 -2
- package/mcp/github-proxy.mjs +133 -0
- package/mcp/lib/github.mjs +187 -0
- package/mcp/lib/streamable-http.mjs +185 -0
- package/mcp/lib/yandex.mjs +16 -137
- package/package.json +4 -1
- package/presets/_shared/ai-local/scripts/check-write-scope.mjs +212 -0
- package/presets/_shared/ai-local/scripts/rule-improver.mjs +674 -74
- package/presets/_shared/ai-local/scripts/run.mjs +143 -9
- package/presets/_shared/ai-local/scripts/team-db-api.mjs +1 -0
- package/presets/_shared/ai-local/scripts/team-db-openapi.mjs +6 -1
- package/presets/_shared/ai-local/scripts/team-db-project.mjs +1 -1
- package/presets/_shared/ai-local/scripts/team-db-schema.mjs +79 -9
- package/presets/_shared/core/agent-team/agent-team-orchestrator.md +29 -6
- package/presets/_shared/core/quality/self-review-and-context-hygiene.md +3 -1
- package/presets/_shared/core/review/code-review-mr.md +10 -0
- package/presets/_shared/hooks/chain-team-phases.sh.tmpl +163 -16
- 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/task-analyst.md +1 -1
- package/presets/claude/android-kotlin/commands/update.md +1 -0
- package/presets/claude/android-kotlin/hooks/chain-team-phases.sh +163 -16
- package/presets/claude/android-kotlin/rules/tooling-and-review/agent-team-orchestrator.md +29 -6
- package/presets/claude/android-kotlin/rules/tooling-and-review/code-review.md +10 -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/task-analyst.md +1 -1
- package/presets/claude/go/commands/update.md +1 -0
- package/presets/claude/go/hooks/chain-team-phases.sh +163 -16
- package/presets/claude/go/rules/tooling-and-review/agent-team-orchestrator.md +29 -6
- package/presets/claude/go/rules/tooling-and-review/code-review.md +10 -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/task-analyst.md +1 -1
- package/presets/claude/ios-swift/commands/update.md +1 -0
- package/presets/claude/ios-swift/hooks/chain-team-phases.sh +163 -16
- package/presets/claude/ios-swift/rules/tooling-and-review/agent-team-orchestrator.md +29 -6
- package/presets/claude/ios-swift/rules/tooling-and-review/code-review.md +10 -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/task-analyst.md +1 -1
- package/presets/claude/java/commands/update.md +1 -0
- package/presets/claude/java/hooks/chain-team-phases.sh +163 -16
- package/presets/claude/java/rules/tooling-and-review/agent-team-orchestrator.md +29 -6
- package/presets/claude/java/rules/tooling-and-review/code-review.md +10 -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/agents/task-analyst.md +1 -1
- package/presets/claude/mcp-ts/commands/update.md +1 -0
- package/presets/claude/mcp-ts/hooks/chain-team-phases.sh +163 -16
- package/presets/claude/mcp-ts/rules/tooling-and-review/agent-team-orchestrator.md +29 -6
- package/presets/claude/mcp-ts/rules/tooling-and-review/code-review.md +10 -0
- package/presets/claude/mol/agents/build-verifier.md +1 -1
- package/presets/claude/mol/agents/code-reviewer.md +1 -1
- package/presets/claude/mol/agents/debugger.md +1 -1
- package/presets/claude/mol/agents/feature-developer.md +1 -1
- package/presets/claude/mol/agents/task-analyst.md +1 -1
- package/presets/claude/mol/commands/update.md +1 -0
- package/presets/claude/mol/hooks/chain-team-phases.sh +163 -16
- package/presets/claude/mol/rules/tooling-and-review/agent-team-orchestrator.md +29 -6
- package/presets/claude/mol/rules/tooling-and-review/code-review-mr.md +10 -0
- package/presets/claude/next/agents/build-verifier.md +18 -1
- package/presets/claude/next/agents/code-reviewer.md +9 -1
- package/presets/claude/next/agents/debugger.md +1 -1
- package/presets/claude/next/agents/feature-developer.md +13 -1
- package/presets/claude/next/agents/task-analyst.md +1 -1
- package/presets/claude/next/agents/task-router.md +10 -0
- package/presets/claude/next/commands/task-continue.md +3 -1
- package/presets/claude/next/commands/update.md +1 -0
- package/presets/claude/next/hooks/chain-team-phases.sh +163 -16
- package/presets/claude/next/rules/tooling-and-review/agent-team-orchestrator.md +29 -6
- package/presets/claude/next/rules/tooling-and-review/code-review-mr.md +12 -1
- 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/task-analyst.md +1 -1
- package/presets/claude/nuxt/commands/update.md +1 -0
- package/presets/claude/nuxt/hooks/chain-team-phases.sh +163 -16
- package/presets/claude/nuxt/rules/tooling-and-review/agent-team-orchestrator.md +29 -6
- package/presets/claude/nuxt/rules/tooling-and-review/code-review-mr.md +10 -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/task-analyst.md +1 -1
- package/presets/claude/php-hexagonal/commands/update.md +1 -0
- package/presets/claude/php-hexagonal/hooks/chain-team-phases.sh +163 -16
- package/presets/claude/php-hexagonal/rules/tooling-and-review/agent-team-orchestrator.md +29 -6
- package/presets/claude/php-hexagonal/rules/tooling-and-review/code-review.md +10 -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/task-analyst.md +1 -1
- package/presets/claude/php-laravel/commands/update.md +1 -0
- package/presets/claude/php-laravel/hooks/chain-team-phases.sh +163 -16
- package/presets/claude/php-laravel/rules/tooling-and-review/agent-team-orchestrator.md +29 -6
- package/presets/claude/php-laravel/rules/tooling-and-review/code-review.md +10 -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/task-analyst.md +1 -1
- package/presets/claude/svelte/commands/update.md +1 -0
- package/presets/claude/svelte/hooks/chain-team-phases.sh +163 -16
- package/presets/claude/svelte/rules/tooling-and-review/agent-team-orchestrator.md +29 -6
- package/presets/claude/svelte/rules/tooling-and-review/code-review-mr.md +10 -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/task-analyst.md +1 -1
- package/presets/cursor/android-kotlin/commands/update.md +1 -0
- package/presets/cursor/android-kotlin/hooks/chain-team-phases.sh +163 -16
- package/presets/cursor/android-kotlin/rules/agent-team-orchestrator.mdc +1 -1
- package/presets/cursor/android-kotlin/rules/code-review-mr.mdc +10 -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/task-analyst.md +1 -1
- package/presets/cursor/go/commands/update.md +1 -0
- package/presets/cursor/go/hooks/chain-team-phases.sh +163 -16
- package/presets/cursor/go/rules/agent-team-orchestrator.mdc +1 -1
- package/presets/cursor/go/rules/code-review-mr.mdc +10 -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/task-analyst.md +1 -1
- package/presets/cursor/ios-swift/commands/update.md +1 -0
- package/presets/cursor/ios-swift/hooks/chain-team-phases.sh +163 -16
- package/presets/cursor/ios-swift/rules/agent-team-orchestrator.mdc +1 -1
- package/presets/cursor/ios-swift/rules/code-review-mr.mdc +10 -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/task-analyst.md +1 -1
- package/presets/cursor/java/commands/update.md +1 -0
- package/presets/cursor/java/hooks/chain-team-phases.sh +163 -16
- package/presets/cursor/java/rules/agent-team-orchestrator.mdc +1 -1
- package/presets/cursor/java/rules/code-review-mr.mdc +10 -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/agents/task-analyst.md +1 -1
- package/presets/cursor/mcp-ts/commands/update.md +1 -0
- package/presets/cursor/mcp-ts/hooks/chain-team-phases.sh +163 -16
- package/presets/cursor/mcp-ts/rules/agent-team-orchestrator.mdc +1 -1
- package/presets/cursor/mcp-ts/rules/code-review-mr.mdc +10 -0
- package/presets/cursor/mol/MCP.md +4 -3
- package/presets/cursor/mol/agents/build-verifier.md +1 -1
- package/presets/cursor/mol/agents/code-reviewer.md +1 -1
- package/presets/cursor/mol/agents/debugger.md +1 -1
- package/presets/cursor/mol/agents/feature-developer.md +1 -1
- package/presets/cursor/mol/agents/task-analyst.md +1 -1
- package/presets/cursor/mol/commands/update.md +1 -0
- package/presets/cursor/mol/hooks/chain-team-phases.sh +163 -16
- package/presets/cursor/mol/rules/agent-team-orchestrator.mdc +1 -1
- package/presets/cursor/mol/rules/code-review-mr.mdc +10 -0
- package/presets/cursor/next/MCP.md +4 -3
- package/presets/cursor/next/agents/README.md +2 -0
- package/presets/cursor/next/agents/build-verifier.md +18 -1
- package/presets/cursor/next/agents/code-reviewer.md +9 -1
- package/presets/cursor/next/agents/debugger.md +1 -1
- package/presets/cursor/next/agents/feature-developer.md +13 -1
- package/presets/cursor/next/agents/task-analyst.md +1 -1
- package/presets/cursor/next/agents/task-router.md +10 -0
- package/presets/cursor/next/commands/task-continue.md +3 -1
- package/presets/cursor/next/commands/update.md +1 -0
- package/presets/cursor/next/hooks/chain-team-phases.sh +163 -16
- package/presets/cursor/next/rules/agent-team-orchestrator.mdc +1 -1
- package/presets/cursor/next/rules/code-review-mr.mdc +12 -1
- package/presets/cursor/next/team/fixtures/feature-l2-lite.json +27 -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/task-analyst.md +1 -1
- package/presets/cursor/nuxt/commands/update.md +1 -0
- package/presets/cursor/nuxt/hooks/chain-team-phases.sh +163 -16
- package/presets/cursor/nuxt/rules/agent-team-orchestrator.mdc +1 -1
- package/presets/cursor/nuxt/rules/code-review-mr.mdc +10 -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/task-analyst.md +1 -1
- package/presets/cursor/php-hexagonal/commands/update.md +1 -0
- package/presets/cursor/php-hexagonal/hooks/chain-team-phases.sh +163 -16
- package/presets/cursor/php-hexagonal/rules/agent-team-orchestrator.mdc +1 -1
- package/presets/cursor/php-hexagonal/rules/code-review-mr.mdc +10 -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/task-analyst.md +1 -1
- package/presets/cursor/php-laravel/commands/update.md +1 -0
- package/presets/cursor/php-laravel/hooks/chain-team-phases.sh +163 -16
- package/presets/cursor/php-laravel/rules/agent-team-orchestrator.mdc +1 -1
- package/presets/cursor/php-laravel/rules/code-review-mr.mdc +10 -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/task-analyst.md +1 -1
- package/presets/cursor/svelte/commands/update.md +1 -0
- package/presets/cursor/svelte/hooks/chain-team-phases.sh +163 -16
- package/presets/cursor/svelte/rules/agent-team-orchestrator.mdc +1 -1
- package/presets/cursor/svelte/rules/code-review-mr.mdc +10 -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/task-analyst.md +1 -1
- package/presets/mavis/android-kotlin/commands/update.md +1 -0
- package/presets/mavis/android-kotlin/hooks/chain-team-phases.sh +163 -16
- package/presets/mavis/android-kotlin/rules/agent-team-orchestrator.md +29 -6
- package/presets/mavis/android-kotlin/rules/code-review-mr.md +10 -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/task-analyst.md +1 -1
- package/presets/mavis/go/commands/update.md +1 -0
- package/presets/mavis/go/hooks/chain-team-phases.sh +163 -16
- package/presets/mavis/go/rules/agent-team-orchestrator.md +29 -6
- package/presets/mavis/go/rules/code-review-mr.md +10 -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/task-analyst.md +1 -1
- package/presets/mavis/ios-swift/commands/update.md +1 -0
- package/presets/mavis/ios-swift/hooks/chain-team-phases.sh +163 -16
- package/presets/mavis/ios-swift/rules/agent-team-orchestrator.md +29 -6
- package/presets/mavis/ios-swift/rules/code-review-mr.md +10 -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/task-analyst.md +1 -1
- package/presets/mavis/java/commands/update.md +1 -0
- package/presets/mavis/java/hooks/chain-team-phases.sh +163 -16
- package/presets/mavis/java/rules/agent-team-orchestrator.md +29 -6
- package/presets/mavis/java/rules/code-review-mr.md +10 -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/agents/task-analyst.md +1 -1
- package/presets/mavis/mcp-ts/commands/update.md +1 -0
- package/presets/mavis/mcp-ts/hooks/chain-team-phases.sh +163 -16
- package/presets/mavis/mcp-ts/rules/agent-team-orchestrator.md +29 -6
- package/presets/mavis/mcp-ts/rules/code-review-mr.md +10 -0
- package/presets/mavis/mol/MCP.md +4 -3
- package/presets/mavis/mol/adapter-map.json +1 -1
- package/presets/mavis/mol/agents/build-verifier.md +1 -1
- package/presets/mavis/mol/agents/code-reviewer.md +1 -1
- package/presets/mavis/mol/agents/debugger.md +1 -1
- package/presets/mavis/mol/agents/feature-developer.md +1 -1
- package/presets/mavis/mol/agents/task-analyst.md +1 -1
- package/presets/mavis/mol/commands/update.md +1 -0
- package/presets/mavis/mol/hooks/chain-team-phases.sh +163 -16
- package/presets/mavis/mol/rules/agent-team-orchestrator.md +29 -6
- package/presets/mavis/mol/rules/code-review-mr.md +10 -0
- package/presets/mavis/next/MCP.md +4 -3
- package/presets/mavis/next/adapter-map.json +9 -1
- package/presets/mavis/next/agents/build-verifier.md +18 -1
- package/presets/mavis/next/agents/code-reviewer.md +9 -1
- package/presets/mavis/next/agents/debugger.md +1 -1
- package/presets/mavis/next/agents/feature-developer.md +13 -1
- package/presets/mavis/next/agents/task-analyst.md +1 -1
- package/presets/mavis/next/agents/task-router.md +10 -0
- package/presets/mavis/next/commands/task-continue.md +3 -1
- package/presets/mavis/next/commands/update.md +1 -0
- package/presets/mavis/next/hooks/chain-team-phases.sh +163 -16
- package/presets/mavis/next/rules/agent-team-orchestrator.md +29 -6
- package/presets/mavis/next/rules/code-review-mr.md +12 -1
- package/presets/mavis/next/team/fixtures/feature-l2-lite.json +27 -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/task-analyst.md +1 -1
- package/presets/mavis/nuxt/commands/update.md +1 -0
- package/presets/mavis/nuxt/hooks/chain-team-phases.sh +163 -16
- package/presets/mavis/nuxt/rules/agent-team-orchestrator.md +29 -6
- package/presets/mavis/nuxt/rules/code-review-mr.md +10 -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/task-analyst.md +1 -1
- package/presets/mavis/php-hexagonal/commands/update.md +1 -0
- package/presets/mavis/php-hexagonal/hooks/chain-team-phases.sh +163 -16
- package/presets/mavis/php-hexagonal/rules/agent-team-orchestrator.md +29 -6
- package/presets/mavis/php-hexagonal/rules/code-review-mr.md +10 -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/task-analyst.md +1 -1
- package/presets/mavis/php-laravel/commands/update.md +1 -0
- package/presets/mavis/php-laravel/hooks/chain-team-phases.sh +163 -16
- package/presets/mavis/php-laravel/rules/agent-team-orchestrator.md +29 -6
- package/presets/mavis/php-laravel/rules/code-review-mr.md +10 -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/task-analyst.md +1 -1
- package/presets/mavis/svelte/commands/update.md +1 -0
- package/presets/mavis/svelte/hooks/chain-team-phases.sh +163 -16
- package/presets/mavis/svelte/rules/agent-team-orchestrator.md +29 -6
- package/presets/mavis/svelte/rules/code-review-mr.md +10 -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/task-analyst.md +1 -1
- package/presets/opencode/android-kotlin/commands/update.md +1 -0
- package/presets/opencode/android-kotlin/hooks/chain-team-phases.sh +163 -16
- package/presets/opencode/android-kotlin/rules/agent-team-orchestrator.md +29 -6
- package/presets/opencode/android-kotlin/rules/code-review-mr.md +10 -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/task-analyst.md +1 -1
- package/presets/opencode/go/commands/update.md +1 -0
- package/presets/opencode/go/hooks/chain-team-phases.sh +163 -16
- package/presets/opencode/go/rules/agent-team-orchestrator.md +29 -6
- package/presets/opencode/go/rules/code-review-mr.md +10 -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/task-analyst.md +1 -1
- package/presets/opencode/ios-swift/commands/update.md +1 -0
- package/presets/opencode/ios-swift/hooks/chain-team-phases.sh +163 -16
- package/presets/opencode/ios-swift/rules/agent-team-orchestrator.md +29 -6
- package/presets/opencode/ios-swift/rules/code-review-mr.md +10 -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/task-analyst.md +1 -1
- package/presets/opencode/java/commands/update.md +1 -0
- package/presets/opencode/java/hooks/chain-team-phases.sh +163 -16
- package/presets/opencode/java/rules/agent-team-orchestrator.md +29 -6
- package/presets/opencode/java/rules/code-review-mr.md +10 -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/agents/task-analyst.md +1 -1
- package/presets/opencode/mcp-ts/commands/update.md +1 -0
- package/presets/opencode/mcp-ts/hooks/chain-team-phases.sh +163 -16
- package/presets/opencode/mcp-ts/rules/agent-team-orchestrator.md +29 -6
- package/presets/opencode/mcp-ts/rules/code-review-mr.md +10 -0
- package/presets/opencode/mol/MCP.md +4 -3
- package/presets/opencode/mol/adapter-map.json +1 -1
- package/presets/opencode/mol/agents/build-verifier.md +1 -1
- package/presets/opencode/mol/agents/code-reviewer.md +1 -1
- package/presets/opencode/mol/agents/debugger.md +1 -1
- package/presets/opencode/mol/agents/feature-developer.md +1 -1
- package/presets/opencode/mol/agents/task-analyst.md +1 -1
- package/presets/opencode/mol/commands/update.md +1 -0
- package/presets/opencode/mol/hooks/chain-team-phases.sh +163 -16
- package/presets/opencode/mol/rules/agent-team-orchestrator.md +29 -6
- package/presets/opencode/mol/rules/code-review-mr.md +10 -0
- package/presets/opencode/next/MCP.md +4 -3
- package/presets/opencode/next/adapter-map.json +9 -1
- package/presets/opencode/next/agents/build-verifier.md +18 -1
- package/presets/opencode/next/agents/code-reviewer.md +9 -1
- package/presets/opencode/next/agents/debugger.md +1 -1
- package/presets/opencode/next/agents/feature-developer.md +13 -1
- package/presets/opencode/next/agents/task-analyst.md +1 -1
- package/presets/opencode/next/agents/task-router.md +10 -0
- package/presets/opencode/next/commands/task-continue.md +3 -1
- package/presets/opencode/next/commands/update.md +1 -0
- package/presets/opencode/next/hooks/chain-team-phases.sh +163 -16
- package/presets/opencode/next/rules/agent-team-orchestrator.md +29 -6
- package/presets/opencode/next/rules/code-review-mr.md +12 -1
- package/presets/opencode/next/team/fixtures/feature-l2-lite.json +27 -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/task-analyst.md +1 -1
- package/presets/opencode/nuxt/commands/update.md +1 -0
- package/presets/opencode/nuxt/hooks/chain-team-phases.sh +163 -16
- package/presets/opencode/nuxt/rules/agent-team-orchestrator.md +29 -6
- package/presets/opencode/nuxt/rules/code-review-mr.md +10 -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/task-analyst.md +1 -1
- package/presets/opencode/php-hexagonal/commands/update.md +1 -0
- package/presets/opencode/php-hexagonal/hooks/chain-team-phases.sh +163 -16
- package/presets/opencode/php-hexagonal/rules/agent-team-orchestrator.md +29 -6
- package/presets/opencode/php-hexagonal/rules/code-review-mr.md +10 -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/task-analyst.md +1 -1
- package/presets/opencode/php-laravel/commands/update.md +1 -0
- package/presets/opencode/php-laravel/hooks/chain-team-phases.sh +163 -16
- package/presets/opencode/php-laravel/rules/agent-team-orchestrator.md +29 -6
- package/presets/opencode/php-laravel/rules/code-review-mr.md +10 -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/task-analyst.md +1 -1
- package/presets/opencode/svelte/commands/update.md +1 -0
- package/presets/opencode/svelte/hooks/chain-team-phases.sh +163 -16
- package/presets/opencode/svelte/rules/agent-team-orchestrator.md +29 -6
- package/presets/opencode/svelte/rules/code-review-mr.md +10 -0
- package/presets/zcode/android-kotlin/adapter-map.json +1 -1
- package/presets/zcode/android-kotlin/agents/build-verifier.md +1 -1
- package/presets/zcode/android-kotlin/agents/code-reviewer.md +1 -1
- package/presets/zcode/android-kotlin/agents/debugger.md +1 -1
- package/presets/zcode/android-kotlin/agents/feature-developer.md +1 -1
- package/presets/zcode/android-kotlin/agents/task-analyst.md +1 -1
- package/presets/zcode/android-kotlin/commands/update.md +1 -0
- package/presets/zcode/android-kotlin/hooks/chain-team-phases.sh +163 -16
- package/presets/zcode/android-kotlin/rules/agent-team-orchestrator.md +29 -6
- package/presets/zcode/android-kotlin/rules/code-review-mr.md +10 -0
- package/presets/zcode/go/adapter-map.json +1 -1
- package/presets/zcode/go/agents/build-verifier.md +1 -1
- package/presets/zcode/go/agents/code-reviewer.md +1 -1
- package/presets/zcode/go/agents/debugger.md +1 -1
- package/presets/zcode/go/agents/feature-developer.md +1 -1
- package/presets/zcode/go/agents/task-analyst.md +1 -1
- package/presets/zcode/go/commands/update.md +1 -0
- package/presets/zcode/go/hooks/chain-team-phases.sh +163 -16
- package/presets/zcode/go/rules/agent-team-orchestrator.md +29 -6
- package/presets/zcode/go/rules/code-review-mr.md +10 -0
- package/presets/zcode/ios-swift/adapter-map.json +1 -1
- package/presets/zcode/ios-swift/agents/build-verifier.md +1 -1
- package/presets/zcode/ios-swift/agents/code-reviewer.md +1 -1
- package/presets/zcode/ios-swift/agents/debugger.md +1 -1
- package/presets/zcode/ios-swift/agents/feature-developer.md +1 -1
- package/presets/zcode/ios-swift/agents/task-analyst.md +1 -1
- package/presets/zcode/ios-swift/commands/update.md +1 -0
- package/presets/zcode/ios-swift/hooks/chain-team-phases.sh +163 -16
- package/presets/zcode/ios-swift/rules/agent-team-orchestrator.md +29 -6
- package/presets/zcode/ios-swift/rules/code-review-mr.md +10 -0
- package/presets/zcode/java/adapter-map.json +1 -1
- package/presets/zcode/java/agents/build-verifier.md +1 -1
- package/presets/zcode/java/agents/code-reviewer.md +1 -1
- package/presets/zcode/java/agents/debugger.md +1 -1
- package/presets/zcode/java/agents/feature-developer.md +1 -1
- package/presets/zcode/java/agents/task-analyst.md +1 -1
- package/presets/zcode/java/commands/update.md +1 -0
- package/presets/zcode/java/hooks/chain-team-phases.sh +163 -16
- package/presets/zcode/java/rules/agent-team-orchestrator.md +29 -6
- package/presets/zcode/java/rules/code-review-mr.md +10 -0
- package/presets/zcode/mcp-ts/adapter-map.json +1 -1
- package/presets/zcode/mcp-ts/agents/build-verifier.md +1 -1
- package/presets/zcode/mcp-ts/agents/feature-developer.md +1 -1
- package/presets/zcode/mcp-ts/agents/task-analyst.md +1 -1
- package/presets/zcode/mcp-ts/commands/update.md +1 -0
- package/presets/zcode/mcp-ts/hooks/chain-team-phases.sh +163 -16
- package/presets/zcode/mcp-ts/rules/agent-team-orchestrator.md +29 -6
- package/presets/zcode/mcp-ts/rules/code-review-mr.md +10 -0
- package/presets/zcode/mol/MCP.md +4 -3
- package/presets/zcode/mol/adapter-map.json +1 -1
- package/presets/zcode/mol/agents/build-verifier.md +1 -1
- package/presets/zcode/mol/agents/code-reviewer.md +1 -1
- package/presets/zcode/mol/agents/debugger.md +1 -1
- package/presets/zcode/mol/agents/feature-developer.md +1 -1
- package/presets/zcode/mol/agents/task-analyst.md +1 -1
- package/presets/zcode/mol/commands/update.md +1 -0
- package/presets/zcode/mol/hooks/chain-team-phases.sh +163 -16
- package/presets/zcode/mol/rules/agent-team-orchestrator.md +29 -6
- package/presets/zcode/mol/rules/code-review-mr.md +10 -0
- package/presets/zcode/next/MCP.md +4 -3
- package/presets/zcode/next/adapter-map.json +9 -1
- package/presets/zcode/next/agents/build-verifier.md +18 -1
- package/presets/zcode/next/agents/code-reviewer.md +9 -1
- package/presets/zcode/next/agents/debugger.md +1 -1
- package/presets/zcode/next/agents/feature-developer.md +13 -1
- package/presets/zcode/next/agents/task-analyst.md +1 -1
- package/presets/zcode/next/agents/task-router.md +10 -0
- package/presets/zcode/next/commands/task-continue.md +3 -1
- package/presets/zcode/next/commands/update.md +1 -0
- package/presets/zcode/next/hooks/chain-team-phases.sh +163 -16
- package/presets/zcode/next/rules/agent-team-orchestrator.md +29 -6
- package/presets/zcode/next/rules/code-review-mr.md +12 -1
- package/presets/zcode/next/team/fixtures/feature-l2-lite.json +27 -0
- package/presets/zcode/nuxt/adapter-map.json +1 -1
- package/presets/zcode/nuxt/agents/build-verifier.md +1 -1
- package/presets/zcode/nuxt/agents/code-reviewer.md +1 -1
- package/presets/zcode/nuxt/agents/debugger.md +1 -1
- package/presets/zcode/nuxt/agents/feature-developer.md +1 -1
- package/presets/zcode/nuxt/agents/task-analyst.md +1 -1
- package/presets/zcode/nuxt/commands/update.md +1 -0
- package/presets/zcode/nuxt/hooks/chain-team-phases.sh +163 -16
- package/presets/zcode/nuxt/rules/agent-team-orchestrator.md +29 -6
- package/presets/zcode/nuxt/rules/code-review-mr.md +10 -0
- package/presets/zcode/php-hexagonal/adapter-map.json +1 -1
- package/presets/zcode/php-hexagonal/agents/build-verifier.md +1 -1
- package/presets/zcode/php-hexagonal/agents/code-reviewer.md +1 -1
- package/presets/zcode/php-hexagonal/agents/debugger.md +1 -1
- package/presets/zcode/php-hexagonal/agents/feature-developer.md +1 -1
- package/presets/zcode/php-hexagonal/agents/task-analyst.md +1 -1
- package/presets/zcode/php-hexagonal/commands/update.md +1 -0
- package/presets/zcode/php-hexagonal/hooks/chain-team-phases.sh +163 -16
- package/presets/zcode/php-hexagonal/rules/agent-team-orchestrator.md +29 -6
- package/presets/zcode/php-hexagonal/rules/code-review-mr.md +10 -0
- package/presets/zcode/php-laravel/adapter-map.json +1 -1
- package/presets/zcode/php-laravel/agents/build-verifier.md +1 -1
- package/presets/zcode/php-laravel/agents/code-reviewer.md +1 -1
- package/presets/zcode/php-laravel/agents/debugger.md +1 -1
- package/presets/zcode/php-laravel/agents/feature-developer.md +1 -1
- package/presets/zcode/php-laravel/agents/task-analyst.md +1 -1
- package/presets/zcode/php-laravel/commands/update.md +1 -0
- package/presets/zcode/php-laravel/hooks/chain-team-phases.sh +163 -16
- package/presets/zcode/php-laravel/rules/agent-team-orchestrator.md +29 -6
- package/presets/zcode/php-laravel/rules/code-review-mr.md +10 -0
- package/presets/zcode/svelte/adapter-map.json +1 -1
- package/presets/zcode/svelte/agents/build-verifier.md +1 -1
- package/presets/zcode/svelte/agents/code-reviewer.md +1 -1
- package/presets/zcode/svelte/agents/debugger.md +1 -1
- package/presets/zcode/svelte/agents/feature-developer.md +1 -1
- package/presets/zcode/svelte/agents/task-analyst.md +1 -1
- package/presets/zcode/svelte/commands/update.md +1 -0
- package/presets/zcode/svelte/hooks/chain-team-phases.sh +163 -16
- package/presets/zcode/svelte/rules/agent-team-orchestrator.md +29 -6
- package/presets/zcode/svelte/rules/code-review-mr.md +10 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,110 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
##
|
|
3
|
+
## 0.2.60
|
|
4
|
+
|
|
5
|
+
`0.2.58` (no tag, no npm version) and `0.2.59` (a tag, no npm version) were never published — their notes ship as `0.2.60`.
|
|
6
|
+
|
|
7
|
+
### Operator control, loop preview, and install integrity
|
|
8
|
+
|
|
9
|
+
- **Operator pause sentinel.** The chain hook checks `.ai.local/STOP` (also `.ai.local/ESTOP`) before it activates or advances a step. While engaged it records `state: paused` / `phase: paused`, emits no handoff, and prints the sentinel reason; an empty or unreadable file still counts as engaged, and a sentinel that cannot be stat-ed is treated as engaged with a warning rather than ignored. The completing receipt and `attempt_finished` event still land, and a paused human gate stays open and is resumed through the same `end_human_gate` path. The seeded `.ai.local/.gitignore` gains `STOP` and `ESTOP`. Remove the file and run `/task-continue`: the command now accepts `state: paused`, resumes a paused human gate through the same path, and otherwise closes the pause through the hook instead of advancing by hand.
|
|
10
|
+
- **Stale-attempt takeover.** Before a new attempt opens, an `activeAttempts` entry for that step (or its parallel group) older than `AI_RULES_ATTEMPT_STALE_MS` (milliseconds; default 60 minutes, `60000` floor) with no terminal manifest receipt is reclaimed as `attempt_finished` with `outcome: "stale"` and `source: "hook"`, removed from `activeAttempts`, and named in a warning. An attempt belonging to another step is left alone — in graph mode it is reclaimed by that step's own activation or terminal receipt — a terminal receipt wins, and a fresh attempt is never reclaimed.
|
|
11
|
+
- **`run.mjs --dry-run`.** Runs the same derive and improver decision path and prints `DRY RUN — no files, signals, or ledger rows will be written`, then per signature the tier/action, target, before/after, and the exact file + ledger writes it would perform. It creates no lock or intent file and appends no signal or ledger row; `--status` is unchanged and still read-only.
|
|
12
|
+
- **`rule-improver.mjs --rollback <ref>`.** Resolves the newest invertible `rule-changes.jsonl` entry by target path, signature, or exact ISO timestamp, pre-checks that the target still holds the entry's `after`, and appends the `rollback` safety row through the existing `rollbackInverse`. A changed target or an ambiguous ref writes nothing and exits 1. The write must land inside the ledger's `.ai.local` overlay: a symlinked path component, or a real path outside the overlay, is refused before anything is written.
|
|
13
|
+
- **Write-scope reconciliation.** New read-only `presets/_shared/ai-local/scripts/check-write-scope.mjs`, shipped as `.ai.local/scripts/check-write-scope.mjs` and seeded as the fourteenth engine module, labels every changed path `declared` / `derived` / `out-of-scope` against the step's `writeScopes`, hard-fails an implementation step, reports a reviewer/verifier step as advisory, and supports `--step`, `--base`, `--root`, `--paths`, and `--json`. Exit `1` on an out-of-scope path in an implementation step, `0` for a reviewer/verifier advisory, `2` on a usage or config error. Wired into the build-verifier and code-reviewer prompts and documented in the orchestrator rule, never the hook.
|
|
14
|
+
- **Install-state doctor.** `ai-rules doctor [--json]` reports `missing` / `modified` managed files, `legacy-manifest` for a schema-v1 install, `version-mismatch`, and `stale-engine` / `missing-engine` for the shared `.ai.local/scripts/` set, naming the module. Read-only, no `--fix`; the F-1 mixed-engine `SyntaxError` is one `stale-engine` finding. Exit `0` is clean, `1` means findings, `2` a usage error.
|
|
15
|
+
- **Review breadth budget.** `code-review-mr` bounds the call-site sweep and the one-hop consumer read (40 changed symbols or 15 minutes) and adds a `partial` depth-pass outcome that names every unread path. The five depth passes still run on what was read; the diff stays a floor, not the boundary.
|
|
16
|
+
- **Gates.** `check-preset-structure.sh` runs the new `test-write-scope.mjs` and `test-install-doctor.mjs`, and its hook block runs the pause-sentinel and stale-attempt suites; the pack-tarball, CLI registration, init-clean and rule-improver ledger suites gain GitHub, rollback and seeded-script cases. The self-review contract exempts the read-only `check-write-scope.mjs` from the loop-module `child_process` ban because it shells out to git. CLI goldens are recaptured for the new engine module, the two `.ai.local/.gitignore` lines, and the changed `run.mjs` / `rule-improver.mjs` hashes.
|
|
17
|
+
|
|
18
|
+
### Preset-tree lock: the generator and the gate stop racing
|
|
19
|
+
|
|
20
|
+
- **The race.** `yarn fix:generated` deletes and rebuilds each platform stack, so a gate that reads `presets/**` while it runs fails on a file that is momentarily absent. Both sides now take one advisory lock, `packages/ai-rules/.preset-tree-lock/` (`owner.json` = `pid`, `label`, `startedAt`).
|
|
21
|
+
- **Acquire and release.** A second acquire against a live owner is refused with the owner's label, pid and start time; a dead pid, a corrupt `owner.json`, or an owner-less directory is reclaimed and reported; `release` removes only the caller's lock. A lock path the OS refuses to create is skipped with a warning and the command proceeds unlocked — the lock never turns an unwritable checkout into a red build. It stays advisory: a process that never asks for it can still race.
|
|
22
|
+
- **CLI.** `node scripts/lib/preset-tree-lock.mjs acquire --label <label> [--pid <pid>] [--root <dir>]` exits `0` when acquired or unwritable, `1` when a live owner holds it; `release [--pid <pid>] [--root <dir>]` exits `0` released, `1` refused; a usage error exits `2`.
|
|
23
|
+
- **Wiring.** `fix-generated.mjs` holds the lock across every generator, the Claude settings sync, and the golden captures, and releases it in `finally`; a live owner stops the run with the next step. `check-preset-structure.sh` takes the same lock before it reads `presets/**` and releases it on exit, so a concurrent run reports "the preset tree is being regenerated; re-run the gate when it finishes" instead of failing on a missing hook. `.preset-tree-lock/` is git-ignored.
|
|
24
|
+
- **Fixtures.** `test-preset-tree-lock.mjs` covers acquire/release, a live owner (the second acquire leaves the owner untouched), a stale-owner reclaim, a refused foreign release, the unwritable path, and the CLI exit codes; `check-preset-structure.sh` runs it as its own row.
|
|
25
|
+
|
|
26
|
+
### Update covers the fifth platform
|
|
27
|
+
|
|
28
|
+
- **Command surface.** All 55 `commands/update.md` files (11 stacks × 5 platforms) list `.zcode/.ai-rules-install.json` beside the other four manifests; the CLI already had `zcode` in `UPDATE_TARGETS`, but the documented record list and the dogfood install did not. `test-cli-update.mjs` parses `UPDATE_TARGETS` and asserts every shipped `update.md` documents every target root, so a sixth platform cannot leave the docs behind.
|
|
29
|
+
- **Dogfood install.** The root `.zcode` tree was created by `sync-dogfood-zcode.sh`, which copies preset bytes but writes no install manifest, so `update` skipped it. A one-time `init zcode --preset next` now records `.zcode/.ai-rules-install.json` (and refreshes the stale tree to the current preset); `update` reports `zcode (next)` on every run after that.
|
|
30
|
+
|
|
31
|
+
### GitHub MCP provider
|
|
32
|
+
|
|
33
|
+
- **`mcp setup github`.** The managed pack gains a GitHub provider: the official remote GitHub MCP server (`https://api.githubcopilot.com/mcp/`) behind a stdio proxy (`mcp/github-proxy.mjs`), registered into the same five client shapes as GitLab and Yandex. The token is read from the shell (`GITHUB_TOKEN`, or `GITHUB_PERSONAL_ACCESS_TOKEN`) or from `.env.github` in the project root; the package never writes a GitHub secret and never puts one into a client config. `mcp remove --purge` never deletes the consumer-owned `.env.github`.
|
|
34
|
+
- **`mcp doctor` default scope.** With no provider argument the doctor checks every managed-pack provider, GitHub included. A project that had GitLab and Yandex configured and passing now also gets `github` registration and credentials failures and exits 1 until it runs `mcp setup github`; `mcp doctor github` (or any single provider) scopes the run. `mcp setup all` and `mcp add all` cover GitHub too, so `setup all` needs `GITHUB_TOKEN` (or `.env.github`) and stops at the GitHub step without one; `mcp remove all` removes the GitHub entry as well. The CLI registration suite pins the default report: GitLab, GitHub, Yandex Tracker and Yandex Wiki each appear, the run exits 1 while any of them is unconfigured, and every next step names its own setup command.
|
|
35
|
+
- **Credential flow.** `mcp setup github` validates the token against `GET /user` before it registers anything, refuses to run while `.env.github` is not git-ignored, and writes no credential file. `mcp doctor github` reports runtime, registration, credentials and upstream, with one actionable next step per failure (missing token, unignored file, rejected token, unreachable endpoint). A token held in `.env.github` counts as a secret at rest even when the shell shadows it, so the ignore check still applies to that file; a file that holds no token is reported as such instead of being passed over.
|
|
36
|
+
- **Shared transport.** The streamable-HTTP transport (one POST per JSON-RPC message, JSON or SSE response, session id and protocol-version tracking) moved to `mcp/lib/streamable-http.mjs` and is now shared by the Yandex proxy and the GitHub proxy; the Yandex error semantics (`UnauthorizedError` on 401, `UpstreamError` otherwise, token redaction) are unchanged.
|
|
37
|
+
- **Overrides.** `GITHUB_MCP_URL` and `GITHUB_API_URL` point the provider at a GitHub Enterprise endpoint or a local relay; `mcp run github --print-env` prints the masked mapping (`GITHUB_TOKEN=***`).
|
|
38
|
+
- **Client registration.** The MCP doctor previously read a hardcoded four-client map with a flat `mcpServers` key; it now resolves every client through the registry entry (`clientById`) and a dotted-key lookup (`containerAt`), so the ZCode client (`.zcode/config.json`, nested `mcp.servers`) is checked like the other four. The registry's secret-value pattern also matches `gh[pousr]_` and `github_pat_`, so a GitHub token left inside a client config is reported.
|
|
39
|
+
- **Docs.** `docs/MCP-SETUP.md` gains the GitHub sequence and a § Diagnostics rule for the doctor's default scope; the preset `MCP.md` lists GitHub in the managed pack. The package README documents `doctor`, `--dry-run`, `--rollback`, the fourteen-module engine set and the `STOP`/`ESTOP` ignore lines; `docs/PRESET-CONTRIBUTION.md` gains the write-scope audit row.
|
|
40
|
+
|
|
41
|
+
### The requirements checker separates declared from executed steps
|
|
42
|
+
|
|
43
|
+
- **`--require-receipts`.** `check-requirements-compliance.mjs --task <slug|dir> --require-receipts` compares every routed step that produces a required artifact against the task's `artifact-manifest.json`: a step whose entry is not `completed` or `archived` is `E_STEP_UNEXECUTED` and exit `1`. Without the flag the same gap stays an advisory `declared, not executed: <id> (<agent>)` note, so a compliant artifact set is no longer enough when the caller asks for execution evidence. The flag applies only to `--task`; `--integrity`, `--routing`, and `--census` reject it with exit `2`.
|
|
44
|
+
- **Fixtures.** The checker's suite covers the advisory note, the strict `E_STEP_UNEXECUTED` failure, completed entries satisfying the flag, and the three usage errors.
|
|
45
|
+
|
|
46
|
+
### Upgrade
|
|
47
|
+
|
|
48
|
+
- Run `npx @bonesofspring/ai-rules update` to refresh the 55 hooks and the shared orchestrator/review rules.
|
|
49
|
+
- `.ai.local/scripts/` stays skip-if-exists: delete `run.mjs` and `rule-improver.mjs` before the update to take `--dry-run` and `--rollback`; `check-write-scope.mjs` is new and is seeded on the next `init` or `update`.
|
|
50
|
+
- Run `npx @bonesofspring/ai-rules doctor` after the update; a `stale-engine` finding names the module that is still the old copy.
|
|
51
|
+
- The preset-tree lock and `--require-receipts` are preset-repository tooling, not installed files: no consumer action and no engine seed for either.
|
|
52
|
+
|
|
53
|
+
## 0.2.57
|
|
54
|
+
|
|
55
|
+
### L2-lite and a lighter bounded-contract pipeline
|
|
56
|
+
|
|
57
|
+
- **A fourth level.** The repository's `task-levels` overlay gains **L2-lite** for an additive public contract with a machine-checked gate (OpenAPI / JSON schema / protobuf), no migration, no auth / SSR-cookie / analytics / PII change, ≤ 3 work packages and ≤ 15 substantive files: the L1 execution artifacts plus the contract gate, no L2 OpenSpec. The selection order counts substantive files only — generated trees, snapshots, CLI goldens, docs, and test fixtures do not escalate the level — while L2 (no machine-checked gate), L3, and their OpenSpec path stay unchanged.
|
|
58
|
+
- **Ceremony budget.** L2-lite keeps the safety gates and drops the template weight: `task-analyst → api-contract-reviewer (contract change only) → feature-developer → build-verifier → security-reviewer (destructive / auth-bearing only) → code-reviewer → qa-tester (AC names e2e)`, exactly one human gate `after:task-analyst`, the 28-row block once in `brief.md`, and a ≤ 3 h / ≤ 8 step target. Exceeding the budget records `decision: replan rev N → N+1` instead of growing the template.
|
|
59
|
+
- **Router.** `task-router` on every `next` tree selects L2-lite at `profile: standard`, keeps only the risk specialists, sets `humanGates` to exactly `["after:task-analyst"]`, and records the level and the machine-checked gate in `routingReasons`. `feature-l2-lite.json` joins the seeded `team/fixtures/`.
|
|
60
|
+
- **Overlay-owned.** `init` never overwrites an existing `.ai.local/rules/task-levels.md`, so an installed overlay selects L2-lite only after the level and the selection-order rows are added to that file; the router is already updated.
|
|
61
|
+
|
|
62
|
+
### Model tiers and a usage ledger
|
|
63
|
+
|
|
64
|
+
- **Tier map.** `.ai.local/team/model-tiers.json` (`schemaVersion`, `approvedBy`, `tiers.cheap|standard|strong`) is the provider-specific map the orchestrator resolves a `steps[i].model` tier through, passing `providerID/modelID` (or `#variant`) to the Task tool. This repository pins `cheap` and `standard` to `deepseek/deepseek-flash` and `strong` to `deepseek/deepseek-v4-pro`; `strong` is never downgraded to the parent default.
|
|
65
|
+
- **Fail closed.** A declared tier without a mapping stops the start with `model-tier-unmapped` instead of silently inheriting the parent model. A platform that takes no explicit model records the resolved tier in the handoff and lets the frontmatter pin apply. The tier changes no step order, gate, receipt, or retry policy.
|
|
66
|
+
- **Usage events.** `record-usage.mjs` appends one `usage_recorded` event (`input`, `output`, `cached`, `model`) to a task's `metrics.json` under the same advisory lock family as the hooks; the chain hook forwards a `usage` object from its input into `attempt_finished`. A count the host does not expose stays missing — nothing is estimated or invented.
|
|
67
|
+
|
|
68
|
+
### The chain hook takes its slug explicitly
|
|
69
|
+
|
|
70
|
+
- **`TEAM_TASK_SLUG`.** All 55 `chain-team-phases.sh` bodies and the shared template prefer the environment slug over `.ai.local/team/active-task.json`; the pointer remains a single-slot fallback for the UI and older hosts. Two parallel sessions no longer overwrite each other's pointer and silently no-op a hook.
|
|
71
|
+
- **Callers and coverage.** The shared orchestrator and the OpenCode entry pass the slug on every call, and `m2-env-slug-overrides-pointer` proves an env slug wins over a foreign pointer slug; `m2-usage-forwarded` pins the `usage` hand-off.
|
|
72
|
+
|
|
73
|
+
### A delta classifier for retries
|
|
74
|
+
|
|
75
|
+
- **New classifier.** `packages/ai-rules/scripts/check-preset-delta.mjs` maps a change-set to six domains (`team-db`, `app`, `preset-core`, `local-overlay`, `team-artifacts`, `docs`), lists the affected preset and app gates, and names what may be carried forward. It never runs a gate and never decides PASS/FAIL: exit `0` classified (including "no changes"), `2` usage/self-test failure. Flags: `--base <ref>`, `--paths a,b`, `--json`, `--self-test`.
|
|
76
|
+
- **Retry policy.** `build-verifier` runs the classifier before a re-validation: a gate in a changed domain must be re-run, and a gate in an unchanged domain may be carried only with the base ref, the classifier output, and the last green command + exit code in `validation-report.md`. Preset gates are never carried when `presets/**` or `scripts/**` changed, app gates never when `apps/team-tasks-ui/**` changed, and the team-db suites never when the `team-db` domain changed. The local `agent-pipeline-gates` rule carries the same row.
|
|
77
|
+
- **Wiring.** `yarn check:preset-delta` and a `preset-delta` self-test row in `check-preset-structure.sh` cover four cases: docs only, app e2e test only, OpenAPI contract, router rule.
|
|
78
|
+
|
|
79
|
+
### Health reports its capabilities
|
|
80
|
+
|
|
81
|
+
- **API.** `GET /health` gains a required `capabilities: ["sync","delete"]` array; the OpenAPI schema adds the enum, the required list, and the example, and the contract gate still owns the frozen document.
|
|
82
|
+
- **UI.** `HealthDto.capabilities` stays optional so an older upstream parses; the mapper defaults it to `[]`, and `AppShell` renders a stale-upstream banner when a served API does not advertise `delete` (the copy names `restart team-db.mjs serve`). The footer no longer calls the app read-only.
|
|
83
|
+
- **Docs and tests.** `docs/TEAM-DB.md` states that `--allow-remote` exposes the confirmed delete and the rescan without authentication, and the app README states that `serve` loads its route table at start, so a stale process answers `405` on a route the new code serves. The API suite asserts the field; the mapper and copy suites cover the legacy shape and the banner text.
|
|
84
|
+
|
|
85
|
+
### Requirements: one canonical block, stage rows downstream
|
|
86
|
+
|
|
87
|
+
- **Canonical downstream block.** Registry revision 5: the anchor (`brief.md` when routed, else the earliest block-bearing artifact) keeps the full 28-row table and `## Stage coverage`; every other block-bearing artifact may carry `Canonical: <anchor>.md#requirements-compliance` plus only the R-IDs its stage requires (`STAGE_REQUIREMENTS`). A full 28-row downstream block remains valid, and the anchor may never carry a canonical line.
|
|
88
|
+
- **Parser and checker.** `requirements-block.mjs` recognizes the canonical line (`E_CANONICAL_SYNTAX`, `E_CANONICAL_NOT_ALLOWED`) and validates the stage subset; `check-requirements-compliance.mjs` resolves the reference against the real anchor (`E_CANONICAL_REF`), allows extra touched rows on `implementation.md`, and reports canonical blocks in `--census`. The checklist documents the shape and the reference rule.
|
|
89
|
+
- **Local gate rules.** `gate-changes-requested` leaves the seed library and becomes an active rule; `gate-validation-failed` is added. Both point at the failing gate or the underlying behavior, never at a weaker test.
|
|
90
|
+
|
|
91
|
+
### UI deltas close the existing expectations
|
|
92
|
+
|
|
93
|
+
- **Developer.** `feature-developer` gains an existing-suite impact check: a table shape, dialog/state machine, shared copy constant, or route/method change greps the existing specs and copy, updates every stale expectation in the same work package, runs the affected suite (not only the new test), and records the grep and the suite result in `implementation.md`. The local `agent-pipeline-gates` UI-surface row names the same duty.
|
|
94
|
+
- **Review.** `code-review-mr` states that with no Figma reference (no URL, fileKey/node id, or `figma-contract.json`) and `mockup-review.md` at `not-applicable`, the review emits `## Figma parity (UI) — fidelity: N/A` and raises no `REQUEST_CHANGES`; an explicit `fidelity: N/A` is not a finding, an absent one is.
|
|
95
|
+
|
|
96
|
+
### Real delete coverage
|
|
97
|
+
|
|
98
|
+
- **Scratch server.** `yarn test:e2e:real-delete` starts the fixture API on its own temporary tree, deletes a task through the real HTTP `DELETE`, then asserts `404` on the detail route and absence from the list. The Playwright live project keeps a browser-boundary stub because it shares one projection across ~70 parallel scenarios.
|
|
99
|
+
|
|
100
|
+
### Upgrade
|
|
101
|
+
|
|
102
|
+
- Run `npx @bonesofspring/ai-rules update` to refresh the 55 hooks, the shared orchestrator core, the `next` agents/rules, and the generated platform trees.
|
|
103
|
+
- `.ai.local/scripts/` stays skip-if-exists: delete `team-db-api.mjs` and `team-db-openapi.mjs` before the update to take the `capabilities` field, then restart `node .ai.local/scripts/team-db.mjs serve` — the process loads its modules at start, so an old one keeps answering the old surface.
|
|
104
|
+
- `model-tiers.json` is consumer-owned: create `.ai.local/team/model-tiers.json` with `tiers.cheap|standard|strong` to pin provider models; without it, the platform pin applies. The chain hook forwards usage without any script; the manual `record-usage.mjs` CLI is this repository's tooling.
|
|
105
|
+
- `task-levels.md` is consumer-owned; add the L2-lite level and selection-order rows to an existing overlay to activate it.
|
|
106
|
+
|
|
107
|
+
## 0.2.56
|
|
4
108
|
|
|
5
109
|
### Confirmed task delete
|
|
6
110
|
|
|
@@ -15,6 +119,17 @@
|
|
|
15
119
|
- Run `npx @bonesofspring/ai-rules update`, then delete the four changed modules in `.ai.local/scripts/` (`team-db.mjs`, `team-db-project.mjs`, `team-db-api.mjs`, `team-db-openapi.mjs`) to take the delete verb and route; seeding stays skip-if-exists.
|
|
16
120
|
- `AI_RULES_TEAM_DB_DISABLE=1` still stops every write point: the delete answers `503 E_DISABLED` over the API and refuses with exit 1 in the CLI.
|
|
17
121
|
|
|
122
|
+
### Six preset and overlay improvements
|
|
123
|
+
|
|
124
|
+
- **Token-budget caps leave the checker.** The always-on count, the body cap, the slim-companion floor, and the 57-stem slim-companion allow-list move into `scripts/_lib/preset-token-budget-baseline.json`; every allow-list entry carries a reason. The numbers do not move — always-on 3–10, body sum ≤ 4000, slim-companion floor 5 lines. `check-preset-token-budget.sh --update` refuses to widen; only `--update --widen` accepts a widening and re-records the sanction. CI also compares the baseline to the base revision (`--base`), so an unrecorded edit of `caps` and `sanctioned` together no longer bypasses the ratchet; a recorded sanction remains a visible diff. The checker body holds no cap literal.
|
|
125
|
+
- **A third, advisory authoring tier.** `scripts/check-preset-authoring-advisory.mjs` reports four finding classes — `restated-stem`, `paraphrased-when-do`, `unjustified-body-size`, `issue-number-density` — one line per finding and a final `advisory-findings: <n>`. It always exits `0` and runs as a non-blocking row in `check:preset-structure` (and therefore `check:all`), so findings never block a release. The per-rule body threshold is the distinct `advisoryPerRuleBodyCap` baseline field; the tier holds no second copy of the number.
|
|
126
|
+
- **Per-store overlay budgets.** The in-task self-learning loop accounts the human store (`.ai.local/rules/**`, ≤ 5 rules and ≤ 170 lines) and the machine store (`.ai.local/conventions.md`, ≤ 30 lines) separately; the combined envelope stays 200 lines, and a saturated store refuses only its own write. The shipped `conventions.md` template is 27 non-empty lines, so a fresh install has three lines of machine headroom before the loop stages instead. `run.mjs --status` prints two envelopes. ADR `0001` guard 2 is amended in the same change.
|
|
127
|
+
- **Seed provenance and a mediated promotion.** Every seed the engine stages carries a four-field footer (`signature`, `stagedAt`, `sourceSlug`, `state: awaiting-human-promotion`) and no free text. `rule-improver.mjs --promote <stem>` strips every footer line, writes the reviewed rule into `.ai.local/rules/`, removes the seed, and appends a `seed-promoted` row bound to the reviewed snapshot — a seed edited between staging and promotion is reported as a divergence. A failed promotion leaves a recoverable commit intent; the next engine run finishes or drops it. Nothing auto-activates a seed.
|
|
128
|
+
- **An FTS shape registry for the team-db projection.** The released search layouts are enumerated oldest-first (`fts5-v1` today) and the installed layout is recorded in `schema_meta` under `search_fts_shape`. A drifted layout is **reported** in five states (`absent`, `current`, `unrecorded`, `superseded`, `unknown`) and never rebuilt: the live table stays untouched, `MIGRATIONS` and `SCHEMA_VERSION` are unchanged, `E_SCHEMA_NEWER` still fails closed, and FTS5 stays a runtime capability.
|
|
129
|
+
- **The learning loop's speed boundary.** The shared-core stem states that the loop runs no model-driven pass — rule text is template-derived from the validated signature, and a model-driven pass, if one is ever added, must be default-off and write only to the staged band. A hard gate row now checks the sentence in the core stem and in all 276 marker carriers, derives the loop-module list from `engine-scripts.js`, and rejects common static and dynamic HTTP/model imports in those modules.
|
|
130
|
+
- **Upgrade the consumer engine.** `.ai.local/scripts/` is seeded skip-if-exists: delete the changed modules — `rule-improver.mjs`, `run.mjs`, and `team-db-schema.mjs` for this preset work, plus `team-db.mjs`, `team-db-project.mjs`, `team-db-api.mjs`, and `team-db-openapi.mjs` for the delete-task work in the same release — and re-run `npx @bonesofspring/ai-rules update` to take the per-store budget split, the two-envelope status, the provenance footer, `--promote`, and the FTS shape registry.
|
|
131
|
+
- **Gates.** `check-preset-token-budget.sh`, `check-preset-structure.sh` (advisory row non-blocking), `check-rule-eval.mjs`, `check-shared-core-drift.sh`, `check-generated-drift.mjs`, `check-preset-self-review-contract.sh`, `test-team-db-schema.mjs`, `check-team-db-contract.mjs`, `test-rule-improver-ledger.mjs`, and `test-cli-init-clean.mjs` pass; the 55 CLI goldens are recaptured, never hand-edited.
|
|
132
|
+
|
|
18
133
|
## 0.2.55
|
|
19
134
|
|
|
20
135
|
### $mol preset (eleventh stack)
|
package/README.md
CHANGED
|
@@ -6,7 +6,9 @@ Presets for **Cursor**, **Claude Code**, **Mavis** (MiniMax `mcode`), **OpenCode
|
|
|
6
6
|
npx @bonesofspring/ai-rules init multi --preset next
|
|
7
7
|
npx @bonesofspring/ai-rules update # reinstall tools already recorded in this repo
|
|
8
8
|
npx @bonesofspring/ai-rules update --merge-ai-local # fast-forward files whose recorded base still matches; edits and pre-record files stay put
|
|
9
|
+
npx @bonesofspring/ai-rules doctor # read-only install health: managed files, engine set, version
|
|
9
10
|
npx @bonesofspring/ai-rules clean cursor # never deletes .ai.local/
|
|
11
|
+
npx @bonesofspring/ai-rules init mcp --all # third-party catalog: context7, playwright, chrome-devtools, figma-desktop, figma-cloud
|
|
10
12
|
```
|
|
11
13
|
|
|
12
14
|
Run `init` from the **app root** (`--cwd` if needed). Default `--preset` is `next`. Forms: `init cursor --preset next`, `init cursor next`, `init cursor`. Global: `npm i -g @bonesofspring/ai-rules`.
|
|
@@ -23,9 +25,22 @@ Run `init` from the **app root** (`--cwd` if needed). Default `--preset` is `nex
|
|
|
23
25
|
| Root agents | `REPO_AGENTS.md` → `AGENTS.md` (same file on all five; ZCode loads it natively) | | | | |
|
|
24
26
|
| `/task` artifacts | **`.ai.local/team/`** (shared; templates refreshed; `tasks/<slug>/` never overwritten) | | | |
|
|
25
27
|
| Template drift | **`.ai.local/.template-base.json`** (shared; one record per tree of files that hold a shipped template byte; `update` prints one drift line, `update --merge-ai-local` fast-forwards a file only when its recorded base still matches and reports the rest) | | | |
|
|
26
|
-
| Self-learning engine | **`.ai.local/scripts/`** (shared;
|
|
28
|
+
| Self-learning engine | **`.ai.local/scripts/`** (shared; fourteen scripts — the engine, `manifest.mjs`, the six `team-db*.mjs` projection modules, and the read-only `check-write-scope.mjs` write audit; existing files never overwritten) | | | |
|
|
27
29
|
| Specs seed | `docs/specs/` copied only if the directory is **absent** | | | |
|
|
28
30
|
|
|
31
|
+
### Project MCP catalog
|
|
32
|
+
|
|
33
|
+
`init mcp` writes the third-party servers this package uses into every installed client; `--tools` narrows the list to the clients you name. Entries render in each client's native shape and merge like `init`: extra servers, the consumer's `env` / `headers`, and other top-level keys stay. Names: `context7`, `playwright` (Claude's id is `playwright-test`), `chrome-devtools`, `figma-desktop` (alias `figma`, the local `http://127.0.0.1:3845/mcp` server), and `figma-cloud` (the remote `https://mcp.figma.com/mcp` server); `--all` selects every one.
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
npx @bonesofspring/ai-rules init mcp context7
|
|
37
|
+
npx @bonesofspring/ai-rules init mcp figma-desktop figma-cloud
|
|
38
|
+
npx @bonesofspring/ai-rules init mcp --all --tools cursor,claude
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Details: [`docs/MCP-CATALOG.md`](docs/MCP-CATALOG.md). The credential-bearing pack (GitLab, GitHub, Yandex) is a separate command group: the `mcp setup|add|remove|doctor|refresh|run` namespace.
|
|
42
|
+
|
|
43
|
+
|
|
29
44
|
The engine is the in-task self-learning loop: `.ai.local/signals.jsonl` → `.ai.local/rule-changes.jsonl` →
|
|
30
45
|
`.ai.local/conventions.md` / `.ai.local/rules-library/`. The chain hook runs it after every producer receipt; run it
|
|
31
46
|
yourself when the hook is disabled:
|
|
@@ -34,13 +49,60 @@ yourself when the hook is disabled:
|
|
|
34
49
|
node .ai.local/scripts/run.mjs # derive → append → improve
|
|
35
50
|
node .ai.local/scripts/run.mjs --status # read-only: per-signature state, last capture, envelope
|
|
36
51
|
node .ai.local/scripts/run.mjs --strict # read-only check: exit 1 when capture is broken
|
|
52
|
+
node .ai.local/scripts/run.mjs --dry-run # read-only preview: decision, target, before/after, exact writes
|
|
37
53
|
```
|
|
38
54
|
|
|
55
|
+
`build-verifier` and `code-reviewer` also run the read-only write audit `node .ai.local/scripts/check-write-scope.mjs --slug <slug> --step <step-id>`: it labels every changed path `declared`, `derived`, or `out-of-scope` against the step's `writeScopes`. It is never a hook gate.
|
|
56
|
+
|
|
39
57
|
`init` seeds the engine with **skip-if-exists** — a modified `run.mjs` stays yours and is reported as kept; there is no
|
|
40
58
|
`--force`. Re-running `init` does not update a seeded module, so delete the file to pick up a newer engine. The seeded
|
|
41
59
|
tree is byte-identical to `presets/_shared/ai-local/scripts/`, and `.ai.local/.gitignore` (created when absent, missing
|
|
42
|
-
required lines appended to an existing file) ignores `*.lock`, `*.tmp`, `.rollback/`, `
|
|
43
|
-
`team.db-shm`, and `team-db-errors.log`; the root `.gitignore` is never edited.
|
|
60
|
+
required lines appended to an existing file) ignores `*.lock`, `*.tmp`, `.rollback/`, `STOP`, `ESTOP`, `team.db`,
|
|
61
|
+
`team.db-wal`, `team.db-shm`, and `team-db-errors.log`; the root `.gitignore` is never edited.
|
|
62
|
+
|
|
63
|
+
The seeded engine copy is **skip-if-exists** too, so a consumer that already holds `.ai.local/scripts/rule-improver.mjs`
|
|
64
|
+
keeps the old engine and does **not** get the per-store budget split — the human store `.ai.local/rules/**` (≤ 5 rules,
|
|
65
|
+
≤ 170 lines) and the machine store `.ai.local/conventions.md` (≤ 30 lines) now carry separate caps, the combined
|
|
66
|
+
envelope stays 200. The shipped `conventions.md` template is 27 non-empty lines, so a fresh install has three lines of
|
|
67
|
+
machine headroom before the loop stages instead. Delete the changed seeded modules and re-run `init` / `update`:
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
rm .ai.local/scripts/rule-improver.mjs
|
|
71
|
+
rm .ai.local/scripts/run.mjs
|
|
72
|
+
rm .ai.local/scripts/team-db-schema.mjs
|
|
73
|
+
npx @bonesofspring/ai-rules update
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
`--dry-run` and `--rollback` live in the newer `run.mjs` / `rule-improver.mjs`, so the same two deletions take them.
|
|
77
|
+
|
|
78
|
+
The 0.2.56 delete-task release also changes `team-db.mjs`, `team-db-project.mjs`, `team-db-api.mjs`, and
|
|
79
|
+
`team-db-openapi.mjs`; delete those too if you are taking both changes.
|
|
80
|
+
|
|
81
|
+
Promote a staged seed by hand; the engine never activates one on its own:
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
node .ai.local/scripts/rule-improver.mjs --promote <stem>
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
The command strips the provenance footer from `.ai.local/rules-library/<stem>.md`, writes the reviewed rule into
|
|
88
|
+
`.ai.local/rules/`, removes the seed, and appends a `seed-promoted` row bound to the reviewed snapshot. Every seed the
|
|
89
|
+
engine stages carries a four-field footer (`signature`, `stagedAt`, `sourceSlug`, `state: awaiting-human-promotion`); a
|
|
90
|
+
copy of a shipped template carries none.
|
|
91
|
+
|
|
92
|
+
Undo one auto-applied ledger entry; the command is fail-closed:
|
|
93
|
+
|
|
94
|
+
```bash
|
|
95
|
+
node .ai.local/scripts/rule-improver.mjs --rollback <target|signature|ISO timestamp>
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
`--rollback` resolves the newest matching `rule-changes.jsonl` entry, refuses when the
|
|
99
|
+
target changed since that entry or the ref is ambiguous, and appends a `rollback` safety row
|
|
100
|
+
that is itself the inverse. It writes nothing on refusal.
|
|
101
|
+
|
|
102
|
+
`--dry-run` runs the same derive and improver decision path as the real loop, prints
|
|
103
|
+
`DRY RUN — no files, signals, or ledger rows will be written`, and shows per signature the tier/action, target,
|
|
104
|
+
before/after, and the exact file and ledger writes it would perform. It creates no lock, no intent file, and no
|
|
105
|
+
signal append; `--status` stays read-only and unchanged.
|
|
44
106
|
|
|
45
107
|
The same seeding ships `manifest.mjs`, the writer for `.ai.local/team/tasks/<slug>/artifact-manifest.json`:
|
|
46
108
|
|
|
@@ -95,6 +157,8 @@ Mavis never writes `~/.minimax/**`. OpenCode never writes `~/.config/opencode/**
|
|
|
95
157
|
|
|
96
158
|
`update` reinstalls each tool whose `<tool>/.ai-rules-install.json` is already present, using the `preset` field `init` wrote (`platform` + `preset`). Slash command `/update` runs that CLI. A tool without a manifest stays uninstalled, and the recorded preset stays as stored. To switch preset, run `init <tool> --preset <name>`.
|
|
97
159
|
|
|
160
|
+
`doctor` is the read-only install-state check. For every installed platform it reports `missing` or `modified` managed files, a manifest without a `managedFiles` map, `legacy-manifest` for schema v1, and a `version-mismatch` between the manifest's `packageVersion` and the package you are running. Once per project it compares `.ai.local/scripts/` with `presets/_shared/ai-local/scripts/` and reports `stale-engine` (naming the module) or `missing-engine`; the F-1 class — an old `run.mjs` next to a newer `rule-improver.mjs` — is exactly one `stale-engine` finding. `--json` prints one object. Exit `0` means clean, `1` means findings, `2` means a usage error (unknown option, bad positional, bad `--cwd`). There is no `--fix`: fix by re-running `init` / `update` after deleting the changed seeded module.
|
|
161
|
+
|
|
98
162
|
On session start (Cursor and Claude hooks; Mavis, OpenCode, and ZCode on the first reply) the preset compares that recorded `packageVersion` with the latest `@bonesofspring/ai-rules` release. When a newer release exists, the reply opens with a level-2 heading and a blockquote naming the installed version, the latest version, and `/update`. That block stays out of the task answer. `/update` then says the update finished successfully, or that it did not, without quoting the exit code.
|
|
99
163
|
|
|
100
164
|
## Stacks
|
|
@@ -128,6 +192,7 @@ Every installed preset ships requestable `anti-hallucination-contract` (not alwa
|
|
|
128
192
|
- Guide: [`docs/PRESET-CONTRIBUTION.md`](docs/PRESET-CONTRIBUTION.md)
|
|
129
193
|
- Overlay: [`docs/LOCAL-OVERLAY.md`](docs/LOCAL-OVERLAY.md)
|
|
130
194
|
- MCP setup: [`docs/MCP-SETUP.md`](docs/MCP-SETUP.md)
|
|
195
|
+
- MCP catalog: [`docs/MCP-CATALOG.md`](docs/MCP-CATALOG.md)
|
|
131
196
|
- Dogfood: [`scripts/sync-dogfood-cursor.sh`](scripts/sync-dogfood-cursor.sh), [`scripts/sync-dogfood-claude.sh`](scripts/sync-dogfood-claude.sh), [`scripts/sync-dogfood-mavis.sh`](scripts/sync-dogfood-mavis.sh), [`scripts/sync-dogfood-opencode.sh`](scripts/sync-dogfood-opencode.sh) — seeds `.ai.local/team`, preserves slugs
|
|
132
197
|
- Gates: `yarn check:preset-structure`
|
|
133
198
|
|