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
48 changes: 41 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ A prism decomposes light into its spectrum. **prism** decomposes pull requests

**PR → structured context → stable AI review.**

![prism demo](docs/demo/demo.gif)

---

## The problem
Expand Down Expand Up @@ -248,16 +250,33 @@ prism analyze <PR_URL> --provider github # explicit Git
prism analyze <PR_URL> --provider codecommit # explicit CodeCommit (requires plugin)
```

### Plugin providers
### CodeCommit plugin

External providers are distributed as separate binaries named `prism-provider-<name>` and discovered on PATH. Plugins receive a PR URL and return structured JSON to stdout.
CodeCommit support is provided by the [prism-provider-codecommit](https://github.com/hidetzu/prism-provider-codecommit) plugin, which wraps [ccpr](https://github.com/hidetzu/ccpr) to fetch CodeCommit PR data.

```bash
# Plugin invocation (called by prism internally):
prism-provider-codecommit fetch <PR_URL>
# Install the plugin
go install github.com/hidetzu/prism-provider-codecommit/cmd/prism-provider-codecommit@latest

# Use it
prism analyze https://ap-northeast-1.console.aws.amazon.com/codesuite/codecommit/repositories/my-repo/pull-requests/42
```

### Plugin architecture

External providers are distributed as separate binaries named `prism-provider-<name>` and discovered on PATH. Plugins receive a PR URL and return structured JSON to stdout.

```
prism (core)
↓ subprocess
provider plugin (prism-provider-<name>)
↓ API call
provider (GitHub / CodeCommit / ...)
```

See [ADR-0001](docs/adr/0001-provider-plugin-architecture.md) for design details.
This keeps the prism core lightweight and provider-agnostic. Writing a new plugin requires only conforming to the [plugin protocol](docs/provider-plugin-protocol.md).

See [ADR-0001](docs/adr/0001-provider-plugin-architecture.md) for design rationale.

---

Expand Down Expand Up @@ -337,6 +356,14 @@ Supported: `en` (English, default), `ja` (Japanese)

---

## Philosophy

- **Stop prompting. Start structuring.** — Consistent AI review quality starts with structured input, not better prompts.
- **PRs are not readable by LLMs as-is.** — Raw diffs lack intent, risk, and context.
- **AI review quality starts with review design.** — prism is the design layer between PRs and AI.

---

## Development

```bash
Expand All @@ -347,13 +374,20 @@ make vet # go vet
make clean # Remove bin/
```

---

## Roadmap

- **v0.1.0** — GitHub provider, analyze/prompt/fetch commands, JSON/Markdown/text output, light/detailed/cross modes, config/lang/template support, exit codes
- **v0.2.0** — Provider plugin architecture, `--provider` flag, AWS CodeCommit provider
- **v0.1.0** — GitHub provider, analyze/prompt/fetch commands, JSON/Markdown/text output, light/detailed/cross modes, config/lang/template support, exit codes
- **v0.2.0** — Provider plugin architecture, `--provider` flag, AWS CodeCommit support via plugin ✅
- **v0.3.0** — Policy files, custom review axes, project-specific rules
- **v0.4.0+** — Review policy as code, SARIF output, metrics, IDE/CI integration

## Releases

- [v0.2.0](https://github.com/hidetzu/prism/releases/tag/v0.2.0) — Provider plugin architecture + CodeCommit support
- [v0.1.0](https://github.com/hidetzu/prism/releases/tag/v0.1.0) — Initial release

## License

MIT
Binary file added docs/demo/demo.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
39 changes: 39 additions & 0 deletions docs/demo/demo.tape
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# prism demo recording script for vhs (https://github.com/charmbracelet/vhs)
#
# Usage:
# export GITHUB_TOKEN=ghp_xxxxxxxxxxxx
# vhs docs/demo/demo.tape
#
# Output:
# docs/demo/demo.gif

Output docs/demo/demo.gif

Set Shell fish
#Set FontFamily "Noto Sans Mono CJK JP"
Set FontFamily "Monoflow"
Set Theme { "name": "Whimsy", "black": "#535178", "red": "#ef6487", "green": "#5eca89", "yellow": "#fdd877", "blue": "#65aef7", "magenta": "#aa7ff0", "cyan": "#43c1be", "white": "#ffffff", "brightBlack": "#535178", "brightRed": "#ef6487", "brightGreen": "#5eca89", "brightYellow": "#fdd877", "brightBlue": "#65aef7", "brightMagenta": "#aa7ff0", "brightCyan": "#43c1be", "brightWhite": "#ffffff", "background": "#29283b", "foreground": "#b3b0d6", "selection": "#3d3c58", "cursor": "#b3b0d6" }
Set FontSize 16
Set Width 1280
Set Height 720
#Set Theme "Dracula"
Set PlaybackSpeed 1.0
Set TypingSpeed 40ms
Set Padding 0
Set WindowBar Colorful

# Analyze a real PR
Type "prism analyze https://github.com/hidetzu/prism/pull/1 --format markdown"
Sleep 500ms
Enter
Sleep 6s

# Clear and show prompt generation
Ctrl+L
Sleep 500ms
Type "prism prompt https://github.com/hidetzu/prism/pull/1 --mode detailed | head -40"
Sleep 500ms
Enter
Sleep 6s

Sleep 2s
Loading