Skip to content

Commit 44f921a

Browse files
singaraionaclaude
andcommitted
feat(plugin): add /raysense slash commands mirroring the six skills (plugin v0.5.0)
The raysense Claude Code plugin previously shipped only skills (model- triggered) and an MCP server (auto-called tools). To match plugins like finance — which expose both — add commands/{bootstrap,verify,drift, impact,query,audit}.md so users can type /raysense:bootstrap, etc. Each command is a templated prompt that invokes the same MCP tools the matching skill orchestrates, with positional arguments (path, plus window / file / question for the multi-arg ones). Plugin-only change: the Rust binary (raysense crate v0.10.0) is unchanged, so no tag and no crates.io publish — Claude Code picks up the new commands directly from the repo. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 1a8464d commit 44f921a

7 files changed

Lines changed: 92 additions & 2 deletions

File tree

‎claude-plugin/.claude-plugin/plugin.json‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "raysense",
3-
"version": "0.4.1",
4-
"description": "Architectural telemetry for AI coding agents. Phase-scoped skills over the raysense MCP server: scan + baseline at session start, blast-radius before edits, regression diff after, on-demand architecture audits, time-window drift detection.",
3+
"version": "0.5.0",
4+
"description": "Architectural telemetry for AI coding agents. Phase-scoped skills + slash commands over the raysense MCP server: scan + baseline at session start, blast-radius before edits, regression diff after, on-demand architecture audits, time-window drift detection.",
55
"author": {
66
"name": "Anton Kundenko",
77
"email": "anton.kundenko@gmail.com"

‎claude-plugin/commands/audit.md‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
description: Heavy structural audit — architecture review, evolution hotspots, test gaps, DSM. Run on demand, not in routine edit loop.
3+
argument-hint: <project-path>
4+
---
5+
6+
Run a heavy structural audit of the project at `$1`.
7+
8+
If `$1` is empty, treat the project root as the current working directory.
9+
10+
1. Call `raysense_architecture` with `path: $1` for top-level metrics, root-cause scores, cycles, levels, and unstable modules.
11+
2. Call `raysense_evolution` with `path: $1` for churn × coupling hotspots.
12+
3. Call `raysense_test_gaps` with `path: $1` for under-tested high-traffic files.
13+
4. Call `raysense_dsm` with `path: $1` for the dependency structure matrix.
14+
15+
Synthesize a written architecture review: structural strengths, the three biggest risks, and three concrete remediations to consider.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
description: Scan the project, save a baseline, and surface top hotspots / failing rules. Run once at the start of a session.
3+
argument-hint: <project-path>
4+
---
5+
6+
Bootstrap a raysense session for the project at `$1`.
7+
8+
If `$1` is empty, treat the project root as the current working directory.
9+
10+
1. Call `raysense_health` with `path: $1`. Note the overall grade and the weakest dimension.
11+
2. Call `raysense_baseline_save` with `path: $1` to persist the baseline (`$1/.raysense/baseline/`).
12+
3. Call `raysense_memory_summary` with `path: $1` to confirm the splayed tables are live; report row/column counts.
13+
4. Call `raysense_hotspots` and `raysense_rules` with `path: $1`. List the three hottest files and any rules currently failing.
14+
15+
Finish with a short summary: overall grade, weakest dimension, the three hottest files, and pre-existing rule failures (so later regressions can be told apart from baseline noise).

‎claude-plugin/commands/drift.md‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
description: Detect structural drift over a time window. Ranks worsened dimensions, newly hot files, newly tripped rules.
3+
argument-hint: <project-path> [window=30d]
4+
---
5+
6+
Detect structural drift in the project at `$1` over the `$2` window.
7+
8+
If `$1` is empty, treat the project root as the current working directory.
9+
If `$2` is empty, default the window to `30d`. Accepted values: `7d`, `30d`, `90d`, `all`.
10+
11+
1. Call `raysense_drift` with `path: $1` and `window: $2` (or `30d` if not given).
12+
2. Cross-check with `raysense_trend` over the same window for any dimension that visibly trended down.
13+
14+
Produce a punch list, ranked: dimensions that worsened most, files that became newly hot, rules that newly tripped. Include the magnitude of each delta.

‎claude-plugin/commands/impact.md‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
description: Compute the blast radius of a file before refactoring or deleting it. Reports dependents, coupling, cycle exposure.
3+
argument-hint: <project-path> <file>
4+
---
5+
6+
Compute the structural impact of changing `$2` in the project at `$1`.
7+
8+
If `$1` is empty, treat the project root as the current working directory.
9+
10+
1. Call `raysense_blast_radius` with `path: $1` and `file: $2` to enumerate direct and transitive dependents.
11+
2. Call `raysense_coupling` with `path: $1` to read the fan-in / fan-out profile for `$2`.
12+
3. Call `raysense_cycles` with `path: $1` to check whether `$2` participates in any cycle.
13+
14+
Finish with a verdict: is changing `$2` a local edit, a coupled edit (touch-and-test the dependents), or a structural edit (cycle / high fan-in — split the work)?

‎claude-plugin/commands/query.md‎

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
description: Answer a custom structural question against the saved baseline using Rayfall (select / .graph.* / Datalog).
3+
argument-hint: <project-path> <question…>
4+
---
5+
6+
Answer the following structural question against the raysense baseline at `$1`:
7+
8+
> $2
9+
10+
The first argument is the project path; everything after it is the question. If the project path is missing, treat it as the current working directory and the entire `$ARGUMENTS` as the question.
11+
12+
1. Call `raysense_baseline_tables` with `path: $1` to see the available tables and their columns.
13+
2. Decide the query shape:
14+
- **Select** (filter / project / aggregate) — for "files where X and Y" style questions.
15+
- **Graph algorithm** (`.graph.pagerank`, `.graph.louvain`, `.graph.topsort`, `.graph.shortest_path`, `.graph.k_shortest`, `.graph.betweenness`, `.graph.closeness`, `.graph.bfs`, `.graph.mst`) — for centrality, clustering, or reachability.
16+
- **Datalog** (transitive closure: `reaches`, `depends-on`, `tainted-by`) — for declarative reachability.
17+
3. Call `raysense_baseline_query` with `path: $1` and the chosen Rayfall expression.
18+
19+
Show the query you ran, then the result, then a one-line interpretation.

‎claude-plugin/commands/verify.md‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
description: Rescan after edits and diff against the session baseline. Flags new rule failures, newly-hot files, dimensions that worsened.
3+
argument-hint: <project-path>
4+
---
5+
6+
Verify that recent edits in `$1` have not regressed structural health.
7+
8+
If `$1` is empty, treat the project root as the current working directory.
9+
10+
1. Call `raysense_rescan` with `path: $1` to refresh the live scan and trend log.
11+
2. Call `raysense_baseline_diff` with `path: $1` to compare the current scan against the saved baseline.
12+
13+
Report deltas only: rules that newly tripped, files that became hot, dimensions that worsened. If nothing regressed, say so explicitly.

0 commit comments

Comments
 (0)