Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS
JavaScript ai-agentsdashboarddeveloper-toolsdigital-twinquantified-selfsecond-brainself-hostedtailscale
docs([worktree-remove-helper]): remove from PLAN.md and log to changelog
[._.]/ Adam Eivyc2a53efead3b
diff --git a/.changelog/NEXT.md b/.changelog/NEXT.mdindex 7f88099b5f..784452bed2 100644--- a/.changelog/NEXT.md+++ b/.changelog/NEXT.md@@ -63,6 +63,7 @@- **[settings-getsave-callers-stale-base]** Saving or clearing the HF / Civitai API keys now runs its read-modify-write inside the settings write queue, so a save landing at the same moment can't clobber it with a stale snapshot (no user-facing change).- **[settings-shallow-getsave-callers-tidy]** Saving Telegram config (method, bot token/chat id, forwarded types) and system-health alert thresholds now runs inside the settings write queue too, closing the same stale-snapshot clobber window (no user-facing change).- **[json-state-serialization-one-mechanism]** The Chief-of-Staff state file now serializes its writes with the same shared queue the rest of the app's JSON stores use, instead of a separate bespoke lock — one fewer concurrency mechanism to maintain (no user-facing change).+- **[worktree-remove-helper]** The four agent-worktree cleanup paths now share one robust "remove, then force-clean if git refuses" helper instead of four hand-copied versions — same cleanup behavior, less duplicated code to drift (no user-facing change).- **[wardrobe-appearance-id-route-validation] Rendering a storyboard scene with a stale outfit pick now fails clearly instead of silently ignoring it.** If a scene's wardrobe selection points at a character or outfit that no longer exists (e.g. it was deleted after the pick was made), the render returns a clear error instead of quietly rendering the character without that outfit.## Fixeddiff --git a/PLAN.md b/PLAN.mdindex ee830d50c6..4e6594866b 100644--- a/PLAN.md+++ b/PLAN.md@@ -6,7 +6,6 @@ For project goals, see [GOALS.md](./GOALS.md). For completed work, see [.changelClaimable, well-specified, no decision needed — `/claim`-able. Unordered.-- [ ] [worktree-remove-helper] **Extract the repeated "worktree remove --force → on-fail rm + prune" dance into one helper.** The pattern is now inlined in 4 spots in `server/services/worktreeManager.js`: `removeWorktree`, `reapMergedWorktrees`, `cleanupExternalRepoWorktrees`, and `removePersistentWorktree`. Extract `forceRemoveWorktreeDir(repo, worktreePath, label)` and route all four through it.- [ ] [plan-task-prefer-merge] **Switch the `/claim` (`plan-task`) Phase-6 merge order to prefer `--merge` over `--squash`.** The live `plan-task` prompt in `server/services/taskSchedule.js` (~line 562) still tries `gh pr merge --auto || --squash || --merge || --rebase`, so `/claim` squash-merges by default — inconsistent with the `--merge`-first default now used by the review-loop / `/do:pr` agent prompts. Deferred because: (a) `plan-task` is a **version-migrated** prompt, so the change needs a `PROMPT_VERSIONS['plan-task']` bump (7→8) **and** the v7 default preserved in `PREVIOUS_DEFAULT_PROMPTS['plan-task']` (~190-line byte-exact copy); (b) `/claim` self-cleans its worktree/branch regardless of merge method; and (c) `reapMergedWorktrees` detects squash merges anyway. Low benefit, non-trivial migration cost — do it as a focused follow-up when touching `plan-task` prompt versioning next.- [ ] [shared-optional-provider-picker] **Add an optional/"Default" mode to the shared provider/model picker and migrate the inline copies.** Three pages now hand-roll the same inline two-`<select>` "Default sentinel + provider + model" picker because the shared `ProviderModelSelector.jsx` + `useProviderModels.js` force a selection. UniverseBuilder.jsx (~2968) and Importer.jsx (~437, plus its `getProviders`+enabled-filter effect ~93 and `llmModels` memo) duplicate the logic in `FeatureProviderPicker.jsx`/`useProviderModels`. Add an `emptyOption`/`allowDefault` prop to `ProviderModelSelector` and an `allowDefault`/`includeEmpty` flag to `useProviderModels` that skips the auto-select, then refactor both. Note the importer's default label must stay accurate to its *per-stage* resolution. Cleanup only; no behavior change.- [ ] [importer-screenplay-teleplay-seed] **Mirror the comic-script verbatim-seed for screenplay imports → `stages.teleplay`.** The comic-script import now seeds the verbatim script into `stages.comicScript` (ready) instead of `stages.prose`, via the `CONTENT_TYPE_SEED_STAGE` table. Adding screenplay is a one-row change: `'screenplay': 'teleplay'`. Also extend the auto-run script-first guard in `autoRunner.js` (currently checks `comicScript || teleplay` already) and check whether any downstream teleplay consumer parses a specific format (the comic path needed `parseComicScript` taught the bare `PAGE/PANEL` form).