@mjasnikovs/pi-task 0.17.9 → 0.17.10
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/dist/task/phases.js +22 -1
- package/package.json +1 -1
package/dist/task/phases.js
CHANGED
|
@@ -655,7 +655,19 @@ export async function phaseCompose(deps, refined, research, qa) {
|
|
|
655
655
|
// value starts at GOAL.
|
|
656
656
|
const stripped = stripSpecPreamble(text);
|
|
657
657
|
const problem = validateSpecShape(stripped);
|
|
658
|
-
|
|
658
|
+
if (problem)
|
|
659
|
+
return { ok: false, problem };
|
|
660
|
+
// validateSpecShape only checks the VERIFY *header* exists. The
|
|
661
|
+
// critique gate and the handoff gate both require a *runnable*
|
|
662
|
+
// fenced block (parseVerifyBlock). Enforce the same bar here so a
|
|
663
|
+
// draft ending in a bare `VERIFY:` retries with emphasis now,
|
|
664
|
+
// instead of passing compose and being rejected downstream — which
|
|
665
|
+
// otherwise leaves a persisted VERIFY-less spec that resume can't
|
|
666
|
+
// heal.
|
|
667
|
+
if (parseVerifyBlock(stripped) === null) {
|
|
668
|
+
return { ok: false, problem: 'VERIFY block has no runnable ```bash fenced commands' };
|
|
669
|
+
}
|
|
670
|
+
return { ok: true, value: stripped };
|
|
659
671
|
}, problem => new Error(`compose_invalid: ${problem}`));
|
|
660
672
|
}
|
|
661
673
|
export async function phaseCritique(deps, spec, refined, qa) {
|
|
@@ -716,6 +728,15 @@ export async function critiqueWithFallback(d, p) {
|
|
|
716
728
|
const msg = err instanceof Error ? err.message : String(err);
|
|
717
729
|
if (msg !== 'no_verify_block')
|
|
718
730
|
throw err;
|
|
731
|
+
// Fall back to the compose draft — but only if it actually carries a
|
|
732
|
+
// runnable VERIFY block. Critique reaches its rewrite path precisely
|
|
733
|
+
// when the compose draft lacked one (triage is skipped in that case),
|
|
734
|
+
// so returning that same draft would persist a VERIFY-less spec the
|
|
735
|
+
// handoff gate rejects and resume can't heal. Compose now enforces a
|
|
736
|
+
// parseable VERIFY, so this should hold; keep the guard so a regression
|
|
737
|
+
// fails the run cleanly instead of shipping a broken spec.
|
|
738
|
+
if (parseVerifyBlock(p.spec) === null)
|
|
739
|
+
throw err;
|
|
719
740
|
p.ctx.ui.notify("Critique couldn't produce a VERIFY block — using compose draft. Edit the spec manually if needed.", 'warning');
|
|
720
741
|
return p.spec;
|
|
721
742
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mjasnikovs/pi-task",
|
|
3
|
-
"version": "0.17.
|
|
3
|
+
"version": "0.17.10",
|
|
4
4
|
"description": "Deterministic spec-orchestration for local models, with a bundled real-time remote web view and web/docs/fetch/worker subagent tools.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|