Diagnostic health check for the AgentFlow pipeline. Verifies prerequisites, checks connectivity, reports pipeline status. In plugin mode, also checks plugin installation, agents, hooks, and inter-agent communication.
Diagnostic health check for the AgentFlow pipeline. Verifies prerequisites, checks connectivity, reports pipeline status. In plugin mode, also checks plugin installation, agents, hooks, and inter-agent communication.
/sdlc-health
Run a comprehensive health check on the AgentFlow pipeline. Report status for every subsystem and provide actionable fix instructions for any issues found.
Execution
Run all checks below in order. Collect results, then print the summary at the end.
Checks
1. Prerequisites
Verify each of these exists and is functional:
Claude Code CLI -- run claude --version to confirm it is accessible
git -- run git --version
gh (GitHub CLI) -- run gh --version, then gh auth status to confirm authentication
Recent log entry -- if log exists, read the last 5 lines. Check if the most recent entry is less than 30 minutes old.
Last entry successful -- check that the last log entry does NOT contain "ERROR"
If crontab is not configured: "Crontab not set up. Run: ./setup.sh --with-cron"
5. Git Status
Run these in the current working directory:
Not on main -- git branch --show-current should NOT be main or master (workers should be on feature branches)
Clean working tree -- git status --porcelain should be empty (uncommitted changes block worktree creation)
Remote configured -- git remote get-url origin should return a valid URL
Remote accessible -- git ls-remote --exit-code origin HEAD should succeed
6. LEARNINGS.md Status
If a LEARNINGS.md file exists in the current project:
Count the number of lines
If approaching 50 lines: report as INFO
If over 50 lines: report as WARNING ("LEARNINGS.md is over the 50-line cap. Consider archiving old entries.")
7. Plugin Status (Plugin Mode Only)
If running as a Claude Code plugin:
Plugin installed — check if agentflow plugin is recognized
Agent definitions — verify all 4 agents are loadable
Hook definitions — verify all 3 hooks are loadable
Team status — if sprint-team exists, report member health
SendMessage working — verify inter-agent communication
Output:
Plugin: [OK] v2.0.0, 4 agents, 3 hooks (or [N/A] Not in plugin mode)
Output Format
Print a clean summary:
AgentFlow Health Check
======================
Prerequisites: [OK] All 12 checks passed (or [FAIL] Missing: <list>)
PM Tool: [OK] Connected as <username> (or [FAIL] <error>)
Pipeline: N project(s), M active tasks, K in Needs Human
Orchestrator: [OK] Last sweep 5 min ago (or [FAIL] No sweep in 60 min!)
Crontab: [OK] Configured, last run 12 min ago (or [FAIL] Not set up)
Git: [OK] Clean, on branch feature/xyz (or [WARN] Uncommitted changes)
LEARNINGS.md: [OK] 23 lines (or [WARN] 52 lines -- over 50-line cap)
Plugin: [OK] v2.0.0, 4 agents, 3 hooks (or [N/A] Not in plugin mode)
Then list any issues, sorted by severity:
Issues Found:
[CRITICAL] No orchestrator sweep in 65 minutes -- check crontab and /tmp/agentflow-orchestrate.log
[CRITICAL] Asana MCP not responding -- check MCP server configuration
[WARNING] 2 tasks in Needs Human: APP-003, APP-007
[WARNING] GitHub CLI not authenticated -- run: gh auth login
[INFO] LEARNINGS.md is 48 lines (approaching 50-line cap)
[INFO] No AgentFlow projects found -- create one with /spec-to-asana
If zero issues found, print:
No issues found. Pipeline is healthy.
Fix Instructions
For every issue reported, include a one-line fix command or instruction: