← Back to Crit

Integrations

Teach your agent to plan first.

Drop one file into your project. Your agent writes a plan, launches Crit for review, and waits for your feedback before writing code.

Add the /crit slash command. It finds the plan, launches Crit, reads your comments, and revises the plan automatically.

Copy to .claude/commands/crit.md

.claude/commands/crit.md
---
description: "Review the current plan with crit inline comments"
allowed-tools: Bash(crit:*), Bash(command ls:*), Read, Edit, Glob
---

# Review Plan with Crit

Review and revise the current plan using `crit` for inline comment review.

## Step 1: Find the plan file

Determine which plan file to review, using this priority:

1. **User argument** - if the user provided `$ARGUMENTS` (e.g., `/crit my-plan.md`), use that file path
2. **Recent plans** - check for `.md` files in `~/.claude/plans/`, excluding `*-agent-*.md` and `*.review.md`:
   ```bash
   command ls -t ~/.claude/plans/*.md 2>/dev/null | grep -v -E '(-agent-|\.review\.md$)' | head -5
   ```
3. **Current directory** - search for plan-like `.md` files in the working directory

Show the selected plan file to the user and ask for confirmation before proceeding.

## Step 2: Run crit for review

Run `crit` **in the background** using `run_in_background: true`:

```bash
crit <plan-file>
```

Tell the user: **"Crit is open in your browser. Leave inline comments on the plan, then click 'Finish Review'. Type 'go' here when you're done."**

Wait for the user to respond before proceeding.

## Step 3: Read the review output

After the user confirms, read the review file at `<plan-file-stem>.review.md` using the Read tool.

Identify all `> **[REVIEW COMMENT` blocks. Each block contains feedback about the section above it.

## Step 4: Address each review comment

For each review comment:

1. Understand what the comment asks for (clarification, change, addition, removal)
2. If a comment contains a suggestion block (indented original text with edits), apply that specific change
3. Revise the **original plan file** (not the review file) to address the feedback
4. Use the Edit tool to make targeted changes

Editing the plan file triggers Crit's live reload - the user sees changes in the browser immediately.

**If there are zero review comments**: inform the user no changes were requested and stop the background `crit` process.

## Step 5: Signal completion

After all comments are addressed, signal to crit that edits are done:

```bash
crit go <port>
```

The port is shown in crit's startup output (default: a random available port). This triggers a new review round in the browser with a diff of what changed.

## Step 6: Summary

Show a summary:
- Number of review comments found
- What was changed for each
- Any comments that need further discussion

Ask the user if they want another review pass or if the plan is approved for implementation.

CLAUDE.md snippet (optional)

Append to your CLAUDE.md

CLAUDE.md
# Crit - Plan Review

Before implementing any non-trivial feature, write an implementation plan as a markdown file.

After writing the plan, launch Crit to open it for review:

```bash
crit $PLAN_FILE
```

Tell the user: "I've opened the plan in Crit for review. Leave inline comments, then click Finish Review. Type 'go' here when you're done."

Do NOT begin implementation until the user has reviewed and approved the plan.

After review, read the `.review.md` file to see the user's inline comments. Address each comment by revising the original plan file. The file change triggers Crit's live reload so the user can review again.

When `crit go <port>` is called (or the user says the plan is approved), proceed with implementation.