taskplane 0.5.10 → 0.5.12

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.
@@ -327,8 +327,24 @@ export function executeIntegration(
327
327
  const { orchBranch, currentBranch, batchId } = context;
328
328
 
329
329
  if (mode === "ff") {
330
- // Fast-forward merge
330
+ // Fast-forward merge.
331
+ // Stash any dirty working tree files first — workspace mode leaves
332
+ // STATUS.md modifications in the working tree for dashboard visibility.
333
+ // These would block ff if the orch branch has different versions.
334
+ let stashed = false;
335
+ const statusCheck = deps.runGit(["status", "--porcelain"]);
336
+ if (statusCheck.ok && statusCheck.stdout.trim()) {
337
+ deps.runGit(["stash", "push", "--include-untracked", "-m", `orch-integrate-autostash-${batchId}`]);
338
+ stashed = true;
339
+ }
340
+
331
341
  const result = deps.runGit(["merge", "--ff-only", orchBranch]);
342
+
343
+ // Always pop stash if we stashed, regardless of ff result
344
+ if (stashed) {
345
+ deps.runGit(["stash", "pop"]);
346
+ }
347
+
332
348
  if (!result.ok) {
333
349
  return {
334
350
  success: false,
@@ -359,7 +375,20 @@ export function executeIntegration(
359
375
  }
360
376
 
361
377
  if (mode === "merge") {
378
+ // Stash dirty working tree (same as ff mode — workspace STATUS.md artifacts)
379
+ let mergeStashed = false;
380
+ const mergeStatusCheck = deps.runGit(["status", "--porcelain"]);
381
+ if (mergeStatusCheck.ok && mergeStatusCheck.stdout.trim()) {
382
+ deps.runGit(["stash", "push", "--include-untracked", "-m", `orch-integrate-autostash-${batchId}`]);
383
+ mergeStashed = true;
384
+ }
385
+
362
386
  const result = deps.runGit(["merge", orchBranch, "--no-edit"]);
387
+ // Pop stash regardless of merge result
388
+ if (mergeStashed) {
389
+ deps.runGit(["stash", "pop"]);
390
+ }
391
+
363
392
  if (!result.ok) {
364
393
  return {
365
394
  success: false,
@@ -767,7 +767,10 @@ export function mergeWave(
767
767
  const lines = statusResult.stdout.split("\n").filter((l: string) => l.trim());
768
768
  const artifactFiles = lines
769
769
  .map((l: string) => l.slice(3).trim())
770
- .filter((f: string) => f.endsWith(".DONE") || f.endsWith("STATUS.md"));
770
+ .filter((f: string) =>
771
+ (f.endsWith(".DONE") || f.endsWith("STATUS.md")) &&
772
+ !f.includes(".worktrees/"), // Never stage worktree internals
773
+ );
771
774
 
772
775
  if (artifactFiles.length > 0) {
773
776
  let staged = 0;
@@ -787,16 +790,11 @@ export function mergeWave(
787
790
  spawnSync("git", ["commit", "-m", `checkpoint: wave ${waveIndex} task artifacts (.DONE, STATUS.md)`], { cwd: mergeWorkDir });
788
791
  execLog("merge", `W${waveIndex}`, `committed ${staged} task artifact(s) to merge worktree`);
789
792
 
790
- // Restore .DONE files only these are untracked and would cause
791
- // "dirty working tree" issues on /orch-integrate.
792
- // Keep STATUS.md modifications in develop's working tree so the
793
- // dashboard can read current progress from the canonical path.
794
- for (const file of artifactFiles) {
795
- if (file.endsWith(".DONE")) {
796
- const srcPath = join(repoRoot, file);
797
- try { if (existsSync(srcPath)) unlinkSync(srcPath); } catch { /* best effort */ }
798
- }
799
- }
793
+ // Keep both .DONE and STATUS.md in develop's working tree:
794
+ // - STATUS.md: dashboard reads current progress from canonical path
795
+ // - .DONE: harmless untracked files, cleaned up by /orch-integrate stash
796
+ // Previous approach of deleting .DONE caused them to be missing
797
+ // after ff integration (git couldn't reliably restore them).
800
798
  }
801
799
  }
802
800
  }
@@ -50,14 +50,15 @@ export const ORCH_MESSAGES = {
50
50
  }
51
51
  if (orchBranch && succeeded > 0) {
52
52
  lines.push("");
53
- lines.push(` ℹ Orch branch: ${orchBranch}`);
53
+ lines.push(` ℹ All work is on orch branch: ${orchBranch}`);
54
+ lines.push(` Your ${baseBranch || "working"} branch was not modified.`);
54
55
  if (baseBranch) {
55
- lines.push(` Review changes: git log ${baseBranch}..${orchBranch}`);
56
+ lines.push(` Preview: git log ${baseBranch}..${orchBranch}`);
56
57
  }
57
- lines.push(" Next steps:");
58
- lines.push(" /orch-integrate — fast-forward into your branch");
59
- lines.push(" • /orch-integrate --merge — merge (if branches diverged)");
60
- lines.push(" • /orch-integrate --pr push and open a PR");
58
+ lines.push("");
59
+ lines.push(" To apply the changes:");
60
+ lines.push(" • /orch-integrate Apply now (fast-forward, recommended)");
61
+ lines.push(" • /orch-integrate --pr Push orch branch & open a PR for team review");
61
62
  }
62
63
  return lines.join("\n");
63
64
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "taskplane",
3
- "version": "0.5.10",
3
+ "version": "0.5.12",
4
4
  "description": "AI agent orchestration for pi — parallel task execution with checkpoint discipline",
5
5
  "keywords": [
6
6
  "pi-package",