@inceptionstack/pi-hard-no 1.0.0 → 1.0.2

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 CHANGED
@@ -1,6 +1,8 @@
1
1
  # pi-hard-no
2
2
 
3
- A [pi](https://github.com/badlogic/pi-mono) extension that automatically reviews code changes after each agent turn using a separate pi reviewer instance.
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 Issues found
35
+ LGTM Hard no
34
36
  │ │
35
37
  │ ▼
36
- │ Feeds back to main agent
37
- │ Agent fixes → new review loop
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-opus-4-6-v1",
75
+ "model": "amazon-bedrock/us.meta.llama4-maverick-17b-instruct-v1:0",
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 stopping |
88
- | `model` | string | `"amazon-bedrock/us.anthropic.claude-opus-4-6-v1"` | Reviewer model (`"provider/model-id"`) |
89
+ | `maxReviewLoops` | integer > 0 | `100` | Max review→fix→review cycles before giving up |
90
+ | `model` | string | `"amazon-bedrock/us.meta.llama4-maverick-17b-instruct-v1:0"` | 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
- - `lgtm on (Alt+R toggle)` — idle, no pending files
155
- - `lgtm on 🔒 push blocked · will review 3 files (Alt+R toggle)` — edits accumulating, push blocked
156
- - `lgtm reviewing… 🔒 push blocked (/cancel-review)` — reviewer running
157
- - `lgtm on issues found 🔒 push blocked (Alt+R toggle)` — review found issues
158
- - `lgtm skipped — no files to review` — nothing to review after fix turn
159
- - `lgtm off (Alt+R toggle)` — disabled, push guard off
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
- ## Review loop behavior
196
+ ## The loop
195
197
 
196
198
  1. Agent makes changes → review triggers
197
- 2. If issues found → agent fixes them → review triggers again
198
- 3. If LGTM loop counter resets
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inceptionstack/pi-hard-no",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "type": "module",
5
5
  "description": "Pi extension — automatic code review after every agent turn",
6
6
  "license": "MIT",
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-opus-4-6-v1",
108
+ model: "amazon-bedrock/us.meta.llama4-maverick-17b-instruct-v1:0",
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-opus-4-6-v1"
62
+ model: string; // "provider/model-id" e.g. "amazon-bedrock/us.meta.llama4-maverick-17b-instruct-v1:0"
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-opus-4-6-v1",
89
+ model: "amazon-bedrock/us.meta.llama4-maverick-17b-instruct-v1:0",
90
90
  thinkingLevel: "off",
91
91
  architectEnabled: true, // triggers when >1 file reviewed
92
92
  reviewTimeoutMs: 120_000,