@tyroneross/build-loop 0.30.3 → 0.34.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 +4 -4
- package/.claude-plugin/plugin.json +1 -1
- package/.codex-plugin/plugin.json +1 -1
- package/AGENTS.md +9 -0
- package/README.md +8 -7
- package/agents/advisor.md +111 -0
- package/agents/alignment-checker.md +11 -0
- package/agents/assessment-orchestrator.md +1 -1
- package/agents/build-orchestrator.md +28 -33
- package/agents/fact-checker.md +1 -1
- package/agents/fix-critique.md +1 -1
- package/agents/independent-auditor.md +1 -1
- package/agents/overfitting-reviewer.md +1 -1
- package/agents/plan-critic.md +5 -4
- package/agents/promotion-reviewer.md +1 -1
- package/agents/retrospective-synthesizer.md +20 -3
- package/agents/scope-auditor.md +1 -1
- package/agents/security-reviewer.md +1 -1
- package/agents/self-improvement-architect.md +1 -1
- package/commands/{handoff.md → compose-handoff.md} +4 -4
- package/commands/{optimize.md → optimize-run.md} +1 -1
- package/commands/{agent-rally-point.md → rally-point.md} +3 -3
- package/commands/{research.md → research-run.md} +1 -1
- package/commands/setup-memory.md +32 -0
- package/commands/{plan-verify.md → verify-plan.md} +1 -1
- package/docs/agent-surface-policy.md +38 -20
- package/docs/memory-setup.md +19 -14
- package/hooks/_resolve_python.sh +28 -0
- package/hooks/closeout.sh +58 -0
- package/hooks/git/pre-push +69 -6
- package/hooks/hooks.json +34 -13
- package/hooks/post-push-closeout.sh +73 -0
- package/hooks/session-start-closeout.sh +69 -0
- package/hooks/session-start-memory.sh +27 -0
- package/hooks/session-start-plugin-heal.sh +33 -0
- package/hooks/test_closeout.sh +124 -0
- package/package.json +7 -4
- package/plugin-artifacts/codex/.codex-plugin/plugin.json +41 -0
- package/plugin-artifacts/codex/AGENTS.md +499 -0
- package/plugin-artifacts/codex/BUILD-ARTIFACT.md +5 -0
- package/plugin-artifacts/codex/LICENSE +202 -0
- package/plugin-artifacts/codex/README.md +404 -0
- package/plugin-artifacts/codex/docs/agent-surface-policy.md +63 -0
- package/plugin-artifacts/codex/references/advisor-dispatch-ladder.md +62 -0
- package/plugin-artifacts/codex/references/agent-role-taxonomy.md +101 -0
- package/plugin-artifacts/codex/references/autonomous-and-per-commit-modes.md +161 -0
- package/plugin-artifacts/codex/references/autonomy-config.md +231 -0
- package/plugin-artifacts/codex/references/capability-routing.md +182 -0
- package/plugin-artifacts/codex/references/codex-subagents.md +106 -0
- package/plugin-artifacts/codex/references/coordination-file-template.md +181 -0
- package/plugin-artifacts/codex/references/coordination-rules.md +283 -0
- package/plugin-artifacts/codex/references/dogfood-reload-checkpoint.md +112 -0
- package/plugin-artifacts/codex/references/halt-and-ask-protocol.md +102 -0
- package/plugin-artifacts/codex/references/implementer-envelope-schema.md +302 -0
- package/plugin-artifacts/codex/references/intent-capability-pack.md +257 -0
- package/plugin-artifacts/codex/references/intent-exploration-prompts.md +96 -0
- package/plugin-artifacts/codex/references/leadership.md +72 -0
- package/plugin-artifacts/codex/references/memory-systems.md +238 -0
- package/plugin-artifacts/codex/references/memory.md +297 -0
- package/plugin-artifacts/codex/references/model-tier-mapping.md +257 -0
- package/plugin-artifacts/codex/references/modular-systems-pack.md +96 -0
- package/plugin-artifacts/codex/references/phase-1-assess.md +231 -0
- package/plugin-artifacts/codex/references/phase-2-plan.md +77 -0
- package/plugin-artifacts/codex/references/phase-3-execute.md +47 -0
- package/plugin-artifacts/codex/references/phase-4-review.md +320 -0
- package/plugin-artifacts/codex/references/phase-5-iterate.md +71 -0
- package/plugin-artifacts/codex/references/phase-6-learn.md +56 -0
- package/plugin-artifacts/codex/references/recent-design-structures.md +274 -0
- package/plugin-artifacts/codex/references/research-trigger-policy.md +140 -0
- package/plugin-artifacts/codex/references/runtime-smoke-triggers.md +42 -0
- package/plugin-artifacts/codex/references/self-review.md +234 -0
- package/plugin-artifacts/codex/references/single-writer-commit-protocol.md +90 -0
- package/plugin-artifacts/codex/references/task-capture-policy.md +68 -0
- package/plugin-artifacts/codex/references/ui-io-contract.md +116 -0
- package/plugin-artifacts/codex/references/ui-spotcheck-protocol.md +65 -0
- package/plugin-artifacts/codex/skills/build-loop/SKILL.md +372 -0
- package/plugin-artifacts/codex/skills/build-loop/detect-plugins.mjs +82 -0
- package/plugin-artifacts/codex/skills/build-loop/eval-guide.md +65 -0
- package/plugin-artifacts/codex/skills/build-loop/fallbacks.md +549 -0
- package/plugin-artifacts/codex/skills/build-loop/phases/fact-check.md +42 -0
- package/plugin-artifacts/codex/skills/build-loop/phases/ui-validation.md +267 -0
- package/plugin-artifacts/codex/skills/build-loop/references/advisor-dispatch-ladder.md +62 -0
- package/plugin-artifacts/codex/skills/build-loop/references/apple-native-planning.md +439 -0
- package/plugin-artifacts/codex/skills/build-loop/references/autonomous-and-per-commit-modes.md +161 -0
- package/plugin-artifacts/codex/skills/build-loop/references/capability-routing.md +182 -0
- package/plugin-artifacts/codex/skills/build-loop/references/codex-subagents.md +106 -0
- package/plugin-artifacts/codex/skills/build-loop/references/coordination.md +161 -0
- package/plugin-artifacts/codex/skills/build-loop/references/correction-aware-capture.md +177 -0
- package/plugin-artifacts/codex/skills/build-loop/references/independent-auditor.md +72 -0
- package/plugin-artifacts/codex/skills/build-loop/references/intent-capability-pack.md +257 -0
- package/plugin-artifacts/codex/skills/build-loop/references/intent-exploration-prompts.md +96 -0
- package/plugin-artifacts/codex/skills/build-loop/references/leadership.md +72 -0
- package/plugin-artifacts/codex/skills/build-loop/references/memory.md +297 -0
- package/plugin-artifacts/codex/skills/build-loop/references/modular-systems-pack.md +96 -0
- package/plugin-artifacts/codex/skills/build-loop/references/output-style.md +129 -0
- package/plugin-artifacts/codex/skills/build-loop/references/pay-it-forward-arch.md +98 -0
- package/plugin-artifacts/codex/skills/build-loop/references/phase-1-assess.md +231 -0
- package/plugin-artifacts/codex/skills/build-loop/references/phase-2-plan.md +77 -0
- package/plugin-artifacts/codex/skills/build-loop/references/phase-3-execute.md +47 -0
- package/plugin-artifacts/codex/skills/build-loop/references/phase-4-review.md +320 -0
- package/plugin-artifacts/codex/skills/build-loop/references/phase-5-iterate.md +71 -0
- package/plugin-artifacts/codex/skills/build-loop/references/phase-6-learn.md +56 -0
- package/plugin-artifacts/codex/skills/build-loop/references/recent-design-structures.md +274 -0
- package/plugin-artifacts/codex/skills/build-loop/references/refactor-history/ASSESSMENT.md +85 -0
- package/plugin-artifacts/codex/skills/build-loop/references/refactor-history/STANDALONE_TEST_RUN.md +149 -0
- package/plugin-artifacts/codex/skills/build-loop/references/refactor-history/scenarios/01-simple-bugfix.md +32 -0
- package/plugin-artifacts/codex/skills/build-loop/references/refactor-history/scenarios/02-ui-build-with-iteration.md +48 -0
- package/plugin-artifacts/codex/skills/build-loop/references/refactor-history/scenarios/03-multi-failure-escalation.md +60 -0
- package/plugin-artifacts/codex/skills/build-loop/references/refactor-history/scenarios/04-ui-build-ibr-absent.md +51 -0
- package/plugin-artifacts/codex/skills/build-loop/references/refactor-history/scenarios/05-refactor-navgator-absent.md +71 -0
- package/plugin-artifacts/codex/skills/build-loop/references/refactor-history/scenarios/06-recurring-bug-debugger-absent.md +52 -0
- package/plugin-artifacts/codex/skills/build-loop/references/refactor-history/trace-comparison.md +202 -0
- package/plugin-artifacts/codex/skills/build-loop/references/self-recursive-dev.md +77 -0
- package/plugin-artifacts/codex/skills/build-loop/references/self-review.md +234 -0
- package/plugin-artifacts/codex/skills/build-loop/references/ui-io-contract.md +116 -0
- package/plugin-artifacts/codex/skills/build-loop/scanners/audit-design-rules.mjs +476 -0
- package/plugin-artifacts/codex/skills/build-loop/scanners/require-visual-evidence.mjs +239 -0
- package/plugin-artifacts/codex/skills/build-loop/templates/backlog-item.md +35 -0
- package/plugin-artifacts/codex/skills/build-loop/templates/codex-worker-prompt.md +96 -0
- package/plugin-artifacts/codex/skills/build-loop/templates/ui-subagent-prompt.md +179 -0
- package/plugin-artifacts/codex/skills/build-loop/templates/ux-fix-plan.md +40 -0
- package/scripts/_paths.py +59 -13
- package/scripts/build_codex_plugin_artifact.py +314 -0
- package/scripts/check_cache_sync.py +1 -1
- package/scripts/install_memory.py +11 -3
- package/scripts/prune_plugin_cache.py +225 -11
- package/scripts/sync_navgator_lessons.py +25 -0
- package/scripts/sync_plugin_cache.py +66 -36
- package/skills/agent-rally-point/SKILL.md +1 -1
- package/skills/agent-rally-watcher/SKILL.md +1 -1
- package/skills/build-loop/SKILL.md +11 -155
- package/skills/build-loop/references/advisor-dispatch-ladder.md +62 -0
- package/skills/build-loop/references/autonomous-and-per-commit-modes.md +161 -0
- package/skills/build-loop/references/capability-routing.md +4 -3
- package/skills/build-loop/references/codex-subagents.md +8 -0
- package/skills/build-loop/references/coordination.md +1 -1
- package/skills/build-loop/references/intent-capability-pack.md +88 -1
- package/skills/build-loop/references/memory.md +17 -2
- package/skills/build-loop/references/phase-1-assess.md +13 -0
- package/skills/build-loop/references/phase-2-plan.md +1 -1
- package/skills/build-loop/references/phase-4-review.md +12 -0
- package/skills/build-loop/references/phase-6-learn.md +1 -1
- package/skills/build-loop/references/self-review.md +4 -2
- package/skills/build-loop/templates/codex-worker-prompt.md +41 -34
- package/skills/handoff/SKILL.md +3 -3
- package/skills/loop-builder/SKILL.md +98 -0
- package/skills/loop-builder/presets/active-project-evidence.yaml +97 -0
- package/skills/loop-builder/presets/generic-artifact-loop.yaml +95 -0
- package/skills/loop-builder/presets/presentation-audit.yaml +96 -0
- package/skills/loop-builder/presets/research-synthesis.yaml +96 -0
- package/skills/loop-builder/presets/source-ingestion-raw-data-audit.yaml +96 -0
- package/skills/loop-builder/references/spec-format.md +80 -0
- package/skills/loop-builder/scripts/loop_builder.py +346 -0
- package/skills/model-tiering/SKILL.md +65 -40
- package/skills/optimize/SKILL.md +2 -2
- package/skills/plan-verify/SKILL.md +1 -1
- package/skills/plugin-builder/references/distribution.md +8 -0
- package/skills/research/SKILL.md +33 -6
- package/skills/runtime-parity-verification/SKILL.md +51 -0
- package/skills/spec-writing/SKILL.md +19 -0
- package/templates/memory/README.md +65 -0
- package/templates/memory/charter.md.template +46 -0
- package/templates/memory/manifest.json +24 -4
- package/codex-skills/debug-loop/SKILL.md +0 -18
- package/codex-skills/handoff/SKILL.md +0 -22
- package/codex-skills/knowledge/SKILL.md +0 -21
- package/codex-skills/optimize/SKILL.md +0 -18
- package/codex-skills/research/SKILL.md +0 -18
- /package/commands/{knowledge-review.md → review-knowledge.md} +0 -0
|
@@ -17,18 +17,21 @@ skill answers "which tier should run the role?", not "who owns the work?".
|
|
|
17
17
|
|
|
18
18
|
| Tier | Anthropic default | Role | Equivalents (advisory — verify benchmarks before swapping) |
|
|
19
19
|
|---|---|---|---|
|
|
20
|
-
| **
|
|
21
|
-
| **
|
|
20
|
+
| **Frontier** | Fable 5 | **Phase 2 Plan synthesis (frame goal, draft spec/ADRs, F-criteria, MECE partition) via the Advisor dispatch ladder when stakes-gated** — `advisor` agent / peer host / already-Fable session; honestly-labeled inline-Opus fallback otherwise (`references/advisor-dispatch-ladder.md`). (Advisor v1 = Phase 2 only; Phase 1 Assess synthesis runs inline as today until v2.) AND verification judgment (plan-critic, scope-auditor, independent-auditor, fix-critique, fact-checker, security-reviewer, overfitting-reviewer, promotion-reviewer) | GPT-5.5 Thinking (or whichever tier scores above the prior Thinking-tier ceiling), future Claude tier above Opus; any model that benchmarks above the Thinking-tier contract on SWE-bench Verified AND ARC-AGI / GPQA Diamond |
|
|
21
|
+
| **Thinking** | Opus 4.8 | Coordination — build-orchestrator, assessment-orchestrator — and the escalation target for execution (ambiguous spec, 2 consecutive failures, cross-file surprise) and audit/learnings synthesis when Frontier is unavailable | GPT-5 Thinking, Gemini 2.5 Pro; any model >= Opus 4.6 on SWE-bench Verified + Frontier-class on ARC-AGI / MMLU-Pro |
|
|
22
|
+
| **Code** | Sonnet 4.6 | Application — apply rule to bounded input, scoped implementation, mechanical refactor, bounded domain assessment | Sonnet 4.7+, GPT-5 Codex, qwen2.5-coder-32B (local); any model with SWE-bench Verified within ~5pt of Sonnet 4.6 (currently ~79.6%) |
|
|
22
23
|
| **Pattern** | Haiku 4.5 | Recognition — regex/syntactic match, classification into known buckets, log scan, deterministic checklist | Haiku 4.6, GPT-5 Mini, llama3.2-3b (local); any small/fast model that handles structured pattern matching |
|
|
23
24
|
|
|
24
|
-
**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 Pattern tier no benchmark — just "fast and cheap, doesn't hallucinate on bounded structured tasks."
|
|
25
|
+
**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."
|
|
26
|
+
|
|
27
|
+
**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).
|
|
25
28
|
|
|
26
29
|
## Provider-swap recipe
|
|
27
30
|
|
|
28
|
-
Build-loop's agent frontmatter uses Anthropic model aliases (`opus`, `sonnet`, `haiku`) because Claude Code is the primary host. To run on a different provider:
|
|
31
|
+
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:
|
|
29
32
|
|
|
30
|
-
1. **One-time edit per agent:** open each `agents/*.md` and change the `model:` field to your provider's equivalent. The tier (Thinking/Code/Pattern) determines the substitution target.
|
|
31
|
-
2. **Runtime override:** `.build-loop/config.json.modelOverrides` accepts `{ 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).
|
|
33
|
+
1. **One-time edit per agent:** open each `agents/*.md` and change the `model:` field to your provider's equivalent. The tier (Frontier/Thinking/Code/Pattern) determines the substitution target.
|
|
34
|
+
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 → `fable` by default.
|
|
32
35
|
3. **Per-dispatch override:** any orchestrator dispatch may pass `model: <id>` in the subagent prompt to force that call.
|
|
33
36
|
|
|
34
37
|
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.
|
|
@@ -41,7 +44,7 @@ The role-and-task table below uses tier names. The Anthropic-default mapping in
|
|
|
41
44
|
- Deciding whether to escalate mid-flow after failures
|
|
42
45
|
- Evaluating whether to swap providers (use the Tier abstraction table above as the contract)
|
|
43
46
|
|
|
44
|
-
## Evidence base (2026 Q1)
|
|
47
|
+
## Evidence base (2026 Q1–Q2)
|
|
45
48
|
|
|
46
49
|
| Claim | Source | Certainty |
|
|
47
50
|
|-------|--------|-----------|
|
|
@@ -49,43 +52,57 @@ The role-and-task table below uses tier names. The Anthropic-default mapping in
|
|
|
49
52
|
| Opus 4.6: 80.8% SWE-bench Verified (1.2pt gap — smallest in Claude history) | Same | ⚠️ T2, single-source |
|
|
50
53
|
| 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 |
|
|
51
54
|
| Pricing: Sonnet $3/$15 per MTok input/output | Anthropic pricing page | ⚠️ verify before billing |
|
|
52
|
-
| Pricing: Opus $
|
|
55
|
+
| Pricing: Opus 4.8 $5/$25 per MTok input/output | Anthropic pricing page | ⚠️ verify before billing |
|
|
56
|
+
| Pricing: Fable 5 $10/$50 per MTok input/output (1M context, capability tier above Opus 4.8) | claude-api skill cache 2026-05-26 (T1 — Anthropic) | ✅ T1 source, advisory until re-confirmed at next billing audit |
|
|
53
57
|
|
|
54
58
|
## MECE primitive: cognitive type of the task
|
|
55
59
|
|
|
56
|
-
Before consulting the role table, classify the task by reasoning shape. The MECE cut is the kind of thinking the task requires; lifecycle stage (plan/execute/review) is a second-order cut that often mixes types.
|
|
60
|
+
Before consulting the role table, classify the task by reasoning shape. The MECE cut is the kind of thinking the task requires; lifecycle stage (plan/execute/review) is a second-order cut that often mixes types. Within Synthesis, a second-order cut decides whether the task is a planning/verification decision (Frontier) or coordination/escalation/learnings (Thinking).
|
|
57
61
|
|
|
58
62
|
| Reasoning shape | Model | What it means | Example tasks |
|
|
59
63
|
|---|---|---|---|
|
|
60
|
-
| **
|
|
61
|
-
| **
|
|
62
|
-
| **
|
|
64
|
+
| **Planning + Verification synthesis** — frame the goal, draft the spec/ADRs, define F-criteria, MECE-partition the work, then later judge whether a plan, a commit, a fix, a claim, or a security/scope boundary actually holds | **Fable (Frontier)** | The "what to do" and "did it actually work" calls. Wrong calls poison every downstream dispatch. | Phase 2 Plan drafting (reaches Fable via the stakes-gated Advisor ladder; Phase 1 Assess synthesis stays inline until v2), plan-critic, scope-auditor, independent-auditor, fix-critique, fact-checker, security-reviewer, overfitting-reviewer, promotion-reviewer |
|
|
65
|
+
| **Coordination + escalation synthesis** — route work between subagents, ladder severity, run causal-tree on stuck iterations, write audit/learnings | **Opus (Thinking)** | The "who runs next" + "why did the rule run out" calls. Deterministic gates backstop the routing. | build-orchestrator, assessment-orchestrator, severity ranking after critic findings, causal-tree after 2 consecutive failures, Phase 6 Learn audit synthesis (when no Frontier escalation needed) |
|
|
66
|
+
| **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 |
|
|
67
|
+
| **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 |
|
|
63
68
|
|
|
64
|
-
**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 =
|
|
69
|
+
**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/Fable. Else (routing, escalation, audit-synthesis when no verdict is being rendered) = Thinking/Opus.
|
|
65
70
|
|
|
66
71
|
## Default assignments
|
|
67
72
|
|
|
68
73
|
| Task | Reasoning shape | Model | effort | Why |
|
|
69
74
|
|------|------|-------|--------|-----|
|
|
70
|
-
| Frame & plan: goal, ADRs, scope, F-criteria, MECE partition |
|
|
75
|
+
| Frame & plan: goal, ADRs, scope, F-criteria, MECE partition | Planning synthesis | Fable | medium | A wrong plan dispatches N implementers into the wrong work; user's standing priority Accuracy > Speed > Cost |
|
|
71
76
|
| Plan-verify deterministic checklist | Recognition | (script) | — | No model; runs `plan_verify.py` |
|
|
72
|
-
| Plan-critic adversarial review against rubric+checklist |
|
|
73
|
-
|
|
|
74
|
-
| Code execution — bounded chunk, spec clear | Application | Sonnet | medium | Default.
|
|
75
|
-
| Code execution — ambiguous spec |
|
|
76
|
-
|
|
|
77
|
-
|
|
|
77
|
+
| Plan-critic adversarial review against rubric+checklist | Verification synthesis | Fable | high | Verification verdict — separation drives quality; verdict gates Phase 3 dispatch |
|
|
78
|
+
| Scope auditor (Plan→Execute boundary): trace callers of every modified-API symbol; annotate `caller_audit:` per commit | Verification synthesis | Fable | medium | Cross-file call-path tracing AND a gating verdict on whether a commit is `internal_only`; verification compound risk |
|
|
79
|
+
| Code execution — bounded chunk, spec clear | Application | Sonnet | medium | Default workhorse. Spec is settled; apply the rule |
|
|
80
|
+
| Code execution — ambiguous spec or cross-file surprise mid-execution | Coordination synthesis | Opus | medium | Escalation target; interpretation cost cheaper than rework |
|
|
81
|
+
| Independent-auditor adversarial pass (read-only diff vs rubric at chunk + build scope) | Verification synthesis | Fable | high | Verdict gates the build's outcome line; a missed regression in production-impacting work is the most expensive miss in the loop |
|
|
82
|
+
| Severity ranking + recommendation order (given findings) | Coordination synthesis | Opus | medium | Cross-finding routing; no per-finding verdict being rendered, the verdicts are upstream |
|
|
78
83
|
| Mock data scanning | Recognition | Haiku | low | Regex only |
|
|
79
|
-
| Fact-checking — trace metric → source, judge accuracy |
|
|
80
|
-
|
|
|
84
|
+
| Fact-checking — trace metric → source, judge accuracy | Verification synthesis | Fable | medium | Final read on "is this number real" before report ships; user-trust verdict |
|
|
85
|
+
| Fix-critique — pressure-test a proposed fix before "resolved" | Verification synthesis | Fable | medium | Verdict on whether the fix addresses root cause vs symptom; wrong verdict reopens the bug downstream |
|
|
86
|
+
| Security-reviewer — adversarial OWASP/ATLAS pass | Verification synthesis | Fable | high | Verdict gates riskSurfaceChange dispatch; missed exposure is the most expensive verification miss |
|
|
87
|
+
| Overfitting-reviewer — Goodhart / test-gaming verdict on optimize runs | Verification synthesis | Fable | medium | Verdict on whether optimization is genuine; cheap to wrong-call into a regression |
|
|
88
|
+
| Promotion-reviewer — Phase 6 Learn experimental promotion verdict | Verification synthesis | Fable | medium | Gates the move from `experimental/` to `active/`; durable surface |
|
|
81
89
|
| Simplify — apply known simplifications | Application | Sonnet | medium | Inline single-use helper, delete dead branch — bounded |
|
|
82
90
|
| Debugging — symptom-to-known-pattern match | Application | Sonnet | high | Memory-first gate's "Application until the rule runs out" |
|
|
83
|
-
| Debugging — causal-tree after 2 consecutive failures |
|
|
84
|
-
| Novel architecture decision |
|
|
85
|
-
| Writing user-facing prose (copy, microcopy, errors) |
|
|
86
|
-
| Audit / learnings / Phase 6
|
|
91
|
+
| Debugging — causal-tree after 2 consecutive failures | Coordination synthesis | Opus | high | Synthesis takes over routing when rule-match exhausts |
|
|
92
|
+
| Novel architecture decision | Planning synthesis | Fable | medium | Cross-file impact; wrong call compounds |
|
|
93
|
+
| Writing user-facing prose (copy, microcopy, errors) | Coordination synthesis | Opus | medium | Tone, restraint, and nuance matter; no verification verdict being rendered |
|
|
94
|
+
| Audit / learnings / Phase 6 audit synthesis | Coordination synthesis | Opus | medium | Cross-run routing; promotion-reviewer carries the gating verdict separately |
|
|
87
95
|
| Recurring-pattern detection across runs[] | Recognition | Haiku | low | Pattern-match across structured logs |
|
|
88
96
|
|
|
97
|
+
### Deliberate exceptions (Sonnet retained for cost where the surface is high-frequency advisory)
|
|
98
|
+
|
|
99
|
+
Two verification-shaped agents stay on Sonnet rather than escalating to Fable. The tension with round-2 evidence ("rubric-application = Sonnet is robust") is real; the user chose Fable for the rest of the verification surface anyway because the compound risk of a wrong verification verdict outweighs the per-call premium. Pins are defaults, not locks — these can be overridden per dispatch or re-tiered after telemetry.
|
|
100
|
+
|
|
101
|
+
| Agent | Pin | Why retained on Sonnet |
|
|
102
|
+
|---|---|---|
|
|
103
|
+
| `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. |
|
|
104
|
+
| `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. |
|
|
105
|
+
|
|
89
106
|
## Round 2 evidence (2026-05-07, example-app news-podcast iteration 2)
|
|
90
107
|
|
|
91
108
|
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:
|
|
@@ -105,16 +122,20 @@ Findings that updated the model tiering:
|
|
|
105
122
|
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.
|
|
106
123
|
4. **Plan-critic on Sonnet caught 17 substantive findings** on a written spec — confirms "rubric-application = Sonnet" is robust.
|
|
107
124
|
|
|
108
|
-
These findings
|
|
125
|
+
These findings informed the earlier rubric-application=Sonnet split for code review. The current org overrides that for the verification surface specifically — the user chose Fable for verification because a missed verdict at this stage compounds, even though round-2 showed Sonnet rubric-application was substantively robust on a 17-finding plan-critic pass. The exceptions table above (alignment-checker, synthesis-critic) preserves the Sonnet split where the surface is high-frequency advisory and non-gating.
|
|
109
126
|
|
|
110
|
-
## Escalation triggers (
|
|
127
|
+
## Escalation triggers (Sonnet execution → Opus, NOT to Fable)
|
|
111
128
|
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
-
|
|
115
|
-
-
|
|
116
|
-
-
|
|
117
|
-
-
|
|
129
|
+
Execution escalates to **Opus**, not Fable. Fable is reserved for planning and verification; execution under genuine ambiguity is a coordination call (interpret the spec, route to a new chunk, decide whether to re-plan) that the orchestrator owns.
|
|
130
|
+
|
|
131
|
+
- 2 consecutive failures on the same chunk after a retry at effort=high → respawn implementer at Opus
|
|
132
|
+
- Spec is ambiguous and interpretation will materially change implementation → Opus
|
|
133
|
+
- A cross-file architectural decision surfaces mid-execution that wasn't in the plan → Opus, then route back to Plan if the decision changes the MECE partition
|
|
134
|
+
- Critic flags a "strong-checkpoint" finding that requires judgment, not just a fix → Opus
|
|
135
|
+
- Novel error pattern not found in `.build-loop/issues/` or debugging memory → Opus
|
|
136
|
+
- Task produces user-visible prose where tone and restraint are load-bearing → Opus
|
|
137
|
+
|
|
138
|
+
If the ambiguity surfaces a **planning** problem (the original plan no longer fits) rather than an execution problem, route back to Phase 2 Plan — Fable re-plans, then execution resumes on Sonnet/Opus.
|
|
118
139
|
|
|
119
140
|
## Techniques that work
|
|
120
141
|
|
|
@@ -149,19 +170,21 @@ These findings inform the role assignments, especially the rubric-application=So
|
|
|
149
170
|
|
|
150
171
|
## How the build-loop uses this
|
|
151
172
|
|
|
152
|
-
|
|
173
|
+
**Fable plans (when stakes-gated) and verifies. Opus coordinates. Sonnet executes. Haiku recognizes.**
|
|
153
174
|
|
|
154
|
-
|
|
175
|
+
Phase 2 Plan synthesis reaches **Fable** through the **Advisor dispatch ladder** when stakes-gating trips (`synthesisDensity > 5`, `riskSurfaceChange`, `stakes >= medium`, or `dispatch_tier: frontier`): the orchestrator dispatches the `advisor` agent (Rung 1), routes to a peer host (Rung 2), or — if its own session is already Fable — synthesizes inline at Frontier (Rung 0). When no trigger fires or no dispatch path is reachable, the orchestrator synthesizes the plan **inline on its own model (Opus)** and labels it honestly (Rung 3 = today's behavior; the floor equals current state). So "Fable plans" is the *guarantee on high-stakes plans*, with an honestly-labeled inline fallback otherwise — not unconditional. Full protocol: `references/advisor-dispatch-ladder.md`. The Advisor frames the goal, drafts the spec/ADRs, sets F-criteria, and MECE-partitions the work. The orchestrator (**Opus**, `build-orchestrator`, `assessment-orchestrator`) coordinates: it routes dispatches, runs deterministic gates, manages parallel fan-out, walks the Advisor ladder, and handles the escalation ladder. Phase 3 implementer subagents run on **Sonnet** at effort=medium (default workhorse) → external verification gate (tests/lint/types) → adversarial **Fable** verification surface (`plan-critic`, `scope-auditor`, `independent-auditor`, `fix-critique`, `fact-checker`, `security-reviewer`, `overfitting-reviewer`, `promotion-reviewer`). If a strong-checkpoint finding or 2 consecutive chunk failures surface, execution escalates to **Opus** for judgment; if the failure traces back to a planning miss, route back to Fable to re-plan. See `agents/build-orchestrator.md §Escalation Triggers`. The **tier mapping** is the policy; the cost numbers above are advisory context, not the basis for overrides.
|
|
176
|
+
|
|
177
|
+
Haiku is only used for Phase 7B mock scanning and recurring-pattern detection across `runs[]`. Never for reasoning tasks.
|
|
155
178
|
|
|
156
179
|
## Pin vs inherit in agent frontmatter
|
|
157
180
|
|
|
158
181
|
Not every agent should hard-pin its model. Use this rule:
|
|
159
182
|
|
|
160
|
-
- **Pin** (`model: opus | sonnet | haiku`) when the task has a clear right tier and cost/quality drift from user's session choice would be a bug. Examples: `independent-auditor`
|
|
161
|
-
- **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: `
|
|
162
|
-
- **Override mechanism**: users can override any pin by passing `model:` when spawning the agent or by editing the frontmatter. Pins are defaults, not locks.
|
|
183
|
+
- **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. Examples: `plan-critic` / `independent-auditor` / `scope-auditor` / `fact-checker` / `fix-critique` / `security-reviewer` / `overfitting-reviewer` / `promotion-reviewer` (Fable — verification verdicts gate downstream work), `mock-scanner` (Haiku, pattern matching only), `build-orchestrator` and `assessment-orchestrator` (Opus, coordination at plan/review boundaries), `implementer` (Sonnet, default execution workhorse).
|
|
184
|
+
- **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.
|
|
185
|
+
- **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.
|
|
163
186
|
|
|
164
|
-
Forward-compat note: pinned family aliases (`sonnet`, `opus`) auto-track latest versions (e.g., 4.6 → 4.7). `inherit` additionally picks up brand-new tiers (e.g., a future Flash-class model) without frontmatter edits.
|
|
187
|
+
Forward-compat note: pinned family aliases (`fable`, `sonnet`, `opus`) auto-track latest versions in their tier (e.g., Sonnet 4.6 → 4.7, Opus 4.7 → 4.8, Fable 5 → 6). `inherit` additionally picks up brand-new tiers (e.g., a future Flash-class model) without frontmatter edits.
|
|
165
188
|
|
|
166
189
|
## Limitations of this guidance
|
|
167
190
|
|
|
@@ -213,4 +236,6 @@ python3 ${CLAUDE_PLUGIN_ROOT}/scripts/model_overrides.py \
|
|
|
213
236
|
--json
|
|
214
237
|
```
|
|
215
238
|
|
|
239
|
+
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.
|
|
240
|
+
|
|
216
241
|
Full contract and routing matrix: `~/dev/research/topics/llm/llm.build-loop-router-integration-2026-04.md`
|
package/skills/optimize/SKILL.md
CHANGED
|
@@ -40,7 +40,7 @@ Highest-leverage phase. Wrong metric = Goodhart's Law. Wrong factors = wasted ru
|
|
|
40
40
|
|---|---|---|
|
|
41
41
|
| **A. Power-user explicit** | User supplied factors via CLI flag, `.build-loop/optimize/factors.json`, or inline ("optimize batch_size, retries, workers for throughput") | Skip suggestion; use the user's factors directly |
|
|
42
42
|
| **B. Vague optimization** *(default)* | "run optimization", "make my app faster", "improve performance", "speed up", "reduce <metric>" without naming factors | Run factor-identification scan; propose candidates; **AskUserQuestion to confirm before running** |
|
|
43
|
-
| **C. Single-variable explicit** | "simplify this file", "reduce build time", scoped `/build-loop:optimize <known-target>` | Skip DOE; run autoresearch (existing behavior, Phase 2 LOOP unchanged) |
|
|
43
|
+
| **C. Single-variable explicit** | "simplify this file", "reduce build time", scoped `/build-loop:optimize-run <known-target>` | Skip DOE; run autoresearch (existing behavior, Phase 2 LOOP unchanged) |
|
|
44
44
|
|
|
45
45
|
### Step 1.2 — Branch A or B: factor identification
|
|
46
46
|
|
|
@@ -186,7 +186,7 @@ Dispatch the `optimize-runner` agent. It executes:
|
|
|
186
186
|
|
|
187
187
|
Phase 4.7 (AUTO-OPTIMIZE): after Phase 4 Execute completes and commits, check for optimization targets. Run sequentially (not parallel with Phase 4).
|
|
188
188
|
|
|
189
|
-
Standalone: `/build-loop:optimize [target]`
|
|
189
|
+
Standalone: `/build-loop:optimize-run [target]`
|
|
190
190
|
|
|
191
191
|
## State Files
|
|
192
192
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: plan-verify
|
|
3
|
-
description: Use when build-loop Phase 2 wraps plan drafting, the user runs `/build-loop:plan
|
|
3
|
+
description: Use when build-loop Phase 2 wraps plan drafting, the user runs `/build-loop:verify-plan`, asks to "verify the plan" or "lint the plan", or any plan markdown change touches evidence, synthesis-density, risk_reason, or modifies_api fields. Runs deterministic plan-verify rules and emits findings JSON.
|
|
4
4
|
user-invocable: false
|
|
5
5
|
---
|
|
6
6
|
|
|
@@ -213,6 +213,10 @@ mapping is valid. A real publish can still fail after a successful dry-run when
|
|
|
213
213
|
the npm package settings do not match the GitHub workflow. After publishing,
|
|
214
214
|
verify the registry metadata includes
|
|
215
215
|
`dist.attestations.provenance.predicateType = https://slsa.dev/provenance/v1`.
|
|
216
|
+
If the real publish step prints the final `+ @scope/package@version` line but
|
|
217
|
+
the immediate metadata check returns `E404`, do not rerun the same publish.
|
|
218
|
+
npmjs metadata can lag for a few minutes after acceptance; poll `npm view` or
|
|
219
|
+
use a verify-only workflow path.
|
|
216
220
|
|
|
217
221
|
### Access Token Fallback Gate
|
|
218
222
|
|
|
@@ -286,6 +290,10 @@ npm audit signatures
|
|
|
286
290
|
gh run rerun <run-id> --failed
|
|
287
291
|
```
|
|
288
292
|
|
|
293
|
+
- If npmjs succeeds through the final `+ @scope/package@version` line but the
|
|
294
|
+
post-publish metadata check returns `E404`, treat it as a visibility lag until
|
|
295
|
+
registry polling proves otherwise. Do not rerun the publish for that version;
|
|
296
|
+
rerun a verify-only path or poll `npm view`.
|
|
289
297
|
- Use local npm login or token publishing only as an explicit fallback decision,
|
|
290
298
|
because it bypasses the trusted-publisher/provenance path.
|
|
291
299
|
|
package/skills/research/SKILL.md
CHANGED
|
@@ -53,10 +53,37 @@ Produces a repo-grounded research packet without committing to implementation. U
|
|
|
53
53
|
[What could go wrong, what's uncertain]
|
|
54
54
|
|
|
55
55
|
## Confidence
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
56
|
+
|
|
57
|
+
Rate each axis high/medium/low, then set Overall to the floor of the three —
|
|
58
|
+
and never above Evidence quality when the packet rests on external claims:
|
|
59
|
+
|
|
60
|
+
- Context coverage — how much of the relevant repo was actually read
|
|
61
|
+
- Verification coverage — share of material claims checked against repo or source
|
|
62
|
+
- Evidence quality — strength of the sources behind external claims (rubric below)
|
|
63
|
+
- Overall — the floor of the above
|
|
64
|
+
|
|
65
|
+
### Source & claim rubric (apply to every external claim)
|
|
66
|
+
|
|
67
|
+
Tier each source: **T1** official docs / standards / primary data · **T2**
|
|
68
|
+
recognized experts / official eng blogs · **T3** reputable industry press ·
|
|
69
|
+
**T4** forums / SEO / unattributed. Then grade the claim's corroboration and
|
|
70
|
+
mark it inline:
|
|
71
|
+
|
|
72
|
+
- ✅ verified — ≥2 *independent* T1/T2 sources agree (independent = different
|
|
73
|
+
orgs, not mirrors or one syndicated wire)
|
|
74
|
+
- ⚠️ partial — exactly one T1/T2, or only T3/T4 sources
|
|
75
|
+
- ❓ inferred — single source, T4 only, or your own inference
|
|
76
|
+
|
|
77
|
+
A claim's confidence can never exceed its corroboration.
|
|
78
|
+
|
|
79
|
+
### Verify before stating (high-risk / max_accuracy)
|
|
80
|
+
|
|
81
|
+
For security, auth, payment, legal, medical, finance, production, or any
|
|
82
|
+
`max_accuracy` packet: decompose each external claim into atomic checkable
|
|
83
|
+
facts (a number, a version, an API signature, a citation) and verify each
|
|
84
|
+
against a source before the packet states it. An unverifiable atom is labeled
|
|
85
|
+
❓ or removed — never stated as fact. This applies the cite-or-block rule in
|
|
86
|
+
`references/research-trigger-policy.md` claim-by-claim.
|
|
60
87
|
|
|
61
88
|
## Next action
|
|
62
89
|
[Concrete first step — could be "run /build-loop" or "investigate X further"]
|
|
@@ -70,10 +97,10 @@ Produces a repo-grounded research packet without committing to implementation. U
|
|
|
70
97
|
|
|
71
98
|
## Integration
|
|
72
99
|
|
|
73
|
-
- Standalone: `/build-loop:research [topic]`
|
|
100
|
+
- Standalone: `/build-loop:research-run [topic]`
|
|
74
101
|
- From build-loop: orchestrator routes RESEARCH-intent requests here instead of the full loop
|
|
75
102
|
- During normal build-loop runs: `scripts/research_trigger.py` decides whether this skill should run, which depth to use, where to persist the packet, and whether current/external claims are blocked until cited. See `references/research-trigger-policy.md`.
|
|
76
|
-
- After packet: user decides — `/build-loop:run` to implement, `/build-loop:optimize` to optimize, or shelve
|
|
103
|
+
- After packet: user decides — `/build-loop:run` to implement, `/build-loop:optimize-run` to optimize, or shelve
|
|
77
104
|
|
|
78
105
|
## State
|
|
79
106
|
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: runtime-parity-verification
|
|
3
|
+
description: Use in Phase 4/5 (Validate/Iterate) for ANY change to a user-visible flow — web, macOS, iOS, agent, or CLI/TUI — before claiming "done". Verifies the RUNNING app's core flow by cross-checking the rendered/queryable UI against the backing source-of-truth (DB/API/daemon/tool-state), screen-independently. Triggers — "verify it works", "confirm the fix", "does X actually work", "nothing happens when I…", "not showing", "shows empty/wrong data", uiTarget != null, or any "action does nothing / data not displaying / stale projection" symptom. Compile-green and a passing unit test do NOT satisfy this; neither does a screenshot alone.
|
|
4
|
+
user-invocable: false
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Runtime Parity Verification
|
|
8
|
+
|
|
9
|
+
**The recurring failure this prevents:** an agent ships UI/feature work, reports "compiles green / tests pass / committed," and never confirms the **running** app's core flow actually works — or confirms it only by **screenshot**, which is screen-dependent and gets silently deferred (e.g. the user's display locks). The whole "X doesn't work / isn't showing / shows mock/empty despite real data / stale projection" bug class is a **divergence between what the UI renders and the authoritative backend state.** One cheap, headless check catches the entire family.
|
|
10
|
+
|
|
11
|
+
## The invariant to assert
|
|
12
|
+
|
|
13
|
+
> For the user's core flow, the **rendered/queryable UI state must equal the authoritative backend state.**
|
|
14
|
+
> - If the backend holds N items and the UI shows 0 / "empty" → **FAIL** (projection diverged).
|
|
15
|
+
> - If an action is supposed to create/change state, assert **both** the backend delta **and** the UI reflecting it.
|
|
16
|
+
|
|
17
|
+
This is stronger than "did it render" (which UI validators check). It is also stronger than "build + tests pass" (which never exercises the running flow). It must be **screen-independent** so it cannot be skipped when no display is available.
|
|
18
|
+
|
|
19
|
+
## Platform recipes — source-of-truth (left) ⇄ UI probe (right)
|
|
20
|
+
|
|
21
|
+
| Platform | Authoritative source-of-truth | Screen-independent UI probe |
|
|
22
|
+
|---|---|---|
|
|
23
|
+
| **Web** | API response JSON / DB row count | Host browser or `ui-validator` / IBR scan; assert via `data-testid` selectors |
|
|
24
|
+
| **macOS** (AppKit/SwiftUI) | backend store / daemon via CLI or socket query | **`native-ax-driver`** Accessibility tree (cursor-free). Reference impl: easy-terminal `tools/smoke_launch.py` |
|
|
25
|
+
| **iOS / watchOS** | backend / store | simulator AX via `idb ui describe-all` or XCUITest queries |
|
|
26
|
+
| **Agent / LLM app** | tool-result or persisted state | the agent's returned/rendered output — assert the claim matches the actual tool/state, not just that text was produced |
|
|
27
|
+
| **CLI / TUI** | process / file / db state | captured stdout / TUI buffer |
|
|
28
|
+
|
|
29
|
+
## Procedure
|
|
30
|
+
|
|
31
|
+
1. **Identify the core flow** changed (the thing a user does: launch a thing, submit a form, see a list, run an action).
|
|
32
|
+
2. **Capture source-of-truth** before and (if the flow mutates) after the action — a query that does NOT go through the UI layer.
|
|
33
|
+
3. **Probe the UI headlessly** with the platform driver and extract the rendered state (counts, presence/absence of an empty state, the new item).
|
|
34
|
+
4. **Assert parity**: rendered == source-of-truth. On a mutating flow, assert the backend delta AND the UI reflecting it.
|
|
35
|
+
5. **Encode it as a per-repo smoke** (a script that returns non-zero on divergence). **Validate the smoke is real**: confirm it returns non-zero on a known-broken state, not just zero on green — a check that cannot fail is worthless.
|
|
36
|
+
6. **Gate on it**: run the smoke before any "done" claim. Never substitute compile-green, a passing unit test, or a screenshot.
|
|
37
|
+
|
|
38
|
+
## Anti-patterns (each one shipped a real bug)
|
|
39
|
+
|
|
40
|
+
- "Build is green, committed — done." → compile ≠ runtime; never exercised the flow.
|
|
41
|
+
- "Here's a screenshot, looks right." → screen-dependent; deferred when the screen locks; can't diff against truth.
|
|
42
|
+
- "The UI rendered something." → rendering ≠ correct data; an empty state renders fine while the backend has 100 rows.
|
|
43
|
+
- Verifying only the backend (CLI/API works) without the UI, or only the UI without the backing truth — the bug lives in the **gap between them**.
|
|
44
|
+
|
|
45
|
+
## Build-loop integration
|
|
46
|
+
|
|
47
|
+
- **Phase 4 Review sub-step B / Phase 5 Iterate**: when `uiTarget != null` OR the diff touches a user-visible flow, a runtime parity check is **required**. The existing drivers do the probing — web: `ui-validator`; macOS: `native-ax-driver` / IBR `scan_macos`; iOS: `idb`. THIS skill adds the missing step: **cross-check the probe against source-of-truth**, and keep a validated per-repo smoke.
|
|
48
|
+
- **Phase 4 sub-step G (`verification-before-completion`)**: for app/UI changes, "confirm output" includes the runtime parity smoke, not only test/build/lint.
|
|
49
|
+
- The `verify` skill ("run the app and observe behavior") is the manual counterpart; this skill is the automatable, source-of-truth-anchored form.
|
|
50
|
+
|
|
51
|
+
Origin lesson: build-loop-memory `lessons/2026-06-08-pattern-runtime-ui-source-of-truth-parity-verification.md` (easy-terminal launch/no-pane bug — UI projection diverged from daemon, missed across a whole UI pass because verification was compile-green + screenshot-only).
|
|
@@ -314,6 +314,24 @@ If no UI surface is in scope, write "N/A: no UI surface."
|
|
|
314
314
|
|
|
315
315
|
---
|
|
316
316
|
|
|
317
|
+
### Item 18 — Dispatch tier per work item (WP-B)
|
|
318
|
+
|
|
319
|
+
**Prompt:** Assign `dispatch_tier:` per work item — one of `script | haiku | sonnet | opus | frontier` — plus a one-line justification. The tier names which executor the orchestrator dispatches; the justification states why that tier fits the work's nature. `frontier` requests the Frontier tier (resolves to Fable via `scripts/model_overrides.py`) for a work item whose generative reasoning compounds — plan synthesis / re-planning / a decomposition call where a wrong answer ripples downstream. It routes to the Advisor dispatch ladder (`references/advisor-dispatch-ladder.md`); use it sparingly, only on genuinely high-stakes generative work.
|
|
320
|
+
|
|
321
|
+
**Eligibility test for `script` (ALL must hold):** machine-checkable output; fully enumerable inputs; the tool exists OR is ≤~50 LOC plus a colocated test. If any fails, the task needs a model tier (judgment), not a script. Escalate on evidence (2 failures or surfaced ambiguity) with the failure evidence attached; never patch a script mid-run to absorb ambiguity.
|
|
322
|
+
|
|
323
|
+
**Effect:** `plan_verify.py` runs two ADVISORY checks (never block, user-confirmed 2026-06-09): `tier-sanity-judgment-on-script` (a judgment-flavored task pinned to `script` — rigidity) and `tier-sanity-mechanical-on-opus` (a rote task pinned to `opus` — waste). Both are WARN flags in the report, surfaced for the author to reconsider.
|
|
324
|
+
|
|
325
|
+
**How to check:**
|
|
326
|
+
|
|
327
|
+
```bash
|
|
328
|
+
grep -n "dispatch_tier:" docs/plans/<feature-slug>.md
|
|
329
|
+
```
|
|
330
|
+
|
|
331
|
+
Each value must be exactly one of `script | haiku | sonnet | opus | frontier`. Omit the field for an item whose tier is obvious from context; the checks fire only on a declared tier that fights its task description. (`frontier` never trips a sanity WARN — it is the top judgment tier, never a "waste" smell.)
|
|
332
|
+
|
|
333
|
+
---
|
|
334
|
+
|
|
317
335
|
## Frontmatter fields used by routing
|
|
318
336
|
|
|
319
337
|
These fields appear in plan or chunk frontmatter and affect orchestrator routing decisions. They are validated by `scripts/plan_verify.py`.
|
|
@@ -322,6 +340,7 @@ These fields appear in plan or chunk frontmatter and affect orchestrator routing
|
|
|
322
340
|
|-------|------|--------|
|
|
323
341
|
| `risk_reason:` | one of 5 canonical strings | Routes chunk to `tier: thinking` regardless of `synthesis_dimensions` count (see Item 16). |
|
|
324
342
|
| `modifies_api: true\|false` | boolean | When `true`, the orchestrator runs a mandatory scope-auditor gate before Phase 3 dispatch. Any public function, component, type, route, or CLI-flag signature change qualifies. When set without a companion `scope_auditor_status:` field in the plan body, `plan_verify.py` emits a WARN (`scope-audit-required`) to surface the missing audit trail. |
|
|
343
|
+
| `dispatch_tier:` | one of `script\|haiku\|sonnet\|opus\|frontier` | Names the executor tier for the work item (Item 18). `frontier` resolves to Fable (`scripts/model_overrides.py`) and routes the item to the Advisor dispatch ladder for high-stakes generative work. `plan_verify.py` emits an advisory WARN when the tier fights the task: judgment on `script` (`tier-sanity-judgment-on-script`) or a mechanical task on `opus` (`tier-sanity-mechanical-on-opus`). `frontier` never trips a WARN. Never blocks. |
|
|
325
344
|
|
|
326
345
|
---
|
|
327
346
|
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# build-loop-memory — public seed (scaffolding only)
|
|
2
|
+
|
|
3
|
+
This folder is the **self-contained seed** for a build-loop-memory store. It is the
|
|
4
|
+
single place that holds everything build-loop ships for memory setup: the generic
|
|
5
|
+
templates, the privacy allowlist (`manifest.json`), and this layout spec.
|
|
6
|
+
|
|
7
|
+
**What ships vs. what does not.** The memory *store* itself is **private and never
|
|
8
|
+
ships** — it holds personal lessons, project decisions, raw artifacts, and operator
|
|
9
|
+
paths. Only this **scaffolding** ships in the public plugin: generic `*.template`
|
|
10
|
+
files + an allowlisted manifest. `scripts/install_memory.py` *materializes* the store
|
|
11
|
+
from this seed at a **separate root** (`$BUILD_LOOP_MEMORY_ROOT` → legacy
|
|
12
|
+
`~/dev/git-folder/build-loop-memory` → fresh `~/.build-loop-memory`), seeding only
|
|
13
|
+
missing files (idempotent, never overwrites).
|
|
14
|
+
|
|
15
|
+
## Files in this seed (all of them)
|
|
16
|
+
|
|
17
|
+
| File | Role |
|
|
18
|
+
|------|------|
|
|
19
|
+
| `manifest.json` | Privacy allowlist + the complete structure spec. `install_memory.py --validate-seed` rejects any seed file not allowlisted here, and scans for secret/PII deny-patterns. |
|
|
20
|
+
| `constitution.md.template` | First-run rule scaffold → `constitution.md` in the store. |
|
|
21
|
+
| `MEMORY.md.template` | Global memory-index scaffold → `MEMORY.md` in the store. |
|
|
22
|
+
| `charter.md.template` | Project-charter scaffold (North Star + commander's-intent + invariants) → `charter.md`. Placeholder bodies; filled per project at run time. |
|
|
23
|
+
| `README.md` | This document. |
|
|
24
|
+
|
|
25
|
+
Empty directories are **not** shipped (git can't track them, and the manifest is
|
|
26
|
+
strict-allowlist); they are **generated** by `install_memory.py` at setup. The full
|
|
27
|
+
target layout is below and is declared machine-readably in `manifest.json` →
|
|
28
|
+
`generated`.
|
|
29
|
+
|
|
30
|
+
## Store layout that install_memory.py generates
|
|
31
|
+
|
|
32
|
+
```
|
|
33
|
+
<memory-root>/ # private, separate root — NEVER the plugin cache
|
|
34
|
+
├── constitution.md # from constitution.md.template
|
|
35
|
+
├── MEMORY.md # from MEMORY.md.template
|
|
36
|
+
├── charter.md # from charter.md.template (optional)
|
|
37
|
+
├── indexes/ # rebuildable local indexes
|
|
38
|
+
└── projects/
|
|
39
|
+
├── README.md # generated project-lane guide
|
|
40
|
+
└── <slug>/ # one per project (--ensure-project <slug>)
|
|
41
|
+
├── raw/ # raw-source lanes:
|
|
42
|
+
│ ├── documents/ data/ db/ runtime/
|
|
43
|
+
│ └── agent-artifacts/ artifacts/ files/
|
|
44
|
+
├── apps/ assets/ architecture/ context/
|
|
45
|
+
├── decisions/ docs/ features/ formats/
|
|
46
|
+
├── indexes/ lessons/ plugins/ product/
|
|
47
|
+
├── prompts/ research/ semantic/ skills/
|
|
48
|
+
└── sources/ testing/ tradeoffs/
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
`raw/` lanes (7): documents, data, db, runtime, agent-artifacts, artifacts, files.
|
|
52
|
+
Per-project topic dirs (20): apps, assets, architecture, context, decisions, docs,
|
|
53
|
+
features, formats, indexes, lessons, plugins, product, prompts, raw, research,
|
|
54
|
+
semantic, skills, sources, testing, tradeoffs.
|
|
55
|
+
|
|
56
|
+
## Setup
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
python3 scripts/install_memory.py # bootstrap store + seed missing files
|
|
60
|
+
python3 scripts/install_memory.py --ensure-project foo # add projects/foo/ scaffold
|
|
61
|
+
python3 scripts/install_memory.py --check # status, no writes
|
|
62
|
+
python3 scripts/install_memory.py --validate-seed # validate THIS seed (allowlist + deny-scan)
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
The store is the durable, private half; this seed is the public, structure-only half.
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# Project Charter — {{PROJECT}}
|
|
2
|
+
|
|
3
|
+
The durable North Star + posture + invariants + key architecture decisions that
|
|
4
|
+
outlive any single run. Canonical here in memory; mirrored to `.build-loop/charter.md`
|
|
5
|
+
each run. Facts ACCRETE: each carries provenance (`inferred` until user-confirmed
|
|
6
|
+
or stable across N runs) and, where it locks a decision, the falsifier that would
|
|
7
|
+
unseat it (decision-quality rule 8).
|
|
8
|
+
|
|
9
|
+
This is a template — replace the bodies with the project's actual content. Depth
|
|
10
|
+
scales by `stakes`: a low-stakes skill/agent/toy needs none of this; a thin charter
|
|
11
|
+
(North Star + posture) suits medium-stakes web/mobile; a high-stakes system fills
|
|
12
|
+
every section and graduates risk-naming non-goals to enforced invariants.
|
|
13
|
+
|
|
14
|
+
## North Star
|
|
15
|
+
|
|
16
|
+
- **Purpose**: <what this product is for and who it serves>
|
|
17
|
+
- **Primary users**: <roles affected>
|
|
18
|
+
- **Core jobs**: <the tasks users rely on most>
|
|
19
|
+
|
|
20
|
+
## Posture (commander's intent)
|
|
21
|
+
|
|
22
|
+
- **audience**: <who> — provenance: inferred
|
|
23
|
+
- **stakes**: <low|medium|high> — provenance: inferred
|
|
24
|
+
- **priority_order**: <ordered subset of security/reliability/speed/cost/simplicity/polish>
|
|
25
|
+
- notes: <free-text expressiveness the fixed vocab can't carry>
|
|
26
|
+
- **acceptable_tradeoffs**: <what is OK to cut under pressure>
|
|
27
|
+
- **non_goals**: <what is never cut>
|
|
28
|
+
- <at stakes:high, a non_goal that names a REAL risk is an ENFORCED invariant>
|
|
29
|
+
|
|
30
|
+
## Invariants
|
|
31
|
+
|
|
32
|
+
Stable rules cited by advisory judges via stable IDs (mirror the constitution
|
|
33
|
+
shape). At `stakes: high`, risk-naming entries are deterministically enforced.
|
|
34
|
+
|
|
35
|
+
- **INV-<DOMAIN>/<name>**: <rule body> — provenance: <inferred|user-confirmed>
|
|
36
|
+
- falsifier: <the observation that would unseat this>
|
|
37
|
+
|
|
38
|
+
## Key architecture decisions
|
|
39
|
+
|
|
40
|
+
- **<decision>**: <what was decided and why> — provenance: <inferred|user-confirmed>
|
|
41
|
+
- falsifier: <what would prove it wrong; the revisit trigger>
|
|
42
|
+
|
|
43
|
+
<!-- Provenance legend: `inferred` (LLM-derived, not yet confirmed) graduates to
|
|
44
|
+
`user-confirmed` on explicit user statement OR to `stable` after N
|
|
45
|
+
unchallenged runs. The run is the single writer (from canonical); a user
|
|
46
|
+
hand-edit of the repo mirror promotes to canonical authored_by:user. -->
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schema_version": "1.0.0",
|
|
3
3
|
"kind": "build-loop-memory-public-seed",
|
|
4
|
-
"seed_version": "2026-06-
|
|
5
|
-
"description": "
|
|
4
|
+
"seed_version": "2026-06-12",
|
|
5
|
+
"description": "Self-contained, privacy-safe seed for a fresh build-loop-memory store. Ships the generic templates + this manifest + README; install_memory.py materializes the store at a separate private root. This manifest allowlists only generic templates/docs and declares (in 'generated') the complete directory structure install_memory.py creates. It must not include personal lessons, project decisions, raw files, indexes, or operator-specific content.",
|
|
6
6
|
"sources": [
|
|
7
7
|
{
|
|
8
8
|
"source": "constitution.md.template",
|
|
@@ -15,6 +15,18 @@
|
|
|
15
15
|
"target": "MEMORY.md",
|
|
16
16
|
"required": true,
|
|
17
17
|
"purpose": "Generic global-memory index scaffold for first-run installs."
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"source": "charter.md.template",
|
|
21
|
+
"target": "charter.md",
|
|
22
|
+
"required": false,
|
|
23
|
+
"purpose": "Generic project-charter scaffold (North Star + commander's-intent posture + invariants). Placeholder bodies only; filled per project by the run (WP-F)."
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"source": "README.md",
|
|
27
|
+
"target": "README.md",
|
|
28
|
+
"required": false,
|
|
29
|
+
"purpose": "Human-readable seed + complete layout documentation (allowlisted so --validate-seed passes)."
|
|
18
30
|
}
|
|
19
31
|
],
|
|
20
32
|
"generated": [
|
|
@@ -26,14 +38,22 @@
|
|
|
26
38
|
"target": "projects/README.md",
|
|
27
39
|
"purpose": "Generic project-scoped memory lane guide generated by install_memory.py."
|
|
28
40
|
},
|
|
41
|
+
{
|
|
42
|
+
"target": "projects/<slug>/",
|
|
43
|
+
"purpose": "Per-project memory lane, created by --ensure-project <slug>."
|
|
44
|
+
},
|
|
29
45
|
{
|
|
30
46
|
"target": "projects/<slug>/raw/{documents,data,db,runtime,agent-artifacts,artifacts,files}/.gitkeep",
|
|
31
|
-
"purpose": "Empty raw-source lane placeholders created
|
|
47
|
+
"purpose": "Empty raw-source lane placeholders (7 lanes) created when --ensure-project is passed."
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"target": "projects/<slug>/{apps,assets,architecture,context,decisions,docs,features,formats,indexes,lessons,plugins,product,prompts,raw,research,semantic,skills,sources,testing,tradeoffs}/",
|
|
51
|
+
"purpose": "Per-project topic lanes (20) — canonical structure spec, mirrors install_memory.py PROJECT_TOPIC_DIRS."
|
|
32
52
|
}
|
|
33
53
|
],
|
|
34
54
|
"privacy": {
|
|
35
55
|
"classification": "scaffolding-only",
|
|
36
|
-
"rule": "The public build-loop package ships templates and
|
|
56
|
+
"rule": "The public build-loop package ships templates, this manifest, and the README only. Personal memory files, private repository contents, project-specific decisions, raw artifacts, generated indexes, and local operator paths are excluded. Empty directories are generated at install time, never shipped.",
|
|
37
57
|
"deny_patterns": [
|
|
38
58
|
"(?i)BEGIN (OPENSSH|RSA|DSA|EC) PRIVATE KEY",
|
|
39
59
|
"(?i)\\b(api[_-]?key|secret|password|token)\\s*[:=]\\s*['\\\"][^'\\\"]{8,}",
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: debug-loop
|
|
3
|
-
description: "Main Build Loop debugging entrypoint. Use for root-cause analysis, failing fixes, crashes, exceptions, broken behavior, and validation failures that need an iterative diagnose-fix-verify loop."
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
<!-- SPDX-FileCopyrightText: 2025-2026 Tyrone Ross, Jr <46267523+tyroneross@users.noreply.github.com> | SPDX-License-Identifier: Apache-2.0 -->
|
|
7
|
-
|
|
8
|
-
# Debug Loop
|
|
9
|
-
|
|
10
|
-
This is the public Codex entrypoint for Build Loop debugging. The canonical
|
|
11
|
-
implementation remains internal:
|
|
12
|
-
|
|
13
|
-
```text
|
|
14
|
-
../skills/debug-loop/SKILL.md
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
Start with diagnosis, use evidence to identify root cause, apply the smallest
|
|
18
|
-
targeted fix, and verify with the repo's native tests or runtime checks.
|