Jupiter cache drive at 99% BTRFS data allocation — MariaDB + Discourse crash-looping. Root cause: 589G OwnCloud data stuck on cache (mover blocked by active SMB session from OwnCloud VM). Migration in progress (rsync cache->array disk7, ~90% at time of commit). Also fixed /mode command to acknowledge /color is user-invokable only. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
3.6 KiB
3.6 KiB
/mode — Set or view the current work mode
Manually set the work mode, or let it auto-detect. Mode controls the terminal color and adjusts Claude's operational posture.
Usage
/mode Show current mode
/mode client Switch to client mode (orange)
/mode dev Switch to development mode (cyan)
/mode infra Switch to infrastructure mode (red)
/mode general Switch to general mode (blue)
/mode remediation Switch to remediation/365 mode (purple)
/mode auto Re-run auto-detection from current context
Modes
| Mode | Color | Posture |
|---|---|---|
| client | orange | Working on/for a specific client. Extra care with data handling. Session logs go to clients/<name>/session-logs/. Credential access audited. Always identify the client in session logs. |
| dev | cyan | Building features, writing code, testing. Delegate freely to Coding/Testing agents. Use Ollama for drafts when available. Less confirmation friction on non-destructive operations. |
| infra | red | Infrastructure work — servers, firewalls, DNS, deployments, backups. Confirm before any destructive or hard-to-reverse operation. Backup-first mentality. Double-check IPs and hostnames. |
| general | blue | Research, planning, documentation, email drafts, general questions. Default mode. Lightweight posture. |
| remediation | purple | M365 tenant work, breach investigation, security remediation. Graph API focus. Compliance-grade language. Full audit trail. |
When invoked
- Set the mode in
.claude/identity.jsonunder a"mode"key - Run the color change: invoke
/color <mode_color> - Confirm to user: "Mode: ()"
Auto-detection rules
When /mode auto is called, OR at session start, OR when the user shifts topics, determine mode from context:
Priority order (first match wins):
- remediation — user said "remediation tool", "365", "breach", "tenant sweep", or
/remediation-toolwas invoked - client — user mentions a client name (check
clients/subdirectories for name matches), or current work is underclients/, or user said "for " - infra — user mentions servers by name/IP (AD2, Jupiter, Uranus, pfSense, 172.16.x.x), SSH commands, firewall rules, DNS changes, service restarts, or "deploy to production"
- dev — user mentions code, building, compiling, Rust/Python/Node, cargo, npm, GuruRMM development, writing features, testing, or current work is under
projects/ - general — default if nothing else matches
On mode change (auto or manual):
- Update
.claude/identity.jsonwith"mode": "<mode>" - Tell the user to run
/color <color>— Claude cannot invoke/colorprogrammatically (it's a built-in CLI command). Include the command inline so the user can copy-paste. - Log the transition:
[MODE] general -> infra (detected: SSH to 172.16.3.30) — run /color red
Silent auto-switching: When auto-detection triggers a mode change mid-session, announce it as: [MODE -> infra] /color red — short, actionable, the user can run the color command or ignore it. Don't interrupt flow with a long explanation. If the detection seems wrong, the user can override with /mode <correct_mode>.
Session log integration
Session logs should include the mode in the User section:
## User
- **User:** Mike Swanson (mike)
- **Machine:** DESKTOP-0O8A1RL
- **Role:** admin
- **Mode:** infra (red)
If mode changed during the session, note the transitions:
- **Mode:** general → infra → dev (transitioned during session)