@bonesofspring/ai-rules 0.2.72 → 0.2.74
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 +43 -0
- package/README.md +7 -6
- package/bin/lib/ai-local-drift.js +4 -4
- package/bin/lib/engine-scripts.js +10 -0
- package/bin/lib/seed-ai-local-team.js +9 -5
- package/docs/TEAM-DB.md +105 -9
- package/docs/openapi/team-db.v1.json +1164 -224
- package/package.json +1 -1
- package/presets/_shared/ai-local/scripts/action-signals.mjs +225 -0
- package/presets/_shared/ai-local/scripts/actions-report.mjs +210 -0
- package/presets/_shared/ai-local/scripts/manifest.mjs +19 -1
- package/presets/_shared/ai-local/scripts/processes.mjs +5 -4
- package/presets/_shared/ai-local/scripts/rr-scheduler-start.mjs +161 -0
- package/presets/_shared/ai-local/scripts/team-db-api.mjs +347 -9
- package/presets/_shared/ai-local/scripts/team-db-openapi.mjs +309 -4
- package/presets/_shared/ai-local/scripts/team-db-project.mjs +312 -36
- package/presets/_shared/ai-local/scripts/team-db-schema.mjs +86 -1
- package/presets/_shared/ai-local/scripts/team-db.mjs +125 -40
- package/presets/_shared/ai-local/scripts/tracker-planned-drain.mjs +335 -0
- package/presets/_shared/core/agent-team/agent-artifact-contracts.md +9 -0
- package/presets/_shared/core/agent-team/agent-team-intake.md +2 -2
- package/presets/_shared/core/quality/self-review-and-context-hygiene.md +1 -0
- package/presets/_shared/hooks/chain-team-phases.sh.tmpl +15 -1
- package/presets/claude/android-kotlin/agents/build-verifier.md +1 -1
- package/presets/claude/android-kotlin/agents/code-reviewer.md +1 -1
- package/presets/claude/android-kotlin/agents/debugger.md +1 -1
- package/presets/claude/android-kotlin/agents/feature-developer.md +1 -1
- package/presets/claude/android-kotlin/agents/task-analyst.md +1 -1
- package/presets/claude/android-kotlin/commands/README.md +4 -0
- package/presets/claude/android-kotlin/commands/rr-scheduler-start.md +32 -0
- package/presets/claude/android-kotlin/hooks/chain-team-phases.sh +15 -1
- package/presets/claude/android-kotlin/rules/tooling-and-review/agent-team-intake.md +2 -2
- package/presets/claude/go/agents/build-verifier.md +1 -1
- package/presets/claude/go/agents/code-reviewer.md +1 -1
- package/presets/claude/go/agents/debugger.md +1 -1
- package/presets/claude/go/agents/feature-developer.md +1 -1
- package/presets/claude/go/agents/task-analyst.md +1 -1
- package/presets/claude/go/commands/README.md +4 -0
- package/presets/claude/go/commands/rr-scheduler-start.md +32 -0
- package/presets/claude/go/hooks/chain-team-phases.sh +15 -1
- package/presets/claude/go/rules/tooling-and-review/agent-team-intake.md +2 -2
- package/presets/claude/ios-swift/agents/build-verifier.md +1 -1
- package/presets/claude/ios-swift/agents/code-reviewer.md +1 -1
- package/presets/claude/ios-swift/agents/debugger.md +1 -1
- package/presets/claude/ios-swift/agents/feature-developer.md +1 -1
- package/presets/claude/ios-swift/agents/task-analyst.md +1 -1
- package/presets/claude/ios-swift/commands/README.md +4 -0
- package/presets/claude/ios-swift/commands/rr-scheduler-start.md +32 -0
- package/presets/claude/ios-swift/hooks/chain-team-phases.sh +15 -1
- package/presets/claude/ios-swift/rules/tooling-and-review/agent-team-intake.md +2 -2
- package/presets/claude/java/agents/build-verifier.md +1 -1
- package/presets/claude/java/agents/code-reviewer.md +1 -1
- package/presets/claude/java/agents/debugger.md +1 -1
- package/presets/claude/java/agents/feature-developer.md +1 -1
- package/presets/claude/java/agents/task-analyst.md +1 -1
- package/presets/claude/java/commands/README.md +4 -0
- package/presets/claude/java/commands/rr-scheduler-start.md +32 -0
- package/presets/claude/java/hooks/chain-team-phases.sh +15 -1
- package/presets/claude/java/rules/tooling-and-review/agent-team-intake.md +2 -2
- package/presets/claude/mcp-ts/agents/build-verifier.md +1 -1
- package/presets/claude/mcp-ts/agents/feature-developer.md +1 -1
- package/presets/claude/mcp-ts/agents/task-analyst.md +1 -1
- package/presets/claude/mcp-ts/commands/README.md +4 -0
- package/presets/claude/mcp-ts/commands/rr-scheduler-start.md +32 -0
- package/presets/claude/mcp-ts/hooks/chain-team-phases.sh +15 -1
- package/presets/claude/mcp-ts/rules/tooling-and-review/agent-team-intake.md +2 -2
- package/presets/claude/mol/agents/build-verifier.md +1 -1
- package/presets/claude/mol/agents/code-reviewer.md +1 -1
- package/presets/claude/mol/agents/debugger.md +1 -1
- package/presets/claude/mol/agents/feature-developer.md +1 -1
- package/presets/claude/mol/agents/task-analyst.md +1 -1
- package/presets/claude/mol/commands/README.md +4 -0
- package/presets/claude/mol/commands/rr-scheduler-start.md +32 -0
- package/presets/claude/mol/hooks/chain-team-phases.sh +15 -1
- package/presets/claude/mol/rules/tooling-and-review/agent-team-intake.md +2 -2
- package/presets/claude/next/REPO_AGENTS.md +16 -0
- package/presets/claude/next/agents/accessibility-reviewer.md +4 -1
- package/presets/claude/next/agents/api-contract-reviewer.md +5 -2
- package/presets/claude/next/agents/build-verifier.md +6 -3
- package/presets/claude/next/agents/ci-investigator.md +1 -1
- package/presets/claude/next/agents/code-reviewer.md +7 -4
- package/presets/claude/next/agents/codebase-analyzer.md +4 -1
- package/presets/claude/next/agents/debugger.md +2 -2
- package/presets/claude/next/agents/feature-developer.md +2 -2
- package/presets/claude/next/agents/migration-specialist.md +4 -1
- package/presets/claude/next/agents/mockup-reviewer.md +4 -1
- package/presets/claude/next/agents/openspec-author.md +4 -1
- package/presets/claude/next/agents/performance-auditor.md +4 -1
- package/presets/claude/next/agents/playwright-test-generator.md +5 -2
- package/presets/claude/next/agents/playwright-test-healer.md +5 -2
- package/presets/claude/next/agents/playwright-test-planner.md +5 -2
- package/presets/claude/next/agents/qa-tester.md +5 -2
- package/presets/claude/next/agents/security-reviewer.md +4 -1
- package/presets/claude/next/agents/solution-architect.md +4 -1
- package/presets/claude/next/agents/task-analyst.md +5 -2
- package/presets/claude/next/agents/task-router.md +4 -1
- package/presets/claude/next/agents/tech-writer.md +4 -1
- package/presets/claude/next/agents/unit-test-generator.md +5 -2
- package/presets/claude/next/agents/unit-test-healer.md +5 -2
- package/presets/claude/next/agents/unit-test-planner.md +5 -2
- package/presets/claude/next/ai-local/conventions.md +26 -1
- package/presets/claude/next/commands/README.md +4 -0
- package/presets/claude/next/commands/rr-scheduler-start.md +32 -0
- package/presets/claude/next/hooks/chain-team-phases.sh +15 -1
- package/presets/claude/next/rules/tooling-and-review/agent-team-intake.md +2 -2
- package/presets/claude/nuxt/agents/build-verifier.md +1 -1
- package/presets/claude/nuxt/agents/code-reviewer.md +1 -1
- package/presets/claude/nuxt/agents/debugger.md +1 -1
- package/presets/claude/nuxt/agents/feature-developer.md +1 -1
- package/presets/claude/nuxt/agents/task-analyst.md +1 -1
- package/presets/claude/nuxt/commands/README.md +4 -0
- package/presets/claude/nuxt/commands/rr-scheduler-start.md +32 -0
- package/presets/claude/nuxt/hooks/chain-team-phases.sh +15 -1
- package/presets/claude/nuxt/rules/tooling-and-review/agent-team-intake.md +2 -2
- package/presets/claude/php-hexagonal/agents/build-verifier.md +1 -1
- package/presets/claude/php-hexagonal/agents/code-reviewer.md +1 -1
- package/presets/claude/php-hexagonal/agents/debugger.md +1 -1
- package/presets/claude/php-hexagonal/agents/feature-developer.md +1 -1
- package/presets/claude/php-hexagonal/agents/task-analyst.md +1 -1
- package/presets/claude/php-hexagonal/commands/README.md +4 -0
- package/presets/claude/php-hexagonal/commands/rr-scheduler-start.md +32 -0
- package/presets/claude/php-hexagonal/hooks/chain-team-phases.sh +15 -1
- package/presets/claude/php-hexagonal/rules/tooling-and-review/agent-team-intake.md +2 -2
- package/presets/claude/php-laravel/agents/build-verifier.md +1 -1
- package/presets/claude/php-laravel/agents/code-reviewer.md +1 -1
- package/presets/claude/php-laravel/agents/debugger.md +1 -1
- package/presets/claude/php-laravel/agents/feature-developer.md +1 -1
- package/presets/claude/php-laravel/agents/task-analyst.md +1 -1
- package/presets/claude/php-laravel/commands/README.md +4 -0
- package/presets/claude/php-laravel/commands/rr-scheduler-start.md +32 -0
- package/presets/claude/php-laravel/hooks/chain-team-phases.sh +15 -1
- package/presets/claude/php-laravel/rules/tooling-and-review/agent-team-intake.md +2 -2
- package/presets/claude/svelte/agents/build-verifier.md +1 -1
- package/presets/claude/svelte/agents/code-reviewer.md +1 -1
- package/presets/claude/svelte/agents/debugger.md +1 -1
- package/presets/claude/svelte/agents/feature-developer.md +1 -1
- package/presets/claude/svelte/agents/task-analyst.md +1 -1
- package/presets/claude/svelte/commands/README.md +4 -0
- package/presets/claude/svelte/commands/rr-scheduler-start.md +32 -0
- package/presets/claude/svelte/hooks/chain-team-phases.sh +15 -1
- package/presets/claude/svelte/rules/tooling-and-review/agent-team-intake.md +2 -2
- package/presets/cursor/android-kotlin/agents/build-verifier.md +1 -1
- package/presets/cursor/android-kotlin/agents/code-reviewer.md +1 -1
- package/presets/cursor/android-kotlin/agents/debugger.md +1 -1
- package/presets/cursor/android-kotlin/agents/feature-developer.md +1 -1
- package/presets/cursor/android-kotlin/agents/task-analyst.md +1 -1
- package/presets/cursor/android-kotlin/commands/README.md +4 -0
- package/presets/cursor/android-kotlin/commands/rr-scheduler-start.md +32 -0
- package/presets/cursor/android-kotlin/hooks/chain-team-phases.sh +15 -1
- package/presets/cursor/android-kotlin/rules/agent-team-intake.mdc +2 -2
- package/presets/cursor/go/agents/build-verifier.md +1 -1
- package/presets/cursor/go/agents/code-reviewer.md +1 -1
- package/presets/cursor/go/agents/debugger.md +1 -1
- package/presets/cursor/go/agents/feature-developer.md +1 -1
- package/presets/cursor/go/agents/task-analyst.md +1 -1
- package/presets/cursor/go/commands/README.md +4 -0
- package/presets/cursor/go/commands/rr-scheduler-start.md +32 -0
- package/presets/cursor/go/hooks/chain-team-phases.sh +15 -1
- package/presets/cursor/go/rules/agent-team-intake.mdc +2 -2
- package/presets/cursor/ios-swift/agents/build-verifier.md +1 -1
- package/presets/cursor/ios-swift/agents/code-reviewer.md +1 -1
- package/presets/cursor/ios-swift/agents/debugger.md +1 -1
- package/presets/cursor/ios-swift/agents/feature-developer.md +1 -1
- package/presets/cursor/ios-swift/agents/task-analyst.md +1 -1
- package/presets/cursor/ios-swift/commands/README.md +4 -0
- package/presets/cursor/ios-swift/commands/rr-scheduler-start.md +32 -0
- package/presets/cursor/ios-swift/hooks/chain-team-phases.sh +15 -1
- package/presets/cursor/ios-swift/rules/agent-team-intake.mdc +2 -2
- package/presets/cursor/java/agents/build-verifier.md +1 -1
- package/presets/cursor/java/agents/code-reviewer.md +1 -1
- package/presets/cursor/java/agents/debugger.md +1 -1
- package/presets/cursor/java/agents/feature-developer.md +1 -1
- package/presets/cursor/java/agents/task-analyst.md +1 -1
- package/presets/cursor/java/commands/README.md +4 -0
- package/presets/cursor/java/commands/rr-scheduler-start.md +32 -0
- package/presets/cursor/java/hooks/chain-team-phases.sh +15 -1
- package/presets/cursor/java/rules/agent-team-intake.mdc +2 -2
- package/presets/cursor/mcp-ts/agents/build-verifier.md +1 -1
- package/presets/cursor/mcp-ts/agents/feature-developer.md +1 -1
- package/presets/cursor/mcp-ts/agents/task-analyst.md +1 -1
- package/presets/cursor/mcp-ts/commands/README.md +4 -0
- package/presets/cursor/mcp-ts/commands/rr-scheduler-start.md +32 -0
- package/presets/cursor/mcp-ts/hooks/chain-team-phases.sh +15 -1
- package/presets/cursor/mcp-ts/rules/agent-team-intake.mdc +2 -2
- package/presets/cursor/mol/agents/build-verifier.md +1 -1
- package/presets/cursor/mol/agents/code-reviewer.md +1 -1
- package/presets/cursor/mol/agents/debugger.md +1 -1
- package/presets/cursor/mol/agents/feature-developer.md +1 -1
- package/presets/cursor/mol/agents/task-analyst.md +1 -1
- package/presets/cursor/mol/commands/README.md +4 -0
- package/presets/cursor/mol/commands/rr-scheduler-start.md +32 -0
- package/presets/cursor/mol/hooks/chain-team-phases.sh +15 -1
- package/presets/cursor/mol/rules/agent-team-intake.mdc +2 -2
- package/presets/cursor/next/AGENTS.md +2 -1
- package/presets/cursor/next/REPO_AGENTS.md +16 -0
- package/presets/cursor/next/agents/build-verifier.md +1 -1
- package/presets/cursor/next/agents/code-reviewer.md +1 -1
- package/presets/cursor/next/agents/debugger.md +1 -1
- package/presets/cursor/next/agents/feature-developer.md +1 -1
- package/presets/cursor/next/agents/task-analyst.md +1 -1
- package/presets/cursor/next/ai-local/conventions.md +6 -1
- package/presets/cursor/next/commands/README.md +4 -0
- package/presets/cursor/next/commands/rr-scheduler-start.md +32 -0
- package/presets/cursor/next/hooks/chain-team-phases.sh +15 -1
- package/presets/cursor/next/rules/agent-team-intake.mdc +2 -2
- package/presets/cursor/nuxt/agents/build-verifier.md +1 -1
- package/presets/cursor/nuxt/agents/code-reviewer.md +1 -1
- package/presets/cursor/nuxt/agents/debugger.md +1 -1
- package/presets/cursor/nuxt/agents/feature-developer.md +1 -1
- package/presets/cursor/nuxt/agents/task-analyst.md +1 -1
- package/presets/cursor/nuxt/commands/README.md +4 -0
- package/presets/cursor/nuxt/commands/rr-scheduler-start.md +32 -0
- package/presets/cursor/nuxt/hooks/chain-team-phases.sh +15 -1
- package/presets/cursor/nuxt/rules/agent-team-intake.mdc +2 -2
- package/presets/cursor/php-hexagonal/agents/build-verifier.md +1 -1
- package/presets/cursor/php-hexagonal/agents/code-reviewer.md +1 -1
- package/presets/cursor/php-hexagonal/agents/debugger.md +1 -1
- package/presets/cursor/php-hexagonal/agents/feature-developer.md +1 -1
- package/presets/cursor/php-hexagonal/agents/task-analyst.md +1 -1
- package/presets/cursor/php-hexagonal/commands/README.md +4 -0
- package/presets/cursor/php-hexagonal/commands/rr-scheduler-start.md +32 -0
- package/presets/cursor/php-hexagonal/hooks/chain-team-phases.sh +15 -1
- package/presets/cursor/php-hexagonal/rules/agent-team-intake.mdc +2 -2
- package/presets/cursor/php-laravel/agents/build-verifier.md +1 -1
- package/presets/cursor/php-laravel/agents/code-reviewer.md +1 -1
- package/presets/cursor/php-laravel/agents/debugger.md +1 -1
- package/presets/cursor/php-laravel/agents/feature-developer.md +1 -1
- package/presets/cursor/php-laravel/agents/task-analyst.md +1 -1
- package/presets/cursor/php-laravel/commands/README.md +4 -0
- package/presets/cursor/php-laravel/commands/rr-scheduler-start.md +32 -0
- package/presets/cursor/php-laravel/hooks/chain-team-phases.sh +15 -1
- package/presets/cursor/php-laravel/rules/agent-team-intake.mdc +2 -2
- package/presets/cursor/svelte/agents/build-verifier.md +1 -1
- package/presets/cursor/svelte/agents/code-reviewer.md +1 -1
- package/presets/cursor/svelte/agents/debugger.md +1 -1
- package/presets/cursor/svelte/agents/feature-developer.md +1 -1
- package/presets/cursor/svelte/agents/task-analyst.md +1 -1
- package/presets/cursor/svelte/commands/README.md +4 -0
- package/presets/cursor/svelte/commands/rr-scheduler-start.md +32 -0
- package/presets/cursor/svelte/hooks/chain-team-phases.sh +15 -1
- package/presets/cursor/svelte/rules/agent-team-intake.mdc +2 -2
- package/presets/mavis/android-kotlin/adapter-map.json +9 -1
- package/presets/mavis/android-kotlin/agents/build-verifier.md +1 -1
- package/presets/mavis/android-kotlin/agents/code-reviewer.md +1 -1
- package/presets/mavis/android-kotlin/agents/debugger.md +1 -1
- package/presets/mavis/android-kotlin/agents/feature-developer.md +1 -1
- package/presets/mavis/android-kotlin/agents/task-analyst.md +1 -1
- package/presets/mavis/android-kotlin/commands/README.md +4 -0
- package/presets/mavis/android-kotlin/commands/rr-scheduler-start.md +27 -0
- package/presets/mavis/android-kotlin/hooks/chain-team-phases.sh +15 -1
- package/presets/mavis/android-kotlin/rules/agent-team-intake.md +2 -2
- package/presets/mavis/go/adapter-map.json +9 -1
- package/presets/mavis/go/agents/build-verifier.md +1 -1
- package/presets/mavis/go/agents/code-reviewer.md +1 -1
- package/presets/mavis/go/agents/debugger.md +1 -1
- package/presets/mavis/go/agents/feature-developer.md +1 -1
- package/presets/mavis/go/agents/task-analyst.md +1 -1
- package/presets/mavis/go/commands/README.md +4 -0
- package/presets/mavis/go/commands/rr-scheduler-start.md +27 -0
- package/presets/mavis/go/hooks/chain-team-phases.sh +15 -1
- package/presets/mavis/go/rules/agent-team-intake.md +2 -2
- package/presets/mavis/ios-swift/adapter-map.json +9 -1
- package/presets/mavis/ios-swift/agents/build-verifier.md +1 -1
- package/presets/mavis/ios-swift/agents/code-reviewer.md +1 -1
- package/presets/mavis/ios-swift/agents/debugger.md +1 -1
- package/presets/mavis/ios-swift/agents/feature-developer.md +1 -1
- package/presets/mavis/ios-swift/agents/task-analyst.md +1 -1
- package/presets/mavis/ios-swift/commands/README.md +4 -0
- package/presets/mavis/ios-swift/commands/rr-scheduler-start.md +27 -0
- package/presets/mavis/ios-swift/hooks/chain-team-phases.sh +15 -1
- package/presets/mavis/ios-swift/rules/agent-team-intake.md +2 -2
- package/presets/mavis/java/adapter-map.json +9 -1
- package/presets/mavis/java/agents/build-verifier.md +1 -1
- package/presets/mavis/java/agents/code-reviewer.md +1 -1
- package/presets/mavis/java/agents/debugger.md +1 -1
- package/presets/mavis/java/agents/feature-developer.md +1 -1
- package/presets/mavis/java/agents/task-analyst.md +1 -1
- package/presets/mavis/java/commands/README.md +4 -0
- package/presets/mavis/java/commands/rr-scheduler-start.md +27 -0
- package/presets/mavis/java/hooks/chain-team-phases.sh +15 -1
- package/presets/mavis/java/rules/agent-team-intake.md +2 -2
- package/presets/mavis/mcp-ts/adapter-map.json +9 -1
- package/presets/mavis/mcp-ts/agents/build-verifier.md +1 -1
- package/presets/mavis/mcp-ts/agents/feature-developer.md +1 -1
- package/presets/mavis/mcp-ts/agents/task-analyst.md +1 -1
- package/presets/mavis/mcp-ts/commands/README.md +4 -0
- package/presets/mavis/mcp-ts/commands/rr-scheduler-start.md +27 -0
- package/presets/mavis/mcp-ts/hooks/chain-team-phases.sh +15 -1
- package/presets/mavis/mcp-ts/rules/agent-team-intake.md +2 -2
- package/presets/mavis/mol/adapter-map.json +9 -1
- package/presets/mavis/mol/agents/build-verifier.md +1 -1
- package/presets/mavis/mol/agents/code-reviewer.md +1 -1
- package/presets/mavis/mol/agents/debugger.md +1 -1
- package/presets/mavis/mol/agents/feature-developer.md +1 -1
- package/presets/mavis/mol/agents/task-analyst.md +1 -1
- package/presets/mavis/mol/commands/README.md +4 -0
- package/presets/mavis/mol/commands/rr-scheduler-start.md +27 -0
- package/presets/mavis/mol/hooks/chain-team-phases.sh +15 -1
- package/presets/mavis/mol/rules/agent-team-intake.md +2 -2
- package/presets/mavis/next/MAVIS.md +2 -1
- package/presets/mavis/next/REPO_AGENTS.md +16 -0
- package/presets/mavis/next/adapter-map.json +9 -1
- package/presets/mavis/next/agents/accessibility-reviewer.md +4 -1
- package/presets/mavis/next/agents/api-contract-reviewer.md +5 -2
- package/presets/mavis/next/agents/build-verifier.md +6 -3
- package/presets/mavis/next/agents/ci-investigator.md +1 -1
- package/presets/mavis/next/agents/code-reviewer.md +7 -4
- package/presets/mavis/next/agents/codebase-analyzer.md +4 -1
- package/presets/mavis/next/agents/debugger.md +2 -2
- package/presets/mavis/next/agents/feature-developer.md +2 -2
- package/presets/mavis/next/agents/migration-specialist.md +4 -1
- package/presets/mavis/next/agents/mockup-reviewer.md +4 -1
- package/presets/mavis/next/agents/openspec-author.md +4 -1
- package/presets/mavis/next/agents/performance-auditor.md +4 -1
- package/presets/mavis/next/agents/playwright-test-generator.md +5 -2
- package/presets/mavis/next/agents/playwright-test-healer.md +5 -2
- package/presets/mavis/next/agents/playwright-test-planner.md +5 -2
- package/presets/mavis/next/agents/qa-tester.md +5 -2
- package/presets/mavis/next/agents/security-reviewer.md +4 -1
- package/presets/mavis/next/agents/solution-architect.md +4 -1
- package/presets/mavis/next/agents/task-analyst.md +5 -2
- package/presets/mavis/next/agents/task-router.md +4 -1
- package/presets/mavis/next/agents/tech-writer.md +4 -1
- package/presets/mavis/next/agents/unit-test-generator.md +5 -2
- package/presets/mavis/next/agents/unit-test-healer.md +5 -2
- package/presets/mavis/next/agents/unit-test-planner.md +5 -2
- package/presets/mavis/next/ai-local/conventions.md +6 -1
- package/presets/mavis/next/commands/README.md +4 -0
- package/presets/mavis/next/commands/rr-scheduler-start.md +27 -0
- package/presets/mavis/next/hooks/chain-team-phases.sh +15 -1
- package/presets/mavis/next/rules/agent-team-intake.md +2 -2
- package/presets/mavis/nuxt/adapter-map.json +9 -1
- package/presets/mavis/nuxt/agents/build-verifier.md +1 -1
- package/presets/mavis/nuxt/agents/code-reviewer.md +1 -1
- package/presets/mavis/nuxt/agents/debugger.md +1 -1
- package/presets/mavis/nuxt/agents/feature-developer.md +1 -1
- package/presets/mavis/nuxt/agents/task-analyst.md +1 -1
- package/presets/mavis/nuxt/commands/README.md +4 -0
- package/presets/mavis/nuxt/commands/rr-scheduler-start.md +27 -0
- package/presets/mavis/nuxt/hooks/chain-team-phases.sh +15 -1
- package/presets/mavis/nuxt/rules/agent-team-intake.md +2 -2
- package/presets/mavis/php-hexagonal/adapter-map.json +9 -1
- package/presets/mavis/php-hexagonal/agents/build-verifier.md +1 -1
- package/presets/mavis/php-hexagonal/agents/code-reviewer.md +1 -1
- package/presets/mavis/php-hexagonal/agents/debugger.md +1 -1
- package/presets/mavis/php-hexagonal/agents/feature-developer.md +1 -1
- package/presets/mavis/php-hexagonal/agents/task-analyst.md +1 -1
- package/presets/mavis/php-hexagonal/commands/README.md +4 -0
- package/presets/mavis/php-hexagonal/commands/rr-scheduler-start.md +27 -0
- package/presets/mavis/php-hexagonal/hooks/chain-team-phases.sh +15 -1
- package/presets/mavis/php-hexagonal/rules/agent-team-intake.md +2 -2
- package/presets/mavis/php-laravel/adapter-map.json +9 -1
- package/presets/mavis/php-laravel/agents/build-verifier.md +1 -1
- package/presets/mavis/php-laravel/agents/code-reviewer.md +1 -1
- package/presets/mavis/php-laravel/agents/debugger.md +1 -1
- package/presets/mavis/php-laravel/agents/feature-developer.md +1 -1
- package/presets/mavis/php-laravel/agents/task-analyst.md +1 -1
- package/presets/mavis/php-laravel/commands/README.md +4 -0
- package/presets/mavis/php-laravel/commands/rr-scheduler-start.md +27 -0
- package/presets/mavis/php-laravel/hooks/chain-team-phases.sh +15 -1
- package/presets/mavis/php-laravel/rules/agent-team-intake.md +2 -2
- package/presets/mavis/svelte/adapter-map.json +9 -1
- package/presets/mavis/svelte/agents/build-verifier.md +1 -1
- package/presets/mavis/svelte/agents/code-reviewer.md +1 -1
- package/presets/mavis/svelte/agents/debugger.md +1 -1
- package/presets/mavis/svelte/agents/feature-developer.md +1 -1
- package/presets/mavis/svelte/agents/task-analyst.md +1 -1
- package/presets/mavis/svelte/commands/README.md +4 -0
- package/presets/mavis/svelte/commands/rr-scheduler-start.md +27 -0
- package/presets/mavis/svelte/hooks/chain-team-phases.sh +15 -1
- package/presets/mavis/svelte/rules/agent-team-intake.md +2 -2
- package/presets/opencode/android-kotlin/adapter-map.json +9 -1
- package/presets/opencode/android-kotlin/agents/build-verifier.md +1 -1
- package/presets/opencode/android-kotlin/agents/code-reviewer.md +1 -1
- package/presets/opencode/android-kotlin/agents/debugger.md +1 -1
- package/presets/opencode/android-kotlin/agents/feature-developer.md +1 -1
- package/presets/opencode/android-kotlin/agents/task-analyst.md +1 -1
- package/presets/opencode/android-kotlin/commands/README.md +4 -0
- package/presets/opencode/android-kotlin/commands/rr-scheduler-start.md +35 -0
- package/presets/opencode/android-kotlin/hooks/chain-team-phases.sh +15 -1
- package/presets/opencode/android-kotlin/rules/agent-team-intake.md +2 -2
- package/presets/opencode/go/adapter-map.json +9 -1
- package/presets/opencode/go/agents/build-verifier.md +1 -1
- package/presets/opencode/go/agents/code-reviewer.md +1 -1
- package/presets/opencode/go/agents/debugger.md +1 -1
- package/presets/opencode/go/agents/feature-developer.md +1 -1
- package/presets/opencode/go/agents/task-analyst.md +1 -1
- package/presets/opencode/go/commands/README.md +4 -0
- package/presets/opencode/go/commands/rr-scheduler-start.md +35 -0
- package/presets/opencode/go/hooks/chain-team-phases.sh +15 -1
- package/presets/opencode/go/rules/agent-team-intake.md +2 -2
- package/presets/opencode/ios-swift/adapter-map.json +9 -1
- package/presets/opencode/ios-swift/agents/build-verifier.md +1 -1
- package/presets/opencode/ios-swift/agents/code-reviewer.md +1 -1
- package/presets/opencode/ios-swift/agents/debugger.md +1 -1
- package/presets/opencode/ios-swift/agents/feature-developer.md +1 -1
- package/presets/opencode/ios-swift/agents/task-analyst.md +1 -1
- package/presets/opencode/ios-swift/commands/README.md +4 -0
- package/presets/opencode/ios-swift/commands/rr-scheduler-start.md +35 -0
- package/presets/opencode/ios-swift/hooks/chain-team-phases.sh +15 -1
- package/presets/opencode/ios-swift/rules/agent-team-intake.md +2 -2
- package/presets/opencode/java/adapter-map.json +9 -1
- package/presets/opencode/java/agents/build-verifier.md +1 -1
- package/presets/opencode/java/agents/code-reviewer.md +1 -1
- package/presets/opencode/java/agents/debugger.md +1 -1
- package/presets/opencode/java/agents/feature-developer.md +1 -1
- package/presets/opencode/java/agents/task-analyst.md +1 -1
- package/presets/opencode/java/commands/README.md +4 -0
- package/presets/opencode/java/commands/rr-scheduler-start.md +35 -0
- package/presets/opencode/java/hooks/chain-team-phases.sh +15 -1
- package/presets/opencode/java/rules/agent-team-intake.md +2 -2
- package/presets/opencode/mcp-ts/adapter-map.json +9 -1
- package/presets/opencode/mcp-ts/agents/build-verifier.md +1 -1
- package/presets/opencode/mcp-ts/agents/feature-developer.md +1 -1
- package/presets/opencode/mcp-ts/agents/task-analyst.md +1 -1
- package/presets/opencode/mcp-ts/commands/README.md +4 -0
- package/presets/opencode/mcp-ts/commands/rr-scheduler-start.md +35 -0
- package/presets/opencode/mcp-ts/hooks/chain-team-phases.sh +15 -1
- package/presets/opencode/mcp-ts/rules/agent-team-intake.md +2 -2
- package/presets/opencode/mol/adapter-map.json +9 -1
- package/presets/opencode/mol/agents/build-verifier.md +1 -1
- package/presets/opencode/mol/agents/code-reviewer.md +1 -1
- package/presets/opencode/mol/agents/debugger.md +1 -1
- package/presets/opencode/mol/agents/feature-developer.md +1 -1
- package/presets/opencode/mol/agents/task-analyst.md +1 -1
- package/presets/opencode/mol/commands/README.md +4 -0
- package/presets/opencode/mol/commands/rr-scheduler-start.md +35 -0
- package/presets/opencode/mol/hooks/chain-team-phases.sh +15 -1
- package/presets/opencode/mol/rules/agent-team-intake.md +2 -2
- package/presets/opencode/next/OPENCODE.md +2 -1
- package/presets/opencode/next/REPO_AGENTS.md +16 -0
- package/presets/opencode/next/adapter-map.json +9 -1
- package/presets/opencode/next/agents/accessibility-reviewer.md +4 -1
- package/presets/opencode/next/agents/api-contract-reviewer.md +5 -2
- package/presets/opencode/next/agents/build-verifier.md +6 -3
- package/presets/opencode/next/agents/ci-investigator.md +1 -1
- package/presets/opencode/next/agents/code-reviewer.md +7 -4
- package/presets/opencode/next/agents/codebase-analyzer.md +4 -1
- package/presets/opencode/next/agents/debugger.md +2 -2
- package/presets/opencode/next/agents/feature-developer.md +2 -2
- package/presets/opencode/next/agents/migration-specialist.md +4 -1
- package/presets/opencode/next/agents/mockup-reviewer.md +4 -1
- package/presets/opencode/next/agents/openspec-author.md +4 -1
- package/presets/opencode/next/agents/performance-auditor.md +4 -1
- package/presets/opencode/next/agents/playwright-test-generator.md +5 -2
- package/presets/opencode/next/agents/playwright-test-healer.md +5 -2
- package/presets/opencode/next/agents/playwright-test-planner.md +5 -2
- package/presets/opencode/next/agents/qa-tester.md +5 -2
- package/presets/opencode/next/agents/security-reviewer.md +4 -1
- package/presets/opencode/next/agents/solution-architect.md +4 -1
- package/presets/opencode/next/agents/task-analyst.md +5 -2
- package/presets/opencode/next/agents/task-router.md +4 -1
- package/presets/opencode/next/agents/tech-writer.md +4 -1
- package/presets/opencode/next/agents/unit-test-generator.md +5 -2
- package/presets/opencode/next/agents/unit-test-healer.md +5 -2
- package/presets/opencode/next/agents/unit-test-planner.md +5 -2
- package/presets/opencode/next/ai-local/conventions.md +6 -1
- package/presets/opencode/next/commands/README.md +4 -0
- package/presets/opencode/next/commands/rr-scheduler-start.md +35 -0
- package/presets/opencode/next/hooks/chain-team-phases.sh +15 -1
- package/presets/opencode/next/rules/agent-team-intake.md +2 -2
- package/presets/opencode/nuxt/adapter-map.json +9 -1
- package/presets/opencode/nuxt/agents/build-verifier.md +1 -1
- package/presets/opencode/nuxt/agents/code-reviewer.md +1 -1
- package/presets/opencode/nuxt/agents/debugger.md +1 -1
- package/presets/opencode/nuxt/agents/feature-developer.md +1 -1
- package/presets/opencode/nuxt/agents/task-analyst.md +1 -1
- package/presets/opencode/nuxt/commands/README.md +4 -0
- package/presets/opencode/nuxt/commands/rr-scheduler-start.md +35 -0
- package/presets/opencode/nuxt/hooks/chain-team-phases.sh +15 -1
- package/presets/opencode/nuxt/rules/agent-team-intake.md +2 -2
- package/presets/opencode/php-hexagonal/adapter-map.json +9 -1
- package/presets/opencode/php-hexagonal/agents/build-verifier.md +1 -1
- package/presets/opencode/php-hexagonal/agents/code-reviewer.md +1 -1
- package/presets/opencode/php-hexagonal/agents/debugger.md +1 -1
- package/presets/opencode/php-hexagonal/agents/feature-developer.md +1 -1
- package/presets/opencode/php-hexagonal/agents/task-analyst.md +1 -1
- package/presets/opencode/php-hexagonal/commands/README.md +4 -0
- package/presets/opencode/php-hexagonal/commands/rr-scheduler-start.md +35 -0
- package/presets/opencode/php-hexagonal/hooks/chain-team-phases.sh +15 -1
- package/presets/opencode/php-hexagonal/rules/agent-team-intake.md +2 -2
- package/presets/opencode/php-laravel/adapter-map.json +9 -1
- package/presets/opencode/php-laravel/agents/build-verifier.md +1 -1
- package/presets/opencode/php-laravel/agents/code-reviewer.md +1 -1
- package/presets/opencode/php-laravel/agents/debugger.md +1 -1
- package/presets/opencode/php-laravel/agents/feature-developer.md +1 -1
- package/presets/opencode/php-laravel/agents/task-analyst.md +1 -1
- package/presets/opencode/php-laravel/commands/README.md +4 -0
- package/presets/opencode/php-laravel/commands/rr-scheduler-start.md +35 -0
- package/presets/opencode/php-laravel/hooks/chain-team-phases.sh +15 -1
- package/presets/opencode/php-laravel/rules/agent-team-intake.md +2 -2
- package/presets/opencode/plugins/output-guard/README.md +56 -9
- package/presets/opencode/plugins/output-guard/actions.ts +201 -0
- package/presets/opencode/plugins/output-guard/index.ts +147 -6
- package/presets/opencode/plugins/output-guard/rewrite.ts +15 -9
- package/presets/opencode/svelte/adapter-map.json +9 -1
- package/presets/opencode/svelte/agents/build-verifier.md +1 -1
- package/presets/opencode/svelte/agents/code-reviewer.md +1 -1
- package/presets/opencode/svelte/agents/debugger.md +1 -1
- package/presets/opencode/svelte/agents/feature-developer.md +1 -1
- package/presets/opencode/svelte/agents/task-analyst.md +1 -1
- package/presets/opencode/svelte/commands/README.md +4 -0
- package/presets/opencode/svelte/commands/rr-scheduler-start.md +35 -0
- package/presets/opencode/svelte/hooks/chain-team-phases.sh +15 -1
- package/presets/opencode/svelte/rules/agent-team-intake.md +2 -2
- package/presets/zcode/android-kotlin/adapter-map.json +9 -1
- package/presets/zcode/android-kotlin/agents/build-verifier.md +1 -1
- package/presets/zcode/android-kotlin/agents/code-reviewer.md +1 -1
- package/presets/zcode/android-kotlin/agents/debugger.md +1 -1
- package/presets/zcode/android-kotlin/agents/feature-developer.md +1 -1
- package/presets/zcode/android-kotlin/agents/task-analyst.md +1 -1
- package/presets/zcode/android-kotlin/commands/README.md +4 -0
- package/presets/zcode/android-kotlin/commands/rr-scheduler-start.md +35 -0
- package/presets/zcode/android-kotlin/hooks/chain-team-phases.sh +15 -1
- package/presets/zcode/android-kotlin/rules/agent-team-intake.md +2 -2
- package/presets/zcode/go/adapter-map.json +9 -1
- package/presets/zcode/go/agents/build-verifier.md +1 -1
- package/presets/zcode/go/agents/code-reviewer.md +1 -1
- package/presets/zcode/go/agents/debugger.md +1 -1
- package/presets/zcode/go/agents/feature-developer.md +1 -1
- package/presets/zcode/go/agents/task-analyst.md +1 -1
- package/presets/zcode/go/commands/README.md +4 -0
- package/presets/zcode/go/commands/rr-scheduler-start.md +35 -0
- package/presets/zcode/go/hooks/chain-team-phases.sh +15 -1
- package/presets/zcode/go/rules/agent-team-intake.md +2 -2
- package/presets/zcode/ios-swift/adapter-map.json +9 -1
- package/presets/zcode/ios-swift/agents/build-verifier.md +1 -1
- package/presets/zcode/ios-swift/agents/code-reviewer.md +1 -1
- package/presets/zcode/ios-swift/agents/debugger.md +1 -1
- package/presets/zcode/ios-swift/agents/feature-developer.md +1 -1
- package/presets/zcode/ios-swift/agents/task-analyst.md +1 -1
- package/presets/zcode/ios-swift/commands/README.md +4 -0
- package/presets/zcode/ios-swift/commands/rr-scheduler-start.md +35 -0
- package/presets/zcode/ios-swift/hooks/chain-team-phases.sh +15 -1
- package/presets/zcode/ios-swift/rules/agent-team-intake.md +2 -2
- package/presets/zcode/java/adapter-map.json +9 -1
- package/presets/zcode/java/agents/build-verifier.md +1 -1
- package/presets/zcode/java/agents/code-reviewer.md +1 -1
- package/presets/zcode/java/agents/debugger.md +1 -1
- package/presets/zcode/java/agents/feature-developer.md +1 -1
- package/presets/zcode/java/agents/task-analyst.md +1 -1
- package/presets/zcode/java/commands/README.md +4 -0
- package/presets/zcode/java/commands/rr-scheduler-start.md +35 -0
- package/presets/zcode/java/hooks/chain-team-phases.sh +15 -1
- package/presets/zcode/java/rules/agent-team-intake.md +2 -2
- package/presets/zcode/mcp-ts/adapter-map.json +9 -1
- package/presets/zcode/mcp-ts/agents/build-verifier.md +1 -1
- package/presets/zcode/mcp-ts/agents/feature-developer.md +1 -1
- package/presets/zcode/mcp-ts/agents/task-analyst.md +1 -1
- package/presets/zcode/mcp-ts/commands/README.md +4 -0
- package/presets/zcode/mcp-ts/commands/rr-scheduler-start.md +35 -0
- package/presets/zcode/mcp-ts/hooks/chain-team-phases.sh +15 -1
- package/presets/zcode/mcp-ts/rules/agent-team-intake.md +2 -2
- package/presets/zcode/mol/adapter-map.json +9 -1
- package/presets/zcode/mol/agents/build-verifier.md +1 -1
- package/presets/zcode/mol/agents/code-reviewer.md +1 -1
- package/presets/zcode/mol/agents/debugger.md +1 -1
- package/presets/zcode/mol/agents/feature-developer.md +1 -1
- package/presets/zcode/mol/agents/task-analyst.md +1 -1
- package/presets/zcode/mol/commands/README.md +4 -0
- package/presets/zcode/mol/commands/rr-scheduler-start.md +35 -0
- package/presets/zcode/mol/hooks/chain-team-phases.sh +15 -1
- package/presets/zcode/mol/rules/agent-team-intake.md +2 -2
- package/presets/zcode/next/REPO_AGENTS.md +16 -0
- package/presets/zcode/next/adapter-map.json +9 -1
- package/presets/zcode/next/agents/accessibility-reviewer.md +4 -1
- package/presets/zcode/next/agents/api-contract-reviewer.md +5 -2
- package/presets/zcode/next/agents/build-verifier.md +6 -3
- package/presets/zcode/next/agents/ci-investigator.md +1 -1
- package/presets/zcode/next/agents/code-reviewer.md +7 -4
- package/presets/zcode/next/agents/codebase-analyzer.md +4 -1
- package/presets/zcode/next/agents/debugger.md +2 -2
- package/presets/zcode/next/agents/feature-developer.md +2 -2
- package/presets/zcode/next/agents/migration-specialist.md +4 -1
- package/presets/zcode/next/agents/mockup-reviewer.md +4 -1
- package/presets/zcode/next/agents/openspec-author.md +4 -1
- package/presets/zcode/next/agents/performance-auditor.md +4 -1
- package/presets/zcode/next/agents/playwright-test-generator.md +5 -2
- package/presets/zcode/next/agents/playwright-test-healer.md +5 -2
- package/presets/zcode/next/agents/playwright-test-planner.md +5 -2
- package/presets/zcode/next/agents/qa-tester.md +5 -2
- package/presets/zcode/next/agents/security-reviewer.md +4 -1
- package/presets/zcode/next/agents/solution-architect.md +4 -1
- package/presets/zcode/next/agents/task-analyst.md +5 -2
- package/presets/zcode/next/agents/task-router.md +4 -1
- package/presets/zcode/next/agents/tech-writer.md +4 -1
- package/presets/zcode/next/agents/unit-test-generator.md +5 -2
- package/presets/zcode/next/agents/unit-test-healer.md +5 -2
- package/presets/zcode/next/agents/unit-test-planner.md +5 -2
- package/presets/zcode/next/ai-local/conventions.md +6 -1
- package/presets/zcode/next/commands/README.md +4 -0
- package/presets/zcode/next/commands/rr-scheduler-start.md +35 -0
- package/presets/zcode/next/hooks/chain-team-phases.sh +15 -1
- package/presets/zcode/next/rules/agent-team-intake.md +2 -2
- package/presets/zcode/nuxt/adapter-map.json +9 -1
- package/presets/zcode/nuxt/agents/build-verifier.md +1 -1
- package/presets/zcode/nuxt/agents/code-reviewer.md +1 -1
- package/presets/zcode/nuxt/agents/debugger.md +1 -1
- package/presets/zcode/nuxt/agents/feature-developer.md +1 -1
- package/presets/zcode/nuxt/agents/task-analyst.md +1 -1
- package/presets/zcode/nuxt/commands/README.md +4 -0
- package/presets/zcode/nuxt/commands/rr-scheduler-start.md +35 -0
- package/presets/zcode/nuxt/hooks/chain-team-phases.sh +15 -1
- package/presets/zcode/nuxt/rules/agent-team-intake.md +2 -2
- package/presets/zcode/php-hexagonal/adapter-map.json +9 -1
- package/presets/zcode/php-hexagonal/agents/build-verifier.md +1 -1
- package/presets/zcode/php-hexagonal/agents/code-reviewer.md +1 -1
- package/presets/zcode/php-hexagonal/agents/debugger.md +1 -1
- package/presets/zcode/php-hexagonal/agents/feature-developer.md +1 -1
- package/presets/zcode/php-hexagonal/agents/task-analyst.md +1 -1
- package/presets/zcode/php-hexagonal/commands/README.md +4 -0
- package/presets/zcode/php-hexagonal/commands/rr-scheduler-start.md +35 -0
- package/presets/zcode/php-hexagonal/hooks/chain-team-phases.sh +15 -1
- package/presets/zcode/php-hexagonal/rules/agent-team-intake.md +2 -2
- package/presets/zcode/php-laravel/adapter-map.json +9 -1
- package/presets/zcode/php-laravel/agents/build-verifier.md +1 -1
- package/presets/zcode/php-laravel/agents/code-reviewer.md +1 -1
- package/presets/zcode/php-laravel/agents/debugger.md +1 -1
- package/presets/zcode/php-laravel/agents/feature-developer.md +1 -1
- package/presets/zcode/php-laravel/agents/task-analyst.md +1 -1
- package/presets/zcode/php-laravel/commands/README.md +4 -0
- package/presets/zcode/php-laravel/commands/rr-scheduler-start.md +35 -0
- package/presets/zcode/php-laravel/hooks/chain-team-phases.sh +15 -1
- package/presets/zcode/php-laravel/rules/agent-team-intake.md +2 -2
- package/presets/zcode/svelte/adapter-map.json +9 -1
- package/presets/zcode/svelte/agents/build-verifier.md +1 -1
- package/presets/zcode/svelte/agents/code-reviewer.md +1 -1
- package/presets/zcode/svelte/agents/debugger.md +1 -1
- package/presets/zcode/svelte/agents/feature-developer.md +1 -1
- package/presets/zcode/svelte/agents/task-analyst.md +1 -1
- package/presets/zcode/svelte/commands/README.md +4 -0
- package/presets/zcode/svelte/commands/rr-scheduler-start.md +35 -0
- package/presets/zcode/svelte/hooks/chain-team-phases.sh +15 -1
- package/presets/zcode/svelte/rules/agent-team-intake.md +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,48 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.2.74
|
|
4
|
+
|
|
5
|
+
### `team` — per-task agent action telemetry
|
|
6
|
+
|
|
7
|
+
- **Attribution.** A session lease carries `firstSeenAt` and a refreshed `updatedAt`, and the projector maps a row through a four-rung ladder — `lease`, `window`, `dir-mtime`, `unmapped` — clipping a lease at the next one of the same session (`LEASE_TTL_MS`, `DIR_WINDOW_MS`, both 30 minutes and both constants, not schema facts). Before this change the window was a single instant, so no row could map.
|
|
8
|
+
- **Intent.** `tool_calls.intent` is a seven-value taxonomy (`explore | mutate | execute | delegate | ask | meta | web`) computed by `intentOf`, a sibling of the untouched `category` classifier: `edit`/`write` are `mutate`, `subagent` `delegate`, `question` `ask`, `skill` `meta`, `execute` `execute`, and an unknown tool falls to `meta` with its name kept in `tool`.
|
|
9
|
+
- **Capture.** `results.jsonl` rows gain `parentSessionID`, `agent`, `model`, `variant`, `intent`, `targetKey`, `durationMs`, `gapMs`, `exit`, `errorClass`, `lines`, `truncated`, `repeatOf`, `repeatIndex`; `usage.jsonl` rows gain `reasoningParts`, `reasoningChars`, `reasoningMs`, `textChars`, `toolCalls`, `compactions`. `targetKey` is a sha256 of the normalised repo-relative target, `errorClass` an enum; no command, path or output text is appended, and a timing the host does not report stays `null`. `AI_RULES_ACTIONS=0` drops both appends and leaves the guard rewrite and `AI_RULES_OUTPUT_GUARD` alone.
|
|
10
|
+
- **Schema 6.** Migration `0006-action-telemetry` adds the sixteen columns, one index and the two views. It is additive and sha256-pinned: a v5 file migrates in place, a v6 file is refused by a v5 binary with `E_SCHEMA_NEWER`, and rollback is delete + `sync`.
|
|
11
|
+
- **Rollup and signals.** `task_action_summary` and `action_signals` are views, not tables. The ratios, the thresholds and the one-line rules live in `action-signals.mjs`, so recalibrating a signal needs no migration and no backfill; the calibration cases (155 turns with no mutated file, and one clean task) are pinned in `test-team-db-efficiency.mjs`.
|
|
12
|
+
- **Report.** `actions-report.mjs --slug <slug> [--since <instant>] [--json]` prints the rollup, the fired signals and the per-rung coverage, and exits 0 whenever a report is produced. `--since` is recorded on the report and does not filter it: the rollup is a per-task view and a view takes no bound parameter. `--json` pairs every figure with its evidence (`reported` / `data` / `reproduced`).
|
|
13
|
+
- **API.** `GET /api/v1/efficiency/actions` and `/signals` join the efficiency plane with the shipped window, filter, paging and error vocabulary; `/signals` pages its fired array and orders the whole array worst severity first, then by signal name, then by task. The `attribution` block gains `byRung` and `coverage` additively. 48 operations, 40 paths, 78 schemas.
|
|
14
|
+
- **UI.** One `actions` section on `apps/team-tasks-ui`'s task detail page: the per-intent rollup, the attribution chip, the muted-ratio floors and the flagged signals with their rule. No second surface and no UI e2e (`no-ui-e2e`).
|
|
15
|
+
|
|
16
|
+
### `team` — launch queue shows the current task
|
|
17
|
+
|
|
18
|
+
- **Derived row.** `GET /api/v1/tracker/queue` includes a task in a holding state (`in_progress`, `awaiting_artifact_receipt`, `blocked`) even when it has no tracker link and no queue file. The row has `entryId: null`, `itemId: null` (or the linked item when a link exists), `status: active`, and reason `current task`. It is not a queue file and cannot be cancelled. A non-terminal queue entry for the same slug is shown instead, so the task is not listed twice. A task at a human gate stays out of the queue.
|
|
19
|
+
|
|
20
|
+
## 0.2.73
|
|
21
|
+
|
|
22
|
+
### `team` — planned tracker drain
|
|
23
|
+
|
|
24
|
+
- **Job.** `presets/cursor/next/team/upstream/jobs.json` adds `tracker-planned-drain` beside `upstream-research`: `interval`, `everySeconds` 300, `Europe/Moscow`, `concurrency: skip`, `misfire: run-once`, `timeoutMs` 14400000, argv `node ../scripts/tracker-planned-drain.mjs --team-root .`. In this repository `init`/`update` still copy that file only when `scheduler/jobs.json` is absent. The template sits under `team/upstream/`, which the published tarball excludes, so a consumer install gets no `scheduler/jobs.json`.
|
|
25
|
+
- **Published child.** `tracker-planned-drain.mjs` joins `ENGINE_SCRIPTS` (it is not in `REPO_ONLY_ENGINE_SCRIPTS`) and is mirrored into `.ai.local/scripts/`. A packed consumer seeds the module; `upstream-research.mjs` stays repository-only.
|
|
26
|
+
- **One tick.** The child uses the existing launch queue. A full tracker slot exits idle and enqueues nothing. Otherwise it enqueues the head ready stored-`planned` item that has no open queue entry and no `tracker-<id>` or `<id>` task row, claims one entry, bootstraps the task folder the way the chain-hook stop seam does (`prompt.md` plus `pipeline.json` with empty `steps`; an existing pipeline is left as-is), and runs exactly one `task-run start`. It then polls until the linked team task and the tracker item are both terminal, so `concurrency: skip` holds the next tick. The child never writes `status.json` or `metrics.json`.
|
|
27
|
+
- **Stored status.** `completed` stores the item `completed`. `changes_requested` and `validation_failed` store `cancelled` with `cancelReason` `task <state>`. `blocked` stays stored-`planned`, and the next tick does not enqueue. `backlog`, a terminal stored status, and an item that already has a task row are not selected. An empty tracker is idle (`no planned head`).
|
|
28
|
+
- **Kill switch.** `AI_RULES_TEAM_DB_DISABLE=1` returns idle `disabled` and writes nothing.
|
|
29
|
+
- **Tests.** `test-team-db-tracker-queue.mjs` covers the tick. `test-cli-init-clean.mjs` asserts a fresh repository `next` install seeds both jobs and `jobs get` accepts the drain. `test-pack-repo-only.mjs` asserts the consumer seed includes `tracker-planned-drain.mjs` and still omits the job file and `upstream-research.mjs`.
|
|
30
|
+
|
|
31
|
+
### `preset` — `/rr-scheduler-start`
|
|
32
|
+
|
|
33
|
+
- **Command.** Every stack ships `commands/rr-scheduler-start.md` (Cursor SoT, Claude twin, generated Mavis / OpenCode / ZCode). It runs `node .ai.local/scripts/rr-scheduler-start.mjs` and quotes that process's stdout. A non-zero exit stops the agent; it does not start `team-db.mjs schedule` by hand.
|
|
34
|
+
- **Init.** `rr-scheduler-start.mjs` joins `ENGINE_SCRIPTS` and is seeded into `.ai.local/scripts/` beside `processes.mjs` and `team-db.mjs`. A fresh install can run the command with no extra copy step. An absent `scheduler/jobs.json` is still an empty job list: the timer starts, and the repository-only upstream templates stay out of the published tarball.
|
|
35
|
+
- **Restart.** The start command is `exec node .ai.local/scripts/team-db.mjs schedule`, so the lease pid is the node process. `processes.mjs` now drops a leading `exec` when it proves that pid, the same way it drops shell quotes. Without that, `stop` refused the lease (`the live pid matches neither the recorded command nor the lease port`) and `/rr-scheduler-start` could not restart.
|
|
36
|
+
|
|
37
|
+
### `preset` — research gate, rebuild lock, lean subagent blocks
|
|
38
|
+
|
|
39
|
+
- **Research gate (R1–R3).** The root entry every platform installs gains one section after § Presence-based load. A request that only asks to analyze, investigate, measure, or estimate (no make / fix / add verb) **MUST** go to `codebase-analyzer` or a `spike` pipeline; the boundary is the read count — one read stays a pure question with no file. A session approaching ~50 turns **MUST** checkpoint (`focus.md` + `artifact-manifest.json` + `.memlog.md`) and hand off to a fresh session; a research fact **MUST** reach `analysis.md` with its `path:line` before the same file is read a second time. The Cursor map carries the matching MUST line under § When to use `/task`, and `agent-team-intake` points at the same boundary instead of contradicting it. No new always-on rule file, so the always-on count stays 3–10.
|
|
40
|
+
- **Output guard (R4).** The 8–20 KB band's whole-line gap hint is `grep -n '<term>' <file>`, with the term taken from the **elided** slice. When that slice holds no usable token the hint is omitted and only the `elided lines A..B` marker remains — a fabricated `grep -n 'error'` matches nothing. No `sed -n` range survives in `rewrite.ts` or its README, and one output carries one command instead of the `search:` line duplicating `read more:`.
|
|
41
|
+
- **Rebuild lock (R5).** `team-db.mjs init|sync|migrate-tasks --rebuild` takes `.ai.local/team/.rebuild.lock`, outer to the tracker lock and to SQLite's `busy_timeout`, and releases it on every error path. A second rebuild fails fast with `E_REBUILD_BUSY` (exit 4) instead of moving `team.db` aside again. Documented in `docs/TEAM-DB.md`.
|
|
42
|
+
- **Subagent read set (R6).** `getRequiredRulesForAgent` splits by Next role, not only the implementer: every Next agent's «Rules to load» required list is 5–7 paths (was 8–15) and the rest is conditional; `check-claude-agent-blocks.mjs` asserts the band. `zoneRulesByRole` keeps the full list, so the anti-hallucination floor gate still sees it.
|
|
43
|
+
- **Installed behaviour.** Generated platform trees, the dogfood `.cursor` / `.claude` / `.mavis` / `.opencode` / `.zcode` trees plus root `AGENTS.md`, `.ai.local/scripts/**`, and the CLI goldens are regenerated. `test-output-guard.mjs` asserts the grep hint and both team-db suites cover the rebuild lock, including a release-on-failure case and `init` / `sync --rebuild` contention.
|
|
44
|
+
- **Aside-file ignore lines.** The seeded `.ai.local/.gitignore` gains `team.db.corrupt-*` and `team.db.mismatch-*`: a `sync --rebuild` moves `team.db` with both companions aside under those names, so an untouched pattern let a ~140 MB database copy reach the index. `update` appends both lines to an existing ignore file, `test-cli-init-clean.mjs` asserts them, and `docs/TEAM-DB.md` lists them.
|
|
45
|
+
|
|
3
46
|
## 0.2.72
|
|
4
47
|
|
|
5
48
|
### `team` — usage ledger, verification evidence, incident registry
|
package/README.md
CHANGED
|
@@ -25,7 +25,7 @@ Run `init` from the **app root** (`--cwd` if needed). Default `--preset` is `nex
|
|
|
25
25
|
| Root agents | `REPO_AGENTS.md` → `AGENTS.md` (same file on all five; ZCode loads it natively) | | | | |
|
|
26
26
|
| `/task` artifacts | **`.ai.local/team/`** (shared; templates refreshed; `tasks/<slug>/` never overwritten) | | | |
|
|
27
27
|
| Template drift | **`.ai.local/.template-base.json`** (shared; one record per tree of files that hold a shipped template byte; `update` prints one drift line, `update --merge-ai-local` fast-forwards a file only when its recorded base still matches and reports the rest) | | | |
|
|
28
|
-
| Self-learning engine | **`.ai.local/scripts/`** (shared; twenty-
|
|
28
|
+
| Self-learning engine | **`.ai.local/scripts/`** (shared; twenty-seven published scripts — the six self-learning engine modules, `manifest.mjs`, `dump-output.mjs`, the eight `team-db*.mjs` modules, `action-signals.mjs`, `actions-report.mjs`, `check-write-scope.mjs`, `aggregate-agent-task-metrics.mjs`, `record-usage.mjs`, `verification.mjs`, `incidents.mjs`, `processes.mjs`, `process-lease.mjs`, `rr-scheduler-start.mjs`, and `tracker-planned-drain.mjs`; existing files never overwritten. The repository-only `upstream-research.mjs` is not published) | | | |
|
|
29
29
|
| Specs seed | `docs/specs/` copied only if the directory is **absent** | | | |
|
|
30
30
|
|
|
31
31
|
OpenCode also ships **`.opencode/plugins/task-status/`**, a TUI sidebar for the active `/task` run (slug, state, elapsed time, step, remaining-time estimate, soft-stop). OpenCode auto-loads it; it needs no `opencode.json` entry, is refreshed by `update`, and is a viewer only — the chain hook stays manual.
|
|
@@ -61,8 +61,8 @@ node .ai.local/scripts/run.mjs --dry-run # read-only preview: decision, target,
|
|
|
61
61
|
`init` seeds the engine with **skip-if-exists** — a modified `run.mjs` stays yours and is reported as kept; there is no
|
|
62
62
|
`--force`. The seeded tree is byte-identical to `presets/_shared/ai-local/scripts/`, and `.ai.local/.gitignore` (created
|
|
63
63
|
when absent, missing required lines appended to an existing file) ignores `*.lock`, `*.tmp`, `.rollback/`, `STOP`,
|
|
64
|
-
`ESTOP`, `team.db`, `team.db-wal`, `team.db-shm`, `team-db-errors.log`, `team
|
|
65
|
-
`team/scheduler/state.json`; the root `.gitignore` is never edited.
|
|
64
|
+
`ESTOP`, `team.db`, `team.db-wal`, `team.db-shm`, `team-db-errors.log`, `team.db.corrupt-*`,
|
|
65
|
+
`team.db.mismatch-*`, `team/scheduler/runs/`, and `team/scheduler/state.json`; the root `.gitignore` is never edited.
|
|
66
66
|
|
|
67
67
|
Upgrade a seeded module with `update --fix`: it writes a module only when its current bytes still match the shipped digest
|
|
68
68
|
recorded in `.ai.local/.template-base.json`. A module you edited is reported `kept modified` and stays byte-identical; a
|
|
@@ -175,10 +175,11 @@ pre-v2 database is rebuilt from the files on the next `sync`.
|
|
|
175
175
|
the published npm package; they are used only in the `@bonesofspring/ai-rules` repository
|
|
176
176
|
itself. A consumer install seeds no job and no runner.
|
|
177
177
|
|
|
178
|
-
In this repository the `next` preset carries a weekly `upstream-research` job
|
|
179
|
-
`
|
|
178
|
+
In this repository the `next` preset carries a weekly `upstream-research` job, the
|
|
179
|
+
`tracker-planned-drain` interval job (300 seconds, `concurrency: skip`), and a read-only
|
|
180
|
+
`opencode` agent for the weekly review. `init`/`update` seed that jobs file into
|
|
180
181
|
`.ai.local/team/scheduler/jobs.json` when the file is absent; an operator-edited definition is
|
|
181
|
-
never overwritten. The runner probes `opencode`, loads `upstream/projects.json` and
|
|
182
|
+
never overwritten. The weekly runner probes `opencode`, loads `upstream/projects.json` and
|
|
182
183
|
`upstream/config.json`, fetches each due clone with `git fetch --depth 1`, labels the window
|
|
183
184
|
(`range`, `baseline`, `unprovable`, `no-change`), validates the agent's marked JSON, re-checks
|
|
184
185
|
every citation inside the clone, dedupes by mechanism against the committed
|
|
@@ -94,10 +94,10 @@ function digestFile(filePath) {
|
|
|
94
94
|
* move would silently overwrite it.
|
|
95
95
|
*
|
|
96
96
|
* `source` stays part of the decision rather than becoming a label: per-tool
|
|
97
|
-
* template trees differ (`presets/claude/next/ai-local/
|
|
98
|
-
* fewer sections than `cursor/next`), so a foreign pass must not rewrite a
|
|
99
|
-
* another tool seeded. Every pass classifies, so the writing tool's own pass
|
|
100
|
-
* the one that decides — a foreign source no longer disables the feature.
|
|
97
|
+
* template trees may differ (`presets/claude/next/ai-local/rules/task-levels.md`
|
|
98
|
+
* ships fewer sections than `cursor/next`), so a foreign pass must not rewrite a
|
|
99
|
+
* rel another tool seeded. Every pass classifies, so the writing tool's own pass
|
|
100
|
+
* is the one that decides — a foreign source no longer disables the feature.
|
|
101
101
|
*
|
|
102
102
|
* @param {{ consumer?: Digest | null, base?: BaseEntry | null, template?: Digest | null, source: string }} input
|
|
103
103
|
* @returns {'noop' | 'adopt' | 'fast-forward' | 'drift'}
|
|
@@ -48,7 +48,14 @@ const ENGINE_SCRIPTS = [
|
|
|
48
48
|
'team-db-project.mjs',
|
|
49
49
|
'team-db-api.mjs',
|
|
50
50
|
'team-db-openapi.mjs',
|
|
51
|
+
// The per-task action rollup: two read-time views, the signal thresholds and
|
|
52
|
+
// the rules in JS. `actions-report.mjs` is the consumer-facing CLI; the API
|
|
53
|
+
// imports the same module, so a signal the report flags the API serves.
|
|
54
|
+
'action-signals.mjs',
|
|
55
|
+
'actions-report.mjs',
|
|
51
56
|
'team-db-scheduler.mjs',
|
|
57
|
+
// Five-minute tracker drain: one stored-planned item, one /task, skip while it runs.
|
|
58
|
+
'tracker-planned-drain.mjs',
|
|
52
59
|
// The weekly upstream evolution review: opencode probe, registry/cursor,
|
|
53
60
|
// change window, read-only agent call, dedupe, digest and promotion record.
|
|
54
61
|
'upstream-research.mjs',
|
|
@@ -62,6 +69,9 @@ const ENGINE_SCRIPTS = [
|
|
|
62
69
|
// of the self-learning loop modules.
|
|
63
70
|
'process-lease.mjs',
|
|
64
71
|
'processes.mjs',
|
|
72
|
+
// `/rr-scheduler-start`: stop a recorded scheduler, then start
|
|
73
|
+
// `team-db.mjs schedule` through the process manager.
|
|
74
|
+
'rr-scheduler-start.mjs',
|
|
65
75
|
// Role/task metrics aggregation used by technical-retro; ships with the engine
|
|
66
76
|
// so a consumer can run it from `.ai.local/scripts/` without the package.
|
|
67
77
|
'aggregate-agent-task-metrics.mjs',
|
|
@@ -32,6 +32,10 @@ const AI_LOCAL_GITIGNORE = [
|
|
|
32
32
|
'team.db-wal',
|
|
33
33
|
'team.db-shm',
|
|
34
34
|
'team-db-errors.log',
|
|
35
|
+
'# A corrupt or fingerprint-stale projection moved aside by `sync --rebuild`;',
|
|
36
|
+
'# same database bytes, only the name differs, so it is ignored the same way.',
|
|
37
|
+
'team.db.corrupt-*',
|
|
38
|
+
'team.db.mismatch-*',
|
|
35
39
|
'# Per-session slug bindings for the chain hook; runtime state, never commit.',
|
|
36
40
|
'team/.session-leases/',
|
|
37
41
|
'# Scheduler runtime state; jobs.json stays tracked (jobs as code).',
|
|
@@ -369,11 +373,11 @@ function copyTemplates(presetTeamSrc, dest) {
|
|
|
369
373
|
copyFile(source, target);
|
|
370
374
|
written.push(`.ai.local/team/upstream/${name}`);
|
|
371
375
|
}
|
|
372
|
-
// The shipped
|
|
373
|
-
//
|
|
374
|
-
//
|
|
375
|
-
//
|
|
376
|
-
//
|
|
376
|
+
// The shipped jobs seed only when absent, like the research data above: the
|
|
377
|
+
// template carries `upstream-research` and `tracker-planned-drain`, and an
|
|
378
|
+
// operator-edited `scheduler/jobs.json` (tracked on purpose — jobs as code)
|
|
379
|
+
// is never overwritten. The scheduler owns the file under `scheduler/`; the
|
|
380
|
+
// template lives beside the other upstream templates.
|
|
377
381
|
{
|
|
378
382
|
const jobsSource = path.join(upstreamSrc, 'jobs.json');
|
|
379
383
|
const jobsTarget = path.join(dest, 'scheduler', 'jobs.json');
|
package/docs/TEAM-DB.md
CHANGED
|
@@ -20,8 +20,8 @@ The projection is installed by `init` as eight `team-db*.mjs` modules under `.ai
|
|
|
20
20
|
The same seeded set is `ENGINE_SCRIPTS` in `bin/lib/engine-scripts.js`: the eight `team-db*.mjs`
|
|
21
21
|
modules plus the self-learning engine, `manifest.mjs`, `dump-output.mjs`,
|
|
22
22
|
`check-write-scope.mjs`, `aggregate-agent-task-metrics.mjs`, `record-usage.mjs`,
|
|
23
|
-
`verification.mjs`, `incidents.mjs`, and the `processes.mjs` +
|
|
24
|
-
manager (twenty-
|
|
23
|
+
`verification.mjs`, `incidents.mjs`, `tracker-planned-drain.mjs`, and the `processes.mjs` +
|
|
24
|
+
`process-lease.mjs` process manager (twenty-five entries;
|
|
25
25
|
`node -e "require('./bin/lib/engine-scripts.js').ENGINE_SCRIPTS.length"` prints the shipped
|
|
26
26
|
count). One further module, `upstream-research.mjs`, is declared in
|
|
27
27
|
`REPO_ONLY_ENGINE_SCRIPTS`: it exists in this repository's preset source and dogfood mirror but
|
|
@@ -64,11 +64,18 @@ team.db
|
|
|
64
64
|
team.db-wal
|
|
65
65
|
team.db-shm
|
|
66
66
|
team-db-errors.log
|
|
67
|
+
team.db.corrupt-*
|
|
68
|
+
team.db.mismatch-*
|
|
67
69
|
team/scheduler/runs/
|
|
68
70
|
team/scheduler/state.json
|
|
69
71
|
team/output-guard/
|
|
70
72
|
```
|
|
71
73
|
|
|
74
|
+
The two `team.db.<reason>-*` patterns cover the whole file set a rebuild moves aside
|
|
75
|
+
(`team.db.corrupt-<stamp>`, `team.db.mismatch-<stamp>`, and their `-wal` / `-shm`
|
|
76
|
+
companions): same database bytes under a new name, so an untouched pattern would let a
|
|
77
|
+
~140 MB copy reach the index.
|
|
78
|
+
|
|
72
79
|
`team/scheduler/jobs.json` stays tracked: definitions are code, run output is not. `team/output-guard/` holds the OpenCode output-guard spill files; runtime state, never commit. The
|
|
73
80
|
consumer root `.gitignore` is never created or edited. Never commit the database even
|
|
74
81
|
for a demo: it contains copies of prompts and task documents.
|
|
@@ -151,6 +158,12 @@ vocabulary: `0` ok, `1` a validation refusal carrying its named code (`E_TRACKER
|
|
|
151
158
|
`E_TRACKER_TRANSITION`, `E_TRACKER_REVISION`, `E_SCHEMA`), `3` usage, `4` the tree lock was
|
|
152
159
|
contended (`E_TRACKER_BUSY`).
|
|
153
160
|
|
|
161
|
+
A `--rebuild` of `init`, `sync` or `migrate-tasks` takes the team-root rebuild lock
|
|
162
|
+
(`.ai.local/team/.rebuild.lock.d`, a transient directory) before it touches the database: a
|
|
163
|
+
second rebuild that meets it fails fast with `E_REBUILD_BUSY` (exit 4) instead of moving
|
|
164
|
+
`team.db` aside a second time. Lock order is fixed — rebuild lock outer, tracker lock inner,
|
|
165
|
+
SQLite `busy_timeout` last — and a plain `sync` takes no rebuild lock.
|
|
166
|
+
|
|
154
167
|
`search <query>` answers from the FTS5 projection: it calls `searchProjection` (`MATCH` when the
|
|
155
168
|
`search_fts` table exists, the escaped `LIKE` fallback otherwise) and never builds SQL from the
|
|
156
169
|
input. It opens the database read-only, defaults to 5 hits, clamps `--limit` to 1…20 (a larger
|
|
@@ -248,7 +261,13 @@ a run, and the hook stop seam consumes the claim and bootstraps `tasks/<taskSlug
|
|
|
248
261
|
`pipeline.json` naming `trackerItemId`/`trackerLinkId` and the link prompt (the recorded
|
|
249
262
|
`command` is never executed). `tracker/config.json` carries `maxActive` (1…8, default 1): a
|
|
250
263
|
task in a holding state (`in_progress`, `awaiting_artifact_receipt`, `blocked`) occupies a
|
|
251
|
-
slot, a task at a human gate does not.
|
|
264
|
+
slot, a task at a human gate does not. `GET /api/v1/tracker/queue` includes that holding
|
|
265
|
+
task even when it has no tracker link and no queue file: the row is derived (`entryId` null,
|
|
266
|
+
`itemId` null, `status` `active`, reason `current task`) and is not cancellable. A
|
|
267
|
+
non-terminal queue entry for the same slug is the row that is shown instead. `GET /api/v1/tracker/queue` includes that holding
|
|
268
|
+
task even when it has no tracker link and no queue file: the row is derived (`entryId` null,
|
|
269
|
+
`itemId` null, `status` `active`, reason `current task`) and is not cancellable. A
|
|
270
|
+
non-terminal queue entry for the same slug is the row that is shown instead. A claim older than 90 s with no task row is released
|
|
252
271
|
on the next drain or by `tracker recover`; `tracker prune --older-than <days>` deletes aged
|
|
253
272
|
terminal entry files only. The tracker module never writes `status.json`, `metrics.json`,
|
|
254
273
|
or `scheduler/jobs.json`.
|
|
@@ -351,6 +370,16 @@ own timeout, the result is recorded, exit 0. Supervision (launchd, systemd, Task
|
|
|
351
370
|
documented practice, never shipped as a second timer, and Windows process-group termination is
|
|
352
371
|
not supported in v1.
|
|
353
372
|
|
|
373
|
+
## Start or restart
|
|
374
|
+
|
|
375
|
+
`/rr-scheduler-start` runs `node .ai.local/scripts/rr-scheduler-start.mjs`. `init` seeds that
|
|
376
|
+
script with `processes.mjs` and `team-db.mjs`, so a fresh install has nothing else to copy.
|
|
377
|
+
The script stops a scheduler this repository recorded (`processes.mjs stop --name scheduler`),
|
|
378
|
+
signals a process started outside the manager only when `scheduler.lock` names a live pid
|
|
379
|
+
whose command line is `team-db.mjs schedule`, drops a lock whose pid is already dead, then
|
|
380
|
+
starts `exec node .ai.local/scripts/team-db.mjs schedule` through `processes.mjs start`. An
|
|
381
|
+
absent `scheduler/jobs.json` is an empty job list; the timer still takes the lease.
|
|
382
|
+
|
|
354
383
|
## Upstream research job
|
|
355
384
|
|
|
356
385
|
**Repository-only.** This job, the `/upstream-research` command, the
|
|
@@ -359,8 +388,10 @@ only in the `@bonesofspring/ai-rules` repository. The published tarball excludes
|
|
|
359
388
|
a consumer install seeds no job and no runner. The rest of this section documents the workflow
|
|
360
389
|
for repository maintainers.
|
|
361
390
|
|
|
362
|
-
The `next` preset carries
|
|
363
|
-
|
|
391
|
+
The `next` preset template carries the weekly `upstream-research` pipeline job and
|
|
392
|
+
`tracker-planned-drain` (`interval`, `everySeconds` 300, `concurrency: skip`), plus the
|
|
393
|
+
repository-only engine module `.ai.local/scripts/upstream-research.mjs`. The weekly job renders
|
|
394
|
+
`upstream/prompt.md` and runs the
|
|
364
395
|
module with `--prompt {promptFile} --team-root . --repo-root ../..`; it is a normal
|
|
365
396
|
definition in `scheduler/jobs.json`, so `jobs list|get|put|enable|disable|run`, the API job
|
|
366
397
|
routes, and every consumer UI work unchanged. `init`/`update` seed the definition into
|
|
@@ -477,14 +508,59 @@ turns) plus `.session-leases/*.json` (session → task windows); a `--slug` sync
|
|
|
477
508
|
per-file `(size, mtime)` watermark in `telemetry_sources` makes a second run over an unchanged
|
|
478
509
|
tree a no-op, and a duplicate `(sessionID, callID)` / `(sessionID, messageID)` keeps the
|
|
479
510
|
earliest `observed_at`, so a plugin reload cannot move a row to a later day. Attribution runs
|
|
480
|
-
through the
|
|
511
|
+
through the four-rung ladder of migration `0006`; a row outside every window stays `unmapped`. Three remaining
|
|
481
512
|
tables — `efficiency_runs`, `efficiency_run_cells`, `context_cost_hosts` — are populated by
|
|
482
513
|
later phases and stay empty in P1.
|
|
483
514
|
|
|
515
|
+
Migration `0006-action-telemetry` moves `SCHEMA_VERSION` to 6. It is additive: `tool_calls`
|
|
516
|
+
gains ten columns (`intent`, `agent`, `parent_session_id`, `duration_ms`, `gap_ms`,
|
|
517
|
+
`target_key`, `repeat_of`, `repeat_index`, `exit_code`, `error_class`), `usage_turns` gains six
|
|
518
|
+
(`reasoning_parts`, `reasoning_chars`, `reasoning_ms`, `text_chars`, `tool_calls`,
|
|
519
|
+
`compactions`), and one index plus two views appear. Every column is nullable, so a version-5
|
|
520
|
+
file opens and migrates in place without a row copy; a v6 file is refused by a v5 binary with
|
|
521
|
+
`E_SCHEMA_NEWER`. There is no downgrade SQL: delete `team.db*` and run `sync`.
|
|
522
|
+
|
|
523
|
+
Attribution is now a four-rung ladder, and the rung is stored on the row. A session lease
|
|
524
|
+
carries `firstSeenAt` and a refreshed `updatedAt`, and the projector maps a row observed at `t`
|
|
525
|
+
in session `s` as `lease` when `t` falls in `[first, last + 30 min]` clipped at the next lease
|
|
526
|
+
of `s` (latest `first` wins on overlap); as `window` when no lease of `s` covers `t` but a lease
|
|
527
|
+
window of the same task in another session does; as `dir-mtime` when `t` lies within ± 30
|
|
528
|
+
minutes of the last write of `tasks/<slug>`; and as `unmapped` otherwise. `TTL` and
|
|
529
|
+
`DIR_WINDOW` are two constants of `team-db-project.mjs` (`LEASE_TTL_MS`, `DIR_WINDOW_MS`), not
|
|
530
|
+
schema facts, so recalibrating them needs no migration.
|
|
531
|
+
|
|
532
|
+
The capture plane writes no text. `target_key` is the sha256 of the tool and the normalised
|
|
533
|
+
repo-relative target, `error_class` is one of `validation | notfound | permission | timeout |
|
|
534
|
+
upstream`, and a value that is not a hash, an enum member or a bounded identifier is dropped to
|
|
535
|
+
`NULL` with one `E_CAPTURE_REFUSED` line in `team-db-errors.log` — never truncated into the
|
|
536
|
+
database. `duration_ms`, `gap_ms`, `reasoning_ms` and `exit_code` stay `NULL` when the host did
|
|
537
|
+
not report them; the plugin registers `tool.execute.before`/`.after` for the duration but never
|
|
538
|
+
synthesises one from a neighbouring row. `intent` is recomputed by the projector from the tool
|
|
539
|
+
name (`classifyToolCall` stays the `category` classifier, untouched for `report-efficiency.mjs`),
|
|
540
|
+
so the ledger's own copy can never become the source of truth.
|
|
541
|
+
|
|
542
|
+
Two read-time views serve the rollup. `task_action_summary` gives, per task with attributed
|
|
543
|
+
actions, the counts per intent, the error and repeat numerators, the guard hits, the summed
|
|
544
|
+
`busy_ms`, the window edges, the distinct mutated targets (`changed_files`), the four rung
|
|
545
|
+
counts and the turn aggregates. `action_signals` gives one row per signal with a non-zero
|
|
546
|
+
numerator (`task_slug`, `signal`, `value`) and no `severity` column. Both carry numerators
|
|
547
|
+
only: the ratios, the thresholds, the severities and the one-line rules live in
|
|
548
|
+
`action-signals.mjs`, so recalibrating a signal is a code change with no migration and no
|
|
549
|
+
backfill. `changed_files` counts distinct mutated targets — the projection holds no git diff,
|
|
550
|
+
and a mutated target is the measured proxy for a changed file.
|
|
551
|
+
|
|
552
|
+
`node .ai.local/scripts/actions-report.mjs --slug <slug> [--since <instant>] [--json]` prints
|
|
553
|
+
the rollup, the fired signals and the per-rung attribution coverage, and exits 0 whenever a
|
|
554
|
+
report is produced (an unknown slug is an empty report with a null coverage). `--json` pairs
|
|
555
|
+
each figure with its evidence in the `measure.mjs` shape (`reported` / `data` / `reproduced`):
|
|
556
|
+
`reported` is the view's figure and `data` the direct count over the base rows. `--since` is
|
|
557
|
+
recorded on the report but does not filter it: the rollup is a per-task view and a view cannot
|
|
558
|
+
take a bound parameter, so filtering one side would compare a window against an all-time
|
|
559
|
+
figure.
|
|
560
|
+
|
|
484
561
|
Each connection sets `journal_mode=WAL`, `busy_timeout=5000`, `foreign_keys=ON`, and
|
|
485
562
|
`synchronous=NORMAL`. One task is projected in one transaction; a `SIGKILL` mid-sync
|
|
486
563
|
rolls back the in-flight task and leaves `integrity_check` `ok`.
|
|
487
|
-
|
|
488
564
|
Raw document content is capped at 32 MiB; above that the row keeps path, sha256, and length
|
|
489
565
|
and sets `content_omitted=size` (binary content sets `binary`). Raw content older than 90
|
|
490
566
|
days on an absent task is nulled only by `sync --maintain`; `sync --vacuum` checkpoints WAL and
|
|
@@ -554,8 +630,28 @@ executes operator-supplied commands as the API user; see `## Scheduled jobs`.
|
|
|
554
630
|
### Efficiency read plane
|
|
555
631
|
|
|
556
632
|
`/api/v1/stats` carries an `efficiency` object beside the task counts, and
|
|
557
|
-
`/api/v1/tasks/{slug}/metrics` carries one per task.
|
|
558
|
-
/api/v1/efficiency/{series,tools,distribution,ab-runs,ab-runs/{runKey},context-cost}`.
|
|
633
|
+
`/api/v1/tasks/{slug}/metrics` carries one per task. Eight operations serve the cuts: `GET
|
|
634
|
+
/api/v1/efficiency/{series,tools,distribution,ab-runs,ab-runs/{runKey},context-cost,actions,signals}`.
|
|
635
|
+
|
|
636
|
+
`/efficiency/actions` answers the action rollup of one task or one window: `totals` (with
|
|
637
|
+
`actions` and `turns` as the two sample sizes, and a zero-denominator ratio as `null`),
|
|
638
|
+
`byIntent`, `byAgent`, the paged `items`, and an `attribution` block whose four shipped keys
|
|
639
|
+
keep their meaning and which gains `byRung` and a `coverage` share. `coverage[]` at the top
|
|
640
|
+
level is the rung split of the returned page; the per-window split, which a consumer's
|
|
641
|
+
coverage chip reads, is `attribution.byRung`. `/efficiency/signals` answers the fired signals
|
|
642
|
+
worst severity first, then by signal name, with the task slug as the final tiebreak — the
|
|
643
|
+
array order is the render order — each with its `severity` and the `rule` that fired, so no
|
|
644
|
+
consumer re-derives a threshold; its `items` page by `limit`/`offset` like every sibling
|
|
645
|
+
route. Both routes reuse `efficiencyWindow` / `efficiencyFilter`, answer `404 E_NOT_FOUND` for
|
|
646
|
+
an unknown `task`, and reject an out-of-vocabulary `intent` or `severity` with `422
|
|
647
|
+
E_VALIDATION` naming the parameter; an `intent`, `agent` or `includeAbsent` sent to `/signals`
|
|
648
|
+
is a `422` too, because it declares none of the three and one `attribution` block cannot be
|
|
649
|
+
half filtered. `attribution.coverage` is `1` for a per-task read by construction — the
|
|
650
|
+
`unmapped` rung means "no task slug", which a task filter excludes — so only a window-wide
|
|
651
|
+
`/actions` read with `includeAbsent=1` can report less. `/signals` mixes two clocks on purpose:
|
|
652
|
+
`items[].value` is the task's all-time numerator (the rollup is per task and the window selects
|
|
653
|
+
tasks by their last action), while `attribution` is window-filtered; they are not a ratio of
|
|
654
|
+
each other.
|
|
559
655
|
|
|
560
656
|
- **`/stats.efficiency` is projection-wide.** `window` is always `{from:null,to:null}` and no
|
|
561
657
|
`/stats` parameter narrows the block. `attempts.total` counts **finished** attempts only
|