@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
|
@@ -211,13 +211,14 @@ On each `subagentStop`, the hook reconciles `status.state` from the completing p
|
|
|
211
211
|
7. On `validation_failed` from `build-verifier`: hook sets `retryAfterFix: build-verifier` → developer → build-verifier.
|
|
212
212
|
8. When all steps complete, suggest `/technical-retro <slug>`.
|
|
213
213
|
9. If `autoChain: false` in pipeline, do not rely on hook — manual step only.
|
|
214
|
-
10. **Persist the verbatim original prompt.** Every `/task` and every routed work request writes the user's raw prompt to `.ai.local/team/tasks/<slug>/prompt.md` during slug bootstrap (write-if-absent; never overwrite on resume). Not a manifest `artifacts[]` body — register the path on the `routing` entry. See **agent-artifact-contracts** § Prompt artifact. Also append every **subsequent user-authored** prompt for the same slug — a new user message while the slug is active, `/task-continue` arguments, human-gate feedback, a clarification answer — to the append-only `.ai.local/team/tasks/<slug>/prompt-log.md` (`seq` = max + 1; never rewrite or duplicate an entry; never log machine-generated hook `followup_message` or empty/argument-less invocations). Register its path on the `routing` entry. See **agent-artifact-contracts** § Prompt log.
|
|
214
|
+
10. **Persist the verbatim original prompt.** Every `/task` and every routed work request writes the user's raw prompt to `.ai.local/team/tasks/<slug>/prompt.md` during slug bootstrap (write-if-absent; never overwrite on resume). Not a manifest `artifacts[]` body — register the path on the `routing` entry. See **agent-artifact-contracts** § Prompt artifact. Also append every **subsequent user-authored** prompt for the same slug — a new user message while the slug is active, `/task-continue` arguments, human-gate feedback, a clarification answer — to the append-only `.ai.local/team/tasks/<slug>/prompt-log.md` (`seq` = max + 1; never rewrite or duplicate an entry; never log machine-generated hook `followup_message` or empty/argument-less invocations). Register its path on the `routing` entry. See **agent-artifact-contracts** § Prompt log. A message that explicitly addresses a **closed** slug follows the same ledger with the `post-terminal` marker — append-only, no reopen, one bounded `sync --slug`; see § Team artifact I/O.
|
|
215
215
|
11. **Answer the user in the resolved dialogue language for the whole task.** The always-on language rule already resolved it on this turn (`.ai.local` `## Language` → prompt language → English). Pass that tag to every step; `/task-continue` keeps it. Never ask the user to pick a language. Development, reasoning, and artifacts stay English. See **language-policy**.
|
|
216
216
|
|
|
217
217
|
## Team artifact I/O (Cursor Shell sandbox)
|
|
218
218
|
|
|
219
219
|
- **Persist the original prompt.** For **every** task — `/task` or a routed work request — write the user's **verbatim** prompt to `.ai.local/team/tasks/<slug>/prompt.md` during slug bootstrap (write-if-absent; never overwrite on resume). The header is additive provenance only; the fenced text block holds the user's words unchanged. Not a manifest `artifacts[]` body — the path lives on the `routing` entry. See **agent-artifact-contracts** § Prompt artifact.
|
|
220
220
|
- **Append follow-up prompts.** When a user-authored prompt arrives for an active slug (new message, `/task-continue` args, gate feedback, clarification), append it verbatim to `.ai.local/team/tasks/<slug>/prompt-log.md` — `seq` = current max + 1, create on first append, never rewrite or duplicate an entry, never touch `prompt.md`. Exclude hook `followup_message` and empty/argument-less invocations. Not a manifest `artifacts[]` body — the path lives on the `routing` entry. See **agent-artifact-contracts** § Prompt log.
|
|
221
|
+
- **Post-terminal history.** When a user-authored message explicitly addresses a **closed** slug, append it to that task's `prompt-log.md` (`seq` = max + 1) with `command: post-terminal <trigger>`, then run exactly one `node .ai.local/scripts/team-db.mjs sync --slug <slug> --deadline-ms 4500`. Do not reopen the task and do not touch `status.json`, `artifact-manifest.json`, or `metrics.json`. Attribution is explicit only — never infer the slug from `active-task.json` or a session lease; if the slug is not named, ask once and write nothing until it is. A request that changes work opens a successor slug; the closed task keeps the history. See **agent-artifact-contracts** § Prompt log.
|
|
221
222
|
- **Answer in the resolved dialogue language.** The always-on language rule already resolved it on this turn (`.ai.local` `## Language` → prompt language → English; mixed → dominant; nearest `.ai.local` wins). Reuse it for every user-facing message and `/task-continue`. Record the tag in the `prompt.md` header (`language: <BCP-47>`) + a `.memlog.md` `event:` line; a later correction is an append-only memlog event. Development, reasoning, and artifacts stay **English**. See **language-policy**.
|
|
222
223
|
|
|
223
224
|
- Create/update `.ai.local/team/tasks/<slug>/**` with the **Write** tool (parents are created automatically). Do **not** bootstrap slug dirs with Shell `mkdir -p` — default sandbox returns `Operation not permitted` (worse on macOS Desktop/Documents with TCC `com.apple.macl`).
|
|
@@ -36,9 +36,9 @@ Checklist for PRs that touch `packages/ai-rules/presets/**` (and dogfood `.curso
|
|
|
36
36
|
- [ ] **shared-core drift:** for embed-mode stems, run `packages/ai-rules/scripts/check-shared-core-drift.sh` (or document intentional fork)
|
|
37
37
|
- [ ] **Packaging:** every installable preset ships `REPO_AGENTS.md`; default `hooks.json` does not reference `hooks/examples/`; `_shared/assets/docs-specs/` ships `INDEX.md` + `_templates/{page,feature}.md`; `product-specs` / `product-specs-authoring` stay requestable
|
|
38
38
|
- [ ] **UI-only surfaces:** `mockup-reviewer`, `accessibility-reviewer`, `ux-design`, and the stack performance skill ship only on UI stacks (`check-preset-leakage.sh`)
|
|
39
|
-
- [ ] **Rule eval (hard):** `node packages/ai-rules/scripts/check-rule-eval.mjs` runs inside `yarn
|
|
40
|
-
- [ ] **Anti-hallucination:** `check-anti-hallucination-coverage.mjs` is green inside `yarn
|
|
41
|
-
- [ ] **Gate:** `yarn check:
|
|
39
|
+
- [ ] **Rule eval (hard):** `node packages/ai-rules/scripts/check-rule-eval.mjs` runs inside `yarn release:gate`; keep every registered golden stem paired
|
|
40
|
+
- [ ] **Anti-hallucination:** `check-anti-hallucination-coverage.mjs` is green inside `yarn release:gate`. Every role loads `anti-hallucination-contract`. Writer roles, including `code-reviewer`, also load `STACK_FLOOR_STEMS`. Register a new skill family in `SKILL_CONTRACT_CLASS` (`writer` or `reader`) or the gate FAILs.
|
|
41
|
+
- [ ] **Gate:** `yarn check:fast` in the loop; `yarn release:gate` from `packages/ai-rules/` before a release (full composite: twin-map, token-budget, leakage, drift, i18n, local overlay, anti-hallucination coverage)
|
|
42
42
|
|
|
43
43
|
## Pointers
|
|
44
44
|
|
|
@@ -48,7 +48,7 @@ Checklist for PRs that touch `packages/ai-rules/presets/**` (and dogfood `.curso
|
|
|
48
48
|
- Sync: `preset-twin-sync`
|
|
49
49
|
- Budget: `preset-token-budget`
|
|
50
50
|
- Leakage: `preset-no-cross-stack-leakage`
|
|
51
|
-
- Validation: `yarn check:
|
|
51
|
+
- Validation: `yarn check:fast` in the loop (`packages/ai-rules/scripts/check-preset-fast.sh`); `yarn release:gate` before a release (`packages/ai-rules/scripts/release-gate.sh`)
|
|
52
52
|
- Dogfood scripts: `packages/ai-rules/scripts/sync-dogfood-cursor.sh`, `sync-dogfood-claude.sh`, `sync-dogfood-mavis.sh`, `sync-dogfood-opencode.sh`
|
|
53
53
|
- Drift script: `packages/ai-rules/scripts/check-shared-core-drift.sh`
|
|
54
54
|
- Orchestrator: when editing presets, load this checklist + twin-sync
|
|
@@ -42,7 +42,7 @@ Validate: `check-mavis-adapter-map.mjs`, `check-opencode-adapter-map.mjs`, `chec
|
|
|
42
42
|
- **Thin aliases** (`agent-team-intake`, `technical-retro`): may be shorter (soft) if they only point to a command/skill.
|
|
43
43
|
- **Slim-companion rules** (UI-edit bundle, slim app-cores, slim tooling): may be shorter only if the body is a pointer into shared-core / stack prose. `check-preset-token-budget.sh` enforces this via `SLIM_COMPANION_ALLOWLIST` and the 5-line floor; 6–14-line stems outside the allow-list are slim violations.
|
|
44
44
|
|
|
45
|
-
## Severity (
|
|
45
|
+
## Severity (structure gates)
|
|
46
46
|
|
|
47
47
|
- Missing or stale generated Claude twin for a changed Cursor rule → **FAIL** (every stack under `presets/cursor/`; mapping table required).
|
|
48
48
|
- `cursor/<stack>` mapped source changed without mavis / opencode regeneration, or with `adapter-map.json` `sourceRevision` drift → **FAIL**.
|
|
@@ -10,7 +10,7 @@ import { fileURLToPath } from 'node:url';
|
|
|
10
10
|
export const PACKAGE_NAME = '@bonesofspring/ai-rules';
|
|
11
11
|
export const REGISTRY_URL = 'https://registry.npmjs.org/@bonesofspring/ai-rules/latest';
|
|
12
12
|
export const CACHE_TTL_MS = 60 * 60 * 1000;
|
|
13
|
-
export const TOOL_ROOTS = ['.cursor', '.claude', '.mavis', '.opencode'];
|
|
13
|
+
export const TOOL_ROOTS = ['.cursor', '.claude', '.mavis', '.opencode', '.zcode'];
|
|
14
14
|
|
|
15
15
|
const RELEASE_VERSION = /^\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?$/;
|
|
16
16
|
|
|
@@ -75,9 +75,10 @@ export function buildNotice(installs, latest) {
|
|
|
75
75
|
(item) => item.version === null || compareVersions(item.version, latest) < 0,
|
|
76
76
|
);
|
|
77
77
|
if (behind.length === 0) return '';
|
|
78
|
+
const installed = formatInstalled(behind);
|
|
78
79
|
return [
|
|
79
80
|
`Preset update available for ${PACKAGE_NAME}.`,
|
|
80
|
-
`Installed: ${
|
|
81
|
+
`Installed: ${installed}. Latest: ${latest}.`,
|
|
81
82
|
'The first block of the reply is only this notice, before any task text.',
|
|
82
83
|
'Use a level-2 heading and one markdown blockquote. Then a blank line. Then the task answer.',
|
|
83
84
|
'Do not fold the notice into the task text.',
|
|
@@ -86,7 +87,7 @@ export function buildNotice(installs, latest) {
|
|
|
86
87
|
'Shape:',
|
|
87
88
|
'## Preset update',
|
|
88
89
|
'',
|
|
89
|
-
`> Installed \`${PACKAGE_NAME}\`
|
|
90
|
+
`> Installed \`${PACKAGE_NAME}\` **${installed}**. Latest **${latest}**. Run \`/update\`.`,
|
|
90
91
|
].join('\n');
|
|
91
92
|
}
|
|
92
93
|
|
|
@@ -15,5 +15,6 @@ When the user message looks like a **work request** (implement, add, fix, refact
|
|
|
15
15
|
4. A work request now runs the planning workflow — **goal frame → requirements → information-sufficiency → decompose** (dependency graph / epics); see **task-framing** and **plan-graph**.
|
|
16
16
|
5. Every **work request** — with or without `/task`, and even when the user says “no pipeline” / “just do it” — persists the **verbatim** original prompt at `.ai.local/team/tasks/<slug>/prompt.md`. Prefer `/task` (its **Slug** step writes it). If handling inline without `/task`, first create the slug dir and write `prompt.md` (write-if-absent), then proceed. Pure questions and trivial one-liners are not work requests → no file. On an inline follow-up for an existing slug (no `/task`) where the user authors new text, append it verbatim to `.ai.local/team/tasks/<slug>/prompt-log.md` (`seq` = max + 1; create on first append; exclude machine-generated and empty/argument-less invocations).
|
|
17
17
|
6. **Reuse the dialogue language already resolved on this turn** (always-on `ai-local-overlay` / **language-policy**). A question and a message without a slash command still resolve before you speak. When this request writes `prompt.md`, persist that tag once in the header (`language: <BCP-47>`) + a `.memlog.md` `event:` line. Development, reasoning, and artifacts stay English. The setting wins over a mid-task prompt switch (surface it once, never ask). See **language-policy**.
|
|
18
|
+
7. **Project the intake write.** After `prompt.md` is written for an inline (non-`/task`) work request, run `node .ai.local/scripts/team-db.mjs sync --slug <slug> --deadline-ms 4500` once, so the new task row and its prompt reach the database. A projection failure is reported to the user, never blocks the request; the next full sync remains the convergence path. Do not run a full sync from intake.
|
|
18
19
|
|
|
19
20
|
Exceptions: user explicitly says “no pipeline”, “just do it”, or continues an active slug.
|
|
@@ -192,13 +192,14 @@ On each `subagentStop`, the hook reconciles `status.state` from the completing p
|
|
|
192
192
|
7. On `validation_failed` from `build-verifier`: hook sets `retryAfterFix: build-verifier` → developer → build-verifier.
|
|
193
193
|
8. When all steps complete, suggest `/technical-retro <slug>`.
|
|
194
194
|
9. If `autoChain: false` in pipeline, do not rely on hook — manual step only.
|
|
195
|
-
10. **Persist the verbatim original prompt.** Every `/task` and every routed work request writes the user's raw prompt to `.ai.local/team/tasks/<slug>/prompt.md` during slug bootstrap (write-if-absent; never overwrite on resume). Not a manifest `artifacts[]` body — register the path on the `routing` entry. See **agent-artifact-contracts** § Prompt artifact. Also append every **subsequent user-authored** prompt for the same slug — a new user message while the slug is active, `/task-continue` arguments, human-gate feedback, a clarification answer — to the append-only `.ai.local/team/tasks/<slug>/prompt-log.md` (`seq` = max + 1; never rewrite or duplicate an entry; never log machine-generated hook `followup_message` or empty/argument-less invocations). Register its path on the `routing` entry. See **agent-artifact-contracts** § Prompt log.
|
|
195
|
+
10. **Persist the verbatim original prompt.** Every `/task` and every routed work request writes the user's raw prompt to `.ai.local/team/tasks/<slug>/prompt.md` during slug bootstrap (write-if-absent; never overwrite on resume). Not a manifest `artifacts[]` body — register the path on the `routing` entry. See **agent-artifact-contracts** § Prompt artifact. Also append every **subsequent user-authored** prompt for the same slug — a new user message while the slug is active, `/task-continue` arguments, human-gate feedback, a clarification answer — to the append-only `.ai.local/team/tasks/<slug>/prompt-log.md` (`seq` = max + 1; never rewrite or duplicate an entry; never log machine-generated hook `followup_message` or empty/argument-less invocations). Register its path on the `routing` entry. See **agent-artifact-contracts** § Prompt log. A message that explicitly addresses a **closed** slug follows the same ledger with the `post-terminal` marker — append-only, no reopen, one bounded `sync --slug`; see § Team artifact I/O.
|
|
196
196
|
11. **Answer the user in the resolved dialogue language for the whole task.** The always-on language rule already resolved it on this turn (`.ai.local` `## Language` → prompt language → English). Pass that tag to every step; `/task-continue` keeps it. Never ask the user to pick a language. Development, reasoning, and artifacts stay English. See **language-policy**.
|
|
197
197
|
|
|
198
198
|
## Team artifact I/O (Cursor Shell sandbox)
|
|
199
199
|
|
|
200
200
|
- **Persist the original prompt.** For **every** task — `/task` or a routed work request — write the user's **verbatim** prompt to `.ai.local/team/tasks/<slug>/prompt.md` during slug bootstrap (write-if-absent; never overwrite on resume). The header is additive provenance only; the fenced text block holds the user's words unchanged. Not a manifest `artifacts[]` body — the path lives on the `routing` entry. See **agent-artifact-contracts** § Prompt artifact.
|
|
201
201
|
- **Append follow-up prompts.** When a user-authored prompt arrives for an active slug (new message, `/task-continue` args, gate feedback, clarification), append it verbatim to `.ai.local/team/tasks/<slug>/prompt-log.md` — `seq` = current max + 1, create on first append, never rewrite or duplicate an entry, never touch `prompt.md`. Exclude hook `followup_message` and empty/argument-less invocations. Not a manifest `artifacts[]` body — the path lives on the `routing` entry. See **agent-artifact-contracts** § Prompt log.
|
|
202
|
+
- **Post-terminal history.** When a user-authored message explicitly addresses a **closed** slug, append it to that task's `prompt-log.md` (`seq` = max + 1) with `command: post-terminal <trigger>`, then run exactly one `node .ai.local/scripts/team-db.mjs sync --slug <slug> --deadline-ms 4500`. Do not reopen the task and do not touch `status.json`, `artifact-manifest.json`, or `metrics.json`. Attribution is explicit only — never infer the slug from `active-task.json` or a session lease; if the slug is not named, ask once and write nothing until it is. A request that changes work opens a successor slug; the closed task keeps the history. See **agent-artifact-contracts** § Prompt log.
|
|
202
203
|
- **Answer in the resolved dialogue language.** The always-on language rule already resolved it on this turn (`.ai.local` `## Language` → prompt language → English; mixed → dominant; nearest `.ai.local` wins). Reuse it for every user-facing message and `/task-continue`. Record the tag in the `prompt.md` header (`language: <BCP-47>`) + a `.memlog.md` `event:` line; a later correction is an append-only memlog event. Development, reasoning, and artifacts stay **English**. See **language-policy**.
|
|
203
204
|
|
|
204
205
|
- Create/update `.ai.local/team/tasks/<slug>/**` with the **Write** tool (parents are created automatically). Do **not** bootstrap slug dirs with Shell `mkdir -p` — default sandbox returns `Operation not permitted` (worse on macOS Desktop/Documents with TCC `com.apple.macl`).
|
|
@@ -36,9 +36,9 @@ Checklist for PRs that touch `packages/ai-rules/presets/**` (and dogfood `.curso
|
|
|
36
36
|
- [ ] **shared-core drift:** for embed-mode stems, run `packages/ai-rules/scripts/check-shared-core-drift.sh` (or document intentional fork)
|
|
37
37
|
- [ ] **Packaging:** every installable preset ships `REPO_AGENTS.md`; default `hooks.json` does not reference `hooks/examples/`; `_shared/assets/docs-specs/` ships `INDEX.md` + `_templates/{page,feature}.md`; `product-specs` / `product-specs-authoring` stay requestable
|
|
38
38
|
- [ ] **UI-only surfaces:** `mockup-reviewer`, `accessibility-reviewer`, `ux-design`, and the stack performance skill ship only on UI stacks (`check-preset-leakage.sh`)
|
|
39
|
-
- [ ] **Rule eval (hard):** `node packages/ai-rules/scripts/check-rule-eval.mjs` runs inside `yarn
|
|
40
|
-
- [ ] **Anti-hallucination:** `check-anti-hallucination-coverage.mjs` is green inside `yarn
|
|
41
|
-
- [ ] **Gate:** `yarn check:
|
|
39
|
+
- [ ] **Rule eval (hard):** `node packages/ai-rules/scripts/check-rule-eval.mjs` runs inside `yarn release:gate`; keep every registered golden stem paired
|
|
40
|
+
- [ ] **Anti-hallucination:** `check-anti-hallucination-coverage.mjs` is green inside `yarn release:gate`. Every role loads `anti-hallucination-contract`. Writer roles, including `code-reviewer`, also load `STACK_FLOOR_STEMS`. Register a new skill family in `SKILL_CONTRACT_CLASS` (`writer` or `reader`) or the gate FAILs.
|
|
41
|
+
- [ ] **Gate:** `yarn check:fast` in the loop; `yarn release:gate` from `packages/ai-rules/` before a release (full composite: twin-map, token-budget, leakage, drift, i18n, local overlay, anti-hallucination coverage)
|
|
42
42
|
|
|
43
43
|
## Pointers
|
|
44
44
|
|
|
@@ -48,7 +48,7 @@ Checklist for PRs that touch `packages/ai-rules/presets/**` (and dogfood `.curso
|
|
|
48
48
|
- Sync: `preset-twin-sync`
|
|
49
49
|
- Budget: `preset-token-budget`
|
|
50
50
|
- Leakage: `preset-no-cross-stack-leakage`
|
|
51
|
-
- Validation: `yarn check:
|
|
51
|
+
- Validation: `yarn check:fast` in the loop (`packages/ai-rules/scripts/check-preset-fast.sh`); `yarn release:gate` before a release (`packages/ai-rules/scripts/release-gate.sh`)
|
|
52
52
|
- Dogfood scripts: `packages/ai-rules/scripts/sync-dogfood-cursor.sh`, `sync-dogfood-claude.sh`, `sync-dogfood-mavis.sh`, `sync-dogfood-opencode.sh`
|
|
53
53
|
- Drift script: `packages/ai-rules/scripts/check-shared-core-drift.sh`
|
|
54
54
|
- Orchestrator: when editing presets, load this checklist + twin-sync
|
|
@@ -42,7 +42,7 @@ Validate: `check-mavis-adapter-map.mjs`, `check-opencode-adapter-map.mjs`, `chec
|
|
|
42
42
|
- **Thin aliases** (`agent-team-intake`, `technical-retro`): may be shorter (soft) if they only point to a command/skill.
|
|
43
43
|
- **Slim-companion rules** (UI-edit bundle, slim app-cores, slim tooling): may be shorter only if the body is a pointer into shared-core / stack prose. `check-preset-token-budget.sh` enforces this via `SLIM_COMPANION_ALLOWLIST` and the 5-line floor; 6–14-line stems outside the allow-list are slim violations.
|
|
44
44
|
|
|
45
|
-
## Severity (
|
|
45
|
+
## Severity (structure gates)
|
|
46
46
|
|
|
47
47
|
- Missing or stale generated Claude twin for a changed Cursor rule → **FAIL** (every stack under `presets/cursor/`; mapping table required).
|
|
48
48
|
- `cursor/<stack>` mapped source changed without mavis / opencode regeneration, or with `adapter-map.json` `sourceRevision` drift → **FAIL**.
|
|
@@ -10,7 +10,7 @@ import { fileURLToPath } from 'node:url';
|
|
|
10
10
|
export const PACKAGE_NAME = '@bonesofspring/ai-rules';
|
|
11
11
|
export const REGISTRY_URL = 'https://registry.npmjs.org/@bonesofspring/ai-rules/latest';
|
|
12
12
|
export const CACHE_TTL_MS = 60 * 60 * 1000;
|
|
13
|
-
export const TOOL_ROOTS = ['.cursor', '.claude', '.mavis', '.opencode'];
|
|
13
|
+
export const TOOL_ROOTS = ['.cursor', '.claude', '.mavis', '.opencode', '.zcode'];
|
|
14
14
|
|
|
15
15
|
const RELEASE_VERSION = /^\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?$/;
|
|
16
16
|
|
|
@@ -75,9 +75,10 @@ export function buildNotice(installs, latest) {
|
|
|
75
75
|
(item) => item.version === null || compareVersions(item.version, latest) < 0,
|
|
76
76
|
);
|
|
77
77
|
if (behind.length === 0) return '';
|
|
78
|
+
const installed = formatInstalled(behind);
|
|
78
79
|
return [
|
|
79
80
|
`Preset update available for ${PACKAGE_NAME}.`,
|
|
80
|
-
`Installed: ${
|
|
81
|
+
`Installed: ${installed}. Latest: ${latest}.`,
|
|
81
82
|
'The first block of the reply is only this notice, before any task text.',
|
|
82
83
|
'Use a level-2 heading and one markdown blockquote. Then a blank line. Then the task answer.',
|
|
83
84
|
'Do not fold the notice into the task text.',
|
|
@@ -86,7 +87,7 @@ export function buildNotice(installs, latest) {
|
|
|
86
87
|
'Shape:',
|
|
87
88
|
'## Preset update',
|
|
88
89
|
'',
|
|
89
|
-
`> Installed \`${PACKAGE_NAME}\`
|
|
90
|
+
`> Installed \`${PACKAGE_NAME}\` **${installed}**. Latest **${latest}**. Run \`/update\`.`,
|
|
90
91
|
].join('\n');
|
|
91
92
|
}
|
|
92
93
|
|
|
@@ -15,6 +15,7 @@ When the user message looks like a **work request** (implement, add, fix, refact
|
|
|
15
15
|
4. A work request now runs the planning workflow — **goal frame → requirements → information-sufficiency → decompose** (dependency graph / epics); see **task-framing** and **plan-graph**.
|
|
16
16
|
5. Every **work request** — with or without `/task`, and even when the user says “no pipeline” / “just do it” — persists the **verbatim** original prompt at `.ai.local/team/tasks/<slug>/prompt.md`. Prefer `/task` (its **Slug** step writes it). If handling inline without `/task`, first create the slug dir and write `prompt.md` (write-if-absent), then proceed. Pure questions and trivial one-liners are not work requests → no file. On an inline follow-up for an existing slug (no `/task`) where the user authors new text, append it verbatim to `.ai.local/team/tasks/<slug>/prompt-log.md` (`seq` = max + 1; create on first append; exclude machine-generated and empty/argument-less invocations).
|
|
17
17
|
6. **Reuse the dialogue language already resolved on this turn** (always-on `ai-local-overlay` / **language-policy**). A question and a message without a slash command still resolve before you speak. When this request writes `prompt.md`, persist that tag once in the header (`language: <BCP-47>`) + a `.memlog.md` `event:` line. Development, reasoning, and artifacts stay English. The setting wins over a mid-task prompt switch (surface it once, never ask). See **language-policy**.
|
|
18
|
+
7. **Project the intake write.** After `prompt.md` is written for an inline (non-`/task`) work request, run `node .ai.local/scripts/team-db.mjs sync --slug <slug> --deadline-ms 4500` once, so the new task row and its prompt reach the database. A projection failure is reported to the user, never blocks the request; the next full sync remains the convergence path. Do not run a full sync from intake.
|
|
18
19
|
|
|
19
20
|
Exceptions: user explicitly says “no pipeline”, “just do it”, or continues an active slug.
|
|
20
21
|
|
|
@@ -168,13 +168,14 @@ On each `subagentStop`, the hook reconciles `status.state` from the completing p
|
|
|
168
168
|
7. On `validation_failed` from `build-verifier`: hook sets `retryAfterFix: build-verifier` → developer → build-verifier.
|
|
169
169
|
8. When all steps complete, suggest `/technical-retro <slug>`.
|
|
170
170
|
9. If `autoChain: false` in pipeline, do not rely on hook — manual step only.
|
|
171
|
-
10. **Persist the verbatim original prompt.** Every `/task` and every routed work request writes the user's raw prompt to `.ai.local/team/tasks/<slug>/prompt.md` during slug bootstrap (write-if-absent; never overwrite on resume). Not a manifest `artifacts[]` body — register the path on the `routing` entry. See **agent-artifact-contracts** § Prompt artifact. Also append every **subsequent user-authored** prompt for the same slug — a new user message while the slug is active, `/task-continue` arguments, human-gate feedback, a clarification answer — to the append-only `.ai.local/team/tasks/<slug>/prompt-log.md` (`seq` = max + 1; never rewrite or duplicate an entry; never log machine-generated hook `followup_message` or empty/argument-less invocations). Register its path on the `routing` entry. See **agent-artifact-contracts** § Prompt log.
|
|
171
|
+
10. **Persist the verbatim original prompt.** Every `/task` and every routed work request writes the user's raw prompt to `.ai.local/team/tasks/<slug>/prompt.md` during slug bootstrap (write-if-absent; never overwrite on resume). Not a manifest `artifacts[]` body — register the path on the `routing` entry. See **agent-artifact-contracts** § Prompt artifact. Also append every **subsequent user-authored** prompt for the same slug — a new user message while the slug is active, `/task-continue` arguments, human-gate feedback, a clarification answer — to the append-only `.ai.local/team/tasks/<slug>/prompt-log.md` (`seq` = max + 1; never rewrite or duplicate an entry; never log machine-generated hook `followup_message` or empty/argument-less invocations). Register its path on the `routing` entry. See **agent-artifact-contracts** § Prompt log. A message that explicitly addresses a **closed** slug follows the same ledger with the `post-terminal` marker — append-only, no reopen, one bounded `sync --slug`; see § Team artifact I/O.
|
|
172
172
|
11. **Answer the user in the resolved dialogue language for the whole task.** The always-on language rule already resolved it on this turn (`.ai.local` `## Language` → prompt language → English). Pass that tag to every step; `/task-continue` keeps it. Never ask the user to pick a language. Development, reasoning, and artifacts stay English. See **language-policy**.
|
|
173
173
|
|
|
174
174
|
## Team artifact I/O (Cursor Shell sandbox)
|
|
175
175
|
|
|
176
176
|
- **Persist the original prompt.** For **every** task — `/task` or a routed work request — write the user's **verbatim** prompt to `.ai.local/team/tasks/<slug>/prompt.md` during slug bootstrap (write-if-absent; never overwrite on resume). The header is additive provenance only; the fenced text block holds the user's words unchanged. Not a manifest `artifacts[]` body — the path lives on the `routing` entry. See **agent-artifact-contracts** § Prompt artifact.
|
|
177
177
|
- **Append follow-up prompts.** When a user-authored prompt arrives for an active slug (new message, `/task-continue` args, gate feedback, clarification), append it verbatim to `.ai.local/team/tasks/<slug>/prompt-log.md` — `seq` = current max + 1, create on first append, never rewrite or duplicate an entry, never touch `prompt.md`. Exclude hook `followup_message` and empty/argument-less invocations. Not a manifest `artifacts[]` body — the path lives on the `routing` entry. See **agent-artifact-contracts** § Prompt log.
|
|
178
|
+
- **Post-terminal history.** When a user-authored message explicitly addresses a **closed** slug, append it to that task's `prompt-log.md` (`seq` = max + 1) with `command: post-terminal <trigger>`, then run exactly one `node .ai.local/scripts/team-db.mjs sync --slug <slug> --deadline-ms 4500`. Do not reopen the task and do not touch `status.json`, `artifact-manifest.json`, or `metrics.json`. Attribution is explicit only — never infer the slug from `active-task.json` or a session lease; if the slug is not named, ask once and write nothing until it is. A request that changes work opens a successor slug; the closed task keeps the history. See **agent-artifact-contracts** § Prompt log.
|
|
178
179
|
- **Answer in the resolved dialogue language.** The always-on language rule already resolved it on this turn (`.ai.local` `## Language` → prompt language → English; mixed → dominant; nearest `.ai.local` wins). Reuse it for every user-facing message and `/task-continue`. Record the tag in the `prompt.md` header (`language: <BCP-47>`) + a `.memlog.md` `event:` line; a later correction is an append-only memlog event. Development, reasoning, and artifacts stay **English**. See **language-policy**.
|
|
179
180
|
|
|
180
181
|
- Create/update team task dirs with the **Write** tool (parents are created automatically). Do **not** bootstrap slug dirs with Shell `mkdir -p` — default sandbox returns `Operation not permitted` (worse on macOS Desktop/Documents with TCC).
|
|
@@ -36,9 +36,9 @@ Checklist for PRs that touch `packages/ai-rules/presets/**` (and dogfood `.curso
|
|
|
36
36
|
- [ ] **shared-core drift:** for embed-mode stems, run `packages/ai-rules/scripts/check-shared-core-drift.sh` (or document intentional fork)
|
|
37
37
|
- [ ] **Packaging:** every installable preset ships `REPO_AGENTS.md`; default `hooks.json` does not reference `hooks/examples/`; `_shared/assets/docs-specs/` ships `INDEX.md` + `_templates/{page,feature}.md`; `product-specs` / `product-specs-authoring` stay requestable
|
|
38
38
|
- [ ] **UI-only surfaces:** `mockup-reviewer`, `accessibility-reviewer`, `ux-design`, and the stack performance skill ship only on UI stacks (`check-preset-leakage.sh`)
|
|
39
|
-
- [ ] **Rule eval (hard):** `node packages/ai-rules/scripts/check-rule-eval.mjs` runs inside `yarn
|
|
40
|
-
- [ ] **Anti-hallucination:** `check-anti-hallucination-coverage.mjs` is green inside `yarn
|
|
41
|
-
- [ ] **Gate:** `yarn check:
|
|
39
|
+
- [ ] **Rule eval (hard):** `node packages/ai-rules/scripts/check-rule-eval.mjs` runs inside `yarn release:gate`; keep every registered golden stem paired
|
|
40
|
+
- [ ] **Anti-hallucination:** `check-anti-hallucination-coverage.mjs` is green inside `yarn release:gate`. Every role loads `anti-hallucination-contract`. Writer roles, including `code-reviewer`, also load `STACK_FLOOR_STEMS`. Register a new skill family in `SKILL_CONTRACT_CLASS` (`writer` or `reader`) or the gate FAILs.
|
|
41
|
+
- [ ] **Gate:** `yarn check:fast` in the loop; `yarn release:gate` from `packages/ai-rules/` before a release (full composite: twin-map, token-budget, leakage, drift, i18n, local overlay, anti-hallucination coverage)
|
|
42
42
|
|
|
43
43
|
## Pointers
|
|
44
44
|
|
|
@@ -48,7 +48,7 @@ Checklist for PRs that touch `packages/ai-rules/presets/**` (and dogfood `.curso
|
|
|
48
48
|
- Sync: `preset-twin-sync`
|
|
49
49
|
- Budget: `preset-token-budget`
|
|
50
50
|
- Leakage: `preset-no-cross-stack-leakage`
|
|
51
|
-
- Validation: `yarn check:
|
|
51
|
+
- Validation: `yarn check:fast` in the loop (`packages/ai-rules/scripts/check-preset-fast.sh`); `yarn release:gate` before a release (`packages/ai-rules/scripts/release-gate.sh`)
|
|
52
52
|
- Dogfood scripts: `packages/ai-rules/scripts/sync-dogfood-cursor.sh`, `sync-dogfood-claude.sh`, `sync-dogfood-mavis.sh`, `sync-dogfood-opencode.sh`
|
|
53
53
|
- Drift script: `packages/ai-rules/scripts/check-shared-core-drift.sh`
|
|
54
54
|
- Orchestrator: when editing presets, load this checklist + twin-sync
|
|
@@ -42,7 +42,7 @@ Validate: `check-mavis-adapter-map.mjs`, `check-opencode-adapter-map.mjs`, `chec
|
|
|
42
42
|
- **Thin aliases** (`agent-team-intake`, `technical-retro`): may be shorter (soft) if they only point to a command/skill.
|
|
43
43
|
- **Slim-companion rules** (UI-edit bundle, slim app-cores, slim tooling): may be shorter only if the body is a pointer into shared-core / stack prose. `check-preset-token-budget.sh` enforces this via `SLIM_COMPANION_ALLOWLIST` and the 5-line floor; 6–14-line stems outside the allow-list are slim violations.
|
|
44
44
|
|
|
45
|
-
## Severity (
|
|
45
|
+
## Severity (structure gates)
|
|
46
46
|
|
|
47
47
|
- Missing or stale generated Claude twin for a changed Cursor rule → **FAIL** (every stack under `presets/cursor/`; mapping table required).
|
|
48
48
|
- `cursor/<stack>` mapped source changed without mavis / opencode regeneration, or with `adapter-map.json` `sourceRevision` drift → **FAIL**.
|
|
@@ -10,7 +10,7 @@ import { fileURLToPath } from 'node:url';
|
|
|
10
10
|
export const PACKAGE_NAME = '@bonesofspring/ai-rules';
|
|
11
11
|
export const REGISTRY_URL = 'https://registry.npmjs.org/@bonesofspring/ai-rules/latest';
|
|
12
12
|
export const CACHE_TTL_MS = 60 * 60 * 1000;
|
|
13
|
-
export const TOOL_ROOTS = ['.cursor', '.claude', '.mavis', '.opencode'];
|
|
13
|
+
export const TOOL_ROOTS = ['.cursor', '.claude', '.mavis', '.opencode', '.zcode'];
|
|
14
14
|
|
|
15
15
|
const RELEASE_VERSION = /^\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?$/;
|
|
16
16
|
|
|
@@ -75,9 +75,10 @@ export function buildNotice(installs, latest) {
|
|
|
75
75
|
(item) => item.version === null || compareVersions(item.version, latest) < 0,
|
|
76
76
|
);
|
|
77
77
|
if (behind.length === 0) return '';
|
|
78
|
+
const installed = formatInstalled(behind);
|
|
78
79
|
return [
|
|
79
80
|
`Preset update available for ${PACKAGE_NAME}.`,
|
|
80
|
-
`Installed: ${
|
|
81
|
+
`Installed: ${installed}. Latest: ${latest}.`,
|
|
81
82
|
'The first block of the reply is only this notice, before any task text.',
|
|
82
83
|
'Use a level-2 heading and one markdown blockquote. Then a blank line. Then the task answer.',
|
|
83
84
|
'Do not fold the notice into the task text.',
|
|
@@ -86,7 +87,7 @@ export function buildNotice(installs, latest) {
|
|
|
86
87
|
'Shape:',
|
|
87
88
|
'## Preset update',
|
|
88
89
|
'',
|
|
89
|
-
`> Installed \`${PACKAGE_NAME}\`
|
|
90
|
+
`> Installed \`${PACKAGE_NAME}\` **${installed}**. Latest **${latest}**. Run \`/update\`.`,
|
|
90
91
|
].join('\n');
|
|
91
92
|
}
|
|
92
93
|
|
|
@@ -15,6 +15,7 @@ When the user message looks like a **work request** (implement, add, fix, refact
|
|
|
15
15
|
4. A work request now runs the planning workflow — **goal frame → requirements → information-sufficiency → decompose** (dependency graph / epics); see **task-framing** and **plan-graph**.
|
|
16
16
|
5. Every **work request** — with or without `/task`, and even when the user says “no pipeline” / “just do it” — persists the **verbatim** original prompt at `.ai.local/team/tasks/<slug>/prompt.md`. Prefer `/task` (its **Slug** step writes it). If handling inline without `/task`, first create the slug dir and write `prompt.md` (write-if-absent), then proceed. Pure questions and trivial one-liners are not work requests → no file. On an inline follow-up for an existing slug (no `/task`) where the user authors new text, append it verbatim to `.ai.local/team/tasks/<slug>/prompt-log.md` (`seq` = max + 1; create on first append; exclude machine-generated and empty/argument-less invocations).
|
|
17
17
|
6. **Reuse the dialogue language already resolved on this turn** (always-on `ai-local-overlay` / **language-policy**). A question and a message without a slash command still resolve before you speak. When this request writes `prompt.md`, persist that tag once in the header (`language: <BCP-47>`) + a `.memlog.md` `event:` line. Development, reasoning, and artifacts stay English. The setting wins over a mid-task prompt switch (surface it once, never ask). See **language-policy**.
|
|
18
|
+
7. **Project the intake write.** After `prompt.md` is written for an inline (non-`/task`) work request, run `node .ai.local/scripts/team-db.mjs sync --slug <slug> --deadline-ms 4500` once, so the new task row and its prompt reach the database. A projection failure is reported to the user, never blocks the request; the next full sync remains the convergence path. Do not run a full sync from intake.
|
|
18
19
|
|
|
19
20
|
Exceptions: user explicitly says “no pipeline”, “just do it”, or continues an active slug.
|
|
20
21
|
|
|
@@ -168,13 +168,14 @@ On each `subagentStop`, the hook reconciles `status.state` from the completing p
|
|
|
168
168
|
7. On `validation_failed` from `build-verifier`: hook sets `retryAfterFix: build-verifier` → developer → build-verifier.
|
|
169
169
|
8. When all steps complete, suggest `/technical-retro <slug>`.
|
|
170
170
|
9. If `autoChain: false` in pipeline, do not rely on hook — manual step only.
|
|
171
|
-
10. **Persist the verbatim original prompt.** Every `/task` and every routed work request writes the user's raw prompt to `.ai.local/team/tasks/<slug>/prompt.md` during slug bootstrap (write-if-absent; never overwrite on resume). Not a manifest `artifacts[]` body — register the path on the `routing` entry. See **agent-artifact-contracts** § Prompt artifact. Also append every **subsequent user-authored** prompt for the same slug — a new user message while the slug is active, `/task-continue` arguments, human-gate feedback, a clarification answer — to the append-only `.ai.local/team/tasks/<slug>/prompt-log.md` (`seq` = max + 1; never rewrite or duplicate an entry; never log machine-generated hook `followup_message` or empty/argument-less invocations). Register its path on the `routing` entry. See **agent-artifact-contracts** § Prompt log.
|
|
171
|
+
10. **Persist the verbatim original prompt.** Every `/task` and every routed work request writes the user's raw prompt to `.ai.local/team/tasks/<slug>/prompt.md` during slug bootstrap (write-if-absent; never overwrite on resume). Not a manifest `artifacts[]` body — register the path on the `routing` entry. See **agent-artifact-contracts** § Prompt artifact. Also append every **subsequent user-authored** prompt for the same slug — a new user message while the slug is active, `/task-continue` arguments, human-gate feedback, a clarification answer — to the append-only `.ai.local/team/tasks/<slug>/prompt-log.md` (`seq` = max + 1; never rewrite or duplicate an entry; never log machine-generated hook `followup_message` or empty/argument-less invocations). Register its path on the `routing` entry. See **agent-artifact-contracts** § Prompt log. A message that explicitly addresses a **closed** slug follows the same ledger with the `post-terminal` marker — append-only, no reopen, one bounded `sync --slug`; see § Team artifact I/O.
|
|
172
172
|
11. **Answer the user in the resolved dialogue language for the whole task.** The always-on language rule already resolved it on this turn (`.ai.local` `## Language` → prompt language → English). Pass that tag to every step; `/task-continue` keeps it. Never ask the user to pick a language. Development, reasoning, and artifacts stay English. See **language-policy**.
|
|
173
173
|
|
|
174
174
|
## Team artifact I/O (Cursor Shell sandbox)
|
|
175
175
|
|
|
176
176
|
- **Persist the original prompt.** For **every** task — `/task` or a routed work request — write the user's **verbatim** prompt to `.ai.local/team/tasks/<slug>/prompt.md` during slug bootstrap (write-if-absent; never overwrite on resume). The header is additive provenance only; the fenced text block holds the user's words unchanged. Not a manifest `artifacts[]` body — the path lives on the `routing` entry. See **agent-artifact-contracts** § Prompt artifact.
|
|
177
177
|
- **Append follow-up prompts.** When a user-authored prompt arrives for an active slug (new message, `/task-continue` args, gate feedback, clarification), append it verbatim to `.ai.local/team/tasks/<slug>/prompt-log.md` — `seq` = current max + 1, create on first append, never rewrite or duplicate an entry, never touch `prompt.md`. Exclude hook `followup_message` and empty/argument-less invocations. Not a manifest `artifacts[]` body — the path lives on the `routing` entry. See **agent-artifact-contracts** § Prompt log.
|
|
178
|
+
- **Post-terminal history.** When a user-authored message explicitly addresses a **closed** slug, append it to that task's `prompt-log.md` (`seq` = max + 1) with `command: post-terminal <trigger>`, then run exactly one `node .ai.local/scripts/team-db.mjs sync --slug <slug> --deadline-ms 4500`. Do not reopen the task and do not touch `status.json`, `artifact-manifest.json`, or `metrics.json`. Attribution is explicit only — never infer the slug from `active-task.json` or a session lease; if the slug is not named, ask once and write nothing until it is. A request that changes work opens a successor slug; the closed task keeps the history. See **agent-artifact-contracts** § Prompt log.
|
|
178
179
|
- **Answer in the resolved dialogue language.** The always-on language rule already resolved it on this turn (`.ai.local` `## Language` → prompt language → English; mixed → dominant; nearest `.ai.local` wins). Reuse it for every user-facing message and `/task-continue`. Record the tag in the `prompt.md` header (`language: <BCP-47>`) + a `.memlog.md` `event:` line; a later correction is an append-only memlog event. Development, reasoning, and artifacts stay **English**. See **language-policy**.
|
|
179
180
|
|
|
180
181
|
- Create/update team task dirs with the **Write** tool (parents are created automatically). Do **not** bootstrap slug dirs with Shell `mkdir -p` — default sandbox returns `Operation not permitted` (worse on macOS Desktop/Documents with TCC).
|
|
@@ -36,9 +36,9 @@ Checklist for PRs that touch `packages/ai-rules/presets/**` (and dogfood `.curso
|
|
|
36
36
|
- [ ] **shared-core drift:** for embed-mode stems, run `packages/ai-rules/scripts/check-shared-core-drift.sh` (or document intentional fork)
|
|
37
37
|
- [ ] **Packaging:** every installable preset ships `REPO_AGENTS.md`; default `hooks.json` does not reference `hooks/examples/`; `_shared/assets/docs-specs/` ships `INDEX.md` + `_templates/{page,feature}.md`; `product-specs` / `product-specs-authoring` stay requestable
|
|
38
38
|
- [ ] **UI-only surfaces:** `mockup-reviewer`, `accessibility-reviewer`, `ux-design`, and the stack performance skill ship only on UI stacks (`check-preset-leakage.sh`)
|
|
39
|
-
- [ ] **Rule eval (hard):** `node packages/ai-rules/scripts/check-rule-eval.mjs` runs inside `yarn
|
|
40
|
-
- [ ] **Anti-hallucination:** `check-anti-hallucination-coverage.mjs` is green inside `yarn
|
|
41
|
-
- [ ] **Gate:** `yarn check:
|
|
39
|
+
- [ ] **Rule eval (hard):** `node packages/ai-rules/scripts/check-rule-eval.mjs` runs inside `yarn release:gate`; keep every registered golden stem paired
|
|
40
|
+
- [ ] **Anti-hallucination:** `check-anti-hallucination-coverage.mjs` is green inside `yarn release:gate`. Every role loads `anti-hallucination-contract`. Writer roles, including `code-reviewer`, also load `STACK_FLOOR_STEMS`. Register a new skill family in `SKILL_CONTRACT_CLASS` (`writer` or `reader`) or the gate FAILs.
|
|
41
|
+
- [ ] **Gate:** `yarn check:fast` in the loop; `yarn release:gate` from `packages/ai-rules/` before a release (full composite: twin-map, token-budget, leakage, drift, i18n, local overlay, anti-hallucination coverage)
|
|
42
42
|
|
|
43
43
|
## Pointers
|
|
44
44
|
|
|
@@ -48,7 +48,7 @@ Checklist for PRs that touch `packages/ai-rules/presets/**` (and dogfood `.curso
|
|
|
48
48
|
- Sync: `preset-twin-sync`
|
|
49
49
|
- Budget: `preset-token-budget`
|
|
50
50
|
- Leakage: `preset-no-cross-stack-leakage`
|
|
51
|
-
- Validation: `yarn check:
|
|
51
|
+
- Validation: `yarn check:fast` in the loop (`packages/ai-rules/scripts/check-preset-fast.sh`); `yarn release:gate` before a release (`packages/ai-rules/scripts/release-gate.sh`)
|
|
52
52
|
- Dogfood scripts: `packages/ai-rules/scripts/sync-dogfood-cursor.sh`, `sync-dogfood-claude.sh`, `sync-dogfood-mavis.sh`, `sync-dogfood-opencode.sh`
|
|
53
53
|
- Drift script: `packages/ai-rules/scripts/check-shared-core-drift.sh`
|
|
54
54
|
- Orchestrator: when editing presets, load this checklist + twin-sync
|
|
@@ -42,7 +42,7 @@ Validate: `check-mavis-adapter-map.mjs`, `check-opencode-adapter-map.mjs`, `chec
|
|
|
42
42
|
- **Thin aliases** (`agent-team-intake`, `technical-retro`): may be shorter (soft) if they only point to a command/skill.
|
|
43
43
|
- **Slim-companion rules** (UI-edit bundle, slim app-cores, slim tooling): may be shorter only if the body is a pointer into shared-core / stack prose. `check-preset-token-budget.sh` enforces this via `SLIM_COMPANION_ALLOWLIST` and the 5-line floor; 6–14-line stems outside the allow-list are slim violations.
|
|
44
44
|
|
|
45
|
-
## Severity (
|
|
45
|
+
## Severity (structure gates)
|
|
46
46
|
|
|
47
47
|
- Missing or stale generated Claude twin for a changed Cursor rule → **FAIL** (every stack under `presets/cursor/`; mapping table required).
|
|
48
48
|
- `cursor/<stack>` mapped source changed without mavis / opencode regeneration, or with `adapter-map.json` `sourceRevision` drift → **FAIL**.
|
|
@@ -10,7 +10,7 @@ import { fileURLToPath } from 'node:url';
|
|
|
10
10
|
export const PACKAGE_NAME = '@bonesofspring/ai-rules';
|
|
11
11
|
export const REGISTRY_URL = 'https://registry.npmjs.org/@bonesofspring/ai-rules/latest';
|
|
12
12
|
export const CACHE_TTL_MS = 60 * 60 * 1000;
|
|
13
|
-
export const TOOL_ROOTS = ['.cursor', '.claude', '.mavis', '.opencode'];
|
|
13
|
+
export const TOOL_ROOTS = ['.cursor', '.claude', '.mavis', '.opencode', '.zcode'];
|
|
14
14
|
|
|
15
15
|
const RELEASE_VERSION = /^\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?$/;
|
|
16
16
|
|
|
@@ -75,9 +75,10 @@ export function buildNotice(installs, latest) {
|
|
|
75
75
|
(item) => item.version === null || compareVersions(item.version, latest) < 0,
|
|
76
76
|
);
|
|
77
77
|
if (behind.length === 0) return '';
|
|
78
|
+
const installed = formatInstalled(behind);
|
|
78
79
|
return [
|
|
79
80
|
`Preset update available for ${PACKAGE_NAME}.`,
|
|
80
|
-
`Installed: ${
|
|
81
|
+
`Installed: ${installed}. Latest: ${latest}.`,
|
|
81
82
|
'The first block of the reply is only this notice, before any task text.',
|
|
82
83
|
'Use a level-2 heading and one markdown blockquote. Then a blank line. Then the task answer.',
|
|
83
84
|
'Do not fold the notice into the task text.',
|
|
@@ -86,7 +87,7 @@ export function buildNotice(installs, latest) {
|
|
|
86
87
|
'Shape:',
|
|
87
88
|
'## Preset update',
|
|
88
89
|
'',
|
|
89
|
-
`> Installed \`${PACKAGE_NAME}\`
|
|
90
|
+
`> Installed \`${PACKAGE_NAME}\` **${installed}**. Latest **${latest}**. Run \`/update\`.`,
|
|
90
91
|
].join('\n');
|
|
91
92
|
}
|
|
92
93
|
|
|
@@ -15,5 +15,6 @@ When the user message looks like a **work request** (implement, add, fix, refact
|
|
|
15
15
|
4. A work request now runs the planning workflow — **goal frame → requirements → information-sufficiency → decompose** (dependency graph / epics); see **task-framing** and **plan-graph**.
|
|
16
16
|
5. Every **work request** — with or without `/task`, and even when the user says “no pipeline” / “just do it” — persists the **verbatim** original prompt at `.ai.local/team/tasks/<slug>/prompt.md`. Prefer `/task` (its **Slug** step writes it). If handling inline without `/task`, first create the slug dir and write `prompt.md` (write-if-absent), then proceed. Pure questions and trivial one-liners are not work requests → no file. On an inline follow-up for an existing slug (no `/task`) where the user authors new text, append it verbatim to `.ai.local/team/tasks/<slug>/prompt-log.md` (`seq` = max + 1; create on first append; exclude machine-generated and empty/argument-less invocations).
|
|
17
17
|
6. **Reuse the dialogue language already resolved on this turn** (always-on `ai-local-overlay` / **language-policy**). A question and a message without a slash command still resolve before you speak. When this request writes `prompt.md`, persist that tag once in the header (`language: <BCP-47>`) + a `.memlog.md` `event:` line. Development, reasoning, and artifacts stay English. The setting wins over a mid-task prompt switch (surface it once, never ask). See **language-policy**.
|
|
18
|
+
7. **Project the intake write.** After `prompt.md` is written for an inline (non-`/task`) work request, run `node .ai.local/scripts/team-db.mjs sync --slug <slug> --deadline-ms 4500` once, so the new task row and its prompt reach the database. A projection failure is reported to the user, never blocks the request; the next full sync remains the convergence path. Do not run a full sync from intake.
|
|
18
19
|
|
|
19
20
|
Exceptions: user explicitly says “no pipeline”, “just do it”, or continues an active slug.
|
|
@@ -192,13 +192,14 @@ On each `subagentStop`, the hook reconciles `status.state` from the completing p
|
|
|
192
192
|
7. On `validation_failed` from `build-verifier`: hook sets `retryAfterFix: build-verifier` → developer → build-verifier.
|
|
193
193
|
8. When all steps complete, suggest `/technical-retro <slug>`.
|
|
194
194
|
9. If `autoChain: false` in pipeline, do not rely on hook — manual step only.
|
|
195
|
-
10. **Persist the verbatim original prompt.** Every `/task` and every routed work request writes the user's raw prompt to `.ai.local/team/tasks/<slug>/prompt.md` during slug bootstrap (write-if-absent; never overwrite on resume). Not a manifest `artifacts[]` body — register the path on the `routing` entry. See **agent-artifact-contracts** § Prompt artifact. Also append every **subsequent user-authored** prompt for the same slug — a new user message while the slug is active, `/task-continue` arguments, human-gate feedback, a clarification answer — to the append-only `.ai.local/team/tasks/<slug>/prompt-log.md` (`seq` = max + 1; never rewrite or duplicate an entry; never log machine-generated hook `followup_message` or empty/argument-less invocations). Register its path on the `routing` entry. See **agent-artifact-contracts** § Prompt log.
|
|
195
|
+
10. **Persist the verbatim original prompt.** Every `/task` and every routed work request writes the user's raw prompt to `.ai.local/team/tasks/<slug>/prompt.md` during slug bootstrap (write-if-absent; never overwrite on resume). Not a manifest `artifacts[]` body — register the path on the `routing` entry. See **agent-artifact-contracts** § Prompt artifact. Also append every **subsequent user-authored** prompt for the same slug — a new user message while the slug is active, `/task-continue` arguments, human-gate feedback, a clarification answer — to the append-only `.ai.local/team/tasks/<slug>/prompt-log.md` (`seq` = max + 1; never rewrite or duplicate an entry; never log machine-generated hook `followup_message` or empty/argument-less invocations). Register its path on the `routing` entry. See **agent-artifact-contracts** § Prompt log. A message that explicitly addresses a **closed** slug follows the same ledger with the `post-terminal` marker — append-only, no reopen, one bounded `sync --slug`; see § Team artifact I/O.
|
|
196
196
|
11. **Answer the user in the resolved dialogue language for the whole task.** The always-on language rule already resolved it on this turn (`.ai.local` `## Language` → prompt language → English). Pass that tag to every step; `/task-continue` keeps it. Never ask the user to pick a language. Development, reasoning, and artifacts stay English. See **language-policy**.
|
|
197
197
|
|
|
198
198
|
## Team artifact I/O (Cursor Shell sandbox)
|
|
199
199
|
|
|
200
200
|
- **Persist the original prompt.** For **every** task — `/task` or a routed work request — write the user's **verbatim** prompt to `.ai.local/team/tasks/<slug>/prompt.md` during slug bootstrap (write-if-absent; never overwrite on resume). The header is additive provenance only; the fenced text block holds the user's words unchanged. Not a manifest `artifacts[]` body — the path lives on the `routing` entry. See **agent-artifact-contracts** § Prompt artifact.
|
|
201
201
|
- **Append follow-up prompts.** When a user-authored prompt arrives for an active slug (new message, `/task-continue` args, gate feedback, clarification), append it verbatim to `.ai.local/team/tasks/<slug>/prompt-log.md` — `seq` = current max + 1, create on first append, never rewrite or duplicate an entry, never touch `prompt.md`. Exclude hook `followup_message` and empty/argument-less invocations. Not a manifest `artifacts[]` body — the path lives on the `routing` entry. See **agent-artifact-contracts** § Prompt log.
|
|
202
|
+
- **Post-terminal history.** When a user-authored message explicitly addresses a **closed** slug, append it to that task's `prompt-log.md` (`seq` = max + 1) with `command: post-terminal <trigger>`, then run exactly one `node .ai.local/scripts/team-db.mjs sync --slug <slug> --deadline-ms 4500`. Do not reopen the task and do not touch `status.json`, `artifact-manifest.json`, or `metrics.json`. Attribution is explicit only — never infer the slug from `active-task.json` or a session lease; if the slug is not named, ask once and write nothing until it is. A request that changes work opens a successor slug; the closed task keeps the history. See **agent-artifact-contracts** § Prompt log.
|
|
202
203
|
- **Answer in the resolved dialogue language.** The always-on language rule already resolved it on this turn (`.ai.local` `## Language` → prompt language → English; mixed → dominant; nearest `.ai.local` wins). Reuse it for every user-facing message and `/task-continue`. Record the tag in the `prompt.md` header (`language: <BCP-47>`) + a `.memlog.md` `event:` line; a later correction is an append-only memlog event. Development, reasoning, and artifacts stay **English**. See **language-policy**.
|
|
203
204
|
|
|
204
205
|
- Create/update `.ai.local/team/tasks/<slug>/**` with the **Write** tool (parents are created automatically). Do **not** bootstrap slug dirs with Shell `mkdir -p` — default sandbox returns `Operation not permitted` (worse on macOS Desktop/Documents with TCC `com.apple.macl`).
|
|
@@ -36,9 +36,9 @@ Checklist for PRs that touch `packages/ai-rules/presets/**` (and dogfood `.curso
|
|
|
36
36
|
- [ ] **shared-core drift:** for embed-mode stems, run `packages/ai-rules/scripts/check-shared-core-drift.sh` (or document intentional fork)
|
|
37
37
|
- [ ] **Packaging:** every installable preset ships `REPO_AGENTS.md`; default `hooks.json` does not reference `hooks/examples/`; `_shared/assets/docs-specs/` ships `INDEX.md` + `_templates/{page,feature}.md`; `product-specs` / `product-specs-authoring` stay requestable
|
|
38
38
|
- [ ] **UI-only surfaces:** `mockup-reviewer`, `accessibility-reviewer`, `ux-design`, and the stack performance skill ship only on UI stacks (`check-preset-leakage.sh`)
|
|
39
|
-
- [ ] **Rule eval (hard):** `node packages/ai-rules/scripts/check-rule-eval.mjs` runs inside `yarn
|
|
40
|
-
- [ ] **Anti-hallucination:** `check-anti-hallucination-coverage.mjs` is green inside `yarn
|
|
41
|
-
- [ ] **Gate:** `yarn check:
|
|
39
|
+
- [ ] **Rule eval (hard):** `node packages/ai-rules/scripts/check-rule-eval.mjs` runs inside `yarn release:gate`; keep every registered golden stem paired
|
|
40
|
+
- [ ] **Anti-hallucination:** `check-anti-hallucination-coverage.mjs` is green inside `yarn release:gate`. Every role loads `anti-hallucination-contract`. Writer roles, including `code-reviewer`, also load `STACK_FLOOR_STEMS`. Register a new skill family in `SKILL_CONTRACT_CLASS` (`writer` or `reader`) or the gate FAILs.
|
|
41
|
+
- [ ] **Gate:** `yarn check:fast` in the loop; `yarn release:gate` from `packages/ai-rules/` before a release (full composite: twin-map, token-budget, leakage, drift, i18n, local overlay, anti-hallucination coverage)
|
|
42
42
|
|
|
43
43
|
## Pointers
|
|
44
44
|
|
|
@@ -48,7 +48,7 @@ Checklist for PRs that touch `packages/ai-rules/presets/**` (and dogfood `.curso
|
|
|
48
48
|
- Sync: `preset-twin-sync`
|
|
49
49
|
- Budget: `preset-token-budget`
|
|
50
50
|
- Leakage: `preset-no-cross-stack-leakage`
|
|
51
|
-
- Validation: `yarn check:
|
|
51
|
+
- Validation: `yarn check:fast` in the loop (`packages/ai-rules/scripts/check-preset-fast.sh`); `yarn release:gate` before a release (`packages/ai-rules/scripts/release-gate.sh`)
|
|
52
52
|
- Dogfood scripts: `packages/ai-rules/scripts/sync-dogfood-cursor.sh`, `sync-dogfood-claude.sh`, `sync-dogfood-mavis.sh`, `sync-dogfood-opencode.sh`
|
|
53
53
|
- Drift script: `packages/ai-rules/scripts/check-shared-core-drift.sh`
|
|
54
54
|
- Orchestrator: when editing presets, load this checklist + twin-sync
|
|
@@ -42,7 +42,7 @@ Validate: `check-mavis-adapter-map.mjs`, `check-opencode-adapter-map.mjs`, `chec
|
|
|
42
42
|
- **Thin aliases** (`agent-team-intake`, `technical-retro`): may be shorter (soft) if they only point to a command/skill.
|
|
43
43
|
- **Slim-companion rules** (UI-edit bundle, slim app-cores, slim tooling): may be shorter only if the body is a pointer into shared-core / stack prose. `check-preset-token-budget.sh` enforces this via `SLIM_COMPANION_ALLOWLIST` and the 5-line floor; 6–14-line stems outside the allow-list are slim violations.
|
|
44
44
|
|
|
45
|
-
## Severity (
|
|
45
|
+
## Severity (structure gates)
|
|
46
46
|
|
|
47
47
|
- Missing or stale generated Claude twin for a changed Cursor rule → **FAIL** (every stack under `presets/cursor/`; mapping table required).
|
|
48
48
|
- `cursor/<stack>` mapped source changed without mavis / opencode regeneration, or with `adapter-map.json` `sourceRevision` drift → **FAIL**.
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"platform": "mavis",
|
|
4
4
|
"stack": "android-kotlin",
|
|
5
5
|
"semanticSource": "cursor/android-kotlin",
|
|
6
|
-
"sourceRevision": "
|
|
6
|
+
"sourceRevision": "7154b28a7e4cf910992ee5246ec3867334a0030814ac76a765aa8e44c6bafc10",
|
|
7
7
|
"entries": [
|
|
8
8
|
{
|
|
9
9
|
"source": "AGENTS.md",
|
|
@@ -10,7 +10,7 @@ import { fileURLToPath } from 'node:url';
|
|
|
10
10
|
export const PACKAGE_NAME = '@bonesofspring/ai-rules';
|
|
11
11
|
export const REGISTRY_URL = 'https://registry.npmjs.org/@bonesofspring/ai-rules/latest';
|
|
12
12
|
export const CACHE_TTL_MS = 60 * 60 * 1000;
|
|
13
|
-
export const TOOL_ROOTS = ['.cursor', '.claude', '.mavis', '.opencode'];
|
|
13
|
+
export const TOOL_ROOTS = ['.cursor', '.claude', '.mavis', '.opencode', '.zcode'];
|
|
14
14
|
|
|
15
15
|
const RELEASE_VERSION = /^\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?$/;
|
|
16
16
|
|
|
@@ -75,9 +75,10 @@ export function buildNotice(installs, latest) {
|
|
|
75
75
|
(item) => item.version === null || compareVersions(item.version, latest) < 0,
|
|
76
76
|
);
|
|
77
77
|
if (behind.length === 0) return '';
|
|
78
|
+
const installed = formatInstalled(behind);
|
|
78
79
|
return [
|
|
79
80
|
`Preset update available for ${PACKAGE_NAME}.`,
|
|
80
|
-
`Installed: ${
|
|
81
|
+
`Installed: ${installed}. Latest: ${latest}.`,
|
|
81
82
|
'The first block of the reply is only this notice, before any task text.',
|
|
82
83
|
'Use a level-2 heading and one markdown blockquote. Then a blank line. Then the task answer.',
|
|
83
84
|
'Do not fold the notice into the task text.',
|
|
@@ -86,7 +87,7 @@ export function buildNotice(installs, latest) {
|
|
|
86
87
|
'Shape:',
|
|
87
88
|
'## Preset update',
|
|
88
89
|
'',
|
|
89
|
-
`> Installed \`${PACKAGE_NAME}\`
|
|
90
|
+
`> Installed \`${PACKAGE_NAME}\` **${installed}**. Latest **${latest}**. Run \`/update\`.`,
|
|
90
91
|
].join('\n');
|
|
91
92
|
}
|
|
92
93
|
|
|
@@ -10,5 +10,6 @@ When the user message looks like a **work request** (implement, add, fix, refact
|
|
|
10
10
|
4. A work request now runs the planning workflow — **goal frame → requirements → information-sufficiency → decompose** (dependency graph / epics); see **task-framing** and **plan-graph**.
|
|
11
11
|
5. Every **work request** — with or without `/task`, and even when the user says “no pipeline” / “just do it” — persists the **verbatim** original prompt at `.ai.local/team/tasks/<slug>/prompt.md`. Prefer `/task` (its **Slug** step writes it). If handling inline without `/task`, first create the slug dir and write `prompt.md` (write-if-absent), then proceed. Pure questions and trivial one-liners are not work requests → no file. On an inline follow-up for an existing slug (no `/task`) where the user authors new text, append it verbatim to `.ai.local/team/tasks/<slug>/prompt-log.md` (`seq` = max + 1; create on first append; exclude machine-generated and empty/argument-less invocations).
|
|
12
12
|
6. **Reuse the dialogue language already resolved on this turn** (always-on `ai-local-overlay` / **language-policy**). A question and a message without a slash command still resolve before you speak. When this request writes `prompt.md`, persist that tag once in the header (`language: <BCP-47>`) + a `.memlog.md` `event:` line. Development, reasoning, and artifacts stay English. The setting wins over a mid-task prompt switch (surface it once, never ask). See **language-policy**.
|
|
13
|
+
7. **Project the intake write.** After `prompt.md` is written for an inline (non-`/task`) work request, run `node .ai.local/scripts/team-db.mjs sync --slug <slug> --deadline-ms 4500` once, so the new task row and its prompt reach the database. A projection failure is reported to the user, never blocks the request; the next full sync remains the convergence path. Do not run a full sync from intake.
|
|
13
14
|
|
|
14
15
|
Exceptions: user explicitly says “no pipeline”, “just do it”, or continues an active slug.
|
|
@@ -146,6 +146,8 @@ A producer invoked outside `pipeline.json.steps` — a remediation pass after a
|
|
|
146
146
|
## Plan revision (replanning)
|
|
147
147
|
Replanning is a **named, auditable operation** — never a silent reorder. Trigger it when an evaluation oracle fails twice on the same task, when scope or requirements change, or when a previously unknown dependency/consumer is discovered. Procedure: append `decision: replan rev N → N+1` (with the reason) to `.memlog.md`, update `decomposition.md` (task add/remove or dependency change) and any optional plan fields, then **re-run the affected gate**. Scope-changing revisions return to the human gate.
|
|
148
148
|
|
|
149
|
+
- **Rules in flight.** At slug bootstrap, when `.ai.local/rules/**` or `.ai.local/conventions.md` has uncommitted changes, ask once whether a policy change is still in progress before `steps[0]`. A policy that lands mid-task invalidates an approved plan: it is a `planRevision` with a new confirmation, never a silent scope change — stop and re-confirm instead of letting a specialist discover it halfway through.
|
|
150
|
+
|
|
149
151
|
## Context budget & checkpoint/resume
|
|
150
152
|
|
|
151
153
|
Work in bounded waves (one artifact class across the target surface). **Checkpoint** each completed wave to `.memlog.md` (`## <date>` + an `event:` line) and record the produced paths on the `implementation` manifest entry (`authoritativePaths`). That checkpoint is the hook `writeStatus` path: it rewrites `.ai.local/team/tasks/<slug>/focus.md`. `focus.md` is a view, not the system of record. It lists slug, pipeline step index, authoritative paths for incomplete manifest ids, the last `.memlog.md` `event:` line, the next gate, one decomposition ready-set line, and one archive index line, and it stays under 100 lines. `status.json`, `metrics.json`, `artifact-manifest.json`, and `.memlog.md` stay the system of record. A resumed run (`/task-continue`) reads `focus.md` first, then `artifact-manifest.json` and `.memlog.md`, and continues at the first stage whose exit criteria are unmet — never re-derive state from the chat. A completed manifest entry keeps id, status, and `authoritativePaths`, and the default resume read omits that entry's markdown body; closing it appends one new `.memlog.md` event: line, moves the bulky body to `.ai.local/team/tasks/<slug>/archive/YYYY-MM-DD/`, and leaves earlier memlog lines, the human-readable slug and artifact ids, and the manifest entry in place, with no Beads hash ids and no Taskmaster tags. Mechanical waves (generation, embed sync) are delegated to repo scripts. An **interrupted producer** (tool abort, killed session) is resumed, not restarted: run the stack's compile gate on the working tree first, and when it is red hand the failing output to the same producer with a `fix and finish` brief instead of starting a second parallel attempt. When the host runtime writes no `status.json` (manual-hook hosts such as OpenCode), the resume checkpoint is `artifact-manifest.json` + `.memlog.md`; never gate a resume on a file the runtime does not produce. See **context-and-iteration** for the budget, checkpoint, resume, and refinement loop.
|
|
@@ -228,7 +230,7 @@ On each `subagentStop`, the hook reconciles `status.state` from the completing p
|
|
|
228
230
|
| `scope` | e.g. `unit-in-dev`, `e2e-only` — passed to developer/qa |
|
|
229
231
|
| `model` | `cheap` \| `standard` \| `strong` — optional tier override |
|
|
230
232
|
|
|
231
|
-
`writeScopes` are reconciled after the step, never in the hook: `node .ai.local/scripts/check-write-scope.mjs --slug <slug> --step <step-id> --json` labels every changed path `declared`, `derived`, or `out-of-scope`. `build-verifier` hard-fails an out-of-scope implementation write; `code-reviewer` reports a reviewer-step path as advisory.
|
|
233
|
+
`writeScopes` are reconciled after the step, never in the hook: `node .ai.local/scripts/check-write-scope.mjs --slug <slug> --step <step-id> --json` labels every changed path `declared`, `derived`, or `out-of-scope`. The orchestrator writes the step baseline (`--step <step-id> --save-baseline`) before the step writes, so the audit sees this step's paths and not the earlier ones. Exit `3` is a skip, not a failure: a pipeline that predates step ids or `writeScopes` is not auditable, and the reason goes under `## Soft notes`. `build-verifier` hard-fails an out-of-scope implementation write; `code-reviewer` reports a reviewer-step path as advisory.
|
|
232
234
|
|
|
233
235
|
## Rules (strict)
|
|
234
236
|
|
|
@@ -241,7 +243,7 @@ On each `subagentStop`, the hook reconciles `status.state` from the completing p
|
|
|
241
243
|
7. On `validation_failed` from `build-verifier`: hook sets `retryAfterFix: build-verifier` → developer → build-verifier.
|
|
242
244
|
8. When all steps complete, suggest `/technical-retro <slug>`.
|
|
243
245
|
9. If `autoChain: false` in pipeline, do not rely on hook — manual step only.
|
|
244
|
-
10. **Persist the verbatim original prompt.** Every `/task` and every routed work request writes the user's raw prompt to `.ai.local/team/tasks/<slug>/prompt.md` during slug bootstrap (write-if-absent; never overwrite on resume). It is not a manifest `artifacts[]` body — register the path on the `routing` entry. See **agent-artifact-contracts** § Prompt artifact. Also append every **subsequent user-authored** prompt for the same slug — a new user message while the slug is active, `/task-continue` arguments, human-gate feedback, a clarification answer — to the append-only `.ai.local/team/tasks/<slug>/prompt-log.md` (`seq` = max + 1; never rewrite or duplicate an entry; never log machine-generated hook `followup_message` or empty/argument-less invocations). Register its path on the `routing` entry. See **agent-artifact-contracts** § Prompt log.
|
|
246
|
+
10. **Persist the verbatim original prompt.** Every `/task` and every routed work request writes the user's raw prompt to `.ai.local/team/tasks/<slug>/prompt.md` during slug bootstrap (write-if-absent; never overwrite on resume). It is not a manifest `artifacts[]` body — register the path on the `routing` entry. See **agent-artifact-contracts** § Prompt artifact. Also append every **subsequent user-authored** prompt for the same slug — a new user message while the slug is active, `/task-continue` arguments, human-gate feedback, a clarification answer — to the append-only `.ai.local/team/tasks/<slug>/prompt-log.md` (`seq` = max + 1; never rewrite or duplicate an entry; never log machine-generated hook `followup_message` or empty/argument-less invocations). Register its path on the `routing` entry. See **agent-artifact-contracts** § Prompt log. A message that explicitly addresses a **closed** slug follows the same ledger with the `post-terminal` marker — append-only, no reopen, one bounded `sync --slug`; see § Team artifact I/O.
|
|
245
247
|
11. **Answer the user in the resolved dialogue language for the whole task.** The always-on language rule already resolved it on this turn (`.ai.local` `## Language` → prompt language → English). Pass that tag to every step; `/task-continue` keeps it. Never ask the user to pick a language. Development, reasoning, and artifacts stay English. See **language-policy**.
|
|
246
248
|
12. **Invoke the ready set, and never advance before reconciliation.** In graph mode the hook computes the ready queue; invoke exactly the handoff's agent list (a wave in one assistant turn, multiple Task calls) and do not start any next step from your own reasoning until the hook records the join and emits the next handoff. The wave is the join unit; `status.joinedSlots` is the satisfaction ledger. The role pipeline and the engineering graph are two linked objects: `pipeline.json` `steps[].dependsOn` still decides which agent runs; the decomposition ready set only chooses rows inside the active step. Reviewer and QA steps stay on the pipeline.
|
|
247
249
|
13. **Only a proven conflict-free set is `parallel: true`.** Disjoint declared `writeScopes`, distinct agents, distinct `artifactOutputIds`, no shared lifecycle file; `mockup-reviewer` is never parallel (its FAIL gate is serial). See **plan-graph** § Conflict model. Each decomposition task lists the repo paths it may create or modify. That list is a subset of the implementing step's `writeScopes[]` when the step declares `writeScopes`. Tasks with no `dependsOn` path between them keep those lists disjoint; a shared path stays sequential. `docs/specs/**` or `openspec/**` paths and `app/**` paths stay in different lists. `steps[].writeScopes[]` stays the role-level authority. Reviewer steps stay team-artifact only.
|
|
@@ -250,6 +252,7 @@ On each `subagentStop`, the hook reconciles `status.state` from the completing p
|
|
|
250
252
|
|
|
251
253
|
- **Persist the original prompt.** For **every** task — `/task` or a routed work request — write the user's **verbatim** prompt to `.ai.local/team/tasks/<slug>/prompt.md` during slug bootstrap (write-if-absent; never overwrite on resume). The header is additive provenance only; the fenced text block holds the user's words unchanged. It is not a manifest `artifacts[]` body — the path lives on the `routing` entry. See **agent-artifact-contracts** § Prompt artifact.
|
|
252
254
|
- **Append follow-up prompts.** When a user-authored prompt arrives for an active slug (new message, `/task-continue` args, gate feedback, clarification), append it verbatim to `.ai.local/team/tasks/<slug>/prompt-log.md` — `seq` = current max + 1, create on first append, never rewrite or duplicate an entry, never touch `prompt.md`. Exclude hook `followup_message` and empty/argument-less invocations. Not a manifest `artifacts[]` body — the path lives on the `routing` entry. See **agent-artifact-contracts** § Prompt log.
|
|
255
|
+
- **Post-terminal history.** When a user-authored message explicitly addresses a **closed** slug, append it to that task's `prompt-log.md` (`seq` = max + 1) with `command: post-terminal <trigger>`, then run exactly one `node .ai.local/scripts/team-db.mjs sync --slug <slug> --deadline-ms 4500`. Do not reopen the task and do not touch `status.json`, `artifact-manifest.json`, or `metrics.json`. Attribution is explicit only — never infer the slug from `active-task.json` or a session lease; if the slug is not named, ask once and write nothing until it is. A request that changes work opens a successor slug; the closed task keeps the history. See **agent-artifact-contracts** § Prompt log.
|
|
253
256
|
- **Answer in the resolved dialogue language.** The always-on language rule already resolved it on this turn (`.ai.local` `## Language` → prompt language → English; mixed → dominant; nearest `.ai.local` wins). Reuse it for every user-facing message and `/task-continue`. Record the tag in the `prompt.md` header (`language: <BCP-47>`) + a `.memlog.md` `event:` line; a later correction is an append-only memlog event. Development, reasoning, and artifacts stay **English**. See **language-policy**.
|
|
254
257
|
- Create/update team task dirs with the **Write** tool (parents are created automatically). Do **not** bootstrap slug dirs with Shell `mkdir -p` — default sandbox returns `Operation not permitted` (worse on macOS Desktop/Documents with TCC).
|
|
255
258
|
- If Shell must touch team paths and fails with EPERM, retry with `required_permissions: ["all"]`. Prefer Write for artifacts.
|