agentleFS
VladTheProgrammerVladTheProgrammer/claude-asimov/.claude/skills/better-plan/SKILL.md

better-plan

Skill0 starsChanged 4 months agoMITView on GitHub

Generate a concrete, vertical execution plan from design and structure docs. Each phase is a full slice with implement/test/verify steps. Usage: /better-plan {task-name}

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

11 rules. About 0 are common, 5 are distinctive, and 6 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈5

    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. Very specific:

    Read these files from docs/{task-name}/:

    line 11
  2. Very specific:

    If structure.md or design.md is missing, tell the user which is missing and stop: "Cannot generate a plan without {missing file}.

    line 15
  3. Very specific:

    Write docs/{task-name}/plan.md with this structure:

    line 26
  4. Distinctive:

    Each phase compiles: After completing a phase, the project must build.

    line 99
  5. Distinctive:

    Instructions reference structure.md directly: When a step says "create ThingRepository," the plan should include the exact signature from …

    line 105
  6. Distinctive:

    Keep phases small: Prefer more phases with fewer steps over fewer phases with many steps.

    line 109
  7. Distinctive:

    First phase is foundation: If there are shared types, base interfaces, or infrastructure needed by multiple slices, the first phase sets …

    line 111
  8. Distinctive:

    Last phase is integration: If phases were somewhat independent vertical slices, the final phase wires them together and runs end-to-end …

    line 113
  9. Very specific:

    Gap fixable in this phase: Add a step (e.g., 2.0 — Add test_hve_gate.py covering existing branches) before the change-introducing steps so …

    line 119
  10. Very specific:

    Before finalizing the plan, run find / grep to verify every test class named in a --tests filter actually exists.

    line 123
  11. Very specific:

    Write the plan to docs/{task-name}/plan.md.

    line 138

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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

Parse the user's input:

  • First argument is the task name (matches the docs directory, e.g., offline-sync)

Phase 1 — Read inputs

Read these files from docs/{task-name}/:

  • structure.md — required (the technical blueprint)
  • design.md — required (alignment decisions)

If structure.md or design.md is missing, tell the user which is missing and stop: "Cannot generate a plan without {missing file}. Run /{missing skill} {task-name} first."

Phase 2 — Generate the plan

The plan is derived mechanically from structure.md. The structure doc's Change Ordering and Testing Strategy are the primary inputs. Design decisions and technical decisions provide the rationale and constraints.

Slice the work into vertical phases. Each phase delivers a complete, working slice from bottom to top — data layer through UI (or whatever the vertical looks like for this task). Never organize horizontally (all models first, then all repos, etc.).

A phase may contain multiple steps if they form one logical vertical slice. A step is a single atomic unit of work — one file or a tightly coupled set of files.

Write docs/{task-name}/plan.md with this structure:

# Plan: {Task Name}

> Generated from: [design.md](design.md), [structure.md](structure.md)
>
> Execution: work through phases top to bottom. Each phase ends with a
> checkpoint. Do not proceed to the next phase until the checkpoint passes.

---

## Phase 1: {Vertical Slice Name}

*{One sentence: what this phase delivers end-to-end.}*

### Steps

#### 1.1 — {Step name}

**Do:**
{Precise instructions. What file(s) to create or modify, what types/signatures to use, what logic to implement. Reference structure.md's Data & Types and Interfaces & Contracts sections directly — use the actual signatures defined there.}

**Why:**
{One line connecting this to a design decision or structural requirement.}

#### 1.2 — {Step name}

**Do:**
...

**Why:**
...

### Checkpoint

{Concrete verification. Exactly what to run, what to check, what the expected outcome is.}

- [ ] **Build:** `{build command or "project compiles"}`
- [ ] **Test:** `{test command, manual verification step, or specific assertion}`
  - Expected: {what success looks like}
- [ ] **Verify:** {any additional check — e.g., "query X returns Y", "screen shows Z"}

**If checkpoint fails:** {What to investigate. Common failure modes for this type of change.}

### Manual Verification *(optional — include only if this phase's output needs human eyes-on, e.g. UI on a device, staging server behavior, end-to-end flow not covered by automated tests)*

- [ ] **Step 1:** {concrete action to perform} → {expected observation}
- [ ] **Step 2:** {next action} → {expected observation}

---

## Phase 2: {Vertical Slice Name}

...

---

## Phase N: {Final Slice}

...

### Final Checkpoint

{End-to-end verification that the complete feature works as described in design.md's End State.}

- [ ] ...

Rules for phase construction

  1. Vertical, not horizontal. Each phase must touch the full stack relevant to its slice. "Add the domain model, repository, and screen for feature X" is one phase. "Add all domain models" is not.
  2. Each phase compiles. After completing a phase, the project must build. If a phase introduces an interface, it must also provide at least a stub implementation in the same phase.
  3. Steps within a phase are sequential. Step 1.2 may depend on 1.1. But phases themselves should be as independent as possible.
  4. Checkpoints are concrete. No "verify it works." Instead: the specific build command, test command, or manual step. Include expected output where possible.
  5. Instructions reference structure.md directly. When a step says "create ThingRepository," the plan should include the exact signature from structure.md's Interfaces & Contracts section. The implementer (you, in a future conversation) should not need to re-derive anything.
  6. Include the types and signatures inline. Copy the relevant Python signatures/type hints from structure.md into the step's Do section. The plan must be self-contained — readable without flipping back to structure.md during execution.
  7. Keep phases small. Prefer more phases with fewer steps over fewer phases with many steps. A phase with 6+ steps is probably two phases.
  8. First phase is foundation. If there are shared types, base interfaces, or infrastructure needed by multiple slices, the first phase sets that up — but still as a vertical slice (e.g., one entity end-to-end that establishes the pattern).
  9. Last phase is integration. If phases were somewhat independent vertical slices, the final phase wires them together and runs end-to-end verification.
  10. Manual verification only where needed. Include a ### Manual Verification section only when the phase's output requires human eyes-on — a UI on a real device, a staging deployment's visible behavior, an end-to-end flow across services not covered by automated tests. Do not include it for internal changes (pure functions, data-loading plumbing, internal modules) that the automated checkpoint fully covers. When included, list concrete steps with one action and one expected observation per line. The /execute skill presents these to the user one at a time at the end of the phase — so keep each step atomic and observable.
  11. No vacuous test filters. A pytest -k Foo filter (or pytest tests/test_foo.py) that matches zero tests is not a checkpoint — it's a planning gap that fakes coverage. Before writing a test command into a checkpoint, you must ensure either (a) the test class/file already exists in the repo, or (b) the same phase contains an explicit step that creates it. Annotations like (vacuous — no pre-existing tests) are forbidden — they document the gap instead of fixing it. Resolution paths:

    • Gap fixable in this phase. Add a step (e.g., 2.0 — Add test_hve_gate.py covering existing branches) before the change-introducing steps so the new behavior lands on top of an existing safety net. Then the checkpoint's test filter has something to match.
    • No tests yet, but a sibling integration test covers the surface. Replace the unit-test filter with the integration-test filter that actually exists, and call out in the phase's intro paragraph what is and isn't covered.
    • Convention says a unit test should exist but writing it is out of scope. Don't paper over it — split the test-authoring into its own preceding phase, or note the missing-test risk in the phase's **If checkpoint fails:** block as a known coverage gap that /execute will surface.

    Before finalizing the plan, run find / grep to verify every test class named in a --tests filter actually exists. If it doesn't, do (a), (b), or (c) — not parentheses.

Deriving phases from structure.md

Map structure.md's sections to the plan:

  • Change Ordering → phase sequence and step grouping
  • Code Shape (New/Modified) → step Do instructions
  • Data & Types → inline type definitions in steps
  • Interfaces & Contracts → inline signatures in steps
  • Testing Strategy → checkpoint test commands
  • Libraries & Dependencies → called out in the first step that needs them
  • Algorithms & Logic → detailed in the step that implements them

Phase 3 — Output

Write the plan to docs/{task-name}/plan.md.

Tell the user:

  • The plan is at docs/{task-name}/plan.md
  • Number of phases
  • Brief one-line description of each phase
  • "Say 'do phase 1' to begin execution."

Do not ask questions or start a conversation. The design and structure docs already resolved the unknowns. If something in structure.md is ambiguous enough that you cannot write a concrete step, note it as a warning at the top of the plan rather than blocking generation.

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.