agentleFS
grp06grp06/useful-codex-skills/execplan-improve/SKILL.md

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.

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
  1. Distinctive:

    Use John Ousterhout's design philosophy as the design-quality lens:

    line 13
  2. Distinctive:

    prefer deep modules over shallow wrappers

    line 15
  3. Distinctive:

    prefer interfaces that hide sequencing and policy details

    line 16
  4. Distinctive:

    prefer fewer concepts, fewer knobs, and fewer special cases

    line 17
  5. Distinctive:

    prefer simpler mental models over visually tidy decomposition

    line 18
  6. Distinctive:

    prefer moving complexity behind a stable boundary over redistributing it

    line 19
  7. Distinctive:

    Treat these as the main forms of complexity:

    line 21
  8. Very specific:

    If the current path contains /.codex/worktrees/, set the base repo to ~/<repo-name>.

    line 31
  9. Very specific:

    Check both the worktree .agent/ and the base repo .agent/.

    line 34
  10. Distinctive:

    If no ExecPlan exists in any supported location, tell the user and stop.

    line 47
  11. Very specific:

    Read .agent/PLANS.md from the base repo or worktree before modifying the plan.

    line 51
  12. Distinctive:

    Before doing repo work, inspect only the immediately previous assistant turn.

    line 57
  13. Very specific:

    If the previous execplan-improve result was exactly skip, return exactly skip.

    line 59
  14. Very specific:

    If it ended with Usefulness score: N/10 - ...

    line 60
  15. Distinctive:

    If operating on a work item, read:

    line 64
  16. Distinctive:

    Read the referenced files and nearby importers/importees.

    line 85
  17. Distinctive:

    add missing files, tests, dependencies, milestones, and commands

    line 118
  18. Distinctive:

    add recovery guidance where missing

    line 122
  19. Distinctive:

    Do not change the plan's intent.

    line 125
  20. Distinctive:

    If using a work item, keep:

    line 129
  21. Very specific:

    If a real pass found no material improvements, return exactly skip.

    line 145

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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>/.

  1. If the current path contains /.codex/worktrees/, set the base repo to ~/<repo-name>.
  2. 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:

  1. explicit plan path supplied by the user
  2. explicit work-item path supplied by the user
  3. .agent/active when it points to a work item with stage="plan" and state="completed"
  4. the most recently updated work item under .agent/work/ with stage="plan" and state="completed"
  5. legacy fallback: .agent/execplan-pending.md
  6. 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-improve result was exactly skip, return exactly skip.
  • If it ended with Usefulness score: N/10 - ... and N <= 3, return exactly skip.

Step 1: Resolve the plan path and work-item metadata

If operating on a work item, read:

  • meta.json
  • decision.md when present
  • execplan.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

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.