Skip to content
Back to skills

R Start

ASecurity

Use at the start of a session to reload project context and show current health, pipeline position, and open work.

  • 20 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 7, 2026
developmentgobashgit

Works with

  • cli

Security analysis

A100/100

Scanned November 7, 2026

npx -y skills add rfxn/rdf --skill r-start --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of R Start?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for R Start
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/rfxn-r-start/badge)](https://www.skillsdirectory.com/skills/rfxn-r-start)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: r-start
description: >
  Use at the start of a session to reload project context and show current health, pipeline position, and open work.
---

# /rdf:r-start — Session Initialization

Reload context and display project health. This is the recommended
first command in any session. It gives the agent a warm handoff —
enough context to continue where the last session left off.

## Progress Tracking

See [reference/progress-tracking.md](../reference/progress-tracking.md).
Single task: `Initialize session` / activeForm: `Loading project context`.
Mark `in_progress` at start, `completed` before the dashboard.

Fallback (Gemini CLI, Codex): `- [ ] Loading project context...` → `- [x] Session loaded`.

## Protocol

### 1. Clear Context

Run /clear to reset conversation context before loading fresh state.

### 2. Gather State

**Single-project** (cwd is a git repo):

Run ONE command to gather all state. Resolve `rdf-state.sh` using
this probe order — use the first path that exists:

1. `~/.rdf/state/rdf-state.sh` — delivered by `rdf deploy claude-code` (checkout) or the plugin SessionStart bootstrap
2. `<rdf-checkout>/state/rdf-state.sh` — the RDF checkout this deployment was generated from (dev installs only)

```bash
bash ~/.rdf/state/rdf-state.sh --full --env .
```

If neither path exists, skip to **Supplemental reads** below.

This returns a JSON blob with: project name, version, branch, HEAD,
dirty count + file names, recent commits, plan phases, governance
status, pipeline position, in-flight signals, session log last entry,
insights, and `env` (the offline environment brief from `rdf-env.sh`:
gap and warn counts plus the top two findings; `null` when the helper is
absent). Parse the JSON — do NOT make additional git/stat calls.

**Parent workspace** (cwd is NOT a git repo):
- Enumerate sub-project repos: directories containing `.git/`
- Resolve `rdf-state.sh` using the same probe order as single-project
- Run `~/.rdf/state/rdf-state.sh --full --no-insights` on each (or the 5 most recently modified)
- Read insights once globally: `tail -5 ~/.rdf/insights.jsonl` (do NOT
  rely on per-repo insights — they are identical global data)
- Aggregate: total repos, active (commits <24h), total dirty

**Supplemental reads** (only if rdf-state.sh is unavailable):

If the script cannot be found, gather state with individual commands.
Batch git commands into single bash invocations to minimize tool calls:
```bash
echo "HEAD=$(git rev-parse --short HEAD)" && \
echo "BRANCH=$(git branch --show-current)" && \
echo "DIRTY=$(git status --porcelain | wc -l)" && \
echo "AGE=$(git log -1 --format=%cr)" && \
git log --oneline -5
```

### 3. Display Dashboard

ONE consolidated block. This is the ONLY visible output from the
entire start operation.

**Target: under 20 lines for single-project, under 15 for workspace.**

---

**Single-project dashboard:**

```
### {Project} {version} — `{branch}` @ `{hash}` ({age}) · {pipeline}

| Plan | Dirty | Mode | Governance |
|------|-------|------|------------|
| {M}/{N} phases | {N} files | {mode} | {N} files ({T}h) |

{in-flight — only if signals exist}

{plan progress — capped at 5 phases}

{last session line}

{warnings — only if thresholds exceeded}

{insights — only if entries exist}
```

**Parent workspace dashboard:**

```
### {workspace} — {N} repos, {N} active · {most_recent_pipeline}

| Last Activity | Dirty | MEMORY.md |
|---------------|-------|-----------|
| {project}: `{hash}` ({age}) | {N} files / {M} repos | {N}/200 |

{in-flight signals across repos}

{recent activity — top 3 commits across repos}

{warnings}

{insights}
```

---

### Section rendering

**Heading** — one dense line packing: project, version, branch,
hash, age, and pipeline stage. Pipeline stage at the end tells the
user where they are in the arc (idle/spec/plan/build/ship).

**Status table** — one row, four columns. No multi-row tables.
If governance doesn't exist, replace that cell with `none — /rdf:r-init`.

**In-flight** — show only if signals fire:

```
> **In Flight**: {signal summary}
```

For 1-2 signals, pack into one line with semicolons:
```
> **In Flight**: Spec — pipeline design, Phase 2; Plan — 7 pending phases
```

For 3+ signals, use bulleted blockquote:
```
> **In Flight** — {N} signals
> - **Handoff**: {title} — {progress}
> - **Plan**: Phase 4 *in-progress*
> - **Spec**: {topic} — Phase {N}
```

Signal priority: Handoff > Spec > VPE > Ship > Build > Plan (in-progress) >
Plan (pending) > Dispatch (stale).

Signals and their display text (source `~/.rdf/state/rdf-bus.sh`; call `rdf_session_init`;
`plan_path="$(rdf_active_plan_path)"`; look for the current-session scoped file,
glob for any session-scoped file if absent, fall back to the legacy un-suffixed
file with a one-shot import prompt):
- `.rdf/work-output/spec-progress-${RDF_SESSION_ID}.md` exists (or glob
  `.rdf/work-output/spec-progress-*.md`) → `Spec — {topic}, Phase {N}`
- `.rdf/work-output/vpe-progress-${RDF_SESSION_ID}.md` exists (or glob
  `.rdf/work-output/vpe-progress-*.md`) → `VPE pipeline: {stage} — {status}`
- `.rdf/work-output/ship-progress-${RDF_SESSION_ID}.md` exists (or glob
  `.rdf/work-output/ship-progress-*.md`) → `Ship — {stage}, PR {url}`
- `.rdf/work-output/build-progress-${RDF_SESSION_ID}.md` exists (or glob
  `.rdf/work-output/build-progress-*.md`) → `Build: batch {N}/{total}, {completed}/{total} phases`

**Plan progress** — task list, capped at 5 visible phases:

```
- [x] Phase 1 — {desc, 30c max}
- [x] Phase 2 — {desc}
- [ ] **Phase 3 — {desc}** *(in-progress)*
- [ ] Phase 4 — {desc}
- [ ] Phase 5 — {desc}
  *+ 2 more phases*
```

Phase styling:
- `[x]` + plain = complete
- `[ ]` + **bold** + *(in-progress)* = current work
- `[ ]` + plain = pending
- `[ ]` + ~~strikethrough~~ + *(blocked)* = blocked

If >5 phases: show first 2 complete + current + next 2 pending,
then `*+ N more phases*` in italic. Full list is in `$plan_path`.

If no active plan resolves: omit section entirely. Pipeline stage in the
heading already signals `idle`.

**Last session** — one line, prefer session log over git log:

From session log (if exists):
```
Last: {N} commits · {diff_summary} · {pipeline} · ${cost} *({age})*
```

Render `· ${cost}` only when `session_last.tokens.cost_usd` is present
(written by `/rdf:r-save`); omit the segment otherwise.

Fallback (no session log) — 3 most recent commits:
```
- `{hash}` {message} *({age})*
- `{hash}` {message} *({age})*
- `{hash}` {message} *({age})*
```

**Warnings** — one blockquote line, pipe-separated:

```
> ▶ Governance {T}h old — `/rdf:r-refresh` | MEMORY.md {N}/200 — previewed compaction saves {M} lines | Context ~{N}% — fresh session or `/half-clone` | Env {N} to fix: {title}; {title} — `/rdf:r-env`
```

When MEMORY.md ≥180, run `/rdf:r-util-mem-compact` in preview mode and render the
proposed reduction inline (auto-act, not a passive warning). When estimated
context >60%, render the fresh-session/`/half-clone` directive.

Thresholds:
- Environment: `env.gap + env.warn` > 0 (missing language server or plugin
  for the project's languages, missing project tools, low hard fd limit);
  name at most the two `env.top` titles
- Governance stale: >24 hours
- Dirty state: >5 files
- Status file stale: >1 hour
- Memory size: >=180 lines → auto-run `/rdf:r-util-mem-compact` preview
- Context: >60% estimated → directive (fresh session / `/half-clone`)

If no thresholds exceeded, omit entirely.

**Insights** — at the bottom, no heading or rule needed:

```
> **Insights**
> - **{project}**: {insight text} *— {tool}, {age}*
> - {insight text} *— {project}, {tool}, {age}*
> {N} lessons indexed (fetch by ID) — injected at session start
```

The lessons ID-index itself is injected by the SessionStart hook (read-only),
not by `/rdf:r-start`; `/rdf:r-start` only surfaces the count on the last line above.

Selection (two-tier, 3 max):
1. Most recent project-matching entry = pinned (bold project name)
2. 2 most recent from remaining entries = universal
3. No project match = 3 most recent universal
4. Fewer than 3 total = show what exists

If no insights exist, omit entirely.

### 4. Load CLAUDE.md

Read the project's `CLAUDE.md` (if present) to internalize project
instructions. Do NOT display its contents — just confirm loaded.

## Rules
- Do NOT load full governance file contents — only the index
- Do NOT read full plan prose — extract phase names and statuses
  from the resolver-returned path (`$plan_path`)
- Do NOT read MEMORY.md — it loads automatically
- Do NOT run tests, lint, or any expensive operations
- Keep total output under 20 lines
- Target under 5 seconds wall time — batch git commands

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.