long-horizon
Skill1 starsChanged 2 months agoMITView on GitHub
Use when work spans context windows or sessions, progress is lost after compaction or retries, or the user invokes $long-horizon or asks to work in verified rounds.
4 other projects use a version of this, 2 of them edited.
Adopted by
Most recently taken up by
- ryanportfolio/Corewise.Academyedited, first seen Oct 3, 2026
- ryanportfolio/HarnessFirmware.comedited, first seen Sep 29, 2026
- keli-wen/dev-skillstheir own version, first seen Aug 17, 2026
- galsapir/skillstheir own version, first seen Apr 26, 2026
Other versions4 projects use a version of this.
Word for word · 0
None found.
Edited · 2
- ryanportfolio/Corewise.Academy★ 1100% same
- ryanportfolio/HarnessFirmware.com★ 016% same
Wrote their own version · 2
- keli-wen/dev-skills★ 12same name
- galsapir/skills★ 4same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository76 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- addskillSkill
- adopt-repoSkill
- advocateSkill
- arenaSkill
- astra-reviewSkill
- babysit-ciSkill
- brainstormingSkill
- broSkill
- cavemanSkill
- claude-reviewSkill
- codex-reviewSkill
- dareSkill
- deep-planSkill
- enhance-promptSkill
- external-reviewSkill
- fable-modeSkill
- forge-repo-ui-skillSkill
- handoff-auditSkill
- impartial-reviewSkill
- init-projectSkill
- labSkill
- optimize-contextSkill
- opus-fullreviewSkill
- perf-loopSkill
- recallSkill
- refineSkill
- serversSkill
- session-hubSkill
- showpieceSkill
- sync-starterSkill
- whySkill
- wow-loopSkill
- wrapupSkill
- writing-plansSkill
- writingSkill
- addskillSkill
- adopt-repoSkill
- advocateSkill
- arenaSkill
- astra-fullreviewSkill
- astra-reviewSkill
- babysit-ciSkill
- brainstormingSkill
- broSkill
- cavemanSkill
- claude-reviewSkill
- codex-fullreviewSkill
- codex-reviewSkill
- compact-reviewSkill
- dareSkill
- deep-planSkill
- enhance-promptSkill
- fable-modeSkill
- forge-repo-ui-skillSkill
- handoff-auditSkill
- impartial-reviewSkill
- init-projectSkill
- labSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
9 rules. 0 are common, 8 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 4 edited versions we read keep these.
8
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 14
Check exposed agent tools.
- Very specific: line 17
Create .tmp/long-horizon/<task-slug>/state.md before execution.
- Distinctive: line 38
Write state before dispatch, after execution, after audit.
- Distinctive: line 48
Before resuming run this session didn't start, check ownership: state file changed in last 30 minutes, or lists live worker → another …
- Distinctive: line 52
Keep original contract. Explicit user changes → amendments.
- Distinctive: line 66
write scopes disjoint; neither reads path other writes.
- Distinctive: line 67
no contended resource across executions/done-checks: port, dev server, browser profile, DB, GPU, or timing/perf measurement parallel load …
- Distinctive: line 71
every allowed write path inside workspace root.
- Distinctive: line 195
Before declaring done: fresh final audit of integrated workspace vs all current final acceptance checks, incl.
“Common” is measured: kept by at least 6 in 10 of the 4 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Long-horizon for Codex
Big work in bounded rounds: fresh executors, independent auditors. Manager owns goal, decisions, durable state. Maintain this Codex skill directly, standalone. Discussing/editing it ≠ activating it. Small task fitting one ctx → ordinary execute/verify.
Start and resume
Check exposed agent tools. Needs fresh independent agents; self-review never replaces auditor. Unavailable → report gap, continue work not needing independent verdict.
Create .tmp/long-horizon/<task-slug>/state.md before execution; only Manager updates it.
Bulky output, per-round briefs live beside it, outside active summary. Baseline identity:
path/content hashes of relevant dirty, staged, untracked, ignored generated artifacts;
record deletions, unavailable coverage. Git revision alone ≠ working state.
scripts/manifest.mjs in skill dir builds it
(<root> <out.json> --ref <ref> [Write scope and ignored paths]), diffs for audit
(--diff <out.json>).
| Field | Required content |
| Contract | Goal, authorized scope, constraints, numbered final acceptance checks |
| Amendments | Version, explicit user instruction, changed checks, affected steps |
| Workspace | Abs root, branch/revision if Git, existing edits, baseline artifact paths, other workspaces round reads (read-only) |
| Rounds | Per active round: step ID, batch, phase, workspace, agent/process IDs, allowed edits, local checks, deps |
| Verified progress | Claim, contract version, inspected revision or file fingerprints, evidence path |
| Remaining | Bounded steps, deps, write paths, pending final checks, invalidated claims |
| Dead ends | Failed approach, observed cause, evidence needed before retry |
| Method notes | Rules later rounds must follow (e.g. how to measure), source round, unconfirmed / confirmed / dropped |
| Audit log | Round verdicts, evidence, decisions, blockers, recovery actions |
Phases: planned, executing, awaiting-audit, accepted, needs-rework, blocked.
Write state before dispatch, after execution, after audit. Save before yielding/ending
turn; never rely on catching compaction.
Resume: reconcile state w/ real workspace, latest user instructions. Check root, revision,
dirty files, artifacts, recorded workers/processes; HEAD misses uncommitted content. Old
evidence stays as history; mark affected claims stale, recheck before dependent work.
Recover partial edits, no blind re-run. Confirm old writers finished/stopped before
replacing; stop processes listed in processes.log whose worker is gone. Missing process IDs after
restart ≠ execution done.
Before resuming run this session didn't start, check ownership: state file changed in last 30 minutes, or lists live worker → another session may own it; ask user: take over (they stop other session first) or stay out. Two Managers on one state file corrupt it.
Keep original contract. Explicit user changes → amendments; reassess affected steps, evidence vs new version. Manager never weakens acceptance to pass work. Existing authorization carries forward within scope; ask only for missing user-owned decisions or authority. Skill invocation alone doesn't authorize Git publication, deployments, migrations, installation, external msgs.
Parallel rounds
Max safe parallelism. Each Plan: every ready step able to run beside others gets own round; dispatch all as one batch. Ready step defers only when rule below forbids; note rule in its Remaining entry. Sequential run = batches of one.
Ready = all deps verified. Ready steps share batch only if:
- write scopes disjoint; neither reads path other writes;
- no contended resource across executions/done-checks: port, dev server, browser profile, DB, GPU, or timing/perf measurement parallel load would skew;
- concurrency covers them, counting Manager, every executor, auditor, other worker. Short → smaller batches or sequential OK;
- every allowed write path inside workspace root. Step writing outside runs alone, in main workspace: separate checkout can't isolate outside path, edits hit main env whatever audit says. In-place round skips batch integration steps 1-4 (nothing to copy; its edits already differ from Baseline by design) → normal Integrate on its own audit.
Each batch round keeps full contract: own state entry, workspace, baseline, briefs,
executor, auditor. Parallel executors never share workspace: one's edits land in other's
baseline diff → both audits suspect. Build round workspace from main, before baseline:
git stash create in main (empty output: use HEAD),
git worktree add --detach <path> <sha>, copy in all main's untracked files + any ignored artifacts step needs (deps, build output). Never worktree at HEAD: drops earlier rounds'
uncommitted verified work. Never plain copy of Git checkout: copied .git file still
points at original's index, HEAD. Plain copies only outside Git. Take baseline inside
round's own workspace. Before checkout, record main's hashes for round's allowed write paths (manifest.mjs on main w/ those paths): conflict reference for integration. Round baseline stays executor-attribution reference; checkout filters (e.g. core.autocrlf) can make round bytes differ from main's.
Dispatch all batch executors before waiting on any. Each auditor starts when its executor stops, not waiting on batch. Integrate after whole batch audited:
- Each accepted round: apply manifest diff to main workspace verbatim: copy each added/modified path from round workspace, delete each deleted path. Main file not matching main's pre-checkout hashes (or present where none recorded) = conflict → step back to Remaining for later batch; not dead end.
- Rejected round's delta stays out of main. Save as patch under
evidence/round-<N>/(recovery brief may cite); record in state as not applied. - Before removing any round workspace: stop every process its round started (per
processes.log), confirm gone; else old server answers step-4 check or holds its port. Step 4 starts any server it needs from main. Then copy every cited evidence file living in it (done-check output, ignored artifacts) intoevidence/round-<N>/. Then unlink dep links in it (rmdiron junction/symlink), thengit worktree remove --force <path>: dirty by design, so plaingit worktree removerefuses; forcing before unlinking deletes through link into shared target. - Separate-workspace verdicts don't prove steps work together or survive workspace removal (e.g. link into removed worktree). After removal, one fresh auditor runs every applied round's done-check in main workspace before any counts as verified. Step failing there → Remaining w/ that output; its applied paths → state w/ revert-or-keep decision.
In-round, executor runs independent reads/searches/commands at once; read-only
helpers OK if runtime allows. Executor's turn ending = round over → wait for every helper
result (incl. arena inside executor) before stopping; helper still running at stop →
output lost. Parallel writers needed → split into steps in Remaining, run
as parallel rounds.
Each round
Plan one step per round. Define allowed paths/actions, deps, local done-checks, relevant task constraints. Pre-round baseline incl. dirty/untracked files, enough to separate round's changes from existing work. Before spawning executor, save versioned auditor brief (pre-register) from contract, scope, checks, baseline identity, raw artifact paths; record path, content hash. Write state/briefs via file-edit tool; shell/script strings drop backslashes, backticks. Re-read each saved brief before dispatch. Every brief: worker appends each long-lived process it starts (pid, port, command) to
processes.login task dir. Hours-long jobs: brief has executor check between batches that workspaces still whole (git worktree list, sentinel file); mismatch → stop, report, don't rebuild. Evidence from other revision (line numbers, patch map) names it; executor finds cited code by anchor text, not line number.Execution or done-check costing hours (browser work, GPU timing, long batches) → draft review once scope/checks drafted, before baseline and auditor brief freeze them. One fresh read-only peer, ideally other vendor (custom-prompt Claude CLI run w/
claude-reviewskill's auth, launch checks; else fresh agent w/fork_turns: "none": fresh ctx, no vendor independence), reads draft step, done-checks, code they exercise. One question: can check pass while work wrong, fail while right, or not run as written? Concrete findings only: wrong impl that passes (stub returning expected value, test never reaching changed path, check reading file executor can write), correct result failing check read literally, or command failing as written w/ cwd, output. "Could be stronger" ≠ finding. Manager fixes draft, ≤1 follow-up review of changed wording, freezes. Peer sees only draft, code; never executor report. Auditor brief gets only frozen checks, never peer critique. Cheap rounds skip; auditorblockedfor broken check covers them.- Execute. Fresh agent w/
fork_turns: "none"if exposed. Standalone brief: step, scope, checks, needed verified facts, relevant dead ends, Method notes, abs workspace/artifact paths, current permissions, style instructions. Works w/o Manager history. Other names → runtime equivalent. Only inherited ctx possible → record it; never claim fresh independent audit. Honor explicit user model choice, else session model. Requested model unavailable → disclose, never silently substitute. Executor implements, verifies only its step; returns changed paths, commands/results, blockers. Can't edit Manager state or dispatch agents. Returns w/o promised artifacts, or says it's waiting on helpers → send it follow-up input via exposed agent tools, not new round or failed audit. - Audit after execution stops. Separate fresh agent gets prewritten auditor brief byte for byte, or by path if agent first checks recorded hash. Never rewrite after reading executor output; Plan defect → next round. Explicit user amendment → reconcile workers, keep old briefs/baseline, freeze new version from amended contract, raw artifacts, no executor assessments. Exclude executor reports, turns, verdicts. Report is requested deliverable → auditor inspects it as artifact, w/o executor assessment. Auditor inspects real changes, runs relevant checks itself; never fixes impl or writes Manager state. Other writers off audited files until verdict integrated.
- Integrate. Batches: order per Parallel rounds. Accept only
complete + clean + alignedw/ evidence. Else record findings, invalidate prior claims hit by failed changes, choose next round by auditor'srepairable:yes→ one recovery round, same approach, auditor diagnostic in brief, = step's 2nd attempt;no→ approach to Dead ends, next brief changes approach. One recovery per step; failed recovery = 2nd failure → Stagnation. Keep unrelated verified claims. On accept, copy cited result files outside task dir into itsevidence/round-<N>/(workspaces vanish). Later-round rules stated in executor report → Method notes, unconfirmed until later done-check covers. Persist state before next round.
Round building/changing verification tool (harness, probe, diff, measurement script) later
rounds use as evidence → one cross-vendor code review of tool after accept, before any
done-check relies on it: claude-review, or opus-fullreview if large, between rounds on
uncommitted work holding it. Audit judged step, not whether tool measures right. Confirmed
tool findings → next round's step; rest → Remaining.
Phase end (contract milestone, or unit user asked to ship as one PR): opus-fullreview on phase
diff, or claude-review if small. Surviving findings fixed in accepted round before merge,
never patched by Manager directly. Other repo-required pre-merge reviews still run. One PR
per phase requested → phase ends after last accepted round: commit, open PR, run these
reviews, record Waiting: merge of <PR> in state.
Next phase: first round in fresh workspace from merged default branch; baseline there.
Rounds use native subagents; sidebar tasks no substitute. Wait via exposed wait tools, bounded. Check live status before re-dispatch. Respect concurrency; release finished agents if supported. While waiting, Manager may inspect evidence, organize work; never edit files in executor's scope.
Audit contract
Auditor returns:
status: complete / incomplete / blocked.integrity: clean / suspect / violation. Clean needs observed artifacts, changes in scope, established vs baseline; missing evidence → suspect.contract: aligned / drifted, justified vs current contract version.repairable: yes / no, onincompleteonly, w/ diagnostic from auditor's own check run. Yes = mechanical fault; approach survives it (build error, missing dep, harness or resource failure); no = approach failed. Diagnostic only in executor report = claim, doesn't count.- Per applicable check: passed / failed / unavailable, command or inspection, actual result, evidence location. Record inspected revision, dirty-file fingerprints.
Step acceptance: every required local check passes, task constraints hold. Future final checks stay pending; don't block prerequisite step. E.g. verified DB work may precede unbuilt UI if DB checks pass; doesn't prove full user flow works.
Failed/unavailable checks required for current step block its acceptance and dependent work, despite confident labels or time spent. Identify missing check/authority, do independent authorized work, get needed user input. Never count unavailable required check as pass.
Before declaring done: fresh final audit of integrated workspace vs all current final acceptance checks, incl. affected earlier guarantees. Any failed/unavailable required final check → unfinished. Verdict bound to inspected workspace; later relevant edits → revalidate.
Stagnation and stopping
- Same step fails twice → record cause, change approach per evidence. Failed recovery = 2nd failure.
- 3 straight batches w/o new verified progress → pause dispatch, rethink decomposition. Blocked tool or missing authority needs recovery, not more code edits.
- Count both from Audit log, never memory. Rewrite may route stuck step through
arena(parallel candidates, pick, graft) inside executor agent; Manager never reads candidates, picks or grafts; auditor sees only workspace result. Candidates need Contract, Dead ends copied in. Worktree starts from HEAD → use.tmp/arena-*copies or commit WIP first, else earlier uncommitted edits lost. - At
max(5, 2 * initial step count)rounds → reassess scope, remaining work. Tag each Remaining item continue, reserve, or close w/ one-line reason; reserved reopens only via final audit's failed checks or user instruction. Record changed strategy before continuing; numeric cap alone ≠ completion, nor reason to drop feasible authorized work. Honor explicit user limits, runtime stop rules.
Track executor attempts, auditor invocations, incl. retries. User-stated budget or bound agreed w/ user = binding; checkpoint before exceeding. Distinct from default strategy-reassessment threshold. Binding limit hit → preserve evidence, report remaining work; hitting it ≠ completion.
Unresolved plateau → optional different-vendor consult, once per trigger. From Codex: available Claude review workflow w/ its auth, permission checks. Another Codex agent = fresh ctx, not vendor independence. Unavailable → record it, keep evidence-driven replanning. Consult = proposal; verify vs contract before adopting.
Handoff or real blocker → save state path, last verified result, exact unfinished check, next action. Report only currently valid verified claims. Saved checkpoint doesn't schedule future run; wakeups only on user request.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

