Skip to content

Garry's Opinionated OpenClaw/Hermes Agent Brain

TypeScript
416 KB
Raw Blame
{
  "golden": {
    "first": {
      "args": [
        "doctor",
        "--json",
        "--skills-dir",
        "<home>/skills"
      ],
      "exit_code": 1,
      "report": {
        "alert": {
          "docs": "docs/guides/troubleshooting.md#doctor-alert",
          "items": [],
          "level": "none",
          "unknown": []
        },
        "brain_checks_score": 45,
        "budget_ms": "<volatile>",
        "capped_by": [
          "embeddings_disabled"
        ],
        "category_scores": {
          "brain": 45,
          "meta": 95,
          "ops": 100,
          "skill": 95
        },
        "checks": [
          {
            "category": "skill",
            "elapsed_ms": "<volatile>",
            "message": "1 skills, all reachable",
            "name": "resolver_health",
            "status": "ok"
          },
          {
            "category": "skill",
            "details": {
              "enabled": true,
              "engine": "postgres",
              "fired_recently": false,
              "last_fired": null,
              "path": "postgres direct",
              "policy_skill_installed": false
            },
            "elapsed_ms": "<volatile>",
            "message": "postgres direct; enabled; not observed firing yet — policy skill not installed; run `gbrain integrations install retrieval-reflex --target <host-repo>`",
            "name": "retrieval_reflex_health",
            "status": "ok"
          },
          {
            "category": "skill",
            "details": {
              "channels": {},
              "window_days": 7
            },
            "elapsed_ms": "<volatile>",
            "message": "no push-context activity in 7 days — note: the harness-hook channels require a PGLite serve socket — on this engine the hook lane stays quiet by design (pull-mode retrieval covers it)",
            "name": "volunteer_channels",
            "status": "ok"
          },
          {
            "category": "skill",
            "elapsed_ms": "<volatile>",
            "message": "no verb calls recorded yet (sidecar appears on first remember/recall/entity/synthesize/forget)",
            "name": "memory_verbs_usage",
            "status": "ok"
          },
          {
            "category": "skill",
            "elapsed_ms": "<volatile>",
            "message": "1/1 skills pass",
            "name": "skill_conformance",
            "status": "ok"
          },
          {
            "category": "skill",
            "elapsed_ms": "<volatile>",
            "message": "1 skill(s) compliant or exempt",
            "name": "skill_brain_first",
            "status": "ok"
          },
          {
            "category": "skill",
            "elapsed_ms": "<volatile>",
            "message": "No skills.lock.json in <home>/skills — integrity check not applicable",
            "name": "skills_manifest_integrity",
            "status": "ok"
          },
          {
            "category": "skill",
            "details": {
              "drifted": [],
              "new": [
                "academic-verify",
                "archive-crawler",
                "article-enrichment",
                "ask-user",
                "blog-ingest",
                "book-mirror",
                "brain-ingest-gate",
                "brain-link-discipline",
                "brain-ops",
                "brain-pdf",
                "brain-taxonomist",
                "briefing",
                "bulk-ingestion",
                "capture",
                "chat-connectors",
                "citation-fixer",
                "citation-graph-ingest",
                "cold-start",
                "company-brainify",
                "concept-synthesis",
                "context-audit",
                "conversation-archive",
                "correction-pipeline",
                "cron-scheduler",
                "cross-modal-review",
                "daily-task-manager",
                "daily-task-prep",
                "data-loss-gate",
                "data-research",
                "draft-in-voice",
                "eiirp",
                "enrich",
                "fact-check",
                "functional-area-resolver",
                "gbrain-advisor",
                "google-loops",
                "idea-ingest",
                "idea-lineage",
                "ingest",
                "maintain",
                "mcp-access",
                "measure-before-you-fix",
                "media-ingest",
                "meeting-ingestion",
                "minion-orchestrator",
                "perplexity-research",
                "publish",
                "query",
                "repo-architecture",
                "reports",
                "research-compendium",
                "resolve-before-asking",
                "signal-detector",
                "skill-autobench",
                "skill-creator",
                "skillify",
                "skillpack-check",
                "skillpack-harvest",
                "soul-audit",
                "storage-manifest",
                "strategic-reading",
                "testing",
                "two-tier-extraction",
                "voice-note-ingest",
                "webhook-transforms"
              ]
            },
            "elapsed_ms": "<volatile>",
            "fix_unavailable_reason": "unstructured",
            "message": "65 new built-in skill(s) available that this workspace hasn't installed: academic-verify, archive-crawler, article-enrichment, ask-user, blog-ingest, book-mirror, brain-ingest-gate, brain-link-discipline, … +57 more. Add them with `gbrain skillpack sync`.",
            "name": "skill_currency",
            "status": "warn"
          },
          {
            "category": "skill",
            "elapsed_ms": "<volatile>",
            "message": "no installed skills declare preconditions",
            "name": "skill_preconditions",
            "status": "ok"
          },
          {
            "category": "skill",
            "details": {
              "scope": "managed",
              "totals": {
                "bytes": 100,
                "drift": 0,
                "invocations": 0,
                "size": 0,
                "skills": 1,
                "subcommands_unverified": 0
              }
            },
            "elapsed_ms": "<volatile>",
            "message": "1 skill(s), 0 KB, 0 gbrain invocation(s) (0 with undeclared subcommands, flags checked); no findings",
            "name": "skill_health",
            "status": "ok"
          },
          {
            "category": "ops",
            "details": {
              "enabled": false,
              "out_of_band_settable": true,
              "reason": "disabled"
            },
            "elapsed_ms": "<volatile>",
            "message": "memorable relay off (default)",
            "name": "memorable_relay_health",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "audience": "personal",
              "audience_reasons": [
                "no shared declaration; 0 non-automation client(s) active in 30d"
              ],
              "backstop_visibility": "private",
              "capture_lanes": {
                "compact": "extract",
                "session_end": "extract",
                "writeback": "retire"
              },
              "corpus_source_holds": {
                "legacy_unstamped": 0,
                "sessions": 0,
                "unresolved": 0
              },
              "counters_note": "local, append-only, loss-tolerant observability over the last 7d — never a source of truth",
              "cross_lane_duplicates_7d": 0,
              "instruction_visibility": "world",
              "mode": "off",
              "mode_valid": true,
              "near_duplicates_shadow_7d": 0,
              "nudge_shown": false,
              "transient_ttl": "3d",
              "ttl_valid": true,
              "visibility_note": "world = readable by agents authorized on THIS brain, not the public internet"
            },
            "elapsed_ms": "<volatile>",
            "message": "ambient writeback off (default): Stop-hook turn capture is off, but the compaction harvest and SessionEnd transcripts still extract (installing the harness hooks opted into them; stop them: gbrain config set memory.auto_writeback off). Enable: gbrain config set memory.auto_writeback salient",
            "name": "memory_writeback",
            "status": "ok"
          },
          {
            "category": "ops",
            "elapsed_ms": "<volatile>",
            "message": "No chat connectors configured (optional).",
            "name": "connectors",
            "status": "ok"
          },
          {
            "category": "ops",
            "details": {
              "breaker_enabled": true,
              "count_exact": true,
              "inspected_keys": 0,
              "keys": [],
              "threshold": 3
            },
            "elapsed_ms": "<volatile>",
            "message": "No dream key died 3+ times in 24h",
            "name": "dream_paid_loop",
            "status": "ok"
          },
          {
            "category": "meta",
            "details": {
              "pending_fresh_install": [
                "0.11.0",
                "0.14.0",
                "0.22.4",
                "0.28.0",
                "0.53.0"
              ]
            },
            "elapsed_ms": "<volatile>",
            "fix": {
              "actor": "agent",
              "argv": [
                "gbrain",
                "apply-migrations",
                "--yes",
                "--no-autopilot-install"
              ],
              "command": "gbrain apply-migrations --yes --no-autopilot-install",
              "consent": [],
              "next": "run",
              "requires_exclusive": true,
              "verify": {
                "argv": [
                  "gbrain",
                  "doctor",
                  "--only",
                  "minions_migration",
                  "--json",
                  "--brain",
                  "host"
                ]
              },
              "why": "Runs the setup migrations gbrain init left pending (preferences, host-work notes, shared-skill checkpoints) on the brain host, without installing background services."
            },
            "message": "5 setup migration(s) not run yet on this new brain (pending_fresh_install: 0.11.0, 0.14.0, 0.22.4, 0.28.0, 0.53.0). Expected after gbrain init, not a failed upgrade.",
            "name": "minions_migration",
            "severity": "info",
            "status": "ok"
          },
          {
            "category": "ops",
            "elapsed_ms": "<volatile>",
            "message": "mode=notify; channel=stable (config)",
            "name": "self_upgrade_health",
            "status": "ok"
          },
          {
            "category": "ops",
            "elapsed_ms": "<volatile>",
            "message": "Bun <bun-version> (minimum 1.4.4)",
            "name": "bun_runtime",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "message": "disabled (opt-in). Enable with: gbrain config set autopilot.nightly_quality_probe.enabled true",
            "name": "nightly_quality_probe_health",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "kinds": [],
              "schema_version": 1
            },
            "elapsed_ms": "<volatile>",
            "message": "no extractions in last 7 days",
            "name": "extract_health",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "message": "disabled (opt-in). Enable with: gbrain config set cycle.conversation_facts_backfill.enabled true",
            "name": "conversation_facts_backlog",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "backlog": 0,
              "known_approximation": "page backlog only; transcript corpus not counted",
              "pack_declares_phase": false
            },
            "elapsed_ms": "<volatile>",
            "message": "no pages awaiting atom extraction",
            "name": "extract_atoms_backlog",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "body_unchanged": 0,
              "drift_pct": 0,
              "drifted": 0,
              "slug_unbound": 0,
              "source_changed": 0,
              "source_gone": 0,
              "total_atoms": 0
            },
            "elapsed_ms": "<volatile>",
            "message": "no atoms to check",
            "name": "atom_provenance_drift",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "message": "No conversation-type pages — coverage check not applicable",
            "name": "conversation_format_coverage",
            "status": "ok"
          },
          {
            "category": "ops",
            "elapsed_ms": "<volatile>",
            "message": "No progressive-batch operations in the last 7 days",
            "name": "progressive_batch_audit_health",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "message": "disabled (opt-in; default-on only for search.mode=tokenmax). Enable with: `gbrain config set autopilot.conversation_parser_probe.enabled true`",
            "name": "conversation_parser_probe_health",
            "status": "ok"
          },
          {
            "category": "ops",
            "elapsed_ms": "<volatile>",
            "message": "gbrain home is outside any enclosing git worktree.",
            "name": "home_dir_in_worktree",
            "status": "ok"
          },
          {
            "category": "ops",
            "elapsed_ms": "<volatile>",
            "message": "No abandoned PGLite store under the gbrain home (engine: postgres).",
            "name": "pglite_leftovers",
            "status": "ok"
          },
          {
            "category": "meta",
            "elapsed_ms": "<volatile>",
            "message": "default source local_path is set: <home>/.gbrain/content/<uuid>/default",
            "name": "default_source_local_path",
            "status": "ok"
          },
          {
            "category": "meta",
            "details": {
              "docs": "docs/guides/troubleshooting.md#not-verified-doctor-checks",
              "git_root_skipped": [],
              "limit": 10000,
              "timeout_ms": "<volatile>",
              "unreadable_sources": [],
              "walk_truncated": false
            },
            "elapsed_ms": "<volatile>",
            "message": "No cross-source slug drift detected.",
            "name": "multi_source_drift",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "docs": "docs/guides/repair.md#embedding-key-source",
              "embedding_key": {
                "config_key": "voyage_api_key",
                "kind": "missing",
                "variable": "VOYAGE_API_KEY"
              },
              "embedding_model": "voyage:voyage-4",
              "shadows": []
            },
            "elapsed_ms": "<volatile>",
            "message": "No embedding key is set here (VOYAGE_API_KEY or voyage_api_key). No environment variable overrides a different config-plane provider key. This check sees only the environment `gbrain doctor` runs in; a daemon (gbrain serve, autopilot) has its own, and reports a mismatch in its log with a startup warning or embedding_auth_failed.",
            "name": "embedding_key_source",
            "status": "ok"
          },
          {
            "category": "ops",
            "details": {
              "decision": null,
              "provider_env": []
            },
            "elapsed_ms": "<volatile>",
            "message": "No gbrain setup receipt records a provider-use decision for this install; provider calls follow the configured keys.",
            "name": "provider_consent",
            "readiness_state": "not_applicable",
            "severity": "info",
            "status": "ok"
          },
          {
            "category": "ops",
            "details": {
              "reason": "no_harness_detected"
            },
            "elapsed_ms": "<volatile>",
            "fix": {
              "actor": "user",
              "consent": [
                "persistent_install"
              ],
              "docs": "https://github.com/garrytan/gbrain/blob/master/docs/protocol/MEMORY_VERBS_v1.md#install-the-4-command-quickstart",
              "next": "report",
              "requires_exclusive": false,
              "user_message": "Which agent app should get gbrain memory? The install guide has a one-line command for each.",
              "why": "For Claude Code or Codex, run `gbrain setup claude-code` or `gbrain setup codex` (it registers serve behind gbrain's launcher, so the session directory's bunfig.toml and .env never load). For any other host, register `<absolute path to gbrain> serve --surface starter --advertise verbs` as a stdio MCP server in your agent host; the install section lists the exact command per harness (Claude Code, Codex, Grok Build, opencode, OpenClaw)."
            },
            "message": "No agent harness was detected. Wire one when the user picks an agent app.",
            "name": "harness_wiring",
            "readiness_state": "missing",
            "severity": "info",
            "status": "ok"
          },
          {
            "category": "meta",
            "details": {
              "consent_refused": 0,
              "derived_cap_exhausted": 0,
              "events": 0,
              "internal_errors": 0,
              "json_document_missing": 0,
              "window_days": 7
            },
            "elapsed_ms": "<volatile>",
            "message": "No agent dead ends in the last 7 days (0 non-success event(s) logged).",
            "name": "agent_contract",
            "status": "ok"
          },
          {
            "category": "ops",
            "elapsed_ms": "<volatile>",
            "message": "Connected, 20 pages",
            "name": "connection",
            "status": "ok"
          },
          {
            "category": "ops",
            "details": {
              "background_pause_pct": 80,
              "commands": [],
              "docs": "docs/guides/concurrent-writes.md#quota-near-exhaustion",
              "exact": true,
              "forecast": {
                "retention_days": 30,
                "rows": [],
                "table_bytes": "<volatile>",
                "thresholds": {
                  "fail_days": 7,
                  "fail_pct": 95,
                  "warn_days": 30,
                  "warn_pct": 80
                },
                "window_days": 1
              },
              "housekeeping": {
                "compactable_bytes": null,
                "explicit_retention_days": null,
                "over_target": false,
                "target_bytes": 8589934592,
                "used_bytes": 200716
              },
              "inspected": 2,
              "outstanding": [],
              "paused_producers": [],
              "resources": [],
              "truncated": false,
              "verify": "gbrain doctor --only persistence_capacity --json"
            },
            "elapsed_ms": "<volatile>",
            "message": "No cumulative write cap is set (the default), so receipt storage never refuses or pauses a write; it holds 200716 reserved bytes, and receipts not yet compacted are under the housekeeping target of 8589934592.",
            "name": "persistence_capacity",
            "status": "ok"
          },
          {
            "category": "ops",
            "details": {
              "active_blockers": [],
              "config": {
                "receipt_retention_days": 30,
                "spike_factor": {
                  "key": "persistence.terminal_failures.spike_factor",
                  "value": 3
                },
                "spike_min": {
                  "key": "persistence.terminal_failures.spike_min",
                  "value": 25
                },
                "window_clamped": false,
                "window_days": {
                  "key": "persistence.terminal_failures.window_days",
                  "value": 7
                }
              },
              "count": 0,
              "defects": [],
              "docs": "docs/guides/troubleshooting.md#terminal-write-failures",
              "historical_rows": 0,
              "new_last_24h": 0,
              "ranked": {
                "blocking": [],
                "historical": {
                  "rows": 0
                },
                "unresolved": {
                  "group_by": [],
                  "groups": [],
                  "pages": 0,
                  "rows": 0
                }
              },
              "sources": [],
              "spike": {
                "daily_7d": [
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0
                ],
                "last_24h": 0,
                "median_7d": 0,
                "spiking": false
              },
              "unresolved": {
                "distinct_intents": 0,
                "distinct_slugs": 0,
                "oldest_age_seconds": "<volatile>",
                "rows": 0
              },
              "window_days": 7
            },
            "elapsed_ms": "<volatile>",
            "message": "No terminal write failures in the last 7 d.",
            "name": "persistence_terminal_failures",
            "status": "ok"
          },
          {
            "category": "ops",
            "details": {
              "count": 0,
              "docs": "docs/guides/troubleshooting.md#managed-sync-not-moving",
              "parked": 0,
              "sources": [],
              "stranded": 0
            },
            "elapsed_ms": "<volatile>",
            "message": "No managed sync is pending.",
            "name": "managed_sync_not_moving",
            "status": "ok"
          },
          {
            "category": "ops",
            "elapsed_ms": "<volatile>",
            "message": "No managed sync run is blocked.",
            "name": "managed_sync_blocked",
            "status": "ok"
          },
          {
            "category": "ops",
            "details": {
              "age_seconds": null,
              "docs": "docs/guides/error-codes.md#sync_admission_restricted",
              "set_at": null,
              "stored": null,
              "value": "normal"
            },
            "elapsed_ms": "<volatile>",
            "message": "sync.admission is normal: managed sync admits everything it classifies.",
            "name": "sync_admission_restricted",
            "status": "ok"
          },
          {
            "category": "ops",
            "details": {
              "docs": "docs/guides/repair.md#receipt-compaction",
              "last_compaction": {
                "at": "<ts>",
                "compacted": 0,
                "early": 0,
                "freed_bytes": 0,
                "host_id": "<uuid>",
                "skipped_by_reason": {}
              },
              "last_compaction_age_hours": 0,
              "live_consumers": 0,
              "stale_hours": 24
            },
            "elapsed_ms": "<volatile>",
            "message": "Receipt compaction last ran 0 hour(s) ago (compacted 0, freed 0 bytes).",
            "name": "persistence_compaction",
            "status": "ok"
          },
          {
            "category": "ops",
            "details": {
              "by_day": [
                {
                  "content_decisions": 0,
                  "day": "<soak-day>",
                  "interventions": 1
                }
              ],
              "content_decisions": {
                "file_drift_apply": 0,
                "file_drift_hold": 0,
                "total": 0
              },
              "docs": "docs/guides/sync-unblock-runbook.md#soak-counters",
              "interventions": {
                "needs_human": 1,
                "repair_apply": 0,
                "retry_held": 0,
                "sync_non_plain": 0,
                "total": 1,
                "unblock_apply": 0
              },
              "since": "<ts>",
              "window_days": 7
            },
            "elapsed_ms": "<volatile>",
            "message": "Last 7 days: 1 managed-sync intervention(s) (needs_human 1), 0 content decision(s).",
            "name": "sync_soak_counters",
            "severity": "info",
            "status": "ok"
          },
          {
            "category": "ops",
            "details": {
              "count": 0,
              "docs": "docs/guides/troubleshooting.md#serve-build-drift",
              "newer": [],
              "older": [],
              "owner": null,
              "this_version": "<version>"
            },
            "elapsed_ms": "<volatile>",
            "message": "No live gbrain consumer on this host writes a heartbeat row. A serve that predates heartbeats writes none; consumers_without_heartbeat names it when it holds claims.",
            "name": "serve_build_drift",
            "status": "ok"
          },
          {
            "category": "meta",
            "details": {
              "code": "page_type_undeclared",
              "docs": "docs/architecture/schema-packs.md#undeclared-page-types",
              "per_source": [
                {
                  "pack": "gbrain-base-v2",
                  "source_id": "notes",
                  "total": 19,
                  "undeclared": 1,
                  "undeclared_types": [
                    {
                      "count": 1,
                      "type": "2024"
                    }
                  ],
                  "untyped": 0
                },
                {
                  "pack": "gbrain-base-v2",
                  "source_id": "plain",
                  "total": 1,
                  "undeclared": 0,
                  "undeclared_types": [],
                  "untyped": 0
                }
              ],
              "unresolved_sources": []
            },
            "elapsed_ms": "<volatile>",
            "fix_unavailable_reason": "unstructured",
            "message": "Source `notes`: 1 page(s) use 1 type(s) pack `gbrain-base-v2` neither declares nor aliases: '2024' (1). List them with `gbrain schema review-orphans --source notes`, then declare the type (`gbrain schema add-type <type>`, which takes its primitive and prefix) or retype the pages to a declared type.",
            "name": "schema_pack_consistency",
            "status": "warn"
          },
          {
            "category": "brain",
            "details": {
              "active_column": "embedding",
              "basis": "exact",
              "counts": {
                "chunkless_healable": 0,
                "deleted_page_chunks": 0,
                "embedded": 0,
                "empty": 1,
                "keyword_only": 0,
                "pending": 23,
                "quarantined": 0
              },
              "coverage": {
                "basis": "exact",
                "eligible": 23,
                "embedded": 0,
                "ratio": 0
              },
              "covering_index": null,
              "deleted_page_chunks": {
                "held": 0,
                "past_window": 0,
                "purgeable": 0,
                "window_hours": 72,
                "within_window": 0
              },
              "embeddings_enabled": false,
              "exact": true,
              "keyword_only": {
                "marker_bytes": 0,
                "pages": 0,
                "reason": "embed_skip",
                "threshold_bytes": 25165824
              },
              "mode": "full",
              "omitted_states": [],
              "reason": "embeddings_disabled",
              "status": "known",
              "units": "content_chunks rows, plus one unit per page with no chunk rows",
              "unsearchable": 1,
              "unsearchable_complete": true,
              "unstamped_pending": {
                "count": 0,
                "created_at_lower_bound": null,
                "writer_version": "<version>"
              }
            },
            "elapsed_ms": "<volatile>",
            "fix": {
              "actor": "user",
              "argv": [
                "gbrain",
                "init",
                "--force",
                "--embedding-model",
                "voyage:voyage-4",
                "--embedding-dimensions",
                "1024"
              ],
              "command": "gbrain init --force --embedding-model voyage:voyage-4 --embedding-dimensions 1024",
              "consent": [
                "credentials",
                "paid"
              ],
              "docs": "https://github.com/garrytan/gbrain/blob/master/docs/guides/search-modes.md",
              "inputs": [
                {
                  "how": "Ask the user for an API key for Voyage AI; store it with `gbrain config set voyage_api_key <key>` (every gbrain process reads it), or export VOYAGE_API_KEY in the environment of every gbrain process. Then run the command.",
                  "name": "VOYAGE_API_KEY"
                }
              ],
              "next": "tell_user_to_run",
              "requires_exclusive": true,
              "user_message": "Semantic search needs an embedding API key. Voyage AI works with this brain; if you add a key (VOYAGE_API_KEY), I can turn it on. Embedding costs a little per page; your notes and facts stay as they are.",
              "verify": {
                "argv": [
                  "gbrain",
                  "doctor",
                  "--only",
                  "embeddings",
                  "--json",
                  "--brain",
                  "host"
                ]
              },
              "why": "Embeddings are off, so search is keyword-only, and no configured embedding key fits this brain. Once the key is set this turns on voyage:voyage-4 (1024d) for this Postgres brain. Pages, facts and keyword search are kept; existing chunks and facts are queued for vectors, which `gbrain embed --stale` (or the next maintenance cycle) fills."
            },
            "message": "Embedding state (exact, column 'embedding'): 0 embedded, 23 pending, 0 keyword-only, 0 quarantined, 1 empty, 0 on deleted pages, 0 chunkless (healable); 1 unsearchable. Embeddings are disabled by choice: keyword search reads the pending chunks.",
            "name": "embedding_state",
            "readiness_state": "disabled_by_choice",
            "severity": "info",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "message": "Extraction lag not applicable (20 pages — too few to assess); 1 page(s) pending link extraction (gbrain extract --stale finishes them)",
            "name": "links_extraction_lag",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "message": "No large page has chunks waiting for embedding approval (held or capped by embed.max_usd_per_page).",
            "name": "partial_embedding",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "docs": "docs/guides/resolve-paths.md#synced-but-not-searchable",
              "sources": [
                {
                  "after_seconds": 300,
                  "by_state": {},
                  "checked": 0,
                  "complete": true,
                  "gaps": 0,
                  "pages": [],
                  "source_id": "default",
                  "status": "ok",
                  "window_hours": 24
                },
                {
                  "after_seconds": 300,
                  "by_state": {},
                  "checked": 0,
                  "complete": true,
                  "gaps": 0,
                  "pages": [],
                  "source_id": "notes",
                  "status": "ok",
                  "window_hours": 24
                },
                {
                  "after_seconds": 300,
                  "by_state": {},
                  "checked": 0,
                  "complete": true,
                  "gaps": 0,
                  "pages": [],
                  "source_id": "plain",
                  "status": "ok",
                  "window_hours": 24
                }
              ]
            },
            "elapsed_ms": "<volatile>",
            "message": "Every page managed sync committed past its freshness target in the last 24 h is searchable.",
            "name": "sync_landing_gaps",
            "status": "ok"
          },
          {
            "category": "ops",
            "elapsed_ms": "<volatile>",
            "message": "Extension installed",
            "name": "pgvector",
            "status": "ok"
          },
          {
            "category": "ops",
            "elapsed_ms": "<volatile>",
            "message": "Postgres driver supports safe query cancellation.",
            "name": "postgres_cancellation_driver",
            "status": "ok"
          },
          {
            "category": "meta",
            "elapsed_ms": "<volatile>",
            "message": "pages has the UNIQUE(source_id, slug) upsert arbiter",
            "name": "pages_upsert_arbiter",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "archived": 0,
              "as_of": "<ts>+00",
              "failed": 0,
              "ocr_required": 0,
              "oldest_age_seconds": "<volatile>",
              "pending": 1,
              "protected": 0,
              "readiness": "projection_pending",
              "ready": false,
              "reimport": 0,
              "sealable": 0,
              "sealable_with_visual": 0
            },
            "elapsed_ms": "<volatile>",
            "fix": {
              "actor": "agent",
              "argv": [
                "gbrain",
                "projections",
                "drain",
                "--limit",
                "4800",
                "--brain",
                "host"
              ],
              "command": "gbrain projections drain --limit 4800 --brain host",
              "consent": [],
              "docs": "https://github.com/garrytan/gbrain/blob/master/docs/guides/repair.md#projection-drain",
              "next": "run",
              "preview_argv": [
                "gbrain",
                "projections",
                "drain",
                "--dry-run",
                "--json",
                "--brain",
                "host"
              ],
              "requires_exclusive": false,
              "verify": {
                "argv": [
                  "gbrain",
                  "projections",
                  "drain",
                  "--dry-run",
                  "--json",
                  "--brain",
                  "host"
                ]
              },
              "why": "Rebuilds queued Markdown and code projections and seals importer-attested image pages in place, at most 4800 pages per run; repeat until the dry run shows sealable 0."
            },
            "message": "Visible pages have missing or stale text projections (1 queued Markdown/code page(s)); search and code results may be incomplete. Run `gbrain projections drain` to rebuild queued Markdown and code projections now; it is safe while `gbrain serve` runs on Postgres. For code metadata repair, run `gbrain reindex-code --force --no-embed`. If work stays pending, inspect the recorded source path. No repair or embedding was started by this check.",
            "name": "text_projection_readiness",
            "status": "warn"
          },
          {
            "category": "ops",
            "details": {
              "docs": "docs/guides/concurrent-writes.md#counter-drift",
              "drift": [],
              "inspected": 2,
              "true_up_clamped": 0
            },
            "elapsed_ms": "<volatile>",
            "message": "Receipt-bytes counters match the receipts they account for (2 scope(s)).",
            "name": "persistence_counter_drift",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "effects": [],
              "exact": true,
              "git_push_holds": [],
              "inspected": 0,
              "parked_effects": 0,
              "parked_groups": [],
              "truncated": false
            },
            "elapsed_ms": "<volatile>",
            "message": "No Git or withdrawal effect is parked.",
            "name": "parked_effects",
            "status": "ok"
          },
          {
            "category": "ops",
            "details": {
              "refreshes": []
            },
            "elapsed_ms": "<volatile>",
            "message": "No worktree refresh is stuck.",
            "name": "worktree_refresh_stuck",
            "status": "ok"
          },
          {
            "category": "ops",
            "details": {
              "columns": [],
              "extra_columns": [],
              "page_child_source_columns": [],
              "runbook": "docs/guides/write-refusals.md#managed-guard-page-children"
            },
            "elapsed_ms": "<volatile>",
            "message": "Guarded tables carry only the columns gbrain creates.",
            "name": "managed_guard_schema_drift",
            "status": "ok"
          },
          {
            "category": "ops",
            "details": {
              "guard_refusals": 0,
              "runbook": "docs/guides/write-refusals.md#managed-guard-page-children",
              "trigger_refusals": 0,
              "unclassified_p0001": 0,
              "window_days": 7
            },
            "elapsed_ms": "<volatile>",
            "message": "No write was refused by a database guard in the last 7 days.",
            "name": "publication_refusals",
            "status": "ok"
          },
          {
            "category": "meta",
            "elapsed_ms": "<volatile>",
            "message": "links_link_source_check has the v114 kebab-case gate",
            "name": "links_link_source_check",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "alias_pages_without_visibility": 0,
              "count": "exact",
              "fact_ids_truncated": false,
              "looser_atoms": 0,
              "looser_concepts": 0,
              "looser_events": 0,
              "remotely_readable_fact_ids": [],
              "repair": "visibility",
              "truncated": false,
              "unstamped_atoms": 0,
              "unstamped_concepts": 0,
              "world_facts_from_private_sources": 0,
              "world_facts_remotely_readable": 0
            },
            "elapsed_ms": "<volatile>",
            "message": "Every derived page and fact carries a visibility no looser than its source, and no page relies on a privacy alias alone.",
            "name": "derived_visibility",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "docs": "docs/designs/GIT_CANONICAL_MEMORY.md#the-model",
              "sources": [],
              "warn_seconds": 900
            },
            "elapsed_ms": "<volatile>",
            "message": "No source is strict (git-canonical), so no index trails a commit.",
            "name": "git_index_lag",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "docs": "docs/designs/GIT_CANONICAL_MEMORY.md#the-git-gap-census",
              "errors": [],
              "informational": true,
              "newest": 800,
              "partial_sources": [],
              "sources": [
                {
                  "complete": true,
                  "declared": {
                    "alias_private": 0,
                    "database_only": 0,
                    "database_only_source": 0,
                    "db_only_prefix": 0,
                    "derive_folder": 0,
                    "git_ignored": 0,
                    "lineage_private": 0,
                    "mirror_source": 0,
                    "private": 0
                  },
                  "live_pages": 19,
                  "newest": 800,
                  "newest_since": "<ts>",
                  "pages": 19,
                  "source_id": "notes",
                  "states": {
                    "database_ahead": 4,
                    "declared_database_only": 0,
                    "equal": 11,
                    "git_ahead": 0,
                    "undeclared_database_only": 0,
                    "unparseable": 4,
                    "unsafe_path": 0,
                    "worktree_only": 0
                  },
                  "worktree": {
                    "absent": 0,
                    "clean": 18,
                    "deleted": 0,
                    "modified": 1,
                    "untracked": 0
                  }
                }
              ],
              "sources_without_git_checkout": 2,
              "timeout_ms": "<volatile>"
            },
            "elapsed_ms": "<volatile>",
            "message": "Informational, nothing to do: the database compared with the commit at HEAD, per source with a Git checkout. notes: 19 live page(s), 11 equal, 4 database_ahead, 4 unparseable. Page detail: gbrain sources git-gap <source-id>.",
            "name": "db_ahead_of_git",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "docs": "docs/guides/repair.md#facts-home",
              "sources": []
            },
            "elapsed_ms": "<volatile>",
            "message": "No source is strict (git-canonical), so no fact is required to have a Git home.",
            "name": "strict_facts_outside_git",
            "status": "ok"
          },
          {
            "category": "ops",
            "details": {
              "count": 0,
              "docs": "docs/guides/troubleshooting.md#owner-host-stale",
              "stale": [],
              "stale_after_ms": "<volatile>"
            },
            "elapsed_ms": "<volatile>",
            "message": "No managed write is waiting on an owner host.",
            "name": "owner_host_stale",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "by_source": [
                {
                  "checked": 0,
                  "other_writer": 0,
                  "source_id": "default",
                  "status": "known",
                  "sync_deleted": 0,
                  "tombstones": 0,
                  "truncated": false,
                  "unknown": 0
                },
                {
                  "checked": 0,
                  "other_writer": 0,
                  "source_id": "notes",
                  "status": "known",
                  "sync_deleted": 0,
                  "tombstones": 0,
                  "truncated": false,
                  "unknown": 0
                },
                {
                  "checked": 0,
                  "other_writer": 0,
                  "source_id": "plain",
                  "status": "known",
                  "sync_deleted": 0,
                  "tombstones": 0,
                  "truncated": false,
                  "unknown": 0
                }
              ],
              "count": 0,
              "docs": "docs/guides/repair.md#uncommitted-deletions",
              "exact": true,
              "other_writer_count": 0,
              "purged": "Pages already purged cannot be restored by this command; only a backup (pg_dump, or gbrain backup create taken before the purge) can bring them back.",
              "samples": [],
              "truncated": false
            },
            "elapsed_ms": "<volatile>",
            "message": "No soft-deleted page was removed by a sync while Git never held its file (0 tombstone(s) checked).",
            "name": "uncommitted_sync_deletions",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "message": "Not applicable: no page names readers and no member exists.",
            "name": "access_readers_malformed",
            "readiness_state": "not_applicable",
            "severity": "info",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "message": "Not applicable: no page names readers and no member exists.",
            "name": "access_unknown_readers",
            "readiness_state": "not_applicable",
            "severity": "info",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "message": "Not applicable: no page names readers and no member exists.",
            "name": "access_recent_narrowings",
            "readiness_state": "not_applicable",
            "severity": "info",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "message": "Not applicable: no page names readers and no member exists.",
            "name": "access_page_readers_backfill",
            "readiness_state": "not_applicable",
            "severity": "info",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "message": "Not applicable: no source has a folder rule.",
            "name": "access_policy_pending",
            "readiness_state": "not_applicable",
            "severity": "info",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "message": "Not applicable: no source has a folder rule.",
            "name": "access_policy_widening_held",
            "readiness_state": "not_applicable",
            "severity": "info",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "message": "Not applicable: no source has a folder rule.",
            "name": "access_policy_invalid",
            "readiness_state": "not_applicable",
            "severity": "info",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "message": "Not applicable: no source has a folder rule.",
            "name": "access_policy_store_mismatch",
            "readiness_state": "not_applicable",
            "severity": "info",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "message": "Not applicable: this brain serves one person (fewer than two enabled members and no access.serves = several).",
            "name": "unlabeled_people_folders",
            "readiness_state": "not_applicable",
            "severity": "info",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "message": "Not applicable: this brain serves one person, so its own keys read its own pages.",
            "name": "open_shared_pages",
            "readiness_state": "not_applicable",
            "severity": "info",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "message": "Not applicable: this brain serves one person (fewer than two enabled members and no access.serves = several).",
            "name": "unscoped_shared_reads",
            "readiness_state": "not_applicable",
            "severity": "info",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "message": "Not applicable: config mcp.stdio_member is unset, so no stdio session on this host reads as a member.",
            "name": "shared_stdio_binding",
            "readiness_state": "not_applicable",
            "severity": "info",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "message": "Not applicable: no page names readers and no member exists.",
            "name": "access_may_act_for_wildcard",
            "readiness_state": "not_applicable",
            "severity": "info",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "message": "Not applicable: the owner opt-in (access.owner_reads_restricted) is off; the owner reads a page that names readers or sits under a rule only when listed.",
            "name": "access_owner_reads_restricted",
            "readiness_state": "not_applicable",
            "severity": "info",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "message": "Not applicable: every folder and page rule also keeps the pages and facts derived from its pages to its readers (no rule has covers_derived: false).",
            "name": "access_raw_only_rules",
            "readiness_state": "not_applicable",
            "severity": "info",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "message": "Not applicable: no member is marked as an audience (gbrain access member kind <id> audience).",
            "name": "access_audience_members",
            "readiness_state": "not_applicable",
            "severity": "info",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "message": "Not applicable: access.members_read_lineage is off; derived pages and facts of a page that names readers or sits under a rule are hidden from every member but the owner.",
            "name": "access_members_read_lineage",
            "readiness_state": "not_applicable",
            "severity": "info",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "message": "Not applicable: no member is labelled-only (gbrain access member labelled-only <id> on).",
            "name": "access_labelled_only_members",
            "readiness_state": "not_applicable",
            "severity": "info",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "message": "Not applicable: no attest credential reads named sources as the person (--attest-read person).",
            "name": "attest_read_shared_scope",
            "readiness_state": "not_applicable",
            "severity": "info",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "message": "Not applicable: this brain has no guest source (gbrain guests init).",
            "name": "guest_source",
            "readiness_state": "not_applicable",
            "severity": "info",
            "status": "ok"
          },
          {
            "category": "ops",
            "elapsed_ms": "<volatile>",
            "message": "RLS enabled on 185/185 public tables",
            "name": "rls",
            "status": "ok"
          },
          {
            "category": "ops",
            "elapsed_ms": "<volatile>",
            "message": "The Postgres host is on this machine; TLS is not required.",
            "name": "postgres_tls",
            "status": "ok"
          },
          {
            "category": "ops",
            "elapsed_ms": "<volatile>",
            "message": "Every gbrain function that pins a search_path ends it with pg_temp",
            "name": "function_search_path",
            "status": "ok"
          },
          {
            "category": "ops",
            "elapsed_ms": "<volatile>",
            "message": "Every purge and withdrawal guard refuses a write role that row-level security keeps from its ledger",
            "name": "guard_ledger_checks",
            "status": "ok"
          },
          {
            "category": "ops",
            "elapsed_ms": "<volatile>",
            "message": "The database encoding is UTF8",
            "name": "database_encoding",
            "status": "ok"
          },
          {
            "category": "meta",
            "elapsed_ms": "<volatile>",
            "message": "Version <latest> (latest: <latest>)",
            "name": "schema_version",
            "status": "ok"
          },
          {
            "category": "meta",
            "elapsed_ms": "<volatile>",
            "message": "1399 column(s) verified against live schema",
            "name": "schema_columns",
            "status": "ok"
          },
          {
            "category": "meta",
            "elapsed_ms": "<volatile>",
            "message": "All 185 table(s) the applied migrations create exist.",
            "name": "schema_missing_tables",
            "status": "ok"
          },
          {
            "category": "meta",
            "elapsed_ms": "<volatile>",
            "message": "Every function this gbrain's schema defines has its body",
            "name": "schema_function_bodies",
            "status": "ok"
          },
          {
            "category": "ops",
            "elapsed_ms": "<volatile>",
            "message": "Auto-RLS event trigger installed",
            "name": "rls_event_trigger",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "fix": {
              "actor": "user",
              "argv": [
                "gbrain",
                "init",
                "--force",
                "--embedding-model",
                "voyage:voyage-4",
                "--embedding-dimensions",
                "1024"
              ],
              "command": "gbrain init --force --embedding-model voyage:voyage-4 --embedding-dimensions 1024",
              "consent": [
                "credentials",
                "paid"
              ],
              "docs": "https://github.com/garrytan/gbrain/blob/master/docs/guides/search-modes.md",
              "inputs": [
                {
                  "how": "Ask the user for an API key for Voyage AI; store it with `gbrain config set voyage_api_key <key>` (every gbrain process reads it), or export VOYAGE_API_KEY in the environment of every gbrain process. Then run the command.",
                  "name": "VOYAGE_API_KEY"
                }
              ],
              "next": "tell_user_to_run",
              "requires_exclusive": true,
              "user_message": "Semantic search needs an embedding API key. Voyage AI works with this brain; if you add a key (VOYAGE_API_KEY), I can turn it on. Embedding costs a little per page; your notes and facts stay as they are.",
              "verify": {
                "argv": [
                  "gbrain",
                  "doctor",
                  "--only",
                  "embeddings",
                  "--json",
                  "--brain",
                  "host"
                ]
              },
              "why": "Embeddings are off, so search is keyword-only, and no configured embedding key fits this brain. Once the key is set this turns on voyage:voyage-4 (1024d) for this Postgres brain. Pages, facts and keyword search are kept; existing chunks and facts are queued for vectors, which `gbrain embed --stale` (or the next maintenance cycle) fills."
            },
            "message": "Not applicable: embeddings are disabled on this brain (keyword search keeps working).",
            "name": "embeddings",
            "readiness_state": "disabled_by_choice",
            "severity": "info",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "fix": {
              "actor": "user",
              "argv": [
                "gbrain",
                "init",
                "--force",
                "--embedding-model",
                "voyage:voyage-4",
                "--embedding-dimensions",
                "1024"
              ],
              "command": "gbrain init --force --embedding-model voyage:voyage-4 --embedding-dimensions 1024",
              "consent": [
                "credentials",
                "paid"
              ],
              "docs": "https://github.com/garrytan/gbrain/blob/master/docs/guides/search-modes.md",
              "inputs": [
                {
                  "how": "Ask the user for an API key for Voyage AI; store it with `gbrain config set voyage_api_key <key>` (every gbrain process reads it), or export VOYAGE_API_KEY in the environment of every gbrain process. Then run the command.",
                  "name": "VOYAGE_API_KEY"
                }
              ],
              "next": "tell_user_to_run",
              "requires_exclusive": true,
              "user_message": "Semantic search needs an embedding API key. Voyage AI works with this brain; if you add a key (VOYAGE_API_KEY), I can turn it on. Embedding costs a little per page; your notes and facts stay as they are.",
              "verify": {
                "argv": [
                  "gbrain",
                  "doctor",
                  "--only",
                  "embeddings",
                  "--json",
                  "--brain",
                  "host"
                ]
              },
              "why": "Embeddings are off, so search is keyword-only, and no configured embedding key fits this brain. Once the key is set this turns on voyage:voyage-4 (1024d) for this Postgres brain. Pages, facts and keyword search are kept; existing chunks and facts are queued for vectors, which `gbrain embed --stale` (or the next maintenance cycle) fills."
            },
            "message": "Not probed: embeddings are disabled on this brain by choice (keyword search keeps working).",
            "name": "embedding_provider",
            "readiness_state": "disabled_by_choice",
            "severity": "info",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "message": "Registry healthy: 1 columns (embedding_image) (all indexed); primary embeddings disabled",
            "name": "embedding_column_registry",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "message": "no embedding env overrides set",
            "name": "embedding_env_override",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "message": "no embedding migration in flight",
            "name": "embedding_migration_state",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "message": "The brain records its embedding model with its provider (voyage:voyage-4).",
            "name": "embedding_identity_unqualified",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "message": "Embeddings are off on this brain, so facts are only deduplicated by exact text; no supersession threshold applies.",
            "name": "supersession_calibration",
            "readiness_state": "not_applicable",
            "severity": "info",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "message": "Embeddings are off on this brain, so facts are admitted by keyword and named entity only; no cosine floor applies.",
            "name": "fact_admission_floors",
            "readiness_state": "not_applicable",
            "severity": "info",
            "status": "ok"
          },
          {
            "category": "ops",
            "elapsed_ms": "<volatile>",
            "message": "No chat_fallback_chain is set: every chat call uses only its own model.",
            "name": "chat_fallback_chain",
            "status": "ok"
          },
          {
            "category": "meta",
            "elapsed_ms": "<volatile>",
            "message": "Nothing to disclose: this brain is a fresh install at v<version>, after every disclosed behavior change, so the one-time behavior-change notice does not apply.",
            "name": "behavior_changes",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "message": "Only 2 eligible entity pages (< 5) — coverage ratio not meaningful at this scale",
            "name": "graph_coverage",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "fix": {
              "actor": "agent",
              "argv": [
                "gbrain",
                "doctor",
                "--remediation-plan",
                "--json",
                "--brain",
                "host"
              ],
              "command": "gbrain doctor --remediation-plan --json --brain host",
              "consent": [],
              "next": "run",
              "requires_exclusive": false,
              "verify": {
                "argv": [
                  "gbrain",
                  "doctor",
                  "--only",
                  "brain_score",
                  "--json",
                  "--brain",
                  "host"
                ]
              },
              "why": "The plan lists which steps raise each score component, what they cost and the reachable maximum; it changes nothing."
            },
            "message": "Brain score 20/100 (embed 0/35, links 0/25, timeline density (entity and event pages) 10/15, orphans 0/15, dead-links 10/10)",
            "name": "brain_score",
            "status": "warn"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "message": "Vacuous: 2 entity pages (<100). Orphan ratio not meaningful at this scale.",
            "name": "orphan_ratio",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "message": "No by-mention links in this brain.",
            "name": "stale_mentions",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "message": "No orphaned timeline rows across 4 page(s).",
            "name": "timeline_orphans",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "message": "No slug collisions across 3 source checkout(s).",
            "name": "slug_collisions",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "message": "Every live page stored in segments has segment rows that cover its whole body.",
            "name": "segmented_tiling",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "count": "exact",
              "kept_unrenderable_rows": 1,
              "materializable_rows": 1,
              "pages_affected": 1,
              "pages_inspected": 4,
              "repair": "timeline",
              "truncated": false
            },
            "elapsed_ms": "<volatile>",
            "fix": {
              "actor": "agent",
              "argv": [
                "gbrain",
                "repair",
                "timeline",
                "--brain",
                "host"
              ],
              "command": "gbrain repair timeline --brain host",
              "consent": [],
              "next": "run",
              "requires_exclusive": false,
              "verify": {
                "argv": [
                  "gbrain",
                  "doctor",
                  "--only",
                  "timeline_history",
                  "--json",
                  "--brain",
                  "host"
                ]
              },
              "why": "Previews the repair without changing anything and prints the exact apply command; applying rewrites stored records, so ask the user first."
            },
            "message": "1 timeline row(s) on 1 page(s) exist only in the database. Preview: gbrain repair timeline — apply: gbrain repair timeline --apply. 1 other row(s) cannot round-trip and are kept as-is.",
            "name": "timeline_history",
            "status": "warn"
          },
          {
            "category": "brain",
            "details": {
              "count": "exact",
              "pages": 0,
              "scan_cap": 100000,
              "truncated": false,
              "value_count": 0,
              "values": [],
              "values_truncated": false
            },
            "elapsed_ms": "<volatile>",
            "message": "No page relies on an access or confidentiality value gbrain does not recognize.",
            "name": "privacy_label_ignored",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "count": "exact",
              "kept_pages": 0,
              "pages_pending": 0,
              "repair": "safe-chunks",
              "truncated": false
            },
            "elapsed_ms": "<volatile>",
            "message": "Every re-sealable page is at the safe-chunk index version.",
            "name": "safe_index_pending",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "count": "exact",
              "kept_pages": 0,
              "pages_pending": 0,
              "truncated": false
            },
            "elapsed_ms": "<volatile>",
            "message": "No page waits for the credential-safe re-chunk.",
            "name": "credential_projection_pending",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "checkpoints": 0,
              "count": 0,
              "docs": "docs/guides/repair.md#connector-checkpoints",
              "repair": "connector-checkpoints",
              "retries": 0,
              "truncated": false
            },
            "elapsed_ms": "<volatile>",
            "message": "No orphan connector checkpoint rows older than 7 days.",
            "name": "connector_checkpoints",
            "status": "ok"
          },
          {
            "category": "ops",
            "details": {
              "command": "gbrain repair request-indexes --apply",
              "count": 0,
              "docs": "docs/guides/repair.md#request-indexes",
              "indexes": [
                {
                  "name": "persistence_requests_sync_run_open",
                  "state": "valid"
                },
                {
                  "name": "persistence_requests_sync_run_committed",
                  "state": "valid"
                },
                {
                  "name": "persistence_requests_slug_intent",
                  "state": "valid"
                },
                {
                  "name": "persistence_requests_request_id",
                  "state": "valid"
                },
                {
                  "name": "persistence_requests_foreground_committed",
                  "state": "valid"
                },
                {
                  "name": "persistence_requests_replay_id",
                  "state": "valid"
                },
                {
                  "name": "persistence_requests_slug_sequence",
                  "state": "valid"
                }
              ],
              "repair": "request-indexes"
            },
            "elapsed_ms": "<volatile>",
            "message": "Request-table indexes are valid.",
            "name": "persistence_request_indexes",
            "status": "ok"
          },
          {
            "category": "ops",
            "details": {
              "commands": [],
              "docs": "docs/guides/repair.md#request-growth",
              "rows": 22,
              "rows_exact": false,
              "scopes": [],
              "verify": "gbrain doctor --json (check persistence_request_growth)",
              "window_days": 7
            },
            "elapsed_ms": "<volatile>",
            "message": "~22 request row(s); no scope exhausts its lifetime request IDs within 30 days at its last-7-day rate.",
            "name": "persistence_request_growth",
            "status": "ok"
          },
          {
            "category": "ops",
            "details": {
              "config_key": "persistence.max_claim_ms",
              "count": 0,
              "docs": "docs/guides/troubleshooting.md#persistence-write-stall",
              "max_claim_ms": "<volatile>",
              "preparation_policy": {
                "maintenance_preparation_ms": "<volatile>",
                "max_preparation_attempts": 2,
                "max_transient_retries": 5,
                "preparation_ceiling_ms": "<volatile>",
                "sync_preparation_ms": "<volatile>"
              },
              "stalls": []
            },
            "elapsed_ms": "<volatile>",
            "message": "No write request has held its claim longer than persistence.max_claim_ms (600000 ms).",
            "name": "persistence_write_stall",
            "status": "ok"
          },
          {
            "category": "ops",
            "details": {
              "compacted_unreplayable": 0,
              "count": 0,
              "docs": "docs/guides/repair.md#failed-writes",
              "repair": "failed-writes",
              "writes": []
            },
            "elapsed_ms": "<volatile>",
            "message": "Every caller write with a retained receipt committed or was superseded.",
            "name": "lost_caller_writes",
            "status": "ok"
          },
          {
            "category": "ops",
            "details": {
              "applied": "5min",
              "configured": "5min",
              "docs": "docs/guides/troubleshooting.md#session-timeouts-not-applied"
            },
            "elapsed_ms": "<volatile>",
            "message": "The session statement_timeout (5min) reaches the server.",
            "name": "persistence_session_timeouts",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "docs": "docs/guides/repair.md#connector-held-items",
              "held": 0,
              "sources": []
            },
            "elapsed_ms": "<volatile>",
            "message": "No connector items are held.",
            "name": "connector_held_items",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "auto_repair": {
                "active": false,
                "enabled": true,
                "last_maintenance_at": null,
                "llm": true
              },
              "docs": "docs/guides/repair.md#held-files",
              "escalate_count": 50,
              "fences": 2,
              "held": 8,
              "source_ids": [
                "notes"
              ],
              "sources": [
                {
                  "escalated": false,
                  "fences": 2,
                  "first": [
                    {
                      "code": "invalid_fence",
                      "path": "fences/llm.md",
                      "reason": "no_header",
                      "why": "fences/llm.md is held because the facts fence (body), at line 7 cannot be imported (no_header). No maintenance run is active on this brain, so nothing repairs it by itself: the preview (read-only, no model call) shows the planned repair and prints the apply command with --expect <hash>; run that printed command to apply exactly what it showed. The rest of the source keeps syncing."
                    },
                    {
                      "code": "invalid_fence",
                      "path": "fences/manual.md",
                      "reason": "takes_kind_unsupported",
                      "why": "fences/manual.md is held because the takes fence (body), row 1, column kind, at line 10 cannot be imported (takes_kind_unsupported). gbrain will not guess this repair. Column `kind` of row(s) 1 in the takes fence (body, line 6) is not a takes kind. Use one of `fact`, `take`, `bet`, `hunch`; gbrain does not choose a takes kind for you. The preview names the exact edit, read-only: make it in fences/manual.md (never the frontmatter), commit, then sync. The rest of the source keeps syncing."
                    },
                    {
                      "code": "invalid_frontmatter",
                      "path": "fm/dash-line.md",
                      "reason": "needs_interpretation",
                      "why": "Reading fm/dash-line.md needs an interpretation (folded lines, a duplicate key or an unclosed list); the preview shows the exact proposal for approval."
                    },
                    {
                      "code": "invalid_frontmatter",
                      "path": "fm/duplicate-key.md",
                      "reason": "needs_interpretation",
                      "why": "Reading fm/duplicate-key.md needs an interpretation (folded lines, a duplicate key or an unclosed list); the preview shows the exact proposal for approval."
                    },
                    {
                      "code": "invalid_frontmatter",
                      "path": "fm/indented-close.md",
                      "reason": "yaml_parse",
                      "why": "Previews the minimal line fix for fm/indented-close.md (or names the line to fix by hand); nothing is written until a hash-bound apply."
                    }
                  ],
                  "held": 8,
                  "missing": 8,
                  "next": "preview the frontmatter and other fixes with gbrain repair frontmatter --source notes (writes nothing until a hash-bound apply); nothing repairs the fence and slug-conflict holds by itself (no maintenance run is active), so preview the content repairs with gbrain repair content --source notes (read-only, no model call: it lists each held file with its planned repair or the exact edit, kind by kind, and prints the apply command with --expect <hash>[,<hash>]), then run the apply command it prints",
                  "repair": "gbrain repair frontmatter --source notes; gbrain repair content --source notes",
                  "source_id": "notes",
                  "stale": 0,
                  "status": "gbrain sources status notes"
                }
              ]
            },
            "elapsed_ms": "<volatile>",
            "fix": {
              "actor": "agent",
              "argv": [
                "gbrain",
                "repair",
                "frontmatter",
                "--source",
                "notes",
                "--brain",
                "host"
              ],
              "command": "gbrain repair frontmatter --source notes --brain host",
              "consent": [],
              "docs": "https://github.com/garrytan/gbrain/blob/master/docs/guides/repair.md#held-files",
              "next": "run",
              "requires_exclusive": false,
              "verify": {
                "argv": [
                  "gbrain",
                  "doctor",
                  "--only",
                  "git_held_files",
                  "--json",
                  "--brain",
                  "host"
                ]
              },
              "why": "Previews the minimal line fix for each held file (or names the line to fix by hand) and prints the hash-bound apply command; it writes nothing."
            },
            "message": "8 file(s) in Git sources are held and not imported; the rest of each sync continues. notes: 8 held (0 page(s) keep an older revision, 8 file(s) have no page), first: fences/llm.md [invalid_fence/no_header], fences/manual.md [invalid_fence/takes_kind_unsupported], fm/dash-line.md [invalid_frontmatter/needs_interpretation], fm/duplicate-key.md [invalid_frontmatter/needs_interpretation], fm/indented-close.md [invalid_frontmatter/yaml_parse]. A page whose newer file is held is read-only for put_page until the file is repaired, so do not retry a refused write. Inspect with gbrain sources status notes; then notes: preview the frontmatter and other fixes with gbrain repair frontmatter --source notes (writes nothing until a hash-bound apply); nothing repairs the fence and slug-conflict holds by itself (no maintenance run is active), so preview the content repairs with gbrain repair content --source notes (read-only, no model call: it lists each held file with its planned repair or the exact edit, kind by kind, and prints the apply command with --expect <hash>[,<hash>]), then run the apply command it prints.",
            "name": "git_held_files",
            "status": "warn"
          },
          {
            "category": "ops",
            "details": {
              "count": 0,
              "docs": "docs/guides/repair.md#held-files",
              "hooks": []
            },
            "elapsed_ms": "<volatile>",
            "message": "No outdated gbrain frontmatter pre-commit hook is installed.",
            "name": "frontmatter_hook",
            "status": "ok"
          },
          {
            "category": "ops",
            "details": {
              "count": 0,
              "docs": "docs/guides/repair.md#url-source-origin",
              "sources": []
            },
            "elapsed_ms": "<volatile>",
            "message": "Every URL source clone records who added it, or was cloned where only the local CLI can clone.",
            "name": "url_source_origin",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "bindings": [],
              "count": 0,
              "docs": "docs/guides/repair.md#orphan-bindings",
              "repair": "orphan-bindings",
              "truncated": false
            },
            "elapsed_ms": "<volatile>",
            "message": "Every persistence source binding belongs to an existing source.",
            "name": "orphan_persistence_bindings",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "count": 0,
              "docs": "docs/guides/write-refusals.md#foreign-ownership-marker",
              "markers": []
            },
            "elapsed_ms": "<volatile>",
            "message": "Every ownership marker beside a source checkout belongs to this brain.",
            "name": "foreign_ownership_marker",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "checkouts": [],
              "count": 0,
              "docs": "docs/architecture/topologies.md#coordination-lock"
            },
            "elapsed_ms": "<volatile>",
            "message": "Every checkout's recorded coordination lock agrees with GBRAIN_COORDINATION_HOME, or the variable does not apply.",
            "name": "coordination_lock_location",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "sources": [],
              "total": 0
            },
            "elapsed_ms": "<volatile>",
            "message": "No page was written database-only to an unbound source.",
            "name": "unbound_source",
            "status": "ok"
          },
          {
            "category": "ops",
            "details": {
              "bound": 3,
              "enabled": true,
              "items": [],
              "pending": 0
            },
            "elapsed_ms": "<volatile>",
            "message": "No deferred dream writes",
            "name": "dream_write_deferred",
            "status": "ok"
          },
          {
            "category": "ops",
            "details": {
              "bound": 3,
              "enabled": true
            },
            "elapsed_ms": "<volatile>",
            "message": "The embedding signature restamp is running clean",
            "name": "embedding_restamp_stalled",
            "status": "ok"
          },
          {
            "category": "ops",
            "details": {
              "count": 0,
              "floor": "0.60.5.0",
              "hosts": [],
              "observed": [
                {
                  "host_id": "<uuid>",
                  "last_seen": "<ts>",
                  "principal": "local_cli:<uuid>",
                  "role": "consumer",
                  "version": "<version>"
                },
                {
                  "host_id": "<uuid>",
                  "last_seen": "<ts>",
                  "principal": "local_cli:<uuid>",
                  "role": "admitter",
                  "version": "<version>"
                }
              ],
              "truncated": false,
              "window_days": 7
            },
            "elapsed_ms": "<volatile>",
            "message": "Every writer that admitted or published a request in the last 7 days is v0.60.5.0 or newer.",
            "name": "writer_version",
            "status": "ok"
          },
          {
            "category": "ops",
            "details": {
              "blockers": [],
              "configured": "unset",
              "docs": "docs/guides/memory-boundaries.md#segmented-page-storage",
              "effective": "on",
              "floor": "<segmented-writer-floor>",
              "max_bytes": 268435456,
              "truncated": false,
              "window_days": 7
            },
            "elapsed_ms": "<volatile>",
            "message": "Segmented page storage is on: pages over 1 MiB are stored in segments, up to 268435456 bytes on this Postgres brain.",
            "name": "segmented_storage",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "classified": 0,
              "count": "exact",
              "truncated": false,
              "unclassifiable": 0
            },
            "elapsed_ms": "<volatile>",
            "message": "No session corpus is configured; nothing to classify.",
            "name": "self_capture",
            "status": "ok"
          },
          {
            "category": "ops",
            "details": {
              "column": "embedding",
              "column_type": "vector(1024)",
              "docs": "docs/guides/troubleshooting.md#hybrid-search-returns-only-keyword-hits",
              "embedded_chunks_estimate": 0,
              "outcome": "skipped",
              "reason": "small_brain"
            },
            "elapsed_ms": "<volatile>",
            "message": "Skipped: about 0 embedded chunk(s) in embedding; below 10000 a sequential scan is the right plan.",
            "name": "vector_plan",
            "status": "ok"
          },
          {
            "category": "ops",
            "details": {
              "canary_timeout_ms": "<volatile>",
              "docs": "docs/guides/troubleshooting.md#keyword-search-times-out-on-a-large-postgres-brain",
              "negative_cache": {
                "last_timeout_at": null,
                "skips": 0,
                "timeouts": 0,
                "ttl_seconds": 600
              },
              "outcome": "skipped",
              "reason": "small_brain",
              "timeout_ms": "<volatile>"
            },
            "elapsed_ms": "<volatile>",
            "message": "Skipped: fewer than 10000 chunks by the planner's estimate; the keyword statements finish well inside search.keyword_statement_timeout_ms = 8000 ms (range 1000-60000).",
            "name": "keyword_plan",
            "status": "ok"
          },
          {
            "category": "ops",
            "details": {
              "command": "gbrain repair embedding-effects",
              "count": "exact",
              "docs": "docs/guides/repair.md#stale-queued-embedding-effects",
              "effects": [],
              "failed_effects": 0,
              "repair": "embedding-effects",
              "resolution": "repairable",
              "retry_queued_effects": 0,
              "stale_effects": 0,
              "truncated": false
            },
            "elapsed_ms": "<volatile>",
            "message": "No committed write has a stale queued or failed embedding effect.",
            "name": "stale_embedding_effects",
            "status": "ok"
          },
          {
            "category": "ops",
            "details": {
              "count": 0,
              "docs": "docs/guides/google-connect.md",
              "repair": "google-file-modes",
              "sources": []
            },
            "elapsed_ms": "<volatile>",
            "message": "No group- or world-readable gbrain files under Google source directories outside ~/.gbrain.",
            "name": "google_file_modes",
            "status": "ok"
          },
          {
            "category": "ops",
            "details": {
              "count": 0,
              "docs": "docs/guides/google-connect.md#unreadable-calendar",
              "sources": []
            },
            "elapsed_ms": "<volatile>",
            "message": "No Google source recorded an unreadable calendar at its last sync.",
            "name": "google_calendar_readable",
            "status": "ok"
          },
          {
            "category": "ops",
            "details": {
              "count": 0,
              "docs": "docs/guides/google-connect.md#api-access",
              "sources": []
            },
            "elapsed_ms": "<volatile>",
            "message": "No Google source recorded a disabled API or missing scope at its last sync.",
            "name": "google_api_access",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "by_source": [],
              "count": 0,
              "docs": "docs/guides/repair.md#atoms-restore",
              "hold_until": null,
              "ledger_covered": 0,
              "newest_retired_at": null,
              "oldest_retired_at": null,
              "origins": 0,
              "repair": "atoms-restore",
              "source_ids": []
            },
            "elapsed_ms": "<volatile>",
            "message": "No atom retired by an empty re-extraction is waiting to be restored.",
            "name": "atom_retirements_restorable",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "by_source": [],
              "count": 0,
              "docs": "docs/guides/repair.md#atom-fence-rows",
              "origin_unread": 0,
              "repair": "atom-fence-rows"
            },
            "elapsed_ms": "<volatile>",
            "message": "No world atom carries a fence row its source page shows only to the owner.",
            "name": "atom_fence_rows",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "by_source": [],
              "docs": "docs/guides/repair.md#generations",
              "items": 0,
              "keys": 0,
              "repair": "generations",
              "restore_days": 30
            },
            "elapsed_ms": "<volatile>",
            "message": "No live generation retired items in the last 30 day(s).",
            "name": "generation_retirements",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "by_reason": [],
              "count": 0,
              "docs": "docs/guides/repair.md#generations",
              "releasable": 0,
              "repair": "generations"
            },
            "elapsed_ms": "<volatile>",
            "message": "No derived generation is held.",
            "name": "generation_held",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "docs": "docs/guides/repair.md#generations",
              "orphan_candidates": [],
              "orphans": 0,
              "pending": 0,
              "pending_items": [],
              "retire_pending": 0
            },
            "elapsed_ms": "<volatile>",
            "message": "No activated generation waits on a member request, and no orphan candidate exists.",
            "name": "generation_pending",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "ambiguous": 0,
              "docs": "docs/guides/repair.md#explicit-only-repair-kinds",
              "evidenced": 0,
              "excluded": 0,
              "repair": "extractor-facts"
            },
            "elapsed_ms": "<volatile>",
            "message": "No conversation-extractor fact is left expired by the pre-v0.60.11.0 projection.",
            "name": "extractor_facts_expired",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "ambiguous": 0,
              "docs": "docs/guides/repair.md#unwithdrawn-facts",
              "evidenced": 0,
              "excluded": 0,
              "repair": "unwithdrawn-facts"
            },
            "elapsed_ms": "<volatile>",
            "message": "No fact is left retired by a facts-fence generation that no fence withdrew.",
            "name": "unwithdrawn_facts",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "ambiguous": 0,
              "capped": false,
              "docs": "docs/guides/repair.md#purged-page-facts",
              "evidenced": 0,
              "repair": "purged-page-facts"
            },
            "elapsed_ms": "<volatile>",
            "message": "No fact extracted from a page is left active after that page was purged.",
            "name": "purged_page_facts",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "capped": false,
              "docs": "docs/guides/repair.md#conversation-labels",
              "evidenced": 0,
              "repair": "conversation-labels"
            },
            "elapsed_ms": "<volatile>",
            "message": "No conversation fact carries the pre-fix meeting-label signature (a 1970-01-01 segment on a label page).",
            "name": "conversation_label_facts",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "capped": false,
              "docs": "docs/guides/repair.md#conversation-labels",
              "extractor_version": 1,
              "sample": [],
              "scanned": 0,
              "stale": 0,
              "unstamped": 0
            },
            "elapsed_ms": "<volatile>",
            "message": "No conversation extraction outcome predates extractor version 1.",
            "name": "conversation_outcomes_stale",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "ambiguous": 0,
              "docs": "docs/guides/repair.md#explicit-only-repair-kinds",
              "evidenced": 0,
              "excluded": 0,
              "repair": "captured-facts",
              "unclassifiable": 0
            },
            "elapsed_ms": "<volatile>",
            "message": "No active fact from a gbrain self-capture or paste candidate remains. This counts facts in the database; the self_capture check counts corpus files.",
            "name": "captured_facts_active",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "ambiguous": 0,
              "docs": "docs/guides/repair.md#agent-session-facts",
              "evidenced": 0,
              "excluded": 0,
              "repair": "agent-session-facts",
              "unclassifiable": 0
            },
            "elapsed_ms": "<volatile>",
            "message": "No active owner-attributed fact from an agent-launched session remains.",
            "name": "agent_session_facts",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "affected": 0,
              "docs": "docs/guides/repair.md#redacted-facts",
              "repair": "redacted-facts"
            },
            "elapsed_ms": "<volatile>",
            "message": "No active fact holds a redaction marker.",
            "name": "facts_redaction_marker",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "days": [],
              "docs": "docs/guides/repair.md#fact-claim-dates",
              "repair": "fact-claim-dates",
              "rule": {
                "min_entities": 20,
                "min_facts": 200,
                "min_share": 0.25
              },
              "source_ids": []
            },
            "elapsed_ms": "<volatile>",
            "message": "No calendar day holds a bulk-loaded share of any source's facts.",
            "name": "fact_bulk_dates",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "docs": "docs/guides/repair.md#explicit-only-repair-kinds",
              "drifted": 0,
              "repair": "loop-facts"
            },
            "elapsed_ms": "<volatile>",
            "message": "Every closed commitment loop has its fact retired.",
            "name": "loop_facts_drift",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "docs": "docs/guides/repair.md#explicit-only-repair-kinds",
              "excluded": 0,
              "fenced": 0,
              "repair": "ontology-facts",
              "retired": 0
            },
            "elapsed_ms": "<volatile>",
            "message": "No ontology observation is held by a page's Facts table.",
            "name": "ontology_facts_fenced",
            "status": "ok"
          },
          {
            "category": "ops",
            "details": {
              "count": 0,
              "docs": "docs/guides/repair.md#frontmatter-keys",
              "repair": "frontmatter-keys",
              "source_ids": [],
              "sources": []
            },
            "elapsed_ms": "<volatile>",
            "message": "No stored frontmatter carries a parser-reserved key (type, title, tags, slug).",
            "name": "stale_frontmatter_keys",
            "status": "ok"
          },
          {
            "category": "ops",
            "details": {
              "concept_skips": 0,
              "count": 0,
              "docs": "docs/guides/troubleshooting.md#maintenance-write-drift",
              "repair": "file-drift",
              "sources": [],
              "suppressed": [],
              "window_sequences": 20000
            },
            "elapsed_ms": "<volatile>",
            "message": "No page whose writes refuse source_changed still has a canonical file that differs from the database.",
            "name": "maintenance_write_drift",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "message": "Relative dates resolve against each source's observation date in fact extraction, dream synthesis, extract_atoms and propose_takes (the default). life chronicle events keep their current prompt unless extraction.date_grounding is set to true. Facts extracted before this was on keep their original wording; re-extract a source only with the user's consent (gbrain extract-conversation-facts --source-id <id> --dry-run previews it).",
            "name": "extraction_date_grounding",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "message": "Sampled 20 pages; no bare-tweet phrases or external links.",
            "name": "integrity",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "message": "All JSONB columns store objects/arrays",
            "name": "jsonb_integrity",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "message": "No takes yet",
            "name": "takes_weight_grid",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "message": "All FK-child tables clean (10 tables checked)",
            "name": "child_table_orphans",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "message": "All synthesized pages carry a raw trace or explicit exemption",
            "name": "raw_provenance",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "message": "All source config values are JSON objects",
            "name": "source_config_shape",
            "status": "ok"
          },
          {
            "category": "skill",
            "elapsed_ms": "<volatile>",
            "message": "whoknows eval fixture present (10 queries). Run `gbrain eval whoknows test/fixtures/whoknows-eval.jsonl` to grade.",
            "name": "whoknows_health",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "message": "All image-asset chunks have modality=image",
            "name": "cross_modal_modality_backfill",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "message": "search.unified_multimodal is off; coverage check N/A",
            "name": "unified_multimodal_coverage",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "message": "No truncated bodies detected",
            "name": "markdown_body_completeness",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "message": "No pages exceed 25165824 bytes (excluding embed_skip pages, which already took the accepted non-embeddable remediation)",
            "name": "oversized_pages",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "message": "No junk-pattern hits in 20 recent page(s) (use --content-audit for full scan)",
            "name": "scraper_junk_pages",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "message": "No content-sanity events in last 7 days (audit JSONL is local to this host; share GBRAIN_AUDIT_DIR for multi-host visibility)",
            "name": "content_sanity_audit_recent",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "message": "No quarantined pages",
            "name": "quarantined_pages",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "message": "No flagged pages",
            "name": "flagged_pages",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "count": 0,
              "days": 7,
              "source_id": null
            },
            "elapsed_ms": "<volatile>",
            "message": "No stale unverified extraction stubs",
            "name": "unverified_extractions",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "count": 18,
              "exact": true,
              "partial": false
            },
            "elapsed_ms": "<volatile>",
            "fix_unavailable_reason": "unstructured",
            "message": "18 frontmatter issue(s). notes: 17 (YAML_PARSE=8, EMPTY_FRONTMATTER=1, MISSING_CLOSE=2, NESTED_QUOTES=1, NON_STRING_FIELD=2, NULL_BYTES=2, SLUG_MISMATCH=1); plain: 1 (YAML_PARSE=1). Fix: gbrain repair frontmatter --source <id> previews the line fix for every file it can repair (and names the manual fix for the rest, such as a missing opening ---); on an unmanaged checkout gbrain frontmatter validate <source-path> --fix applies the same safe fixes",
            "name": "frontmatter_integrity",
            "status": "warn"
          },
          {
            "category": "brain",
            "details": {
              "docs": "docs/guides/repair.md#frontmatter",
              "partial": false,
              "repairable": 13,
              "source_ids": [
                "notes",
                "plain"
              ],
              "sources": [
                {
                  "by_code": {
                    "FRONTMATTER_COMMENT_VALUE": 1,
                    "MISSING_CLOSE": 2,
                    "NESTED_QUOTES": 1,
                    "NULL_BYTES": 2,
                    "SLUG_MISMATCH": 1,
                    "YAML_PARSE": 2,
                    "needs_interpretation": 4
                  },
                  "files": 12,
                  "preview": "gbrain repair frontmatter --source notes",
                  "sample_paths": [
                    "fm/comment-value.md",
                    "fm/dash-line.md",
                    "fm/duplicate-key.md",
                    "fm/missing-close.md",
                    "fm/needs-interpretation.md"
                  ],
                  "source_id": "notes",
                  "status": "scanned"
                },
                {
                  "by_code": {
                    "needs_interpretation": 1
                  },
                  "files": 1,
                  "preview": "gbrain repair frontmatter --source plain",
                  "sample_paths": [
                    "broken.md"
                  ],
                  "source_id": "plain",
                  "status": "scanned"
                }
              ],
              "unscanned": []
            },
            "elapsed_ms": "<volatile>",
            "fix": {
              "actor": "agent",
              "argv": [
                "gbrain",
                "repair",
                "frontmatter",
                "--brain",
                "host"
              ],
              "command": "gbrain repair frontmatter --brain host",
              "consent": [],
              "docs": "https://github.com/garrytan/gbrain/blob/master/docs/guides/repair.md#frontmatter",
              "next": "run",
              "requires_exclusive": false,
              "verify": {
                "argv": [
                  "gbrain",
                  "doctor",
                  "--only",
                  "frontmatter_repairable",
                  "--json",
                  "--brain",
                  "host"
                ]
              },
              "why": "Previews the minimal line fix per file (safe quoting first; interpretations only with --include-ambiguous) and prints the hash-bound apply command; it writes nothing."
            },
            "message": "13 file(s) have frontmatter gbrain repair frontmatter can fix: notes: 12 (FRONTMATTER_COMMENT_VALUE=1, needs_interpretation=4, MISSING_CLOSE=2, NESTED_QUOTES=1, YAML_PARSE=2, NULL_BYTES=2, SLUG_MISMATCH=1); plain: 1 (needs_interpretation=1). Preview with gbrain repair frontmatter --source notes; gbrain repair frontmatter --source plain (writes nothing; add --include-ambiguous for interpretations after the safe pass).",
            "name": "frontmatter_repairable",
            "status": "warn"
          },
          {
            "category": "meta",
            "elapsed_ms": "<volatile>",
            "message": "No capture failures in the last 24h",
            "name": "eval_capture",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "message": "No probe runs in the last 7 days. Run `gbrain eval suspected-contradictions --query \"...\" --top-k 5` to populate.",
            "name": "contradictions",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "message": "Automatic fact extraction not configured (keyless) — memory comes from agent-authored `## Facts` fences and the `remember` verb. One optional key enables automatic extraction (OpenAI or Anthropic).",
            "name": "facts_extraction_health",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "message": "Sample of last 1000 pages clean (no fallback-with-parseable-fm-date, no future-dated, no pre-1990)",
            "name": "effective_date_health",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "message": "Skipped (no pages have emotional_weight > 0; either fresh install or recompute hasn't run yet)",
            "name": "salience_health",
            "status": "ok"
          },
          {
            "category": "ops",
            "details": {
              "depth": 0,
              "oldest_age_seconds": "<volatile>",
              "worker_alive": true
            },
            "elapsed_ms": "<volatile>",
            "message": "No stalled-forever jobs; no queue over depth 10; no old embed-backfill jobs without a worker.",
            "name": "queue_health",
            "status": "ok"
          },
          {
            "category": "ops",
            "elapsed_ms": "<volatile>",
            "message": "Subagent tier resolves to default (claude-sonnet-4-6) — full tool-loop capability",
            "name": "subagent_capability",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "message": "facts_health(default): 0 active, 0 today, 0 this week, 0 consolidated, top entities —",
            "name": "facts_health",
            "status": "ok"
          },
          {
            "category": "ops",
            "elapsed_ms": "<volatile>",
            "message": "Brain-wide maintenance jobs are finishing within their deadline.",
            "name": "global_maintenance_timeouts",
            "status": "ok"
          },
          {
            "category": "ops",
            "details": {
              "age_minutes": null,
              "code": "global_maintenance_stalled",
              "docs": "docs/guides/troubleshooting.md#global-maintenance-stalled",
              "fail_after_minutes": 10080,
              "failed_jobs_since": 0,
              "last_failed_job": null,
              "last_global_at": null,
              "phases": [],
              "reason": "fresh",
              "resume_phase": null,
              "warn_after_minutes": 180
            },
            "elapsed_ms": "<volatile>",
            "message": "Brain-wide maintenance has not run yet.",
            "name": "global_maintenance_stalled",
            "status": "ok"
          },
          {
            "category": "ops",
            "details": {
              "embed_daily_cap_usd": null,
              "embed_spend_today_usd": null,
              "last_run": null,
              "next_due_at": null,
              "paid_phases_opt_in": [
                "extract_atoms",
                "synthesize_concepts",
                "propose_takes",
                "grade_takes",
                "calibration_profile",
                "edge_contradictions",
                "drift",
                "standing_questions",
                "chronicle",
                "facts_drain",
                "conversation_facts_backfill",
                "enrich_thin",
                "skillopt",
                "embed"
              ],
              "pending_purge_count": 0,
              "runner": null,
              "state": "never",
              "steps": 0
            },
            "elapsed_ms": "<volatile>",
            "message": "Free upkeep has not run on this brain yet; gbrain maintain --unattended runs it (no model calls, no page purge). Nothing deletes on its own.",
            "name": "unattended_maintenance",
            "readiness_state": "not_applicable",
            "severity": "info",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "behind": [],
              "docs": "docs/guides/conversation-archive.md#doctor",
              "enabled": true,
              "enabled_by": "default",
              "harnesses": [
                {
                  "harness": "claude-code",
                  "newest_archived_day": null,
                  "newest_session_day": null,
                  "readable": false,
                  "reader": "claude-code-files"
                },
                {
                  "harness": "codex",
                  "newest_archived_day": null,
                  "newest_session_day": null,
                  "readable": false,
                  "reader": "codex-files"
                },
                {
                  "harness": "openclaw",
                  "newest_archived_day": null,
                  "newest_session_day": null,
                  "readable": false,
                  "reader": "openclaw-files"
                },
                {
                  "harness": "hermes",
                  "newest_archived_day": null,
                  "newest_session_day": null,
                  "readable": false,
                  "reader": "hermes-files"
                },
                {
                  "harness": "grok",
                  "newest_archived_day": null,
                  "newest_session_day": null,
                  "readable": false,
                  "reader": "grok-files"
                },
                {
                  "harness": "openclaw",
                  "newest_archived_day": null,
                  "newest_session_day": null,
                  "readable": false,
                  "reader": "openclaw-gateway"
                }
              ],
              "held": [],
              "reason": "on by default on a personal brain",
              "source_id": "conversations",
              "stale_days": 2
            },
            "elapsed_ms": "<volatile>",
            "message": "Conversation archive is on; no readable sessions for claude-code, codex, openclaw, hermes, grok (gbrain transcripts archive status names each reader).",
            "name": "transcript_archive_freshness",
            "readiness_state": "not_applicable",
            "severity": "info",
            "status": "ok"
          },
          {
            "category": "ops",
            "elapsed_ms": "<volatile>",
            "message": "No automatic embed-backfill is repeating the same failure.",
            "name": "embed_backfill_stalled",
            "status": "ok"
          },
          {
            "category": "ops",
            "details": {
              "code": "content_drift_sweep",
              "docs": "docs/guides/troubleshooting.md#content-drift-sweep",
              "scopes": []
            },
            "elapsed_ms": "<volatile>",
            "message": "The content-drift sweep has not run yet; it runs inside embed --stale and the embed jobs.",
            "name": "content_drift_sweep",
            "status": "ok"
          },
          {
            "category": "ops",
            "elapsed_ms": "<volatile>",
            "message": "No connector source is waiting for its account to be repinned.",
            "name": "connector_account_mismatch",
            "status": "ok"
          },
          {
            "category": "ops",
            "details": {
              "active_ids": [],
              "authorizable": {},
              "authorizable_total": 0,
              "docs": "docs/guides/repair.md#legacy-job-authority",
              "live": 0,
              "queued_spend": {
                "by_basis": {},
                "long_waiting": 0,
                "long_waiting_ids": []
              },
              "terminal_keyed": {},
              "terminal_keyed_total": 0,
              "unsupported": 0,
              "unsupported_ids": []
            },
            "elapsed_ms": "<volatile>",
            "message": "No queued job predates submission authority.",
            "name": "legacy_job_authority",
            "status": "ok"
          },
          {
            "category": "ops",
            "details": {
              "convertible_count": 0,
              "docs": "docs/mcp/ADMIN.md#legacy-token-grants",
              "legacy_shape_count": 0,
              "malformed": [],
              "mirror_window_ends": "2026-11-04"
            },
            "elapsed_ms": "<volatile>",
            "message": "Every active legacy token uses the unified grant columns. The permissions mirror for older gbrain binaries is kept until 2026-11-04.",
            "name": "legacy_token_grant_shape",
            "status": "ok"
          },
          {
            "category": "ops",
            "details": {
              "docs": "docs/mcp/ADMIN.md#legacy-token-grants",
              "drift": [],
              "mirror_window_ends": "2026-11-04"
            },
            "elapsed_ms": "<volatile>",
            "message": "No legacy token grant has drifted from its permissions mirror.",
            "name": "legacy_token_grant_drift",
            "status": "ok"
          },
          {
            "category": "ops",
            "details": {
              "docs": "docs/mcp/ADMIN.md#tokens-without-scopes",
              "null_scope_count": 0,
              "tokens": []
            },
            "elapsed_ms": "<volatile>",
            "message": "Every active legacy token has explicit scopes.",
            "name": "legacy_token_null_scope",
            "status": "ok"
          },
          {
            "category": "ops",
            "details": {
              "docs": "docs/mcp/ADMIN.md#grants-that-cannot-reach-new-operations",
              "grants": [],
              "server_surface": "full"
            },
            "elapsed_ms": "<volatile>",
            "message": "Every active client and token can call the operations its scopes allow.",
            "name": "grant_new_ops_available",
            "status": "ok"
          },
          {
            "category": "ops",
            "elapsed_ms": "<volatile>",
            "message": "Not applicable: this brain serves one person (0 enabled member(s)), so every credential reads that person's own pages.",
            "name": "unscoped_multi_user_token",
            "readiness_state": "not_applicable",
            "severity": "info",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "message": "No image assets indexed yet",
            "name": "image_assets",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "message": "OCR not in use (or no images ingested with OCR opt-in)",
            "name": "ocr_health",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "image_pages": 0,
              "multimodal": false,
              "null_source_path": 0,
              "unsupported_holds": 0,
              "without_image_vector": 0
            },
            "elapsed_ms": "<volatile>",
            "message": "No image pages indexed yet.",
            "name": "image_embedding_coverage",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "code": "sync_no_successful_sync",
              "no_successful_sync": [
                {
                  "code": "sync_no_successful_sync",
                  "fix": {
                    "actor": "agent",
                    "argv": [
                      "gbrain",
                      "sync",
                      "--source",
                      "plain",
                      "--no-pull"
                    ],
                    "consent": [],
                    "docs": "docs/guides/troubleshooting.md#sync-freshness-no-successful-sync",
                    "requires_exclusive": false,
                    "verify": {
                      "argv": [
                        "gbrain",
                        "doctor",
                        "--only",
                        "sync_freshness",
                        "--json"
                      ]
                    },
                    "why": "No successful sync of plain is recorded; this runs one and stamps last_sync_at when it succeeds."
                  },
                  "held": 0,
                  "job_id": null,
                  "last_attempt_at": null,
                  "reason": "no_attempt",
                  "result": null,
                  "source_id": "plain"
                }
              ],
              "stale_count": 1,
              "synced_recently_count": 1,
              "unchanged_count": 0,
              "writer_owned_count": 1
            },
            "elapsed_ms": "<volatile>",
            "fix": {
              "actor": "agent",
              "argv": [
                "gbrain",
                "sync",
                "--source",
                "plain",
                "--no-pull",
                "--brain",
                "host"
              ],
              "command": "gbrain sync --source plain --no-pull --brain host",
              "consent": [],
              "docs": "https://github.com/garrytan/gbrain/blob/master/docs/guides/troubleshooting.md#sync-freshness-no-successful-sync",
              "next": "run",
              "requires_exclusive": false,
              "verify": {
                "argv": [
                  "gbrain",
                  "doctor",
                  "--only",
                  "sync_freshness",
                  "--json",
                  "--brain",
                  "host"
                ]
              },
              "why": "No successful sync of plain is recorded; this runs one and stamps last_sync_at when it succeeds."
            },
            "message": "Source 'plain': no successful sync recorded; no attempt recorded; run `gbrain sync --source plain --no-pull`. 1 writer-owned canonical content source(s): upstream sync is not applicable; see canonical_content_writes for publication status",
            "name": "sync_freshness",
            "status": "fail"
          },
          {
            "category": "ops",
            "details": {
              "pending_count": 0,
              "recovering_count": 0,
              "writer_owned_count": 1
            },
            "elapsed_ms": "<volatile>",
            "message": "1 writer-owned content source(s); no pending canonical publication or recovery.",
            "name": "canonical_content_writes",
            "status": "ok"
          },
          {
            "category": "ops",
            "details": {
              "cache_age": "under an hour ago",
              "checked_at": "<ts>",
              "computed_by": "doctor",
              "degraded": false,
              "recovery_scope": "Git evidence covers committed repository files only; not a full database backup. DB-only pages, facts, configuration and credentials need a separate backup and restore drill.",
              "totals": {
                "assets": 3,
                "configured_repos": 0,
                "failing": 0,
                "no_remote": 1,
                "pages_at_risk": 0,
                "recoverable_repos": 0,
                "remote_timeouts": 0,
                "unpushed": 0
              }
            },
            "elapsed_ms": "<volatile>",
            "fix": {
              "actor": "host_admin",
              "argv": [
                "pg_dump",
                "--format",
                "custom",
                "--file",
                "<DUMP_FILE>",
                "--dbname",
                "<DATABASE_URL>"
              ],
              "command": "pg_dump --format custom --file '<DUMP_FILE>' --dbname '<DATABASE_URL>'",
              "consent": [
                "credentials"
              ],
              "docs": "https://github.com/garrytan/gbrain/blob/master/docs/guides/memory-boundaries.md#full-backup",
              "inputs": [
                {
                  "how": "A new file outside the brain, in a directory only the user can read.",
                  "name": "DUMP_FILE"
                },
                {
                  "how": "The brain's Postgres connection, preferably service=<name> from a pg_service file so no password lands in the command line.",
                  "name": "DATABASE_URL"
                }
              ],
              "next": "tell_user_to_run",
              "requires_exclusive": false,
              "user_message": "This brain lives in Postgres, so back it up with a database dump of its database: `pg_dump --format custom --file <DUMP_FILE> --dbname <DATABASE_URL>`, kept private (it holds every page, fact, member and token); `pg_restore --list <DUMP_FILE>` reads it back. Restore it into a new, empty database with `pg_restore --no-owner --dbname <NEW_DATABASE_URL> <DUMP_FILE>`, then run `gbrain init --url <NEW_DATABASE_URL>` under a separate GBRAIN_HOME, which opens the restored brain. `gbrain export` is not a backup: an import of it puts every page in one source and keeps no members, tokens or facts.",
              "why": "A database dump keeps every source, page, fact, member, token and folder rule of a Postgres brain; a Markdown export keeps pages only."
            },
            "message": "Not urgent yet: the brain holds 23 page(s)+fact(s) and is under 7 days old (backup coaching starts at 25 items or 7 days). 3 knowledge asset(s) lack verified recovery: default (not_a_git_repo), plain (not_a_git_repo), notes (no git remote). A source repo with a pushed git remote restores its Markdown files only, never DB-only pages, facts, config or credentials. Run `gbrain backup status` for each asset's fix command.",
            "name": "backup_coverage",
            "readiness_state": "degraded",
            "severity": "info",
            "status": "ok"
          },
          {
            "category": "ops",
            "elapsed_ms": "<volatile>",
            "message": "3 active sources on a managed brain. Recommended cron on the owner host, every 15 minutes: `gbrain sync --all --no-pull --hard-deadline 13m`. Managed sync never pulls: for each checkout that tracks a remote, chain `gbrain sources refresh <id>;` in front of it to take upstream commits. Keep the deadline under the interval: managed sync takes no per-source lock, so a tick that outlives the interval would overlap the next one.",
            "name": "sync_consolidation",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "message": "No full cycle yet for 'default', 'notes', 'plain': they hold no pages or only pages from the last 24h, so there is nothing to consolidate yet.",
            "name": "cycle_freshness",
            "readiness_state": "not_applicable",
            "severity": "info",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "message": "No same-source content-hash duplicate groups",
            "name": "content_hash_duplicates",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "message": "All code-page chunks carry symbol metadata",
            "name": "code_chunk_metadata",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "message": "Every DB page is file-backed or under a declared/default db_only path (derive-phase defaults: life/events/ atoms/ concepts/ extracts/ dream-cycle-summaries/ reports/drift-).",
            "name": "undeclared_db_only_pages",
            "status": "ok"
          },
          {
            "category": "ops",
            "elapsed_ms": "<volatile>",
            "message": "No configured collectors declare output paths",
            "name": "db_only_collector_collision",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "docs": "docs/guides/on-commit-sync.md",
              "fail_seconds": 3600,
              "graded": false,
              "on_commit": false,
              "sources": [
                {
                  "behind": null,
                  "commit_to_embedded": {
                    "p50_seconds": null,
                    "p95_seconds": null,
                    "pending": 0,
                    "samples": 0
                  },
                  "commit_to_searchable": {
                    "p50_seconds": null,
                    "p95_seconds": null,
                    "samples": 0
                  },
                  "commits": 0,
                  "source_id": "default",
                  "unresolved_commits": 0,
                  "waiting_commits": null,
                  "window_hours": 24
                },
                {
                  "behind": {
                    "commits": 0,
                    "oldest_seconds": null
                  },
                  "commit_to_embedded": {
                    "p50_seconds": null,
                    "p95_seconds": null,
                    "pending": 0,
                    "samples": 0
                  },
                  "commit_to_searchable": {
                    "p50_seconds": null,
                    "p95_seconds": null,
                    "samples": 0
                  },
                  "commits": 0,
                  "source_id": "notes",
                  "unresolved_commits": 0,
                  "waiting_commits": 0,
                  "window_hours": 24
                },
                {
                  "behind": null,
                  "commit_to_embedded": {
                    "p50_seconds": null,
                    "p95_seconds": null,
                    "pending": 0,
                    "samples": 0
                  },
                  "commit_to_searchable": {
                    "p50_seconds": null,
                    "p95_seconds": null,
                    "samples": 0
                  },
                  "commits": 0,
                  "source_id": "plain",
                  "unresolved_commits": 0,
                  "waiting_commits": null,
                  "window_hours": 24
                }
              ],
              "target_seconds": 300
            },
            "elapsed_ms": "<volatile>",
            "message": "No commit→searchable samples in the last 24 h (no managed sync imported a new commit).",
            "name": "managed_sync_latency",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "docs": "docs/guides/on-commit-sync.md",
              "sources": [
                {
                  "pending_markers": 0,
                  "reason": null,
                  "resident": null,
                  "source_id": "default",
                  "stalled": false,
                  "state": null
                },
                {
                  "pending_markers": 0,
                  "reason": null,
                  "resident": null,
                  "source_id": "notes",
                  "stalled": false,
                  "state": null
                },
                {
                  "pending_markers": 0,
                  "reason": null,
                  "resident": null,
                  "source_id": "plain",
                  "stalled": false,
                  "state": null
                }
              ],
              "sync_on_commit": false
            },
            "elapsed_ms": "<volatile>",
            "message": "sync.on_commit is off; residents still run explicit sync requests. notifier for default: none running; idle; notifier for notes: none running; idle; notifier for plain: none running; idle.",
            "name": "commit_notifier",
            "severity": "info",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "checkouts": 1,
              "tracked": []
            },
            "elapsed_ms": "<volatile>",
            "message": "1 Git checkout(s) track no ownership marker (markers on disk stay untracked and are denied on push).",
            "name": "tracked_ownership_marker",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "dirty": [
                {
                  "age_ms": "<volatile>",
                  "checkout": "<home>/notes-src",
                  "path": "fences/deterministic.md",
                  "state": "modified"
                },
                {
                  "age_ms": "<volatile>",
                  "checkout": "<home>/notes-src",
                  "path": "fences/untracked.md",
                  "state": "untracked"
                },
                {
                  "age_ms": "<volatile>",
                  "checkout": "<home>/notes-src",
                  "path": "fm/image.png",
                  "state": "untracked"
                },
                {
                  "age_ms": "<volatile>",
                  "checkout": "<home>/notes-src",
                  "path": "fm/null-bytes.md",
                  "state": "untracked"
                },
                {
                  "age_ms": "<volatile>",
                  "checkout": "<home>/notes-src",
                  "path": "fm/null-in-frontmatter.md",
                  "state": "untracked"
                },
                {
                  "age_ms": "<volatile>",
                  "checkout": "<home>/notes-src",
                  "path": "fm/untracked-yaml.md",
                  "state": "untracked"
                }
              ],
              "dirty_count": 6,
              "dirty_warn_after_minutes": 30,
              "foreign": [],
              "partial": false,
              "partial_reasons": [],
              "unconfirmed": [],
              "unknown": [],
              "window": [
                {
                  "common": "<home>/notes-src/.git",
                  "from": null,
                  "ledger": false,
                  "ledger_start": null,
                  "oldest_reflog": "<ts>",
                  "to": "<ts>",
                  "uncovered": 4
                }
              ]
            },
            "elapsed_ms": "<volatile>",
            "message": "Every locally created commit in the covered window of 1 repository is in gbrain's commit ledger, and no page file waits uncommitted for more than 30 minutes. A repository gbrain has not committed in yet has no ledger, so its window is empty.",
            "name": "foreign_writers",
            "status": "ok"
          },
          {
            "category": "ops",
            "elapsed_ms": "<volatile>",
            "message": "System One is off (every decide slot is off; nothing is sent).",
            "name": "decide_health",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "message": "No memory proposals await the owner.",
            "name": "memory_proposals_pending",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "conversation": null,
              "fix": "preview links: gbrain facts relink --dry-run",
              "inferred_7d": {
                "mention": 0,
                "page": 0
              },
              "new_7d": {
                "conversation_unresolved": 0,
                "eligible": 3,
                "facts": 3,
                "no_subject": 0,
                "unlinked": 0,
                "unlinked_eligible": 0
              },
              "no_subject": 0,
              "origins": [],
              "relinked_7d": {},
              "sources": 3,
              "window": {
                "active": 3,
                "capped": false,
                "conversation": 0,
                "fence_owned": 0,
                "unlinked": 0
              }
            },
            "elapsed_ms": "<volatile>",
            "message": "0.0% of 3 active facts have no entity (0; 0 fence-owned); last 7 days: 0.0% of 3 new facts unlinked; 0 judged no_subject; 7-day links: inferred page 0, mention 0; relink none",
            "name": "unlinked_facts",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "contradiction_mode": "propose (default)",
              "lagging": 0,
              "proposals": {
                "applied": 0,
                "proposed": 0,
                "undated": 0
              },
              "read_policy": "on",
              "relationships": {},
              "stale_assertions": []
            },
            "elapsed_ms": "<volatile>",
            "message": "relationships: none yet; read policy on; contradiction mode propose (default)",
            "name": "edge_validity",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "auto_calls_24h": 0,
              "chat_available": false,
              "daily_limit": 200,
              "docs": "docs/guides/life-chronicle.md",
              "enabled": true,
              "job_budget_usd": 0.25,
              "last_7d": {
                "extracted": 0,
                "failed": 0,
                "failedReasons": {},
                "reasons": {},
                "skipped": 0
              },
              "ledger_available": true,
              "pending": 0,
              "principals_24h": [],
              "readiness": "missing",
              "run_now": [
                "gbrain",
                "dream",
                "--phase",
                "chronicle"
              ],
              "severity": "info",
              "source": "default",
              "spend_7d": {
                "incompleteRecords": 0,
                "knownUsd": 0,
                "unpricedCalls": 0
              }
            },
            "elapsed_ms": "<volatile>",
            "message": "auto_chronicle is on (default). Last 24 h: 0 of 200 automatic extraction calls. Last 7 days: 0 extracted, 0 failed, 0 skipped; $0.00 known spend. 0 page(s) pending. No chat provider is configured, so nothing will be extracted until one is.",
            "name": "auto_chronicle",
            "readiness_state": "missing",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "message": "chronicle.* settings are valid.",
            "name": "chronicle_config_invalid",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "message": "No page holds live events from an earlier extraction run beside its newest one.",
            "name": "chronicle_duplicate_events",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "ask_user": true,
              "code": "auto_chronicle_default_on",
              "decisions": [
                {
                  "argv": [
                    "gbrain",
                    "config",
                    "set",
                    "auto_chronicle",
                    "true"
                  ],
                  "fix": {
                    "actor": "agent",
                    "argv": [
                      "gbrain",
                      "config",
                      "set",
                      "auto_chronicle",
                      "true"
                    ],
                    "consent": [
                      "paid",
                      "egress"
                    ],
                    "requires_exclusive": false,
                    "user_message": "Automatic event extraction is on: each new or changed meeting, conversation or calendar page gets one paid chat call. Keep it on, or turn it off?",
                    "verify": {
                      "argv": [
                        "gbrain",
                        "doctor",
                        "--only",
                        "auto_chronicle_default_on",
                        "--json"
                      ]
                    },
                    "why": "Keeping automatic extraction records that the user accepted one paid chat call per eligible page; page text goes to the chat provider."
                  },
                  "id": "keep",
                  "label": "Keep automatic extraction on"
                },
                {
                  "argv": [
                    "gbrain",
                    "config",
                    "set",
                    "auto_chronicle",
                    "false"
                  ],
                  "fix": {
                    "actor": "agent",
                    "argv": [
                      "gbrain",
                      "config",
                      "set",
                      "auto_chronicle",
                      "false"
                    ],
                    "consent": [],
                    "requires_exclusive": false,
                    "verify": {
                      "argv": [
                        "gbrain",
                        "doctor",
                        "--only",
                        "auto_chronicle_default_on",
                        "--json"
                      ]
                    },
                    "why": "Turns automatic extraction off; history stays available on request with chronicle-backfill."
                  },
                  "id": "opt_out",
                  "label": "Turn automatic extraction off"
                }
              ],
              "default": "keep",
              "docs": "docs/guides/life-chronicle.md",
              "fix": {
                "actor": "agent",
                "argv": [
                  "gbrain",
                  "config",
                  "set",
                  "auto_chronicle",
                  "true"
                ],
                "consent": [
                  "paid",
                  "egress"
                ],
                "requires_exclusive": false,
                "user_message": "Automatic event extraction is on: each new or changed meeting, conversation or calendar page gets one paid chat call. Keep it on, or turn it off?",
                "verify": {
                  "argv": [
                    "gbrain",
                    "doctor",
                    "--only",
                    "auto_chronicle_default_on",
                    "--json"
                  ]
                },
                "why": "Keeping automatic extraction records that the user accepted one paid chat call per eligible page; page text goes to the chat provider."
              },
              "severity": "info"
            },
            "elapsed_ms": "<volatile>",
            "fix": {
              "actor": "agent",
              "argv": [
                "gbrain",
                "config",
                "set",
                "auto_chronicle",
                "true",
                "--brain",
                "host"
              ],
              "command": "gbrain config set auto_chronicle true --brain host",
              "consent": [
                "paid",
                "egress"
              ],
              "next": "ask_user",
              "requires_exclusive": false,
              "user_message": "Automatic event extraction is on: each new or changed meeting, conversation or calendar page gets one paid chat call. Keep it on, or turn it off?",
              "verify": {
                "argv": [
                  "gbrain",
                  "doctor",
                  "--only",
                  "auto_chronicle_default_on",
                  "--json",
                  "--brain",
                  "host"
                ]
              },
              "why": "Keeping automatic extraction records that the user accepted one paid chat call per eligible page; page text goes to the chat provider."
            },
            "message": "Automatic event extraction is on by default and the user has not confirmed it yet. Each eligible new or changed meeting, conversation or calendar page gets one paid chat call (cap $0.25 per page; at most 200 calls per day, so at most $50.00 per day for a priced model; an unpriced model has no cap), and page text goes to the configured chat provider. Relay this to the user, then run `gbrain config set auto_chronicle true` to keep it or `gbrain config set auto_chronicle false` to opt out.",
            "name": "auto_chronicle_default_on",
            "readiness_state": "ok",
            "severity": "info",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "backlog": {
                "active": 0,
                "delayed": 0,
                "waiting": 0
              },
              "daily_spent_usd": 0,
              "docs": "docs/guides/facts-drain.md",
              "health": "not_applicable",
              "last_run": null
            },
            "elapsed_ms": "<volatile>",
            "message": "Postgres brains run facts-absorb jobs on the job worker (gbrain jobs supervisor), not the automatic drain.",
            "name": "facts_drain",
            "readiness_state": "not_applicable",
            "severity": "info",
            "status": "ok"
          },
          {
            "category": "ops",
            "details": {
              "docs": "docs/guides/wakeshift.md#troubleshooting",
              "enabled": false,
              "key_source": "none"
            },
            "elapsed_ms": "<volatile>",
            "message": "Reporting back through Wakeshift is off (gbrain wakeshift enable turns it on).",
            "name": "wakeshift",
            "readiness_state": "disabled_by_choice",
            "severity": "info",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "applicable": false
            },
            "elapsed_ms": "<volatile>",
            "message": "Not applicable: embeddings are disabled on this brain (keyword search keeps working).",
            "name": "fact_take_vectors",
            "readiness_state": "disabled_by_choice",
            "severity": "info",
            "status": "ok"
          },
          {
            "category": "ops",
            "details": {
              "auto_analyze": null,
              "checked": [
                "pages",
                "links",
                "facts",
                "takes",
                "content_chunks",
                "timeline_entries"
              ],
              "engine": "postgres",
              "expression_indexes_without_statistics": [],
              "fix": "gbrain repair planner-stats --apply",
              "missing_search_statistics": [],
              "stale": []
            },
            "elapsed_ms": "<volatile>",
            "message": "Planner statistics are fresh on 6 hot tables.",
            "name": "planner_stats_stale",
            "status": "ok"
          },
          {
            "category": "meta",
            "details": {
              "answers_recorded": 0,
              "docs": "docs/guides/retrieval-feedback.md",
              "enabled": false,
              "implicit": false,
              "influence": 0.1,
              "last_rating_at": null,
              "learn": true,
              "ratings_cited": 0,
              "ratings_explicit": 0,
              "top_client_share_7d": null,
              "weights": 0,
              "weights_off_neutral": 0
            },
            "elapsed_ms": "<volatile>",
            "message": "Retrieval feedback is off; rankings do not learn from ratings. Turn it on with: gbrain config set feedback.enabled true",
            "name": "retrieval_feedback_health",
            "status": "ok"
          },
          {
            "category": "meta",
            "details": {
              "column": "not_null",
              "failed": [],
              "pending": 0
            },
            "elapsed_ms": "<volatile>",
            "message": "Every page has its revision; the page revision backfill is complete.",
            "name": "revision_backfill",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "fix": {
              "actor": "agent",
              "argv": [
                "gbrain",
                "beliefs",
                "enable",
                "--source",
                "default",
                "--brain",
                "host"
              ],
              "command": "gbrain beliefs enable --source default --brain host",
              "consent": [],
              "docs": "https://github.com/garrytan/gbrain/blob/master/docs/designs/BELIEF_LEDGER.md#73-the-doctor-coverage-check",
              "next": "ask_user",
              "requires_exclusive": false,
              "user_message": "Do you want gbrain to keep a belief ledger (a recorded history of facts, takes and links) for this source?",
              "verify": {
                "argv": [
                  "gbrain",
                  "doctor",
                  "--only",
                  "belief_ledger_coverage",
                  "--json",
                  "--brain",
                  "host"
                ]
              },
              "why": "Enabling baselines every page of the source and records each later change; only a managed source is certified."
            },
            "message": "The belief ledger is off: no source records what this brain had recorded, and when.",
            "name": "belief_ledger_coverage",
            "readiness_state": "disabled_by_choice",
            "severity": "info",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "backfill": {
                "completed_at": "<ts>",
                "interrupted": false
              },
              "by_tier": {
                "agent_written": 0,
                "external_untrusted": 0,
                "operator_curated": 27,
                "tool_observed": 0,
                "unknown": 3,
                "user_confirmed": 0
              },
              "derived": {
                "external_pct": 0,
                "external_untrusted": 0,
                "rows": 0
              },
              "rows": 30,
              "tables": [
                {
                  "by_tier": {
                    "agent_written": 0,
                    "external_untrusted": 0,
                    "operator_curated": 19,
                    "tool_observed": 0,
                    "unknown": 1,
                    "user_confirmed": 0
                  },
                  "rows": 20,
                  "table": "pages"
                },
                {
                  "by_tier": {
                    "agent_written": 0,
                    "external_untrusted": 0,
                    "operator_curated": 3,
                    "tool_observed": 0,
                    "unknown": 0,
                    "user_confirmed": 0
                  },
                  "rows": 3,
                  "table": "facts"
                },
                {
                  "by_tier": {
                    "agent_written": 0,
                    "external_untrusted": 0,
                    "operator_curated": 0,
                    "tool_observed": 0,
                    "unknown": 0,
                    "user_confirmed": 0
                  },
                  "rows": 0,
                  "table": "takes"
                },
                {
                  "by_tier": {
                    "agent_written": 0,
                    "external_untrusted": 0,
                    "operator_curated": 5,
                    "tool_observed": 0,
                    "unknown": 2,
                    "user_confirmed": 0
                  },
                  "rows": 7,
                  "table": "timeline_entries"
                }
              ],
              "unknown_pages": 1,
              "unknown_pct": 10
            },
            "elapsed_ms": "<volatile>",
            "message": "10% of 30 row(s) have an unverified origin (unknown tier); the backfill has classified every row it has a signal for. Remote MCP readers see the 1 unverified-origin page(s) quoted as source material until the backfill classifies them or the owner claims their source (gbrain trust claim-sources); local reads are unchanged.",
            "name": "trust_tiers",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "docs": "docs/guides/repair.md#provenance",
              "sources": [],
              "truncated": false
            },
            "elapsed_ms": "<volatile>",
            "message": "No page has provenance stamps or a trust marker that another writer removed.",
            "name": "provenance_stamp_drift",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "completed_at": null,
              "detector_version": 2,
              "total_unscanned": 0,
              "unscanned": {
                "facts": 0,
                "pages": 0,
                "takes": 0,
                "timeline_entries": 0
              }
            },
            "elapsed_ms": "<volatile>",
            "message": "Every agent-written or lower row has been scanned by the current write-gate detector; flagged rows carry their flag, and proactive surfaces withhold them when trust.agent_activation is suppress.",
            "name": "trust_scan",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "legacy_unknown": 0,
              "pending": [],
              "unclaimed": []
            },
            "elapsed_ms": "<volatile>",
            "message": "No unclaimed source holds rows from before trust tiers.",
            "name": "trust_sources_unclaimed",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "items": [],
              "total": 0
            },
            "elapsed_ms": "<volatile>",
            "message": "No released fact was confirmed with fence-row fields its release preview did not show.",
            "name": "trust_release_unpreviewed_fields",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "bad_config": [],
              "chars_limit": 4000,
              "chars_used": 0,
              "compiled": [],
              "docs": "docs/guides/core-memory.md",
              "enabled": false,
              "pages": 0
            },
            "elapsed_ms": "<volatile>",
            "message": "Core memory is off (opt-in). If the user wants a profile loaded in every session: gbrain config set memory.core.enabled true, then gbrain core init.",
            "name": "core_memory",
            "status": "ok"
          },
          {
            "category": "ops",
            "details": {
              "consumers": [],
              "count": 0,
              "docs": "docs/guides/troubleshooting.md#two-consumers-on-host",
              "min_age_ms": "<volatile>"
            },
            "elapsed_ms": "<volatile>",
            "message": "No persistence consumer is running on this host.",
            "name": "two_consumers_on_host",
            "status": "ok"
          },
          {
            "category": "ops",
            "details": {
              "count": 0,
              "docs": "docs/guides/troubleshooting.md#two-consumers-on-host",
              "owners": []
            },
            "elapsed_ms": "<volatile>",
            "message": "Every owner of a live running claim on this host has a consumer heartbeat row.",
            "name": "consumers_without_heartbeat",
            "status": "ok"
          },
          {
            "category": "ops",
            "details": {
              "count": 0,
              "docs": "docs/guides/troubleshooting.md#host-identity-mismatch",
              "host_id": "<uuid>",
              "host_json_path": "<home>/.gbrain/persistence/host.json",
              "mismatches": []
            },
            "elapsed_ms": "<volatile>",
            "message": "This process's host identity (<home>/.gbrain/persistence/host.json) owns every binding this filesystem holds.",
            "name": "host_identity_mismatch",
            "status": "ok"
          },
          {
            "category": "ops",
            "details": "<live-census>",
            "elapsed_ms": "<volatile>",
            "message": "<live-census>",
            "name": "session_lane_budget",
            "status": "<live-census>"
          },
          {
            "category": "ops",
            "details": {
              "builds": [],
              "count": 0,
              "docs": "docs/guides/troubleshooting.md#runtime-build-skew",
              "earlier_job_children": 0,
              "job_children": [],
              "newest": null,
              "processes": [],
              "stale": [],
              "unknown_builds": []
            },
            "elapsed_ms": "<volatile>",
            "message": "No long-running gbrain process (serve, jobs supervisor, worker) is running on this host.",
            "name": "runtime_build_skew",
            "status": "ok"
          },
          {
            "category": "ops",
            "details": {
              "docs": "docs/guides/cli-socket.md",
              "refusals": 0
            },
            "elapsed_ms": "<volatile>",
            "message": "The warm CLI socket refused no CLI call in the last 24 hours.",
            "name": "cli_socket_refusals",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "code": "held_failed",
              "held": 0,
              "items": []
            },
            "elapsed_ms": "<volatile>",
            "message": "No managed atom page or transcript is held after repeated extraction failures.",
            "name": "extract_atoms_held_failed",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "pages": 0,
              "samples": []
            },
            "elapsed_ms": "<volatile>",
            "message": "No conversation page is held for an undetected format.",
            "name": "conversation_detection_ambiguous",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "groups": []
            },
            "elapsed_ms": "<volatile>",
            "message": "Every page extraction read all of its input (no head-only, tail-window or size-skip receipts).",
            "name": "extraction_input_truncated",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "models": []
            },
            "elapsed_ms": "<volatile>",
            "message": "No segmented page derivation is held back by a model without a price.",
            "name": "derivation_unpriced_model",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "by_source": [
                {
                  "count": 0,
                  "source_id": "default",
                  "status": "known"
                },
                {
                  "count": 0,
                  "source_id": "notes",
                  "status": "known"
                },
                {
                  "count": 0,
                  "source_id": "plain",
                  "status": "known"
                }
              ],
              "count": 0,
              "docs": "docs/guides/repair.md#ghost-pages",
              "exact": true,
              "inspected": 20,
              "samples": [],
              "truncated": false
            },
            "elapsed_ms": "<volatile>",
            "message": "No live page is missing its canonical file (20 page(s) inspected).",
            "name": "ghost_pages",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "docs": "docs/guides/repair.md#origin-twins",
              "index": "present"
            },
            "elapsed_ms": "<volatile>",
            "message": "pages_live_origin_key is present: no two live pages can record one file.",
            "name": "origin_twins",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "count": 0,
              "docs": "docs/guides/repair.md#slug-path-mismatch",
              "file_limit": 200,
              "files": {
                "file_missing": 0,
                "no_checkout": 0,
                "not_read": 0,
                "stamped": 0,
                "unstamped": 0
              },
              "inspected": 0,
              "samples": [],
              "scan_limit": 20000,
              "truncated": false
            },
            "elapsed_ms": "<volatile>",
            "message": "Every live page's slug is the one its recorded file path derives (0 candidate(s) inspected).",
            "name": "slug_path_mismatch",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "by_source": [],
              "count": 0,
              "docs": "docs/guides/live-sync.md#renaming-a-page",
              "samples": []
            },
            "elapsed_ms": "<volatile>",
            "message": "No rename that lost its page identity is waiting for a disposition.",
            "name": "rename_identity_downgrades",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "parked": 0
            },
            "elapsed_ms": "<volatile>",
            "message": "No soft-deleted page is parked by the managed purge.",
            "name": "purge_parked_pages",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "origins": [],
              "parked": 0
            },
            "elapsed_ms": "<volatile>",
            "message": "No soft-deleted page is kept from the purge to keep a page derived from it private.",
            "name": "derived_origin_parked",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "missing": 0,
              "path": "<home>/.gbrain/purge-events.jsonl",
              "recent": 0
            },
            "elapsed_ms": "<volatile>",
            "message": "No purge in the last 30 days to check against the purge mirror at <home>/.gbrain/purge-events.jsonl.",
            "name": "purge_mirror",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "sweeps": 0
            },
            "elapsed_ms": "<volatile>",
            "message": "No fact purge has a sweep of stored derivation results pending or stalled.",
            "name": "derivation_purge_sweeps",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "count": 0,
              "docs": "docs/storage-tiering.md#restoring-a-page-whose-file-is-gone",
              "sources": []
            },
            "elapsed_ms": "<volatile>",
            "message": "Not applicable: no source is a classic checkout on this host (managed sources are checked by ghost_pages).",
            "name": "missing_recorded_files",
            "readiness_state": "not_applicable",
            "severity": "info",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "docs": "docs/guides/repair.md#unindexed-files",
              "sources": [
                {
                  "source_id": "default",
                  "state": "missing"
                },
                {
                  "source_id": "notes",
                  "state": "missing"
                },
                {
                  "source_id": "plain",
                  "state": "missing"
                }
              ]
            },
            "elapsed_ms": "<volatile>",
            "fix": {
              "actor": "agent",
              "argv": [
                "gbrain",
                "sources",
                "retry-held",
                "default",
                "--unindexed",
                "--brain",
                "host"
              ],
              "command": "gbrain sources retry-held default --unindexed --brain host",
              "consent": [],
              "docs": "https://github.com/garrytan/gbrain/blob/master/docs/guides/repair.md#unindexed-files",
              "next": "run",
              "requires_exclusive": false,
              "then": {
                "actor": "agent",
                "argv": [
                  "gbrain",
                  "sync",
                  "--source",
                  "default",
                  "--no-pull",
                  "--brain",
                  "host"
                ],
                "command": "gbrain sync --source default --no-pull --brain host",
                "consent": [],
                "docs": "https://github.com/garrytan/gbrain/blob/master/docs/guides/repair.md#unindexed-files",
                "next": "run",
                "requires_exclusive": false,
                "verify": {
                  "argv": [
                    "gbrain",
                    "doctor",
                    "--only",
                    "unindexed_files",
                    "--json",
                    "--brain",
                    "host"
                  ]
                },
                "why": "The sync re-screens the scheduled files of default: each one that passes imports, each one that refuses is recorded as a hold that gbrain sources status default lists."
              },
              "verify": {
                "argv": [
                  "gbrain",
                  "doctor",
                  "--only",
                  "unindexed_files",
                  "--json",
                  "--brain",
                  "host"
                ]
              },
              "why": "Finds the committed files of default with no page and no hold (bounded; it continues an incomplete scan), schedules them for a re-screen and stores the result this check reads."
            },
            "message": "Unindexed files are not known for default (not computed yet), notes (not computed yet), plain (not computed yet). The maintenance phase unindexed_files computes them on each run and continues an incomplete scan; to compute them now, run gbrain sources retry-held <id> --unindexed.",
            "name": "unindexed_files",
            "readiness_state": "unknown",
            "severity": "info",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "count": 0,
              "docs": "docs/guides/repair.md#overwritten-edits",
              "sources": [],
              "truncated": false,
              "unknown": 0
            },
            "elapsed_ms": "<volatile>",
            "message": "No page shows a database edit that a sync import overwrote.",
            "name": "sync_overwritten_db_edits",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "count": 0,
              "docs": "docs/guides/repair.md#rows-behind",
              "sources": [
                {
                  "behind": 0,
                  "checkpoint": null,
                  "complete": true,
                  "counts": {},
                  "pages": 0,
                  "reason": "no_checkpoint",
                  "samples": [],
                  "source_id": "default",
                  "status": "not_applicable",
                  "stopped_at": null,
                  "unproven": 0,
                  "unproven_samples": []
                },
                {
                  "behind": 0,
                  "checkpoint": "<fixture-head>",
                  "complete": true,
                  "counts": {
                    "current": 18,
                    "database_moved": 1
                  },
                  "pages": 19,
                  "samples": [],
                  "source_id": "notes",
                  "status": "known",
                  "stopped_at": null,
                  "unproven": 0,
                  "unproven_samples": []
                },
                {
                  "behind": 0,
                  "checkpoint": null,
                  "complete": true,
                  "counts": {},
                  "pages": 0,
                  "reason": "no_checkpoint",
                  "samples": [],
                  "source_id": "plain",
                  "status": "not_applicable",
                  "stopped_at": null,
                  "unproven": 0,
                  "unproven_samples": []
                }
              ],
              "timeout_ms": "<volatile>",
              "unproven": 0
            },
            "elapsed_ms": "<volatile>",
            "message": "Every file-backed page holds its file as of the sync checkpoint (19 page(s) read).",
            "name": "sync_rows_behind_checkpoint",
            "status": "ok"
          },
          {
            "category": "meta",
            "details": {
              "rollback": [],
              "unapplied": []
            },
            "elapsed_ms": "<volatile>",
            "message": "No retired sync config key is stored on this brain.",
            "name": "sync_config_keys",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "capped": false,
              "pairs": [],
              "scanned": 0
            },
            "elapsed_ms": "<volatile>",
            "message": "No title-prefixed person page pairs with an unprefixed page (0 titled page(s) examined).",
            "name": "person_title_duplicates",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "docs": "docs/guides/write-refusals.md#file_database_drift",
              "sources": []
            },
            "elapsed_ms": "<volatile>",
            "message": "No local edit was adopted in the last 24 h.",
            "name": "local_edit_adoptions",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "docs": "docs/guides/repair.md#outside-content-fences",
              "items": [],
              "pages": 0
            },
            "elapsed_ms": "<volatile>",
            "message": "No fact, take or link is indexed from a fence on an imported email, calendar, GitHub or transcript page.",
            "name": "outside_content_fences",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "database_disabled": false,
              "docs": "docs/guides/troubleshooting.md#embedding-plane-disagreement",
              "file_disabled": true,
              "vector_tables": []
            },
            "elapsed_ms": "<volatile>",
            "message": "The config file disables embeddings and the database holds no vectors.",
            "name": "embedding_plane_disagreement",
            "status": "ok"
          },
          {
            "category": "ops",
            "details": {
              "bytes": 32768,
              "docs": "docs/mcp/ADMIN.md#request-log-retention",
              "retention_days": null,
              "rows": 0,
              "rows_exact": false
            },
            "elapsed_ms": "<volatile>",
            "fix": {
              "actor": "agent",
              "argv": [
                "gbrain",
                "config",
                "set",
                "cycle.purge.mcp_request_log_retention_days",
                "90",
                "--brain",
                "host"
              ],
              "command": "gbrain config set cycle.purge.mcp_request_log_retention_days 90 --brain host",
              "consent": [
                "destructive"
              ],
              "docs": "https://github.com/garrytan/gbrain/blob/master/docs/mcp/ADMIN.md#request-log-retention",
              "next": "ask_user",
              "requires_exclusive": false,
              "user_message": "Your MCP request log holds ~0 row(s) (0.0 MB) and nothing prunes it. Turn on 90-day retention? Request details older than 90 days (operation, status, parameters, errors) will be deleted and cannot be restored; per-client totals and audit rows are kept.",
              "verify": {
                "argv": [
                  "gbrain",
                  "doctor",
                  "--only",
                  "mcp_request_log_retention",
                  "--json",
                  "--brain",
                  "host"
                ]
              },
              "why": "Turns on the request-log prune: the next cycle purge phase (or, on a PGLite brain, a live serve within the hour) deletes request rows older than 90 days. Per-client lifetime totals and the audit rows (surface, memory-setting and access changes) are kept."
            },
            "message": "The MCP request log holds ~0 row(s) (0.0 MB); request-log retention is off, so it keeps every request.",
            "name": "mcp_request_log_retention",
            "readiness_state": "disabled_by_choice",
            "severity": "info",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "docs": "docs/guides/storage-manifest.md#doctor"
            },
            "elapsed_ms": "<volatile>",
            "message": "No storage shelf and no interim storage records on this brain.",
            "name": "storage_manifest",
            "readiness_state": "not_applicable",
            "severity": "info",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "message": "Every fact line on 0 facts page(s) carries a date.",
            "name": "facts_undated_lines",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "auto_repair": {
                "active": false,
                "enabled": true,
                "last_maintenance_at": null,
                "llm": true
              },
              "docs": "docs/guides/write-refusals.md#invalid_fence",
              "model_repair": {
                "max_usd_per_day": 1,
                "max_usd_per_page": 0.3,
                "reserved_today_usd": 0,
                "spent_today_usd": 0
              },
              "partial": false,
              "partial_sources": [],
              "sources": [
                {
                  "by_tier": {
                    "deterministic": 0,
                    "llm": 0,
                    "manual": 0,
                    "resolver": 0,
                    "total": 0
                  },
                  "files": {
                    "deterministic": 0,
                    "llm": 0,
                    "manual": 0,
                    "resolver": 0,
                    "total": 0
                  },
                  "holds": {
                    "deterministic": 0,
                    "llm": 0,
                    "manual": 0,
                    "resolver": 0,
                    "total": 0
                  },
                  "oldest_hold_at": null,
                  "pages": {
                    "deterministic": 0,
                    "llm": 0,
                    "manual": 0,
                    "resolver": 0,
                    "total": 0
                  },
                  "sample": [],
                  "scan": {
                    "backfill_done": true,
                    "checked_at": "<ts>",
                    "complete": true,
                    "fresh_at": "<ts>",
                    "walking": false
                  },
                  "source_id": "default",
                  "total": 0
                },
                {
                  "by_tier": {
                    "deterministic": 2,
                    "llm": 1,
                    "manual": 1,
                    "resolver": 0,
                    "total": 4
                  },
                  "files": {
                    "deterministic": 1,
                    "llm": 0,
                    "manual": 0,
                    "resolver": 0,
                    "total": 1
                  },
                  "holds": {
                    "deterministic": 0,
                    "llm": 1,
                    "manual": 1,
                    "resolver": 0,
                    "total": 2
                  },
                  "oldest_hold_at": "<ts>",
                  "pages": {
                    "deterministic": 1,
                    "llm": 0,
                    "manual": 0,
                    "resolver": 0,
                    "total": 1
                  },
                  "sample": [
                    {
                      "bucket": "hold",
                      "key": "fences/llm",
                      "path": "fences/llm.md",
                      "reasons": [
                        "no_header"
                      ],
                      "tier": "llm"
                    },
                    {
                      "bucket": "hold",
                      "key": "fences/manual",
                      "path": "fences/manual.md",
                      "reasons": [
                        "takes_kind_unsupported"
                      ],
                      "tier": "manual"
                    },
                    {
                      "bucket": "file",
                      "key": "fences/untracked",
                      "path": "fences/untracked.md",
                      "reasons": [
                        "close_fence"
                      ],
                      "tier": "deterministic"
                    },
                    {
                      "bucket": "page",
                      "key": "notes/stored-fence",
                      "path": "notes/stored-fence.md",
                      "reasons": [
                        "close_fence"
                      ],
                      "tier": "deterministic"
                    }
                  ],
                  "scan": {
                    "backfill_done": true,
                    "checked_at": "<ts>",
                    "complete": true,
                    "fresh_at": "<ts>",
                    "walking": false
                  },
                  "source_id": "notes",
                  "total": 4
                },
                {
                  "by_tier": {
                    "deterministic": 1,
                    "llm": 0,
                    "manual": 0,
                    "resolver": 0,
                    "total": 1
                  },
                  "files": {
                    "deterministic": 1,
                    "llm": 0,
                    "manual": 0,
                    "resolver": 0,
                    "total": 1
                  },
                  "holds": {
                    "deterministic": 0,
                    "llm": 0,
                    "manual": 0,
                    "resolver": 0,
                    "total": 0
                  },
                  "oldest_hold_at": null,
                  "pages": {
                    "deterministic": 0,
                    "llm": 0,
                    "manual": 0,
                    "resolver": 0,
                    "total": 0
                  },
                  "sample": [
                    {
                      "bucket": "file",
                      "key": "fence",
                      "path": "fence.md",
                      "reasons": [
                        "close_fence"
                      ],
                      "tier": "deterministic"
                    }
                  ],
                  "scan": {
                    "backfill_done": true,
                    "checked_at": "<ts>",
                    "complete": true,
                    "fresh_at": "<ts>",
                    "walking": false
                  },
                  "source_id": "plain",
                  "total": 1
                }
              ],
              "timeout_ms": "<volatile>",
              "total": 5,
              "trend": [
                {
                  "by_day": [],
                  "normalized_7d": 0,
                  "source_id": "default",
                  "top_writers": []
                },
                {
                  "by_day": [
                    {
                      "count": 1,
                      "day": "<sync-day>"
                    }
                  ],
                  "normalized_7d": 1,
                  "source_id": "notes",
                  "top_writers": [
                    {
                      "count": 1,
                      "writer": "fences/"
                    }
                  ]
                },
                {
                  "by_day": [],
                  "normalized_7d": 0,
                  "source_id": "plain",
                  "top_writers": []
                }
              ],
              "unbound_legacy_facts": {
                "pages": [],
                "total": 0
              },
              "uncommitted_repairs": 0,
              "unrenderable_legacy_facts": {
                "complete": true,
                "pages": [],
                "total": 0
              },
              "warn_at_normalized_7d": 20
            },
            "elapsed_ms": "<volatile>",
            "fix": {
              "actor": "agent",
              "argv": [
                "gbrain",
                "repair",
                "fences",
                "--source",
                "notes",
                "--brain",
                "host"
              ],
              "command": "gbrain repair fences --source notes --brain host",
              "consent": [],
              "docs": "https://github.com/garrytan/gbrain/blob/master/docs/guides/repair.md#fences",
              "next": "run",
              "requires_exclusive": false,
              "then": {
                "actor": "agent",
                "argv": [
                  "gbrain",
                  "repair",
                  "fences",
                  "--source",
                  "notes",
                  "--apply",
                  "--brain",
                  "host"
                ],
                "command": "gbrain repair fences --source notes --apply --brain host",
                "consent": [],
                "next": "run",
                "requires_exclusive": false,
                "verify": {
                  "argv": [
                    "gbrain",
                    "doctor",
                    "--only",
                    "fence_integrity",
                    "--json",
                    "--brain",
                    "host"
                  ]
                },
                "why": "Applies the current repair plan of notes; the command the preview prints adds --expect <hash>, which applies exactly what it showed."
              },
              "verify": {
                "argv": [
                  "gbrain",
                  "doctor",
                  "--only",
                  "fence_integrity",
                  "--json",
                  "--brain",
                  "host"
                ]
              },
              "why": "Previews the repair of each malformed fence of notes (read-only, no model call): its planned tier and diff, the estimated model cost, or the exact edit for a fence gbrain will not guess; it prints the apply command with --expect <hash>. They are not repaired automatically (no maintenance run has completed in the last 24 h), so apply the plan with the command the preview prints. 1 need a manual edit: make the edit the preview names in the file (or the page), commit, then sync."
            },
            "message": "5 malformed facts or takes fence(s) wait: notes: 2 held file(s), 1 stored page(s), 1 unsynced file(s) (by tier: deterministic 2, llm 1, manual 1); oldest hold 0 h old; plain: 1 unsynced file(s) (by tier: deterministic 1). The deterministic, resolver and model-tier ones are not repaired automatically (no maintenance run has completed in the last 24 h); 1 need the manual edit the preview names. None of them blocks a sync. Preview: gbrain repair fences --source notes; gbrain repair fences --source plain. Model repair caps: $0.30 per page, $1.00 per day ($0.00 spent today).",
            "name": "fence_integrity",
            "status": "warn"
          },
          {
            "category": "ops",
            "elapsed_ms": "<volatile>",
            "message": "Mode: conservative (no per-key overrides — mode bundle is canonical).",
            "name": "search_mode",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "configured": false,
              "global_tier": "none"
            },
            "elapsed_ms": "<volatile>",
            "message": "Not applicable: the configured contextual-retrieval tier is none, not per_chunk_synopsis.",
            "name": "synopsis_tier_coverage",
            "readiness_state": "not_applicable",
            "severity": "info",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "counts": {},
              "prefixes": [
                "test/",
                "attachments/",
                ".raw/"
              ]
            },
            "elapsed_ms": "<volatile>",
            "message": "No pages hidden by search-exclude policy.",
            "name": "hidden_by_search_policy",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "message": "No retrieval-affecting files changed in working tree.",
            "name": "eval_drift",
            "status": "ok"
          },
          {
            "category": "ops",
            "elapsed_ms": "<volatile>",
            "message": "Reranker disabled — no failures expected",
            "name": "reranker_health",
            "status": "ok"
          },
          {
            "category": "ops",
            "elapsed_ms": "<volatile>",
            "message": "No exhausted batch retries in last 24h. Disconnect-call audit: 14 call(s) in 24h (most recent caller: <frame>).",
            "name": "batch_retry_health",
            "status": "ok"
          },
          {
            "category": "ops",
            "elapsed_ms": "<volatile>",
            "message": "No wedged queues",
            "name": "wedged_queue",
            "status": "ok"
          },
          {
            "category": "ops",
            "elapsed_ms": "<volatile>",
            "message": "No orphaned private queues",
            "name": "orphaned_private_queue",
            "status": "ok"
          },
          {
            "category": "ops",
            "elapsed_ms": "<volatile>",
            "message": "No supervisor observed — skipping fan-out/concurrency check",
            "name": "autopilot_fanout_concurrency",
            "status": "ok"
          },
          {
            "category": "ops",
            "elapsed_ms": "<volatile>",
            "message": "no Google accounts connected (gbrain google connect to start)",
            "name": "google_oauth",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "message": "graph_signals disabled — coverage not checked",
            "name": "graph_signals_coverage",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "message": "No junk entity hubs (pages with <=2 chunks and >1000 edges)",
            "name": "junk_entity_hubs",
            "status": "ok"
          },
          {
            "category": "ops",
            "elapsed_ms": "<volatile>",
            "message": "Migration v79 applied; tracking enabled. Calibration profile not yet generated — brainstorm/lsd will run unbiased until enough takes are resolved.",
            "name": "brainstorm_health",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "message": "2/2 bare wikilinks (100%) would resolve — below the 20% / 5-link threshold for surfacing a hint.",
            "name": "link_resolution_opportunity",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "message": "Embeddings disabled — no active embedding width to reconcile.",
            "name": "embedding_width_consistency",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "message": "gateway not configured — facts.embedding width check skipped.",
            "name": "facts_embedding_width_consistency",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "message": "Multi-source brain (2 non-default source(s)); all populated",
            "name": "source_routing_health",
            "status": "ok"
          },
          {
            "category": "ops",
            "elapsed_ms": "<volatile>",
            "message": "No OAuth clients registered",
            "name": "oauth_confidential_client_health",
            "status": "ok"
          },
          {
            "category": "ops",
            "elapsed_ms": "<volatile>",
            "message": "Scoped-client grants consistent (no dangling federated reads, no orphaned workspace sources, no privileged self-registered clients)",
            "name": "oauth_client_scope_health",
            "status": "ok"
          },
          {
            "category": "ops",
            "elapsed_ms": "<volatile>",
            "message": "Lock path: <home>/.gbrain/autopilot.lock",
            "name": "autopilot_lock_scope",
            "status": "ok"
          },
          {
            "category": "ops",
            "elapsed_ms": "<volatile>",
            "message": "No stale locks (no rows with ttl_expires_at < NOW())",
            "name": "stale_locks",
            "status": "ok"
          },
          {
            "category": "meta",
            "details": {
              "counts": {
                "global": 18,
                "mixed": 2,
                "source": 12
              },
              "phase_scope_map": {
                "backlinks": "source",
                "bookkeeping_gc": "global",
                "calibration_profile": "global",
                "chronicle": "global",
                "claim_conflicts": "global",
                "consolidate": "source",
                "content_repair": "global",
                "conversation_facts_backfill": "source",
                "drift": "global",
                "edge_contradictions": "global",
                "embed": "global",
                "enrich_thin": "source",
                "extract": "source",
                "extract_atoms": "source",
                "extract_facts": "source",
                "facts_drain": "global",
                "fence_repair": "global",
                "grade_takes": "global",
                "lint": "source",
                "orphans": "global",
                "patterns": "mixed",
                "propose_takes": "source",
                "purge": "global",
                "recompute_emotional_weight": "source",
                "resolve_symbol_edges": "global",
                "schema-suggest": "source",
                "skillopt": "global",
                "standing_questions": "global",
                "sync": "source",
                "synthesize": "mixed",
                "synthesize_concepts": "global",
                "unindexed_files": "global"
              }
            },
            "elapsed_ms": "<volatile>",
            "message": "Phase taxonomy: 12 source-scoped, 18 brain-global, 2 mixed. Source-safe: [lint, backlinks, sync, extract, extract_facts, extract_atoms, recompute_emotional_weight, consolidate, propose_takes, conversation_facts_backfill, enrich_thin, schema-suggest]. Brain-global: [fence_repair, content_repair, unindexed_files, resolve_symbol_edges, synthesize_concepts, grade_takes, calibration_profile, edge_contradictions, claim_conflicts, drift, standing_questions, chronicle, facts_drain, skillopt, embed, orphans, purge, bookkeeping_gc]. Mixed: [synthesize, patterns].",
            "name": "cycle_phase_scope",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "fix": {
              "actor": "user",
              "argv": [
                "gbrain",
                "init",
                "--force",
                "--embedding-model",
                "voyage:voyage-4",
                "--embedding-dimensions",
                "1024"
              ],
              "command": "gbrain init --force --embedding-model voyage:voyage-4 --embedding-dimensions 1024",
              "consent": [
                "credentials",
                "paid"
              ],
              "docs": "https://github.com/garrytan/gbrain/blob/master/docs/guides/search-modes.md",
              "inputs": [
                {
                  "how": "Ask the user for an API key for Voyage AI; store it with `gbrain config set voyage_api_key <key>` (every gbrain process reads it), or export VOYAGE_API_KEY in the environment of every gbrain process. Then run the command.",
                  "name": "VOYAGE_API_KEY"
                }
              ],
              "next": "tell_user_to_run",
              "requires_exclusive": true,
              "user_message": "Semantic search needs an embedding API key. Voyage AI works with this brain; if you add a key (VOYAGE_API_KEY), I can turn it on. Embedding costs a little per page; your notes and facts stay as they are.",
              "verify": {
                "argv": [
                  "gbrain",
                  "doctor",
                  "--only",
                  "embeddings",
                  "--json",
                  "--brain",
                  "host"
                ]
              },
              "why": "Embeddings are off, so search is keyword-only, and no configured embedding key fits this brain. Once the key is set this turns on voyage:voyage-4 (1024d) for this Postgres brain. Pages, facts and keyword search are kept; existing chunks and facts are queued for vectors, which `gbrain embed --stale` (or the next maintenance cycle) fills."
            },
            "message": "Not applicable: embeddings are disabled on this brain by choice, so chunks have no vectors by design (keyword search keeps working).",
            "name": "embed_staleness",
            "readiness_state": "disabled_by_choice",
            "severity": "info",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "message": "Only 2 entity pages (< 5) — coverage ratio not meaningful at this scale",
            "name": "entity_link_coverage",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "message": "Only 2 entity pages (< 5) — coverage ratio not meaningful at this scale",
            "name": "timeline_coverage",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "fix": {
              "actor": "agent",
              "argv": [
                "gbrain",
                "config",
                "set",
                "takes.bootstrap_enabled",
                "true",
                "--brain",
                "host"
              ],
              "command": "gbrain config set takes.bootstrap_enabled true --brain host",
              "consent": [
                "paid"
              ],
              "next": "ask_user",
              "requires_exclusive": false,
              "user_message": "gbrain can extract typed claims (\"takes\") from your pages so it can track calibration over time. It uses a paid chat model (roughly $5 once). Turn it on?",
              "verify": {
                "argv": [
                  "gbrain",
                  "doctor",
                  "--only",
                  "takes_count",
                  "--json",
                  "--brain",
                  "host"
                ]
              },
              "why": "Takes (typed claims) are opt-in. Enabling the bootstrap lets maintenance extract them from existing pages with a chat model (about $5 on a typical brain), which feeds calibration."
            },
            "message": "0 takes (takes.bootstrap_enabled is false; opt in to enable)",
            "name": "takes_count",
            "readiness_state": "disabled_by_choice",
            "severity": "info",
            "status": "ok"
          },
          {
            "category": "meta",
            "elapsed_ms": "<volatile>",
            "message": "Active pack [email protected]+e142684a is current (no successor declared)",
            "name": "pack_upgrade_available",
            "status": "ok"
          },
          {
            "category": "meta",
            "elapsed_ms": "<volatile>",
            "message": "5 distinct typed values (pack gbrain-base-v2 declares 25)",
            "name": "type_proliferation",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "message": "No dangling aliases",
            "name": "dangling_aliases",
            "status": "ok"
          }
        ],
        "complete": true,
        "db_url_source": null,
        "elapsed_ms": "<volatile>",
        "engine": "postgres",
        "health_score": 35,
        "schema_version": 2,
        "status": "unhealthy",
        "tier": "standard",
        "top_issues": [
          {
            "action": {
              "actor": "agent",
              "argv": [
                "gbrain",
                "sync",
                "--source",
                "plain",
                "--no-pull",
                "--brain",
                "host"
              ],
              "command": "gbrain sync --source plain --no-pull --brain host",
              "consent": [],
              "docs": "https://github.com/garrytan/gbrain/blob/master/docs/guides/troubleshooting.md#sync-freshness-no-successful-sync",
              "next": "run",
              "requires_exclusive": false,
              "verify": {
                "argv": [
                  "gbrain",
                  "doctor",
                  "--only",
                  "sync_freshness",
                  "--json",
                  "--brain",
                  "host"
                ]
              },
              "why": "No successful sync of plain is recorded; this runs one and stamps last_sync_at when it succeeds."
            },
            "fix": "Source 'plain': no successful sync recorded; no attempt recorded; run `gbrain sync --source plain --no-pull`. 1 writer-owned canonical content source(s): upstream sync is not applicable; see canonical_content_writes for publication status",
            "name": "sync_freshness",
            "status": "fail",
            "tier": "root"
          },
          {
            "action": {
              "actor": "agent",
              "argv": [
                "gbrain",
                "doctor",
                "--remediation-plan",
                "--json",
                "--brain",
                "host"
              ],
              "command": "gbrain doctor --remediation-plan --json --brain host",
              "consent": [],
              "next": "run",
              "requires_exclusive": false,
              "verify": {
                "argv": [
                  "gbrain",
                  "doctor",
                  "--only",
                  "brain_score",
                  "--json",
                  "--brain",
                  "host"
                ]
              },
              "why": "The plan lists which steps raise each score component, what they cost and the reachable maximum; it changes nothing."
            },
            "fix": "Brain score 20/100 (embed 0/35, links 0/25, timeline density (entity and event pages) 10/15, orphans 0/15, dead-links 10/10)",
            "name": "brain_score",
            "status": "warn",
            "tier": "symptom"
          },
          {
            "action": {
              "actor": "agent",
              "argv": [
                "gbrain",
                "repair",
                "fences",
                "--source",
                "notes",
                "--brain",
                "host"
              ],
              "command": "gbrain repair fences --source notes --brain host",
              "consent": [],
              "docs": "https://github.com/garrytan/gbrain/blob/master/docs/guides/repair.md#fences",
              "next": "run",
              "requires_exclusive": false,
              "then": {
                "actor": "agent",
                "argv": [
                  "gbrain",
                  "repair",
                  "fences",
                  "--source",
                  "notes",
                  "--apply",
                  "--brain",
                  "host"
                ],
                "command": "gbrain repair fences --source notes --apply --brain host",
                "consent": [],
                "next": "run",
                "requires_exclusive": false,
                "verify": {
                  "argv": [
                    "gbrain",
                    "doctor",
                    "--only",
                    "fence_integrity",
                    "--json",
                    "--brain",
                    "host"
                  ]
                },
                "why": "Applies the current repair plan of notes; the command the preview prints adds --expect <hash>, which applies exactly what it showed."
              },
              "verify": {
                "argv": [
                  "gbrain",
                  "doctor",
                  "--only",
                  "fence_integrity",
                  "--json",
                  "--brain",
                  "host"
                ]
              },
              "why": "Previews the repair of each malformed fence of notes (read-only, no model call): its planned tier and diff, the estimated model cost, or the exact edit for a fence gbrain will not guess; it prints the apply command with --expect <hash>. They are not repaired automatically (no maintenance run has completed in the last 24 h), so apply the plan with the command the preview prints. 1 need a manual edit: make the edit the preview names in the file (or the page), commit, then sync."
            },
            "fix": "5 malformed facts or takes fence(s) wait: notes: 2 held file(s), 1 stored page(s), 1 unsynced file(s) (by tier: deterministic 2, llm 1, manual 1); oldest hold 0 h old; plain: 1 unsynced file(s) (by tier: deterministic 1). The deterministic, resolver and model-tier ones are not repaired automatically (no maintenance run has completed in the last 24 h); 1 need the manual edit the preview names. None of them blocks a sync. Preview: gbrain repair fences --source notes; gbrain repair fences --source plain. Model repair caps: $0.30 per page, $1.00 per day ($0.00 spent today).",
            "name": "fence_integrity",
            "status": "warn",
            "tier": "symptom"
          },
          {
            "fix": "18 frontmatter issue(s). notes: 17 (YAML_PARSE=8, EMPTY_FRONTMATTER=1, MISSING_CLOSE=2, NESTED_QUOTES=1, NON_STRING_FIELD=2, NULL_BYTES=2, SLUG_MISMATCH=1); plain: 1 (YAML_PARSE=1). Fix: gbrain repair frontmatter --source <id> previews the line fix for every file it can repair (and names the manual fix for the rest, such as a missing opening ---); on an unmanaged checkout gbrain frontmatter validate <source-path> --fix applies the same safe fixes",
            "name": "frontmatter_integrity",
            "status": "warn",
            "tier": "symptom"
          },
          {
            "action": {
              "actor": "agent",
              "argv": [
                "gbrain",
                "repair",
                "frontmatter",
                "--brain",
                "host"
              ],
              "command": "gbrain repair frontmatter --brain host",
              "consent": [],
              "docs": "https://github.com/garrytan/gbrain/blob/master/docs/guides/repair.md#frontmatter",
              "next": "run",
              "requires_exclusive": false,
              "verify": {
                "argv": [
                  "gbrain",
                  "doctor",
                  "--only",
                  "frontmatter_repairable",
                  "--json",
                  "--brain",
                  "host"
                ]
              },
              "why": "Previews the minimal line fix per file (safe quoting first; interpretations only with --include-ambiguous) and prints the hash-bound apply command; it writes nothing."
            },
            "fix": "13 file(s) have frontmatter gbrain repair frontmatter can fix: notes: 12 (FRONTMATTER_COMMENT_VALUE=1, needs_interpretation=4, MISSING_CLOSE=2, NESTED_QUOTES=1, YAML_PARSE=2, NULL_BYTES=2, SLUG_MISMATCH=1); plain: 1 (needs_interpretation=1). Preview with gbrain repair frontmatter --source notes; gbrain repair frontmatter --source plain (writes nothing; add --include-ambiguous for interpretations after the safe pass).",
            "name": "frontmatter_repairable",
            "status": "warn",
            "tier": "symptom"
          },
          {
            "action": {
              "actor": "agent",
              "argv": [
                "gbrain",
                "repair",
                "frontmatter",
                "--source",
                "notes",
                "--brain",
                "host"
              ],
              "command": "gbrain repair frontmatter --source notes --brain host",
              "consent": [],
              "docs": "https://github.com/garrytan/gbrain/blob/master/docs/guides/repair.md#held-files",
              "next": "run",
              "requires_exclusive": false,
              "verify": {
                "argv": [
                  "gbrain",
                  "doctor",
                  "--only",
                  "git_held_files",
                  "--json",
                  "--brain",
                  "host"
                ]
              },
              "why": "Previews the minimal line fix for each held file (or names the line to fix by hand) and prints the hash-bound apply command; it writes nothing."
            },
            "fix": "8 file(s) in Git sources are held and not imported; the rest of each sync continues. notes: 8 held (0 page(s) keep an older revision, 8 file(s) have no page), first: fences/llm.md [invalid_fence/no_header], fences/manual.md [invalid_fence/takes_kind_unsupported], fm/dash-line.md [invalid_frontmatter/needs_interpretation], fm/duplicate-key.md [invalid_frontmatter/needs_interpretation], fm/indented-close.md [invalid_frontmatter/yaml_parse]. A page whose newer file is held is read-only for put_page until the file is repaired, so do not retry a refused write. Inspect with gbrain sources status notes; then notes: preview the frontmatter and other fixes with gbrain repair frontmatter --source notes (writes nothing until a hash-bound apply); nothing repairs the fence and slug-conflict holds by itself (no maintenance run is active), so preview the content repairs with gbrain repair content --source notes (read-only, no model call: it lists each held file with its planned repair or the exact edit, kind by kind, and prints the apply command with --expect <hash>[,<hash>]), then run the apply command it prints.",
            "name": "git_held_files",
            "status": "warn",
            "tier": "symptom"
          },
          {
            "fix": "Source `notes`: 1 page(s) use 1 type(s) pack `gbrain-base-v2` neither declares nor aliases: '2024' (1). List them with `gbrain schema review-orphans --source notes`, then declare the type (`gbrain schema add-type <type>`, which takes its primitive and prefix) or retype the pages to a declared type.",
            "name": "schema_pack_consistency",
            "status": "warn",
            "tier": "symptom"
          },
          {
            "fix": "65 new built-in skill(s) available that this workspace hasn't installed: academic-verify, archive-crawler, article-enrichment, ask-user, blog-ingest, book-mirror, brain-ingest-gate, brain-link-discipline, … +57 more. Add them with `gbrain skillpack sync`.",
            "name": "skill_currency",
            "status": "warn",
            "tier": "symptom"
          },
          {
            "action": {
              "actor": "agent",
              "argv": [
                "gbrain",
                "projections",
                "drain",
                "--limit",
                "4800",
                "--brain",
                "host"
              ],
              "command": "gbrain projections drain --limit 4800 --brain host",
              "consent": [],
              "docs": "https://github.com/garrytan/gbrain/blob/master/docs/guides/repair.md#projection-drain",
              "next": "run",
              "preview_argv": [
                "gbrain",
                "projections",
                "drain",
                "--dry-run",
                "--json",
                "--brain",
                "host"
              ],
              "requires_exclusive": false,
              "verify": {
                "argv": [
                  "gbrain",
                  "projections",
                  "drain",
                  "--dry-run",
                  "--json",
                  "--brain",
                  "host"
                ]
              },
              "why": "Rebuilds queued Markdown and code projections and seals importer-attested image pages in place, at most 4800 pages per run; repeat until the dry run shows sealable 0."
            },
            "fix": "Visible pages have missing or stale text projections (1 queued Markdown/code page(s)); search and code results may be incomplete. Run `gbrain projections drain` to rebuild queued Markdown and code projections now; it is safe while `gbrain serve` runs on Postgres. For code metadata repair, run `gbrain reindex-code --force --no-embed`. If work stays pending, inspect the recorded source path. No repair or embedding was started by this check.",
            "name": "text_projection_readiness",
            "status": "warn",
            "tier": "symptom"
          },
          {
            "action": {
              "actor": "agent",
              "argv": [
                "gbrain",
                "repair",
                "timeline",
                "--brain",
                "host"
              ],
              "command": "gbrain repair timeline --brain host",
              "consent": [],
              "next": "run",
              "requires_exclusive": false,
              "verify": {
                "argv": [
                  "gbrain",
                  "doctor",
                  "--only",
                  "timeline_history",
                  "--json",
                  "--brain",
                  "host"
                ]
              },
              "why": "Previews the repair without changing anything and prints the exact apply command; applying rewrites stored records, so ask the user first."
            },
            "fix": "1 timeline row(s) on 1 page(s) exist only in the database. Preview: gbrain repair timeline — apply: gbrain repair timeline --apply. 1 other row(s) cannot round-trip and are kept as-is.",
            "name": "timeline_history",
            "status": "warn",
            "tier": "symptom"
          }
        ],
        "unknown_sections": []
      },
      "stderr": [
        "[gbrain] reading doctor checks; large brains can take minutes. Progress prints here every 10 s; the result prints on stdout when it is ready.",
        "[gbrain doctor] non-interactive run: the check run (not connect or migrations) is capped at 90000 ms (doctor.default_budget_ms); checks past it report health unknown. Off for one run: --budget-ms 0; off for good: gbrain config set doctor.default_budget_ms 0. On PGLite a statement already running cannot be stopped, so a check can finish late.",
        "[backup] checked 3 asset(s): 1 without a git remote (computed_by=doctor)"
      ],
      "stdout": "<json>"
    },
    "second": {
      "args": [
        "doctor",
        "--json",
        "--skills-dir",
        "<home>/skills"
      ],
      "exit_code": 1,
      "report": {
        "alert": {
          "docs": "docs/guides/troubleshooting.md#doctor-alert",
          "items": [],
          "level": "none",
          "unknown": []
        },
        "brain_checks_score": 45,
        "budget_ms": "<volatile>",
        "capped_by": [
          "embeddings_disabled"
        ],
        "category_scores": {
          "brain": 45,
          "meta": 95,
          "ops": 100,
          "skill": 95
        },
        "checks": [
          {
            "category": "skill",
            "elapsed_ms": "<volatile>",
            "message": "1 skills, all reachable",
            "name": "resolver_health",
            "status": "ok"
          },
          {
            "category": "skill",
            "details": {
              "enabled": true,
              "engine": "postgres",
              "fired_recently": false,
              "last_fired": null,
              "path": "postgres direct",
              "policy_skill_installed": false
            },
            "elapsed_ms": "<volatile>",
            "message": "postgres direct; enabled; not observed firing yet — policy skill not installed; run `gbrain integrations install retrieval-reflex --target <host-repo>`",
            "name": "retrieval_reflex_health",
            "status": "ok"
          },
          {
            "category": "skill",
            "details": {
              "channels": {},
              "window_days": 7
            },
            "elapsed_ms": "<volatile>",
            "message": "no push-context activity in 7 days — note: the harness-hook channels require a PGLite serve socket — on this engine the hook lane stays quiet by design (pull-mode retrieval covers it)",
            "name": "volunteer_channels",
            "status": "ok"
          },
          {
            "category": "skill",
            "elapsed_ms": "<volatile>",
            "message": "no verb calls recorded yet (sidecar appears on first remember/recall/entity/synthesize/forget)",
            "name": "memory_verbs_usage",
            "status": "ok"
          },
          {
            "category": "skill",
            "elapsed_ms": "<volatile>",
            "message": "1/1 skills pass",
            "name": "skill_conformance",
            "status": "ok"
          },
          {
            "category": "skill",
            "elapsed_ms": "<volatile>",
            "message": "1 skill(s) compliant or exempt",
            "name": "skill_brain_first",
            "status": "ok"
          },
          {
            "category": "skill",
            "elapsed_ms": "<volatile>",
            "message": "No skills.lock.json in <home>/skills — integrity check not applicable",
            "name": "skills_manifest_integrity",
            "status": "ok"
          },
          {
            "category": "skill",
            "details": {
              "drifted": [],
              "new": [
                "academic-verify",
                "archive-crawler",
                "article-enrichment",
                "ask-user",
                "blog-ingest",
                "book-mirror",
                "brain-ingest-gate",
                "brain-link-discipline",
                "brain-ops",
                "brain-pdf",
                "brain-taxonomist",
                "briefing",
                "bulk-ingestion",
                "capture",
                "chat-connectors",
                "citation-fixer",
                "citation-graph-ingest",
                "cold-start",
                "company-brainify",
                "concept-synthesis",
                "context-audit",
                "conversation-archive",
                "correction-pipeline",
                "cron-scheduler",
                "cross-modal-review",
                "daily-task-manager",
                "daily-task-prep",
                "data-loss-gate",
                "data-research",
                "draft-in-voice",
                "eiirp",
                "enrich",
                "fact-check",
                "functional-area-resolver",
                "gbrain-advisor",
                "google-loops",
                "idea-ingest",
                "idea-lineage",
                "ingest",
                "maintain",
                "mcp-access",
                "measure-before-you-fix",
                "media-ingest",
                "meeting-ingestion",
                "minion-orchestrator",
                "perplexity-research",
                "publish",
                "query",
                "repo-architecture",
                "reports",
                "research-compendium",
                "resolve-before-asking",
                "signal-detector",
                "skill-autobench",
                "skill-creator",
                "skillify",
                "skillpack-check",
                "skillpack-harvest",
                "soul-audit",
                "storage-manifest",
                "strategic-reading",
                "testing",
                "two-tier-extraction",
                "voice-note-ingest",
                "webhook-transforms"
              ]
            },
            "elapsed_ms": "<volatile>",
            "fix_unavailable_reason": "unstructured",
            "message": "65 new built-in skill(s) available that this workspace hasn't installed: academic-verify, archive-crawler, article-enrichment, ask-user, blog-ingest, book-mirror, brain-ingest-gate, brain-link-discipline, … +57 more. Add them with `gbrain skillpack sync`.",
            "name": "skill_currency",
            "status": "warn"
          },
          {
            "category": "skill",
            "elapsed_ms": "<volatile>",
            "message": "no installed skills declare preconditions",
            "name": "skill_preconditions",
            "status": "ok"
          },
          {
            "category": "skill",
            "details": {
              "scope": "managed",
              "totals": {
                "bytes": 100,
                "drift": 0,
                "invocations": 0,
                "size": 0,
                "skills": 1,
                "subcommands_unverified": 0
              }
            },
            "elapsed_ms": "<volatile>",
            "message": "1 skill(s), 0 KB, 0 gbrain invocation(s) (0 with undeclared subcommands, flags checked); no findings",
            "name": "skill_health",
            "status": "ok"
          },
          {
            "category": "ops",
            "details": {
              "enabled": false,
              "out_of_band_settable": true,
              "reason": "disabled"
            },
            "elapsed_ms": "<volatile>",
            "message": "memorable relay off (default)",
            "name": "memorable_relay_health",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "audience": "personal",
              "audience_reasons": [
                "no shared declaration; 0 non-automation client(s) active in 30d"
              ],
              "backstop_visibility": "private",
              "capture_lanes": {
                "compact": "extract",
                "session_end": "extract",
                "writeback": "retire"
              },
              "corpus_source_holds": {
                "legacy_unstamped": 0,
                "sessions": 0,
                "unresolved": 0
              },
              "counters_note": "local, append-only, loss-tolerant observability over the last 7d — never a source of truth",
              "cross_lane_duplicates_7d": 0,
              "instruction_visibility": "world",
              "mode": "off",
              "mode_valid": true,
              "near_duplicates_shadow_7d": 0,
              "nudge_shown": false,
              "transient_ttl": "3d",
              "ttl_valid": true,
              "visibility_note": "world = readable by agents authorized on THIS brain, not the public internet"
            },
            "elapsed_ms": "<volatile>",
            "message": "ambient writeback off (default): Stop-hook turn capture is off, but the compaction harvest and SessionEnd transcripts still extract (installing the harness hooks opted into them; stop them: gbrain config set memory.auto_writeback off). Enable: gbrain config set memory.auto_writeback salient",
            "name": "memory_writeback",
            "status": "ok"
          },
          {
            "category": "ops",
            "elapsed_ms": "<volatile>",
            "message": "No chat connectors configured (optional).",
            "name": "connectors",
            "status": "ok"
          },
          {
            "category": "ops",
            "details": {
              "breaker_enabled": true,
              "count_exact": true,
              "inspected_keys": 0,
              "keys": [],
              "threshold": 3
            },
            "elapsed_ms": "<volatile>",
            "message": "No dream key died 3+ times in 24h",
            "name": "dream_paid_loop",
            "status": "ok"
          },
          {
            "category": "meta",
            "details": {
              "pending_fresh_install": [
                "0.11.0",
                "0.14.0",
                "0.22.4",
                "0.28.0",
                "0.53.0"
              ]
            },
            "elapsed_ms": "<volatile>",
            "fix": {
              "actor": "agent",
              "argv": [
                "gbrain",
                "apply-migrations",
                "--yes",
                "--no-autopilot-install"
              ],
              "command": "gbrain apply-migrations --yes --no-autopilot-install",
              "consent": [],
              "next": "run",
              "requires_exclusive": true,
              "verify": {
                "argv": [
                  "gbrain",
                  "doctor",
                  "--only",
                  "minions_migration",
                  "--json",
                  "--brain",
                  "host"
                ]
              },
              "why": "Runs the setup migrations gbrain init left pending (preferences, host-work notes, shared-skill checkpoints) on the brain host, without installing background services."
            },
            "message": "5 setup migration(s) not run yet on this new brain (pending_fresh_install: 0.11.0, 0.14.0, 0.22.4, 0.28.0, 0.53.0). Expected after gbrain init, not a failed upgrade.",
            "name": "minions_migration",
            "severity": "info",
            "status": "ok"
          },
          {
            "category": "ops",
            "elapsed_ms": "<volatile>",
            "message": "mode=notify; channel=stable (config)",
            "name": "self_upgrade_health",
            "status": "ok"
          },
          {
            "category": "ops",
            "elapsed_ms": "<volatile>",
            "message": "Bun <bun-version> (minimum 1.4.4)",
            "name": "bun_runtime",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "message": "disabled (opt-in). Enable with: gbrain config set autopilot.nightly_quality_probe.enabled true",
            "name": "nightly_quality_probe_health",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "kinds": [],
              "schema_version": 1
            },
            "elapsed_ms": "<volatile>",
            "message": "no extractions in last 7 days",
            "name": "extract_health",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "message": "disabled (opt-in). Enable with: gbrain config set cycle.conversation_facts_backfill.enabled true",
            "name": "conversation_facts_backlog",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "backlog": 0,
              "known_approximation": "page backlog only; transcript corpus not counted",
              "pack_declares_phase": false
            },
            "elapsed_ms": "<volatile>",
            "message": "no pages awaiting atom extraction",
            "name": "extract_atoms_backlog",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "body_unchanged": 0,
              "drift_pct": 0,
              "drifted": 0,
              "slug_unbound": 0,
              "source_changed": 0,
              "source_gone": 0,
              "total_atoms": 0
            },
            "elapsed_ms": "<volatile>",
            "message": "no atoms to check",
            "name": "atom_provenance_drift",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "message": "No conversation-type pages — coverage check not applicable",
            "name": "conversation_format_coverage",
            "status": "ok"
          },
          {
            "category": "ops",
            "elapsed_ms": "<volatile>",
            "message": "No progressive-batch operations in the last 7 days",
            "name": "progressive_batch_audit_health",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "message": "disabled (opt-in; default-on only for search.mode=tokenmax). Enable with: `gbrain config set autopilot.conversation_parser_probe.enabled true`",
            "name": "conversation_parser_probe_health",
            "status": "ok"
          },
          {
            "category": "ops",
            "elapsed_ms": "<volatile>",
            "message": "gbrain home is outside any enclosing git worktree.",
            "name": "home_dir_in_worktree",
            "status": "ok"
          },
          {
            "category": "ops",
            "elapsed_ms": "<volatile>",
            "message": "No abandoned PGLite store under the gbrain home (engine: postgres).",
            "name": "pglite_leftovers",
            "status": "ok"
          },
          {
            "category": "meta",
            "elapsed_ms": "<volatile>",
            "message": "default source local_path is set: <home>/.gbrain/content/<uuid>/default",
            "name": "default_source_local_path",
            "status": "ok"
          },
          {
            "category": "meta",
            "details": {
              "docs": "docs/guides/troubleshooting.md#not-verified-doctor-checks",
              "git_root_skipped": [],
              "limit": 10000,
              "timeout_ms": "<volatile>",
              "unreadable_sources": [],
              "walk_truncated": false
            },
            "elapsed_ms": "<volatile>",
            "message": "No cross-source slug drift detected.",
            "name": "multi_source_drift",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "docs": "docs/guides/repair.md#embedding-key-source",
              "embedding_key": {
                "config_key": "voyage_api_key",
                "kind": "missing",
                "variable": "VOYAGE_API_KEY"
              },
              "embedding_model": "voyage:voyage-4",
              "shadows": []
            },
            "elapsed_ms": "<volatile>",
            "message": "No embedding key is set here (VOYAGE_API_KEY or voyage_api_key). No environment variable overrides a different config-plane provider key. This check sees only the environment `gbrain doctor` runs in; a daemon (gbrain serve, autopilot) has its own, and reports a mismatch in its log with a startup warning or embedding_auth_failed.",
            "name": "embedding_key_source",
            "status": "ok"
          },
          {
            "category": "ops",
            "details": {
              "decision": null,
              "provider_env": []
            },
            "elapsed_ms": "<volatile>",
            "message": "No gbrain setup receipt records a provider-use decision for this install; provider calls follow the configured keys.",
            "name": "provider_consent",
            "readiness_state": "not_applicable",
            "severity": "info",
            "status": "ok"
          },
          {
            "category": "ops",
            "details": {
              "reason": "no_harness_detected"
            },
            "elapsed_ms": "<volatile>",
            "fix": {
              "actor": "user",
              "consent": [
                "persistent_install"
              ],
              "docs": "https://github.com/garrytan/gbrain/blob/master/docs/protocol/MEMORY_VERBS_v1.md#install-the-4-command-quickstart",
              "next": "report",
              "requires_exclusive": false,
              "user_message": "Which agent app should get gbrain memory? The install guide has a one-line command for each.",
              "why": "For Claude Code or Codex, run `gbrain setup claude-code` or `gbrain setup codex` (it registers serve behind gbrain's launcher, so the session directory's bunfig.toml and .env never load). For any other host, register `<absolute path to gbrain> serve --surface starter --advertise verbs` as a stdio MCP server in your agent host; the install section lists the exact command per harness (Claude Code, Codex, Grok Build, opencode, OpenClaw)."
            },
            "message": "No agent harness was detected. Wire one when the user picks an agent app.",
            "name": "harness_wiring",
            "readiness_state": "missing",
            "severity": "info",
            "status": "ok"
          },
          {
            "category": "meta",
            "details": {
              "consent_refused": 0,
              "derived_cap_exhausted": 0,
              "events": 0,
              "internal_errors": 0,
              "json_document_missing": 0,
              "window_days": 7
            },
            "elapsed_ms": "<volatile>",
            "message": "No agent dead ends in the last 7 days (0 non-success event(s) logged).",
            "name": "agent_contract",
            "status": "ok"
          },
          {
            "category": "ops",
            "elapsed_ms": "<volatile>",
            "message": "Connected, 20 pages",
            "name": "connection",
            "status": "ok"
          },
          {
            "category": "ops",
            "details": {
              "background_pause_pct": 80,
              "commands": [],
              "docs": "docs/guides/concurrent-writes.md#quota-near-exhaustion",
              "exact": true,
              "forecast": {
                "retention_days": 30,
                "rows": [],
                "table_bytes": "<volatile>",
                "thresholds": {
                  "fail_days": 7,
                  "fail_pct": 95,
                  "warn_days": 30,
                  "warn_pct": 80
                },
                "window_days": 1
              },
              "housekeeping": {
                "compactable_bytes": null,
                "explicit_retention_days": null,
                "over_target": false,
                "target_bytes": 8589934592,
                "used_bytes": 200716
              },
              "inspected": 2,
              "outstanding": [],
              "paused_producers": [],
              "resources": [],
              "truncated": false,
              "verify": "gbrain doctor --only persistence_capacity --json"
            },
            "elapsed_ms": "<volatile>",
            "message": "No cumulative write cap is set (the default), so receipt storage never refuses or pauses a write; it holds 200716 reserved bytes, and receipts not yet compacted are under the housekeeping target of 8589934592.",
            "name": "persistence_capacity",
            "status": "ok"
          },
          {
            "category": "ops",
            "details": {
              "active_blockers": [],
              "config": {
                "receipt_retention_days": 30,
                "spike_factor": {
                  "key": "persistence.terminal_failures.spike_factor",
                  "value": 3
                },
                "spike_min": {
                  "key": "persistence.terminal_failures.spike_min",
                  "value": 25
                },
                "window_clamped": false,
                "window_days": {
                  "key": "persistence.terminal_failures.window_days",
                  "value": 7
                }
              },
              "count": 0,
              "defects": [],
              "docs": "docs/guides/troubleshooting.md#terminal-write-failures",
              "historical_rows": 0,
              "new_last_24h": 0,
              "ranked": {
                "blocking": [],
                "historical": {
                  "rows": 0
                },
                "unresolved": {
                  "group_by": [],
                  "groups": [],
                  "pages": 0,
                  "rows": 0
                }
              },
              "sources": [],
              "spike": {
                "daily_7d": [
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0
                ],
                "last_24h": 0,
                "median_7d": 0,
                "spiking": false
              },
              "unresolved": {
                "distinct_intents": 0,
                "distinct_slugs": 0,
                "oldest_age_seconds": "<volatile>",
                "rows": 0
              },
              "window_days": 7
            },
            "elapsed_ms": "<volatile>",
            "message": "No terminal write failures in the last 7 d.",
            "name": "persistence_terminal_failures",
            "status": "ok"
          },
          {
            "category": "ops",
            "details": {
              "count": 0,
              "docs": "docs/guides/troubleshooting.md#managed-sync-not-moving",
              "parked": 0,
              "sources": [],
              "stranded": 0
            },
            "elapsed_ms": "<volatile>",
            "message": "No managed sync is pending.",
            "name": "managed_sync_not_moving",
            "status": "ok"
          },
          {
            "category": "ops",
            "elapsed_ms": "<volatile>",
            "message": "No managed sync run is blocked.",
            "name": "managed_sync_blocked",
            "status": "ok"
          },
          {
            "category": "ops",
            "details": {
              "age_seconds": null,
              "docs": "docs/guides/error-codes.md#sync_admission_restricted",
              "set_at": null,
              "stored": null,
              "value": "normal"
            },
            "elapsed_ms": "<volatile>",
            "message": "sync.admission is normal: managed sync admits everything it classifies.",
            "name": "sync_admission_restricted",
            "status": "ok"
          },
          {
            "category": "ops",
            "details": {
              "docs": "docs/guides/repair.md#receipt-compaction",
              "last_compaction": {
                "at": "<ts>",
                "compacted": 0,
                "early": 0,
                "freed_bytes": 0,
                "host_id": "<uuid>",
                "skipped_by_reason": {}
              },
              "last_compaction_age_hours": 0,
              "live_consumers": 0,
              "stale_hours": 24
            },
            "elapsed_ms": "<volatile>",
            "message": "Receipt compaction last ran 0 hour(s) ago (compacted 0, freed 0 bytes).",
            "name": "persistence_compaction",
            "status": "ok"
          },
          {
            "category": "ops",
            "details": {
              "by_day": [
                {
                  "content_decisions": 0,
                  "day": "<soak-day>",
                  "interventions": 1
                }
              ],
              "content_decisions": {
                "file_drift_apply": 0,
                "file_drift_hold": 0,
                "total": 0
              },
              "docs": "docs/guides/sync-unblock-runbook.md#soak-counters",
              "interventions": {
                "needs_human": 1,
                "repair_apply": 0,
                "retry_held": 0,
                "sync_non_plain": 0,
                "total": 1,
                "unblock_apply": 0
              },
              "since": "<ts>",
              "window_days": 7
            },
            "elapsed_ms": "<volatile>",
            "message": "Last 7 days: 1 managed-sync intervention(s) (needs_human 1), 0 content decision(s).",
            "name": "sync_soak_counters",
            "severity": "info",
            "status": "ok"
          },
          {
            "category": "ops",
            "details": {
              "count": 0,
              "docs": "docs/guides/troubleshooting.md#serve-build-drift",
              "newer": [],
              "older": [],
              "owner": null,
              "this_version": "<version>"
            },
            "elapsed_ms": "<volatile>",
            "message": "No live gbrain consumer on this host writes a heartbeat row. A serve that predates heartbeats writes none; consumers_without_heartbeat names it when it holds claims.",
            "name": "serve_build_drift",
            "status": "ok"
          },
          {
            "category": "meta",
            "details": {
              "code": "page_type_undeclared",
              "docs": "docs/architecture/schema-packs.md#undeclared-page-types",
              "per_source": [
                {
                  "pack": "gbrain-base-v2",
                  "source_id": "notes",
                  "total": 19,
                  "undeclared": 1,
                  "undeclared_types": [
                    {
                      "count": 1,
                      "type": "2024"
                    }
                  ],
                  "untyped": 0
                },
                {
                  "pack": "gbrain-base-v2",
                  "source_id": "plain",
                  "total": 1,
                  "undeclared": 0,
                  "undeclared_types": [],
                  "untyped": 0
                }
              ],
              "unresolved_sources": []
            },
            "elapsed_ms": "<volatile>",
            "fix_unavailable_reason": "unstructured",
            "message": "Source `notes`: 1 page(s) use 1 type(s) pack `gbrain-base-v2` neither declares nor aliases: '2024' (1). List them with `gbrain schema review-orphans --source notes`, then declare the type (`gbrain schema add-type <type>`, which takes its primitive and prefix) or retype the pages to a declared type.",
            "name": "schema_pack_consistency",
            "status": "warn"
          },
          {
            "category": "brain",
            "details": {
              "active_column": "embedding",
              "basis": "exact",
              "counts": {
                "chunkless_healable": 0,
                "deleted_page_chunks": 0,
                "embedded": 0,
                "empty": 1,
                "keyword_only": 0,
                "pending": 23,
                "quarantined": 0
              },
              "coverage": {
                "basis": "exact",
                "eligible": 23,
                "embedded": 0,
                "ratio": 0
              },
              "covering_index": null,
              "deleted_page_chunks": {
                "held": 0,
                "past_window": 0,
                "purgeable": 0,
                "window_hours": 72,
                "within_window": 0
              },
              "embeddings_enabled": false,
              "exact": true,
              "keyword_only": {
                "marker_bytes": 0,
                "pages": 0,
                "reason": "embed_skip",
                "threshold_bytes": 25165824
              },
              "mode": "full",
              "omitted_states": [],
              "reason": "embeddings_disabled",
              "status": "known",
              "units": "content_chunks rows, plus one unit per page with no chunk rows",
              "unsearchable": 1,
              "unsearchable_complete": true,
              "unstamped_pending": {
                "count": 0,
                "created_at_lower_bound": null,
                "writer_version": "<version>"
              }
            },
            "elapsed_ms": "<volatile>",
            "fix": {
              "actor": "user",
              "argv": [
                "gbrain",
                "init",
                "--force",
                "--embedding-model",
                "voyage:voyage-4",
                "--embedding-dimensions",
                "1024"
              ],
              "command": "gbrain init --force --embedding-model voyage:voyage-4 --embedding-dimensions 1024",
              "consent": [
                "credentials",
                "paid"
              ],
              "docs": "https://github.com/garrytan/gbrain/blob/master/docs/guides/search-modes.md",
              "inputs": [
                {
                  "how": "Ask the user for an API key for Voyage AI; store it with `gbrain config set voyage_api_key <key>` (every gbrain process reads it), or export VOYAGE_API_KEY in the environment of every gbrain process. Then run the command.",
                  "name": "VOYAGE_API_KEY"
                }
              ],
              "next": "tell_user_to_run",
              "requires_exclusive": true,
              "user_message": "Semantic search needs an embedding API key. Voyage AI works with this brain; if you add a key (VOYAGE_API_KEY), I can turn it on. Embedding costs a little per page; your notes and facts stay as they are.",
              "verify": {
                "argv": [
                  "gbrain",
                  "doctor",
                  "--only",
                  "embeddings",
                  "--json",
                  "--brain",
                  "host"
                ]
              },
              "why": "Embeddings are off, so search is keyword-only, and no configured embedding key fits this brain. Once the key is set this turns on voyage:voyage-4 (1024d) for this Postgres brain. Pages, facts and keyword search are kept; existing chunks and facts are queued for vectors, which `gbrain embed --stale` (or the next maintenance cycle) fills."
            },
            "message": "Embedding state (exact, column 'embedding'): 0 embedded, 23 pending, 0 keyword-only, 0 quarantined, 1 empty, 0 on deleted pages, 0 chunkless (healable); 1 unsearchable. Embeddings are disabled by choice: keyword search reads the pending chunks.",
            "name": "embedding_state",
            "readiness_state": "disabled_by_choice",
            "severity": "info",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "message": "Extraction lag not applicable (20 pages — too few to assess); 1 page(s) pending link extraction (gbrain extract --stale finishes them)",
            "name": "links_extraction_lag",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "message": "No large page has chunks waiting for embedding approval (held or capped by embed.max_usd_per_page).",
            "name": "partial_embedding",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "docs": "docs/guides/resolve-paths.md#synced-but-not-searchable",
              "sources": [
                {
                  "after_seconds": 300,
                  "by_state": {},
                  "checked": 0,
                  "complete": true,
                  "gaps": 0,
                  "pages": [],
                  "source_id": "default",
                  "status": "ok",
                  "window_hours": 24
                },
                {
                  "after_seconds": 300,
                  "by_state": {},
                  "checked": 0,
                  "complete": true,
                  "gaps": 0,
                  "pages": [],
                  "source_id": "notes",
                  "status": "ok",
                  "window_hours": 24
                },
                {
                  "after_seconds": 300,
                  "by_state": {},
                  "checked": 0,
                  "complete": true,
                  "gaps": 0,
                  "pages": [],
                  "source_id": "plain",
                  "status": "ok",
                  "window_hours": 24
                }
              ]
            },
            "elapsed_ms": "<volatile>",
            "message": "Every page managed sync committed past its freshness target in the last 24 h is searchable.",
            "name": "sync_landing_gaps",
            "status": "ok"
          },
          {
            "category": "ops",
            "elapsed_ms": "<volatile>",
            "message": "Extension installed",
            "name": "pgvector",
            "status": "ok"
          },
          {
            "category": "ops",
            "elapsed_ms": "<volatile>",
            "message": "Postgres driver supports safe query cancellation.",
            "name": "postgres_cancellation_driver",
            "status": "ok"
          },
          {
            "category": "meta",
            "elapsed_ms": "<volatile>",
            "message": "pages has the UNIQUE(source_id, slug) upsert arbiter",
            "name": "pages_upsert_arbiter",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "archived": 0,
              "as_of": "<ts>+00",
              "failed": 0,
              "ocr_required": 0,
              "oldest_age_seconds": "<volatile>",
              "pending": 1,
              "protected": 0,
              "readiness": "projection_pending",
              "ready": false,
              "reimport": 0,
              "sealable": 0,
              "sealable_with_visual": 0
            },
            "elapsed_ms": "<volatile>",
            "fix": {
              "actor": "agent",
              "argv": [
                "gbrain",
                "projections",
                "drain",
                "--limit",
                "4800",
                "--brain",
                "host"
              ],
              "command": "gbrain projections drain --limit 4800 --brain host",
              "consent": [],
              "docs": "https://github.com/garrytan/gbrain/blob/master/docs/guides/repair.md#projection-drain",
              "next": "run",
              "preview_argv": [
                "gbrain",
                "projections",
                "drain",
                "--dry-run",
                "--json",
                "--brain",
                "host"
              ],
              "requires_exclusive": false,
              "verify": {
                "argv": [
                  "gbrain",
                  "projections",
                  "drain",
                  "--dry-run",
                  "--json",
                  "--brain",
                  "host"
                ]
              },
              "why": "Rebuilds queued Markdown and code projections and seals importer-attested image pages in place, at most 4800 pages per run; repeat until the dry run shows sealable 0."
            },
            "message": "Visible pages have missing or stale text projections (1 queued Markdown/code page(s)); search and code results may be incomplete. Run `gbrain projections drain` to rebuild queued Markdown and code projections now; it is safe while `gbrain serve` runs on Postgres. For code metadata repair, run `gbrain reindex-code --force --no-embed`. If work stays pending, inspect the recorded source path. No repair or embedding was started by this check.",
            "name": "text_projection_readiness",
            "status": "warn"
          },
          {
            "category": "ops",
            "details": {
              "docs": "docs/guides/concurrent-writes.md#counter-drift",
              "drift": [],
              "inspected": 2,
              "true_up_clamped": 0
            },
            "elapsed_ms": "<volatile>",
            "message": "Receipt-bytes counters match the receipts they account for (2 scope(s)).",
            "name": "persistence_counter_drift",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "effects": [],
              "exact": true,
              "git_push_holds": [],
              "inspected": 0,
              "parked_effects": 0,
              "parked_groups": [],
              "truncated": false
            },
            "elapsed_ms": "<volatile>",
            "message": "No Git or withdrawal effect is parked.",
            "name": "parked_effects",
            "status": "ok"
          },
          {
            "category": "ops",
            "details": {
              "refreshes": []
            },
            "elapsed_ms": "<volatile>",
            "message": "No worktree refresh is stuck.",
            "name": "worktree_refresh_stuck",
            "status": "ok"
          },
          {
            "category": "ops",
            "details": {
              "columns": [],
              "extra_columns": [],
              "page_child_source_columns": [],
              "runbook": "docs/guides/write-refusals.md#managed-guard-page-children"
            },
            "elapsed_ms": "<volatile>",
            "message": "Guarded tables carry only the columns gbrain creates.",
            "name": "managed_guard_schema_drift",
            "status": "ok"
          },
          {
            "category": "ops",
            "details": {
              "guard_refusals": 0,
              "runbook": "docs/guides/write-refusals.md#managed-guard-page-children",
              "trigger_refusals": 0,
              "unclassified_p0001": 0,
              "window_days": 7
            },
            "elapsed_ms": "<volatile>",
            "message": "No write was refused by a database guard in the last 7 days.",
            "name": "publication_refusals",
            "status": "ok"
          },
          {
            "category": "meta",
            "elapsed_ms": "<volatile>",
            "message": "links_link_source_check has the v114 kebab-case gate",
            "name": "links_link_source_check",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "alias_pages_without_visibility": 0,
              "count": "exact",
              "fact_ids_truncated": false,
              "looser_atoms": 0,
              "looser_concepts": 0,
              "looser_events": 0,
              "remotely_readable_fact_ids": [],
              "repair": "visibility",
              "truncated": false,
              "unstamped_atoms": 0,
              "unstamped_concepts": 0,
              "world_facts_from_private_sources": 0,
              "world_facts_remotely_readable": 0
            },
            "elapsed_ms": "<volatile>",
            "message": "Every derived page and fact carries a visibility no looser than its source, and no page relies on a privacy alias alone.",
            "name": "derived_visibility",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "docs": "docs/designs/GIT_CANONICAL_MEMORY.md#the-model",
              "sources": [],
              "warn_seconds": 900
            },
            "elapsed_ms": "<volatile>",
            "message": "No source is strict (git-canonical), so no index trails a commit.",
            "name": "git_index_lag",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "docs": "docs/designs/GIT_CANONICAL_MEMORY.md#the-git-gap-census",
              "errors": [],
              "informational": true,
              "newest": 800,
              "partial_sources": [],
              "sources": [
                {
                  "complete": true,
                  "declared": {
                    "alias_private": 0,
                    "database_only": 0,
                    "database_only_source": 0,
                    "db_only_prefix": 0,
                    "derive_folder": 0,
                    "git_ignored": 0,
                    "lineage_private": 0,
                    "mirror_source": 0,
                    "private": 0
                  },
                  "live_pages": 19,
                  "newest": 800,
                  "newest_since": "<ts>",
                  "pages": 19,
                  "source_id": "notes",
                  "states": {
                    "database_ahead": 4,
                    "declared_database_only": 0,
                    "equal": 11,
                    "git_ahead": 0,
                    "undeclared_database_only": 0,
                    "unparseable": 4,
                    "unsafe_path": 0,
                    "worktree_only": 0
                  },
                  "worktree": {
                    "absent": 0,
                    "clean": 18,
                    "deleted": 0,
                    "modified": 1,
                    "untracked": 0
                  }
                }
              ],
              "sources_without_git_checkout": 2,
              "timeout_ms": "<volatile>"
            },
            "elapsed_ms": "<volatile>",
            "message": "Informational, nothing to do: the database compared with the commit at HEAD, per source with a Git checkout. notes: 19 live page(s), 11 equal, 4 database_ahead, 4 unparseable. Page detail: gbrain sources git-gap <source-id>.",
            "name": "db_ahead_of_git",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "docs": "docs/guides/repair.md#facts-home",
              "sources": []
            },
            "elapsed_ms": "<volatile>",
            "message": "No source is strict (git-canonical), so no fact is required to have a Git home.",
            "name": "strict_facts_outside_git",
            "status": "ok"
          },
          {
            "category": "ops",
            "details": {
              "count": 0,
              "docs": "docs/guides/troubleshooting.md#owner-host-stale",
              "stale": [],
              "stale_after_ms": "<volatile>"
            },
            "elapsed_ms": "<volatile>",
            "message": "No managed write is waiting on an owner host.",
            "name": "owner_host_stale",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "by_source": [
                {
                  "checked": 0,
                  "other_writer": 0,
                  "source_id": "default",
                  "status": "known",
                  "sync_deleted": 0,
                  "tombstones": 0,
                  "truncated": false,
                  "unknown": 0
                },
                {
                  "checked": 0,
                  "other_writer": 0,
                  "source_id": "notes",
                  "status": "known",
                  "sync_deleted": 0,
                  "tombstones": 0,
                  "truncated": false,
                  "unknown": 0
                },
                {
                  "checked": 0,
                  "other_writer": 0,
                  "source_id": "plain",
                  "status": "known",
                  "sync_deleted": 0,
                  "tombstones": 0,
                  "truncated": false,
                  "unknown": 0
                }
              ],
              "count": 0,
              "docs": "docs/guides/repair.md#uncommitted-deletions",
              "exact": true,
              "other_writer_count": 0,
              "purged": "Pages already purged cannot be restored by this command; only a backup (pg_dump, or gbrain backup create taken before the purge) can bring them back.",
              "samples": [],
              "truncated": false
            },
            "elapsed_ms": "<volatile>",
            "message": "No soft-deleted page was removed by a sync while Git never held its file (0 tombstone(s) checked).",
            "name": "uncommitted_sync_deletions",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "message": "Not applicable: no page names readers and no member exists.",
            "name": "access_readers_malformed",
            "readiness_state": "not_applicable",
            "severity": "info",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "message": "Not applicable: no page names readers and no member exists.",
            "name": "access_unknown_readers",
            "readiness_state": "not_applicable",
            "severity": "info",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "message": "Not applicable: no page names readers and no member exists.",
            "name": "access_recent_narrowings",
            "readiness_state": "not_applicable",
            "severity": "info",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "message": "Not applicable: no page names readers and no member exists.",
            "name": "access_page_readers_backfill",
            "readiness_state": "not_applicable",
            "severity": "info",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "message": "Not applicable: no source has a folder rule.",
            "name": "access_policy_pending",
            "readiness_state": "not_applicable",
            "severity": "info",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "message": "Not applicable: no source has a folder rule.",
            "name": "access_policy_widening_held",
            "readiness_state": "not_applicable",
            "severity": "info",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "message": "Not applicable: no source has a folder rule.",
            "name": "access_policy_invalid",
            "readiness_state": "not_applicable",
            "severity": "info",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "message": "Not applicable: no source has a folder rule.",
            "name": "access_policy_store_mismatch",
            "readiness_state": "not_applicable",
            "severity": "info",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "message": "Not applicable: this brain serves one person (fewer than two enabled members and no access.serves = several).",
            "name": "unlabeled_people_folders",
            "readiness_state": "not_applicable",
            "severity": "info",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "message": "Not applicable: this brain serves one person, so its own keys read its own pages.",
            "name": "open_shared_pages",
            "readiness_state": "not_applicable",
            "severity": "info",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "message": "Not applicable: this brain serves one person (fewer than two enabled members and no access.serves = several).",
            "name": "unscoped_shared_reads",
            "readiness_state": "not_applicable",
            "severity": "info",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "message": "Not applicable: config mcp.stdio_member is unset, so no stdio session on this host reads as a member.",
            "name": "shared_stdio_binding",
            "readiness_state": "not_applicable",
            "severity": "info",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "message": "Not applicable: no page names readers and no member exists.",
            "name": "access_may_act_for_wildcard",
            "readiness_state": "not_applicable",
            "severity": "info",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "message": "Not applicable: the owner opt-in (access.owner_reads_restricted) is off; the owner reads a page that names readers or sits under a rule only when listed.",
            "name": "access_owner_reads_restricted",
            "readiness_state": "not_applicable",
            "severity": "info",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "message": "Not applicable: every folder and page rule also keeps the pages and facts derived from its pages to its readers (no rule has covers_derived: false).",
            "name": "access_raw_only_rules",
            "readiness_state": "not_applicable",
            "severity": "info",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "message": "Not applicable: no member is marked as an audience (gbrain access member kind <id> audience).",
            "name": "access_audience_members",
            "readiness_state": "not_applicable",
            "severity": "info",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "message": "Not applicable: access.members_read_lineage is off; derived pages and facts of a page that names readers or sits under a rule are hidden from every member but the owner.",
            "name": "access_members_read_lineage",
            "readiness_state": "not_applicable",
            "severity": "info",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "message": "Not applicable: no member is labelled-only (gbrain access member labelled-only <id> on).",
            "name": "access_labelled_only_members",
            "readiness_state": "not_applicable",
            "severity": "info",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "message": "Not applicable: no attest credential reads named sources as the person (--attest-read person).",
            "name": "attest_read_shared_scope",
            "readiness_state": "not_applicable",
            "severity": "info",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "message": "Not applicable: this brain has no guest source (gbrain guests init).",
            "name": "guest_source",
            "readiness_state": "not_applicable",
            "severity": "info",
            "status": "ok"
          },
          {
            "category": "ops",
            "elapsed_ms": "<volatile>",
            "message": "RLS enabled on 185/185 public tables",
            "name": "rls",
            "status": "ok"
          },
          {
            "category": "ops",
            "elapsed_ms": "<volatile>",
            "message": "The Postgres host is on this machine; TLS is not required.",
            "name": "postgres_tls",
            "status": "ok"
          },
          {
            "category": "ops",
            "elapsed_ms": "<volatile>",
            "message": "Every gbrain function that pins a search_path ends it with pg_temp",
            "name": "function_search_path",
            "status": "ok"
          },
          {
            "category": "ops",
            "elapsed_ms": "<volatile>",
            "message": "Every purge and withdrawal guard refuses a write role that row-level security keeps from its ledger",
            "name": "guard_ledger_checks",
            "status": "ok"
          },
          {
            "category": "ops",
            "elapsed_ms": "<volatile>",
            "message": "The database encoding is UTF8",
            "name": "database_encoding",
            "status": "ok"
          },
          {
            "category": "meta",
            "elapsed_ms": "<volatile>",
            "message": "Version <latest> (latest: <latest>)",
            "name": "schema_version",
            "status": "ok"
          },
          {
            "category": "meta",
            "elapsed_ms": "<volatile>",
            "message": "1399 column(s) verified against live schema",
            "name": "schema_columns",
            "status": "ok"
          },
          {
            "category": "meta",
            "elapsed_ms": "<volatile>",
            "message": "All 185 table(s) the applied migrations create exist.",
            "name": "schema_missing_tables",
            "status": "ok"
          },
          {
            "category": "meta",
            "elapsed_ms": "<volatile>",
            "message": "Every function this gbrain's schema defines has its body",
            "name": "schema_function_bodies",
            "status": "ok"
          },
          {
            "category": "ops",
            "elapsed_ms": "<volatile>",
            "message": "Auto-RLS event trigger installed",
            "name": "rls_event_trigger",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "fix": {
              "actor": "user",
              "argv": [
                "gbrain",
                "init",
                "--force",
                "--embedding-model",
                "voyage:voyage-4",
                "--embedding-dimensions",
                "1024"
              ],
              "command": "gbrain init --force --embedding-model voyage:voyage-4 --embedding-dimensions 1024",
              "consent": [
                "credentials",
                "paid"
              ],
              "docs": "https://github.com/garrytan/gbrain/blob/master/docs/guides/search-modes.md",
              "inputs": [
                {
                  "how": "Ask the user for an API key for Voyage AI; store it with `gbrain config set voyage_api_key <key>` (every gbrain process reads it), or export VOYAGE_API_KEY in the environment of every gbrain process. Then run the command.",
                  "name": "VOYAGE_API_KEY"
                }
              ],
              "next": "tell_user_to_run",
              "requires_exclusive": true,
              "user_message": "Semantic search needs an embedding API key. Voyage AI works with this brain; if you add a key (VOYAGE_API_KEY), I can turn it on. Embedding costs a little per page; your notes and facts stay as they are.",
              "verify": {
                "argv": [
                  "gbrain",
                  "doctor",
                  "--only",
                  "embeddings",
                  "--json",
                  "--brain",
                  "host"
                ]
              },
              "why": "Embeddings are off, so search is keyword-only, and no configured embedding key fits this brain. Once the key is set this turns on voyage:voyage-4 (1024d) for this Postgres brain. Pages, facts and keyword search are kept; existing chunks and facts are queued for vectors, which `gbrain embed --stale` (or the next maintenance cycle) fills."
            },
            "message": "Not applicable: embeddings are disabled on this brain (keyword search keeps working).",
            "name": "embeddings",
            "readiness_state": "disabled_by_choice",
            "severity": "info",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "fix": {
              "actor": "user",
              "argv": [
                "gbrain",
                "init",
                "--force",
                "--embedding-model",
                "voyage:voyage-4",
                "--embedding-dimensions",
                "1024"
              ],
              "command": "gbrain init --force --embedding-model voyage:voyage-4 --embedding-dimensions 1024",
              "consent": [
                "credentials",
                "paid"
              ],
              "docs": "https://github.com/garrytan/gbrain/blob/master/docs/guides/search-modes.md",
              "inputs": [
                {
                  "how": "Ask the user for an API key for Voyage AI; store it with `gbrain config set voyage_api_key <key>` (every gbrain process reads it), or export VOYAGE_API_KEY in the environment of every gbrain process. Then run the command.",
                  "name": "VOYAGE_API_KEY"
                }
              ],
              "next": "tell_user_to_run",
              "requires_exclusive": true,
              "user_message": "Semantic search needs an embedding API key. Voyage AI works with this brain; if you add a key (VOYAGE_API_KEY), I can turn it on. Embedding costs a little per page; your notes and facts stay as they are.",
              "verify": {
                "argv": [
                  "gbrain",
                  "doctor",
                  "--only",
                  "embeddings",
                  "--json",
                  "--brain",
                  "host"
                ]
              },
              "why": "Embeddings are off, so search is keyword-only, and no configured embedding key fits this brain. Once the key is set this turns on voyage:voyage-4 (1024d) for this Postgres brain. Pages, facts and keyword search are kept; existing chunks and facts are queued for vectors, which `gbrain embed --stale` (or the next maintenance cycle) fills."
            },
            "message": "Not probed: embeddings are disabled on this brain by choice (keyword search keeps working).",
            "name": "embedding_provider",
            "readiness_state": "disabled_by_choice",
            "severity": "info",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "message": "Registry healthy: 1 columns (embedding_image) (all indexed); primary embeddings disabled",
            "name": "embedding_column_registry",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "message": "no embedding env overrides set",
            "name": "embedding_env_override",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "message": "no embedding migration in flight",
            "name": "embedding_migration_state",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "message": "The brain records its embedding model with its provider (voyage:voyage-4).",
            "name": "embedding_identity_unqualified",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "message": "Embeddings are off on this brain, so facts are only deduplicated by exact text; no supersession threshold applies.",
            "name": "supersession_calibration",
            "readiness_state": "not_applicable",
            "severity": "info",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "message": "Embeddings are off on this brain, so facts are admitted by keyword and named entity only; no cosine floor applies.",
            "name": "fact_admission_floors",
            "readiness_state": "not_applicable",
            "severity": "info",
            "status": "ok"
          },
          {
            "category": "ops",
            "elapsed_ms": "<volatile>",
            "message": "No chat_fallback_chain is set: every chat call uses only its own model.",
            "name": "chat_fallback_chain",
            "status": "ok"
          },
          {
            "category": "meta",
            "elapsed_ms": "<volatile>",
            "message": "Nothing to disclose: this brain is a fresh install at v<version>, after every disclosed behavior change, so the one-time behavior-change notice does not apply.",
            "name": "behavior_changes",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "message": "Only 2 eligible entity pages (< 5) — coverage ratio not meaningful at this scale",
            "name": "graph_coverage",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "fix": {
              "actor": "agent",
              "argv": [
                "gbrain",
                "doctor",
                "--remediation-plan",
                "--json",
                "--brain",
                "host"
              ],
              "command": "gbrain doctor --remediation-plan --json --brain host",
              "consent": [],
              "next": "run",
              "requires_exclusive": false,
              "verify": {
                "argv": [
                  "gbrain",
                  "doctor",
                  "--only",
                  "brain_score",
                  "--json",
                  "--brain",
                  "host"
                ]
              },
              "why": "The plan lists which steps raise each score component, what they cost and the reachable maximum; it changes nothing."
            },
            "message": "Brain score 20/100 (embed 0/35, links 0/25, timeline density (entity and event pages) 10/15, orphans 0/15, dead-links 10/10)",
            "name": "brain_score",
            "status": "warn"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "message": "Vacuous: 2 entity pages (<100). Orphan ratio not meaningful at this scale.",
            "name": "orphan_ratio",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "message": "No by-mention links in this brain.",
            "name": "stale_mentions",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "message": "No orphaned timeline rows across 4 page(s).",
            "name": "timeline_orphans",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "message": "No slug collisions across 3 source checkout(s).",
            "name": "slug_collisions",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "message": "Every live page stored in segments has segment rows that cover its whole body.",
            "name": "segmented_tiling",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "count": "exact",
              "kept_unrenderable_rows": 1,
              "materializable_rows": 2,
              "pages_affected": 2,
              "pages_inspected": 4,
              "repair": "timeline",
              "truncated": false
            },
            "elapsed_ms": "<volatile>",
            "fix": {
              "actor": "agent",
              "argv": [
                "gbrain",
                "repair",
                "timeline",
                "--brain",
                "host"
              ],
              "command": "gbrain repair timeline --brain host",
              "consent": [],
              "next": "run",
              "requires_exclusive": false,
              "verify": {
                "argv": [
                  "gbrain",
                  "doctor",
                  "--only",
                  "timeline_history",
                  "--json",
                  "--brain",
                  "host"
                ]
              },
              "why": "Previews the repair without changing anything and prints the exact apply command; applying rewrites stored records, so ask the user first."
            },
            "message": "2 timeline row(s) on 2 page(s) exist only in the database. Preview: gbrain repair timeline — apply: gbrain repair timeline --apply. 1 other row(s) cannot round-trip and are kept as-is.",
            "name": "timeline_history",
            "status": "warn"
          },
          {
            "category": "brain",
            "details": {
              "count": "exact",
              "pages": 0,
              "scan_cap": 100000,
              "truncated": false,
              "value_count": 0,
              "values": [],
              "values_truncated": false
            },
            "elapsed_ms": "<volatile>",
            "message": "No page relies on an access or confidentiality value gbrain does not recognize.",
            "name": "privacy_label_ignored",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "count": "exact",
              "kept_pages": 0,
              "pages_pending": 0,
              "repair": "safe-chunks",
              "truncated": false
            },
            "elapsed_ms": "<volatile>",
            "message": "Every re-sealable page is at the safe-chunk index version.",
            "name": "safe_index_pending",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "count": "exact",
              "kept_pages": 0,
              "pages_pending": 0,
              "truncated": false
            },
            "elapsed_ms": "<volatile>",
            "message": "No page waits for the credential-safe re-chunk.",
            "name": "credential_projection_pending",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "checkpoints": 0,
              "count": 0,
              "docs": "docs/guides/repair.md#connector-checkpoints",
              "repair": "connector-checkpoints",
              "retries": 0,
              "truncated": false
            },
            "elapsed_ms": "<volatile>",
            "message": "No orphan connector checkpoint rows older than 7 days.",
            "name": "connector_checkpoints",
            "status": "ok"
          },
          {
            "category": "ops",
            "details": {
              "command": "gbrain repair request-indexes --apply",
              "count": 0,
              "docs": "docs/guides/repair.md#request-indexes",
              "indexes": [
                {
                  "name": "persistence_requests_sync_run_open",
                  "state": "valid"
                },
                {
                  "name": "persistence_requests_sync_run_committed",
                  "state": "valid"
                },
                {
                  "name": "persistence_requests_slug_intent",
                  "state": "valid"
                },
                {
                  "name": "persistence_requests_request_id",
                  "state": "valid"
                },
                {
                  "name": "persistence_requests_foreground_committed",
                  "state": "valid"
                },
                {
                  "name": "persistence_requests_replay_id",
                  "state": "valid"
                },
                {
                  "name": "persistence_requests_slug_sequence",
                  "state": "valid"
                }
              ],
              "repair": "request-indexes"
            },
            "elapsed_ms": "<volatile>",
            "message": "Request-table indexes are valid.",
            "name": "persistence_request_indexes",
            "status": "ok"
          },
          {
            "category": "ops",
            "details": {
              "commands": [],
              "docs": "docs/guides/repair.md#request-growth",
              "rows": 22,
              "rows_exact": false,
              "scopes": [],
              "verify": "gbrain doctor --json (check persistence_request_growth)",
              "window_days": 7
            },
            "elapsed_ms": "<volatile>",
            "message": "~22 request row(s); no scope exhausts its lifetime request IDs within 30 days at its last-7-day rate.",
            "name": "persistence_request_growth",
            "status": "ok"
          },
          {
            "category": "ops",
            "details": {
              "config_key": "persistence.max_claim_ms",
              "count": 0,
              "docs": "docs/guides/troubleshooting.md#persistence-write-stall",
              "max_claim_ms": "<volatile>",
              "preparation_policy": {
                "maintenance_preparation_ms": "<volatile>",
                "max_preparation_attempts": 2,
                "max_transient_retries": 5,
                "preparation_ceiling_ms": "<volatile>",
                "sync_preparation_ms": "<volatile>"
              },
              "stalls": []
            },
            "elapsed_ms": "<volatile>",
            "message": "No write request has held its claim longer than persistence.max_claim_ms (600000 ms).",
            "name": "persistence_write_stall",
            "status": "ok"
          },
          {
            "category": "ops",
            "details": {
              "compacted_unreplayable": 0,
              "count": 0,
              "docs": "docs/guides/repair.md#failed-writes",
              "repair": "failed-writes",
              "writes": []
            },
            "elapsed_ms": "<volatile>",
            "message": "Every caller write with a retained receipt committed or was superseded.",
            "name": "lost_caller_writes",
            "status": "ok"
          },
          {
            "category": "ops",
            "details": {
              "applied": "5min",
              "configured": "5min",
              "docs": "docs/guides/troubleshooting.md#session-timeouts-not-applied"
            },
            "elapsed_ms": "<volatile>",
            "message": "The session statement_timeout (5min) reaches the server.",
            "name": "persistence_session_timeouts",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "docs": "docs/guides/repair.md#connector-held-items",
              "held": 0,
              "sources": []
            },
            "elapsed_ms": "<volatile>",
            "message": "No connector items are held.",
            "name": "connector_held_items",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "auto_repair": {
                "active": false,
                "enabled": true,
                "last_maintenance_at": null,
                "llm": true
              },
              "docs": "docs/guides/repair.md#held-files",
              "escalate_count": 50,
              "fences": 2,
              "held": 8,
              "source_ids": [
                "notes"
              ],
              "sources": [
                {
                  "escalated": false,
                  "fences": 2,
                  "first": [
                    {
                      "code": "invalid_fence",
                      "path": "fences/llm.md",
                      "reason": "no_header",
                      "why": "fences/llm.md is held because the facts fence (body), at line 7 cannot be imported (no_header). No maintenance run is active on this brain, so nothing repairs it by itself: the preview (read-only, no model call) shows the planned repair and prints the apply command with --expect <hash>; run that printed command to apply exactly what it showed. The rest of the source keeps syncing."
                    },
                    {
                      "code": "invalid_fence",
                      "path": "fences/manual.md",
                      "reason": "takes_kind_unsupported",
                      "why": "fences/manual.md is held because the takes fence (body), row 1, column kind, at line 10 cannot be imported (takes_kind_unsupported). gbrain will not guess this repair. Column `kind` of row(s) 1 in the takes fence (body, line 6) is not a takes kind. Use one of `fact`, `take`, `bet`, `hunch`; gbrain does not choose a takes kind for you. The preview names the exact edit, read-only: make it in fences/manual.md (never the frontmatter), commit, then sync. The rest of the source keeps syncing."
                    },
                    {
                      "code": "invalid_frontmatter",
                      "path": "fm/dash-line.md",
                      "reason": "needs_interpretation",
                      "why": "Reading fm/dash-line.md needs an interpretation (folded lines, a duplicate key or an unclosed list); the preview shows the exact proposal for approval."
                    },
                    {
                      "code": "invalid_frontmatter",
                      "path": "fm/duplicate-key.md",
                      "reason": "needs_interpretation",
                      "why": "Reading fm/duplicate-key.md needs an interpretation (folded lines, a duplicate key or an unclosed list); the preview shows the exact proposal for approval."
                    },
                    {
                      "code": "invalid_frontmatter",
                      "path": "fm/indented-close.md",
                      "reason": "yaml_parse",
                      "why": "Previews the minimal line fix for fm/indented-close.md (or names the line to fix by hand); nothing is written until a hash-bound apply."
                    }
                  ],
                  "held": 8,
                  "missing": 8,
                  "next": "preview the frontmatter and other fixes with gbrain repair frontmatter --source notes (writes nothing until a hash-bound apply); nothing repairs the fence and slug-conflict holds by itself (no maintenance run is active), so preview the content repairs with gbrain repair content --source notes (read-only, no model call: it lists each held file with its planned repair or the exact edit, kind by kind, and prints the apply command with --expect <hash>[,<hash>]), then run the apply command it prints",
                  "repair": "gbrain repair frontmatter --source notes; gbrain repair content --source notes",
                  "source_id": "notes",
                  "stale": 0,
                  "status": "gbrain sources status notes"
                }
              ]
            },
            "elapsed_ms": "<volatile>",
            "fix": {
              "actor": "agent",
              "argv": [
                "gbrain",
                "repair",
                "frontmatter",
                "--source",
                "notes",
                "--brain",
                "host"
              ],
              "command": "gbrain repair frontmatter --source notes --brain host",
              "consent": [],
              "docs": "https://github.com/garrytan/gbrain/blob/master/docs/guides/repair.md#held-files",
              "next": "run",
              "requires_exclusive": false,
              "verify": {
                "argv": [
                  "gbrain",
                  "doctor",
                  "--only",
                  "git_held_files",
                  "--json",
                  "--brain",
                  "host"
                ]
              },
              "why": "Previews the minimal line fix for each held file (or names the line to fix by hand) and prints the hash-bound apply command; it writes nothing."
            },
            "message": "8 file(s) in Git sources are held and not imported; the rest of each sync continues. notes: 8 held (0 page(s) keep an older revision, 8 file(s) have no page), first: fences/llm.md [invalid_fence/no_header], fences/manual.md [invalid_fence/takes_kind_unsupported], fm/dash-line.md [invalid_frontmatter/needs_interpretation], fm/duplicate-key.md [invalid_frontmatter/needs_interpretation], fm/indented-close.md [invalid_frontmatter/yaml_parse]. A page whose newer file is held is read-only for put_page until the file is repaired, so do not retry a refused write. Inspect with gbrain sources status notes; then notes: preview the frontmatter and other fixes with gbrain repair frontmatter --source notes (writes nothing until a hash-bound apply); nothing repairs the fence and slug-conflict holds by itself (no maintenance run is active), so preview the content repairs with gbrain repair content --source notes (read-only, no model call: it lists each held file with its planned repair or the exact edit, kind by kind, and prints the apply command with --expect <hash>[,<hash>]), then run the apply command it prints.",
            "name": "git_held_files",
            "status": "warn"
          },
          {
            "category": "ops",
            "details": {
              "count": 0,
              "docs": "docs/guides/repair.md#held-files",
              "hooks": []
            },
            "elapsed_ms": "<volatile>",
            "message": "No outdated gbrain frontmatter pre-commit hook is installed.",
            "name": "frontmatter_hook",
            "status": "ok"
          },
          {
            "category": "ops",
            "details": {
              "count": 0,
              "docs": "docs/guides/repair.md#url-source-origin",
              "sources": []
            },
            "elapsed_ms": "<volatile>",
            "message": "Every URL source clone records who added it, or was cloned where only the local CLI can clone.",
            "name": "url_source_origin",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "bindings": [],
              "count": 0,
              "docs": "docs/guides/repair.md#orphan-bindings",
              "repair": "orphan-bindings",
              "truncated": false
            },
            "elapsed_ms": "<volatile>",
            "message": "Every persistence source binding belongs to an existing source.",
            "name": "orphan_persistence_bindings",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "count": 0,
              "docs": "docs/guides/write-refusals.md#foreign-ownership-marker",
              "markers": []
            },
            "elapsed_ms": "<volatile>",
            "message": "Every ownership marker beside a source checkout belongs to this brain.",
            "name": "foreign_ownership_marker",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "checkouts": [],
              "count": 0,
              "docs": "docs/architecture/topologies.md#coordination-lock"
            },
            "elapsed_ms": "<volatile>",
            "message": "Every checkout's recorded coordination lock agrees with GBRAIN_COORDINATION_HOME, or the variable does not apply.",
            "name": "coordination_lock_location",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "sources": [],
              "total": 0
            },
            "elapsed_ms": "<volatile>",
            "message": "No page was written database-only to an unbound source.",
            "name": "unbound_source",
            "status": "ok"
          },
          {
            "category": "ops",
            "details": {
              "bound": 3,
              "enabled": true,
              "items": [],
              "pending": 0
            },
            "elapsed_ms": "<volatile>",
            "message": "No deferred dream writes",
            "name": "dream_write_deferred",
            "status": "ok"
          },
          {
            "category": "ops",
            "details": {
              "bound": 3,
              "enabled": true
            },
            "elapsed_ms": "<volatile>",
            "message": "The embedding signature restamp is running clean",
            "name": "embedding_restamp_stalled",
            "status": "ok"
          },
          {
            "category": "ops",
            "details": {
              "count": 0,
              "floor": "0.60.5.0",
              "hosts": [],
              "observed": [
                {
                  "host_id": "<uuid>",
                  "last_seen": "<ts>",
                  "principal": "local_cli:<uuid>",
                  "role": "consumer",
                  "version": "<version>"
                },
                {
                  "host_id": "<uuid>",
                  "last_seen": "<ts>",
                  "principal": "local_cli:<uuid>",
                  "role": "admitter",
                  "version": "<version>"
                }
              ],
              "truncated": false,
              "window_days": 7
            },
            "elapsed_ms": "<volatile>",
            "message": "Every writer that admitted or published a request in the last 7 days is v0.60.5.0 or newer.",
            "name": "writer_version",
            "status": "ok"
          },
          {
            "category": "ops",
            "details": {
              "blockers": [],
              "configured": "unset",
              "docs": "docs/guides/memory-boundaries.md#segmented-page-storage",
              "effective": "on",
              "floor": "<segmented-writer-floor>",
              "max_bytes": 268435456,
              "truncated": false,
              "window_days": 7
            },
            "elapsed_ms": "<volatile>",
            "message": "Segmented page storage is on: pages over 1 MiB are stored in segments, up to 268435456 bytes on this Postgres brain.",
            "name": "segmented_storage",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "classified": 0,
              "count": "exact",
              "truncated": false,
              "unclassifiable": 0
            },
            "elapsed_ms": "<volatile>",
            "message": "No session corpus is configured; nothing to classify.",
            "name": "self_capture",
            "status": "ok"
          },
          {
            "category": "ops",
            "details": {
              "column": "embedding",
              "column_type": "vector(1024)",
              "docs": "docs/guides/troubleshooting.md#hybrid-search-returns-only-keyword-hits",
              "embedded_chunks_estimate": 0,
              "outcome": "skipped",
              "reason": "small_brain"
            },
            "elapsed_ms": "<volatile>",
            "message": "Skipped: about 0 embedded chunk(s) in embedding; below 10000 a sequential scan is the right plan.",
            "name": "vector_plan",
            "status": "ok"
          },
          {
            "category": "ops",
            "details": {
              "canary_timeout_ms": "<volatile>",
              "docs": "docs/guides/troubleshooting.md#keyword-search-times-out-on-a-large-postgres-brain",
              "negative_cache": {
                "last_timeout_at": null,
                "skips": 0,
                "timeouts": 0,
                "ttl_seconds": 600
              },
              "outcome": "skipped",
              "reason": "small_brain",
              "timeout_ms": "<volatile>"
            },
            "elapsed_ms": "<volatile>",
            "message": "Skipped: fewer than 10000 chunks by the planner's estimate; the keyword statements finish well inside search.keyword_statement_timeout_ms = 8000 ms (range 1000-60000).",
            "name": "keyword_plan",
            "status": "ok"
          },
          {
            "category": "ops",
            "details": {
              "command": "gbrain repair embedding-effects",
              "count": "exact",
              "docs": "docs/guides/repair.md#stale-queued-embedding-effects",
              "effects": [],
              "failed_effects": 0,
              "repair": "embedding-effects",
              "resolution": "repairable",
              "retry_queued_effects": 0,
              "stale_effects": 0,
              "truncated": false
            },
            "elapsed_ms": "<volatile>",
            "message": "No committed write has a stale queued or failed embedding effect.",
            "name": "stale_embedding_effects",
            "status": "ok"
          },
          {
            "category": "ops",
            "details": {
              "count": 0,
              "docs": "docs/guides/google-connect.md",
              "repair": "google-file-modes",
              "sources": []
            },
            "elapsed_ms": "<volatile>",
            "message": "No group- or world-readable gbrain files under Google source directories outside ~/.gbrain.",
            "name": "google_file_modes",
            "status": "ok"
          },
          {
            "category": "ops",
            "details": {
              "count": 0,
              "docs": "docs/guides/google-connect.md#unreadable-calendar",
              "sources": []
            },
            "elapsed_ms": "<volatile>",
            "message": "No Google source recorded an unreadable calendar at its last sync.",
            "name": "google_calendar_readable",
            "status": "ok"
          },
          {
            "category": "ops",
            "details": {
              "count": 0,
              "docs": "docs/guides/google-connect.md#api-access",
              "sources": []
            },
            "elapsed_ms": "<volatile>",
            "message": "No Google source recorded a disabled API or missing scope at its last sync.",
            "name": "google_api_access",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "by_source": [],
              "count": 0,
              "docs": "docs/guides/repair.md#atoms-restore",
              "hold_until": null,
              "ledger_covered": 0,
              "newest_retired_at": null,
              "oldest_retired_at": null,
              "origins": 0,
              "repair": "atoms-restore",
              "source_ids": []
            },
            "elapsed_ms": "<volatile>",
            "message": "No atom retired by an empty re-extraction is waiting to be restored.",
            "name": "atom_retirements_restorable",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "by_source": [],
              "count": 0,
              "docs": "docs/guides/repair.md#atom-fence-rows",
              "origin_unread": 0,
              "repair": "atom-fence-rows"
            },
            "elapsed_ms": "<volatile>",
            "message": "No world atom carries a fence row its source page shows only to the owner.",
            "name": "atom_fence_rows",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "by_source": [],
              "docs": "docs/guides/repair.md#generations",
              "items": 0,
              "keys": 0,
              "repair": "generations",
              "restore_days": 30
            },
            "elapsed_ms": "<volatile>",
            "message": "No live generation retired items in the last 30 day(s).",
            "name": "generation_retirements",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "by_reason": [],
              "count": 0,
              "docs": "docs/guides/repair.md#generations",
              "releasable": 0,
              "repair": "generations"
            },
            "elapsed_ms": "<volatile>",
            "message": "No derived generation is held.",
            "name": "generation_held",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "docs": "docs/guides/repair.md#generations",
              "orphan_candidates": [],
              "orphans": 0,
              "pending": 0,
              "pending_items": [],
              "retire_pending": 0
            },
            "elapsed_ms": "<volatile>",
            "message": "No activated generation waits on a member request, and no orphan candidate exists.",
            "name": "generation_pending",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "ambiguous": 0,
              "docs": "docs/guides/repair.md#explicit-only-repair-kinds",
              "evidenced": 0,
              "excluded": 0,
              "repair": "extractor-facts"
            },
            "elapsed_ms": "<volatile>",
            "message": "No conversation-extractor fact is left expired by the pre-v0.60.11.0 projection.",
            "name": "extractor_facts_expired",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "ambiguous": 0,
              "docs": "docs/guides/repair.md#unwithdrawn-facts",
              "evidenced": 0,
              "excluded": 0,
              "repair": "unwithdrawn-facts"
            },
            "elapsed_ms": "<volatile>",
            "message": "No fact is left retired by a facts-fence generation that no fence withdrew.",
            "name": "unwithdrawn_facts",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "ambiguous": 0,
              "capped": false,
              "docs": "docs/guides/repair.md#purged-page-facts",
              "evidenced": 0,
              "repair": "purged-page-facts"
            },
            "elapsed_ms": "<volatile>",
            "message": "No fact extracted from a page is left active after that page was purged.",
            "name": "purged_page_facts",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "capped": false,
              "docs": "docs/guides/repair.md#conversation-labels",
              "evidenced": 0,
              "repair": "conversation-labels"
            },
            "elapsed_ms": "<volatile>",
            "message": "No conversation fact carries the pre-fix meeting-label signature (a 1970-01-01 segment on a label page).",
            "name": "conversation_label_facts",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "capped": false,
              "docs": "docs/guides/repair.md#conversation-labels",
              "extractor_version": 1,
              "sample": [],
              "scanned": 0,
              "stale": 0,
              "unstamped": 0
            },
            "elapsed_ms": "<volatile>",
            "message": "No conversation extraction outcome predates extractor version 1.",
            "name": "conversation_outcomes_stale",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "ambiguous": 0,
              "docs": "docs/guides/repair.md#explicit-only-repair-kinds",
              "evidenced": 0,
              "excluded": 0,
              "repair": "captured-facts",
              "unclassifiable": 0
            },
            "elapsed_ms": "<volatile>",
            "message": "No active fact from a gbrain self-capture or paste candidate remains. This counts facts in the database; the self_capture check counts corpus files.",
            "name": "captured_facts_active",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "ambiguous": 0,
              "docs": "docs/guides/repair.md#agent-session-facts",
              "evidenced": 0,
              "excluded": 0,
              "repair": "agent-session-facts",
              "unclassifiable": 0
            },
            "elapsed_ms": "<volatile>",
            "message": "No active owner-attributed fact from an agent-launched session remains.",
            "name": "agent_session_facts",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "affected": 0,
              "docs": "docs/guides/repair.md#redacted-facts",
              "repair": "redacted-facts"
            },
            "elapsed_ms": "<volatile>",
            "message": "No active fact holds a redaction marker.",
            "name": "facts_redaction_marker",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "days": [],
              "docs": "docs/guides/repair.md#fact-claim-dates",
              "repair": "fact-claim-dates",
              "rule": {
                "min_entities": 20,
                "min_facts": 200,
                "min_share": 0.25
              },
              "source_ids": []
            },
            "elapsed_ms": "<volatile>",
            "message": "No calendar day holds a bulk-loaded share of any source's facts.",
            "name": "fact_bulk_dates",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "docs": "docs/guides/repair.md#explicit-only-repair-kinds",
              "drifted": 0,
              "repair": "loop-facts"
            },
            "elapsed_ms": "<volatile>",
            "message": "Every closed commitment loop has its fact retired.",
            "name": "loop_facts_drift",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "docs": "docs/guides/repair.md#explicit-only-repair-kinds",
              "excluded": 0,
              "fenced": 0,
              "repair": "ontology-facts",
              "retired": 0
            },
            "elapsed_ms": "<volatile>",
            "message": "No ontology observation is held by a page's Facts table.",
            "name": "ontology_facts_fenced",
            "status": "ok"
          },
          {
            "category": "ops",
            "details": {
              "count": 0,
              "docs": "docs/guides/repair.md#frontmatter-keys",
              "repair": "frontmatter-keys",
              "source_ids": [],
              "sources": []
            },
            "elapsed_ms": "<volatile>",
            "message": "No stored frontmatter carries a parser-reserved key (type, title, tags, slug).",
            "name": "stale_frontmatter_keys",
            "status": "ok"
          },
          {
            "category": "ops",
            "details": {
              "concept_skips": 0,
              "count": 0,
              "docs": "docs/guides/troubleshooting.md#maintenance-write-drift",
              "repair": "file-drift",
              "sources": [],
              "suppressed": [],
              "window_sequences": 20000
            },
            "elapsed_ms": "<volatile>",
            "message": "No page whose writes refuse source_changed still has a canonical file that differs from the database.",
            "name": "maintenance_write_drift",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "message": "Relative dates resolve against each source's observation date in fact extraction, dream synthesis, extract_atoms and propose_takes (the default). life chronicle events keep their current prompt unless extraction.date_grounding is set to true. Facts extracted before this was on keep their original wording; re-extract a source only with the user's consent (gbrain extract-conversation-facts --source-id <id> --dry-run previews it).",
            "name": "extraction_date_grounding",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "message": "Sampled 20 pages; no bare-tweet phrases or external links.",
            "name": "integrity",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "message": "All JSONB columns store objects/arrays",
            "name": "jsonb_integrity",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "message": "No takes yet",
            "name": "takes_weight_grid",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "message": "All FK-child tables clean (10 tables checked)",
            "name": "child_table_orphans",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "message": "All synthesized pages carry a raw trace or explicit exemption",
            "name": "raw_provenance",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "message": "All source config values are JSON objects",
            "name": "source_config_shape",
            "status": "ok"
          },
          {
            "category": "skill",
            "elapsed_ms": "<volatile>",
            "message": "whoknows eval fixture present (10 queries). Run `gbrain eval whoknows test/fixtures/whoknows-eval.jsonl` to grade.",
            "name": "whoknows_health",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "message": "All image-asset chunks have modality=image",
            "name": "cross_modal_modality_backfill",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "message": "search.unified_multimodal is off; coverage check N/A",
            "name": "unified_multimodal_coverage",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "message": "No truncated bodies detected",
            "name": "markdown_body_completeness",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "message": "No pages exceed 25165824 bytes (excluding embed_skip pages, which already took the accepted non-embeddable remediation)",
            "name": "oversized_pages",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "message": "No junk-pattern hits in 20 recent page(s) (use --content-audit for full scan)",
            "name": "scraper_junk_pages",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "message": "No content-sanity events in last 7 days (audit JSONL is local to this host; share GBRAIN_AUDIT_DIR for multi-host visibility)",
            "name": "content_sanity_audit_recent",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "message": "No quarantined pages",
            "name": "quarantined_pages",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "message": "No flagged pages",
            "name": "flagged_pages",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "count": 0,
              "days": 7,
              "source_id": null
            },
            "elapsed_ms": "<volatile>",
            "message": "No stale unverified extraction stubs",
            "name": "unverified_extractions",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "count": 20,
              "exact": true,
              "partial": false
            },
            "elapsed_ms": "<volatile>",
            "fix_unavailable_reason": "unstructured",
            "message": "20 frontmatter issue(s). notes: 19 (YAML_PARSE=9, EMPTY_FRONTMATTER=1, NESTED_QUOTES=2, MISSING_CLOSE=2, NON_STRING_FIELD=2, NULL_BYTES=2, SLUG_MISMATCH=1); plain: 1 (YAML_PARSE=1). Fix: gbrain repair frontmatter --source <id> previews the line fix for every file it can repair (and names the manual fix for the rest, such as a missing opening ---); on an unmanaged checkout gbrain frontmatter validate <source-path> --fix applies the same safe fixes",
            "name": "frontmatter_integrity",
            "status": "warn"
          },
          {
            "category": "brain",
            "details": {
              "docs": "docs/guides/repair.md#frontmatter",
              "partial": false,
              "repairable": 14,
              "source_ids": [
                "notes",
                "plain"
              ],
              "sources": [
                {
                  "by_code": {
                    "FRONTMATTER_COMMENT_VALUE": 1,
                    "MISSING_CLOSE": 2,
                    "NESTED_QUOTES": 2,
                    "NULL_BYTES": 2,
                    "SLUG_MISMATCH": 1,
                    "YAML_PARSE": 3,
                    "needs_interpretation": 4
                  },
                  "files": 13,
                  "preview": "gbrain repair frontmatter --source notes",
                  "sample_paths": [
                    "fm/comment-value.md",
                    "fm/dash-line.md",
                    "fm/duplicate-key.md",
                    "fm/late-broken.md",
                    "fm/missing-close.md"
                  ],
                  "source_id": "notes",
                  "status": "scanned"
                },
                {
                  "by_code": {
                    "needs_interpretation": 1
                  },
                  "files": 1,
                  "preview": "gbrain repair frontmatter --source plain",
                  "sample_paths": [
                    "broken.md"
                  ],
                  "source_id": "plain",
                  "status": "scanned"
                }
              ],
              "unscanned": []
            },
            "elapsed_ms": "<volatile>",
            "fix": {
              "actor": "agent",
              "argv": [
                "gbrain",
                "repair",
                "frontmatter",
                "--brain",
                "host"
              ],
              "command": "gbrain repair frontmatter --brain host",
              "consent": [],
              "docs": "https://github.com/garrytan/gbrain/blob/master/docs/guides/repair.md#frontmatter",
              "next": "run",
              "requires_exclusive": false,
              "verify": {
                "argv": [
                  "gbrain",
                  "doctor",
                  "--only",
                  "frontmatter_repairable",
                  "--json",
                  "--brain",
                  "host"
                ]
              },
              "why": "Previews the minimal line fix per file (safe quoting first; interpretations only with --include-ambiguous) and prints the hash-bound apply command; it writes nothing."
            },
            "message": "14 file(s) have frontmatter gbrain repair frontmatter can fix: notes: 13 (FRONTMATTER_COMMENT_VALUE=1, needs_interpretation=4, NESTED_QUOTES=2, YAML_PARSE=3, MISSING_CLOSE=2, NULL_BYTES=2, SLUG_MISMATCH=1); plain: 1 (needs_interpretation=1). Preview with gbrain repair frontmatter --source notes; gbrain repair frontmatter --source plain (writes nothing; add --include-ambiguous for interpretations after the safe pass).",
            "name": "frontmatter_repairable",
            "status": "warn"
          },
          {
            "category": "meta",
            "elapsed_ms": "<volatile>",
            "message": "No capture failures in the last 24h",
            "name": "eval_capture",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "message": "No probe runs in the last 7 days. Run `gbrain eval suspected-contradictions --query \"...\" --top-k 5` to populate.",
            "name": "contradictions",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "message": "Automatic fact extraction not configured (keyless) — memory comes from agent-authored `## Facts` fences and the `remember` verb. One optional key enables automatic extraction (OpenAI or Anthropic).",
            "name": "facts_extraction_health",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "message": "Sample of last 1000 pages clean (no fallback-with-parseable-fm-date, no future-dated, no pre-1990)",
            "name": "effective_date_health",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "message": "Skipped (no pages have emotional_weight > 0; either fresh install or recompute hasn't run yet)",
            "name": "salience_health",
            "status": "ok"
          },
          {
            "category": "ops",
            "details": {
              "depth": 0,
              "oldest_age_seconds": "<volatile>",
              "worker_alive": true
            },
            "elapsed_ms": "<volatile>",
            "message": "No stalled-forever jobs; no queue over depth 10; no old embed-backfill jobs without a worker.",
            "name": "queue_health",
            "status": "ok"
          },
          {
            "category": "ops",
            "elapsed_ms": "<volatile>",
            "message": "Subagent tier resolves to default (claude-sonnet-4-6) — full tool-loop capability",
            "name": "subagent_capability",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "message": "facts_health(default): 0 active, 0 today, 0 this week, 0 consolidated, top entities —",
            "name": "facts_health",
            "status": "ok"
          },
          {
            "category": "ops",
            "elapsed_ms": "<volatile>",
            "message": "Brain-wide maintenance jobs are finishing within their deadline.",
            "name": "global_maintenance_timeouts",
            "status": "ok"
          },
          {
            "category": "ops",
            "details": {
              "age_minutes": null,
              "code": "global_maintenance_stalled",
              "docs": "docs/guides/troubleshooting.md#global-maintenance-stalled",
              "fail_after_minutes": 10080,
              "failed_jobs_since": 0,
              "last_failed_job": null,
              "last_global_at": null,
              "phases": [],
              "reason": "fresh",
              "resume_phase": null,
              "warn_after_minutes": 180
            },
            "elapsed_ms": "<volatile>",
            "message": "Brain-wide maintenance has not run yet.",
            "name": "global_maintenance_stalled",
            "status": "ok"
          },
          {
            "category": "ops",
            "details": {
              "embed_daily_cap_usd": null,
              "embed_spend_today_usd": null,
              "last_run": null,
              "next_due_at": null,
              "paid_phases_opt_in": [
                "extract_atoms",
                "synthesize_concepts",
                "propose_takes",
                "grade_takes",
                "calibration_profile",
                "edge_contradictions",
                "drift",
                "standing_questions",
                "chronicle",
                "facts_drain",
                "conversation_facts_backfill",
                "enrich_thin",
                "skillopt",
                "embed"
              ],
              "pending_purge_count": 0,
              "runner": null,
              "state": "never",
              "steps": 0
            },
            "elapsed_ms": "<volatile>",
            "message": "Free upkeep has not run on this brain yet; gbrain maintain --unattended runs it (no model calls, no page purge). Nothing deletes on its own.",
            "name": "unattended_maintenance",
            "readiness_state": "not_applicable",
            "severity": "info",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "behind": [],
              "docs": "docs/guides/conversation-archive.md#doctor",
              "enabled": true,
              "enabled_by": "default",
              "harnesses": [
                {
                  "harness": "claude-code",
                  "newest_archived_day": null,
                  "newest_session_day": null,
                  "readable": false,
                  "reader": "claude-code-files"
                },
                {
                  "harness": "codex",
                  "newest_archived_day": null,
                  "newest_session_day": null,
                  "readable": false,
                  "reader": "codex-files"
                },
                {
                  "harness": "openclaw",
                  "newest_archived_day": null,
                  "newest_session_day": null,
                  "readable": false,
                  "reader": "openclaw-files"
                },
                {
                  "harness": "hermes",
                  "newest_archived_day": null,
                  "newest_session_day": null,
                  "readable": false,
                  "reader": "hermes-files"
                },
                {
                  "harness": "grok",
                  "newest_archived_day": null,
                  "newest_session_day": null,
                  "readable": false,
                  "reader": "grok-files"
                },
                {
                  "harness": "openclaw",
                  "newest_archived_day": null,
                  "newest_session_day": null,
                  "readable": false,
                  "reader": "openclaw-gateway"
                }
              ],
              "held": [],
              "reason": "on by default on a personal brain",
              "source_id": "conversations",
              "stale_days": 2
            },
            "elapsed_ms": "<volatile>",
            "message": "Conversation archive is on; no readable sessions for claude-code, codex, openclaw, hermes, grok (gbrain transcripts archive status names each reader).",
            "name": "transcript_archive_freshness",
            "readiness_state": "not_applicable",
            "severity": "info",
            "status": "ok"
          },
          {
            "category": "ops",
            "elapsed_ms": "<volatile>",
            "message": "No automatic embed-backfill is repeating the same failure.",
            "name": "embed_backfill_stalled",
            "status": "ok"
          },
          {
            "category": "ops",
            "details": {
              "code": "content_drift_sweep",
              "docs": "docs/guides/troubleshooting.md#content-drift-sweep",
              "scopes": []
            },
            "elapsed_ms": "<volatile>",
            "message": "The content-drift sweep has not run yet; it runs inside embed --stale and the embed jobs.",
            "name": "content_drift_sweep",
            "status": "ok"
          },
          {
            "category": "ops",
            "elapsed_ms": "<volatile>",
            "message": "No connector source is waiting for its account to be repinned.",
            "name": "connector_account_mismatch",
            "status": "ok"
          },
          {
            "category": "ops",
            "details": {
              "active_ids": [],
              "authorizable": {},
              "authorizable_total": 0,
              "docs": "docs/guides/repair.md#legacy-job-authority",
              "live": 0,
              "queued_spend": {
                "by_basis": {},
                "long_waiting": 0,
                "long_waiting_ids": []
              },
              "terminal_keyed": {},
              "terminal_keyed_total": 0,
              "unsupported": 0,
              "unsupported_ids": []
            },
            "elapsed_ms": "<volatile>",
            "message": "No queued job predates submission authority.",
            "name": "legacy_job_authority",
            "status": "ok"
          },
          {
            "category": "ops",
            "details": {
              "convertible_count": 0,
              "docs": "docs/mcp/ADMIN.md#legacy-token-grants",
              "legacy_shape_count": 0,
              "malformed": [],
              "mirror_window_ends": "2026-11-04"
            },
            "elapsed_ms": "<volatile>",
            "message": "Every active legacy token uses the unified grant columns. The permissions mirror for older gbrain binaries is kept until 2026-11-04.",
            "name": "legacy_token_grant_shape",
            "status": "ok"
          },
          {
            "category": "ops",
            "details": {
              "docs": "docs/mcp/ADMIN.md#legacy-token-grants",
              "drift": [],
              "mirror_window_ends": "2026-11-04"
            },
            "elapsed_ms": "<volatile>",
            "message": "No legacy token grant has drifted from its permissions mirror.",
            "name": "legacy_token_grant_drift",
            "status": "ok"
          },
          {
            "category": "ops",
            "details": {
              "docs": "docs/mcp/ADMIN.md#tokens-without-scopes",
              "null_scope_count": 0,
              "tokens": []
            },
            "elapsed_ms": "<volatile>",
            "message": "Every active legacy token has explicit scopes.",
            "name": "legacy_token_null_scope",
            "status": "ok"
          },
          {
            "category": "ops",
            "details": {
              "docs": "docs/mcp/ADMIN.md#grants-that-cannot-reach-new-operations",
              "grants": [],
              "server_surface": "full"
            },
            "elapsed_ms": "<volatile>",
            "message": "Every active client and token can call the operations its scopes allow.",
            "name": "grant_new_ops_available",
            "status": "ok"
          },
          {
            "category": "ops",
            "elapsed_ms": "<volatile>",
            "message": "Not applicable: this brain serves one person (0 enabled member(s)), so every credential reads that person's own pages.",
            "name": "unscoped_multi_user_token",
            "readiness_state": "not_applicable",
            "severity": "info",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "message": "No image assets indexed yet",
            "name": "image_assets",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "message": "OCR not in use (or no images ingested with OCR opt-in)",
            "name": "ocr_health",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "image_pages": 0,
              "multimodal": false,
              "null_source_path": 0,
              "unsupported_holds": 0,
              "without_image_vector": 0
            },
            "elapsed_ms": "<volatile>",
            "message": "No image pages indexed yet.",
            "name": "image_embedding_coverage",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "code": "sync_no_successful_sync",
              "no_successful_sync": [
                {
                  "code": "sync_no_successful_sync",
                  "fix": {
                    "actor": "agent",
                    "argv": [
                      "gbrain",
                      "sync",
                      "--source",
                      "plain",
                      "--no-pull"
                    ],
                    "consent": [],
                    "docs": "docs/guides/troubleshooting.md#sync-freshness-no-successful-sync",
                    "requires_exclusive": false,
                    "verify": {
                      "argv": [
                        "gbrain",
                        "doctor",
                        "--only",
                        "sync_freshness",
                        "--json"
                      ]
                    },
                    "why": "No successful sync of plain is recorded; this runs one and stamps last_sync_at when it succeeds."
                  },
                  "held": 0,
                  "job_id": null,
                  "last_attempt_at": null,
                  "reason": "no_attempt",
                  "result": null,
                  "source_id": "plain"
                }
              ],
              "stale_count": 1,
              "synced_recently_count": 1,
              "unchanged_count": 0,
              "writer_owned_count": 1
            },
            "elapsed_ms": "<volatile>",
            "fix": {
              "actor": "agent",
              "argv": [
                "gbrain",
                "sync",
                "--source",
                "plain",
                "--no-pull",
                "--brain",
                "host"
              ],
              "command": "gbrain sync --source plain --no-pull --brain host",
              "consent": [],
              "docs": "https://github.com/garrytan/gbrain/blob/master/docs/guides/troubleshooting.md#sync-freshness-no-successful-sync",
              "next": "run",
              "requires_exclusive": false,
              "verify": {
                "argv": [
                  "gbrain",
                  "doctor",
                  "--only",
                  "sync_freshness",
                  "--json",
                  "--brain",
                  "host"
                ]
              },
              "why": "No successful sync of plain is recorded; this runs one and stamps last_sync_at when it succeeds."
            },
            "message": "Source 'plain': no successful sync recorded; no attempt recorded; run `gbrain sync --source plain --no-pull`. 1 writer-owned canonical content source(s): upstream sync is not applicable; see canonical_content_writes for publication status",
            "name": "sync_freshness",
            "status": "fail"
          },
          {
            "category": "ops",
            "details": {
              "pending_count": 0,
              "recovering_count": 0,
              "writer_owned_count": 1
            },
            "elapsed_ms": "<volatile>",
            "message": "1 writer-owned content source(s); no pending canonical publication or recovery.",
            "name": "canonical_content_writes",
            "status": "ok"
          },
          {
            "category": "ops",
            "details": {
              "cache_age": "under an hour ago",
              "checked_at": "<ts>",
              "computed_by": "doctor",
              "degraded": false,
              "recovery_scope": "Git evidence covers committed repository files only; not a full database backup. DB-only pages, facts, configuration and credentials need a separate backup and restore drill.",
              "totals": {
                "assets": 3,
                "configured_repos": 0,
                "failing": 0,
                "no_remote": 1,
                "pages_at_risk": 0,
                "recoverable_repos": 0,
                "remote_timeouts": 0,
                "unpushed": 0
              }
            },
            "elapsed_ms": "<volatile>",
            "fix": {
              "actor": "host_admin",
              "argv": [
                "pg_dump",
                "--format",
                "custom",
                "--file",
                "<DUMP_FILE>",
                "--dbname",
                "<DATABASE_URL>"
              ],
              "command": "pg_dump --format custom --file '<DUMP_FILE>' --dbname '<DATABASE_URL>'",
              "consent": [
                "credentials"
              ],
              "docs": "https://github.com/garrytan/gbrain/blob/master/docs/guides/memory-boundaries.md#full-backup",
              "inputs": [
                {
                  "how": "A new file outside the brain, in a directory only the user can read.",
                  "name": "DUMP_FILE"
                },
                {
                  "how": "The brain's Postgres connection, preferably service=<name> from a pg_service file so no password lands in the command line.",
                  "name": "DATABASE_URL"
                }
              ],
              "next": "tell_user_to_run",
              "requires_exclusive": false,
              "user_message": "This brain lives in Postgres, so back it up with a database dump of its database: `pg_dump --format custom --file <DUMP_FILE> --dbname <DATABASE_URL>`, kept private (it holds every page, fact, member and token); `pg_restore --list <DUMP_FILE>` reads it back. Restore it into a new, empty database with `pg_restore --no-owner --dbname <NEW_DATABASE_URL> <DUMP_FILE>`, then run `gbrain init --url <NEW_DATABASE_URL>` under a separate GBRAIN_HOME, which opens the restored brain. `gbrain export` is not a backup: an import of it puts every page in one source and keeps no members, tokens or facts.",
              "why": "A database dump keeps every source, page, fact, member, token and folder rule of a Postgres brain; a Markdown export keeps pages only."
            },
            "message": "Not urgent yet: the brain holds 23 page(s)+fact(s) and is under 7 days old (backup coaching starts at 25 items or 7 days). 3 knowledge asset(s) lack verified recovery: default (not_a_git_repo), plain (not_a_git_repo), notes (no git remote). A source repo with a pushed git remote restores its Markdown files only, never DB-only pages, facts, config or credentials. Run `gbrain backup status` for each asset's fix command.",
            "name": "backup_coverage",
            "readiness_state": "degraded",
            "severity": "info",
            "status": "ok"
          },
          {
            "category": "ops",
            "elapsed_ms": "<volatile>",
            "message": "3 active sources on a managed brain. Recommended cron on the owner host, every 15 minutes: `gbrain sync --all --no-pull --hard-deadline 13m`. Managed sync never pulls: for each checkout that tracks a remote, chain `gbrain sources refresh <id>;` in front of it to take upstream commits. Keep the deadline under the interval: managed sync takes no per-source lock, so a tick that outlives the interval would overlap the next one.",
            "name": "sync_consolidation",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "message": "No full cycle yet for 'default', 'notes', 'plain': they hold no pages or only pages from the last 24h, so there is nothing to consolidate yet.",
            "name": "cycle_freshness",
            "readiness_state": "not_applicable",
            "severity": "info",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "message": "No same-source content-hash duplicate groups",
            "name": "content_hash_duplicates",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "message": "All code-page chunks carry symbol metadata",
            "name": "code_chunk_metadata",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "message": "Every DB page is file-backed or under a declared/default db_only path (derive-phase defaults: life/events/ atoms/ concepts/ extracts/ dream-cycle-summaries/ reports/drift-).",
            "name": "undeclared_db_only_pages",
            "status": "ok"
          },
          {
            "category": "ops",
            "elapsed_ms": "<volatile>",
            "message": "No configured collectors declare output paths",
            "name": "db_only_collector_collision",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "docs": "docs/guides/on-commit-sync.md",
              "fail_seconds": 3600,
              "graded": false,
              "on_commit": false,
              "sources": [
                {
                  "behind": null,
                  "commit_to_embedded": {
                    "p50_seconds": null,
                    "p95_seconds": null,
                    "pending": 0,
                    "samples": 0
                  },
                  "commit_to_searchable": {
                    "p50_seconds": null,
                    "p95_seconds": null,
                    "samples": 0
                  },
                  "commits": 0,
                  "source_id": "default",
                  "unresolved_commits": 0,
                  "waiting_commits": null,
                  "window_hours": 24
                },
                {
                  "behind": {
                    "commits": 0,
                    "oldest_seconds": null
                  },
                  "commit_to_embedded": {
                    "p50_seconds": null,
                    "p95_seconds": null,
                    "pending": 0,
                    "samples": 0
                  },
                  "commit_to_searchable": {
                    "p50_seconds": null,
                    "p95_seconds": null,
                    "samples": 0
                  },
                  "commits": 0,
                  "source_id": "notes",
                  "unresolved_commits": 0,
                  "waiting_commits": 0,
                  "window_hours": 24
                },
                {
                  "behind": null,
                  "commit_to_embedded": {
                    "p50_seconds": null,
                    "p95_seconds": null,
                    "pending": 0,
                    "samples": 0
                  },
                  "commit_to_searchable": {
                    "p50_seconds": null,
                    "p95_seconds": null,
                    "samples": 0
                  },
                  "commits": 0,
                  "source_id": "plain",
                  "unresolved_commits": 0,
                  "waiting_commits": null,
                  "window_hours": 24
                }
              ],
              "target_seconds": 300
            },
            "elapsed_ms": "<volatile>",
            "message": "No commit→searchable samples in the last 24 h (no managed sync imported a new commit).",
            "name": "managed_sync_latency",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "docs": "docs/guides/on-commit-sync.md",
              "sources": [
                {
                  "pending_markers": 0,
                  "reason": null,
                  "resident": null,
                  "source_id": "default",
                  "stalled": false,
                  "state": null
                },
                {
                  "pending_markers": 0,
                  "reason": null,
                  "resident": null,
                  "source_id": "notes",
                  "stalled": false,
                  "state": null
                },
                {
                  "pending_markers": 0,
                  "reason": null,
                  "resident": null,
                  "source_id": "plain",
                  "stalled": false,
                  "state": null
                }
              ],
              "sync_on_commit": false
            },
            "elapsed_ms": "<volatile>",
            "message": "sync.on_commit is off; residents still run explicit sync requests. notifier for default: none running; idle; notifier for notes: none running; idle; notifier for plain: none running; idle.",
            "name": "commit_notifier",
            "severity": "info",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "checkouts": 1,
              "tracked": []
            },
            "elapsed_ms": "<volatile>",
            "message": "1 Git checkout(s) track no ownership marker (markers on disk stay untracked and are denied on push).",
            "name": "tracked_ownership_marker",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "dirty": [
                {
                  "age_ms": "<volatile>",
                  "checkout": "<home>/notes-src",
                  "path": "fences/deterministic.md",
                  "state": "modified"
                },
                {
                  "age_ms": "<volatile>",
                  "checkout": "<home>/notes-src",
                  "path": "fences/late.md",
                  "state": "untracked"
                },
                {
                  "age_ms": "<volatile>",
                  "checkout": "<home>/notes-src",
                  "path": "fences/untracked.md",
                  "state": "untracked"
                },
                {
                  "age_ms": "<volatile>",
                  "checkout": "<home>/notes-src",
                  "path": "fm/image.png",
                  "state": "untracked"
                },
                {
                  "age_ms": "<volatile>",
                  "checkout": "<home>/notes-src",
                  "path": "fm/late-broken.md",
                  "state": "untracked"
                },
                {
                  "age_ms": "<volatile>",
                  "checkout": "<home>/notes-src",
                  "path": "fm/null-bytes.md",
                  "state": "untracked"
                },
                {
                  "age_ms": "<volatile>",
                  "checkout": "<home>/notes-src",
                  "path": "fm/null-in-frontmatter.md",
                  "state": "untracked"
                },
                {
                  "age_ms": "<volatile>",
                  "checkout": "<home>/notes-src",
                  "path": "fm/untracked-yaml.md",
                  "state": "untracked"
                }
              ],
              "dirty_count": 8,
              "dirty_warn_after_minutes": 30,
              "foreign": [],
              "partial": false,
              "partial_reasons": [],
              "unconfirmed": [],
              "unknown": [],
              "window": [
                {
                  "common": "<home>/notes-src/.git",
                  "from": null,
                  "ledger": false,
                  "ledger_start": null,
                  "oldest_reflog": "<ts>",
                  "to": "<ts>",
                  "uncovered": 4
                }
              ]
            },
            "elapsed_ms": "<volatile>",
            "message": "Every locally created commit in the covered window of 1 repository is in gbrain's commit ledger, and no page file waits uncommitted for more than 30 minutes. A repository gbrain has not committed in yet has no ledger, so its window is empty.",
            "name": "foreign_writers",
            "status": "ok"
          },
          {
            "category": "ops",
            "elapsed_ms": "<volatile>",
            "message": "System One is off (every decide slot is off; nothing is sent).",
            "name": "decide_health",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "message": "No memory proposals await the owner.",
            "name": "memory_proposals_pending",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "conversation": null,
              "fix": "preview links: gbrain facts relink --dry-run",
              "inferred_7d": {
                "mention": 0,
                "page": 0
              },
              "new_7d": {
                "conversation_unresolved": 0,
                "eligible": 3,
                "facts": 3,
                "no_subject": 0,
                "unlinked": 0,
                "unlinked_eligible": 0
              },
              "no_subject": 0,
              "origins": [],
              "relinked_7d": {},
              "sources": 3,
              "window": {
                "active": 3,
                "capped": false,
                "conversation": 0,
                "fence_owned": 0,
                "unlinked": 0
              }
            },
            "elapsed_ms": "<volatile>",
            "message": "0.0% of 3 active facts have no entity (0; 0 fence-owned); last 7 days: 0.0% of 3 new facts unlinked; 0 judged no_subject; 7-day links: inferred page 0, mention 0; relink none",
            "name": "unlinked_facts",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "contradiction_mode": "propose (default)",
              "lagging": 0,
              "proposals": {
                "applied": 0,
                "proposed": 0,
                "undated": 0
              },
              "read_policy": "on",
              "relationships": {},
              "stale_assertions": []
            },
            "elapsed_ms": "<volatile>",
            "message": "relationships: none yet; read policy on; contradiction mode propose (default)",
            "name": "edge_validity",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "auto_calls_24h": 0,
              "chat_available": false,
              "daily_limit": 200,
              "docs": "docs/guides/life-chronicle.md",
              "enabled": true,
              "job_budget_usd": 0.25,
              "last_7d": {
                "extracted": 0,
                "failed": 0,
                "failedReasons": {},
                "reasons": {},
                "skipped": 0
              },
              "ledger_available": true,
              "pending": 0,
              "principals_24h": [],
              "readiness": "missing",
              "run_now": [
                "gbrain",
                "dream",
                "--phase",
                "chronicle"
              ],
              "severity": "info",
              "source": "default",
              "spend_7d": {
                "incompleteRecords": 0,
                "knownUsd": 0,
                "unpricedCalls": 0
              }
            },
            "elapsed_ms": "<volatile>",
            "message": "auto_chronicle is on (default). Last 24 h: 0 of 200 automatic extraction calls. Last 7 days: 0 extracted, 0 failed, 0 skipped; $0.00 known spend. 0 page(s) pending. No chat provider is configured, so nothing will be extracted until one is.",
            "name": "auto_chronicle",
            "readiness_state": "missing",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "message": "chronicle.* settings are valid.",
            "name": "chronicle_config_invalid",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "message": "No page holds live events from an earlier extraction run beside its newest one.",
            "name": "chronicle_duplicate_events",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "ask_user": true,
              "code": "auto_chronicle_default_on",
              "decisions": [
                {
                  "argv": [
                    "gbrain",
                    "config",
                    "set",
                    "auto_chronicle",
                    "true"
                  ],
                  "fix": {
                    "actor": "agent",
                    "argv": [
                      "gbrain",
                      "config",
                      "set",
                      "auto_chronicle",
                      "true"
                    ],
                    "consent": [
                      "paid",
                      "egress"
                    ],
                    "requires_exclusive": false,
                    "user_message": "Automatic event extraction is on: each new or changed meeting, conversation or calendar page gets one paid chat call. Keep it on, or turn it off?",
                    "verify": {
                      "argv": [
                        "gbrain",
                        "doctor",
                        "--only",
                        "auto_chronicle_default_on",
                        "--json"
                      ]
                    },
                    "why": "Keeping automatic extraction records that the user accepted one paid chat call per eligible page; page text goes to the chat provider."
                  },
                  "id": "keep",
                  "label": "Keep automatic extraction on"
                },
                {
                  "argv": [
                    "gbrain",
                    "config",
                    "set",
                    "auto_chronicle",
                    "false"
                  ],
                  "fix": {
                    "actor": "agent",
                    "argv": [
                      "gbrain",
                      "config",
                      "set",
                      "auto_chronicle",
                      "false"
                    ],
                    "consent": [],
                    "requires_exclusive": false,
                    "verify": {
                      "argv": [
                        "gbrain",
                        "doctor",
                        "--only",
                        "auto_chronicle_default_on",
                        "--json"
                      ]
                    },
                    "why": "Turns automatic extraction off; history stays available on request with chronicle-backfill."
                  },
                  "id": "opt_out",
                  "label": "Turn automatic extraction off"
                }
              ],
              "default": "keep",
              "docs": "docs/guides/life-chronicle.md",
              "fix": {
                "actor": "agent",
                "argv": [
                  "gbrain",
                  "config",
                  "set",
                  "auto_chronicle",
                  "true"
                ],
                "consent": [
                  "paid",
                  "egress"
                ],
                "requires_exclusive": false,
                "user_message": "Automatic event extraction is on: each new or changed meeting, conversation or calendar page gets one paid chat call. Keep it on, or turn it off?",
                "verify": {
                  "argv": [
                    "gbrain",
                    "doctor",
                    "--only",
                    "auto_chronicle_default_on",
                    "--json"
                  ]
                },
                "why": "Keeping automatic extraction records that the user accepted one paid chat call per eligible page; page text goes to the chat provider."
              },
              "severity": "info"
            },
            "elapsed_ms": "<volatile>",
            "fix": {
              "actor": "agent",
              "argv": [
                "gbrain",
                "config",
                "set",
                "auto_chronicle",
                "true",
                "--brain",
                "host"
              ],
              "command": "gbrain config set auto_chronicle true --brain host",
              "consent": [
                "paid",
                "egress"
              ],
              "next": "ask_user",
              "requires_exclusive": false,
              "user_message": "Automatic event extraction is on: each new or changed meeting, conversation or calendar page gets one paid chat call. Keep it on, or turn it off?",
              "verify": {
                "argv": [
                  "gbrain",
                  "doctor",
                  "--only",
                  "auto_chronicle_default_on",
                  "--json",
                  "--brain",
                  "host"
                ]
              },
              "why": "Keeping automatic extraction records that the user accepted one paid chat call per eligible page; page text goes to the chat provider."
            },
            "message": "Automatic event extraction is on by default and the user has not confirmed it yet. Each eligible new or changed meeting, conversation or calendar page gets one paid chat call (cap $0.25 per page; at most 200 calls per day, so at most $50.00 per day for a priced model; an unpriced model has no cap), and page text goes to the configured chat provider. Relay this to the user, then run `gbrain config set auto_chronicle true` to keep it or `gbrain config set auto_chronicle false` to opt out.",
            "name": "auto_chronicle_default_on",
            "readiness_state": "ok",
            "severity": "info",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "backlog": {
                "active": 0,
                "delayed": 0,
                "waiting": 0
              },
              "daily_spent_usd": 0,
              "docs": "docs/guides/facts-drain.md",
              "health": "not_applicable",
              "last_run": null
            },
            "elapsed_ms": "<volatile>",
            "message": "Postgres brains run facts-absorb jobs on the job worker (gbrain jobs supervisor), not the automatic drain.",
            "name": "facts_drain",
            "readiness_state": "not_applicable",
            "severity": "info",
            "status": "ok"
          },
          {
            "category": "ops",
            "details": {
              "docs": "docs/guides/wakeshift.md#troubleshooting",
              "enabled": false,
              "key_source": "none"
            },
            "elapsed_ms": "<volatile>",
            "message": "Reporting back through Wakeshift is off (gbrain wakeshift enable turns it on).",
            "name": "wakeshift",
            "readiness_state": "disabled_by_choice",
            "severity": "info",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "applicable": false
            },
            "elapsed_ms": "<volatile>",
            "message": "Not applicable: embeddings are disabled on this brain (keyword search keeps working).",
            "name": "fact_take_vectors",
            "readiness_state": "disabled_by_choice",
            "severity": "info",
            "status": "ok"
          },
          {
            "category": "ops",
            "details": {
              "auto_analyze": null,
              "checked": [
                "pages",
                "links",
                "facts",
                "takes",
                "content_chunks",
                "timeline_entries"
              ],
              "engine": "postgres",
              "expression_indexes_without_statistics": [],
              "fix": "gbrain repair planner-stats --apply",
              "missing_search_statistics": [],
              "stale": []
            },
            "elapsed_ms": "<volatile>",
            "message": "Planner statistics are fresh on 6 hot tables.",
            "name": "planner_stats_stale",
            "status": "ok"
          },
          {
            "category": "meta",
            "details": {
              "answers_recorded": 0,
              "docs": "docs/guides/retrieval-feedback.md",
              "enabled": false,
              "implicit": false,
              "influence": 0.1,
              "last_rating_at": null,
              "learn": true,
              "ratings_cited": 0,
              "ratings_explicit": 0,
              "top_client_share_7d": null,
              "weights": 0,
              "weights_off_neutral": 0
            },
            "elapsed_ms": "<volatile>",
            "message": "Retrieval feedback is off; rankings do not learn from ratings. Turn it on with: gbrain config set feedback.enabled true",
            "name": "retrieval_feedback_health",
            "status": "ok"
          },
          {
            "category": "meta",
            "details": {
              "column": "not_null",
              "failed": [],
              "pending": 0
            },
            "elapsed_ms": "<volatile>",
            "message": "Every page has its revision; the page revision backfill is complete.",
            "name": "revision_backfill",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "fix": {
              "actor": "agent",
              "argv": [
                "gbrain",
                "beliefs",
                "enable",
                "--source",
                "default",
                "--brain",
                "host"
              ],
              "command": "gbrain beliefs enable --source default --brain host",
              "consent": [],
              "docs": "https://github.com/garrytan/gbrain/blob/master/docs/designs/BELIEF_LEDGER.md#73-the-doctor-coverage-check",
              "next": "ask_user",
              "requires_exclusive": false,
              "user_message": "Do you want gbrain to keep a belief ledger (a recorded history of facts, takes and links) for this source?",
              "verify": {
                "argv": [
                  "gbrain",
                  "doctor",
                  "--only",
                  "belief_ledger_coverage",
                  "--json",
                  "--brain",
                  "host"
                ]
              },
              "why": "Enabling baselines every page of the source and records each later change; only a managed source is certified."
            },
            "message": "The belief ledger is off: no source records what this brain had recorded, and when.",
            "name": "belief_ledger_coverage",
            "readiness_state": "disabled_by_choice",
            "severity": "info",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "backfill": {
                "completed_at": "<ts>",
                "interrupted": false
              },
              "by_tier": {
                "agent_written": 0,
                "external_untrusted": 0,
                "operator_curated": 27,
                "tool_observed": 0,
                "unknown": 4,
                "user_confirmed": 0
              },
              "derived": {
                "external_pct": 0,
                "external_untrusted": 0,
                "rows": 0
              },
              "rows": 31,
              "tables": [
                {
                  "by_tier": {
                    "agent_written": 0,
                    "external_untrusted": 0,
                    "operator_curated": 19,
                    "tool_observed": 0,
                    "unknown": 1,
                    "user_confirmed": 0
                  },
                  "rows": 20,
                  "table": "pages"
                },
                {
                  "by_tier": {
                    "agent_written": 0,
                    "external_untrusted": 0,
                    "operator_curated": 3,
                    "tool_observed": 0,
                    "unknown": 0,
                    "user_confirmed": 0
                  },
                  "rows": 3,
                  "table": "facts"
                },
                {
                  "by_tier": {
                    "agent_written": 0,
                    "external_untrusted": 0,
                    "operator_curated": 0,
                    "tool_observed": 0,
                    "unknown": 0,
                    "user_confirmed": 0
                  },
                  "rows": 0,
                  "table": "takes"
                },
                {
                  "by_tier": {
                    "agent_written": 0,
                    "external_untrusted": 0,
                    "operator_curated": 5,
                    "tool_observed": 0,
                    "unknown": 3,
                    "user_confirmed": 0
                  },
                  "rows": 8,
                  "table": "timeline_entries"
                }
              ],
              "unknown_pages": 1,
              "unknown_pct": 12.9
            },
            "elapsed_ms": "<volatile>",
            "message": "12.9% of 31 row(s) have an unverified origin (unknown tier); the backfill has classified every row it has a signal for. Remote MCP readers see the 1 unverified-origin page(s) quoted as source material until the backfill classifies them or the owner claims their source (gbrain trust claim-sources); local reads are unchanged.",
            "name": "trust_tiers",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "docs": "docs/guides/repair.md#provenance",
              "sources": [],
              "truncated": false
            },
            "elapsed_ms": "<volatile>",
            "message": "No page has provenance stamps or a trust marker that another writer removed.",
            "name": "provenance_stamp_drift",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "completed_at": null,
              "detector_version": 2,
              "total_unscanned": 0,
              "unscanned": {
                "facts": 0,
                "pages": 0,
                "takes": 0,
                "timeline_entries": 0
              }
            },
            "elapsed_ms": "<volatile>",
            "message": "Every agent-written or lower row has been scanned by the current write-gate detector; flagged rows carry their flag, and proactive surfaces withhold them when trust.agent_activation is suppress.",
            "name": "trust_scan",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "legacy_unknown": 0,
              "pending": [],
              "unclaimed": []
            },
            "elapsed_ms": "<volatile>",
            "message": "No unclaimed source holds rows from before trust tiers.",
            "name": "trust_sources_unclaimed",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "items": [],
              "total": 0
            },
            "elapsed_ms": "<volatile>",
            "message": "No released fact was confirmed with fence-row fields its release preview did not show.",
            "name": "trust_release_unpreviewed_fields",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "bad_config": [],
              "chars_limit": 4000,
              "chars_used": 0,
              "compiled": [],
              "docs": "docs/guides/core-memory.md",
              "enabled": false,
              "pages": 0
            },
            "elapsed_ms": "<volatile>",
            "message": "Core memory is off (opt-in). If the user wants a profile loaded in every session: gbrain config set memory.core.enabled true, then gbrain core init.",
            "name": "core_memory",
            "status": "ok"
          },
          {
            "category": "ops",
            "details": {
              "consumers": [],
              "count": 0,
              "docs": "docs/guides/troubleshooting.md#two-consumers-on-host",
              "min_age_ms": "<volatile>"
            },
            "elapsed_ms": "<volatile>",
            "message": "No persistence consumer is running on this host.",
            "name": "two_consumers_on_host",
            "status": "ok"
          },
          {
            "category": "ops",
            "details": {
              "count": 0,
              "docs": "docs/guides/troubleshooting.md#two-consumers-on-host",
              "owners": []
            },
            "elapsed_ms": "<volatile>",
            "message": "Every owner of a live running claim on this host has a consumer heartbeat row.",
            "name": "consumers_without_heartbeat",
            "status": "ok"
          },
          {
            "category": "ops",
            "details": {
              "count": 0,
              "docs": "docs/guides/troubleshooting.md#host-identity-mismatch",
              "host_id": "<uuid>",
              "host_json_path": "<home>/.gbrain/persistence/host.json",
              "mismatches": []
            },
            "elapsed_ms": "<volatile>",
            "message": "This process's host identity (<home>/.gbrain/persistence/host.json) owns every binding this filesystem holds.",
            "name": "host_identity_mismatch",
            "status": "ok"
          },
          {
            "category": "ops",
            "details": "<live-census>",
            "elapsed_ms": "<volatile>",
            "message": "<live-census>",
            "name": "session_lane_budget",
            "status": "<live-census>"
          },
          {
            "category": "ops",
            "details": {
              "builds": [],
              "count": 0,
              "docs": "docs/guides/troubleshooting.md#runtime-build-skew",
              "earlier_job_children": 0,
              "job_children": [],
              "newest": null,
              "processes": [],
              "stale": [],
              "unknown_builds": []
            },
            "elapsed_ms": "<volatile>",
            "message": "No long-running gbrain process (serve, jobs supervisor, worker) is running on this host.",
            "name": "runtime_build_skew",
            "status": "ok"
          },
          {
            "category": "ops",
            "details": {
              "docs": "docs/guides/cli-socket.md",
              "refusals": 0
            },
            "elapsed_ms": "<volatile>",
            "message": "The warm CLI socket refused no CLI call in the last 24 hours.",
            "name": "cli_socket_refusals",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "code": "held_failed",
              "held": 0,
              "items": []
            },
            "elapsed_ms": "<volatile>",
            "message": "No managed atom page or transcript is held after repeated extraction failures.",
            "name": "extract_atoms_held_failed",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "pages": 0,
              "samples": []
            },
            "elapsed_ms": "<volatile>",
            "message": "No conversation page is held for an undetected format.",
            "name": "conversation_detection_ambiguous",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "groups": []
            },
            "elapsed_ms": "<volatile>",
            "message": "Every page extraction read all of its input (no head-only, tail-window or size-skip receipts).",
            "name": "extraction_input_truncated",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "models": []
            },
            "elapsed_ms": "<volatile>",
            "message": "No segmented page derivation is held back by a model without a price.",
            "name": "derivation_unpriced_model",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "by_source": [
                {
                  "count": 0,
                  "source_id": "default",
                  "status": "known"
                },
                {
                  "count": 0,
                  "source_id": "notes",
                  "status": "known"
                },
                {
                  "count": 0,
                  "source_id": "plain",
                  "status": "known"
                }
              ],
              "count": 0,
              "docs": "docs/guides/repair.md#ghost-pages",
              "exact": true,
              "inspected": 20,
              "samples": [],
              "truncated": false
            },
            "elapsed_ms": "<volatile>",
            "message": "No live page is missing its canonical file (20 page(s) inspected).",
            "name": "ghost_pages",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "docs": "docs/guides/repair.md#origin-twins",
              "index": "present"
            },
            "elapsed_ms": "<volatile>",
            "message": "pages_live_origin_key is present: no two live pages can record one file.",
            "name": "origin_twins",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "count": 0,
              "docs": "docs/guides/repair.md#slug-path-mismatch",
              "file_limit": 200,
              "files": {
                "file_missing": 0,
                "no_checkout": 0,
                "not_read": 0,
                "stamped": 0,
                "unstamped": 0
              },
              "inspected": 0,
              "samples": [],
              "scan_limit": 20000,
              "truncated": false
            },
            "elapsed_ms": "<volatile>",
            "message": "Every live page's slug is the one its recorded file path derives (0 candidate(s) inspected).",
            "name": "slug_path_mismatch",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "by_source": [],
              "count": 0,
              "docs": "docs/guides/live-sync.md#renaming-a-page",
              "samples": []
            },
            "elapsed_ms": "<volatile>",
            "message": "No rename that lost its page identity is waiting for a disposition.",
            "name": "rename_identity_downgrades",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "parked": 0
            },
            "elapsed_ms": "<volatile>",
            "message": "No soft-deleted page is parked by the managed purge.",
            "name": "purge_parked_pages",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "origins": [],
              "parked": 0
            },
            "elapsed_ms": "<volatile>",
            "message": "No soft-deleted page is kept from the purge to keep a page derived from it private.",
            "name": "derived_origin_parked",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "missing": 0,
              "path": "<home>/.gbrain/purge-events.jsonl",
              "recent": 0
            },
            "elapsed_ms": "<volatile>",
            "message": "No purge in the last 30 days to check against the purge mirror at <home>/.gbrain/purge-events.jsonl.",
            "name": "purge_mirror",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "sweeps": 0
            },
            "elapsed_ms": "<volatile>",
            "message": "No fact purge has a sweep of stored derivation results pending or stalled.",
            "name": "derivation_purge_sweeps",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "count": 0,
              "docs": "docs/storage-tiering.md#restoring-a-page-whose-file-is-gone",
              "sources": []
            },
            "elapsed_ms": "<volatile>",
            "message": "Not applicable: no source is a classic checkout on this host (managed sources are checked by ghost_pages).",
            "name": "missing_recorded_files",
            "readiness_state": "not_applicable",
            "severity": "info",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "docs": "docs/guides/repair.md#unindexed-files",
              "sources": [
                {
                  "source_id": "default",
                  "state": "missing"
                },
                {
                  "source_id": "notes",
                  "state": "missing"
                },
                {
                  "source_id": "plain",
                  "state": "missing"
                }
              ]
            },
            "elapsed_ms": "<volatile>",
            "fix": {
              "actor": "agent",
              "argv": [
                "gbrain",
                "sources",
                "retry-held",
                "default",
                "--unindexed",
                "--brain",
                "host"
              ],
              "command": "gbrain sources retry-held default --unindexed --brain host",
              "consent": [],
              "docs": "https://github.com/garrytan/gbrain/blob/master/docs/guides/repair.md#unindexed-files",
              "next": "run",
              "requires_exclusive": false,
              "then": {
                "actor": "agent",
                "argv": [
                  "gbrain",
                  "sync",
                  "--source",
                  "default",
                  "--no-pull",
                  "--brain",
                  "host"
                ],
                "command": "gbrain sync --source default --no-pull --brain host",
                "consent": [],
                "docs": "https://github.com/garrytan/gbrain/blob/master/docs/guides/repair.md#unindexed-files",
                "next": "run",
                "requires_exclusive": false,
                "verify": {
                  "argv": [
                    "gbrain",
                    "doctor",
                    "--only",
                    "unindexed_files",
                    "--json",
                    "--brain",
                    "host"
                  ]
                },
                "why": "The sync re-screens the scheduled files of default: each one that passes imports, each one that refuses is recorded as a hold that gbrain sources status default lists."
              },
              "verify": {
                "argv": [
                  "gbrain",
                  "doctor",
                  "--only",
                  "unindexed_files",
                  "--json",
                  "--brain",
                  "host"
                ]
              },
              "why": "Finds the committed files of default with no page and no hold (bounded; it continues an incomplete scan), schedules them for a re-screen and stores the result this check reads."
            },
            "message": "Unindexed files are not known for default (not computed yet), notes (not computed yet), plain (not computed yet). The maintenance phase unindexed_files computes them on each run and continues an incomplete scan; to compute them now, run gbrain sources retry-held <id> --unindexed.",
            "name": "unindexed_files",
            "readiness_state": "unknown",
            "severity": "info",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "count": 0,
              "docs": "docs/guides/repair.md#overwritten-edits",
              "sources": [],
              "truncated": false,
              "unknown": 0
            },
            "elapsed_ms": "<volatile>",
            "message": "No page shows a database edit that a sync import overwrote.",
            "name": "sync_overwritten_db_edits",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "count": 0,
              "docs": "docs/guides/repair.md#rows-behind",
              "sources": [
                {
                  "behind": 0,
                  "checkpoint": null,
                  "complete": true,
                  "counts": {},
                  "pages": 0,
                  "reason": "no_checkpoint",
                  "samples": [],
                  "source_id": "default",
                  "status": "not_applicable",
                  "stopped_at": null,
                  "unproven": 0,
                  "unproven_samples": []
                },
                {
                  "behind": 0,
                  "checkpoint": "<fixture-head>",
                  "complete": true,
                  "counts": {
                    "current": 18,
                    "database_moved": 1
                  },
                  "pages": 19,
                  "samples": [],
                  "source_id": "notes",
                  "status": "known",
                  "stopped_at": null,
                  "unproven": 0,
                  "unproven_samples": []
                },
                {
                  "behind": 0,
                  "checkpoint": null,
                  "complete": true,
                  "counts": {},
                  "pages": 0,
                  "reason": "no_checkpoint",
                  "samples": [],
                  "source_id": "plain",
                  "status": "not_applicable",
                  "stopped_at": null,
                  "unproven": 0,
                  "unproven_samples": []
                }
              ],
              "timeout_ms": "<volatile>",
              "unproven": 0
            },
            "elapsed_ms": "<volatile>",
            "message": "Every file-backed page holds its file as of the sync checkpoint (19 page(s) read).",
            "name": "sync_rows_behind_checkpoint",
            "status": "ok"
          },
          {
            "category": "meta",
            "details": {
              "rollback": [],
              "unapplied": []
            },
            "elapsed_ms": "<volatile>",
            "message": "No retired sync config key is stored on this brain.",
            "name": "sync_config_keys",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "capped": false,
              "pairs": [],
              "scanned": 0
            },
            "elapsed_ms": "<volatile>",
            "message": "No title-prefixed person page pairs with an unprefixed page (0 titled page(s) examined).",
            "name": "person_title_duplicates",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "docs": "docs/guides/write-refusals.md#file_database_drift",
              "sources": []
            },
            "elapsed_ms": "<volatile>",
            "message": "No local edit was adopted in the last 24 h.",
            "name": "local_edit_adoptions",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "docs": "docs/guides/repair.md#outside-content-fences",
              "items": [],
              "pages": 0
            },
            "elapsed_ms": "<volatile>",
            "message": "No fact, take or link is indexed from a fence on an imported email, calendar, GitHub or transcript page.",
            "name": "outside_content_fences",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "database_disabled": false,
              "docs": "docs/guides/troubleshooting.md#embedding-plane-disagreement",
              "file_disabled": true,
              "vector_tables": []
            },
            "elapsed_ms": "<volatile>",
            "message": "The config file disables embeddings and the database holds no vectors.",
            "name": "embedding_plane_disagreement",
            "status": "ok"
          },
          {
            "category": "ops",
            "details": {
              "bytes": 32768,
              "docs": "docs/mcp/ADMIN.md#request-log-retention",
              "retention_days": null,
              "rows": 0,
              "rows_exact": false
            },
            "elapsed_ms": "<volatile>",
            "fix": {
              "actor": "agent",
              "argv": [
                "gbrain",
                "config",
                "set",
                "cycle.purge.mcp_request_log_retention_days",
                "90",
                "--brain",
                "host"
              ],
              "command": "gbrain config set cycle.purge.mcp_request_log_retention_days 90 --brain host",
              "consent": [
                "destructive"
              ],
              "docs": "https://github.com/garrytan/gbrain/blob/master/docs/mcp/ADMIN.md#request-log-retention",
              "next": "ask_user",
              "requires_exclusive": false,
              "user_message": "Your MCP request log holds ~0 row(s) (0.0 MB) and nothing prunes it. Turn on 90-day retention? Request details older than 90 days (operation, status, parameters, errors) will be deleted and cannot be restored; per-client totals and audit rows are kept.",
              "verify": {
                "argv": [
                  "gbrain",
                  "doctor",
                  "--only",
                  "mcp_request_log_retention",
                  "--json",
                  "--brain",
                  "host"
                ]
              },
              "why": "Turns on the request-log prune: the next cycle purge phase (or, on a PGLite brain, a live serve within the hour) deletes request rows older than 90 days. Per-client lifetime totals and the audit rows (surface, memory-setting and access changes) are kept."
            },
            "message": "The MCP request log holds ~0 row(s) (0.0 MB); request-log retention is off, so it keeps every request.",
            "name": "mcp_request_log_retention",
            "readiness_state": "disabled_by_choice",
            "severity": "info",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "docs": "docs/guides/storage-manifest.md#doctor"
            },
            "elapsed_ms": "<volatile>",
            "message": "No storage shelf and no interim storage records on this brain.",
            "name": "storage_manifest",
            "readiness_state": "not_applicable",
            "severity": "info",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "message": "Every fact line on 0 facts page(s) carries a date.",
            "name": "facts_undated_lines",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "auto_repair": {
                "active": false,
                "enabled": true,
                "last_maintenance_at": null,
                "llm": true
              },
              "docs": "docs/guides/write-refusals.md#invalid_fence",
              "model_repair": {
                "max_usd_per_day": 1,
                "max_usd_per_page": 0.3,
                "reserved_today_usd": 0,
                "spent_today_usd": 0
              },
              "partial": false,
              "partial_sources": [],
              "sources": [
                {
                  "by_tier": {
                    "deterministic": 0,
                    "llm": 0,
                    "manual": 0,
                    "resolver": 0,
                    "total": 0
                  },
                  "files": {
                    "deterministic": 0,
                    "llm": 0,
                    "manual": 0,
                    "resolver": 0,
                    "total": 0
                  },
                  "holds": {
                    "deterministic": 0,
                    "llm": 0,
                    "manual": 0,
                    "resolver": 0,
                    "total": 0
                  },
                  "oldest_hold_at": null,
                  "pages": {
                    "deterministic": 0,
                    "llm": 0,
                    "manual": 0,
                    "resolver": 0,
                    "total": 0
                  },
                  "sample": [],
                  "scan": {
                    "backfill_done": true,
                    "checked_at": "<ts>",
                    "complete": true,
                    "fresh_at": "<ts>",
                    "walking": false
                  },
                  "source_id": "default",
                  "total": 0
                },
                {
                  "by_tier": {
                    "deterministic": 1,
                    "llm": 1,
                    "manual": 2,
                    "resolver": 0,
                    "total": 4
                  },
                  "files": {
                    "deterministic": 0,
                    "llm": 0,
                    "manual": 1,
                    "resolver": 0,
                    "total": 1
                  },
                  "holds": {
                    "deterministic": 0,
                    "llm": 1,
                    "manual": 1,
                    "resolver": 0,
                    "total": 2
                  },
                  "oldest_hold_at": "<ts>",
                  "pages": {
                    "deterministic": 1,
                    "llm": 0,
                    "manual": 0,
                    "resolver": 0,
                    "total": 1
                  },
                  "sample": [
                    {
                      "bucket": "file",
                      "key": "fences/late",
                      "path": "fences/late.md",
                      "reasons": [
                        "takes_kind_unsupported"
                      ],
                      "tier": "manual"
                    },
                    {
                      "bucket": "hold",
                      "key": "fences/llm",
                      "path": "fences/llm.md",
                      "reasons": [
                        "no_header"
                      ],
                      "tier": "llm"
                    },
                    {
                      "bucket": "hold",
                      "key": "fences/manual",
                      "path": "fences/manual.md",
                      "reasons": [
                        "takes_kind_unsupported"
                      ],
                      "tier": "manual"
                    },
                    {
                      "bucket": "page",
                      "key": "notes/stored-fence",
                      "path": "notes/stored-fence.md",
                      "reasons": [
                        "close_fence"
                      ],
                      "tier": "deterministic"
                    }
                  ],
                  "scan": {
                    "backfill_done": true,
                    "checked_at": "<ts>",
                    "complete": true,
                    "fresh_at": "<ts>",
                    "walking": false
                  },
                  "source_id": "notes",
                  "total": 4
                },
                {
                  "by_tier": {
                    "deterministic": 1,
                    "llm": 0,
                    "manual": 0,
                    "resolver": 0,
                    "total": 1
                  },
                  "files": {
                    "deterministic": 1,
                    "llm": 0,
                    "manual": 0,
                    "resolver": 0,
                    "total": 1
                  },
                  "holds": {
                    "deterministic": 0,
                    "llm": 0,
                    "manual": 0,
                    "resolver": 0,
                    "total": 0
                  },
                  "oldest_hold_at": null,
                  "pages": {
                    "deterministic": 0,
                    "llm": 0,
                    "manual": 0,
                    "resolver": 0,
                    "total": 0
                  },
                  "sample": [
                    {
                      "bucket": "file",
                      "key": "fence",
                      "path": "fence.md",
                      "reasons": [
                        "close_fence"
                      ],
                      "tier": "deterministic"
                    }
                  ],
                  "scan": {
                    "backfill_done": true,
                    "checked_at": "<ts>",
                    "complete": true,
                    "fresh_at": "<ts>",
                    "walking": false
                  },
                  "source_id": "plain",
                  "total": 1
                }
              ],
              "timeout_ms": "<volatile>",
              "total": 5,
              "trend": [
                {
                  "by_day": [],
                  "normalized_7d": 0,
                  "source_id": "default",
                  "top_writers": []
                },
                {
                  "by_day": [
                    {
                      "count": 1,
                      "day": "<sync-day>"
                    }
                  ],
                  "normalized_7d": 1,
                  "source_id": "notes",
                  "top_writers": [
                    {
                      "count": 1,
                      "writer": "fences/"
                    }
                  ]
                },
                {
                  "by_day": [],
                  "normalized_7d": 0,
                  "source_id": "plain",
                  "top_writers": []
                }
              ],
              "unbound_legacy_facts": {
                "pages": [],
                "total": 0
              },
              "uncommitted_repairs": 0,
              "unrenderable_legacy_facts": {
                "complete": true,
                "pages": [],
                "total": 0
              },
              "warn_at_normalized_7d": 20
            },
            "elapsed_ms": "<volatile>",
            "fix": {
              "actor": "agent",
              "argv": [
                "gbrain",
                "repair",
                "fences",
                "--source",
                "notes",
                "--brain",
                "host"
              ],
              "command": "gbrain repair fences --source notes --brain host",
              "consent": [],
              "docs": "https://github.com/garrytan/gbrain/blob/master/docs/guides/repair.md#fences",
              "next": "run",
              "requires_exclusive": false,
              "then": {
                "actor": "agent",
                "argv": [
                  "gbrain",
                  "repair",
                  "fences",
                  "--source",
                  "notes",
                  "--apply",
                  "--brain",
                  "host"
                ],
                "command": "gbrain repair fences --source notes --apply --brain host",
                "consent": [],
                "next": "run",
                "requires_exclusive": false,
                "verify": {
                  "argv": [
                    "gbrain",
                    "doctor",
                    "--only",
                    "fence_integrity",
                    "--json",
                    "--brain",
                    "host"
                  ]
                },
                "why": "Applies the current repair plan of notes; the command the preview prints adds --expect <hash>, which applies exactly what it showed."
              },
              "verify": {
                "argv": [
                  "gbrain",
                  "doctor",
                  "--only",
                  "fence_integrity",
                  "--json",
                  "--brain",
                  "host"
                ]
              },
              "why": "Previews the repair of each malformed fence of notes (read-only, no model call): its planned tier and diff, the estimated model cost, or the exact edit for a fence gbrain will not guess; it prints the apply command with --expect <hash>. They are not repaired automatically (no maintenance run has completed in the last 24 h), so apply the plan with the command the preview prints. 2 need a manual edit: make the edit the preview names in the file (or the page), commit, then sync."
            },
            "message": "5 malformed facts or takes fence(s) wait: notes: 2 held file(s), 1 stored page(s), 1 unsynced file(s) (by tier: deterministic 1, llm 1, manual 2); oldest hold 0 h old; plain: 1 unsynced file(s) (by tier: deterministic 1). The deterministic, resolver and model-tier ones are not repaired automatically (no maintenance run has completed in the last 24 h); 2 need the manual edit the preview names. None of them blocks a sync. Preview: gbrain repair fences --source notes; gbrain repair fences --source plain. Model repair caps: $0.30 per page, $1.00 per day ($0.00 spent today).",
            "name": "fence_integrity",
            "status": "warn"
          },
          {
            "category": "ops",
            "elapsed_ms": "<volatile>",
            "message": "Mode: conservative (no per-key overrides — mode bundle is canonical).",
            "name": "search_mode",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "configured": false,
              "global_tier": "none"
            },
            "elapsed_ms": "<volatile>",
            "message": "Not applicable: the configured contextual-retrieval tier is none, not per_chunk_synopsis.",
            "name": "synopsis_tier_coverage",
            "readiness_state": "not_applicable",
            "severity": "info",
            "status": "ok"
          },
          {
            "category": "brain",
            "details": {
              "counts": {},
              "prefixes": [
                "test/",
                "attachments/",
                ".raw/"
              ]
            },
            "elapsed_ms": "<volatile>",
            "message": "No pages hidden by search-exclude policy.",
            "name": "hidden_by_search_policy",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "message": "No retrieval-affecting files changed in working tree.",
            "name": "eval_drift",
            "status": "ok"
          },
          {
            "category": "ops",
            "elapsed_ms": "<volatile>",
            "message": "Reranker disabled — no failures expected",
            "name": "reranker_health",
            "status": "ok"
          },
          {
            "category": "ops",
            "elapsed_ms": "<volatile>",
            "message": "No exhausted batch retries in last 24h. Disconnect-call audit: 16 call(s) in 24h (most recent caller: <frame>).",
            "name": "batch_retry_health",
            "status": "ok"
          },
          {
            "category": "ops",
            "elapsed_ms": "<volatile>",
            "message": "No wedged queues",
            "name": "wedged_queue",
            "status": "ok"
          },
          {
            "category": "ops",
            "elapsed_ms": "<volatile>",
            "message": "No orphaned private queues",
            "name": "orphaned_private_queue",
            "status": "ok"
          },
          {
            "category": "ops",
            "elapsed_ms": "<volatile>",
            "message": "No supervisor observed — skipping fan-out/concurrency check",
            "name": "autopilot_fanout_concurrency",
            "status": "ok"
          },
          {
            "category": "ops",
            "elapsed_ms": "<volatile>",
            "message": "no Google accounts connected (gbrain google connect to start)",
            "name": "google_oauth",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "message": "graph_signals disabled — coverage not checked",
            "name": "graph_signals_coverage",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "message": "No junk entity hubs (pages with <=2 chunks and >1000 edges)",
            "name": "junk_entity_hubs",
            "status": "ok"
          },
          {
            "category": "ops",
            "elapsed_ms": "<volatile>",
            "message": "Migration v79 applied; tracking enabled. Calibration profile not yet generated — brainstorm/lsd will run unbiased until enough takes are resolved.",
            "name": "brainstorm_health",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "message": "2/2 bare wikilinks (100%) would resolve — below the 20% / 5-link threshold for surfacing a hint.",
            "name": "link_resolution_opportunity",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "message": "Embeddings disabled — no active embedding width to reconcile.",
            "name": "embedding_width_consistency",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "message": "gateway not configured — facts.embedding width check skipped.",
            "name": "facts_embedding_width_consistency",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "message": "Multi-source brain (2 non-default source(s)); all populated",
            "name": "source_routing_health",
            "status": "ok"
          },
          {
            "category": "ops",
            "elapsed_ms": "<volatile>",
            "message": "No OAuth clients registered",
            "name": "oauth_confidential_client_health",
            "status": "ok"
          },
          {
            "category": "ops",
            "elapsed_ms": "<volatile>",
            "message": "Scoped-client grants consistent (no dangling federated reads, no orphaned workspace sources, no privileged self-registered clients)",
            "name": "oauth_client_scope_health",
            "status": "ok"
          },
          {
            "category": "ops",
            "elapsed_ms": "<volatile>",
            "message": "Lock path: <home>/.gbrain/autopilot.lock",
            "name": "autopilot_lock_scope",
            "status": "ok"
          },
          {
            "category": "ops",
            "elapsed_ms": "<volatile>",
            "message": "No stale locks (no rows with ttl_expires_at < NOW())",
            "name": "stale_locks",
            "status": "ok"
          },
          {
            "category": "meta",
            "details": {
              "counts": {
                "global": 18,
                "mixed": 2,
                "source": 12
              },
              "phase_scope_map": {
                "backlinks": "source",
                "bookkeeping_gc": "global",
                "calibration_profile": "global",
                "chronicle": "global",
                "claim_conflicts": "global",
                "consolidate": "source",
                "content_repair": "global",
                "conversation_facts_backfill": "source",
                "drift": "global",
                "edge_contradictions": "global",
                "embed": "global",
                "enrich_thin": "source",
                "extract": "source",
                "extract_atoms": "source",
                "extract_facts": "source",
                "facts_drain": "global",
                "fence_repair": "global",
                "grade_takes": "global",
                "lint": "source",
                "orphans": "global",
                "patterns": "mixed",
                "propose_takes": "source",
                "purge": "global",
                "recompute_emotional_weight": "source",
                "resolve_symbol_edges": "global",
                "schema-suggest": "source",
                "skillopt": "global",
                "standing_questions": "global",
                "sync": "source",
                "synthesize": "mixed",
                "synthesize_concepts": "global",
                "unindexed_files": "global"
              }
            },
            "elapsed_ms": "<volatile>",
            "message": "Phase taxonomy: 12 source-scoped, 18 brain-global, 2 mixed. Source-safe: [lint, backlinks, sync, extract, extract_facts, extract_atoms, recompute_emotional_weight, consolidate, propose_takes, conversation_facts_backfill, enrich_thin, schema-suggest]. Brain-global: [fence_repair, content_repair, unindexed_files, resolve_symbol_edges, synthesize_concepts, grade_takes, calibration_profile, edge_contradictions, claim_conflicts, drift, standing_questions, chronicle, facts_drain, skillopt, embed, orphans, purge, bookkeeping_gc]. Mixed: [synthesize, patterns].",
            "name": "cycle_phase_scope",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "fix": {
              "actor": "user",
              "argv": [
                "gbrain",
                "init",
                "--force",
                "--embedding-model",
                "voyage:voyage-4",
                "--embedding-dimensions",
                "1024"
              ],
              "command": "gbrain init --force --embedding-model voyage:voyage-4 --embedding-dimensions 1024",
              "consent": [
                "credentials",
                "paid"
              ],
              "docs": "https://github.com/garrytan/gbrain/blob/master/docs/guides/search-modes.md",
              "inputs": [
                {
                  "how": "Ask the user for an API key for Voyage AI; store it with `gbrain config set voyage_api_key <key>` (every gbrain process reads it), or export VOYAGE_API_KEY in the environment of every gbrain process. Then run the command.",
                  "name": "VOYAGE_API_KEY"
                }
              ],
              "next": "tell_user_to_run",
              "requires_exclusive": true,
              "user_message": "Semantic search needs an embedding API key. Voyage AI works with this brain; if you add a key (VOYAGE_API_KEY), I can turn it on. Embedding costs a little per page; your notes and facts stay as they are.",
              "verify": {
                "argv": [
                  "gbrain",
                  "doctor",
                  "--only",
                  "embeddings",
                  "--json",
                  "--brain",
                  "host"
                ]
              },
              "why": "Embeddings are off, so search is keyword-only, and no configured embedding key fits this brain. Once the key is set this turns on voyage:voyage-4 (1024d) for this Postgres brain. Pages, facts and keyword search are kept; existing chunks and facts are queued for vectors, which `gbrain embed --stale` (or the next maintenance cycle) fills."
            },
            "message": "Not applicable: embeddings are disabled on this brain by choice, so chunks have no vectors by design (keyword search keeps working).",
            "name": "embed_staleness",
            "readiness_state": "disabled_by_choice",
            "severity": "info",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "message": "Only 2 entity pages (< 5) — coverage ratio not meaningful at this scale",
            "name": "entity_link_coverage",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "message": "Only 2 entity pages (< 5) — coverage ratio not meaningful at this scale",
            "name": "timeline_coverage",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "fix": {
              "actor": "agent",
              "argv": [
                "gbrain",
                "config",
                "set",
                "takes.bootstrap_enabled",
                "true",
                "--brain",
                "host"
              ],
              "command": "gbrain config set takes.bootstrap_enabled true --brain host",
              "consent": [
                "paid"
              ],
              "next": "ask_user",
              "requires_exclusive": false,
              "user_message": "gbrain can extract typed claims (\"takes\") from your pages so it can track calibration over time. It uses a paid chat model (roughly $5 once). Turn it on?",
              "verify": {
                "argv": [
                  "gbrain",
                  "doctor",
                  "--only",
                  "takes_count",
                  "--json",
                  "--brain",
                  "host"
                ]
              },
              "why": "Takes (typed claims) are opt-in. Enabling the bootstrap lets maintenance extract them from existing pages with a chat model (about $5 on a typical brain), which feeds calibration."
            },
            "message": "0 takes (takes.bootstrap_enabled is false; opt in to enable)",
            "name": "takes_count",
            "readiness_state": "disabled_by_choice",
            "severity": "info",
            "status": "ok"
          },
          {
            "category": "meta",
            "elapsed_ms": "<volatile>",
            "message": "Active pack [email protected]+e142684a is current (no successor declared)",
            "name": "pack_upgrade_available",
            "status": "ok"
          },
          {
            "category": "meta",
            "elapsed_ms": "<volatile>",
            "message": "5 distinct typed values (pack gbrain-base-v2 declares 25)",
            "name": "type_proliferation",
            "status": "ok"
          },
          {
            "category": "brain",
            "elapsed_ms": "<volatile>",
            "message": "No dangling aliases",
            "name": "dangling_aliases",
            "status": "ok"
          }
        ],
        "complete": true,
        "db_url_source": null,
        "elapsed_ms": "<volatile>",
        "engine": "postgres",
        "health_score": 35,
        "schema_version": 2,
        "status": "unhealthy",
        "tier": "standard",
        "top_issues": [
          {
            "action": {
              "actor": "agent",
              "argv": [
                "gbrain",
                "sync",
                "--source",
                "plain",
                "--no-pull",
                "--brain",
                "host"
              ],
              "command": "gbrain sync --source plain --no-pull --brain host",
              "consent": [],
              "docs": "https://github.com/garrytan/gbrain/blob/master/docs/guides/troubleshooting.md#sync-freshness-no-successful-sync",
              "next": "run",
              "requires_exclusive": false,
              "verify": {
                "argv": [
                  "gbrain",
                  "doctor",
                  "--only",
                  "sync_freshness",
                  "--json",
                  "--brain",
                  "host"
                ]
              },
              "why": "No successful sync of plain is recorded; this runs one and stamps last_sync_at when it succeeds."
            },
            "fix": "Source 'plain': no successful sync recorded; no attempt recorded; run `gbrain sync --source plain --no-pull`. 1 writer-owned canonical content source(s): upstream sync is not applicable; see canonical_content_writes for publication status",
            "name": "sync_freshness",
            "status": "fail",
            "tier": "root"
          },
          {
            "action": {
              "actor": "agent",
              "argv": [
                "gbrain",
                "doctor",
                "--remediation-plan",
                "--json",
                "--brain",
                "host"
              ],
              "command": "gbrain doctor --remediation-plan --json --brain host",
              "consent": [],
              "next": "run",
              "requires_exclusive": false,
              "verify": {
                "argv": [
                  "gbrain",
                  "doctor",
                  "--only",
                  "brain_score",
                  "--json",
                  "--brain",
                  "host"
                ]
              },
              "why": "The plan lists which steps raise each score component, what they cost and the reachable maximum; it changes nothing."
            },
            "fix": "Brain score 20/100 (embed 0/35, links 0/25, timeline density (entity and event pages) 10/15, orphans 0/15, dead-links 10/10)",
            "name": "brain_score",
            "status": "warn",
            "tier": "symptom"
          },
          {
            "action": {
              "actor": "agent",
              "argv": [
                "gbrain",
                "repair",
                "fences",
                "--source",
                "notes",
                "--brain",
                "host"
              ],
              "command": "gbrain repair fences --source notes --brain host",
              "consent": [],
              "docs": "https://github.com/garrytan/gbrain/blob/master/docs/guides/repair.md#fences",
              "next": "run",
              "requires_exclusive": false,
              "then": {
                "actor": "agent",
                "argv": [
                  "gbrain",
                  "repair",
                  "fences",
                  "--source",
                  "notes",
                  "--apply",
                  "--brain",
                  "host"
                ],
                "command": "gbrain repair fences --source notes --apply --brain host",
                "consent": [],
                "next": "run",
                "requires_exclusive": false,
                "verify": {
                  "argv": [
                    "gbrain",
                    "doctor",
                    "--only",
                    "fence_integrity",
                    "--json",
                    "--brain",
                    "host"
                  ]
                },
                "why": "Applies the current repair plan of notes; the command the preview prints adds --expect <hash>, which applies exactly what it showed."
              },
              "verify": {
                "argv": [
                  "gbrain",
                  "doctor",
                  "--only",
                  "fence_integrity",
                  "--json",
                  "--brain",
                  "host"
                ]
              },
              "why": "Previews the repair of each malformed fence of notes (read-only, no model call): its planned tier and diff, the estimated model cost, or the exact edit for a fence gbrain will not guess; it prints the apply command with --expect <hash>. They are not repaired automatically (no maintenance run has completed in the last 24 h), so apply the plan with the command the preview prints. 2 need a manual edit: make the edit the preview names in the file (or the page), commit, then sync."
            },
            "fix": "5 malformed facts or takes fence(s) wait: notes: 2 held file(s), 1 stored page(s), 1 unsynced file(s) (by tier: deterministic 1, llm 1, manual 2); oldest hold 0 h old; plain: 1 unsynced file(s) (by tier: deterministic 1). The deterministic, resolver and model-tier ones are not repaired automatically (no maintenance run has completed in the last 24 h); 2 need the manual edit the preview names. None of them blocks a sync. Preview: gbrain repair fences --source notes; gbrain repair fences --source plain. Model repair caps: $0.30 per page, $1.00 per day ($0.00 spent today).",
            "name": "fence_integrity",
            "status": "warn",
            "tier": "symptom"
          },
          {
            "fix": "20 frontmatter issue(s). notes: 19 (YAML_PARSE=9, EMPTY_FRONTMATTER=1, NESTED_QUOTES=2, MISSING_CLOSE=2, NON_STRING_FIELD=2, NULL_BYTES=2, SLUG_MISMATCH=1); plain: 1 (YAML_PARSE=1). Fix: gbrain repair frontmatter --source <id> previews the line fix for every file it can repair (and names the manual fix for the rest, such as a missing opening ---); on an unmanaged checkout gbrain frontmatter validate <source-path> --fix applies the same safe fixes",
            "name": "frontmatter_integrity",
            "status": "warn",
            "tier": "symptom"
          },
          {
            "action": {
              "actor": "agent",
              "argv": [
                "gbrain",
                "repair",
                "frontmatter",
                "--brain",
                "host"
              ],
              "command": "gbrain repair frontmatter --brain host",
              "consent": [],
              "docs": "https://github.com/garrytan/gbrain/blob/master/docs/guides/repair.md#frontmatter",
              "next": "run",
              "requires_exclusive": false,
              "verify": {
                "argv": [
                  "gbrain",
                  "doctor",
                  "--only",
                  "frontmatter_repairable",
                  "--json",
                  "--brain",
                  "host"
                ]
              },
              "why": "Previews the minimal line fix per file (safe quoting first; interpretations only with --include-ambiguous) and prints the hash-bound apply command; it writes nothing."
            },
            "fix": "14 file(s) have frontmatter gbrain repair frontmatter can fix: notes: 13 (FRONTMATTER_COMMENT_VALUE=1, needs_interpretation=4, NESTED_QUOTES=2, YAML_PARSE=3, MISSING_CLOSE=2, NULL_BYTES=2, SLUG_MISMATCH=1); plain: 1 (needs_interpretation=1). Preview with gbrain repair frontmatter --source notes; gbrain repair frontmatter --source plain (writes nothing; add --include-ambiguous for interpretations after the safe pass).",
            "name": "frontmatter_repairable",
            "status": "warn",
            "tier": "symptom"
          },
          {
            "action": {
              "actor": "agent",
              "argv": [
                "gbrain",
                "repair",
                "frontmatter",
                "--source",
                "notes",
                "--brain",
                "host"
              ],
              "command": "gbrain repair frontmatter --source notes --brain host",
              "consent": [],
              "docs": "https://github.com/garrytan/gbrain/blob/master/docs/guides/repair.md#held-files",
              "next": "run",
              "requires_exclusive": false,
              "verify": {
                "argv": [
                  "gbrain",
                  "doctor",
                  "--only",
                  "git_held_files",
                  "--json",
                  "--brain",
                  "host"
                ]
              },
              "why": "Previews the minimal line fix for each held file (or names the line to fix by hand) and prints the hash-bound apply command; it writes nothing."
            },
            "fix": "8 file(s) in Git sources are held and not imported; the rest of each sync continues. notes: 8 held (0 page(s) keep an older revision, 8 file(s) have no page), first: fences/llm.md [invalid_fence/no_header], fences/manual.md [invalid_fence/takes_kind_unsupported], fm/dash-line.md [invalid_frontmatter/needs_interpretation], fm/duplicate-key.md [invalid_frontmatter/needs_interpretation], fm/indented-close.md [invalid_frontmatter/yaml_parse]. A page whose newer file is held is read-only for put_page until the file is repaired, so do not retry a refused write. Inspect with gbrain sources status notes; then notes: preview the frontmatter and other fixes with gbrain repair frontmatter --source notes (writes nothing until a hash-bound apply); nothing repairs the fence and slug-conflict holds by itself (no maintenance run is active), so preview the content repairs with gbrain repair content --source notes (read-only, no model call: it lists each held file with its planned repair or the exact edit, kind by kind, and prints the apply command with --expect <hash>[,<hash>]), then run the apply command it prints.",
            "name": "git_held_files",
            "status": "warn",
            "tier": "symptom"
          },
          {
            "fix": "Source `notes`: 1 page(s) use 1 type(s) pack `gbrain-base-v2` neither declares nor aliases: '2024' (1). List them with `gbrain schema review-orphans --source notes`, then declare the type (`gbrain schema add-type <type>`, which takes its primitive and prefix) or retype the pages to a declared type.",
            "name": "schema_pack_consistency",
            "status": "warn",
            "tier": "symptom"
          },
          {
            "fix": "65 new built-in skill(s) available that this workspace hasn't installed: academic-verify, archive-crawler, article-enrichment, ask-user, blog-ingest, book-mirror, brain-ingest-gate, brain-link-discipline, … +57 more. Add them with `gbrain skillpack sync`.",
            "name": "skill_currency",
            "status": "warn",
            "tier": "symptom"
          },
          {
            "action": {
              "actor": "agent",
              "argv": [
                "gbrain",
                "projections",
                "drain",
                "--limit",
                "4800",
                "--brain",
                "host"
              ],
              "command": "gbrain projections drain --limit 4800 --brain host",
              "consent": [],
              "docs": "https://github.com/garrytan/gbrain/blob/master/docs/guides/repair.md#projection-drain",
              "next": "run",
              "preview_argv": [
                "gbrain",
                "projections",
                "drain",
                "--dry-run",
                "--json",
                "--brain",
                "host"
              ],
              "requires_exclusive": false,
              "verify": {
                "argv": [
                  "gbrain",
                  "projections",
                  "drain",
                  "--dry-run",
                  "--json",
                  "--brain",
                  "host"
                ]
              },
              "why": "Rebuilds queued Markdown and code projections and seals importer-attested image pages in place, at most 4800 pages per run; repeat until the dry run shows sealable 0."
            },
            "fix": "Visible pages have missing or stale text projections (1 queued Markdown/code page(s)); search and code results may be incomplete. Run `gbrain projections drain` to rebuild queued Markdown and code projections now; it is safe while `gbrain serve` runs on Postgres. For code metadata repair, run `gbrain reindex-code --force --no-embed`. If work stays pending, inspect the recorded source path. No repair or embedding was started by this check.",
            "name": "text_projection_readiness",
            "status": "warn",
            "tier": "symptom"
          },
          {
            "action": {
              "actor": "agent",
              "argv": [
                "gbrain",
                "repair",
                "timeline",
                "--brain",
                "host"
              ],
              "command": "gbrain repair timeline --brain host",
              "consent": [],
              "next": "run",
              "requires_exclusive": false,
              "verify": {
                "argv": [
                  "gbrain",
                  "doctor",
                  "--only",
                  "timeline_history",
                  "--json",
                  "--brain",
                  "host"
                ]
              },
              "why": "Previews the repair without changing anything and prints the exact apply command; applying rewrites stored records, so ask the user first."
            },
            "fix": "2 timeline row(s) on 2 page(s) exist only in the database. Preview: gbrain repair timeline — apply: gbrain repair timeline --apply. 1 other row(s) cannot round-trip and are kept as-is.",
            "name": "timeline_history",
            "status": "warn",
            "tier": "symptom"
          }
        ],
        "unknown_sections": []
      },
      "stderr": [
        "[gbrain] reading doctor checks; large brains can take minutes. Progress prints here every 10 s; the result prints on stdout when it is ready.",
        "[gbrain doctor] non-interactive run: the check run (not connect or migrations) is capped at 90000 ms (doctor.default_budget_ms); checks past it report health unknown. Off for one run: --budget-ms 0; off for good: gbrain config set doctor.default_budget_ms 0. On PGLite a statement already running cannot be stopped, so a check can finish late."
      ],
      "stdout": "<json>"
    }
  },
  "normalizer": "doctor-json-pg-v1"
}