execplan-improve
Skill78 starsChanged 6 months agoMITView on GitHub
Read an existing ExecPlan, deeply analyze every referenced file and code path, and rewrite the plan with concrete, code-grounded improvements. Prefer work-item plans under `.agent/work/`, while preserving backward-compatible support for older singleton plan files.
In this repository6 other files it gives its agents.
- execplan-createSkill
- goalcraftSkill
- grillcraftSkill
- grill-meSkill
- implement-execplanSkill
- reorient-myselfSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
21 rules. About 0 are common, 15 are distinctive, and 6 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈15
Distinctive · estimate
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 13
Use John Ousterhout's design philosophy as the design-quality lens:
- Distinctive: line 15
prefer deep modules over shallow wrappers
- Distinctive: line 16
prefer interfaces that hide sequencing and policy details
- Distinctive: line 17
prefer fewer concepts, fewer knobs, and fewer special cases
- Distinctive: line 18
prefer simpler mental models over visually tidy decomposition
- Distinctive: line 19
prefer moving complexity behind a stable boundary over redistributing it
- Distinctive: line 21
Treat these as the main forms of complexity:
- Very specific: line 31
If the current path contains /.codex/worktrees/, set the base repo to ~/<repo-name>.
- Very specific: line 34
Check both the worktree .agent/ and the base repo .agent/.
- Distinctive: line 47
If no ExecPlan exists in any supported location, tell the user and stop.
- Very specific: line 51
Read .agent/PLANS.md from the base repo or worktree before modifying the plan.
- Distinctive: line 57
Before doing repo work, inspect only the immediately previous assistant turn.
- Very specific: line 59
If the previous execplan-improve result was exactly skip, return exactly skip.
- Very specific: line 60
If it ended with Usefulness score: N/10 - ...
- Distinctive: line 64
If operating on a work item, read:
- Distinctive: line 85
Read the referenced files and nearby importers/importees.
- Distinctive: line 118
add missing files, tests, dependencies, milestones, and commands
- Distinctive: line 122
add recovery guidance where missing
- Distinctive: line 125
Do not change the plan's intent.
- Distinctive: line 129
If using a work item, keep:
- Very specific: line 145
If a real pass found no material improvements, return exactly skip.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Improve ExecPlan
Core philosophy: Every improvement must trace back to something found in the actual code. No speculative additions. No surface-level rewording.
Ousterhout Lens
Use John Ousterhout's design philosophy as the design-quality lens:
- prefer deep modules over shallow wrappers
- prefer interfaces that hide sequencing and policy details
- prefer fewer concepts, fewer knobs, and fewer special cases
- prefer simpler mental models over visually tidy decomposition
- prefer moving complexity behind a stable boundary over redistributing it
Treat these as the main forms of complexity:
- change amplification
- cognitive load
- unknown unknowns
Resolving the Base Repo
You may be running from a Codex worktree such as ~/.codex/worktrees/<id>/<repo>/.
- If the current path contains
/.codex/worktrees/, set the base repo to~/<repo-name>. - Otherwise the base repo is the current working directory.
Check both the worktree .agent/ and the base repo .agent/. Prefer the worktree copy if both exist.
Input Resolution
Preferred target resolution order:
- explicit plan path supplied by the user
- explicit work-item path supplied by the user
.agent/activewhen it points to a work item withstage="plan"andstate="completed"- the most recently updated work item under
.agent/work/withstage="plan"andstate="completed" - legacy fallback:
.agent/execplan-pending.md - explicit legacy fallback:
.agent/potential-bugs/<plan-name>.md
If no ExecPlan exists in any supported location, tell the user and stop.
Understand the Purpose of ExecPlans
Read .agent/PLANS.md from the base repo or worktree before modifying the plan.
Workflow
Step 0: Short-Circuit Low-Value Repeats
Before doing repo work, inspect only the immediately previous assistant turn.
- If the previous
execplan-improveresult was exactlyskip, return exactlyskip. - If it ended with
Usefulness score: N/10 - ...andN <= 3, return exactlyskip.
Step 1: Resolve the plan path and work-item metadata
If operating on a work item, read:
meta.jsondecision.mdwhen presentexecplan.md
Otherwise read the legacy plan path directly.
Step 2: Parse the ExecPlan
Extract:
- file paths
- symbols
- commands
- milestones
- acceptance criteria
- assumptions
Step 3: Deep-read referenced and adjacent code
Read the referenced files and nearby importers/importees. Look for:
- wrong paths or signatures
- missing tests or dependencies
- project conventions the plan misses
- leaked sequencing or policy the plan should hide
- shallow abstractions the plan preserves without reason
- duplicate concepts or special-case branches the plan could absorb
Step 4: Audit the plan
Check:
- accuracy
- completeness
- self-containment
- feasibility
- testability
- safety
- design quality
Step 5: Rewrite the plan in place
Rewrite at the same path:
- work-item format:
execplan.md - legacy format: the original singleton path
Preserve existing Progress, Surprises & Discoveries, Decision Log, and Outcomes & Retrospective.
Apply only code-grounded improvements:
- fix inaccuracies
- add missing files, tests, dependencies, milestones, and commands
- split oversized milestones
- define jargon
- make acceptance criteria observable
- add recovery guidance where missing
- strengthen the intended simplicity boundary and complexity dividend
Do not change the plan's intent.
Step 6: Finalize metadata
If using a work item, keep:
stage="plan"state="completed"updated_at=<now>
Step 7: Score usefulness and summarize
Report:
- Fixed
- Added
- Strengthened
- Flagged
- final line:
Usefulness score: X/10 - <specific reason>
If a real pass found no material improvements, return exactly skip.
Anti-Patterns
- surface-level rewording without code evidence
- speculative additions
- changing the plan's goal
- ignoring existing progress
- preserving shallow or leaky abstractions just because they were already in the draft
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.

