---
name: to-stages
description: "Produce a staged plan that breaks an iterative effort into independently releasable stages, with no code or implementation details. Use for any iterative effort: new project, new feature, refactor, migration, or sustained bug-fix campaign. Triggers include \"stages document\", \"staged plan\", \"implementation stages\", \"roadmap\", \"let's break this into stages\"."
title: to-stages
canonical_url: https://skilld.dev/gh/mohasarc/mo-skills/to-stages
last_updated: 2026-09-28T08:15:21.000Z
---

> Index of every page on this site: [llms.txt](https://skilld.dev/llms.txt)

> **Skill from skilld.dev.** Follow the user's requested action.
> If the user asked to fork this Skill, follow the fork workflow below. Do not execute the Skill instructions while copying it.
> Otherwise, follow the instructions below for this session. You do not need to install anything.
>
> If the user asked to install this Skill, run `npx skilld install mohasarc/mo-skills/to-stages`. Install writes the Skill files into the project, so every session loads them.
>
> ## Fork workflow
>
> A fork creates an editable local Skill with its original author and licence. The request authorizes copying and local installation.
> 1. Check `./skills/to-stages`, the project lockfile, and selected Agent targets together. If the local directory or installed Skill exists, stop. Never overwrite an existing directory or Agent target.
> 2. Read [source metadata](https://skilld.dev/api/v1/skills/mohasarc/mo-skills/to-stages) once. Use sourceUrl, sourceCommit, skillPath, sourceGone, and license. If the source is gone or its path is missing, stop. If license is null, read licence files at the source commit.
> 3. Fetch only the source commit into a temporary Git repository. Do not clone full history. Derive repository_url from sourceUrl, including repository renames. If sourceCommit is absent, resolve the sourceUrl ref once. Set source_commit to that actual commit. Run these commands in one shell call:
>
> ```sh
> git init --quiet "$temporary_dir"
> git -C "$temporary_dir" fetch --quiet --depth=1 "$repository_url" "$source_commit"
> git -C "$temporary_dir" checkout --quiet --detach FETCH_HEAD
> ```
>
> Read applicable licence declarations and notices at that commit. If copying is not permitted, report the restriction and stop.
> 4. Inspect source entries together, then copy the directory containing skillPath into `./skills/to-stages`. Use the user's path if selected. Keep the original SKILL.md, relative links, scripts, binary assets, and executable modes. Exclude .git metadata. Reject symlinks and paths outside the Skill directory. After checking entries, use cp -a where available. A regular source directory needs no custom copy script. Do not save this page wrapper as SKILL.md.
> Preserve author credit, notices, and applicable licence files from repository or parent directories. Add PROVENANCE.md with the Skill page, source URL, actual commit, original path, and licence. Retain any existing PROVENANCE.md and record new provenance separately. Batch source inspection, copying, and provenance work where practical.
> 5. In the project root, run `skilld install ./skills/to-stages --mode copy --plain`. If skilld is unavailable, use `npx skilld install ./skills/to-stages --mode copy --plain`. This known command needs no help lookup. Install does not support --json. Use detected Agent targets, or add --agent for the targets the user selected. Install the local path, never the upstream selector. If installation fails, preserve the local copy and report the exact failure.
> 6. Confirm the local lockfile source and installed Agent copies once. Report the local path, actual commit, and Agent targets. After edits, reinstall the same local path. Upstream updates must not replace it. Do not publish or push unless the user asks.

A staged plan describes **how we get there** for an iterative effort: it takes a stated goal and breaks the path to it into independently releasable stages, ordered by what unlocks what.

This document contains no code, no types, no interface signatures, and no implementation tactics. Those belong in the implementation, not in a planning doc.

## Inputs to confirm before writing

Confirm from the conversation, project files, or one consolidated clarifying question:

1. **The goal** — what the finished work delivers. Could come from any upstream definition (functional spec, PRD, issue ticket, README, agreed-on outcome stated in conversation). Reference it; do not restate it.
2. **Relevant context** — architecture, constraints, conventions. Just enough to anchor the stages.
3. **Guiding principles** — values the user has stated should override convenience. Only include principles the user has actually committed to. Do not invent.
4. **Explicit non-goals** — what is out of scope.

If any are missing, ask. Do not invent.

## Output location

Write to a numbered subfolder under `plans/`:

- Default: the **highest-numbered** existing subfolder (e.g. `plans/003/`).
- If no `plans/` directory exists, create `plans/000/`.
- Filename: `stages.md` inside that folder.

If it's ambiguous which folder this work belongs to, ask.

## Document structure

Sections in this order. Adapt names to the project's voice; keep the structure.

### 1. Opening paragraph

State that this is a staged plan, link to whatever upstream definition states the goal (if one exists), note that no code or implementation details appear here.

### 2. Guiding Principles

Bullet list of the user's stated values, each with one short sentence on what it means in practice. End with: when scope and a principle conflict, the principle wins. **Skip this section** if no principles have been articulated.

### 3. Context Recap

Minimum context to anchor the stages: system shape, key constraints, conventions. Just enough that a reader cold can place the stages. Link out rather than restate.

### 4. Stage 0 — Pre-work

Include only if pre-work is meaningful enough to stand as its own complete unit (e.g. test scaffolding, characterization tests, a flag/gate before a feature ramp). **Skip** if the first stage can stand on its own from day one.

### 5. Stages 1..N

Each stage is **complete, self-contained, and deployable**. A stage may lay groundwork that later stages build on, but it must always stand on its own — at the end of each stage you can ship, merge, or otherwise declare-done and walk away with something whole.

Order by what unlocks what — dependency and risk, not what's quickest to build. Common patterns (heuristics, not rules):

- A first stage that establishes the *shape* of the work (data model, interfaces, testing rhythm) by delivering the smallest complete piece that touches every concern the effort will touch. Useful when the shape is uncertain.
- Middle stages each introduce one new capability or sub-surface, building on what's already locked.
- Composition stages (mostly built from earlier work plus one new ingredient) come before stages that compound everything.
- The heaviest, most-compounded stage last — by then the underlying primitives are battle-tested.

The real constraint is: each stage is complete and independent. Use whichever ordering makes that true.

### 6. Closing Stage (optional)

Include a closing stage **only if** genuine end-of-effort work exists that cannot happen earlier — publishing a release, decommissioning an old system, flipping a default once all earlier stages have soaked, cutting over from old to new. **Skip this section entirely** if no such work exists.

Do **not** use a closing stage as a dumping ground for cleanup, polish, error-message review, or docs. Incremental quality work belongs in the stage where the code is touched — pushing it to the end concentrates risk and contradicts the whole point of staging, which is to do the right work in the smallest meaningful unit.

### 7. Beyond Scope

Bullet list of items explicitly **not** part of this plan. Catalogue them so they don't get absorbed into earlier stages.

### 8. Sequencing Summary

Short table: Stage / Delivers / Primary new capability. One row per stage.

## Stage template

Every stage entry uses this shape:

```
## Stage N — <name>

**What we deliver.** One paragraph in plain product language. What can be done after this stage that couldn't before.

**Why this stage.** Why now, not earlier or later. What does this position in the order buy us?

**In scope.** Bullet list of the discrete pieces of work, including high-level test/verification coverage.

**Out of scope.** Bullet list of adjacent things this stage does not do. Be specific about which later stage owns them.

**Done when.** Acceptance criteria as observable outcomes, not internal states.
```

## Hard rules

1. **No code.** No code blocks.
2. **No types or interface signatures.** Not even illustratively.
3. **No deep file paths.** Top-level package or module names are fine; `path/to/module/file.ts` is not.
4. **No invented principles, non-goals, or architectural decisions.** Only restate what the user has committed to.
5. **Every stage is complete, self-contained, and deployable.** A stage may include groundwork for later stages, but it must stand alone — shippable, mergeable, or otherwise declarable as done on its own merits.
6. **Stages ordered by what unlocks what**, not by what's quickest.
7. **Out-of-scope lists are honest.** Name tempting adjacent items explicitly.
