pi-soly 1.16.3 → 1.16.4
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/nudge.ts +17 -1
- package/package.json +1 -1
- package/workflows/execute.ts +2 -0
package/nudge.ts
CHANGED
|
@@ -177,7 +177,23 @@ export function buildNudgeSection(
|
|
|
177
177
|
- \`.agents/docs/\` (intent) for *why* the project is the way it is.
|
|
178
178
|
- \`git log --oneline -20\` for recent context (existing patterns, prior decisions).
|
|
179
179
|
|
|
180
|
-
What to extract: where similar features live, the naming/file-layout conventions, how errors are handled, how tests are written, and any constraints you missed in the prompt. Surface ambiguities as \`ask_pro\` questions BEFORE writing the plan — a plan that knows "the tests go in __tests__/" beats a plan that picks an arbitrary location and rewrites
|
|
180
|
+
What to extract: where similar features live, the naming/file-layout conventions, how errors are handled, how tests are written, and any constraints you missed in the prompt. Surface ambiguities as \`ask_pro\` questions BEFORE writing the plan — a plan that knows "the tests go in __tests__/" beats a plan that picks an arbitrary location and rewrites.
|
|
181
|
+
|
|
182
|
+
**Corporate reviewer — gap-hunt the plan before coding.** Even when PLAN.md already exists and looks approved, BEFORE you touch any code (a phase, a task, or an arbitrary edit):
|
|
183
|
+
1. Re-read the entire PLAN.md end-to-end. Read adjacent code (one similar feature) with \`soly_snippet\`.
|
|
184
|
+
2. List concrete gaps the plan doesn't address, in priority order. Examples to look for:
|
|
185
|
+
- **Placement** — which file(s) does the new code live in? If the plan names them, read them; if not, decide and ask.
|
|
186
|
+
- **Naming** — function/class/variable names that match existing conventions? (camelCase vs snake_case, verb vs noun, get/set prefix)
|
|
187
|
+
- **Boundary cases** — empty inputs, large inputs, concurrent access, missing files, malformed data. Did the plan mention any? Will the implementation handle them?
|
|
188
|
+
- **Errors** — what does this code do when X fails? Does the plan say? Does the codebase have an existing error pattern to follow?
|
|
189
|
+
- **Existing instances** — if the pattern already exists in the codebase (e.g. another route, another component, another handler), what happens to them? Migration? Coexistence?
|
|
190
|
+
- **Tests** — does the plan name the test file? The fixture data? The assertion style?
|
|
191
|
+
- **Rollout / risk** — is this safe to merge? Does anything need a feature flag, a config gate, or a deprecation window?
|
|
192
|
+
3. If you find ANY material gap, ask the user via \`ask_pro\` BEFORE writing a single line of code. Phrase each question with a recommended default + 2-3 alternatives. Don't pick for the user.
|
|
193
|
+
4. If the plan is genuinely complete and you find no gaps, say so explicitly ("No gaps found in PLAN.md, proceeding") and proceed.
|
|
194
|
+
5. This is independent of \`confirmBeforeCode\` (\`scope\` / \`ask\` / \`off\`). The reviewer runs even when the user said "go" — it's the last filter, not the first.
|
|
195
|
+
|
|
196
|
+
Why this exists: plans that look complete often aren't. Asking 4 sharp questions with defaults saves a 40-minute rebuild when an assumption turns out to be wrong. Don't rush.`
|
|
181
197
|
: "";
|
|
182
198
|
|
|
183
199
|
// Confirm-before-coding gate: for non-trivial implementation, pull the
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-soly",
|
|
3
|
-
"version": "1.16.
|
|
3
|
+
"version": "1.16.4",
|
|
4
4
|
"description": "Project management + workflow framework for pi-coding-agent. Plans, state, MANDATORY rules, self-review, multi-question picker, native footer + welcome chrome — one npm install, zero config. The LLM drives execution and delegates to a worker subagent when available.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "index.ts",
|
package/workflows/execute.ts
CHANGED
|
@@ -330,6 +330,8 @@ ${planBody.slice(0, 4000)}${planBody.length > 4000 ? "\n…(truncated)" : ""}
|
|
|
330
330
|
|
|
331
331
|
**STUDY THE REPO.** Worker MUST use \`soly_snippet(path, offset, limit)\`, \`soly_doc_search(query)\`, and \`## project layout\` from the system prompt to map the area before editing. Read at least: the module(s) the plan touches, one adjacent feature for the convention, and any test files in the same area. Do NOT edit code on assumptions about how existing code is structured.
|
|
332
332
|
|
|
333
|
+
**Corporate reviewer — gap-hunt the plan first.** Re-read the entire PLAN.md end-to-end. Identify concrete gaps (file paths not named, error handling missing, boundary cases unmentioned, no test file cited, no migration plan for existing instances, etc.). If you find ANY material gap, use \`ask_pro\` to surface it to the user BEFORE editing a single file — phrase each question with a recommended default + 2-3 alternatives. Only after gaps are resolved (or explicitly accepted by the user) may implementation begin.
|
|
334
|
+
|
|
333
335
|
Launch a single subagent to execute the plan. Do NOT do the work inline.
|
|
334
336
|
|
|
335
337
|
subagent({
|