@inceptionstack/pi-hard-no 1.0.1 → 1.0.3
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 +2 -2
- package/architect.ts +10 -5
- package/package.json +1 -1
- package/prompt.ts +17 -5
- package/scaffold.ts +1 -1
- package/settings.ts +2 -2
package/README.md
CHANGED
|
@@ -72,7 +72,7 @@ Use `/scaffold-review-files` to generate config templates.
|
|
|
72
72
|
```json
|
|
73
73
|
{
|
|
74
74
|
"maxReviewLoops": 100,
|
|
75
|
-
"model": "amazon-bedrock/us.
|
|
75
|
+
"model": "amazon-bedrock/us.meta.llama4-maverick-17b-instruct-v1:0",
|
|
76
76
|
"thinkingLevel": "off",
|
|
77
77
|
"architectEnabled": true,
|
|
78
78
|
"reviewTimeoutMs": 120000,
|
|
@@ -87,7 +87,7 @@ Use `/scaffold-review-files` to generate config templates.
|
|
|
87
87
|
| Setting | Type | Default | Description |
|
|
88
88
|
| ------------------ | ----------- | -------------------------------------------------------------- | ------------------------------------------------------------------------------------------ |
|
|
89
89
|
| `maxReviewLoops` | integer > 0 | `100` | Max review→fix→review cycles before giving up |
|
|
90
|
-
| `model` | string | `"amazon-bedrock/us.
|
|
90
|
+
| `model` | string | `"amazon-bedrock/us.meta.llama4-maverick-17b-instruct-v1:0"` | Reviewer model (`"provider/model-id"`) |
|
|
91
91
|
| `thinkingLevel` | string | `"off"` | `off\|minimal\|low\|medium\|high\|xhigh` |
|
|
92
92
|
| `architectEnabled` | boolean | `true` | Enable architect review (triggers when >1 file reviewed from git) |
|
|
93
93
|
| `reviewTimeoutMs` | integer > 0 | `120000` | Max wall-clock per review in ms |
|
package/architect.ts
CHANGED
|
@@ -44,11 +44,16 @@ You have tools available (read, bash, grep, find, ls) to explore the full codeba
|
|
|
44
44
|
- Do public APIs have adequate comments/types?
|
|
45
45
|
- Are new files/modules properly documented?
|
|
46
46
|
|
|
47
|
-
## Response format
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
47
|
+
## Response format — terse, technical, low-bandwidth
|
|
48
|
+
|
|
49
|
+
LGTM or bullets. Nothing else. Agent reads this, not a human — minimum words, maximum signal.
|
|
50
|
+
|
|
51
|
+
- If everything is fine: one line — "LGTM — architecture looks solid."
|
|
52
|
+
- Otherwise: bullet per issue, each: **<severity>:** <area/file> — <problem>; <fix>.
|
|
53
|
+
- Max 3 lines per issue, 1 line preferred.
|
|
54
|
+
- No preamble, no recap of what you checked, no praise.
|
|
55
|
+
- Skip anything already fixed in mini-reviews.
|
|
56
|
+
- Technical shorthand OK (race, coupling, leak, god-object, dead code).`;
|
|
52
57
|
|
|
53
58
|
/**
|
|
54
59
|
* Load architect review rules from .hardno/architect.md.
|
package/package.json
CHANGED
package/prompt.ts
CHANGED
|
@@ -70,21 +70,33 @@ export const DEFAULT_AUTO_REVIEW_RULES = `## What to review (in priority order)
|
|
|
70
70
|
|
|
71
71
|
// ── Part 3: Suffix (always included, not user-editable) ──
|
|
72
72
|
|
|
73
|
-
export const PROMPT_SUFFIX = `##
|
|
73
|
+
export const PROMPT_SUFFIX = `## Output style — terse, technical, low-bandwidth
|
|
74
|
+
|
|
75
|
+
Write as if on a slow link: minimum words, maximum signal. The agent reads this,
|
|
76
|
+
not a human skimming prose.
|
|
77
|
+
|
|
78
|
+
- Max 3 lines per issue. One line if location + problem + fix fits in one.
|
|
79
|
+
- Each issue = location · problem · fix. Nothing else.
|
|
80
|
+
- No preamble, no recap, no "I noticed", no "consider", no hedging.
|
|
81
|
+
- Technical shorthand OK (e.g. "OBO", "race", "null deref", "unbounded loop").
|
|
82
|
+
- Don't restate code — point to it by file:line.
|
|
83
|
+
- Don't explain why the rule exists. Just the hit.
|
|
84
|
+
|
|
85
|
+
## Response format
|
|
74
86
|
|
|
75
87
|
Your response MUST follow this exact structure:
|
|
76
88
|
|
|
77
|
-
1. (If issues found) List of bullet points, each: - **<Severity>:** <file/location> — <
|
|
89
|
+
1. (If issues found) List of bullet points, each: - **<Severity>:** <file/location> — <problem>; <fix>
|
|
78
90
|
Severity is one of: High, Medium, Low.
|
|
79
91
|
2. (If no issues) Write a single line: No issues found.
|
|
80
92
|
3. On the final line of your response, output exactly ONE of these verdict tags:
|
|
81
93
|
- <verdict>LGTM</verdict> — if no real bugs were found
|
|
82
94
|
- <verdict>ISSUES_FOUND</verdict> — if you flagged any issue above
|
|
83
95
|
|
|
84
|
-
## Example — issues found
|
|
96
|
+
## Example — issues found (terse)
|
|
85
97
|
|
|
86
|
-
- **High:** test-bugs.ts:12 —
|
|
87
|
-
- **High:** test-bugs.ts:6 —
|
|
98
|
+
- **High:** test-bugs.ts:12 — OBO in \`for (i<=len)\`; use \`<\`.
|
|
99
|
+
- **High:** test-bugs.ts:6 — hardcoded key \`sk-prod-…\`; move to env.
|
|
88
100
|
|
|
89
101
|
<verdict>ISSUES_FOUND</verdict>
|
|
90
102
|
|
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.
|
|
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.
|
|
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.
|
|
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,
|