---
name: rwyn
description: Use when working in a repository that uses `rwyn` to build graphs, verify a change, plan steps from diffs, explain why steps were chosen, dry-run the execution plan, or reason about repo-local `.rwyn/config.yaml`. Trigger for requests about change impact analysis, verification, step planning, `rwyn verify`, `rwyn plan`, `rwyn explain`, `rwyn run`, repo-local config, declarative `plugins:` transforms, or dogfooding CI/planning behavior.
---

# Rwyn

`rwyn` means "run what you need". Use this skill when the user wants to understand or operate the `rwyn` workflow in a repo.

## Workflow

1. Run from the target repo root when possible.
2. Check for `.rwyn/config.yaml` or `.rwyn/config.yml`. If present, prefer config-backed commands without repeating `--catalog`, `--graph`, or `--policy`.
3. Start with `rwyn doctor` if the repo setup is unclear.
4. Use the smallest command that answers the question:
   - use `rwyn setup` and `$setup` when the repo needs initial config or transform scaffolding
   - `rwyn verify` for the beta day-to-day loop: plan, inspect coverage, refresh stale or missing scoped evidence, replan, and optionally run
   - `rwyn plan` for what would run without maintaining coverage
   - `rwyn explain <file>` for why a file selects certain steps
   - `rwyn run --plan` for the layered execution plan
   - `rwyn run --dry-run` for the exact commands
   - `rwyn compare` and `rwyn ingest learn` for run-record analysis
5. When a result feels wrong, inspect it with `rwyn explain` before changing policy or engine code.

## Command Guide

- Health check:
  - `rwyn doctor`
- Get the agent setup contract:
  - `rwyn setup`
- Build or refresh the graph:
  - `rwyn build`
- Plan steps for the current branch diff:
  - `rwyn verify --base origin/main --dry-run`
  - `rwyn plan --base origin/main`
- Plan steps for local edits:
  - `rwyn plan --uncommitted`
- Maintain coverage evidence and run the final plan:
  - `rwyn verify --base origin/main --run`
- Explain one file:
  - `rwyn explain path/to/file.sol`
- Show the execution plan:
  - `rwyn run --uncommitted --plan`
- Show the concrete commands without running them:
  - `rwyn run --uncommitted --dry-run`

See [references/commands.md](references/commands.md) for a fuller command cookbook and interpretation notes.

## Interpretation

- `signal` is a planner score, not a bug severity score.
- Coverage is strong evidence for test scoping, but not the whole selection model.
- `rwyn verify` should make coverage maintenance feel automatic. Stale and missing scoped evidence should be refreshed before the final plan is trusted, while uncovered evidence should remain useful evidence rather than causing rerun loops.
- Import reachability is a fallback signal. Treat it as heuristic, not truth.
- Declarative `plugins:` transforms are the right place for repo quirks like interface/source links or generated bindings.
- Text-only changes should usually suppress semantic steps except for steps intentionally marked as text-sensitive.

## Output Expectations

- Prefer concise summaries over pasting massive JSON unless the user asked for raw output.
- For large scoped items, summarize the count and a short preview of scopes.
- If `rwyn` selects something surprising, name the exact step and the exact evidence path that caused it.
