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,129 @@
|
|
|
1
|
+
# /wbRefactor: 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 — `/wbRefactor`
|
|
16
|
+
|
|
17
|
+
## One form
|
|
18
|
+
|
|
19
|
+
```
|
|
20
|
+
/wbRefactor <file-or-folder>
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## When to run
|
|
24
|
+
|
|
25
|
+
Only when all of these are true:
|
|
26
|
+
- A recent `/wbAudit` flagged this target as needing restructure.
|
|
27
|
+
- Tests exist and currently pass.
|
|
28
|
+
- No open `/wbDebug` report on this target.
|
|
29
|
+
- You're in the polish phase, not the feature phase.
|
|
30
|
+
|
|
31
|
+
If any of these aren't true, don't run it. The command will likely refuse; you save time by not trying.
|
|
32
|
+
|
|
33
|
+
## When *not* to run
|
|
34
|
+
|
|
35
|
+
- Response to a bug → `/wbDebug` first, then fix, then audit.
|
|
36
|
+
- Code you just wrote and haven't tested → write tests first.
|
|
37
|
+
- Code that works but "looks old" without audit backing → wait for audit.
|
|
38
|
+
- Entire package refactors in one go → split into file-level refactors.
|
|
39
|
+
|
|
40
|
+
## The audit-refactor sequence
|
|
41
|
+
|
|
42
|
+
```
|
|
43
|
+
/wbAudit <pkg> # identifies what needs restructure
|
|
44
|
+
# review the audit findings
|
|
45
|
+
/wbRefactor <specific-file> # restructure one file at a time
|
|
46
|
+
/wbTest <pkg> # confirm tests still pass
|
|
47
|
+
/wbAudit <pkg> # confirm refactor improved things
|
|
48
|
+
/wbGit # commit the refactor
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
Note the *bracketing audits*. The first says "needs refactor." The second confirms "refactor helped." Without the second audit, you might ship a refactor that cleaned one thing while making another worse.
|
|
52
|
+
|
|
53
|
+
## What /wbRefactor preserves
|
|
54
|
+
|
|
55
|
+
- **Public signatures.** Exported functions keep their arguments and return types.
|
|
56
|
+
- **Error behavior.** Same throws for same inputs.
|
|
57
|
+
- **Observable side effects.** Network calls, storage writes, events emitted.
|
|
58
|
+
- **Performance characteristics.** Approximately — refactor shouldn't make things 10× slower.
|
|
59
|
+
|
|
60
|
+
## What /wbRefactor changes
|
|
61
|
+
|
|
62
|
+
- Internal structure (file splits, function extractions).
|
|
63
|
+
- Internal naming (private function names can change).
|
|
64
|
+
- Dead code removal (if clearly dead and tests confirm).
|
|
65
|
+
- Formatting and comments.
|
|
66
|
+
|
|
67
|
+
## The mistake to avoid
|
|
68
|
+
|
|
69
|
+
**Using `/wbRefactor` to "improve" code that isn't broken.** If there's no audit finding, don't refactor. Every refactor carries non-zero risk of introducing subtle behavior changes. Random cleanup of working code is pure downside.
|
|
70
|
+
|
|
71
|
+
## When /wbRefactor is the wrong command
|
|
72
|
+
|
|
73
|
+
- Bug fix → `/wbDebug` then describe the fix.
|
|
74
|
+
- New feature → just describe the feature.
|
|
75
|
+
- Renaming a function used across the monorepo → the blast radius is too big; use `/wbPlan` to coordinate.
|
|
76
|
+
- Converting legacy Vuetify to wbc-ui2 components → `/wbToWBC` (the specialized version of this).
|
|
77
|
+
|
|
78
|
+
> For deeper reading: [`docs_claude/commands/wbRefactor/wbRefactor_practical_claude.md`](../../docs/docs_claude/commands/wbRefactor/wbRefactor_practical_claude.md) (or the `_eli5_`, `_expert_`, `_examples_` siblings).
|
|
79
|
+
## Self-correct mode (dual-mode invocation)
|
|
80
|
+
|
|
81
|
+
```
|
|
82
|
+
/wbRefactor <scope_folder> # normal mode — produce a fresh output file
|
|
83
|
+
/wbRefactor <previous_output_file> # self-correct mode — verify & repair the file in place
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
When the first arg is an existing output file from a prior `/wbRefactor` 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.
|
|
87
|
+
|
|
88
|
+
<!-- HELP_GATE_END -->
|
|
89
|
+
|
|
90
|
+
**ROLE:** The Surgeon
|
|
91
|
+
**TARGET:** The provided component, function, or path.
|
|
92
|
+
**Read first:** [`../_shared/output_conventions.md`](../_shared/output_conventions.md) — applies to the summary report (relative links, full-syntax commands, self-correct mode).
|
|
93
|
+
|
|
94
|
+
---
|
|
95
|
+
|
|
96
|
+
## ━━━ DETECTION (Self-Correct Mode) ━━━
|
|
97
|
+
|
|
98
|
+
Trigger self-correct when the input file's first H1 matches:
|
|
99
|
+
`# Refactor: <scope> — <YYYY-MM-DD>` *(if a report file is produced).*
|
|
100
|
+
|
|
101
|
+
Behavior is defined in [`../_shared/output_conventions.md`](../_shared/output_conventions.md) §3.
|
|
102
|
+
|
|
103
|
+
Refactor-specific gap-fills:
|
|
104
|
+
|
|
105
|
+
- Plain-text "before/after" file references → relative markdown links per §1.
|
|
106
|
+
- Bare `/wbTest` cited as verification → full-syntax `/wbTest <target>` per §2.
|
|
107
|
+
|
|
108
|
+
---
|
|
109
|
+
|
|
110
|
+
## ━━━ OBJECTIVE ━━━
|
|
111
|
+
Your job is to restructure, optimize, or upgrade the target code (e.g., migrating Vue 2 Options API to Vue 3 Composition API). **CRITICAL RULE:** You must not change the component's visual behavior, its props, or its emit signatures unless explicitly instructed. No new features allowed.
|
|
112
|
+
|
|
113
|
+
## ━━━ PHASE 1: CONSTRAINT SYNC ━━━
|
|
114
|
+
1. Read the local `context.md` to understand the framework version and styling rules.
|
|
115
|
+
2. Analyze the target file to map all Inputs (props/args) and Outputs (emits/returns/visuals).
|
|
116
|
+
|
|
117
|
+
## ━━━ PHASE 2: SURGICAL TRANSFORMATION ━━━
|
|
118
|
+
1. Rewrite the logic cleanly, modernizing syntax and improving performance.
|
|
119
|
+
2. Remove redundant logic or duplicate states.
|
|
120
|
+
3. Ensure absolute parity with the original Inputs and Outputs.
|
|
121
|
+
|
|
122
|
+
## ━━━ PHASE 3: VERIFICATION ━━━
|
|
123
|
+
Provide a short summary report confirming what structural changes were made and explicitly stating that the external API remains identical. Apply output_conventions.md §1 (relative links for every file changed) and §2 (full-syntax for any /wb* command cited).
|
|
124
|
+
|
|
125
|
+
End the report with:
|
|
126
|
+
|
|
127
|
+
## 🧭 What's Next?
|
|
128
|
+
|
|
129
|
+
Run `/wbNext <target_folder>` to get a current, ranked list of next actions (typically `/wbTest <target>` to verify behavior parity, then `/wbReview <target>` to validate the refactor).
|
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
# wbRelease 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 — `/wbRelease`
|
|
16
|
+
|
|
17
|
+
## Four forms
|
|
18
|
+
|
|
19
|
+
```
|
|
20
|
+
/wbRelease core2/ # standard flow
|
|
21
|
+
/wbRelease core2/ --dry-run # preview, no changes
|
|
22
|
+
/wbRelease core2/ --restore # after /wbPublish succeeds
|
|
23
|
+
/wbRelease core2/ --prerelease=beta # 1.5.0-beta.0 style
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Always `core2/` as the target. Never a sub-package.
|
|
27
|
+
|
|
28
|
+
## The full release workflow
|
|
29
|
+
|
|
30
|
+
```
|
|
31
|
+
/wbAudit <pkg> # must pass
|
|
32
|
+
/wbTest <pkg> # must pass
|
|
33
|
+
/wbRelease core2/ --dry-run # preview
|
|
34
|
+
/wbRelease core2/ # real release (unpicks workspace:)
|
|
35
|
+
/wbPublish <pkg> # actually push to npm
|
|
36
|
+
/wbRelease core2/ --restore # restore workspace: protocols
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Each step checks the previous. Skipping `--restore` is the most common mistake — your next `pnpm install` will start fetching from npm instead of using local packages.
|
|
40
|
+
|
|
41
|
+
## What triggers a version bump
|
|
42
|
+
|
|
43
|
+
The AI uses conventional commits:
|
|
44
|
+
- `fix:` → patch (1.4.2 → 1.4.3)
|
|
45
|
+
- `feat:` → minor (1.4.3 → 1.5.0)
|
|
46
|
+
- `feat!:` or `BREAKING CHANGE:` in commit body → major (1.5.0 → 2.0.0)
|
|
47
|
+
|
|
48
|
+
If your commits don't use conventional prefixes, the AI will ask. Don't let it guess.
|
|
49
|
+
|
|
50
|
+
## When `/wbRelease` refuses
|
|
51
|
+
|
|
52
|
+
- `/wbTest` report shows failures → fix tests first.
|
|
53
|
+
- `/wbAudit` report has BLOCKER findings → fix blockers first.
|
|
54
|
+
- No packages have changes since last release → nothing to release.
|
|
55
|
+
- Git working tree is dirty → commit or stash first.
|
|
56
|
+
- Current branch is not the one configured for releases → switch or override.
|
|
57
|
+
|
|
58
|
+
Don't bypass the refusal. Each one represents a real failure mode.
|
|
59
|
+
|
|
60
|
+
## The `--restore` discipline
|
|
61
|
+
|
|
62
|
+
**Always run `--restore` after `/wbPublish` succeeds.** Not doing this means:
|
|
63
|
+
- Next `pnpm install` fetches newly-published versions from npm.
|
|
64
|
+
- Your local dev stops using live workspace code.
|
|
65
|
+
- You'll be confused when a local code change doesn't show up in a downstream package.
|
|
66
|
+
|
|
67
|
+
Consider adding `--restore` to your end-of-day routine even if you're not sure you published — it's a no-op if protocols are already restored.
|
|
68
|
+
|
|
69
|
+
## When /wbRelease is *not* the right command
|
|
70
|
+
|
|
71
|
+
- App (not package) → `/wbDeploy`.
|
|
72
|
+
- Just want to publish without bumping → edit version manually, use `/wbPublish`.
|
|
73
|
+
- Just want to commit changes → `git commit`. Release is for consumer-visible versions.
|
|
74
|
+
- Pre-release experimental version → `--prerelease=...` flag, or manual `npm publish --tag=canary`.
|
|
75
|
+
|
|
76
|
+
> For deeper reading: [`docs_claude/commands/wbRelease/wbRelease_practical_claude.md`](../../docs/docs_claude/commands/wbRelease/wbRelease_practical_claude.md) (or the `_eli5_`, `_expert_`, `_examples_` siblings).
|
|
77
|
+
|
|
78
|
+
<!-- FLAGS_TABLE_START -->
|
|
79
|
+
## Flags & shortcuts
|
|
80
|
+
|
|
81
|
+
Both forms are equivalent — pass either:
|
|
82
|
+
|
|
83
|
+
| Long form | Shortcut |
|
|
84
|
+
|---|---|
|
|
85
|
+
| `--dry-run` | `-d` |
|
|
86
|
+
| `--prerelease` | `-p` |
|
|
87
|
+
| `--restore` | `-r` |
|
|
88
|
+
| `--tag` | `-t` |
|
|
89
|
+
|
|
90
|
+
`-h` / `--help` / `--h` (any command) prints this help block instead of executing.
|
|
91
|
+
## Self-correct mode (dual-mode invocation)
|
|
92
|
+
|
|
93
|
+
```
|
|
94
|
+
/wbRelease <scope_folder> # normal mode — produce a fresh output file
|
|
95
|
+
/wbRelease <previous_output_file> # self-correct mode — verify & repair the file in place
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
When the first arg is an existing output file from a prior `/wbRelease` 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.
|
|
99
|
+
|
|
100
|
+
<!-- FLAGS_TABLE_END -->
|
|
101
|
+
<!-- HELP_GATE_END -->
|
|
102
|
+
|
|
103
|
+
<!-- FLAG_NORMALIZE_START -->
|
|
104
|
+
## Flag normalization (apply BEFORE parsing args)
|
|
105
|
+
|
|
106
|
+
Before processing `$ARGUMENTS`, normalize these short-form flags to their long equivalents:
|
|
107
|
+
|
|
108
|
+
- `-d` → `--dry-run`
|
|
109
|
+
- `-p` → `--prerelease`
|
|
110
|
+
- `-r` → `--restore`
|
|
111
|
+
- `-t` → `--tag`
|
|
112
|
+
|
|
113
|
+
The rest of this template documents only the long forms; the substitution above is the only place short forms are mentioned.
|
|
114
|
+
<!-- FLAG_NORMALIZE_END -->
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
> **How to use**: This is the manual template for generating a release orchestration plan. It is specifically designed to solve monorepo circular dependencies and automate NPM publishing.
|
|
119
|
+
> **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).
|
|
120
|
+
|
|
121
|
+
---
|
|
122
|
+
|
|
123
|
+
## Detection (Self-Correct Mode)
|
|
124
|
+
|
|
125
|
+
Trigger self-correct when the input file's first H1 matches:
|
|
126
|
+
`# Release: <scope> — <YYYY-MM-DD>` *(or the legacy `# Release Entry #N` header).*
|
|
127
|
+
|
|
128
|
+
Behavior is defined in [`../_shared/output_conventions.md`](../_shared/output_conventions.md) §3.
|
|
129
|
+
|
|
130
|
+
Release-specific gap-fills:
|
|
131
|
+
|
|
132
|
+
- Plain-text `package.json` paths → relative markdown links per §1.
|
|
133
|
+
- Bare `/wbPublish` references → full-syntax `/wbPublish <target>` per §2.
|
|
134
|
+
- Missing version bumps in the topological order table → infer from current `package.json` files.
|
|
135
|
+
|
|
136
|
+
---
|
|
137
|
+
|
|
138
|
+
## Filename & Folder Convention (v2 — Universal Daily File)
|
|
139
|
+
|
|
140
|
+
**Path:** `<target_folder>/.wb/workflows/reports/<YYYY>/<MM>/<DD>/releases/release_<target>_<YYYYMMDD>.md`
|
|
141
|
+
|
|
142
|
+
> **No `<model>/` subfolder.** All models contribute to ONE release file per day per scope.
|
|
143
|
+
> **No timestamp in filename.** Filename uses only the date.
|
|
144
|
+
|
|
145
|
+
**Create-or-Append Rule:**
|
|
146
|
+
- **File does NOT exist →** CREATE the file with a header and your release plan as Entry #1.
|
|
147
|
+
- **File ALREADY exists →** READ it, then APPEND as the next Entry #N.
|
|
148
|
+
- **Every entry tagged:** `*(ModelName via Client — HH:MM)*`
|
|
149
|
+
|
|
150
|
+
---
|
|
151
|
+
|
|
152
|
+
## The Prompt (copy from here ↓)
|
|
153
|
+
|
|
154
|
+
```
|
|
155
|
+
━━━━━━━━━━━━━ /wbRelease ━━━━━━━━━━━━━
|
|
156
|
+
|
|
157
|
+
📁 TARGET: __TARGET_MONOREPO_OR_PACKAGE_PATH__
|
|
158
|
+
📅 DATE: __TODAY__
|
|
159
|
+
🤖 MODEL: __YOUR_MODEL_NAME__
|
|
160
|
+
🖥️ CLIENT: __YOUR_CLIENT__
|
|
161
|
+
🎯 NEW VERSION: __e.g._v1.0.0-r02__
|
|
162
|
+
|
|
163
|
+
━━━ CONTEXT & GOAL ━━━
|
|
164
|
+
The user wants to publish the monorepo packages to NPM. The monorepo has complex, sometimes circular dependencies (e.g. `wb-core` uses `wb-code`, but `wb-code` uses `wb-core`). Currently, packages rely on `file:../../` or workspace aliases.
|
|
165
|
+
|
|
166
|
+
Your goal is to act as the Release Orchestrator. You must untangle the dependency graph, replace local links with real NPM versions, build the changelog, and define the exact sequence of NPM publishes.
|
|
167
|
+
|
|
168
|
+
━━━ INSTRUCTIONS ━━━
|
|
169
|
+
|
|
170
|
+
**[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.
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
1. **History Aggregation**: Scan `.wb/workflows/reports/` for recent `plan_*.md` and `audit_*.md` files. Synthesize a professional `CHANGELOG.md` for the target release.
|
|
174
|
+
2. **Topological Graphing**: Analyze the `package.json` of all sub-packages in the target. Identify the dependency tree (who uses who?). Define the topological order for building and publishing.
|
|
175
|
+
3. **The Unlinking Strategy**: Replace `"dependencies": "file:../../..."` or workspace aliases with the target `NEW VERSION` in every `package.json`.
|
|
176
|
+
4. **Handoff**: Conclude the release plan by instructing the user to run `/wbPublish` to execute the actual builds and NPM publishes.
|
|
177
|
+
5. SAVE using the Universal Daily File pattern:
|
|
178
|
+
|
|
179
|
+
CHECK if this file exists:
|
|
180
|
+
`<target_folder>/.wb/workflows/reports/__YYYY__/__MM__/__DD__/releases/release___NAME_____YYYYMMDD__.md`
|
|
181
|
+
|
|
182
|
+
- If it does NOT exist → CREATE the file with header + your release plan as Entry #1
|
|
183
|
+
- If it ALREADY exists → APPEND as the next Entry #N
|
|
184
|
+
|
|
185
|
+
6. APPLY OUTPUT CONVENTIONS (see ../_shared/output_conventions.md):
|
|
186
|
+
- All `package.json`, file, and folder references → relative markdown links from the output file's directory (§1).
|
|
187
|
+
- Any /wb* commands cited (e.g., "run /wbPublish") → full-syntax form (§2).
|
|
188
|
+
|
|
189
|
+
7. END THE FILE WITH:
|
|
190
|
+
|
|
191
|
+
## 🧭 What's Next?
|
|
192
|
+
|
|
193
|
+
Run `/wbNext <target_folder>` to get a current, ranked list of next actions (typically `/wbPublish <target>`).
|
|
194
|
+
|
|
195
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
196
|
+
━━━ AUTO-APPEND FOOTER ━━━
|
|
197
|
+
|
|
198
|
+
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.
|
|
199
|
+
|
|
200
|
+
Format required:
|
|
201
|
+
```markdown
|
|
202
|
+
---
|
|
203
|
+
## 📂 Generated Files (__YYYYMMDD__)
|
|
204
|
+
> Auto-appended per `_shared/output_conventions.md` §5. Same-level snapshot of top-level command outputs at write time.
|
|
205
|
+
|
|
206
|
+
### 📚 Base Reference Files
|
|
207
|
+
| Type | File | Description |
|
|
208
|
+
|---|---|---|
|
|
209
|
+
| Foundational | [context.md](../../../../../context.md) | Permanent Identity and Architecture (Source of Truth) |
|
|
210
|
+
| Snapshot | [context_<scope>_<date>.md](../contexts/context_<scope>_<date>.md) | Daily snapshot used for current session context |
|
|
211
|
+
| Foundational | [dev.md](../../../../../dev.md) | Permanent Development Commands and Status |
|
|
212
|
+
|
|
213
|
+
### Global Files (`core2/` monorepo root)
|
|
214
|
+
| Category | File | Source Command |
|
|
215
|
+
|---|---|---|
|
|
216
|
+
| Reports | [audit_core2_<date>.md](../../../../../../../../../../.wb/workflows/reports/<YYYY>/<MM>/<DD>/audits/audit_core2_<date>.md) | `/wbAudit core2/` |
|
|
217
|
+
| Reports | [plan_core2_<date>.md](../../../../../../../../../../.wb/workflows/reports/<YYYY>/<MM>/<DD>/plans/plan_core2_<date>.md) | `/wbPlan core2/` |
|
|
218
|
+
| Tracks | [track_core2_<date>.md](../../../../../../../../../../.wb/workflows/tracks/<YYYY>/<MM>/<DD>/track_core2_<date>.md) | `/wbTrack core2/` |
|
|
219
|
+
|
|
220
|
+
<details>
|
|
221
|
+
<summary>📂 Sub-Package: [Active Package Name]</summary>
|
|
222
|
+
|
|
223
|
+
| Category | File | Source Command |
|
|
224
|
+
|---|---|---|
|
|
225
|
+
| Reports | [audit_subpkg_<date>.md](../../../../../../../../../../apps/wb-core/subpkg/.wb/workflows/reports/<YYYY>/<MM>/<DD>/audits/audit_subpkg_<date>.md) | `/wbAudit` |
|
|
226
|
+
|
|
227
|
+
</details>
|
|
228
|
+
```
|
|
229
|
+
```
|
|
@@ -0,0 +1,252 @@
|
|
|
1
|
+
# wbReview 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 — `/wbReview`
|
|
16
|
+
|
|
17
|
+
## When to use it (and when you'd mistakenly reach for /wbAudit)
|
|
18
|
+
|
|
19
|
+
```
|
|
20
|
+
/wbReview <target> --plan=<path-to-plan>
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Required: `--plan`. If you don't have a plan file, you're at the wrong command. Use `/wbAudit`.
|
|
24
|
+
|
|
25
|
+
### Good fits for /wbReview
|
|
26
|
+
|
|
27
|
+
- AI worker finished a plan's tasks; you want to verify before merging.
|
|
28
|
+
- You finished executing a plan yourself and want a second pass.
|
|
29
|
+
- A quick hotfix went out under pressure; you want a post-hoc check against the (brief) plan that was written.
|
|
30
|
+
- Docs rewrite followed a plan; want to verify nothing hallucinated.
|
|
31
|
+
|
|
32
|
+
### Bad fits for /wbReview
|
|
33
|
+
|
|
34
|
+
- Pre-release sanity check → `/wbAudit`
|
|
35
|
+
- "Is this file good?" → `/wbAudit <file>`
|
|
36
|
+
- Tests failing? → `/wbTest`, then `/wbDebug`
|
|
37
|
+
- You never wrote a plan → doesn't apply
|
|
38
|
+
|
|
39
|
+
## Reading the review output
|
|
40
|
+
|
|
41
|
+
Three possible verdicts:
|
|
42
|
+
|
|
43
|
+
- **🟢 PASS** — every plan task confirmed, no regression, no rule violations.
|
|
44
|
+
- **🟡 PASS WITH DEBT** — most tasks confirmed; minor issues tracked for later. Safe to merge if debt is logged.
|
|
45
|
+
- **🔴 FAIL** — at least one task claimed complete but actually incomplete, or a rule was violated. Don't merge.
|
|
46
|
+
|
|
47
|
+
A good review is specific about which tasks failed and why. "Task 3 incomplete: test coverage is dev-mode only, prod-mode branch untested." Not "some issues remain."
|
|
48
|
+
|
|
49
|
+
## The key check
|
|
50
|
+
|
|
51
|
+
**Did the worker mark tasks complete without actually finishing them?** This is the single failure mode `/wbReview` is best at catching. Checkbox state is aspirational; code state is real. Review verifies code state against checkbox claims.
|
|
52
|
+
|
|
53
|
+
If checkboxes ✅ but code ❌, the review fails that task and re-opens it in the plan file.
|
|
54
|
+
|
|
55
|
+
## The "what the review found that the plan missed" section
|
|
56
|
+
|
|
57
|
+
A good review doesn't just verify — it catches side effects the plan author didn't anticipate:
|
|
58
|
+
|
|
59
|
+
- New dependencies introduced.
|
|
60
|
+
- Related files modified but not mentioned.
|
|
61
|
+
- Rules violated that the plan didn't explicitly invoke.
|
|
62
|
+
- Tests that stopped passing (discovered during review).
|
|
63
|
+
|
|
64
|
+
This is where `/wbReview` earns its keep beyond checkbox verification.
|
|
65
|
+
|
|
66
|
+
## The mistake to avoid
|
|
67
|
+
|
|
68
|
+
**Skipping `/wbReview` because you're the one who executed the plan.** Your own work is the work you're least qualified to judge. If the plan was big enough to need a plan, it's big enough to review. Use an adversarial prompt: *"assume the worker was lazy. Where did they cut corners?"*
|
|
69
|
+
|
|
70
|
+
## When /wbReview refuses
|
|
71
|
+
|
|
72
|
+
If the plan file is missing, malformed, or if the current code state has no detectable relationship to the plan, `/wbReview` will refuse and tell you why. Don't work around it — fix the plan-to-code linkage first. The review is only useful if there's something to review against.
|
|
73
|
+
|
|
74
|
+
> For deeper reading: [`docs_claude/commands/wbReview/wbReview_practical_claude.md`](../../docs/docs_claude/commands/wbReview/wbReview_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 |
|
|
82
|
+
|---|---|
|
|
83
|
+
| `--plan` | `-p` |
|
|
84
|
+
| `--act` | `-a` |
|
|
85
|
+
| `--wbPlan` | `-P` |
|
|
86
|
+
|
|
87
|
+
`-h` / `--help` / `--h` (any command) prints this help block instead of executing.
|
|
88
|
+
## Self-correct mode (dual-mode invocation)
|
|
89
|
+
|
|
90
|
+
```
|
|
91
|
+
/wbReview <scope_folder> # normal mode — produce a fresh output file
|
|
92
|
+
/wbReview <previous_output_file> # self-correct mode — verify & repair the file in place
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
When the first arg is an existing output file from a prior `/wbReview` 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.
|
|
96
|
+
|
|
97
|
+
<!-- FLAGS_TABLE_END -->
|
|
98
|
+
<!-- HELP_GATE_END -->
|
|
99
|
+
|
|
100
|
+
<!-- FLAG_NORMALIZE_START -->
|
|
101
|
+
## Flag normalization (apply BEFORE parsing args)
|
|
102
|
+
|
|
103
|
+
Before processing `$ARGUMENTS`, normalize these short-form flags to their long equivalents:
|
|
104
|
+
|
|
105
|
+
- `-p` → `--plan`
|
|
106
|
+
- `-a` → `--act`
|
|
107
|
+
- `-P` → `--wbPlan`
|
|
108
|
+
|
|
109
|
+
The rest of this template documents only the long forms; the substitution above is the only place short forms are mentioned.
|
|
110
|
+
<!-- FLAG_NORMALIZE_END -->
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
> **How to use**: This is the manual template for performing a formal quality review of an executed task. Use this AFTER a task has been completed via `/wbPlan`.
|
|
115
|
+
> **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, **§9 Action Type Tagging** — declare `type:` + `emits:` in YAML front-matter, add a plain-text `Requires` column to every recommendations table, include a `## 🔗 Action Types` legend).
|
|
116
|
+
|
|
117
|
+
---
|
|
118
|
+
|
|
119
|
+
## Detection (Self-Correct Mode)
|
|
120
|
+
|
|
121
|
+
Trigger self-correct when the input file's first H1 matches:
|
|
122
|
+
`# Review: <scope> — <YYYY-MM-DD>` *(or the legacy `# Review Entry #N` header for entry-N append mode).*
|
|
123
|
+
|
|
124
|
+
Behavior is defined in [`../_shared/output_conventions.md`](../_shared/output_conventions.md) §3.
|
|
125
|
+
|
|
126
|
+
Review-specific gap-fills:
|
|
127
|
+
|
|
128
|
+
- Missing PASS/FAIL status on a finding → infer from the worker's task report.
|
|
129
|
+
- Plain-text file references → relative markdown links per §1.
|
|
130
|
+
- Plain-text plan reference → link to the actual plan file per §1.
|
|
131
|
+
|
|
132
|
+
---
|
|
133
|
+
|
|
134
|
+
## Filename & Folder Convention (v2 — Universal Daily File)
|
|
135
|
+
|
|
136
|
+
**Path:** `<target_folder>/.wb/workflows/reports/<YYYY>/<MM>/<DD>/reviews/review_<target>_<YYYYMMDD>.md`
|
|
137
|
+
|
|
138
|
+
> **No `<model>/` subfolder.** All models contribute to ONE review 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 review as Entry #1.
|
|
143
|
+
- **File ALREADY exists →** READ it, then APPEND your review as the next Entry #N. Multiple reviewers in one file — like a PR with multiple reviewers.
|
|
144
|
+
- **Every entry tagged:** `*(ModelName via Client — HH:MM)*`
|
|
145
|
+
|
|
146
|
+
### Smart Merge Protocol (finding-based commands only)
|
|
147
|
+
|
|
148
|
+
When you are the **second (or Nth) model** appending to an existing review file, you MUST:
|
|
149
|
+
|
|
150
|
+
1. **READ** the entire existing file before writing.
|
|
151
|
+
2. **EXTRACT** all review findings/comments from previous entries.
|
|
152
|
+
3. **For each finding you identified**, check if it matches an existing finding:
|
|
153
|
+
- **Match criteria:** ≥2 of: same file referenced, same function/method, >70% title token overlap.
|
|
154
|
+
- **MATCH FOUND →** Do NOT create a duplicate. Instead add your perspective to a **Model Votes** section and update the **Consensus Table**.
|
|
155
|
+
- **NO MATCH →** Add as a new finding.
|
|
156
|
+
4. **Build/update the Consensus Table** at the top with columns: `# | Finding | Confidence | Models | Severity (consensus) | PASS/FAIL`
|
|
157
|
+
5. **Add a merge log** at the bottom: `> *Merged by <ModelName> — HH:MM — X duplicates enriched, Y new findings added*`
|
|
158
|
+
|
|
159
|
+
> **First model?** Just write normally as Entry #1. No Consensus Table needed — it will be created by the second model.
|
|
160
|
+
|
|
161
|
+
---
|
|
162
|
+
|
|
163
|
+
## The Prompt (copy from here ↓)
|
|
164
|
+
|
|
165
|
+
```
|
|
166
|
+
━━━━━━━━━━━━━ /wbReview ━━━━━━━━━━━━━
|
|
167
|
+
|
|
168
|
+
📁 TARGET: __TARGET_PATH__
|
|
169
|
+
📝 ORIGINAL PLAN: __PATH_TO_PLAN_FILE__
|
|
170
|
+
📅 DATE: __TODAY__
|
|
171
|
+
🤖 MODEL: __YOUR_MODEL_NAME__
|
|
172
|
+
🖥️ CLIENT: __YOUR_CLIENT__
|
|
173
|
+
|
|
174
|
+
━━━ CONTEXT & GOAL ━━━
|
|
175
|
+
Act as a Senior Code Auditor and Quality Assurance Lead. Your goal is to verify that the work executed in the TARGET matches the ORIGINAL PLAN perfectly.
|
|
176
|
+
|
|
177
|
+
You must be critical, meticulous, and evidence-based. If a feature works but is "sloppy," you must flag it.
|
|
178
|
+
|
|
179
|
+
━━━ INSTRUCTIONS ━━━
|
|
180
|
+
|
|
181
|
+
**[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.
|
|
182
|
+
|
|
183
|
+
|
|
184
|
+
1. **Plan vs. Reality Check**: Read the ORIGINAL PLAN and inspect the current codebase. Verify that EVERY checkbox (✅) marked by the worker is actually implemented correctly.
|
|
185
|
+
2. **Technical Integrity**: Check for regressions, linting errors, and architectural consistency. Does the new code follow the monorepo's "UI as Data" philosophy?
|
|
186
|
+
3. **Performance & Security**: Is the new code efficient? Are there any obvious security holes or resource leaks?
|
|
187
|
+
4. **Scoring**: Deliver a Review Score (1-10) and a final status:
|
|
188
|
+
- 🟢 **PASS**: Plan completed, code is elite.
|
|
189
|
+
- 🟡 **PASS WITH DEBT**: Functional, but needs cleanup.
|
|
190
|
+
- 🔴 **FAIL**: Plan not completed or regressions introduced.
|
|
191
|
+
|
|
192
|
+
5. SAVE using the Universal Daily File pattern:
|
|
193
|
+
|
|
194
|
+
CHECK if this file exists:
|
|
195
|
+
`<target_folder>/.wb/workflows/reports/__YYYY__/__MM__/__DD__/reviews/review___NAME_____YYYYMMDD__.md`
|
|
196
|
+
|
|
197
|
+
- If it does NOT exist → CREATE the file with header + your review as Entry #1
|
|
198
|
+
- If it ALREADY exists → APPEND your review as the next Entry #N
|
|
199
|
+
|
|
200
|
+
Entry header format (use `---` only when appending, NEVER as the very first line of the file, apply output_conventions.md §1 — link the original plan):
|
|
201
|
+
# Review Entry #N — *(__YOUR_MODEL_NAME__ via __YOUR_CLIENT__ — __CURRENT_TIME__)*
|
|
202
|
+
> **Model:** __YOUR_MODEL_NAME__
|
|
203
|
+
> **Client:** __YOUR_CLIENT__
|
|
204
|
+
> **Time:** __TODAY__ __CURRENT_TIME__
|
|
205
|
+
> **Original plan:** [plan_<name>_<date>.md](../plans/plan_<name>_<date>.md)
|
|
206
|
+
[... your full review content; all file references as relative links per §1 ...]
|
|
207
|
+
|
|
208
|
+
6. APPLY OUTPUT CONVENTIONS:
|
|
209
|
+
- All file/folder references → relative markdown links from the output file's directory (§1).
|
|
210
|
+
- Any /wb* commands cited (e.g., "re-run /wbTest") → full-syntax form (§2).
|
|
211
|
+
|
|
212
|
+
7. END THE FILE WITH:
|
|
213
|
+
|
|
214
|
+
## 🧭 What's Next?
|
|
215
|
+
|
|
216
|
+
Run `/wbNext <target_folder>` to get a current, ranked list of next actions based on this review.
|
|
217
|
+
|
|
218
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
219
|
+
━━━ AUTO-APPEND FOOTER ━━━
|
|
220
|
+
|
|
221
|
+
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.
|
|
222
|
+
|
|
223
|
+
Format required:
|
|
224
|
+
```markdown
|
|
225
|
+
---
|
|
226
|
+
## 📂 Generated Files (__YYYYMMDD__)
|
|
227
|
+
> Auto-appended per `_shared/output_conventions.md` §5. Same-level snapshot of top-level command outputs at write time.
|
|
228
|
+
|
|
229
|
+
### 📚 Base Reference Files
|
|
230
|
+
| Type | File | Description |
|
|
231
|
+
|---|---|---|
|
|
232
|
+
| Foundational | [context.md](../../../../../context.md) | Permanent Identity and Architecture (Source of Truth) |
|
|
233
|
+
| Snapshot | [context_<scope>_<date>.md](../contexts/context_<scope>_<date>.md) | Daily snapshot used for current session context |
|
|
234
|
+
| Foundational | [dev.md](../../../../../dev.md) | Permanent Development Commands and Status |
|
|
235
|
+
|
|
236
|
+
### Global Files (`core2/` monorepo root)
|
|
237
|
+
| Category | File | Source Command |
|
|
238
|
+
|---|---|---|
|
|
239
|
+
| Reports | [audit_core2_<date>.md](../../../../../../../../../../.wb/workflows/reports/<YYYY>/<MM>/<DD>/audits/audit_core2_<date>.md) | `/wbAudit core2/` |
|
|
240
|
+
| Reports | [plan_core2_<date>.md](../../../../../../../../../../.wb/workflows/reports/<YYYY>/<MM>/<DD>/plans/plan_core2_<date>.md) | `/wbPlan core2/` |
|
|
241
|
+
| Tracks | [track_core2_<date>.md](../../../../../../../../../../.wb/workflows/tracks/<YYYY>/<MM>/<DD>/track_core2_<date>.md) | `/wbTrack core2/` |
|
|
242
|
+
|
|
243
|
+
<details>
|
|
244
|
+
<summary>📂 Sub-Package: [Active Package Name]</summary>
|
|
245
|
+
|
|
246
|
+
| Category | File | Source Command |
|
|
247
|
+
|---|---|---|
|
|
248
|
+
| Reports | [audit_subpkg_<date>.md](../../../../../../../../../../apps/wb-core/subpkg/.wb/workflows/reports/<YYYY>/<MM>/<DD>/audits/audit_subpkg_<date>.md) | `/wbAudit` |
|
|
249
|
+
|
|
250
|
+
</details>
|
|
251
|
+
```
|
|
252
|
+
```
|