Skip to content

Commit b66f41e

Browse files
authored
docs(website): sync CLI and Claude plugin pages with shipped surface (#1106)
* docs(website): sync CLI and Claude plugin pages with shipped surface Add health/risk/security/coverage/impacted-tests/workspace/distill to the website CLI reference, and document the full Claude slash-command set plus six skills on the plugin page. * docs(website): document /repowise:security on the Claude plugin page Keep the website slash-command list aligned with the command landing in #1107 so the public page is not one command behind.
1 parent ef38d61 commit b66f41e

2 files changed

Lines changed: 255 additions & 6 deletions

File tree

website/claude-code-plugin.md

Lines changed: 69 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ The Claude Code plugin integrates repowise directly into Claude Code. It handles
3131
Open Claude Code and run:
3232

3333
```
34-
/plugin marketplace add repowise-dev/repowise-plugin
34+
/plugin marketplace add repowise-dev/repowise
3535
/plugin install repowise@repowise
3636
```
3737

@@ -54,12 +54,12 @@ Claude will guide you through:
5454

5555
1. **Mode selection** — choose between:
5656
- **Full** — complete wiki generation with LLM docs (requires API key)
57-
- **Index-only** — graph + git + dead code, no LLM (free)
57+
- **Index-only** — graph + git + dead code + code health, no LLM (free)
5858
- **Advanced** — manual control over provider, concurrency, exclude patterns
5959

60-
2. **Provider selection** — Anthropic, OpenAI, Gemini, or local Ollama
60+
2. **Provider selection** — Anthropic, OpenAI, Gemini, Codex CLI, OpenCode, or local Ollama
6161

62-
3. **API key entry** — saved to `.repowise/.env` (gitignored)
62+
3. **API key entry** — saved to `.repowise/.env` (gitignored) when a hosted provider needs one
6363

6464
4. **Indexing** — runs in the background with live progress updates
6565

@@ -104,6 +104,60 @@ Use this after switching embedding providers, or if semantic search results seem
104104

105105
---
106106

107+
### `/repowise:health`
108+
109+
Code-health KPIs, lowest-scoring files, refactoring targets, or trends
110+
(`repowise health`).
111+
112+
---
113+
114+
### `/repowise:risk`
115+
116+
Defect-risk score for a commit or `base..head` range (`repowise risk`).
117+
118+
---
119+
120+
### `/repowise:security`
121+
122+
Full-history secret scan (`repowise security scan --history`). Working-tree
123+
scanning already runs during init/update; without `--history` the CLI only
124+
prints a hint. Default history mode is secrets-only; `--all-patterns` also
125+
reports code-smell patterns.
126+
127+
---
128+
129+
### `/repowise:coverage`
130+
131+
Ingest or inspect coverage reports (`repowise coverage add` / `status`).
132+
Lights up untested-hotspot markers and builds the per-test map when contexts
133+
are present.
134+
135+
---
136+
137+
### `/repowise:impacted-tests`
138+
139+
Tests whose coverage intersects a change (`repowise impacted-tests`).
140+
141+
---
142+
143+
### `/repowise:dead-code`
144+
145+
Unreachable files, unused exports, and zombie packages by confidence.
146+
147+
---
148+
149+
### `/repowise:decision`
150+
151+
List, inspect, add, or confirm architectural decisions.
152+
153+
---
154+
155+
### `/repowise:doctor`
156+
157+
Diagnose (and optionally repair) setup, keys, and index drift.
158+
159+
---
160+
107161
## Automatic behaviors
108162

109163
Beyond the slash commands, the plugin teaches Claude skills it uses automatically — without being asked.
@@ -113,19 +167,29 @@ Beyond the slash commands, the plugin teaches Claude skills it uses automaticall
113167
Before reading raw source files, Claude calls:
114168

115169
- `get_overview()` at the start of new tasks to orient itself
170+
- `get_answer(question)` for direct how/where/why questions
116171
- `search_codebase(query)` to locate code instead of using grep
117172
- `get_context(targets)` to get docs and ownership before opening files
118173

119174
### Pre-modification checks
120175

121176
Before editing any file, Claude calls `get_risk(targets)` to assess:
122177

178+
- Bug-fix history (`defect_profile` / `bug_magnet`) when present
123179
- Whether the file is a hotspot (high churn)
124180
- How many other files depend on it
125181
- Whether there are co-change patterns to be aware of
126182

127183
If the risk is high, Claude surfaces this before making changes.
128184

185+
### Change review
186+
187+
For a PR / branch / working-tree diff, Claude combines `get_change_risk` (whole-change score) with `get_risk`'s per-file `directive` block.
188+
189+
### Code health
190+
191+
Quality / complexity / "what to refactor" questions go through `get_health`.
192+
129193
### Architectural decision queries
130194

131195
When facing "why is this structured this way" questions, Claude calls `get_why(query)` to check decision records and git archaeology before suggesting changes that might conflict with existing decisions.
@@ -138,7 +202,7 @@ During refactoring or cleanup tasks, Claude calls `get_dead_code()` to find conf
138202

139203
## How skills work
140204

141-
Skills in Claude Code are prompt instructions that modify Claude's behavior. The repowise plugin registers four skills that Claude loads when working in an indexed repo.
205+
Skills in Claude Code are prompt instructions that modify Claude's behavior. The repowise plugin registers six skills that Claude loads when working in an indexed repo.
142206

143207
You don't need to trigger them manually. When Claude detects it's working in a repo with a connected repowise MCP server, the skills activate automatically.
144208

website/cli-reference.md

Lines changed: 186 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ repowise dead-code [PATH] [OPTIONS]
327327

328328
| Flag | Type | Default | Description |
329329
|------|------|---------|-------------|
330-
| `--min-confidence` | float | 0.4 | Minimum confidence threshold (0.0–1.0) |
330+
| `--min-confidence` | float | 0.5 | Minimum confidence threshold (0.0–1.0) |
331331
| `--safe-only` | flag | false | Only show findings marked `safe_to_delete` |
332332
| `--kind` | choice || Filter by type: `unreachable_file`, `unused_export`, `unused_internal`, `zombie_package` |
333333
| `--format` | choice | table | Output format: `table`, `json`, or `md` |
@@ -344,6 +344,191 @@ repowise dead-code --min-confidence 0.8 # High confidence only
344344

345345
---
346346

347+
## `health`
348+
349+
Compute per-file code-health scores from deterministic markers. No LLM by
350+
default.
351+
352+
```bash
353+
repowise health [PATH] [OPTIONS]
354+
```
355+
356+
### Options
357+
358+
| Flag | Type | Default | Description |
359+
|------|------|---------|-------------|
360+
| `--file` | string || Deep-dive a single file (relative path) |
361+
| `--module` | string || Restrict to files whose path starts with this prefix |
362+
| `--refactoring-targets` | flag | false | Ranked refactoring candidates by impact/effort |
363+
| `--trend` | flag | false | Last health snapshots + declining alerts |
364+
| `--badge` | flag | false | Ready-to-paste health badge Markdown |
365+
| `--format` | choice | table | `table`, `json`, or `md` |
366+
| `--generate-code` | string || Opt-in LLM refactoring patch for one target (needs a provider) |
367+
368+
### Examples
369+
370+
```bash
371+
repowise health
372+
repowise health --refactoring-targets
373+
repowise health --file packages/server/app.py
374+
repowise health --trend
375+
```
376+
377+
---
378+
379+
## `risk`
380+
381+
Score the defect risk of a *change* (commit or `base..head` range). No LLM.
382+
383+
```bash
384+
repowise risk [REVSPEC] [OPTIONS]
385+
```
386+
387+
### Options
388+
389+
| Flag | Type | Default | Description |
390+
|------|------|---------|-------------|
391+
| `--path` | path | cwd | Git repository path |
392+
| `--ext` | string | all | Comma-separated suffixes to count (e.g. `.py,.ts`) |
393+
| `-x, --exclude` | pattern || Gitignore-style exclude (repeatable) |
394+
| `--format` | choice | table | `table` or `json` |
395+
396+
### Examples
397+
398+
```bash
399+
repowise risk # score HEAD
400+
repowise risk main..HEAD # score a branch / PR range
401+
repowise risk --ext .ts,.tsx
402+
```
403+
404+
---
405+
406+
## `security`
407+
408+
Security signal scanning. Working-tree scanning already runs during `init` /
409+
`update`. Use this group to walk **full git history** for leaked secrets.
410+
411+
```bash
412+
repowise security scan --history [OPTIONS]
413+
```
414+
415+
Without `--history`, the command prints a hint and exits (it does not re-run
416+
the working-tree scan).
417+
418+
### Options
419+
420+
| Flag | Type | Default | Description |
421+
|------|------|---------|-------------|
422+
| `--history` | flag | false | Required for a real scan: walk full git history |
423+
| `--since` | rev | all | Lower bound (exclusive) |
424+
| `--to` | rev | HEAD | Upper bound (inclusive) |
425+
| `--path` | string | cwd | Repo path |
426+
| `--all-patterns` | flag | false | Also report code-smell patterns (default: secrets only) |
427+
| `--output` | choice | table | `table` or `json` |
428+
429+
### Examples
430+
431+
```bash
432+
repowise security scan --history
433+
repowise security scan --history --since v1.0.0 --output json
434+
```
435+
436+
---
437+
438+
## `coverage`
439+
440+
Ingest and inspect test-coverage reports (LCOV, Cobertura/Clover, coverage.py).
441+
442+
```bash
443+
repowise coverage SUBCOMMAND [OPTIONS]
444+
```
445+
446+
### Subcommands
447+
448+
| Subcommand | Description |
449+
|-----------|-------------|
450+
| `add [PATHS...]` | Ingest reports (auto-discovers when none given); builds per-test map when contexts are present |
451+
| `status` | Show ingested coverage + test-to-code map counts |
452+
453+
### Examples
454+
455+
```bash
456+
repowise coverage add
457+
repowise coverage add coverage.lcov
458+
repowise coverage add .coverage
459+
repowise coverage status
460+
```
461+
462+
---
463+
464+
## `impacted-tests`
465+
466+
Print the tests whose coverage intersects a change's changed lines. Requires a
467+
per-test map from `coverage add`.
468+
469+
```bash
470+
repowise impacted-tests [REVSPEC] [OPTIONS]
471+
```
472+
473+
### Options
474+
475+
| Flag | Type | Default | Description |
476+
|------|------|---------|-------------|
477+
| `--path` | string | cwd | Repo path |
478+
| `--staged` | flag | when no revspec | Diff staged changes |
479+
| `--format` | choice | table | `table`, `json`, or `list` (pipeable test ids) |
480+
481+
### Examples
482+
483+
```bash
484+
repowise impacted-tests
485+
repowise impacted-tests main..HEAD
486+
repowise impacted-tests main..HEAD --format list | xargs pytest
487+
```
488+
489+
---
490+
491+
## `workspace`
492+
493+
Manage multi-repo workspaces.
494+
495+
```bash
496+
repowise workspace SUBCOMMAND [OPTIONS]
497+
```
498+
499+
### Subcommands
500+
501+
| Subcommand | Description |
502+
|-----------|-------------|
503+
| `add` | Add a repo and (by default) index it |
504+
| `list` | Show workspace repos and status |
505+
| `remove` | Remove a repo from the workspace |
506+
| `scan` | Find new repos under the workspace root |
507+
| `set-default` | Change the primary repo |
508+
| `check` | Architecture lint (dependency rules / cycles) |
509+
| `metrics` | Architecture metrics |
510+
| `diagnostics` | Explain cross-repo contract link counts |
511+
512+
---
513+
514+
## `distill`
515+
516+
Run a command and print a compact, reversible rendering of its output.
517+
518+
```bash
519+
repowise distill <command>...
520+
```
521+
522+
### Examples
523+
524+
```bash
525+
repowise distill pytest -x
526+
repowise distill git status
527+
repowise distill npm run build
528+
```
529+
530+
---
531+
347532
## `decision`
348533

349534
Manage architectural decision records (ADRs).

0 commit comments

Comments
 (0)