@inceptionstack/pi-hard-no 1.0.0 → 1.0.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 +21 -17
- package/package.json +1 -1
- package/scaffold.ts +1 -1
- package/settings.ts +2 -2
package/README.md
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
# pi-hard-no
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Gives your AI agent a hard no. Every. Single. Time. Until the code is right.
|
|
4
|
+
|
|
5
|
+
A [pi](https://github.com/badlogic/pi-mono) extension that automatically reviews code changes after each agent turn using a separate reviewer instance. If the reviewer isn't happy, the agent goes back and fixes it — looping continuously until the review says **LGTM**. Push is blocked until the reviewer approves, so nothing lands remote without passing review. No manual triggering needed — it all happens automatically. Fully customizable: swap models, write your own review rules, tune loop limits, gate with a judge, and more.
|
|
4
6
|
|
|
5
7
|
## Install
|
|
6
8
|
|
|
@@ -30,12 +32,12 @@ Agent makes file changes (write, edit, bash)
|
|
|
30
32
|
│
|
|
31
33
|
┌────┴────┐
|
|
32
34
|
│ │
|
|
33
|
-
LGTM
|
|
35
|
+
LGTM Hard no
|
|
34
36
|
│ │
|
|
35
37
|
│ ▼
|
|
36
|
-
│ Feeds back to
|
|
37
|
-
│ Agent fixes →
|
|
38
|
-
│ (up to maxReviewLoops)
|
|
38
|
+
│ Feeds issues back to the agent
|
|
39
|
+
│ Agent fixes → reviewer loops again
|
|
40
|
+
│ (up to maxReviewLoops — default 100)
|
|
39
41
|
│
|
|
40
42
|
▼ >1 file reviewed from git?
|
|
41
43
|
│
|
|
@@ -70,7 +72,7 @@ Use `/scaffold-review-files` to generate config templates.
|
|
|
70
72
|
```json
|
|
71
73
|
{
|
|
72
74
|
"maxReviewLoops": 100,
|
|
73
|
-
"model": "amazon-bedrock/us.anthropic.claude-
|
|
75
|
+
"model": "amazon-bedrock/us.anthropic.claude-sonnet-4-6",
|
|
74
76
|
"thinkingLevel": "off",
|
|
75
77
|
"architectEnabled": true,
|
|
76
78
|
"reviewTimeoutMs": 120000,
|
|
@@ -84,8 +86,8 @@ Use `/scaffold-review-files` to generate config templates.
|
|
|
84
86
|
|
|
85
87
|
| Setting | Type | Default | Description |
|
|
86
88
|
| ------------------ | ----------- | -------------------------------------------------------------- | ------------------------------------------------------------------------------------------ |
|
|
87
|
-
| `maxReviewLoops` | integer > 0 | `100` | Max review→fix→review cycles before
|
|
88
|
-
| `model` | string | `"amazon-bedrock/us.anthropic.claude-
|
|
89
|
+
| `maxReviewLoops` | integer > 0 | `100` | Max review→fix→review cycles before giving up |
|
|
90
|
+
| `model` | string | `"amazon-bedrock/us.anthropic.claude-sonnet-4-6"` | Reviewer model (`"provider/model-id"`) |
|
|
89
91
|
| `thinkingLevel` | string | `"off"` | `off\|minimal\|low\|medium\|high\|xhigh` |
|
|
90
92
|
| `architectEnabled` | boolean | `true` | Enable architect review (triggers when >1 file reviewed from git) |
|
|
91
93
|
| `reviewTimeoutMs` | integer > 0 | `120000` | Max wall-clock per review in ms |
|
|
@@ -151,12 +153,12 @@ src/vendor/**
|
|
|
151
153
|
|
|
152
154
|
### Status bar (bottom of pi)
|
|
153
155
|
|
|
154
|
-
- `
|
|
155
|
-
- `
|
|
156
|
-
- `
|
|
157
|
-
- `
|
|
158
|
-
- `
|
|
159
|
-
- `
|
|
156
|
+
- `hard-no on (Alt+R toggle)` — idle, no pending files
|
|
157
|
+
- `hard-no on 🔒 push blocked · will review 3 files (Alt+R toggle)` — edits accumulating, push blocked
|
|
158
|
+
- `hard-no reviewing… 🔒 push blocked (/cancel-review)` — reviewer running
|
|
159
|
+
- `hard-no on issues found 🔒 push blocked (Alt+R toggle)` — review found issues, agent looping to fix
|
|
160
|
+
- `hard-no skipped — no files to review` — nothing to review after fix turn
|
|
161
|
+
- `hard-no off (Alt+R toggle)` — disabled, push guard off
|
|
160
162
|
|
|
161
163
|
### Review progress widget
|
|
162
164
|
|
|
@@ -191,14 +193,16 @@ During reviews, an animated widget appears below the editor showing:
|
|
|
191
193
|
|
|
192
194
|
> **Note:** `/cancel-review` is the recommended cancel method. It works in all terminals. Keyboard shortcuts for cancel are opt-in via `cancelShortcut` in settings because many terminals (especially iTerm2 on macOS) don't reliably send modifier key combos.
|
|
193
195
|
|
|
194
|
-
##
|
|
196
|
+
## The loop
|
|
195
197
|
|
|
196
198
|
1. Agent makes changes → review triggers
|
|
197
|
-
2.
|
|
198
|
-
3.
|
|
199
|
+
2. **Hard no** — issues found → agent fixes them → review triggers again
|
|
200
|
+
3. **LGTM** — loop counter resets, agent proceeds
|
|
199
201
|
4. If loop count reaches `maxReviewLoops` → stops with a warning
|
|
200
202
|
5. Toggling off/on with `/review` resets the counter
|
|
201
203
|
|
|
204
|
+
The agent cannot push, skip, or ignore the review. It loops until it gets an LGTM or hits the ceiling.
|
|
205
|
+
|
|
202
206
|
### Architect review
|
|
203
207
|
|
|
204
208
|
After the review loop reaches LGTM, an **architect review** triggers automatically when more than one file was reviewed from git across the session. No heuristics or judge gating — it always runs for multi-file changes.
|
package/package.json
CHANGED
package/scaffold.ts
CHANGED
|
@@ -105,7 +105,7 @@ out/**
|
|
|
105
105
|
export const SCAFFOLD_SETTINGS = JSON.stringify(
|
|
106
106
|
{
|
|
107
107
|
maxReviewLoops: 100,
|
|
108
|
-
model: "amazon-bedrock/us.anthropic.claude-
|
|
108
|
+
model: "amazon-bedrock/us.anthropic.claude-sonnet-4-6",
|
|
109
109
|
thinkingLevel: "off",
|
|
110
110
|
architectEnabled: true,
|
|
111
111
|
reviewTimeoutMs: 120000,
|
package/settings.ts
CHANGED
|
@@ -59,7 +59,7 @@ function readConfigFileSync(cwd: string, filename: string): string | null {
|
|
|
59
59
|
|
|
60
60
|
export interface AutoReviewSettings {
|
|
61
61
|
maxReviewLoops: number;
|
|
62
|
-
model: string; // "provider/model-id" e.g. "amazon-bedrock/us.anthropic.claude-
|
|
62
|
+
model: string; // "provider/model-id" e.g. "amazon-bedrock/us.anthropic.claude-sonnet-4-6"
|
|
63
63
|
thinkingLevel: string; // "off" | "minimal" | "low" | "medium" | "high" | "xhigh"
|
|
64
64
|
architectEnabled: boolean;
|
|
65
65
|
reviewTimeoutMs: number; // Max wall-clock for a single review (default 120s)
|
|
@@ -86,7 +86,7 @@ export const DEFAULT_CANCEL_SHORTCUT = ""; // no default shortcut — use /cance
|
|
|
86
86
|
|
|
87
87
|
export const DEFAULT_SETTINGS: AutoReviewSettings = {
|
|
88
88
|
maxReviewLoops: 100,
|
|
89
|
-
model: "amazon-bedrock/us.anthropic.claude-
|
|
89
|
+
model: "amazon-bedrock/us.anthropic.claude-sonnet-4-6",
|
|
90
90
|
thinkingLevel: "off",
|
|
91
91
|
architectEnabled: true, // triggers when >1 file reviewed
|
|
92
92
|
reviewTimeoutMs: 120_000,
|