lib-process:shared--infra-diagnostic
infra-diagnostic overview
Shell-first infrastructure diagnostic and remediation template. Always uses shell tasks for process management — never agent tasks for kill/rebuild. Mandates CWD check for any running Next.js server in the very first diagnostic phase. Structure: 5 phases Phase 1: Shell env snapshot (ps aux, /tmp state, PG socket, server CWD check) Phase 2: Breakpoint — human reviews diagnostics before remediation begins Phase 3: Agent-led root cause investigation (reads logs, Prisma schema, env snapshot) Phase 4: Shell-based remediation (from correct /tmp/trip-planner-dev directory) Phase 5: Breakpoint — confirm environment is healthy Critical rule: Server MUST run from /tmp/trip-planner-dev, NOT from project root. Missing this check in fix-db-v1 and fix-db-v2 caused 2 unnecessary extra runs.
Attributes
- remediate
Outgoing edges
- domain:software-engineering·DomainSoftware Engineering
- workflow:bug-triage·WorkflowBug Triage