taskplane 0.6.0 → 0.6.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/extensions/task-runner.ts +36 -7
- package/package.json +1 -1
|
@@ -1406,6 +1406,20 @@ export const _readExitSummary = readExitSummary;
|
|
|
1406
1406
|
export const _buildExitDiagnostic = buildExitDiagnostic;
|
|
1407
1407
|
export type { BuildExitDiagnosticInput };
|
|
1408
1408
|
|
|
1409
|
+
/**
|
|
1410
|
+
* Determine whether a step is "low-risk" and should skip reviews.
|
|
1411
|
+
* Low-risk steps: Step 0 (Preflight) and the final step (Delivery/Docs).
|
|
1412
|
+
*
|
|
1413
|
+
* @param stepNumber The 0-based step number being evaluated
|
|
1414
|
+
* @param totalSteps Total number of steps in the task
|
|
1415
|
+
* @returns true if the step should skip plan and code reviews
|
|
1416
|
+
*/
|
|
1417
|
+
export function isLowRiskStep(stepNumber: number, totalSteps: number): boolean {
|
|
1418
|
+
if (totalSteps <= 0) return false;
|
|
1419
|
+
const lastStepIndex = totalSteps - 1;
|
|
1420
|
+
return stepNumber === 0 || stepNumber === lastStepIndex;
|
|
1421
|
+
}
|
|
1422
|
+
|
|
1409
1423
|
// ── TMUX Agent Spawner ───────────────────────────────────────────────
|
|
1410
1424
|
|
|
1411
1425
|
/**
|
|
@@ -2081,11 +2095,20 @@ export default function (pi: ExtensionAPI) {
|
|
|
2081
2095
|
logExecution(statusPath, `Step ${step.number} started`, step.name);
|
|
2082
2096
|
updateWidgets();
|
|
2083
2097
|
|
|
2098
|
+
// Skip reviews for low-risk steps (Step 0 / Preflight and final step / Delivery)
|
|
2099
|
+
const _isLowRiskStep = isLowRiskStep(step.number, task.steps.length);
|
|
2100
|
+
|
|
2084
2101
|
// Plan review (level ≥ 1)
|
|
2085
2102
|
if (task.reviewLevel >= 1) {
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2103
|
+
if (_isLowRiskStep) {
|
|
2104
|
+
const label = step.number === 0 ? "Preflight" : "final step";
|
|
2105
|
+
logExecution(statusPath, `Skip plan review`, `Step ${step.number} (${label}) — low-risk`);
|
|
2106
|
+
ctx.ui.notify(`⏭️ Skipping plan review for Step ${step.number} (${label})`, "info");
|
|
2107
|
+
} else {
|
|
2108
|
+
const verdict = await doReview("plan", step, ctx, stepBaselineCommit);
|
|
2109
|
+
if (verdict === "RETHINK") {
|
|
2110
|
+
ctx.ui.notify(`Reviewer: RETHINK on Step ${step.number} plan. Proceeding with caution.`, "warning");
|
|
2111
|
+
}
|
|
2089
2112
|
}
|
|
2090
2113
|
}
|
|
2091
2114
|
|
|
@@ -2135,10 +2158,16 @@ export default function (pi: ExtensionAPI) {
|
|
|
2135
2158
|
|
|
2136
2159
|
// Code review (level ≥ 2)
|
|
2137
2160
|
if (task.reviewLevel >= 2 && state.phase === "running") {
|
|
2138
|
-
|
|
2139
|
-
|
|
2140
|
-
|
|
2141
|
-
|
|
2161
|
+
if (_isLowRiskStep) {
|
|
2162
|
+
const label = step.number === 0 ? "Preflight" : "final step";
|
|
2163
|
+
logExecution(statusPath, `Skip code review`, `Step ${step.number} (${label}) — low-risk`);
|
|
2164
|
+
ctx.ui.notify(`⏭️ Skipping code review for Step ${step.number} (${label})`, "info");
|
|
2165
|
+
} else {
|
|
2166
|
+
const verdict = await doReview("code", step, ctx, stepBaselineCommit);
|
|
2167
|
+
if (verdict === "REVISE") {
|
|
2168
|
+
ctx.ui.notify(`Reviewer: REVISE on Step ${step.number}. Running worker to fix...`, "warning");
|
|
2169
|
+
await runWorker(step, ctx); // One more pass to address issues
|
|
2170
|
+
}
|
|
2142
2171
|
}
|
|
2143
2172
|
}
|
|
2144
2173
|
|