@bonesofspring/ai-rules 0.2.61 → 0.2.63
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 +25 -0
- package/README.md +3 -3
- package/bin/lib/seed-ai-local-team.js +3 -0
- package/bin/mavis-install.js +3 -1
- package/bin/opencode-install.js +3 -1
- package/bin/zcode-install.js +3 -1
- package/docs/MAVIS.md +5 -2
- package/docs/OPENCODE.md +5 -2
- package/docs/PLATFORMS.md +1 -1
- package/docs/PRESET-CONTRIBUTION.md +19 -16
- package/docs/TEAM-DB.md +7 -1
- package/package.json +3 -3
- package/presets/_shared/ai-local/scripts/check-write-scope.mjs +176 -28
- package/presets/_shared/ai-local/scripts/lock.mjs +60 -121
- package/presets/_shared/core/agent-team/agent-artifact-contracts.md +4 -0
- package/presets/_shared/core/agent-team/agent-team-intake.md +1 -0
- package/presets/_shared/core/agent-team/agent-team-orchestrator.md +5 -2
- package/presets/_shared/core/meta/preset-pr-checklist.md +4 -4
- package/presets/_shared/core/meta/preset-twin-sync.md +1 -1
- package/presets/_shared/hooks/check-preset-update.mjs +4 -3
- package/presets/claude/android-kotlin/hooks/check-preset-update.mjs +4 -3
- package/presets/claude/android-kotlin/rules/tooling-and-review/agent-team-intake.md +1 -0
- package/presets/claude/android-kotlin/rules/tooling-and-review/agent-team-orchestrator.md +5 -2
- package/presets/claude/android-kotlin/rules/tooling-and-review/preset-pr-checklist.md +4 -4
- package/presets/claude/android-kotlin/rules/tooling-and-review/preset-twin-sync.md +1 -1
- package/presets/claude/go/hooks/check-preset-update.mjs +4 -3
- package/presets/claude/go/rules/tooling-and-review/agent-team-intake.md +1 -0
- package/presets/claude/go/rules/tooling-and-review/agent-team-orchestrator.md +5 -2
- package/presets/claude/go/rules/tooling-and-review/preset-pr-checklist.md +4 -4
- package/presets/claude/go/rules/tooling-and-review/preset-twin-sync.md +1 -1
- package/presets/claude/ios-swift/hooks/check-preset-update.mjs +4 -3
- package/presets/claude/ios-swift/rules/tooling-and-review/agent-team-intake.md +1 -0
- package/presets/claude/ios-swift/rules/tooling-and-review/agent-team-orchestrator.md +5 -2
- package/presets/claude/ios-swift/rules/tooling-and-review/preset-pr-checklist.md +4 -4
- package/presets/claude/ios-swift/rules/tooling-and-review/preset-twin-sync.md +1 -1
- package/presets/claude/java/hooks/check-preset-update.mjs +4 -3
- package/presets/claude/java/rules/tooling-and-review/agent-team-intake.md +1 -0
- package/presets/claude/java/rules/tooling-and-review/agent-team-orchestrator.md +5 -2
- package/presets/claude/java/rules/tooling-and-review/preset-pr-checklist.md +4 -4
- package/presets/claude/java/rules/tooling-and-review/preset-twin-sync.md +1 -1
- package/presets/claude/mcp-ts/hooks/check-preset-update.mjs +4 -3
- package/presets/claude/mcp-ts/rules/tooling-and-review/agent-team-intake.md +1 -0
- package/presets/claude/mcp-ts/rules/tooling-and-review/agent-team-orchestrator.md +5 -2
- package/presets/claude/mcp-ts/rules/tooling-and-review/preset-pr-checklist.md +4 -4
- package/presets/claude/mcp-ts/rules/tooling-and-review/preset-twin-sync.md +1 -1
- package/presets/claude/mol/hooks/check-preset-update.mjs +4 -3
- package/presets/claude/mol/rules/tooling-and-review/agent-team-intake.md +1 -0
- package/presets/claude/mol/rules/tooling-and-review/agent-team-orchestrator.md +5 -2
- package/presets/claude/mol/rules/tooling-and-review/preset-pr-checklist.md +4 -4
- package/presets/claude/mol/rules/tooling-and-review/preset-twin-sync.md +1 -1
- package/presets/claude/next/agents/build-verifier.md +16 -3
- package/presets/claude/next/agents/feature-developer.md +2 -1
- package/presets/claude/next/agents/task-analyst.md +2 -0
- package/presets/claude/next/hooks/check-preset-update.mjs +4 -3
- package/presets/claude/next/rules/tooling-and-review/agent-team-intake.md +1 -0
- package/presets/claude/next/rules/tooling-and-review/agent-team-orchestrator.md +5 -2
- package/presets/claude/next/rules/tooling-and-review/preset-pr-checklist.md +4 -4
- package/presets/claude/next/rules/tooling-and-review/preset-twin-sync.md +1 -1
- package/presets/claude/nuxt/hooks/check-preset-update.mjs +4 -3
- package/presets/claude/nuxt/rules/tooling-and-review/agent-team-intake.md +1 -0
- package/presets/claude/nuxt/rules/tooling-and-review/agent-team-orchestrator.md +5 -2
- package/presets/claude/nuxt/rules/tooling-and-review/preset-pr-checklist.md +4 -4
- package/presets/claude/nuxt/rules/tooling-and-review/preset-twin-sync.md +1 -1
- package/presets/claude/php-hexagonal/hooks/check-preset-update.mjs +4 -3
- package/presets/claude/php-hexagonal/rules/tooling-and-review/agent-team-intake.md +1 -0
- package/presets/claude/php-hexagonal/rules/tooling-and-review/agent-team-orchestrator.md +5 -2
- package/presets/claude/php-hexagonal/rules/tooling-and-review/preset-pr-checklist.md +4 -4
- package/presets/claude/php-hexagonal/rules/tooling-and-review/preset-twin-sync.md +1 -1
- package/presets/claude/php-laravel/hooks/check-preset-update.mjs +4 -3
- package/presets/claude/php-laravel/rules/tooling-and-review/agent-team-intake.md +1 -0
- package/presets/claude/php-laravel/rules/tooling-and-review/agent-team-orchestrator.md +5 -2
- package/presets/claude/php-laravel/rules/tooling-and-review/preset-pr-checklist.md +4 -4
- package/presets/claude/php-laravel/rules/tooling-and-review/preset-twin-sync.md +1 -1
- package/presets/claude/svelte/hooks/check-preset-update.mjs +4 -3
- package/presets/claude/svelte/rules/tooling-and-review/agent-team-intake.md +1 -0
- package/presets/claude/svelte/rules/tooling-and-review/agent-team-orchestrator.md +5 -2
- package/presets/claude/svelte/rules/tooling-and-review/preset-pr-checklist.md +4 -4
- package/presets/claude/svelte/rules/tooling-and-review/preset-twin-sync.md +1 -1
- package/presets/cursor/android-kotlin/hooks/check-preset-update.mjs +4 -3
- package/presets/cursor/android-kotlin/rules/agent-team-intake.mdc +1 -0
- package/presets/cursor/android-kotlin/rules/agent-team-orchestrator.mdc +2 -1
- package/presets/cursor/android-kotlin/rules/preset-pr-checklist.mdc +4 -4
- package/presets/cursor/android-kotlin/rules/preset-twin-sync.mdc +1 -1
- package/presets/cursor/go/hooks/check-preset-update.mjs +4 -3
- package/presets/cursor/go/rules/agent-team-intake.mdc +1 -0
- package/presets/cursor/go/rules/agent-team-orchestrator.mdc +2 -1
- package/presets/cursor/go/rules/preset-pr-checklist.mdc +4 -4
- package/presets/cursor/go/rules/preset-twin-sync.mdc +1 -1
- package/presets/cursor/ios-swift/hooks/check-preset-update.mjs +4 -3
- package/presets/cursor/ios-swift/rules/agent-team-intake.mdc +1 -0
- package/presets/cursor/ios-swift/rules/agent-team-orchestrator.mdc +2 -1
- package/presets/cursor/ios-swift/rules/preset-pr-checklist.mdc +4 -4
- package/presets/cursor/ios-swift/rules/preset-twin-sync.mdc +1 -1
- package/presets/cursor/java/hooks/check-preset-update.mjs +4 -3
- package/presets/cursor/java/rules/agent-team-intake.mdc +1 -0
- package/presets/cursor/java/rules/agent-team-orchestrator.mdc +2 -1
- package/presets/cursor/java/rules/preset-pr-checklist.mdc +4 -4
- package/presets/cursor/java/rules/preset-twin-sync.mdc +1 -1
- package/presets/cursor/mcp-ts/hooks/check-preset-update.mjs +4 -3
- package/presets/cursor/mcp-ts/rules/agent-team-intake.mdc +1 -0
- package/presets/cursor/mcp-ts/rules/agent-team-orchestrator.mdc +2 -1
- package/presets/cursor/mcp-ts/rules/preset-pr-checklist.mdc +4 -4
- package/presets/cursor/mcp-ts/rules/preset-twin-sync.mdc +1 -1
- package/presets/cursor/mol/hooks/check-preset-update.mjs +4 -3
- package/presets/cursor/mol/rules/agent-team-intake.mdc +1 -0
- package/presets/cursor/mol/rules/agent-team-orchestrator.mdc +2 -1
- package/presets/cursor/mol/rules/preset-pr-checklist.mdc +4 -4
- package/presets/cursor/mol/rules/preset-twin-sync.mdc +1 -1
- package/presets/cursor/next/agents/build-verifier.md +16 -3
- package/presets/cursor/next/agents/feature-developer.md +2 -1
- package/presets/cursor/next/agents/task-analyst.md +2 -0
- package/presets/cursor/next/hooks/check-preset-update.mjs +4 -3
- package/presets/cursor/next/rules/agent-team-intake.mdc +1 -0
- package/presets/cursor/next/rules/agent-team-orchestrator.mdc +2 -1
- package/presets/cursor/next/rules/preset-pr-checklist.mdc +4 -4
- package/presets/cursor/next/rules/preset-twin-sync.mdc +1 -1
- package/presets/cursor/nuxt/hooks/check-preset-update.mjs +4 -3
- package/presets/cursor/nuxt/rules/agent-team-intake.mdc +1 -0
- package/presets/cursor/nuxt/rules/agent-team-orchestrator.mdc +2 -1
- package/presets/cursor/nuxt/rules/preset-pr-checklist.mdc +4 -4
- package/presets/cursor/nuxt/rules/preset-twin-sync.mdc +1 -1
- package/presets/cursor/php-hexagonal/hooks/check-preset-update.mjs +4 -3
- package/presets/cursor/php-hexagonal/rules/agent-team-intake.mdc +1 -0
- package/presets/cursor/php-hexagonal/rules/agent-team-orchestrator.mdc +2 -1
- package/presets/cursor/php-hexagonal/rules/preset-pr-checklist.mdc +4 -4
- package/presets/cursor/php-hexagonal/rules/preset-twin-sync.mdc +1 -1
- package/presets/cursor/php-laravel/hooks/check-preset-update.mjs +4 -3
- package/presets/cursor/php-laravel/rules/agent-team-intake.mdc +1 -0
- package/presets/cursor/php-laravel/rules/agent-team-orchestrator.mdc +2 -1
- package/presets/cursor/php-laravel/rules/preset-pr-checklist.mdc +4 -4
- package/presets/cursor/php-laravel/rules/preset-twin-sync.mdc +1 -1
- package/presets/cursor/svelte/hooks/check-preset-update.mjs +4 -3
- package/presets/cursor/svelte/rules/agent-team-intake.mdc +1 -0
- package/presets/cursor/svelte/rules/agent-team-orchestrator.mdc +2 -1
- package/presets/cursor/svelte/rules/preset-pr-checklist.mdc +4 -4
- package/presets/cursor/svelte/rules/preset-twin-sync.mdc +1 -1
- package/presets/mavis/android-kotlin/adapter-map.json +1 -1
- package/presets/mavis/android-kotlin/hooks/check-preset-update.mjs +4 -3
- package/presets/mavis/android-kotlin/rules/agent-team-intake.md +1 -0
- package/presets/mavis/android-kotlin/rules/agent-team-orchestrator.md +5 -2
- package/presets/mavis/android-kotlin/rules/preset-pr-checklist.md +4 -4
- package/presets/mavis/android-kotlin/rules/preset-twin-sync.md +1 -1
- package/presets/mavis/go/adapter-map.json +1 -1
- package/presets/mavis/go/hooks/check-preset-update.mjs +4 -3
- package/presets/mavis/go/rules/agent-team-intake.md +1 -0
- package/presets/mavis/go/rules/agent-team-orchestrator.md +5 -2
- package/presets/mavis/go/rules/preset-pr-checklist.md +4 -4
- package/presets/mavis/go/rules/preset-twin-sync.md +1 -1
- package/presets/mavis/ios-swift/adapter-map.json +1 -1
- package/presets/mavis/ios-swift/hooks/check-preset-update.mjs +4 -3
- package/presets/mavis/ios-swift/rules/agent-team-intake.md +1 -0
- package/presets/mavis/ios-swift/rules/agent-team-orchestrator.md +5 -2
- package/presets/mavis/ios-swift/rules/preset-pr-checklist.md +4 -4
- package/presets/mavis/ios-swift/rules/preset-twin-sync.md +1 -1
- package/presets/mavis/java/adapter-map.json +1 -1
- package/presets/mavis/java/hooks/check-preset-update.mjs +4 -3
- package/presets/mavis/java/rules/agent-team-intake.md +1 -0
- package/presets/mavis/java/rules/agent-team-orchestrator.md +5 -2
- package/presets/mavis/java/rules/preset-pr-checklist.md +4 -4
- package/presets/mavis/java/rules/preset-twin-sync.md +1 -1
- package/presets/mavis/mcp-ts/adapter-map.json +1 -1
- package/presets/mavis/mcp-ts/hooks/check-preset-update.mjs +4 -3
- package/presets/mavis/mcp-ts/rules/agent-team-intake.md +1 -0
- package/presets/mavis/mcp-ts/rules/agent-team-orchestrator.md +5 -2
- package/presets/mavis/mcp-ts/rules/preset-pr-checklist.md +4 -4
- package/presets/mavis/mcp-ts/rules/preset-twin-sync.md +1 -1
- package/presets/mavis/mol/adapter-map.json +1 -1
- package/presets/mavis/mol/hooks/check-preset-update.mjs +4 -3
- package/presets/mavis/mol/rules/agent-team-intake.md +1 -0
- package/presets/mavis/mol/rules/agent-team-orchestrator.md +5 -2
- package/presets/mavis/mol/rules/preset-pr-checklist.md +4 -4
- package/presets/mavis/mol/rules/preset-twin-sync.md +1 -1
- package/presets/mavis/next/adapter-map.json +1 -1
- package/presets/mavis/next/agents/build-verifier.md +16 -3
- package/presets/mavis/next/agents/feature-developer.md +2 -1
- package/presets/mavis/next/agents/task-analyst.md +2 -0
- package/presets/mavis/next/hooks/check-preset-update.mjs +4 -3
- package/presets/mavis/next/rules/agent-team-intake.md +1 -0
- package/presets/mavis/next/rules/agent-team-orchestrator.md +5 -2
- package/presets/mavis/next/rules/preset-pr-checklist.md +4 -4
- package/presets/mavis/next/rules/preset-twin-sync.md +1 -1
- package/presets/mavis/nuxt/adapter-map.json +1 -1
- package/presets/mavis/nuxt/hooks/check-preset-update.mjs +4 -3
- package/presets/mavis/nuxt/rules/agent-team-intake.md +1 -0
- package/presets/mavis/nuxt/rules/agent-team-orchestrator.md +5 -2
- package/presets/mavis/nuxt/rules/preset-pr-checklist.md +4 -4
- package/presets/mavis/nuxt/rules/preset-twin-sync.md +1 -1
- package/presets/mavis/php-hexagonal/adapter-map.json +1 -1
- package/presets/mavis/php-hexagonal/hooks/check-preset-update.mjs +4 -3
- package/presets/mavis/php-hexagonal/rules/agent-team-intake.md +1 -0
- package/presets/mavis/php-hexagonal/rules/agent-team-orchestrator.md +5 -2
- package/presets/mavis/php-hexagonal/rules/preset-pr-checklist.md +4 -4
- package/presets/mavis/php-hexagonal/rules/preset-twin-sync.md +1 -1
- package/presets/mavis/php-laravel/adapter-map.json +1 -1
- package/presets/mavis/php-laravel/hooks/check-preset-update.mjs +4 -3
- package/presets/mavis/php-laravel/rules/agent-team-intake.md +1 -0
- package/presets/mavis/php-laravel/rules/agent-team-orchestrator.md +5 -2
- package/presets/mavis/php-laravel/rules/preset-pr-checklist.md +4 -4
- package/presets/mavis/php-laravel/rules/preset-twin-sync.md +1 -1
- package/presets/mavis/svelte/adapter-map.json +1 -1
- package/presets/mavis/svelte/hooks/check-preset-update.mjs +4 -3
- package/presets/mavis/svelte/rules/agent-team-intake.md +1 -0
- package/presets/mavis/svelte/rules/agent-team-orchestrator.md +5 -2
- package/presets/mavis/svelte/rules/preset-pr-checklist.md +4 -4
- package/presets/mavis/svelte/rules/preset-twin-sync.md +1 -1
- package/presets/opencode/android-kotlin/adapter-map.json +1 -1
- package/presets/opencode/android-kotlin/hooks/check-preset-update.mjs +4 -3
- package/presets/opencode/android-kotlin/rules/agent-team-intake.md +1 -0
- package/presets/opencode/android-kotlin/rules/agent-team-orchestrator.md +5 -2
- package/presets/opencode/android-kotlin/rules/preset-pr-checklist.md +4 -4
- package/presets/opencode/android-kotlin/rules/preset-twin-sync.md +1 -1
- package/presets/opencode/go/adapter-map.json +1 -1
- package/presets/opencode/go/hooks/check-preset-update.mjs +4 -3
- package/presets/opencode/go/rules/agent-team-intake.md +1 -0
- package/presets/opencode/go/rules/agent-team-orchestrator.md +5 -2
- package/presets/opencode/go/rules/preset-pr-checklist.md +4 -4
- package/presets/opencode/go/rules/preset-twin-sync.md +1 -1
- package/presets/opencode/ios-swift/adapter-map.json +1 -1
- package/presets/opencode/ios-swift/hooks/check-preset-update.mjs +4 -3
- package/presets/opencode/ios-swift/rules/agent-team-intake.md +1 -0
- package/presets/opencode/ios-swift/rules/agent-team-orchestrator.md +5 -2
- package/presets/opencode/ios-swift/rules/preset-pr-checklist.md +4 -4
- package/presets/opencode/ios-swift/rules/preset-twin-sync.md +1 -1
- package/presets/opencode/java/adapter-map.json +1 -1
- package/presets/opencode/java/hooks/check-preset-update.mjs +4 -3
- package/presets/opencode/java/rules/agent-team-intake.md +1 -0
- package/presets/opencode/java/rules/agent-team-orchestrator.md +5 -2
- package/presets/opencode/java/rules/preset-pr-checklist.md +4 -4
- package/presets/opencode/java/rules/preset-twin-sync.md +1 -1
- package/presets/opencode/mcp-ts/adapter-map.json +1 -1
- package/presets/opencode/mcp-ts/hooks/check-preset-update.mjs +4 -3
- package/presets/opencode/mcp-ts/rules/agent-team-intake.md +1 -0
- package/presets/opencode/mcp-ts/rules/agent-team-orchestrator.md +5 -2
- package/presets/opencode/mcp-ts/rules/preset-pr-checklist.md +4 -4
- package/presets/opencode/mcp-ts/rules/preset-twin-sync.md +1 -1
- package/presets/opencode/mol/adapter-map.json +1 -1
- package/presets/opencode/mol/hooks/check-preset-update.mjs +4 -3
- package/presets/opencode/mol/rules/agent-team-intake.md +1 -0
- package/presets/opencode/mol/rules/agent-team-orchestrator.md +5 -2
- package/presets/opencode/mol/rules/preset-pr-checklist.md +4 -4
- package/presets/opencode/mol/rules/preset-twin-sync.md +1 -1
- package/presets/opencode/next/adapter-map.json +1 -1
- package/presets/opencode/next/agents/build-verifier.md +16 -3
- package/presets/opencode/next/agents/feature-developer.md +2 -1
- package/presets/opencode/next/agents/task-analyst.md +2 -0
- package/presets/opencode/next/hooks/check-preset-update.mjs +4 -3
- package/presets/opencode/next/rules/agent-team-intake.md +1 -0
- package/presets/opencode/next/rules/agent-team-orchestrator.md +5 -2
- package/presets/opencode/next/rules/preset-pr-checklist.md +4 -4
- package/presets/opencode/next/rules/preset-twin-sync.md +1 -1
- package/presets/opencode/nuxt/adapter-map.json +1 -1
- package/presets/opencode/nuxt/hooks/check-preset-update.mjs +4 -3
- package/presets/opencode/nuxt/rules/agent-team-intake.md +1 -0
- package/presets/opencode/nuxt/rules/agent-team-orchestrator.md +5 -2
- package/presets/opencode/nuxt/rules/preset-pr-checklist.md +4 -4
- package/presets/opencode/nuxt/rules/preset-twin-sync.md +1 -1
- package/presets/opencode/php-hexagonal/adapter-map.json +1 -1
- package/presets/opencode/php-hexagonal/hooks/check-preset-update.mjs +4 -3
- package/presets/opencode/php-hexagonal/rules/agent-team-intake.md +1 -0
- package/presets/opencode/php-hexagonal/rules/agent-team-orchestrator.md +5 -2
- package/presets/opencode/php-hexagonal/rules/preset-pr-checklist.md +4 -4
- package/presets/opencode/php-hexagonal/rules/preset-twin-sync.md +1 -1
- package/presets/opencode/php-laravel/adapter-map.json +1 -1
- package/presets/opencode/php-laravel/hooks/check-preset-update.mjs +4 -3
- package/presets/opencode/php-laravel/rules/agent-team-intake.md +1 -0
- package/presets/opencode/php-laravel/rules/agent-team-orchestrator.md +5 -2
- package/presets/opencode/php-laravel/rules/preset-pr-checklist.md +4 -4
- package/presets/opencode/php-laravel/rules/preset-twin-sync.md +1 -1
- package/presets/opencode/svelte/adapter-map.json +1 -1
- package/presets/opencode/svelte/hooks/check-preset-update.mjs +4 -3
- package/presets/opencode/svelte/rules/agent-team-intake.md +1 -0
- package/presets/opencode/svelte/rules/agent-team-orchestrator.md +5 -2
- package/presets/opencode/svelte/rules/preset-pr-checklist.md +4 -4
- package/presets/opencode/svelte/rules/preset-twin-sync.md +1 -1
- package/presets/zcode/android-kotlin/adapter-map.json +1 -1
- package/presets/zcode/android-kotlin/hooks/check-preset-update.mjs +4 -3
- package/presets/zcode/android-kotlin/rules/agent-team-intake.md +1 -0
- package/presets/zcode/android-kotlin/rules/agent-team-orchestrator.md +5 -2
- package/presets/zcode/android-kotlin/rules/preset-pr-checklist.md +4 -4
- package/presets/zcode/android-kotlin/rules/preset-twin-sync.md +1 -1
- package/presets/zcode/go/adapter-map.json +1 -1
- package/presets/zcode/go/hooks/check-preset-update.mjs +4 -3
- package/presets/zcode/go/rules/agent-team-intake.md +1 -0
- package/presets/zcode/go/rules/agent-team-orchestrator.md +5 -2
- package/presets/zcode/go/rules/preset-pr-checklist.md +4 -4
- package/presets/zcode/go/rules/preset-twin-sync.md +1 -1
- package/presets/zcode/ios-swift/adapter-map.json +1 -1
- package/presets/zcode/ios-swift/hooks/check-preset-update.mjs +4 -3
- package/presets/zcode/ios-swift/rules/agent-team-intake.md +1 -0
- package/presets/zcode/ios-swift/rules/agent-team-orchestrator.md +5 -2
- package/presets/zcode/ios-swift/rules/preset-pr-checklist.md +4 -4
- package/presets/zcode/ios-swift/rules/preset-twin-sync.md +1 -1
- package/presets/zcode/java/adapter-map.json +1 -1
- package/presets/zcode/java/hooks/check-preset-update.mjs +4 -3
- package/presets/zcode/java/rules/agent-team-intake.md +1 -0
- package/presets/zcode/java/rules/agent-team-orchestrator.md +5 -2
- package/presets/zcode/java/rules/preset-pr-checklist.md +4 -4
- package/presets/zcode/java/rules/preset-twin-sync.md +1 -1
- package/presets/zcode/mcp-ts/adapter-map.json +1 -1
- package/presets/zcode/mcp-ts/hooks/check-preset-update.mjs +4 -3
- package/presets/zcode/mcp-ts/rules/agent-team-intake.md +1 -0
- package/presets/zcode/mcp-ts/rules/agent-team-orchestrator.md +5 -2
- package/presets/zcode/mcp-ts/rules/preset-pr-checklist.md +4 -4
- package/presets/zcode/mcp-ts/rules/preset-twin-sync.md +1 -1
- package/presets/zcode/mol/adapter-map.json +1 -1
- package/presets/zcode/mol/hooks/check-preset-update.mjs +4 -3
- package/presets/zcode/mol/rules/agent-team-intake.md +1 -0
- package/presets/zcode/mol/rules/agent-team-orchestrator.md +5 -2
- package/presets/zcode/mol/rules/preset-pr-checklist.md +4 -4
- package/presets/zcode/mol/rules/preset-twin-sync.md +1 -1
- package/presets/zcode/next/adapter-map.json +1 -1
- package/presets/zcode/next/agents/build-verifier.md +16 -3
- package/presets/zcode/next/agents/feature-developer.md +2 -1
- package/presets/zcode/next/agents/task-analyst.md +2 -0
- package/presets/zcode/next/hooks/check-preset-update.mjs +4 -3
- package/presets/zcode/next/rules/agent-team-intake.md +1 -0
- package/presets/zcode/next/rules/agent-team-orchestrator.md +5 -2
- package/presets/zcode/next/rules/preset-pr-checklist.md +4 -4
- package/presets/zcode/next/rules/preset-twin-sync.md +1 -1
- package/presets/zcode/nuxt/adapter-map.json +1 -1
- package/presets/zcode/nuxt/hooks/check-preset-update.mjs +4 -3
- package/presets/zcode/nuxt/rules/agent-team-intake.md +1 -0
- package/presets/zcode/nuxt/rules/agent-team-orchestrator.md +5 -2
- package/presets/zcode/nuxt/rules/preset-pr-checklist.md +4 -4
- package/presets/zcode/nuxt/rules/preset-twin-sync.md +1 -1
- package/presets/zcode/php-hexagonal/adapter-map.json +1 -1
- package/presets/zcode/php-hexagonal/hooks/check-preset-update.mjs +4 -3
- package/presets/zcode/php-hexagonal/rules/agent-team-intake.md +1 -0
- package/presets/zcode/php-hexagonal/rules/agent-team-orchestrator.md +5 -2
- package/presets/zcode/php-hexagonal/rules/preset-pr-checklist.md +4 -4
- package/presets/zcode/php-hexagonal/rules/preset-twin-sync.md +1 -1
- package/presets/zcode/php-laravel/adapter-map.json +1 -1
- package/presets/zcode/php-laravel/hooks/check-preset-update.mjs +4 -3
- package/presets/zcode/php-laravel/rules/agent-team-intake.md +1 -0
- package/presets/zcode/php-laravel/rules/agent-team-orchestrator.md +5 -2
- package/presets/zcode/php-laravel/rules/preset-pr-checklist.md +4 -4
- package/presets/zcode/php-laravel/rules/preset-twin-sync.md +1 -1
- package/presets/zcode/svelte/adapter-map.json +1 -1
- package/presets/zcode/svelte/hooks/check-preset-update.mjs +4 -3
- package/presets/zcode/svelte/rules/agent-team-intake.md +1 -0
- package/presets/zcode/svelte/rules/agent-team-orchestrator.md +5 -2
- package/presets/zcode/svelte/rules/preset-pr-checklist.md +4 -4
- package/presets/zcode/svelte/rules/preset-twin-sync.md +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,30 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## Unreleased
|
|
4
|
+
|
|
5
|
+
### Preset update notice
|
|
6
|
+
|
|
7
|
+
- **The `Shape:` sample carries the recorded version.** `check-preset-update.mjs` interpolated `latest` but left `<installed>` as a literal, so an agent that copied the sample verbatim printed the placeholder to the user instead of the installed version.
|
|
8
|
+
- **ZCode installs are checked.** `TOOL_ROOTS` includes `.zcode`, so a ZCode-only install is compared with the latest release and appears in the notice.
|
|
9
|
+
|
|
10
|
+
### Release gate and a fast loop gate
|
|
11
|
+
|
|
12
|
+
- **`yarn release:gate`.** The full structure composite, the `.ai.local` engine tests, and the strict product-specs dogfood run in one release-only command. It refuses `AI_RULES_SKIP_HOOK_TESTS=1` / `AI_RULES_SKIP_PACK_TESTS=1` and a dirty tracked tree, records the release `HEAD`, and writes a report under `.release-gate/`.
|
|
13
|
+
- **`yarn check:fast`.** The loop gate is now `check-preset-fast.sh` (~50 s: generated drift, twin drift, token budget, frontmatter, consumer links, next attached budget, OpenCode platform contract self-test), not the composite with the hook suites skipped. `test-cli-init-clean` moves to the delta gates and CI.
|
|
14
|
+
- **`yarn check:changed`.** The delta classifier prints `affected loop gates` and a separate `release-only gates` line; the preset-domain list names the targeted checks instead of `check:preset-structure (full)`.
|
|
15
|
+
- **Preset agent DoD.** `feature-developer` and `build-verifier` send preset-source changes to `check:changed` + `check:fast`; the full gate is release-only. The PR checklist separates merge from release.
|
|
16
|
+
- **`check:all` removed.** It duplicated the composite; use `yarn release:gate`.
|
|
17
|
+
|
|
18
|
+
## 0.2.62
|
|
19
|
+
|
|
20
|
+
### Engine lock and write audit
|
|
21
|
+
|
|
22
|
+
- **One lock protocol.** `<lock>.d` is the only mutual exclusion for the self-learning journal: a `mkdir` with `owner.json`, no `perl`, no `flock`, no shell. Before, a host with `perl` and a container without it locked different paths (`flock` on the file, `mkdir` on the sibling directory) and could enter together; the `AI_RULES_LOCK_NO_PERL` switch and the short-lived `perl` helper are gone, which also removes one fork per acquisition and the `lock timeout` it could raise while the mutex was free.
|
|
23
|
+
- **Reclaim cannot evict a live owner.** A dead owner is removed inside an atomic `<lock>.d.reclaim` guard, and the owner is re-read after the guard is taken. The previous rename could move a directory another contender had just created, admitting two writers to the journal and the manifest. Fixture: `test-platform-lock-exclusion.mjs` (cross-mode exclusion both ways, plus a five-iteration two-contender reclaim race).
|
|
24
|
+
- **Step-scoped write audit.** `check-write-scope.mjs --step <id> --save-baseline` records every dirty path with its content hash before a step writes; the audit then reports only paths the step created or changed. `--base HEAD` alone attributed every earlier step of the session to the current one, because agents never commit. `--paths` and `--base` stay as escape hatches.
|
|
25
|
+
- **A legacy pipeline is a skip.** `check-write-scope.mjs` exits `3` (SKIP, with `skipReason` and a `hint` in the JSON payload) when the pipeline has no step ids or no `writeScopes`. `build-verifier` records that under `## Soft notes` instead of failing, so a mandatory gate no longer becomes unsatisfiable for work that predates the schema. Step ids are backfillable with `team-db.mjs migrate-tasks`; `writeScopes` are only ever declared by `task-router`.
|
|
26
|
+
- **Install surface.** `.ai.local/.gitignore` gains `team/.write-scope/`; `update` adds the line to an existing ignore file and seeds the unchanged scripts.
|
|
27
|
+
|
|
3
28
|
## 0.2.61
|
|
4
29
|
|
|
5
30
|
### Cross-platform support
|
package/README.md
CHANGED
|
@@ -52,7 +52,7 @@ node .ai.local/scripts/run.mjs --strict # read-only check: exit 1 when capture
|
|
|
52
52
|
node .ai.local/scripts/run.mjs --dry-run # read-only preview: decision, target, before/after, exact writes
|
|
53
53
|
```
|
|
54
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.
|
|
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`. The orchestrator saves the step baseline (`--step <step-id> --save-baseline`) before the step writes, so the audit covers that step rather than the whole session. A pipeline that predates `writeScopes` exits `3` (skip), never a failure. It is never a hook gate.
|
|
56
56
|
|
|
57
57
|
`init` seeds the engine with **skip-if-exists** — a modified `run.mjs` stays yours and is reported as kept; there is no
|
|
58
58
|
`--force`. The seeded tree is byte-identical to `presets/_shared/ai-local/scripts/`, and `.ai.local/.gitignore` (created
|
|
@@ -217,7 +217,7 @@ Optional check: `yarn check:product-specs [<repo-root>]` (WARN) or `--strict`. T
|
|
|
217
217
|
|
|
218
218
|
## Anti-hallucination
|
|
219
219
|
|
|
220
|
-
Every installed preset ships requestable `anti-hallucination-contract` (not always-on). Writer roles — implementer, unit-test, e2e, qa, and `code-reviewer` — also load that stack's floor stem. `yarn
|
|
220
|
+
Every installed preset ships requestable `anti-hallucination-contract` (not always-on). Writer roles — implementer, unit-test, e2e, qa, and `code-reviewer` — also load that stack's floor stem. `yarn release:gate` fails if a role or skill binding is removed. Register a new skill family in `SKILL_CONTRACT_CLASS` (`writer` or `reader`). Details: [`docs/PRESET-CONTRIBUTION.md`](docs/PRESET-CONTRIBUTION.md).
|
|
221
221
|
|
|
222
222
|
## Contributing
|
|
223
223
|
|
|
@@ -227,7 +227,7 @@ Every installed preset ships requestable `anti-hallucination-contract` (not alwa
|
|
|
227
227
|
- MCP setup: [`docs/MCP-SETUP.md`](docs/MCP-SETUP.md)
|
|
228
228
|
- MCP catalog: [`docs/MCP-CATALOG.md`](docs/MCP-CATALOG.md)
|
|
229
229
|
- 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
|
|
230
|
-
- Gates: `yarn check:
|
|
230
|
+
- Gates: loop `yarn check:changed` + `yarn check:fast`; release `yarn release:gate`
|
|
231
231
|
|
|
232
232
|
`_shared` is not an installable `--preset`.
|
|
233
233
|
|
|
@@ -19,6 +19,7 @@ const AI_LOCAL_GITIGNORE = [
|
|
|
19
19
|
'# Files written by the in-task self-learning engine and by legacy-team',
|
|
20
20
|
'# migration backups. Local safety net — never commit.',
|
|
21
21
|
'*.lock',
|
|
22
|
+
'*.lock.d/',
|
|
22
23
|
'*.tmp',
|
|
23
24
|
'.rollback/',
|
|
24
25
|
'.template-base.json',
|
|
@@ -36,6 +37,8 @@ const AI_LOCAL_GITIGNORE = [
|
|
|
36
37
|
'# Scheduler runtime state; jobs.json stays tracked (jobs as code).',
|
|
37
38
|
'team/scheduler/runs/',
|
|
38
39
|
'team/scheduler/state.json',
|
|
40
|
+
'# Per-step write-scope baselines; derived from git, never a project input.',
|
|
41
|
+
'team/.write-scope/',
|
|
39
42
|
'team/upstream/cursor.json',
|
|
40
43
|
'',
|
|
41
44
|
].join('\n');
|
package/bin/mavis-install.js
CHANGED
|
@@ -269,7 +269,9 @@ function cmdInitMavis({ preset, cwdOption, helpers }) {
|
|
|
269
269
|
managedFiles[item.rel] = sha256File(item.dest);
|
|
270
270
|
}
|
|
271
271
|
const manifest = {
|
|
272
|
-
|
|
272
|
+
// Mirrors MANIFEST_SCHEMA_VERSION in cli.js: a v2 manifest lists only preset
|
|
273
|
+
// files, so `doctor` and update pruning can trust it.
|
|
274
|
+
schemaVersion: 2,
|
|
273
275
|
packageVersion: packageVersion(packageRoot),
|
|
274
276
|
platform: 'mavis',
|
|
275
277
|
preset: stack,
|
package/bin/opencode-install.js
CHANGED
|
@@ -466,7 +466,9 @@ function cmdInitOpencode({ preset, cwdOption, helpers }) {
|
|
|
466
466
|
managedFiles[item.rel] = sha256File(item.dest);
|
|
467
467
|
}
|
|
468
468
|
const manifest = {
|
|
469
|
-
|
|
469
|
+
// Mirrors MANIFEST_SCHEMA_VERSION in cli.js: a v2 manifest lists only preset
|
|
470
|
+
// files, so `doctor` and update pruning can trust it.
|
|
471
|
+
schemaVersion: 2,
|
|
470
472
|
packageVersion: packageVersion(packageRoot),
|
|
471
473
|
platform: 'opencode',
|
|
472
474
|
preset: stack,
|
package/bin/zcode-install.js
CHANGED
|
@@ -366,7 +366,9 @@ function cmdInitZcode({ preset, cwdOption, helpers }) {
|
|
|
366
366
|
managedFiles[item.rel] = sha256File(item.dest);
|
|
367
367
|
}
|
|
368
368
|
const manifest = {
|
|
369
|
-
|
|
369
|
+
// Mirrors MANIFEST_SCHEMA_VERSION in cli.js: a v2 manifest lists only preset
|
|
370
|
+
// files, so `doctor` and update pruning can trust it.
|
|
371
|
+
schemaVersion: 2,
|
|
370
372
|
packageVersion: packageVersion(packageRoot),
|
|
371
373
|
platform: 'zcode',
|
|
372
374
|
preset: stack,
|
package/docs/MAVIS.md
CHANGED
|
@@ -115,15 +115,18 @@ Desktop/CLI versions in the compatibility doc are **operator snapshots**, not pa
|
|
|
115
115
|
| [`MAVIS-COMPATIBILITY.md`](./MAVIS-COMPATIBILITY.md) | Probe evidence and go/no-go |
|
|
116
116
|
| [`PRESET-CONTRIBUTION.md`](./PRESET-CONTRIBUTION.md) | Sibling adapter authoring |
|
|
117
117
|
|
|
118
|
-
Validate after preset edits:
|
|
118
|
+
Validate after preset edits (loop):
|
|
119
119
|
|
|
120
120
|
```bash
|
|
121
121
|
cd packages/ai-rules
|
|
122
|
-
|
|
122
|
+
yarn check:changed
|
|
123
|
+
yarn check:fast
|
|
123
124
|
node scripts/check-mavis-platform-contract.mjs --self-test
|
|
124
125
|
node scripts/check-mavis-adapter-map.mjs --self-test
|
|
125
126
|
```
|
|
126
127
|
|
|
128
|
+
The full `scripts/check-preset-structure.sh` composite runs in `yarn release:gate` before a release.
|
|
129
|
+
|
|
127
130
|
## Released stacks
|
|
128
131
|
|
|
129
132
|
`init mavis --preset <stack>` and `init multi --preset <stack>` install Mavis for every stack in `presets/mavis/platform-contract.json` `releasedStacks` (all 11). Per-stack always-on rules live in `scripts/lib/stack-platform-profiles.mjs`. Derive with `node scripts/generate-mavis.mjs --stack <stack>` from Cursor SoT — never from Claude.
|
package/docs/OPENCODE.md
CHANGED
|
@@ -139,15 +139,18 @@ row; the job asserts its resolved rules with `opencode debug agents` before the
|
|
|
139
139
|
| [`OPENCODE-COMPATIBILITY.md`](./OPENCODE-COMPATIBILITY.md) | Evidence and go/no-go |
|
|
140
140
|
| [`PRESET-CONTRIBUTION.md`](./PRESET-CONTRIBUTION.md) | Sibling adapter authoring |
|
|
141
141
|
|
|
142
|
-
Validate after preset edits:
|
|
142
|
+
Validate after preset edits (loop):
|
|
143
143
|
|
|
144
144
|
```bash
|
|
145
145
|
cd packages/ai-rules
|
|
146
|
-
|
|
146
|
+
yarn check:changed
|
|
147
|
+
yarn check:fast
|
|
147
148
|
node scripts/check-opencode-platform-contract.mjs --self-test
|
|
148
149
|
node scripts/check-opencode-adapter-map.mjs --self-test
|
|
149
150
|
```
|
|
150
151
|
|
|
152
|
+
The full `scripts/check-preset-structure.sh` composite runs in `yarn release:gate` before a release.
|
|
153
|
+
|
|
151
154
|
## Released stacks
|
|
152
155
|
|
|
153
156
|
`init opencode --preset <stack>` and `init multi --preset <stack>` install OpenCode for every stack in `presets/opencode/platform-contract.json` `releasedStacks` (all 11). Per-stack always-on rules and `permission.edit` allow-lists live in `scripts/lib/stack-platform-profiles.mjs`. Derive with `node scripts/generate-opencode.mjs --stack <stack>` from Cursor SoT — never from Claude.
|
package/docs/PLATFORMS.md
CHANGED
|
@@ -12,7 +12,7 @@ macOS and Linux are fully supported. Windows is supported with the prerequisites
|
|
|
12
12
|
| Node.js for the `team-db` SQLite projection | **>= 22.13** | `team-db.mjs` uses `node:sqlite`. Below 22.13 the projection degrades to file-only with one diagnostic line; the rest of the engine keeps working. |
|
|
13
13
|
| `git` | required | Install state, generated-file drift, and every gate read the work tree through `git`. |
|
|
14
14
|
| `bash` | required for the chain hook only | The Cursor/Claude guard and the hook resolver run through Node. `chain-team-phases.sh` itself is still a bash script. |
|
|
15
|
-
| `perl` |
|
|
15
|
+
| `perl` | not required | The engine lock is a sibling directory `<lock>.d` (`mkdir` + `owner.json`), so the same path excludes every process on a shared checkout. No `flock` helper and no shell, so a runtime without `perl` is not a slower path. |
|
|
16
16
|
|
|
17
17
|
### Windows `bash`
|
|
18
18
|
|
|
@@ -169,24 +169,25 @@ Summary:
|
|
|
169
169
|
- [ ] Reachability: every new OpenCode/Mavis rule is named by an agent/command/skill/entry or an always-on rule (or is `preset-*` authoring-only) — `scripts/check-preset-reachability.sh`
|
|
170
170
|
- [ ] Embed drift: `scripts/check-shared-core-drift.sh` after core/embed edits
|
|
171
171
|
- [ ] Anti-hallucination: `check-anti-hallucination-coverage.mjs` passes. New skill families are registered in `SKILL_CONTRACT_CLASS` (`writer` loads the stack floor; `reader` loads the contract only). `code-review` is `writer`.
|
|
172
|
-
- [ ] Structure gates: `yarn check:
|
|
172
|
+
- [ ] Structure gates: `yarn check:fast` in the loop; `yarn release:gate` before a release (the full `bash scripts/check-preset-structure.sh` composite)
|
|
173
173
|
- [ ] Twin drift: after editing a Claude `commands/**` or `skills/**` file, `node scripts/check-preset-twin-drift.mjs` passes — mirror the change in the Cursor twin (delta and divergence unchanged) or record a deliberate divergence with `--update`. A deliberate divergence that **raises** an allowance needs `--update --widen`; dropping a baseline row needs `--update --prune`. A plain `--update` refuses both.
|
|
174
174
|
- [ ] Generated trees regenerated (`generate-mavis.mjs` + `generate-opencode.mjs`) and CLI goldens recaptured (`capture-cli-golden.mjs`) after any preset-installed file changes
|
|
175
175
|
|
|
176
|
-
Validation: `yarn check:
|
|
176
|
+
Validation: `yarn check:fast` + the `preset-pr-checklist` rule; the full composite runs in `yarn release:gate`; CI workflow `preset-structure.yml` (`check`, `hooks`, `ai-local-engine-tests`).
|
|
177
177
|
|
|
178
178
|
## Release order
|
|
179
179
|
|
|
180
180
|
The published artifact must document the release it carries.
|
|
181
181
|
|
|
182
182
|
1. Write the `CHANGELOG.md` section for the version and bump `packages/ai-rules/package.json` to that version **in one commit** — the gate compares the two, so a changelog-only commit is red.
|
|
183
|
-
2.
|
|
183
|
+
2. Run `yarn release:gate` on that commit and keep `release-gate-report.json`.
|
|
184
|
+
3. Tag the release and publish the tag.
|
|
184
185
|
|
|
185
186
|
A tag that carries a version bump without its changelog section ships the previous release's notes. `scripts/check-release-consistency.mjs` (wired into `check-preset-structure.sh`, alias `yarn check:release-consistency`) fails the build when `package.json` version and the newest `## <version>` heading in `CHANGELOG.md` disagree; fixture `test-release-consistency.mjs` covers the two failure shapes.
|
|
186
187
|
|
|
187
188
|
## Anti-hallucination oracle
|
|
188
189
|
|
|
189
|
-
`yarn
|
|
190
|
+
`yarn release:gate` runs `scripts/check-anti-hallucination-coverage.mjs` inside the composite, immediately after the Claude agent-block check. FAIL means a released stack dropped the shared contract, a writer role dropped `STACK_FLOOR_STEMS`, a Cursor agent or in-scope skill lost the load-line marker, `/task` or the shared orchestrator named a floor stem, or a generated `## Rules to load` block no longer contains the stem `getZoneRulesForAgent` requires. The gate does not scan consumer `app/**` and does not call Context7.
|
|
190
191
|
|
|
191
192
|
`scripts/test-anti-hallucination-coverage.mjs` clones `zoneRulesByRole`, deletes `anti-hallucination-contract` from `next.reviewer`, and expects FAIL mentioning `next` and `reviewer`. It does not edit the preset tree.
|
|
192
193
|
|
|
@@ -263,7 +264,7 @@ Consumer guide: [`ZCODE.md`](./ZCODE.md). Compatibility evidence: [`ZCODE-COMPAT
|
|
|
263
264
|
| Validation | code-reviewer **WARN** drift / **FAIL** broken INDEX or missing required FM on touched specs; `check:preset-structure` **FAIL** missing assets/twins/requestable; optional `scripts/check-product-specs.sh` (**WARN** default, **`--strict`** FAIL; ships in the npm `files` tarball). Checker is bash INDEX/keys/headings — it does **not** evaluate `frontmatter-v1.schema.json` |
|
|
264
265
|
| Dogfood | `dogfood/mcp-ts-sample/docs/specs/` — mcp-ts field semantics (`routes` = tool names) |
|
|
265
266
|
|
|
266
|
-
When adding or changing either stem: update **both** ×20 adapters, README mapping rows, and run `check:shared-core-drift` + `
|
|
267
|
+
When adding or changing either stem: update **both** ×20 adapters, README mapping rows, and run `check:shared-core-drift` + the delta gates; the full `release:gate` runs before a release.
|
|
267
268
|
|
|
268
269
|
---
|
|
269
270
|
|
|
@@ -408,7 +409,7 @@ Load these when editing files under `packages/ai-rules/presets/**`, `.cursor/**`
|
|
|
408
409
|
|--------------|---------|
|
|
409
410
|
| `yarn fix:generated` | Regenerate every released generated platform and recapture the CLI goldens it owns (`cursor/next`, `claude/next`, and every Mavis/OpenCode stack). Run after changing Cursor SoT, before fail-only checks. Capture a non-`next` Cursor/Claude golden explicitly with `node scripts/capture-cli-golden.mjs <cursor|claude> <stack>`; never hand-edit one. Dogfood sync remains separate. |
|
|
410
411
|
| `scripts/sync-dogfood-cursor.sh` | Copy `presets/cursor/<preset>/` → root `.cursor/` (`AI_RULES_DOGFOOD_PRESET`, default `next`). Also copies `REPO_AGENTS.md` → repo-root `AGENTS.md`. Seeds `.ai.local/team` templates; preserves `.ai.local/team/tasks/`. |
|
|
411
|
-
| `scripts/check-shared-core-drift.sh` / `yarn check:shared-core-drift` | Check embed-mode adapters vs core; lists lineage consumers. **Always hard:** every `_shared/core/**` file must be classified `embed | lineage | internal` in `_lib/embed-stems.json` (unclassified → exit 1). Drift is soft by default; set `AI_RULES_DRIFT_FAIL=1` (or use `
|
|
412
|
+
| `scripts/check-shared-core-drift.sh` / `yarn check:shared-core-drift` | Check embed-mode adapters vs core; lists lineage consumers. **Always hard:** every `_shared/core/**` file must be classified `embed | lineage | internal` in `_lib/embed-stems.json` (unclassified → exit 1). Drift is soft by default; set `AI_RULES_DRIFT_FAIL=1` (or use `release:gate`) to exit non-zero. A stem listed in `requiredSentences` is checked in the core **and in every adapter of that stem, whatever the lineage class** — the body comparison cannot cover a platform whose adapter is not a byte-embed of the core (the Cursor family reorders, omits and adds sections), so the normative fragments of that stem are pinned separately. |
|
|
412
413
|
| `scripts/check-preset-twin-map.sh` / `yarn check:preset-twin-map` | **FAIL** if Cursor `.mdc` missing from Claude mapping table, twin file missing, or orphan topic `.md` (excl. `**/README.md`). Stacks: `next`, `nuxt`, `svelte`, `mol`, `ios-swift`, `android-kotlin`, `go`, `java`, `mcp-ts`, `php-hexagonal`, `php-laravel`. **Rules only** — commands and skills are guarded by `check-preset-twin-drift.mjs`. |
|
|
413
414
|
| `scripts/check-preset-twin-drift.mjs` / `yarn check:preset-twin-drift` | **FAIL** when a hand-maintained Claude twin (`presets/claude/<stack>/{commands,skills}/**/*.md`) drifts further from its Cursor source than `scripts/_lib/claude-twin-drift-baseline.json` records, when the recorded divergence between the twins changes while the line delta does not, when a command/skill has no twin on the other side, when a new pair has no baseline row, when a baseline row has no live pair, or when the baseline itself is missing its hash rows. Full parity is not required: mirror a change in both twins (delta and divergence unchanged) or record a deliberate divergence with `--update`. Raising an allowance needs `--update --widen`; dropping a row needs `--update --prune`. Fixture `test-preset-twin-drift.mjs`. |
|
|
414
415
|
| `scripts/check-claude-agent-parity.mjs` / `yarn check:claude-agent-parity` | **FAIL** when a hand-maintained Claude `agents/*.md` twin drifts from its Cursor source beyond `scripts/_lib/claude-agent-parity-baseline.json`: a grown or shrunk normalized line delta, a one-sided rewrite at an unchanged delta, a changed divergence hash, a missing twin, an unrecorded pair, an orphan row, or a pair in the static `parity` allowlist that is not at delta 0. Normalization masks packaging only — YAML frontmatter, the `## Rules to load (subagent context)` block, `<!-- shared-core -->` markers, the two anti-hallucination load lines, the `.cursor/` / `.claude/` root, and `.mdc` → `.md` — and reuses the twin-drift diff helpers. `--update` re-records deltas and hashes; `--widen` / `--prune` gate a raised allowance or a dropped row; `parity` is never edited by `--update`. Fixture `test-claude-agent-parity.mjs` proves one-sided Claude FAIL, one-sided Cursor FAIL and mirrored PASS. Wired into `check-preset-structure.sh` next to `claude-agent-blocks`. |
|
|
@@ -421,10 +422,10 @@ Load these when editing files under `packages/ai-rules/presets/**`, `.cursor/**`
|
|
|
421
422
|
| `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`. |
|
|
422
423
|
| `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. Also holds two prose contracts: the canonical self-learning-loop sentence must not be followed by unsanctioned prose (an allowlist of sanctioned clauses; the tail is bounded by the carrier's **section**, not by a blank line, so prose moved one paragraph down still fails — a tail in a later `## ` section is out of scope), and every retro carrier (command, skill, rule) must state `finding_category`. Wired into `check-preset-structure.sh` next to `goal-contract`; fixture `test-preset-self-review-contract-fixtures.mjs`. |
|
|
423
424
|
| `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`. |
|
|
424
|
-
| `presets/_shared/ai-local/scripts/check-write-scope.mjs` | Read-only post-step audit: compares the actual changed paths with the current `pipeline.json` step's `writeScopes` and labels each path `declared`, `derived` (task folder, engine mirror, generated platform tree/golden/hook, dogfood tree, adapter map), or `out-of-scope`, with the source named. Shipped to consumers as `.ai.local/scripts/check-write-scope.mjs` (`ENGINE_SCRIPTS`). `--slug <slug> [--step <id>] [--base <ref>] [--root <project>] [--paths a,b] [--json]`.
|
|
425
|
-
| `scripts/check-preset-structure.sh` / `yarn check:preset-structure` |
|
|
425
|
+
| `presets/_shared/ai-local/scripts/check-write-scope.mjs` | Read-only post-step audit: compares the actual changed paths with the current `pipeline.json` step's `writeScopes` and labels each path `declared`, `derived` (task folder, engine mirror, generated platform tree/golden/hook, dogfood tree, adapter map), or `out-of-scope`, with the source named. Shipped to consumers as `.ai.local/scripts/check-write-scope.mjs` (`ENGINE_SCRIPTS`). `--slug <slug> [--step <id>] [--base <ref>] [--root <project>] [--paths a,b] [--save-baseline] [--json]`. Baseline resolution: `--paths`, then `--base <ref>`, then the step baseline written by `--step <id> --save-baseline` (every dirty path with its content hash, so an earlier step's path is not attributed to this one and an already-dirty path the step edits still is), then `HEAD` (whole uncommitted change-set, reported with a notice). Exit `1` for an out-of-scope path on an implementation step, `0` for a reviewer/verifier step (advisory), `2` on a usage/config error, `3` (SKIP) when the pipeline predates step ids or `writeScopes` and is therefore not auditable. Fixture `test-write-scope.mjs`; wired into the build-verifier and code-reviewer prompts, never a hook. |
|
|
426
|
+
| `scripts/check-preset-structure.sh` / `yarn check:preset-structure` | Low-level orchestrator: twin-map + token-budget + leakage + shared-core drift + anti-hallucination coverage + rule-eval (**all hard**; drift via `AI_RULES_DRIFT_FAIL=1`). Invoked by `yarn release:gate` and CI; not a feature-task gate. |
|
|
426
427
|
| `scripts/check-product-specs.sh` / `yarn check:product-specs` | Opt-in consumer tree check: frontmatter v1 keys + required body headings on `docs/specs/**` (bash; does **not** run JSON Schema). Ships in the npm package `files` (`scripts/`). **WARN** by default; **`--strict`** exits non-zero. |
|
|
427
|
-
| `yarn check:product-specs:dogfood` | Same script against monorepo `dogfood/mcp-ts-sample`. Soft WARN inside
|
|
428
|
+
| `yarn check:product-specs:dogfood` | Same script against monorepo `dogfood/mcp-ts-sample`. Soft WARN inside the composite + CI step (`continue-on-error`); the release gate runs `--strict`; not a hard consumer CI gate. |
|
|
428
429
|
| `scripts/check-rule-eval.mjs` / `yarn check:rule-eval` | **Hard gate** inside `check-preset-structure.sh`: validates Incorrect/Correct pairs + `impact:` on **next-only** golden stems (`eval/next/manifest.json`). Backend / ios / php-hexagonal / php-laravel stems are out of scope until a stack adds `eval/<stack>/`. |
|
|
429
430
|
| `scripts/check-release-consistency.mjs` / `yarn check:release-consistency` | **FAIL** when `packages/ai-rules/package.json` version and the newest `## <version>` heading in `CHANGELOG.md` disagree — a tag must not ship the previous release's notes. Wired into `check-preset-structure.sh`; fixture `test-release-consistency.mjs`. |
|
|
430
431
|
| `scripts/check-team-db-contract.mjs` / `yarn check:team-db-contract` | **FAIL** when the checked-in OpenAPI 3.1 document (`docs/openapi/team-db.v1.json`) drifts from `team-db-openapi.mjs`, fails the vendored 3.1 meta-schema (sha256-pinned), loses an `operationId`, diverges from `ROUTE_TABLE` in either direction, carries an invalid example, or leaves a `$ref` unresolved. `--write` is the only writer; no network at gate time. Wired into `check-preset-structure.sh`. |
|
|
@@ -434,16 +435,18 @@ Load these when editing files under `packages/ai-rules/presets/**`, `.cursor/**`
|
|
|
434
435
|
Run from `packages/ai-rules/`:
|
|
435
436
|
|
|
436
437
|
```bash
|
|
437
|
-
yarn check:
|
|
438
|
-
|
|
439
|
-
|
|
438
|
+
yarn check:changed
|
|
439
|
+
yarn check:fast
|
|
440
|
+
# release only, from the repo root:
|
|
441
|
+
yarn release:gate
|
|
440
442
|
```
|
|
441
443
|
|
|
442
444
|
Iteration versus release:
|
|
443
445
|
|
|
444
|
-
- **`yarn check:changed`** — the changed-domain classifier (`check-preset-delta.mjs --base HEAD`, or `--paths a,b`). Run the gates it names; this is the cheap loop.
|
|
445
|
-
- **`yarn check:fast`** — the
|
|
446
|
-
- **`yarn
|
|
446
|
+
- **`yarn check:changed`** — the changed-domain classifier (`check-preset-delta.mjs --base HEAD`, or `--paths a,b`). Run the gates it names; this is the cheap loop. It prints `affected loop gates` and a separate `release-only gates` line.
|
|
447
|
+
- **`yarn check:fast`** — the ~50-second loop gate (`check-preset-fast.sh`: generated drift, twin drift, token budget, frontmatter, consumer links, next attached budget, OpenCode platform contract self-test). `test-cli-init-clean` stays in the delta gates and CI. Use it before handoff.
|
|
448
|
+
- **`yarn release:gate`** — the full release gate: `check-preset-structure.sh` with the hook suites, `test:ai-local`, and the strict product-specs dogfood. Run it alone on the release commit before a tag.
|
|
449
|
+
- **`yarn check:preset-structure`** — the low-level composite; CI and `release:gate` call it. Do not run it in a feature task.
|
|
447
450
|
|
|
448
451
|
`check-generated-drift` caches generated trees in the OS temp directory, keyed by a digest of the Cursor/`_shared` sources and the generator libraries. A source or generator edit misses the cache and regenerates; the cache is disposable and never hides drift.
|
|
449
452
|
|
|
@@ -484,7 +487,7 @@ Author-only: this section is **not** copied by `init`.
|
|
|
484
487
|
- Expect four finding classes: `restated-stem`, `paraphrased-when-do`, `unjustified-body-size`, `issue-number-density`.
|
|
485
488
|
- Expect one line per finding and a final `advisory-findings: <n>`; the checker always exits `0`.
|
|
486
489
|
- Read a finding as a review item, never as a gate failure.
|
|
487
|
-
- Run it through `
|
|
490
|
+
- Run it through the composite (inside `release:gate`): the `authoring-advisory` row is non-blocking (`<<< authoring-advisory: WARN (<n> finding(s); not a hard gate)`), so the release gate stays green with findings present.
|
|
488
491
|
- Read the per-rule body threshold (`advisoryPerRuleBodyCap`) from `scripts/_lib/preset-token-budget-baseline.json` — the same baseline the blocking token-budget gate reads. The advisory tier holds no cap literal of its own; the threshold is advisory metadata, not one of the five ratcheted hard caps.
|
|
489
492
|
- Fix a `restated-stem` finding by linking the sibling stem instead of repeating its sentence.
|
|
490
493
|
- Keep the tier out of the pipeline hook tree: it is a repository gate, not a hook.
|
package/docs/TEAM-DB.md
CHANGED
|
@@ -367,12 +367,18 @@ the confirmed task delete and the rescan to the named interface without authenti
|
|
|
367
367
|
A job definition carries arbitrary `argv` and run-now enqueues it, so that surface
|
|
368
368
|
executes operator-supplied commands as the API user; see `## Scheduled jobs`.
|
|
369
369
|
|
|
370
|
+
## Prompt capture
|
|
371
|
+
|
|
372
|
+
`prompt.md` and `prompt-log.md` are read by the existing projection. An inline work request calls `sync --slug <slug>` once after writing `prompt.md`; a post-terminal entry calls the same once after appending to `prompt-log.md`. Both are bounded, off the critical path, and never fail the file write. A missed projection is staleness, not data loss — the next full sync rebuilds the row.
|
|
373
|
+
|
|
370
374
|
## Privacy and retention
|
|
371
375
|
|
|
372
376
|
Prompts are copied verbatim into `prompts` and `documents`. The database is local, git-ignored,
|
|
373
377
|
and readable by the same OS user who can read the task folder; that is the trust boundary.
|
|
374
378
|
There is no upload, telemetry, or remote asset. `sync --maintain` nulls raw document content
|
|
375
|
-
for tasks absent longer than 90 days while keeping normalized rows and hashes.
|
|
379
|
+
for tasks absent longer than 90 days while keeping normalized rows and hashes. It does not
|
|
380
|
+
null `prompts.content`: prompt retention equals task-folder retention, and deleting the folder
|
|
381
|
+
is the lever.
|
|
376
382
|
|
|
377
383
|
Run output crosses the same boundary and is **not** redacted: `scheduler/runs/**` holds a
|
|
378
384
|
child's `stdout` and `stderr` verbatim, a job inherits the listed `envPassthrough` names, and
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bonesofspring/ai-rules",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.63",
|
|
4
4
|
"description": "Presets of Cursor, Claude, Mavis, OpenCode, and ZCode rules/commands for Revy Ross personal use",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Revy Ross",
|
|
@@ -35,11 +35,11 @@
|
|
|
35
35
|
"scripts/close-agent-task-human-gate.mjs"
|
|
36
36
|
],
|
|
37
37
|
"scripts": {
|
|
38
|
-
"check:
|
|
39
|
-
"check:fast": "AI_RULES_SKIP_HOOK_TESTS=1 bash scripts/check-preset-structure.sh",
|
|
38
|
+
"check:fast": "bash scripts/check-preset-fast.sh",
|
|
40
39
|
"check:changed": "node scripts/check-preset-delta.mjs --base HEAD",
|
|
41
40
|
"test:hooks": "node scripts/test-chain-team-phases-coverage.mjs && node scripts/test-agent-task-metrics-hooks.mjs",
|
|
42
41
|
"check:preset-structure": "bash scripts/check-preset-structure.sh",
|
|
42
|
+
"release:gate": "bash scripts/release-gate.sh",
|
|
43
43
|
"check:platform-scripts": "node scripts/check-platform-scripts.mjs",
|
|
44
44
|
"test:platform": "node scripts/run-platform-tests.mjs",
|
|
45
45
|
"check:preset-delta": "node scripts/check-preset-delta.mjs",
|