@bonesofspring/ai-rules 0.2.71 → 0.2.73
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 +44 -0
- package/README.md +7 -6
- package/bin/lib/ai-local-drift.js +4 -4
- package/bin/lib/engine-scripts.js +11 -0
- package/bin/lib/seed-ai-local-team.js +9 -5
- package/docs/OPENCODE.md +4 -2
- package/docs/TEAM-DB.md +27 -9
- package/package.json +1 -1
- package/presets/_shared/ai-local/scripts/aggregate-agent-task-metrics.mjs +201 -0
- package/presets/_shared/ai-local/scripts/incidents.mjs +452 -0
- package/presets/_shared/ai-local/scripts/manifest.mjs +19 -1
- package/presets/_shared/ai-local/scripts/record-usage.mjs +163 -0
- package/presets/_shared/ai-local/scripts/team-db-project.mjs +75 -11
- package/presets/_shared/ai-local/scripts/team-db.mjs +125 -40
- package/presets/_shared/ai-local/scripts/tracker-planned-drain.mjs +335 -0
- package/presets/_shared/ai-local/scripts/verification.mjs +374 -0
- package/presets/_shared/core/agent-team/agent-artifact-contracts.md +9 -0
- package/presets/_shared/core/agent-team/agent-task-metrics.md +61 -1
- package/presets/_shared/core/agent-team/agent-team-intake.md +2 -2
- package/presets/_shared/core/agent-team/agent-team-orchestrator.md +5 -4
- package/presets/_shared/core/agent-team/incident-registry.md +47 -0
- package/presets/_shared/core/architecture/feature-delivery-workflow.md +1 -1
- package/presets/_shared/core/quality/self-review-and-context-hygiene.md +1 -0
- package/presets/_shared/hooks/chain-team-phases.sh.tmpl +108 -1
- package/presets/claude/android-kotlin/agents/build-verifier.md +1 -1
- package/presets/claude/android-kotlin/agents/code-reviewer.md +1 -1
- package/presets/claude/android-kotlin/agents/debugger.md +1 -1
- package/presets/claude/android-kotlin/agents/feature-developer.md +1 -1
- package/presets/claude/android-kotlin/agents/task-analyst.md +1 -1
- package/presets/claude/android-kotlin/hooks/chain-team-phases.sh +108 -1
- package/presets/claude/android-kotlin/rules/tooling-and-review/agent-team-intake.md +2 -2
- package/presets/claude/android-kotlin/rules/tooling-and-review/agent-team-orchestrator.md +5 -4
- package/presets/claude/go/agents/build-verifier.md +1 -1
- package/presets/claude/go/agents/code-reviewer.md +1 -1
- package/presets/claude/go/agents/debugger.md +1 -1
- package/presets/claude/go/agents/feature-developer.md +1 -1
- package/presets/claude/go/agents/task-analyst.md +1 -1
- package/presets/claude/go/hooks/chain-team-phases.sh +108 -1
- package/presets/claude/go/rules/architecture/feature-delivery.md +1 -1
- package/presets/claude/go/rules/tooling-and-review/agent-team-intake.md +2 -2
- package/presets/claude/go/rules/tooling-and-review/agent-team-orchestrator.md +5 -4
- package/presets/claude/ios-swift/agents/build-verifier.md +1 -1
- package/presets/claude/ios-swift/agents/code-reviewer.md +1 -1
- package/presets/claude/ios-swift/agents/debugger.md +1 -1
- package/presets/claude/ios-swift/agents/feature-developer.md +1 -1
- package/presets/claude/ios-swift/agents/task-analyst.md +1 -1
- package/presets/claude/ios-swift/hooks/chain-team-phases.sh +108 -1
- package/presets/claude/ios-swift/rules/architecture/feature-delivery.md +1 -1
- package/presets/claude/ios-swift/rules/tooling-and-review/agent-team-intake.md +2 -2
- package/presets/claude/ios-swift/rules/tooling-and-review/agent-team-orchestrator.md +5 -4
- package/presets/claude/java/agents/build-verifier.md +1 -1
- package/presets/claude/java/agents/code-reviewer.md +1 -1
- package/presets/claude/java/agents/debugger.md +1 -1
- package/presets/claude/java/agents/feature-developer.md +1 -1
- package/presets/claude/java/agents/task-analyst.md +1 -1
- package/presets/claude/java/hooks/chain-team-phases.sh +108 -1
- package/presets/claude/java/rules/architecture/feature-delivery.md +1 -1
- package/presets/claude/java/rules/tooling-and-review/agent-team-intake.md +2 -2
- package/presets/claude/java/rules/tooling-and-review/agent-team-orchestrator.md +5 -4
- package/presets/claude/mcp-ts/agents/build-verifier.md +1 -1
- package/presets/claude/mcp-ts/agents/feature-developer.md +1 -1
- package/presets/claude/mcp-ts/agents/task-analyst.md +1 -1
- package/presets/claude/mcp-ts/hooks/chain-team-phases.sh +108 -1
- package/presets/claude/mcp-ts/rules/architecture/feature-delivery.md +1 -1
- package/presets/claude/mcp-ts/rules/tooling-and-review/agent-team-intake.md +2 -2
- package/presets/claude/mcp-ts/rules/tooling-and-review/agent-team-orchestrator.md +5 -4
- package/presets/claude/mol/agents/build-verifier.md +1 -1
- package/presets/claude/mol/agents/code-reviewer.md +1 -1
- package/presets/claude/mol/agents/debugger.md +1 -1
- package/presets/claude/mol/agents/feature-developer.md +1 -1
- package/presets/claude/mol/agents/task-analyst.md +1 -1
- package/presets/claude/mol/hooks/chain-team-phases.sh +108 -1
- package/presets/claude/mol/rules/architecture/feature-delivery-workflow.md +1 -1
- package/presets/claude/mol/rules/tooling-and-review/agent-team-intake.md +2 -2
- package/presets/claude/mol/rules/tooling-and-review/agent-team-orchestrator.md +5 -4
- package/presets/claude/next/REPO_AGENTS.md +16 -0
- package/presets/claude/next/agents/README.md +4 -3
- package/presets/claude/next/agents/accessibility-reviewer.md +4 -1
- package/presets/claude/next/agents/api-contract-reviewer.md +6 -3
- package/presets/claude/next/agents/build-verifier.md +6 -3
- package/presets/claude/next/agents/ci-investigator.md +1 -1
- package/presets/claude/next/agents/code-reviewer.md +7 -4
- package/presets/claude/next/agents/codebase-analyzer.md +4 -1
- package/presets/claude/next/agents/debugger.md +2 -2
- package/presets/claude/next/agents/feature-developer.md +2 -2
- package/presets/claude/next/agents/migration-specialist.md +4 -1
- package/presets/claude/next/agents/mockup-reviewer.md +5 -2
- package/presets/claude/next/agents/openspec-author.md +4 -1
- package/presets/claude/next/agents/performance-auditor.md +4 -1
- package/presets/claude/next/agents/playwright-test-generator.md +5 -2
- package/presets/claude/next/agents/playwright-test-healer.md +5 -2
- package/presets/claude/next/agents/playwright-test-planner.md +5 -2
- package/presets/claude/next/agents/qa-tester.md +5 -2
- package/presets/claude/next/agents/security-reviewer.md +4 -1
- package/presets/claude/next/agents/solution-architect.md +4 -1
- package/presets/claude/next/agents/task-analyst.md +5 -2
- package/presets/claude/next/agents/task-router.md +8 -5
- package/presets/claude/next/agents/tech-writer.md +4 -1
- package/presets/claude/next/agents/unit-test-generator.md +5 -2
- package/presets/claude/next/agents/unit-test-healer.md +5 -2
- package/presets/claude/next/agents/unit-test-planner.md +5 -2
- package/presets/claude/next/ai-local/conventions.md +26 -1
- package/presets/claude/next/hooks/chain-team-phases.sh +108 -1
- package/presets/claude/next/rules/architecture/feature-delivery-workflow.md +2 -2
- package/presets/claude/next/rules/tooling-and-review/agent-team-intake.md +2 -2
- package/presets/claude/next/rules/tooling-and-review/agent-team-orchestrator.md +5 -4
- package/presets/claude/nuxt/agents/build-verifier.md +1 -1
- package/presets/claude/nuxt/agents/code-reviewer.md +1 -1
- package/presets/claude/nuxt/agents/debugger.md +1 -1
- package/presets/claude/nuxt/agents/feature-developer.md +1 -1
- package/presets/claude/nuxt/agents/task-analyst.md +1 -1
- package/presets/claude/nuxt/hooks/chain-team-phases.sh +108 -1
- package/presets/claude/nuxt/rules/architecture/feature-delivery-workflow.md +1 -1
- package/presets/claude/nuxt/rules/tooling-and-review/agent-team-intake.md +2 -2
- package/presets/claude/nuxt/rules/tooling-and-review/agent-team-orchestrator.md +5 -4
- package/presets/claude/php-hexagonal/agents/build-verifier.md +1 -1
- package/presets/claude/php-hexagonal/agents/code-reviewer.md +1 -1
- package/presets/claude/php-hexagonal/agents/debugger.md +1 -1
- package/presets/claude/php-hexagonal/agents/feature-developer.md +1 -1
- package/presets/claude/php-hexagonal/agents/task-analyst.md +1 -1
- package/presets/claude/php-hexagonal/hooks/chain-team-phases.sh +108 -1
- package/presets/claude/php-hexagonal/rules/architecture/feature-delivery.md +1 -1
- package/presets/claude/php-hexagonal/rules/tooling-and-review/agent-team-intake.md +2 -2
- package/presets/claude/php-hexagonal/rules/tooling-and-review/agent-team-orchestrator.md +5 -4
- package/presets/claude/php-laravel/agents/build-verifier.md +1 -1
- package/presets/claude/php-laravel/agents/code-reviewer.md +1 -1
- package/presets/claude/php-laravel/agents/debugger.md +1 -1
- package/presets/claude/php-laravel/agents/feature-developer.md +1 -1
- package/presets/claude/php-laravel/agents/task-analyst.md +1 -1
- package/presets/claude/php-laravel/hooks/chain-team-phases.sh +108 -1
- package/presets/claude/php-laravel/rules/architecture/feature-delivery.md +1 -1
- package/presets/claude/php-laravel/rules/tooling-and-review/agent-team-intake.md +2 -2
- package/presets/claude/php-laravel/rules/tooling-and-review/agent-team-orchestrator.md +5 -4
- package/presets/claude/svelte/agents/build-verifier.md +1 -1
- package/presets/claude/svelte/agents/code-reviewer.md +1 -1
- package/presets/claude/svelte/agents/debugger.md +1 -1
- package/presets/claude/svelte/agents/feature-developer.md +1 -1
- package/presets/claude/svelte/agents/task-analyst.md +1 -1
- package/presets/claude/svelte/hooks/chain-team-phases.sh +108 -1
- package/presets/claude/svelte/rules/architecture/feature-delivery-workflow.md +1 -1
- package/presets/claude/svelte/rules/tooling-and-review/agent-team-intake.md +2 -2
- package/presets/claude/svelte/rules/tooling-and-review/agent-team-orchestrator.md +5 -4
- package/presets/cursor/android-kotlin/agents/build-verifier.md +1 -1
- package/presets/cursor/android-kotlin/agents/code-reviewer.md +1 -1
- package/presets/cursor/android-kotlin/agents/debugger.md +1 -1
- package/presets/cursor/android-kotlin/agents/feature-developer.md +1 -1
- package/presets/cursor/android-kotlin/agents/task-analyst.md +1 -1
- package/presets/cursor/android-kotlin/hooks/chain-team-phases.sh +108 -1
- package/presets/cursor/android-kotlin/rules/agent-team-intake.mdc +2 -2
- package/presets/cursor/android-kotlin/rules/agent-team-orchestrator.mdc +1 -1
- package/presets/cursor/go/agents/build-verifier.md +1 -1
- package/presets/cursor/go/agents/code-reviewer.md +1 -1
- package/presets/cursor/go/agents/debugger.md +1 -1
- package/presets/cursor/go/agents/feature-developer.md +1 -1
- package/presets/cursor/go/agents/task-analyst.md +1 -1
- package/presets/cursor/go/hooks/chain-team-phases.sh +108 -1
- package/presets/cursor/go/rules/agent-team-intake.mdc +2 -2
- package/presets/cursor/go/rules/agent-team-orchestrator.mdc +1 -1
- package/presets/cursor/ios-swift/agents/build-verifier.md +1 -1
- package/presets/cursor/ios-swift/agents/code-reviewer.md +1 -1
- package/presets/cursor/ios-swift/agents/debugger.md +1 -1
- package/presets/cursor/ios-swift/agents/feature-developer.md +1 -1
- package/presets/cursor/ios-swift/agents/task-analyst.md +1 -1
- package/presets/cursor/ios-swift/hooks/chain-team-phases.sh +108 -1
- package/presets/cursor/ios-swift/rules/agent-team-intake.mdc +2 -2
- package/presets/cursor/ios-swift/rules/agent-team-orchestrator.mdc +1 -1
- package/presets/cursor/java/agents/build-verifier.md +1 -1
- package/presets/cursor/java/agents/code-reviewer.md +1 -1
- package/presets/cursor/java/agents/debugger.md +1 -1
- package/presets/cursor/java/agents/feature-developer.md +1 -1
- package/presets/cursor/java/agents/task-analyst.md +1 -1
- package/presets/cursor/java/hooks/chain-team-phases.sh +108 -1
- package/presets/cursor/java/rules/agent-team-intake.mdc +2 -2
- package/presets/cursor/java/rules/agent-team-orchestrator.mdc +1 -1
- package/presets/cursor/mcp-ts/agents/build-verifier.md +1 -1
- package/presets/cursor/mcp-ts/agents/feature-developer.md +1 -1
- package/presets/cursor/mcp-ts/agents/task-analyst.md +1 -1
- package/presets/cursor/mcp-ts/hooks/chain-team-phases.sh +108 -1
- package/presets/cursor/mcp-ts/rules/agent-team-intake.mdc +2 -2
- package/presets/cursor/mcp-ts/rules/agent-team-orchestrator.mdc +1 -1
- package/presets/cursor/mol/agents/build-verifier.md +1 -1
- package/presets/cursor/mol/agents/code-reviewer.md +1 -1
- package/presets/cursor/mol/agents/debugger.md +1 -1
- package/presets/cursor/mol/agents/feature-developer.md +1 -1
- package/presets/cursor/mol/agents/task-analyst.md +1 -1
- package/presets/cursor/mol/hooks/chain-team-phases.sh +108 -1
- package/presets/cursor/mol/rules/agent-team-intake.mdc +2 -2
- package/presets/cursor/mol/rules/agent-team-orchestrator.mdc +1 -1
- package/presets/cursor/next/AGENTS.md +2 -1
- package/presets/cursor/next/REPO_AGENTS.md +16 -0
- package/presets/cursor/next/agents/README.md +4 -3
- package/presets/cursor/next/agents/api-contract-reviewer.md +1 -1
- package/presets/cursor/next/agents/build-verifier.md +1 -1
- package/presets/cursor/next/agents/code-reviewer.md +1 -1
- package/presets/cursor/next/agents/debugger.md +1 -1
- package/presets/cursor/next/agents/feature-developer.md +1 -1
- package/presets/cursor/next/agents/mockup-reviewer.md +1 -1
- package/presets/cursor/next/agents/task-analyst.md +1 -1
- package/presets/cursor/next/agents/task-router.md +4 -4
- package/presets/cursor/next/ai-local/conventions.md +6 -1
- package/presets/cursor/next/hooks/chain-team-phases.sh +108 -1
- package/presets/cursor/next/rules/agent-team-intake.mdc +2 -2
- package/presets/cursor/next/rules/agent-team-orchestrator.mdc +1 -1
- package/presets/cursor/next/rules/feature-delivery-workflow.mdc +1 -1
- package/presets/cursor/nuxt/agents/build-verifier.md +1 -1
- package/presets/cursor/nuxt/agents/code-reviewer.md +1 -1
- package/presets/cursor/nuxt/agents/debugger.md +1 -1
- package/presets/cursor/nuxt/agents/feature-developer.md +1 -1
- package/presets/cursor/nuxt/agents/task-analyst.md +1 -1
- package/presets/cursor/nuxt/hooks/chain-team-phases.sh +108 -1
- package/presets/cursor/nuxt/rules/agent-team-intake.mdc +2 -2
- package/presets/cursor/nuxt/rules/agent-team-orchestrator.mdc +1 -1
- package/presets/cursor/php-hexagonal/agents/build-verifier.md +1 -1
- package/presets/cursor/php-hexagonal/agents/code-reviewer.md +1 -1
- package/presets/cursor/php-hexagonal/agents/debugger.md +1 -1
- package/presets/cursor/php-hexagonal/agents/feature-developer.md +1 -1
- package/presets/cursor/php-hexagonal/agents/task-analyst.md +1 -1
- package/presets/cursor/php-hexagonal/hooks/chain-team-phases.sh +108 -1
- package/presets/cursor/php-hexagonal/rules/agent-team-intake.mdc +2 -2
- package/presets/cursor/php-hexagonal/rules/agent-team-orchestrator.mdc +1 -1
- package/presets/cursor/php-laravel/agents/build-verifier.md +1 -1
- package/presets/cursor/php-laravel/agents/code-reviewer.md +1 -1
- package/presets/cursor/php-laravel/agents/debugger.md +1 -1
- package/presets/cursor/php-laravel/agents/feature-developer.md +1 -1
- package/presets/cursor/php-laravel/agents/task-analyst.md +1 -1
- package/presets/cursor/php-laravel/hooks/chain-team-phases.sh +108 -1
- package/presets/cursor/php-laravel/rules/agent-team-intake.mdc +2 -2
- package/presets/cursor/php-laravel/rules/agent-team-orchestrator.mdc +1 -1
- package/presets/cursor/svelte/agents/build-verifier.md +1 -1
- package/presets/cursor/svelte/agents/code-reviewer.md +1 -1
- package/presets/cursor/svelte/agents/debugger.md +1 -1
- package/presets/cursor/svelte/agents/feature-developer.md +1 -1
- package/presets/cursor/svelte/agents/task-analyst.md +1 -1
- package/presets/cursor/svelte/hooks/chain-team-phases.sh +108 -1
- package/presets/cursor/svelte/rules/agent-team-intake.mdc +2 -2
- package/presets/cursor/svelte/rules/agent-team-orchestrator.mdc +1 -1
- package/presets/mavis/android-kotlin/adapter-map.json +1 -1
- package/presets/mavis/android-kotlin/agents/README.md +3 -3
- package/presets/mavis/android-kotlin/agents/build-verifier.md +1 -1
- package/presets/mavis/android-kotlin/agents/code-reviewer.md +1 -1
- package/presets/mavis/android-kotlin/agents/debugger.md +1 -1
- package/presets/mavis/android-kotlin/agents/feature-developer.md +1 -1
- package/presets/mavis/android-kotlin/agents/task-analyst.md +1 -1
- package/presets/mavis/android-kotlin/hooks/chain-team-phases.sh +108 -1
- package/presets/mavis/android-kotlin/rules/agent-team-intake.md +2 -2
- package/presets/mavis/android-kotlin/rules/agent-team-orchestrator.md +5 -4
- package/presets/mavis/go/adapter-map.json +1 -1
- package/presets/mavis/go/agents/README.md +2 -2
- package/presets/mavis/go/agents/build-verifier.md +1 -1
- package/presets/mavis/go/agents/code-reviewer.md +1 -1
- package/presets/mavis/go/agents/debugger.md +1 -1
- package/presets/mavis/go/agents/feature-developer.md +1 -1
- package/presets/mavis/go/agents/task-analyst.md +1 -1
- package/presets/mavis/go/hooks/chain-team-phases.sh +108 -1
- package/presets/mavis/go/rules/agent-team-intake.md +2 -2
- package/presets/mavis/go/rules/agent-team-orchestrator.md +5 -4
- package/presets/mavis/go/rules/feature-delivery-workflow.md +1 -1
- package/presets/mavis/ios-swift/adapter-map.json +1 -1
- package/presets/mavis/ios-swift/agents/README.md +3 -3
- package/presets/mavis/ios-swift/agents/build-verifier.md +1 -1
- package/presets/mavis/ios-swift/agents/code-reviewer.md +1 -1
- package/presets/mavis/ios-swift/agents/debugger.md +1 -1
- package/presets/mavis/ios-swift/agents/feature-developer.md +1 -1
- package/presets/mavis/ios-swift/agents/task-analyst.md +1 -1
- package/presets/mavis/ios-swift/hooks/chain-team-phases.sh +108 -1
- package/presets/mavis/ios-swift/rules/agent-team-intake.md +2 -2
- package/presets/mavis/ios-swift/rules/agent-team-orchestrator.md +5 -4
- package/presets/mavis/ios-swift/rules/feature-delivery-workflow.md +1 -1
- package/presets/mavis/java/adapter-map.json +1 -1
- package/presets/mavis/java/agents/README.md +2 -2
- package/presets/mavis/java/agents/build-verifier.md +1 -1
- package/presets/mavis/java/agents/code-reviewer.md +1 -1
- package/presets/mavis/java/agents/debugger.md +1 -1
- package/presets/mavis/java/agents/feature-developer.md +1 -1
- package/presets/mavis/java/agents/task-analyst.md +1 -1
- package/presets/mavis/java/hooks/chain-team-phases.sh +108 -1
- package/presets/mavis/java/rules/agent-team-intake.md +2 -2
- package/presets/mavis/java/rules/agent-team-orchestrator.md +5 -4
- package/presets/mavis/java/rules/feature-delivery-workflow.md +1 -1
- package/presets/mavis/mcp-ts/adapter-map.json +1 -1
- package/presets/mavis/mcp-ts/agents/README.md +1 -1
- package/presets/mavis/mcp-ts/agents/build-verifier.md +1 -1
- package/presets/mavis/mcp-ts/agents/feature-developer.md +1 -1
- package/presets/mavis/mcp-ts/agents/task-analyst.md +1 -1
- package/presets/mavis/mcp-ts/hooks/chain-team-phases.sh +108 -1
- package/presets/mavis/mcp-ts/rules/agent-team-intake.md +2 -2
- package/presets/mavis/mcp-ts/rules/agent-team-orchestrator.md +5 -4
- package/presets/mavis/mcp-ts/rules/feature-delivery-workflow.md +1 -1
- package/presets/mavis/mol/adapter-map.json +1 -1
- package/presets/mavis/mol/agents/README.md +3 -3
- package/presets/mavis/mol/agents/build-verifier.md +1 -1
- package/presets/mavis/mol/agents/code-reviewer.md +1 -1
- package/presets/mavis/mol/agents/debugger.md +1 -1
- package/presets/mavis/mol/agents/feature-developer.md +1 -1
- package/presets/mavis/mol/agents/task-analyst.md +1 -1
- package/presets/mavis/mol/hooks/chain-team-phases.sh +108 -1
- package/presets/mavis/mol/rules/agent-team-intake.md +2 -2
- package/presets/mavis/mol/rules/agent-team-orchestrator.md +5 -4
- package/presets/mavis/mol/rules/feature-delivery-workflow.md +1 -1
- package/presets/mavis/next/MAVIS.md +2 -1
- package/presets/mavis/next/REPO_AGENTS.md +16 -0
- package/presets/mavis/next/adapter-map.json +1 -1
- package/presets/mavis/next/agents/README.md +3 -3
- package/presets/mavis/next/agents/accessibility-reviewer.md +4 -1
- package/presets/mavis/next/agents/api-contract-reviewer.md +5 -2
- package/presets/mavis/next/agents/build-verifier.md +6 -3
- package/presets/mavis/next/agents/ci-investigator.md +1 -1
- package/presets/mavis/next/agents/code-reviewer.md +7 -4
- package/presets/mavis/next/agents/codebase-analyzer.md +4 -1
- package/presets/mavis/next/agents/debugger.md +2 -2
- package/presets/mavis/next/agents/feature-developer.md +2 -2
- package/presets/mavis/next/agents/migration-specialist.md +4 -1
- package/presets/mavis/next/agents/mockup-reviewer.md +4 -1
- package/presets/mavis/next/agents/openspec-author.md +4 -1
- package/presets/mavis/next/agents/performance-auditor.md +4 -1
- package/presets/mavis/next/agents/playwright-test-generator.md +5 -2
- package/presets/mavis/next/agents/playwright-test-healer.md +5 -2
- package/presets/mavis/next/agents/playwright-test-planner.md +5 -2
- package/presets/mavis/next/agents/qa-tester.md +5 -2
- package/presets/mavis/next/agents/security-reviewer.md +4 -1
- package/presets/mavis/next/agents/solution-architect.md +4 -1
- package/presets/mavis/next/agents/task-analyst.md +5 -2
- package/presets/mavis/next/agents/task-router.md +8 -5
- package/presets/mavis/next/agents/tech-writer.md +4 -1
- package/presets/mavis/next/agents/unit-test-generator.md +5 -2
- package/presets/mavis/next/agents/unit-test-healer.md +5 -2
- package/presets/mavis/next/agents/unit-test-planner.md +5 -2
- package/presets/mavis/next/ai-local/conventions.md +6 -1
- package/presets/mavis/next/hooks/chain-team-phases.sh +108 -1
- package/presets/mavis/next/rules/agent-team-intake.md +2 -2
- package/presets/mavis/next/rules/agent-team-orchestrator.md +5 -4
- package/presets/mavis/next/rules/feature-delivery-workflow.md +2 -2
- package/presets/mavis/nuxt/adapter-map.json +1 -1
- package/presets/mavis/nuxt/agents/README.md +3 -3
- package/presets/mavis/nuxt/agents/build-verifier.md +1 -1
- package/presets/mavis/nuxt/agents/code-reviewer.md +1 -1
- package/presets/mavis/nuxt/agents/debugger.md +1 -1
- package/presets/mavis/nuxt/agents/feature-developer.md +1 -1
- package/presets/mavis/nuxt/agents/task-analyst.md +1 -1
- package/presets/mavis/nuxt/hooks/chain-team-phases.sh +108 -1
- package/presets/mavis/nuxt/rules/agent-team-intake.md +2 -2
- package/presets/mavis/nuxt/rules/agent-team-orchestrator.md +5 -4
- package/presets/mavis/nuxt/rules/feature-delivery-workflow.md +1 -1
- package/presets/mavis/php-hexagonal/adapter-map.json +1 -1
- package/presets/mavis/php-hexagonal/agents/README.md +2 -2
- package/presets/mavis/php-hexagonal/agents/build-verifier.md +1 -1
- package/presets/mavis/php-hexagonal/agents/code-reviewer.md +1 -1
- package/presets/mavis/php-hexagonal/agents/debugger.md +1 -1
- package/presets/mavis/php-hexagonal/agents/feature-developer.md +1 -1
- package/presets/mavis/php-hexagonal/agents/task-analyst.md +1 -1
- package/presets/mavis/php-hexagonal/hooks/chain-team-phases.sh +108 -1
- package/presets/mavis/php-hexagonal/rules/agent-team-intake.md +2 -2
- package/presets/mavis/php-hexagonal/rules/agent-team-orchestrator.md +5 -4
- package/presets/mavis/php-hexagonal/rules/feature-delivery-workflow.md +1 -1
- package/presets/mavis/php-laravel/adapter-map.json +1 -1
- package/presets/mavis/php-laravel/agents/README.md +2 -2
- package/presets/mavis/php-laravel/agents/build-verifier.md +1 -1
- package/presets/mavis/php-laravel/agents/code-reviewer.md +1 -1
- package/presets/mavis/php-laravel/agents/debugger.md +1 -1
- package/presets/mavis/php-laravel/agents/feature-developer.md +1 -1
- package/presets/mavis/php-laravel/agents/task-analyst.md +1 -1
- package/presets/mavis/php-laravel/hooks/chain-team-phases.sh +108 -1
- package/presets/mavis/php-laravel/rules/agent-team-intake.md +2 -2
- package/presets/mavis/php-laravel/rules/agent-team-orchestrator.md +5 -4
- package/presets/mavis/php-laravel/rules/feature-delivery-workflow.md +1 -1
- package/presets/mavis/svelte/adapter-map.json +1 -1
- package/presets/mavis/svelte/agents/README.md +3 -3
- package/presets/mavis/svelte/agents/build-verifier.md +1 -1
- package/presets/mavis/svelte/agents/code-reviewer.md +1 -1
- package/presets/mavis/svelte/agents/debugger.md +1 -1
- package/presets/mavis/svelte/agents/feature-developer.md +1 -1
- package/presets/mavis/svelte/agents/task-analyst.md +1 -1
- package/presets/mavis/svelte/hooks/chain-team-phases.sh +108 -1
- package/presets/mavis/svelte/rules/agent-team-intake.md +2 -2
- package/presets/mavis/svelte/rules/agent-team-orchestrator.md +5 -4
- package/presets/mavis/svelte/rules/feature-delivery-workflow.md +1 -1
- package/presets/opencode/android-kotlin/adapter-map.json +1 -1
- package/presets/opencode/android-kotlin/agents/README.md +4 -4
- package/presets/opencode/android-kotlin/agents/build-verifier.md +1 -1
- package/presets/opencode/android-kotlin/agents/code-reviewer.md +1 -1
- package/presets/opencode/android-kotlin/agents/debugger.md +1 -1
- package/presets/opencode/android-kotlin/agents/feature-developer.md +1 -1
- package/presets/opencode/android-kotlin/agents/task-analyst.md +1 -1
- package/presets/opencode/android-kotlin/hooks/chain-team-phases.sh +108 -1
- package/presets/opencode/android-kotlin/rules/agent-team-intake.md +2 -2
- package/presets/opencode/android-kotlin/rules/agent-team-orchestrator.md +5 -4
- package/presets/opencode/go/adapter-map.json +1 -1
- package/presets/opencode/go/agents/README.md +3 -3
- package/presets/opencode/go/agents/build-verifier.md +1 -1
- package/presets/opencode/go/agents/code-reviewer.md +1 -1
- package/presets/opencode/go/agents/debugger.md +1 -1
- package/presets/opencode/go/agents/feature-developer.md +1 -1
- package/presets/opencode/go/agents/task-analyst.md +1 -1
- package/presets/opencode/go/hooks/chain-team-phases.sh +108 -1
- package/presets/opencode/go/rules/agent-team-intake.md +2 -2
- package/presets/opencode/go/rules/agent-team-orchestrator.md +5 -4
- package/presets/opencode/go/rules/feature-delivery-workflow.md +1 -1
- package/presets/opencode/ios-swift/adapter-map.json +1 -1
- package/presets/opencode/ios-swift/agents/README.md +4 -4
- package/presets/opencode/ios-swift/agents/build-verifier.md +1 -1
- package/presets/opencode/ios-swift/agents/code-reviewer.md +1 -1
- package/presets/opencode/ios-swift/agents/debugger.md +1 -1
- package/presets/opencode/ios-swift/agents/feature-developer.md +1 -1
- package/presets/opencode/ios-swift/agents/task-analyst.md +1 -1
- package/presets/opencode/ios-swift/hooks/chain-team-phases.sh +108 -1
- package/presets/opencode/ios-swift/rules/agent-team-intake.md +2 -2
- package/presets/opencode/ios-swift/rules/agent-team-orchestrator.md +5 -4
- package/presets/opencode/ios-swift/rules/feature-delivery-workflow.md +1 -1
- package/presets/opencode/java/adapter-map.json +1 -1
- package/presets/opencode/java/agents/README.md +3 -3
- package/presets/opencode/java/agents/build-verifier.md +1 -1
- package/presets/opencode/java/agents/code-reviewer.md +1 -1
- package/presets/opencode/java/agents/debugger.md +1 -1
- package/presets/opencode/java/agents/feature-developer.md +1 -1
- package/presets/opencode/java/agents/task-analyst.md +1 -1
- package/presets/opencode/java/hooks/chain-team-phases.sh +108 -1
- package/presets/opencode/java/rules/agent-team-intake.md +2 -2
- package/presets/opencode/java/rules/agent-team-orchestrator.md +5 -4
- package/presets/opencode/java/rules/feature-delivery-workflow.md +1 -1
- package/presets/opencode/mcp-ts/adapter-map.json +1 -1
- package/presets/opencode/mcp-ts/agents/README.md +2 -2
- package/presets/opencode/mcp-ts/agents/build-verifier.md +1 -1
- package/presets/opencode/mcp-ts/agents/feature-developer.md +1 -1
- package/presets/opencode/mcp-ts/agents/task-analyst.md +1 -1
- package/presets/opencode/mcp-ts/hooks/chain-team-phases.sh +108 -1
- package/presets/opencode/mcp-ts/rules/agent-team-intake.md +2 -2
- package/presets/opencode/mcp-ts/rules/agent-team-orchestrator.md +5 -4
- package/presets/opencode/mcp-ts/rules/feature-delivery-workflow.md +1 -1
- package/presets/opencode/mol/adapter-map.json +1 -1
- package/presets/opencode/mol/agents/README.md +4 -4
- package/presets/opencode/mol/agents/build-verifier.md +1 -1
- package/presets/opencode/mol/agents/code-reviewer.md +1 -1
- package/presets/opencode/mol/agents/debugger.md +1 -1
- package/presets/opencode/mol/agents/feature-developer.md +1 -1
- package/presets/opencode/mol/agents/task-analyst.md +1 -1
- package/presets/opencode/mol/hooks/chain-team-phases.sh +108 -1
- package/presets/opencode/mol/rules/agent-team-intake.md +2 -2
- package/presets/opencode/mol/rules/agent-team-orchestrator.md +5 -4
- package/presets/opencode/mol/rules/feature-delivery-workflow.md +1 -1
- package/presets/opencode/next/OPENCODE.md +2 -1
- package/presets/opencode/next/REPO_AGENTS.md +16 -0
- package/presets/opencode/next/adapter-map.json +1 -1
- package/presets/opencode/next/agents/README.md +4 -4
- package/presets/opencode/next/agents/accessibility-reviewer.md +4 -1
- package/presets/opencode/next/agents/api-contract-reviewer.md +5 -2
- package/presets/opencode/next/agents/build-verifier.md +6 -3
- package/presets/opencode/next/agents/ci-investigator.md +1 -1
- package/presets/opencode/next/agents/code-reviewer.md +7 -4
- package/presets/opencode/next/agents/codebase-analyzer.md +4 -1
- package/presets/opencode/next/agents/debugger.md +2 -2
- package/presets/opencode/next/agents/feature-developer.md +2 -2
- package/presets/opencode/next/agents/migration-specialist.md +4 -1
- package/presets/opencode/next/agents/mockup-reviewer.md +4 -1
- package/presets/opencode/next/agents/openspec-author.md +4 -1
- package/presets/opencode/next/agents/performance-auditor.md +4 -1
- package/presets/opencode/next/agents/playwright-test-generator.md +5 -2
- package/presets/opencode/next/agents/playwright-test-healer.md +5 -2
- package/presets/opencode/next/agents/playwright-test-planner.md +5 -2
- package/presets/opencode/next/agents/qa-tester.md +5 -2
- package/presets/opencode/next/agents/security-reviewer.md +4 -1
- package/presets/opencode/next/agents/solution-architect.md +4 -1
- package/presets/opencode/next/agents/task-analyst.md +5 -2
- package/presets/opencode/next/agents/task-router.md +8 -5
- package/presets/opencode/next/agents/tech-writer.md +4 -1
- package/presets/opencode/next/agents/unit-test-generator.md +5 -2
- package/presets/opencode/next/agents/unit-test-healer.md +5 -2
- package/presets/opencode/next/agents/unit-test-planner.md +5 -2
- package/presets/opencode/next/ai-local/conventions.md +6 -1
- package/presets/opencode/next/hooks/chain-team-phases.sh +108 -1
- package/presets/opencode/next/rules/agent-team-intake.md +2 -2
- package/presets/opencode/next/rules/agent-team-orchestrator.md +5 -4
- package/presets/opencode/next/rules/feature-delivery-workflow.md +2 -2
- package/presets/opencode/nuxt/adapter-map.json +1 -1
- package/presets/opencode/nuxt/agents/README.md +4 -4
- package/presets/opencode/nuxt/agents/build-verifier.md +1 -1
- package/presets/opencode/nuxt/agents/code-reviewer.md +1 -1
- package/presets/opencode/nuxt/agents/debugger.md +1 -1
- package/presets/opencode/nuxt/agents/feature-developer.md +1 -1
- package/presets/opencode/nuxt/agents/task-analyst.md +1 -1
- package/presets/opencode/nuxt/hooks/chain-team-phases.sh +108 -1
- package/presets/opencode/nuxt/rules/agent-team-intake.md +2 -2
- package/presets/opencode/nuxt/rules/agent-team-orchestrator.md +5 -4
- package/presets/opencode/nuxt/rules/feature-delivery-workflow.md +1 -1
- package/presets/opencode/php-hexagonal/adapter-map.json +1 -1
- package/presets/opencode/php-hexagonal/agents/README.md +3 -3
- package/presets/opencode/php-hexagonal/agents/build-verifier.md +1 -1
- package/presets/opencode/php-hexagonal/agents/code-reviewer.md +1 -1
- package/presets/opencode/php-hexagonal/agents/debugger.md +1 -1
- package/presets/opencode/php-hexagonal/agents/feature-developer.md +1 -1
- package/presets/opencode/php-hexagonal/agents/task-analyst.md +1 -1
- package/presets/opencode/php-hexagonal/hooks/chain-team-phases.sh +108 -1
- package/presets/opencode/php-hexagonal/rules/agent-team-intake.md +2 -2
- package/presets/opencode/php-hexagonal/rules/agent-team-orchestrator.md +5 -4
- package/presets/opencode/php-hexagonal/rules/feature-delivery-workflow.md +1 -1
- package/presets/opencode/php-laravel/adapter-map.json +1 -1
- package/presets/opencode/php-laravel/agents/README.md +3 -3
- package/presets/opencode/php-laravel/agents/build-verifier.md +1 -1
- package/presets/opencode/php-laravel/agents/code-reviewer.md +1 -1
- package/presets/opencode/php-laravel/agents/debugger.md +1 -1
- package/presets/opencode/php-laravel/agents/feature-developer.md +1 -1
- package/presets/opencode/php-laravel/agents/task-analyst.md +1 -1
- package/presets/opencode/php-laravel/hooks/chain-team-phases.sh +108 -1
- package/presets/opencode/php-laravel/rules/agent-team-intake.md +2 -2
- package/presets/opencode/php-laravel/rules/agent-team-orchestrator.md +5 -4
- package/presets/opencode/php-laravel/rules/feature-delivery-workflow.md +1 -1
- package/presets/opencode/plugins/output-guard/README.md +25 -6
- package/presets/opencode/plugins/output-guard/index.ts +27 -9
- package/presets/opencode/plugins/output-guard/rewrite.ts +113 -4
- package/presets/opencode/svelte/adapter-map.json +1 -1
- package/presets/opencode/svelte/agents/README.md +4 -4
- package/presets/opencode/svelte/agents/build-verifier.md +1 -1
- package/presets/opencode/svelte/agents/code-reviewer.md +1 -1
- package/presets/opencode/svelte/agents/debugger.md +1 -1
- package/presets/opencode/svelte/agents/feature-developer.md +1 -1
- package/presets/opencode/svelte/agents/task-analyst.md +1 -1
- package/presets/opencode/svelte/hooks/chain-team-phases.sh +108 -1
- package/presets/opencode/svelte/rules/agent-team-intake.md +2 -2
- package/presets/opencode/svelte/rules/agent-team-orchestrator.md +5 -4
- package/presets/opencode/svelte/rules/feature-delivery-workflow.md +1 -1
- package/presets/zcode/android-kotlin/adapter-map.json +1 -1
- package/presets/zcode/android-kotlin/agents/README.md +3 -3
- package/presets/zcode/android-kotlin/agents/build-verifier.md +1 -1
- package/presets/zcode/android-kotlin/agents/code-reviewer.md +1 -1
- package/presets/zcode/android-kotlin/agents/debugger.md +1 -1
- package/presets/zcode/android-kotlin/agents/feature-developer.md +1 -1
- package/presets/zcode/android-kotlin/agents/task-analyst.md +1 -1
- package/presets/zcode/android-kotlin/hooks/chain-team-phases.sh +108 -1
- package/presets/zcode/android-kotlin/rules/agent-team-intake.md +2 -2
- package/presets/zcode/android-kotlin/rules/agent-team-orchestrator.md +5 -4
- package/presets/zcode/go/adapter-map.json +1 -1
- package/presets/zcode/go/agents/README.md +2 -2
- package/presets/zcode/go/agents/build-verifier.md +1 -1
- package/presets/zcode/go/agents/code-reviewer.md +1 -1
- package/presets/zcode/go/agents/debugger.md +1 -1
- package/presets/zcode/go/agents/feature-developer.md +1 -1
- package/presets/zcode/go/agents/task-analyst.md +1 -1
- package/presets/zcode/go/hooks/chain-team-phases.sh +108 -1
- package/presets/zcode/go/rules/agent-team-intake.md +2 -2
- package/presets/zcode/go/rules/agent-team-orchestrator.md +5 -4
- package/presets/zcode/go/rules/feature-delivery-workflow.md +1 -1
- package/presets/zcode/ios-swift/adapter-map.json +1 -1
- package/presets/zcode/ios-swift/agents/README.md +3 -3
- package/presets/zcode/ios-swift/agents/build-verifier.md +1 -1
- package/presets/zcode/ios-swift/agents/code-reviewer.md +1 -1
- package/presets/zcode/ios-swift/agents/debugger.md +1 -1
- package/presets/zcode/ios-swift/agents/feature-developer.md +1 -1
- package/presets/zcode/ios-swift/agents/task-analyst.md +1 -1
- package/presets/zcode/ios-swift/hooks/chain-team-phases.sh +108 -1
- package/presets/zcode/ios-swift/rules/agent-team-intake.md +2 -2
- package/presets/zcode/ios-swift/rules/agent-team-orchestrator.md +5 -4
- package/presets/zcode/ios-swift/rules/feature-delivery-workflow.md +1 -1
- package/presets/zcode/java/adapter-map.json +1 -1
- package/presets/zcode/java/agents/README.md +2 -2
- package/presets/zcode/java/agents/build-verifier.md +1 -1
- package/presets/zcode/java/agents/code-reviewer.md +1 -1
- package/presets/zcode/java/agents/debugger.md +1 -1
- package/presets/zcode/java/agents/feature-developer.md +1 -1
- package/presets/zcode/java/agents/task-analyst.md +1 -1
- package/presets/zcode/java/hooks/chain-team-phases.sh +108 -1
- package/presets/zcode/java/rules/agent-team-intake.md +2 -2
- package/presets/zcode/java/rules/agent-team-orchestrator.md +5 -4
- package/presets/zcode/java/rules/feature-delivery-workflow.md +1 -1
- package/presets/zcode/mcp-ts/adapter-map.json +1 -1
- package/presets/zcode/mcp-ts/agents/README.md +1 -1
- package/presets/zcode/mcp-ts/agents/build-verifier.md +1 -1
- package/presets/zcode/mcp-ts/agents/feature-developer.md +1 -1
- package/presets/zcode/mcp-ts/agents/task-analyst.md +1 -1
- package/presets/zcode/mcp-ts/hooks/chain-team-phases.sh +108 -1
- package/presets/zcode/mcp-ts/rules/agent-team-intake.md +2 -2
- package/presets/zcode/mcp-ts/rules/agent-team-orchestrator.md +5 -4
- package/presets/zcode/mcp-ts/rules/feature-delivery-workflow.md +1 -1
- package/presets/zcode/mol/adapter-map.json +1 -1
- package/presets/zcode/mol/agents/README.md +3 -3
- package/presets/zcode/mol/agents/build-verifier.md +1 -1
- package/presets/zcode/mol/agents/code-reviewer.md +1 -1
- package/presets/zcode/mol/agents/debugger.md +1 -1
- package/presets/zcode/mol/agents/feature-developer.md +1 -1
- package/presets/zcode/mol/agents/task-analyst.md +1 -1
- package/presets/zcode/mol/hooks/chain-team-phases.sh +108 -1
- package/presets/zcode/mol/rules/agent-team-intake.md +2 -2
- package/presets/zcode/mol/rules/agent-team-orchestrator.md +5 -4
- package/presets/zcode/mol/rules/feature-delivery-workflow.md +1 -1
- package/presets/zcode/next/REPO_AGENTS.md +16 -0
- package/presets/zcode/next/adapter-map.json +1 -1
- package/presets/zcode/next/agents/README.md +3 -3
- package/presets/zcode/next/agents/accessibility-reviewer.md +4 -1
- package/presets/zcode/next/agents/api-contract-reviewer.md +5 -2
- package/presets/zcode/next/agents/build-verifier.md +6 -3
- package/presets/zcode/next/agents/ci-investigator.md +1 -1
- package/presets/zcode/next/agents/code-reviewer.md +7 -4
- package/presets/zcode/next/agents/codebase-analyzer.md +4 -1
- package/presets/zcode/next/agents/debugger.md +2 -2
- package/presets/zcode/next/agents/feature-developer.md +2 -2
- package/presets/zcode/next/agents/migration-specialist.md +4 -1
- package/presets/zcode/next/agents/mockup-reviewer.md +4 -1
- package/presets/zcode/next/agents/openspec-author.md +4 -1
- package/presets/zcode/next/agents/performance-auditor.md +4 -1
- package/presets/zcode/next/agents/playwright-test-generator.md +5 -2
- package/presets/zcode/next/agents/playwright-test-healer.md +5 -2
- package/presets/zcode/next/agents/playwright-test-planner.md +5 -2
- package/presets/zcode/next/agents/qa-tester.md +5 -2
- package/presets/zcode/next/agents/security-reviewer.md +4 -1
- package/presets/zcode/next/agents/solution-architect.md +4 -1
- package/presets/zcode/next/agents/task-analyst.md +5 -2
- package/presets/zcode/next/agents/task-router.md +8 -5
- package/presets/zcode/next/agents/tech-writer.md +4 -1
- package/presets/zcode/next/agents/unit-test-generator.md +5 -2
- package/presets/zcode/next/agents/unit-test-healer.md +5 -2
- package/presets/zcode/next/agents/unit-test-planner.md +5 -2
- package/presets/zcode/next/ai-local/conventions.md +6 -1
- package/presets/zcode/next/hooks/chain-team-phases.sh +108 -1
- package/presets/zcode/next/rules/agent-team-intake.md +2 -2
- package/presets/zcode/next/rules/agent-team-orchestrator.md +5 -4
- package/presets/zcode/next/rules/feature-delivery-workflow.md +2 -2
- package/presets/zcode/nuxt/adapter-map.json +1 -1
- package/presets/zcode/nuxt/agents/README.md +3 -3
- package/presets/zcode/nuxt/agents/build-verifier.md +1 -1
- package/presets/zcode/nuxt/agents/code-reviewer.md +1 -1
- package/presets/zcode/nuxt/agents/debugger.md +1 -1
- package/presets/zcode/nuxt/agents/feature-developer.md +1 -1
- package/presets/zcode/nuxt/agents/task-analyst.md +1 -1
- package/presets/zcode/nuxt/hooks/chain-team-phases.sh +108 -1
- package/presets/zcode/nuxt/rules/agent-team-intake.md +2 -2
- package/presets/zcode/nuxt/rules/agent-team-orchestrator.md +5 -4
- package/presets/zcode/nuxt/rules/feature-delivery-workflow.md +1 -1
- package/presets/zcode/php-hexagonal/adapter-map.json +1 -1
- package/presets/zcode/php-hexagonal/agents/README.md +2 -2
- package/presets/zcode/php-hexagonal/agents/build-verifier.md +1 -1
- package/presets/zcode/php-hexagonal/agents/code-reviewer.md +1 -1
- package/presets/zcode/php-hexagonal/agents/debugger.md +1 -1
- package/presets/zcode/php-hexagonal/agents/feature-developer.md +1 -1
- package/presets/zcode/php-hexagonal/agents/task-analyst.md +1 -1
- package/presets/zcode/php-hexagonal/hooks/chain-team-phases.sh +108 -1
- package/presets/zcode/php-hexagonal/rules/agent-team-intake.md +2 -2
- package/presets/zcode/php-hexagonal/rules/agent-team-orchestrator.md +5 -4
- package/presets/zcode/php-hexagonal/rules/feature-delivery-workflow.md +1 -1
- package/presets/zcode/php-laravel/adapter-map.json +1 -1
- package/presets/zcode/php-laravel/agents/README.md +2 -2
- package/presets/zcode/php-laravel/agents/build-verifier.md +1 -1
- package/presets/zcode/php-laravel/agents/code-reviewer.md +1 -1
- package/presets/zcode/php-laravel/agents/debugger.md +1 -1
- package/presets/zcode/php-laravel/agents/feature-developer.md +1 -1
- package/presets/zcode/php-laravel/agents/task-analyst.md +1 -1
- package/presets/zcode/php-laravel/hooks/chain-team-phases.sh +108 -1
- package/presets/zcode/php-laravel/rules/agent-team-intake.md +2 -2
- package/presets/zcode/php-laravel/rules/agent-team-orchestrator.md +5 -4
- package/presets/zcode/php-laravel/rules/feature-delivery-workflow.md +1 -1
- package/presets/zcode/svelte/adapter-map.json +1 -1
- package/presets/zcode/svelte/agents/README.md +3 -3
- package/presets/zcode/svelte/agents/build-verifier.md +1 -1
- package/presets/zcode/svelte/agents/code-reviewer.md +1 -1
- package/presets/zcode/svelte/agents/debugger.md +1 -1
- package/presets/zcode/svelte/agents/feature-developer.md +1 -1
- package/presets/zcode/svelte/agents/task-analyst.md +1 -1
- package/presets/zcode/svelte/hooks/chain-team-phases.sh +108 -1
- package/presets/zcode/svelte/rules/agent-team-intake.md +2 -2
- package/presets/zcode/svelte/rules/agent-team-orchestrator.md +5 -4
- package/presets/zcode/svelte/rules/feature-delivery-workflow.md +1 -1
- package/scripts/aggregate-agent-task-metrics.mjs +201 -0
- package/scripts/report-context-cost.mjs +126 -0
|
@@ -19,12 +19,15 @@ This subagent does **not** inherit `opencode.json` `instructions`. Read these ru
|
|
|
19
19
|
- `.opencode/rules/code-quality-and-refactoring.md`
|
|
20
20
|
- `.opencode/rules/ai-local-overlay.md`
|
|
21
21
|
- `.opencode/rules/architecture-boundaries.md` — layer boundaries and allowed imports
|
|
22
|
+
- `.opencode/rules/anti-hallucination-contract.md` — do not invent signatures, imports, schemas, or evidence
|
|
23
|
+
- `.opencode/rules/post-change-lint.md` — lint/type-check after code edits
|
|
24
|
+
|
|
25
|
+
Read when the task reaches the matching zone:
|
|
26
|
+
|
|
22
27
|
- `.opencode/rules/feature-delivery-workflow.md` — layer order, mockup gate, ux-design gate
|
|
23
28
|
- `.opencode/rules/reference-features.md` — analog files first
|
|
24
29
|
- `.opencode/rules/anti-sycophancy-discipline.md` — procedural anti-sycophancy rules
|
|
25
|
-
- `.opencode/rules/anti-hallucination-contract.md` — do not invent signatures, imports, schemas, or evidence
|
|
26
30
|
- `.opencode/rules/mcp-usage.md` — when verifying third-party APIs (Context7)
|
|
27
|
-
- `.opencode/rules/post-change-lint.md` — lint/type-check after code edits
|
|
28
31
|
|
|
29
32
|
Also read matching `.ai.local/rules/*.md` (local overlay) for the active zone, and the project strict rules if present.
|
|
30
33
|
|
|
@@ -109,7 +112,7 @@ Before you run the project gate and write the terminal validation receipt, self-
|
|
|
109
112
|
|
|
110
113
|
Record a `## Self-review` block in `validation-report.md` (goal/AC coverage, evidence, alignment/drift). Optional loop (see the requestable `self-review-and-context-hygiene` contract). In-task self-learning loop: run `node .ai.local/scripts/run.mjs` at the pre-receipt self-review when the engine exists; capture one wrong-turn with `node .ai.local/scripts/signals.mjs --append '<json>'` and inspect read-only with `node .ai.local/scripts/run.mjs --status`. Keep the loop deterministic: it runs no model-driven pass — rule text is template-derived from the validated signature; a model-driven pass is not part of the loop, and if one is ever added it must be default-off and may write only to the staged band. Ratchet: no self-review / context-health pass / re-anchor ceremony for `bounded`/`spike` tasks (or the `light` profile).
|
|
111
114
|
|
|
112
|
-
A self-review defect that changes the output appends one `review-ledger.md` row (`source: self`, `fair: yes`, `disposition: fixed`) before the receipt. Do not start implementation when `goal.md` is missing.
|
|
115
|
+
A self-review defect that changes the output appends one `review-ledger.md` row (`source: self`, `fair: yes`, `disposition: fixed`) before the receipt. Do not start implementation when `goal.md` is missing. Ledger rows go under the canonical header `| id | at | source | summary | fair | disposition | evidence | signature |`; after appending, run `node .ai.local/scripts/team-db.mjs ledger-check --slug <slug>` and fix any header it rejects.
|
|
113
116
|
|
|
114
117
|
## Local overlay compliance (soft gate)
|
|
115
118
|
|
|
@@ -17,7 +17,6 @@ This subagent does **not** inherit `opencode.json` `instructions`. Read these ru
|
|
|
17
17
|
- `.opencode/rules/architecture-boundaries.md` — layer boundaries and allowed imports
|
|
18
18
|
- `.opencode/rules/feature-delivery-workflow.md` — layer order, mockup gate, ux-design gate
|
|
19
19
|
- `.opencode/rules/anti-hallucination-contract.md` — do not invent signatures, imports, schemas, or evidence
|
|
20
|
-
- `.opencode/rules/post-change-lint.md` — lint/type-check after code edits
|
|
21
20
|
|
|
22
21
|
Read when the task reaches the matching zone:
|
|
23
22
|
|
|
@@ -42,6 +41,7 @@ Read when the task reaches the matching zone:
|
|
|
42
41
|
- `.opencode/rules/types-jsdoc.md`
|
|
43
42
|
- `.opencode/rules/api-services.md`
|
|
44
43
|
- `.opencode/rules/http-client.md`
|
|
44
|
+
- `.opencode/rules/post-change-lint.md` — lint/type-check after code edits
|
|
45
45
|
|
|
46
46
|
Also read matching `.ai.local/rules/*.md` (local overlay) for the active zone, and the project strict rules if present.
|
|
47
47
|
|
|
@@ -18,14 +18,17 @@ This subagent does **not** inherit `opencode.json` `instructions`. Read these ru
|
|
|
18
18
|
- `.opencode/rules/package-manager.md`
|
|
19
19
|
- `.opencode/rules/code-quality-and-refactoring.md`
|
|
20
20
|
- `.opencode/rules/ai-local-overlay.md`
|
|
21
|
+
- `.opencode/rules/anti-hallucination-contract.md` — do not invent signatures, imports, schemas, or evidence
|
|
22
|
+
- `.opencode/rules/code-review-mr.md`
|
|
23
|
+
- `.opencode/rules/react-next-anti-hallucination.md` — phantom import banlist
|
|
24
|
+
|
|
25
|
+
Read when the task reaches the matching zone:
|
|
26
|
+
|
|
21
27
|
- `.opencode/rules/architecture-boundaries.md` — layer boundaries and allowed imports
|
|
22
28
|
- `.opencode/rules/feature-delivery-workflow.md` — layer order, mockup gate, ux-design gate
|
|
23
29
|
- `.opencode/rules/reference-features.md` — analog files first
|
|
24
30
|
- `.opencode/rules/anti-sycophancy-discipline.md` — procedural anti-sycophancy rules
|
|
25
|
-
- `.opencode/rules/anti-hallucination-contract.md` — do not invent signatures, imports, schemas, or evidence
|
|
26
31
|
- `.opencode/rules/mcp-usage.md` — when verifying third-party APIs (Context7)
|
|
27
|
-
- `.opencode/rules/code-review-mr.md`
|
|
28
|
-
- `.opencode/rules/react-next-anti-hallucination.md` — phantom import banlist
|
|
29
32
|
|
|
30
33
|
Also read matching `.ai.local/rules/*.md` (local overlay) for the active zone, and the project strict rules if present.
|
|
31
34
|
|
|
@@ -73,7 +76,7 @@ Before you emit the terminal review receipt, self-audit the review artifact: eve
|
|
|
73
76
|
|
|
74
77
|
Record a `## Self-review` block in `review.md` (goal/AC coverage, evidence, alignment/drift). Optional loop (see the requestable `self-review-and-context-hygiene` contract). In-task self-learning loop: run `node .ai.local/scripts/run.mjs` at the pre-receipt self-review when the engine exists; capture one wrong-turn with `node .ai.local/scripts/signals.mjs --append '<json>'` and inspect read-only with `node .ai.local/scripts/run.mjs --status`. Keep the loop deterministic: it runs no model-driven pass — rule text is template-derived from the validated signature; a model-driven pass is not part of the loop, and if one is ever added it must be default-off and may write only to the staged band. Ratchet: no self-review / context-health pass / re-anchor ceremony for `bounded`/`spike` tasks (or the `light` profile).
|
|
75
78
|
|
|
76
|
-
A self-review defect that changes the output appends one `review-ledger.md` row (`source: self`, `fair: yes`, `disposition: fixed`) before the receipt. Do not start implementation when `goal.md` is missing. Append each finding to `review-ledger.md` (`disposition: open`) before the receipt.
|
|
79
|
+
A self-review defect that changes the output appends one `review-ledger.md` row (`source: self`, `fair: yes`, `disposition: fixed`) before the receipt. Do not start implementation when `goal.md` is missing. Append each finding to `review-ledger.md` (`disposition: open`) before the receipt. Ledger rows go under the canonical header `| id | at | source | summary | fair | disposition | evidence | signature |`; after appending, run `node .ai.local/scripts/team-db.mjs ledger-check --slug <slug>` and fix any header it rejects.
|
|
77
80
|
|
|
78
81
|
## UI / Figma parity gate (UI-touching MR)
|
|
79
82
|
|
|
@@ -20,9 +20,12 @@ This subagent does **not** inherit `opencode.json` `instructions`. Read these ru
|
|
|
20
20
|
- `.opencode/rules/ai-local-overlay.md`
|
|
21
21
|
- `.opencode/rules/architecture-boundaries.md` — layer boundaries and allowed imports
|
|
22
22
|
- `.opencode/rules/feature-delivery-workflow.md` — layer order, mockup gate, ux-design gate
|
|
23
|
+
- `.opencode/rules/anti-hallucination-contract.md` — do not invent signatures, imports, schemas, or evidence
|
|
24
|
+
|
|
25
|
+
Read when the task reaches the matching zone:
|
|
26
|
+
|
|
23
27
|
- `.opencode/rules/reference-features.md` — analog files first
|
|
24
28
|
- `.opencode/rules/anti-sycophancy-discipline.md` — procedural anti-sycophancy rules
|
|
25
|
-
- `.opencode/rules/anti-hallucination-contract.md` — do not invent signatures, imports, schemas, or evidence
|
|
26
29
|
- `.opencode/rules/mcp-usage.md` — when verifying third-party APIs (Context7)
|
|
27
30
|
|
|
28
31
|
Also read matching `.ai.local/rules/*.md` (local overlay) for the active zone, and the project strict rules if present.
|
|
@@ -17,7 +17,6 @@ This subagent does **not** inherit `opencode.json` `instructions`. Read these ru
|
|
|
17
17
|
- `.opencode/rules/architecture-boundaries.md` — layer boundaries and allowed imports
|
|
18
18
|
- `.opencode/rules/feature-delivery-workflow.md` — layer order, mockup gate, ux-design gate
|
|
19
19
|
- `.opencode/rules/anti-hallucination-contract.md` — do not invent signatures, imports, schemas, or evidence
|
|
20
|
-
- `.opencode/rules/post-change-lint.md` — lint/type-check after code edits
|
|
21
20
|
|
|
22
21
|
Read when the task reaches the matching zone:
|
|
23
22
|
|
|
@@ -42,6 +41,7 @@ Read when the task reaches the matching zone:
|
|
|
42
41
|
- `.opencode/rules/types-jsdoc.md`
|
|
43
42
|
- `.opencode/rules/api-services.md`
|
|
44
43
|
- `.opencode/rules/http-client.md`
|
|
44
|
+
- `.opencode/rules/post-change-lint.md` — lint/type-check after code edits
|
|
45
45
|
|
|
46
46
|
Also read matching `.ai.local/rules/*.md` (local overlay) for the active zone, and the project strict rules if present.
|
|
47
47
|
|
|
@@ -110,7 +110,7 @@ Before you set `fixApplied: true` and emit the terminal receipt, self-audit the
|
|
|
110
110
|
|
|
111
111
|
Record a `## Self-review` block in `debug-report.md` (goal/AC coverage, evidence, alignment/drift). Optional loop (see the requestable `self-review-and-context-hygiene` contract). In-task self-learning loop: run `node .ai.local/scripts/run.mjs` at the pre-receipt self-review when the engine exists; capture one wrong-turn with `node .ai.local/scripts/signals.mjs --append '<json>'` and inspect read-only with `node .ai.local/scripts/run.mjs --status`. Keep the loop deterministic: it runs no model-driven pass — rule text is template-derived from the validated signature; a model-driven pass is not part of the loop, and if one is ever added it must be default-off and may write only to the staged band. Ratchet: no self-review / context-health pass / re-anchor ceremony for `bounded`/`spike` tasks (or the `light` profile).
|
|
112
112
|
|
|
113
|
-
A self-review defect that changes the output appends one `review-ledger.md` row (`source: self`, `fair: yes`, `disposition: fixed`) before the receipt. Do not start implementation when `goal.md` is missing.
|
|
113
|
+
A self-review defect that changes the output appends one `review-ledger.md` row (`source: self`, `fair: yes`, `disposition: fixed`) before the receipt. Do not start implementation when `goal.md` is missing. Ledger rows go under the canonical header `| id | at | source | summary | fair | disposition | evidence | signature |`; after appending, run `node .ai.local/scripts/team-db.mjs ledger-check --slug <slug>` and fix any header it rejects.
|
|
114
114
|
|
|
115
115
|
|
|
116
116
|
## MCP usage
|
|
@@ -17,7 +17,6 @@ This subagent does **not** inherit `opencode.json` `instructions`. Read these ru
|
|
|
17
17
|
- `.opencode/rules/architecture-boundaries.md` — layer boundaries and allowed imports
|
|
18
18
|
- `.opencode/rules/feature-delivery-workflow.md` — layer order, mockup gate, ux-design gate
|
|
19
19
|
- `.opencode/rules/anti-hallucination-contract.md` — do not invent signatures, imports, schemas, or evidence
|
|
20
|
-
- `.opencode/rules/post-change-lint.md` — lint/type-check after code edits
|
|
21
20
|
|
|
22
21
|
Read when the task reaches the matching zone:
|
|
23
22
|
|
|
@@ -42,6 +41,7 @@ Read when the task reaches the matching zone:
|
|
|
42
41
|
- `.opencode/rules/types-jsdoc.md`
|
|
43
42
|
- `.opencode/rules/api-services.md`
|
|
44
43
|
- `.opencode/rules/http-client.md`
|
|
44
|
+
- `.opencode/rules/post-change-lint.md` — lint/type-check after code edits
|
|
45
45
|
|
|
46
46
|
Also read matching `.ai.local/rules/*.md` (local overlay) for the active zone, and the project strict rules if present.
|
|
47
47
|
|
|
@@ -143,7 +143,7 @@ Before you emit the terminal implementation receipt (per wave for multi-wave wor
|
|
|
143
143
|
|
|
144
144
|
Record a `## Self-review` block in `implementation.md` (goal/AC coverage, evidence, alignment/drift). Optional loop (see the requestable `self-review-and-context-hygiene` contract). In-task self-learning loop: run `node .ai.local/scripts/run.mjs` at the pre-receipt self-review when the engine exists; capture one wrong-turn with `node .ai.local/scripts/signals.mjs --append '<json>'` and inspect read-only with `node .ai.local/scripts/run.mjs --status`. Keep the loop deterministic: it runs no model-driven pass — rule text is template-derived from the validated signature; a model-driven pass is not part of the loop, and if one is ever added it must be default-off and may write only to the staged band. Ratchet: no self-review / context-health pass / re-anchor ceremony for `bounded`/`spike` tasks (or the `light` profile).
|
|
145
145
|
|
|
146
|
-
A self-review defect that changes the output appends one `review-ledger.md` row (`source: self`, `fair: yes`, `disposition: fixed`) before the receipt. Do not start implementation when `goal.md` is missing.
|
|
146
|
+
A self-review defect that changes the output appends one `review-ledger.md` row (`source: self`, `fair: yes`, `disposition: fixed`) before the receipt. Do not start implementation when `goal.md` is missing. Ledger rows go under the canonical header `| id | at | source | summary | fair | disposition | evidence | signature |`; after appending, run `node .ai.local/scripts/team-db.mjs ledger-check --slug <slug>` and fix any header it rejects.
|
|
147
147
|
|
|
148
148
|
## UI self-check vs Figma
|
|
149
149
|
|
|
@@ -20,9 +20,12 @@ This subagent does **not** inherit `opencode.json` `instructions`. Read these ru
|
|
|
20
20
|
- `.opencode/rules/ai-local-overlay.md`
|
|
21
21
|
- `.opencode/rules/architecture-boundaries.md` — layer boundaries and allowed imports
|
|
22
22
|
- `.opencode/rules/feature-delivery-workflow.md` — layer order, mockup gate, ux-design gate
|
|
23
|
+
- `.opencode/rules/anti-hallucination-contract.md` — do not invent signatures, imports, schemas, or evidence
|
|
24
|
+
|
|
25
|
+
Read when the task reaches the matching zone:
|
|
26
|
+
|
|
23
27
|
- `.opencode/rules/reference-features.md` — analog files first
|
|
24
28
|
- `.opencode/rules/anti-sycophancy-discipline.md` — procedural anti-sycophancy rules
|
|
25
|
-
- `.opencode/rules/anti-hallucination-contract.md` — do not invent signatures, imports, schemas, or evidence
|
|
26
29
|
- `.opencode/rules/mcp-usage.md` — when verifying third-party APIs (Context7)
|
|
27
30
|
|
|
28
31
|
Also read matching `.ai.local/rules/*.md` (local overlay) for the active zone, and the project strict rules if present.
|
|
@@ -20,9 +20,12 @@ This subagent does **not** inherit `opencode.json` `instructions`. Read these ru
|
|
|
20
20
|
- `.opencode/rules/ai-local-overlay.md`
|
|
21
21
|
- `.opencode/rules/architecture-boundaries.md` — layer boundaries and allowed imports
|
|
22
22
|
- `.opencode/rules/feature-delivery-workflow.md` — layer order, mockup gate, ux-design gate
|
|
23
|
+
- `.opencode/rules/anti-hallucination-contract.md` — do not invent signatures, imports, schemas, or evidence
|
|
24
|
+
|
|
25
|
+
Read when the task reaches the matching zone:
|
|
26
|
+
|
|
23
27
|
- `.opencode/rules/reference-features.md` — analog files first
|
|
24
28
|
- `.opencode/rules/anti-sycophancy-discipline.md` — procedural anti-sycophancy rules
|
|
25
|
-
- `.opencode/rules/anti-hallucination-contract.md` — do not invent signatures, imports, schemas, or evidence
|
|
26
29
|
- `.opencode/rules/mcp-usage.md` — when verifying third-party APIs (Context7)
|
|
27
30
|
|
|
28
31
|
Also read matching `.ai.local/rules/*.md` (local overlay) for the active zone, and the project strict rules if present.
|
|
@@ -21,9 +21,12 @@ This subagent does **not** inherit `opencode.json` `instructions`. Read these ru
|
|
|
21
21
|
- `.opencode/rules/ai-local-overlay.md`
|
|
22
22
|
- `.opencode/rules/architecture-boundaries.md` — layer boundaries and allowed imports
|
|
23
23
|
- `.opencode/rules/feature-delivery-workflow.md` — layer order, mockup gate, ux-design gate
|
|
24
|
+
- `.opencode/rules/anti-hallucination-contract.md` — do not invent signatures, imports, schemas, or evidence
|
|
25
|
+
|
|
26
|
+
Read when the task reaches the matching zone:
|
|
27
|
+
|
|
24
28
|
- `.opencode/rules/reference-features.md` — analog files first
|
|
25
29
|
- `.opencode/rules/anti-sycophancy-discipline.md` — procedural anti-sycophancy rules
|
|
26
|
-
- `.opencode/rules/anti-hallucination-contract.md` — do not invent signatures, imports, schemas, or evidence
|
|
27
30
|
- `.opencode/rules/mcp-usage.md` — when verifying third-party APIs (Context7)
|
|
28
31
|
|
|
29
32
|
Also read matching `.ai.local/rules/*.md` (local overlay) for the active zone, and the project strict rules if present.
|
|
@@ -20,9 +20,12 @@ This subagent does **not** inherit `opencode.json` `instructions`. Read these ru
|
|
|
20
20
|
- `.opencode/rules/ai-local-overlay.md`
|
|
21
21
|
- `.opencode/rules/architecture-boundaries.md` — layer boundaries and allowed imports
|
|
22
22
|
- `.opencode/rules/feature-delivery-workflow.md` — layer order, mockup gate, ux-design gate
|
|
23
|
+
- `.opencode/rules/anti-hallucination-contract.md` — do not invent signatures, imports, schemas, or evidence
|
|
24
|
+
|
|
25
|
+
Read when the task reaches the matching zone:
|
|
26
|
+
|
|
23
27
|
- `.opencode/rules/reference-features.md` — analog files first
|
|
24
28
|
- `.opencode/rules/anti-sycophancy-discipline.md` — procedural anti-sycophancy rules
|
|
25
|
-
- `.opencode/rules/anti-hallucination-contract.md` — do not invent signatures, imports, schemas, or evidence
|
|
26
29
|
- `.opencode/rules/mcp-usage.md` — when verifying third-party APIs (Context7)
|
|
27
30
|
|
|
28
31
|
Also read matching `.ai.local/rules/*.md` (local overlay) for the active zone, and the project strict rules if present.
|
|
@@ -15,12 +15,15 @@ This subagent does **not** inherit `opencode.json` `instructions`. Read these ru
|
|
|
15
15
|
- `.opencode/rules/code-quality-and-refactoring.md`
|
|
16
16
|
- `.opencode/rules/ai-local-overlay.md`
|
|
17
17
|
- `.opencode/rules/architecture-boundaries.md` — layer boundaries and allowed imports
|
|
18
|
+
- `.opencode/rules/anti-hallucination-contract.md` — do not invent signatures, imports, schemas, or evidence
|
|
19
|
+
- `.opencode/rules/playwright-agents.md`
|
|
20
|
+
|
|
21
|
+
Read when the task reaches the matching zone:
|
|
22
|
+
|
|
18
23
|
- `.opencode/rules/feature-delivery-workflow.md` — layer order, mockup gate, ux-design gate
|
|
19
24
|
- `.opencode/rules/reference-features.md` — analog files first
|
|
20
25
|
- `.opencode/rules/anti-sycophancy-discipline.md` — procedural anti-sycophancy rules
|
|
21
|
-
- `.opencode/rules/anti-hallucination-contract.md` — do not invent signatures, imports, schemas, or evidence
|
|
22
26
|
- `.opencode/rules/mcp-usage.md` — when verifying third-party APIs (Context7)
|
|
23
|
-
- `.opencode/rules/playwright-agents.md`
|
|
24
27
|
- `.opencode/rules/tests-e2e-structure.md`
|
|
25
28
|
- `.opencode/rules/dev-process-lifecycle.md`
|
|
26
29
|
- `.opencode/rules/react-next-anti-hallucination.md` — phantom import banlist
|
|
@@ -15,12 +15,15 @@ This subagent does **not** inherit `opencode.json` `instructions`. Read these ru
|
|
|
15
15
|
- `.opencode/rules/code-quality-and-refactoring.md`
|
|
16
16
|
- `.opencode/rules/ai-local-overlay.md`
|
|
17
17
|
- `.opencode/rules/architecture-boundaries.md` — layer boundaries and allowed imports
|
|
18
|
+
- `.opencode/rules/anti-hallucination-contract.md` — do not invent signatures, imports, schemas, or evidence
|
|
19
|
+
- `.opencode/rules/playwright-agents.md`
|
|
20
|
+
|
|
21
|
+
Read when the task reaches the matching zone:
|
|
22
|
+
|
|
18
23
|
- `.opencode/rules/feature-delivery-workflow.md` — layer order, mockup gate, ux-design gate
|
|
19
24
|
- `.opencode/rules/reference-features.md` — analog files first
|
|
20
25
|
- `.opencode/rules/anti-sycophancy-discipline.md` — procedural anti-sycophancy rules
|
|
21
|
-
- `.opencode/rules/anti-hallucination-contract.md` — do not invent signatures, imports, schemas, or evidence
|
|
22
26
|
- `.opencode/rules/mcp-usage.md` — when verifying third-party APIs (Context7)
|
|
23
|
-
- `.opencode/rules/playwright-agents.md`
|
|
24
27
|
- `.opencode/rules/tests-e2e-structure.md`
|
|
25
28
|
- `.opencode/rules/dev-process-lifecycle.md`
|
|
26
29
|
- `.opencode/rules/react-next-anti-hallucination.md` — phantom import banlist
|
|
@@ -19,12 +19,15 @@ This subagent does **not** inherit `opencode.json` `instructions`. Read these ru
|
|
|
19
19
|
- `.opencode/rules/code-quality-and-refactoring.md`
|
|
20
20
|
- `.opencode/rules/ai-local-overlay.md`
|
|
21
21
|
- `.opencode/rules/architecture-boundaries.md` — layer boundaries and allowed imports
|
|
22
|
+
- `.opencode/rules/anti-hallucination-contract.md` — do not invent signatures, imports, schemas, or evidence
|
|
23
|
+
- `.opencode/rules/playwright-agents.md`
|
|
24
|
+
|
|
25
|
+
Read when the task reaches the matching zone:
|
|
26
|
+
|
|
22
27
|
- `.opencode/rules/feature-delivery-workflow.md` — layer order, mockup gate, ux-design gate
|
|
23
28
|
- `.opencode/rules/reference-features.md` — analog files first
|
|
24
29
|
- `.opencode/rules/anti-sycophancy-discipline.md` — procedural anti-sycophancy rules
|
|
25
|
-
- `.opencode/rules/anti-hallucination-contract.md` — do not invent signatures, imports, schemas, or evidence
|
|
26
30
|
- `.opencode/rules/mcp-usage.md` — when verifying third-party APIs (Context7)
|
|
27
|
-
- `.opencode/rules/playwright-agents.md`
|
|
28
31
|
- `.opencode/rules/tests-e2e-structure.md`
|
|
29
32
|
- `.opencode/rules/dev-process-lifecycle.md`
|
|
30
33
|
- `.opencode/rules/react-next-anti-hallucination.md` — phantom import banlist
|
|
@@ -15,12 +15,15 @@ This subagent does **not** inherit `opencode.json` `instructions`. Read these ru
|
|
|
15
15
|
- `.opencode/rules/code-quality-and-refactoring.md`
|
|
16
16
|
- `.opencode/rules/ai-local-overlay.md`
|
|
17
17
|
- `.opencode/rules/architecture-boundaries.md` — layer boundaries and allowed imports
|
|
18
|
+
- `.opencode/rules/anti-hallucination-contract.md` — do not invent signatures, imports, schemas, or evidence
|
|
19
|
+
- `.opencode/rules/tests-unit.md`
|
|
20
|
+
|
|
21
|
+
Read when the task reaches the matching zone:
|
|
22
|
+
|
|
18
23
|
- `.opencode/rules/feature-delivery-workflow.md` — layer order, mockup gate, ux-design gate
|
|
19
24
|
- `.opencode/rules/reference-features.md` — analog files first
|
|
20
25
|
- `.opencode/rules/anti-sycophancy-discipline.md` — procedural anti-sycophancy rules
|
|
21
|
-
- `.opencode/rules/anti-hallucination-contract.md` — do not invent signatures, imports, schemas, or evidence
|
|
22
26
|
- `.opencode/rules/mcp-usage.md` — when verifying third-party APIs (Context7)
|
|
23
|
-
- `.opencode/rules/tests-unit.md`
|
|
24
27
|
- `.opencode/rules/playwright-agents.md`
|
|
25
28
|
- `.opencode/rules/tests-e2e-structure.md`
|
|
26
29
|
- `.opencode/rules/dev-process-lifecycle.md`
|
|
@@ -20,9 +20,12 @@ This subagent does **not** inherit `opencode.json` `instructions`. Read these ru
|
|
|
20
20
|
- `.opencode/rules/ai-local-overlay.md`
|
|
21
21
|
- `.opencode/rules/architecture-boundaries.md` — layer boundaries and allowed imports
|
|
22
22
|
- `.opencode/rules/feature-delivery-workflow.md` — layer order, mockup gate, ux-design gate
|
|
23
|
+
- `.opencode/rules/anti-hallucination-contract.md` — do not invent signatures, imports, schemas, or evidence
|
|
24
|
+
|
|
25
|
+
Read when the task reaches the matching zone:
|
|
26
|
+
|
|
23
27
|
- `.opencode/rules/reference-features.md` — analog files first
|
|
24
28
|
- `.opencode/rules/anti-sycophancy-discipline.md` — procedural anti-sycophancy rules
|
|
25
|
-
- `.opencode/rules/anti-hallucination-contract.md` — do not invent signatures, imports, schemas, or evidence
|
|
26
29
|
- `.opencode/rules/mcp-usage.md` — when verifying third-party APIs (Context7)
|
|
27
30
|
|
|
28
31
|
Also read matching `.ai.local/rules/*.md` (local overlay) for the active zone, and the project strict rules if present.
|
|
@@ -20,9 +20,12 @@ This subagent does **not** inherit `opencode.json` `instructions`. Read these ru
|
|
|
20
20
|
- `.opencode/rules/ai-local-overlay.md`
|
|
21
21
|
- `.opencode/rules/architecture-boundaries.md` — layer boundaries and allowed imports
|
|
22
22
|
- `.opencode/rules/feature-delivery-workflow.md` — layer order, mockup gate, ux-design gate
|
|
23
|
+
- `.opencode/rules/anti-hallucination-contract.md` — do not invent signatures, imports, schemas, or evidence
|
|
24
|
+
|
|
25
|
+
Read when the task reaches the matching zone:
|
|
26
|
+
|
|
23
27
|
- `.opencode/rules/reference-features.md` — analog files first
|
|
24
28
|
- `.opencode/rules/anti-sycophancy-discipline.md` — procedural anti-sycophancy rules
|
|
25
|
-
- `.opencode/rules/anti-hallucination-contract.md` — do not invent signatures, imports, schemas, or evidence
|
|
26
29
|
- `.opencode/rules/mcp-usage.md` — when verifying third-party APIs (Context7)
|
|
27
30
|
|
|
28
31
|
Also read matching `.ai.local/rules/*.md` (local overlay) for the active zone, and the project strict rules if present.
|
|
@@ -20,9 +20,12 @@ This subagent does **not** inherit `opencode.json` `instructions`. Read these ru
|
|
|
20
20
|
- `.opencode/rules/ai-local-overlay.md`
|
|
21
21
|
- `.opencode/rules/architecture-boundaries.md` — layer boundaries and allowed imports
|
|
22
22
|
- `.opencode/rules/feature-delivery-workflow.md` — layer order, mockup gate, ux-design gate
|
|
23
|
+
- `.opencode/rules/anti-hallucination-contract.md` — do not invent signatures, imports, schemas, or evidence
|
|
24
|
+
|
|
25
|
+
Read when the task reaches the matching zone:
|
|
26
|
+
|
|
23
27
|
- `.opencode/rules/reference-features.md` — analog files first
|
|
24
28
|
- `.opencode/rules/anti-sycophancy-discipline.md` — procedural anti-sycophancy rules
|
|
25
|
-
- `.opencode/rules/anti-hallucination-contract.md` — do not invent signatures, imports, schemas, or evidence
|
|
26
29
|
- `.opencode/rules/mcp-usage.md` — when verifying third-party APIs (Context7)
|
|
27
30
|
|
|
28
31
|
Also read matching `.ai.local/rules/*.md` (local overlay) for the active zone, and the project strict rules if present.
|
|
@@ -84,7 +87,7 @@ Before you emit the terminal analysis receipt, self-audit the goal frame and dec
|
|
|
84
87
|
|
|
85
88
|
Record a `## Self-review` block in `brief.md` (goal/AC coverage, evidence, alignment/drift). Optional loop (see the requestable `self-review-and-context-hygiene` contract). In-task self-learning loop: run `node .ai.local/scripts/run.mjs` at the pre-receipt self-review when the engine exists; capture one wrong-turn with `node .ai.local/scripts/signals.mjs --append '<json>'` and inspect read-only with `node .ai.local/scripts/run.mjs --status`. Keep the loop deterministic: it runs no model-driven pass — rule text is template-derived from the validated signature; a model-driven pass is not part of the loop, and if one is ever added it must be default-off and may write only to the staged band. Ratchet: no self-review / context-health pass / re-anchor ceremony for `bounded`/`spike` tasks (or the `light` profile).
|
|
86
89
|
|
|
87
|
-
A self-review defect that changes the output appends one `review-ledger.md` row (`source: self`, `fair: yes`, `disposition: fixed`) before the receipt. Do not start implementation when `goal.md` is missing.
|
|
90
|
+
A self-review defect that changes the output appends one `review-ledger.md` row (`source: self`, `fair: yes`, `disposition: fixed`) before the receipt. Do not start implementation when `goal.md` is missing. Ledger rows go under the canonical header `| id | at | source | summary | fair | disposition | evidence | signature |`; after appending, run `node .ai.local/scripts/team-db.mjs ledger-check --slug <slug>` and fix any header it rejects.
|
|
88
91
|
|
|
89
92
|
## Clarification cycle (must)
|
|
90
93
|
|
|
@@ -20,9 +20,12 @@ This subagent does **not** inherit `opencode.json` `instructions`. Read these ru
|
|
|
20
20
|
- `.opencode/rules/ai-local-overlay.md`
|
|
21
21
|
- `.opencode/rules/architecture-boundaries.md` — layer boundaries and allowed imports
|
|
22
22
|
- `.opencode/rules/feature-delivery-workflow.md` — layer order, mockup gate, ux-design gate
|
|
23
|
+
- `.opencode/rules/anti-hallucination-contract.md` — do not invent signatures, imports, schemas, or evidence
|
|
24
|
+
|
|
25
|
+
Read when the task reaches the matching zone:
|
|
26
|
+
|
|
23
27
|
- `.opencode/rules/reference-features.md` — analog files first
|
|
24
28
|
- `.opencode/rules/anti-sycophancy-discipline.md` — procedural anti-sycophancy rules
|
|
25
|
-
- `.opencode/rules/anti-hallucination-contract.md` — do not invent signatures, imports, schemas, or evidence
|
|
26
29
|
- `.opencode/rules/mcp-usage.md` — when verifying third-party APIs (Context7)
|
|
27
30
|
|
|
28
31
|
Also read matching `.ai.local/rules/*.md` (local overlay) for the active zone, and the project strict rules if present.
|
|
@@ -121,7 +124,7 @@ SoT: `agent-team/task-classification` (shared-core marker above; do not invent a
|
|
|
121
124
|
**L2-lite routing.** When `.ai.local/rules/task-levels.md` selects L2-lite:
|
|
122
125
|
|
|
123
126
|
- keep `profile: standard`; do not set `full` because generated trees, snapshots, CLI goldens, docs, or test fixtures push the raw file count over 10;
|
|
124
|
-
- keep only the risk specialists: `api-contract-reviewer` when the public contract changes, `security-reviewer` when destructive/auth-bearing, `mockup-reviewer` when `app/src/ui/**` changes;
|
|
127
|
+
- keep only the risk specialists: `api-contract-reviewer` when the public contract changes (skipIf no API/DTO diff), `security-reviewer` when destructive/auth-bearing, `mockup-reviewer` when `app/src/ui/**` changes (skipIf no Figma/UI surface);
|
|
125
128
|
- set `humanGates` to exactly `["after:task-analyst"]`; the contract gate and review freeze the design — a second architecture gate needs a real open decision;
|
|
126
129
|
- do not add `solution-architect`, `openspec-author`, or `tech-writer` unless a genuine open decision or install-surface docs require them; fold docs into the developer or one docs step;
|
|
127
130
|
- count substantive files only. Record the L2-lite selection and the machine-checked gate in `routingReasons`.
|
|
@@ -171,7 +174,7 @@ Keep top-level `profile` and emit this top-level object in every new `pipeline.j
|
|
|
171
174
|
|
|
172
175
|
## Adjust steps (when context is clear)
|
|
173
176
|
|
|
174
|
-
- If prompt or `brief.md` contains `figma.com` on `feature` / `refactor` / `spike` / `spec-gen`, insert **mockup-reviewer** after **task-analyst** (when present) and before **solution-architect** and **feature-developer**.
|
|
177
|
+
- If prompt or `brief.md` contains `figma.com` on `feature` / `refactor` / `spike` / `spec-gen`, insert **mockup-reviewer** after **task-analyst** (when present) and before **solution-architect** and **feature-developer**. Do not set `model` on that step: `mockup-reviewer` stays on its cheap frontmatter. Do not add static `humanGates: ["after:mockup-reviewer"]` (FAIL-only hook exception). Never put `mockup-reviewer` in a `parallel: true` step (FAIL-only gate is serial).
|
|
175
178
|
- Classify intent `mockup-review` **before** `ux-design` **before** `review-only`. A `figma.com` URL with review-not-implement language is `mockup-review` even without the word «макет», including when the user said «ревью UX». <!-- i18n-keep: E4 -->
|
|
176
179
|
- If UI stack and (required-signal or advisory UI AC), instruct **task-analyst** to load skill `ux-design` (no new pipeline step; analyst default model, not `strong`). Required-signal: user asked UX, or AC require flows/states, or spec-gen page/feature.
|
|
177
180
|
- If the resolved scope touches UI paths (`app/src/ui/**`, or the repo's component-catalog root) on `feature` / `refactor`, insert **mockup-reviewer** before **feature-developer**. This includes a UI change with no `figma.com` URL; the reviewer then uses the AC / `ux-design.md`. Do not insert it when `profile` is `light` and the prompt has no `figma.com` URL and no required-signal UX AC. A `figma.com` URL still inserts **mockup-reviewer** on every profile, including `light`.
|
|
@@ -204,11 +207,11 @@ Optional per-step field: `"model": "cheap" | "standard" | "strong"`. Omit → ag
|
|
|
204
207
|
|
|
205
208
|
| When | What to write |
|
|
206
209
|
|------|----------------|
|
|
207
|
-
| `profile: light` | set `cheap` on **all** steps (
|
|
210
|
+
| `profile: light` | set `cheap` on **all** steps (exception: unclear bug root cause on `debugger` → `strong`) |
|
|
208
211
|
| `profile: standard` | omit (frontmatter defaults) |
|
|
209
212
|
| `profile: full` | set `strong` on `solution-architect`, `migration-specialist`, `security-reviewer`, `performance-auditor` when present; omit others |
|
|
210
213
|
| `intent: spike` | set `strong` on `solution-architect` (and analyst may stay default/`cheap`) |
|
|
211
|
-
| `intent: perf-audit` /
|
|
214
|
+
| `intent: perf-audit` / security-heavy feature | `strong` on `security-reviewer` / `performance-auditor` when that step exists. `mockup-review` does not set `strong` — `mockup-reviewer` stays cheap |
|
|
212
215
|
| Always | **never** `strong` on `build-verifier`, `tech-writer`, `task-router` |
|
|
213
216
|
|
|
214
217
|
Cursor mapping when orchestrator invokes Task: `cheap` → pass `model: "fast"` if the tool accepts it; `standard`/`strong` → **do not** pass `fast` (rely on agent frontmatter pin / inherit).
|
|
@@ -26,9 +26,12 @@ This subagent does **not** inherit `opencode.json` `instructions`. Read these ru
|
|
|
26
26
|
- `.opencode/rules/ai-local-overlay.md`
|
|
27
27
|
- `.opencode/rules/architecture-boundaries.md` — layer boundaries and allowed imports
|
|
28
28
|
- `.opencode/rules/feature-delivery-workflow.md` — layer order, mockup gate, ux-design gate
|
|
29
|
+
- `.opencode/rules/anti-hallucination-contract.md` — do not invent signatures, imports, schemas, or evidence
|
|
30
|
+
|
|
31
|
+
Read when the task reaches the matching zone:
|
|
32
|
+
|
|
29
33
|
- `.opencode/rules/reference-features.md` — analog files first
|
|
30
34
|
- `.opencode/rules/anti-sycophancy-discipline.md` — procedural anti-sycophancy rules
|
|
31
|
-
- `.opencode/rules/anti-hallucination-contract.md` — do not invent signatures, imports, schemas, or evidence
|
|
32
35
|
- `.opencode/rules/mcp-usage.md` — when verifying third-party APIs (Context7)
|
|
33
36
|
|
|
34
37
|
Also read matching `.ai.local/rules/*.md` (local overlay) for the active zone, and the project strict rules if present.
|
|
@@ -15,12 +15,15 @@ This subagent does **not** inherit `opencode.json` `instructions`. Read these ru
|
|
|
15
15
|
- `.opencode/rules/code-quality-and-refactoring.md`
|
|
16
16
|
- `.opencode/rules/ai-local-overlay.md`
|
|
17
17
|
- `.opencode/rules/architecture-boundaries.md` — layer boundaries and allowed imports
|
|
18
|
+
- `.opencode/rules/anti-hallucination-contract.md` — do not invent signatures, imports, schemas, or evidence
|
|
19
|
+
- `.opencode/rules/tests-unit.md`
|
|
20
|
+
|
|
21
|
+
Read when the task reaches the matching zone:
|
|
22
|
+
|
|
18
23
|
- `.opencode/rules/feature-delivery-workflow.md` — layer order, mockup gate, ux-design gate
|
|
19
24
|
- `.opencode/rules/reference-features.md` — analog files first
|
|
20
25
|
- `.opencode/rules/anti-sycophancy-discipline.md` — procedural anti-sycophancy rules
|
|
21
|
-
- `.opencode/rules/anti-hallucination-contract.md` — do not invent signatures, imports, schemas, or evidence
|
|
22
26
|
- `.opencode/rules/mcp-usage.md` — when verifying third-party APIs (Context7)
|
|
23
|
-
- `.opencode/rules/tests-unit.md`
|
|
24
27
|
- `.opencode/rules/react-next-anti-hallucination.md` — phantom import banlist
|
|
25
28
|
|
|
26
29
|
Also read matching `.ai.local/rules/*.md` (local overlay) for the active zone, and the project strict rules if present.
|
|
@@ -15,12 +15,15 @@ This subagent does **not** inherit `opencode.json` `instructions`. Read these ru
|
|
|
15
15
|
- `.opencode/rules/code-quality-and-refactoring.md`
|
|
16
16
|
- `.opencode/rules/ai-local-overlay.md`
|
|
17
17
|
- `.opencode/rules/architecture-boundaries.md` — layer boundaries and allowed imports
|
|
18
|
+
- `.opencode/rules/anti-hallucination-contract.md` — do not invent signatures, imports, schemas, or evidence
|
|
19
|
+
- `.opencode/rules/tests-unit.md`
|
|
20
|
+
|
|
21
|
+
Read when the task reaches the matching zone:
|
|
22
|
+
|
|
18
23
|
- `.opencode/rules/feature-delivery-workflow.md` — layer order, mockup gate, ux-design gate
|
|
19
24
|
- `.opencode/rules/reference-features.md` — analog files first
|
|
20
25
|
- `.opencode/rules/anti-sycophancy-discipline.md` — procedural anti-sycophancy rules
|
|
21
|
-
- `.opencode/rules/anti-hallucination-contract.md` — do not invent signatures, imports, schemas, or evidence
|
|
22
26
|
- `.opencode/rules/mcp-usage.md` — when verifying third-party APIs (Context7)
|
|
23
|
-
- `.opencode/rules/tests-unit.md`
|
|
24
27
|
- `.opencode/rules/react-next-anti-hallucination.md` — phantom import banlist
|
|
25
28
|
|
|
26
29
|
Also read matching `.ai.local/rules/*.md` (local overlay) for the active zone, and the project strict rules if present.
|
|
@@ -19,12 +19,15 @@ This subagent does **not** inherit `opencode.json` `instructions`. Read these ru
|
|
|
19
19
|
- `.opencode/rules/code-quality-and-refactoring.md`
|
|
20
20
|
- `.opencode/rules/ai-local-overlay.md`
|
|
21
21
|
- `.opencode/rules/architecture-boundaries.md` — layer boundaries and allowed imports
|
|
22
|
+
- `.opencode/rules/anti-hallucination-contract.md` — do not invent signatures, imports, schemas, or evidence
|
|
23
|
+
- `.opencode/rules/tests-unit.md`
|
|
24
|
+
|
|
25
|
+
Read when the task reaches the matching zone:
|
|
26
|
+
|
|
22
27
|
- `.opencode/rules/feature-delivery-workflow.md` — layer order, mockup gate, ux-design gate
|
|
23
28
|
- `.opencode/rules/reference-features.md` — analog files first
|
|
24
29
|
- `.opencode/rules/anti-sycophancy-discipline.md` — procedural anti-sycophancy rules
|
|
25
|
-
- `.opencode/rules/anti-hallucination-contract.md` — do not invent signatures, imports, schemas, or evidence
|
|
26
30
|
- `.opencode/rules/mcp-usage.md` — when verifying third-party APIs (Context7)
|
|
27
|
-
- `.opencode/rules/tests-unit.md`
|
|
28
31
|
- `.opencode/rules/react-next-anti-hallucination.md` — phantom import banlist
|
|
29
32
|
|
|
30
33
|
Also read matching `.ai.local/rules/*.md` (local overlay) for the active zone, and the project strict rules if present.
|
|
@@ -14,7 +14,12 @@ Consumer setting for user-facing dialogue. Change `en` to your BCP-47 tag (e.g.
|
|
|
14
14
|
|
|
15
15
|
<!-- e.g. fragile flows, “never do X in this repo” -->
|
|
16
16
|
|
|
17
|
-
-
|
|
17
|
+
- **Docs-only steps validate with their own validator.** An OpenSpec apply/archive step writes `openspec/**` and
|
|
18
|
+
nothing else: `openspec validate <change> --type change --strict` (runs inside `openspec archive`),
|
|
19
|
+
`openspec validate --specs --strict`, `openspec list`. App lint/type-check/unit/build belong to a step that
|
|
20
|
+
changed `app/**` — never re-run a green app gate for a doc-only step. Exception — archiving before merge: when the
|
|
21
|
+
change's code is not on the base branch yet, the archive step inherits that change's own implementation gates. A
|
|
22
|
+
change folder's `tasks.md` records its implementation phase; it is not a gate definition for later phases.
|
|
18
23
|
|
|
19
24
|
## Patterns
|
|
20
25
|
|
|
@@ -980,11 +980,117 @@ function reconcileStatusFromManifest(agent, step, resolved) {
|
|
|
980
980
|
return status.state;
|
|
981
981
|
}
|
|
982
982
|
|
|
983
|
+
/**
|
|
984
|
+
* Keep only the numeric usage fields and the two provenance fields. A host may
|
|
985
|
+
* forward richer objects; the ledger is allowlisted so nothing unbounded or
|
|
986
|
+
* secret-shaped reaches `metrics.json`.
|
|
987
|
+
*/
|
|
988
|
+
function sanitizeUsage(value) {
|
|
989
|
+
if (!value || typeof value !== 'object' || Array.isArray(value)) return null;
|
|
990
|
+
const num = (input) => (typeof input === 'number' && Number.isFinite(input) && input >= 0 ? input : null);
|
|
991
|
+
const usage = {
|
|
992
|
+
input: num(value.input), output: num(value.output), reasoning: num(value.reasoning),
|
|
993
|
+
cacheRead: num(value.cacheRead === undefined ? value.cached : value.cacheRead),
|
|
994
|
+
cacheWrite: num(value.cacheWrite), costUsd: num(value.costUsd),
|
|
995
|
+
model: typeof value.model === 'string' ? value.model.slice(0, 120) : null,
|
|
996
|
+
origin: value.origin === 'estimated' ? 'estimated' : 'measured',
|
|
997
|
+
};
|
|
998
|
+
const reported = usage.input !== null || usage.output !== null || usage.reasoning !== null ||
|
|
999
|
+
usage.cacheRead !== null || usage.cacheWrite !== null || usage.costUsd !== null;
|
|
1000
|
+
return reported ? usage : null;
|
|
1001
|
+
}
|
|
1002
|
+
|
|
1003
|
+
/**
|
|
1004
|
+
* Freshness of a persisted verification snapshot against the current worktree.
|
|
1005
|
+
* Read-only: closure warns, it never blocks on a stale snapshot.
|
|
1006
|
+
*/
|
|
1007
|
+
function gitSnapshot() {
|
|
1008
|
+
const { spawnSync } = require('child_process');
|
|
1009
|
+
const git = (args) => {
|
|
1010
|
+
const result = spawnSync('git', args, { cwd: process.cwd(), encoding: 'utf8', timeout: 10000, maxBuffer: 32 * 1024 * 1024 });
|
|
1011
|
+
return result && result.status === 0 ? String(result.stdout || '') : null;
|
|
1012
|
+
};
|
|
1013
|
+
const head = git(['rev-parse', 'HEAD']);
|
|
1014
|
+
if (head === null) return null;
|
|
1015
|
+
const branch = git(['rev-parse', '--abbrev-ref', 'HEAD']);
|
|
1016
|
+
const exclude = ['--', '.', ':(exclude).ai.local'];
|
|
1017
|
+
const statusText = git(['status', '--porcelain=v1', ...exclude]) || '';
|
|
1018
|
+
const diffText = git(['diff', '--binary', 'HEAD', ...exclude]) || '';
|
|
1019
|
+
const untracked = git(['ls-files', '--others', '--exclude-standard', ...exclude]) || '';
|
|
1020
|
+
return {
|
|
1021
|
+
head: head.trim(),
|
|
1022
|
+
branch: branch === null ? null : branch.trim(),
|
|
1023
|
+
dirtyFiles: statusText === '' ? 0 : statusText.split('\n').filter((line) => line !== '').length,
|
|
1024
|
+
worktreeHash: crypto.createHash('sha256').update(`${statusText}\u0000${diffText}\u0000${untracked}`).digest('hex'),
|
|
1025
|
+
capturedAt: now,
|
|
1026
|
+
};
|
|
1027
|
+
}
|
|
1028
|
+
|
|
1029
|
+
/**
|
|
1030
|
+
* Seed the evidence file when the verifier finishes without an explicit
|
|
1031
|
+
* `verification.mjs record`: the snapshot plus a hash of `validation-report.md`.
|
|
1032
|
+
* An existing file is never refreshed — its binding must keep pointing at the
|
|
1033
|
+
* tree the commands actually ran on.
|
|
1034
|
+
*/
|
|
1035
|
+
function ensureVerificationSnapshot(dir, agent) {
|
|
1036
|
+
const file = path.join(dir, 'verification.json');
|
|
1037
|
+
if (fs.existsSync(file)) return;
|
|
1038
|
+
const snapshot = gitSnapshot();
|
|
1039
|
+
if (!snapshot) return;
|
|
1040
|
+
const reportPath = path.join(dir, 'validation-report.md');
|
|
1041
|
+
let report = null;
|
|
1042
|
+
try {
|
|
1043
|
+
const text = fs.readFileSync(reportPath);
|
|
1044
|
+
report = { path: 'validation-report.md', sha256: crypto.createHash('sha256').update(text).digest('hex') };
|
|
1045
|
+
} catch {}
|
|
1046
|
+
const verification = {
|
|
1047
|
+
schemaVersion: 1,
|
|
1048
|
+
task: path.basename(dir),
|
|
1049
|
+
snapshot,
|
|
1050
|
+
report,
|
|
1051
|
+
commands: [],
|
|
1052
|
+
gate: { status: 'snapshot-only', recordedBy: agent || null, checkedAt: now },
|
|
1053
|
+
};
|
|
1054
|
+
const temporary = `${file}.${process.pid}.tmp`;
|
|
1055
|
+
fs.writeFileSync(temporary, JSON.stringify(verification, null, 2) + '\n');
|
|
1056
|
+
fs.renameSync(temporary, file);
|
|
1057
|
+
appendMetric({ type: 'verification_recorded', at: now, kind: 'snapshot-only', agent: agent || null, head: snapshot.head, worktreeHash: snapshot.worktreeHash, source: 'hook', attributionConfidence: 'high' });
|
|
1058
|
+
}
|
|
1059
|
+
|
|
1060
|
+
function verificationFreshness(dir) {
|
|
1061
|
+
const file = path.join(dir, 'verification.json');
|
|
1062
|
+
if (!fs.existsSync(file)) return { present: false };
|
|
1063
|
+
let verification;
|
|
1064
|
+
try { verification = JSON.parse(fs.readFileSync(file, 'utf8')); } catch { return { present: true, fresh: false, reasons: ['unreadable'] }; }
|
|
1065
|
+
const snapshot = verification && verification.snapshot;
|
|
1066
|
+
if (!snapshot || typeof snapshot.head !== 'string') return { present: true, fresh: false, reasons: ['no-snapshot'] };
|
|
1067
|
+
const current = gitSnapshot();
|
|
1068
|
+
if (!current) return { present: true, fresh: false, reasons: ['no-git'] };
|
|
1069
|
+
const reasons = [];
|
|
1070
|
+
if (current.head !== snapshot.head) reasons.push('head-changed');
|
|
1071
|
+
if (current.worktreeHash !== snapshot.worktreeHash) reasons.push('worktree-changed');
|
|
1072
|
+
return { present: true, fresh: reasons.length === 0, reasons };
|
|
1073
|
+
}
|
|
1074
|
+
|
|
1075
|
+
let verificationStaleNoted = false;
|
|
1076
|
+
|
|
1077
|
+
function noteVerificationFreshness(dir, agent) {
|
|
1078
|
+
if (verificationStaleNoted) return;
|
|
1079
|
+
const freshness = verificationFreshness(dir);
|
|
1080
|
+
if (!freshness.present) return;
|
|
1081
|
+
if (freshness.fresh) return;
|
|
1082
|
+
verificationStaleNoted = true;
|
|
1083
|
+
appendMetric({ type: 'verification_stale', at: now, agent: agent || null, reasons: freshness.reasons, source: 'hook', attributionConfidence: 'high' });
|
|
1084
|
+
process.stderr.write(`verification evidence is stale (${freshness.reasons.join(', ')}); re-run the gate and record it before closure\n`);
|
|
1085
|
+
}
|
|
1086
|
+
|
|
983
1087
|
function finishActiveAttempt(forced) {
|
|
984
1088
|
const resolved = forced || resolvedAttempt(); if (!resolved) return null;
|
|
985
1089
|
const durationMs = Date.parse(now) - Date.parse(resolved.entry.startedAt);
|
|
986
1090
|
const outcome = ['completed', 'blocked', 'changes_requested', 'validation_failed'].includes(status.state) ? status.state : 'unknown';
|
|
987
|
-
|
|
1091
|
+
const usage = sanitizeUsage(hookInput.usage);
|
|
1092
|
+
appendMetric({ type: 'attempt_finished', at: now, attemptId: resolved.attemptId, outcome, durationMs: Number.isFinite(durationMs) && durationMs >= 0 ? durationMs : null, retryAfterFix: status.retryAfterFix || null, source: resolved.source || 'hook', attributionConfidence: resolved.confidence, ...(usage ? { usage } : {}) });
|
|
1093
|
+
if (resolved.entry && resolved.entry.agent === 'build-verifier') { ensureVerificationSnapshot(taskDir, resolved.entry.agent); noteVerificationFreshness(taskDir, resolved.entry.agent); }
|
|
988
1094
|
const active = { ...(status.activeAttempts || {}) }; delete active[resolved.attemptId]; status.activeAttempts = active; status.lastCompletedAttempt = { attemptId: resolved.attemptId, completedAt: now }; return { ...resolved, outcome };
|
|
989
1095
|
}
|
|
990
1096
|
function missingConsumerArtifacts() {
|
|
@@ -1014,6 +1120,7 @@ function completePipeline(statusPatch) {
|
|
|
1014
1120
|
// task_completed is written only on this branch. A missing receipt blocks
|
|
1015
1121
|
// above and must not be counted as a finished task.
|
|
1016
1122
|
status.state = 'completed';
|
|
1123
|
+
noteVerificationFreshness(taskDir, null);
|
|
1017
1124
|
completeTaskMetrics();
|
|
1018
1125
|
writeStatus(statusPatch);
|
|
1019
1126
|
out(`Pipeline complete for "${slug}". Run /technical-retro ${slug}.`);
|