Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions .claude-plugin/marketplace.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"name": "hartbrook-plugins",
"owner": {
"name": "HartBrook"
},
"metadata": {
"description": "Claude Code plugins by HartBrook"
},
"plugins": [
{
"name": "look",
"source": "./src",
"description": "Sequential code review with fresh agent contexts. Runs multiple independent review passes to catch more issues.",
"version": "0.2.0",
"author": { "name": "HartBrook" },
"repository": "https://github.com/HartBrook/lookagain",
"license": "MIT",
"keywords": ["code-review", "quality", "iterative", "multi-pass"],
"commands": ["./commands/again.md", "./commands/tidy.md"],
"agents": ["./agents/lookagain-reviewer.md"],
"skills": ["./skills/lookagain-output-format"],
"strict": false
}
]
}
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,23 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.2.0] - 2026-01-28

### Added

- `/look:tidy` command for pruning old review runs
- Marketplace manifest (`.claude-plugin/marketplace.json`) for plugin discovery
- Target scope selection: `staged`, `commit`, `branch`, or a specific path
- Model selection: `thorough`, `balanced` (Sonnet), `fast` (Haiku)
- Marketplace install/test workflow in CONTRIBUTING guide

### Changed

- Streamlined reviewer agent prompt for clarity and focus
- Restructured `/look:again` command with clearer argument handling
- Expanded README with target scopes, model options, and tidy usage
- Hardened `test.sh` with marketplace manifest validation

## [0.1.0] - 2026-01-26

### Added
Expand Down
26 changes: 24 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,12 @@

```
lookagain/
├── .claude-plugin/
│ └── marketplace.json # Marketplace manifest
├── src/
│ ├── commands/ # Plugin commands
│ │ └── again.md # Main orchestrator
│ │ ├── again.md # Main orchestrator
│ │ └── tidy.md # Tidy old review runs
│ ├── agents/ # Subagent definitions
│ │ └── lookagain-reviewer.md
│ ├── skills/ # Output format specs
Expand Down Expand Up @@ -50,6 +53,23 @@ make help

`make dev` builds the plugin and starts a new Claude Code session with it loaded. Test with `/look:again`.

### Testing via Marketplace (local)

You can also test the plugin through the marketplace install flow, which is closer to what end users experience:

```bash
# First time: add the local marketplace
/plugin marketplace add ./

# Install the plugin
/plugin install look@hartbrook-plugins

# After making changes, reinstall to pick them up
/plugin uninstall look@hartbrook-plugins
/plugin marketplace update hartbrook-plugins
/plugin install look@hartbrook-plugins
```

### Making Changes

1. Edit files in `src/`
Expand All @@ -63,6 +83,8 @@ make help
- **[src/agents/lookagain-reviewer.md](src/agents/lookagain-reviewer.md)**: Reviewer subagent. Defines how individual review passes work.
- **[src/skills/lookagain-output-format/SKILL.md](src/skills/lookagain-output-format/SKILL.md)**: JSON output format specification.
- **[src/dot-claude-plugin/plugin.json](src/dot-claude-plugin/plugin.json)**: Plugin metadata and version.
- **[src/commands/tidy.md](src/commands/tidy.md)**: Tidy command for pruning old review runs.
- **[.claude-plugin/marketplace.json](.claude-plugin/marketplace.json)**: Marketplace manifest for plugin discovery and installation.

## Pull Requests

Expand All @@ -75,4 +97,4 @@ make help

## Versioning

Update the version in `src/dot-claude-plugin/plugin.json` when making releases.
Update the version in `src/dot-claude-plugin/plugin.json` when making releases. The marketplace entry in `.claude-plugin/marketplace.json` also has a `version` field — keep both in sync. The test suite (`make test`) validates that commands, agents, and skills match between the two files.
73 changes: 58 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,35 +34,64 @@ A single code review pass catches ~60-70% of issues. Running multiple independen
## Installation

```bash
# Add the marketplace (if not already added)
# Add the marketplace
/plugin marketplace add HartBrook/lookagain

# Install the plugin
/plugin install lookagain
/plugin install look@hartbrook-plugins
```

## Usage

```bash
# Basic: 3 review passes with auto-fix for must_fix issues
# Review staged changes (default)
/look:again

# Review the last commit
/look:again target=commit

# Review all changes on the current branch
/look:again target=branch

# Review a specific directory
/look:again target=src/auth

# More passes for critical code
/look:again passes=5

# Review specific directory
/look:again target=src/auth
# Use a faster, cheaper model for reviewers
/look:again model=fast

# Balanced cost/quality
/look:again model=balanced

# Disable auto-fix (review only)
/look:again auto-fix=false

# Increase max passes for stubborn issues
/look:again passes=3 max-passes=10
# Combine options
/look:again target=branch passes=5 model=fast
```

### Target Scopes

| Target | What gets reviewed |
| --- | --- |
| `staged` (default) | Files in the git staging area |
| `commit` | Files changed in the last commit |
| `branch` | All changes on the current branch vs base |
| `<path>` | Files in the given directory or path |

### Model Options

| Model | Engine | Best for |
| --- | --- | --- |
| `thorough` (default) | Inherits current model | Critical code, security-sensitive reviews |
| `balanced` | Sonnet | Good balance of cost and quality |
| `fast` | Haiku | Quick checks, large codebases, cost-conscious usage |

## How It Works

1. **Pass 1**: Fresh subagent reviews code, outputs findings as JSON
1. **Pass 1**: Fresh subagent reviews scoped changes, outputs findings as JSON
2. **Fix**: Must-fix issues are automatically fixed (if auto-fix enabled)
3. **Pass 2**: New fresh subagent reviews (doesn't know what Pass 1 found)
4. **Fix**: Any new must-fix issues are fixed
Expand All @@ -74,20 +103,34 @@ Issues found by multiple passes have higher confidence scores.

## Output

Results are saved to `.lookagain/`:
Each run saves results to a timestamped directory `.lookagain/<run-id>/`:

- `aggregate.md` - Human-readable summary
- `aggregate.json` - Machine-readable findings
- `pass-N.json` - Raw output from each pass

## Configuration
Previous runs are preserved. Use `/look:tidy` to prune old results:

```bash
# Remove runs older than 1 day (default)
/look:tidy

Default behavior:
# Keep last 3 days
/look:tidy keep=3

# Remove all runs
/look:tidy all=true
```

## Configuration

- 3 review passes
- Auto-fix must_fix issues
- Maximum 7 passes if must_fix issues persist
- Reviews current directory
| Argument | Default | Description |
| --- | --- | --- |
| `passes` | `3` | Number of review passes |
| `target` | `staged` | What to review: `staged`, `commit`, `branch`, or a path |
| `auto-fix` | `true` | Auto-fix `must_fix` issues between passes |
| `model` | `thorough` | Reviewer model: `fast`, `balanced`, `thorough` |
| `max-passes` | `7` | Max passes if `must_fix` issues persist |

## Severity Levels

Expand Down
9 changes: 8 additions & 1 deletion scripts/package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,13 @@ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
PROJECT_ROOT="$(dirname "$SCRIPT_DIR")"
DIST_DIR="$PROJECT_ROOT/dist"

if ! command -v python3 >/dev/null 2>&1; then
echo "Error: python3 is required but not found"
exit 1
fi

# Get version from plugin.json
VERSION=$(python3 -c "import json; print(json.load(open('$PROJECT_ROOT/src/dot-claude-plugin/plugin.json'))['version'])")
VERSION=$(python3 -c "import json,sys; print(json.load(open(sys.argv[1]))['version'])" "$PROJECT_ROOT/src/dot-claude-plugin/plugin.json")

if [[ -z "$VERSION" ]]; then
echo "Error: Could not extract version from plugin.json"
Expand All @@ -25,6 +30,8 @@ mkdir -p "$DIST_DIR/lookagain"
# Copy and rename directories
cp -r "$PROJECT_ROOT/src/dot-claude" "$DIST_DIR/lookagain/.claude"
cp -r "$PROJECT_ROOT/src/dot-claude-plugin" "$DIST_DIR/lookagain/.claude-plugin"
# Overlay marketplace.json from repo root into the dist .claude-plugin/ directory
cp "$PROJECT_ROOT/.claude-plugin/marketplace.json" "$DIST_DIR/lookagain/.claude-plugin/"
cp -r "$PROJECT_ROOT/src/commands" "$DIST_DIR/lookagain/commands"
cp -r "$PROJECT_ROOT/src/agents" "$DIST_DIR/lookagain/agents"
cp -r "$PROJECT_ROOT/src/skills" "$DIST_DIR/lookagain/skills"
Expand Down
Loading