taskplane 0.22.7 → 0.22.8

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.
@@ -2854,6 +2854,26 @@ export default function (pi: ExtensionAPI) {
2854
2854
  }
2855
2855
  }
2856
2856
 
2857
+ // ── Step transition: kill persistent reviewer for fresh context ──
2858
+ // When a step completes, the reviewer's context from that step is stale.
2859
+ // Kill it so the next step gets a clean reviewer session.
2860
+ if (newlyCompleted.length > 0 && state.persistentReviewerSession) {
2861
+ console.error(`[task-runner] step(s) completed — killing reviewer for fresh context`);
2862
+ logExecution(statusPath, "Reviewer cleanup",
2863
+ `killing persistent reviewer on step transition (${newlyCompleted.map(s => `Step ${s.number}`).join(", ")} completed)`);
2864
+ if (state.persistentReviewerKill) {
2865
+ try { state.persistentReviewerKill(); } catch {}
2866
+ }
2867
+ state.persistentReviewerSession = null;
2868
+ state.persistentReviewerKill = null;
2869
+ state.persistentReviewerSignalNum = 0;
2870
+ state.reviewerRespawnCount = 0;
2871
+ // Reset per-step code review counters for completed steps
2872
+ for (const step of newlyCompleted) {
2873
+ stepCodeReviewCounts.delete(step.number);
2874
+ }
2875
+ }
2876
+
2857
2877
  // Log iteration summary with progress delta and completed steps
2858
2878
  const completedNames = newlyCompleted.map(s => `Step ${s.number}`).join(", ");
2859
2879
  if (newlyCompleted.length > 0) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "taskplane",
3
- "version": "0.22.7",
3
+ "version": "0.22.8",
4
4
  "description": "AI agent orchestration for pi — parallel task execution with checkpoint discipline",
5
5
  "keywords": [
6
6
  "pi-package",
@@ -205,7 +205,8 @@ value.
205
205
  - **APPROVE** → proceed to next step
206
206
  - **RETHINK** → reconsider your plan approach, adjust, then implement
207
207
  - **REVISE** → read the review file in `.reviews/` for detailed feedback,
208
- address the issues, commit fixes, then proceed
208
+ address the issues, commit fixes, then **call `review_step` again** for re-review.
209
+ The same reviewer evaluates whether your fixes address its concerns.
209
210
  - **UNAVAILABLE** → reviewer failed, proceed with caution
210
211
 
211
212
  **Example flow for a Review Level 2 task, Step 3:**
@@ -215,8 +216,9 @@ value.
215
216
  4. Implement Step 3
216
217
  5. Commit changes
217
218
  6. Call `review_step(step=3, type="code", baseline="<saved SHA>")` → get code feedback
218
- 7. If REVISE: fix issues, commit again
219
- 8. Move to Step 4
219
+ 7. If REVISE: fix issues, commit, call `review_step(step=3, type="code")` again
220
+ 8. Repeat 7 until APPROVE (max 2 code review cycles per step)
221
+ 9. Move to Step 4
220
222
 
221
223
  If the `review_step` tool is not available (e.g., non-orchestrated mode), skip
222
224
  this protocol entirely — the task-runner handles reviews externally.