agentleFS
johnqtcgjohnqtcg/awesome-skills/skills/writing-plans/SKILL.md

writing-plans

Skill30 starsChanged 4 months agoMITView on GitHub

Create implementation plans for multi-step tasks. Use when you have a spec, requirements, or feature request that needs decomposition into concrete steps before implementation. Covers feature, bugfix, refactor, migration, API change, and docs-only plans. NOT for single-file edits, trivial fixes, or tasks completable in under 5 minutes.

187 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use chinese-code-review, chinese-commit-conventions and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • Leodorareluctant259Skill

    chinese-code-review

    中文代码审查规范——在保持专业严谨的同时,用符合国内团队文化的方式给出有效反馈

    Also in 8 projects that use this

  • Leodorareluctant259Skill

    chinese-commit-conventions

    中文 Git 提交规范 — 适配国内团队的 commit message 规范和 changelog 自动化

    Also in 8 projects that use this

  • ryanportfolioSkill

    addskill

    Create, import, update, or install repo or personal skills: runtime ownership, resources, discovery checks.

    Also in 6 projects that use this

  • ryanportfolioSkill

    apply-firmware

    Bring current folder (plain folder, existing repo, old or partial firmware copy) up to full Harness Firmware in place. Mirror external repo → adopt-repo.

    Also in 6 projects that use this

  • +2 more from Leodorareluctant259
  • +6 more from ryanportfolio

The file

Show its rules and text

We split this skill into the rules it gives an agent

20 rules. 0 are common, 17 are distinctive, and 3 are very specific to this project.

  • 0

    Common

    Most of the 169 edited versions we read keep these.

  • 17

    Distinctive

    This author's own choices. Worth a look.

  • 3

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Write implementation plans that a developer with zero codebase context can follow.

    line 14
  2. Distinctive:

    Before classifying complexity, verify the request is plannable.

    line 20
  3. Distinctive:

    Fast pass-through: If the request names specific files, describes concrete behavior changes, and has clear scope boundaries, proceed …

    line 22
  4. Distinctive:

    STOP and ASK: if any of these apply:

    line 24
  5. Distinctive:

    Ask only about WHAT the user wants, not HOW to implement it

    line 36
  6. Distinctive:

    Before writing any plan, classify the task:

    line 47
  7. Distinctive:

    If SKIP: tell the user "This task doesn't need a formal plan.

    line 57
  8. Distinctive:

    If unclear: default to Lite, upgrade during execution if complexity emerges.

    line 58
  9. Distinctive:

    No code blocks — only steps and verification commands

    line 66
  10. Distinctive:

    Before writing ANY file path into the plan:

    line 84
  11. Distinctive:

    If repo is not accessible: see Degraded Mode below.

    line 97
  12. Very specific:

    If companion skills (subagent-driven-development, executing-plans) are unavailable: provide inline execution guidance without external …

    line 168
  13. Very specific:

    Check CLAUDE.md for plan_dir setting → use it

    line 173
  14. Very specific:

    Check if docs/plans/ exists in project → use it

    line 174
  15. Distinctive:

    Update plan file if impact is non-trivial

    line 200
  16. Distinctive:

    If >30% of tasks deviate significantly: pause execution, reassess plan

    line 201
  17. Distinctive:

    If repo is not accessible or discovery cannot run:

    line 207
  18. Distinctive:

    Do not write line-number references

    line 211
  19. Distinctive:

    Format Gate PASS: All Critical pass AND ≥4/6 Standard AND ≥3/4 Hygiene

    line 260
  20. Distinctive:

    If blocking issues are found: fix them, re-run Step 1 on the changed sections, then proceed to Step 3.

    line 277

“Common” is measured: kept by at least 6 in 10 of the 169 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.

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

Writing Plans

Write implementation plans that a developer with zero codebase context can follow. Plans must be evidence-backed (paths verified), mode-appropriate (not over-engineered), and executable (every step has a verification command). Before planning, verify that the user's requirements are clear enough to plan against.

Announce at start: "I'm using the writing-plans skill to create the implementation plan."

Gate 1: Requirements Clarity Gate

Before classifying complexity, verify the request is plannable. A vague request produces a plan built on assumptions.

Fast pass-through: If the request names specific files, describes concrete behavior changes, and has clear scope boundaries, proceed directly to Gate 2. Do not ask clarifying questions for obviously clear requests.

STOP and ASK if any of these apply:

TriggerWhat's MissingExample
Vague action verb with no measurable outcomeSuccess criteria"optimize the auth module"
No scope boundary statedWhat's in/out of scope"refactor the codebase"
Ambiguous target when multiple existWhich component"update the API" (when 5 APIs exist)
Change type unclear (behavior vs performance vs structure)Intent"improve error handling"
Backward compatibility unstated for public interface changesConstraint"change the response format"

Clarification protocol:

  1. State what you understood (to confirm or correct)
  2. Ask only about WHAT the user wants, not HOW to implement it
  3. Group related questions — max 3-5 questions per round
  4. Maximum 2 clarification rounds. If still unclear after round 2, state remaining assumptions explicitly and proceed
  5. For each assumption you make, mark it as [Assumption] in the plan header

Exit condition: Requirements are "clear enough" when you can write a one-sentence Goal and a scope boundary (what changes, what does NOT change) without inventing information the user did not provide.

Load references/requirements-clarity-gate.md for the full dimension checklist, mode-appropriate depth rules, and clarification examples.

Gate 2: Applicability Gate

Before writing any plan, classify the task:

Complexity SignalDecision
Single file, <30 lines changed, no cross-module depsSKIP — execute directly, no plan needed
Docs/config/README only, no logic changesSKIP or Lite checklist
Single module feature, clear scope, <200 linesLite mode
Multi-file feature, tests + impl, 200-800 linesStandard mode
Cross-module, migration, architecture change, >800 linesDeep mode

If SKIP: tell the user "This task doesn't need a formal plan. Proceeding directly." If unclear: default to Lite, upgrade during execution if complexity emerges.

Load references/applicability-gate.md for edge cases and language-specific signals.

Execution Modes

Lite (single-module, low risk)

  • 5-15 line checklist (not a full plan document)
  • No code blocks — only steps and verification commands
  • No reviewer loop
  • Execute immediately in current session

Standard (typical feature or bugfix)

  • Full plan document saved to file
  • Interface-level code only (signatures, key assertions — not full implementations)
  • Mandatory Reviewer Loop (1 round) — always runs after self-check, not conditional on self-check result
  • Supports subagent-driven or inline execution

Deep (cross-module, migration, architecture)

  • Full plan document + dependency graph
  • Phased validation checkpoints + rollback strategy per phase
  • Mandatory Reviewer Loop (up to 3 rounds) — always runs after self-check, not conditional on self-check result
  • Subagent-driven execution recommended

Gate 3: Repo Discovery Gate

Before writing ANY file path into the plan:

  1. Read project structure: top-level dirs, package manager, test framework, CI config
  2. Label every path (all four levels defined in references/repo-discovery-protocol.md):
    • [Existing] — verified via Glob/Read
    • [New] — will be created, parent dir verified
    • [Inferred] — based on project convention, not directly verified
    • [Speculative] — degraded mode only, no verification possible
  3. NEVER write line numbers for files you haven't read
  4. NEVER write complete implementation code for functions whose interface you haven't verified

Load references/repo-discovery-protocol.md for the full discovery checklist.

If repo is not accessible: see Degraded Mode below.

Gate 4: Scope & Risk Gate

Change SizeRiskAction
≤200 linesLowStandard flow
201-800 linesMediumInclude rollback notes per phase
>800 linesHighDependency graph required, phased rollout, validation checkpoints

High-risk areas requiring explicit rollback strategy:

  • Auth/authz, payment, database schema, public API, concurrency, infrastructure

Plan Content Rules

Code Level by Mode

ModeWhat to IncludeWhat NOT to Include
LiteStep descriptions + verification commandsAny code blocks
Standard[interface] signatures, [test-assertion] key assertions, [command] CLI commandsComplete function implementations
DeepSame as Standard + data flow sketches, migration SQL, sequence outlinesComplete implementations, hardcoded config values

Code Block Labels (mandatory for Standard/Deep)

  • [interface] — function signature, struct definition, type contract
  • [test-assertion] — expected behavior check, not implementation
  • [command] — exact CLI command to run
  • [speculative] — best guess, needs verification during execution

Plan Document Structure (Output Contract)

Header (all modes except Lite)

# [Feature Name] Implementation Plan

**Goal:** [One sentence]
**Mode:** Lite | Standard | Deep
**Architecture:** [2-3 sentences]
**Tech Stack:** [Key technologies]
**Repo Discovery:** [Verified project conventions, test framework, CI setup]

---

Dependency Graph (Deep mode only)

Task 2 [depends: 1] [blocks: 4, 5]
Task 3 [depends: 1] [blocks: 5]
Tasks 2, 3 are parallelizable.

Tasks (mandatory)

Each task has:

  • Files: with [Existing] / [New] / [Inferred] / [Speculative] labels
  • Steps: using - [ ] checkbox syntax
  • Verification: at least 1 runnable command per task

Risk & Rollback (Standard + Deep)

  • Per-phase rollback strategy for Medium/High risk changes
  • Validation checkpoints between phases

Execution Handoff (mandatory)

Plan saved to `<path>`. Execution options:

1. **Subagent-Driven (this session)** — fresh subagent per task, review between tasks
2. **Parallel Session** — open new session, batch execution with checkpoints

Which approach?

If companion skills (subagent-driven-development, executing-plans) are unavailable: provide inline execution guidance without external skill dependency.

Plan Save Location

  1. Check CLAUDE.md for plan_dir setting → use it
  2. Check if docs/plans/ exists in project → use it
  3. Fallback: save to project root as plan-YYYY-MM-DD-<name>.md

Filename: YYYY-MM-DD-<feature-name>.md

Anti-Examples

Load references/anti-examples.md for the full list. Key suppressions:

  1. Path fabrication: writing src/auth/handler.go:45-67 without reading the file
  2. Implementation code in plans: 50-line function body that hasn't been compiled
  3. Over-decomposition: 20-line bugfix split into 8 tasks with 40 steps
  4. Rigid TDD for everything: docs-only changes forced through test-first workflow
  5. Ignoring parallelism: 5 independent tasks forced into sequential order
  6. No verification commands: steps ending with "check that it works"
  7. Framework assumption: "use Jest" when project actually uses Vitest
  8. Missing rollback: database migration without undo steps
  9. Hardcoded paths: fixed save location ignoring project conventions
  10. Planning against vague requirements: writing a plan without clarifying ambiguous instructions first

Plan Update Protocol

During execution, when reality diverges from plan:

  1. Record: [Deviation] Task N Step M: planned X → actual Y (reason: Z)
  2. Assess: Trivial (continue) / Significant (adjust downstream) / Breaking (pause, replan)
  3. Update plan file if impact is non-trivial
  4. If >30% of tasks deviate significantly: pause execution, reassess plan

Load references/plan-update-protocol.md for the full protocol.

Degraded Mode

If repo is not accessible or discovery cannot run:

  1. Announce: "Degraded mode — repo structure not verified"
  2. Mark ALL file paths as [Speculative]
  3. Do not write line-number references
  4. Include "Discovery commands to run first" section in the plan
  5. Reduce code blocks to [speculative] interface sketches only
  6. Skip Gate 4 (cannot classify risk without evidence)

Post-Writing Workflow

After finishing the plan document, run these two gates in sequence. Both are required for Standard and Deep mode. They are complementary, not substitutable: the Self-Check catches format violations; the Reviewer Loop catches logic problems that only emerge when you read the plan as a skeptic who never saw the codebase.

Step 1 → Self-Check (Format Gate)       — always run, fixes structural errors
Step 2 → Reviewer Loop (Substance Gate) — mandatory for Standard/Deep, skip for Lite
Step 3 → Execution Handoff

Step 1 — Plan Quality Scorecard (Format Gate)

Self-evaluate for structural correctness. Fix any Critical failures before moving to Step 2.

Critical (ALL must pass)

#Check
C1Applicability Gate ran and mode declared
C2Every file path labeled [Existing]/[New]/[Inferred]/[Speculative]
C3No complete implementation code in Standard/Deep mode
C4Every task has ≥1 runnable verification command
C5Requirements clarity confirmed (or assumptions explicitly marked [Assumption])

Standard (≥4/6 must pass)

#Check
S1Repo discovery ran (or Degraded mode declared)
S2Risk classification assigned; rollback included for Medium/High
S3Tasks are single-responsibility (one concern per task)
S4Independent tasks identified and not forced sequential
S5Test/verification steps precede commit steps
S6Plan follows Output Contract structure

Hygiene (≥3/4 must pass)

#Check
H1Plan saved to correct location (project convention or fallback)
H2Execution handoff offered
H3No hardcoded environment assumptions without fallback
H4Mode-appropriate depth (Lite not over-engineered, Deep not too thin)

Format Gate PASS: All Critical pass AND ≥4/6 Standard AND ≥3/4 Hygiene

Step 2 — Reviewer Loop (Substance Gate)

Lite mode: Skip — go directly to Execution Handoff.

Standard and Deep mode: The Reviewer Loop is MANDATORY regardless of Step 1 result. A plan that passes the Scorecard is well-formatted; it is not necessarily logically sound. The Reviewer catches what the Scorecard cannot: task dependencies that contradict the stated order, parallel tasks that write to the same file, verification commands that run but don't test the claimed behavior, and scope that silently exceeds the stated goal.

Load references/reviewer-checklist.md and apply every item. Two execution paths:

  • Subagent available: Dispatch an independent reviewer subagent with the plan text and checklist. The subagent reviews without author context and returns a structured report.
  • Single session (no subagent): Deliberately adopt a reviewer mindset — step back from authorship and read the plan as a skeptic seeing it for the first time. Work through every checklist item, with extra attention to the Substance section (SB1–SB6 in the checklist), which requires adversarial reasoning the self-check cannot perform.

Rounds:

  • Standard: 1 round. Fix any blocking issues, then proceed.
  • Deep: up to 3 rounds. Iterate until no blocking issues remain.

If blocking issues are found: fix them, re-run Step 1 on the changed sections, then proceed to Step 3.

Step 3 — Execution Handoff

Proceed only after both gates pass. Offer the user execution options per the Execution Handoff template in the Output Contract section above.

Reference Loading Guide

ScenarioLoad
Unsure whether requirements are clear enoughreferences/requirements-clarity-gate.md
Unsure whether to write a planreferences/applicability-gate.md
Starting a plan (always)references/repo-discovery-protocol.md
Choosing plan shapereferences/plan-templates/<scenario>.md
Self-checking qualityscorecard in Step 1 above
Reviewer evaluating planreferences/reviewer-checklist.md
Execution diverges from planreferences/plan-update-protocol.md
Need examples of good/bad plansreferences/golden-scenarios.md
Checking common mistakesreferences/anti-examples.md

Context Note

This skill does not depend on specific companion skills or worktree setup. It recommends subagent-driven-development and executing-plans when available, but provides self-contained guidance when they are not. Worktree isolation is recommended but not required.

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.