@bonesofspring/ai-rules 0.2.73 → 0.2.76
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 +88 -0
- package/README.md +2 -2
- package/bin/lib/engine-scripts.js +12 -0
- package/docs/TEAM-DB.md +96 -5
- package/docs/TOKEN-ECONOMY.md +18 -5
- package/docs/openapi/team-db.v1.json +1164 -224
- package/package.json +2 -2
- 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/check-write-scope.mjs +56 -26
- package/presets/_shared/ai-local/scripts/lock.mjs +103 -30
- 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/rule-improver.mjs +4 -0
- package/presets/_shared/ai-local/scripts/run-compact.mjs +132 -0
- package/presets/_shared/ai-local/scripts/signals.mjs +3 -1
- package/presets/_shared/ai-local/scripts/team-db-api.mjs +354 -11
- package/presets/_shared/ai-local/scripts/team-db-openapi.mjs +309 -4
- package/presets/_shared/ai-local/scripts/team-db-project.mjs +515 -26
- package/presets/_shared/ai-local/scripts/team-db-scheduler.mjs +32 -2
- package/presets/_shared/ai-local/scripts/team-db-schema.mjs +185 -1
- package/presets/_shared/ai-local/scripts/team-db-task-runner.mjs +3 -1
- package/presets/_shared/core/agent-team/agent-task-metrics.md +29 -0
- package/presets/_shared/core/agent-team/agent-team-orchestrator.md +1 -1
- package/presets/_shared/core/meta/preset-pr-checklist.md +2 -2
- package/presets/_shared/core/quality/context-and-iteration.md +1 -1
- package/presets/_shared/hooks/chain-team-phases.sh.tmpl +18 -1
- package/presets/_shared/hooks/compact-shell-output.mjs +68 -0
- 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 +18 -1
- package/presets/claude/android-kotlin/rules/tooling-and-review/agent-team-orchestrator.md +1 -1
- package/presets/claude/android-kotlin/rules/tooling-and-review/preset-pr-checklist.md +2 -2
- package/presets/claude/android-kotlin/team/README.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 +18 -1
- package/presets/claude/go/rules/tooling-and-review/agent-team-orchestrator.md +1 -1
- package/presets/claude/go/rules/tooling-and-review/preset-pr-checklist.md +2 -2
- package/presets/claude/go/team/README.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 +18 -1
- package/presets/claude/ios-swift/rules/tooling-and-review/agent-team-orchestrator.md +1 -1
- package/presets/claude/ios-swift/rules/tooling-and-review/preset-pr-checklist.md +2 -2
- package/presets/claude/ios-swift/team/README.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 +18 -1
- package/presets/claude/java/rules/tooling-and-review/agent-team-orchestrator.md +1 -1
- package/presets/claude/java/rules/tooling-and-review/preset-pr-checklist.md +2 -2
- package/presets/claude/java/team/README.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 +18 -1
- package/presets/claude/mcp-ts/rules/tooling-and-review/agent-team-orchestrator.md +1 -1
- package/presets/claude/mcp-ts/rules/tooling-and-review/preset-pr-checklist.md +2 -2
- package/presets/claude/mcp-ts/team/README.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 +18 -1
- package/presets/claude/mol/rules/tooling-and-review/agent-team-orchestrator.md +1 -1
- package/presets/claude/mol/rules/tooling-and-review/preset-pr-checklist.md +2 -2
- package/presets/claude/mol/team/README.md +1 -1
- package/presets/claude/next/agents/build-verifier.md +1 -1
- package/presets/claude/next/agents/code-reviewer.md +2 -0
- 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 +18 -1
- package/presets/claude/next/rules/tooling-and-review/agent-team-orchestrator.md +1 -1
- package/presets/claude/next/rules/tooling-and-review/preset-pr-checklist.md +2 -2
- package/presets/claude/next/team/README.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 +18 -1
- package/presets/claude/nuxt/rules/tooling-and-review/agent-team-orchestrator.md +1 -1
- package/presets/claude/nuxt/rules/tooling-and-review/preset-pr-checklist.md +2 -2
- package/presets/claude/nuxt/team/README.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 +18 -1
- package/presets/claude/php-hexagonal/rules/tooling-and-review/agent-team-orchestrator.md +1 -1
- package/presets/claude/php-hexagonal/rules/tooling-and-review/preset-pr-checklist.md +2 -2
- package/presets/claude/php-hexagonal/team/README.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 +18 -1
- package/presets/claude/php-laravel/rules/tooling-and-review/agent-team-orchestrator.md +1 -1
- package/presets/claude/php-laravel/rules/tooling-and-review/preset-pr-checklist.md +2 -2
- package/presets/claude/php-laravel/team/README.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 +18 -1
- package/presets/claude/svelte/rules/tooling-and-review/agent-team-orchestrator.md +1 -1
- package/presets/claude/svelte/rules/tooling-and-review/preset-pr-checklist.md +2 -2
- package/presets/claude/svelte/team/README.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 +18 -1
- package/presets/cursor/android-kotlin/hooks/compact-shell-output.mjs +68 -0
- package/presets/cursor/android-kotlin/hooks.json +7 -0
- package/presets/cursor/android-kotlin/rules/preset-pr-checklist.mdc +2 -2
- package/presets/cursor/android-kotlin/team/README.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 +18 -1
- package/presets/cursor/go/hooks/compact-shell-output.mjs +68 -0
- package/presets/cursor/go/hooks.json +7 -0
- package/presets/cursor/go/rules/preset-pr-checklist.mdc +2 -2
- package/presets/cursor/go/team/README.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 +18 -1
- package/presets/cursor/ios-swift/hooks/compact-shell-output.mjs +68 -0
- package/presets/cursor/ios-swift/hooks.json +7 -0
- package/presets/cursor/ios-swift/rules/preset-pr-checklist.mdc +2 -2
- package/presets/cursor/ios-swift/team/README.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 +18 -1
- package/presets/cursor/java/hooks/compact-shell-output.mjs +68 -0
- package/presets/cursor/java/hooks.json +7 -0
- package/presets/cursor/java/rules/preset-pr-checklist.mdc +2 -2
- package/presets/cursor/java/team/README.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 +18 -1
- package/presets/cursor/mcp-ts/hooks/compact-shell-output.mjs +68 -0
- package/presets/cursor/mcp-ts/hooks.json +7 -0
- package/presets/cursor/mcp-ts/rules/preset-pr-checklist.mdc +2 -2
- package/presets/cursor/mcp-ts/team/README.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 +18 -1
- package/presets/cursor/mol/hooks/compact-shell-output.mjs +68 -0
- package/presets/cursor/mol/hooks.json +7 -0
- package/presets/cursor/mol/rules/preset-pr-checklist.mdc +2 -2
- package/presets/cursor/mol/team/README.md +1 -1
- package/presets/cursor/next/agents/build-verifier.md +1 -1
- package/presets/cursor/next/agents/code-reviewer.md +2 -0
- 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 +18 -1
- package/presets/cursor/next/hooks/compact-shell-output.mjs +68 -0
- package/presets/cursor/next/hooks.json +7 -0
- package/presets/cursor/next/rules/preset-pr-checklist.mdc +2 -2
- package/presets/cursor/next/team/README.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 +18 -1
- package/presets/cursor/nuxt/hooks/compact-shell-output.mjs +68 -0
- package/presets/cursor/nuxt/hooks.json +7 -0
- package/presets/cursor/nuxt/rules/preset-pr-checklist.mdc +2 -2
- package/presets/cursor/nuxt/team/README.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 +18 -1
- package/presets/cursor/php-hexagonal/hooks/compact-shell-output.mjs +68 -0
- package/presets/cursor/php-hexagonal/hooks.json +7 -0
- package/presets/cursor/php-hexagonal/rules/preset-pr-checklist.mdc +2 -2
- package/presets/cursor/php-hexagonal/team/README.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 +18 -1
- package/presets/cursor/php-laravel/hooks/compact-shell-output.mjs +68 -0
- package/presets/cursor/php-laravel/hooks.json +7 -0
- package/presets/cursor/php-laravel/rules/preset-pr-checklist.mdc +2 -2
- package/presets/cursor/php-laravel/team/README.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 +18 -1
- package/presets/cursor/svelte/hooks/compact-shell-output.mjs +68 -0
- package/presets/cursor/svelte/hooks.json +7 -0
- package/presets/cursor/svelte/rules/preset-pr-checklist.mdc +2 -2
- package/presets/cursor/svelte/team/README.md +1 -1
- package/presets/mavis/android-kotlin/adapter-map.json +17 -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 +18 -1
- package/presets/mavis/android-kotlin/rules/agent-team-orchestrator.md +1 -1
- package/presets/mavis/android-kotlin/rules/preset-pr-checklist.md +2 -2
- package/presets/mavis/android-kotlin/team/README.md +1 -1
- package/presets/mavis/go/adapter-map.json +17 -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 +18 -1
- package/presets/mavis/go/rules/agent-team-orchestrator.md +1 -1
- package/presets/mavis/go/rules/preset-pr-checklist.md +2 -2
- package/presets/mavis/go/team/README.md +1 -1
- package/presets/mavis/ios-swift/adapter-map.json +17 -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 +18 -1
- package/presets/mavis/ios-swift/rules/agent-team-orchestrator.md +1 -1
- package/presets/mavis/ios-swift/rules/preset-pr-checklist.md +2 -2
- package/presets/mavis/ios-swift/team/README.md +1 -1
- package/presets/mavis/java/adapter-map.json +17 -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 +18 -1
- package/presets/mavis/java/rules/agent-team-orchestrator.md +1 -1
- package/presets/mavis/java/rules/preset-pr-checklist.md +2 -2
- package/presets/mavis/java/team/README.md +1 -1
- package/presets/mavis/mcp-ts/adapter-map.json +17 -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 +18 -1
- package/presets/mavis/mcp-ts/rules/agent-team-orchestrator.md +1 -1
- package/presets/mavis/mcp-ts/rules/preset-pr-checklist.md +2 -2
- package/presets/mavis/mcp-ts/team/README.md +1 -1
- package/presets/mavis/mol/adapter-map.json +17 -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 +18 -1
- package/presets/mavis/mol/rules/agent-team-orchestrator.md +1 -1
- package/presets/mavis/mol/rules/preset-pr-checklist.md +2 -2
- package/presets/mavis/mol/team/README.md +1 -1
- package/presets/mavis/next/adapter-map.json +17 -1
- package/presets/mavis/next/agents/build-verifier.md +1 -1
- package/presets/mavis/next/agents/code-reviewer.md +2 -0
- 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 +18 -1
- package/presets/mavis/next/rules/agent-team-orchestrator.md +1 -1
- package/presets/mavis/next/rules/preset-pr-checklist.md +2 -2
- package/presets/mavis/next/team/README.md +1 -1
- package/presets/mavis/nuxt/adapter-map.json +17 -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 +18 -1
- package/presets/mavis/nuxt/rules/agent-team-orchestrator.md +1 -1
- package/presets/mavis/nuxt/rules/preset-pr-checklist.md +2 -2
- package/presets/mavis/nuxt/team/README.md +1 -1
- package/presets/mavis/php-hexagonal/adapter-map.json +17 -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 +18 -1
- package/presets/mavis/php-hexagonal/rules/agent-team-orchestrator.md +1 -1
- package/presets/mavis/php-hexagonal/rules/preset-pr-checklist.md +2 -2
- package/presets/mavis/php-hexagonal/team/README.md +1 -1
- package/presets/mavis/php-laravel/adapter-map.json +17 -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 +18 -1
- package/presets/mavis/php-laravel/rules/agent-team-orchestrator.md +1 -1
- package/presets/mavis/php-laravel/rules/preset-pr-checklist.md +2 -2
- package/presets/mavis/php-laravel/team/README.md +1 -1
- package/presets/mavis/svelte/adapter-map.json +17 -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 +18 -1
- package/presets/mavis/svelte/rules/agent-team-orchestrator.md +1 -1
- package/presets/mavis/svelte/rules/preset-pr-checklist.md +2 -2
- package/presets/mavis/svelte/team/README.md +1 -1
- package/presets/opencode/android-kotlin/adapter-map.json +17 -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 +18 -1
- package/presets/opencode/android-kotlin/rules/agent-team-orchestrator.md +1 -1
- package/presets/opencode/android-kotlin/rules/preset-pr-checklist.md +2 -2
- package/presets/opencode/android-kotlin/team/README.md +1 -1
- package/presets/opencode/go/adapter-map.json +17 -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 +18 -1
- package/presets/opencode/go/rules/agent-team-orchestrator.md +1 -1
- package/presets/opencode/go/rules/preset-pr-checklist.md +2 -2
- package/presets/opencode/go/team/README.md +1 -1
- package/presets/opencode/ios-swift/adapter-map.json +17 -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 +18 -1
- package/presets/opencode/ios-swift/rules/agent-team-orchestrator.md +1 -1
- package/presets/opencode/ios-swift/rules/preset-pr-checklist.md +2 -2
- package/presets/opencode/ios-swift/team/README.md +1 -1
- package/presets/opencode/java/adapter-map.json +17 -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 +18 -1
- package/presets/opencode/java/rules/agent-team-orchestrator.md +1 -1
- package/presets/opencode/java/rules/preset-pr-checklist.md +2 -2
- package/presets/opencode/java/team/README.md +1 -1
- package/presets/opencode/mcp-ts/adapter-map.json +17 -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 +18 -1
- package/presets/opencode/mcp-ts/rules/agent-team-orchestrator.md +1 -1
- package/presets/opencode/mcp-ts/rules/preset-pr-checklist.md +2 -2
- package/presets/opencode/mcp-ts/team/README.md +1 -1
- package/presets/opencode/mol/adapter-map.json +17 -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 +18 -1
- package/presets/opencode/mol/rules/agent-team-orchestrator.md +1 -1
- package/presets/opencode/mol/rules/preset-pr-checklist.md +2 -2
- package/presets/opencode/mol/team/README.md +1 -1
- package/presets/opencode/next/adapter-map.json +17 -1
- package/presets/opencode/next/agents/build-verifier.md +1 -1
- package/presets/opencode/next/agents/code-reviewer.md +2 -0
- 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 +18 -1
- package/presets/opencode/next/rules/agent-team-orchestrator.md +1 -1
- package/presets/opencode/next/rules/preset-pr-checklist.md +2 -2
- package/presets/opencode/next/team/README.md +1 -1
- package/presets/opencode/nuxt/adapter-map.json +17 -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 +18 -1
- package/presets/opencode/nuxt/rules/agent-team-orchestrator.md +1 -1
- package/presets/opencode/nuxt/rules/preset-pr-checklist.md +2 -2
- package/presets/opencode/nuxt/team/README.md +1 -1
- package/presets/opencode/php-hexagonal/adapter-map.json +17 -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 +18 -1
- package/presets/opencode/php-hexagonal/rules/agent-team-orchestrator.md +1 -1
- package/presets/opencode/php-hexagonal/rules/preset-pr-checklist.md +2 -2
- package/presets/opencode/php-hexagonal/team/README.md +1 -1
- package/presets/opencode/php-laravel/adapter-map.json +17 -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 +18 -1
- package/presets/opencode/php-laravel/rules/agent-team-orchestrator.md +1 -1
- package/presets/opencode/php-laravel/rules/preset-pr-checklist.md +2 -2
- package/presets/opencode/php-laravel/team/README.md +1 -1
- package/presets/opencode/plugins/output-guard/README.md +45 -3
- 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 +10 -1
- package/presets/opencode/svelte/adapter-map.json +17 -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 +18 -1
- package/presets/opencode/svelte/rules/agent-team-orchestrator.md +1 -1
- package/presets/opencode/svelte/rules/preset-pr-checklist.md +2 -2
- package/presets/opencode/svelte/team/README.md +1 -1
- package/presets/zcode/android-kotlin/adapter-map.json +17 -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 +18 -1
- package/presets/zcode/android-kotlin/rules/agent-team-orchestrator.md +1 -1
- package/presets/zcode/android-kotlin/rules/preset-pr-checklist.md +2 -2
- package/presets/zcode/android-kotlin/team/README.md +1 -1
- package/presets/zcode/go/adapter-map.json +17 -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 +18 -1
- package/presets/zcode/go/rules/agent-team-orchestrator.md +1 -1
- package/presets/zcode/go/rules/preset-pr-checklist.md +2 -2
- package/presets/zcode/go/team/README.md +1 -1
- package/presets/zcode/ios-swift/adapter-map.json +17 -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 +18 -1
- package/presets/zcode/ios-swift/rules/agent-team-orchestrator.md +1 -1
- package/presets/zcode/ios-swift/rules/preset-pr-checklist.md +2 -2
- package/presets/zcode/ios-swift/team/README.md +1 -1
- package/presets/zcode/java/adapter-map.json +17 -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 +18 -1
- package/presets/zcode/java/rules/agent-team-orchestrator.md +1 -1
- package/presets/zcode/java/rules/preset-pr-checklist.md +2 -2
- package/presets/zcode/java/team/README.md +1 -1
- package/presets/zcode/mcp-ts/adapter-map.json +17 -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 +18 -1
- package/presets/zcode/mcp-ts/rules/agent-team-orchestrator.md +1 -1
- package/presets/zcode/mcp-ts/rules/preset-pr-checklist.md +2 -2
- package/presets/zcode/mcp-ts/team/README.md +1 -1
- package/presets/zcode/mol/adapter-map.json +17 -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 +18 -1
- package/presets/zcode/mol/rules/agent-team-orchestrator.md +1 -1
- package/presets/zcode/mol/rules/preset-pr-checklist.md +2 -2
- package/presets/zcode/mol/team/README.md +1 -1
- package/presets/zcode/next/adapter-map.json +17 -1
- package/presets/zcode/next/agents/build-verifier.md +1 -1
- package/presets/zcode/next/agents/code-reviewer.md +2 -0
- 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 +18 -1
- package/presets/zcode/next/rules/agent-team-orchestrator.md +1 -1
- package/presets/zcode/next/rules/preset-pr-checklist.md +2 -2
- package/presets/zcode/next/team/README.md +1 -1
- package/presets/zcode/nuxt/adapter-map.json +17 -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 +18 -1
- package/presets/zcode/nuxt/rules/agent-team-orchestrator.md +1 -1
- package/presets/zcode/nuxt/rules/preset-pr-checklist.md +2 -2
- package/presets/zcode/nuxt/team/README.md +1 -1
- package/presets/zcode/php-hexagonal/adapter-map.json +17 -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 +18 -1
- package/presets/zcode/php-hexagonal/rules/agent-team-orchestrator.md +1 -1
- package/presets/zcode/php-hexagonal/rules/preset-pr-checklist.md +2 -2
- package/presets/zcode/php-hexagonal/team/README.md +1 -1
- package/presets/zcode/php-laravel/adapter-map.json +17 -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 +18 -1
- package/presets/zcode/php-laravel/rules/agent-team-orchestrator.md +1 -1
- package/presets/zcode/php-laravel/rules/preset-pr-checklist.md +2 -2
- package/presets/zcode/php-laravel/team/README.md +1 -1
- package/presets/zcode/svelte/adapter-map.json +17 -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 +18 -1
- package/presets/zcode/svelte/rules/agent-team-orchestrator.md +1 -1
- package/presets/zcode/svelte/rules/preset-pr-checklist.md +2 -2
- package/presets/zcode/svelte/team/README.md +1 -1
- package/scripts/close-agent-task-human-gate.mjs +3 -3
- package/scripts/report-context-cost.mjs +10 -3
- package/scripts/aggregate-agent-task-metrics.mjs +0 -480
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,87 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.2.76
|
|
4
|
+
|
|
5
|
+
### `preset` — guard accounting reads every ledger generation
|
|
6
|
+
|
|
7
|
+
- **Two ratios, one numerator.** `report-efficiency.mjs` prints `all calls` (25.2% of measured traffic) beside `replaced only` (76.7% of the outputs the guard rewrote). `report-context-cost.mjs` prints only the second, now labelled "of replaced bytes" with a pointer to the all-calls figure, and its JSON carries `scope: "replaced"`. The 48× gap between the two reports was a denominator, not a contradiction: `stats.jsonl` receives a row only for `result.changed`.
|
|
8
|
+
- **Rotation is a window, not a loss.** The report reads `results*.jsonl` and `usage*.jsonl` oldest archive first, so the 8 MiB rotation of `results.1.jsonl` no longer hides ~96% of the measured calls; rows still dedupe by `(sessionID, callID)` and `(sessionID, messageID)`.
|
|
9
|
+
- **One byte instrument.** The bench takes `rawBytes` from the run stream and `returnedBytes` as that total minus the ledger's measured savings. Before, the on arm's denominator came from the ledger, which never sees a tool result produced after the last `context` hook — a zero-replacement run read 6,991 B against 6,196 B. Records gain `savedBytes` and `unobservedBytes`; deltas gain `rawBytesPct`.
|
|
10
|
+
- **`--rescore`.** `bench-efficiency.mjs --rescore <run-dir>` rebuilds a matrix from `runs/<run>/run.json` plus each run's ledger, without a model call, and writes `efficiency.rescored.{json,md}`. Artifacts written before the `replaced` field existed regain their real counts: `bench/runs/20261117T070906Z` becomes `inconclusive` (0 replacements), bench-v2 becomes `adopt` with 12.
|
|
11
|
+
- **Schema 3.** The verdict reason names the replacement count, and `report-efficiency` treats any `schemaVersion >= 2` as the session-token definition instead of pinning `2`.
|
|
12
|
+
|
|
13
|
+
### `engine` — large test and git output stays on disk
|
|
14
|
+
|
|
15
|
+
- **Cursor `preToolUse`.** An eligible simple `test`, `lint`, `git log`, or `git diff` command is rewritten to `run-compact.mjs` when `TEAM_TASK_SLUG` is set. The child exit code is preserved. Payloads over 4096 bytes keep the failure lines in context; the full output stays in `outputs/`. Pipelines, quoted arguments, and commands without a slug are not rewritten. The hook fails open.
|
|
16
|
+
|
|
17
|
+
### `engine` — a live reclaimer keeps its guard
|
|
18
|
+
|
|
19
|
+
- **Identity, not age.** `removeStaleGuard` deleted `<lock>.d.reclaim` and the preset-tree `<lock>.reclaim` once the directory was older than 30s. A reclaimer still inside that guard lost it, and the next contender created a second one. A guard now carries `owner.json` (pid + token). A live pid is never removed, a dead pid is removed on the next attempt, and an owner-less directory still waits out the 30s window. Removal renames that directory aside and deletes it only when the renamed inode and owner are the ones just evaluated.
|
|
20
|
+
|
|
21
|
+
### `preset` — session token total includes cache
|
|
22
|
+
|
|
23
|
+
- **Schema 2.** The efficiency bench `schemaVersion` is 2 because `medianTokens` now includes cache read and cache write. `report:efficiency --bench` keeps the old token column titles and prints that those totals exclude cache when the file's `schemaVersion` is not 2.
|
|
24
|
+
|
|
25
|
+
### `team` — the write-scope audit skips what it cannot attribute
|
|
26
|
+
|
|
27
|
+
- **Skip, not fail.** `check-write-scope.mjs` reconciles one step's paths against that step's `writeScopes`. With no step baseline it audited the whole uncommitted change-set and hard-failed an implementation step on paths that belong to earlier steps or to another task in the same worktree — the live `agent-action-telemetry` verdict was `baseline: null` with 7 foreign paths. It now skips with `skipReason: no-baseline` (exit `3`, the same "skip, not a failure" contract a legacy pipeline already had) and prints the labelled change-set as suspects, so no evidence is lost and no step fails on writes it cannot own. An empty change-set still reconciles to a pass.
|
|
28
|
+
- **Escape hatches keep their verdict.** `--paths` (the caller's authoritative list) and `--base <ref>` (a committed change-set) are explicit requests and still hard-fail an out-of-scope implementation write.
|
|
29
|
+
- **Orchestration.** `build-verifier` and `code-reviewer` read exit `3` as a skip, and a `no-baseline` skip as an orchestration defect: the orchestrator saves the step baseline (`--step <id> --save-baseline`) before the step writes and re-runs the audit.
|
|
30
|
+
- **A step without an id is not auditable.** Auto-selection took any step with `writeScopes`, but the baseline is keyed by `id`: `--save-baseline` exited `2` and the audit then labelled the whole uncommitted change-set as that step's surface — the attribution error the baseline exists to prevent. Selection now requires an `id`, and a pipeline whose only scoped steps lack one skips with `no-step-ids` (exit `3`).
|
|
31
|
+
- **The recovery hint is runnable.** `no-step-ids` named `team-db.mjs migrate-tasks`, which projects task folders into SQLite and never rewrites `pipeline.json`. It now names the task-router regeneration the hook itself prescribes, then `/task-continue`.
|
|
32
|
+
- **Exit `2` is in the contract.** `build-verifier`, `code-reviewer`, and the orchestrator rule listed `0`/`1`/`3` only. Exit `2` is a usage error (unknown `--step`, unreadable `pipeline.json`, failed git ref): the audit did not run, so it is neither a pass nor a finding.
|
|
33
|
+
- **The skip report keeps its surface.** A `no-baseline` skip printed `step.writeScopes: []` in JSON even though it classified the change-set against those scopes. The report now echoes the resolved scopes, so a skip and a pass describe the same surface.
|
|
34
|
+
|
|
35
|
+
### `preset` — the generator accepts the Cursor output-guard hook
|
|
36
|
+
|
|
37
|
+
- **Unmapped source.** The new Cursor `preToolUse` rewrite (`hooks/compact-shell-output.mjs`) had no `OMIT` entry in the Mavis, OpenCode, and ZCode generators, so `fix:generated` and `check:generated-drift` stopped with `unmapped cursor source` and no stack could be regenerated. The three generators omit it with a platform reason; the adapter maps and the CLI goldens (stale since the same change) were regenerated.
|
|
38
|
+
|
|
39
|
+
### `team-db` — behavior research joins calls to attempts
|
|
40
|
+
|
|
41
|
+
- **Migration `0007-behavior-research`.** `tool_calls.attempt_id` plus an `(attempt_id, observed_at)` index, the `attempt_episodes` table, and a `task_quality` view (`failed | rework | met | unverified`). Every column is nullable and the episode table starts empty, so a v6 file migrates in place. `met` requires `task_completed` and `verification_recorded` with no `verification_stale`, `rework` is any `changes_requested`, `failed` is `blocked` or `validation_failed` with no `task_completed`, and a task still running stays `null`.
|
|
42
|
+
- **Binding.** A full `sync` (no `--slug`) binds a `lease` or `window` call to the attempt whose window contains it: an `agent` match outranks the narrowest window, then the later start. `dir-mtime` and `unmapped` stay unbound, and a stored row moves to a stronger rung only.
|
|
43
|
+
- **Episodes and gaps.** One episode per attempt, capped at 40 ordered `(intent, target_key, error_class)` steps — the target stays the existing hash, never a path or command text. An empty `gap_ms` is filled from the previous call in the same session when the gap is at most 30 minutes; `duration_ms` stays `null` unless the host measured it.
|
|
44
|
+
- **Session usage.** `usage_source: session` is written only when neither the host nor the CLI reported usage: the projector sums the `usage_turns` the lease or window rung already mapped onto the attempt and records `usage_turn_count`. A host rollup replaces it on the next full projection.
|
|
45
|
+
- **Instant lease.** A lease file with no grown `firstSeenAt` stretches to the attempt span of its slug, at most seven days either side, then clips at the next lease of that session; the chain hook keeps a previous `updatedAt` as the window start.
|
|
46
|
+
- **Smaller joins.** `retry_scheduled.nextAgent` projects as the attempt `agent` when no `agent` is present, and the learning ledger accepts the `exemplar` kind without the rule improver turning it into a rule.
|
|
47
|
+
- **Tests.** The schema, projector, and concurrency suites cover the migration, the view labels, the join, and the `nextAgent` fallback.
|
|
48
|
+
|
|
49
|
+
### `team-db` — `serve` and `schedule` reload a newer schema
|
|
50
|
+
|
|
51
|
+
- **The cached module is not the file.** `serve` and `schedule` kept the `team-db-schema.mjs` they loaded at startup, so a version raised on disk by another process made every cached open fail with `E_SCHEMA_NEWER` until a restart. A request and an idle scheduler tick now re-import the file when its mtime is newer and its `SCHEMA_VERSION` is higher; the scheduler waits for in-flight drains and logs `reloaded schema vN`. A database newer than the file on disk still fails closed.
|
|
52
|
+
|
|
53
|
+
### `team` — a runner `cwd` resolves against `team/`
|
|
54
|
+
|
|
55
|
+
- **Relative to the declaring file.** `runner.json` `cwd` resolved against the repository root, so the seeded `../..` pointed above it. It now resolves against `team/`, an absolute path is taken as is, and either form is refused with `E_VALIDATION` when it leaves the repository root.
|
|
56
|
+
|
|
57
|
+
### `preset` — the self-review gate covers every loop module
|
|
58
|
+
|
|
59
|
+
- **One child-process pattern.** `check-preset-self-review-contract.sh` exempted `lock.mjs` from `CHILD_PROCESS_PATTERNS` and listed neither `run-compact.mjs` nor `rr-scheduler-start.mjs`, which spawn the command they wrap. The pattern now covers every loop module, both spawners are named, and a fixture asserts that a spawn in `lock.mjs` fails the gate.
|
|
60
|
+
|
|
61
|
+
### `preset` — install and closure upkeep
|
|
62
|
+
|
|
63
|
+
- **Shipped aggregator path.** `aggregate-agent-task-metrics.mjs` leaves `scripts/` and ships from `presets/_shared/ai-local/scripts/`; `files` points at the copy that already exists, and the metrics hook fixtures follow the move.
|
|
64
|
+
- **`zcode` in the wrappers.** `close-agent-task-human-gate.mjs` accepts `--platform zcode`, and the PR checklist lists `sync-dogfood-zcode.sh` beside the other dogfood scripts.
|
|
65
|
+
- **Claude rules block.** `fix-generated.mjs` runs `inject-claude-agent-rules-block.mjs`, the repair arm for `check-claude-agent-blocks.mjs`, because the Claude agents are hand-maintained.
|
|
66
|
+
- **Structure fixtures.** `check-preset-structure.sh` runs `test-preset-token-budget-baseline.mjs` and `test-close-agent-task-human-gate.mjs`.
|
|
67
|
+
|
|
68
|
+
## 0.2.74
|
|
69
|
+
|
|
70
|
+
### `team` — per-task agent action telemetry
|
|
71
|
+
|
|
72
|
+
- **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.
|
|
73
|
+
- **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`.
|
|
74
|
+
- **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.
|
|
75
|
+
- **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`.
|
|
76
|
+
- **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`.
|
|
77
|
+
- **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`).
|
|
78
|
+
- **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.
|
|
79
|
+
- **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`).
|
|
80
|
+
|
|
81
|
+
### `team` — launch queue shows the current task
|
|
82
|
+
|
|
83
|
+
- **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.
|
|
84
|
+
|
|
3
85
|
## 0.2.73
|
|
4
86
|
|
|
5
87
|
### `team` — planned tracker drain
|
|
@@ -11,6 +93,12 @@
|
|
|
11
93
|
- **Kill switch.** `AI_RULES_TEAM_DB_DISABLE=1` returns idle `disabled` and writes nothing.
|
|
12
94
|
- **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`.
|
|
13
95
|
|
|
96
|
+
### `preset` — `/rr-scheduler-start`
|
|
97
|
+
|
|
98
|
+
- **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.
|
|
99
|
+
- **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.
|
|
100
|
+
- **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.
|
|
101
|
+
|
|
14
102
|
### `preset` — research gate, rebuild lock, lean subagent blocks
|
|
15
103
|
|
|
16
104
|
- **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.
|
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-eight published scripts — the six self-learning engine modules, `manifest.mjs`, `dump-output.mjs`, `run-compact.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.
|
|
@@ -244,7 +244,7 @@ Every installed preset ships requestable `anti-hallucination-contract` (not alwa
|
|
|
244
244
|
- Overlay: [`docs/LOCAL-OVERLAY.md`](docs/LOCAL-OVERLAY.md)
|
|
245
245
|
- MCP setup: [`docs/MCP-SETUP.md`](docs/MCP-SETUP.md)
|
|
246
246
|
- MCP catalog: [`docs/MCP-CATALOG.md`](docs/MCP-CATALOG.md)
|
|
247
|
-
- Dogfood: [`scripts/sync-dogfood-cursor.sh`](scripts/sync-dogfood-cursor.sh), [`scripts/sync-dogfood-claude.sh`](scripts/sync-dogfood-claude.sh), [`scripts/sync-dogfood-mavis.sh`](scripts/sync-dogfood-mavis.sh), [`scripts/sync-dogfood-opencode.sh`](scripts/sync-dogfood-opencode.sh) — seeds `.ai.local/team`, preserves slugs
|
|
247
|
+
- Dogfood: [`scripts/sync-dogfood-cursor.sh`](scripts/sync-dogfood-cursor.sh), [`scripts/sync-dogfood-claude.sh`](scripts/sync-dogfood-claude.sh), [`scripts/sync-dogfood-mavis.sh`](scripts/sync-dogfood-mavis.sh), [`scripts/sync-dogfood-opencode.sh`](scripts/sync-dogfood-opencode.sh), [`scripts/sync-dogfood-zcode.sh`](scripts/sync-dogfood-zcode.sh) — seeds `.ai.local/team`, preserves slugs
|
|
248
248
|
- Gates: loop `yarn check:task <slug>` (or `yarn check:changed` on a clean tree) + the gates it names; release `yarn release:gate`
|
|
249
249
|
|
|
250
250
|
`_shared` is not an installable `--preset`.
|
|
@@ -41,6 +41,10 @@ const ENGINE_SCRIPTS = [
|
|
|
41
41
|
// `.ai.local/team/tasks/<slug>/outputs/` file plus a head, so a large dump
|
|
42
42
|
// never enters the context window. Reads no network and spawns nothing.
|
|
43
43
|
'dump-output.mjs',
|
|
44
|
+
// Spawns an eligible command, stores the combined output through dump-output,
|
|
45
|
+
// prints failure lines when the payload exceeds 4096 bytes, and exits with
|
|
46
|
+
// the child status.
|
|
47
|
+
'run-compact.mjs',
|
|
44
48
|
'team-db.mjs',
|
|
45
49
|
'team-db-tracker.mjs',
|
|
46
50
|
'team-db-task-runner.mjs',
|
|
@@ -48,6 +52,11 @@ const ENGINE_SCRIPTS = [
|
|
|
48
52
|
'team-db-project.mjs',
|
|
49
53
|
'team-db-api.mjs',
|
|
50
54
|
'team-db-openapi.mjs',
|
|
55
|
+
// The per-task action rollup: two read-time views, the signal thresholds and
|
|
56
|
+
// the rules in JS. `actions-report.mjs` is the consumer-facing CLI; the API
|
|
57
|
+
// imports the same module, so a signal the report flags the API serves.
|
|
58
|
+
'action-signals.mjs',
|
|
59
|
+
'actions-report.mjs',
|
|
51
60
|
'team-db-scheduler.mjs',
|
|
52
61
|
// Five-minute tracker drain: one stored-planned item, one /task, skip while it runs.
|
|
53
62
|
'tracker-planned-drain.mjs',
|
|
@@ -64,6 +73,9 @@ const ENGINE_SCRIPTS = [
|
|
|
64
73
|
// of the self-learning loop modules.
|
|
65
74
|
'process-lease.mjs',
|
|
66
75
|
'processes.mjs',
|
|
76
|
+
// `/rr-scheduler-start`: stop a recorded scheduler, then start
|
|
77
|
+
// `team-db.mjs schedule` through the process manager.
|
|
78
|
+
'rr-scheduler-start.mjs',
|
|
67
79
|
// Role/task metrics aggregation used by technical-retro; ships with the engine
|
|
68
80
|
// so a consumer can run it from `.ai.local/scripts/` without the package.
|
|
69
81
|
'aggregate-agent-task-metrics.mjs',
|
package/docs/TEAM-DB.md
CHANGED
|
@@ -261,7 +261,13 @@ a run, and the hook stop seam consumes the claim and bootstraps `tasks/<taskSlug
|
|
|
261
261
|
`pipeline.json` naming `trackerItemId`/`trackerLinkId` and the link prompt (the recorded
|
|
262
262
|
`command` is never executed). `tracker/config.json` carries `maxActive` (1…8, default 1): a
|
|
263
263
|
task in a holding state (`in_progress`, `awaiting_artifact_receipt`, `blocked`) occupies a
|
|
264
|
-
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
|
|
265
271
|
on the next drain or by `tracker recover`; `tracker prune --older-than <days>` deletes aged
|
|
266
272
|
terminal entry files only. The tracker module never writes `status.json`, `metrics.json`,
|
|
267
273
|
or `scheduler/jobs.json`.
|
|
@@ -290,6 +296,11 @@ or `metrics.json`. The seeded config is:
|
|
|
290
296
|
Replace `runner` only when the host CLI differs; the argv array may use `{promptFile}`,
|
|
291
297
|
`{taskSlug}` or `{teamRoot}`, never a shell string.
|
|
292
298
|
|
|
299
|
+
A relative `cwd` resolves against `team/` — the directory that holds the file — so the
|
|
300
|
+
seeded `../..` is the repository root. An absolute path is taken as is; either way the
|
|
301
|
+
resolved directory must stay inside the repository root, or the start is refused with
|
|
302
|
+
`E_VALIDATION`.
|
|
303
|
+
|
|
293
304
|
**Import envelope (D-8).** `tracker import --file <path|->` reads a versioned envelope
|
|
294
305
|
`{ schemaVersion: 1, source: { task, generatedAt }, items: [...] }`, validates every item
|
|
295
306
|
as one transaction (a failure writes nothing), upserts by id, writes nothing on `--dry-run`,
|
|
@@ -364,6 +375,16 @@ own timeout, the result is recorded, exit 0. Supervision (launchd, systemd, Task
|
|
|
364
375
|
documented practice, never shipped as a second timer, and Windows process-group termination is
|
|
365
376
|
not supported in v1.
|
|
366
377
|
|
|
378
|
+
## Start or restart
|
|
379
|
+
|
|
380
|
+
`/rr-scheduler-start` runs `node .ai.local/scripts/rr-scheduler-start.mjs`. `init` seeds that
|
|
381
|
+
script with `processes.mjs` and `team-db.mjs`, so a fresh install has nothing else to copy.
|
|
382
|
+
The script stops a scheduler this repository recorded (`processes.mjs stop --name scheduler`),
|
|
383
|
+
signals a process started outside the manager only when `scheduler.lock` names a live pid
|
|
384
|
+
whose command line is `team-db.mjs schedule`, drops a lock whose pid is already dead, then
|
|
385
|
+
starts `exec node .ai.local/scripts/team-db.mjs schedule` through `processes.mjs start`. An
|
|
386
|
+
absent `scheduler/jobs.json` is an empty job list; the timer still takes the lease.
|
|
387
|
+
|
|
367
388
|
## Upstream research job
|
|
368
389
|
|
|
369
390
|
**Repository-only.** This job, the `/upstream-research` command, the
|
|
@@ -492,14 +513,64 @@ turns) plus `.session-leases/*.json` (session → task windows); a `--slug` sync
|
|
|
492
513
|
per-file `(size, mtime)` watermark in `telemetry_sources` makes a second run over an unchanged
|
|
493
514
|
tree a no-op, and a duplicate `(sessionID, callID)` / `(sessionID, messageID)` keeps the
|
|
494
515
|
earliest `observed_at`, so a plugin reload cannot move a row to a later day. Attribution runs
|
|
495
|
-
through the
|
|
516
|
+
through the four-rung ladder of migration `0006`; a row outside every window stays `unmapped`. Three remaining
|
|
496
517
|
tables — `efficiency_runs`, `efficiency_run_cells`, `context_cost_hosts` — are populated by
|
|
497
518
|
later phases and stay empty in P1.
|
|
498
519
|
|
|
520
|
+
Migration `0006-action-telemetry` moves `SCHEMA_VERSION` to 6. It is additive: `tool_calls`
|
|
521
|
+
gains ten columns (`intent`, `agent`, `parent_session_id`, `duration_ms`, `gap_ms`,
|
|
522
|
+
`target_key`, `repeat_of`, `repeat_index`, `exit_code`, `error_class`), `usage_turns` gains six
|
|
523
|
+
(`reasoning_parts`, `reasoning_chars`, `reasoning_ms`, `text_chars`, `tool_calls`,
|
|
524
|
+
`compactions`), and one index plus two views appear. Every column is nullable, so a version-5
|
|
525
|
+
file opens and migrates in place without a row copy; a v6 file is refused by a v5 binary with
|
|
526
|
+
`E_SCHEMA_NEWER`. There is no downgrade SQL: delete `team.db*` and run `sync`.
|
|
527
|
+
|
|
528
|
+
`serve` and `schedule` keep the schema module they loaded at startup. When `team-db-schema.mjs`
|
|
529
|
+
on disk is replaced by a higher `SCHEMA_VERSION`, the next request and the next idle scheduler
|
|
530
|
+
tick re-import that file and open with it. A database newer than the file on disk still fails
|
|
531
|
+
closed with `E_SCHEMA_NEWER`; the running process does not rebuild it.
|
|
532
|
+
|
|
533
|
+
Attribution is now a four-rung ladder, and the rung is stored on the row. A session lease
|
|
534
|
+
carries `firstSeenAt` and a refreshed `updatedAt`, and the projector maps a row observed at `t`
|
|
535
|
+
in session `s` as `lease` when `t` falls in `[first, last + 30 min]` clipped at the next lease
|
|
536
|
+
of `s` (latest `first` wins on overlap); as `window` when no lease of `s` covers `t` but a lease
|
|
537
|
+
window of the same task in another session does; as `dir-mtime` when `t` lies within ± 30
|
|
538
|
+
minutes of the last write of `tasks/<slug>`; and as `unmapped` otherwise. `TTL` and
|
|
539
|
+
`DIR_WINDOW` are two constants of `team-db-project.mjs` (`LEASE_TTL_MS`, `DIR_WINDOW_MS`), not
|
|
540
|
+
schema facts, so recalibrating them needs no migration.
|
|
541
|
+
|
|
542
|
+
The capture plane writes no text. `target_key` is the sha256 of the tool and the normalised
|
|
543
|
+
repo-relative target, `error_class` is one of `validation | notfound | permission | timeout |
|
|
544
|
+
upstream`, and a value that is not a hash, an enum member or a bounded identifier is dropped to
|
|
545
|
+
`NULL` with one `E_CAPTURE_REFUSED` line in `team-db-errors.log` — never truncated into the
|
|
546
|
+
database. `duration_ms`, `gap_ms`, `reasoning_ms` and `exit_code` stay `NULL` when the host did
|
|
547
|
+
not report them; the plugin registers `tool.execute.before`/`.after` for the duration but never
|
|
548
|
+
synthesises one from a neighbouring row. `intent` is recomputed by the projector from the tool
|
|
549
|
+
name (`classifyToolCall` stays the `category` classifier, untouched for `report-efficiency.mjs`),
|
|
550
|
+
so the ledger's own copy can never become the source of truth.
|
|
551
|
+
|
|
552
|
+
Two read-time views serve the rollup. `task_action_summary` gives, per task with attributed
|
|
553
|
+
actions, the counts per intent, the error and repeat numerators, the guard hits, the summed
|
|
554
|
+
`busy_ms`, the window edges, the distinct mutated targets (`changed_files`), the four rung
|
|
555
|
+
counts and the turn aggregates. `action_signals` gives one row per signal with a non-zero
|
|
556
|
+
numerator (`task_slug`, `signal`, `value`) and no `severity` column. Both carry numerators
|
|
557
|
+
only: the ratios, the thresholds, the severities and the one-line rules live in
|
|
558
|
+
`action-signals.mjs`, so recalibrating a signal is a code change with no migration and no
|
|
559
|
+
backfill. `changed_files` counts distinct mutated targets — the projection holds no git diff,
|
|
560
|
+
and a mutated target is the measured proxy for a changed file.
|
|
561
|
+
|
|
562
|
+
`node .ai.local/scripts/actions-report.mjs --slug <slug> [--since <instant>] [--json]` prints
|
|
563
|
+
the rollup, the fired signals and the per-rung attribution coverage, and exits 0 whenever a
|
|
564
|
+
report is produced (an unknown slug is an empty report with a null coverage). `--json` pairs
|
|
565
|
+
each figure with its evidence in the `measure.mjs` shape (`reported` / `data` / `reproduced`):
|
|
566
|
+
`reported` is the view's figure and `data` the direct count over the base rows. `--since` is
|
|
567
|
+
recorded on the report but does not filter it: the rollup is a per-task view and a view cannot
|
|
568
|
+
take a bound parameter, so filtering one side would compare a window against an all-time
|
|
569
|
+
figure.
|
|
570
|
+
|
|
499
571
|
Each connection sets `journal_mode=WAL`, `busy_timeout=5000`, `foreign_keys=ON`, and
|
|
500
572
|
`synchronous=NORMAL`. One task is projected in one transaction; a `SIGKILL` mid-sync
|
|
501
573
|
rolls back the in-flight task and leaves `integrity_check` `ok`.
|
|
502
|
-
|
|
503
574
|
Raw document content is capped at 32 MiB; above that the row keeps path, sha256, and length
|
|
504
575
|
and sets `content_omitted=size` (binary content sets `binary`). Raw content older than 90
|
|
505
576
|
days on an absent task is nulled only by `sync --maintain`; `sync --vacuum` checkpoints WAL and
|
|
@@ -569,8 +640,28 @@ executes operator-supplied commands as the API user; see `## Scheduled jobs`.
|
|
|
569
640
|
### Efficiency read plane
|
|
570
641
|
|
|
571
642
|
`/api/v1/stats` carries an `efficiency` object beside the task counts, and
|
|
572
|
-
`/api/v1/tasks/{slug}/metrics` carries one per task.
|
|
573
|
-
/api/v1/efficiency/{series,tools,distribution,ab-runs,ab-runs/{runKey},context-cost}`.
|
|
643
|
+
`/api/v1/tasks/{slug}/metrics` carries one per task. Eight operations serve the cuts: `GET
|
|
644
|
+
/api/v1/efficiency/{series,tools,distribution,ab-runs,ab-runs/{runKey},context-cost,actions,signals}`.
|
|
645
|
+
|
|
646
|
+
`/efficiency/actions` answers the action rollup of one task or one window: `totals` (with
|
|
647
|
+
`actions` and `turns` as the two sample sizes, and a zero-denominator ratio as `null`),
|
|
648
|
+
`byIntent`, `byAgent`, the paged `items`, and an `attribution` block whose four shipped keys
|
|
649
|
+
keep their meaning and which gains `byRung` and a `coverage` share. `coverage[]` at the top
|
|
650
|
+
level is the rung split of the returned page; the per-window split, which a consumer's
|
|
651
|
+
coverage chip reads, is `attribution.byRung`. `/efficiency/signals` answers the fired signals
|
|
652
|
+
worst severity first, then by signal name, with the task slug as the final tiebreak — the
|
|
653
|
+
array order is the render order — each with its `severity` and the `rule` that fired, so no
|
|
654
|
+
consumer re-derives a threshold; its `items` page by `limit`/`offset` like every sibling
|
|
655
|
+
route. Both routes reuse `efficiencyWindow` / `efficiencyFilter`, answer `404 E_NOT_FOUND` for
|
|
656
|
+
an unknown `task`, and reject an out-of-vocabulary `intent` or `severity` with `422
|
|
657
|
+
E_VALIDATION` naming the parameter; an `intent`, `agent` or `includeAbsent` sent to `/signals`
|
|
658
|
+
is a `422` too, because it declares none of the three and one `attribution` block cannot be
|
|
659
|
+
half filtered. `attribution.coverage` is `1` for a per-task read by construction — the
|
|
660
|
+
`unmapped` rung means "no task slug", which a task filter excludes — so only a window-wide
|
|
661
|
+
`/actions` read with `includeAbsent=1` can report less. `/signals` mixes two clocks on purpose:
|
|
662
|
+
`items[].value` is the task's all-time numerator (the rollup is per task and the window selects
|
|
663
|
+
tasks by their last action), while `attribution` is window-filtered; they are not a ratio of
|
|
664
|
+
each other.
|
|
574
665
|
|
|
575
666
|
- **`/stats.efficiency` is projection-wide.** `window` is always `{from:null,to:null}` and no
|
|
576
667
|
`/stats` parameter narrows the block. `attempts.total` counts **finished** attempts only
|
package/docs/TOKEN-ECONOMY.md
CHANGED
|
@@ -53,6 +53,7 @@ Example run, 2026-11-13; file lists elided; task bytes move as a task grows.
|
|
|
53
53
|
"outputGuard": {
|
|
54
54
|
"present": true,
|
|
55
55
|
"file": ".ai.local/team/output-guard/stats.jsonl",
|
|
56
|
+
"scope": "replaced",
|
|
56
57
|
"events": 10,
|
|
57
58
|
"invalid": 0,
|
|
58
59
|
"beforeBytes": 113996,
|
|
@@ -69,21 +70,22 @@ Example run, 2026-11-13; file lists elided; task bytes move as a task grows.
|
|
|
69
70
|
|
|
70
71
|
`tasks` sums every file under `.ai.local/team/tasks/<slug>`, `archive/` included. A missing team directory returns `tasks: []`.
|
|
71
72
|
|
|
72
|
-
`outputGuard` reads `.ai.local/team/output-guard/stats.jsonl`, written by the OpenCode output guard. Rows are deduped by `path` because a plugin reload re-records a historical result. `savedRatio` is the
|
|
73
|
+
`outputGuard` reads `.ai.local/team/output-guard/stats.jsonl`, written by the OpenCode output guard. Rows are deduped by `path` because a plugin reload re-records a historical result. `stats.jsonl` holds **only the outputs the guard rewrote**, so `savedRatio` is the compression of that replaced subset, printed as "of replaced bytes" — never a share of all tool traffic; `invalid` counts unreadable rows (or the absence of one); a missing file returns `present: false` and zeros.
|
|
73
74
|
|
|
74
75
|
## Effectiveness (separate report)
|
|
75
76
|
|
|
76
77
|
This report measures **fixed inputs**. It does not measure a session. The output guard writes two more ledgers under `.ai.local/team/output-guard/`:
|
|
77
78
|
|
|
78
|
-
- `results.jsonl` — every tool result, replaced or not (the denominator)
|
|
79
|
-
- `usage.jsonl` — one row per assistant step, from the OpenCode `ctx.session.context` tokens and cost.
|
|
79
|
+
- `results.jsonl` — every tool result, replaced or not (the denominator), rotated at 8 MiB into `results.1.jsonl` and `results.2.jsonl`;
|
|
80
|
+
- `usage.jsonl` — one row per assistant step, from the OpenCode `ctx.session.context` tokens and cost, rotated the same way.
|
|
80
81
|
|
|
81
|
-
`report-efficiency.mjs` reads both and prints
|
|
82
|
+
`report-efficiency.mjs` reads **every generation** of both ledgers (`results*.jsonl`, `usage*.jsonl`), oldest archive first, so rotation is not a lost window; rows dedupe by `(sessionID, callID)` and `(sessionID, messageID)`. It prints two byte ratios because they answer different questions: `all calls` — what a session pays over every tool result — and `replaced only` — the guard's candidate set, the ratio `report-context-cost.mjs` prints from `stats.jsonl`. Both ratios share the same numerator: every saved byte comes from a replaced call. Session tokens are input + cache read + cache write + output + reasoning. The bench median and tokenDelta use that sum. Prompt growth per turn stays input + cache read + cache write. A flat tokenDelta still adopts; the reason line says flat, and a flat delta is not a saving. A bench file whose `schemaVersion` is below 2 keeps the old token column titles and a line that those totals exclude cache. `bench-efficiency.mjs` runs an A/B (guard off/on) through `opencode run --standalone` with a deterministic oracle and writes `efficiency.json`; `report-efficiency --bench <file>` merges it. Bench bytes use one instrument: `rawBytes` from the run stream, `returnedBytes` = that stream total minus the ledger's measured savings; the ledger alone undercounts (it never sees a tool result produced after the last `context` hook). A cell that replaced nothing is `inconclusive` whatever its token delta. `bench-efficiency --rescore <run-dir>` rebuilds a matrix from `runs/<run>/run.json` plus each run's ledger, so a pre-`replaced` artifact gains its real replacement count. The byte percentage is always labelled as tool-result bytes, never as a token saving.
|
|
82
83
|
|
|
83
84
|
```bash
|
|
84
85
|
yarn report:efficiency
|
|
85
86
|
yarn report:efficiency --html /tmp/efficiency.html
|
|
86
87
|
yarn bench:efficiency --model <provider/model> --runs 3
|
|
88
|
+
yarn bench:efficiency --rescore bench/runs/20261117T070906Z
|
|
87
89
|
```
|
|
88
90
|
|
|
89
91
|
The A/B needs `--runs 5` for a verdict; `--runs 1` is a smoke. Each run starts a private server, so the arm env (`AI_RULES_OUTPUT_GUARD=0|1`) applies without touching the shared server.
|
|
@@ -109,4 +111,15 @@ Re-run the command for the current tree; these numbers move with any rule edit.
|
|
|
109
111
|
|
|
110
112
|
## Next steps
|
|
111
113
|
|
|
112
|
-
|
|
114
|
+
Results over 20 KB take the flat replacement. Its `grep` term comes from the bytes between the head and the tail, the same rule as the 8–20 KB band. The trigger stays 8192 bytes. The preview stays 2048 bytes of head and 1024 bytes of tail.
|
|
115
|
+
|
|
116
|
+
`focus.md` lists at most five incomplete entries (`MAX_FOCUS_ENTRIES = 5` in `chain-team-phases.sh`).
|
|
117
|
+
|
|
118
|
+
Kept out on purpose:
|
|
119
|
+
|
|
120
|
+
- The trigger stays 8192. It does not drop to 4096.
|
|
121
|
+
- The preview stays a head and a tail. It does not drop to a 96-byte return.
|
|
122
|
+
- Whole-file `Read` is not denied at 16 KiB. Source the agent reads is larger than that.
|
|
123
|
+
- Tool output is not indexed in FTS, and there is no sandboxed `ctx_execute`.
|
|
124
|
+
|
|
125
|
+
The bench task `middle-token` places the secret after the 2048-byte head and before the 1024-byte tail of a payload over 20 KB. A retrieval that inlines the matching line, or a `Read` deny, waits on that task failing with the guard on.
|