akapen 0.4.0 → 0.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -22
- package/dist/akapen.js +169 -360
- package/json-schema/config.json +949 -0
- package/json-schema/kinds.json +63 -0
- package/package.json +6 -3
package/README.md
CHANGED
|
@@ -1,32 +1,28 @@
|
|
|
1
1
|
# akapen
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Deep, multi-stage code review by a different model than the one that wrote the change: context research, reviewers with different lenses, a critic, and a verifier that checks every finding against the code. You get findings to fix, each with its evidence, or LGTM.
|
|
4
4
|
|
|
5
5
|
## Reviewers
|
|
6
6
|
|
|
7
|
-
| `--reviewer` | Runs on
|
|
8
|
-
| ------------ |
|
|
9
|
-
| `codex` | Codex, through your ChatGPT subscription
|
|
10
|
-
| `claude` | Claude Code, through your Claude subscription
|
|
11
|
-
| `api` | akapen's own
|
|
7
|
+
| `--reviewer` | Runs on | Needs |
|
|
8
|
+
| ------------ | ------------------------------------------------------------ | ---------------------------------------- |
|
|
9
|
+
| `codex` | Codex, through your ChatGPT subscription | the `codex` CLI, signed in |
|
|
10
|
+
| `claude` | Claude Code, through your Claude subscription | Claude Code, signed in |
|
|
11
|
+
| `api` | akapen's own agent harness, on the OpenAI and Anthropic APIs | `OPENAI_API_KEY` and `ANTHROPIC_API_KEY` |
|
|
12
12
|
|
|
13
|
-
All
|
|
14
|
-
|
|
15
|
-
Reviewers read the repository and can run small scripts inside a sandbox. They never change your code. The sandbox has been verified on macOS only; on Linux, Claude's sandbox needs `bubblewrap` and `socat`, and the `api` reviewer's `bash` needs what `codex sandbox` needs (without it, the review goes on without `bash`).
|
|
13
|
+
All need Node.js 24 or later. With `api`, a review of a few hundred changed lines costs about $3–9, a re-review after fixes about $1–2. Reviewers never change your code; they can run small scripts in a sandbox (verified on macOS).
|
|
16
14
|
|
|
17
15
|
## Use it from your coding agent
|
|
18
16
|
|
|
19
|
-
|
|
20
|
-
npx akapen setup
|
|
21
|
-
```
|
|
17
|
+
In your repository, ask your coding agent (Claude Code or Codex):
|
|
22
18
|
|
|
23
|
-
`npx
|
|
19
|
+
> Run `npx akapen setup project` and set up akapen by following it.
|
|
24
20
|
|
|
25
|
-
|
|
21
|
+
Then ask it to run akapen (or "赤ペン入れて"). It reviews, checks each finding itself, fixes what holds up, and re-reviews until LGTM.
|
|
26
22
|
|
|
27
23
|
## Run it yourself
|
|
28
24
|
|
|
29
|
-
Run it from an empty directory and point it at the repository with `-C
|
|
25
|
+
Run it from an empty directory and point it at the repository with `-C`, so `npx` does not read the reviewed branch's `.npmrc`:
|
|
30
26
|
|
|
31
27
|
```bash
|
|
32
28
|
R="$PWD"; OUT="$R/.git/akapen/last.json"; mkdir -p "$(dirname "$OUT")"
|
|
@@ -34,10 +30,4 @@ R="$PWD"; OUT="$R/.git/akapen/last.json"; mkdir -p "$(dirname "$OUT")"
|
|
|
34
30
|
(cd "$(mktemp -d)" && npx akapen -C "$R" --reviewer api --previous "$OUT" --out "$OUT") # a re-review after fixes
|
|
35
31
|
```
|
|
36
32
|
|
|
37
|
-
`
|
|
38
|
-
|
|
39
|
-
## Repository settings
|
|
40
|
-
|
|
41
|
-
A repository can add `.akapen/knowledge.md` (rules and terms reviewers should know), `.akapen/config.json` (models, limits, docs MCP servers) and `.akapen/kinds.json` (file kinds such as translations and generated files). They are read from the base branch, so a pull request cannot change how it is reviewed.
|
|
42
|
-
|
|
43
|
-
Settings in `.akapen/config.json` that widen what a review may read, run or send (the sandbox, MCP servers, web search for stages) apply only once you trust that exact file: `akapen trust --show`, then `akapen trust`.
|
|
33
|
+
`npx akapen --help` lists the options, and `npx akapen validate -C "$R"` checks the settings before a review.
|