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,160 @@
1
+ # /wbGit: 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 — `/wbGit`
16
+
17
+ ## Three forms
18
+
19
+ ```
20
+ /wbGit # draft commit message, no execution
21
+ /wbGit --from-plan # infer commit from today's plan
22
+ /wbGit --diff-file="diff.txt" # read user-provided patch
23
+ /wbGit --scan-recent # infer from recently modified files
24
+ /wbGit --execute # add + commit (asks for confirmation)
25
+ /wbGit --push # push current branch (asks for confirmation)
26
+ ```
27
+
28
+ Or use natural language: *"commit it"*, *"push"*, *"commit and push"*. Same result, AI parses intent.
29
+
30
+ ## When to run
31
+
32
+ - After every logical unit of work (one task done, one bug fixed, one example added).
33
+ - Before lunch / end of day — don't leave uncommitted work overnight.
34
+ - After `/wbRelease` — to commit version bumps and tag the release.
35
+ - After `/wbDeploy` — to commit any deploy-config changes.
36
+
37
+ ## When *not* to run
38
+
39
+ - Mid-task, with half-done changes you'll throw away.
40
+ - Just to "save progress" — that's what stash is for, not commit.
41
+ - When tests are failing (commit broken code only if you're explicitly leaving a known-broken marker for tomorrow-you).
42
+
43
+ ## The good rhythm
44
+
45
+ 3-6 commits per working day. Less = you're batching too much (commits will mix purposes). More = you're commit-spamming (granular noise).
46
+
47
+ ## The mandatory provenance header
48
+
49
+ Every Claude-generated commit message includes a `<!-- wbGit ... -->` block with five fields after the subject line: `date`, `model`, `session`, `plan`, `notes`. The block is HTML-comment-fenced so GitHub hides it visually but `git log` and `grep` still see it.
50
+
51
+ Example (real format):
52
+
53
+ ```text
54
+ fix(wb-dataviewer): apiResponse_ cache stale on route change
55
+
56
+ <!-- wbGit
57
+ date: 2026-04-25 11:08
58
+ model: claude-opus-4-7
59
+ session: claude
60
+ plan: —
61
+ notes: resolves debug 20260419/debugs/apiResponse_loop.md
62
+ -->
63
+
64
+ Watcher key was reading apiResponse_ and writing it back...
65
+ ```
66
+
67
+ Why every commit needs it: 6 months from now, `git blame` shows you which model drafted the message, which plan it advanced, and any salient notes (like "user authorized mixed-change override"). Without the header, you lose all that context.
68
+
69
+ Full header schema lives in [wbGit_template_claude](../wbGit_template_claude.md). The `notes` field is the most useful day-to-day — fill it with anything future-you should know, otherwise write `—`.
70
+
71
+ ## What `/wbGit` will refuse to do
72
+
73
+ - **Force push.** No `--force`. If your branch diverged, resolve it; don't overwrite.
74
+ - **Skip hooks.** No `--no-verify`. If a hook fails, the hook is right or the code is right; either way, fix the underlying issue.
75
+ - **Bundle unrelated changes silently.** If the diff has multiple unrelated purposes, the command surfaces this and asks you to split (or explicitly acknowledge the mix with a `chore:` message).
76
+ - **Auto-push to main on a protected branch.** If main is protected and you don't have permission, the command surfaces the failure rather than attempting workarounds.
77
+
78
+ ## The mixed-change check
79
+
80
+ If the AI sees that one diff spans:
81
+ - A feature change
82
+ - A bug fix
83
+ - A docs update
84
+
85
+ …it will refuse to commit as one and propose splitting. This is hygiene, not paranoia. Mixed commits are unreviewable in PR; conventional changelogs depend on per-commit categorization; `git revert` becomes destructive.
86
+
87
+ If you genuinely want a mixed commit (rare — usually after a long forgotten branch), tell the AI explicitly: *"commit as mixed change"*. It will use a `chore:` prefix that acknowledges the mix.
88
+
89
+ ## The `/wbGit` ↔ closed-loop interaction
90
+
91
+ `/wbGit` reads recent `reports/` to enrich commit messages. If a commit corresponds to a plan task, the message references the plan file. If it corresponds to a debug report, the message references the debug. This makes git history *queryable* against the report system.
92
+
93
+ ## When /wbGit is the wrong command
94
+
95
+ - Stash unfinished work → use `git stash` directly (this is one of the few git commands you might do yourself; ask the user, don't reach for /wbGit).
96
+ - Resolve a merge conflict → don't auto-resolve; do it manually.
97
+ - Cherry-pick / rebase / interactive history rewrites → don't use `/wbGit`. These are user-driven operations.
98
+ - Initial repo setup → done once, manually.
99
+
100
+ `/wbGit` is for the daily commit/push rhythm. Anything more involved is yours.
101
+
102
+ > For deeper reading: [`docs_claude/commands/wbGit/wbGit_practical_claude.md`](../../docs/docs_claude/commands/wbGit/wbGit_practical_claude.md) (or the `_eli5_`, `_expert_`, `_examples_` siblings).
103
+
104
+ <!-- FLAGS_TABLE_START -->
105
+ ## Flags & shortcuts
106
+
107
+ Both forms are equivalent — pass either:
108
+
109
+ | Long form | Shortcut |
110
+ |---|---|
111
+ | `--execute` | `-e` |
112
+ | `--force` | `-F` |
113
+ | `--no-verify` | `-n` |
114
+ | `--push` | `-p` |
115
+ | `--from-plan` | `-P` |
116
+ | `--diff-file` | `-d` |
117
+ | `--scan-recent` | `-r` |
118
+
119
+ `-h` / `--help` / `--h` (any command) prints this help block instead of executing.
120
+ <!-- FLAGS_TABLE_END -->
121
+ <!-- HELP_GATE_END -->
122
+
123
+ <!-- FLAG_NORMALIZE_START -->
124
+ ## Flag normalization (apply BEFORE parsing args)
125
+
126
+ Before processing `$ARGUMENTS`, normalize these short-form flags to their long equivalents:
127
+
128
+ - `-e` → `--execute`
129
+ - `-F` → `--force`
130
+ - `-n` → `--no-verify`
131
+ - `-p` → `--push`
132
+ - `-P` → `--from-plan`
133
+ - `-d` → `--diff-file`
134
+ - `-r` → `--scan-recent`
135
+
136
+ The rest of this template documents only the long forms; the substitution above is the only place short forms are mentioned.
137
+ <!-- FLAG_NORMALIZE_END -->
138
+
139
+
140
+
141
+ **ROLE:** The Archivist
142
+ **TARGET:** The current working directory repository.
143
+
144
+ ## ━━━ OBJECTIVE ━━━
145
+ Your job is to manage version control safely and professionally. You must analyze the current file changes and generate standard Conventional Commits.
146
+
147
+ ## ━━━ PHASE 1: RECONNAISSANCE ━━━
148
+ 1. Determine the source of changes based on flags:
149
+ - **Default**: You are forbidden from running terminal git commands. Ask the user for a summary.
150
+ - **`--from-plan`**: Read the most recent `plan_*.md` and extract `✅ Done` tasks.
151
+ - **`--diff-file="<path>"`**: Read the specified patch file directly.
152
+ - **`--scan-recent`**: Find and read files modified in the last 2 hours.
153
+ 2. Cross-reference the changes with any recent `plans/` or `standups/` to understand the context.
154
+
155
+ ## ━━━ PHASE 2: COMMIT GENERATION ━━━
156
+ 1. Draft a strict Conventional Commit message (e.g., `feat(wb-core): add logging capabilities`, `fix(dataviewer): resolve infinite loop in pagination`).
157
+ 2. Include an optional body explaining *why* the change was made if it is complex.
158
+
159
+ ## ━━━ PHASE 3: EXECUTION (Optional) ━━━
160
+ If instructed by the user, execute the `git add`, `git commit`, and `git push` sequence. If generating a Pull Request, write a comprehensive PR description detailing the architectural changes.
@@ -0,0 +1,101 @@
1
+ # /wbHelp: Catalog & Per-Command Help
2
+
3
+ `/wbHelp` is a META-command. It does NOT generate a report. It prints help text and stops.
4
+
5
+ ---
6
+
7
+ ## Mode dispatch
8
+
9
+ Inspect `$ARGUMENTS` and pick exactly one mode:
10
+
11
+ | Args | Mode | Behavior |
12
+ |---|---|---|
13
+ | empty (no args) | **Catalog mode** | Print the role-grouped table of all `/wb*` commands |
14
+ | `<wbX>` (one token, starts with `wb`) | **Per-command mode** | Output the HELP_GATE block of `wbX_template.md` (identical to `/wbX -h`) |
15
+ | `<wbX> --help` / `<wbX> -h` | **Per-command mode** | Same as above; redundant flags ignored |
16
+ | anything else | **Catalog mode** + a one-line note: *"Unrecognized form. Showing catalog. Use `/wbHelp <wbX>` for one command."* |
17
+
18
+ **Normalization first**: strip a leading `/` from the command name (`/wbHelp wbAudit` and `/wbHelp /wbAudit` both work). Case-sensitive (`wbAudit`, not `wbaudit`).
19
+
20
+ ---
21
+
22
+ ## CATALOG MODE — render the table
23
+
24
+ 1. Read `../wb_commands_reference.claude.json`.
25
+ 2. Group commands by **role family** using the first noun of each command's `role` field. Map each `role` value to one of four families:
26
+ - 🧠 **Strategy / Planning** — `Architect`, `General`, `Product Manager`, `Navigator`, `Scrum Master`
27
+ - ✅ **Validation / Critique** — `Critic`, `Inspector`, `Diagnostician`, `Red Team`, `Quizmaster`, `Triage Officer`, `Synchronizer`
28
+ - 🔨 **Worker / Execution** — `Surgeon`, `Modernizer`, `Licensor`, `Tier Architect`, `Translator`, `Scribe`, `Release Engineer`, `Shipper`
29
+ - 📋 **Mechanical / Reporting** — `Tester`, `Janitor`, `Marketer`, `Stenographer`
30
+
31
+ If a role doesn't fit any family cleanly, drop it under **🔨 Worker** by default.
32
+
33
+ 3. Output exactly this structure:
34
+
35
+ ```markdown
36
+ # /wb* Command Catalog
37
+
38
+ > 30 template-driven commands. Pass `--help` (or `-h`) to any command for its manual, or `/wbHelp <wbX>`.
39
+
40
+ ## 🧠 Strategy / Planning
41
+
42
+ | # | Command | Role | Flags | What it does |
43
+ |---|---|---|---|---|
44
+ | 03 | `/wbPlan` | The General — coordinates workers and validators. | `--resume` (`-r`), `--scope` (`-s`), `--task` (`-t`) | Creates a structured task plan with worker/validator assignments. |
45
+ | ...
46
+
47
+ ## ✅ Validation / Critique
48
+
49
+ | # | Command | Role | Flags | What it does |
50
+ | ...
51
+
52
+ ## 🔨 Worker / Execution
53
+
54
+ | # | Command | Role | Flags | What it does |
55
+ | ...
56
+
57
+ ## 📋 Mechanical / Reporting
58
+
59
+ | # | Command | Role | Flags | What it does |
60
+ | ...
61
+
62
+ ---
63
+
64
+ **Need details on one command?** Run `/wbHelp <command>` (or `/<command> -h`).
65
+ **Model picks per command:** see [`flow.wb-ui.com/concepts/model_recommendations_claude.md`](../../../../../apps/wb-flow/flow.wb-ui.com/concepts/model_recommendations_claude.md).
66
+ ```
67
+
68
+ 4. The `#` column uses the catalog's natural order (1, 2, 3 …) — read the JSON keys in their order of appearance and number sequentially. Don't invent positional numbers.
69
+
70
+ 5. The `What it does` column uses the JSON's `description` field, trimmed to a single sentence.
71
+
72
+ 6. The `Flags` column uses the JSON's `flags` array (each entry is `{"long": "--xxx", "short": "-x"}`). Render as comma-separated `` `--long` (`-short`) `` pairs. If the array is missing or empty, render `—` (em-dash). All commands also accept `-h` / `--help`; do NOT list that in this column — it's universal and would just be visual noise.
73
+
74
+ 7. **Do not** include the JSON's `phase`, `belt`, `recommendedModel`, or `references` fields in the table. Those belong in per-command help, not the catalog.
75
+
76
+ 8. Stop after printing. No file writes. No reports.
77
+
78
+ ---
79
+
80
+ ## PER-COMMAND MODE — delegate to the target template
81
+
82
+ 1. Compute `target = <wbX>` (the cleaned arg).
83
+ 2. Verify the file exists: `../<target>/<target>_template.md`. If not, output: *"Unknown command: `/<target>`. Run `/wbHelp` for the full catalog."* and stop.
84
+ 3. Read **only** the content between `<!-- HELP_GATE_START -->` and `<!-- HELP_GATE_END -->` in that template.
85
+ 4. Output it verbatim. No file writes. No reports.
86
+
87
+ This is functionally identical to running `/<target> -h`. Same content, different invocation path.
88
+
89
+ ---
90
+
91
+ ## What `/wbHelp` will refuse to do
92
+
93
+ - Generate any `.wb/workflows/reports/` file. This is a print-and-stop command.
94
+ - Resolve flags or args meaningful to other commands. `/wbHelp wbGit --execute` shows the wbGit help; the `--execute` is ignored.
95
+ - Run more than one mode in a single invocation.
96
+
97
+ ## When `/wbHelp` is the wrong command
98
+
99
+ - You want the model-pick recommendations → `model_recommendations_claude.md`, not here.
100
+ - You want to actually execute a command → drop the `wbHelp` prefix, just run `/wbX <args>`.
101
+ - You want the full prose docs → `docs_claude/commands/<wbX>/<wbX>_practical_claude.md`.
@@ -0,0 +1,337 @@
1
+ # wbIdea Template v1.1 — The Ideas Pipeline
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 — `/wbIdea`
16
+
17
+ ## Where `/wbIdea` fits in the pipeline
18
+
19
+ ```
20
+ wbVision ──► wbIdea ──► wbPlan ──► wbWork ──► wbValid
21
+ (dream) (capture) (commit) (execute) (verify)
22
+ ```
23
+
24
+ **`/wbVision`** = dream features (free-form, use rarely).
25
+ **`/wbIdea`** = capture and score a concrete idea (tabular, trackable — but NOT committed to execution).
26
+ **`/wbPlan`** = commit to execution (worker/validator assignments, DAG dependencies).
27
+
28
+ The key distinction: ideas have a **Score** and a **☐ Valid** column, but no worker/validator assignments. An idea becomes a task only when explicitly promoted via validation.
29
+
30
+ ## The four forms
31
+
32
+ ```
33
+ /wbIdea <pkg> # AI scans context and proposes ideas
34
+ /wbIdea <pkg> --task="<description>" # Register a specific idea manually
35
+ /wbIdea <pkg> --resume # Re-read existing idea file, re-score
36
+ /wbIdea <pkg> --id=1 --promote # Promote idea #1 to today's plan file
37
+ /wbIdea <pkg> --id=1,2 --reject # Mark ideas 1,2 as 🚫 Rejected
38
+ /wbIdea <pkg> --id=1 --defer # Mark idea 1 as ⏸️ Deferred
39
+ ```
40
+
41
+ ## Reading an idea file
42
+
43
+ Every idea file has a table. Four columns matter most:
44
+
45
+ - **Score** — 1–10 advisory score. How strongly this idea should become a task. 10 = "implement immediately". 1 = "nice-to-have, maybe never".
46
+ - **Idea** — must be specific enough that another session could evaluate it without re-reading the source.
47
+ - **☐ Valid** — validation state. Determines whether the idea should be promoted, deferred, or rejected.
48
+ - **→ Task** — the bridge to `/wbPlan`. When an idea is promoted, this column becomes a link to the plan row.
49
+
50
+ Skim these before deciding. If the ideas are vague, the file is weak; re-run with a more specific scope.
51
+
52
+ ## When to run
53
+
54
+ - Anytime you have a speculative improvement that isn't worth committing to immediately.
55
+ - After `/wbVision` to formalize its best ideas into trackable rows.
56
+ - After `/wbAudit` with low-severity findings that are improvements rather than bugs.
57
+ - When you want to build a backlog of possibilities without creating plan overhead.
58
+
59
+ ## When NOT to run
60
+
61
+ - The idea fits in one sentence and you're ready to execute → just describe the task.
62
+ - You have an existing plan with open tasks → finish those first.
63
+ - You want to brainstorm broadly → use `/wbVision`.
64
+
65
+ ## When /wbIdea is the wrong command
66
+
67
+ - You want to *do* the work → describe the task directly, or `/wbWork`.
68
+ - You want to *commit* to execution → `/wbPlan`.
69
+ - You want to *brainstorm* with no structure → `/wbVision`.
70
+ - You want to *audit* code quality → `/wbAudit`.
71
+
72
+ `/wbIdea` answers one question: *"Is this worth doing eventually?"* Not "what are the steps?" (that's `/wbPlan`) and not "what could we build?" (that's `/wbVision`).
73
+
74
+ > For deeper reading: [`docs_claude/commands/wbIdea/wbIdea_practical_claude.md`](../../docs/docs_claude/commands/wbIdea/wbIdea_practical_claude.md) (or the `_eli5_`, `_expert_`, `_examples_` siblings).
75
+
76
+ <!-- FLAGS_TABLE_START -->
77
+ ## Flags & shortcuts
78
+
79
+ Both forms are equivalent — pass either:
80
+
81
+ | Long form | Shortcut | Description |
82
+ |---|---|---|
83
+ | `--resume` | `-r` | Re-read existing idea file, re-score |
84
+ | `--scope` | `-s` | Scope override |
85
+ | `--task` | `-t` | Explicit idea description |
86
+ | `--id` | `-i` | Specifies idea indices to target |
87
+ | `--promote` | `-p` | Promote idea(s) to today's plan file |
88
+ | `--reject` | `-x` | Mark idea(s) as 🚫 Rejected |
89
+ | `--defer` | `-d` | Mark idea(s) as ⏸️ Deferred |
90
+
91
+ `-h` / `--help` / `--h` (any command) prints this help block instead of executing.
92
+ ## Self-correct mode (dual-mode invocation)
93
+
94
+ ```
95
+ /wbIdea <scope_folder> # normal mode — produce a fresh output file
96
+ /wbIdea <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 `/wbIdea` 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
+ - `-r` → `--resume`
110
+ - `-s` → `--scope`
111
+ - `-t` → `--task`
112
+ - `-i` → `--id`
113
+ - `-p` → `--promote`
114
+ - `-x` → `--reject`
115
+ - `-d` → `--defer`
116
+
117
+ The rest of this template documents only the long forms; the substitution above is the only place short forms are mentioned.
118
+ <!-- FLAG_NORMALIZE_END -->
119
+
120
+
121
+
122
+ > **How to use**: Copy the prompt below, replace `__PLACEHOLDERS__`, paste to any AI agent.
123
+ > Everyone gets the SAME prompt. Each agent finds their alias and does only their tasks.
124
+ > **Read first:** [`../_shared/output_conventions.md`](../_shared/output_conventions.md) — applies to every cell of the output, including **§9 Action Type Tagging**: declare `type:` + `emits:` in YAML front-matter, add a plain-text `Requires` column to every ideas/candidates table (each idea gets a 🧠/✅/🔨/📋 tag indicating what role would carry it out), include a `## 🔗 Action Types` legend.
125
+
126
+ ---
127
+
128
+ ## Filename & Folder Convention
129
+
130
+ **Path:** `<target_folder>/.wb/workflows/reports/<YYYY>/<MM>/<DD>/ideas/idea_<target>_<YYYYMMDD>.md`
131
+
132
+ **STRICT NAMING RULE:** The idea filename MUST be exactly `idea_<folder_scope>_<YYYYMMDD>.md`. Do NOT append source types, issue names, or any other suffixes.
133
+
134
+ **ONE FILE PER DAY rule:** There must be exactly ONE idea file per day per folder scope. All ideas — regardless of origin (audit, vision, manual, etc.) — go into the same file as separate Entry #N sections or rows in the same idea table.
135
+
136
+ **MERGE-OR-CREATE protocol:**
137
+ 1. If `idea_<folder>_<YYYYMMDD>.md` already exists → APPEND your ideas as a new Entry #N section (tagged `*(ModelName — HH:MM)*`).
138
+ 2. If it does not exist → CREATE it.
139
+ 3. If multiple `idea_*<YYYYMMDD>*.md` files exist for the same day (e.g., from a prior bug) → MERGE them into one `idea_<folder>_<YYYYMMDD>.md`, combining all idea tables.
140
+
141
+ ---
142
+
143
+ ## Detection (Self-Correct Mode)
144
+
145
+ Trigger self-correct when the input file's first H1 matches:
146
+ `# Idea Backlog: <scope> — <YYYY-MM-DD>`
147
+
148
+ Behavior is defined in [`../_shared/output_conventions.md`](../_shared/output_conventions.md) §3.
149
+ Idea-specific gap-fills:
150
+ - Blank `☐ Done` for an idea whose `ideas_reports/idea_<N>/idea_<N>_report_*.md` exists → check it (`✅<br><worker>`).
151
+ - Blank `☐ Valid` for an idea whose exploration report has a validator score appended → fill `✅ <Score>/10<br><validator>`.
152
+ - Plain-text file references → convert to relative markdown links per §1.
153
+ - Missing `Suggested By` for ideas with known origin commands → fill from context.
154
+ - **Column completeness — verify ALL required columns are present** (see Column Rules above): `#`, `Requires`, `Score`, `🔗`, `Idea`, `P`, `Est. Time (mins)`, `Suggested By`, `☐ Done`, `☐ Valid`, `→ Task`. If any column is missing — most commonly **`Requires`** in idea files written before v1.1 — insert it after `#` and back-fill every row by inferring the tag from the idea's wording.
155
+ - **Legend section check:** if `## 🔗 Action Types` legend is absent, append it just before the Generated Files footer (template in `_shared/output_conventions.md` §9.3).
156
+ - **Link beautification (per `_shared/output_conventions.md` §1.1):** walk EVERY markdown link in the file (front-matter, callouts, prose, table cells, footer). Apply the four-rule detection: rewrite any link where (1) label == href, (2) label contains a `/` other than a single trailing slash, (3) label has `..`/`…`/`./`, or (4) label is absolute. Keep the href intact; replace the label with the basename of the href. Example: `[../../plans/plan_X.md](../../plans/plan_X.md)` → `[plan_X.md](../../plans/plan_X.md)`.
157
+ - **Path correctness (per `_shared/output_conventions.md` §1.2):** for every link to a report file or scope-root file, derive the href from §1.2's canonical-path table — do NOT count `../` segments by hand. The most common break is prev-day links across a month boundary (need `../../../<MM-prev>/<DD-prev>/...`, not `../../<DD-prev>/...`). Rewrite mismatches.
158
+
159
+ ---
160
+
161
+ ## 🚀 The Ideation Prompt (copy from here ↓)
162
+
163
+ ```
164
+ ━━━━━━━━━━━━━ /wbIdea v1.1 ━━━━━━━━━━━━━
165
+
166
+ 📁 PROJECT: __PROJECT_NAME__
167
+ 📅 DATE: __TODAY__
168
+ 🤖 MODEL: __YOUR_MODEL_NAME__
169
+ 🖥️ CLIENT: __YOUR_CLIENT__
170
+ 📂 IDEA FILE: __TARGET_FOLDER__/.wb/workflows/reports/__YYYY__/__MM__/__DD__/ideas/idea___TARGET_NAME_____YYYYMMDD__.md
171
+
172
+ ━━━ CONTEXT ━━━
173
+
174
+ Read the `.wb/workflows/context.md` file in the target folder(s) FIRST.
175
+ Check `../model_recommendations.md` for role assignments.
176
+ Read `../_shared/output_conventions.md` — your output MUST follow it.
177
+
178
+ ━━━ INPUT MODE DETECTION ━━━
179
+
180
+ If the input is a file matching the idea-output schema (first H1 = "# Idea Backlog: <scope> — <date>"):
181
+ - If target IDs and state flags (`--promote`, `--reject`, `--defer`) are provided:
182
+ → **STATE OVERRIDE MODE**: Directly edit the idea file.
183
+ - `--promote`: Set `☐ Valid` to `🎯 Promoted` and trigger the Promotion Protocol (see below).
184
+ - `--reject`: Set `☐ Valid` to `🚫 Rejected`.
185
+ - `--defer`: Set `☐ Valid` to `⏸️ Deferred`.
186
+ Do NOT generate new ideas.
187
+ - Else:
188
+ → **SELF-CORRECT MODE** (see _shared/output_conventions.md §3).
189
+ Else:
190
+ → **FRESH-IDEA MODE** (proceed with the prompt below).
191
+
192
+ ━━━ THE CONTEXT ━━━
193
+
194
+ """
195
+ __YOUR_MESSY_DESCRIPTION_OR_EMPTY__
196
+ """
197
+
198
+ ━━━ IDEA TABLE (v1.1 — Scored Ideas Pipeline, Action-Tagged) ━━━
199
+
200
+ | # | Requires | Score | 🔗 | Idea | P | Est. Time (mins) | Suggested By | ☐ Done | ☐ Valid | → Task |
201
+ |---|---|---|---|---|---|---|---|---|---|---|
202
+ | 1 | 🔨 Worker | 8 | <span title="Run: /wbExplain idea_<scope>_<date>.md --id=1 --scope=idea">📄</span> | [idea description] | P1 | 30 | <ModelName> via /wbIdea | ⬜ | ⬜ | — |
203
+ | 2 | 🧠 Planner | 5 | <span title="Run: /wbExplain idea_<scope>_<date>.md --id=2 --scope=idea">📄</span> | [idea description] | P2 | 15 | <ModelName> via /wbIdea | ⬜ | ⬜ | — |
204
+
205
+ **Column Rules:**
206
+ 1. **# (Idea Index)**: When an idea is explored (Done = ✅), this index MUST become a markdown link to the exploration report (e.g. `[1](ideas_reports/idea_1/idea_1_report_<scope>_<YYYYMMDD>.md)`).
207
+ 2. **Requires (Action Type)**: Plain-text tag indicating which canonical role would carry the idea out *if it were promoted to a task* — one of `🧠 Planner` / `✅ Validator` / `🔨 Worker` / `📋 Mechanical`. Per `_shared/output_conventions.md` §9.3 this column is mandatory for every idea file; the file MUST also include a `## 🔗 Action Types` legend section just before the Generated Files footer. Tag selection rule: pick the role the *promoted task* would require — a code edit / refactor → 🔨 Worker; a "should we?" / multi-step decomposition → 🧠 Planner; a quality / safety review → ✅ Validator; a "run command and capture …" → 📋 Mechanical. Hybrid ideas MUST be split into two rows.
208
+ 3. **Score (Advisory Score)**: Integer 1–10. Computed by the suggesting model based on: **impact × feasibility × urgency**. 10 = "implement immediately". 1 = "nice-to-have, maybe never". The score informs validation but does not auto-promote.
209
+ 4. **🔗 (Details)**: Contextual Lazy Loading trigger. Inactive: `<span title="Run: /wbExplain idea_<scope>_<date>.md --id=<N> --scope=idea">📄</span>`. If an explanation file has been generated, upgrade to an active link: `[📄](ideas_reports/idea_<N>/idea_<N>_details_<scope>_<YYYYMMDD>.md "View Details")`.
210
+ 5. **Idea**: Short imperative description. Clear enough to be promoted to a plan task without re-reading the source.
211
+ 6. **P (Priority)**: P0–P3. Indicates the *urgency of evaluating* the idea, not of executing it.
212
+ 7. **Est. Time (mins)**: How long the *task* would take if this idea were promoted. Not the time to evaluate the idea.
213
+ 8. **Suggested By**: Who/what proposed this idea. Format: `<ModelName> via <command>` (e.g., `Opus 4.7 via /wbAudit`, `Manual`, `Gemini 3.1 Pro via /wbVision`).
214
+ 9. **☐ Done (Exploration Status)**: `⬜` = not explored. `✅<br>ModelName` = idea has been explored and documented via `/wbWork idea_*.md --id=N`. Unlike plan Done, this means "explored", not "implemented".
215
+ 10. **☐ Valid (Validation Status)**: The verdict scale:
216
+ - `⬜` = not reviewed
217
+ - `🎯 Promoted <Score>/10<br>ModelName` = "This deserves to be a task" (Score 8–10). Triggers promotion protocol.
218
+ - `✅ <Score>/10<br>ModelName` = "Good idea, worth doing when capacity allows" (Score 5–7). No auto-promotion.
219
+ - `⏸️ Deferred <Score>/10<br>ModelName` = "Interesting but not the right time" (Score 3–4).
220
+ - `🚫 Rejected <Score>/10<br>ModelName` = "Not worth pursuing" (Score 1–2).
221
+ Validation is cumulative (same as plan Valid): append new validations below existing ones.
222
+ 11. **→ Task (Promotion Link)**: `—` when not promoted. When promoted, becomes a relative markdown link: `[→ Plan #M](../plans/plan_<scope>_<YYYYMMDD>.md)`.
223
+
224
+ ━━━ ENTRY HEADER FORMAT ━━━
225
+
226
+ Each idea batch added to the file MUST have a section header:
227
+
228
+ ## 💡 Ideas — <origin_description> *(<ModelName> via <Client> — <HH:MM>)*
229
+ > **Source:** <relative link to source file if applicable>
230
+ > **Model:** <model_name>
231
+ > **Date:** <YYYY-MM-DD>
232
+
233
+ Example origins:
234
+ - "AI-generated ideas for wb-dataviewer"
235
+ - "Low-severity audit findings from /wbAudit"
236
+ - "Feature proposals from /wbVision"
237
+ - "Manual idea registration"
238
+
239
+ ━━━ SCORING HEURISTIC ━━━
240
+
241
+ When computing the Score (1–10), use this matrix:
242
+
243
+ | Factor | Weight | Anchors |
244
+ |---|---|---|
245
+ | **Impact** | 40% | 10 = fundamentally changes UX/DX. 5 = noticeable improvement. 1 = cosmetic. |
246
+ | **Feasibility** | 30% | 10 = straightforward, low risk. 5 = moderate complexity. 1 = requires architectural change. |
247
+ | **Urgency** | 30% | 10 = blocking other work. 5 = would be nice this sprint. 1 = no timeline pressure. |
248
+
249
+ `Score = round(impact × 0.4 + feasibility × 0.3 + urgency × 0.3)`
250
+
251
+ ━━━ PROMOTION PROTOCOL ━━━
252
+
253
+ When an idea is promoted (via `--promote` flag or via `/wbValid idea_*.md --id=N` with `🎯 Promoted` verdict):
254
+
255
+ 1. Locate (or create) today's plan file: `<target>/.wb/workflows/reports/<YYYY>/<MM>/<DD>/plans/plan_<scope>_<YYYYMMDD>.md`.
256
+ 2. Append the idea as a new task row:
257
+ - `Origin` = `💡 [/wbIdea #<N>](../ideas/idea_<scope>_<YYYYMMDD>.md)` (relative link).
258
+ - `Task` = copy from the `Idea` column.
259
+ - `P` = copy from the idea's `P` column.
260
+ - `Est. Time` = copy from the idea's `Est. Time` column.
261
+ - `Worker` / `Validator` = fill from `model_recommendations.md`.
262
+ - `☐ Done` = `⬜`.
263
+ - `☐ Valid` = `⬜`.
264
+ 3. Update the idea file:
265
+ - `→ Task` column = `[→ Plan #M](../plans/plan_<scope>_<YYYYMMDD>.md)`.
266
+ - `☐ Valid` = `🎯 Promoted <Score>/10<br>ModelName` (if not already set).
267
+
268
+ ━━━ SOURCE LINKING ━━━
269
+
270
+ When ideas originate from another command's output (e.g. an audit, a vision), the entry header MUST include a relative markdown link to that source file. Example:
271
+
272
+ > ## 💡 Ideas — /wbVision findings *(Gemini 3.1 Pro — 14:30)*
273
+ > - **Source:** [vision_wb-core_20260508.md](../visions/vision_wb-core_20260508.md) Entry #1
274
+ > - **Origin Command:** `/wbVision packages/wb-core/`
275
+ > - **Ideas registered:** 3
276
+
277
+ ━━━ "WHAT NEXT" ━━━
278
+
279
+ In **Fresh-Idea Mode**, end the idea file with:
280
+
281
+ > ## 🧭 What's Next?
282
+ > - Run [`/wbWork idea_<scope>_<YYYYMMDD>.md --id=<N>`] to explore idea #N in depth.
283
+ > - Run [`/wbExplain idea_<scope>_<YYYYMMDD>.md --id=<N> --scope=idea`] for a deep-dive explanation.
284
+ > - Run [`/wbValid idea_<scope>_<YYYYMMDD>.md --id=<N>`] to validate and potentially promote.
285
+ > - Run [`/wbIdea <target> --id=<N> --promote`] to directly promote a high-scoring idea.
286
+
287
+ In **Self-Correct Mode**, if you are re-checking an existing idea file:
288
+ 1. **Analyze current progress**: Check which ideas are explored, validated, promoted.
289
+ 2. **Re-score ideas** if context has changed.
290
+ 3. **Suggest immediate next actions** based on the current state.
291
+
292
+ ━━━ AUTO-APPEND FOOTER ━━━
293
+
294
+ 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.
295
+
296
+ Format required:
297
+ ```markdown
298
+ ---
299
+ ## 📂 Generated Files (__YYYYMMDD__)
300
+ > Auto-appended per `_shared/output_conventions.md` §5. Same-level snapshot of top-level command outputs at write time.
301
+
302
+ ### 📚 Base Reference Files
303
+ | Type | File | Description |
304
+ |---|---|---|
305
+ | Foundational | [context.md](../../../../../context.md) | Permanent Identity and Architecture (Source of Truth) |
306
+ | Snapshot | [context_<scope>_<date>.md](../contexts/context_<scope>_<date>.md) | Daily snapshot used for current session context |
307
+ | Foundational | [dev.md](../../../../../dev.md) | Permanent Development Commands and Status |
308
+
309
+ ### Local Files
310
+
311
+ | Category | File (day N) | File (day N-1) | Source Command |
312
+ |---|---|---|---|
313
+ | Identity | [context.md](../../../../../context.md) | — | Foundational Identity & Architecture |
314
+ | Identity | [dev.md](../../../../../dev.md) | — | Foundational Dev Commands & Status |
315
+ | Reports | [audit_<scope>_<date>.md](../audits/audit_<scope>_<date>.md) | [audit_<scope>_<prev-date>.md](../../<prev-DD>/audits/audit_<scope>_<prev-date>.md) | `/wbAudit` |
316
+ | Reports | [plan_<scope>_<date>.md](../plans/plan_<scope>_<date>.md) | [plan_<scope>_<prev-date>.md](../../<prev-DD>/plans/plan_<scope>_<prev-date>.md) | `/wbPlan` |
317
+ | Reports | **idea_<scope>_<date>.md** *(this file)* | [idea_<scope>_<prev-date>.md](../../<prev-DD>/ideas/idea_<scope>_<prev-date>.md) | `/wbIdea` |
318
+ | Reports | [next_<scope>_<date>.md](../nexts/next_<scope>_<date>.md) | [next_<scope>_<prev-date>.md](../../<prev-DD>/nexts/next_<scope>_<prev-date>.md) | `/wbNext` |
319
+
320
+ ### Global Files (`core2/` monorepo root)
321
+
322
+ | Category | File (day N) | File (day N-1) | Source Command |
323
+ |---|---|---|---|
324
+ | Reports | [audit_core2_<date>.md](../../../../../../../../../../.wb/workflows/reports/<YYYY>/<MM>/<DD>/audits/audit_core2_<date>.md) | [audit_core2_<prev-date>.md](../../../../../../../../../../.wb/workflows/reports/<YYYY>/<MM>/<prev-DD>/audits/audit_core2_<prev-date>.md) | `/wbAudit core2/` |
325
+ | Reports | [plan_core2_<date>.md](../../../../../../../../../../.wb/workflows/reports/<YYYY>/<MM>/<DD>/plans/plan_core2_<date>.md) | [plan_core2_<prev-date>.md](../../../../../../../../../../.wb/workflows/reports/<YYYY>/<MM>/<prev-DD>/plans/plan_core2_<prev-date>.md) | `/wbPlan core2/` |
326
+ | Tracks | [track_core2_<date>.md](../../../../../../../../../../.wb/workflows/tracks/<YYYY>/<MM>/<DD>/track_core2_<date>.md) | [track_core2_<prev-date>.md](../../../../../../../../../../.wb/workflows/tracks/<YYYY>/<MM>/<prev-DD>/track_core2_<prev-date>.md) | `/wbTrack core2/` |
327
+
328
+ <details>
329
+ <summary>📂 Sub-Package: [Active Package Name]</summary>
330
+
331
+ | Category | File (day N) | File (day N-1) | Source Command |
332
+ |---|---|---|---|
333
+ | Reports | [audit_subpkg_<date>.md](../../../../../../../../../../apps/wb-core/subpkg/.wb/workflows/reports/<YYYY>/<MM>/<DD>/audits/audit_subpkg_<date>.md) | [audit_subpkg_<prev-date>.md](../../../../../../../../../../apps/wb-core/subpkg/.wb/workflows/reports/<YYYY>/<MM>/<prev-DD>/audits/audit_subpkg_<prev-date>.md) | `/wbAudit` |
334
+
335
+ </details>
336
+ ```
337
+ ```