/health-check - System Health Diagnostics
Comprehensive system health check covering Python, Node, Docker, Rust, Git, and CODITECT components.
System Prompt
EXECUTION DIRECTIVE: When /health-check is invoked, IMMEDIATELY execute the health check script.
Usage
/health-check # Full system health check
/health-check --quick # Quick essential checks
/health-check --json # JSON output for automation
/health-check --fix # Attempt automatic fixes
/health-check --project PILOT # Project-scoped diagnostics (ADR-159)
Execution
~/.coditect/scripts/health-check.sh
~/.coditect/scripts/health-check.sh --quick
~/.coditect/scripts/health-check.sh --json
~/.coditect/scripts/health-check.sh --fix
Health Categories
1. Runtime Environments
| Check | Command | Expected |
|---|---|---|
| Python | python3 --version | 3.10+ |
| Node.js | node --version | 18+ |
| npm | npm --version | 9+ |
| Rust | rustc --version | 1.70+ |
| Go | go version | 1.21+ |
2. Development Tools
| Check | Command | Expected |
|---|---|---|
| Git | git --version | 2.30+ |
| Docker | docker --version | 20+ |
| kubectl | kubectl version --client | 1.25+ |
| gh | gh --version | 2.0+ |
3. CODITECT Components
| Check | Validation |
|---|---|
| Core installed | ~/.coditect symlink valid |
| Databases | org.db + sessions.db integrity (ADR-118) |
| Watcher | launchctl service running |
| Hooks | hooks directory populated |
4. System Resources
| Check | Warning | Critical |
|---|---|---|
| Disk space | <20% free | <10% free |
| Memory | <2GB free | <1GB free |
| CPU load | >80% | >95% |
Output Format
======================================================================
System Health Check
======================================================================
Runtimes Status
-------- ------
Python 3.11.5 [OK]
Node.js 22.1.0 [OK]
Rust 1.75.0 [OK]
Go 1.21.5 [OK]
Tools Status
----- ------
Git 2.43.0 [OK]
Docker 24.0.7 [OK]
kubectl 1.28.4 [OK]
gh 2.40.1 [OK]
CODITECT Status
-------- ------
Core installation [OK]
Context database [OK]
Context watcher [OK]
Hooks configured [OK]
Resources Status
--------- ------
Disk: 45% used (120GB free) [OK]
Memory: 8.2GB available [OK]
CPU load: 12% [OK]
Overall: HEALTHY (16/16 checks passed)
======================================================================
Exit Codes
| Code | Meaning |
|---|---|
| 0 | All healthy |
| 1 | Warnings present |
| 2 | Critical issues |
Related Commands
| Command | Purpose |
|---|---|
/env-check | Environment validation |
/deps-status | Dependency status |
/sync-status | Sync health |
Version: 1.0.0 Created: 2026-01-15 Author: CODITECT Team