No slash command · from fwx
Orchestrates a phase from owner sign-off to close: critiques, planning, execution, UI walk, review, and post-mortem. Activates on 'continue' or when a phase is handed off from discussion.
Ships in fwx. 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.
Read when SKILL.md points to them.
You carry one phase from the owner's final go on the discuss to its close, alone: no agent reads a playbook, and the owner is asked only at the gates below. This text is your workflow. It reaches you through the Skill tool, and its steps are your instructions, calls to other skills included.
Your argument is $ARGUMENTS: a phase folder (absolute path), retake <KEY>, or empty for "continue". $target holds only its first word, so read the whole string from $ARGUMENTS.
plan.md or postmortem.md, a diff, a transcript): an agent reads it and returns paths and counts, because your context must not compact before the post-mortem.Agent (every agent below, skill-proposer included): subagent_type fwx:<role> (the type gives its colour) and model printed by fwx model <role> <size>, the size being size.tag of plan.md (normal until it exists). The prompt gives the absolute paths of the phase's context.md and decisions.tsv, what to return (paths and counts) and the language of the conversation (<language> everywhere below is the language the owner writes in). A launch returns at once: read its result after its completion notice. A dead agent or an empty return is not "no findings": launch it once more, and if it fails again tell the owner it did not run.fwx stage <folder> <stage> --why "<text>", on the phase folder for the stages up to the phase's first executing and for the close, and from step 5 on on the part's folder (its subphase folder, or the phase folder when there are none), so that parts show their own stage in fwx session --json. A refusal exits 1 with <a> -> <b> is not in data/stages.json (session) and writes no row: read it and do not retry, because the table will refuse the same change again. No agent you launch moves a stage, so none of your prompts names that command. Announce each stage with the heading ### fwx ▸ <STAGE> (the stage name in capitals). Write nothing in .fwx/ by hand: its files come from commands (fwx decision new writes decisions.tsv); the one exception is the context.md of a retaken job (step 3 of references/factory-return.md). The part's report is no file: you write it from the template and paste it (step 8). A --why or any other argument that carries text from a report, a finding or the app under test goes through a single-quoted heredoc, --why "$(cat <<'WHY_END_7f3a' ... WHY_END_7f3a )" (a terminator no report line contains), never pasted inside double quotes: a $(...) or backtick in that text would run..fwx/, before each run of a part (step 5) and at the close, always in <main_checkout> (the project's default branch) and never on the phase branch; main_checkout is a key of fwx session --json. When git check-ignore -q .fwx/project.md succeeds there (the history lives on the data side), commit .fwx the way the project's instructions say. Otherwise run cd <main_checkout> && find .fwx -type f ! -name '.*' \( -name '*.md' -o -name '*.tsv' -o -path '*/demo/*.html' \) -print0 | git add --pathspec-from-file=- --pathspec-file-nul && git commit -m "<message>": it adds only the .md and .tsv files and the demo/ pages and commits what it added, so the walk's demo-state.json (demo session cookies), logs and screenshots stay out of the commit, a tracked one that changed included. Local, never pushed.playbooks/principles.md rule 12): fwx linear new --template general with one JSON object on stdin (title, context, expected, origin) and no labels, because a label would hand the issue to the factory. When the owner says the repo is a test repo, the title starts [test] . No linear_project or no key: say so; do not keep a local list, because issues live in Linear.Recommended: <n>, because <reason>: your honest pick, and push back on a choice that looks wrong, but he decides. Quote his answer word for word when you record it: you record what he decides yourself with fwx decision new --phase <phase folder> --decision <T> --why <T> --support <chosen|approved> --source "<his words>" (--rejected for an option he saw and passed over, --supersedes <id> for a decision that changes an earlier one), only for a decision a later step needs and could not guess from the plan or the code (a phase holds a handful of rows: his decisions and the open assumptions), and a refusal (exit 1, one line) is read, not retried with another support. When the owner says he is leaving, nothing changes: same flow, you pass no --unattended (only the factory does), decide nothing that is his, and end your turn for his answer where a step needs it.fwx:discuss, fwx:pre-mortem, fwx:plan and fwx:post-mortem with the Skill tool. If a call is refused, read ${CLAUDE_PLUGIN_ROOT}/skills/<name>/SKILL.md and do its steps yourself (a skill file is the one long file you read, because its steps are yours): the text is the same either way. A skill you call runs in this conversation and is not an agent: the line it tells you to end with is its result for you to read, not the end of your turn, so carry on at the next step of this text. Launch fwx:ui-walk with the Workflow tool, name and args as a literal JSON object (never a string, which the workflow cannot read fields from); the call returns at once, so wait for its completion notice. A part is not a workflow: step 5 runs it with fwx wave run. After a compaction, redo step 0..claude/fwx.json it is rewritten at every session start, so an edit of it is lost: a wrong value in it is a problem of the tool's source, so tell the owner the field and the value, and he changes it there; never edit the file. When the project writes it by hand (no setup tool), it is the project's own file: edit the field the owner names, then show the value in force (fwx model <role> <size> for a model, else re-read the file).${CLAUDE_PLUGIN_ROOT}/playbooks/principles.md rule 12 and rule 13): every defect an agent saw ends as a fix, a Linear issue or a line of the part report, the next agreed step is taken without asking and reported after, independent work runs in parallel up to the cap, and the owner is asked only what is his.Phase branch. fwx/[<subproject>/]<milestone>-<phase folder name>, from project.default_branch of .claude/fwx.json. Make it with git worktree add <main_checkout>/.claude/worktrees/<name> -b <branch> <default_branch> and work from that folder with cd: fwx wave runs there, while .fwx/ stays in <main_checkout>, where this session started and may write. fwx wave run (step 5) runs the project's worktree_setup in that folder before its base checks and stops on its failure, so fwx wave setup there is only for seeing a failing setup before anything else is done: it prints worktree setup: 1 command ran (log <path>) (2 commands ran and so on; already done ... when nothing was owed; no worktree_setup configured), and on exit 1 fwx wave setup: worktree setup failed: <command> (exit N, log <path>), on exit 2 another one-line reason. Stop on either and give the owner the line as printed. The owner's own checkout never changes branch and nothing merges into the default branch, because that merge is the owner's.
Nested repositories. When part_repos of fwx session --json is not null (the workspace's project.repos names the repositories its code lives in), each entry is the repository one part works in, in part order (subphases, or the one phase), and its worktree is made in that repository, never in the workspace's: git -C <path> worktree add <worktree> -b <branch> <default_branch> with the entry's path, worktree and default_branch, the same branch name in every repository. Take worktree as printed (it is <repo>-<milestone>-<phase>, so a phase that touches two repositories gets two folders; an entry with name null is the workspace itself and keeps <milestone>-<phase>), and make one worktree per distinct repository, when its first part comes up, however many parts name it. A null default_branch (the repository's entry has none) or a null path (the plan names a repository project.repos lacks) stops you: tell the owner which. fwx finds the workspace from any of these worktrees, so .fwx/ and the run files stay in the workspace; the run files are in fwx_dir of fwx session --json.
Where you are. First clear merged worktrees. Run git worktree list --porcelain (in <main_checkout>, and in each path of project.repos in .claude/fwx.json when the workspace has nested repositories) and look only at those under <main_checkout>/.claude/worktrees/ (paths read from it, never typed): never the main checkout, a worktree outside that folder or a detached one. Remove one only when all three hold: its branch's pull request is merged (gh pr list --head <branch> --state merged --json number is not empty; a squash merge leaves the branch no ancestor of the default branch, so ancestry proves nothing); git -C <path> status --porcelain prints nothing; and no agent holds it (a locked worktree is kept, unless its lock reason ends in (pid P start T) and kill -0 P fails: then git worktree unlock <path> first). Remove it with git worktree remove <path> and no force, then git branch -d <branch> (never -D: a refusal means the branch holds work, so keep it and say so). Say in one line which you removed and which you kept and why. Without gh or without a GitHub origin, remove nothing and say so. Then, with retake <KEY>, follow ${CLAUDE_PLUGIN_ROOT}/skills/session/references/factory-return.md and stop here. Run fwx session --json; a path in $ARGUMENTS is the phase. With no path and exactly one open phase, that is it; with none or several, list candidates as a numbered question. You own the resume point: read the trail, redo nothing. Read the last stage rows of the phase's audit.tsv and of each subphase's (grep -P '\tstage\t' <folder>/audit.tsv | tail -4; part_stages of fwx session --json names each part's last), then context.md, decisions.tsv, and the frontmatter of plan.md if it exists; with a branch in the last executing row, also git log <default_branch>..<branch> and git worktree list (paths read from it, never typed). Go to the step of the last stage: none or discuss 1; premortem 1; planning 2; postmortem 3; executing 5 on that part and branch (it is the cut: run it again, do not write the row again; a run that fwx wave list shows active with a dead pid is resumed with fwx wave run --resume <R>, not started again); reviewing 6 when the part has UI, else 8; ui-walk 6; phase-review 8; closed or cancelled: say so and stop. The last stage row is already written, so skip the "Stage ..." sentence of the step you resume at (the table refuses a stage after itself). A planning or postmortem row after an executing row is an amendment (step 8): go on from that step and make no branch at step 4.
Pre-mortem. Only when the owner asks for one (he may name a model for it): without that request go straight to step 2 and write no stage premortem, because the planner runs the pre-mortem's checks itself. When he asks: Stage premortem. Call fwx:pre-mortem with <phase folder>; language: <language>, and ; model: <his words> when he named one. Its last line is {status, reason, phase_dir}: failed say so and stop; back-to-discuss step 7; otherwise the first word of reason is the verdict. ok: step 2. objections: read ## Findings of premortem.md and give the owner a short numbered block, each objection ending with Recommended:; record his answers (source premortem r<N>); then step 2.
Plan. Stage planning. Call fwx:plan the same way; failed say so and stop; back-to-discuss (the planner found the intent misread) step 7. The planner writes one plan.md per part, sets size.tag and fwx plan lint has passed.
Post-mortem. Read size.tag in the first lines of the frontmatter of each part's plan.md (head -5): when every part is small the post-mortem is skipped, because the planner's own checks stood in for it, and you go on to step 4 with no stage postmortem (fwx wave run still stops a small plan that has no post-mortem and no security_review); the owner can ask for one anyway. Otherwise: Stage postmortem. Call fwx:post-mortem the same way, with ; model: <his words> when he asked for another model. failed say so and stop; back-to-discuss step 7. Read only the frontmatter and ## Findings of postmortem.md. The first word of reason is the verdict, as in step 1. ok: step 4 with no stop. objections: step 4 with a stop.
Go and phase branch. No objections, or a skipped post-mortem: one status line (size, parts, agents, branch) and go on, with no question. Objections: one message with size, parts and agents, the verdict and the numbered objections, then these options and your Recommended: <n>, because <reason>:
source postmortem r<N>) and a new planner replans (step 2).part_repos, as in "Nested repositories", each when its first part comes up), write stage executing with part 1 branch <branch> and commit .fwx/ (rule 4). On 2 stop there and tell him the first action on resuming: a new session, "continue".Execute a part. The part folder is its subphase folder (subphases of fwx session --json), or the phase folder when there are none. A subphase starts in executing, so a part's first launch writes no stage row there (step 4 wrote part 1's on the phase folder); a correction writes stage executing first on the part's folder (part <N> corrections), and on a relaunch it is already written. Commit .fwx/. From the part's worktree (the part's entry of part_repos, made first when it does not exist yet) run fwx wave run --part-dir <part> --plane session --branch <branch> --orchestrator "orca_session_id:$ORCA_AGENT_SESSION_ID" (the last flag when $ORCA_AGENT_SESSION_ID is set; left out otherwise), with run_in_background. Never open an Orca terminal for it: a tab beside the owner's chat in the main checkout's workspace is what he rejected, and the run makes its own sender terminal in the phase worktree's workspace (or adopts the Orca terminal it was started in, which it never closes). Live progress shows in the fwx panel of the Orca sidebar (local.fwx-session) and its status bar chip, and fwx wave list or fwx wave list --json print the same rows (the active run's workers, its last events); follow a run with those and fwx wave --run <R> --json (its result: status, why; its row for the branch is active until the run ends). If the owner closes the run's sender terminal, the run stops needs-owner with "the run's terminal ... was closed; resume with ..." and stays resumable with --resume <R>, started the same way. Every fwx wave run of this text (steps 5 and 6, references/ui-review.md) is started this way and carries that flag. With it the run sends this chat a [<part> <unit> dispatch:<D>] <question> status message for each question or blocker a worker asks, and one line after each wave and one at the end; a routine worker_done never arrives. The message carries the command that answers, orca orchestration send --to dispatch:<D> --subject "Answer" --body "<answer>", and the worker waits for it. Workers never address the owner: he talks only to you, and you relay to him only what is his (taste, direction) and answer the rest yourself. Answer a technical question from the plan, the decisions and the code, and ask the owner only for taste or direction (rule 6), then send his answer the same way. After a cut run, fwx wave run --resume <R> --orchestrator "orca_session_id:$ORCA_AGENT_SESSION_ID" points the run at this chat. It prepares the part itself (the project's worktree_setup, the base checks) and then runs every wave, the gate and the review with Orca workers, so nothing runs before it. A live run holds its branch and a second fwx wave run on it exits 2 naming the run, so the parts run one after another on the phase branch. A cut run is never started over: fwx wave list shows it, and fwx wave run --resume <R> polls what is open and starts nothing twice. Before any worker the exit says why it stopped (the completion notice of the background run carries it). 1 with a needs-owner JSON line on stdout: the base checks fail, no round was spent, so ask him. 77: a base check ran out of time (NOT RUN on stderr), which is the machine and not a red base: tell him in one line and run the same command again later; a base that passed is recorded and reused. 2: say the reason on stderr and stop. Otherwise read the run's last line (the completion notice of the background run): run <R> <done|failed|needs-owner>: <why>, exit 0, 1 and 3 for the three, and fwx wave --run <R> --json has the rest.
done: run fwx wave --run <R>. Any exit but 0 means the gate did not pass: treat it as failed, whatever the run said. Otherwise file what the run left, then write stage reviewing with part <N> on the part's folder, putting each key in its --why as filed: <where> - <KEY> (a resume and the close read it there, since nothing else keeps it). That --why carries report text (filed:, outside: below), so it is passed as rule 3 says. The run's own files hold what it left, in <fwx_dir>/runs/<R>/ (fwx_dir of fwx session --json): each <n>-findings.json lists the large defects a reviewer found in result.file (fields where, what, fix), each a Linear issue (rule 5); each <n>-report.json lists in result.outside the items the executors filed themselves. When the project has no Linear project, or an item has issue_error (Linear was unreachable), it cannot become an issue: put each, from result.outside and result.file, in the --why of that stage row as outside: <where> - <what> - <fix>, so a stopped session loses nothing. Do the same for the items of a failed or needs-owner return, in the next stage row you write. Then go to step 6 when a task of the part has ui: true (read it from the frontmatter of the part's plan.md), else step 8.failed: the rounds ran out, or the run stopped on what it could not mend. Tell the owner what was tried (why of the line, rounds of fwx wave --run <R> --json). His correction: fwx rounds <part> --reset "<his words>", then run the part again. Without one the phase stays open; stop.needs-owner: verify could not run in why: find the cause first (environment, missing tool); fix it if you can and run again, no round spent; ask only when you cannot. protected path: always ask, with the paths and the security findings the run's files hold; with his go write stage reviewing, do not run again (the code already passed review), and a change he asks for enters as a correction in step 8. every task of the part is already on the phase branch: run the fwx wave run ... --from gate command the reason prints, started as above. Any other reason (an executor's question, a red base): a numbered question, his answer recorded with fwx decision new (source execute question), then run again; the rounds are not reset.
A correction from the owner, or a diff to apply, reaches fwx wave run as findings: write a JSON list (id, file, line 0, claim his words, evidence "owner review of part ", severity high) to a scratch file made with mktemp, run the same command with it: fwx wave run ... --fix <file>, and remove it afterwards.UI walk and its fixes. Only when a task of the part has ui: true. Stage ui-walk with part <N>. Launch fwx:ui-walk with args {"phase_dir", "part", "part_dir", "plan", "context", "decisions", "config", "work_branch", "repo", "base", "round": 1, "app": null, "models": {"breaker", "critic", "verifier", "runner"}, "recheck": null}, every path absolute, repo the part's worktree, base the args.base of the part's last run (state.json in <fwx_dir>/runs/<R>/), models.breaker from fwx model ui-walker small, models.critic from fwx model ui-walker normal, models.verifier from fwx model ui-verifier normal, models.runner from fwx model runner small. It returns details.fix_file, counts, contradicted_file and run_dir. Read status and reason first: failed, or a reason that is not empty (the control was not found, a browser could not be closed), is not "no findings" (fix_file is null when nothing was verified). Tell the owner the reason as printed, how many findings were collected but not verified and where (details.unverified: a tramo and its findings files each) and details.gaps; the walk is not passed, and the part's report says so. While fix_file has findings and rounds remain: fwx wave fix --part-dir <part> --why "$(cat <<'WHY_END_7f3a' the findings WHY_END_7f3a )" (the findings are screen text of the app, so rule 3 applies; it spends the round and exits 1 when none are left: then failed, tell the owner), fwx wave run --part-dir <part> --plane session --branch <branch> --fix <fix_file>, started as in step 5 (one commit per finding), and read its result as step 5 does: only done with fwx wave --run <R> exiting 0 goes on, failed and needs-owner are handled there and the walk does not start again. Then fwx:ui-walk again with recheck set to the path of that fix file. The fix rounds write no stage row. A finding the walk marks CONTRADICTED is not fixed: it goes to the review. Then step 8.
Back to the discuss. Propose it in one line and say why: after the plan or a critique, the reason of its status line carries the critique's own sentence after the colon (a bare back-to-discuss has none: say it gave no reason, and leave the critique file unread, rule 1). On his yes: when an earlier decision is the one he changes, write the row that replaces it with fwx decision new (support approved, --supersedes its id); with none to replace, write no row now and record the decision once he makes it in the discuss. Then write stage discuss with <where you came from>: <reason> (the table allows it from planning, premortem, postmortem, ui-walk and phase-review; from executing or reviewing write phase-review first), except when the phase is already in discuss: the table refuses discuss after itself, so write no row. Then call fwx:discuss <phase folder>. If the call is refused, rule 7 applies.
Review of the part. Stage phase-review with part <N> on the part's folder, and once on the phase folder too when the parts are subphases (it is in executing from step 4 and the close, or a return to the discuss, needs it in phase-review). Then:
skill-proposer (inputs: the part's context.md, decisions.tsv, plan.md, the branch and the base sha of the part's executing row); it returns NONE: <reason> or a block and a patch.${CLAUDE_PLUGIN_ROOT}/skills/session/references/part-report.md says, on a resume too: the commands print the same facts again. Paste it to the owner before you ask anything (its Done already holds the unfixed consider ones: print nothing twice), then open each screenshot for the owner the way the user's instructions say, because he does not see tool output. The close does not reuse this text: it fills the same template again for the pull request body, with all the parts.
Read ui and review of the part's tasks in the frontmatter of its plan.md: a part with a ui: true task or a review: blocking task blocks on his review. Then you end your turn once, with the question that review is, and start neither the next part nor the close before his answer. For a part with a UI walk the question is the review page: follow ${CLAUDE_PLUGIN_ROOT}/skills/session/references/ui-review.md, which ends your turn after the report (with "items": 0 there is no page, so ask the numbered question). Otherwise the question is numbered, each option says what it implies, and it ends with Recommended: <n>, because <reason>, drawn from the report and the findings: 1. it is good, the next part starts (or the close after the last); 2. there is an implementation problem, the part is corrected; 3. the intention was misread, back to the discuss. A part that blocks on neither goes on to the next part and takes his reply when it comes.
A rejection on the page stops you there; with none, treat the part as good.
His answer: good: next part (step 5 for part N+1) or step 9 after the last. An implementation problem: fwx rounds <part> --reset "<his words>", stage executing (part <N> corrections) and the part run again with the correction (step 5). A problem of intention: step 7. Two more answers have steps of their own, below. Asynchronous review: a late objection is recorded at once with fwx rounds <part> --reset "<his words>" (on disk, so a cut keeps it) and runs as a correction of that part at the next boundary. The phase closes only when no part has a reset after its last phase-review row. An accepted proposer patch goes to fwx wave run as a correction of the last part.
The walk again: he asks for it, or a walk did not count.ui-walk, which the table allows from phase-review), with the args of the part's last walk but recheck null: a walk with a recheck runs only the verifiers, and this one is a full walk.fwx decision new (source review of part <N>), then fwx rounds <part> --reset "<his words>".phase-review, the planner amends the criteria the decision touches and the post-mortem reads the amended plan.executing row: the part's branch and its executing row already exist, and a second git worktree add of that branch fails.Close. Follow ${CLAUDE_PLUGIN_ROOT}/skills/session/references/closing.md. There is no closing conversation: the owner has read each part's report.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub danitrrga/forge --plugin fwx7 skills in this plugin
/discussStart a work session with the owner, or continue one. Use whenever the owner opens a conversation about work on the project./factory-issueSends work from a discuss, or from the conversation, to the factory as Linear issues, and only what passes the closed list. Use when the owner wants to hand the factory a bug or a mechanical change./gather-contextReconstruct your recent working context from your own chat history, live state, and the shared record (user reports, prior fixes, incidents), then hand back a tight current-state brief. Use for 'recall my work on X', 'catch me up', 'what have I been working on', 'where did I leave off', before starting or resuming work./planLaunches a fresh planner agent on a finished discuss, checks the plan it writes and returns the one-line status. Use once the phase is in its planning stage, after the discuss (or the pre-mortem, when the owner asked for one), and again to replan./post-mortemLaunches a fresh post-mortem agent on a finished plan and returns the one-line status of its result. Use once the phase is in its postmortem stage, or when a job comes back (structural BASE..BRANCH)./pre-mortemLaunches a fresh pre-mortem agent on a settled discuss and returns the one-line status of its result. Use when the owner asks for a pre-mortem, once the phase is in its premortem stage, before the plan.Other plugins' skills for the same job