/wbSetup — Command Hub
/wbSetup scaffolds the initial file structure, configuration, and workflow files for a new project or package. It creates the .wb/workflows/ directory tree, generates starter context.md and dev.md files, and sets up the report folder structure. It is the Day-0 command that establishes the conventions all subsequent /wb* commands will follow.
🎯 Strategic Position
Every package in the monorepo needs an "agentic brain" — a set of rules and context files that tell AI agents what the package is, how to build it, and what not to do. /wbSetup creates that brain. It is idempotent and framework-aware, but it is not a refresh tool: re-running it on an existing tuned package risks overwriting hand-authored rules.
- New package — run immediately after
mkdir, before writing any code. - Acquired package — if you inherited something that never had
/wbSetup, run it now. - Big rename/restructure — if you moved the folder, re-run so
context.mdreflects the new reality. - Do NOT run to "refresh" an existing working package — that's
/wbContext.
🛠️ Operating Modes
| Mode | Trigger | Output |
|---|---|---|
| Standard | /wbSetup <pkg-path> | context.md + dev.md for the package |
| Focused | /wbSetup <pkg-path> --focus="<subsystem>" | Standard files plus a focused deep-dive file |
| Global | /wbSetup <monorepo-root>/ --scope=global | monorepo_rules.md only |
✅ What a useful setup contains
- A
context.mdthat accurately reflects what the package is — identity, API surface, dependency map. - A
dev.mdwhere every rule is a refusal ("never X", "do not Y") — not prose descriptions. - A
dev_reference.mdwith exact terminal commands for build, test, and serve. - The
dist/vsdist-dev/rule if the package publishes. - Sync with
monorepo_rules.md— local rules aligned with shared standards.
🚫 What it cannot do
| Not this | Use instead |
|---|---|
| Generate content or code | Manual creation after setup |
| Configure CI/CD | /wbDeploy |
| Plan work | /wbPlan after setup |
| Refresh an existing package's context | /wbContext |
| Guess the correct rules | Read the output. A 2-minute read of dev.md catches 90% of mistaken rules before they cause damage. |
📚 Reading Order
- ELI5 — the one-paragraph mental model.
- Practical — step-by-step on a real project.
- Expert — architecture, edge cases, and when NOT to use.
- Examples · Part 1 · Part 2 — annotated transcripts.
- Exhaustive simulation · Live demo.
🔗 Related
wbSetup.md— the command reference this hub orients you around./wbContext— load existing context (don't overwrite)./wbValid— verify the setup after running./wbPlan— plan work once the structure exists.
Quick Reference
/wbSetup <pkg-path> # standard: context.md + dev.md
/wbSetup <pkg-path> --focus="<subsystem>" # plus focused deep-dive
/wbSetup <monorepo-root>/ --scope=global # monorepo_rules.md only← Home · Commands · Install | wb-flow on npm · flow.wbc-ui.com · wi-bg.com
