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.
- package/CHANGELOG.md +12 -0
- package/LICENSE +21 -0
- package/README.md +128 -0
- package/assets/demo.gif +0 -0
- package/bin/install.js +175 -0
- package/bin/link.js +71 -0
- package/bin/verify-wrappers.js +49 -0
- package/package.json +56 -0
- package/templates/commands/_shared/output_conventions.md +433 -0
- package/templates/commands/_shared/wb_universal_agent_instructions.md +72 -0
- package/templates/commands/model_recommendation_updates.md +74 -0
- package/templates/commands/model_recommendations.md +112 -0
- package/templates/commands/wbActOn/wbActOn_template.md +546 -0
- package/templates/commands/wbAudit/wbAudit_template.md +315 -0
- package/templates/commands/wbBroadcast/wbBroadcast_template.md +133 -0
- package/templates/commands/wbCheck/wbCheck_template.md +322 -0
- package/templates/commands/wbClean/wbClean_template.md +118 -0
- package/templates/commands/wbContext/wbContext_template.md +213 -0
- package/templates/commands/wbDebug/wbDebug_template.md +132 -0
- package/templates/commands/wbDeploy/wbDeploy_template.md +224 -0
- package/templates/commands/wbDoc/wbDoc_template.md +138 -0
- package/templates/commands/wbExplain/wbExplain_template.md +98 -0
- package/templates/commands/wbGit/wbGit_template.md +160 -0
- package/templates/commands/wbHelp/wbHelp_template.md +101 -0
- package/templates/commands/wbIdea/wbIdea_template.md +337 -0
- package/templates/commands/wbLicense/wbLicense_template.md +148 -0
- package/templates/commands/wbMonetize/wbMonetize_template.md +113 -0
- package/templates/commands/wbNext/wbNext_template.md +270 -0
- package/templates/commands/wbPlan/wbPlan_template.md +413 -0
- package/templates/commands/wbPublish/wbPublish_template.md +205 -0
- package/templates/commands/wbRefactor/wbRefactor_template.md +129 -0
- package/templates/commands/wbRelease/wbRelease_template.md +229 -0
- package/templates/commands/wbReview/wbReview_template.md +252 -0
- package/templates/commands/wbSecure/wbSecure_template.md +157 -0
- package/templates/commands/wbSetup/wbSetup_template.md +203 -0
- package/templates/commands/wbStandup/wbStandup_template.md +198 -0
- package/templates/commands/wbTest/wbTest_template.md +226 -0
- package/templates/commands/wbToWBC/wbToWBC_template.md +91 -0
- package/templates/commands/wbTrack/wbTrack_template.md +555 -0
- package/templates/commands/wbTranslate/wbTranslate_template.md +114 -0
- package/templates/commands/wbValid/wbValid_template.md +142 -0
- package/templates/commands/wbVision/wbVision_template.md +141 -0
- package/templates/commands/wbWork/wbWork_template.md +140 -0
- package/templates/commands/wb_commands_reference.claude.json +2305 -0
- package/templates/commands/wb_commands_reference.json +1109 -0
- package/templates/shortcuts/shortcuts.md +413 -0
- package/templates/shortcuts/usage-management-examples-shortcuts/budget_controllers_examples.md +96 -0
- package/templates/shortcuts/usage-management-examples-shortcuts/ultimate_shortcuts_examples.md +1531 -0
|
@@ -0,0 +1,413 @@
|
|
|
1
|
+
# wbPlan Template v5.2 — Unified Backlog (Cost-Aware)
|
|
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 — `/wbPlan`
|
|
16
|
+
|
|
17
|
+
## When to reach for /wbPlan
|
|
18
|
+
|
|
19
|
+
| Situation | Use /wbPlan? |
|
|
20
|
+
|---|---|
|
|
21
|
+
| "Fix the padding on this button" | No — one sentence |
|
|
22
|
+
| "Add a CSV export button" | Maybe — borderline, 3-4 tasks |
|
|
23
|
+
| "Migrate wb-core to structural array handling" | Yes — multi-step, architectural |
|
|
24
|
+
| "Debug this crash in WBDataViewer" | Yes, but plan starts with `reproduce` task |
|
|
25
|
+
| "Clean up this package" | No — that's `/wbClean` |
|
|
26
|
+
| "Refactor this file" | Maybe — if > 1 file affected |
|
|
27
|
+
|
|
28
|
+
Rule of thumb: if the work will span multiple sessions, you want a plan. If it fits in one session, just describe the work.
|
|
29
|
+
|
|
30
|
+
## The three forms
|
|
31
|
+
|
|
32
|
+
```
|
|
33
|
+
/wbPlan <pkg> # AI infers the task from context
|
|
34
|
+
/wbPlan <pkg> --task="<description>" # explicit task framing (recommended)
|
|
35
|
+
/wbPlan <pkg> --resume # read existing open plan, continue
|
|
36
|
+
/wbPlan <pkg> --id=1 --open # Set task 1 Done AND Valid columns to ⬜
|
|
37
|
+
/wbPlan <pkg> --id=1,2 --def # Set tasks 1,2 Done AND Valid columns to ⏸️ Deferred
|
|
38
|
+
/wbPlan <pkg> --worker=Gemini --can # Set all tasks assigned to Gemini to 🚫 Cancelled
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Reading a plan file
|
|
42
|
+
|
|
43
|
+
Every plan has a table. Three columns matter most:
|
|
44
|
+
|
|
45
|
+
- **Details** — must be specific enough that another session could execute without asking questions.
|
|
46
|
+
- **Validator** — who verifies the task is done. If empty, the plan is weak.
|
|
47
|
+
- **Done / Valid** — checkboxes. The state machine.
|
|
48
|
+
|
|
49
|
+
Skim these before executing. If the details are vague, the plan is bad; fix it before running anything.
|
|
50
|
+
|
|
51
|
+
## Resuming a plan
|
|
52
|
+
|
|
53
|
+
```
|
|
54
|
+
/wbPlan <pkg> --resume
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
The AI reads the existing plan file, sees which rows are ✅ / ⬜ / 🔨, and tells you which task is next. If a row is 🔨 (in progress) and stale (> 12h old), the AI will ask: "verify this task's actual state before proceeding." Don't skip that check — state rot happens.
|
|
58
|
+
|
|
59
|
+
## When /wbPlan refuses to write a plan
|
|
60
|
+
|
|
61
|
+
This is correct behavior, not a bug. `/wbPlan` refuses when:
|
|
62
|
+
|
|
63
|
+
- Your `dev.md` contains a rule like "confirm decision X before extending" and the task would require extending.
|
|
64
|
+
- The task contradicts an existing open decision in `context.md`.
|
|
65
|
+
- The task is too vague to decompose ("make it better", "improve performance").
|
|
66
|
+
|
|
67
|
+
When refused, answer the question the AI asks. Don't work around it.
|
|
68
|
+
|
|
69
|
+
## The one mistake to avoid
|
|
70
|
+
|
|
71
|
+
**Generating a plan and then ignoring the validator column.** Without independent validation, the plan degrades to a TODO list. The whole point of the worker/validator split is that a second pass catches what the first misses. Use a different model for validation when possible; use the same model with an adversarial prompt when not.
|
|
72
|
+
|
|
73
|
+
## When /wbPlan is the wrong command
|
|
74
|
+
|
|
75
|
+
- You want to *do* the work → describe the task, skip the plan.
|
|
76
|
+
- You want to *know* if the code is good → `/wbAudit`.
|
|
77
|
+
- You want to *find* why something's broken → `/wbDebug`.
|
|
78
|
+
- You want to *brainstorm* features → `/wbVision`.
|
|
79
|
+
|
|
80
|
+
`/wbPlan` answers one question: *"Given this goal, what are the steps?"* Not "is this goal worth it?" (that's `/wbVision`) and not "is this work done correctly?" (that's `/wbAudit`).
|
|
81
|
+
|
|
82
|
+
> For deeper reading: [`docs_claude/commands/wbPlan/wbPlan_practical_claude.md`](../../docs/docs_claude/commands/wbPlan/wbPlan_practical_claude.md) (or the `_eli5_`, `_expert_`, `_examples_` siblings).
|
|
83
|
+
|
|
84
|
+
<!-- FLAGS_TABLE_START -->
|
|
85
|
+
## Flags & shortcuts
|
|
86
|
+
|
|
87
|
+
Both forms are equivalent — pass either:
|
|
88
|
+
|
|
89
|
+
| Long form | Shortcut |
|
|
90
|
+
|---|---|
|
|
91
|
+
| `--resume` | `-r` |
|
|
92
|
+
| `--scope` | `-s` |
|
|
93
|
+
| `--task` | `-t` |
|
|
94
|
+
| `--id` | `-i` | Specifies task indices to target for state manipulation. |
|
|
95
|
+
| `--open` | `-o` | Sets BOTH `☐ Done` and `☐ Valid` states to `⬜` (Open). |
|
|
96
|
+
| `--def` | `-d` | Sets BOTH `☐ Done` and `☐ Valid` states to `⏸️ Deferred`. |
|
|
97
|
+
| `--can` | `-c` | Sets BOTH `☐ Done` and `☐ Valid` states to `🚫 Cancelled`. |
|
|
98
|
+
|
|
99
|
+
`-h` / `--help` / `--h` (any command) prints this help block instead of executing.
|
|
100
|
+
## Self-correct mode (dual-mode invocation)
|
|
101
|
+
|
|
102
|
+
```
|
|
103
|
+
/wbPlan <scope_folder> # normal mode — produce a fresh output file
|
|
104
|
+
/wbPlan <previous_output_file> # self-correct mode — verify & repair the file in place
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
When the first arg is an existing output file from a prior `/wbPlan` 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.
|
|
108
|
+
|
|
109
|
+
<!-- FLAGS_TABLE_END -->
|
|
110
|
+
<!-- HELP_GATE_END -->
|
|
111
|
+
|
|
112
|
+
<!-- FLAG_NORMALIZE_START -->
|
|
113
|
+
## Flag normalization (apply BEFORE parsing args)
|
|
114
|
+
|
|
115
|
+
Before processing `$ARGUMENTS`, normalize these short-form flags to their long equivalents:
|
|
116
|
+
|
|
117
|
+
- `-r` → `--resume`
|
|
118
|
+
- `-s` → `--scope`
|
|
119
|
+
- `-t` → `--task`
|
|
120
|
+
- `-i` → `--id`
|
|
121
|
+
- `-o` → `--open`
|
|
122
|
+
- `-d` → `--def`
|
|
123
|
+
- `-c` → `--can`
|
|
124
|
+
|
|
125
|
+
The rest of this template documents only the long forms; the substitution above is the only place short forms are mentioned.
|
|
126
|
+
<!-- FLAG_NORMALIZE_END -->
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
> **How to use**: Copy the prompt below, replace `__PLACEHOLDERS__`, paste to any AI agent.
|
|
131
|
+
> Everyone gets the SAME prompt. Each agent finds their alias and does only their tasks.
|
|
132
|
+
> **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 (`emits: mixed` is normal for plans), add a plain-text `Requires` column to the Suggested Tasks table — each task row carries a 🧠/✅/🔨/📋 tag right after its ID — and include a `## 🔗 Action Types` legend before the Generated Files footer.
|
|
133
|
+
|
|
134
|
+
---
|
|
135
|
+
|
|
136
|
+
## Filename & Folder Convention (v3)
|
|
137
|
+
|
|
138
|
+
**Path:** `<target_folder>/.wb/workflows/reports/<YYYY>/<MM>/<DD>/plans/plan_<target>_<YYYYMMDD>.md`
|
|
139
|
+
|
|
140
|
+
**STRICT NAMING RULE:** The plan filename MUST be exactly `plan_<folder_scope>_<YYYYMMDD>.md`. Do NOT append issue names, source types, or any other suffixes (e.g., `plan_ai_reference_links_20260506.md` is WRONG — the correct name is `plan_ai_reference_20260506.md`).
|
|
141
|
+
|
|
142
|
+
**ONE FILE PER DAY rule:** There must be exactly ONE plan file per day per folder scope. All tasks — regardless of origin (audit, manual, vision, etc.) — go into the same file as separate Entry #N sections or rows in the same task table.
|
|
143
|
+
|
|
144
|
+
**MERGE-OR-CREATE protocol:**
|
|
145
|
+
1. If `plan_<folder>_<YYYYMMDD>.md` already exists → APPEND your tasks as a new Entry #N section (tagged `*(ModelName — HH:MM)*`).
|
|
146
|
+
2. If it does not exist → CREATE it.
|
|
147
|
+
3. If multiple `plan_*<YYYYMMDD>*.md` files exist for the same day (e.g., from a prior bug that created suffixed files) → MERGE them into one `plan_<folder>_<YYYYMMDD>.md`, combining all task tables.
|
|
148
|
+
|
|
149
|
+
---
|
|
150
|
+
|
|
151
|
+
## Detection (Self-Correct Mode)
|
|
152
|
+
|
|
153
|
+
Trigger self-correct when the input file's first H1 matches:
|
|
154
|
+
`# Plan Backlog: <scope> — <YYYY-MM-DD>`
|
|
155
|
+
|
|
156
|
+
Behavior is defined in [`../_shared/output_conventions.md`](../_shared/output_conventions.md) §3.
|
|
157
|
+
Plan-specific gap-fills:
|
|
158
|
+
- Blank `☐ Done` for a task whose `tasks/task_<N>/task_<N>_report_*.md` exists → check it (`✅<br><worker>`).
|
|
159
|
+
- Blank `☐ Valid` for a task whose worker report has a validator score appended → fill `✅ <Score>/10<br><validator>`.
|
|
160
|
+
- Bare `Origin: /wbAudit` → expand to `/wbAudit <target>` per output_conventions.md §2.
|
|
161
|
+
- Plain-text mentions (`tasks/`, audit filenames, target folders) → convert to relative markdown links per §1.
|
|
162
|
+
- Missing `Worker (Suggested)` / `Validator (Suggested)` cells → fill from [`../model_recommendations.md`](../model_recommendations.md).
|
|
163
|
+
- **Column completeness — verify ALL required columns are present** (see Column Rules above): `#`, `Requires`, `Dep`, `🔗`, `Task`, `Verify`, `P`, `Est. Time (mins)`, `Worker (Suggested)`, `Validator (Suggested)`, `☐ Done`, `☐ Valid`. If any column is missing — most commonly **`Requires`** in plans written before v5.2 — insert it in the canonical position and back-fill every row by inferring the tag (🧠 Planner / ✅ Validator / 🔨 Worker / 📋 Mechanical) from the task's wording (e.g. `/wbPlan …` body → 🧠 Planner; refactor / fix / convert → 🔨 Worker; audit / verify / score → ✅ Validator; "run command and capture …" → 📋 Mechanical).
|
|
164
|
+
- **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).
|
|
165
|
+
- **Link beautification (per `_shared/output_conventions.md` §1.1):** walk EVERY markdown link in the file — front-matter, `> **Source:**` / `> **Target:**` / `> **Mode:**` callouts, prose, table cells, footer rows, "What's Next?" bullets, the lot. Apply the **four-rule detection**:
|
|
166
|
+
1. `[label](href)` where **label == href** → rewrite. (e.g. `[../../05/09/plans/plan_X.md](../../05/09/plans/plan_X.md)`).
|
|
167
|
+
2. Label **contains a `/`** other than a single trailing slash → rewrite. (e.g. `[../audits/audit_X.md](...)`, `[plans/plan_X.md](...)`).
|
|
168
|
+
3. Label contains `..`, `…`, or starts with `./` → rewrite.
|
|
169
|
+
4. Label is absolute (starts with `/` or a drive letter) → rewrite.
|
|
170
|
+
|
|
171
|
+
**The rewrite:** keep the href intact, replace the label with the **basename of the href** (last `/`-separated segment for files; second-to-last + `/` for folders). Examples:
|
|
172
|
+
- `[../../05/09/plans/plan_wb-flow_20260509.md](../../05/09/plans/plan_wb-flow_20260509.md)` → `[plan_wb-flow_20260509.md](../../05/09/plans/plan_wb-flow_20260509.md)`
|
|
173
|
+
- `[…/…/05/09/plans/plan_wb-flow_20260509.md](../../../../05/09/plans/plan_wb-flow_20260509.md)` → `[plan_wb-flow_20260509.md](../../../../05/09/plans/plan_wb-flow_20260509.md)`
|
|
174
|
+
- `[apps/wb-core/md.wbc-ui.com/](../../../../../)` → `[md.wbc-ui.com/](../../../../../)`
|
|
175
|
+
|
|
176
|
+
This is non-optional and must be done on every self-correct pass — even if the file otherwise looks clean. Plans written before v5.2 frequently have label==href links in the `Source:` callout; those are the most common offenders.
|
|
177
|
+
- **Path correctness (per `_shared/output_conventions.md` §1.2):** every cross-day or cross-category link in a plan file maps to a fixed pattern (the report tree has a fixed depth). For each such link, look up the **canonical href** in §1.2's table and verify the file's href matches. The most-frequent break is **prev-day plan/audit links across a month boundary**: `../../<DD>/plans/...` is wrong when the previous day was in a different month — the correct form is `../../../<MM-prev>/<DD>/plans/...`. Other recurring shapes:
|
|
178
|
+
- Same-day audit from this plan: `../audits/audit_<scope>_<YYYYMMDD>.md`.
|
|
179
|
+
- Yesterday's plan (same month): `../../<DD-prev>/plans/plan_<scope>_<YYYYMMDD-prev>.md`.
|
|
180
|
+
- Yesterday's plan (across month): `../../../<MM-prev>/<DD-prev>/plans/plan_<scope>_<YYYYMMDD-prev>.md`.
|
|
181
|
+
- Scope root (`package.json`, `context.md`, `dev.md`): `../../../../../<file>`.
|
|
182
|
+
|
|
183
|
+
**Do not count `../` segments by hand.** If the link's target is a report file or a scope-root file, derive the href from the §1.2 table. If the existing href doesn't match the canonical form, rewrite it.
|
|
184
|
+
|
|
185
|
+
---
|
|
186
|
+
|
|
187
|
+
## 🚀 The Planning Prompt (copy from here ↓)
|
|
188
|
+
|
|
189
|
+
```
|
|
190
|
+
━━━━━━━━━━━━━ /wbPlan v5.2 ━━━━━━━━━━━━━
|
|
191
|
+
|
|
192
|
+
📁 PROJECT: __PROJECT_NAME__
|
|
193
|
+
📅 DATE: __TODAY__
|
|
194
|
+
🤖 MODEL: __YOUR_MODEL_NAME__
|
|
195
|
+
🖥️ CLIENT: __YOUR_CLIENT__
|
|
196
|
+
📂 PLAN FILE: __TARGET_FOLDER__/.wb/workflows/reports/__YYYY__/__MM__/__DD__/plans/plan___TARGET_NAME_____YYYYMMDD__.md
|
|
197
|
+
|
|
198
|
+
━━━ CONTEXT ━━━
|
|
199
|
+
|
|
200
|
+
Read the `.wb/workflows/context.md` file in the target folder(s) FIRST.
|
|
201
|
+
Check `../model_recommendations.md` for role assignments.
|
|
202
|
+
Read `../_shared/output_conventions.md` — your output MUST follow it.
|
|
203
|
+
|
|
204
|
+
━━━ INPUT MODE DETECTION ━━━
|
|
205
|
+
|
|
206
|
+
If the input is a file matching the plan-output schema (first H1 = "# Plan Backlog: <scope> — <date>"):
|
|
207
|
+
- If target IDs and state flags (`--open`, `--def`, `--can`) are provided:
|
|
208
|
+
→ **STATE OVERRIDE MODE**: Directly edit the plan file. For the matching tasks, set BOTH `☐ Done` and `☐ Valid` columns to the requested state (`⬜` for `--open`, `⏸️ Deferred` for `--def`, `🚫 Cancelled` for `--can`). Do NOT generate a new plan. Evaluate multiple flags left-to-right (the last one wins).
|
|
209
|
+
- Else:
|
|
210
|
+
→ **SELF-CORRECT MODE** (see _shared/output_conventions.md §3).
|
|
211
|
+
Else:
|
|
212
|
+
→ **FRESH-PLAN MODE** (proceed with the prompt below).
|
|
213
|
+
|
|
214
|
+
━━━ THE PROBLEM ━━━
|
|
215
|
+
|
|
216
|
+
"""
|
|
217
|
+
__YOUR_MESSY_DESCRIPTION_HERE__
|
|
218
|
+
"""
|
|
219
|
+
|
|
220
|
+
━━━ TASK LIST (v5.2 — Multi-Model, Recursive, Cost-Aware, Action-Tagged) ━━━
|
|
221
|
+
|
|
222
|
+
| # | Requires | Dep | 🔗 | Task | Verify | P | Est. Time (mins) | Worker (Suggested) | Validator (Suggested) | ☐ Done | ☐ Valid |
|
|
223
|
+
|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
224
|
+
| [1](tasks/task_1/task_1_report_...) | 🔨 Worker | — | <span title="Run: /wbExplain --id=1 --as=expert">📄</span> | Fix prop types | `/wbTest packages/wb-press2 --scope=task-1` | P1 | 15 | Sonnet 4.7 · ~$0.03 / DS V4 Pro · ~$0.02 / Model1 | Opus 4.7 / Gemini 3.1 Pro / Validator1 | ✅<br>Model1 | ⬜ |
|
|
225
|
+
| 2 | 🧠 Planner | 1 | <span title="Run: /wbExplain --id=2 --as=expert">📄</span> | `/wbPlan packages/wb-core "extract WBC.js helpers"` | `/wbAudit packages/wb-core` | P1 | 30 | 🔄 Recursive · ~20kt | — | ⬜ | ⬜ |
|
|
226
|
+
|
|
227
|
+
**Column Rules:**
|
|
228
|
+
1. **# (Task Index)**: When a task is completed (Done = ✅), this index MUST become a markdown link to the worker's task report in its nested folder (e.g. `[1](tasks/task_1/task_1_report_<scope>_<YYYYMMDD>.md)`). A checked "Done" checkbox means the worker has written their action report.
|
|
229
|
+
2. **Requires (Action Type)**: Plain-text tag indicating which canonical role would carry the task out — one of `🧠 Planner` / `✅ Validator` / `🔨 Worker` / `📋 Mechanical`. Per `_shared/output_conventions.md` §9.3 this column is mandatory for every plan; the file MUST also include a `## 🔗 Action Types` legend section just before the Generated Files footer. Tag selection rule: pick the role *the task itself requires* — not the worker's flexibility. A task whose body is `/wbPlan <target> "..."` (recursive sub-plan) is `🧠 Planner`; a code edit / refactor is `🔨 Worker`; a verification / scoring task is `✅ Validator`; a "run command and capture output" task is `📋 Mechanical`. Hybrid tasks ("investigate, then fix") MUST be split into two rows.
|
|
230
|
+
3. **🔗 (Details / Blueprint)**: This column holds the Contextual Lazy Loading trigger for task explanations. By default, it is an inactive placeholder: `<span title="Run: /wbExplain --id=<N> --as=expert">📄</span>`. If an explanation file has been generated (`tasks/task_<N>/task_<N>_details_<scope>_<YYYYMMDD>.md`), upgrade it to an active link: `[📄](tasks/task_<N>/task_<N>_details_<scope>_<YYYYMMDD>.md "View Details")`.
|
|
231
|
+
4. **Task**: Describe the task clearly. Do NOT include the explanation span here. For recursive sub-plans, the Task cell holds the full `/wbPlan <target> "goal"` invocation.
|
|
232
|
+
5. **Verify**: MUST contain a full invocable command per _shared/output_conventions.md §2. Bare commands like `/wbAudit` are forbidden.
|
|
233
|
+
6. **Worker (Suggested)**: List of 3-4 recommended models + a generic alias `Model<N>`. Each model MUST include a per-task cost annotation: `ModelName · ~$X.XX`. See Rule #11 for how to compute the cost.
|
|
234
|
+
7. **Validator (Suggested)**: List of 2-3 recommended "Big Thinker" models + a generic alias `Validator<N>`.
|
|
235
|
+
8. **☐ Done**: When completed, mark as `✅<br>ModelName`. This adds the name of the worker below the checkbox. **OVERWRITE rule:** The Done column is NOT cumulative. If it was already completed by another model, overwrite it completely with your name. Only one worker can be the ultimate executor.
|
|
236
|
+
9. **☐ Valid**: When validated, mark as `✅ <Score>/10<br>ValidatorName`. A task can have MULTIPLE validators. If it is already validated by someone else, append your score: `<br><br>✅ <Score>/10<br>YourName`. **Skip validation** if your name is already listed (the task hasn't changed).
|
|
237
|
+
10. **Recursive Tasks**: If a task is complex, use `/wbPlan <target> "goal"` as the Task. The output will be appended to this file as a sub-plan.
|
|
238
|
+
11. **Cost Annotation (Worker column)**: Each suggested worker MUST show an estimated execution cost. To compute:
|
|
239
|
+
1. Estimate the task's token consumption (combined input+output, in thousands = `kt`) using the heuristic:
|
|
240
|
+
|
|
241
|
+
| Complexity | Time (min) | Tokens (kt) | Examples |
|
|
242
|
+
|---|---|---|---|
|
|
243
|
+
| Trivial | 5–10 | 2–5 | Config tweak, 1-line fix, rename |
|
|
244
|
+
| Small | 10–20 | 5–15 | Single-file edit, add export, update docs |
|
|
245
|
+
| Medium | 20–45 | 15–40 | Multi-file feature, bug fix with tests |
|
|
246
|
+
| Large | 45–90 | 40–80 | Architectural change, cross-package refactor |
|
|
247
|
+
| Recursive | 90+ | 80–200+ | Sub-plan with its own task decomposition |
|
|
248
|
+
|
|
249
|
+
2. Multiply `kt` by each model's blended rate (per 1kt, approximate 2026): fast models (Sonnet, Flash, DS) ~$0.004/kt · big thinkers (Opus, Gemini Pro) ~$0.015/kt.
|
|
250
|
+
3. Format: `ModelName · ~$<cost>`. Example for a Medium task (~20kt): `Sonnet 4.7 · ~$0.08 / Opus 4.7 · ~$0.30 / Model1`.
|
|
251
|
+
|
|
252
|
+
━━━ SOURCE LINKING ━━━
|
|
253
|
+
|
|
254
|
+
When this plan was created from another command's output (e.g. an audit), the header MUST include a relative markdown link to that source file. Example:
|
|
255
|
+
|
|
256
|
+
> ## 🔍 Audit Findings — /wbAudit *(Gemini 3.1 Pro — 06:37)*
|
|
257
|
+
> - **Source:** [audit_md.wbc-ui.com_20260501.md](../audits/audit_md.wbc-ui.com_20260501.md) Entry #1
|
|
258
|
+
> - **Origin Command:** `/wbAudit md.wbc-ui.com/`
|
|
259
|
+
> - **Findings sent:** 4 (4 atomic, 0 recursive)
|
|
260
|
+
|
|
261
|
+
Compute the relative path FROM the plan file's directory. See _shared/output_conventions.md §1.
|
|
262
|
+
|
|
263
|
+
━━━ TARGET LINKING ━━━
|
|
264
|
+
|
|
265
|
+
The `> **Target:**` header line MUST be a relative markdown link to the target folder. Example:
|
|
266
|
+
|
|
267
|
+
> # Plan Backlog: md.wbc-ui.com — 2026-05-01
|
|
268
|
+
> > **Target:** [apps/wb-core/md.wbc-ui.com/](../../../../)
|
|
269
|
+
|
|
270
|
+
━━━ NOTE BLOCKS ━━━
|
|
271
|
+
|
|
272
|
+
Plain-text references in callouts MUST be relative links. Example:
|
|
273
|
+
|
|
274
|
+
> [!NOTE]
|
|
275
|
+
> All task reports must be externalized to [tasks/](tasks/).
|
|
276
|
+
|
|
277
|
+
━━━ DEPENDENCY RULES (DAG) ━━━
|
|
278
|
+
|
|
279
|
+
1. **Explicit Blocking**: A task is ONLY blocked by the specific IDs listed in its **Dep** column.
|
|
280
|
+
2. **Multiple Dependencies**: If a task lists `2, 5`, it MUST wait until BOTH 2 and 5 are `✅ Done`.
|
|
281
|
+
3. **Siblings**: Tasks sharing a parent are parallel unless explicitly linked.
|
|
282
|
+
|
|
283
|
+
━━━ RECURSIVE SUB-PLANS ━━━
|
|
284
|
+
|
|
285
|
+
If a task is a `/wbPlan` command (e.g. Task #2):
|
|
286
|
+
1. Execute the command.
|
|
287
|
+
2. APPEND the output to THIS file as a new section: `## 🔄 Sub-plan for Task #N`.
|
|
288
|
+
3. Use hierarchical task numbers: `N.1`, `N.2`, `N.3`.
|
|
289
|
+
4. The parent task's `☐ Done` column MUST REMAIN unchecked, but add the expansion hint: `⬜ Expanded → N.1, N.2, ...`.
|
|
290
|
+
5. A recursive parent task is ONLY marked as `✅ Done` when ALL of its sub-tasks (N.1, N.2, etc.) are completed.
|
|
291
|
+
6. Executing (or validating) a parent task ID with a specific model is equivalent to executing (or validating) all of its children in one command by the same model.
|
|
292
|
+
|
|
293
|
+
━━━ BUDGET SUMMARY (append after task table) ━━━
|
|
294
|
+
|
|
295
|
+
After the task table, append a budget summary block:
|
|
296
|
+
|
|
297
|
+
> ### 💰 Plan Budget Estimate
|
|
298
|
+
> | Metric | Value |
|
|
299
|
+
> |---|---|
|
|
300
|
+
> | **Total tasks** | N |
|
|
301
|
+
> | **Total estimated time** | X min (~Y h) |
|
|
302
|
+
> | **Total estimated tokens** | Zk tokens |
|
|
303
|
+
> | **Est. cost (fast model worker)** | ~$A |
|
|
304
|
+
> | **Est. cost (big thinker worker)** | ~$B |
|
|
305
|
+
>
|
|
306
|
+
> *Token estimates are approximate. Actual usage varies with context window size, code complexity, and iteration count. Validation passes add ~30% to the worker token count.*
|
|
307
|
+
|
|
308
|
+
Compute `A` and `B` by summing each task's `kt` × the model-tier rate from the heuristic table in Column Rule #10.
|
|
309
|
+
|
|
310
|
+
━━━ ASSIGNMENT MATRIX ━━━
|
|
311
|
+
|
|
312
|
+
Identify yourself and claim an alias:
|
|
313
|
+
- "I am Model<N>" (e.g. Model1, Model2...)
|
|
314
|
+
- "I am Validator<N>" (e.g. Validator1, Validator2...)
|
|
315
|
+
|
|
316
|
+
━━━ REPORTING RULES ━━━
|
|
317
|
+
|
|
318
|
+
1. DO NOT append your work/validation report to THIS plan file.
|
|
319
|
+
2. **Workers**: Save your execution report as a NEW file at: `tasks/task_<N>/task_<N>_report_<scope>_<YYYYMMDD>.md`. Create the `task_<N>/` folder if it does not exist.
|
|
320
|
+
3. **Validators**: DO NOT create a new validation file. You must APPEND your validation findings and score to the bottom of the EXISTING task report file created by the worker.
|
|
321
|
+
4. Update the Plan Table to check off the Done/Valid boxes.
|
|
322
|
+
|
|
323
|
+
━━━ TASK RE-EXECUTION (RESET) ━━━
|
|
324
|
+
|
|
325
|
+
If you are instructed to execute a task that was ALREADY marked as Done or Validated, this means the task is being RE-RUN. You must reset its state to `0` in the plan table:
|
|
326
|
+
1. Revert the `#` index column back to a plain number (remove the markdown link to the old report).
|
|
327
|
+
2. Reset `☐ Done` to `⬜`.
|
|
328
|
+
3. Reset `☐ Valid` to `⬜` (clearing all previous validators).
|
|
329
|
+
4. The old `report_<i>` file is considered removed. Create a fresh report file when you finish your new execution.
|
|
330
|
+
|
|
331
|
+
━━━ IDEAS → PLAN PROMOTION INGESTION ━━━
|
|
332
|
+
|
|
333
|
+
On EVERY `/wbPlan` execution (both Fresh-Plan and Self-Correct modes), you MUST perform the following ingestion protocol:
|
|
334
|
+
|
|
335
|
+
1. **Scan for idea files:** Look for `ideas/idea_<scope>_*.md` files in the same scope's `.wb/workflows/reports/` tree (current day and any recent days within 7d).
|
|
336
|
+
2. **For each idea row where `☐ Valid` contains `🎯 Promoted`:**
|
|
337
|
+
a. Check the `→ Task` column in the idea file.
|
|
338
|
+
b. If `→ Task` is `—` (not yet ingested into a plan):
|
|
339
|
+
- Append the idea as a new task row in the plan table:
|
|
340
|
+
- `#` = next available index
|
|
341
|
+
- `Origin` = `💡 [/wbIdea #<N>](../ideas/idea_<scope>_<YYYYMMDD>.md)` (relative link to the idea file)
|
|
342
|
+
- `Task` = copy from the `Idea` column
|
|
343
|
+
- `P` = copy from the idea's `P` column
|
|
344
|
+
- `Est. Time` = copy from the idea's `Est. Time` column
|
|
345
|
+
- `Worker (Suggested)` / `Validator (Suggested)` = fill from `model_recommendations.md`
|
|
346
|
+
- `☐ Done` = `⬜`
|
|
347
|
+
- `☐ Valid` = `⬜`
|
|
348
|
+
- Update the idea file: set `→ Task` = `[→ Plan #M](../plans/plan_<scope>_<YYYYMMDD>.md)`
|
|
349
|
+
- Update the idea file: ensure `☐ Valid` shows `🎯 Promoted`
|
|
350
|
+
c. If `→ Task` already has a link → skip (already ingested).
|
|
351
|
+
3. **Structural conformity check:** Also verify broken links in the plan file (task report links, explanation links, source links) and fix them.
|
|
352
|
+
|
|
353
|
+
━━━ "WHAT NEXT" (Self-Correct & Fresh) ━━━
|
|
354
|
+
|
|
355
|
+
In **Fresh-Plan Mode**, end the plan file with a link to `/wbNext`:
|
|
356
|
+
|
|
357
|
+
> ## 🧭 What's Next?
|
|
358
|
+
> Run [`/wbNext <target_folder>`](../../../../../docs/ai_reference/commands/wbNext/wbNext_template.md)
|
|
359
|
+
> to get current, ranked suggestions for what to do after this plan.
|
|
360
|
+
|
|
361
|
+
In **Self-Correct Mode**, if you are re-checking an existing plan:
|
|
362
|
+
1. **Analyze current progress**: Check which tasks are `✅ Done` and `✅ Valid`.
|
|
363
|
+
2. **Suggest immediate next actions**: If the plan is partially executed, list the next 2-3 specific tasks to run.
|
|
364
|
+
3. **Add a "Suggested Tasks Table"** if you find new issues during the re-check (e.g. a task failed validation and needs a fix-up task).
|
|
365
|
+
4. **Append/Update** the `## 🧭 What's Next?` section with these dynamic findings.
|
|
366
|
+
|
|
367
|
+
━━━ AUTO-APPEND FOOTER ━━━
|
|
368
|
+
|
|
369
|
+
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.
|
|
370
|
+
|
|
371
|
+
Format required:
|
|
372
|
+
```markdown
|
|
373
|
+
---
|
|
374
|
+
## 📂 Generated Files (__YYYYMMDD__)
|
|
375
|
+
> Auto-appended per `_shared/output_conventions.md` §5. Same-level snapshot of top-level command outputs at write time.
|
|
376
|
+
|
|
377
|
+
### 📚 Base Reference Files
|
|
378
|
+
| Type | File | Description |
|
|
379
|
+
|---|---|---|
|
|
380
|
+
| Foundational | [context.md](../../../../../context.md) | Permanent Identity and Architecture (Source of Truth) |
|
|
381
|
+
| Snapshot | [context_<scope>_<date>.md](../contexts/context_<scope>_<date>.md) | Daily snapshot used for current session context |
|
|
382
|
+
| Foundational | [dev.md](../../../../../dev.md) | Permanent Development Commands and Status |
|
|
383
|
+
|
|
384
|
+
### Local Files
|
|
385
|
+
|
|
386
|
+
| Category | File (day N) | File (day N-1) | Source Command |
|
|
387
|
+
|---|---|---|---|
|
|
388
|
+
| Identity | [context.md](../../../../../context.md) | — | Foundational Identity & Architecture |
|
|
389
|
+
| Identity | [dev.md](../../../../../dev.md) | — | Foundational Dev Commands & Status |
|
|
390
|
+
| Reports | [audit_<scope>_<date>.md](../audits/audit_<scope>_<date>.md) | [audit_<scope>_<prev-date>.md](../../<prev-DD>/audits/audit_<scope>_<prev-date>.md) | `/wbAudit` |
|
|
391
|
+
| Reports | [context_<scope>_<date>.md](../contexts/context_<scope>_<date>.md) | [context_<scope>_<prev-date>.md](../../<prev-DD>/contexts/context_<scope>_<prev-date>.md) | `/wbContext` (Snapshot) |
|
|
392
|
+
| Reports | **plan_<scope>_<date>.md** *(this file)* | [plan_<scope>_<prev-date>.md](../../<prev-DD>/plans/plan_<scope>_<prev-date>.md) | `/wbPlan` |
|
|
393
|
+
| Reports | [next_<scope>_<date>.md](../nexts/next_<scope>_<date>.md) | [next_<scope>_<prev-date>.md](../../<prev-DD>/nexts/next_<scope>_<prev-date>.md) | `/wbNext` |
|
|
394
|
+
| Tracks | [track_<scope>_<date>.md](../../../../../tracks/<YYYY>/<MM>/<DD>/track_<scope>_<date>.md) | [track_<scope>_<prev-date>.md](../../../../../tracks/<YYYY>/<MM>/<prev-DD>/track_<scope>_<prev-date>.md) | `/wbTrack` |
|
|
395
|
+
|
|
396
|
+
### Global Files (`core2/` monorepo root)
|
|
397
|
+
|
|
398
|
+
| Category | File (day N) | File (day N-1) | Source Command |
|
|
399
|
+
|---|---|---|---|
|
|
400
|
+
| 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/` |
|
|
401
|
+
| 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/` |
|
|
402
|
+
| 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/` |
|
|
403
|
+
|
|
404
|
+
<details>
|
|
405
|
+
<summary>📂 Sub-Package: [Active Package Name]</summary>
|
|
406
|
+
|
|
407
|
+
| Category | File (day N) | File (day N-1) | Source Command |
|
|
408
|
+
|---|---|---|---|
|
|
409
|
+
| 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` |
|
|
410
|
+
|
|
411
|
+
</details>
|
|
412
|
+
```
|
|
413
|
+
```
|
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
# wbPublish Template v2.1
|
|
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 — `/wbPublish`
|
|
16
|
+
|
|
17
|
+
## Two forms
|
|
18
|
+
|
|
19
|
+
```
|
|
20
|
+
/wbPublish <pkg> # build + publish to npm
|
|
21
|
+
/wbPublish <pkg> --dry-run # show what would publish, don't push
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## When to run
|
|
25
|
+
|
|
26
|
+
Only after `/wbRelease core2/` has run in the same cycle. If `/wbRelease` wasn't run, `/wbPublish` refuses.
|
|
27
|
+
|
|
28
|
+
## The pre-check the AI does automatically
|
|
29
|
+
|
|
30
|
+
1. Recent `/wbRelease` report exists.
|
|
31
|
+
2. `package.json` version matches release report version.
|
|
32
|
+
3. `workspace:*` protocols already unpicked.
|
|
33
|
+
4. `dist/` vs `dist-dev/` aligned (wbc-ui2 footgun).
|
|
34
|
+
5. Version not already on npm registry.
|
|
35
|
+
|
|
36
|
+
If any fail, you get a refusal with a specific fix.
|
|
37
|
+
|
|
38
|
+
## After publish
|
|
39
|
+
|
|
40
|
+
**Always** run `/wbRelease core2/ --restore`. Skipping leaves your dev tree with pinned versions instead of `workspace:*`, which breaks local package linking. Your next `pnpm install` will fetch from npm instead of using the monorepo's live copies.
|
|
41
|
+
|
|
42
|
+
## When publish fails
|
|
43
|
+
|
|
44
|
+
Auth failures, rate limits, registry outages. The AI's recovery output gives specific options. Do *not* run a fresh `/wbRelease` — version is already bumped. Fix the underlying issue and retry the `/wbPublish`, or abandon with `/wbRelease --restore` (but the version bump stays in git).
|
|
45
|
+
|
|
46
|
+
## When /wbPublish is not the right command
|
|
47
|
+
|
|
48
|
+
- App → `/wbDeploy`.
|
|
49
|
+
- Re-publish same version → `npm publish` directly (but check registry first).
|
|
50
|
+
- Pre-release tag (`@beta`, `@canary`) → `/wbRelease --prerelease=<tag>` first, then `/wbPublish`.
|
|
51
|
+
- Quick test → don't publish. Use `pnpm link` or local tarball install.
|
|
52
|
+
|
|
53
|
+
> For deeper reading: [`docs_claude/commands/wbPublish/wbPublish_practical_claude.md`](../../docs/docs_claude/commands/wbPublish/wbPublish_practical_claude.md) (or the `_eli5_`, `_expert_`, `_examples_` siblings).
|
|
54
|
+
|
|
55
|
+
<!-- FLAGS_TABLE_START -->
|
|
56
|
+
## Flags & shortcuts
|
|
57
|
+
|
|
58
|
+
Both forms are equivalent — pass either:
|
|
59
|
+
|
|
60
|
+
| Long form | Shortcut |
|
|
61
|
+
|---|---|
|
|
62
|
+
| `--all` | `-A` |
|
|
63
|
+
| `--dry-run` | `-d` |
|
|
64
|
+
| `--prerelease` | `-p` |
|
|
65
|
+
| `--restore` | `-r` |
|
|
66
|
+
|
|
67
|
+
`-h` / `--help` / `--h` (any command) prints this help block instead of executing.
|
|
68
|
+
## Self-correct mode (dual-mode invocation)
|
|
69
|
+
|
|
70
|
+
```
|
|
71
|
+
/wbPublish <scope_folder> # normal mode — produce a fresh output file
|
|
72
|
+
/wbPublish <previous_output_file> # self-correct mode — verify & repair the file in place
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
When the first arg is an existing output file from a prior `/wbPublish` 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.
|
|
76
|
+
|
|
77
|
+
<!-- FLAGS_TABLE_END -->
|
|
78
|
+
<!-- HELP_GATE_END -->
|
|
79
|
+
|
|
80
|
+
<!-- FLAG_NORMALIZE_START -->
|
|
81
|
+
## Flag normalization (apply BEFORE parsing args)
|
|
82
|
+
|
|
83
|
+
Before processing `$ARGUMENTS`, normalize these short-form flags to their long equivalents:
|
|
84
|
+
|
|
85
|
+
- `-A` → `--all`
|
|
86
|
+
- `-d` → `--dry-run`
|
|
87
|
+
- `-p` → `--prerelease`
|
|
88
|
+
- `-r` → `--restore`
|
|
89
|
+
|
|
90
|
+
The rest of this template documents only the long forms; the substitution above is the only place short forms are mentioned.
|
|
91
|
+
<!-- FLAG_NORMALIZE_END -->
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
> **How to use**: This is the manual template for executing the final build and NPM deployment. It MUST be run after `/wbRelease`.
|
|
96
|
+
> **Read first:** [`../_shared/output_conventions.md`](../_shared/output_conventions.md) — applies to every cell of the output (relative links, full-syntax commands, self-correct mode).
|
|
97
|
+
|
|
98
|
+
---
|
|
99
|
+
|
|
100
|
+
## Detection (Self-Correct Mode)
|
|
101
|
+
|
|
102
|
+
Trigger self-correct when the input file's first H1 matches:
|
|
103
|
+
`# Publish: <scope> — <YYYY-MM-DD>` *(or the legacy `# Publish Entry #N` header).*
|
|
104
|
+
|
|
105
|
+
Behavior is defined in [`../_shared/output_conventions.md`](../_shared/output_conventions.md) §3.
|
|
106
|
+
|
|
107
|
+
Publish-specific gap-fills:
|
|
108
|
+
|
|
109
|
+
- Plain-text `dist-*` folder mentions → relative markdown links per §1.
|
|
110
|
+
- Bare commands referenced (e.g., "/wbDeploy") → full-syntax form per §2.
|
|
111
|
+
- Missing publish-status per package → infer from `npm view` output if available.
|
|
112
|
+
|
|
113
|
+
---
|
|
114
|
+
|
|
115
|
+
## Filename & Folder Convention (v2 — Universal Daily File)
|
|
116
|
+
|
|
117
|
+
**Path:** `<target_folder>/.wb/workflows/reports/<YYYY>/<MM>/<DD>/publishes/publish_<target>_<YYYYMMDD>.md`
|
|
118
|
+
|
|
119
|
+
> **No `<model>/` subfolder.** All models contribute to ONE publish file per day per scope.
|
|
120
|
+
> **No timestamp in filename.** Filename uses only the date.
|
|
121
|
+
|
|
122
|
+
**Create-or-Append Rule:**
|
|
123
|
+
- **File does NOT exist →** CREATE the file with a header and your publish log as Entry #1.
|
|
124
|
+
- **File ALREADY exists →** READ it, then APPEND as the next Entry #N.
|
|
125
|
+
- **Every entry tagged:** `*(ModelName via Client — HH:MM)*`
|
|
126
|
+
|
|
127
|
+
---
|
|
128
|
+
|
|
129
|
+
## The Prompt (copy from here ↓)
|
|
130
|
+
|
|
131
|
+
```
|
|
132
|
+
━━━━━━━━━━━━━ /wbPublish ━━━━━━━━━━━━━
|
|
133
|
+
|
|
134
|
+
📁 TARGET: __TARGET_MONOREPO_OR_PACKAGE_PATH__
|
|
135
|
+
📅 DATE: __TODAY__
|
|
136
|
+
🤖 MODEL: __YOUR_MODEL_NAME__
|
|
137
|
+
🖥️ CLIENT: __YOUR_CLIENT__
|
|
138
|
+
|
|
139
|
+
━━━ CONTEXT & GOAL ━━━
|
|
140
|
+
The repository has been staged for release via a prior `/wbRelease` command. The `package.json` files have correct NPM versions and local `file:` links have been removed.
|
|
141
|
+
|
|
142
|
+
Your goal is to safely Build, Verify, and Publish the packages to NPM, respecting Freemium tiers and topographical order.
|
|
143
|
+
|
|
144
|
+
━━━ INSTRUCTIONS ━━━
|
|
145
|
+
|
|
146
|
+
**[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.
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
1. **Read Release Plan**: Read the most recent `release_*.md` file in `.wb/workflows/reports/` to understand the required topological publish order.
|
|
150
|
+
2. **Build All Tiers**: Execute the global build script (e.g., `node tools/pkg_cli/build_libs.js --all`). This guarantees `dist-dev`, `dist-free`, and `dist-pro` are generated.
|
|
151
|
+
3. **Verify Signatures**: Inspect the generated `build-info.json` inside the `dist-*` folders. Ensure the version matches the `package.json` and the tier metadata is correct.
|
|
152
|
+
4. **Publish Sequence**: Execute `npm publish` iteratively according to the topological order defined in the release plan. Handle circular dependencies carefully by publishing `peerDependency` providers first.
|
|
153
|
+
5. SAVE using the Universal Daily File pattern:
|
|
154
|
+
|
|
155
|
+
CHECK if this file exists:
|
|
156
|
+
`<target_folder>/.wb/workflows/reports/__YYYY__/__MM__/__DD__/publishes/publish___NAME_____YYYYMMDD__.md`
|
|
157
|
+
|
|
158
|
+
- If it does NOT exist → CREATE the file with header + your publish log as Entry #1
|
|
159
|
+
- If it ALREADY exists → APPEND as the next Entry #N
|
|
160
|
+
|
|
161
|
+
6. APPLY OUTPUT CONVENTIONS (see ../_shared/output_conventions.md):
|
|
162
|
+
- All file/folder references (dist-*, package.json, build-info.json) → relative markdown links (§1).
|
|
163
|
+
- Any /wb* commands cited → full-syntax form (§2).
|
|
164
|
+
|
|
165
|
+
7. END THE FILE WITH:
|
|
166
|
+
|
|
167
|
+
## 🧭 What's Next?
|
|
168
|
+
|
|
169
|
+
Run `/wbNext <target_folder>` to get a current, ranked list of next actions (typically `/wbDeploy <consumer-app>`).
|
|
170
|
+
|
|
171
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
172
|
+
━━━ AUTO-APPEND FOOTER ━━━
|
|
173
|
+
|
|
174
|
+
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.
|
|
175
|
+
|
|
176
|
+
Format required:
|
|
177
|
+
```markdown
|
|
178
|
+
---
|
|
179
|
+
## 📂 Generated Files (__YYYYMMDD__)
|
|
180
|
+
> Auto-appended per `_shared/output_conventions.md` §5. Same-level snapshot of top-level command outputs at write time.
|
|
181
|
+
|
|
182
|
+
### 📚 Base Reference Files
|
|
183
|
+
| Type | File | Description |
|
|
184
|
+
|---|---|---|
|
|
185
|
+
| Foundational | [context.md](../../../../../context.md) | Permanent Identity and Architecture (Source of Truth) |
|
|
186
|
+
| Snapshot | [context_<scope>_<date>.md](../contexts/context_<scope>_<date>.md) | Daily snapshot used for current session context |
|
|
187
|
+
| Foundational | [dev.md](../../../../../dev.md) | Permanent Development Commands and Status |
|
|
188
|
+
|
|
189
|
+
### Global Files (`core2/` monorepo root)
|
|
190
|
+
| Category | File | Source Command |
|
|
191
|
+
|---|---|---|
|
|
192
|
+
| Reports | [audit_core2_<date>.md](../../../../../../../../../../.wb/workflows/reports/<YYYY>/<MM>/<DD>/audits/audit_core2_<date>.md) | `/wbAudit core2/` |
|
|
193
|
+
| Reports | [plan_core2_<date>.md](../../../../../../../../../../.wb/workflows/reports/<YYYY>/<MM>/<DD>/plans/plan_core2_<date>.md) | `/wbPlan core2/` |
|
|
194
|
+
| Tracks | [track_core2_<date>.md](../../../../../../../../../../.wb/workflows/tracks/<YYYY>/<MM>/<DD>/track_core2_<date>.md) | `/wbTrack core2/` |
|
|
195
|
+
|
|
196
|
+
<details>
|
|
197
|
+
<summary>📂 Sub-Package: [Active Package Name]</summary>
|
|
198
|
+
|
|
199
|
+
| Category | File | Source Command |
|
|
200
|
+
|---|---|---|
|
|
201
|
+
| Reports | [audit_subpkg_<date>.md](../../../../../../../../../../apps/wb-core/subpkg/.wb/workflows/reports/<YYYY>/<MM>/<DD>/audits/audit_subpkg_<date>.md) | `/wbAudit` |
|
|
202
|
+
|
|
203
|
+
</details>
|
|
204
|
+
```
|
|
205
|
+
```
|