feat(doctor): add fresh clone detection check (bd-4ew)
Add CheckFreshClone function that detects when JSONL contains issues but no database exists. Recommends 'bd init --prefix <detected-prefix>' to hydrate the database. This check appears early in doctor output to guide users on fresh clones. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -451,6 +451,14 @@ func runDiagnostics(path string) doctorResult {
|
||||
return result
|
||||
}
|
||||
|
||||
// Check 1a: Fresh clone detection (bd-4ew)
|
||||
// Must come early - if this is a fresh clone, other checks may be misleading
|
||||
freshCloneCheck := convertDoctorCheck(doctor.CheckFreshClone(path))
|
||||
result.Checks = append(result.Checks, freshCloneCheck)
|
||||
if freshCloneCheck.Status == statusWarning || freshCloneCheck.Status == statusError {
|
||||
result.OverallOK = false
|
||||
}
|
||||
|
||||
// Check 2: Database version
|
||||
dbCheck := checkDatabaseVersion(path)
|
||||
result.Checks = append(result.Checks, dbCheck)
|
||||
|
||||
Reference in New Issue
Block a user