@bonesofspring/ai-rules 0.2.66 → 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 +72 -0
- package/README.md +6 -4
- package/bin/cli.js +9 -1
- package/bin/lib/engine-scripts.js +3 -10
- package/bin/lib/seed-ai-local-team.js +27 -1
- package/docs/OPENCODE-COMPATIBILITY.md +1 -0
- package/docs/OPENCODE.md +14 -1
- package/docs/PRESET-CONTRIBUTION.md +15 -8
- package/docs/TEAM-DB.md +107 -106
- package/docs/TOKEN-ECONOMY.md +36 -3
- package/docs/openapi/team-db.v1.json +3910 -1471
- package/package.json +13 -5
- package/presets/_shared/ai-local/scripts/dump-output.mjs +63 -12
- 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 +819 -50
- 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-tracker.mjs +2 -0
- 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 +21 -5
- package/presets/_shared/hooks/list-ai-local.mjs +17 -0
- package/presets/claude/android-kotlin/REPO_AGENTS.md +7 -47
- package/presets/claude/android-kotlin/hooks/chain-team-phases.sh +21 -5
- package/presets/claude/android-kotlin/hooks/list-ai-local.mjs +17 -0
- 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 +21 -5
- package/presets/claude/go/hooks/list-ai-local.mjs +17 -0
- 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 +21 -5
- package/presets/claude/ios-swift/hooks/list-ai-local.mjs +17 -0
- 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 +21 -5
- package/presets/claude/java/hooks/list-ai-local.mjs +17 -0
- 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 +21 -5
- package/presets/claude/mcp-ts/hooks/list-ai-local.mjs +17 -0
- 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 +21 -5
- package/presets/claude/mol/hooks/list-ai-local.mjs +17 -0
- 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/ci-investigator.md +5 -2
- 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/debugger.md +5 -2
- package/presets/claude/next/agents/feature-developer.md +11 -8
- 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 +21 -5
- package/presets/claude/next/hooks/list-ai-local.mjs +17 -0
- package/presets/claude/next/rules/architecture/feature-delivery-workflow.md +9 -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 +21 -5
- package/presets/claude/nuxt/hooks/list-ai-local.mjs +17 -0
- 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 +21 -5
- package/presets/claude/php-hexagonal/hooks/list-ai-local.mjs +17 -0
- 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 +21 -5
- package/presets/claude/php-laravel/hooks/list-ai-local.mjs +17 -0
- 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 +21 -5
- package/presets/claude/svelte/hooks/list-ai-local.mjs +17 -0
- 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 +21 -5
- package/presets/cursor/android-kotlin/hooks/list-ai-local.mjs +17 -0
- 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 +21 -5
- package/presets/cursor/go/hooks/list-ai-local.mjs +17 -0
- 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 +21 -5
- package/presets/cursor/ios-swift/hooks/list-ai-local.mjs +17 -0
- 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 +21 -5
- package/presets/cursor/java/hooks/list-ai-local.mjs +17 -0
- 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 +21 -5
- package/presets/cursor/mcp-ts/hooks/list-ai-local.mjs +17 -0
- 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 +21 -5
- package/presets/cursor/mol/hooks/list-ai-local.mjs +17 -0
- 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 +21 -5
- package/presets/cursor/next/hooks/list-ai-local.mjs +17 -0
- 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 +6 -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 +21 -5
- package/presets/cursor/nuxt/hooks/list-ai-local.mjs +17 -0
- 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 +21 -5
- package/presets/cursor/php-hexagonal/hooks/list-ai-local.mjs +17 -0
- 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 +21 -5
- package/presets/cursor/php-laravel/hooks/list-ai-local.mjs +17 -0
- 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 +21 -5
- package/presets/cursor/svelte/hooks/list-ai-local.mjs +17 -0
- 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 +21 -5
- package/presets/mavis/android-kotlin/hooks/list-ai-local.mjs +17 -0
- 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 +21 -5
- package/presets/mavis/go/hooks/list-ai-local.mjs +17 -0
- 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 +21 -5
- package/presets/mavis/ios-swift/hooks/list-ai-local.mjs +17 -0
- 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 +21 -5
- package/presets/mavis/java/hooks/list-ai-local.mjs +17 -0
- 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 +21 -5
- package/presets/mavis/mcp-ts/hooks/list-ai-local.mjs +17 -0
- 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 +21 -5
- package/presets/mavis/mol/hooks/list-ai-local.mjs +17 -0
- 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/ci-investigator.md +5 -2
- 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/debugger.md +5 -2
- package/presets/mavis/next/agents/feature-developer.md +11 -8
- 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 +21 -5
- package/presets/mavis/next/hooks/list-ai-local.mjs +17 -0
- 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 +9 -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 +21 -5
- package/presets/mavis/nuxt/hooks/list-ai-local.mjs +17 -0
- 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 +21 -5
- package/presets/mavis/php-hexagonal/hooks/list-ai-local.mjs +17 -0
- 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 +21 -5
- package/presets/mavis/php-laravel/hooks/list-ai-local.mjs +17 -0
- 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 +21 -5
- package/presets/mavis/svelte/hooks/list-ai-local.mjs +17 -0
- 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 +21 -5
- package/presets/opencode/android-kotlin/hooks/list-ai-local.mjs +17 -0
- 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 +21 -5
- package/presets/opencode/go/hooks/list-ai-local.mjs +17 -0
- 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 +21 -5
- package/presets/opencode/ios-swift/hooks/list-ai-local.mjs +17 -0
- 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 +21 -5
- package/presets/opencode/java/hooks/list-ai-local.mjs +17 -0
- 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 +21 -5
- package/presets/opencode/mcp-ts/hooks/list-ai-local.mjs +17 -0
- 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 +21 -5
- package/presets/opencode/mol/hooks/list-ai-local.mjs +17 -0
- 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/ci-investigator.md +5 -2
- 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/debugger.md +5 -2
- package/presets/opencode/next/agents/feature-developer.md +11 -8
- 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 +21 -5
- package/presets/opencode/next/hooks/list-ai-local.mjs +17 -0
- 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 +9 -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 +21 -5
- package/presets/opencode/nuxt/hooks/list-ai-local.mjs +17 -0
- 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 +21 -5
- package/presets/opencode/php-hexagonal/hooks/list-ai-local.mjs +17 -0
- 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 +21 -5
- package/presets/opencode/php-laravel/hooks/list-ai-local.mjs +17 -0
- 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/README.md +43 -0
- package/presets/opencode/plugins/output-guard/index.ts +306 -0
- package/presets/opencode/plugins/output-guard/ledger.ts +43 -0
- package/presets/opencode/plugins/output-guard/package.json +9 -0
- package/presets/opencode/plugins/output-guard/rewrite.ts +149 -0
- package/presets/opencode/plugins/task-status/economy.ts +112 -0
- package/presets/opencode/plugins/task-status/task-view.ts +86 -20
- package/presets/opencode/plugins/task-status/tui.tsx +19 -5
- 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 +21 -5
- package/presets/opencode/svelte/hooks/list-ai-local.mjs +17 -0
- 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 +21 -5
- package/presets/zcode/android-kotlin/hooks/list-ai-local.mjs +17 -0
- 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 +21 -5
- package/presets/zcode/go/hooks/list-ai-local.mjs +17 -0
- 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 +21 -5
- package/presets/zcode/ios-swift/hooks/list-ai-local.mjs +17 -0
- 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 +21 -5
- package/presets/zcode/java/hooks/list-ai-local.mjs +17 -0
- 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 +21 -5
- package/presets/zcode/mcp-ts/hooks/list-ai-local.mjs +17 -0
- 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 +21 -5
- package/presets/zcode/mol/hooks/list-ai-local.mjs +17 -0
- 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/ci-investigator.md +5 -2
- 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/debugger.md +5 -2
- package/presets/zcode/next/agents/feature-developer.md +11 -8
- 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 +21 -5
- package/presets/zcode/next/hooks/list-ai-local.mjs +17 -0
- 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 +9 -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 +21 -5
- package/presets/zcode/nuxt/hooks/list-ai-local.mjs +17 -0
- 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 +21 -5
- package/presets/zcode/php-hexagonal/hooks/list-ai-local.mjs +17 -0
- 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 +21 -5
- package/presets/zcode/php-laravel/hooks/list-ai-local.mjs +17 -0
- 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 +21 -5
- package/presets/zcode/svelte/hooks/list-ai-local.mjs +17 -0
- 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/scripts/report-context-cost.mjs +432 -0
- 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
|
@@ -11,7 +11,6 @@ This subagent runs standalone (`mcode exec --file`) and inherits no global conte
|
|
|
11
11
|
- `.mavis/rules/reference-features.md` — analog files first
|
|
12
12
|
- `.mavis/rules/anti-sycophancy-discipline.md` — procedural anti-sycophancy rules
|
|
13
13
|
- `.mavis/rules/anti-hallucination-contract.md` — do not invent signatures, imports, schemas, or evidence
|
|
14
|
-
- `.mavis/rules/post-change-lint.md` — lint/type-check after code edits
|
|
15
14
|
- `.mavis/rules/mcp-usage.md` — when verifying third-party APIs (Context7)
|
|
16
15
|
|
|
17
16
|
Also read matching `.ai.local/rules/*.md` (local overlay) for the active zone, and the project strict rules if present.
|
|
@@ -11,7 +11,6 @@ This subagent runs standalone (`mcode exec --file`) and inherits no global conte
|
|
|
11
11
|
- `.mavis/rules/reference-features.md` — analog files first
|
|
12
12
|
- `.mavis/rules/anti-sycophancy-discipline.md` — procedural anti-sycophancy rules
|
|
13
13
|
- `.mavis/rules/anti-hallucination-contract.md` — do not invent signatures, imports, schemas, or evidence
|
|
14
|
-
- `.mavis/rules/post-change-lint.md` — lint/type-check after code edits
|
|
15
14
|
- `.mavis/rules/mcp-usage.md` — when verifying third-party APIs (Context7)
|
|
16
15
|
- `.mavis/rules/tests-unit.md`
|
|
17
16
|
- `.mavis/rules/svelte-sveltekit-anti-hallucination.md` — SvelteKit phantom import banlist
|
|
@@ -11,7 +11,6 @@ This subagent runs standalone (`mcode exec --file`) and inherits no global conte
|
|
|
11
11
|
- `.mavis/rules/reference-features.md` — analog files first
|
|
12
12
|
- `.mavis/rules/anti-sycophancy-discipline.md` — procedural anti-sycophancy rules
|
|
13
13
|
- `.mavis/rules/anti-hallucination-contract.md` — do not invent signatures, imports, schemas, or evidence
|
|
14
|
-
- `.mavis/rules/post-change-lint.md` — lint/type-check after code edits
|
|
15
14
|
- `.mavis/rules/mcp-usage.md` — when verifying third-party APIs (Context7)
|
|
16
15
|
- `.mavis/rules/tests-unit.md`
|
|
17
16
|
- `.mavis/rules/svelte-sveltekit-anti-hallucination.md` — SvelteKit phantom import banlist
|
|
@@ -11,7 +11,6 @@ This subagent runs standalone (`mcode exec --file`) and inherits no global conte
|
|
|
11
11
|
- `.mavis/rules/reference-features.md` — analog files first
|
|
12
12
|
- `.mavis/rules/anti-sycophancy-discipline.md` — procedural anti-sycophancy rules
|
|
13
13
|
- `.mavis/rules/anti-hallucination-contract.md` — do not invent signatures, imports, schemas, or evidence
|
|
14
|
-
- `.mavis/rules/post-change-lint.md` — lint/type-check after code edits
|
|
15
14
|
- `.mavis/rules/mcp-usage.md` — when verifying third-party APIs (Context7)
|
|
16
15
|
- `.mavis/rules/tests-unit.md`
|
|
17
16
|
- `.mavis/rules/svelte-sveltekit-anti-hallucination.md` — SvelteKit phantom import banlist
|
|
@@ -1283,11 +1283,15 @@ function focusDigestMarkdown(dir, statusSnapshot) {
|
|
|
1283
1283
|
}
|
|
1284
1284
|
} catch {}
|
|
1285
1285
|
}
|
|
1286
|
+
// Five entries is enough to resume; a longer list is a status dump, not a
|
|
1287
|
+
// pointer. The line budget below still bounds a single entry with many paths.
|
|
1288
|
+
const MAX_FOCUS_ENTRIES = 5;
|
|
1289
|
+
const shownIncomplete = incomplete.slice(0, MAX_FOCUS_ENTRIES);
|
|
1286
1290
|
const pathLines = [];
|
|
1287
1291
|
if (incomplete.length === 0) pathLines.push(' - (none)');
|
|
1288
1292
|
else {
|
|
1289
|
-
for (let index = 0; index <
|
|
1290
|
-
const item =
|
|
1293
|
+
for (let index = 0; index < shownIncomplete.length; index += 1) {
|
|
1294
|
+
const item = shownIncomplete[index];
|
|
1291
1295
|
if (item.paths.length === 0) pathLines.push(' - ' + item.id + ': (none)');
|
|
1292
1296
|
else {
|
|
1293
1297
|
for (let pathIndex = 0; pathIndex < item.paths.length; pathIndex += 1) {
|
|
@@ -1295,6 +1299,9 @@ function focusDigestMarkdown(dir, statusSnapshot) {
|
|
|
1295
1299
|
}
|
|
1296
1300
|
}
|
|
1297
1301
|
}
|
|
1302
|
+
if (incomplete.length > shownIncomplete.length) {
|
|
1303
|
+
pathLines.push(' - (+' + String(incomplete.length - shownIncomplete.length) + ' more incomplete entries)');
|
|
1304
|
+
}
|
|
1298
1305
|
}
|
|
1299
1306
|
let readyLine = '- decomposition ready set: (none)';
|
|
1300
1307
|
try {
|
|
@@ -2643,7 +2650,16 @@ if (status.state === 'changes_requested') {
|
|
|
2643
2650
|
process.stdout.write('{}');
|
|
2644
2651
|
process.exit(0);
|
|
2645
2652
|
}
|
|
2646
|
-
const
|
|
2653
|
+
const reviewerStepIndex = typeof status.pipelineIndex === 'number' ? status.pipelineIndex : 0;
|
|
2654
|
+
let verifierStepIndex = -1;
|
|
2655
|
+
for (let index = reviewerStepIndex - 1; index >= 0; index -= 1) {
|
|
2656
|
+
if (getStepAgents(steps[index]).includes('build-verifier')) {
|
|
2657
|
+
verifierStepIndex = index;
|
|
2658
|
+
break;
|
|
2659
|
+
}
|
|
2660
|
+
}
|
|
2661
|
+
const retryGate = verifierStepIndex >= 0 ? 'build-verifier' : reviewer;
|
|
2662
|
+
const retryAfterFixStepIndex = verifierStepIndex >= 0 ? verifierStepIndex : reviewerStepIndex;
|
|
2647
2663
|
const developerIndex = scheduleRetry('feature-developer', reviewer, finishedAttempt);
|
|
2648
2664
|
if (developerIndex < 0) {
|
|
2649
2665
|
beginHumanGate();
|
|
@@ -2656,10 +2672,10 @@ if (status.state === 'changes_requested') {
|
|
|
2656
2672
|
currentAgent: 'feature-developer',
|
|
2657
2673
|
state: 'in_progress',
|
|
2658
2674
|
phase: 'executing',
|
|
2659
|
-
retryAfterFix:
|
|
2675
|
+
retryAfterFix: retryGate,
|
|
2660
2676
|
retryAfterFixStepIndex,
|
|
2661
2677
|
});
|
|
2662
|
-
out(handoffForAgent('feature-developer', steps[developerIndex]?.scope, steps[developerIndex]) + ` After fixes, re-run ${
|
|
2678
|
+
out(handoffForAgent('feature-developer', steps[developerIndex]?.scope, steps[developerIndex]) + ` After fixes, re-run ${retryGate}.`);
|
|
2663
2679
|
process.exit(0);
|
|
2664
2680
|
}
|
|
2665
2681
|
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
*/
|
|
15
15
|
import fs from 'node:fs';
|
|
16
16
|
import path from 'node:path';
|
|
17
|
+
import crypto from 'node:crypto';
|
|
17
18
|
import { fileURLToPath } from 'node:url';
|
|
18
19
|
|
|
19
20
|
export const OUTPUT_CAP = 4096;
|
|
@@ -29,6 +30,15 @@ const isRealDirectory = (target) => {
|
|
|
29
30
|
}
|
|
30
31
|
};
|
|
31
32
|
|
|
33
|
+
/** First 8 hex of the file body; a session-local re-read gate, not a security hash. */
|
|
34
|
+
const shortHash = (file) => {
|
|
35
|
+
try {
|
|
36
|
+
return crypto.createHash('sha256').update(fs.readFileSync(file)).digest('hex').slice(0, 8);
|
|
37
|
+
} catch {
|
|
38
|
+
return '????????';
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
|
|
32
42
|
const insideRoot = (root, abs) => {
|
|
33
43
|
const relative = path.relative(root, abs);
|
|
34
44
|
return relative === '' || (!relative.startsWith('..') && !path.isAbsolute(relative));
|
|
@@ -168,6 +178,13 @@ export const renderReport = (root, inputs) => {
|
|
|
168
178
|
}
|
|
169
179
|
if (blocks.length === 0) return { text: 'overlays=0', chains: [], read: [] };
|
|
170
180
|
const lines = [`overlays=${overlaySet.size}`, ...blocks.flatMap((block) => block.lines)];
|
|
181
|
+
const readSet = new Set(read);
|
|
182
|
+
if (readSet.size > 0) {
|
|
183
|
+
lines.push('hashes:');
|
|
184
|
+
for (const file of [...readSet].sort()) {
|
|
185
|
+
lines.push(`${file} ${shortHash(path.join(root, file))}`);
|
|
186
|
+
}
|
|
187
|
+
}
|
|
171
188
|
return {
|
|
172
189
|
text: lines.join('\n'),
|
|
173
190
|
chains: blocks.map((block) => ({ for: block.for, overlays: block.overlays })),
|
|
@@ -201,8 +201,8 @@ Additional states: `blocked` — a step (or a parallel producer) cannot proceed;
|
|
|
201
201
|
| `in_progress` | Current step running |
|
|
202
202
|
| `completed` | Current step done; hook advances |
|
|
203
203
|
| `awaiting_approval` | Human gate; wait for `/task-continue` |
|
|
204
|
-
| `changes_requested` | Reviewer blocked; re-run developer
|
|
205
|
-
| `validation_failed` | build-verifier failed; re-run developer then build-verifier |
|
|
204
|
+
| `changes_requested` | Reviewer blocked; re-run developer → `build-verifier` (delta) → same reviewer when the fix touches code/tests; docs/artifacts only → same reviewer |
|
|
205
|
+
| `validation_failed` | build-verifier failed; re-run developer then `build-verifier` (delta) |
|
|
206
206
|
| `blocked` | Pipeline / step cannot proceed (e.g. `pipeline_parse_error`, completion of a parallel step whose producer's receipt was missing — see `agent-artifact-contracts.md` § Completion receipts) |
|
|
207
207
|
| `awaiting_artifact_receipt` | Producer stopped but the bound or assigned-output receipt was missing or stale; hook keeps the attempt active and does not advance. See `agent-artifact-contracts.md` (Schema field name + Receipt binding) for the silent-bug class that lands here. |
|
|
208
208
|
| `paused` | Operator sentinel engaged; the hook recorded the pause and refused to advance or hand off. Remove the sentinel and run `/task-continue`. |
|
|
@@ -242,8 +242,8 @@ On each `subagentStop`, the hook reconciles `status.state` from the completing p
|
|
|
242
242
|
3. One role per Task call — **except** parallel steps: multiple Task calls in one message.
|
|
243
243
|
4. **Never** skip `humanGates` without `/task-continue` or explicit user approval.
|
|
244
244
|
5. Persist handoffs to disk (`brief.md`, `decomposition.md`, `debug-report.md`, `validation-report.md`, `architecture.md`, `migration-plan.md`, `ci-report.md`, `a11y-review.md`, `perf-report.md`, `security-review.md`, `api-contract-review.md`, `unit-test-plan.md`, `documentation.md`, `review.md`, `mockup-review.md`, `ux-design.md`) and update the producer-owned terminal receipt in `artifact-manifest.json`.
|
|
245
|
-
6. On `changes_requested` from reviewers: hook sets `retryAfterFix` → developer → same reviewer. Exception: embedded `mockup-reviewer` FAIL (`changes_requested` while the completed/current agent is `mockup-reviewer`) → `awaiting_approval` / `/task-continue` only — do **not** `retryAfterFix` to developer. A `mockup-reviewer` verdict `mockup-change-requested` (a defect whose fix belongs in the design source, not the implementation) routes the same way — `awaiting_approval`, no developer retry.
|
|
246
|
-
7. On `validation_failed` from `build-verifier`: hook sets `retryAfterFix: build-verifier` → developer → build-verifier.
|
|
245
|
+
6. On `changes_requested` from reviewers: hook sets `retryAfterFix` → developer → `build-verifier` (delta) → same reviewer when the fix touches code/tests; a docs/artifacts-only fix returns to the same reviewer without a code gate. Exception: embedded `mockup-reviewer` FAIL (`changes_requested` while the completed/current agent is `mockup-reviewer`) → `awaiting_approval` / `/task-continue` only — do **not** `retryAfterFix` to developer. A `mockup-reviewer` verdict `mockup-change-requested` (a defect whose fix belongs in the design source, not the implementation) routes the same way — `awaiting_approval`, no developer retry.
|
|
246
|
+
7. On `validation_failed` from `build-verifier`: hook sets `retryAfterFix: build-verifier` → developer → build-verifier (delta).
|
|
247
247
|
8. When all steps complete, suggest `/technical-retro <slug>`.
|
|
248
248
|
9. If `autoChain: false` in pipeline, do not rely on hook — manual step only.
|
|
249
249
|
10. **Persist the verbatim original prompt.** Every `/task` and every routed work request writes the user's raw prompt to `.ai.local/team/tasks/<slug>/prompt.md` during slug bootstrap (write-if-absent; never overwrite on resume). It is not a manifest `artifacts[]` body — register the path on the `routing` entry. See **agent-artifact-contracts** § Prompt artifact. Also append every **subsequent user-authored** prompt for the same slug — a new user message while the slug is active, `/task-continue` arguments, human-gate feedback, a clarification answer — to the append-only `.ai.local/team/tasks/<slug>/prompt-log.md` (`seq` = max + 1; never rewrite or duplicate an entry; never log machine-generated hook `followup_message` or empty/argument-less invocations). Register its path on the `routing` entry. See **agent-artifact-contracts** § Prompt log. A message that explicitly addresses a **closed** slug follows the same ledger with the `post-terminal` marker — append-only, no reopen, one bounded `sync --slug`; see § Team artifact I/O.
|
|
@@ -280,7 +280,7 @@ Use Task tool or `/agent-name`. Pass: slug, artifact paths, step `scope` if set.
|
|
|
280
280
|
**Token usage.** When the host exposes token counts, append a `usage_recorded` event next to the attempt:
|
|
281
281
|
|
|
282
282
|
```bash
|
|
283
|
-
node .ai.local/scripts/record-usage.mjs --task <slug> --attempt <attemptId> --input <n> --output <n> [--cached <n>] [--model <id>]
|
|
283
|
+
node .ai.local/scripts/record-usage.mjs --task <slug> --attempt <attemptId> --input <n> --output <n> [--cached <n>] [--cache-write <n>] [--reasoning <n>] [--turn <turnId>] [--model <id>]
|
|
284
284
|
```
|
|
285
285
|
|
|
286
286
|
The chain hook also forwards a `usage` object from its input into the `attempt_finished` event. Never estimate or invent token counts; a missing usage record stays missing.
|
|
@@ -7,12 +7,8 @@
|
|
|
7
7
|
|
|
8
8
|
# Principles
|
|
9
9
|
|
|
10
|
-
- **KISS:** the simplest change in the repository’s patterns.
|
|
11
|
-
- **
|
|
12
|
-
- **YAGNI:** no APIs, flags, or “for later” layers without a current requirement.
|
|
13
|
-
- **SOLID:** S — one reason to change; O — composition/new implementations; L — subtype contract; I — narrow ports; D — abstractions (ports), details in stack adapters.
|
|
14
|
-
- **CUPID:** Composable; Unix philosophy (one responsibility); Predictable; Idiomatic (repo); Domain-based.
|
|
15
|
-
- **Composition over inheritance;** Law of Demeter — no `a.b.c.d` chains; via public API / facade.
|
|
10
|
+
- **KISS / YAGNI / DRY (Rule of Three):** the simplest change in the repository’s patterns; share after the 3rd repetition; no “for later” APIs, flags, or layers.
|
|
11
|
+
- **SOLID / CUPID, applied:** composition over inheritance; one reason to change; narrow ports; no `a.b.c.d` chains — go through a public API or facade.
|
|
16
12
|
|
|
17
13
|
# Over-abstraction guardrails
|
|
18
14
|
|
|
@@ -12,7 +12,7 @@ Typical feature with data and UI. Concrete directories and rule stems — in the
|
|
|
12
12
|
4. **State** — store / ViewModel / use cases; no direct HTTP and no DTOs in UI.
|
|
13
13
|
5. **UI** — thin views/components; data via state; design system. If the prompt or `brief.md` contains a `figma.com` URL, **mockup review must complete** (or the user must continue past FAIL/`BLOCKED_MCP` via `/task-continue`) **before UI work**. When required-signal and **no** `figma.com`, **`ux-design.md` must exist** (not `INCOMPLETE`) before UI work — else blocked, hand back to analyst. Non-UI tasks no-op these gates. When a mockup contract exists for the WP, the UI step consumes it (per-node spec = the binding baseline) and a post-implementation verification gate runs against it (scope per `mockup-review` § Post-implementation gate) — screenshot / value / state / structural-parity diff plus a freeze re-check; unmapped implemented components are findings, not silent additions.
|
|
14
14
|
6. **Tests** — unit for mappers / non-trivial logic; e2e/UI per stack convention.
|
|
15
|
-
7. **Completion** —
|
|
15
|
+
7. **Completion** — closure gate: `build-verifier` runs the stack gate set **once**, after the last authoring step. During Build (steps 1–6) do not run project lint/test/build; author code and tests. When the current WP spans **more than one** layer or module, `implementation.md` includes a **Code Map** (3–8 annotated repo-relative paths) and **Suggested Review Order** (`concern | path:line | ≤15 word note`). Omit both for a single-file or single-layer WP.
|
|
16
16
|
|
|
17
17
|
## Context hygiene
|
|
18
18
|
|
|
@@ -20,13 +20,9 @@ A command whose output can exceed ~4 KB — a test run, a build/lint log, `git l
|
|
|
20
20
|
|
|
21
21
|
## Iterative refinement loop
|
|
22
22
|
|
|
23
|
-
Every stage runs the named loop **draft →
|
|
23
|
+
Every stage runs the named loop **draft → structural evaluation → refine** against a named oracle: reference-feature parity, layer/import shape, schema/contract parity, or review. The oracle is **not** a project test run. Tests are authored in the stage and executed by the closure gate; a failing test is closure evidence, not a per-stage trigger. When `implementationRail: tdd` is explicitly on, targeted tests are the documented cadence exception.
|
|
24
24
|
|
|
25
|
-
|
|
26
|
-
- **Evaluate** it against the stage's "done when" / exit criteria with the **named oracle** — a structural gate, a reviewer parity check, a test suite, or a human approval.
|
|
27
|
-
- **Refine** and re-evaluate until the oracle passes or the human re-scopes; loop back to the owning task, never forward past a failed oracle.
|
|
28
|
-
|
|
29
|
-
**Exit criteria:** a layer or stage is complete only when its named criteria hold (mapper tests green, parity check passes, gate output clean). Do not advance to the next checklist step while the current step's oracle fails; a repeatedly failing oracle triggers **plan revision**.
|
|
25
|
+
**Exit criteria:** a layer or stage is complete only when its structural criteria hold (reference parity, barrel/import shape, authored test present). Do not advance to the next checklist step while the current step's oracle fails; a repeatedly failing oracle triggers **plan revision**.
|
|
30
26
|
|
|
31
27
|
## Data flow (orientation)
|
|
32
28
|
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
# Linters
|
|
1
|
+
# Linters at implementation closure
|
|
2
2
|
|
|
3
|
-
**Requestable,
|
|
3
|
+
**Requestable, not always-on.** Read it before the closure gate — not after every edit.
|
|
4
4
|
|
|
5
5
|
## When to apply
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
At **implementation closure**: after the last authoring step (code and tests) is complete, and after a fix that changes lint/check inputs.
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
In a pipeline, **`build-verifier` owns this pass**; the developer does not run it. During implementation (Build), write code and tests only — do **not** run project `lint`, `check`, test, e2e, or `build`.
|
|
10
10
|
|
|
11
|
-
**
|
|
11
|
+
Phase rule: **Build** = author code and tests (no project gate); **Closure** = one full pass by `build-verifier`; **Delta** = only commands whose inputs changed. Exceptions: debug/CI reproduction of the single failing check, test-only/test-healing intent, an explicit user request, and single-agent mode (one closure pass at the end of the turn).
|
|
12
12
|
|
|
13
13
|
## Required commands
|
|
14
14
|
|
|
@@ -16,18 +16,18 @@ Working directory — **SvelteKit root** (where `svelte.config.*` lives). Packag
|
|
|
16
16
|
|
|
17
17
|
1. **`lint:js`** — full project ESLint (`eslint-plugin-svelte` when configured).
|
|
18
18
|
2. **`lint:css`** — full Stylelint.
|
|
19
|
+
3. **`check`** (`svelte-kit sync && svelte-check`) — when TypeScript / `.svelte` / SvelteKit config changed.
|
|
20
|
+
4. **`build`** — only when the change-set touches routes, `svelte.config.*`, or the AC requires a production build.
|
|
19
21
|
|
|
20
|
-
|
|
22
|
+
**Type/svelte gate script name is `check`**, not Next’s `type-check` and not Nuxt’s `typecheck`. Binary — `svelte-check`; package script — **`check`**.
|
|
21
23
|
|
|
22
|
-
##
|
|
24
|
+
## Procedure
|
|
23
25
|
|
|
24
|
-
1.
|
|
25
|
-
2. Run
|
|
26
|
+
1. Confirm all authoring is complete.
|
|
27
|
+
2. Run the closure set **once** from SvelteKit root.
|
|
26
28
|
3. Analyze the full output; fix errors/warnings in changed files; for Stylelint — autofix if available.
|
|
27
|
-
4.
|
|
28
|
-
5.
|
|
29
|
-
|
|
30
|
-
**Type/svelte gate script name is `check`**, not Next’s `type-check` and not Nuxt’s `typecheck`. Binary — `svelte-check`; package script — **`check`**.
|
|
29
|
+
4. Re-run **only the command that failed**. Never re-run a green command with unchanged inputs.
|
|
30
|
+
5. Record the result in `validation-report.md`, not `implementation.md`.
|
|
31
31
|
|
|
32
32
|
## What to fix
|
|
33
33
|
|
|
@@ -29,7 +29,7 @@ Checklist for PRs that touch `packages/ai-rules/presets/**` (and dogfood `.curso
|
|
|
29
29
|
- [ ] **UI-only surfaces:** `mockup-reviewer`, `accessibility-reviewer`, `ux-design`, and the stack performance skill ship only on UI stacks (`check-preset-leakage.sh`)
|
|
30
30
|
- [ ] **Rule eval (hard):** `node packages/ai-rules/scripts/check-rule-eval.mjs` runs inside `yarn release:gate`; keep every registered golden stem paired
|
|
31
31
|
- [ ] **Anti-hallucination:** `check-anti-hallucination-coverage.mjs` is green inside `yarn release:gate`. Every role loads `anti-hallucination-contract`. Writer roles, including `code-reviewer`, also load `STACK_FLOOR_STEMS`. Register a new skill family in `SKILL_CONTRACT_CLASS` (`writer` or `reader`) or the gate FAILs.
|
|
32
|
-
- [ ] **Gate:** `yarn check:
|
|
32
|
+
- [ ] **Gate:** `yarn check:task <slug>` (or `yarn check:changed` on a clean tree) and the gates it names; `yarn check:fast` only when it names none; `yarn release:gate` from `packages/ai-rules/` before a release (full composite: twin-map, token-budget, leakage, drift, i18n, local overlay, anti-hallucination coverage)
|
|
33
33
|
|
|
34
34
|
## Pointers
|
|
35
35
|
|
|
@@ -39,7 +39,7 @@ Checklist for PRs that touch `packages/ai-rules/presets/**` (and dogfood `.curso
|
|
|
39
39
|
- Sync: `preset-twin-sync`
|
|
40
40
|
- Budget: `preset-token-budget`
|
|
41
41
|
- Leakage: `preset-no-cross-stack-leakage`
|
|
42
|
-
- Validation: `
|
|
42
|
+
- Validation: same `check:task` / `check:changed` loop; `yarn release:gate` before a release (`packages/ai-rules/scripts/release-gate.sh`)
|
|
43
43
|
- Dogfood scripts: `packages/ai-rules/scripts/sync-dogfood-cursor.sh`, `sync-dogfood-claude.sh`, `sync-dogfood-mavis.sh`, `sync-dogfood-opencode.sh`
|
|
44
44
|
- Drift script: `packages/ai-rules/scripts/check-shared-core-drift.sh`
|
|
45
45
|
- Orchestrator: when editing presets, load this checklist + twin-sync
|
|
@@ -10,7 +10,7 @@ Load `svelte-sveltekit-anti-hallucination` before writing or patching code or te
|
|
|
10
10
|
2. If `docs/specs/INDEX.md` exists **or** brief/handoff lists approved generated specs, resolve via **`product-specs`** and treat approved specs as behavior SoT before layer work (soft-fail on miss — do not invent behavior). If generation was requested but not yet approved, stop for human gate — do not implement against draft-only gaps.
|
|
11
11
|
3. Read **`feature-delivery-workflow`** and **`reference-features`** — follow layer order and mirror closest reference feature.
|
|
12
12
|
4. Add or update focused tests for changed behavior.
|
|
13
|
-
5. Validation from SvelteKit root:
|
|
13
|
+
5. Validation from SvelteKit root: **`post-change-lint`** is the closure gate. Do not run project lint/check/test/build during implementation; `build-verifier` runs the full set **once** after the last authoring step.
|
|
14
14
|
|
|
15
15
|
- If the prompt or brief contains a `figma.com` URL, load requestable skill `mockup-review` and do not start UI work until the mockup-reviewer step is completed or the user continued past FAIL/`BLOCKED_MCP`.
|
|
16
16
|
- When required-signal (user asked UX, AC require flows/states, or spec-gen page/feature) and **no** `figma.com` URL: `ux-design.md` must exist on the analysis manifest entry (verdict not `INCOMPLETE`) before UI work. If missing, **blocked** — hand back to `task-analyst`. Parallel to the mockup gate when Figma exists.
|
|
@@ -29,7 +29,7 @@ Fix selectors, waits, setup, or page-object details without weakening business a
|
|
|
29
29
|
|
|
30
30
|
## Validation
|
|
31
31
|
|
|
32
|
-
|
|
32
|
+
For a test-authoring or test-healing intent, run the targeted spec and report the command/result. For feature implementation, author the spec only; `build-verifier` runs the affected e2e at closure.
|
|
33
33
|
|
|
34
34
|
|
|
35
35
|
## Stack notes (SvelteKit)
|
|
@@ -30,4 +30,4 @@ Fix mocks, async timing, selectors, and setup — preserve business assertions.
|
|
|
30
30
|
|
|
31
31
|
## Validation
|
|
32
32
|
|
|
33
|
-
|
|
33
|
+
For a test-authoring or test-healing intent, run the targeted spec from repository root and report command, pass/fail, and remaining gaps vs plan. For feature implementation, author the specs only; `build-verifier` runs the affected suite at closure.
|
|
@@ -12,13 +12,7 @@ Root `AGENTS.md` is native always-on. Read it first, then this file.
|
|
|
12
12
|
- Other rules: lazy `Read` `.opencode/rules/<stem>.md` when the task matches.
|
|
13
13
|
- Agents: native `@name` / Task from `.opencode/agents/`.
|
|
14
14
|
- Commands: native `/task` from `.opencode/commands/`.
|
|
15
|
-
- After a producer receipt, run the chain by hand (`projectHooks` is `manual
|
|
16
|
-
`printf '%s\n' '{"status":"completed"}' | TEAM_TASK_SLUG=<slug> bash .opencode/hooks/chain-team-phases.sh`.
|
|
17
|
-
Slash commands are native (`/task` from `.opencode/commands/`). Do not assume `SubagentStop` auto-chain.
|
|
18
|
-
Agents must not write lifecycle fields in `status.json` / `metrics.json`.
|
|
19
|
-
- **TUI plugin.** `.opencode/plugins/task-status/` ships a TUI sidebar for the
|
|
20
|
-
active `/task` run. OpenCode auto-loads it; it does not chain phases or write
|
|
21
|
-
lifecycle files. OpenCode Desktop does not render TUI plugins.
|
|
15
|
+
- After a producer receipt, run the chain by hand (`projectHooks` is `manual`): `printf '%s\n' '{"status":"completed"}' | TEAM_TASK_SLUG=<slug> bash .opencode/hooks/chain-team-phases.sh`. Agents never write `status.json` / `metrics.json`.
|
|
22
16
|
|
|
23
17
|
## Essential rules (read every turn)
|
|
24
18
|
|
|
@@ -34,29 +28,6 @@ Guide: `docs/LOCAL-OVERLAY.md`. These essential rules are a prompt contract.
|
|
|
34
28
|
|
|
35
29
|
See `.opencode/rules/README.md` for the full catalog and loading strategy.
|
|
36
30
|
|
|
37
|
-
## Harness wiring
|
|
38
|
-
|
|
39
|
-
- `opencode.json` carries a compact `instructions` list (always-on rule
|
|
40
|
-
paths + `.opencode/AGENTS.md`) and a `permission.bash` map. OpenCode
|
|
41
|
-
resolves `bash` rules by pattern match, last match wins, so the
|
|
42
|
-
catch-all `"*": "allow"` stays first and the `git commit` / `git push`
|
|
43
|
-
`deny` rows after it bind. An explicit `deny` is enforced rather than
|
|
44
|
-
prompted, so `--auto` / auto-approve does not turn it into an approval.
|
|
45
|
-
**This is not a hard boundary.** An agent-level `permission` block overrides
|
|
46
|
-
the global map, a command whose parsed form does not match the pattern is not
|
|
47
|
-
covered, and a user editing their own `opencode.json` can widen it.
|
|
48
|
-
`commit-hygiene` plus the human commit step is the control; the config deny
|
|
49
|
-
is defence in depth.
|
|
50
|
-
On re-init, `mergeOpencodeConfig` unions preset instruction paths, fills
|
|
51
|
-
missing `permission.bash` keys, and re-applies the universal `git commit` /
|
|
52
|
-
`git push` `deny` rows even against a same-key consumer row. Unrelated
|
|
53
|
-
consumer keys and extra instruction paths stay.
|
|
54
|
-
- **Subagent rules** are re-declared inside every `.opencode/agents/*.md`
|
|
55
|
-
via the `## Rules to load (subagent context)` block (always-on + zone
|
|
56
|
-
rules filtered to stems that exist for this stack). `Task`-launched
|
|
57
|
-
subagents do not inherit the parent's `instructions`, so this block
|
|
58
|
-
is the authoritative mechanism.
|
|
59
|
-
|
|
60
31
|
**Platform docs:** published with the `@bonesofspring/ai-rules` package
|
|
61
32
|
(`docs/OPENCODE.md`, `docs/OPENCODE-COMPATIBILITY.md`) — **not** copied into
|
|
62
33
|
the consumer repo. Source: https://github.com/bonesofspring/ai-rules
|
|
@@ -77,9 +48,7 @@ the consumer repo. Source: https://github.com/bonesofspring/ai-rules
|
|
|
77
48
|
| UI tests | skill `instrumentation-ui-e2e` + agents `instrumentation-test-*` |
|
|
78
49
|
| Security | `security-android.md` |
|
|
79
50
|
| Compose / MVI | `compose-ui.md`, `state-and-viewmodels.md` |
|
|
80
|
-
| Validation before review | agent `build-verifier` |
|
|
81
51
|
| Technical retro | `/technical-retro` + skill `technical-retro` |
|
|
82
|
-
| Update installed presets | `/update` |
|
|
83
52
|
|
|
84
53
|
## Dogfood (5 scenarios)
|
|
85
54
|
|
|
@@ -98,14 +67,3 @@ the consumer repo. Source: https://github.com/bonesofspring/ai-rules
|
|
|
98
67
|
## Pipeline routing
|
|
99
68
|
|
|
100
69
|
Intent detection, profiles (`full` / `standard` / `light`), and default steps — **only** in `agents/task-router.md`. Schema and rename map — `agents/README.md`.
|
|
101
|
-
|
|
102
|
-
## Install
|
|
103
|
-
|
|
104
|
-
```bash
|
|
105
|
-
npx @bonesofspring/ai-rules init opencode --preset android-kotlin
|
|
106
|
-
```
|
|
107
|
-
|
|
108
|
-
Copies rules, commands, agents, hooks, skills, `OPENCODE.md` →
|
|
109
|
-
`.opencode/AGENTS.md`, `MCP.md`, `opencode.json` → project `opencode.json`
|
|
110
|
-
(`mcp` merge, instruction-path union, missing bash keys), plus
|
|
111
|
-
`REPO_AGENTS.md` → root `AGENTS.md`. Seeds `.ai.local/team/`.
|
|
@@ -5,33 +5,14 @@ Cross-tool repo-root guide. Tool-specific maps stay under `.cursor/AGENTS.md`, `
|
|
|
5
5
|
## Cross-tool setup
|
|
6
6
|
|
|
7
7
|
- Treat this file as the **shared** entry for any agent (Cursor, Claude Code, Mavis, OpenCode, ZCode, or other).
|
|
8
|
-
-
|
|
9
|
-
- Tool maps
|
|
10
|
-
- **Language.** On every user message,
|
|
11
|
-
- Install:
|
|
12
|
-
|
|
13
|
-
```bash
|
|
14
|
-
npx @bonesofspring/ai-rules init multi --preset android-kotlin
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
Refresh tools already installed in this repository, keeping each recorded preset (`/update` runs the same command):
|
|
18
|
-
|
|
19
|
-
```bash
|
|
20
|
-
npx @bonesofspring/ai-rules update
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
Per-tool: `init cursor|claude|mavis|opencode|zcode --preset android-kotlin`. `init` overwrites this file from the preset (`REPO_AGENTS.md` → `AGENTS.md`). `clean` of one tool leaves this file if another tool install remains. Living gotchas belong in `.ai.local/conventions.md`, not here.
|
|
8
|
+
- Every installed platform ships **the same** root file; `init` overwrites it from the preset (`REPO_AGENTS.md` → `AGENTS.md`). `clean` of one tool leaves it while another install remains.
|
|
9
|
+
- Tool maps — agent team, slash commands, always-on rules — live in `.cursor/AGENTS.md`, `.claude/CLAUDE.md`, `.mavis/AGENTS.md`, `.opencode/AGENTS.md`. ZCode loads this file natively and has no per-tool map. Read the map for the tool you run in; do not read another installed tool's tree.
|
|
10
|
+
- **Language.** On every user message, resolve the dialogue language and answer in the user's **native language**: a `language:` stored for an active task, else `## Language` in the nearest `.ai.local/conventions.md`, else the prompt language, else English. Development, reasoning, and artifacts stay **English** (see `language-policy`).
|
|
11
|
+
- Install / refresh: `npx @bonesofspring/ai-rules init multi --preset android-kotlin` (`/update` runs `init update`); MCP catalog: `init mcp`.
|
|
24
12
|
|
|
25
13
|
## Presence-based load
|
|
26
14
|
|
|
27
|
-
Read the map and the essential rules for the tool you are running in. Do not preload the full catalog. Do not read
|
|
28
|
-
|
|
29
|
-
- Cursor host: `.cursor/AGENTS.md`. Always-on rules are already injected.
|
|
30
|
-
- Claude Code host: `.claude/CLAUDE.md`. Session-start rules are already injected.
|
|
31
|
-
- Mavis host: read `.mavis/AGENTS.md`, then `.mavis/rules/android-app-core.md`, `.mavis/rules/architecture-boundaries.md`, `.mavis/rules/code-quality-and-refactoring.md`, `.mavis/rules/ai-local-overlay.md`.
|
|
32
|
-
- OpenCode host: read `.opencode/AGENTS.md`, then `.opencode/rules/android-app-core.md`, `.opencode/rules/architecture-boundaries.md`, `.opencode/rules/code-quality-and-refactoring.md`, `.opencode/rules/ai-local-overlay.md`.
|
|
33
|
-
|
|
34
|
-
Mavis has no native rule discovery without those root paths. OpenCode has no `alwaysApply` engine — those root-entry files are its always-on set.
|
|
15
|
+
Read the map and the essential rules for the tool you are running in; that map lists them. Do not preload the full catalog. Do not read another installed tool's tree — its copies of the same rules belong to that host.
|
|
35
16
|
|
|
36
17
|
## Pipelines are shared
|
|
37
18
|
|
|
@@ -68,33 +49,12 @@ Empty output or a failed run stays silent.
|
|
|
68
49
|
- Review destructive git before running; respect shell hooks.
|
|
69
50
|
- Do not weaken TLS / cleartext policy unless the user explicitly asks.
|
|
70
51
|
|
|
71
|
-
## Tool entry points
|
|
72
|
-
|
|
73
|
-
| Tool | Map |
|
|
74
|
-
|------|-----|
|
|
75
|
-
| Cursor | `.cursor/AGENTS.md` (optional if Cursor not installed) |
|
|
76
|
-
| Claude Code | `.claude/CLAUDE.md` (optional if Claude not installed) |
|
|
77
|
-
| Mavis | `.mavis/AGENTS.md` (optional if Mavis not installed) |
|
|
78
|
-
| OpenCode | `.opencode/AGENTS.md` (optional if OpenCode not installed) |
|
|
79
|
-
| ZCode | this file — loaded natively, no per-tool copy |
|
|
80
|
-
|
|
81
|
-
Rules: `.cursor/rules/`, `.claude/rules/`, `.mavis/rules/`, `.opencode/rules/`, or `.zcode/rules/`.
|
|
82
|
-
Skills: `.cursor/skills/`, `.claude/skills/`, `.mavis/skills/`, `.opencode/skills/`, or `.zcode/skills/`.
|
|
83
|
-
|
|
84
|
-
## ZCode host
|
|
85
|
-
|
|
86
|
-
ZCode loads this file natively and has no per-tool map: this file is the entry. Read the essential rules under `.zcode/rules/` (plain Markdown) when the task scope matches their subject, and use the agents in `.zcode/agents/`, commands in `.zcode/commands/`, and skills in `.zcode/skills/` as the pipeline directs.
|
|
87
|
-
On the first reply of a session, run `node .zcode/hooks/check-preset-update.mjs` when it exists; the notice rules above apply.
|
|
88
|
-
On every turn, run `node .zcode/hooks/list-ai-local.mjs` with the paths this step will touch, apply the printed `.ai.local/rules/*.md` and `.ai.local/conventions.md`, and acknowledge `Using .ai.local: <rule-name>`. Authoring guide: `docs/LOCAL-OVERLAY.md` in the `@bonesofspring/ai-rules` package.
|
|
89
|
-
|
|
90
52
|
## Living conventions
|
|
91
53
|
|
|
92
54
|
Gotchas, local patterns, and team decisions: **`.ai.local/conventions.md`** (fill after init; `init` does not overwrite it).
|
|
93
55
|
|
|
94
56
|
## Local overlay (`.ai.local/`) — MANDATORY
|
|
95
57
|
|
|
96
|
-
A `.ai.local/` directory MAY exist at the repo root or at any nesting depth in monorepos. **
|
|
97
|
-
|
|
98
|
-
Plain markdown rules under `.ai.local/rules/*.md` are read by the agent with higher priority than preset rules. Living gotchas live in `.ai.local/conventions.md`.
|
|
58
|
+
A `.ai.local/` directory MAY exist at the repo root or at any nesting depth in monorepos. **Every agent MUST read and apply it on every turn.** Rules there override preset rules; `override: kill <preset-rule-name>` drops that preset rule from context entirely.
|
|
99
59
|
|
|
100
|
-
On every turn, run `list-ai-local.mjs` from the host hooks directory (`.cursor`, `.claude`, `.mavis`, `.opencode`, or `.zcode`) with the paths this step will touch, apply the printed `.ai.local/rules/*.md` and `.ai.local/conventions.md
|
|
60
|
+
On every turn, run `list-ai-local.mjs` from the host hooks directory (`.cursor`, `.claude`, `.mavis`, `.opencode`, or `.zcode`) with the paths this step will touch, then apply the printed `.ai.local/rules/*.md` and `.ai.local/conventions.md`. The root overlay applies to every path; a nested one applies only under its directory. Do not read `shadowed` files or `rules-library/**` as rules. Acknowledge `Using .ai.local: <rule-name>` when answering. Authoring guide: `docs/LOCAL-OVERLAY.md`.
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"platform": "opencode",
|
|
4
4
|
"stack": "android-kotlin",
|
|
5
5
|
"semanticSource": "cursor/android-kotlin",
|
|
6
|
-
"sourceRevision": "
|
|
6
|
+
"sourceRevision": "72e82e08587bbbb355b0bba1714f89dfc67dbc8239b5130f8285cf49b480494c",
|
|
7
7
|
"entries": [
|
|
8
8
|
{
|
|
9
9
|
"source": "AGENTS.md",
|
|
@@ -1283,11 +1283,15 @@ function focusDigestMarkdown(dir, statusSnapshot) {
|
|
|
1283
1283
|
}
|
|
1284
1284
|
} catch {}
|
|
1285
1285
|
}
|
|
1286
|
+
// Five entries is enough to resume; a longer list is a status dump, not a
|
|
1287
|
+
// pointer. The line budget below still bounds a single entry with many paths.
|
|
1288
|
+
const MAX_FOCUS_ENTRIES = 5;
|
|
1289
|
+
const shownIncomplete = incomplete.slice(0, MAX_FOCUS_ENTRIES);
|
|
1286
1290
|
const pathLines = [];
|
|
1287
1291
|
if (incomplete.length === 0) pathLines.push(' - (none)');
|
|
1288
1292
|
else {
|
|
1289
|
-
for (let index = 0; index <
|
|
1290
|
-
const item =
|
|
1293
|
+
for (let index = 0; index < shownIncomplete.length; index += 1) {
|
|
1294
|
+
const item = shownIncomplete[index];
|
|
1291
1295
|
if (item.paths.length === 0) pathLines.push(' - ' + item.id + ': (none)');
|
|
1292
1296
|
else {
|
|
1293
1297
|
for (let pathIndex = 0; pathIndex < item.paths.length; pathIndex += 1) {
|
|
@@ -1295,6 +1299,9 @@ function focusDigestMarkdown(dir, statusSnapshot) {
|
|
|
1295
1299
|
}
|
|
1296
1300
|
}
|
|
1297
1301
|
}
|
|
1302
|
+
if (incomplete.length > shownIncomplete.length) {
|
|
1303
|
+
pathLines.push(' - (+' + String(incomplete.length - shownIncomplete.length) + ' more incomplete entries)');
|
|
1304
|
+
}
|
|
1298
1305
|
}
|
|
1299
1306
|
let readyLine = '- decomposition ready set: (none)';
|
|
1300
1307
|
try {
|
|
@@ -2645,7 +2652,16 @@ if (status.state === 'changes_requested') {
|
|
|
2645
2652
|
process.stdout.write('{}');
|
|
2646
2653
|
process.exit(0);
|
|
2647
2654
|
}
|
|
2648
|
-
const
|
|
2655
|
+
const reviewerStepIndex = typeof status.pipelineIndex === 'number' ? status.pipelineIndex : 0;
|
|
2656
|
+
let verifierStepIndex = -1;
|
|
2657
|
+
for (let index = reviewerStepIndex - 1; index >= 0; index -= 1) {
|
|
2658
|
+
if (getStepAgents(steps[index]).includes('build-verifier')) {
|
|
2659
|
+
verifierStepIndex = index;
|
|
2660
|
+
break;
|
|
2661
|
+
}
|
|
2662
|
+
}
|
|
2663
|
+
const retryGate = verifierStepIndex >= 0 ? 'build-verifier' : reviewer;
|
|
2664
|
+
const retryAfterFixStepIndex = verifierStepIndex >= 0 ? verifierStepIndex : reviewerStepIndex;
|
|
2649
2665
|
const developerIndex = scheduleRetry('feature-developer', reviewer, finishedAttempt);
|
|
2650
2666
|
if (developerIndex < 0) {
|
|
2651
2667
|
beginHumanGate();
|
|
@@ -2658,10 +2674,10 @@ if (status.state === 'changes_requested') {
|
|
|
2658
2674
|
currentAgent: 'feature-developer',
|
|
2659
2675
|
state: 'in_progress',
|
|
2660
2676
|
phase: 'executing',
|
|
2661
|
-
retryAfterFix:
|
|
2677
|
+
retryAfterFix: retryGate,
|
|
2662
2678
|
retryAfterFixStepIndex,
|
|
2663
2679
|
});
|
|
2664
|
-
out(handoffForAgent('feature-developer', steps[developerIndex]?.scope, steps[developerIndex]) + ` After fixes, re-run ${
|
|
2680
|
+
out(handoffForAgent('feature-developer', steps[developerIndex]?.scope, steps[developerIndex]) + ` After fixes, re-run ${retryGate}.`);
|
|
2665
2681
|
process.exit(0);
|
|
2666
2682
|
}
|
|
2667
2683
|
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
*/
|
|
15
15
|
import fs from 'node:fs';
|
|
16
16
|
import path from 'node:path';
|
|
17
|
+
import crypto from 'node:crypto';
|
|
17
18
|
import { fileURLToPath } from 'node:url';
|
|
18
19
|
|
|
19
20
|
export const OUTPUT_CAP = 4096;
|
|
@@ -29,6 +30,15 @@ const isRealDirectory = (target) => {
|
|
|
29
30
|
}
|
|
30
31
|
};
|
|
31
32
|
|
|
33
|
+
/** First 8 hex of the file body; a session-local re-read gate, not a security hash. */
|
|
34
|
+
const shortHash = (file) => {
|
|
35
|
+
try {
|
|
36
|
+
return crypto.createHash('sha256').update(fs.readFileSync(file)).digest('hex').slice(0, 8);
|
|
37
|
+
} catch {
|
|
38
|
+
return '????????';
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
|
|
32
42
|
const insideRoot = (root, abs) => {
|
|
33
43
|
const relative = path.relative(root, abs);
|
|
34
44
|
return relative === '' || (!relative.startsWith('..') && !path.isAbsolute(relative));
|
|
@@ -168,6 +178,13 @@ export const renderReport = (root, inputs) => {
|
|
|
168
178
|
}
|
|
169
179
|
if (blocks.length === 0) return { text: 'overlays=0', chains: [], read: [] };
|
|
170
180
|
const lines = [`overlays=${overlaySet.size}`, ...blocks.flatMap((block) => block.lines)];
|
|
181
|
+
const readSet = new Set(read);
|
|
182
|
+
if (readSet.size > 0) {
|
|
183
|
+
lines.push('hashes:');
|
|
184
|
+
for (const file of [...readSet].sort()) {
|
|
185
|
+
lines.push(`${file} ${shortHash(path.join(root, file))}`);
|
|
186
|
+
}
|
|
187
|
+
}
|
|
171
188
|
return {
|
|
172
189
|
text: lines.join('\n'),
|
|
173
190
|
chains: blocks.map((block) => ({ for: block.for, overlays: block.overlays })),
|
|
@@ -201,8 +201,8 @@ Additional states: `blocked` — a step (or a parallel producer) cannot proceed;
|
|
|
201
201
|
| `in_progress` | Current step running |
|
|
202
202
|
| `completed` | Current step done; hook advances |
|
|
203
203
|
| `awaiting_approval` | Human gate; wait for `/task-continue` |
|
|
204
|
-
| `changes_requested` | Reviewer blocked; re-run developer
|
|
205
|
-
| `validation_failed` | build-verifier failed; re-run developer then build-verifier |
|
|
204
|
+
| `changes_requested` | Reviewer blocked; re-run developer → `build-verifier` (delta) → same reviewer when the fix touches code/tests; docs/artifacts only → same reviewer |
|
|
205
|
+
| `validation_failed` | build-verifier failed; re-run developer then `build-verifier` (delta) |
|
|
206
206
|
| `blocked` | Pipeline / step cannot proceed (e.g. `pipeline_parse_error`, completion of a parallel step whose producer's receipt was missing — see `agent-artifact-contracts.md` § Completion receipts) |
|
|
207
207
|
| `awaiting_artifact_receipt` | Producer stopped but the bound or assigned-output receipt was missing or stale; hook keeps the attempt active and does not advance. See `agent-artifact-contracts.md` (Schema field name + Receipt binding) for the silent-bug class that lands here. |
|
|
208
208
|
| `paused` | Operator sentinel engaged; the hook recorded the pause and refused to advance or hand off. Remove the sentinel and run `/task-continue`. |
|
|
@@ -242,8 +242,8 @@ On each `subagentStop`, the hook reconciles `status.state` from the completing p
|
|
|
242
242
|
3. One role per Task call — **except** parallel steps: multiple Task calls in one message.
|
|
243
243
|
4. **Never** skip `humanGates` without `/task-continue` or explicit user approval.
|
|
244
244
|
5. Persist handoffs to disk (`brief.md`, `decomposition.md`, `debug-report.md`, `validation-report.md`, `architecture.md`, `migration-plan.md`, `ci-report.md`, `a11y-review.md`, `perf-report.md`, `security-review.md`, `api-contract-review.md`, `unit-test-plan.md`, `documentation.md`, `review.md`, `mockup-review.md`, `ux-design.md`) and update the producer-owned terminal receipt in `artifact-manifest.json`.
|
|
245
|
-
6. On `changes_requested` from reviewers: hook sets `retryAfterFix` → developer → same reviewer. Exception: embedded `mockup-reviewer` FAIL (`changes_requested` while the completed/current agent is `mockup-reviewer`) → `awaiting_approval` / `/task-continue` only — do **not** `retryAfterFix` to developer. A `mockup-reviewer` verdict `mockup-change-requested` (a defect whose fix belongs in the design source, not the implementation) routes the same way — `awaiting_approval`, no developer retry.
|
|
246
|
-
7. On `validation_failed` from `build-verifier`: hook sets `retryAfterFix: build-verifier` → developer → build-verifier.
|
|
245
|
+
6. On `changes_requested` from reviewers: hook sets `retryAfterFix` → developer → `build-verifier` (delta) → same reviewer when the fix touches code/tests; a docs/artifacts-only fix returns to the same reviewer without a code gate. Exception: embedded `mockup-reviewer` FAIL (`changes_requested` while the completed/current agent is `mockup-reviewer`) → `awaiting_approval` / `/task-continue` only — do **not** `retryAfterFix` to developer. A `mockup-reviewer` verdict `mockup-change-requested` (a defect whose fix belongs in the design source, not the implementation) routes the same way — `awaiting_approval`, no developer retry.
|
|
246
|
+
7. On `validation_failed` from `build-verifier`: hook sets `retryAfterFix: build-verifier` → developer → build-verifier (delta).
|
|
247
247
|
8. When all steps complete, suggest `/technical-retro <slug>`.
|
|
248
248
|
9. If `autoChain: false` in pipeline, do not rely on hook — manual step only.
|
|
249
249
|
10. **Persist the verbatim original prompt.** Every `/task` and every routed work request writes the user's raw prompt to `.ai.local/team/tasks/<slug>/prompt.md` during slug bootstrap (write-if-absent; never overwrite on resume). It is not a manifest `artifacts[]` body — register the path on the `routing` entry. See **agent-artifact-contracts** § Prompt artifact. Also append every **subsequent user-authored** prompt for the same slug — a new user message while the slug is active, `/task-continue` arguments, human-gate feedback, a clarification answer — to the append-only `.ai.local/team/tasks/<slug>/prompt-log.md` (`seq` = max + 1; never rewrite or duplicate an entry; never log machine-generated hook `followup_message` or empty/argument-less invocations). Register its path on the `routing` entry. See **agent-artifact-contracts** § Prompt log. A message that explicitly addresses a **closed** slug follows the same ledger with the `post-terminal` marker — append-only, no reopen, one bounded `sync --slug`; see § Team artifact I/O.
|
|
@@ -280,7 +280,7 @@ Use Task tool or `/agent-name`. Pass: slug, artifact paths, step `scope` if set.
|
|
|
280
280
|
**Token usage.** When the host exposes token counts, append a `usage_recorded` event next to the attempt:
|
|
281
281
|
|
|
282
282
|
```bash
|
|
283
|
-
node .ai.local/scripts/record-usage.mjs --task <slug> --attempt <attemptId> --input <n> --output <n> [--cached <n>] [--model <id>]
|
|
283
|
+
node .ai.local/scripts/record-usage.mjs --task <slug> --attempt <attemptId> --input <n> --output <n> [--cached <n>] [--cache-write <n>] [--reasoning <n>] [--turn <turnId>] [--model <id>]
|
|
284
284
|
```
|
|
285
285
|
|
|
286
286
|
The chain hook also forwards a `usage` object from its input into the `attempt_finished` event. Never estimate or invent token counts; a missing usage record stays missing.
|