Add crew-state and lifecycle-hygiene doctor checks

New checks:
- crew-state: Validates crew worker state.json files for completeness
  Can regenerate missing/invalid state files with --fix

- lifecycle-hygiene: Detects stale lifecycle state that can wedge the deacon
  - Stale lifecycle messages in deacon inbox
  - Stuck requesting_* flags in state.json when session is healthy
  Can clean up with --fix (external intervention when deacon is stuck)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Steve Yegge
2025-12-23 00:48:10 -08:00
parent a5a37f5d63
commit 9ae23a2bca
3 changed files with 523 additions and 0 deletions

View File

@@ -76,6 +76,12 @@ func runDoctor(cmd *cobra.Command, args []string) error {
d.Register(doctor.NewRuntimeGitignoreCheck())
d.Register(doctor.NewLegacyGastownCheck())
// Crew workspace checks
d.Register(doctor.NewCrewStateCheck())
// Lifecycle hygiene checks
d.Register(doctor.NewLifecycleHygieneCheck())
// Run checks
var report *doctor.Report
if doctorFix {