Skip to content

/wbSetup — Exhaustive Simulation () ​

/wbSetup is the architect. Its job is to bootstrap a new package's agentic context layer — create the .agents/workflows/ directory, scaffold the context.md, set up the convention files (i18n stub, dev-mode flag, package.json metadata) so the package is ready to receive /wb* commands. It's a one-time-per-package operation; /wbContext (recurring) builds on what /wbSetup (initial) creates.

Read this if you want to know what --focus actually scopes during setup, why /wbSetup is rare and intentional, and where setup ends and the first /wbContext begins.


1. Role & target ​

AspectBehavior
RoleThe Architect — bootstraps the agentic context layer for a new package.
TargetA directory that will become a package (already has package.json or will get one).
Cell scopeNone — /wbSetup doesn't create plan files. The first plan happens via /wbPlan after setup.
Side effects allowedCreating .agents/workflows/ directory; scaffolding context.md; adding boilerplate config files (i18n stub, dev-mode flag in vite/build config); editing package.json for agent-aware metadata.
Side effects forbiddenEditing source code; running tests; mutating other packages' configs; touching git state.

The "one-time-per-package" framing is what makes /wbSetup rare. Once a package is set up, every subsequent operation uses /wbContext (refresh state) or /wbWork//wbValid/etc. (do work). Running /wbSetup on an already-bootstrapped package is a corner case — supported but with a confirmation gate.


2. Argument resolution matrix ​

FormExampleWhat /wbSetup does
DirectoryCommand: /wbSetup core2/packages/new-package/Bootstraps the agentic layer for the target.
Free-text intentCommand: /wbSetup "a new authentication library"Refused. Setup is path-required; intent → planning, not bootstrapping.
Already-bootstrapped targetCommand: /wbSetup core2/packages/wb-core/Confirms whether to re-run (rare) or use /wbContext --refresh (more common).

3. Flag matrix ​

FlagShortcutPurpose
--focus="<area>"-fScopes the setup to a specific concern: dev-gate (sets up WBC_DEV pattern), i18n (initial locale file scaffolding), agent-context (agentic layer only, no other concerns). Default: full setup (all areas).
--scope="<level>"-slocal (default — single package) or global (rare — repo-wide conventions, like adding a CONTRIBUTING.md template).

The default is "full setup": every area gets bootstrapped. --focus is for partial setup when the user has done some areas manually and only needs help with a specific one.

What "full setup" produces ​

A package post-/wbSetup has:

FilePurpose
<pkg>/.agents/workflows/context.mdInitial context. Filled in via the same logic as /wbContext.
<pkg>/.agents/workflows/conventions.mdPulled from memory + workspace conventions. Lists the __WBC_DEV__ rule, model-selection rule, and other workspace-wide refusals.
<pkg>/i18n/en.json (if package is UI-bearing)Empty source-locale stub. Populated later via /wbTranslate.
<pkg>/.gitignore (or appended to)Standard agent-aware ignores: dist*, .agents/cache/, i18n/<locale>.tmp.json.
<pkg>/package.json (modified)Adds wbc: metadata block (agent-readable hints about the package's role, dev-gate status, i18n status).

The wbc: metadata block is interesting — it's the package's declaration to the agent system about how it should be treated. Agents read this block first when operating on the package; /wbContext updates it as the package matures.


4. Pipelines (the agent-native scenarios) ​

📋/wbSetup Exhaustive Simulation
Bootstrapping a new package/wbSetup core2/packages/new-feature/
> /wbSetup core2/packages/new-feature/
[SYSTEM] Target: core2/packages/new-feature/
[CHECK] package.json exists? Yes.
[CHECK] Already bootstrapped? No (no .agents/workflows/ directory).
[CONTEXT] Reading sibling packages (wb-core) for convention inheritance...
[CONTEXT] Reading memory: feedback_wbCode_dev_only.md, feedback_model_selection.md, project_docs_edition.md.
[PROPOSAL] Full setup. Will create:
1. .agents/workflows/context.md — initial context.
2. .agents/workflows/conventions.md — inherited rules from memory.
3. i18n/en.json — empty stub (assumes UI-bearing; can override with --focus).
4. .gitignore — appended (or created) with agent-aware ignores.
5. package.json — add `wbc:` metadata block.
[CONFIRM] Proceed? [y/N] > y
[CREATE] core2/packages/new-feature/.agents/workflows/context.md
[CREATE] core2/packages/new-feature/.agents/workflows/conventions.md
[CREATE] core2/packages/new-feature/i18n/en.json (empty {})
[EDIT] core2/packages/new-feature/.gitignore (appended)
[EDIT] core2/packages/new-feature/package.json (added wbc: block)
[OK] Setup complete. Package is now agentic-aware.
[NEXT STEPS]
1. /wbContext core2/packages/new-feature/ — populate context with
more detail as the package grows.
2. /wbPlan --focus="<feature>" — make the first plan for this package.
3. /wbWork --id="*" — start the first development cycle.
⚠️ Note: A user has just created `core2/packages/new-feature/` with a `package.json` and an empty `src/`. They want the agentic layer set up:

💠 Pipeline Bootstrapping a new package ​

A user has just created core2/packages/new-feature/ with a package.json and an empty src/. They want the agentic layer set up:

💠 Pipeline --focus="agent-context" only ​

The user has already manually set up i18n and dev-gating; they only want the agentic layer:

💠 Pipeline The "already bootstrapped" gate ​

💠 Pipeline Free-text refusal ​


5. Edge cases & refusals ​

TriggerWhat /wbSetup does
No targetHalt.
Free-text targetHalt — path required.
Target is not a directoryHalt.
Target has no package.jsonHalt — /wbSetup operates on package-shape directories.
Already bootstrappedNotice + suggest /wbContext --refresh.
--focus="<unknown-area>"Halt. Lists the supported areas.
Memory contradicts the setup (e.g., a refusal rule missing for a UI-bearing package)Surface the contradiction; let user decide whether to inherit the convention.
Target is in node_modules/ or a vendored pathHalt — setup is for owned packages.
--scope="global"Permitted but rare; warns about repo-wide effect.

The pattern: /wbSetup is the one-time bootstrap for the agentic layer. It refuses re-runs without explicit override, refuses non-package targets, refuses free-text intent. It inherits conventions from memory + sibling packages, and produces a package that's ready for /wbContext//wbPlan//wbWork to operate on. The next-steps section in the output is part of the contract — setup is the start of a workflow, and the agent makes that workflow visible.