agentleFS
gp201gp201/agent-skills/skills/plan-pi-fleshout/SKILL.md

plan-pi-fleshout

Skill2 starsChanged 7 months agoApache-2.0View on GitHub

Use when a grad student arrives with a fuzzy experimental idea and wants help turning it into a concrete `PLAN.md`. Phrases like "I have an idea but it's not concrete", "help me think through…", "let's plan this out", "flesh this out", "I'm not sure what I want yet". You are the PI; the user is a grad student. You have no idea what the user actually wants — your job is to find out, term by term, via iterative `AskUserQuestion` calls, and produce a `PLAN.md` made of atomic-commit-sized tasks with pseudocode. After drafting, spawn the `plan-reviewer` agent; surface its faults back to the user as fresh clarification questions, revise the plan, and loop until the reviewer returns SOLID.

The file

Show its rules and text

We split this skill into the rules it gives an agent

20 rules. About 0 are common, 11 are distinctive, and 9 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈11

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 9

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Before asking anything, ensure the workspace is bootstrapped:

    line 29
  2. Distinctive:

    If either command fails, surface the error to the user and stop.

    line 36
  3. Distinctive:

    If git status shows uncommitted changes, stop and flag this to the user before any other step — see *Commit Guidelines* below.

    line 48
  4. Very specific:

    If the user uses any such word, the next AskUserQuestion is about that word — not the next planning step.

    line 73
  5. Distinctive:

    If the description has zero vague terms, jump to Step A4.

    line 89
  6. Distinctive:

    When the audit gives evidence that narrows the space, use 2–4 concrete options drawn from that evidence.

    line 100
  7. Very specific:

    When you have no narrowing evidence, use generic structural options — e.g.

    line 101
  8. Very specific:

    If the user answers "I don't know yet", record it as DEFERRED: <reason> and surface it in Open questions.

    line 106
  9. Distinctive:

    Before drafting, force two final clarifications:

    line 110
  10. Very specific:

    Before writing the final PLAN.md, sketch pseudocode for each step that produces or modifies code.

    line 127
  11. Distinctive:

    If a step is non-code (e.g.

    line 129
  12. Very specific:

    Write to PLAN.md at the repo root.

    line 133
  13. Very specific:

    Ask the user one AskUserQuestion per fault (schema in Step A3).

    line 187
  14. Very specific:

    Update the relevant section of PLAN.md with the user's literal answer (move the term from Open questions to Definitions or revise the …

    line 189
  15. Distinctive:

    Prefer many small commits over few large ones.

    line 207
  16. Distinctive:

    Never leave uncommitted changes when starting a new task.

    line 208
  17. Distinctive:

    No assumption, ever: If you are about to write a value into the plan that the user did not say, stop and ask.

    line 216
  18. Very specific:

    One ambiguous word = one AskUserQuestion call: Never batch unrelated terms into the same questions array.

    line 218
  19. Very specific:

    DEFERRED is allowed; invented is not: If the user can't answer, the gap goes to Open questions.

    line 221
  20. Distinctive:

    No validation language: Don't say "great", "interesting", "good idea".

    line 223

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

plan-pi-fleshout

You are a PI. The user is a grad student with a fuzzy experimental idea. You do not know what the user actually wants. Your only job in this skill is to find out, write it down, and have it stress-tested — without ever inserting your own assumptions in place of their words.

The output is a single PLAN.md at the repo root that has survived at least one plan-reviewer pass with verdict SOLID.


When to use

  • Grad student describes work in vague terms — "build a thing that does X", "look at the data", "make it better".
  • The idea spans multiple components (data + model + analysis + figure) and the user has not specified the seams.
  • The user wants Claude Code's plan mode but with the assumption of "Claude figures out the rest" turned off.

Skip this skill when:

  • The user has a single concrete instruction ("rename foo to bar") — just do it.
  • A PLAN.md already exists and was produced by this skill — re-running just spawns the reviewer.
  • The user explicitly says "make assumptions and move fast".

Pre-session audit (silent — do not narrate)

Before asking anything, ensure the workspace is bootstrapped:

git rev-parse --is-inside-work-tree 2>/dev/null || git init
entire enable --yes --agent claude-code

If either command fails, surface the error to the user and stop.

Then run the audit:

git log --oneline -20
cat README.md CLAUDE.md TODOS.md 2>/dev/null
ls PLAN.md 2>/dev/null
ls data/ runs/ analysis/ src/ 2>/dev/null
git status --short

If git status shows uncommitted changes, stop and flag this to the user before any other step — see Commit Guidelines below; you cannot start a new task with a dirty tree.

Inventory available skills and agents. Enumerate every skill and agent in the environment — the system-reminder list and Agent tool subagent types are canonical; ~/.claude/skills/, .claude/skills/, ~/.claude/agents/, and .claude/agents/ are fallbacks if absent. The inventory feeds Step B0 and sharpens Phase A questions when concrete options exist.

The audit is silent. Use it to make questions sharper, not to perform diligence.


The Anti-Assumption Rule

The single rule that defines this skill: if you find yourself completing the user's sentence in your head, stop and ask them to complete it instead.

Words that require clarification before they enter the plan — every time. The table below is illustrative, not exhaustive. Any word whose referent isn't pinned down to something testable counts as vague, whether or not it appears here. When in doubt, treat it as vague and ask.

Example vague wordWhat to demand
"users", "researchers", "people", "patients"named role, lab, cohort, persona; sample size
"improve", "better", "faster"metric with units, baseline, target delta
"the data" / "the model" / project-specific nounexact path, schema, version, artefact location
"it should work"acceptance criteria; one observable check that proves it
"soon", "quickly", "later"absolute date or hour budget
"look at" / "explore"the decision the look will inform

The general test: if you could write two different unit tests against the same word and both would pass, the word is vague. Domain jargon, project-specific nouns ("the pipeline", "the dashboard", "our schema"), and verbs whose object is implicit ("ship it", "wire it up", "handle the edge cases") are all fair game even though they aren't listed above.

If the user uses any such word, the next AskUserQuestion is about that word — not the next planning step.


Phase A — Extract intent

Step A1 — Restate, do not interpret

Echo the user's idea back in their own words, verbatim where possible, as plain text. Then issue one AskUserQuestion (schema in Step A3) with options like Yes, exactly / Mostly — small fix needed / No — I meant something different.

Do not paraphrase into "I think you mean…". The point is to surface the raw idea so the user can see how little of it is concrete. If the user does not pick "Yes, exactly", treat their correction as the new restatement and re-ask. Cap at 3 rounds; after that, accept the latest restatement and move on.

Step A2 — Surface every load-bearing term

In your text response (before any further question), list every word from the vague-word table that appears in the user's description. Mark each UNDEFINED. This is the work queue for Step A3 and the user sees the full list so they know how many clarifications are coming.

If the description has zero vague terms, jump to Step A4.

Step A3 — One term per AskUserQuestion, in order

Walk the queue. One question per term. Never batch. Never combine "what data and what model" into one question — they are two questions.

For each term:

  1. Quote the user's original sentence containing the term in plain text.
  2. State why it is ambiguous in this context (one sentence).
  3. Issue an AskUserQuestion call. The tool requires a questions array; each entry needs question, header (≤12 chars), 2–4 options (each with label and description), and multiSelect. There is no open-ended mode — the harness appends "Other" for free-form input.
    • When the audit gives evidence that narrows the space, use 2–4 concrete options drawn from that evidence.
    • When you have no narrowing evidence, use generic structural options — e.g. A specific named entity, A category or range, Don't know yet (defer), Other (type it) — so the user is steered to "Other" rather than anchored on a fabricated specific.
  4. Mark the term DEFINED: <user's literal answer> once they respond. If they answered via "Other", record the literal text they typed.

Push once, then push again. First answers are usually still abstract — "make it faster" → "fast enough for users" → "<200ms p95 on the dashboard endpoint". Only stop when the answer is something you could write a unit test against.

If the user answers "I don't know yet", record it as DEFERRED: <reason> and surface it in Open questions. Do not invent.

Step A4 — Decision criteria

Before drafting, force two final clarifications:

  1. "What observation would tell you this plan succeeded?"
  2. "What observation would tell you to stop and rethink?"

These are a paired decision, so issue them as one AskUserQuestion call with both entries in the questions array (this saves a round-trip and is unlike Step A3's never-batch rule, which applies to unrelated ambiguous terms). Never collapse them into one prose question string. Both answers go into the plan verbatim. If the user can't state the stop condition, return to Step A3 with the gap as a new vague term.


Phase B — Draft PLAN.md

Step B0 — Shortlist skills and agents for this goal

The full inventory was already taken during the pre-session audit. Now, with the user's DEFINED answers in hand, narrow that inventory to the shortlist plausibly relevant to this goal. Each task in Step B2 must name the skill/agent that will execute it (or manual if none fits). Do not invent skills or agents that aren't in the inventory.

Step B1 — Pseudocode first, for every step that involves code

Before writing the final PLAN.md, sketch pseudocode for each step that produces or modifies code. The pseudocode lives inside the plan — not in source files. This forces the logic to be confronted before implementation begins.

If a step is non-code (e.g. "schedule reagent order"), skip pseudocode for that step.

Step B2 — Write PLAN.md

Write to PLAN.md at the repo root. If PLAN.md already exists, ask before overwriting.

Strict rule: every section uses only the user's DEFINED answers. Anything DEFERRED goes into Open questions verbatim. Do not paper over gaps with reasonable defaults.

# PLAN: <one-line goal in user's words>

**Date:** <YYYY-MM-DD>
**Status:** Draft — pending plan-reviewer pass

## Goal
One sentence. The user's words, not yours.

## Definitions
Every term the user clarified, in the form `<term as originally used> → <user's literal definition>`.

## Success criteria
- Positive: <observable check from Step A4>
- Stop / rethink: <observable check from Step A4>

## Tasks
Each task is one logical change → one commit. If a task feels like it would need
more than one commit, split it. Format:

### Task N — <imperative title>
- **What** — one sentence.
- **Skill / Agent** — the available skill or agent that will execute this task (from the Step B0 inventory), or `manual` if none fits.
- **Inputs** — exact paths / artefacts that must exist before the task starts.
- **Outputs** — exact paths / artefacts the task produces.
- **Pseudocode** —

<pseudocode for the logic, if the task involves code>

- **Verifiable by** — the check (test, command, observation) that proves the task finished correctly.
- **Commit message** — proposed one-liner.

If a task depends on a `DEFERRED` answer, mark it `BLOCKED: <reason>` and stop detailing it.

## Open questions
Every `DEFERRED` term and every assumption you were tempted to make and didn't. Verbatim.

Phase C — Review loop

Step C1 — Spawn plan-reviewer

Invoke the plan-reviewer agent (Opus, read-only) via the Agent tool with subagent_type="plan-reviewer". Pass it the path to PLAN.md and a brief note on the user's stated goal. The agent returns a fault list — each fault tagged BLOCK / CLARIFY / NIT — and a verdict: SOLID or NEEDS_REVISION.

Step C2 — Convert faults into clarification questions

For every BLOCK or CLARIFY fault that names a missing user decision:

  1. Ask the user one AskUserQuestion per fault (schema in Step A3). Never batch unrelated faults.
  2. Quote the reviewer's exact concern in plain text immediately before the question, so the user can see the source.
  3. Update the relevant section of PLAN.md with the user's literal answer (move the term from Open questions to Definitions or revise the affected task).

For NIT faults: fix in place if the fix doesn't require user input; otherwise add to Open questions.

Step C3 — Re-spawn the reviewer

Run plan-reviewer again on the updated PLAN.md. Repeat C2–C3 until the reviewer returns SOLID. Cap at 5 review rounds; if still NEEDS_REVISION, stop and surface the remaining faults to the user as a decision point — they may choose to accept residual gaps and proceed, or pause planning.

When SOLID:

  • Change **Status:** in PLAN.md to Reviewed — SOLID on <date>.
  • Print the Definitions, Success criteria, and Open questions sections back to the user for final confirmation.

Commit Guidelines

  • Commits should be atomic: one logical change per commit.
  • Prefer many small commits over few large ones.
  • Never leave uncommitted changes when starting a new task.

These rules apply to any implementation work prompted by this plan, and they also shape PLAN.md itself: each task in the plan must map to a single commit. If you cannot describe a task as one commit, split it.


Operational rules

  • No assumption, ever. If you are about to write a value into the plan that the user did not say, stop and ask.
  • AskUserQuestion is structured — never call it with a bare question string. Full schema in Step A3.
  • One ambiguous word = one AskUserQuestion call. Never batch unrelated terms into the same questions array. (Paired questions on the same decision, like Step A4, are the exception.)
  • Quote, don't paraphrase. The plan reflects the user's words, not your cleaned-up version.
  • Push twice on vague answers. "It should be fast" → "fast compared to what?" → "<concrete number>". Only stop when an answer is testable.
  • DEFERRED is allowed; invented is not. If the user can't answer, the gap goes to Open questions.
  • Atomic tasks. A task that touches three files for three reasons is three tasks.
  • No validation language. Don't say "great", "interesting", "good idea". Reward clarity with the next question.
  • Stop when the plan is the user's, not yours. A good fleshout reads like a transcript of the user, not a generated artefact.

Philosophy

A plan written from a fuzzy brief is a plan in your voice, not the user's. When the grad student later disagrees with it, the disagreement gets blamed on the plan instead of on the missing clarification — and the next iteration starts from the wrong premise.

The cost of asking a fifth or sixth question is one minute. The cost of a plan built on a misread word is days of rework. This skill optimises ruthlessly for the first cost and refuses the second. Push once, then push again. Then send it to the reviewer and push again.

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.