@bonesofspring/ai-rules 0.2.67 → 0.2.68
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 +50 -0
- package/README.md +4 -4
- package/bin/lib/engine-scripts.js +3 -6
- package/bin/lib/seed-ai-local-team.js +1 -1
- package/docs/PRESET-CONTRIBUTION.md +15 -8
- package/docs/TEAM-DB.md +105 -105
- package/docs/TOKEN-ECONOMY.md +4 -2
- package/docs/openapi/team-db.v1.json +3905 -1466
- package/package.json +4 -4
- package/presets/_shared/ai-local/scripts/processes.mjs +467 -55
- package/presets/_shared/ai-local/scripts/team-db-api.mjs +564 -10
- package/presets/_shared/ai-local/scripts/team-db-openapi.mjs +816 -47
- package/presets/_shared/ai-local/scripts/team-db-project.mjs +659 -5
- package/presets/_shared/ai-local/scripts/team-db-schema.mjs +135 -0
- package/presets/_shared/ai-local/scripts/team-db-task-runner.mjs +11 -6
- package/presets/_shared/ai-local/scripts/team-db.mjs +16 -54
- package/presets/_shared/core/agent-team/agent-team-orchestrator.md +5 -5
- package/presets/_shared/core/architecture/feature-delivery-workflow.md +3 -7
- package/presets/_shared/core/meta/preset-pr-checklist.md +2 -2
- package/presets/_shared/core/quality/code-quality-and-refactoring.md +2 -6
- package/presets/_shared/core/quality/verification-before-completion.md +20 -3
- package/presets/_shared/hooks/chain-team-phases.sh.tmpl +12 -3
- package/presets/claude/android-kotlin/REPO_AGENTS.md +7 -47
- package/presets/claude/android-kotlin/hooks/chain-team-phases.sh +12 -3
- package/presets/claude/android-kotlin/rules/tooling-and-review/agent-team-orchestrator.md +5 -5
- package/presets/claude/android-kotlin/rules/tooling-and-review/code-quality.md +2 -6
- package/presets/claude/android-kotlin/rules/tooling-and-review/preset-pr-checklist.md +2 -2
- package/presets/claude/go/REPO_AGENTS.md +7 -47
- package/presets/claude/go/hooks/chain-team-phases.sh +12 -3
- package/presets/claude/go/rules/architecture/feature-delivery.md +3 -7
- package/presets/claude/go/rules/tooling-and-review/agent-team-orchestrator.md +5 -5
- package/presets/claude/go/rules/tooling-and-review/code-quality.md +2 -6
- package/presets/claude/go/rules/tooling-and-review/preset-pr-checklist.md +2 -2
- package/presets/claude/ios-swift/REPO_AGENTS.md +7 -47
- package/presets/claude/ios-swift/hooks/chain-team-phases.sh +12 -3
- package/presets/claude/ios-swift/rules/architecture/feature-delivery.md +3 -7
- package/presets/claude/ios-swift/rules/tooling-and-review/agent-team-orchestrator.md +5 -5
- package/presets/claude/ios-swift/rules/tooling-and-review/code-quality.md +2 -6
- package/presets/claude/ios-swift/rules/tooling-and-review/preset-pr-checklist.md +2 -2
- package/presets/claude/java/REPO_AGENTS.md +7 -47
- package/presets/claude/java/hooks/chain-team-phases.sh +12 -3
- package/presets/claude/java/rules/architecture/feature-delivery.md +3 -7
- package/presets/claude/java/rules/tooling-and-review/agent-team-orchestrator.md +5 -5
- package/presets/claude/java/rules/tooling-and-review/code-quality.md +2 -6
- package/presets/claude/java/rules/tooling-and-review/preset-pr-checklist.md +2 -2
- package/presets/claude/mcp-ts/REPO_AGENTS.md +7 -47
- package/presets/claude/mcp-ts/hooks/chain-team-phases.sh +12 -3
- package/presets/claude/mcp-ts/rules/architecture/feature-delivery.md +3 -7
- package/presets/claude/mcp-ts/rules/tooling-and-review/agent-team-orchestrator.md +5 -5
- package/presets/claude/mcp-ts/rules/tooling-and-review/code-quality.md +2 -6
- package/presets/claude/mcp-ts/rules/tooling-and-review/preset-pr-checklist.md +2 -2
- package/presets/claude/mol/REPO_AGENTS.md +9 -49
- package/presets/claude/mol/hooks/chain-team-phases.sh +12 -3
- package/presets/claude/mol/rules/architecture/feature-delivery-workflow.md +3 -7
- package/presets/claude/mol/rules/tooling-and-review/agent-team-orchestrator.md +5 -5
- package/presets/claude/mol/rules/tooling-and-review/code-quality.md +2 -6
- package/presets/claude/mol/rules/tooling-and-review/preset-pr-checklist.md +2 -2
- package/presets/claude/next/REPO_AGENTS.md +10 -50
- package/presets/claude/next/agents/accessibility-reviewer.md +0 -1
- package/presets/claude/next/agents/api-contract-reviewer.md +0 -1
- package/presets/claude/next/agents/build-verifier.md +12 -8
- package/presets/claude/next/agents/code-reviewer.md +1 -1
- package/presets/claude/next/agents/codebase-analyzer.md +0 -1
- package/presets/claude/next/agents/feature-developer.md +6 -6
- package/presets/claude/next/agents/migration-specialist.md +0 -1
- package/presets/claude/next/agents/mockup-reviewer.md +0 -1
- package/presets/claude/next/agents/openspec-author.md +0 -1
- package/presets/claude/next/agents/performance-auditor.md +0 -1
- package/presets/claude/next/agents/playwright-test-generator.md +0 -1
- package/presets/claude/next/agents/playwright-test-healer.md +0 -1
- package/presets/claude/next/agents/playwright-test-planner.md +0 -1
- package/presets/claude/next/agents/qa-tester.md +3 -3
- package/presets/claude/next/agents/security-reviewer.md +0 -1
- package/presets/claude/next/agents/solution-architect.md +0 -1
- package/presets/claude/next/agents/task-analyst.md +0 -1
- package/presets/claude/next/agents/task-router.md +8 -7
- package/presets/claude/next/agents/tech-writer.md +0 -1
- package/presets/claude/next/agents/unit-test-generator.md +0 -1
- package/presets/claude/next/agents/unit-test-healer.md +0 -1
- package/presets/claude/next/agents/unit-test-planner.md +0 -1
- package/presets/claude/next/commands/README.md +0 -6
- package/presets/claude/next/hooks/chain-team-phases.sh +12 -3
- package/presets/claude/next/rules/architecture/feature-delivery-workflow.md +5 -9
- package/presets/claude/next/rules/tooling-and-review/agent-team-orchestrator.md +5 -5
- package/presets/claude/next/rules/tooling-and-review/code-quality.md +2 -6
- package/presets/claude/next/rules/tooling-and-review/post-change-lint.md +12 -16
- package/presets/claude/next/rules/tooling-and-review/preset-pr-checklist.md +2 -2
- package/presets/claude/next/skills/feature-delivery/SKILL.md +1 -1
- package/presets/claude/next/skills/playwright-e2e/SKILL.md +1 -1
- package/presets/claude/next/skills/unit-testing/SKILL.md +1 -1
- package/presets/claude/nuxt/REPO_AGENTS.md +8 -48
- package/presets/claude/nuxt/agents/accessibility-reviewer.md +0 -1
- package/presets/claude/nuxt/agents/api-contract-reviewer.md +0 -1
- package/presets/claude/nuxt/agents/build-verifier.md +5 -3
- package/presets/claude/nuxt/agents/ci-investigator.md +1 -1
- package/presets/claude/nuxt/agents/code-reviewer.md +0 -1
- package/presets/claude/nuxt/agents/codebase-analyzer.md +0 -1
- package/presets/claude/nuxt/agents/debugger.md +1 -1
- package/presets/claude/nuxt/agents/feature-developer.md +6 -6
- package/presets/claude/nuxt/agents/migration-specialist.md +0 -1
- package/presets/claude/nuxt/agents/mockup-reviewer.md +0 -1
- package/presets/claude/nuxt/agents/openspec-author.md +0 -1
- package/presets/claude/nuxt/agents/performance-auditor.md +0 -1
- package/presets/claude/nuxt/agents/playwright-test-generator.md +0 -1
- package/presets/claude/nuxt/agents/playwright-test-healer.md +0 -1
- package/presets/claude/nuxt/agents/playwright-test-planner.md +0 -1
- package/presets/claude/nuxt/agents/qa-tester.md +3 -3
- package/presets/claude/nuxt/agents/security-reviewer.md +0 -1
- package/presets/claude/nuxt/agents/solution-architect.md +0 -1
- package/presets/claude/nuxt/agents/task-analyst.md +0 -1
- package/presets/claude/nuxt/agents/task-router.md +8 -7
- package/presets/claude/nuxt/agents/tech-writer.md +0 -1
- package/presets/claude/nuxt/agents/unit-test-generator.md +0 -1
- package/presets/claude/nuxt/agents/unit-test-healer.md +0 -1
- package/presets/claude/nuxt/agents/unit-test-planner.md +0 -1
- package/presets/claude/nuxt/hooks/chain-team-phases.sh +12 -3
- package/presets/claude/nuxt/rules/architecture/feature-delivery-workflow.md +3 -7
- package/presets/claude/nuxt/rules/tooling-and-review/agent-team-orchestrator.md +5 -5
- package/presets/claude/nuxt/rules/tooling-and-review/code-quality.md +2 -6
- package/presets/claude/nuxt/rules/tooling-and-review/post-change-lint.md +14 -14
- package/presets/claude/nuxt/rules/tooling-and-review/preset-pr-checklist.md +2 -2
- package/presets/claude/nuxt/skills/feature-delivery/SKILL.md +1 -1
- package/presets/claude/nuxt/skills/playwright-e2e/SKILL.md +1 -1
- package/presets/claude/nuxt/skills/unit-testing/SKILL.md +1 -1
- package/presets/claude/php-hexagonal/REPO_AGENTS.md +7 -47
- package/presets/claude/php-hexagonal/hooks/chain-team-phases.sh +12 -3
- package/presets/claude/php-hexagonal/rules/architecture/feature-delivery.md +3 -7
- package/presets/claude/php-hexagonal/rules/tooling-and-review/agent-team-orchestrator.md +5 -5
- package/presets/claude/php-hexagonal/rules/tooling-and-review/code-quality.md +2 -6
- package/presets/claude/php-hexagonal/rules/tooling-and-review/preset-pr-checklist.md +2 -2
- package/presets/claude/php-laravel/REPO_AGENTS.md +7 -47
- package/presets/claude/php-laravel/hooks/chain-team-phases.sh +12 -3
- package/presets/claude/php-laravel/rules/architecture/feature-delivery.md +3 -7
- package/presets/claude/php-laravel/rules/tooling-and-review/agent-team-orchestrator.md +5 -5
- package/presets/claude/php-laravel/rules/tooling-and-review/code-quality.md +2 -6
- package/presets/claude/php-laravel/rules/tooling-and-review/preset-pr-checklist.md +2 -2
- package/presets/claude/svelte/REPO_AGENTS.md +8 -48
- package/presets/claude/svelte/agents/accessibility-reviewer.md +0 -1
- package/presets/claude/svelte/agents/api-contract-reviewer.md +0 -1
- package/presets/claude/svelte/agents/build-verifier.md +5 -3
- package/presets/claude/svelte/agents/ci-investigator.md +1 -1
- package/presets/claude/svelte/agents/code-reviewer.md +0 -1
- package/presets/claude/svelte/agents/codebase-analyzer.md +0 -1
- package/presets/claude/svelte/agents/debugger.md +1 -1
- package/presets/claude/svelte/agents/feature-developer.md +6 -6
- package/presets/claude/svelte/agents/migration-specialist.md +0 -1
- package/presets/claude/svelte/agents/mockup-reviewer.md +0 -1
- package/presets/claude/svelte/agents/openspec-author.md +0 -1
- package/presets/claude/svelte/agents/performance-auditor.md +0 -1
- package/presets/claude/svelte/agents/playwright-test-generator.md +0 -1
- package/presets/claude/svelte/agents/playwright-test-healer.md +0 -1
- package/presets/claude/svelte/agents/playwright-test-planner.md +0 -1
- package/presets/claude/svelte/agents/qa-tester.md +3 -3
- package/presets/claude/svelte/agents/security-reviewer.md +0 -1
- package/presets/claude/svelte/agents/solution-architect.md +0 -1
- package/presets/claude/svelte/agents/task-analyst.md +0 -1
- package/presets/claude/svelte/agents/task-router.md +8 -7
- package/presets/claude/svelte/agents/tech-writer.md +0 -1
- package/presets/claude/svelte/agents/unit-test-generator.md +0 -1
- package/presets/claude/svelte/agents/unit-test-healer.md +0 -1
- package/presets/claude/svelte/agents/unit-test-planner.md +0 -1
- package/presets/claude/svelte/hooks/chain-team-phases.sh +12 -3
- package/presets/claude/svelte/rules/architecture/feature-delivery-workflow.md +3 -7
- package/presets/claude/svelte/rules/tooling-and-review/agent-team-orchestrator.md +5 -5
- package/presets/claude/svelte/rules/tooling-and-review/code-quality.md +2 -6
- package/presets/claude/svelte/rules/tooling-and-review/post-change-lint.md +14 -14
- package/presets/claude/svelte/rules/tooling-and-review/preset-pr-checklist.md +2 -2
- package/presets/claude/svelte/skills/feature-delivery/SKILL.md +1 -1
- package/presets/claude/svelte/skills/playwright-e2e/SKILL.md +1 -1
- package/presets/claude/svelte/skills/unit-testing/SKILL.md +1 -1
- package/presets/cursor/android-kotlin/AGENTS.md +0 -10
- package/presets/cursor/android-kotlin/REPO_AGENTS.md +7 -47
- package/presets/cursor/android-kotlin/hooks/chain-team-phases.sh +12 -3
- package/presets/cursor/android-kotlin/rules/code-quality-and-refactoring.mdc +2 -6
- package/presets/cursor/android-kotlin/rules/preset-pr-checklist.mdc +2 -2
- package/presets/cursor/go/AGENTS.md +0 -8
- package/presets/cursor/go/REPO_AGENTS.md +7 -47
- package/presets/cursor/go/hooks/chain-team-phases.sh +12 -3
- package/presets/cursor/go/rules/code-quality-and-refactoring.mdc +2 -6
- package/presets/cursor/go/rules/preset-pr-checklist.mdc +2 -2
- package/presets/cursor/ios-swift/AGENTS.md +0 -10
- package/presets/cursor/ios-swift/REPO_AGENTS.md +7 -47
- package/presets/cursor/ios-swift/hooks/chain-team-phases.sh +12 -3
- package/presets/cursor/ios-swift/rules/code-quality-and-refactoring.mdc +2 -6
- package/presets/cursor/ios-swift/rules/preset-pr-checklist.mdc +2 -2
- package/presets/cursor/java/AGENTS.md +0 -8
- package/presets/cursor/java/REPO_AGENTS.md +7 -47
- package/presets/cursor/java/hooks/chain-team-phases.sh +12 -3
- package/presets/cursor/java/rules/code-quality-and-refactoring.mdc +2 -6
- package/presets/cursor/java/rules/preset-pr-checklist.mdc +2 -2
- package/presets/cursor/mcp-ts/AGENTS.md +0 -6
- package/presets/cursor/mcp-ts/REPO_AGENTS.md +7 -47
- package/presets/cursor/mcp-ts/hooks/chain-team-phases.sh +12 -3
- package/presets/cursor/mcp-ts/rules/code-quality-and-refactoring.mdc +2 -6
- package/presets/cursor/mcp-ts/rules/preset-pr-checklist.mdc +2 -2
- package/presets/cursor/mol/AGENTS.md +0 -11
- package/presets/cursor/mol/REPO_AGENTS.md +9 -49
- package/presets/cursor/mol/hooks/chain-team-phases.sh +12 -3
- package/presets/cursor/mol/rules/code-quality-and-refactoring.mdc +2 -6
- package/presets/cursor/mol/rules/preset-pr-checklist.mdc +2 -2
- package/presets/cursor/next/AGENTS.md +1 -12
- package/presets/cursor/next/REPO_AGENTS.md +10 -50
- package/presets/cursor/next/agents/build-verifier.md +11 -7
- package/presets/cursor/next/agents/code-reviewer.md +1 -0
- package/presets/cursor/next/agents/feature-developer.md +6 -6
- package/presets/cursor/next/agents/qa-tester.md +3 -2
- package/presets/cursor/next/agents/task-router.md +8 -6
- package/presets/cursor/next/commands/README.md +0 -6
- package/presets/cursor/next/hooks/chain-team-phases.sh +12 -3
- package/presets/cursor/next/rules/agent-team-orchestrator.mdc +4 -4
- package/presets/cursor/next/rules/code-quality-and-refactoring.mdc +2 -6
- package/presets/cursor/next/rules/feature-delivery-workflow.mdc +2 -2
- package/presets/cursor/next/rules/post-change-lint.mdc +12 -16
- package/presets/cursor/next/rules/preset-pr-checklist.mdc +2 -2
- package/presets/cursor/next/skills/feature-delivery/SKILL.md +1 -1
- package/presets/cursor/next/skills/playwright-e2e/SKILL.md +1 -1
- package/presets/cursor/next/skills/unit-testing/SKILL.md +1 -1
- package/presets/cursor/nuxt/AGENTS.md +1 -12
- package/presets/cursor/nuxt/REPO_AGENTS.md +8 -48
- package/presets/cursor/nuxt/agents/build-verifier.md +1 -1
- package/presets/cursor/nuxt/agents/feature-developer.md +2 -2
- package/presets/cursor/nuxt/agents/qa-tester.md +3 -2
- package/presets/cursor/nuxt/agents/task-router.md +8 -6
- package/presets/cursor/nuxt/hooks/chain-team-phases.sh +12 -3
- package/presets/cursor/nuxt/rules/code-quality-and-refactoring.mdc +2 -6
- package/presets/cursor/nuxt/rules/post-change-lint.mdc +14 -14
- package/presets/cursor/nuxt/rules/preset-pr-checklist.mdc +2 -2
- package/presets/cursor/nuxt/skills/feature-delivery/SKILL.md +1 -1
- package/presets/cursor/nuxt/skills/playwright-e2e/SKILL.md +1 -1
- package/presets/cursor/nuxt/skills/unit-testing/SKILL.md +1 -1
- package/presets/cursor/php-hexagonal/AGENTS.md +0 -8
- package/presets/cursor/php-hexagonal/REPO_AGENTS.md +7 -47
- package/presets/cursor/php-hexagonal/hooks/chain-team-phases.sh +12 -3
- package/presets/cursor/php-hexagonal/rules/code-quality-and-refactoring.mdc +2 -6
- package/presets/cursor/php-hexagonal/rules/preset-pr-checklist.mdc +2 -2
- package/presets/cursor/php-laravel/AGENTS.md +0 -8
- package/presets/cursor/php-laravel/REPO_AGENTS.md +7 -47
- package/presets/cursor/php-laravel/hooks/chain-team-phases.sh +12 -3
- package/presets/cursor/php-laravel/rules/code-quality-and-refactoring.mdc +2 -6
- package/presets/cursor/php-laravel/rules/preset-pr-checklist.mdc +2 -2
- package/presets/cursor/svelte/AGENTS.md +1 -12
- package/presets/cursor/svelte/REPO_AGENTS.md +8 -48
- package/presets/cursor/svelte/agents/build-verifier.md +1 -1
- package/presets/cursor/svelte/agents/feature-developer.md +2 -2
- package/presets/cursor/svelte/agents/qa-tester.md +3 -2
- package/presets/cursor/svelte/agents/task-router.md +8 -6
- package/presets/cursor/svelte/hooks/chain-team-phases.sh +12 -3
- package/presets/cursor/svelte/rules/code-quality-and-refactoring.mdc +2 -6
- package/presets/cursor/svelte/rules/post-change-lint.mdc +14 -14
- package/presets/cursor/svelte/rules/preset-pr-checklist.mdc +2 -2
- package/presets/cursor/svelte/skills/feature-delivery/SKILL.md +1 -1
- package/presets/cursor/svelte/skills/playwright-e2e/SKILL.md +1 -1
- package/presets/cursor/svelte/skills/unit-testing/SKILL.md +1 -1
- package/presets/mavis/android-kotlin/MAVIS.md +0 -2
- package/presets/mavis/android-kotlin/REPO_AGENTS.md +7 -47
- package/presets/mavis/android-kotlin/adapter-map.json +1 -1
- package/presets/mavis/android-kotlin/hooks/chain-team-phases.sh +12 -3
- package/presets/mavis/android-kotlin/rules/agent-team-orchestrator.md +5 -5
- package/presets/mavis/android-kotlin/rules/code-quality-and-refactoring.md +2 -6
- package/presets/mavis/android-kotlin/rules/preset-pr-checklist.md +2 -2
- package/presets/mavis/go/MAVIS.md +8 -0
- package/presets/mavis/go/REPO_AGENTS.md +7 -47
- package/presets/mavis/go/adapter-map.json +1 -1
- package/presets/mavis/go/hooks/chain-team-phases.sh +12 -3
- package/presets/mavis/go/rules/agent-team-orchestrator.md +5 -5
- package/presets/mavis/go/rules/code-quality-and-refactoring.md +2 -6
- package/presets/mavis/go/rules/feature-delivery-workflow.md +3 -7
- package/presets/mavis/go/rules/preset-pr-checklist.md +2 -2
- package/presets/mavis/ios-swift/MAVIS.md +0 -2
- package/presets/mavis/ios-swift/REPO_AGENTS.md +7 -47
- package/presets/mavis/ios-swift/adapter-map.json +1 -1
- package/presets/mavis/ios-swift/hooks/chain-team-phases.sh +12 -3
- package/presets/mavis/ios-swift/rules/agent-team-orchestrator.md +5 -5
- package/presets/mavis/ios-swift/rules/code-quality-and-refactoring.md +2 -6
- package/presets/mavis/ios-swift/rules/feature-delivery-workflow.md +3 -7
- package/presets/mavis/ios-swift/rules/preset-pr-checklist.md +2 -2
- package/presets/mavis/java/MAVIS.md +14 -0
- package/presets/mavis/java/REPO_AGENTS.md +7 -47
- package/presets/mavis/java/adapter-map.json +1 -1
- package/presets/mavis/java/hooks/chain-team-phases.sh +12 -3
- package/presets/mavis/java/rules/agent-team-orchestrator.md +5 -5
- package/presets/mavis/java/rules/code-quality-and-refactoring.md +2 -6
- package/presets/mavis/java/rules/feature-delivery-workflow.md +3 -7
- package/presets/mavis/java/rules/preset-pr-checklist.md +2 -2
- package/presets/mavis/mcp-ts/MAVIS.md +6 -0
- package/presets/mavis/mcp-ts/REPO_AGENTS.md +7 -47
- package/presets/mavis/mcp-ts/adapter-map.json +1 -1
- package/presets/mavis/mcp-ts/hooks/chain-team-phases.sh +12 -3
- package/presets/mavis/mcp-ts/rules/agent-team-orchestrator.md +5 -5
- package/presets/mavis/mcp-ts/rules/code-quality-and-refactoring.md +2 -6
- package/presets/mavis/mcp-ts/rules/feature-delivery-workflow.md +3 -7
- package/presets/mavis/mcp-ts/rules/preset-pr-checklist.md +2 -2
- package/presets/mavis/mol/MAVIS.md +1 -5
- package/presets/mavis/mol/REPO_AGENTS.md +9 -49
- package/presets/mavis/mol/adapter-map.json +1 -1
- package/presets/mavis/mol/hooks/chain-team-phases.sh +12 -3
- package/presets/mavis/mol/rules/agent-team-orchestrator.md +5 -5
- package/presets/mavis/mol/rules/code-quality-and-refactoring.md +2 -6
- package/presets/mavis/mol/rules/feature-delivery-workflow.md +3 -7
- package/presets/mavis/mol/rules/preset-pr-checklist.md +2 -2
- package/presets/mavis/next/MAVIS.md +2 -6
- package/presets/mavis/next/REPO_AGENTS.md +10 -50
- package/presets/mavis/next/adapter-map.json +1 -17
- package/presets/mavis/next/agents/accessibility-reviewer.md +0 -1
- package/presets/mavis/next/agents/api-contract-reviewer.md +0 -1
- package/presets/mavis/next/agents/build-verifier.md +12 -8
- package/presets/mavis/next/agents/code-reviewer.md +1 -1
- package/presets/mavis/next/agents/codebase-analyzer.md +0 -1
- package/presets/mavis/next/agents/feature-developer.md +6 -6
- package/presets/mavis/next/agents/migration-specialist.md +0 -1
- package/presets/mavis/next/agents/mockup-reviewer.md +0 -1
- package/presets/mavis/next/agents/openspec-author.md +0 -1
- package/presets/mavis/next/agents/performance-auditor.md +0 -1
- package/presets/mavis/next/agents/playwright-test-generator.md +0 -1
- package/presets/mavis/next/agents/playwright-test-healer.md +0 -1
- package/presets/mavis/next/agents/playwright-test-planner.md +0 -1
- package/presets/mavis/next/agents/qa-tester.md +3 -3
- package/presets/mavis/next/agents/security-reviewer.md +0 -1
- package/presets/mavis/next/agents/solution-architect.md +0 -1
- package/presets/mavis/next/agents/task-analyst.md +0 -1
- package/presets/mavis/next/agents/task-router.md +8 -7
- package/presets/mavis/next/agents/tech-writer.md +0 -1
- package/presets/mavis/next/agents/unit-test-generator.md +0 -1
- package/presets/mavis/next/agents/unit-test-healer.md +0 -1
- package/presets/mavis/next/agents/unit-test-planner.md +0 -1
- package/presets/mavis/next/commands/README.md +0 -6
- package/presets/mavis/next/hooks/chain-team-phases.sh +12 -3
- package/presets/mavis/next/rules/agent-team-orchestrator.md +5 -5
- package/presets/mavis/next/rules/code-quality-and-refactoring.md +2 -6
- package/presets/mavis/next/rules/feature-delivery-workflow.md +5 -9
- package/presets/mavis/next/rules/post-change-lint.md +11 -15
- package/presets/mavis/next/rules/preset-pr-checklist.md +2 -2
- package/presets/mavis/next/skills/feature-delivery/SKILL.md +1 -1
- package/presets/mavis/next/skills/playwright-e2e/SKILL.md +1 -1
- package/presets/mavis/next/skills/unit-testing/SKILL.md +1 -1
- package/presets/mavis/nuxt/MAVIS.md +2 -6
- package/presets/mavis/nuxt/REPO_AGENTS.md +8 -48
- package/presets/mavis/nuxt/adapter-map.json +1 -1
- package/presets/mavis/nuxt/agents/accessibility-reviewer.md +0 -1
- package/presets/mavis/nuxt/agents/api-contract-reviewer.md +0 -1
- package/presets/mavis/nuxt/agents/build-verifier.md +2 -2
- package/presets/mavis/nuxt/agents/ci-investigator.md +1 -1
- package/presets/mavis/nuxt/agents/code-reviewer.md +0 -1
- package/presets/mavis/nuxt/agents/codebase-analyzer.md +0 -1
- package/presets/mavis/nuxt/agents/debugger.md +1 -1
- package/presets/mavis/nuxt/agents/feature-developer.md +3 -3
- package/presets/mavis/nuxt/agents/migration-specialist.md +0 -1
- package/presets/mavis/nuxt/agents/mockup-reviewer.md +0 -1
- package/presets/mavis/nuxt/agents/openspec-author.md +0 -1
- package/presets/mavis/nuxt/agents/performance-auditor.md +0 -1
- package/presets/mavis/nuxt/agents/playwright-test-generator.md +0 -1
- package/presets/mavis/nuxt/agents/playwright-test-healer.md +0 -1
- package/presets/mavis/nuxt/agents/playwright-test-planner.md +0 -1
- package/presets/mavis/nuxt/agents/qa-tester.md +3 -3
- package/presets/mavis/nuxt/agents/security-reviewer.md +0 -1
- package/presets/mavis/nuxt/agents/solution-architect.md +0 -1
- package/presets/mavis/nuxt/agents/task-analyst.md +0 -1
- package/presets/mavis/nuxt/agents/task-router.md +8 -7
- package/presets/mavis/nuxt/agents/tech-writer.md +0 -1
- package/presets/mavis/nuxt/agents/unit-test-generator.md +0 -1
- package/presets/mavis/nuxt/agents/unit-test-healer.md +0 -1
- package/presets/mavis/nuxt/agents/unit-test-planner.md +0 -1
- package/presets/mavis/nuxt/hooks/chain-team-phases.sh +12 -3
- package/presets/mavis/nuxt/rules/agent-team-orchestrator.md +5 -5
- package/presets/mavis/nuxt/rules/code-quality-and-refactoring.md +2 -6
- package/presets/mavis/nuxt/rules/feature-delivery-workflow.md +3 -7
- package/presets/mavis/nuxt/rules/post-change-lint.md +13 -13
- package/presets/mavis/nuxt/rules/preset-pr-checklist.md +2 -2
- package/presets/mavis/nuxt/skills/feature-delivery/SKILL.md +1 -1
- package/presets/mavis/nuxt/skills/playwright-e2e/SKILL.md +1 -1
- package/presets/mavis/nuxt/skills/unit-testing/SKILL.md +1 -1
- package/presets/mavis/php-hexagonal/MAVIS.md +16 -0
- package/presets/mavis/php-hexagonal/REPO_AGENTS.md +7 -47
- package/presets/mavis/php-hexagonal/adapter-map.json +1 -1
- package/presets/mavis/php-hexagonal/hooks/chain-team-phases.sh +12 -3
- package/presets/mavis/php-hexagonal/rules/agent-team-orchestrator.md +5 -5
- package/presets/mavis/php-hexagonal/rules/code-quality-and-refactoring.md +2 -6
- package/presets/mavis/php-hexagonal/rules/feature-delivery-workflow.md +3 -7
- package/presets/mavis/php-hexagonal/rules/preset-pr-checklist.md +2 -2
- package/presets/mavis/php-laravel/MAVIS.md +16 -0
- package/presets/mavis/php-laravel/REPO_AGENTS.md +7 -47
- package/presets/mavis/php-laravel/adapter-map.json +1 -1
- package/presets/mavis/php-laravel/hooks/chain-team-phases.sh +12 -3
- package/presets/mavis/php-laravel/rules/agent-team-orchestrator.md +5 -5
- package/presets/mavis/php-laravel/rules/code-quality-and-refactoring.md +2 -6
- package/presets/mavis/php-laravel/rules/feature-delivery-workflow.md +3 -7
- package/presets/mavis/php-laravel/rules/preset-pr-checklist.md +2 -2
- package/presets/mavis/svelte/MAVIS.md +2 -6
- package/presets/mavis/svelte/REPO_AGENTS.md +8 -48
- package/presets/mavis/svelte/adapter-map.json +1 -1
- package/presets/mavis/svelte/agents/accessibility-reviewer.md +0 -1
- package/presets/mavis/svelte/agents/api-contract-reviewer.md +0 -1
- package/presets/mavis/svelte/agents/build-verifier.md +2 -2
- package/presets/mavis/svelte/agents/ci-investigator.md +1 -1
- package/presets/mavis/svelte/agents/code-reviewer.md +0 -1
- package/presets/mavis/svelte/agents/codebase-analyzer.md +0 -1
- package/presets/mavis/svelte/agents/debugger.md +1 -1
- package/presets/mavis/svelte/agents/feature-developer.md +3 -3
- package/presets/mavis/svelte/agents/migration-specialist.md +0 -1
- package/presets/mavis/svelte/agents/mockup-reviewer.md +0 -1
- package/presets/mavis/svelte/agents/openspec-author.md +0 -1
- package/presets/mavis/svelte/agents/performance-auditor.md +0 -1
- package/presets/mavis/svelte/agents/playwright-test-generator.md +0 -1
- package/presets/mavis/svelte/agents/playwright-test-healer.md +0 -1
- package/presets/mavis/svelte/agents/playwright-test-planner.md +0 -1
- package/presets/mavis/svelte/agents/qa-tester.md +3 -3
- package/presets/mavis/svelte/agents/security-reviewer.md +0 -1
- package/presets/mavis/svelte/agents/solution-architect.md +0 -1
- package/presets/mavis/svelte/agents/task-analyst.md +0 -1
- package/presets/mavis/svelte/agents/task-router.md +8 -7
- package/presets/mavis/svelte/agents/tech-writer.md +0 -1
- package/presets/mavis/svelte/agents/unit-test-generator.md +0 -1
- package/presets/mavis/svelte/agents/unit-test-healer.md +0 -1
- package/presets/mavis/svelte/agents/unit-test-planner.md +0 -1
- package/presets/mavis/svelte/hooks/chain-team-phases.sh +12 -3
- package/presets/mavis/svelte/rules/agent-team-orchestrator.md +5 -5
- package/presets/mavis/svelte/rules/code-quality-and-refactoring.md +2 -6
- package/presets/mavis/svelte/rules/feature-delivery-workflow.md +3 -7
- package/presets/mavis/svelte/rules/post-change-lint.md +13 -13
- package/presets/mavis/svelte/rules/preset-pr-checklist.md +2 -2
- package/presets/mavis/svelte/skills/feature-delivery/SKILL.md +1 -1
- package/presets/mavis/svelte/skills/playwright-e2e/SKILL.md +1 -1
- package/presets/mavis/svelte/skills/unit-testing/SKILL.md +1 -1
- package/presets/opencode/android-kotlin/OPENCODE.md +1 -43
- package/presets/opencode/android-kotlin/REPO_AGENTS.md +7 -47
- package/presets/opencode/android-kotlin/adapter-map.json +1 -1
- package/presets/opencode/android-kotlin/hooks/chain-team-phases.sh +12 -3
- package/presets/opencode/android-kotlin/rules/agent-team-orchestrator.md +5 -5
- package/presets/opencode/android-kotlin/rules/code-quality-and-refactoring.md +2 -6
- package/presets/opencode/android-kotlin/rules/preset-pr-checklist.md +2 -2
- package/presets/opencode/go/OPENCODE.md +7 -39
- package/presets/opencode/go/REPO_AGENTS.md +7 -47
- package/presets/opencode/go/adapter-map.json +1 -1
- package/presets/opencode/go/hooks/chain-team-phases.sh +12 -3
- package/presets/opencode/go/rules/agent-team-orchestrator.md +5 -5
- package/presets/opencode/go/rules/code-quality-and-refactoring.md +2 -6
- package/presets/opencode/go/rules/feature-delivery-workflow.md +3 -7
- package/presets/opencode/go/rules/preset-pr-checklist.md +2 -2
- package/presets/opencode/ios-swift/OPENCODE.md +1 -43
- package/presets/opencode/ios-swift/REPO_AGENTS.md +7 -47
- package/presets/opencode/ios-swift/adapter-map.json +1 -1
- package/presets/opencode/ios-swift/hooks/chain-team-phases.sh +12 -3
- package/presets/opencode/ios-swift/rules/agent-team-orchestrator.md +5 -5
- package/presets/opencode/ios-swift/rules/code-quality-and-refactoring.md +2 -6
- package/presets/opencode/ios-swift/rules/feature-delivery-workflow.md +3 -7
- package/presets/opencode/ios-swift/rules/preset-pr-checklist.md +2 -2
- package/presets/opencode/java/OPENCODE.md +12 -38
- package/presets/opencode/java/REPO_AGENTS.md +7 -47
- package/presets/opencode/java/adapter-map.json +1 -1
- package/presets/opencode/java/hooks/chain-team-phases.sh +12 -3
- package/presets/opencode/java/rules/agent-team-orchestrator.md +5 -5
- package/presets/opencode/java/rules/code-quality-and-refactoring.md +2 -6
- package/presets/opencode/java/rules/feature-delivery-workflow.md +3 -7
- package/presets/opencode/java/rules/preset-pr-checklist.md +2 -2
- package/presets/opencode/mcp-ts/OPENCODE.md +5 -39
- package/presets/opencode/mcp-ts/REPO_AGENTS.md +7 -47
- package/presets/opencode/mcp-ts/adapter-map.json +1 -1
- package/presets/opencode/mcp-ts/hooks/chain-team-phases.sh +12 -3
- package/presets/opencode/mcp-ts/rules/agent-team-orchestrator.md +5 -5
- package/presets/opencode/mcp-ts/rules/code-quality-and-refactoring.md +2 -6
- package/presets/opencode/mcp-ts/rules/feature-delivery-workflow.md +3 -7
- package/presets/opencode/mcp-ts/rules/preset-pr-checklist.md +2 -2
- package/presets/opencode/mol/OPENCODE.md +1 -44
- package/presets/opencode/mol/REPO_AGENTS.md +9 -49
- package/presets/opencode/mol/adapter-map.json +1 -1
- package/presets/opencode/mol/hooks/chain-team-phases.sh +12 -3
- package/presets/opencode/mol/rules/agent-team-orchestrator.md +5 -5
- package/presets/opencode/mol/rules/code-quality-and-refactoring.md +2 -6
- package/presets/opencode/mol/rules/feature-delivery-workflow.md +3 -7
- package/presets/opencode/mol/rules/preset-pr-checklist.md +2 -2
- package/presets/opencode/next/OPENCODE.md +2 -45
- package/presets/opencode/next/REPO_AGENTS.md +10 -50
- package/presets/opencode/next/adapter-map.json +1 -17
- package/presets/opencode/next/agents/accessibility-reviewer.md +0 -1
- package/presets/opencode/next/agents/api-contract-reviewer.md +0 -1
- package/presets/opencode/next/agents/build-verifier.md +12 -8
- package/presets/opencode/next/agents/code-reviewer.md +1 -1
- package/presets/opencode/next/agents/codebase-analyzer.md +0 -1
- package/presets/opencode/next/agents/feature-developer.md +6 -6
- package/presets/opencode/next/agents/migration-specialist.md +0 -1
- package/presets/opencode/next/agents/mockup-reviewer.md +0 -1
- package/presets/opencode/next/agents/openspec-author.md +0 -1
- package/presets/opencode/next/agents/performance-auditor.md +0 -1
- package/presets/opencode/next/agents/playwright-test-generator.md +0 -1
- package/presets/opencode/next/agents/playwright-test-healer.md +0 -1
- package/presets/opencode/next/agents/playwright-test-planner.md +0 -1
- package/presets/opencode/next/agents/qa-tester.md +3 -3
- package/presets/opencode/next/agents/security-reviewer.md +0 -1
- package/presets/opencode/next/agents/solution-architect.md +0 -1
- package/presets/opencode/next/agents/task-analyst.md +0 -1
- package/presets/opencode/next/agents/task-router.md +8 -7
- package/presets/opencode/next/agents/tech-writer.md +0 -1
- package/presets/opencode/next/agents/unit-test-generator.md +0 -1
- package/presets/opencode/next/agents/unit-test-healer.md +0 -1
- package/presets/opencode/next/agents/unit-test-planner.md +0 -1
- package/presets/opencode/next/commands/README.md +0 -6
- package/presets/opencode/next/hooks/chain-team-phases.sh +12 -3
- package/presets/opencode/next/rules/agent-team-orchestrator.md +5 -5
- package/presets/opencode/next/rules/code-quality-and-refactoring.md +2 -6
- package/presets/opencode/next/rules/feature-delivery-workflow.md +5 -9
- package/presets/opencode/next/rules/post-change-lint.md +11 -15
- package/presets/opencode/next/rules/preset-pr-checklist.md +2 -2
- package/presets/opencode/next/skills/feature-delivery/SKILL.md +1 -1
- package/presets/opencode/next/skills/playwright-e2e/SKILL.md +1 -1
- package/presets/opencode/next/skills/unit-testing/SKILL.md +1 -1
- package/presets/opencode/nuxt/OPENCODE.md +2 -45
- package/presets/opencode/nuxt/REPO_AGENTS.md +8 -48
- package/presets/opencode/nuxt/adapter-map.json +1 -1
- package/presets/opencode/nuxt/agents/accessibility-reviewer.md +0 -1
- package/presets/opencode/nuxt/agents/api-contract-reviewer.md +0 -1
- package/presets/opencode/nuxt/agents/build-verifier.md +2 -2
- package/presets/opencode/nuxt/agents/ci-investigator.md +1 -1
- package/presets/opencode/nuxt/agents/code-reviewer.md +0 -1
- package/presets/opencode/nuxt/agents/codebase-analyzer.md +0 -1
- package/presets/opencode/nuxt/agents/debugger.md +1 -1
- package/presets/opencode/nuxt/agents/feature-developer.md +3 -3
- package/presets/opencode/nuxt/agents/migration-specialist.md +0 -1
- package/presets/opencode/nuxt/agents/mockup-reviewer.md +0 -1
- package/presets/opencode/nuxt/agents/openspec-author.md +0 -1
- package/presets/opencode/nuxt/agents/performance-auditor.md +0 -1
- package/presets/opencode/nuxt/agents/playwright-test-generator.md +0 -1
- package/presets/opencode/nuxt/agents/playwright-test-healer.md +0 -1
- package/presets/opencode/nuxt/agents/playwright-test-planner.md +0 -1
- package/presets/opencode/nuxt/agents/qa-tester.md +3 -3
- package/presets/opencode/nuxt/agents/security-reviewer.md +0 -1
- package/presets/opencode/nuxt/agents/solution-architect.md +0 -1
- package/presets/opencode/nuxt/agents/task-analyst.md +0 -1
- package/presets/opencode/nuxt/agents/task-router.md +8 -7
- package/presets/opencode/nuxt/agents/tech-writer.md +0 -1
- package/presets/opencode/nuxt/agents/unit-test-generator.md +0 -1
- package/presets/opencode/nuxt/agents/unit-test-healer.md +0 -1
- package/presets/opencode/nuxt/agents/unit-test-planner.md +0 -1
- package/presets/opencode/nuxt/hooks/chain-team-phases.sh +12 -3
- package/presets/opencode/nuxt/rules/agent-team-orchestrator.md +5 -5
- package/presets/opencode/nuxt/rules/code-quality-and-refactoring.md +2 -6
- package/presets/opencode/nuxt/rules/feature-delivery-workflow.md +3 -7
- package/presets/opencode/nuxt/rules/post-change-lint.md +13 -13
- package/presets/opencode/nuxt/rules/preset-pr-checklist.md +2 -2
- package/presets/opencode/nuxt/skills/feature-delivery/SKILL.md +1 -1
- package/presets/opencode/nuxt/skills/playwright-e2e/SKILL.md +1 -1
- package/presets/opencode/nuxt/skills/unit-testing/SKILL.md +1 -1
- package/presets/opencode/php-hexagonal/OPENCODE.md +14 -38
- package/presets/opencode/php-hexagonal/REPO_AGENTS.md +7 -47
- package/presets/opencode/php-hexagonal/adapter-map.json +1 -1
- package/presets/opencode/php-hexagonal/hooks/chain-team-phases.sh +12 -3
- package/presets/opencode/php-hexagonal/rules/agent-team-orchestrator.md +5 -5
- package/presets/opencode/php-hexagonal/rules/code-quality-and-refactoring.md +2 -6
- package/presets/opencode/php-hexagonal/rules/feature-delivery-workflow.md +3 -7
- package/presets/opencode/php-hexagonal/rules/preset-pr-checklist.md +2 -2
- package/presets/opencode/php-laravel/OPENCODE.md +14 -38
- package/presets/opencode/php-laravel/REPO_AGENTS.md +7 -47
- package/presets/opencode/php-laravel/adapter-map.json +1 -1
- package/presets/opencode/php-laravel/hooks/chain-team-phases.sh +12 -3
- package/presets/opencode/php-laravel/rules/agent-team-orchestrator.md +5 -5
- package/presets/opencode/php-laravel/rules/code-quality-and-refactoring.md +2 -6
- package/presets/opencode/php-laravel/rules/feature-delivery-workflow.md +3 -7
- package/presets/opencode/php-laravel/rules/preset-pr-checklist.md +2 -2
- package/presets/opencode/plugins/output-guard/index.ts +7 -1
- package/presets/opencode/plugins/output-guard/ledger.ts +43 -0
- package/presets/opencode/plugins/task-status/economy.ts +112 -0
- package/presets/opencode/plugins/task-status/task-view.ts +28 -0
- package/presets/opencode/plugins/task-status/tui.tsx +14 -2
- package/presets/opencode/plugins/task-status/types.ts +3 -1
- package/presets/opencode/svelte/OPENCODE.md +2 -45
- package/presets/opencode/svelte/REPO_AGENTS.md +8 -48
- package/presets/opencode/svelte/adapter-map.json +1 -1
- package/presets/opencode/svelte/agents/accessibility-reviewer.md +0 -1
- package/presets/opencode/svelte/agents/api-contract-reviewer.md +0 -1
- package/presets/opencode/svelte/agents/build-verifier.md +2 -2
- package/presets/opencode/svelte/agents/ci-investigator.md +1 -1
- package/presets/opencode/svelte/agents/code-reviewer.md +0 -1
- package/presets/opencode/svelte/agents/codebase-analyzer.md +0 -1
- package/presets/opencode/svelte/agents/debugger.md +1 -1
- package/presets/opencode/svelte/agents/feature-developer.md +3 -3
- package/presets/opencode/svelte/agents/migration-specialist.md +0 -1
- package/presets/opencode/svelte/agents/mockup-reviewer.md +0 -1
- package/presets/opencode/svelte/agents/openspec-author.md +0 -1
- package/presets/opencode/svelte/agents/performance-auditor.md +0 -1
- package/presets/opencode/svelte/agents/playwright-test-generator.md +0 -1
- package/presets/opencode/svelte/agents/playwright-test-healer.md +0 -1
- package/presets/opencode/svelte/agents/playwright-test-planner.md +0 -1
- package/presets/opencode/svelte/agents/qa-tester.md +3 -3
- package/presets/opencode/svelte/agents/security-reviewer.md +0 -1
- package/presets/opencode/svelte/agents/solution-architect.md +0 -1
- package/presets/opencode/svelte/agents/task-analyst.md +0 -1
- package/presets/opencode/svelte/agents/task-router.md +8 -7
- package/presets/opencode/svelte/agents/tech-writer.md +0 -1
- package/presets/opencode/svelte/agents/unit-test-generator.md +0 -1
- package/presets/opencode/svelte/agents/unit-test-healer.md +0 -1
- package/presets/opencode/svelte/agents/unit-test-planner.md +0 -1
- package/presets/opencode/svelte/hooks/chain-team-phases.sh +12 -3
- package/presets/opencode/svelte/rules/agent-team-orchestrator.md +5 -5
- package/presets/opencode/svelte/rules/code-quality-and-refactoring.md +2 -6
- package/presets/opencode/svelte/rules/feature-delivery-workflow.md +3 -7
- package/presets/opencode/svelte/rules/post-change-lint.md +13 -13
- package/presets/opencode/svelte/rules/preset-pr-checklist.md +2 -2
- package/presets/opencode/svelte/skills/feature-delivery/SKILL.md +1 -1
- package/presets/opencode/svelte/skills/playwright-e2e/SKILL.md +1 -1
- package/presets/opencode/svelte/skills/unit-testing/SKILL.md +1 -1
- package/presets/zcode/android-kotlin/REPO_AGENTS.md +7 -47
- package/presets/zcode/android-kotlin/adapter-map.json +1 -1
- package/presets/zcode/android-kotlin/hooks/chain-team-phases.sh +12 -3
- package/presets/zcode/android-kotlin/rules/agent-team-orchestrator.md +5 -5
- package/presets/zcode/android-kotlin/rules/code-quality-and-refactoring.md +2 -6
- package/presets/zcode/android-kotlin/rules/preset-pr-checklist.md +2 -2
- package/presets/zcode/go/REPO_AGENTS.md +7 -47
- package/presets/zcode/go/adapter-map.json +1 -1
- package/presets/zcode/go/hooks/chain-team-phases.sh +12 -3
- package/presets/zcode/go/rules/agent-team-orchestrator.md +5 -5
- package/presets/zcode/go/rules/code-quality-and-refactoring.md +2 -6
- package/presets/zcode/go/rules/feature-delivery-workflow.md +3 -7
- package/presets/zcode/go/rules/preset-pr-checklist.md +2 -2
- package/presets/zcode/ios-swift/REPO_AGENTS.md +7 -47
- package/presets/zcode/ios-swift/adapter-map.json +1 -1
- package/presets/zcode/ios-swift/hooks/chain-team-phases.sh +12 -3
- package/presets/zcode/ios-swift/rules/agent-team-orchestrator.md +5 -5
- package/presets/zcode/ios-swift/rules/code-quality-and-refactoring.md +2 -6
- package/presets/zcode/ios-swift/rules/feature-delivery-workflow.md +3 -7
- package/presets/zcode/ios-swift/rules/preset-pr-checklist.md +2 -2
- package/presets/zcode/java/REPO_AGENTS.md +7 -47
- package/presets/zcode/java/adapter-map.json +1 -1
- package/presets/zcode/java/hooks/chain-team-phases.sh +12 -3
- package/presets/zcode/java/rules/agent-team-orchestrator.md +5 -5
- package/presets/zcode/java/rules/code-quality-and-refactoring.md +2 -6
- package/presets/zcode/java/rules/feature-delivery-workflow.md +3 -7
- package/presets/zcode/java/rules/preset-pr-checklist.md +2 -2
- package/presets/zcode/mcp-ts/REPO_AGENTS.md +7 -47
- package/presets/zcode/mcp-ts/adapter-map.json +1 -1
- package/presets/zcode/mcp-ts/hooks/chain-team-phases.sh +12 -3
- package/presets/zcode/mcp-ts/rules/agent-team-orchestrator.md +5 -5
- package/presets/zcode/mcp-ts/rules/code-quality-and-refactoring.md +2 -6
- package/presets/zcode/mcp-ts/rules/feature-delivery-workflow.md +3 -7
- package/presets/zcode/mcp-ts/rules/preset-pr-checklist.md +2 -2
- package/presets/zcode/mol/REPO_AGENTS.md +9 -49
- package/presets/zcode/mol/adapter-map.json +1 -1
- package/presets/zcode/mol/hooks/chain-team-phases.sh +12 -3
- package/presets/zcode/mol/rules/agent-team-orchestrator.md +5 -5
- package/presets/zcode/mol/rules/code-quality-and-refactoring.md +2 -6
- package/presets/zcode/mol/rules/feature-delivery-workflow.md +3 -7
- package/presets/zcode/mol/rules/preset-pr-checklist.md +2 -2
- package/presets/zcode/next/REPO_AGENTS.md +10 -50
- package/presets/zcode/next/adapter-map.json +1 -17
- package/presets/zcode/next/agents/accessibility-reviewer.md +0 -1
- package/presets/zcode/next/agents/api-contract-reviewer.md +0 -1
- package/presets/zcode/next/agents/build-verifier.md +12 -8
- package/presets/zcode/next/agents/code-reviewer.md +1 -1
- package/presets/zcode/next/agents/codebase-analyzer.md +0 -1
- package/presets/zcode/next/agents/feature-developer.md +6 -6
- package/presets/zcode/next/agents/migration-specialist.md +0 -1
- package/presets/zcode/next/agents/mockup-reviewer.md +0 -1
- package/presets/zcode/next/agents/openspec-author.md +0 -1
- package/presets/zcode/next/agents/performance-auditor.md +0 -1
- package/presets/zcode/next/agents/playwright-test-generator.md +0 -1
- package/presets/zcode/next/agents/playwright-test-healer.md +0 -1
- package/presets/zcode/next/agents/playwright-test-planner.md +0 -1
- package/presets/zcode/next/agents/qa-tester.md +3 -3
- package/presets/zcode/next/agents/security-reviewer.md +0 -1
- package/presets/zcode/next/agents/solution-architect.md +0 -1
- package/presets/zcode/next/agents/task-analyst.md +0 -1
- package/presets/zcode/next/agents/task-router.md +8 -7
- package/presets/zcode/next/agents/tech-writer.md +0 -1
- package/presets/zcode/next/agents/unit-test-generator.md +0 -1
- package/presets/zcode/next/agents/unit-test-healer.md +0 -1
- package/presets/zcode/next/agents/unit-test-planner.md +0 -1
- package/presets/zcode/next/commands/README.md +0 -6
- package/presets/zcode/next/hooks/chain-team-phases.sh +12 -3
- package/presets/zcode/next/rules/agent-team-orchestrator.md +5 -5
- package/presets/zcode/next/rules/code-quality-and-refactoring.md +2 -6
- package/presets/zcode/next/rules/feature-delivery-workflow.md +5 -9
- package/presets/zcode/next/rules/post-change-lint.md +11 -15
- package/presets/zcode/next/rules/preset-pr-checklist.md +2 -2
- package/presets/zcode/next/skills/feature-delivery/SKILL.md +1 -1
- package/presets/zcode/next/skills/playwright-e2e/SKILL.md +1 -1
- package/presets/zcode/next/skills/unit-testing/SKILL.md +1 -1
- package/presets/zcode/nuxt/REPO_AGENTS.md +8 -48
- package/presets/zcode/nuxt/adapter-map.json +1 -1
- package/presets/zcode/nuxt/agents/accessibility-reviewer.md +0 -1
- package/presets/zcode/nuxt/agents/api-contract-reviewer.md +0 -1
- package/presets/zcode/nuxt/agents/build-verifier.md +2 -2
- package/presets/zcode/nuxt/agents/ci-investigator.md +1 -1
- package/presets/zcode/nuxt/agents/code-reviewer.md +0 -1
- package/presets/zcode/nuxt/agents/codebase-analyzer.md +0 -1
- package/presets/zcode/nuxt/agents/debugger.md +1 -1
- package/presets/zcode/nuxt/agents/feature-developer.md +3 -3
- package/presets/zcode/nuxt/agents/migration-specialist.md +0 -1
- package/presets/zcode/nuxt/agents/mockup-reviewer.md +0 -1
- package/presets/zcode/nuxt/agents/openspec-author.md +0 -1
- package/presets/zcode/nuxt/agents/performance-auditor.md +0 -1
- package/presets/zcode/nuxt/agents/playwright-test-generator.md +0 -1
- package/presets/zcode/nuxt/agents/playwright-test-healer.md +0 -1
- package/presets/zcode/nuxt/agents/playwright-test-planner.md +0 -1
- package/presets/zcode/nuxt/agents/qa-tester.md +3 -3
- package/presets/zcode/nuxt/agents/security-reviewer.md +0 -1
- package/presets/zcode/nuxt/agents/solution-architect.md +0 -1
- package/presets/zcode/nuxt/agents/task-analyst.md +0 -1
- package/presets/zcode/nuxt/agents/task-router.md +8 -7
- package/presets/zcode/nuxt/agents/tech-writer.md +0 -1
- package/presets/zcode/nuxt/agents/unit-test-generator.md +0 -1
- package/presets/zcode/nuxt/agents/unit-test-healer.md +0 -1
- package/presets/zcode/nuxt/agents/unit-test-planner.md +0 -1
- package/presets/zcode/nuxt/hooks/chain-team-phases.sh +12 -3
- package/presets/zcode/nuxt/rules/agent-team-orchestrator.md +5 -5
- package/presets/zcode/nuxt/rules/code-quality-and-refactoring.md +2 -6
- package/presets/zcode/nuxt/rules/feature-delivery-workflow.md +3 -7
- package/presets/zcode/nuxt/rules/post-change-lint.md +13 -13
- package/presets/zcode/nuxt/rules/preset-pr-checklist.md +2 -2
- package/presets/zcode/nuxt/skills/feature-delivery/SKILL.md +1 -1
- package/presets/zcode/nuxt/skills/playwright-e2e/SKILL.md +1 -1
- package/presets/zcode/nuxt/skills/unit-testing/SKILL.md +1 -1
- package/presets/zcode/php-hexagonal/REPO_AGENTS.md +7 -47
- package/presets/zcode/php-hexagonal/adapter-map.json +1 -1
- package/presets/zcode/php-hexagonal/hooks/chain-team-phases.sh +12 -3
- package/presets/zcode/php-hexagonal/rules/agent-team-orchestrator.md +5 -5
- package/presets/zcode/php-hexagonal/rules/code-quality-and-refactoring.md +2 -6
- package/presets/zcode/php-hexagonal/rules/feature-delivery-workflow.md +3 -7
- package/presets/zcode/php-hexagonal/rules/preset-pr-checklist.md +2 -2
- package/presets/zcode/php-laravel/REPO_AGENTS.md +7 -47
- package/presets/zcode/php-laravel/adapter-map.json +1 -1
- package/presets/zcode/php-laravel/hooks/chain-team-phases.sh +12 -3
- package/presets/zcode/php-laravel/rules/agent-team-orchestrator.md +5 -5
- package/presets/zcode/php-laravel/rules/code-quality-and-refactoring.md +2 -6
- package/presets/zcode/php-laravel/rules/feature-delivery-workflow.md +3 -7
- package/presets/zcode/php-laravel/rules/preset-pr-checklist.md +2 -2
- package/presets/zcode/svelte/REPO_AGENTS.md +8 -48
- package/presets/zcode/svelte/adapter-map.json +1 -1
- package/presets/zcode/svelte/agents/accessibility-reviewer.md +0 -1
- package/presets/zcode/svelte/agents/api-contract-reviewer.md +0 -1
- package/presets/zcode/svelte/agents/build-verifier.md +2 -2
- package/presets/zcode/svelte/agents/ci-investigator.md +1 -1
- package/presets/zcode/svelte/agents/code-reviewer.md +0 -1
- package/presets/zcode/svelte/agents/codebase-analyzer.md +0 -1
- package/presets/zcode/svelte/agents/debugger.md +1 -1
- package/presets/zcode/svelte/agents/feature-developer.md +3 -3
- package/presets/zcode/svelte/agents/migration-specialist.md +0 -1
- package/presets/zcode/svelte/agents/mockup-reviewer.md +0 -1
- package/presets/zcode/svelte/agents/openspec-author.md +0 -1
- package/presets/zcode/svelte/agents/performance-auditor.md +0 -1
- package/presets/zcode/svelte/agents/playwright-test-generator.md +0 -1
- package/presets/zcode/svelte/agents/playwright-test-healer.md +0 -1
- package/presets/zcode/svelte/agents/playwright-test-planner.md +0 -1
- package/presets/zcode/svelte/agents/qa-tester.md +3 -3
- package/presets/zcode/svelte/agents/security-reviewer.md +0 -1
- package/presets/zcode/svelte/agents/solution-architect.md +0 -1
- package/presets/zcode/svelte/agents/task-analyst.md +0 -1
- package/presets/zcode/svelte/agents/task-router.md +8 -7
- package/presets/zcode/svelte/agents/tech-writer.md +0 -1
- package/presets/zcode/svelte/agents/unit-test-generator.md +0 -1
- package/presets/zcode/svelte/agents/unit-test-healer.md +0 -1
- package/presets/zcode/svelte/agents/unit-test-planner.md +0 -1
- package/presets/zcode/svelte/hooks/chain-team-phases.sh +12 -3
- package/presets/zcode/svelte/rules/agent-team-orchestrator.md +5 -5
- package/presets/zcode/svelte/rules/code-quality-and-refactoring.md +2 -6
- package/presets/zcode/svelte/rules/feature-delivery-workflow.md +3 -7
- package/presets/zcode/svelte/rules/post-change-lint.md +13 -13
- package/presets/zcode/svelte/rules/preset-pr-checklist.md +2 -2
- package/presets/zcode/svelte/skills/feature-delivery/SKILL.md +1 -1
- package/presets/zcode/svelte/skills/playwright-e2e/SKILL.md +1 -1
- package/presets/zcode/svelte/skills/unit-testing/SKILL.md +1 -1
- package/presets/_shared/ai-local/scripts/team-db-dashboard.mjs +0 -2103
- package/presets/_shared/ai-local/scripts/team-db-ui.mjs +0 -750
- package/presets/claude/next/commands/ui-start.md +0 -78
- package/presets/claude/next/commands/ui-stop.md +0 -71
- package/presets/cursor/next/commands/ui-start.md +0 -78
- package/presets/cursor/next/commands/ui-stop.md +0 -71
- package/presets/mavis/next/commands/ui-start.md +0 -73
- package/presets/mavis/next/commands/ui-stop.md +0 -66
- package/presets/opencode/next/commands/ui-start.md +0 -81
- package/presets/opencode/next/commands/ui-stop.md +0 -74
- package/presets/zcode/next/commands/ui-start.md +0 -81
- package/presets/zcode/next/commands/ui-stop.md +0 -74
package/CHANGELOG.md
CHANGED
|
@@ -1,9 +1,59 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.2.68
|
|
4
|
+
|
|
5
|
+
### One UI surface — legacy team-db dashboard removed
|
|
6
|
+
|
|
7
|
+
- **No HTML from `serve`.** `team-db.mjs serve` is API-only: `GET /`, `/assets/app.css`, and `/assets/app.js` are gone, and the dashboard strings module plus the `ui start|status|stop|restart` lifecycle are removed. The OpenAPI document moves to 46 operations and 38 paths.
|
|
8
|
+
- **Consumers own the browser surface.** The package ships no UI. `apps/team-tasks-ui` is this repository's only UI and proxies to the API; `test-team-db-dashboard.mjs`, `test-team-db-ui.mjs`, and the `next` `ui-start`/`ui-stop` commands are removed. `test-team-db-api.mjs`, `-security`, `-fixtures`, the engine list, and the contract pins move with the surface.
|
|
9
|
+
|
|
10
|
+
### Gate scope — task-scoped classifier
|
|
11
|
+
|
|
12
|
+
- **`check:task <slug>`.** `check-preset-delta.mjs` gains `--since-task`: it reads the `.ai.local/team/.write-scope/<slug>/*.json` baselines, unions the step deltas, and classifies only this task's change-set. `--save-baseline` snapshots an inline task before its first write. `check:changed` stays repo-wide (`--base HEAD`) and is authoritative only on a clean tree; a missing task baseline falls back with a warning.
|
|
13
|
+
- **Prompt and checklist parity.** `preset-pr-checklist`, `build-verifier`, and `feature-developer` use `check:task <slug>` (or `check:changed` on a clean tree); the local overlay documents empty `appGates` / `presetGates` semantics and the `app/**` → `apps/team-tasks-ui/**` mapping.
|
|
14
|
+
|
|
15
|
+
### Gate cadence — one closure pass per feature
|
|
16
|
+
|
|
17
|
+
- **Build vs closure.** Feature rules now separate authoring (write code and tests; no project `lint` / `test` / `type-check` / `build`) from one closure pass owned by `build-verifier`. Retries re-run only the gates whose inputs changed, recorded as `closure-1` / `delta-N` in `validation-report.md`.
|
|
18
|
+
- **Rule injection scoped.** `post-change-lint` moves from `UNIVERSAL_ZONE_RULES` to `TOOLING_ZONE_RULES` for `next`, `nuxt`, and `svelte`, so only implementer and verifier agents load it. Planners, reviewers, QA, and test planners no longer receive it.
|
|
19
|
+
- **Pipeline order.** `qa-tester` authors tests before the single `build-verifier` closure; `code-reviewer` reviews the validated tree. A `changes_requested` retry routes developer → `build-verifier` (delta) → same reviewer; a docs/artifacts-only fix skips the code gate.
|
|
20
|
+
- **Test.** `test-chain-team-phases-coverage.mjs` covers the review-retry verifier hop.
|
|
21
|
+
|
|
22
|
+
### Prompt-surface trim — root `AGENTS.md`, OpenCode entry, shared-core principles
|
|
23
|
+
|
|
24
|
+
- **Root `AGENTS.md` −3.6 KB (`next`).** Per-host routing, the seed catalogue, install blocks, and the duplicated local-overlay prose collapse into pointers; the overlay contract stays in the always-on rule and the reachability anchor (`forms-validation`) stays named. All 11 stacks × 5 platforms.
|
|
25
|
+
- **OpenCode entry −2.3 KB.** Harness wiring, the TUI-plugin note, and the install block move to `docs/OPENCODE.md`, which already documents them; the subagent `## Rules to load` block and every local-overlay needle stay.
|
|
26
|
+
- **Shared-core `Principles` −0.3 KB.** KISS/YAGNI/DRY and SOLID/CUPID collapse to two bullets; over-abstraction guardrails, comment/prose rules, and agent discipline are untouched.
|
|
27
|
+
- **Measured.** `report-context-cost.mjs` OpenCode always-on set: 17,285 → 14,673 B; root `AGENTS.md`: 9,648 → 6,058 B. Byte estimates, not token measurements.
|
|
28
|
+
|
|
29
|
+
### Agent process manager — dashboard page and confirmed SIGKILL
|
|
30
|
+
|
|
31
|
+
- **Provenance on every row.** `processes.mjs list` / `watch` / `serve` snapshots move to `schemaVersion: 2`: each row gains `pidStart`, the OS `parent` (`pid` + command line from `ps -axo pid=,ppid=,command=`) and the owning task's verbatim `prompt.md` excerpt (`prompt.text`, `.truncated`, `.path`). A task slug outside the task-directory shape is ignored, never resolved.
|
|
32
|
+
- **`kill` verb and `POST /api/v1/processes/kill`.** `kill --name <res> [--pid <n>] [--pid-start <s>]` rebuilds the snapshot, requires a live row with the same pid and start time, re-runs the full lease proof for a lease row, and sends `SIGKILL`; a start-time mismatch is exit 4 and the target survives. The manager clears only its own lease; an adapter marker stays and reads stale. The `serve` endpoint is the same operation with a JSON body and takes `Content-Type: application/json` only.
|
|
33
|
+
- **The view accepts the Docker gateway Host.** `serve` answers `127.0.0.1`, `localhost`, `::1`, and `host.docker.internal`/`gateway.docker.internal`; any other `Host` is `403 E_FORBIDDEN_HOST`, so a rebound DNS name cannot reach the snapshot or the kill endpoint while the containerized dashboard still can.
|
|
34
|
+
- **The standalone HTML page is gone.** `serve` answers `/api/v1/processes` (JSON) and `/api/v1/processes/stream` (SSE); `GET /` is `404`. The browser view is `apps/team-tasks-ui` `/processes`: a table of leases and adapters with task, prompt, parent, state, and a confirmed `Kill -9` dialog. The app gains `/api/processes` and `/api/processes/kill` same-origin proxies behind the shared loopback ingress gate, `processesService`, a Redux slice, unit tests, MSW fixtures, and the `PROCESSES_ORIGIN` server-only variable.
|
|
35
|
+
- **Fixtures.** `test-process-kill.mjs` covers the lease kill, the start-time refusal, the not-found, the JSON-only body, the absent HTML page and the HTTP kill; the `process view fixtures` composite row runs it.
|
|
36
|
+
|
|
37
|
+
### Agent process manager — CPU and memory per row
|
|
38
|
+
|
|
39
|
+
- **Resource use on every live row.** `list` / `watch` / `serve` snapshots move to `schemaVersion: 3`: each live row gains `cpuPercent`, `rssBytes` and `memoryPercent`, summed over the row pid and every descendant from one `ps -axo pid=,ppid=,%cpu=,rss=,command=` call. The manager spawns a shell for `start`, so a single-pid reading would miss the real server; a stale or pid-less row reports `null`, never `0`. The parser normalises the decimal comma macOS prints for `%cpu`.
|
|
40
|
+
- **Both surfaces show the reading.** The `list` / `watch` table adds `CPU` and `MEM` columns (`MEM` is RSS plus its share of host memory); the `apps/team-tasks-ui` `/processes` page adds the same two columns and the app mapper tolerates an older manager without the fields. Fixtures: `test-process-scan.mjs` covers the parser and tree sum, `test-process-adapters.mjs` the live/stale/null row shape.
|
|
41
|
+
|
|
42
|
+
### Task-status sidebar — session economy
|
|
43
|
+
|
|
44
|
+
- **Tool bytes kept out, per session.** The OpenCode sidebar gains a four-line block under the task view: `200 B became 80 B: 120 B kept out (60%)`, a `Without` and a `With optimization` bar of 16 cells, and `about 30 tokens kept out, approximate, against a 200K window`. Sums come from this session's rows in `output-guard/results.jsonl` and the two rotated archives; the first `sessionID|callID` wins, so an archived copy of a call is never counted twice.
|
|
45
|
+
- **`economy.ts` is a pure helper.** It reads no file, rotates no ledger and never calls `report-efficiency`: the watcher passes at most three ledger texts, a failed read renders zeros instead of stopping the tick, and the block clears with the view when the session has no team root.
|
|
46
|
+
- **A `null` view no longer reaches the stop and resume buttons.** The header renders them only for a resolved view.
|
|
47
|
+
- **Tests.** `test-output-guard.mjs` covers the three-ledger sum with dedupe, missing and empty ledgers, and bar scaling; it also pins `economy.ts` free of `node:fs`, ledger rotation and the efficiency report, no task-status module calling `rotateLedger`, and a single `sidebar.content` slot in `tui.tsx`. `sync-dogfood-opencode.sh` rsyncs `presets/opencode/plugins/`, and the CLI golden lists the new managed file.
|
|
48
|
+
|
|
3
49
|
## 0.2.67
|
|
4
50
|
|
|
5
51
|
### Added
|
|
6
52
|
|
|
53
|
+
- **Efficiency telemetry, P2 Read plane.** Six read-only operations — `/api/v1/efficiency/series`, `/tools`, `/distribution`, `/ab-runs`, `/ab-runs/{runKey}`, `/context-cost` — serve the measured ledgers with a complete day/week axis, bounded tool rows, fixed raw-byte bins, paged A/B runs and the newest always-on snapshot. `/api/v1/stats` gains a projection-wide `efficiency` block and `/api/v1/tasks/{slug}/metrics` gains task efficiency (finished-attempt coverage, null-not-zero tokens, by-agent/by-step rows, gate outcomes); every new field is required and nullable where the design says so. The OpenAPI document moves to 49 operations and 75 schemas, the route parity pins move with it, and `apps/team-tasks-ui` gains the matching types, DTOs, 1:1 mappers, `efficiencyService` and the six operation-table keys. `deriveGates` now derives `advanced_to_done | rework | re_gated | open | unknown` from the next event after `human_gate_ended`, closing the P1 review obligation.
|
|
54
|
+
- **Efficiency telemetry, P1 Measure.** `team-db` schema v5 (`0005-efficiency`) projects the two output-guard ledgers into `team.db`: a full `sync` ingests `output-guard/results*.jsonl` → `tool_calls`, `usage*.jsonl` → `usage_turns`, and `.session-leases/*.json` → `session_tasks`, watermark-resumable per file and deduped by `(sessionID, callID)` / `(sessionID, messageID)` with the earliest `observed_at` kept. `sync --telemetry | --no-telemetry` controls it (`--telemetry` with `--slug` is `E_USAGE` exit 3); `sync --maintain` applies the 90-day telemetry cutoff. `attempts` gains 11 nullable usage columns with a host-first precedence (`attempt_finished.usage` wins, `usage_recorded` is summed only when no host object exists, `usage_source ∈ {host, cli}`).
|
|
55
|
+
- **`record-usage --turn/--cache-write/--reasoning`.** The consumer-owned CLI records the turn binding and the two extra token kinds, validated with exit 2 on bad input.
|
|
56
|
+
- **Output-guard ledger rotation.** The plugin's `setup()` rotates `results.jsonl` / `usage.jsonl` at `AI_RULES_OUTPUT_GUARD_ROTATE_BYTES` (default 8 MiB, `0` disables), keeping `results.1.jsonl` / `results.2.jsonl`; the `context` hook never stats or renames a ledger.
|
|
7
57
|
- **OpenCode output guard.** `init opencode` and `update` copy `presets/opencode/plugins/output-guard/` to `.opencode/plugins/output-guard/`. The server plugin registers `ctx.session.hook("context")` and replaces a `tool-result` over 8 KB with a bounded head + tail, the path under `.ai.local/team/output-guard/`, and one `grep` / `sed` hint. `AI_RULES_OUTPUT_GUARD_BYTES` changes the threshold and the seeded `.ai.local/.gitignore` ignores `team/output-guard/`. It works for a prompt without `/task`; a host without the hook no-ops and `AI_RULES_OUTPUT_GUARD=0` disables it.
|
|
8
58
|
- **Output-guard totals in the context report.** `report-context-cost.mjs` reads `output-guard/stats.jsonl`, dedupes by path, and prints before/after/saved bytes plus the session count; `--json` adds `outputGuard`.
|
|
9
59
|
- **Efficiency report and A/B harness.** `report:efficiency` reads `results.jsonl` (every tool result) and `usage.jsonl` (per-step tokens/cost), prints measured bytes, tokens, cost, turns, and quality, and writes a static dashboard with `--html`. `bench:efficiency` runs the guard off/on through `opencode run --standalone` with a deterministic oracle and writes `efficiency.json`; the verdict requires `--runs 5`. The report never turns a byte saving into a token saving.
|
package/README.md
CHANGED
|
@@ -137,7 +137,7 @@ node .ai.local/scripts/team-db.mjs migrate-tasks # create when absent, th
|
|
|
137
137
|
node .ai.local/scripts/team-db.mjs sync # full backfill + reconciliation
|
|
138
138
|
node .ai.local/scripts/team-db.mjs sync --slug <slug> # the bounded hook-shaped projection
|
|
139
139
|
node .ai.local/scripts/team-db.mjs check # schema, fingerprint, integrity
|
|
140
|
-
node .ai.local/scripts/team-db.mjs serve # http://127.0.0.1:4178
|
|
140
|
+
node .ai.local/scripts/team-db.mjs serve # http://127.0.0.1:4178 (JSON API)
|
|
141
141
|
node .ai.local/scripts/team-db.mjs schedule # the timer: claims, runs, captures, reconciles
|
|
142
142
|
node .ai.local/scripts/team-db.mjs jobs list # definitions + next fire, file-authoritative
|
|
143
143
|
node .ai.local/scripts/team-db.mjs tracker list # the ordered tracker: items, ready set, waiting-on
|
|
@@ -164,8 +164,8 @@ timeout kill, split `stdout`/`stderr` capped at 1 MiB, and a reconciled restart.
|
|
|
164
164
|
definitions are committed, run output and `state.json` are ignored, and the captured output is
|
|
165
165
|
never redacted. The `queue` concurrency policy and the `run-once` / `catch-up` (five
|
|
166
166
|
occurrences) misfire policies cover overlap and downtime; the kill switch drains instead of
|
|
167
|
-
dropping a claim. The same nine job routes drive
|
|
168
|
-
|
|
167
|
+
dropping a claim. The same nine job routes drive any client that proxies to `team-db.mjs serve`.
|
|
168
|
+
Schema v2 adds the three projection tables; a
|
|
169
169
|
pre-v2 database is rebuilt from the files on the next `sync`.
|
|
170
170
|
|
|
171
171
|
### Upstream research
|
|
@@ -244,7 +244,7 @@ Every installed preset ships requestable `anti-hallucination-contract` (not alwa
|
|
|
244
244
|
- MCP setup: [`docs/MCP-SETUP.md`](docs/MCP-SETUP.md)
|
|
245
245
|
- MCP catalog: [`docs/MCP-CATALOG.md`](docs/MCP-CATALOG.md)
|
|
246
246
|
- 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
|
-
- Gates: loop `yarn check:
|
|
247
|
+
- Gates: loop `yarn check:task <slug>` (or `yarn check:changed` on a clean tree) + the gates it names; release `yarn release:gate`
|
|
248
248
|
|
|
249
249
|
`_shared` is not an installable `--preset`.
|
|
250
250
|
|
|
@@ -13,10 +13,9 @@ const path = require('path');
|
|
|
13
13
|
* `.ai.local/team/tasks/<slug>/artifact-manifest.json`; producers call it
|
|
14
14
|
* instead of patching the JSON, which is a whole-file merge target.
|
|
15
15
|
*
|
|
16
|
-
* The `team-db*.mjs` modules are the rebuildable SQLite projection, its
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
* without `node:sqlite` never imports them.
|
|
16
|
+
* The `team-db*.mjs` modules are the rebuildable SQLite projection, its HTTP
|
|
17
|
+
* API, and the scheduler. `team-db.mjs` is the CLI; the others are loaded by it
|
|
18
|
+
* on demand, so a runtime without `node:sqlite` never imports them.
|
|
20
19
|
*
|
|
21
20
|
* `REPO_ONLY_ENGINE_SCRIPTS` stay in the preset source and the monorepo dogfood
|
|
22
21
|
* mirror, but the published tarball excludes their sources. A consumer install
|
|
@@ -43,14 +42,12 @@ const ENGINE_SCRIPTS = [
|
|
|
43
42
|
// never enters the context window. Reads no network and spawns nothing.
|
|
44
43
|
'dump-output.mjs',
|
|
45
44
|
'team-db.mjs',
|
|
46
|
-
'team-db-ui.mjs',
|
|
47
45
|
'team-db-tracker.mjs',
|
|
48
46
|
'team-db-task-runner.mjs',
|
|
49
47
|
'team-db-schema.mjs',
|
|
50
48
|
'team-db-project.mjs',
|
|
51
49
|
'team-db-api.mjs',
|
|
52
50
|
'team-db-openapi.mjs',
|
|
53
|
-
'team-db-dashboard.mjs',
|
|
54
51
|
'team-db-scheduler.mjs',
|
|
55
52
|
// The weekly upstream evolution review: opencode probe, registry/cursor,
|
|
56
53
|
// change window, read-only agent call, dedupe, digest and promotion record.
|
|
@@ -45,7 +45,7 @@ const AI_LOCAL_GITIGNORE = [
|
|
|
45
45
|
'team/upstream/cursor.json',
|
|
46
46
|
'# Output-guard spill files; runtime state, never commit.',
|
|
47
47
|
'team/output-guard/',
|
|
48
|
-
'#
|
|
48
|
+
'# API ownership marker (`.ai.local/.ui/api.json`) written by the team-tasks-ui stack; local runtime state, never commit.',
|
|
49
49
|
'.ui/',
|
|
50
50
|
'# Dev-server lifecycle markers (`.ai.local/.dev/<name>.json`); local runtime state, never commit.',
|
|
51
51
|
'.dev/',
|
|
@@ -169,11 +169,11 @@ Summary:
|
|
|
169
169
|
- [ ] Reachability: every new OpenCode/Mavis rule is named by an agent/command/skill/entry or an always-on rule (or is `preset-*` authoring-only) — `scripts/check-preset-reachability.sh`
|
|
170
170
|
- [ ] Embed drift: `scripts/check-shared-core-drift.sh` after core/embed edits
|
|
171
171
|
- [ ] Anti-hallucination: `check-anti-hallucination-coverage.mjs` passes. New skill families are registered in `SKILL_CONTRACT_CLASS` (`writer` loads the stack floor; `reader` loads the contract only). `code-review` is `writer`.
|
|
172
|
-
- [ ] Structure gates: `yarn check:
|
|
172
|
+
- [ ] Structure gates: `yarn check:task <slug>` (or `yarn check:changed` on a clean tree) and the gates it names; `yarn release:gate` before a release (the full `bash scripts/check-preset-structure.sh` composite)
|
|
173
173
|
- [ ] Twin drift: after editing a Claude `commands/**` or `skills/**` file, `node scripts/check-preset-twin-drift.mjs` passes — mirror the change in the Cursor twin (delta and divergence unchanged) or record a deliberate divergence with `--update`. A deliberate divergence that **raises** an allowance needs `--update --widen`; dropping a baseline row needs `--update --prune`. A plain `--update` refuses both.
|
|
174
174
|
- [ ] Generated trees regenerated (`generate-mavis.mjs` + `generate-opencode.mjs`) and CLI goldens recaptured (`capture-cli-golden.mjs`) after any preset-installed file changes
|
|
175
175
|
|
|
176
|
-
Validation: `yarn check:
|
|
176
|
+
Validation: `yarn check:task <slug>` (or `yarn check:changed` on a clean tree) + the `preset-pr-checklist` rule; the full composite runs in `yarn release:gate`. CI workflows: `preset-structure.yml` (`check`, `hooks`, `ai-local-engine-tests`), `platform-smoke.yml` (3-OS smoke: `init multi`/`update`/`doctor`, platform suites, script gate), `rule-eval.yml` (opt-in next rule-eval), and `release-gate.yml` (manual `yarn release:gate` run + report artifact).
|
|
177
177
|
|
|
178
178
|
## Release order
|
|
179
179
|
|
|
@@ -431,12 +431,16 @@ Load these when editing files under `packages/ai-rules/presets/**`, `.cursor/**`
|
|
|
431
431
|
| `scripts/check-team-db-contract.mjs` / `yarn check:team-db-contract` | **FAIL** when the checked-in OpenAPI 3.1 document (`docs/openapi/team-db.v1.json`) drifts from `team-db-openapi.mjs`, fails the vendored 3.1 meta-schema (sha256-pinned), loses an `operationId`, diverges from `ROUTE_TABLE` in either direction, carries an invalid example, or leaves a `$ref` unresolved. `--write` is the only writer; no network at gate time. Wired into `check-preset-structure.sh`. |
|
|
432
432
|
| `presets/_shared/hooks/guard-shell-command.mjs.tmpl` + `<stack>/guard-ports.json` | The shell guard asks before a server start whose port already listens: `startCommands` names the stack's dev-server command shape, `defaultPorts` the ports to probe when the command has no `--port`, and an explicit `--port` probes that port only. `pkill`, `killall`, and `xargs kill` always ask. Fixture `test-guard-shell-command.mjs`; rendered into every `hooks/guard-shell-command.mjs` by `generate-hooks.mjs`. |
|
|
433
433
|
| `presets/_shared/ai-local/scripts/team-db-scheduler.mjs` | The scheduled-jobs module, shipped to consumers as `.ai.local/scripts/team-db-scheduler.mjs` (`ENGINE_SCRIPTS`): the job validator, a dependency-free five-field cron parser and next-fire on `Intl` zone math (both DST transitions are fixtures), the deterministic atomic `scheduler/jobs.json` store, the run-manifest and capped-capture helpers (the recorded sha256 covers exactly the pre-marker bytes, so a capped stream is not reported `E_LOG_HASH`), the projection into `scheduled_jobs` / `job_runs` / `job_run_events`, retention (1 MiB per stream, 200 runs, 30 days, 2 GiB; a pruned run directory takes its row with it; an active run is never pruned), restart reconciliation to `interrupted`, and `runScheduler` — the lease, the `BEGIN IMMEDIATE` claim, a durable run-now queue the timer re-reads and merges at every tick, the detached child with a process-group kill, `catch-up` bounded to five occurrences per gap with the truncation recorded (`E_CATCH_UP_TRUNCATED`), and the kill-switch drain. Fixture `test-team-db-scheduler.mjs`; concurrency fixtures live in `test-team-db-concurrency.mjs`. |
|
|
434
|
-
| `scripts/test-team-db-*.mjs` | The team-db suite family: schema (17), project (18), migrate-tasks (5), dual-write (13), API (27), security (17),
|
|
434
|
+
| `scripts/test-team-db-*.mjs` | The team-db suite family: schema (17), project (18), migrate-tasks (5), dual-write (13), API (27), security (17), concurrency (10), scheduler (34), and FAIL-direction fixtures (22). The fixtures prove each gate fails on its planted defect; `test-team-db-concurrency.mjs` covers first-creation races, a mixed writer/reader load, `SIGKILL` recovery, a held lock, the 5 s hook budget, and the scheduler's four seams (scheduler versus projector on one database, a `SIGKILL`ed scheduler reconciled to one `interrupted` row, 50 finalized runs inside the WAL bound, and a held exclusive lock that neither hangs nor leaves a lease). Wired into `check-preset-structure.sh`; `yarn test:team-db` runs the family. |
|
|
435
435
|
|
|
436
436
|
Run from `packages/ai-rules/`:
|
|
437
437
|
|
|
438
438
|
```bash
|
|
439
|
+
# task with a saved .write-scope baseline:
|
|
440
|
+
yarn check:task <slug>
|
|
441
|
+
# clean tree:
|
|
439
442
|
yarn check:changed
|
|
443
|
+
# fallback when the classifier names no gate:
|
|
440
444
|
yarn check:fast
|
|
441
445
|
# release only, from the repo root:
|
|
442
446
|
yarn release:gate
|
|
@@ -444,8 +448,9 @@ yarn release:gate
|
|
|
444
448
|
|
|
445
449
|
Iteration versus release:
|
|
446
450
|
|
|
447
|
-
- **`yarn check:
|
|
448
|
-
- **`yarn check:
|
|
451
|
+
- **`yarn check:task <slug>`** — the task-scoped classifier (`check-preset-delta.mjs --since-task <slug>`). It reads `.ai.local/team/.write-scope/<slug>/*.json`, unions the step baselines, and returns only this task's change-set; `--save-baseline` snapshots an inline task before its first write. A missing baseline falls back to `--base HEAD` with a warning.
|
|
452
|
+
- **`yarn check:changed`** — the repo-wide classifier (`check-preset-delta.mjs --base HEAD`, or `--paths a,b`). Use it on a clean tree or pass the task paths explicitly; otherwise earlier uncommitted batches are attributed to this task. It prints `affected loop gates` and a separate `release-only gates` line.
|
|
453
|
+
- **`yarn check:fast`** — the ~50-second fallback gate (`check-preset-fast.sh`: generated drift, twin drift, token budget, frontmatter, consumer links, next attached budget, OpenCode platform contract self-test); run it only when the classifier names no gate. `test-cli-init-clean` stays in the delta gates and CI.
|
|
449
454
|
- **`yarn release:gate`** — the full release gate: `check-preset-structure.sh` with the hook suites, `test:ai-local`, and the strict product-specs dogfood. Run it alone on the release commit before a tag.
|
|
450
455
|
- **`yarn check:preset-structure`** — the low-level composite; CI and `release:gate` call it. Do not run it in a feature task.
|
|
451
456
|
|
|
@@ -484,14 +489,16 @@ node .ai.local/scripts/processes.mjs watch # live table, 1 s refresh
|
|
|
484
489
|
node .ai.local/scripts/processes.mjs list --json # one snapshot per line
|
|
485
490
|
node .ai.local/scripts/processes.mjs scan # listening ports + known shapes
|
|
486
491
|
node .ai.local/scripts/processes.mjs doctor # stale lease, dead marker, empty lease port
|
|
487
|
-
node .ai.local/scripts/processes.mjs serve # 127.0.0.1:4179 — JSON
|
|
492
|
+
node .ai.local/scripts/processes.mjs serve # 127.0.0.1:4179 — JSON + SSE (UI: apps/team-tasks-ui /processes)
|
|
493
|
+
node .ai.local/scripts/processes.mjs kill --name <res> # re-proven SIGKILL of one snapshot row
|
|
488
494
|
```
|
|
489
495
|
|
|
490
496
|
- **One protocol.** `acquire` creates `leases/<name>.json` with an exclusive `open(…, 'wx')` and records the **parent** process as the owner, because the CLI exits immediately — `--pid <n>` overrides it, and an owner that is not provably alive is refused with exit 2 (`acquire: a lease needs a live owner; pass --pid $$ (or use run)`); a second acquire is `held` (exit 1) unless `--wait <ms>`. `run` acquires, spawns with inherited stdio, releases in `finally`, and exits with the child's status (`128 + signo` on a signal death).
|
|
491
497
|
- **Liveness is pid + start time.** `pidStart` (`ps -o lstart=`, `/proc/<pid>/stat` on a host without `ps`) defeats pid reuse, and a heartbeat never makes a live holder stale. A stale lease is reclaimed on the first attempt inside `.processes/.reclaim/<name>`; `release` refuses a token that is not the owner's.
|
|
492
|
-
- **One snapshot, three surfaces.** `list` / `watch` / `serve` read own leases plus `preset-tree` (`.preset-tree-lock/owner.json`), `dev:<name>` (`.ai.local/.dev/*.json`), `team-db-serve` (`.ai.local/.ui/api.json`), `scheduler`, `runner:<slug>` (active runs only), and `git-index`. A missing source is skipped, a malformed one is a `warnings[]` entry; the snapshot never crashes.
|
|
498
|
+
- **One snapshot, three surfaces.** `list` / `watch` / `serve` read own leases plus `preset-tree` (`.preset-tree-lock/owner.json`), `dev:<name>` (`.ai.local/.dev/*.json`), `team-db-serve` (`.ai.local/.ui/api.json`), `scheduler`, `runner:<slug>` (active runs only), and `git-index`. A missing source is skipped, a malformed one is a `warnings[]` entry; the snapshot never crashes. Each row also carries `pidStart`, the OS `parent` (`ps -axo pid=,ppid=,command=`), the owning task's `prompt.md` excerpt, and — on a live row — `cpuPercent`, `rssBytes` and `memoryPercent` summed over the pid's process tree (one `ps -axo …%cpu=,rss=…` call; a stale or pid-less row is `null`, never `0`). `cpuPercent` is the `ps` reading — a decaying average on macOS, the lifetime ratio on Linux — not an instant sample.
|
|
493
499
|
- **Foreign is a label, never a kill.** `scan` reports listening TCP ports and the known command shapes (`fix-generated.mjs`, `check-preset-*.sh`, `team-db.mjs serve`, `storybook`, `next dev`, Playwright browsers); `--known-only` is the default. `stop --name <res>` or `stop --task <slug>` signals only a lease whose owner it can prove (live pid + matching `pidStart` + command line or lease port) and exits 4 with `stop: refused: …` otherwise; a stale lease is cleared without a signal.
|
|
494
|
-
-
|
|
500
|
+
- **`kill` is the operator's SIGKILL, and it proves twice.** `kill --name <res> [--pid <n>] [--pid-start <s>]` rebuilds the snapshot, requires a live row with the same pid/start time, re-runs the full lease proof for a lease row, then sends `SIGKILL`; an adapter row is proven by the marker that named it plus the live pid. A stale start time is exit 4 and the target survives. The cleared state is the manager's own lease only: an adapter marker stays and reads stale until its tool cleans it. `serve` exposes the same operation as `POST /api/v1/processes/kill` (JSON body, loopback only); the standalone HTML page is gone — the UI is `apps/team-tasks-ui` `/processes`.
|
|
501
|
+
- **Exit codes.** 0 ok · 1 held/timeout (or no such row for `kill`) · 2 usage · 3 fatal (state directory unwritable, no `--allow-unlocked`, or a pid that survives `SIGKILL`) · 4 refused. `serve` binds a loopback host only and answers only a loopback or Docker-gateway (`host.docker.internal`) `Host`; any other name is a rebinding attempt and gets 403.
|
|
495
502
|
|
|
496
503
|
---
|
|
497
504
|
|
package/docs/TEAM-DB.md
CHANGED
|
@@ -4,25 +4,23 @@
|
|
|
4
4
|
The task files remain the source of truth; the database exists so an operator or a tool can
|
|
5
5
|
query history without walking JSON on every request.
|
|
6
6
|
|
|
7
|
-
The projection is installed by `init` as
|
|
7
|
+
The projection is installed by `init` as eight `team-db*.mjs` modules under `.ai.local/scripts/`:
|
|
8
8
|
|
|
9
9
|
| Module | Role |
|
|
10
10
|
|---|---|
|
|
11
|
-
| `team-db.mjs` | CLI: `init`, `sync`, `delete`, `migrate-tasks`, `check`, `search`, `serve`, `jobs`, `schedule`, `tracker`, `task-run
|
|
12
|
-
| `team-db-ui.mjs` | the `ui` supervisor: probe-first `start`, `stop`, `status`, `restart`, the ownership marker, leader-only termination |
|
|
11
|
+
| `team-db.mjs` | CLI: `init`, `sync`, `delete`, `migrate-tasks`, `check`, `search`, `serve`, `jobs`, `schedule`, `tracker`, `task-run` |
|
|
13
12
|
| `team-db-tracker.mjs` | the file-authoritative tracker: items, links, the launch queue, eligibility order, import |
|
|
14
13
|
| `team-db-task-runner.mjs` | the opt-in `team/runner.json` supervisor behind tracker Continue |
|
|
15
14
|
| `team-db-schema.mjs` | capability probe, embedded migrations, pragmas, fingerprint, integrity |
|
|
16
15
|
| `team-db-project.mjs` | parsers, idempotent projector, confirmed task deletion, retention, search |
|
|
17
16
|
| `team-db-api.mjs` | `node:http` server (reads plus the bounded mutations), query layer, security boundary |
|
|
18
17
|
| `team-db-openapi.mjs` | the OpenAPI 3.1 document source |
|
|
19
|
-
| `team-db-dashboard.mjs` | the no-build dashboard (HTML, CSS, JS strings) |
|
|
20
18
|
| `team-db-scheduler.mjs` | job model, cron/interval math, the file store, the projection, and the timer |
|
|
21
19
|
|
|
22
|
-
The same seeded set is `ENGINE_SCRIPTS` in `bin/lib/engine-scripts.js`: the
|
|
20
|
+
The same seeded set is `ENGINE_SCRIPTS` in `bin/lib/engine-scripts.js`: the eight `team-db*.mjs`
|
|
23
21
|
modules plus the self-learning engine, `manifest.mjs`, `dump-output.mjs`,
|
|
24
22
|
`check-write-scope.mjs`, `aggregate-agent-task-metrics.mjs`, and the `processes.mjs` +
|
|
25
|
-
`process-lease.mjs` process manager (twenty
|
|
23
|
+
`process-lease.mjs` process manager (twenty published entries;
|
|
26
24
|
`node -e "require('./bin/lib/engine-scripts.js').SHIPPED_ENGINE_SCRIPTS.length"` prints the
|
|
27
25
|
shipped count). One further module, `upstream-research.mjs`, is declared in
|
|
28
26
|
`REPO_ONLY_ENGINE_SCRIPTS`: it exists in this repository's preset source and dogfood mirror but
|
|
@@ -46,7 +44,8 @@ is excluded from the published tarball, and a consumer install skips it without
|
|
|
46
44
|
asynchronous child process — the server never opens a writable connection, and the kill
|
|
47
45
|
switch answers before a child is spawned. Job writes carry `application/json` and at most
|
|
48
46
|
64 KiB, run-now an absent body or `{}`. The rescan and delete children are bounded at 30 s,
|
|
49
|
-
a job write or run-now at 10 s. There is no write-back
|
|
47
|
+
a job write or run-now at 10 s. There is no write-back and no outbound call; the efficiency
|
|
48
|
+
ledgers are local files read by a full sync.
|
|
50
49
|
- **The scheduler writes files before rows.** `scheduler/jobs.json` is the definition of
|
|
51
50
|
record, `scheduler/runs/**` and `scheduler/state.json` are its runtime state, and the three
|
|
52
51
|
`scheduled_jobs` / `job_runs` / `job_run_events` tables are projections of those files. The
|
|
@@ -113,17 +112,15 @@ and the pipeline run with exit 0.
|
|
|
113
112
|
node .ai.local/scripts/team-db.mjs init [--root <team-dir>] [--rebuild]
|
|
114
113
|
node .ai.local/scripts/team-db.mjs sync [--root <team-dir>] [--slug <slug>] [--quiet] [--json]
|
|
115
114
|
[--maintain] [--prune] [--vacuum]
|
|
116
|
-
[--rebuild | --no-rebuild]
|
|
115
|
+
[--rebuild | --no-rebuild]
|
|
116
|
+
[--telemetry | --no-telemetry] [--deadline-ms <n>]
|
|
117
117
|
node .ai.local/scripts/team-db.mjs delete --slug <slug> [--root <team-dir>] [--json]
|
|
118
118
|
node .ai.local/scripts/team-db.mjs migrate-tasks [--root <team-dir>] [--quiet] [--json]
|
|
119
119
|
[--rebuild | --no-rebuild]
|
|
120
120
|
node .ai.local/scripts/team-db.mjs check [--root <team-dir>]
|
|
121
121
|
node .ai.local/scripts/team-db.mjs search <query> [--limit <n>] [--json] [--root <team-dir>]
|
|
122
122
|
node .ai.local/scripts/team-db.mjs serve [--root <team-dir>] [--host <addr>] [--port <n>]
|
|
123
|
-
[--allow-remote]
|
|
124
|
-
node .ai.local/scripts/team-db.mjs ui start|restart [--root <team-dir>] [--json] [--quiet]
|
|
125
|
-
[--host <loopback>] [--port <n>] [--open]
|
|
126
|
-
node .ai.local/scripts/team-db.mjs ui stop|status [--root <team-dir>] [--json] [--quiet]
|
|
123
|
+
[--allow-remote]
|
|
127
124
|
node .ai.local/scripts/team-db.mjs jobs list [--enabled] [--sort <key>] [--json] [--quiet]
|
|
128
125
|
node .ai.local/scripts/team-db.mjs jobs get <id> [--json]
|
|
129
126
|
node .ai.local/scripts/team-db.mjs jobs put --file <path|-> [--dry-run] [--json]
|
|
@@ -200,13 +197,15 @@ targets must be on the same host.
|
|
|
200
197
|
|
|
201
198
|
| Name | Effect |
|
|
202
199
|
|---|---|
|
|
203
|
-
| `AI_RULES_TEAM_DB_DISABLE` | truthy value turns the **projection** off — the database write points, the `task-run ensure` seed and `serve` stop;
|
|
200
|
+
| `AI_RULES_TEAM_DB_DISABLE` | truthy value turns the **projection** off — the database write points, the `task-run ensure` seed and `serve` stop; the task files and the `tracker` file verbs stay usable (the tracker is not disabled by this switch, R3-7) |
|
|
204
201
|
| `AI_RULES_TEAM_DB_FORCE_FALLBACK` | truthy value forces the file-only path even on a supported runtime |
|
|
205
202
|
| `AI_RULES_TEAM_DB_ROOT` | team directory when `--root` is absent |
|
|
206
203
|
| `AI_RULES_TEAM_DB_PATH` | database file path (default `<teamRoot>/team.db`) |
|
|
207
204
|
| `AI_RULES_TEAM_DB_LOG` | error-log path (default `<cwd>/.ai.local/team/team-db-errors.log`) |
|
|
208
205
|
| `AI_RULES_TEAM_DB_SEAM` | phase label in the error log: `hook`, `receipt`, `cli`, `serve` |
|
|
209
206
|
| `AI_RULES_TEAM_DB_TRACKER_DRAIN_DISABLE` | truthy value stops the hook stop-seam auto-drain only; the `tracker` file verbs stay usable |
|
|
207
|
+
| `AI_RULES_TEAM_DB_TELEMETRY_DIR` | output-guard ledger directory read by a full sync (default `<teamRoot>/output-guard`); the API and the hook never read it |
|
|
208
|
+
| `AI_RULES_OUTPUT_GUARD_ROTATE_BYTES` | ledger rotation cap read once by the plugin's `setup()` (default 8 MiB, `0` disables); never read inside the `context` hook |
|
|
210
209
|
|
|
211
210
|
No other environment value is read or persisted. The error log stores a timestamp, a code,
|
|
212
211
|
a phase, and a message; it never stores prompt content or an environment value, and it is
|
|
@@ -362,8 +361,8 @@ for repository maintainers.
|
|
|
362
361
|
The `next` preset carries one `pipeline` job, `upstream-research`, and one engine module,
|
|
363
362
|
`.ai.local/scripts/upstream-research.mjs`. The job renders `upstream/prompt.md` and runs the
|
|
364
363
|
module with `--prompt {promptFile} --team-root . --repo-root ../..`; it is a normal
|
|
365
|
-
definition in `scheduler/jobs.json`, so `jobs list|get|put|enable|disable|run`, the
|
|
366
|
-
|
|
364
|
+
definition in `scheduler/jobs.json`, so `jobs list|get|put|enable|disable|run`, the API job
|
|
365
|
+
routes, and every consumer UI work unchanged. `init`/`update` seed the definition into
|
|
367
366
|
`scheduler/jobs.json` when the file is absent (template:
|
|
368
367
|
`presets/cursor/next/team/upstream/jobs.json`; the validator supplies the
|
|
369
368
|
`createdAt`/`updatedAt`/`revision` defaults on read), and a definition the operator already
|
|
@@ -463,6 +462,24 @@ two bounded directory listings inside the existing sync deadline — 200 items m
|
|
|
463
462
|
under 250 ms — and is idempotent by `content_hash` with `absent_at` marking like the task
|
|
464
463
|
walker; `sync --prune` removes tombstoned tracker rows.
|
|
465
464
|
|
|
465
|
+
Migration `0005-efficiency` moves `SCHEMA_VERSION` to 5. It is additive: `attempts` gains the
|
|
466
|
+
eleven usage columns, `gates` gains `outcome` and `outcome_derived`, and seven tables appear —
|
|
467
|
+
`tool_calls`, `usage_turns`, `session_tasks`, `telemetry_sources`, `efficiency_runs`,
|
|
468
|
+
`efficiency_run_cells`, `context_cost_hosts` — with the eight named indexes from the approved
|
|
469
|
+
SQL. A v4 database opens and migrates in place without losing a row; a v5 database is refused
|
|
470
|
+
by a v4 binary with `E_SCHEMA_NEWER`. The added columns stay `NULL` when no writer reported
|
|
471
|
+
them: a host `usage` object on `attempt_finished` wins, and `usage_recorded`
|
|
472
|
+
events are summed only when that object is absent, with `usage_source` recording `host` or
|
|
473
|
+
`cli`. A full `sync` ingests `output-guard/results*.jsonl` and `usage*.jsonl` (tool calls and
|
|
474
|
+
turns) plus `.session-leases/*.json` (session → task windows); a `--slug` sync never ingests,
|
|
475
|
+
`--no-telemetry` skips it, and `--telemetry` combined with `--slug` is `E_USAGE` exit 3. A
|
|
476
|
+
per-file `(size, mtime)` watermark in `telemetry_sources` makes a second run over an unchanged
|
|
477
|
+
tree a no-op, and a duplicate `(sessionID, callID)` / `(sessionID, messageID)` keeps the
|
|
478
|
+
earliest `observed_at`, so a plugin reload cannot move a row to a later day. Attribution runs
|
|
479
|
+
through the lease window only; a row outside every window stays `unmapped`. Three remaining
|
|
480
|
+
tables — `efficiency_runs`, `efficiency_run_cells`, `context_cost_hosts` — are populated by
|
|
481
|
+
later phases and stay empty in P1.
|
|
482
|
+
|
|
466
483
|
Each connection sets `journal_mode=WAL`, `busy_timeout=5000`, `foreign_keys=ON`, and
|
|
467
484
|
`synchronous=NORMAL`. One task is projected in one transaction; a `SIGKILL` mid-sync
|
|
468
485
|
rolls back the in-flight task and leaves `integrity_check` `ok`.
|
|
@@ -501,15 +518,16 @@ The registry is not a migration chain: `MIGRATIONS` and `SCHEMA_VERSION` are unc
|
|
|
501
518
|
closed, and FTS5 stays a **runtime capability** — a runtime without FTS5 records `like` in `schema_meta`, so the
|
|
502
519
|
registry never turns FTS5 into a hard schema dependency.
|
|
503
520
|
|
|
504
|
-
##
|
|
521
|
+
## HTTP API
|
|
505
522
|
|
|
506
523
|
`team-db.mjs serve` prints one line with the bound URL (default
|
|
507
|
-
`http://127.0.0.1:4178`).
|
|
508
|
-
|
|
509
|
-
|
|
524
|
+
`http://127.0.0.1:4178`). It serves JSON only: the OpenAPI 3.1 document is at `/openapi.json`,
|
|
525
|
+
and there is no built-in HTML page or browser surface. The frozen document is checked in at
|
|
526
|
+
`packages/ai-rules/docs/openapi/team-db.v1.json`; the gate is
|
|
510
527
|
`node scripts/check-team-db-contract.mjs`. The server loads its modules at start: restart
|
|
511
528
|
`serve` after an update to take a new route or method set — a stale process keeps answering
|
|
512
|
-
the old surface (for example, `405` on a route the new code serves).
|
|
529
|
+
the old surface (for example, `405` on a route the new code serves). A consumer that wants a
|
|
530
|
+
browser surface builds it in its own app and proxies to this API.
|
|
513
531
|
|
|
514
532
|
The API exposes the delete as `DELETE /api/v1/tasks/{slug}` — the same canonical deletion
|
|
515
533
|
as the CLI, executed as one bounded child. It answers `200` with `{"slug":"<S>"}` on
|
|
@@ -532,88 +550,58 @@ the confirmed task delete and the rescan to the named interface without authenti
|
|
|
532
550
|
A job definition carries arbitrary `argv` and run-now enqueues it, so that surface
|
|
533
551
|
executes operator-supplied commands as the API user; see `## Scheduled jobs`.
|
|
534
552
|
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
`
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
stops a live server.
|
|
563
|
-
|
|
564
|
-
The marker is `.ai.local/.ui/api.json` —
|
|
565
|
-
`{schemaVersion,pid,host,port,root,rootId,startedAt,command}` — written `0600` through
|
|
566
|
-
`api.json.tmp` + rename, with `rootId = sha256(realpath(resolved team root)).slice(0, 12)`: a hash,
|
|
567
|
-
never a path, and never transmitted. A marker whose `host` is outside `LOOPBACK_HOSTS`, or whose
|
|
568
|
-
port is not an integer in `0..65535`, is treated as unreadable: no probe ever targets it, and `stop`
|
|
569
|
-
removes it as stale.
|
|
570
|
-
|
|
571
|
-
**Ownership is the authorization.** A signal needs the marker pid alive **and**
|
|
572
|
-
`ps -p <pid> -o command=` matching `/team-db\.mjs\s+serve\b/`; the marker alone never authorizes one.
|
|
573
|
-
`stop` re-proves ownership immediately before each signal, signals that leader pid only — never the
|
|
574
|
-
process group, because `serve` spawns bounded delete children — sends `SIGTERM`, polls every 100 ms
|
|
575
|
-
for at most 5 000 ms, then `SIGKILL`s and verifies the pid is gone. A process that survives keeps its
|
|
576
|
-
marker and the command exits `1`. A live pid whose command does not match is left running with its
|
|
577
|
-
marker intact. A server answering with a different `rootId` is `E_UI_OTHER_ROOT`; a port answered by
|
|
578
|
-
something that is not a team-db health document is `E_UI_PORT_FOREIGN`; neither writes a marker.
|
|
579
|
-
|
|
580
|
-
**Platform.** `ui` is POSIX only: the ownership proof reads `ps`, and no equivalent command-line
|
|
581
|
-
reader exists on Windows, so no signal is ever sent there and `stop` reports the pid as unowned.
|
|
582
|
-
Use the foreground `serve` on Windows.
|
|
583
|
-
|
|
584
|
-
**The root override.** `--root <team-dir>` wins; otherwise `AI_RULES_TEAM_DB_ROOT`; otherwise
|
|
585
|
-
`<cwd>/.ai.local/team` — the same precedence as the projection layers, so `ui status` and `ui stop`
|
|
586
|
-
find a server started through the environment variable.
|
|
587
|
-
|
|
588
|
-
**The timer stays separate.** `ui start` never starts `team-db.mjs schedule`: the timer is one
|
|
589
|
-
foreground process holding a lease, and it is started explicitly. `ui start` and `ui status --json`
|
|
590
|
-
report the read-only `/health.scheduler` block instead.
|
|
591
|
-
|
|
592
|
-
A consumer tree installed from an older release needs `ai-rules update --fix`. A plain `update`
|
|
593
|
-
refreshes the command files but leaves an existing engine module alone, so a stale `team-db.mjs`
|
|
594
|
-
answers `ui` with exit `3`. A fork whose engine predates the verb uses the foreground
|
|
595
|
-
`node .ai.local/scripts/team-db.mjs serve`.
|
|
596
|
-
|
|
597
|
-
### Dashboard parity
|
|
598
|
-
|
|
599
|
-
| Surface | Dashboard | Excluded, with the reason |
|
|
600
|
-
|---|---|---|
|
|
601
|
-
| Tasks | list, detail, rescan, confirmed delete | — |
|
|
602
|
-
| Task delete | `DELETE /api/v1/tasks/{slug}` behind `confirm()`; the `200` success is announced in the page-level live region and focus returns to the list heading; `409 E_ACTIVE_TASK` names `activeSlug` in the detail live region | — |
|
|
603
|
-
| Tracker | read-only list, item panel (dependencies, dependents, linked tasks), queue section | create, update, enqueue and cancel stay in `team-db.mjs tracker` and the API: the dashboard is a read-plus-two-mutations operator surface, and the four writes carry graph and lease rules a browser page must not own |
|
|
604
|
-
| Jobs | definitions, next fire, run-now, runs, logs | unchanged |
|
|
605
|
-
| Mutating calls | exactly two on the task surface: `POST /api/v1/sync`, `DELETE /api/v1/tasks/{slug}` | pinned by `test-team-db-dashboard.mjs`, which also enumerates the four pre-existing jobs writes (`POST`/`PUT`/`DELETE /api/v1/jobs*`, run-now) and fails on a seventh `method:` site; together with no inline style or handler, no absolute URL, and the unchanged CSP |
|
|
606
|
-
|
|
607
|
-
### Delivery surface
|
|
608
|
-
|
|
609
|
-
| Platform | `next` commands | Other stacks |
|
|
553
|
+
### Efficiency read plane
|
|
554
|
+
|
|
555
|
+
`/api/v1/stats` carries an `efficiency` object beside the task counts, and
|
|
556
|
+
`/api/v1/tasks/{slug}/metrics` carries one per task. Six operations serve the cuts: `GET
|
|
557
|
+
/api/v1/efficiency/{series,tools,distribution,ab-runs,ab-runs/{runKey},context-cost}`.
|
|
558
|
+
|
|
559
|
+
- **`/stats.efficiency` is projection-wide.** `window` is always `{from:null,to:null}` and no
|
|
560
|
+
`/stats` parameter narrows the block. `attempts.total` counts **finished** attempts only
|
|
561
|
+
(`completed | changes_requested | validation_failed | blocked`; a skipped attempt is not
|
|
562
|
+
finished), so it is not the same number as `stats.attempts.total`. `measured` counts
|
|
563
|
+
`usage_origin = 'measured'`, `hostVerified` adds `usage_source = 'host'`; both coverages divide
|
|
564
|
+
by `total` and are `null` at `0/0`. `attribution` reports the sessions seen, the mapped
|
|
565
|
+
sessions, and the unattributed calls/turns.
|
|
566
|
+
- **Task efficiency.** `tokens` is `null` when nothing was measured; each kind is
|
|
567
|
+
`integer | null` and an unreported kind stays `null`. `costUsd` is `number | null`,
|
|
568
|
+
`durationMs` equals `totalAttemptDurationMs`, and `byAgent`/`byStep` count finished attempts
|
|
569
|
+
(Σ `attempts` = `attemptsTotal`, Σ `measured` = `attemptsMeasured`) with `tokens`/`costUsd`
|
|
570
|
+
`null` on an unmeasured row. `gates[]` carries every gate, `durationMs` nullable and a derived
|
|
571
|
+
`outcome` (`advanced_to_done | rework | re_gated | open | unknown`); a legacy row projected
|
|
572
|
+
before the derivation reads `unknown`, never a gate state. `/gates` is unchanged.
|
|
573
|
+
- **Tables only.** No operation has a writer before P4/P5: `/efficiency/ab-runs` answers
|
|
574
|
+
`{items:[],total:0,limit,offset,nextOffset:null}`, `/efficiency/ab-runs/{runKey}` answers 404
|
|
575
|
+
for an absent key (a malformed key is `422 E_VALIDATION`), and `/efficiency/context-cost`
|
|
576
|
+
answers `{snapshotAt:null,hosts:[],tasks:[…]}` with `tasks` populated from
|
|
577
|
+
`tasks.file_count`/`document_bytes`.
|
|
578
|
+
|
|
579
|
+
| Operation | Parameters | Behaviour |
|
|
610
580
|
|---|---|---|
|
|
611
|
-
|
|
|
612
|
-
|
|
|
613
|
-
|
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
581
|
+
| `GET /api/v1/efficiency/series` | `from`, `to`, `bucket=day\|week`, `metric`, `groupBy`, `includeAbsent`, `task` | Complete axis (`buckets[]`), an empty bucket is `{value:null,numerator:null,denominator:null,n:0}`, `truncated:false`, `coverage:null`. `from`/`to` default to the last 30 days and are echoed normalized; `from>to` is `422 E_VALIDATION` on `from`; over 400 buckets is `416 E_RANGE` on `from`. `week` keys are the Monday of the ISO week. Call metrics (`keptOutBytes`, `keptOutRatio`, `calls`) accept `none\|tool\|category`; turn metrics (`tokensTotal`, `costUsd`, `turns`) accept `none\|agent\|model`; any other pair is `422` on `groupBy`. |
|
|
582
|
+
| `GET /api/v1/efficiency/tools` | `from`, `to`, `limit` 1..50 (12), `includeAbsent`, `task` | Grain `(tool,category)`, ordered by `rawBytes DESC`; `otherCalls` is the sum of the folded rows, so `Σ items.calls + otherCalls = totals.calls`; `keptOutRatio` is `0` at `rawBytes=0`. |
|
|
583
|
+
| `GET /api/v1/efficiency/distribution` | `from`, `to` | `metric` echoes `rawBytes`; nearest-rank `p50/p90/p95/max` over `tool_calls.raw_bytes`, all `0` on an empty window; six fixed half-open bins from `[0,1024,8192,65536,262144,1048576]`, the last to `null`, summing to `calls`. |
|
|
584
|
+
| `GET /api/v1/efficiency/ab-runs` | `limit` 1..200 (50), `offset` 0..1000000 | The `efficiency_runs` rows newest first (`generated_at DESC, run_key DESC`), no `cells`. |
|
|
585
|
+
| `GET /api/v1/efficiency/ab-runs/{runKey}` | path `runKey` = `^[0-9]{8}T[0-9]{6}Z$` | The run row plus its `cells[]`. The tracker run-id pattern would reject every bench stamp, so the endpoint has its own. |
|
|
586
|
+
| `GET /api/v1/efficiency/context-cost` | — | `snapshotAt` is the newest `snapshot_at` (`null` when none); `hosts` is that snapshot only, each with `estimatedBytesPerFourTokens = round(bytes/4)` beside the stored `estimatedTokens`; `tasks` lists the present tasks. |
|
|
587
|
+
|
|
588
|
+
`includeAbsent=false` (the default) excludes rows whose `task_slug` is NULL; `true` includes
|
|
589
|
+
them, and a `task=<slug>` filter implies attributed rows only. The `/stats.efficiency`
|
|
590
|
+
`attribution` block is the counterweight a consumer UI must show beside any default number.
|
|
591
|
+
|
|
592
|
+
Gate outcomes are derived from the **next** event after `human_gate_ended`: `task_completed` →
|
|
593
|
+
`advanced_to_done`; `attempt_started`/`retry_scheduled` → `rework`; `human_gate_started` →
|
|
594
|
+
`re_gated`; no next event → `open`; anything else → `unknown`. A gate without an end, or whose
|
|
595
|
+
end is the last event, is `open`. The `gates.outcome` column stays nullable (migration 5 is
|
|
596
|
+
additive); the projector writes `outcome` with `outcome_derived = 1` and the read mapping turns a
|
|
597
|
+
legacy `NULL` into `unknown`.
|
|
598
|
+
|
|
599
|
+
## API only
|
|
600
|
+
|
|
601
|
+
`team-db.mjs serve` exposes the read plane and the bounded mutations over HTTP. It serves no
|
|
602
|
+
HTML, starts no browser, and has no dashboard module. The only browser UI in this repository is
|
|
603
|
+
`apps/team-tasks-ui`, which proxies to this API; other consumers build their own surface the
|
|
604
|
+
same way.
|
|
617
605
|
|
|
618
606
|
## Prompt capture
|
|
619
607
|
|
|
@@ -628,6 +616,14 @@ for tasks absent longer than 90 days while keeping normalized rows and hashes. I
|
|
|
628
616
|
null `prompts.content`: prompt retention equals task-folder retention, and deleting the folder
|
|
629
617
|
is the lever.
|
|
630
618
|
|
|
619
|
+
The efficiency tables store **no free text**: `tool_calls` has no `command`, `path`, or agent
|
|
620
|
+
column, and `usage_turns` has no model output. The same 90-day cutoff deletes `tool_calls` and
|
|
621
|
+
`usage_turns` rows by `day` under `sync --maintain`; `efficiency_runs` keeps the newest 50.
|
|
622
|
+
Telemetry retention follows the existing 90-day cutoff; a telemetry-only 180-day constant is a
|
|
623
|
+
P2 decision.
|
|
624
|
+
The ledgers themselves are git-ignored files under `team/output-guard/`, rotated at 8 MiB by
|
|
625
|
+
the plugin's `setup()` with two `.1` / `.2` archives, and a fresh clone is empty by design.
|
|
626
|
+
|
|
631
627
|
Run output crosses the same boundary and is **not** redacted: `scheduler/runs/**` holds a
|
|
632
628
|
child's `stdout` and `stderr` verbatim, a job inherits the listed `envPassthrough` names, and
|
|
633
629
|
only the retention caps bound how long the bytes stay on disk.
|
|
@@ -662,17 +658,21 @@ node scripts/test-team-db-migrate-tasks.mjs
|
|
|
662
658
|
node scripts/test-team-db-dualwrite.mjs
|
|
663
659
|
node scripts/test-team-db-api.mjs
|
|
664
660
|
node scripts/test-team-db-security.mjs
|
|
665
|
-
node scripts/test-team-db-dashboard.mjs
|
|
666
661
|
node scripts/test-team-db-concurrency.mjs
|
|
667
662
|
node scripts/test-team-db-scheduler.mjs
|
|
668
663
|
node scripts/test-team-db-fixtures.mjs
|
|
664
|
+
node scripts/test-team-db-efficiency.mjs
|
|
669
665
|
```
|
|
670
666
|
|
|
671
667
|
`test-team-db-fixtures.mjs` is the FAIL-direction suite: every gate above is exercised on a
|
|
672
|
-
planted defect, not only on the happy path.
|
|
668
|
+
planted defect, not only on the happy path. `test-team-db-efficiency.mjs` pins the v5
|
|
669
|
+
telemetry plane: usage precedence, duplicate observation days, coverage `null` at `0/0`, the
|
|
670
|
+
watermark re-run, the lease window, classifier parity with `report-efficiency.mjs`, and the
|
|
671
|
+
`record-usage` CLI surface. `record-usage.mjs` is repo-local: it has no preset twin and
|
|
672
|
+
`package.json#files` excludes `.ai.local/**`, so an installed package gets the orchestrator
|
|
673
|
+
prose without the CLI until P2 ships a twin or drops the prose.
|
|
673
674
|
|
|
674
675
|
Links: [`../README.md`](../README.md), [`PRESET-CONTRIBUTION.md`](PRESET-CONTRIBUTION.md),
|
|
675
|
-
the OpenSpec
|
|
676
|
-
`openspec/changes/2026-11-10-preset-task-scheduler-impl/`, and ADRs
|
|
676
|
+
the OpenSpec change `openspec/changes/2026-11-10-preset-task-scheduler-impl/`, and ADRs
|
|
677
677
|
`.ai.local/adr/0004-team-db-projection.md` and `.ai.local/adr/0005-team-db-scheduler.md` in
|
|
678
678
|
this repository.
|
package/docs/TOKEN-ECONOMY.md
CHANGED
|
@@ -96,8 +96,10 @@ Measured 2026-11-13 on the same file sets:
|
|
|
96
96
|
|
|
97
97
|
| Surface | Bytes |
|
|
98
98
|
|---|---|
|
|
99
|
-
| OpenCode always-on set (5 files) |
|
|
100
|
-
| Root `AGENTS.md` (ZCode entry; Mavis `REPO_AGENTS.md` target) |
|
|
99
|
+
| OpenCode always-on set (5 files) | 14,673 |
|
|
100
|
+
| Root `AGENTS.md` (ZCode entry; Mavis `REPO_AGENTS.md` target) | 6,058 |
|
|
101
|
+
|
|
102
|
+
The OpenCode row counts `instructions` only; the root `AGENTS.md` is loaded natively on top of that list, so the session prompt carries both rows.
|
|
101
103
|
|
|
102
104
|
Re-run the command for the current tree; these numbers move with any rule edit.
|
|
103
105
|
|