Problem
After install → remove in a project, the experience leaves cruft and the purge option is hard to discover.
- Purge is flag-only.
truecast remove <name> confirms the detach, but there's no interactive prompt for purge — you have to already know --purge.
- The appended
.gitignore line is never cleaned up. On install we append .truecast/agents/*/core to the project .gitignore; remove never offers to revert it, so git status shows a stray modified .gitignore even after you've removed everything.
Context: surfaced as "not the best experience" — after install then remove in a project, git status shows a modified .gitignore plus a leftover .truecast/.
Desired interactive flow
truecast remove <name> (no --yes):
Remove <name>? [y/N]
Also delete instance/ (purge)? [y/N]
- purge = yes → remove the core symlink (detach) and delete
instance/, then ask Remove the ".truecast/agents/*/core" line from .gitignore? [y/N] and remove it if confirmed.
- purge = no → detach only (remove the core symlink + lock entry, keep
instance/); do not touch .gitignore.
--yes skips the prompts; --purge preselects purge.
Notes / open questions
- The
.gitignore line is a shared glob covering every .truecast/agents/*/core. Only offer to remove it when no other persona still needs it (i.e. this is the last attached persona) — otherwise removing it breaks siblings.
- Keep the programmatic
Confirm/consent gate as the single owner. This is a CLI-prompt-shape change (two questions) feeding the existing remove-project consent, plus a new (gated) gitignore-cleanup step.
- Decide whether
--purge should still require --yes non-interactively, or whether the interactive purge prompt supersedes that.
Acceptance
- Interactive
remove asks remove → purge (two steps).
- Purge offers the
.gitignore-line cleanup; declining leaves it.
- Non-purge detach leaves
.gitignore untouched.
--yes / --purge flags preserve current non-interactive behavior.
- Covered by tests (extend the consent conformance + a CLI prompt test).
Problem
After install → remove in a project, the experience leaves cruft and the purge option is hard to discover.
truecast remove <name>confirms the detach, but there's no interactive prompt for purge — you have to already know--purge..gitignoreline is never cleaned up. On install we append.truecast/agents/*/coreto the project.gitignore;removenever offers to revert it, sogit statusshows a stray modified.gitignoreeven after you've removed everything.Context: surfaced as "not the best experience" — after
installthenremovein a project,git statusshows a modified.gitignoreplus a leftover.truecast/.Desired interactive flow
truecast remove <name>(no--yes):Remove <name>? [y/N]Also delete instance/ (purge)? [y/N]instance/, then askRemove the ".truecast/agents/*/core" line from .gitignore? [y/N]and remove it if confirmed.instance/); do not touch.gitignore.--yesskips the prompts;--purgepreselects purge.Notes / open questions
.gitignoreline is a shared glob covering every.truecast/agents/*/core. Only offer to remove it when no other persona still needs it (i.e. this is the last attached persona) — otherwise removing it breaks siblings.Confirm/consent gate as the single owner. This is a CLI-prompt-shape change (two questions) feeding the existingremove-projectconsent, plus a new (gated) gitignore-cleanup step.--purgeshould still require--yesnon-interactively, or whether the interactive purge prompt supersedes that.Acceptance
removeasks remove → purge (two steps)..gitignore-line cleanup; declining leaves it..gitignoreuntouched.--yes/--purgeflags preserve current non-interactive behavior.