/rdf:r-refreshfrom RDF: rfxn Development Framework
Re-scans the codebase and regenerates governance documentation to match current reality, preserving user modifications. Useful when governance files have drifted from source.
Ships in RDF: rfxn Development Framework. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
You are running the /rdf:r-refresh governance refresh. This command re-scans the codebase and updates governance files to match current reality, preserving user modifications.
$ARGUMENTS — optional scope:
all: full refresh (governance + state files)governance: refresh .rdf/governance/ files onlystate: refresh MEMORY.md and the active plan only (v2 behavior)github: sync GitHub issue state with local plan (deterministic)At command startup, create tasks for live progress tracking:
TaskCreate: subject: "Re-scan codebase" activeForm: "Scanning codebase" TaskCreate: subject: "Re-ingest authoritative files" activeForm: "Ingesting convention files" TaskCreate: subject: "Update governance files" activeForm: "Updating governance" TaskCreate: subject: "Validate governance accuracy" activeForm: "Validating governance" TaskCreate: subject: "Refresh state files" activeForm: "Refreshing state files" TaskCreate: subject: "Generate output summary" activeForm: "Generating summary"
Issue each TaskCreate in its own message, in the order shown — see
reference/progress-tracking.md
for why parallel batches break display order.
Lifecycle: all tasks start pending. Before starting each stage, mark its task in_progress. After completing, mark completed.
Mark task "Re-scan codebase" as in_progress.
Re-run the /rdf:r-init codebase analysis against current state:
Run /rdf:r-util-code-scan all and parse the per-pattern row counts from
its ## Per-Pattern Summary table (one row per pattern class with
total match count). Compare against .rdf/governance/.scan-baseline.json
(the snapshot from the prior refresh or /rdf:r-init run).
Snapshot schema — one entry per pattern class:
{
"version": "3.1.0",
"timestamp": "2026-04-26T00:00:00Z",
"patterns": {
"bare-coreutils": 12,
"silent-error": 3,
"backtick-usage": 0
}
}
Delta surface: only pattern classes where the count changed since the snapshot. Surface in Stage 6c (Drift Detection) — do NOT emit a full findings table here.
After comparison, overwrite .scan-baseline.json with the new
counts so the next refresh measures drift from the current state.
First-run behavior (no snapshot file): create the baseline, emit
*Baseline created — {N} pattern classes, {M} total hits* in the
Stage 6 summary, and skip the delta block.
This stage is skipped when $ARGUMENTS is state or github —
anti-pattern drift is governance-scope, not state-scope.
Mark task "Re-scan codebase" as completed.
Mark task "Re-ingest authoritative files" as in_progress.
Mark task "Re-ingest authoritative files" as completed.
Mark task "Update governance files" as in_progress.
For each governance file in .rdf/governance/:
# Added by /rdf:r-refresh heading
if any default is missing from the current file. If ignore.md does
not exist (pre-3.0.6 project), create it with the full default set
from ignore-defaults.md.Mark task "Update governance files" as completed.
Mark task "Validate governance accuracy" as in_progress.
Mark task "Validate governance accuracy" as completed.
Mark task "Refresh state files" as in_progress.
rdf_active_plan_path) phase statuses~/.rdf/state/rdf-bus.sh; rdf_session_init; resolve
plan_path="$(rdf_active_plan_path)". If empty, skip. If the helper is
absent (helpers not yet bootstrapped — fresh plugin install before its
first session restart), skip this active-plan refresh — the rest of
/rdf:r-refresh proceeds; restart the session (plugin) or run rdf deploy claude-code (checkout) to deliver them.$plan_path phases against git log.Mark task "Refresh state files" as completed.
Mark task "Generate output summary" as in_progress.
Keep total output under 50 lines. Use tables, task lists, and blockquotes over prose — see the Formatting Guide section below.
A 4-column key-value table identifying the project and refresh scope.
### Refresh: {project}
| Property | Value | Property | Value |
|----------|-------|----------|-------|
| **Version** | {version} | **Branch** | `{branch}` |
| **HEAD** | `{hash}` ({age}) | **Scope** | *{all/governance/state/github}* |
| **Governance** | {N} files | **User-modified** | {N} files |
Use a table with per-file rows. Status keywords in italic, paths in inline code.
### Governance
| File | Status | Detail |
|------|--------|--------|
| `index.md` | *updated* | regenerated from scan |
| `architecture.md` | *unchanged* | no drift |
| `conventions.md` | *merged* | user-modified — 2 sections preserved |
| `verification.md` | *updated* | added shellcheck rule |
| `constraints.md` | *unchanged* | no drift |
| `anti-patterns.md` | *updated* | 1 new pattern |
Status values: updated, unchanged, merged (user-modified file), created (new file), removed (stale file deleted).
Use a blockquote with bold header. Only show this section if drift was detected — omit entirely when clean.
> **Drift Detected** — {N} items
> - `constraints.md` says Bash 4.2+ but `files/internals.conf` uses `${var,,}` (Bash 4.0+)
> - `conventions.md` lists pytest but no Python files remain in tree
> - `architecture.md` references `lib/legacy/` which was removed in `a3f1b2c`
> - Anti-pattern drift: `bare-coreutils` +3 since last refresh, `silent-error` -1
Each drift item: inline code for file paths and commits, plain text
for the description. Anti-pattern drift lines come from Stage 1d
delta — one summary line listing every pattern class whose count
changed, sign-prefixed (+N / -N). Do NOT list per-file hits
here — direct the user to /rdf:r-util-code-scan <class> for detail.
Use a table for state file refresh results. Paths in inline code, status in italic, detail column for metrics.
### State Files
| File | Status | Detail |
|------|--------|--------|
| `MEMORY.md` | *updated* | +3 new commits, 142/200 lines |
| `$plan_path` | *updated* | 2 phases marked complete |
| `spec-progress-<SESSION_ID>.md` | *updated* | cross-referenced with `docs/specs/` |
| `ship-progress-<SESSION_ID>.md` | *updated* | stage validated against git tags |
| GitHub | *synced* | 4 issues closed, 1 reopened |
Recognized state artifacts in .rdf/work-output/ that refresh should
cross-reference: session-log.jsonl, phase-*-status.md,
current-phase.md, agent-feed.log, spec-progress-<SESSION_ID>.md,
ship-progress-<SESSION_ID>.md.
Status values: updated, skipped (out of scope), not found, synced, not configured.
Use a task list to show what was done vs skipped. This provides an at-a-glance audit trail. Bold each stage label.
### Summary
- [x] **Codebase scan** — 6 detectors, 2 changes found
- [x] **Authoritative re-ingest** — `CLAUDE.md` unchanged
- [x] **Governance update** — 3 files updated, 1 merged, 2 unchanged
- [ ] ~~**State refresh**~~ — *skipped (scope: governance only)*
- [ ] ~~**GitHub sync**~~ — *skipped (scope: governance only)*
- [x] **Validation** — all references resolve, 0 low-confidence items
Task list styling:
[x] + bold = completed stage[ ] + [ ] + bold + (in-progress) = interrupted (partial refresh)Use a blockquote with bold header. Only show this section if there are items to review — omit entirely when clean.
> **Low-Confidence Items** — review recommended
> - `conventions.md`: inferred `mawk` from Dockerfile but no `.awk` files found
> - `constraints.md`: detected CentOS 6 in CI matrix but no CentOS 6 test target
Collect and display warnings using a blockquote. Only show if there are warnings. Use inline code for commands and paths.
> **Warnings**
> - `MEMORY.md` at 185/200 lines — run `/rdf:r-util-mem-compact`
> - User-modified file `conventions.md` had merge conflicts — review manually
> - Governance age was 72h before this refresh
Available markdown primitives and when to use them:
| Primitive | Syntax | Best for |
|---|---|---|
| Table | | col | col | | File status, dashboards, key-value pairs |
| Task list | - [x] / - [ ] | Completion tracking, stage audit trail |
| Blockquote | > | Drift, warnings, low-confidence callouts |
| Bold | **text** | Labels, stage names, section headers in lists |
| Italic | *text* | Status keywords, scoping reasons, parentheticals |
| Inline code | `text` | Paths, hashes, commands, filenames |
| Strikethrough | ~~text~~ | Skipped stages, out-of-scope items |
| Heading | ## / ### | Major / minor section breaks |
Do NOT use (not rendered in Claude Code):
HTML tags, <details>, ANSI color codes, Mermaid diagrams, footnotes.
Mark task "Generate output summary" as completed.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub rfxn/rdf --plugin rdf38 skills in this plugin
/r-auditUse when you want a full codebase audit: dispatches parallel reviewer and QA passes across the tree.
/r-audit-slopAI slop audit. Finds dead code, orphan helpers, noop functions,
/r-buildUse when a plan exists and you want it built: dispatches the plan-execution orchestrator (engineer/QA/review gates) per phase at the right tier.
/r-context-auditMeasure, score, and report on Claude Code context overhead for this
/r-envUse to assess the environment against an optimal Claude Code + RDF setup: code intelligence plugins and language servers, tools, limits, sandbox, Claude Code currency, .claude files and the price table, with exact fix commands.
/r-initUse to initialize RDF governance on a new or existing repository.
Other plugins' skills for the same job