feat(uninstall): one-command full uninstall with confirmation

- uninstall.sh: removes pi-kit from settings.json (string + gated object
  entries), the package clone, kit-installed public skills, ~/.config/pi-kit
  (env.sh with tokens, audit.jsonl) and the shell-rc sourcing block
- confirmation prompt by default; PI_KIT_UNINSTALL=1 for non-interactive,
  PI_KIT_KEEP_CONFIG=1 / PI_KIT_KEEP_SKILLS=1 to retain parts
- works without the pi binary (settings edited directly); notes how to
  remove pi itself
- tests: test/uninstall.test.sh against a throwaway $HOME (14 checks:
  full/partial removal, refusal without flag, idempotent re-run), wired
  into npm test
This commit is contained in:
Aleksey Shakhmatov
2026-08-06 11:45:50 +03:00
parent 7b25f0eea1
commit 035bededb0
5 changed files with 303 additions and 3 deletions
+3 -2
View File
@@ -124,9 +124,10 @@ pi-kit/
│ └── lib/ # общий код (secrets, audit, company-config)
├── skills/ # SKILL.md-скиллы (jira-workflow/repo-map/docs-map + <lang>-standards)
├── prompts/ # шаблоны команд (/bugfix, /feature, /review, /rfc)
├── test/ # guardrails.test.ts (node) + shell.test.sh (create-mr.sh)
├── test/ # guardrails.test.ts (node) + shell/uninstall shell-тесты
├── docs/mcp.md # документация MCP-интеграций
└── install.sh # bootstrap для новых сотрудников
├── install.sh # bootstrap для новых сотрудников
└── uninstall.sh # полное удаление кита (с подтверждением)
```
Формат: [packages](https://github.com/earendil-works/pi/blob/main/packages/coding-agent/docs/packages.md),