Description
teamai remove cannot be run from a script. askConfirmation returns false when process.stdin.isTTY is false (src/utils/prompt.ts), and the command has no flag to skip the prompt. Piping y does not help, because the answer is never read. Every scripted run prints Cancelled and exits 0, which reads like success.
$ teamai remove agents foo < /dev/null
Will remove 1 agents:
- foo
From: team repo + all local AI tool directories
Cancelled (exit code 0)
teamai uninstall takes --force for exactly this, and teamai init takes --force to overwrite without confirming, so the precedent is already in the CLI.
The cost is not only ergonomic. teamai remove has no end-to-end coverage at all, because no test can drive it. Both defects in #576 lived on the removal path, and neither had a test at the command level.
Reproduction
- Initialize teamai against a team repo holding at least one rule.
- Run
teamai remove rules <name> < /dev/null.
- The command prints
Cancelled and exits 0. Nothing is removed.
Environment
- OS: macOS 26.5.2
- Node.js: v22.22.2
- teamai: built from
main at cccbe1d
- Provider: git, local bare repository
- AI tool(s): Claude Code, Codex
Proposed fix
Give remove a --force flag that skips askConfirmation, spelled the same way as teamai uninstall --force. That makes the command scriptable and lets an end-to-end test cover it.
Lessons from #576
An untestable command accumulates bugs quietly. #576 was two defects in one removeItem loop, a wrong extension set and a missing exclusion gate. A third, the same missing gate in rules.ts and skills.ts, is #590. None of them had end-to-end coverage, because the command cannot run unattended. The unit tests reach removeItem directly and pass, so the gap is specifically at the command level.
Description
teamai removecannot be run from a script.askConfirmationreturnsfalsewhenprocess.stdin.isTTYis false (src/utils/prompt.ts), and the command has no flag to skip the prompt. Pipingydoes not help, because the answer is never read. Every scripted run printsCancelledand exits 0, which reads like success.teamai uninstalltakes--forcefor exactly this, andteamai inittakes--forceto overwrite without confirming, so the precedent is already in the CLI.The cost is not only ergonomic.
teamai removehas no end-to-end coverage at all, because no test can drive it. Both defects in #576 lived on the removal path, and neither had a test at the command level.Reproduction
teamai remove rules <name> < /dev/null.Cancelledand exits 0. Nothing is removed.Environment
mainat cccbe1dProposed fix
Give
removea--forceflag that skipsaskConfirmation, spelled the same way asteamai uninstall --force. That makes the command scriptable and lets an end-to-end test cover it.Lessons from #576
An untestable command accumulates bugs quietly. #576 was two defects in one
removeItemloop, a wrong extension set and a missing exclusion gate. A third, the same missing gate inrules.tsandskills.ts, is #590. None of them had end-to-end coverage, because the command cannot run unattended. The unit tests reachremoveItemdirectly and pass, so the gap is specifically at the command level.