@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,296 +0,0 @@
|
|
|
1
|
-
<!-- SPDX-FileCopyrightText: 2025-2026 Tyrone Ross, Jr <46267523+tyroneross@users.noreply.github.com> | SPDX-License-Identifier: Apache-2.0 -->
|
|
2
|
-
|
|
3
|
-
# Model Tier Mapping — Multi-Provider Substitution Reference
|
|
4
|
-
|
|
5
|
-
Build-loop is provider-agnostic at the tier level. Agent frontmatter uses Anthropic aliases (`fable`, `opus`, `sonnet`, `haiku`) by default because Claude Code is the primary host, but the **tier abstraction** is what governs the role assignment. This reference documents how to swap providers cleanly.
|
|
6
|
-
|
|
7
|
-
## Two-axis taxonomy (the source of truth)
|
|
8
|
-
|
|
9
|
-
Model selection runs on **two orthogonal axes**, encoded as structured data in **`references/model-taxonomy.json`** (the single source of truth; `scripts/model_taxonomy.py` is the loader every selection script imports):
|
|
10
|
-
|
|
11
|
-
- **SEGMENT axis — work role / primary output.** Seven segments: Generative Reasoning, Agentic Execution, Representation/Retrieval, Realtime Interaction, Perception/Input Understanding, Generative Media, Governance/Evaluation. Each has subsegments. A model with image/audio INPUT but a reasoning primary job is Generative Reasoning with a `multimodal-input` TAG — only classify into Perception/Realtime/Media when that IS the primary product role. Tags (`long-context`, `agentic`, `multimodal-input`, `cost-sensitive`, `restricted`, …) are a third axis.
|
|
12
|
-
- **CAPABILITY-TIER axis — a 7-rung ladder:** `T0` experimental/restricted frontier · `T1` ultra-frontier · `T2` frontier · `T3` balanced workhorse · `T4` efficient near-frontier · `T5` utility/nano/edge · `T-S` specialist infrastructure (off the capability ladder).
|
|
13
|
-
|
|
14
|
-
**Legacy aliases (back-compat, never removed):** the four legacy tier tokens fold onto the ladder — `frontier→T1`, `thinking→T2`, `code→T3`, `pattern→T4`. Existing config `modelOverrides`, plan `tier:` frontmatter, `route_decision`, and every existing test reference the legacy tokens and keep resolving to the same models.
|
|
15
|
-
|
|
16
|
-
**Selection policy (Hybrid):** per `(segment, tier)` there is an ORDERED preferred-model list (order = capability rank, honoring Accuracy>Speed>Cost). The resolver (`scripts/model_resolver.py resolve_role`) picks the highest-ranked AVAILABLE + host-reachable id; ties / equal-or-unranked candidates are broken by release recency (newer wins). Users reorder via `.build-loop/config.json`. On a Claude host, a host-unreachable cross-vendor model is filtered out, so a generative_reasoning/thinking role resolves to `opus`, never the recency-newer but unreachable `gpt-5.5`.
|
|
17
|
-
|
|
18
|
-
**Classification (host-LLM, no vendor API):** an unseen model is classified into BOTH segment + tier by the host LLM (`scripts/classify_model_tier.py` — rubric + WebSearch packet → `record`). Specialist segments grade on their own metrics (MTEB / recall / NDCG / WER / latency), not SWE-bench.
|
|
19
|
-
|
|
20
|
-
**Agent binding:** every agent declares a `(segment, tier)` ROLE in frontmatter, resolved to a concrete model at dispatch (M2.5 contract). `model:` stays as the harness default + fresh-install fallback. A new model is adopted by classifying it once — no agent edits.
|
|
21
|
-
|
|
22
|
-
**Dormant vs active segments:** *active* (live resolver) — generative_reasoning, agentic_execution, governance_evaluation. *partial* — representation_retrieval (embeddings; no agent-dispatch resolver). *dormant (DATA + reference only, no resolver wiring)* — realtime_interaction, perception_input, generative_media. The dormant segments are encoded for future skills; nothing walks them yet.
|
|
23
|
-
|
|
24
|
-
## Canonical tier definitions (legacy 4-tier view — the Generative Reasoning T1–T4 cells)
|
|
25
|
-
|
|
26
|
-
### Frontier tier
|
|
27
|
-
- **Role:** Planning synthesis AND verification verdicts. **Phase 2 Plan synthesis reaches Fable via the stakes-gated Advisor dispatch ladder** (`advisor` agent / peer host / already-Fable session; honestly-labeled inline-Opus fallback otherwise — `skills/build-loop/references/advisor-dispatch-ladder.md`); the Advisor v1 ladder is Phase 2 only, so Phase 1 Assess synthesis runs inline as today until v2. Plan content: frame goal, draft spec/ADRs, F-criteria, MECE partition. Verification-shaped agents whose verdicts gate downstream work: plan-critic, scope-auditor, independent-auditor, fix-critique, fact-checker, security-reviewer, overfitting-reviewer, promotion-reviewer.
|
|
28
|
-
- **Why this tier exists (above Thinking):** wrong plans dispatch N implementers into the wrong work, and wrong verdicts ship regressions. The user's standing priority is Accuracy > Speed > Cost; the compounding-risk surfaces pay the Frontier premium.
|
|
29
|
-
- **Benchmark contract:** clears the Thinking-tier contract AND benchmarks above the prior-generation Thinking-tier ceiling on at least one of SWE-bench Verified / ARC-AGI / GPQA Diamond.
|
|
30
|
-
- **Cost expectation:** highest. Use only on the planning + verification surface; never default for execution or coordination.
|
|
31
|
-
- **Anthropic default:** Fable 5 (`claude-fable-5`)
|
|
32
|
-
- **Verified equivalents (2026 Q2, advisory):** GPT-5.5 (`gpt-5.5`, OpenAI's frontier Codex model — complex coding, agentic, 1.1M ctx), GPT-5.4 (`gpt-5.4`, lower-cost frontier); future Claude generations above Opus
|
|
33
|
-
- **Local equivalents:** none — Frontier-class capability is not yet matched locally
|
|
34
|
-
|
|
35
|
-
### Thinking tier
|
|
36
|
-
- **Role:** Coordination + escalation. Routes work between subagents, ladders severity, runs causal-tree on stuck iterations, writes audit/learnings when no Frontier verdict is being rendered.
|
|
37
|
-
- **Benchmark contract:** SWE-bench Verified ≥78% AND competitive on ARC-AGI / GPQA Diamond / MMLU-Pro.
|
|
38
|
-
- **Cost expectation:** middle-high tier. Use for orchestration and the escalation target when execution hits ambiguity. Never default to Thinking for bounded execution.
|
|
39
|
-
- **Anthropic default:** Opus 4.8 (`claude-opus-4-8`; alias `opus` auto-tracks the latest Opus generation)
|
|
40
|
-
- **Verified equivalents (2026 Q2, advisory):** GPT-5.4 (`gpt-5.4`), Gemini 2.5 Pro
|
|
41
|
-
- **Local equivalents:** none yet — Thinking-tier work needs frontier-class context length and judgment; local models lag
|
|
42
|
-
|
|
43
|
-
### Code tier
|
|
44
|
-
- **Role:** Application. Apply a known rule, spec, or pattern to bounded input. Scoped implementation per a commit's owned-files. Adversarial critic vs rubric. Mechanical simplify. The "how" decisions when the "what" is already settled.
|
|
45
|
-
- **Benchmark contract:** SWE-bench Verified ≥75% AND tool-use accuracy ≥85% AND multi-turn coding rollout ≥80%.
|
|
46
|
-
- **Cost expectation:** ~3-5× cheaper than Thinking tier per token. The default for the bulk of build-loop work.
|
|
47
|
-
- **Anthropic default:** Sonnet 5 (`claude-sonnet-5`; alias `sonnet` auto-tracks the latest Sonnet generation)
|
|
48
|
-
- **Verified equivalents:** Sonnet 4.7+ (when available), GPT-5.4 Mini (`gpt-5.4-mini` — fast coding + subagents)
|
|
49
|
-
- **Local equivalents:** qwen2.5-coder-32B-instruct (mid-quality), Codestral 22B (reasonable substitute for bounded refactor work)
|
|
50
|
-
|
|
51
|
-
### Pattern tier (a.k.a. Recognition)
|
|
52
|
-
- **Role:** Pure regex/syntactic match. Classify into known buckets. Log scan. Deterministic checklist verification. No judgment. No gradient — match-or-not.
|
|
53
|
-
- **Benchmark contract:** none formal. Empirical: doesn't hallucinate on bounded structured tasks; runs fast.
|
|
54
|
-
- **Cost expectation:** ~10-20× cheaper than Thinking tier. Use for high-volume mechanical sweeps.
|
|
55
|
-
- **Anthropic default:** Haiku 4.5 (`claude-haiku-4-5-20251001`)
|
|
56
|
-
- **Verified equivalents:** Haiku 4.6+ (when available), GPT-5 Nano (`gpt-5-nano` — fastest/cheapest, classify + summarize)
|
|
57
|
-
- **Local equivalents:** llama3.2-3b, qwen2.5-3b
|
|
58
|
-
|
|
59
|
-
## Substitution table (advisory, 2026 Q2)
|
|
60
|
-
|
|
61
|
-
| Provider | Frontier | Thinking | Code | Pattern |
|
|
62
|
-
|---|---|---|---|---|
|
|
63
|
-
| Anthropic (default) | Fable 5 (`fable`) | Opus 4.8 (`opus`) | Sonnet 5 (`sonnet`) | Haiku 4.5 (`haiku`) |
|
|
64
|
-
| OpenAI | `gpt-5.5` (Codex) | `gpt-5.4` | `gpt-5.4-mini` | `gpt-5-nano` |
|
|
65
|
-
| Google | next-gen Gemini Ultra (when it clears the contract) | `gemini-2.5-pro` | `gemini-2.5-flash` | `gemini-flash-lite` |
|
|
66
|
-
| Local (Ollama / MLX) | n/a — none meets contract yet | n/a — none meets contract yet | `qwen2.5-coder-32b` | `llama3.2-3b` |
|
|
67
|
-
|
|
68
|
-
⚠️ **Always verify benchmarks before swapping.** Table cells are best-effort as of build-loop's last update; model versions and rankings drift. Use `Skill("research")` or Context7 MCP to confirm current SWE-bench Verified scores before relying.
|
|
69
|
-
|
|
70
|
-
### Selectable model registry (the machine-readable source of truth)
|
|
71
|
-
|
|
72
|
-
The single source of truth is **`references/model-taxonomy.json`** (segments, ladder, per-`(segment,tier)` preferred lists, seed model metadata with release dates, legacy aliases, classification rubric). `MODEL_REGISTRY` / `TIER_DEFAULTS` / `TIER_FALLBACK` in `scripts/model_overrides.py` are now DERIVED from it (the legacy 4-token view) — there is one vocabulary in the codebase. List the selectable models per legacy tier with:
|
|
73
|
-
|
|
74
|
-
```bash
|
|
75
|
-
python3 scripts/model_overrides.py --list-models # all tiers
|
|
76
|
-
python3 scripts/model_overrides.py --list-models --tier frontier --json
|
|
77
|
-
```
|
|
78
|
-
|
|
79
|
-
The registry is **advisory**: override resolution still accepts any model id, so a brand-new model works the moment you put it in `modelOverrides` — it is simply flagged `registered: false` on the resolve envelope until it is added here. `TIER_DEFAULTS` (the Anthropic mapping) stays the fallback; registering a model makes it *selectable*, not the default.
|
|
80
|
-
|
|
81
|
-
### Standing tier-fallback policy (when a tier's model is unavailable)
|
|
82
|
-
|
|
83
|
-
When a tier's resolved model is **unavailable** at dispatch time (provider outage, quota, region gate) and the caller supplied no explicit per-call fallback, resolution walks DOWN a fixed **tier-to-tier** graph to the fallback tier's default. The policy is expressed in tier/role terms — `TIER_FALLBACK` in `scripts/model_overrides.py` holds the edges; the concrete model ids live only in `TIER_DEFAULTS`/`MODEL_REGISTRY`, so swapping a model never touches the rule.
|
|
84
|
-
|
|
85
|
-
| Tier (role) | Standing fallback tier |
|
|
86
|
-
|---|---|
|
|
87
|
-
| **Frontier** (judgment) | **Thinking** — and no further (invariant below) |
|
|
88
|
-
| **Thinking** (coordination) | **Code** |
|
|
89
|
-
| **Code** (execution) | **Pattern** |
|
|
90
|
-
| **Pattern** (recognition) | none — bottom of the graph |
|
|
91
|
-
|
|
92
|
-
**HARD INVARIANT — a frontier/judgment role never resolves below the Thinking tier.** Frontier's only permitted standing fallback is Thinking; it must NEVER silently degrade to the Code or Pattern tier. Resolution enforces this by walking at most one edge from Frontier: if the Thinking-tier default is itself unavailable, Frontier resolution STOPS at Thinking rather than walking on to Code/Pattern. Every other tier may keep walking down the graph until a usable default is found or the graph bottoms out. The rationale is durable: a verification/planning verdict produced by a Code- or Pattern-tier model is worse than a delayed verdict, so the judgment surface degrades only to the next reasoning-class tier (Thinking), never to an execution/recognition tier. See `feedback_model_org_fable5.md` (Frontier-unavailable → Thinking tier, never Code).
|
|
93
|
-
|
|
94
|
-
An **explicit per-call fallback wins** over the standing policy — passing `--fallback <model>` (or a `fallback=` argument) is treated as deliberate caller intent and skips the standing walk entirely.
|
|
95
|
-
|
|
96
|
-
```bash
|
|
97
|
-
# Drive the standing policy explicitly (frontier default unavailable):
|
|
98
|
-
python3 scripts/model_overrides.py --workdir "$PWD" --tier frontier \
|
|
99
|
-
--unavailable fable --json
|
|
100
|
-
# -> { "model": "<thinking default>", "source": "tier-fallback", "fallback_tier": "thinking" }
|
|
101
|
-
```
|
|
102
|
-
|
|
103
|
-
## Three ways to swap
|
|
104
|
-
|
|
105
|
-
### 1. Edit agent frontmatter (one-time, per-host)
|
|
106
|
-
|
|
107
|
-
Each `agents/*.md` carries a `model:` field. Replace `opus` / `sonnet` / `haiku` with your provider's identifier. Example for OpenAI on a Codex host:
|
|
108
|
-
|
|
109
|
-
```yaml
|
|
110
|
-
# agents/build-orchestrator.md
|
|
111
|
-
---
|
|
112
|
-
name: build-orchestrator
|
|
113
|
-
model: gpt-5.4 # was: opus (Thinking tier)
|
|
114
|
-
---
|
|
115
|
-
|
|
116
|
-
# agents/implementer.md
|
|
117
|
-
---
|
|
118
|
-
name: implementer
|
|
119
|
-
model: gpt-5.4-mini # was: sonnet (Code tier)
|
|
120
|
-
---
|
|
121
|
-
```
|
|
122
|
-
|
|
123
|
-
This is durable but requires re-editing on every plugin update. Prefer #2 below.
|
|
124
|
-
|
|
125
|
-
### 2. Runtime override via `.build-loop/config.json` (recommended)
|
|
126
|
-
|
|
127
|
-
```json
|
|
128
|
-
{
|
|
129
|
-
"modelOverrides": {
|
|
130
|
-
"frontier": "gpt-5.5",
|
|
131
|
-
"thinking": "gpt-5.4",
|
|
132
|
-
"code": "gpt-5.4-mini",
|
|
133
|
-
"pattern": "gpt-5-nano"
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
```
|
|
137
|
-
|
|
138
|
-
Configs that predate the `frontier` tier resolve `frontier` → `fable` automatically (built-in tier default in `scripts/model_overrides.py`), so older repos keep working without edits.
|
|
139
|
-
|
|
140
|
-
The orchestrator resolves this before dispatching each subagent with
|
|
141
|
-
`scripts/model_overrides.py`. Frontmatter `model:` becomes the fallback when an
|
|
142
|
-
override is absent for that tier.
|
|
143
|
-
|
|
144
|
-
```bash
|
|
145
|
-
python3 scripts/model_overrides.py \
|
|
146
|
-
--workdir "$PWD" \
|
|
147
|
-
--tier code \
|
|
148
|
-
--fallback sonnet \
|
|
149
|
-
--json
|
|
150
|
-
```
|
|
151
|
-
|
|
152
|
-
Resolution order is repo config first, then `.build-loop/state.json`
|
|
153
|
-
`config.modelOverrides`, then the supplied fallback. Use `--require` when a
|
|
154
|
-
tier must resolve to a concrete model before dispatch.
|
|
155
|
-
|
|
156
|
-
### 3. Per-dispatch override
|
|
157
|
-
|
|
158
|
-
When dispatching a subagent for a one-off task that needs a different tier:
|
|
159
|
-
|
|
160
|
-
```
|
|
161
|
-
Agent({
|
|
162
|
-
subagent_type: "build-loop:implementer",
|
|
163
|
-
model: "claude-opus-4-7", // override Sonnet → Opus for this dispatch
|
|
164
|
-
prompt: "..."
|
|
165
|
-
})
|
|
166
|
-
```
|
|
167
|
-
|
|
168
|
-
This is what happens during escalation (e.g. "2 consecutive failures on the same chunk → escalate to Thinking tier per `model-tiering`").
|
|
169
|
-
|
|
170
|
-
## Tier-vs-task quick reference
|
|
171
|
-
|
|
172
|
-
When you see a task in build-loop, classify it before assigning a tier:
|
|
173
|
-
|
|
174
|
-
| Task | Reasoning shape | Tier |
|
|
175
|
-
|---|---|---|
|
|
176
|
-
| Frame goal, ADRs, scope, MECE-partition | Planning synthesis | Frontier |
|
|
177
|
-
| Plan-critic vs rubric | Verification synthesis | Frontier |
|
|
178
|
-
| Implement commit's owned files | Application | Code |
|
|
179
|
-
| Severity-rank findings (post-verdict routing) | Coordination synthesis | Thinking |
|
|
180
|
-
| Mock-data scan | Recognition | Pattern |
|
|
181
|
-
| Trace caller-paths (scope-auditor) | Verification synthesis | Frontier |
|
|
182
|
-
| Independent-auditor vs diff | Verification synthesis | Frontier |
|
|
183
|
-
| Audit / learnings write (no verdict being rendered) | Coordination synthesis | Thinking |
|
|
184
|
-
| Recurring-pattern detection | Recognition | Pattern |
|
|
185
|
-
|
|
186
|
-
The decision tree (from `model-tiering/SKILL.md`):
|
|
187
|
-
1. "Single-correct answer derivable from a rule applied to bounded input?" → Application / Code tier
|
|
188
|
-
2. Else "Pure pattern-match, no gradient?" → Recognition / Pattern tier
|
|
189
|
-
3. Else, Synthesis. Then: "Is this a planning decision (what to build) or a verification verdict (did it hold)?" → Frontier tier
|
|
190
|
-
4. Else (routing, escalation, audit-synthesis without a verdict) → Thinking tier
|
|
191
|
-
|
|
192
|
-
## Dual-mode A/B test design (preserved)
|
|
193
|
-
|
|
194
|
-
Build-loop intentionally supports two dispatch modes to enable continued A/B testing on tier-mix tradeoffs:
|
|
195
|
-
|
|
196
|
-
### Mode A — Top-level / fan-out (default)
|
|
197
|
-
- **Invocation:** `/build-loop:run` invoked as a Skill from user session
|
|
198
|
-
- **Tier mix:** Thinking orchestrator + up to 4 Code-tier implementer subagents in parallel + Code-tier critic + Thinking-tier severity ranking + Thinking-tier audit
|
|
199
|
-
- **Anthropic mapping:** Opus orchestrator + Sonnet implementer fan-out
|
|
200
|
-
- **Best for:** features with ≥3 truly parallel-safe chunks, large feature size (≥10 commits), repetitive patterns
|
|
201
|
-
|
|
202
|
-
### Mode B — Inline / single-context (preserved for A/B comparison + small features)
|
|
203
|
-
- **Invocation:** `Agent(subagent_type="build-loop:build-orchestrator", ...)` from any session
|
|
204
|
-
- **Tier mix:** Thinking-tier orchestrator handles ALL phases inline (no-sub-sub-agents rule kicks in)
|
|
205
|
-
- **Anthropic mapping:** all-Opus single context
|
|
206
|
-
- **Best for:** small/medium features (≤6 commits), cross-cutting refactors where catching all-the-callsites matters more than per-token cost, sequential dependency chains, comparison runs against Mode A
|
|
207
|
-
|
|
208
|
-
The orchestrator detects which mode it's in via the dispatch path (top-level message vs subagent invocation) and adapts behavior at `agents/build-orchestrator.md:529-530`. **Both modes share the same plan, the same Phase 1-4 logic, and the same Phase 6 Learn signals.** The only difference is whether implementer work fans out to Code-tier subagents (Mode A) or runs inline in the Thinking-tier orchestrator's context (Mode B).
|
|
209
|
-
|
|
210
|
-
This dual-mode design is **not deprecated** — it's the intentional architecture for tier-comparison telemetry. Future build-loop changes that affect dispatch must preserve both modes.
|
|
211
|
-
|
|
212
|
-
## Multi-model implications for the dispatch test
|
|
213
|
-
|
|
214
|
-
When swapping providers, the dispatch-pattern A/B test should be re-run because:
|
|
215
|
-
- **Wall-clock per tier varies by provider.** GPT-5 Codex may be faster or slower than Sonnet 5 at scoped code application.
|
|
216
|
-
- **Cost ratios shift.** Some providers price the Thinking tier closer to the Code tier (smaller multiplier); others price wider.
|
|
217
|
-
- **Cross-context-window effects.** Mode B's "single Opus context" wins partly come from full-file-system visibility; the same effect may differ on a model with a smaller context window.
|
|
218
|
-
- **Tool-use fidelity.** Mode A's parallel implementer fan-out depends on the Code tier reliably calling Read/Edit/Bash tools without hallucination. This varies materially across providers.
|
|
219
|
-
|
|
220
|
-
When introducing a new provider to a project, prefer Mode B for the first 2-3 builds to establish a quality baseline, then enable Mode A once the new Code-tier model has shown stable tool-use behavior.
|
|
221
|
-
|
|
222
|
-
## Dynamic tier assignment (guide, not a fixed rule)
|
|
223
|
-
|
|
224
|
-
The orchestrator **judges each subtask's complexity at dispatch time** and assigns the tier that fits. This is adaptive, not a fixed table.
|
|
225
|
-
|
|
226
|
-
**Priority order: accuracy > speed > cost.** Pick the tier that does the work CORRECTLY first — never trade accuracy for a cheaper or faster model. Among accuracy-equivalent options, prefer the faster path (spawn Opus subagents to accelerate complex work; fan out in parallel). Optimize cost only after accuracy and speed are both satisfied — cost is the last lever, never the first. This is why every subagent's output is verified (accuracy) and why Opus subagents are used freely on hard tasks (speed on complexity beats pinching tier cost).
|
|
227
|
-
|
|
228
|
-
**Tier assignment guide:**
|
|
229
|
-
|
|
230
|
-
| Task shape | Tier |
|
|
231
|
-
|---|---|
|
|
232
|
-
| Pure recognition, extraction, classification, mechanical sweep — "find X", "list/grep Y", "scan for Z", "extract these fields", "run detector + summarize its JSON", "does this match the pattern". No rule-application, no cross-file reasoning. | **Pattern / Haiku** |
|
|
233
|
-
| Apply a known rule or spec to bounded input. Scoped implementation per owned-files. The "how" when the "what" is settled. | **Code / Sonnet** — default workhorse; prefer Sonnet over Haiku when in doubt |
|
|
234
|
-
| Coordination, routing, ambiguous-spec interpretation, novel architecture decision mid-execution, causal-tree on stuck iterations, user-trust prose where no verification verdict is being rendered. | **Thinking / Opus** — orchestrator default, AND available to accelerate genuinely complex execution subtasks |
|
|
235
|
-
| Planning synthesis (frame goal, draft spec/ADRs, F-criteria, MECE partition) **when stakes-gated via the Advisor dispatch ladder** (`synthesisDensity > 5`, `riskSurfaceChange`, `stakes >= medium`, or `dispatch_tier: frontier`) OR verification verdicts (plan-critic, scope-auditor, independent-auditor, fix-critique, fact-checker, security-reviewer, overfitting-reviewer, promotion-reviewer). | **Frontier / Fable** — wrong plans and wrong verdicts compound; pays the premium. Plan synthesis reaches Fable through the `advisor` agent / peer host / already-Fable session; when no trigger fires or no dispatch path is reachable it runs inline on the orchestrator's model (Opus), labeled honestly — the floor equals today's behavior. See `skills/build-loop/references/advisor-dispatch-ladder.md`. |
|
|
236
|
-
|
|
237
|
-
**Prefer Sonnet.** Sonnet is the workhorse for the bulk of build-loop's work. Down-tier to Haiku only for tasks that are genuinely trivial/mechanical — pure pattern-match, no judgment, no gradient. When in doubt, use Sonnet.
|
|
238
|
-
|
|
239
|
-
**Opus subagents are allowed** to accelerate complex subtasks — cross-file reasoning, novel design, ambiguous specs, hard refactors. Opus is no longer reserved for the orchestrator alone. The orchestrator MAY spawn an Opus subagent when a subtask is complex enough that a stronger model would produce materially better or faster results. Use Opus to accelerate complex work, not only for top-level synthesis.
|
|
240
|
-
|
|
241
|
-
Both escalation directions are active on every dispatch decision: escalate up when complexity exceeds the assigned tier; down-tier when the task is genuinely below it.
|
|
242
|
-
|
|
243
|
-
For `model: inherit` agents (fact-checker, fix-critique, root-cause-investigator), the **caller** passes the appropriate tier — the agent inherits what the caller assigned.
|
|
244
|
-
|
|
245
|
-
### Verify every subagent (the safety net for dynamic tiering)
|
|
246
|
-
|
|
247
|
-
Because tiers are assigned adaptively, every subagent's output is **checked before it is accepted**. The cheaper the tier, the stronger the check. This per-subagent verification is what makes dynamic (and occasionally cheaper) assignment safe.
|
|
248
|
-
|
|
249
|
-
Verification ties to build-loop's existing mechanisms:
|
|
250
|
-
- **verify-scope / verify-landed** (Phase 3 commit step) — confirms the implementer only touched owned files and the commit landed cleanly.
|
|
251
|
-
- **independent-auditor** (Phase 4 Review-A) — adversarial LLM-grade read of the full build's output.
|
|
252
|
-
- **implementer return envelope** — every subagent returns a structured envelope; `status: blocked | partial` routes to Iterate before the output is accepted.
|
|
253
|
-
|
|
254
|
-
No subagent output is trusted unchecked. The verification chain is a first-class requirement, not a backstop.
|
|
255
|
-
|
|
256
|
-
### Fan-out / workflow agents
|
|
257
|
-
|
|
258
|
-
When fanning out bounded agents via the Workflow tool, a dynamic-workflow, or a rallyflow mini-loop, assign each agent by the same guide:
|
|
259
|
-
|
|
260
|
-
- **Recognition/extraction/scan-and-summarize** → Haiku (Pattern tier) — genuinely trivial mechanical work
|
|
261
|
-
- **Apply rules or reason across files** → **Sonnet** (Code tier) — default for fan-out agents
|
|
262
|
-
- **Cross-file, novel, or ambiguous subtask** → Opus (Thinking tier) — when the subtask warrants it
|
|
263
|
-
- **Single synthesis agent** (aggregates fan-out results, cross-agent judgment) → Opus only when synthesis dimensions exceed the Code-tier contract
|
|
264
|
-
|
|
265
|
-
Fan-out breadth multiplies token cost linearly — but the right fix is matching tier to task complexity, not defaulting every agent to the cheapest tier. Prefer Sonnet for fan-out agents; drop to Haiku only for the genuinely mechanical bounded ones.
|
|
266
|
-
|
|
267
|
-
Concrete dispatch pattern:
|
|
268
|
-
|
|
269
|
-
```
|
|
270
|
-
Agent({
|
|
271
|
-
subagent_type: "build-loop:implementer",
|
|
272
|
-
model: "haiku", // recognition task — scan for mock-data patterns
|
|
273
|
-
prompt: "Scan files X..Z for hardcoded test data. Return a JSON list of findings."
|
|
274
|
-
})
|
|
275
|
-
|
|
276
|
-
Agent({
|
|
277
|
-
subagent_type: "build-loop:implementer",
|
|
278
|
-
model: "sonnet", // default for rule-application / scoped implementation
|
|
279
|
-
prompt: "Implement the auth middleware per the spec in intent.md. Owned files: ..."
|
|
280
|
-
})
|
|
281
|
-
|
|
282
|
-
Agent({
|
|
283
|
-
subagent_type: "build-loop:implementer",
|
|
284
|
-
model: "opus", // complex subtask — cross-file refactor, ambiguous spec
|
|
285
|
-
prompt: "Refactor the session management layer across auth/* and middleware/*. ..."
|
|
286
|
-
})
|
|
287
|
-
```
|
|
288
|
-
|
|
289
|
-
## Round-3 evidence (2026-05-07) — preserved for context
|
|
290
|
-
|
|
291
|
-
| Mode | Wall-clock | Tokens | Notes |
|
|
292
|
-
|---|---|---|---|
|
|
293
|
-
| A (Opus + Sonnet fan-out, 4-parallel Wave 1) | ~11 min | ~600K total (~50/50 Thinking/Code) | parallel-commit race required orchestrator-side recovery (~3-4 min of 11-min total) |
|
|
294
|
-
| B (Opus inline, serial) | ~23 min | ~150K Thinking only | 0 iterations, caught a schema field bug A's scoped implementer missed |
|
|
295
|
-
|
|
296
|
-
A's wall-clock advantage on round 3 was real (parallel structure exists in the feature); cost ratio is ~4× (A burns more tokens). Both modes shipped working features.
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
<!-- SPDX-FileCopyrightText: 2025-2026 Tyrone Ross, Jr <46267523+tyroneross@users.noreply.github.com> | SPDX-License-Identifier: Apache-2.0 -->
|
|
2
|
-
|
|
3
|
-
# Modular Systems Pack
|
|
4
|
-
|
|
5
|
-
Use this pack on every non-trivial build. It makes modular, scalable structure the default while allowing a simpler or more integrated approach when that better serves the use case.
|
|
6
|
-
|
|
7
|
-
## Default
|
|
8
|
-
|
|
9
|
-
Build-loop should prefer systems that are:
|
|
10
|
-
|
|
11
|
-
- **Modular**: each module hides one important design decision behind a stable interface.
|
|
12
|
-
- **Scalable**: the design can grow in data volume, user volume, feature count, or team ownership without immediate redesign.
|
|
13
|
-
- **MECE**: task groups, file ownership, and agent scopes are mutually exclusive and collectively exhaustive.
|
|
14
|
-
- **Pyramid-structured**: plans, handoffs, reports, and repo organization lead with the governing thought, then supporting groups, then details.
|
|
15
|
-
|
|
16
|
-
This is a default, not dogma. The goal is durable user value, not extra architecture.
|
|
17
|
-
|
|
18
|
-
## Exception Rule
|
|
19
|
-
|
|
20
|
-
Do not add modularity for its own sake. Choose a simpler or more integrated approach when:
|
|
21
|
-
|
|
22
|
-
- The change is a one-off script, short-lived migration, or isolated fix.
|
|
23
|
-
- A new boundary would add indirection without reducing real complexity.
|
|
24
|
-
- A performance hot path needs a tightly integrated implementation.
|
|
25
|
-
- The repo is small and the added module structure would obscure the core workflow.
|
|
26
|
-
- The product need is intentionally limited and extra optionality would confuse users.
|
|
27
|
-
|
|
28
|
-
When taking an exception, record:
|
|
29
|
-
|
|
30
|
-
```text
|
|
31
|
-
MODULARITY EXCEPTION: <why simpler/integrated is better for this use case>
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
## MECE File And Agent Partition
|
|
35
|
-
|
|
36
|
-
Phase 2 Plan must partition work so every changed file has exactly one owner and every required responsibility has an owner.
|
|
37
|
-
|
|
38
|
-
For each task group, use this packet:
|
|
39
|
-
|
|
40
|
-
```md
|
|
41
|
-
Group: <name>
|
|
42
|
-
Dimension: <domain | layer | workflow | bounded context | adapter | test surface>
|
|
43
|
-
Owns files: <paths>
|
|
44
|
-
Does not own: <paths handled elsewhere>
|
|
45
|
-
Interface contract: <exports/events/API/schema it may change>
|
|
46
|
-
Integration checkpoint: <command or review step>
|
|
47
|
-
Intent link: <north-star or user-value rule this group supports>
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
MECE checks:
|
|
51
|
-
|
|
52
|
-
- No overlap: a file or interface is not owned by two agents unless the plan defines a handoff point.
|
|
53
|
-
- No gaps: every required behavior, state, migration, test, and user-facing surface has an owner.
|
|
54
|
-
- One dimension per level: avoid mixing domains, layers, and workflows in the same grouping level.
|
|
55
|
-
- Stable interfaces: agents can change internals, but cross-group contracts are explicit.
|
|
56
|
-
- Integration checkpoint: every boundary has a test, build, visual check, schema check, or reviewer step.
|
|
57
|
-
|
|
58
|
-
## Modular Design Heuristics
|
|
59
|
-
|
|
60
|
-
- Hide volatile decisions behind small interfaces: data shape, provider choice, algorithm, storage, rendering strategy, or external API.
|
|
61
|
-
- Prefer high cohesion: code that changes for the same reason lives together.
|
|
62
|
-
- Prefer loose coupling: callers depend on published interfaces, not internal data structures or side effects.
|
|
63
|
-
- Design around business/domain capabilities when the system is large enough for domains to matter.
|
|
64
|
-
- Keep boundaries small enough to understand and large enough to own a useful capability.
|
|
65
|
-
- Separate deploy/runtime config from code when values vary by environment.
|
|
66
|
-
- Preserve directness when extra layers make the core workflow harder to read, test, or operate.
|
|
67
|
-
|
|
68
|
-
## Pyramid Structure
|
|
69
|
-
|
|
70
|
-
Use pyramid structure for plans, reports, repo notes, and agent handoffs:
|
|
71
|
-
|
|
72
|
-
1. Governing thought: the one decision, result, or recommendation.
|
|
73
|
-
2. MECE key lines: 3-5 non-overlapping supporting claims or work groups.
|
|
74
|
-
3. Evidence/details: commands, files, risks, interfaces, and validation.
|
|
75
|
-
|
|
76
|
-
For repo structure, this means names should communicate purpose, folders should group by one clear dimension, and cross-cutting utilities should stay genuinely shared rather than becoming a junk drawer.
|
|
77
|
-
|
|
78
|
-
## Review Gates
|
|
79
|
-
|
|
80
|
-
Critic and final review should flag:
|
|
81
|
-
|
|
82
|
-
- Avoidable tight coupling or weak cohesion.
|
|
83
|
-
- Hidden cross-file ownership overlap between agents.
|
|
84
|
-
- Missing owner for a required behavior, state, migration, test, or user-facing surface.
|
|
85
|
-
- Abstraction added without user, scalability, testability, security, or maintainability benefit.
|
|
86
|
-
- Simplification that collapses a boundary needed for accuracy, security, scale, testability, or future optionality.
|
|
87
|
-
- Missing `MODULARITY EXCEPTION` when the plan intentionally chooses an integrated shortcut.
|
|
88
|
-
|
|
89
|
-
## Source Basis
|
|
90
|
-
|
|
91
|
-
- Parnas, "On the Criteria to Be Used in Decomposing Systems into Modules" (CACM, 1972): https://cacm.acm.org/research/on-the-criteria-to-be-used-in-decomposing-systems-into-modules/
|
|
92
|
-
- AWS Well-Architected REL04-BP02, "Implement loosely coupled dependencies": https://docs.aws.amazon.com/wellarchitected/2024-06-27/framework/rel_prevent_interaction_failure_loosely_coupled_system.html
|
|
93
|
-
- Microsoft Azure Architecture Center, domain analysis for microservices: https://learn.microsoft.com/en-us/azure/architecture/microservices/model/domain-analysis
|
|
94
|
-
- Microsoft Azure Architecture Center, design principles for Azure applications: https://learn.microsoft.com/en-gb/azure/architecture/guide/design-principles/
|
|
95
|
-
- Twelve-Factor App config guidance: https://12factor.net/config
|
|
96
|
-
- MECE framework overview: https://www.casestar.io/guides/mece
|