$npx -y skills add WithWoz/wozcode-plugin --skill woz-kbThe WOZCODE knowledge base behind the /woz review reviewer. Subcommands — tune (end-to-end reviewer tuning), backtest (tuning building blocks), architecture-doc-fetch (fetch woz/architecture.md from the KB), cross-repo (cross-repo planning brief), and knowledge-base ops (
| 1 | # /woz-kb — the reviewer's knowledge base |
| 2 | |
| 3 | One skill, these subcommands: |
| 4 | |
| 5 | - **`woz-kb tune`** — the start-to-finish orchestrator: distill → backtest → learn (autotuner new-personas + per-PR missed-fixes) → re-measure the lift. Dry-run by default; `--apply` writes to the KB. Use this to onboard/tune a new repo or a whole org. |
| 6 | - **`woz-kb backtest`** — the building blocks for power users: the raw backtest run plus `--tune`, `--missed-report`, `--org-tune`, `--ab-compare` (unchanged). |
| 7 | - **`woz-kb architecture-doc-fetch`** — fetch the current repo's COMPANY-scope `woz/architecture.md` manifest from the KB into the working tree (no-op when already up to date). |
| 8 | - **`woz-kb cross-repo <feature>`** — print a cross-repo planning brief from the org's architecture manifests; `--ground` additionally appends a two-pass code/PR grounding search on top of the manifest brief. Flags: `--repos owner/a,owner/b`, `--topk <n>`. |
| 9 | - **knowledge-base ops** (`status`, `query`, `note`, `unnote`, `suppress`, `unsuppress`, `boost`, `unboost`, `ingest`, `refresh`, `ops`) — inspect and customize the knowledge base directly, e.g. `/woz-kb status`, `/woz-kb note "..."`, `/woz-kb query <text>`. |
| 10 | |
| 11 | The first positional arg selects the subcommand; if omitted it defaults to `backtest` (back-compat). `tune`, `backtest`, `architecture-doc-fetch`, and `cross-repo` run through `woz-kb.js`; the knowledge-base ops run through `woz-knowledge.js` (see that section). |
| 12 | |
| 13 | ## When to use |
| 14 | |
| 15 | TRIGGER for tune/backtest: "tune the reviewer", "tune this repo", "onboard a repo", "tune the org", "backtest the reviewer", "how well does the reviewer do", or `/woz-kb`. |
| 16 | |
| 17 | TRIGGER for architecture-doc-fetch/cross-repo: "sync the architecture doc", "fetch the architecture manifest", "cross-repo plan", "plan this across repos". |
| 18 | |
| 19 | TRIGGER for knowledge-base ops: "knowledge base status", "what's in the knowledge base", "search the knowledge base for …", "add a knowledge-base note", "remember that X", "suppress this" / "stop the reviewer from citing X", "boost this", "ingest <file> into the knowledge base", "refresh the knowledge base", or `/woz-kb status` / `/woz-kb note` / `/woz-kb query`. |
| 20 | |
| 21 | DO NOT use for: reviewing the current branch (`/woz review`) or past-session recall (`/woz-recall` — searches Claude Code session transcripts, not the knowledge base). General-purpose code search belongs to `mcp__plugin_woz_code__Search`, not the KB. |
| 22 | |
| 23 | --- |
| 24 | |
| 25 | ## `woz-kb tune` — start-to-finish |
| 26 | |
| 27 | ```bash |
| 28 | node --no-warnings=ExperimentalWarning ${CLAUDE_PLUGIN_ROOT}/scripts/woz-kb.js tune \ |
| 29 | --repo with-woz/wozcode \ |
| 30 | --anthropic-api-key-file ~/.woz/.anthropic-backtest-key |
| 31 | ``` |
| 32 | |
| 33 | Pipeline per repo: **(1)** trigger a KB refresh → **(2)** distill human PR comments into baseline persona-hints → **(3)** training backtest (20 PRs × 3 rounds, or reuse a cached run) → **(4)** learn: the autotuner contributes **new personas** (its unique cross-PR synthesis), then missed-fixes contributes the **per-PR durable persona-hints** → **(5)** re-measure on the same PRs and print the recall/precision lift. |
| 34 | |
| 35 | Flags: |
| 36 | - `--repo <owner/name>` — tune one repo. **Mutually exclusive with `--org`.** |
| 37 | - `--org <orgId>` — tune every repo the org has indexed, then run a final company-scope org-tune. |
| 38 | - `--apply` — write to the KB. **Without it, `tune` is a dry-run**: it computes + reports proposed hints/personas and counts but writes nothing (and skips the re-measure, since nothing changed). |
| 39 | - `--reuse-run <runId>` — reuse an existing backtest run's PRs + baseline instead of running a fresh (expensive) reviewer pass. `tune` also auto-reuses the newest cached run for the repo when present. |
| 40 | - `--count <n>` / `--rounds <n|all>` — training-backtest size (defaults 20 / 3) when not reusing a run. |
| 41 | - `--skip-distill` / `--skip-refresh` / `--skip-remeasure` — drop individual phases. |
| 42 | - `--anthropic-api-key-file <path>` — use API pricing for the reviewer/judge subprocesses. |
| 43 | - `--judge-model` / `--reviewer-model` / `--reviewer-via` / `--source` — as in `backtest`. |
| 44 | |
| 45 | Note: after an `--apply`, the reviewer cache is invalidated (KB changed), so the re-measure re-runs the reviewer on the (small) PR set — a real cost, not a cache hit. |
| 46 | |
| 47 | --- |
| 48 | |
| 49 | ## `woz-kb backtest` — building blocks |
| 50 | |
| 51 | ```bash |
| 52 | node --no-warnings=ExperimentalWarning ${CLAUDE_PLUGIN_ROOT}/scripts/woz-kb.js backtest \ |
| 53 | --repo with-woz/wozcode --count 3 --rounds 1 |
| 54 | ``` |
| 55 | |
| 56 | Runs the deep reviewer against a sample of historical merged PRs and scores how close it gets |