BOHICA-LABS / BOHICA-LABS/vsdd-factory

feat(lifecycle): provide a deactivate / uninstall path to cleanly remove vsdd-factory artifacts from a project

Open
#232 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
2
Forks
1
Avg merge
6h 43m
Merged PRs (30d)
29

Description

## Summary

Once vsdd-factory is wired into a project, there is no documented path to UNDO that. The factory leaves:

- `.factory/` git worktree
- `factory-artifacts` orphan branch (potentially pushed to origin)
- `.git/worktrees/-factory/` git metadata
- `.claude/settings.local.json` with 5 OTEL env vars
- Project entry in `factory-obs`'s watched-list TOML
- Hook plugins registered in Claude Code (per-project)
- Possibly `_kos/`, `_bmad/` discovery artifacts if those skills ran
- Telemetry already shipped to local Loki / Prometheus

If a team experiments with vsdd-factory on a repo and decides to stop using it, they have to manually unwind all of the above. Some operations have no obvious undo (orphan branch in origin's history can be deleted but might surface in CI; observability stack data isn't TTL'd; hooks are scoped per-project but not obvious).

## Proposed

A single `/vsdd-factory:uninstall` (or `:deactivate`) skill that:

1. **Confirm.** Show the operator the full list of artifacts to be removed; ask y/N.
2. **Stop active processes.** Pause factory-obs dispatcher for this project.
3. **Local artifacts.**
- `git worktree remove .factory --force`
- `git branch -D factory-artifacts` (with warning if it's pushed)
- Clean up `.git/worktrees/-factory/`
4. **Origin artifacts (optional, with confirmation).**
- `git push origin --delete factory-artifacts` if pushed
5. **Claude Code config.**
- Remove OTEL env vars from `.claude/settings.local.json` (preserve other keys)
- Remove project from `factory-obs` watched-list (`factory-obs unregister`)
6. **Telemetry retention notice.**
- Tell operator that already-shipped events remain in local Loki/Prom until those retain policies expire, with the command to clear if desired.
7. **Discovery artifacts (optional).**
- Offer to remove `_kos/`, `_bmad/` if vsdd-factory created them (not if they pre-existed).
8. **Summary.** Print what was removed and what (intentionally) wasn't.

## Why this matters

- **Reversibility builds trust.** A factory you can't uninstall is a one-way decision.
- **Experimentation is currently expensive.** A team that wants to try vsdd-factory on a repo to evaluate it has to commit to the unwind work if they decide against.
- **Diagnostic resets.** Sometimes "remove all factory state and start fresh" is the right debugging step. Today there's no documented way to do that safely.

## Acceptance criteria

- [ ] `/vsdd-factory:uninstall` skill exists.
- [ ] Interactive confirmation before any destructive operation.
- [ ] All artifacts listed above are unwound (or explicitly opted out).
- [ ] Idempotent — safe to run on a project that's already partially uninstalled.
- [ ] Dry-run mode (`--dry-run` or interactive preview) that shows what WOULD be removed.

## Found during

Reviewing the session's footprint on `switchboard-blue` (2026-06-23, vsdd-factory@1.0.0-rc.21). After `/onboard-observability` + `/factory-health` + `/setup-env`, the project has accumulated state in 6+ locations. No documented path to undo any of it without manual surgery on each.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.