diff --git a/README.md b/README.md index 874a63d..5b6d0ea 100644 --- a/README.md +++ b/README.md @@ -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 @@ -248,16 +250,33 @@ prism analyze --provider github # explicit Git prism analyze --provider codecommit # explicit CodeCommit (requires plugin) ``` -### Plugin providers +### CodeCommit plugin -External providers are distributed as separate binaries named `prism-provider-` 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 +# 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-` and discovered on PATH. Plugins receive a PR URL and return structured JSON to stdout. + +``` +prism (core) + ↓ subprocess +provider plugin (prism-provider-) + ↓ 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. --- @@ -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 @@ -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 diff --git a/docs/demo/demo.gif b/docs/demo/demo.gif new file mode 100644 index 0000000..d7d225b Binary files /dev/null and b/docs/demo/demo.gif differ diff --git a/docs/demo/demo.tape b/docs/demo/demo.tape new file mode 100644 index 0000000..d60f632 --- /dev/null +++ b/docs/demo/demo.tape @@ -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