{"data":{"slug":"discovered-017c66fcfd97deec0710af60d4119a70c64f96d8f55d27af","title":"Planning","summary":"Turns an approved design, goal, or requirements into a plan of small tasks, each producing a checkable result, with dependencies, inputs, and execution details, ordered by dependency and worked back from the done state.","url":"https:\/\/skillshunter.net\/skills\/discovered-017c66fcfd97deec0710af60d4119a70c64f96d8f55d27af","json_url":"https:\/\/skillshunter.net\/api\/public\/v1\/skills\/discovered-017c66fcfd97deec0710af60d4119a70c64f96d8f55d27af","markdown_url":"https:\/\/skillshunter.net\/skills\/discovered-017c66fcfd97deec0710af60d4119a70c64f96d8f55d27af.md","download_url":"https:\/\/skillshunter.net\/skills\/discovered-017c66fcfd97deec0710af60d4119a70c64f96d8f55d27af\/download","category":{"slug":"software-development","name":"Software & Development"},"editor_note":"Do not start the work until the user has approved the plan. For software tasks, load `legion:coding` on acceptance. When a checkpoint hits a replan trigger, update the plan deliberately and obtain the user's agreement.","instructions":"---\nname: planning\ndescription: >-\n  Turns an approved design, a settled goal, or clear requirements into a\n  plan of small tasks, in any domain: each task produces one\n  checkable result, names its inputs, what it depends on, what may run\n  beside it, and how its done state is checked, ordered by dependency with\n  shared decisions first, worked back from the done state, with checkpoints,\n  a way back for what cannot be undone, and a pre-mortem. For\n  software, infrastructure, or data work it reads the commands and paths of\n  the repo and keeps every step green and safe to ship. Use when the\n  direction is settled and the next step is the order of work: \"write the\n  plan\", \"write the implementation plan\", \"break this into tasks\", \"split this into small steps\", \"run it overnight unattended\", \"sequence\n  the PRs\", \"plan the rollout\", \"plan backward from the deadline\", \"what is\n  the critical path\", \"so several agents can work in parallel\", for a\n  feature, a refactor, an event, a launch, a process change, or a hire, even\n  when the work looks small enough to just do.\nlicense: MIT\nmetadata:\n  author: ongtungduong\n---\n\n# Planning\n\nWrite the plan for a capable doer, a person or an agent, who has never seen\nthe conversation behind it. They will carry out a task well once they know\nexactly what it must produce and how it is checked; what they cannot know is\nwhat was decided, what the surrounding system or organization already\nenforces, what each task depends on, and which tasks may run at the same\ntime. Write those down, and nothing they could decide alone.\n\nThe plan's unit is the **task**: small enough for one doer in one sitting\n(one context window for an agent), producing one result someone else can\ncheck. How the tasks are then carried out (by you, by people, or by\nsubagents) is decided after approval, not in the plan.\n\nPlanning is read-only: nothing is built, booked, sent, or changed until the\nuser approves the plan, since work done now pins choices the review has not\nseen.\n\n**Unattended plans.** When the user asks for a plan an agent runs without\nthem after approval (\"run it overnight\", \"unattended\", \"AFK\", \"no questions\nafter approval\"), read [references\/unattended.md](references\/unattended.md)\nat step 2 and apply it at steps 5, 6, 8, and 9: every decision a person\nwould make during the run is made before approval. Without that request, do\nnot use it: a person who is present is cheaper to ask.\n\n## Backward planning and the lenses\n\nThe method that carries the lenses is **backward planning**: from the done\nstate, ask \"what must be true just before this?\" milestone by milestone back\nto today, then turn the chain forward, estimate it, and detail it to the\nhorizon. Read [references\/backward-planning.md](references\/backward-planning.md)\nand run its procedure at step 3.\n\nFifteen lenses in five groups: *outcome and backward* (begin with the end,\noutcome vs. output, definition of done), *execution* (working state, shared\ndecisions first, reversible change), *prioritization and trade-off* (saying\nno, leverage, critical path), *realism and risk* (planning fallacy,\npre-mortem, buffer), *adaptive and iterative* (plan as compass, rolling\nwave, checkpoints). Use each where it changes a task, the order, or an\nestimate, and drop it where it does not; they are not headings in the plan.\nRead [references\/lenses.md](references\/lenses.md) for the table of what each\nlens forces and the steps it applies to, and for its procedure when it needs\ndepth.\n\n\n## Plan size\n\n| Size | When | What applies |\n|---|---|---|\n| Small | One coherent change or deliverable: up to about five tasks, one team or doer, nothing irreversible, done within days | Done state, `Not doing`, Checks, and the task list. The task order is the critical path; buffer is one line; no rolling wave; the only checkpoint is the end. Pre-mortem: one or two reasons. Template header: Goal, Done state, Source, Checks, Not doing; drop the other header fields and the sections that would stay empty. An unattended small plan also keeps what `references\/unattended.md` lists |\n| Project | Several deliverables, teams, or systems, an irreversible step, several people or agents, outside dependencies, or weeks of work | Everything in this skill and the full template |\n\n## Workflow\n\nWhen a step calls for another Legion skill, load it before continuing.\nOn Claude Code, call the Skill tool with the qualified name. On Codex,\nread and follow its installed `SKILL.md` at the location the session lists.\n\n**Gate: a settled direction comes first.** If what to do and why is still\nopen (only a request such as \"plan X\" with no agreed goal, spec, or design),\nload `legion:brainstorming` and plan only after the\ndirection is settled. A plan built on guessed intent pins every guess into\ntasks, owners, and dates. Make that call before you write any question to\nthe user: a list of questions from here is your framing of the goal, while\nbrainstorming asks one at a time in the user's words and settles the rest.\nIf the work is a software, infrastructure, or data defect whose cause is\nunknown, load `legion:debugging` first. A plan for a fix\nneeds the cause.\n\n1. **Scope check and size.** If the work covers several independent streams,\n   propose one plan per stream; each must deliver something usable alone.\n   Then say the plan's size (table above); it sets how much of steps 3 to 8\n   applies. If the work grows mid-plan, step up a size.\n2. **Read the facts before planning.** Tasks written from the goal alone\n   name things that do not exist, checks nobody runs, and changes the\n   surroundings cannot absorb. Read, and record what you found:\n   - the spec or design, and the closest piece of past work done the same\n     way: its structure is the pattern the new tasks follow;\n   - the standing bar every result must clear (house rules, templates,\n     policies, contributing docs, approval rules): it goes into Global\n     constraints verbatim, as the definition of done every task inherits;\n   - the checks that already exist and how results are accepted (a review,\n     a sign-off, a test suite, a budget approval);\n   - who depends on what changes, and what cannot be taken back once done;\n   - existing plans in `.legion\/plans\/` and the project's tracker. An\n     unfinished plan for other work is never overwritten: it may be in\n     progress in another session. A replan of the same work updates it in\n     place;\n   - the parties outside the doers: who must approve (each approval becomes\n     a task), and who must be told before a change reaches them (that\n     telling goes into the task that makes the change).\n\n   When the work changes software, infrastructure, or data, read\n   [references\/engineering.md](references\/engineering.md) now: it names\n   what to read in the repo (code paths, the project's own commands, deploy\n   style, consumers) and the engineering rules for steps 4, 5, and 8. If a\n   fact cannot be found, it is an assumption in the plan and a question at\n   hand-off, not a default.\n3. **Work back from the done state**, per\n   [references\/backward-planning.md](references\/backward-planning.md): the\n   milestone chain, what is not being done, the critical path, estimates with\n   buffer, the detail horizon, and the checkpoints.\n4. **Order by dependency, then break into small tasks.** Draw the dependency\n   graph of what the work changes or produces. Fix the decisions several\n   tasks share first, as their own small task, so later tasks build against\n   a decided answer and can run in parallel. Then break the near milestones\n   into tasks that each deliver one working result end to end, not one layer\n   or one department at a time. The first task is the thinnest pass that\n   proves the approach, or a timeboxed probe of the biggest unknown.\n\n   A task is small enough when one doer can finish it in one sitting and\n   someone else can check it against its Done line. Split a task whose\n   acceptance needs more than three bullets, that touches two independent\n   areas, whose title needs an \"and\", or that would take a person more than\n   a day or an agent more than one context window. Each task states:\n   - **Produces**: the exact result later tasks rely on (a name, a\n     document, a decision, an interface, a booking);\n   - **Inputs**: pointers to what it reads (files, documents, earlier\n     tasks' Produces lines), so a doer with no history can start;\n   - **Depends on \/ Parallel with**: earlier tasks, and the tasks it may\n     run beside once its inputs exist;\n   - **Scope**: what it may change, and what it must leave alone;\n   - **Done when**: the checkable condition, and the check that shows it.\n\n   Mark what must run in sequence (shared state, a chain of dependencies,\n   anything two doers would change at once) and say why the first tasks\n   come first in the plan's `Order` line. Name the low-value tail and, at\n   hand-off, propose moving it to a later plan; the agreed scope stays until\n   the user agrees.\n5. **Make irreversible changes reversible.** A task that cannot be taken\n   back once done (stored data in a new shape, a public interface others\n   use, money paid, a contract signed, an announcement made) is staged:\n   the reversible part first, a point to confirm, then the irreversible\n   part, with what undoes or limits it and the signal that says it is safe\n   to go on. In an unattended plan the confirm point is a gate authorized at\n   hand-off. For a schema, data, API, config, or infrastructure change, read\n   [references\/rollout-safety.md](references\/rollout-safety.md).\n6. **Write the plan** from [assets\/plan-template.md](assets\/plan-template.md)\n   into `.legion\/plans\/YYYY-MM-DD-<topic>.md`, unless the project names\n   another place or a tracker (then one tracker item per task, with the plan\n   file as the ordered index). Copy the work-wide requirements and the\n   standing bar from step 2 verbatim into Global constraints, list the\n   checks, the decisions with their reason, and the assumptions, and list in\n   Watch points up to five situations the spec implies but never states,\n   each with the task that handles it. Every detailed task decides exactly\n   one thing, with the fields from step 4 and its rollback when step 5\n   applies. A reference to another task points at that task's Produces\n   line. Place a checkpoint every two or three tasks and at each milestone:\n   the whole checked end to end, and a review before the next tasks (in an\n   unattended plan, an automated gate under its stop rules).\n7. **Pre-mortem.** Assume the plan was carried out exactly and the goal still\n   failed. List five or more candidate reasons, each naming the task,\n   decision, party, or assumption at fault, and rate each for likelihood and\n   damage (high, medium, low). Keep the three with the highest likelihood\n   times damage (one or two for a small plan) in the plan's `Pre-mortem`\n   section with their ratings, and give each a countermeasure: a check in\n   its owning task, a Watch point, a reordered task, a staged change,\n   buffer, or a question for the user at hand-off.\n8. **Self-review, then fix inline:**\n   - [ ] every requirement maps to a task or to `Not doing`, and every\n         task's Done line names the requirement it serves;\n   - [ ] no task decides nothing (\"handle edge cases\", \"TBD\", \"wire it up\",\n         \"finalize details\", \"coordinate as needed\");\n   - [ ] every thing a task names exists as written or is produced by an\n         earlier task's Produces line, and the names match;\n   - [ ] every task is small enough by the step 4 rule, and its Inputs let\n         a doer with no history start;\n   - [ ] every task leaves the work usable, and the order honors the\n         dependency graph; no two parallel tasks change the same thing;\n   - [ ] every task that step 5 covers names its way back;\n   - [ ] every estimate names its basis: a source you actually read, or\n         \"judgment\" with a range;\n   - [ ] every party who must approve or be told appears in a task;\n   - [ ] (project) the critical path and the parallel streams are marked,\n         and buffer protects the end date;\n   - [ ] (project) every far milestone has a done criterion and the\n         checkpoint where it gets detailed;\n   - [ ] every Watch point has its task, and every pre-mortem reason has a\n         countermeasure in the plan;\n   - [ ] (unattended) the self-review lines in `references\/unattended.md`.\n9. **Hand off.** Link the plan and ask the user to review it. Ask the\n   decisions only the user can make in one selection call, within the host's\n   limit (`AskUserQuestion` on Claude Code). Carry any overflow to the next\n   round. Include the low-value tail and each `Not doing` item (defer or\n   keep), the pre-mortem questions, open\n   facts from step 2, and the approval itself (approve, or change\n   something). Each question stands alone, since the dialog may hide the\n   plan text, and is written in the language of the conversation; put your recommendation first, labeled \"(Recommended)\", with\n   its reason and what it costs in the description. Estimates on the\n   critical path whose basis is \"judgment\" go in the same call. Without a\n   selection tool, ask the same questions as text with lettered options.\n   An unattended plan is approved with no question pending; its hand-off\n   follows `references\/unattended.md`.\n\n   Do not start the work until the user has approved the plan. Then offer\n   how to carry it out: when agents will do the tasks, load\n   `legion:orchestrating-subagents`, which takes the plan's tasks as\n   its pieces and decides for each whether it runs inline or on a subagent,\n   on which tier, and in which parallel group; for a task that builds or\n   changes behavior in software, offer `legion:coding` for that\n   task and load it on acceptance. When a checkpoint later hits a replan\n   trigger, update the plan deliberately: what changed, what moves, and the\n   user's agreement.\n\n## Gotchas\n\n- The most common plan bug is a name that drifts between tasks (one name in\n  task 3, another in task 6) or was never checked against what exists; the\n  Produces lines and step 2 exist to catch it.\n- A plan longer than the work it describes has done the work instead. Write\n  results, inputs, and checks, not the content of each result.\n- Layered or departmental tasks (\"all the research\", then \"all the\n  drafting\", then \"all the review\") cannot be checked until the end, so\n  mistakes surface late and nothing is usable alone.\n- A task sized for a person can be too big for an agent: one context window\n  is the agent's sitting. A plan that agents will carry out keeps every\n  task within it, so each one can start fresh from its Inputs.\n- A pre-mortem of generic risks (\"delays\", \"miscommunication\") changes\n  nothing. A reason that names no task, decision, or assumption, and so gets\n  no countermeasure, should be replaced with a specific one.\n- Scope creep enters through Watch points. A situation the source implies\n  is handled inside the task that owns it; something the source did not ask\n  for (a hardening, a convenience, a format) is not a task but a question at\n  hand-off, with your recommendation, until the user adds it.\n- Setup folded into the task that needs it beats a standalone \"setup\" task\n  that no reviewer can meaningfully reject.\n- Owners and dates you do not know are open questions for the user, not\n  values to invent. The same holds for estimates: \"from comparable work\"\n  written over a number you did not take from a source is an invented\n  value with a citation attached.\n","use_cases":["Write the plan for a software feature","Break a project into small, checkable tasks","Plan backward from a deadline","Sequence pull requests for a rollout","Plan infrastructure changes with checkpoints and reversibility"],"limitations":[],"compatibility":[],"setup_tip":null,"sample_input":null,"sample_output":null,"source_url":"https:\/\/github.com\/ongtungduong\/legion\/blob\/690826292f7c7319cc0923672ed049707aa58aa1\/skills\/planning\/SKILL.md","source_commit":"690826292f7c7319cc0923672ed049707aa58aa1","license":null,"version":null,"listing_approved_at":"2026-12-01","created_at":"2026-11-30T08:06:25.000000Z","updated_at":"2026-12-01T12:48:20.000000Z","seo_title":"Planning - Software & Development Skill","seo_description":"Create detailed, checkable task plans from approved designs or goals, using backward planning and fifteen lenses to ensure clarity, realism, and adaptability in any work.","seo_keywords":["planning","task planning","backward planning","software development planning","project planning","checklist planning","task dependencies","software rollout planning"]}}