You are running a long-lived execution loop, not a consultation. The task is done when the user's ORIGINAL premise is satisfied and verified — not when the current plan's steps are exhausted, not when one slice ships, and not when Oracle writes a good plan.
oracle skill. Load it before the first
consult; it owns prompt, bundle, ledger, waiting, output-log, and transport
rules (round-robin pool by default, MCP browser consult as its fallback).
Do not duplicate or override its browser-engine, Pro Extended, or
output-boundary rules.verify (and run when the app must be driven).
When those skills are unavailable, perform the equivalent repo-native
verification: run the applicable static validators, build the real product,
and exercise the changed runtime surface with falsifiable assertions or
captured receipts. Record that as a fallback, not a blocker.Before anything else, write the user's instructions verbatim to:
.notes/oracle/{slug}/premise.md
Append a short interpretation block: measurable outcomes, explicit constraints, and what "done" looks like as falsifiable checks. The premise file is immutable for the rest of the loop; scope changes require the user.
Everything downstream — the plan's coverage map, the audit, the final report — is judged against this file, not against the latest plan revision. This is the guard against under-scoping: a plan that covers less than the premise is a defective plan, not a finished task.
Oracle consults cost 20-60 minutes each. Maximize actionable output per consult and minimize consult count. Consults are permitted at exactly four moments:
Every consult prompt must demand maximum actionable output: exact files/functions/tests for everything it recommends, enough detail that the local agent can work for hours without another consult. Never ask Oracle for "the one next step." An answer that is broad AND specific is the goal; only untargeted vagueness is a defect.
Build a rich packx bundle per the oracle skill (target ~900k, exclude
CLAUDE.md). The planning prompt must require:
think, stating what must be decided there.execute (default): the local agent implements from the plan and local
evidence. No consult.think: implementing requires a decision that frontier reasoning must
make first — an architecture choice that constrains later steps,
ambiguity local evidence cannot resolve, or a known-hard debugging
unknown. Tagging a step think because it is merely large or tedious is
wrong; size is the local agent's job.think recreates the
consult-per-step cost problem and must be revised.Persist the plan to .notes/oracle/{slug}/plan.md and maintain a running
ledger at .notes/oracle/{slug}/ledger.md: step status, receipts, commits,
consult slugs, escalations.
Work steps strictly in order. For each step:
execute: implement the step fully from the plan and local
evidence. Do not shrink it — implement the whole step as planned, not the
smallest change that arguably satisfies it. Do not consult Oracle.think: build a fresh consult with the Prior-State Ledger,
accumulated receipts, and the specific decision this step needs. If the
next step(s) are also think and independent of this step's outcome,
batch them into one consult. Wait for the full response per the oracle skill
rules, then implement.Plan drift: if completing a step reveals that later steps are wrong or
missing, amend plan.md locally when the fix is mechanical and evidence-
backed. If the amendment requires a real decision, insert a think step
instead. Never silently drop a step — a dropped step must be justified in the
ledger against the coverage map.
An execute step whose verification fails twice on different attempts is
promoted to think. The escalation consult must include the exact failing
commands, outputs, receipts, and the diff of what was attempted — never "try
again." Implement Oracle's revision, verify, and continue. If the same step
fails after an escalation consult, report blocked with the evidence rather
than burning further consults.
When every step is green and committed, run one audit consult. Send: the premise file, the coverage map, the final diff (or a packx bundle of changed regions), and all verification receipts. Ask Oracle to judge the ACTUAL result against the ORIGINAL premise and return exactly one of:
VERDICT: PASS — premise satisfied; loop ends.VERDICT: FAIL — plus a complete ordered list of remediation steps, each
tagged think/execute with targets and verification, covering every
found gap (not just the first one).On FAIL, append the remediation steps to the plan and re-enter the execution loop. Repeat execute -> audit until PASS or a genuine block. Audits judge gaps against the premise only; new nice-to-haves Oracle volunteers go in the final report as follow-ups, not into the loop.
After PASS, run the repository's own final proof (per verify or the
repo-native equivalent) against the final state, so the audit verdict and
local proof bind to the same result. Record both in the ledger.
Report blocked only when:
Do not stop because the loop is long, because a step is tedious, or because the plan turned out larger than expected. Long unattended execution is the point of this skill.
---
name: oracle-execute
description: >-
Deconstruct a task into an ordered step plan where Oracle tags each step as
think (requires a fresh Oracle consult before implementing) or execute (the
local agent acts on existing evidence), then loop implement -> verify ->
commit until the original premise is fully satisfied, finishing with an
Oracle audit against the original premise plus final local proof. All
consults run through the round-robin pool. Use when the user invokes
oracle-execute or wants Oracle-planned execution that keeps working
until the original request is done.
---
# Oracle Execute Loop
You are running a long-lived execution loop, not a consultation. The task is
done when the user's ORIGINAL premise is satisfied and verified — not when the
current plan's steps are exhausted, not when one slice ships, and not when
Oracle writes a good plan.
## Composition
- Every consult runs through the `oracle` skill. Load it before the first
consult; it owns prompt, bundle, ledger, waiting, output-log, and transport
rules (round-robin pool by default, MCP browser consult as its fallback).
Do not duplicate or override its browser-engine, Pro Extended, or
output-boundary rules.
- Verification composes `verify` (and `run` when the app must be driven).
When those skills are unavailable, perform the equivalent repo-native
verification: run the applicable static validators, build the real product,
and exercise the changed runtime surface with falsifiable assertions or
captured receipts. Record that as a fallback, not a blocker.
## Premise Contract
Before anything else, write the user's instructions verbatim to:
```text
.notes/oracle/{slug}/premise.md
```
Append a short interpretation block: measurable outcomes, explicit
constraints, and what "done" looks like as falsifiable checks. The premise
file is immutable for the rest of the loop; scope changes require the user.
Everything downstream — the plan's coverage map, the audit, the final report —
is judged against this file, not against the latest plan revision. This is the
guard against under-scoping: a plan that covers less than the premise is a
defective plan, not a finished task.
## Consult Economics
Oracle consults cost 20-60 minutes each. Maximize actionable output per
consult and minimize consult count. Consults are permitted at exactly four
moments:
1. **Plan** — one consult that returns the full tagged step plan.
2. **Think steps** — one consult per think step, batched when adjacent.
3. **Escalation** — an execute step that failed verification twice.
4. **Audit** — whole-premise PASS/FAIL judgment at the end.
Every consult prompt must demand maximum actionable output: exact
files/functions/tests for everything it recommends, enough detail that the
local agent can work for hours without another consult. Never ask Oracle for
"the one next step." An answer that is broad AND specific is the goal; only
untargeted vagueness is a defect.
## Planning Consult
Build a rich packx bundle per the `oracle` skill (target ~900k, exclude
`CLAUDE.md`). The planning prompt must require:
1. An ordered step plan covering the ENTIRE premise. Partial plans are
rejected: if Oracle cannot plan a region concretely, it must still emit a
step for it, tagged `think`, stating what must be decided there.
2. A coverage map: every premise clause mapped to the step(s) that satisfy
it. An unmapped clause means the plan is incomplete — revise before
executing.
3. Per-step tagging with rationale:
- `execute` (default): the local agent implements from the plan and local
evidence. No consult.
- `think`: implementing requires a decision that frontier reasoning must
make first — an architecture choice that constrains later steps,
ambiguity local evidence cannot resolve, or a known-hard debugging
unknown. Tagging a step `think` because it is merely large or tedious is
wrong; size is the local agent's job.
4. Per-step: exact file/function/test targets where possible, a falsifiable
verification, and the intended commit boundary.
5. Expected think-step ratio is low (roughly 0-3 think steps in a typical
plan). A plan that tags most steps `think` recreates the
consult-per-step cost problem and must be revised.
Persist the plan to `.notes/oracle/{slug}/plan.md` and maintain a running
ledger at `.notes/oracle/{slug}/ledger.md`: step status, receipts, commits,
consult slugs, escalations.
## Execution Loop
Work steps strictly in order. For each step:
1. **If `execute`**: implement the step fully from the plan and local
evidence. Do not shrink it — implement the whole step as planned, not the
smallest change that arguably satisfies it. Do not consult Oracle.
2. **If `think`**: build a fresh consult with the Prior-State Ledger,
accumulated receipts, and the specific decision this step needs. If the
next step(s) are also `think` and independent of this step's outcome,
batch them into one consult. Wait for the full response per the `oracle` skill
rules, then implement.
3. **Verify**: run the step's falsifiable check. UI-facing work needs runtime
proof, not source reasoning. Capture the receipt in the ledger.
4. **Commit**: on green, inspect staged and unstaged diffs, stage only this
step's files, commit with the step id and consult slug (when one was
used). Never sweep pre-existing dirty work into a step commit.
5. **Advance**: update the ledger and move to the next step.
Plan drift: if completing a step reveals that later steps are wrong or
missing, amend `plan.md` locally when the fix is mechanical and evidence-
backed. If the amendment requires a real decision, insert a `think` step
instead. Never silently drop a step — a dropped step must be justified in the
ledger against the coverage map.
## Escalation
An `execute` step whose verification fails twice on different attempts is
promoted to `think`. The escalation consult must include the exact failing
commands, outputs, receipts, and the diff of what was attempted — never "try
again." Implement Oracle's revision, verify, and continue. If the same step
fails after an escalation consult, report `blocked` with the evidence rather
than burning further consults.
## Final Audit
When every step is green and committed, run one audit consult. Send: the
premise file, the coverage map, the final diff (or a packx bundle of changed
regions), and all verification receipts. Ask Oracle to judge the ACTUAL
result against the ORIGINAL premise and return exactly one of:
- `VERDICT: PASS` — premise satisfied; loop ends.
- `VERDICT: FAIL` — plus a complete ordered list of remediation steps, each
tagged `think`/`execute` with targets and verification, covering every
found gap (not just the first one).
On FAIL, append the remediation steps to the plan and re-enter the execution
loop. Repeat execute -> audit until PASS or a genuine block. Audits judge
gaps against the premise only; new nice-to-haves Oracle volunteers go in the
final report as follow-ups, not into the loop.
## Final Verification
After PASS, run the repository's own final proof (per `verify` or the
repo-native equivalent) against the final state, so the audit verdict and
local proof bind to the same result. Record both in the ledger.
## Stop and Block Conditions
Report `blocked` only when:
- Oracle or required verification tooling has a terminal failure and the
documented recovery paths (including the round-robin -> MCP fallback) also
fail.
- The same step fails after its escalation consult and the next action would
be speculative without user input.
- The work requires credentials, destructive operations, or scope beyond the
premise that the user did not authorize.
Do not stop because the loop is long, because a step is tedious, or because
the plan turned out larger than expected. Long unattended execution is the
point of this skill.
## Final Report
- Premise file path and whether the audit reached PASS.
- Steps completed with commit hashes; think vs execute count and consult
slugs; escalations.
- Total consult count (target: plan + think steps + audits, nothing else).
- Verification receipts for each step and the final whole-premise proof.
- Any transport fallback from the round-robin pool to MCP.
- Follow-ups Oracle suggested that were out of premise scope.