Skip to content
Development
Command

/health-check

Validate all plugin components are working correctly (agents, hooks, commands)

From plugin
autonomous-dev
3426 skills17 agents26 commands1 MCP
Install
$ npx -y skills add akaszubski/autonomous-dev --agent claude-code

How it fires

How this command gets triggered: by you, by Claude, or both.

  • Fires itselfClaude auto-loads it when your prompt matches the work.
  • You can call itInvoke it directly when you want it.
  • Slash command/health-check

Context preview

What this command does when you run it.

Validate all plugin components are working correctly (agents, hooks, commands)

Command definition

health-check.md
name: health-check
description: Validate all plugin components are working correctly (agents, hooks, commands)
argument-hint: "[--verbose]"
allowed-tools: [Read, Bash, Grep, Glob]
disable-model-invocation: true
user-invocable: true
user_facing: true

Implementation

PROJECT_ROOT="${CLAUDE_PROJECT_DIR:-$(git rev-parse --show-toplevel 2>/dev/null || pwd)}"
PYTHONPATH="$PROJECT_ROOT/plugins/autonomous-dev/lib:$PYTHONPATH" \
  python "$PROJECT_ROOT/scripts/validate_structure.py"
STRUCT_RC=$?
PYTHONPATH="$PROJECT_ROOT/plugins/autonomous-dev/lib:$PYTHONPATH" \
  python -m hook_path_validator \
    --global-settings "$HOME/.claude/settings.json" \
    --local-settings "$PROJECT_ROOT/.claude/settings.local.json" \
    --project-root "$PROJECT_ROOT"
HOOK_RC=$?

# Check plugin registration (Issue #945)
PLUGIN_REGISTERED=0
if [[ -f "$HOME/.claude/plugins/installed_plugins.json" ]]; then
  if python3 -c "import json; data=json.load(open('$HOME/.claude/plugins/installed_plugins.json')); plugins=[p for p in data.get('plugins',[]) if p.get('name')=='autonomous-dev']; exit(0 if plugins else 1)" 2>/dev/null; then
    echo "✓ Plugin registered in installed_plugins.json"
    PLUGIN_REGISTERED=0
  else
    echo "⚠ Plugin NOT registered - slash commands won't work"
    echo "  Run: /plugin marketplace add akaszubski/autonomous-dev"
    echo "  Then: /plugin install autonomous-dev"
    PLUGIN_REGISTERED=1
  fi
else
  echo "⚠ No installed_plugins.json found - plugin not registered"
  PLUGIN_REGISTERED=1
fi

# Proof-of-block (Issue #1586): the ONLY per-repo invocation point that
# demonstrates a guard REFUSING the bad case and PERMITTING the legitimate one.
# Resolves across both layouts: installed (.claude/scripts) and source
# (plugins/autonomous-dev/scripts).
#
# --no-fault is a MEASURED branch, not a preference. Measured 2026-08-21 on
# this repo: full run 22.9s, --no-fault 10.2s. The rest of this command runs in
# under 1s and the doc below budgets the whole thing. --no-fault still drives
# both control arms for every guard (positive must refuse / negative must
# permit), so the REFUSING+PERMITTING evidence is intact; only the fault
# CLASSIFICATION arm is skipped, and that arm's consumer is the CI ratchet,
# which passes --check-silent-regression and never runs here.
#
# Deliberately NOT part of the exit OR below. A consumer-side check that turns
# /health-check permanently red would train bypass of the whole command -- the
# failure mode already visible in a committed .claude/.bypass elsewhere. The
# machine reader is --log-activity, which appends one `"type": "proof_of_block"`
# row to .claude/logs/activity/ for continuous-improvement-analyst and /improve.
POB=""
for CANDIDATE in \
  "$PROJECT_ROOT/.claude/scripts/proof_of_block.py" \
  "$PROJECT_ROOT/plugins/autonomous-dev/scripts/proof_of_block.py"; do
  if [[ -f "$CANDIDATE" ]]; then POB="$CANDIDATE"; break; fi
done
if [[ -n "$POB" ]]; then
  python3 "$POB" --no-fault --log-activity
  echo "PROOF-OF-BLOCK: exit $?"
else
  echo "PROOF-OF-BLOCK: not installed (run /sync)"
fi

# Deploy provenance (Issue #1610): deploy-all.sh copies the WORKING TREE, so
# code that no validator approved can be the code that enforces. This reports
# the commit the executing .claude/ tree came from and NAMES any file running
# uncommitted content or drifting from the deploy record.
#
# Resolves across both layouts, same as proof-of-block above: installed
# (.claude/scripts) and source (plugins/autonomous-dev/scripts). Pure stdlib,
# no git required in the consumer repo — it reads .claude/.deploy-state.json.
#
# Deliberately NOT part of the exit OR below, for the same reason as
# proof-of-block: a consumer-side check that turns /health-check permanently
# red trains bypass of the whole command. On a correctly deployed tree it
# prints one OK line and nothing else.
DEPLOY_STATE_CHECK=""
for CANDIDATE in \
  "$PROJECT_ROOT/.claude/scripts/deploy_state.py" \
  "$PROJECT_ROOT/plugins/autonomous-dev/scripts/deploy_state.py"; do
  if [[ -f "$CANDIDATE" ]]; then DEPLOY_STATE_CHECK="$CANDIDATE"; break; fi
done
if [[ -n "$DEPLOY_STATE_CHECK" ]]; then
  python3 "$DEPLOY_STATE_CHECK" check --repo "$PROJECT_ROOT"
  echo "DEPLOY-STATE: exit $?"
else
  echo "DEPLOY-STATE: not installed (run /sync)"
fi

exit $(( STRUCT_RC | HOOK_RC | PLUGIN_REGISTERED ))

# Health Check - Plugin Component Validation

Validates all autonomous-dev plugin components to ensure the system is functioning correctly.

## Usage

```bash
/health-check

**Time**: ~12 seconds (component validation < 1s, plus a ~10s proof-of-block run — measured 2026-08-21) **Scope**: All plugin components (agents, hooks, commands) plus live guard enforcement

What This Does

Validates 3 critical component types:

1. **Agents** (8 active agents - Issue #147)

  • Pipeline: researcher-local, planner, test-master, implementer, reviewer, security-auditor, doc-master
  • Utility: issue-creator

2. **Hooks** (12 core automation hooks - Issue #144)

  • auto_format.py, auto_test.py, enforce_tdd.py, security_scan.py
  • unified_pre_tool.py, unified_prompt_validator.py
  • validate_command_file_ops.py, validate_project_alignment.py, session_activity_logger.py

3. **Commands** (8 active commands)

  • Core: advise, auto-implement, batch-implement, align, setup, sync, health-check, create-issue

4. **Marketplace Version** (optional)

  • Detects version differences between marketplace and project plugin
  • Shows available upgrades/downgrades

5. **Hook Path Validation** (Issue #950)

  • REQUIRED: every `hooks.<event>[].hooks[].command` in `~/.claude/settings.json` and `.claude/settings.local.json` MUST resolve to an existing file
  • REQUIRED: shell scripts (`.sh`, `.bash`, `.zsh`) MUST have the execute bit set
  • FORBIDDEN: the same canonical hook path registered in BOTH global and local settings (warning — fires twice)
  • FORBIDDEN: hook commands referencing undefined environment variables (e.g. `$
Read more
Ships withautonomous-dev

A harness that wraps Claude Code with enforcement, specialist agents, and alignment gates to deliver consistent, production-grade software engineering outcomes.

Get the whole plugin

Other commands on autonomous-dev.