wb-flow 1.0.0-r01

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/LICENSE +21 -0
  3. package/README.md +128 -0
  4. package/assets/demo.gif +0 -0
  5. package/bin/install.js +175 -0
  6. package/bin/link.js +71 -0
  7. package/bin/verify-wrappers.js +49 -0
  8. package/package.json +56 -0
  9. package/templates/commands/_shared/output_conventions.md +433 -0
  10. package/templates/commands/_shared/wb_universal_agent_instructions.md +72 -0
  11. package/templates/commands/model_recommendation_updates.md +74 -0
  12. package/templates/commands/model_recommendations.md +112 -0
  13. package/templates/commands/wbActOn/wbActOn_template.md +546 -0
  14. package/templates/commands/wbAudit/wbAudit_template.md +315 -0
  15. package/templates/commands/wbBroadcast/wbBroadcast_template.md +133 -0
  16. package/templates/commands/wbCheck/wbCheck_template.md +322 -0
  17. package/templates/commands/wbClean/wbClean_template.md +118 -0
  18. package/templates/commands/wbContext/wbContext_template.md +213 -0
  19. package/templates/commands/wbDebug/wbDebug_template.md +132 -0
  20. package/templates/commands/wbDeploy/wbDeploy_template.md +224 -0
  21. package/templates/commands/wbDoc/wbDoc_template.md +138 -0
  22. package/templates/commands/wbExplain/wbExplain_template.md +98 -0
  23. package/templates/commands/wbGit/wbGit_template.md +160 -0
  24. package/templates/commands/wbHelp/wbHelp_template.md +101 -0
  25. package/templates/commands/wbIdea/wbIdea_template.md +337 -0
  26. package/templates/commands/wbLicense/wbLicense_template.md +148 -0
  27. package/templates/commands/wbMonetize/wbMonetize_template.md +113 -0
  28. package/templates/commands/wbNext/wbNext_template.md +270 -0
  29. package/templates/commands/wbPlan/wbPlan_template.md +413 -0
  30. package/templates/commands/wbPublish/wbPublish_template.md +205 -0
  31. package/templates/commands/wbRefactor/wbRefactor_template.md +129 -0
  32. package/templates/commands/wbRelease/wbRelease_template.md +229 -0
  33. package/templates/commands/wbReview/wbReview_template.md +252 -0
  34. package/templates/commands/wbSecure/wbSecure_template.md +157 -0
  35. package/templates/commands/wbSetup/wbSetup_template.md +203 -0
  36. package/templates/commands/wbStandup/wbStandup_template.md +198 -0
  37. package/templates/commands/wbTest/wbTest_template.md +226 -0
  38. package/templates/commands/wbToWBC/wbToWBC_template.md +91 -0
  39. package/templates/commands/wbTrack/wbTrack_template.md +555 -0
  40. package/templates/commands/wbTranslate/wbTranslate_template.md +114 -0
  41. package/templates/commands/wbValid/wbValid_template.md +142 -0
  42. package/templates/commands/wbVision/wbVision_template.md +141 -0
  43. package/templates/commands/wbWork/wbWork_template.md +140 -0
  44. package/templates/commands/wb_commands_reference.claude.json +2305 -0
  45. package/templates/commands/wb_commands_reference.json +1109 -0
  46. package/templates/shortcuts/shortcuts.md +413 -0
  47. package/templates/shortcuts/usage-management-examples-shortcuts/budget_controllers_examples.md +96 -0
  48. package/templates/shortcuts/usage-management-examples-shortcuts/ultimate_shortcuts_examples.md +1531 -0
@@ -0,0 +1,157 @@
1
+ # /wbSecure: Execution Template
2
+
3
+
4
+ <!-- HELP_GATE_START -->
5
+ ## Help intercept (handle FIRST — before any other action)
6
+
7
+ **If `$ARGUMENTS` contains `--help`, `-h`, or `--h`** (case-insensitive, anywhere in the args), DO NOT execute the command's normal procedure. Instead:
8
+
9
+ 1. Output the **HELP BLOCK** below verbatim (rendered as markdown).
10
+ 2. Stop. Do not perform any file reads, writes, or other tool calls.
11
+ 3. Do not generate any reports under `.wb/workflows/reports/`.
12
+
13
+ Otherwise, ignore this section and proceed to the rest of the template.
14
+
15
+ ### HELP BLOCK — `/wbSecure`
16
+
17
+ ## Two forms
18
+
19
+ ```
20
+ /wbSecure <target> # full security scan
21
+ /wbSecure <target> --focus="<area>" # narrowed (e.g., auth, xss, deps)
22
+ ```
23
+
24
+ ## When to run
25
+
26
+ - **Before `/wbDeploy`** of any user-facing app. Mandatory if the app handles user input.
27
+ - **Before `/wbPublish`** of a package that handles untrusted input.
28
+ - **After dependency updates** — `npm update` can introduce vulnerable transitive deps.
29
+ - **Periodically** (monthly) on production apps.
30
+ - **After any security-adjacent code change** — auth, sessions, input handling, anything user-controlled.
31
+
32
+ ## When *not* to run
33
+
34
+ - On a feature branch you'll throw away.
35
+ - Mid-development before the surface is stable.
36
+ - As a substitute for proper backend security (server-side validation, real pentests).
37
+ - Without server-side equivalent — `/wbSecure` only checks client; real security is server.
38
+
39
+ ## Reading the output
40
+
41
+ Three severity levels:
42
+
43
+ - **🔴 CRITICAL** — fix before any further deploy. Blocks `/wbDeploy`.
44
+ - **🟡 WARNING** — fix soon. Doesn't block deploy but should be tracked.
45
+ - **🟢 SAFE** — verified clean.
46
+
47
+ CRITICAL findings include immediate action items (revoke this token NOW, sanitize this v-html before next deploy).
48
+
49
+ ## The integration with /wbDeploy
50
+
51
+ `/wbDeploy` reads the latest `/wbSecure` report and refuses if CRITICAL findings exist. This is automatic. To override (rare, dangerous), you'd need to run `/wbDeploy --force-past-security`, which requires explicit user override.
52
+
53
+ WARNING findings don't block. They show in the deploy preview as advisory.
54
+
55
+ ## What /wbSecure cannot detect
56
+
57
+ - **Server-side vulnerabilities** — out of scope; client scan only.
58
+ - **Logic bugs that allow privilege escalation** — these need domain understanding.
59
+ - **Supply-chain attacks** — `npm audit` is the right tool.
60
+ - **Runtime tampering** — DevTools can flip flags; client gating is convenience, not security.
61
+ - **Zero-days not yet in CVE databases** — the scanner only knows public vulnerabilities.
62
+ - **Authentication design flaws** — needs human security review.
63
+
64
+ Every report names these limits in its "did NOT check" section.
65
+
66
+ ## When /wbSecure is the wrong command
67
+
68
+ - Generic code quality → `/wbAudit`.
69
+ - Tier-gate consistency → `/wbLicense`.
70
+ - Dead code / leftovers → `/wbClean`.
71
+ - Pure dep CVE check → `npm audit` directly.
72
+
73
+ `/wbSecure` answers: *"can this be exploited?"* Specifically.
74
+
75
+ ## The mistake to avoid
76
+
77
+ **Treating `/wbSecure` SAFE as "secure."** A SAFE result means: no obvious findings under the scanner's checklist. It does not mean: nothing is wrong. Real-world security requires human judgment, threat modeling, and ongoing pentests. `/wbSecure` is the *cheap* layer of security work, not the *complete* one.
78
+
79
+ > For deeper reading: [`docs_claude/commands/wbSecure/wbSecure_practical_claude.md`](../../docs/docs_claude/commands/wbSecure/wbSecure_practical_claude.md) (or the `_eli5_`, `_expert_`, `_examples_` siblings).
80
+
81
+ <!-- FLAGS_TABLE_START -->
82
+ ## Flags & shortcuts
83
+
84
+ Both forms are equivalent — pass either:
85
+
86
+ | Long form | Shortcut |
87
+ |---|---|
88
+ | `--focus` | `-f` |
89
+ | `--force-past-security` | `-F` |
90
+
91
+ `-h` / `--help` / `--h` (any command) prints this help block instead of executing.
92
+ ## Self-correct mode (dual-mode invocation)
93
+
94
+ ```
95
+ /wbSecure <scope_folder> # normal mode — produce a fresh output file
96
+ /wbSecure <previous_output_file> # self-correct mode — verify & repair the file in place
97
+ ```
98
+
99
+ When the first arg is an existing output file from a prior `/wbSecure` run (detected by its first H1 — see this template's **Detection** section), the command runs in **verify-and-repair** mode: gap-fills missing fields, normalizes links, ticks done/valid checkboxes whose reports exist, never rewrites authored content. See [`../_shared/output_conventions.md`](../_shared/output_conventions.md) §3.
100
+
101
+ <!-- FLAGS_TABLE_END -->
102
+ <!-- HELP_GATE_END -->
103
+
104
+ <!-- FLAG_NORMALIZE_START -->
105
+ ## Flag normalization (apply BEFORE parsing args)
106
+
107
+ Before processing `$ARGUMENTS`, normalize these short-form flags to their long equivalents:
108
+
109
+ - `-f` → `--focus`
110
+ - `-F` → `--force-past-security`
111
+
112
+ The rest of this template documents only the long forms; the substitution above is the only place short forms are mentioned.
113
+ <!-- FLAG_NORMALIZE_END -->
114
+
115
+
116
+
117
+ **ROLE:** The Guard
118
+ **TARGET:** The provided component or package path.
119
+ **Read first:** [`../_shared/output_conventions.md`](../_shared/output_conventions.md) — applies to the security report (relative links, full-syntax commands, self-correct mode).
120
+
121
+ ---
122
+
123
+ ## ━━━ DETECTION (Self-Correct Mode) ━━━
124
+
125
+ Trigger self-correct when the input file's first H1 matches:
126
+ `# Security: <scope> — <YYYY-MM-DD>` *(or the legacy `# Security Entry #N` header).*
127
+
128
+ Behavior is defined in [`../_shared/output_conventions.md`](../_shared/output_conventions.md) §3.
129
+
130
+ Security-specific gap-fills:
131
+
132
+ - Plain-text vulnerable file paths → relative markdown links per §1.
133
+ - Bare `/wbAudit` / `/wbTest` cited → full-syntax form per §2.
134
+ - Missing CVE / severity classification → infer from `npm audit` output if available.
135
+
136
+ ---
137
+
138
+ ## ━━━ OBJECTIVE ━━━
139
+ Your job is to act as a Red Team security scanner. You must actively hunt for vulnerabilities in the target code before it is deployed to production.
140
+
141
+ ## ━━━ PHASE 1: VULNERABILITY SCAN ━━━
142
+ 1. Scan the target files specifically looking for:
143
+ - Hardcoded secrets or API keys.
144
+ - Cross-Site Scripting (XSS) vulnerabilities (e.g., raw HTML injection in Vue).
145
+ - Insecure direct object references or missing tier checks (cross-referencing `monorepo_rules.md`).
146
+
147
+ ## ━━━ PHASE 2: DEPENDENCY AUDIT ━━━
148
+ 1. Check the `package.json` for notoriously insecure or outdated libraries.
149
+
150
+ ## ━━━ PHASE 3: REPORTING ━━━
151
+ Generate a security report: `.wb/workflows/reports/<YYYY>/<MM>/<DD>/security/security_<target>_<YYYYMMDD>.md` (create-or-append; tag your entry `*(ModelName — HH:MM)*`). Categorize findings as [CRITICAL], [WARNING], or [SAFE]. Apply output_conventions.md §1 (relative links for every vulnerable file) and §2 (full-syntax for any /wb* command cited).
152
+
153
+ End the report with:
154
+
155
+ ## 🧭 What's Next?
156
+
157
+ Run `/wbNext <target_folder>` to get a current, ranked list of next actions (typically `/wbPlan <target> "fix critical findings"` for [CRITICAL] items).
@@ -0,0 +1,203 @@
1
+ # wbSetup Template v2.0
2
+
3
+
4
+ <!-- HELP_GATE_START -->
5
+ ## Help intercept (handle FIRST — before any other action)
6
+
7
+ **If `$ARGUMENTS` contains `--help`, `-h`, or `--h`** (case-insensitive, anywhere in the args), DO NOT execute the command's normal procedure. Instead:
8
+
9
+ 1. Output the **HELP BLOCK** below verbatim (rendered as markdown).
10
+ 2. Stop. Do not perform any file reads, writes, or other tool calls.
11
+ 3. Do not generate any reports under `.wb/workflows/reports/`.
12
+
13
+ Otherwise, ignore this section and proceed to the rest of the template.
14
+
15
+ ### HELP BLOCK — `/wbSetup`
16
+
17
+ ## When to run it
18
+
19
+ - **New package** — run immediately after `mkdir`, before writing any code.
20
+ - **Acquired package** — if you inherited something that never had `/wbSetup`, run it now.
21
+ - **Big rename/restructure** — if you moved the folder, re-run so context.md reflects the new reality.
22
+
23
+ Do NOT run it "to refresh" an existing, working package. That's `/wbContext`, not `/wbSetup`. Running `/wbSetup` on a package that already has a tuned `dev.md` risks overwriting hand-authored rules.
24
+
25
+ ## The three forms
26
+
27
+ ```
28
+ /wbSetup <pkg-path> # standard: context.md + dev.md
29
+ /wbSetup <pkg-path> --focus="<subsystem>" # + focused deep-dive file
30
+ /wbSetup core2/ --scope=global # monorepo_rules.md only
31
+ ```
32
+
33
+ ## What to check after it runs
34
+
35
+ 1. Open `context.md` — does it actually match what the package is? Fix misreads.
36
+ 2. Open `dev.md` — every rule should be a *refusal* ("never X", "do not Y"). Prose descriptions = rewrite.
37
+ 3. Check the `dist/` vs `dist-dev/` rule is there if the package publishes. If not, add it.
38
+ 4. If this is wb-press (Vue 2) — check that `dev.md` forbids Vue 3 syntax.
39
+
40
+ ## The mistake to avoid
41
+
42
+ Running `/wbSetup` and not reading the output. The AI's inferences are fallible. A 2-minute read of `dev.md` catches 90% of mistaken rules before they cause damage.
43
+
44
+ > For deeper reading: [`docs_claude/commands/wbSetup/wbSetup_practical_claude.md`](../../docs/docs_claude/commands/wbSetup/wbSetup_practical_claude.md) (or the `_eli5_`, `_expert_`, `_examples_` siblings).
45
+
46
+ <!-- FLAGS_TABLE_START -->
47
+ ## Flags & shortcuts
48
+
49
+ Both forms are equivalent — pass either:
50
+
51
+ | Long form | Shortcut |
52
+ |---|---|
53
+ | `--focus` | `-f` |
54
+ | `--scope` | `-s` |
55
+
56
+ `-h` / `--help` / `--h` (any command) prints this help block instead of executing.
57
+ ## Self-correct mode (dual-mode invocation)
58
+
59
+ ```
60
+ /wbSetup <scope_folder> # normal mode — produce a fresh output file
61
+ /wbSetup <previous_output_file> # self-correct mode — verify & repair the file in place
62
+ ```
63
+
64
+ When the first arg is an existing output file from a prior `/wbSetup` run (detected by its first H1 — see this template's **Detection** section), the command runs in **verify-and-repair** mode: gap-fills missing fields, normalizes links, ticks done/valid checkboxes whose reports exist, never rewrites authored content. See [`../_shared/output_conventions.md`](../_shared/output_conventions.md) §3.
65
+
66
+ <!-- FLAGS_TABLE_END -->
67
+ <!-- HELP_GATE_END -->
68
+
69
+ <!-- FLAG_NORMALIZE_START -->
70
+ ## Flag normalization (apply BEFORE parsing args)
71
+
72
+ Before processing `$ARGUMENTS`, normalize these short-form flags to their long equivalents:
73
+
74
+ - `-f` → `--focus`
75
+ - `-s` → `--scope`
76
+
77
+ The rest of this template documents only the long forms; the substitution above is the only place short forms are mentioned.
78
+ <!-- FLAG_NORMALIZE_END -->
79
+
80
+
81
+
82
+ > **How to use**: Copy the prompt below, replace `__TARGET_PATH__`, and paste to your AI Agent (Cline, OpenCode, or Antigravity).
83
+ > This is the "Day 0" command that breathes life into a new directory by establishing its agentic identity.
84
+
85
+ ---
86
+
87
+ ## Filename & Folder Convention (v2 — Universal Daily File)
88
+
89
+ **Path:** `<target_path>/.wb/workflows/reports/<YYYY>/<MM>/<DD>/setup/setup_<target>_<YYYYMMDD>.md`
90
+
91
+ > **No `<model>/` subfolder.** All models contribute to ONE setup file per day per scope.
92
+ > **No timestamp in filename.** Filename uses only the date.
93
+
94
+ **Create-or-Append Rule:**
95
+ - **File does NOT exist →** CREATE the file with a header and your setup log as Entry #1.
96
+ - **File ALREADY exists →** READ it, then APPEND your setup corrections/additions as Entry #N.
97
+ - **Every entry tagged:** `*(ModelName via Client — HH:MM)*`
98
+
99
+ ---
100
+
101
+ ## Detection (Self-Correct Mode)
102
+
103
+ Trigger self-correct when the input file's first H1 matches:
104
+ `# Setup Report: <scope> — <YYYY-MM-DD>`
105
+
106
+ Behavior is defined in [`../_shared/output_conventions.md`](../_shared/output_conventions.md) §3.
107
+ Setup-specific gap-fills:
108
+ - Broken relative links → recompute from the file's actual directory depth (common error: using `../../../../` when the file is deeper than 4 levels from target).
109
+ - Plain-text file references (`context.md`, `dev.md`, `dev_reference.md`) → convert to relative markdown links per §1.
110
+ - Missing `dev_reference.md` mention → add if the file exists.
111
+ - Missing or stale `## 📂 Generated Files` footer → regenerate per §5.
112
+ - Missing `> _Self-corrected:` timestamp → append at bottom.
113
+
114
+ ---
115
+
116
+ ## 🚀 The Initialization Prompt (copy from here ↓)
117
+
118
+ ```
119
+ ━━━━━━━━━━━━━ /wbSetup ━━━━━━━━━━━━━
120
+
121
+ 📁 TARGET: __TARGET_PATH__
122
+ 📅 DATE: __TODAY__
123
+ 🤖 MODEL: __YOUR_MODEL_NAME__
124
+ 🖥️ CLIENT: __YOUR_CLIENT__
125
+
126
+ ━━━ INSTRUCTIONS ━━━
127
+
128
+ **[TEMPORAL MEMORY]**: Before executing your main task, you MUST scan the `.wb/workflows/reports/` directory of your target scope. Look for recent `audits/`, `reviews/`, or `tests/` reports. Use these past reports to understand recent failures, technical debt, or architectural decisions that affect your current execution.
129
+
130
+
131
+ You are the **Lead Architect Agent**. Your task is to initialize the "Agentic Brain" for the target folder. This folder currently lacks standardized context.
132
+
133
+ 1. **Environmental Discovery**:
134
+ - Perform a `list_dir` on `__TARGET_PATH__`.
135
+ - Read `package.json` (if present) to extract:
136
+ - Package Name & Version
137
+ - Dependencies (Internal @wbc-ui2 vs External)
138
+ - Build/Dev Scripts
139
+ - Identify the primary language (Vue 2.7, TypeScript, Node.js).
140
+
141
+ 2. **Generate Core Workflow Files**:
142
+ - Create `__TARGET_PATH__/.wb/workflows/context.md`:
143
+ - **Identity**: 1-sentence purpose of this folder.
144
+ - **API Surface**: List key exported functions or components.
145
+ - **Dependencies**: Explicitly list monorepo peers this folder depends on.
146
+ - Create `__TARGET_PATH__/.wb/workflows/dev.md`:
147
+ - Define 3-5 specific coding rules for this folder (e.g., "Use Vuetify colors", "No direct DOM access").
148
+ - Create `__TARGET_PATH__/.wb/workflows/dev_reference.md`:
149
+ - List the exact terminal commands for `build`, `test`, and `serve` based on your discovery.
150
+
151
+ 3. **Sub-Contexts & Planning (Focus Mode)**:
152
+ - If the user provides a focus (e.g., `--focus="renderer"`):
153
+ - Analyze the specific sub-system code deeply.
154
+ - Create specialized context files (e.g., `context_renderer.md`).
155
+ - Automatically generate a `/wbPlan` blueprint (`wbplan_setup.md`) so Worker agents can validate and refine the architecture.
156
+
157
+ 4. **Global Synchronization**:
158
+ - Read `core2/.wb/workflows/monorepo_rules.md`.
159
+ - Ensure local `dev.md` rules align with the monorepo's shared standards.
160
+
161
+ 5. **Audit Trail** — SAVE using the Universal Daily File pattern:
162
+
163
+ CHECK if this file exists:
164
+ `__TARGET_PATH__/.wb/workflows/reports/__YYYY__/__MM__/__DD__/setup/setup___FOLDER_NAME_____YYYYMMDD__.md`
165
+
166
+ - If it does NOT exist → CREATE the file with header + your setup log as Entry #1
167
+ - If it ALREADY exists → APPEND your setup as the next Entry #N
168
+
169
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
170
+ ━━━ AUTO-APPEND FOOTER ━━━
171
+
172
+ At the VERY END of the file (after "What's Next?"), you MUST append the `## 📂 Generated Files (__YYYYMMDD__)` cross-link footer. Do NOT use simple tables. You MUST use the rich "Tier 1" layout from `_shared/output_conventions.md` §5.
173
+
174
+ Format required:
175
+ ```markdown
176
+ ---
177
+ ## 📂 Generated Files (__YYYYMMDD__)
178
+ > Auto-appended per `_shared/output_conventions.md` §5. Same-level snapshot of top-level command outputs at write time.
179
+
180
+ ### 📚 Base Reference Files
181
+ | Type | File | Description |
182
+ |---|---|---|
183
+ | Foundational | [context.md](../../../../../context.md) | Permanent Identity and Architecture (Source of Truth) |
184
+ | Snapshot | [context_<scope>_<date>.md](../contexts/context_<scope>_<date>.md) | Daily snapshot used for current session context |
185
+ | Foundational | [dev.md](../../../../../dev.md) | Permanent Development Commands and Status |
186
+
187
+ ### Global Files (`core2/` monorepo root)
188
+ | Category | File | Source Command |
189
+ |---|---|---|
190
+ | Reports | [audit_core2_<date>.md](../../../../../../../../../../.wb/workflows/reports/<YYYY>/<MM>/<DD>/audits/audit_core2_<date>.md) | `/wbAudit core2/` |
191
+ | Reports | [plan_core2_<date>.md](../../../../../../../../../../.wb/workflows/reports/<YYYY>/<MM>/<DD>/plans/plan_core2_<date>.md) | `/wbPlan core2/` |
192
+ | Tracks | [track_core2_<date>.md](../../../../../../../../../../.wb/workflows/tracks/<YYYY>/<MM>/<DD>/track_core2_<date>.md) | `/wbTrack core2/` |
193
+
194
+ <details>
195
+ <summary>📂 Sub-Package: [Active Package Name]</summary>
196
+
197
+ | Category | File | Source Command |
198
+ |---|---|---|
199
+ | Reports | [audit_subpkg_<date>.md](../../../../../../../../../../apps/wb-core/subpkg/.wb/workflows/reports/<YYYY>/<MM>/<DD>/audits/audit_subpkg_<date>.md) | `/wbAudit` |
200
+
201
+ </details>
202
+ ```
203
+ ```
@@ -0,0 +1,198 @@
1
+ # /wbStandup: Execution Template
2
+
3
+
4
+ <!-- HELP_GATE_START -->
5
+ ## Help intercept (handle FIRST — before any other action)
6
+
7
+ **If `$ARGUMENTS` contains `--help`, `-h`, or `--h`** (case-insensitive, anywhere in the args), DO NOT execute the command's normal procedure. Instead:
8
+
9
+ 1. Output the **HELP BLOCK** below verbatim (rendered as markdown).
10
+ 2. Stop. Do not perform any file reads, writes, or other tool calls.
11
+ 3. Do not generate any reports under `.wb/workflows/reports/`.
12
+
13
+ Otherwise, ignore this section and proceed to the rest of the template.
14
+
15
+ ### HELP BLOCK — `/wbStandup`
16
+
17
+ ## Two forms
18
+
19
+ ```
20
+ /wbStandup core2/ # monorepo-wide — morning default
21
+ /wbStandup <package>/ # package-scoped — afternoon re-orient
22
+ ```
23
+
24
+ ## When to run
25
+
26
+ - **Every morning.** Literally first thing. Before `/wbContext`.
27
+ - **After interruptions.** Back from lunch, back from a meeting, returning to a branch you haven't touched in a week.
28
+ - **Before starting a new feature.** Clear the backlog view first, so you don't forget an open blocker.
29
+
30
+ ## When *not* to run
31
+
32
+ - Multiple times per hour. It's a fresh-pair-of-eyes command; reading the same standup twice adds no value.
33
+ - Right after you've done 10 commits. Your memory is still hot; you don't need the standup to remind you.
34
+
35
+ ## Reading the output
36
+
37
+ Four sections, ranked by what should grab your attention:
38
+
39
+ 1. **Unresolved findings** (BLOCKERs / CRITICAL) — top priority
40
+ 2. **Stale reports** (🔨 in progress > 24h) — verify before continuing
41
+ 3. **Open plans** — ongoing work you can resume
42
+ 4. **Suggested next action** — AI opinion, you decide
43
+
44
+ ## The value is in the surface
45
+
46
+ `/wbStandup` doesn't add information. Every finding it lists already exists in `reports/`. Its value is making you *see* it, at the moment you're choosing what to do next. Without the standup, you'd probably forget the 8-day-old security finding.
47
+
48
+ ## The `/wbStandup` → `/wbContext` handoff
49
+
50
+ Standup is *breadth*. Context is *depth*. Sequence:
51
+
52
+ 1. `/wbStandup core2/` — tells you which package needs attention.
53
+ 2. `/wbContext <that-package>` — loads the AI's detailed knowledge of that package.
54
+ 3. Execute.
55
+
56
+ Skipping the first → you work on the wrong package. Skipping the second → the AI works on the right package with stale context.
57
+
58
+ ## When /wbStandup is the wrong command
59
+
60
+ - "What does package X do?" → `/wbContext <x>`.
61
+ - "Is package X good?" → `/wbAudit <x>`.
62
+ - "What should I build next?" → `/wbVision`, not standup (standup reconciles existing work).
63
+ - "Did the AI finish its plan?" → `/wbReview <plan>`.
64
+
65
+ > For deeper reading: [`docs_claude/commands/wbStandup/wbStandup_practical_claude.md`](../../docs/docs_claude/commands/wbStandup/wbStandup_practical_claude.md) (or the `_eli5_`, `_expert_`, `_examples_` siblings).
66
+
67
+ <!-- FLAGS_TABLE_START -->
68
+ ## Flags & shortcuts
69
+
70
+ Both forms are equivalent — pass either:
71
+
72
+ | Long form | Shortcut |
73
+ |---|---|
74
+ | `--act` | `-a` |
75
+ | `--wbPlan` | `-P` |
76
+
77
+ `-h` / `--help` / `--h` (any command) prints this help block instead of executing.
78
+ ## Self-correct mode (dual-mode invocation)
79
+
80
+ ```
81
+ /wbStandup <scope_folder> # normal mode — produce a fresh output file
82
+ /wbStandup <previous_output_file> # self-correct mode — verify & repair the file in place
83
+ ```
84
+
85
+ When the first arg is an existing output file from a prior `/wbStandup` run (detected by its first H1 — see this template's **Detection** section), the command runs in **verify-and-repair** mode: gap-fills missing fields, normalizes links, ticks done/valid checkboxes whose reports exist, never rewrites authored content. See [`../_shared/output_conventions.md`](../_shared/output_conventions.md) §3.
86
+
87
+ <!-- FLAGS_TABLE_END -->
88
+ <!-- HELP_GATE_END -->
89
+
90
+ <!-- FLAG_NORMALIZE_START -->
91
+ ## Flag normalization (apply BEFORE parsing args)
92
+
93
+ Before processing `$ARGUMENTS`, normalize these short-form flags to their long equivalents:
94
+
95
+ - `-a` → `--act`
96
+ - `-P` → `--wbPlan`
97
+
98
+ The rest of this template documents only the long forms; the substitution above is the only place short forms are mentioned.
99
+ <!-- FLAG_NORMALIZE_END -->
100
+
101
+
102
+
103
+ **ROLE:** The Scrum Master
104
+ **TARGET:** The entire monorepo or a specific package.
105
+ **Read first:** [`../_shared/output_conventions.md`](../_shared/output_conventions.md) — applies to the standup file (relative links, full-syntax commands, self-correct mode, **§9 Action Type Tagging** — declare `type:` + `emits:` in YAML front-matter, add a plain-text `Requires` column to every "next actions" table, include a `## 🔗 Action Types` legend; standups are typically `emits: mixed`).
106
+
107
+ ---
108
+
109
+ ## ━━━ DETECTION (Self-Correct Mode) ━━━
110
+
111
+ Trigger self-correct when the input file's first H1 matches:
112
+ `# Standup: <scope> — <YYYY-MM-DD>` *(or the legacy `# Standup Entry #N` header).*
113
+
114
+ Behavior is defined in [`../_shared/output_conventions.md`](../_shared/output_conventions.md) §3.
115
+
116
+ Standup-specific gap-fills:
117
+
118
+ - Plain-text mentions of plan/audit files → relative markdown links per §1.
119
+ - Bare `/wbXxx` in the recommendation table → full-syntax `/wbXxx <target>` per §2.
120
+ - Missing `Recommended Models` cells → fill from [`../model_recommendations.md`](../model_recommendations.md).
121
+
122
+ ---
123
+
124
+ ## ━━━ OBJECTIVE ━━━
125
+ Your job is to cure "Choice Paralysis." Scan the monorepo for unfinished work, consolidate it into a single agenda, and explicitly tell the human developer what command they should run next — **including which model to use**.
126
+
127
+ ## ━━━ PHASE 1: THE GLOBAL SCAN ━━━
128
+ 1. Perform a recursive scan of the target directory looking for `reports/<YYYY>/<MM>/<DD>/plans/plan_*.md` and `reports/<YYYY>/<MM>/<DD>/audits/audit_*.md`.
129
+ 2. Extract all tasks that have an empty checkbox (`⬜`) or audits marked as `FAIL`. Ignore anything marked with `✅`.
130
+ > **Note (v2):** Report files are now at `reports/<date>/<type>/<type>_<target>_<date>.md` — no `<model>/` subfolder.
131
+
132
+ ## ━━━ PHASE 2: AGGREGATION ━━━
133
+
134
+ ### Filename & Folder Convention (v2 — Universal Daily File)
135
+
136
+ **Path:** `.wb/workflows/reports/<YYYY>/<MM>/<DD>/standups/standup_<target>_<YYYYMMDD>.md`
137
+
138
+ > **No `<model>/` subfolder.** All models contribute to ONE standup file per day per scope.
139
+ > **No timestamp in filename.** Filename uses only the date.
140
+
141
+ **Create-or-Append Rule:**
142
+ - **File does NOT exist →** CREATE the file with a header and your standup entry as Entry #1.
143
+ - **File ALREADY exists →** READ it, then APPEND your standup as the next Entry #N.
144
+ - **Every entry tagged:** `*(ModelName via Client — HH:MM)*`
145
+
146
+ **Entry header format (use `---` only when appending, NEVER as the very first line of the file):**
147
+ ```markdown
148
+ # Standup Entry #N — *(ModelName via Client — HH:MM)*
149
+
150
+ > **Model:** ModelName
151
+ > **Client:** Cline / Antigravity / OpenCode / Gemini CLI
152
+ > **Time:** YYYY-MM-DD HH:MM
153
+
154
+ [... standup content: open plans, unresolved findings, resolved findings, audit trajectory, suggested next action ...]
155
+ ```
156
+
157
+ **Format:** Group the open tickets by Package/Folder. Order them by priority (e.g., Audit Debt comes before Feature tasks).
158
+
159
+ ## ━━━ PHASE 3: THE RECOMMENDATION ━━━
160
+ At the bottom of the report, you MUST provide a definitive recommendation with **model suggestions**.
161
+
162
+ **For each suggested next action, recommend 2-3 models** from `commands/model_recommendations.md`, ordered best → budget.
163
+
164
+ Use a table format:
165
+
166
+ | Priority | Requires | Action | Recommended Models (ordered) | Why |
167
+ |----------|---|--------|------------------------------|-----|
168
+ | 🔴 1st | 🔨 Worker | `/wbXxx target` — [what to do] | 💻 Model1 / Model2 / Model3 | [reason + why this model] |
169
+ | 🟡 2nd | 📋 Mechanical | `/wbYyy target` — [what to do] | ⚡ Model1 / Model2 | [reason] |
170
+ | 🟢 3rd | 🧠 Planner | `/wbZzz target` — [what to do] | 🧠 Model1 / Model2 | [reason] |
171
+
172
+ > **`Requires` column** (mandatory per `_shared/output_conventions.md` §9.3): plain-text action-type tag (`🧠 Planner` / `✅ Validator` / `🔨 Worker` / `📋 Mechanical`). The file MUST also include a `## 🔗 Action Types` legend before the Generated Files footer.
173
+
174
+ **Role → Model mapping (quick reference):**
175
+
176
+ | Role | 🏆 1st Pick | 🥈 2nd Pick | 💰 Budget |
177
+ |---|---|---|---|
178
+ | 🧠 Planning/Audit | Claude Opus 4.6 | DeepSeek V4 Pro (free) | Gemini 3.1 Pro |
179
+ | 💻 Code Worker | DeepSeek V4 Pro (free) | Claude Sonnet 4.6 ($3) | GLM-5.1 (free) |
180
+ | ✅ Validator | Claude Sonnet 4.6 ($3) | DeepSeek V4 Pro (free) | — |
181
+ | ⚡ Mechanical | Gemini 3 Flash ($0.50) | DeepSeek V4 Flash (free) | GPT 5 Nano (free) |
182
+
183
+ *Example: "You have 3 open P0 tickets in wb-core. I recommend running `/wbRefactor packages/wb-core §1` with **💻 DeepSeek V4 Pro** (free, strong coder) or **Claude Sonnet 4.6** ($3, better for security reasoning)."*
184
+
185
+ **Apply output conventions to every cell:**
186
+
187
+ - All file/folder references in the standup → relative markdown links from the standup file's directory (output_conventions.md §1).
188
+ - Action column: full-syntax invocable command per §2 (e.g., `/wbRefactor packages/wb-core/src/WBC.js`, not bare `/wbRefactor`).
189
+
190
+ ---
191
+
192
+ ## ━━━ PHASE 4: WHAT'S NEXT ━━━
193
+
194
+ End the standup file with:
195
+
196
+ ## 🧭 What's Next?
197
+
198
+ Run `/wbNext <target_folder>` to get a current, ranked, dynamic list of next actions. The standup is a *snapshot* of where things stand; `/wbNext` is the *forward-looking* recommendation.