# radar

Adopt this skill: https://proskills.md/skills/other/jake-network-radar-integrations-claude-code-skills-radar

Page: https://proskills.md/skills/other/jake-network-radar-integrations-claude-code-skills-radar
This document is the public skill bundle for that page. It contains SKILL.md and every helper file the catalog carries. No login is required.

## File: integrations/claude-code/skills/radar/SKILL.md
size: 8000
upstream: https://github.com/jake-network/radar/blob/main/integrations/claude-code/skills/radar/SKILL.md

```text
---
name: radar
description: Check that parallel agent branches integrate before merging (radar_gate), and ground feature design, multi-agent task splits and implementation checks in Radar repository evidence. Use for changes that touch shared API contracts, span several modules or agents, or need a reviewed plan and verifiable acceptance criteria.
---

# Radar workflow for Claude Code

Radar is a local CLI (and MCP server) that indexes the repository, checks
structured plans against it, and verifies implementations. Use the `radar_*`
MCP tools when they are available; otherwise run the `radar` binary from the
repository root with `--json`. If neither is available, say so; never invent
Radar output.

## 0. Before merging parallel work: `radar_gate`

When several agents or worktrees changed the repository, call `radar_gate`
(or `radar gate --json`) before proposing a merge. With no arguments it
combines every worktree branch that has commits beyond the base, in private Git
state, and reports conflicts, breaking contract changes and the branches whose
files each finding points at (`attribution`). It never runs repository code.
Its `next` field is the command to run next; `radar gate --run` (tests on the
combined tree) executes repository code, so ask the user before running it.
Repair findings on the branch named in `attribution`, commit, and rerun the
gate; results for individual branches never prove the combination works. After
`--run`, an `attribution` whose `basis` starts with `observed` comes from
rerunning the failed test on fewer branches; `inferred` comes from imports.
Gate and watch default to zero diagnostic reruns. After execution is authorized,
opt in with `--run --attribution-runs 8` for diagnostic subset observations.

Reading the result: `gate.verdict` is `pass`, `fail`, `blocked` or `error`
(exit 0, 1, 1, 2). `PASS (static)` means no test ran; say so when you hand
off. A required check is satisfied only by `passed`. `blocked` means
required evidence is missing (including a documentation-only change, for
which no test ran): report `next` and the gaps in `selection.blocking` and
`uncovered_changes`; never call it a pass.
Gate lists uncommitted changes in `worktrees` but checks committed inputs only.
For continuous previews use CLI `radar watch --include-dirty --jsonl`: it includes
saved staged, unstaged and nonignored untracked changes in selected worktrees.
Unsaved buffers and ignored files are excluded. Add `--run` only with explicit
execution authorization; it repeatedly executes with host permissions. Dirty
preview evidence does not prove the committed branches passed. In JSONL,
`changed` or `error` invalidates the current verdict; correlate `completed`
results with `state.key`. `verification_state` is current; `last_completed` and
`last_change` are event timestamps. Heartbeats contain no report; optional
`attributed` events leave the Fast Gate verdict unchanged.

`radar doctor --json` shows the base, branches gate will combine and whether test
runner programs are on PATH (`project`). `radar help agents` prints this contract
in short.

In a workspace (`radar workspace add PATH` groups repositories on this
machine), the same call checks every workspace repository, each combined on
its own. Pass `targets` (for example `orders:agent/api,payments:agent/client`)
to name branches in several repositories; unnamed repositories take part at
their base. Declared workspace links compare producer schemas with consumer
fields across base/candidate combinations. Only `cross_repo.status: passed`
is evidence that the declared, supported static links passed; per-repository
passes alone do not establish cross-repository compatibility. Check `links`
for incomplete inputs and intermediate-cell failures. Runtime behavior and
rollout safety remain unverified by these static checks. `suggested_links` are
proposals and never affect the verdict. To declare one, use the CLI
`radar workspace connect PRODUCER CONSUMER_REPO --fields a,b --direction response`
(with `request` for request contracts and optional `--source PATH` / `--into repo:PATH`),
then commit the home repository's `.radar/workspace.json` and the consumer's
`.radar/consumes.json`. Gate reads the committed home base declaration; replay
pins the recorded base and team blob. `.radar/contracts.json` describes links
within a repository; workspace links cross repositories. MCP does not expose
`connect`.

## 1. Ground the design

1. `radar_doctor` (or `radar doctor`). If `initialized` is false, run `radar_init` once.
2. Pick a committed baseline SHA and run `radar_index` with `ref` set to it.
3. `radar_plan` with the feature intent and the same `ref`. Read the context
   file it writes: lexical matches plus files that import or are imported by
   them (`DEPENDS_ON` edges are inferred from import paths, not compiler-verified).
4. Investigate the actual source before designing. Use `radar_resolve` to turn
   names or `path#Qualified.Name` into entity IDs and `radar_graph` with
   `from`, `edge: DEPENDS_ON`, `reverse: true` to find dependents.

## 2. Fill and check the plan

Edit the generated plan JSON: requirements, decisions with alternatives and
tradeoffs, tasks (`components` are entity IDs, `contracts` are binding IDs from
`.radar/contracts.json`), `depends_on`, acceptance criteria with deterministic
`rule`s, and assumptions.

- Assumptions are objects: `{"id", "text", "status", "resolution"}`. Leave them
  `open` until investigated. Mark `resolved` (with evidence) or `accepted` (with
  who accepts the risk and why) only when that is true. Never delete an
  assumption to make verification pass.
- `test_run` rules declare exact argv and optional repository-relative `cwd`. Add `setup` steps, `env` names, `link`
  paths (e.g. `node_modules`, `.venv`) or a `junit` report path when the test
  needs them. Candidate integration does not support host dependency links; use
  reviewed setup inside private state when dependencies are needed.
- Empty `incomplete` only when the design is actually complete.

Run `radar_preflight` and follow its `next_steps` until no errors remain.
`radar_contracts` lints the contract manifest and flags stale consumer fields.

## 3. Review and split work

Present consequential decisions to the user. Only after a human has reviewed
the plan may the user run `radar approve --plan PATH --reviewer NAME`; never run
it on their behalf or invent a reviewer. `radar_tasks` returns the DAG, parallel
groups and self-contained instruction packets for parallel agents or worktrees.
Linked Git worktrees share the main checkout's Radar state and entity IDs, so
evidence recorded in one worktree verifies in another.

## 4. Check what shipped

- `radar_affected` (base = baseline, head = WORKTREE or a commit) lists files,
  contracts and plan tasks reached through import dependencies.
- `radar_impact` / `radar_scan` compare declared contracts at committed
  checkpoints. A status of `incomplete` means some bindings were not analyzed;
  that is not a pass.
- Test execution runs repository code, so it needs the user's explicit opt-in:
  ask them to run `radar test --plan PATH --ref SHA --allow-execution -- ARGV`.
  A status of `error` means the command failed before any test ran (missing
  dependency, build or setup failure), not that tests failed.
- `radar_verify` with `ref` and `evidence` IDs. Report passed, failed, unknown
  and blocked checks exactly as returned. Working-tree verification is
  informational.

This skill does not authorize merges, rebases, resets, pushes or external messages.

## Combined integration and bounded repair

Start a repository without manual bindings with `radar check --base BASE --suggest-tests --json`.
Use `radar discover --json` for evidence-backed proposed relationships; review
uncertainties before explicitly accepting any manifest. Lexical similarity is
not runtime proof. MCP equivalents are `radar_check` and `radar_contracts_discover`.
For `radar_check`/`radar_merge_
```

## File: README.md
upstream: https://github.com/jake-network/radar/blob/main/README.md

````text
<p align="center"><img src="docs/assets/radar-logo.svg" width="96" alt="Radar logo: a radar scope whose sweep has found where two branches meet"></p>

# Radar

**When an agent says “done”, see what was checked and what still needs checking.**

Radar is the integration layer for parallel coding agents:

- **Combine:** check their combined committed tree before merging.
- **Land:** inspect branch pairs, stacks, landing order and conflict repair briefs.
- **Prove:** retain what was checked in local records, commit trailers and opt-in PR checks.

Radar checks committed agent branches together before you merge. Two green
branches can still break when combined. It builds their combination privately,
checks it without running repository code, and explains missing evidence.
Tests run only when you request them. No API key, telemetry, or changes to your
branches.

```sh
radar gate
```

The result shows checks that passed, conflicts with source locations, and checks
that could not finish. `radar gate --run` adds related tests when you authorize
execution. [Install](#install), then try the one-minute example below.

<p><img src="docs/assets/migration-demo.gif" width="960" alt="30-second static migration fixture: separate branches pass, combined branches fail, corrected migration chain passes. No repository tests run."></p>

[Full demo transcript](docs/assets/migration-demo.txt). This is a fixture demonstration.
Real-history replay is available; **human-labeled recall is not yet available**.
See [benchmark methods](docs/BENCHMARKS.md) for measurement scope and limitations.

## Try it in one minute

Two agents edit separate branches. Each branch passes its tests. Combined,
they fail. Paste this into a shell after [installing](#install) Radar (it
needs Git and Python 3 and works in a new temporary directory):

```sh
cd "$(mktemp -d)" && git init -q -b main shop && cd shop
git config user.name demo && git config user.email demo@example.com
printf 'def price():\n    return 1\n' > backend.py
printf 'export const QUANTITY = 1;\n' > frontend.ts
cat > test_checkout.py <<'PY'
import re, unittest
from pathlib import Path
from backend import price

class Checkout(unittest.TestCase):
    def test_budget(self):
        quantity = int(re.search(r"QUANTITY = (\d+)", Path("frontend.ts").read_text())[1])
        self.assertLessEqual(price() * quantity, 2)
PY
git add . && git commit -qm baseline
git worktree add -q -b agent-backend ../backend
git worktree add -q -b agent-frontend ../frontend
printf 'def price():\n    return 2\n' > ../backend/backend.py
git -C ../backend commit -qam 'Raise price'
printf 'export const QUANTITY = 2;\n' > ../frontend/frontend.ts
git -C ../frontend commit -qam 'Raise quantity'

radar gate          # PASS (static): the branches merge cleanly; no test ran
radar gate --run    # FAIL: the combined tree breaks the budget test
```

<p align="center"><img src="docs/assets/gate-run.svg" alt="radar gate --run in a terminal: FAIL, 1 of 1 test command failed on the combined tree, with the failing case, the branch to look at and the next command" width="860"></p>

<details>
<summary>The same report as plain text</summary>

```console
$ radar gate --run
Radar gate: FAIL — 1 of 1 test command failed on the combined tree
2 branches onto main @ e4d5f9ed44f0

  agent-backend   2b02738cceb2  1 file changed
  agent-frontend  93f3399937e6  1 file changed

  ✓ Merge           branches merge without conflicts
  · Contracts       none declared, so no contract was checked (radar discover proposes candidates)
  ✗ Tests           1 of 1 test command failed on the combined tree
  ? Test selection  incomplete — 1 changed file has no related test
  policy supported-integration requires textual_merge, no_breaking_contracts, integration_execution, test_selection

Problems
  ✗ integration_execution_failed
    Combined verification command python3 -m unittest discover -s . -p test_checkout.py (in .) returned failed (exit 1).
    failed cases: test_checkout.Checkout.test_budget
    look at (import-based lead): agent-backend (backend.py)
    reproduce: d=$(mktemp -d) && git worktree add --detach "$d" e4d5f9ed44f0 && cd "$d" && git merge --no-ff --no-edit --no-verify 2b02738cceb2 && git merge --no-ff --no-edit --no-verify 93f3399937e6 && python3 -m unittest discover -s . -p test_checkout.py
    fix: Reproduce the supplied command on the combined changes, reconcile producer/consumer assumptions, and repair the failing invariant.

Tests (balanced): ran 1 of 1 selected command
  ✗ python3 -m unittest discover -s . -p test_checkout.py  (in .; 1 recognized test)
  Test files: 1 inventoried, 1 selected (relationships are not behavioral coverage)
  ? Uncovered changes (no established test relationship): frontend.ts
    Resolve with supported tests, review --suite full, or explicitly select a limited --policy.

Next: repair on the branches above, commit, then rerun: radar gate --run
Details: add --json. Radar never touches your branches; the combination is built in private Git state.
```

</details>

`look at` is an import-based repair lead, not proof of blame. Failed commands
are automatically checked once on base within the shared command/time budget.
Failures already present there leave verification NOT VERIFIED and have no
branch lead; additional candidate failures still FAIL. If the base check cannot
run or compare identities, the candidate failure remains FAIL. Optional subset
diagnostic reruns are off by default. Use `radar gate --run --attribution-runs 8` to look
for a smaller branch combination that reproduces the failure; `observed` lines
describe those bounded reruns and remain repair leads. The
`reproduce` line rebuilds the same commits in a throwaway worktree under a
new temporary directory (remove it later with `git worktree remove`). It
skips commit hooks like Radar does, but checkout and merge hooks, your Git
configuration and your environment still apply, so it can differ from
Radar's sanitized run.

## Install

Linux (amd64, arm64) and macOS (Apple Silicon, Intel):

```sh
curl -fsSL https://raw.githubusercontent.com/Jake-Network/radar/v0.2.0/scripts/install-release.sh | bash -s -- --version v0.2.0
```

This installs a checksum-verified binary to `~/.local/bin` (`--dir` changes it).
Binaries need no Go or C compiler; Git is required, and `radar gate --run` uses
your repository's own test runners. Then:

```sh
radar doctor
```

Windows binaries are not published yet. This checkout disables private Git
line-ending conversion and adds native qualification jobs; those jobs still need
successful hosted runs. Build from source with Go 1.23+ and a native C compiler
(for Tree-sitter):

```sh
git clone --branch v0.2.0 --depth 1 https://github.com/Jake-Network/radar.git
cd radar
go build -trimpath -o radar ./cmd/radar
```

Use the GitHub binary installer or tag checkout for 0.2.0. The version's
earlier source commit was cached by the Go module proxy before the hook release;
`go install ...@v0.2.0` can therefore install that earlier implementation.

To install the current development checkout, use `go install ./cmd/radar` from
its root. Landing, cross-worktree drift, trailer/show and SCIP described here are
development additions, not features retroactively added to the v0.2.0 binaries.
Local [Claude Code/Codex marketplace packages](integrations/plugins/README.md)
can install the hook and skill after Radar is on PATH. These local catalogs have
not been submitted to an external marketplace. Release packaging generates a
Homebrew formula; a published tap still requires a qualified release.

Release details and runtime limits: [RELEASING](docs/RELEASING.md).

The 0.2.0 release adds continuous saved-change previews and installable native
coding-agent Stop hooks. See the [changelog](CHANGELOG.md) for the release scope.

## First run in your repository

```sh
radar doctor          # base, agent branches, uncommitted worktrees, test runners, next step
radar setup claude    # optional: connect C
````
