@tyroneross/build-loop 0.36.0 → 0.43.0
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/.agents/plugins/marketplace.json +2 -2
- package/.claude-plugin/marketplace.json +3 -3
- package/.claude-plugin/plugin.json +1 -1
- package/.codex-plugin/plugin.json +1 -1
- package/.cursor/rules/build-loop-surface.mdc +12 -11
- package/.cursor/rules/skill-index.mdc +33 -0
- package/AGENTS.md +213 -34
- package/README.md +99 -31
- package/agents/advisor.md +4 -4
- package/agents/alignment-checker.md +2 -2
- package/agents/architecture-scout.md +4 -4
- package/agents/build-orchestrator.md +38 -36
- package/agents/database-assessor.md +11 -5
- package/agents/design-contract-specialist.md +8 -8
- package/agents/fact-checker.md +13 -3
- package/agents/fix-critique.md +2 -2
- package/agents/independent-auditor.md +60 -7
- package/agents/leak-scanner.md +82 -0
- package/agents/overfitting-reviewer.md +2 -2
- package/agents/plan-critic.md +1 -1
- package/agents/promotion-reviewer.md +5 -5
- package/agents/retrospective-synthesizer.md +138 -35
- package/agents/scope-auditor.md +82 -11
- package/agents/security-reviewer.md +56 -2
- package/agents/self-improvement-architect.md +17 -3
- package/agents/transcript-pattern-miner.md +5 -5
- package/agents/ui-validator.md +1 -1
- package/bin/build-loop-debugger.js +143 -0
- package/bin/build-loop-install.js +1 -4
- package/bin/build-loop-load-probe.js +345 -0
- package/codex-skills/build-loop/SKILL.md +28 -6
- package/commands/feedback.md +37 -0
- package/dist/src/interactive-verifier.d.ts +1 -14
- package/dist/src/interactive-verifier.d.ts.map +1 -1
- package/dist/src/interactive-verifier.js +6 -113
- package/dist/src/interactive-verifier.js.map +1 -1
- package/dist/src/quality.d.ts +5 -0
- package/dist/src/quality.d.ts.map +1 -0
- package/dist/src/quality.js +81 -0
- package/dist/src/quality.js.map +1 -0
- package/dist/src/storage.d.ts.map +1 -1
- package/dist/src/storage.js +37 -3
- package/dist/src/storage.js.map +1 -1
- package/docs/agent-surface-policy.md +35 -31
- package/docs/memory-setup.md +19 -0
- package/hooks/git/pre-push +65 -4
- package/hooks/hooks.json +95 -38
- package/hooks/pre-commit +20 -1
- package/hooks/pre-edit-rally-point.sh +10 -3
- package/hooks/session-start-codex-hook-trust.sh +30 -0
- package/hooks/session-start-git-hooks.sh +3 -1
- package/hooks/session-start-rally-point.sh +52 -4
- package/hooks/session-start-worktree-gc.sh +47 -94
- package/hooks/stop-transcript-sweep.sh +173 -0
- package/hooks/test_closeout.sh +14 -2
- package/package.json +8 -7
- package/scripts/README.md +1 -1
- package/scripts/_paths.py +65 -0
- package/scripts/groundwork_exchange.py +1012 -0
- package/scripts/install_memory.py +33 -1
- package/scripts/lessons_index/ingest.py +13 -2
- package/scripts/lessons_index/query.py +36 -13
- package/scripts/memory_context/__init__.py +108 -14
- package/scripts/memory_graph/__init__.py +5 -1
- package/scripts/project_resolver.py +42 -36
- package/scripts/sync_plugin_cache.py +37 -2
- package/skills/agent-rally-point/SKILL.md +46 -0
- package/skills/api-registry-bridge/SKILL.md +1 -1
- package/skills/architecture/dead/SKILL.md +1 -1
- package/skills/architecture/impact/SKILL.md +1 -1
- package/skills/architecture/review/SKILL.md +1 -1
- package/skills/architecture/rules/SKILL.md +3 -3
- package/skills/architecture/scan/SKILL.md +1 -1
- package/skills/architecture/trace/SKILL.md +1 -1
- package/skills/attribution-standard/SKILL.md +6 -6
- package/skills/auto-decision-capture/SKILL.md +31 -2
- package/skills/auto-finding-capture/SKILL.md +28 -1
- package/skills/build-loop/SKILL.md +131 -23
- package/skills/build-loop/fallbacks.md +16 -21
- package/skills/build-loop/phases/ui-validation.md +2 -2
- package/skills/build-loop/references/advisor-dispatch-ladder.md +1 -1
- package/skills/build-loop/references/apple-native-planning.md +1 -1
- package/skills/build-loop/references/autonomous-and-per-commit-modes.md +11 -5
- package/skills/build-loop/references/autonomy-dashboard.md +115 -0
- package/skills/build-loop/references/capability-routing.md +24 -2
- package/skills/build-loop/references/coordination.md +24 -6
- package/skills/build-loop/references/experiment-results-template.md +15 -3
- package/skills/build-loop/references/leadership.md +1 -1
- package/skills/build-loop/references/memory.md +14 -3
- package/skills/build-loop/references/modular-systems-pack.md +8 -0
- package/skills/build-loop/references/output-style.md +86 -0
- package/skills/build-loop/references/phase-1-assess.md +102 -2
- package/skills/build-loop/references/phase-2-plan.md +9 -1
- package/skills/build-loop/references/phase-3-execute.md +5 -2
- package/skills/build-loop/references/phase-4-review.md +85 -8
- package/skills/build-loop/references/phase-5-iterate.md +76 -8
- package/skills/build-loop/references/phase-6-learn.md +10 -17
- package/skills/build-loop/references/privileged-request-broker.md +254 -0
- package/skills/build-loop/references/resource-aware-execution.md +183 -0
- package/skills/build-loop/references/self-recursive-dev.md +2 -2
- package/skills/build-loop/references/status-output-format.md +207 -0
- package/skills/build-loop/references/verify-dispatch.md +56 -2
- package/skills/building-with-deepagents/SKILL.md +1 -1
- package/skills/claim-scope/SKILL.md +185 -0
- package/skills/color-engine/SKILL.md +103 -0
- package/skills/color-engine/_core.py +464 -0
- package/skills/color-engine/color_engine.py +175 -0
- package/skills/cost-rca/SKILL.md +61 -0
- package/skills/data-plane-worktrees/SKILL.md +139 -0
- package/skills/data-plane-worktrees/agents/openai.yaml +4 -0
- package/skills/database-practice/SKILL.md +200 -0
- package/skills/database-practice/references/diagnostic-queries.sql +126 -0
- package/skills/database-practice/references/vector-and-graph-tuning.md +208 -0
- package/skills/database-practice/scripts/db_table_map.py +1244 -0
- package/skills/database-practice/scripts/test_db_table_map.py +514 -0
- package/skills/debug-loop/SKILL.md +36 -6
- package/skills/debugging-memory/SKILL.md +32 -430
- package/skills/debugging-memory/references/pattern-extraction.md +4 -4
- package/skills/debugging-memory/references/search.md +32 -120
- package/skills/debugging-memory/references/store.md +32 -126
- package/skills/debugging-memory/references/subagent-integration.md +1 -1
- package/skills/decision-queue/SKILL.md +251 -0
- package/skills/decision-queue/assets/template.html +1242 -0
- package/skills/decision-queue/references/example-large-queue-batching.md +164 -0
- package/skills/decision-queue/scripts/regen_template_constants.py +160 -0
- package/skills/defenseclaw-bridge/SKILL.md +2 -2
- package/skills/defenseclaw-bridge/references/dc-config-mapping.md +2 -9
- package/skills/drain-proposals/SKILL.md +53 -0
- package/skills/focused-loop-builder/SKILL.md +31 -0
- package/skills/focused-loop-builder/references/spec-format.md +27 -0
- package/skills/handoff/SKILL.md +169 -8
- package/skills/ibr-bridge/SKILL.md +4 -1
- package/skills/knowledge/SKILL.md +26 -14
- package/skills/knowledge/references/review-mode.md +2 -3
- package/skills/knowledge/templates/madr-minimal.md +1 -1
- package/skills/mcp-builder/SKILL.md +1 -1
- package/skills/model-bakeoff/SKILL.md +48 -10
- package/skills/model-tiering/SKILL.md +92 -31
- package/skills/native-ax-driver/SKILL.md +38 -5
- package/skills/native-ax-driver/scripts/native_driver.py +278 -22
- package/skills/native-ax-driver/scripts/test_native_driver.py +227 -0
- package/skills/optimize/SKILL.md +1 -1
- package/skills/plugin-builder/SKILL.md +48 -1
- package/skills/plugin-builder/references/build-loop-phase-guidance.md +3 -4
- package/skills/plugin-builder/references/distribution.md +13 -2
- package/skills/plugin-builder/references/plugin-hygiene-lessons.md +2 -2
- package/skills/plugin-tests/SKILL.md +2 -2
- package/skills/recursive-retrospective/SKILL.md +1 -1
- package/skills/repo-closeout/SKILL.md +17 -0
- package/skills/repo-closeout/agents/openai.yaml +4 -0
- package/skills/repo-maintenance/SKILL.md +179 -0
- package/skills/repo-maintenance/agents/openai.yaml +4 -0
- package/skills/repo-maintenance/references/pre-public-hygiene.md +134 -0
- package/skills/repo-maintenance/references/repository-taxonomy.md +161 -0
- package/skills/repo-maintenance/references/safety-protocol.md +106 -0
- package/skills/repo-maintenance/references/stack-profiles.md +138 -0
- package/skills/repo-maintenance/scripts/audit_repo_maintenance.py +1198 -0
- package/skills/repo-maintenance/scripts/test_audit_repo_maintenance.py +506 -0
- package/skills/repository-intelligence/SKILL.md +189 -0
- package/skills/repository-intelligence/agents/openai.yaml +4 -0
- package/skills/repository-intelligence/references/assessment-rubric.md +88 -0
- package/skills/repository-intelligence/scripts/repository_inventory.py +347 -0
- package/skills/research/SKILL.md +12 -2
- package/skills/root-cause-analysis/SKILL.md +1 -1
- package/skills/runtime-parity-verification/SKILL.md +36 -1
- package/skills/security-methodology/SKILL.md +23 -10
- package/skills/security-methodology/references/agentic-handoff-templates.md +220 -0
- package/skills/security-methodology/references/cross-source-matrix.md +1 -1
- package/skills/security-methodology/references/owasp-agentic-top-10.md +1 -1
- package/skills/security-scan/SKILL.md +55 -15
- package/skills/self-improve/SKILL.md +70 -50
- package/skills/silent-assumptions/SKILL.md +341 -0
- package/skills/silent-assumptions/references/elicitation-detectors.md +342 -0
- package/skills/spec-writing/SKILL.md +128 -24
- package/skills/spec-writing/scripts/check_checklist.py +114 -15
- package/skills/ui-design/SKILL.md +6 -4
- package/skills/ui-design/references/color-engine.md +132 -0
- package/skills/ui-design/references/design-preferences-from-owned-apps.md +8 -8
- package/skills/ui-design/references/ui-guidance-sources.md +1 -1
- package/skills/ui-design/references/universal-design-principles.alt.md +2 -2
- package/plugin-artifacts/codex/.codex-plugin/plugin.json +0 -41
- package/plugin-artifacts/codex/AGENTS.md +0 -560
- package/plugin-artifacts/codex/BUILD-ARTIFACT.md +0 -5
- package/plugin-artifacts/codex/LICENSE +0 -202
- package/plugin-artifacts/codex/README.md +0 -313
- package/plugin-artifacts/codex/assets/build-loop-plugin-icon.png +0 -0
- package/plugin-artifacts/codex/docs/agent-surface-policy.md +0 -63
- package/plugin-artifacts/codex/references/advisor-dispatch-ladder.md +0 -62
- package/plugin-artifacts/codex/references/agent-role-taxonomy.md +0 -135
- package/plugin-artifacts/codex/references/autonomous-and-per-commit-modes.md +0 -161
- package/plugin-artifacts/codex/references/autonomy-config.md +0 -231
- package/plugin-artifacts/codex/references/backlog-system.md +0 -285
- package/plugin-artifacts/codex/references/capability-routing.md +0 -231
- package/plugin-artifacts/codex/references/codex-subagents.md +0 -106
- package/plugin-artifacts/codex/references/coordination-file-template.md +0 -181
- package/plugin-artifacts/codex/references/coordination-rules.md +0 -552
- package/plugin-artifacts/codex/references/dogfood-reload-checkpoint.md +0 -112
- package/plugin-artifacts/codex/references/halt-and-ask-protocol.md +0 -102
- package/plugin-artifacts/codex/references/implementer-envelope-schema.md +0 -302
- package/plugin-artifacts/codex/references/intent-capability-pack.md +0 -257
- package/plugin-artifacts/codex/references/intent-exploration-prompts.md +0 -96
- package/plugin-artifacts/codex/references/leadership.md +0 -72
- package/plugin-artifacts/codex/references/memory-systems.md +0 -261
- package/plugin-artifacts/codex/references/memory.md +0 -313
- package/plugin-artifacts/codex/references/model-tier-mapping.md +0 -296
- package/plugin-artifacts/codex/references/modular-systems-pack.md +0 -96
- package/plugin-artifacts/codex/references/phase-1-assess.md +0 -249
- package/plugin-artifacts/codex/references/phase-2-plan.md +0 -86
- package/plugin-artifacts/codex/references/phase-3-execute.md +0 -49
- package/plugin-artifacts/codex/references/phase-4-review.md +0 -341
- package/plugin-artifacts/codex/references/phase-5-iterate.md +0 -72
- package/plugin-artifacts/codex/references/phase-6-learn.md +0 -58
- package/plugin-artifacts/codex/references/recent-design-structures.md +0 -274
- package/plugin-artifacts/codex/references/research-trigger-policy.md +0 -140
- package/plugin-artifacts/codex/references/runtime-smoke-triggers.md +0 -42
- package/plugin-artifacts/codex/references/self-review.md +0 -234
- package/plugin-artifacts/codex/references/single-writer-commit-protocol.md +0 -90
- package/plugin-artifacts/codex/references/task-capture-policy.md +0 -68
- package/plugin-artifacts/codex/references/ui-io-contract.md +0 -116
- package/plugin-artifacts/codex/references/ui-spotcheck-protocol.md +0 -65
- package/plugin-artifacts/codex/references/verify-dispatch.md +0 -85
- package/plugin-artifacts/codex/skills/build-loop/SKILL.md +0 -381
- package/plugin-artifacts/codex/skills/build-loop/detect-plugins.mjs +0 -82
- package/plugin-artifacts/codex/skills/build-loop/eval-guide.md +0 -65
- package/plugin-artifacts/codex/skills/build-loop/fallbacks.md +0 -549
- package/plugin-artifacts/codex/skills/build-loop/phases/fact-check.md +0 -42
- package/plugin-artifacts/codex/skills/build-loop/phases/ui-validation.md +0 -267
- package/plugin-artifacts/codex/skills/build-loop/references/advisor-dispatch-ladder.md +0 -62
- package/plugin-artifacts/codex/skills/build-loop/references/apple-native-planning.md +0 -439
- package/plugin-artifacts/codex/skills/build-loop/references/autonomous-and-per-commit-modes.md +0 -161
- package/plugin-artifacts/codex/skills/build-loop/references/capability-routing.md +0 -231
- package/plugin-artifacts/codex/skills/build-loop/references/codex-subagents.md +0 -106
- package/plugin-artifacts/codex/skills/build-loop/references/coordination.md +0 -161
- package/plugin-artifacts/codex/skills/build-loop/references/correction-aware-capture.md +0 -177
- package/plugin-artifacts/codex/skills/build-loop/references/experiment-results-template.md +0 -101
- package/plugin-artifacts/codex/skills/build-loop/references/independent-auditor.md +0 -72
- package/plugin-artifacts/codex/skills/build-loop/references/intent-capability-pack.md +0 -257
- package/plugin-artifacts/codex/skills/build-loop/references/intent-exploration-prompts.md +0 -96
- package/plugin-artifacts/codex/skills/build-loop/references/leadership.md +0 -72
- package/plugin-artifacts/codex/skills/build-loop/references/memory.md +0 -313
- package/plugin-artifacts/codex/skills/build-loop/references/modular-systems-pack.md +0 -96
- package/plugin-artifacts/codex/skills/build-loop/references/output-style.md +0 -222
- package/plugin-artifacts/codex/skills/build-loop/references/pay-it-forward-arch.md +0 -98
- package/plugin-artifacts/codex/skills/build-loop/references/phase-1-assess.md +0 -249
- package/plugin-artifacts/codex/skills/build-loop/references/phase-2-plan.md +0 -86
- package/plugin-artifacts/codex/skills/build-loop/references/phase-3-execute.md +0 -49
- package/plugin-artifacts/codex/skills/build-loop/references/phase-4-review.md +0 -341
- package/plugin-artifacts/codex/skills/build-loop/references/phase-5-iterate.md +0 -72
- package/plugin-artifacts/codex/skills/build-loop/references/phase-6-learn.md +0 -58
- package/plugin-artifacts/codex/skills/build-loop/references/recent-design-structures.md +0 -274
- package/plugin-artifacts/codex/skills/build-loop/references/refactor-history/ASSESSMENT.md +0 -85
- package/plugin-artifacts/codex/skills/build-loop/references/refactor-history/STANDALONE_TEST_RUN.md +0 -149
- package/plugin-artifacts/codex/skills/build-loop/references/refactor-history/scenarios/01-simple-bugfix.md +0 -32
- package/plugin-artifacts/codex/skills/build-loop/references/refactor-history/scenarios/02-ui-build-with-iteration.md +0 -48
- package/plugin-artifacts/codex/skills/build-loop/references/refactor-history/scenarios/03-multi-failure-escalation.md +0 -60
- package/plugin-artifacts/codex/skills/build-loop/references/refactor-history/scenarios/04-ui-build-ibr-absent.md +0 -51
- package/plugin-artifacts/codex/skills/build-loop/references/refactor-history/scenarios/05-refactor-navgator-absent.md +0 -71
- package/plugin-artifacts/codex/skills/build-loop/references/refactor-history/scenarios/06-recurring-bug-debugger-absent.md +0 -52
- package/plugin-artifacts/codex/skills/build-loop/references/refactor-history/trace-comparison.md +0 -202
- package/plugin-artifacts/codex/skills/build-loop/references/self-recursive-dev.md +0 -77
- package/plugin-artifacts/codex/skills/build-loop/references/self-review.md +0 -234
- package/plugin-artifacts/codex/skills/build-loop/references/ui-io-contract.md +0 -116
- package/plugin-artifacts/codex/skills/build-loop/references/verify-dispatch.md +0 -85
- package/plugin-artifacts/codex/skills/build-loop/scanners/audit-design-rules.mjs +0 -476
- package/plugin-artifacts/codex/skills/build-loop/scanners/require-visual-evidence.mjs +0 -239
- package/plugin-artifacts/codex/skills/build-loop/templates/backlog-item.md +0 -35
- package/plugin-artifacts/codex/skills/build-loop/templates/codex-worker-prompt.md +0 -100
- package/plugin-artifacts/codex/skills/build-loop/templates/ui-subagent-prompt.md +0 -179
- package/plugin-artifacts/codex/skills/build-loop/templates/ux-fix-plan.md +0 -40
- package/scripts/build_codex_plugin_artifact.py +0 -321
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: model-tiering
|
|
3
|
-
description:
|
|
3
|
+
description: Recommend which model tier (e.g. Opus/Sonnet/Haiku) to use for a subagent or task. Use when the user asks "which model should I use", "is Sonnet enough or do I need Opus", or sets a segment+tier in agent frontmatter. Not for running multiple models head-to-head and scoring them (use `model-bakeoff`).
|
|
4
4
|
user-invocable: false
|
|
5
5
|
---
|
|
6
6
|
|
|
@@ -26,25 +26,57 @@ Agents declare a `(segment, tier)` ROLE; the resolver (`scripts/model_resolver.p
|
|
|
26
26
|
|
|
27
27
|
| Tier | Anthropic default | Role | Equivalents (advisory — verify benchmarks before swapping) |
|
|
28
28
|
|---|---|---|---|
|
|
29
|
-
| **Frontier** |
|
|
30
|
-
| **Thinking** | Opus
|
|
31
|
-
| **Code** | Sonnet 5 | Application — apply rule to bounded input, scoped implementation, mechanical refactor, bounded domain assessment | GPT-5
|
|
32
|
-
| **Pattern** | Haiku 4.5 | Recognition — regex/syntactic match, classification into known buckets, log scan, deterministic checklist |
|
|
29
|
+
| **Frontier** | Opus 5 | **Phase 2 Plan synthesis via the Advisor dispatch ladder when stakes-gated**, plus every gating verification agent (`plan-critic`, `independent-auditor`, `security-reviewer`). Fable is the SECOND T1 entry, reached only via `scripts/frontier_gate.py` for planning on tightly-coupled repos | GPT-5.6 Sol; future models that clear the Thinking-tier contract and prior ceiling |
|
|
30
|
+
| **Thinking** | Opus 5 | Coordination and escalation, plus medium-risk verification (`scope-auditor`, `fact-checker`, `fix-critique`, `overfitting-reviewer`, `promotion-reviewer`) | GPT-5.6 Terra for routine orchestration; GPT-5.6 Sol for the Governance/Evaluation T2 cell and genuinely ambiguous escalation |
|
|
31
|
+
| **Code** | Sonnet 5 | Application — apply rule to bounded input, scoped implementation, mechanical refactor, bounded domain assessment | GPT-5.6 Terra, qwen2.5-coder-32B (local); any model within the Code-tier benchmark tolerance |
|
|
32
|
+
| **Pattern** | Haiku 4.5 | Recognition — regex/syntactic match, classification into known buckets, log scan, deterministic checklist | GPT-5.6 Luna, Haiku-class or local small/fast models that handle bounded structured work |
|
|
33
33
|
|
|
34
34
|
**Rule of substitution:** tier A's swap target must score within tolerance of the default on the benchmark relevant to its role. For Code tier that's SWE-bench Verified ≥75% AND tool-use accuracy ≥85%; for Thinking tier that's SWE-bench ≥78% AND ARC-AGI / GPQA Diamond competitive; for Frontier tier that's clearing the Thinking-tier contract AND scoring above the prior-generation Thinking-tier ceiling on at least one of SWE-bench Verified / ARC-AGI / GPQA Diamond; for Pattern tier no benchmark — just "fast and cheap, doesn't hallucinate on bounded structured tasks."
|
|
35
35
|
|
|
36
36
|
**Why Frontier sits above Thinking for plan + verification (and not for execution):** wrong plans and wrong verdicts compound — a bad plan dispatches N implementers into the wrong work, and a bad verdict ships a regression. The user's standing priority is Accuracy > Speed > Cost (`feedback_accuracy_speed_cost_priority.md`), so the planning and verification surfaces — where one miscall poisons everything downstream — pay the Frontier premium. Execution and coordination stay on Sonnet/Opus because they're either bounded application (Sonnet implementer applies a settled plan) or routing (Opus orchestrator chooses which subagent runs next, with deterministic gates as the safety net).
|
|
37
37
|
|
|
38
|
+
## Harness amplifies, does not replace, model capability
|
|
39
|
+
|
|
40
|
+
A better harness (scaffold, tool-set, context budget, verify loop) lifts a weak model *up to* its capability ceiling — it does not push the model *past* it. Treat the harness as a large, routinely-undervalued multiplier, not a substitute for tier. The evidence:
|
|
41
|
+
|
|
42
|
+
- **Variance decomposition** over 25k+ agent runs / 8 domains attributes ~41.4% of outcome variance to base-model reasoning vs ~1.5% to scaffold (a ~28:1 ratio) — the ceiling is a model property.
|
|
43
|
+
- **SWE-agent** raised the *same* GPT-4 Turbo from 3.8% (RAG pipeline) to 12.5% (ACI scaffold) — a 3.3× harness lift, yet still only 12.5% *absolute*. A weak base stays absolutely unreliable on hard tasks no matter the harness.
|
|
44
|
+
- Internal dogfood corroboration: after a transport/parser fix unblocked a small local model's tool calls (0→8 parsed), the *model* ceiling remained — it still could not produce compiling Rust.
|
|
45
|
+
|
|
46
|
+
**Routing consequence (keep as-is):** route hard, open-ended reasoning UP to the frontier tier; route bounded, oracle-checkable work DOWN to local/small models. Do NOT invest harness effort expecting a small/local model to clear reasoning-heavy tasks — that is a ceiling failure, not a scaffold failure, and no amount of harness engineering fixes it. When a reliability failure appears (agent lies about success, doesn't follow through, unsafe action), route to harness/verify/guardrail fixes, not to a bigger prompt or a smaller-model-plus-better-scaffold gamble.
|
|
47
|
+
|
|
48
|
+
Source: `build-loop-memory/research/2026-07-06-ai-coding-fundamentals-and-harness-claims.md` (Claim 4 — "MIXED, leaning CHALLENGE on the strong form"; variance-decomposition + SWE-agent + internal ledger).
|
|
49
|
+
|
|
38
50
|
## Provider-swap recipe
|
|
39
51
|
|
|
40
52
|
Build-loop's agent frontmatter uses Anthropic model aliases (`fable`, `opus`, `sonnet`, `haiku`) because Claude Code is the primary host. To run on a different provider:
|
|
41
53
|
|
|
42
54
|
1. **Edit the INDEX, not each agent.** `model:` frontmatter is index-DERIVED (generated by `scripts/sync_agent_model_defaults.py`), so do not hand-edit it. To swap providers, reorder the preferred list / change the default for the `(segment, tier)` cell in `references/model-taxonomy.json` (or classify a new model once via `scripts/classify_model_tier.py`), then run `python3 scripts/sync_agent_model_defaults.py --apply` to regenerate every agent's `model:`. The role's `(segment, tier)` is the durable key; the tier determines the substitution target.
|
|
43
|
-
2. **Runtime override:** `.build-loop/config.json.modelOverrides` accepts `{ frontier: "<id>", thinking: "<id>", code: "<id>", pattern: "<id>" }`. The orchestrator resolves this through `scripts/model_overrides.py` before dispatching subagents (see `references/model-tier-mapping.md` for full schema). Configs without `frontier` resolve frontier →
|
|
55
|
+
2. **Runtime override:** `.build-loop/config.json.modelOverrides` accepts `{ frontier: "<id>", thinking: "<id>", code: "<id>", pattern: "<id>" }`. The orchestrator resolves this through `scripts/model_overrides.py` before dispatching subagents (see `references/model-tier-mapping.md` for full schema). Configs without `frontier` resolve frontier → the T1 default (`opus`).
|
|
44
56
|
3. **Per-dispatch override:** any orchestrator dispatch may pass `model: <id>` in the subagent prompt to force that call.
|
|
45
57
|
|
|
46
58
|
The role-and-task table below uses tier names. The Anthropic-default mapping in the right column is illustrative; substitute your equivalents at swap time.
|
|
47
59
|
|
|
60
|
+
### Groq workload catalog (on demand)
|
|
61
|
+
|
|
62
|
+
When the task asks which Groq API model or system should run a downstream workload, read both `references/provider-catalogs/groq.md` and `references/provider-catalogs/groq-models.json`. The first contains dated decision guidance; the second is the machine-readable snapshot and freshness contract.
|
|
63
|
+
|
|
64
|
+
Keep this separate from host-agent reachability. A Groq catalog entry does not become an available Build Loop subagent model until a host adapter works and the model clears the role-specific benchmark. Reverify the catalog after its `review_after` date, on any deprecation change, and before production billing or capacity decisions because availability, pricing, rate limits, advertised throughput, and capability compatibility are dynamic.
|
|
65
|
+
|
|
66
|
+
### GPT-5.6 Codex policy
|
|
67
|
+
|
|
68
|
+
- **Sol** is approved for planning synthesis and gating verification agents: `advisor`, `plan-critic`, `scope-auditor`, `independent-auditor`, `fix-critique`, `fact-checker`, `security-reviewer`, `overfitting-reviewer`, and `promotion-reviewer`.
|
|
69
|
+
- **Terra** is approved for ordinary orchestration, bounded implementation, domain assessment, advisory review, and Learn drafting. It is the Codex default for `build-orchestrator`, `assessment-orchestrator`, and `implementer`.
|
|
70
|
+
- **Luna** is approved for bounded recognition agents: `mock-scanner`, `recurring-pattern-detector`, and `transcript-pattern-miner`. Prefer a deterministic script when the rule is fully expressible.
|
|
71
|
+
- Start bounded coding and execution at Terra `high`; this is an advisory default and explicit per-dispatch effort remains valid. Start Luna at `low|medium` and Sol at `medium` (`high` for adversarial/security verdicts). Use `xhigh` only after evidence of a miss; reserve `max` and Ultra for rare cases with justified consequence or meaningful independent streams.
|
|
72
|
+
- The live resolver returns `preferred_effort` and `effort_guidance` with every agent resolution. Dispatchers must record requested versus actual effort and the verifier result before promoting a workload to `xhigh` or `max`.
|
|
73
|
+
- **Claude:** Sonnet, Opus, and Fable start at `high`; step to `xhigh` only after a verifier records a quality miss, then evaluate `max` only when the added quality warrants it. Haiku exposes no effort control, so keep it on bounded recognition work and escalate the model rather than inventing an effort retry.
|
|
74
|
+
- Escalate Luna→Terra when rule application appears; Terra→Sol when ambiguity, high consequence, or repeated verified failure appears. Model size never weakens least privilege, confirmation, sandboxing, or independent verification.
|
|
75
|
+
|
|
76
|
+
Source: OpenAI GPT-5.6 System Card (2026-07-09), retained in build-loop-memory with the full PDF and routing extract.
|
|
77
|
+
|
|
78
|
+
**Claude exception:** `scope-auditor`, `fact-checker`, `fix-critique`, `overfitting-reviewer`, and `promotion-reviewer` use Opus at medium effort. `plan-critic`, `independent-auditor`, and `security-reviewer` moved to Opus on 2026-07-28 (commit `5e0122a`) — Fable is no longer the default for any verification role. The Codex mapping remains Sol for every gating verification agent.
|
|
79
|
+
|
|
48
80
|
## Chat-triggered index maintenance (host-LLM-driven)
|
|
49
81
|
|
|
50
82
|
The model index (`references/model-taxonomy.json`) is **user-editable and chat-maintainable**. When the user expresses model intent in conversation, recognize it and act on the index directly — this is host-LLM-driven per the repo's "host coding agent is the LLM" rule: you recognize the intent and run deterministic scripts; there is NO vendor API call and NO hard hook. (A `UserPromptSubmit` hook that pre-detects these phrasings is an OPTIONAL future hardening, not required — the LLM recognizing intent is the mechanism.)
|
|
@@ -83,7 +115,7 @@ Dispatch always resolves the role LIVE through `resolve_agent_model.py`, so an i
|
|
|
83
115
|
| (prior-gen baseline) Sonnet 4.6 uses 70% fewer tokens than 4.5 on complex file ops with +38% accuracy | Anthropic Sonnet 4.6 announcement | ⚠️ T2, single-source; superseded by Sonnet 5's new tokenizer |
|
|
84
116
|
| Pricing: Sonnet 5 $3/$15 per MTok ($2/$10 introductory through 2026-08-31) | claude-api skill cache 2026-06-24 (T1 — Anthropic) | ⚠️ verify before billing |
|
|
85
117
|
| Pricing: Opus 4.8 $5/$25 per MTok input/output | Anthropic pricing page | ⚠️ verify before billing |
|
|
86
|
-
| Pricing: Fable 5 $10/$50 per MTok input/output (1M context
|
|
118
|
+
| Pricing: Fable 5 $10/$50 per MTok input/output (1M context; superseded as the T1 default by Opus 5 on 2026-07-28) | claude-api skill cache 2026-05-26 (T1 — Anthropic) | ✅ T1 source, advisory until re-confirmed at next billing audit |
|
|
87
119
|
|
|
88
120
|
## MECE primitive: cognitive type of the task
|
|
89
121
|
|
|
@@ -91,48 +123,58 @@ Before consulting the role table, classify the task by reasoning shape. The MECE
|
|
|
91
123
|
|
|
92
124
|
| Reasoning shape | Model | What it means | Example tasks |
|
|
93
125
|
|---|---|---|---|
|
|
94
|
-
| **Planning +
|
|
95
|
-
| **Coordination +
|
|
126
|
+
| **Planning + highest-consequence verification synthesis** — frame the goal and judge verdicts where a miss has the largest blast radius | **Opus (Frontier)** | Wrong calls poison every downstream dispatch. | Phase 2 Plan drafting, plan-critic, independent-auditor, security-reviewer |
|
|
127
|
+
| **Coordination + bounded verification synthesis** — route work, run causal trees, or judge a bounded surface with strong checks | **Opus (Thinking)** | Strong judgment backed by deterministic gates; also the T1 default since 2026-07-28. | build-orchestrator, assessment-orchestrator, scope-auditor, fact-checker, fix-critique, overfitting-reviewer, promotion-reviewer |
|
|
96
128
|
| **Application** — apply a known rule, spec, or pattern to bounded input; produce an artifact that matches a contract | **Sonnet (Code)** | The "how" call when "what" is decided. Single-correct-answer derivable from a rule. | Implement a commit's owned files per spec, write tests for given F-criteria, mechanical simplify, bounded domain assessment (api/db/frontend/perf), design-contract reconciliation, ui-validator, retrospective-synthesizer, self-improvement-architect drafting |
|
|
97
129
|
| **Recognition** — pure regex/syntactic match; classify into known buckets; no judgment | **Haiku (Pattern)** | No gradient — matches or doesn't. | Mock-data scan, log pattern detection, file inventory, cross-run pattern detection, deterministic checklist verification |
|
|
98
130
|
|
|
99
|
-
**Decision tree:** "Does this task have a single-correct answer derivable from a rule applied to bounded input?" → Yes = Application/Sonnet. Else "Is the answer pure pattern-match?" → Yes = Recognition/Haiku. Else, Synthesis. Then ask: "Is this a planning decision (what to build) or a verification verdict (did it hold)?" → Yes = Frontier
|
|
131
|
+
**Decision tree:** "Does this task have a single-correct answer derivable from a rule applied to bounded input?" → Yes = Application/Sonnet. Else "Is the answer pure pattern-match?" → Yes = Recognition/Haiku. Else, Synthesis. Then ask: "Is this a planning decision (what to build) or a verification verdict (did it hold)?" → Yes = Frontier (currently Opus; Fable only through `frontier_gate.py` on tightly-coupled planning). Else (routing, escalation, audit-synthesis when no verdict is being rendered) = Thinking/Opus.
|
|
100
132
|
|
|
101
133
|
## Default assignments
|
|
102
134
|
|
|
103
135
|
| Task | Reasoning shape | Model | effort | Why |
|
|
104
136
|
|------|------|-------|--------|-----|
|
|
105
|
-
| Frame & plan: goal, ADRs, scope, F-criteria, MECE partition | Planning synthesis |
|
|
137
|
+
| Frame & plan: goal, ADRs, scope, F-criteria, MECE partition | Planning synthesis | Opus | medium | A wrong plan dispatches N implementers into the wrong work; user's standing priority Accuracy > Speed > Cost |
|
|
106
138
|
| Plan-verify deterministic checklist | Recognition | (script) | — | No model; runs `plan_verify.py` |
|
|
107
|
-
| Plan-critic adversarial review against rubric+checklist | Verification synthesis |
|
|
108
|
-
| Scope auditor (Plan→Execute boundary): trace callers of every modified-API symbol; annotate `caller_audit:` per commit |
|
|
109
|
-
| Code execution — bounded chunk, spec clear | Application | Sonnet |
|
|
139
|
+
| Plan-critic adversarial review against rubric+checklist | Verification synthesis | Opus | high | Verification verdict — separation drives quality; verdict gates Phase 3 dispatch |
|
|
140
|
+
| Scope auditor (Plan→Execute boundary): trace callers of every modified-API symbol; annotate `caller_audit:` per commit | Bounded verification synthesis | Opus | medium | Read-only caller tracing has a strong grep/plan oracle; Codex resolves Sol through Governance/Evaluation T2 |
|
|
141
|
+
| Code execution — bounded chunk, spec clear | Application | Sonnet | high | Default workhorse. First-pass correctness reduces rework; explicit effort may override this preference. |
|
|
110
142
|
| Code execution — ambiguous spec or cross-file surprise mid-execution | Coordination synthesis | Opus | medium | Escalation target; interpretation cost cheaper than rework |
|
|
111
|
-
| Independent-auditor adversarial pass (read-only diff vs rubric at chunk + build scope) | Verification synthesis |
|
|
143
|
+
| Independent-auditor adversarial pass (read-only diff vs rubric at chunk + build scope) | Verification synthesis | Opus | high | Verdict gates the build's outcome line; a missed regression in production-impacting work is the most expensive miss in the loop |
|
|
112
144
|
| Severity ranking + recommendation order (given findings) | Coordination synthesis | Opus | medium | Cross-finding routing; no per-finding verdict being rendered, the verdicts are upstream |
|
|
113
145
|
| Mock data scanning | Recognition | Haiku | low | Regex only |
|
|
114
|
-
| Fact-checking — trace metric → source, judge accuracy |
|
|
115
|
-
| Fix-critique — pressure-test a proposed fix before "resolved" |
|
|
116
|
-
| Security-reviewer — adversarial OWASP/ATLAS pass | Verification synthesis |
|
|
117
|
-
| Overfitting-reviewer — Goodhart / test-gaming verdict on optimize runs |
|
|
118
|
-
| Promotion-reviewer — Phase 6 Learn experimental promotion verdict |
|
|
146
|
+
| Fact-checking — trace metric → source, judge accuracy | Bounded verification synthesis | Opus | medium | Source trace supplies an external oracle; Codex resolves Sol |
|
|
147
|
+
| Fix-critique — pressure-test a proposed fix before "resolved" | Bounded verification synthesis | Opus | medium | Counterfactual and regression evidence backstop the verdict; Codex resolves Sol |
|
|
148
|
+
| Security-reviewer — adversarial OWASP/ATLAS pass | Verification synthesis | Opus | high | Verdict gates riskSurfaceChange dispatch; missed exposure is the most expensive verification miss |
|
|
149
|
+
| Overfitting-reviewer — Goodhart / test-gaming verdict on optimize runs | Bounded verification synthesis | Opus | medium | Read-only experiment history and guard metrics provide the oracle; Codex resolves Sol |
|
|
150
|
+
| Promotion-reviewer — Phase 6 Learn experimental promotion verdict | Bounded advisory verification | Opus | medium | Advisory verdict remains subject to explicit promotion confirmation; Codex resolves Sol |
|
|
119
151
|
| Simplify — apply known simplifications | Application | Sonnet | medium | Inline single-use helper, delete dead branch — bounded |
|
|
120
152
|
| Debugging — symptom-to-known-pattern match | Application | Sonnet | high | Memory-first gate's "Application until the rule runs out" |
|
|
121
153
|
| Debugging — causal-tree after 2 consecutive failures | Coordination synthesis | Opus | high | Synthesis takes over routing when rule-match exhausts |
|
|
122
|
-
| Novel architecture decision | Planning synthesis |
|
|
154
|
+
| Novel architecture decision | Planning synthesis | Opus | medium | Cross-file impact; wrong call compounds |
|
|
123
155
|
| Writing user-facing prose (copy, microcopy, errors) | Coordination synthesis | Opus | medium | Tone, restraint, and nuance matter; no verification verdict being rendered |
|
|
124
156
|
| Audit / learnings / Phase 6 audit synthesis | Coordination synthesis | Opus | medium | Cross-run routing; promotion-reviewer carries the gating verdict separately |
|
|
125
157
|
| Recurring-pattern detection across runs[] | Recognition | Haiku | low | Pattern-match across structured logs |
|
|
126
158
|
|
|
127
159
|
### Deliberate exceptions (Sonnet retained for cost where the surface is high-frequency advisory)
|
|
128
160
|
|
|
129
|
-
Two
|
|
161
|
+
Two high-frequency advisory agents stay on Sonnet. Every verification agent — bounded and gating alike — now resolves to Opus. Pins are defaults, not locks and should be re-tiered when telemetry disagrees.
|
|
130
162
|
|
|
131
163
|
| Agent | Pin | Why retained on Sonnet |
|
|
132
164
|
|---|---|---|
|
|
133
165
|
| `alignment-checker` | Sonnet | Called once per queue item during autonomous iterate (up to 25× per run). Advisory only — flags drift, doesn't gate. Cost dominates value at this fan-out frequency. |
|
|
134
166
|
| `synthesis-critic` | Sonnet | Per-UI-commit WARN-only check. Advisory only — never gates. Frequency × non-gating shape means a cheaper tier is the right tradeoff. |
|
|
135
167
|
|
|
168
|
+
### Database actions pin Frontier — standing user rule (2026-07-22)
|
|
169
|
+
|
|
170
|
+
**All database actions run at Frontier tier (currently Opus on the Anthropic mapping), overriding the Code-tier execution default.** DB mutations — migrations, schema changes, constraint/index DDL, data-plane rehearsals, repair/quarantine — are irreversible-leaning and high blast-radius, exactly the compounding-error class Frontier owns. Scope:
|
|
171
|
+
|
|
172
|
+
- **Assessment/diagnosis:** `database-assessor` role is `(generative_reasoning, frontier)` → resolves to Opus. Do not re-tier it down.
|
|
173
|
+
- **Execution:** any Phase 2 plan chunk whose owned files include migrations, `schema.prisma`/`schema.sql`, or DDL scripts is assigned Frontier in plan model-assignment, not the Sonnet implementer default. Label the assignment in the plan.
|
|
174
|
+
- **DB skills:** `data-plane-worktrees` and any database skill dispatch their executing subagent at Frontier tier (Agent `model` override / workflow `opts.model`).
|
|
175
|
+
|
|
176
|
+
This is a provider-portable *tier* pin (Frontier), not a hardcoded id; on hosts where a higher-ranked Frontier id is available the resolver may pick it, honoring Accuracy > Speed > Cost. Source: user standing rule, example-app-ai migration rehearsal (run-593729).
|
|
177
|
+
|
|
136
178
|
## Round 2 evidence (2026-05-07, example-app news-podcast iteration 2)
|
|
137
179
|
|
|
138
180
|
n=2 dispatch-pattern A/B comparison on a 6-commit feature reversed the round-1 belief that Skill-path (Sonnet fan-out) is materially cheaper across the board:
|
|
@@ -152,11 +194,11 @@ Findings that updated the model tiering:
|
|
|
152
194
|
3. **Inline-Opus is faster wall-clock** when there's no real parallelism to exploit. Fan-out parallelism is only a win when ≥3 chunks are truly independent.
|
|
153
195
|
4. **Plan-critic on Sonnet caught 17 substantive findings** on a written spec — confirms "rubric-application = Sonnet" is robust.
|
|
154
196
|
|
|
155
|
-
These findings
|
|
197
|
+
These findings supported a three-level verification split. The 2026-07-28 audit bakeoff collapsed the top two levels: Opus 5 was a strict superset of Fable across 3/3 adversarial-audit rounds, so gating and bounded verdicts both sit on Opus, with Sonnet keeping high-frequency advisory checks. The exceptions table preserves Sonnet where the surface is non-gating.
|
|
156
198
|
|
|
157
|
-
## Escalation triggers (Sonnet execution → Opus
|
|
199
|
+
## Escalation triggers (Sonnet execution → Opus)
|
|
158
200
|
|
|
159
|
-
Execution escalates to **Opus
|
|
201
|
+
Execution escalates to **Opus** — a coordination call the orchestrator owns. Fable is not an execution escalation target: it is reserved for super-complex multi-step work and for judging it, and is reached through `scripts/frontier_gate.py`, not by climbing the execution ladder. Several issues open at once is the signal that hands work to Fable; one hard task is not.
|
|
160
202
|
|
|
161
203
|
- 2 consecutive failures on the same chunk after a retry at effort=high → respawn implementer at Opus
|
|
162
204
|
- Spec is ambiguous and interpretation will materially change implementation → Opus
|
|
@@ -165,7 +207,7 @@ Execution escalates to **Opus**, not Fable. Fable is reserved for planning and v
|
|
|
165
207
|
- Novel error pattern not found in `.build-loop/issues/` or debugging memory → Opus
|
|
166
208
|
- Task produces user-visible prose where tone and restraint are load-bearing → Opus
|
|
167
209
|
|
|
168
|
-
If the ambiguity surfaces a **planning** problem (the original plan no longer fits) rather than an execution problem, route back to Phase 2 Plan —
|
|
210
|
+
If the ambiguity surfaces a **planning** problem (the original plan no longer fits) rather than an execution problem, route back to Phase 2 Plan — the Advisor re-plans at Frontier (Fable if `frontier_gate.py` says the repo is tightly coupled, else Opus), then execution resumes on Sonnet.
|
|
169
211
|
|
|
170
212
|
## Techniques that work
|
|
171
213
|
|
|
@@ -182,11 +224,30 @@ If the ambiguity surfaces a **planning** problem (the original plan no longer fi
|
|
|
182
224
|
- **Chain of Density**. Summarization-specific technique; not applicable to code work.
|
|
183
225
|
- **Best-of-N by default**. Only on hard chunks. Blanket best-of-N wastes tokens on easy tasks where effort=high is sufficient and cheaper.
|
|
184
226
|
|
|
227
|
+
## Prompting profiles — how to prompt the rung you resolved
|
|
228
|
+
|
|
229
|
+
Model-tiering answers *which* model runs an agent. The `prompting_profiles` block in `references/model-taxonomy.json` answers *how to prompt it* — a separate axis, keyed by capability rung, carried on the same resolution path.
|
|
230
|
+
|
|
231
|
+
**Lookup:** `python3 scripts/resolve_agent_model.py <agent> --json` returns `prompting_profile` alongside `model` — no second call. From code, `model_taxonomy.prompting_profile(tier)` reads the same block directly.
|
|
232
|
+
|
|
233
|
+
| Rung | examples | constraint_posture | edge_case_handling | rationale | prompt_budget |
|
|
234
|
+
|---|---|---|---|---|---|
|
|
235
|
+
| T0 | omit | contextual | delegate | required | compressed |
|
|
236
|
+
| T1 | omit | contextual | delegate | required | compressed |
|
|
237
|
+
| T2 | minimal | contextual | delegate | required | standard |
|
|
238
|
+
| T3 | worked | mixed | enumerate-known | recommended | full |
|
|
239
|
+
| T4 | worked | directive-ok | enumerate-known | optional | full |
|
|
240
|
+
| T5 | worked | directive-ok | enumerate-known | optional | full |
|
|
241
|
+
|
|
242
|
+
Profile edits happen in `references/model-taxonomy.json`, not here — the same maintenance path as the model index itself; see §"Chat-triggered index maintenance" above.
|
|
243
|
+
|
|
244
|
+
The T0–T2 rows are source-verified against the Anthropic Claude Code team's 2026-07-21 published guidance; T3's `examples`/`edge_case_handling` are repo-measured and the rest of T3 is inferred; T4/T5 are weakly-evidenced placeholders (`confidence: weak`, `status_quo: true`) encoding current behavior, not a chosen posture.
|
|
245
|
+
|
|
185
246
|
## Cost math quick reference
|
|
186
247
|
|
|
187
248
|
> ⚠️ **Advisory only.** The numbers below are directional heuristics based on single-source token-profile estimates and public pricing as of the skill's last update. They are **not** verified against real usage telemetry and should not be used as hard routing logic. Treat them as "this tier costs roughly this much more than that tier," not as commitments. Pricing, token profiles, and model output lengths all drift over time. Before using these ratios in any cost-minimization decision, pull actual usage data from the last 30 days of builds and re-derive the numbers for your workload.
|
|
188
249
|
|
|
189
|
-
**Price ratios only** (T1, claude-api — per-MTok, in/out): Fable 5 $10/$50 · Opus
|
|
250
|
+
**Price ratios only** (T1, claude-api — per-MTok, in/out): Fable 5 $10/$50 · Opus 5 $5/$25 · Sonnet 5 $3/$15 ($2/$10 intro through 2026-08-31) · Haiku 4.5 $1/$5.
|
|
190
251
|
|
|
191
252
|
| Pair (same task) | Price ratio | Basis |
|
|
192
253
|
|---|---|---|
|
|
@@ -204,9 +265,9 @@ If the ambiguity surfaces a **planning** problem (the original plan no longer fi
|
|
|
204
265
|
|
|
205
266
|
## How the build-loop uses this
|
|
206
267
|
|
|
207
|
-
**Fable plans
|
|
268
|
+
**Fable plans and handles the highest-consequence verification. Opus coordinates and handles bounded verification. Sonnet executes. Haiku recognizes.**
|
|
208
269
|
|
|
209
|
-
Phase 2 Plan synthesis reaches **Fable** through the **Advisor dispatch ladder** when stakes-gating trips
|
|
270
|
+
Phase 2 Plan synthesis reaches **Fable** through the **Advisor dispatch ladder** when stakes-gating trips. The orchestrator (**Opus**) coordinates; Phase 3 implementers run on **Sonnet** at high effort. Verification then splits by consequence: **Fable** for `plan-critic`, `independent-auditor`, and `security-reviewer`; **Opus** for `scope-auditor`, `fix-critique`, `fact-checker`, `overfitting-reviewer`, and `promotion-reviewer`; **Sonnet** for the advisory `alignment-checker` and `synthesis-critic`. On Codex, both governance verification cells resolve to GPT-5.6 Sol. Execution retries Sonnet at `xhigh` before escalating to Opus; planning misses route back to Fable.
|
|
210
271
|
|
|
211
272
|
Haiku is only used for Phase 7B mock scanning and recurring-pattern detection across `runs[]`. Never for reasoning tasks.
|
|
212
273
|
|
|
@@ -214,7 +275,7 @@ Haiku is only used for Phase 7B mock scanning and recurring-pattern detection ac
|
|
|
214
275
|
|
|
215
276
|
Not every agent should hard-pin its model. Use this rule:
|
|
216
277
|
|
|
217
|
-
- **Pin** (`model: fable | opus | sonnet | haiku`) when the task has a clear right tier and cost/quality drift from user's session choice would be a bug.
|
|
278
|
+
- **Pin** (`model: fable | opus | sonnet | haiku`) when the task has a clear right tier and cost/quality drift from user's session choice would be a bug. `plan-critic`, `independent-auditor`, and `security-reviewer` pin Fable. `scope-auditor`, `fact-checker`, `fix-critique`, `overfitting-reviewer`, and `promotion-reviewer` pin Opus. `mock-scanner` pins Haiku; orchestrators pin Opus; `implementer` pins Sonnet.
|
|
218
279
|
- **Inherit** (`model: inherit`) when user intent should flow through. The user's main-session choice is itself a cost/speed preference; respect it. Pair with a "recommended: X" note in this skill rather than forcing via frontmatter. Example: `root-cause-investigator` — recommended Opus on causal-tree work, but inherit honors whatever tier the user picked upstream.
|
|
219
280
|
- **Override mechanism**: users can override any pin by passing `model:` when spawning the agent or by editing the frontmatter. Pins are defaults, not locks. The deliberate exceptions documented above (`alignment-checker`, `synthesis-critic` on Sonnet despite being verification-shaped) are exactly this kind of cost-vs-judgment pin and can be lifted if telemetry says so.
|
|
220
281
|
|
|
@@ -273,4 +334,4 @@ python3 ${CLAUDE_PLUGIN_ROOT}/scripts/model_overrides.py \
|
|
|
273
334
|
|
|
274
335
|
Accepted tiers: `frontier` (default `fable`), `thinking` (default `opus`), `code` (default `sonnet`), `pattern` (default `haiku`). Configs without `frontier` resolve frontier → `fable` so older repos keep working without edits.
|
|
275
336
|
|
|
276
|
-
Full contract and routing matrix:
|
|
337
|
+
Full contract and routing matrix: "LLM Build-Loop Router Integration" (private research note, 2026-04 — substance summarized here; the live routing matrix ships in-repo at `references/model-taxonomy.json`).
|
|
@@ -47,6 +47,8 @@ Actions exposed by `python3 scripts/native_driver.py action`:
|
|
|
47
47
|
|
|
48
48
|
Element targeting uses an integer index path from the main window root (e.g. `0,2,1` = first child → third child → second child). The path is returned by every `scan` element under the `path` key, so the typical loop is `scan` → match by `identifier` / `title` → use that element's `path` for `action`.
|
|
49
49
|
|
|
50
|
+
`python3 scripts/native_driver.py launch` is the deterministic launch + pid-capture step: it starts an isolated instance of a `.app`/bundle id and returns the new pid to scope every subsequent `scan`/`action` call to. See "Single-instance PID-scoped verification mode" below.
|
|
51
|
+
|
|
50
52
|
## Files in this skill
|
|
51
53
|
|
|
52
54
|
```
|
|
@@ -54,7 +56,8 @@ skills/native-ax-driver/
|
|
|
54
56
|
├─ SKILL.md (this file)
|
|
55
57
|
├─ scripts/
|
|
56
58
|
│ ├─ layout_fill.py (layout-fill / gap analyzer; stdlib only)
|
|
57
|
-
│
|
|
59
|
+
│ ├─ native_driver.py (Python launcher; stdlib only)
|
|
60
|
+
│ └─ test_native_driver.py (pure-helper tests; run with pytest)
|
|
58
61
|
└─ swift/bl-ax-driver/
|
|
59
62
|
├─ Package.swift (Swift 5.9, macOS 13+)
|
|
60
63
|
└─ Sources/main.swift (~535 LOC, AX implementation)
|
|
@@ -85,10 +88,40 @@ Exit codes: `0` AX granted · `2` AX missing · `1` osascript missing.
|
|
|
85
88
|
|
|
86
89
|
If `2`, surface to Iterate as a blocker rather than retrying — the user has to grant permission once in System Settings; build-loop cannot do that itself.
|
|
87
90
|
|
|
91
|
+
### Single-instance PID-scoped verification mode
|
|
92
|
+
|
|
93
|
+
**This is the documented standard for native UI verification whenever other instances of the target app may be running — including the user's own.** Do not skip verification in that situation, and do not target by `--app <name>` — `--app` matches by substring against every running process's name, so it can resolve to (and drive) the user's window instead of the isolated one being verified.
|
|
94
|
+
|
|
95
|
+
The Swift driver already scopes every AX call to one process: it resolves the target via `AXUIElementCreateApplication(pid)` (`swift/bl-ax-driver/Sources/main.swift:264`) and only ever walks that process's AX tree. `scan --pid <pid>` and `action --pid <pid>` were always safe to run alongside ambient instances — the missing piece was a deterministic way to launch a fresh, isolated instance and know for certain which pid is it. `launch` closes that gap:
|
|
96
|
+
|
|
97
|
+
1. **Launch** an isolated instance under a private state dir, forcing a brand-new process (`open -n`) and (optionally) ignoring any saved window/scene state (`-F` via `--fresh`) so it never resumes into the user's prior session:
|
|
98
|
+
|
|
99
|
+
```bash
|
|
100
|
+
python3 .../native_driver.py launch --app-path /Applications/MyApp.app \
|
|
101
|
+
--state-env-var ET_STATE_DIR --state-dir /tmp/myapp-verify-$$ --fresh
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
2. **Read the captured pid** from the JSON result — `launch` snapshots the running GUI pid set before launch and diffs it against the pid set after, so the returned pid is provably the new instance, never a guess. If the diff is ambiguous (zero or more than one new pid appeared), `success` is `false` and no pid is reported — treat that as a hard stop, not a fallback to name-matching:
|
|
105
|
+
|
|
106
|
+
```json
|
|
107
|
+
{"success": true, "pid": 55210, "bundle_id": "com.example.myapp", "state_dir": "/tmp/myapp-verify-1234", "fresh": true, "error": null, "next": "drive AX scoped to this pid: native_driver.py scan --pid 55210 / action --pid 55210 ..."}
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
3. **Scan and drive using ONLY `--pid <captured>`** for the remainder of the verification pass — never `--app`:
|
|
111
|
+
|
|
112
|
+
```bash
|
|
113
|
+
python3 .../native_driver.py scan --pid 55210
|
|
114
|
+
python3 .../native_driver.py action --pid 55210 --element-path 0,2,1 --action press
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
Because AX targeting is pid-scoped end-to-end, every action in step 3 is confined to the launched instance's AX tree — the user's other windows, and any other ambient instances of the same app, are never touched. This is safe to run with ambient instances live.
|
|
118
|
+
|
|
119
|
+
`launch` flags: `--app-path` (path to a `.app`) or `--bundle-id` (mutually exclusive, one required); `--state-dir` + `--state-env-var` (set an env var to a private state directory before launch, e.g. an app-specific `ET_STATE_DIR`); `--fresh` (pass `-F` to `open`); `--arg` (repeatable, extra argv passed to the launched app after `--args`); `--timeout` (seconds to wait for the new pid to appear, default `10.0`). Exit codes: `0` success · `1` launch or pid-capture failed · `2` bad arguments.
|
|
120
|
+
|
|
88
121
|
### Scan a running app
|
|
89
122
|
|
|
90
123
|
```bash
|
|
91
|
-
python3 .../native_driver.py scan --app "
|
|
124
|
+
python3 .../native_driver.py scan --app "MyApp" # by name (substring, case-insensitive)
|
|
92
125
|
python3 .../native_driver.py scan --pid 44330 # by pid
|
|
93
126
|
```
|
|
94
127
|
|
|
@@ -169,8 +202,8 @@ Stdout JSON shape: `{"success": bool, "action": "press", "error": "AXPress faile
|
|
|
169
202
|
`resolve` and `apps` work without AX permission — useful for the orchestrator to confirm a freshly-launched app has actually started before the AX-gated operations.
|
|
170
203
|
|
|
171
204
|
```bash
|
|
172
|
-
python3 .../native_driver.py resolve --app "
|
|
173
|
-
# {"pid": 44330, "name": "
|
|
205
|
+
python3 .../native_driver.py resolve --app "MyApp"
|
|
206
|
+
# {"pid": 44330, "name": "MyApp", "bundleIdentifier": "com.example.myapp"}
|
|
174
207
|
|
|
175
208
|
python3 .../native_driver.py apps
|
|
176
209
|
# [{"name": "Finder", "pid": 612, "bundleIdentifier": "com.apple.finder"}, ...]
|
|
@@ -189,7 +222,7 @@ python3 .../native_driver.py apps
|
|
|
189
222
|
- **Web targets** — use `ui-validator` and the host browser/screenshot tooling; this skill won't help.
|
|
190
223
|
- **iOS simulator** — the simulator runs on macOS, but interaction goes through `idb ui tap`, not direct AX (the simulator's AX surface is too noisy for path stability). See `reference_idb_sim_tap.md`.
|
|
191
224
|
- **Drag-and-drop, hover-only effects, NSTrackingArea-driven UI** — these need real `CGEvent` mouse events. Out of scope. If the feature is critical, fix the AX surface in the app under test (add `.accessibilityAction { … }`) rather than synthesizing mouse events.
|
|
192
|
-
- **App not yet running** — the
|
|
225
|
+
- **App not yet running** — use `launch` (see "Single-instance PID-scoped verification mode" above) to start an isolated instance and capture its pid before driving, especially when other instances of the app may already be running. For a single-instance context where no ambient collision risk exists, a plain `open -b <bundleId>` (or `open <path/to/.app>`) followed by `resolve` also works.
|
|
193
226
|
|
|
194
227
|
## Failure modes & recovery
|
|
195
228
|
|