architect-analyze
Use when validating generated or refined architecture artifacts, before feature development, during architecture review, or…
Use when the user asks to reclaim project disk space or clean up leftovers — inventories worktrees, containers, dependencies, and processes, reclaiming only user-approved items; read-only by default.
$ npx -y skills add tikalk/adlc-team-skills --skill factory-clean --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/factory-cleanContext preview
The summary Claude sees to decide when to auto-load this skill.
Use when the user asks to reclaim project disk space or clean up leftovers — inventories worktrees, containers, dependencies, and processes, reclaiming only user-approved items; read-only by default.
name: factory-clean description: Use when the user asks to reclaim project disk space or clean up leftovers — inventories worktrees, containers, dependencies, and processes, reclaiming only user-approved items; read-only by default.
`factory-clean` is the resource-reclamation engine of the software factory. It answers two questions and acts on the second: **what is this project costing this machine right now**, and **what can be reclaimed without destroying work or interrupting an agent that is still running?**
It operates as a **Kind-B control-plane skill** that reads the run registry, identifies active worktrees, and cleans up discarded/stale artifacts.
---
**When NOT to use**:
---
Determine the project in scope (defaulting to the current repository). Identify its state root, run registry, and worktree root (`.adlc/worktrees/`).
Before displaying any candidate for deletion, read the local state file and the comment bus (if tracker-integrated, via comment bus and lease markers). Classify every resource into one of these five liveness states:
*Note: Liveness classification is read from this skill family's own registry. Disclose in the report that other local processes or IDE checkouts are invisible and protected as `unknown`.*
Scan and measure the sizes/counts of: 1. **Skill Worktrees & Clones**: worktrees under `.adlc/worktrees/`, managed clones under `.adlc/clones/`. 2. **Git Artifacts**: stale worktree registrations, loose-object and pack sizes. (Local user branches and global git caches are ignored and protected). 3. **Project Dependency & Build Output**: dependency directories (`node_modules`, `.venv`), build and distribution output, coverage and test artifacts. 4. **Skill State, Scratch, & Logs**: per-run temporary directories, snapshots, and log files. (Saved identity mappings, project conventions, schemas, and configurations are always protected). 5. **Processes & Ports**: dev servers, port-forwards, and background workers holding this project's ports or files.
1. Present the inventory grouped, each group sorted by reclaimable size, with a per-group and overall total. State clearly what is protected and why. 2. Ask the user to select exact candidate identifiers within each group. Default to selecting nothing. 3. Show the exact commands that will run. 4. **Re-verify liveness immediately before each deletion**: if a run started or gained unsaved work since the inventory, skip it and report the conflict. 5. Delete one item at a time, stopping at the first error rather than continuing through a broken assumption. 6. Report what was reclaimed, what was skipped, and the actual space recovered (measured again, not assumed).
Agent skills that give coding agents your team's context at session start, so they stop working like strangers.
Use when validating generated or refined architecture artifacts, before feature development, during architecture review, or…
Use when architecture work starts or a tech-stack or pattern decision emerges — injects the project ADR index…
Use when ADRs need review, gaps need filling, or ADR status must be approved as Accepted before architecture generation.
Use when accepted ADRs exist and AD.md must be produced or updated as unified architecture documentation.
Use when bootstrapping architecture documentation for a brownfield project by reverse-engineering ADRs from an existing codebase.
Use when you want guided trade-off analysis, multi-option comparison, or structured architectural decision facilitation before…