/microfactory:plan-nextfrom microfactory
Claims the next planning-eligible issue from a configured backend, explores the codebase, writes a plan file, pushes it, and requests review. Designed for automated loop execution or manual use with a specific issue key.
Ships in microfactory. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
One planning iteration: claim → explore → write plan → push → request review. Do not implement anything in this mode.
Read .microfactory/config.yaml in the project root. If it does not exist, tell the user to run /microfactory:init-factory and stop.
Load the tasks skill for all task operations below; each is one of its subcommands.
Plan in the checkout as it is. It is often shared with an implementer session or a person, so it may have uncommitted changes or be on another branch. Neither stops planning. Planning never stashes, resets or switches branches, and never commits anything but the plan.
git fetch origin. When the checkout is on the default branch, also pull it (git pull --no-rebase). A pull that fails because of local changes is not fatal: warn and continue with what is there.git show origin/<default>:<path>), and say in the plan's Risks / Edge Cases which branch and uncommitted changes it was written next to.overrides skill for plan-next and follow what it returns — after the pull, so a change to the override files that was just merged applies to this iteration.tasks skill's claim planning. If there is no eligible issue, say "No planning work available." and end the iteration — the loop cadence handles waiting.claim planning <key> — view that issue, assign it to yourself, and transition it to Planning (best effort) instead of searching.Read the complete issue the claim returned (the tasks skill's The complete item), not just its title and description. Acceptance criteria and the project's other content fields are requirements, as binding as the description. Look at the parent when the issue leans on it for context. Download the attachments that bear on the change — mockups, screenshots, specs — into a temporary directory outside the checkout and look at them. They never go into the repository, so the plan says what in them matters.
Then read the issue's comments with the tasks skill's comments. Refinement happens in the thread, not in the issue body — refine-story posts questions there and the product owner answers beneath them, so the thread is part of the specification. See Reading a refinement thread at the end of this skill.
Get context If the issue is child of a larger story, feature or epic, read the parent issue to understand the broader context and how this issue fits into the overall plan. This helps ensure that the proposed change aligns with the larger objectives and dependencies. If there are plans for relevant unimplemented sibling issues, read them as well to understand potential interactions and dependencies. If the siblings aren't relevant or they have been implemented, skip them.
Before writing the plan, explore the codebase to understand what the issue touches and do the analysis the change calls for. Depending on the nature of the issue:
Fold the conclusions of this analysis into the plan below (in the Summary and Risks sections as appropriate).
Write plans/<KEY>.md with these sections:
The plan must be executable by another agent with no context beyond the repo and the plan itself.
Add plan for <KEY>) to the default branch, or to the branch a plan-next override names, and push it. Nothing else in the checkout goes into the commit, except the item itself on the todo backend (below).
git commit -m "Add plan for <KEY>" -- plans/<KEY>.md commits that path alone, whatever else is staged or modified. Push; if the push is rejected, git pull --no-rebase and push again.origin/<branch> with a temporary index: point GIT_INDEX_FILE at a scratch file, then git read-tree origin/<branch>, git update-index --add --cacheinfo 100644,<blob>,plans/<KEY>.md (the blob id from git hash-object -w plans/<KEY>.md), git write-tree, git commit-tree <tree> -p origin/<branch> -m "Add plan for <KEY>", and git push origin <commit>:refs/heads/<branch>. If the push is rejected, fetch and start again from read-tree. Then delete the local plans/<KEY>.md: the plan now lives on that branch, and an untracked copy would block a later checkout or pull of it.plans/<KEY>.md).Awaiting Plan Review.Steps 2–3 are best effort: if they fail, warn and finish — the pushed plan is the important artifact.
On the todo backend, do steps 2–3 before step 1, and commit the item with the plan. Its claim, note and status are edits to the TODO file, so they are not visible to anyone until they are pushed. The item's block is its line plus the indented note lines beneath it. Only that block goes into the commit; other edits to the file stay out.
git commit -m "Add plan for <KEY>" -- plans/<KEY>.md <todo-file>). If the file has other local changes, leave it out and warn that the item's status is only in the checkout.origin/<branch>'s version of the TODO file with the item's block replaced by the checkout's block. Leave the checkout's TODO file as it is, because it is what the next iteration reads. A human reviews the plan and transitions the issue to its approved status — Plan Approved, or whatever statuses.plan_approved names on Jira and Azure DevOps — (or edits the plan); implement-next picks it up from there.Handle one issue per iteration.
refine-story never edits the issue — it only comments — so an issue whose body still reads as vague may already have been settled in its thread. Its comment opens with the marker line **Refinement questions** and closes with a _Posted by microfactory refine-story…_ footer. Everything between the two is what was asked; everything after the footer is somebody's reply. Rely on the marker rather than on comment authorship — the todo backend records no authors, and on a shared project a reply may come from any account.
Resolve the thread like this:
1: yes, 2: b) and refer to questions by number. Where free text contradicts the options that were offered, follow the free text — the human is right.**Iteration note** comments left in older threads before iterations began writing what they learned into the project's own files. They are not requirements; where one disagrees with the thread's answers, the answers win.Nothing removes the needs-refinement tag automatically; a human does that when the answers satisfy them. Its presence on a claimed issue is not a reason to stop.
Write the settled answers into the plan's Summary, so the plan stands on its own and implement-next does not have to re-derive them.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub jaksa76/microfactory --plugin microfactory17 skills in this plugin
/breakdown-featureTurn a feature description or requirements document into a sequenced set of implementable stories and create the approved ones in the task backend — lean vertical slices, each sized to a single implementation iteration, with open questions marked for refinement. Use when the user has a spec, PRD, feature brief, or requirements doc to break down into backlog items./customizeAdd, change, list, explain, extract and remove the project's microfactory override files (.microfactory/overrides/general.md and <skill>.md) from a plain-language request such as "always run make e2e-smoke after implementing". Interactive — shows the exact change and asks before writing; checks each override against the factory's invariants and the real step titles. Use when the user wants to add extra instructions for a microfactory skill, or asks what an existing override does or why one applies or is being ignored. Not run by loops; not for config.yaml settings (that is init-factory) or for general questions about how the factory works./find-design-improvementsAnalyze the project and report candidate software design improvements — refactorings, architectural fixes, misplaced responsibilities, missing abstractions, pattern inconsistencies. Read-only: it proposes, it does not change code or create tasks. Use when the user asks what could be improved in the project's design, structure, or architecture.Other plugins' skills for the same job