Skip to content

Command Composition: Self-Application & Chaining ​

Audience: Developers who want to chain /wb* commands or feed a command's output back into itself. Related: Command Classification · wbPlan Flags · Overview

Why this matters ​

Most /wb* commands produce a markdown file; many of those files can be fed back into the same or a different /wb* command. This page tells you which chains make sense and which don't.

Prerequisite: Command Classification — you need to know what each command produces before you can chain them.

📋
1. PLAN
Write the contract
⚡
2. WORK
Execute the code
🛡️
3. VALIDATE
Audit the output
FAIL: Retry

Notation ​

Two equivalent forms:

FormExampleHow to read it
Pipe form (recommended)/wbNext folder/ | /wbPlan"Run /wbNext on folder/, then feed the output file to /wbPlan"
Nested form/wbPlan /wbNext folder/Same meaning — inner command's output feeds the outer command

Use parentheses when flags make things ambiguous: /wbPlan(/wbNext folder/ --recent). Otherwise the bare nested form is fine.


Three ways a command "feeds itself" ​

PatternWhat it meansExample
Temporal memory (implicit)A single invocation reads its own past outputs from reports/ before writing. Automatic./wbAudit Smart-Merge appends Entry #N
Self-application (explicit)Two invocations of the SAME command — second one takes the first's output file as input./wbAudit audit_*.md — audit the audit
Chaining (explicit)Two invocations of DIFFERENT commands — second consumes first's output file./wbNext folder/ | /wbPlan
  • Temporal memory happens automatically. You don't invoke anything twice.
  • Self-application is deliberate: you point a command at its own report.
  • Chaining moves a work artifact from one lifecycle stage to the next.

Self-application table — all 30 commands ​

Can each command run on its own output file? What happens if it does?

Outcome classes:

  • 🟢 Meaningful — second run produces real new value
  • 🟡 No-op — type-valid but produces nothing useful
  • 🔴 Cannot — command's invariants forbid it
#CommandCan self-apply?What the second run does
01/wbStandup🟡 No-opSummarizing a summary yields nothing new
02/wbPlan🟢 MeaningfulRe-plans an existing plan (--resume mode appends tasks)
03/wbNext🟡 No-opRanking a ranked recommendation adds nothing
04/wbVision🟡 No-opProposing features from a proposal = meta-features
05/wbExplain🟢 MeaningfulExplains an existing explanation at a different layer (ELI5 vs Expert)
06/wbAudit🟢 MeaningfulCross-model audit-of-the-audit (verifies auditor's work)
07/wbSecure🟡 No-opScanning a markdown report for code vulns finds nothing
08/wbDebug🟡 No-opDebugging a debug report won't fix the code
09/wbReview🟢 MeaningfulReviews a prior review — sanity-checks the reviewer
10/wbValid🟢 MeaningfulCumulative multi-model QA (appends validation signature)
11/wbTest🟡 No-opTest reports aren't executable test suites
12/wbCheck🔴 CannotConsole output only; no persistent file
13/wbWork🔴 CannotOnce done, re-running on the task report doesn't re-execute
14/wbRefactor🔴 CannotRequires source code, not markdown reports
15/wbClean🟡 No-op"Cleaning the cleanup report" — type-valid, useless
16/wbTranslate🔴 CannotRequires UI components, not reports
17/wbToWBC🔴 CannotRequires legacy HTML/Vuetify, not migration reports
18/wbSetup🔴 CannotOnce-only bootstrap; re-running on output is a no-op
19/wbContext🟢 MeaningfulRefreshes an existing context file with current state
20/wbDoc🟡 No-opGenerates docs about docs — semantically thin
21/wbHelp🔴 CannotConsole output only; no file produced
22/wbRelease🔴 CannotRequires codebase state, not release logs
23/wbPublish🔴 CannotPublish log records a past NPM push; can't re-publish
24/wbDeploy🔴 CannotDeploy log describes a past event, not a deployable artifact
25/wbBroadcast🟡 No-opAnnouncing an announcement kit = no new reach
26/wbGit🔴 CannotConsole only; commit string has no persistent file
27/wbMonetize🔴 CannotScaffolds in package.json; can't run on its own report
28/wbLicense🔴 CannotInjects code into components; needs source files
29/wbActOn🟢 MeaningfulRe-ranks with different priority criteria
30/wbTrack🟢 MeaningfulAppends to itself natively (temporal memory per session)

The core rule: stateless vs stateful ​

CategoryCommandsRule
Stateless analyses/wbAudit, /wbReview, /wbExplain, /wbContext, /wbDoc, /wbVision, /wbDebug, /wbSecure, /wbTest, /wbStandup, /wbNextThey observe; they don't advance any lifecycle. Almost always self-applicable (🟢 or 🟡).
Stateful transitions/wbDeploy, /wbPublish, /wbWork, /wbSetup, /wbMonetize, /wbLicense, /wbRelease, /wbRefactor, /wbClean, /wbToWBCThey advance an artifact along a lifecycle (built→deployed). The output records the post-state. Re-running on the post-state is a category error.

You cannot "deploy what is already deployed." The deploy log is a receipt of a past event, not a deployable artifact.


Chaining — useful command pairs ​

~10 chains that provide real workflow value. Not all 900 possible pairs.

Chain (pipe form)Nested formWhat it doesAlready wired as a flag?
/wbNext folder/ | /wbPlan/wbPlan /wbNext folder/Turn next-recommendation into a planNo — manual chain
/wbAudit folder/ | /wbActOn/wbActOn /wbAudit folder/Rank audit findings by severityYes — /wbAudit --act
/wbReview --plan=plan.md | /wbActOn/wbActOn /wbReview --plan=plan.mdRank review findingsYes — /wbReview --act
/wbAudit folder/ | /wbPlan/wbPlan /wbAudit folder/Build plan from audit findingsPartial — /wbAudit --wbPlan
/wbStandup monorepo/ | /wbActOn/wbActOn /wbStandup monorepo/Rank standup items by priorityYes — /wbStandup --act
/wbVision folder/ | /wbPlan/wbPlan /wbVision folder/Plan one of the vision proposalsNo — manual chain
/wbExplain plan.md --id=N | /wbCheck/wbCheck /wbExplain plan.md --id=NPre-flight quiz the worker before executionNo — manual chain
/wbAudit folder/ | /wbAudit/wbAudit /wbAudit folder/Cross-model audit-of-the-auditNo — manual chain
/wbRelease monorepo/ | /wbBroadcast/wbBroadcast /wbRelease monorepo/Generate announcement from releaseYes — /wbBroadcast reads release logs
/wbAudit folder/ | /wbActOn | /wbPlan/wbPlan /wbActOn /wbAudit folder/Three-step: audit → rank → planYes — /wbAudit --act --wbPlan
/wbAudit packages/wb-core/ --act --wbPlan
*The `--act --wbPlan` flag chain: one command produces audit, action items, and a plan in sequence.*

Worked examples ​

Example 1: The 3-Step Chain ​

/wbAudit folder/ | /wbActOn | /wbPlan

  1. /wbAudit produces audit_*.md.
  2. /wbActOn consumes the audit → action_audit_*.md (ranked list).
  3. /wbPlan converts the ranked list → plan_action_*.md (task table).

Shortcut: /wbAudit folder/ --act --wbPlan does the same thing in one invocation.

Example 2: Meaningful Self-Application ​

/wbAudit /wbAudit folder/

You ran an audit on Tuesday using the agent the agent. On Wednesday, you run /wbAudit again on the audit_*.md file using the agent Pro. Cross-model "audit of the audit" catches blind spots. New findings append as Entry #2.

Example 3: Chaining with an Explicit Plan ​

/wbPlan /wbNext folder/

/wbNext reads codebase + reports → next_*.md recommending a new API endpoint. /wbPlan reads that recommendation → structured worker plan with task IDs.

Counter-example: Stateful Violation ​

/wbDeploy /wbDeploy app/

Why it fails: app/ is "built but not deployed." First /wbDeploy → "deployed" + deploy_<date>.md (URL/logs). Feeding deploy_<date>.md back to /wbDeploy fails: the file describes a past event, not a deployable artifact. The command needs an undeployed input. This is a state-machine violation.


Quick reference — common chains ​

I want to...ChainNotes
turn audit findings into a TODO list/wbAudit folder/ &#124; /wbActOnor use /wbAudit --act
turn audit findings into a full plan/wbAudit folder/ &#124; /wbActOn &#124; /wbPlanor use /wbAudit --act --wbPlan
second-pass an audit by a different model/wbAudit audit_*.mdsmart-merge appends Entry #N
extend an existing plan/wbPlan plan_*.mdtriggers --resume mode
turn a next-rec into a plan/wbPlan /wbNext folder/manual chain
verify a completed plan/wbReview --plan=plan_*.md folder/adversarial check
rank standup agenda/wbStandup monorepo/ &#124; /wbActOnor use /wbStandup --act