Skip to content

Garry's Opinionated OpenClaw/Hermes Agent Brain

TypeScript
39.6 KB
Raw Blame
{
  "golden": {
    "args": [
      "doctor",
      "--json",
      "--skills-dir",
      "<home>/skills"
    ],
    "exit_code": 1,
    "report": {
      "alert": {
        "docs": "docs/guides/troubleshooting.md#doctor-alert",
        "items": [
          {
            "check": "connection",
            "code": "connection",
            "docs": "docs/guides/troubleshooting.md#doctor-alert-act",
            "fix": {
              "actor": "agent",
              "argv": [
                "gbrain",
                "db-repair",
                "--brain",
                "host"
              ],
              "command": "gbrain db-repair --brain host",
              "consent": [],
              "docs": "https://github.com/garrytan/gbrain/blob/master/docs/ENGINES.md#engine-detection-and-access-repair",
              "next": "run",
              "requires_exclusive": false,
              "verify": {
                "argv": [
                  "gbrain",
                  "doctor",
                  "--only",
                  "connection",
                  "--json",
                  "--brain",
                  "host"
                ]
              },
              "why": "Connection refused: nothing accepted the connection at the configured host and port. Check that the database server is running and that the URL names the right host and port. `gbrain db-repair` diagnoses the database URL and access without changing anything (it prints the --yes command for a safe fix)."
            },
            "message": "Cannot connect to database: connect ECONNREFUSED  <REDACTED:ipv4>:1. Fix: Check the database URL; `gbrain engine status --probe` names where it comes from (environment variable or the config file under GBRAIN_HOME) (database URL from database_url in <home>/.gbrain/config.json)",
            "status": "fail"
          }
        ],
        "level": "act",
        "unknown": [
          {
            "budget_ms": "<volatile>",
            "check": "schema_version",
            "code": "doctor_alert_unknown",
            "fix": {
              "actor": "agent",
              "argv": [
                "gbrain",
                "doctor",
                "--only",
                "schema_version",
                "--budget-ms",
                "0",
                "--json",
                "--brain",
                "host"
              ],
              "command": "gbrain doctor --only schema_version --budget-ms 0 --json --brain host",
              "consent": [],
              "docs": "https://github.com/garrytan/gbrain/blob/master/docs/guides/troubleshooting.md#doctor-alert",
              "next": "run",
              "requires_exclusive": false,
              "verify": {
                "argv": [
                  "gbrain",
                  "doctor",
                  "--only",
                  "schema_version",
                  "--json",
                  "--brain",
                  "host"
                ]
              },
              "why": "Measures only this check now, with no overall budget; read-only."
            },
            "message": "schema_version did not run (the database checks did not run, or this tier or report skips it), so its health is unknown, not clear. Measure it with gbrain doctor --only schema_version --budget-ms 0 --json --brain host, run the full tier (gbrain doctor --alert --tier standard --json) or raise the alert budget (--budget-ms).",
            "reason": "not_run"
          },
          {
            "budget_ms": "<volatile>",
            "check": "schema_missing_tables",
            "code": "doctor_alert_unknown",
            "fix": {
              "actor": "agent",
              "argv": [
                "gbrain",
                "doctor",
                "--only",
                "schema_missing_tables",
                "--budget-ms",
                "0",
                "--json",
                "--brain",
                "host"
              ],
              "command": "gbrain doctor --only schema_missing_tables --budget-ms 0 --json --brain host",
              "consent": [],
              "docs": "https://github.com/garrytan/gbrain/blob/master/docs/guides/troubleshooting.md#doctor-alert",
              "next": "run",
              "requires_exclusive": false,
              "verify": {
                "argv": [
                  "gbrain",
                  "doctor",
                  "--only",
                  "schema_missing_tables",
                  "--json",
                  "--brain",
                  "host"
                ]
              },
              "why": "Measures only this check now, with no overall budget; read-only."
            },
            "message": "schema_missing_tables did not run (the database checks did not run, or this tier or report skips it), so its health is unknown, not clear. Measure it with gbrain doctor --only schema_missing_tables --budget-ms 0 --json --brain host, run the full tier (gbrain doctor --alert --tier standard --json) or raise the alert budget (--budget-ms).",
            "reason": "not_run"
          },
          {
            "budget_ms": "<volatile>",
            "check": "minions_migration",
            "code": "doctor_alert_unknown",
            "fix": {
              "actor": "agent",
              "argv": [
                "gbrain",
                "doctor",
                "--only",
                "minions_migration",
                "--budget-ms",
                "0",
                "--json",
                "--brain",
                "host"
              ],
              "command": "gbrain doctor --only minions_migration --budget-ms 0 --json --brain host",
              "consent": [],
              "docs": "https://github.com/garrytan/gbrain/blob/master/docs/guides/troubleshooting.md#doctor-alert",
              "next": "run",
              "requires_exclusive": false,
              "verify": {
                "argv": [
                  "gbrain",
                  "doctor",
                  "--only",
                  "minions_migration",
                  "--json",
                  "--brain",
                  "host"
                ]
              },
              "why": "Measures only this check now, with no overall budget; read-only."
            },
            "message": "minions_migration did not run (the database checks did not run, or this tier or report skips it), so its health is unknown, not clear. Measure it with gbrain doctor --only minions_migration --budget-ms 0 --json --brain host, run the full tier (gbrain doctor --alert --tier standard --json) or raise the alert budget (--budget-ms).",
            "reason": "not_run"
          },
          {
            "budget_ms": "<volatile>",
            "check": "persistence_terminal_failures",
            "code": "doctor_alert_unknown",
            "fix": {
              "actor": "agent",
              "argv": [
                "gbrain",
                "doctor",
                "--only",
                "persistence_terminal_failures",
                "--budget-ms",
                "0",
                "--json",
                "--brain",
                "host"
              ],
              "command": "gbrain doctor --only persistence_terminal_failures --budget-ms 0 --json --brain host",
              "consent": [],
              "docs": "https://github.com/garrytan/gbrain/blob/master/docs/guides/troubleshooting.md#doctor-alert",
              "next": "run",
              "requires_exclusive": false,
              "verify": {
                "argv": [
                  "gbrain",
                  "doctor",
                  "--only",
                  "persistence_terminal_failures",
                  "--json",
                  "--brain",
                  "host"
                ]
              },
              "why": "Measures only this check now, with no overall budget; read-only."
            },
            "message": "persistence_terminal_failures did not run (the database checks did not run, or this tier or report skips it), so its health is unknown, not clear. Measure it with gbrain doctor --only persistence_terminal_failures --budget-ms 0 --json --brain host, run the full tier (gbrain doctor --alert --tier standard --json) or raise the alert budget (--budget-ms).",
            "reason": "not_run"
          },
          {
            "budget_ms": "<volatile>",
            "check": "persistence_write_stall",
            "code": "doctor_alert_unknown",
            "fix": {
              "actor": "agent",
              "argv": [
                "gbrain",
                "doctor",
                "--only",
                "persistence_write_stall",
                "--budget-ms",
                "0",
                "--json",
                "--brain",
                "host"
              ],
              "command": "gbrain doctor --only persistence_write_stall --budget-ms 0 --json --brain host",
              "consent": [],
              "docs": "https://github.com/garrytan/gbrain/blob/master/docs/guides/troubleshooting.md#doctor-alert",
              "next": "run",
              "requires_exclusive": false,
              "verify": {
                "argv": [
                  "gbrain",
                  "doctor",
                  "--only",
                  "persistence_write_stall",
                  "--json",
                  "--brain",
                  "host"
                ]
              },
              "why": "Measures only this check now, with no overall budget; read-only."
            },
            "message": "persistence_write_stall did not run (the database checks did not run, or this tier or report skips it), so its health is unknown, not clear. Measure it with gbrain doctor --only persistence_write_stall --budget-ms 0 --json --brain host, run the full tier (gbrain doctor --alert --tier standard --json) or raise the alert budget (--budget-ms).",
            "reason": "not_run"
          },
          {
            "budget_ms": "<volatile>",
            "check": "runtime_build_skew",
            "code": "doctor_alert_unknown",
            "fix": {
              "actor": "agent",
              "argv": [
                "gbrain",
                "doctor",
                "--only",
                "runtime_build_skew",
                "--budget-ms",
                "0",
                "--json",
                "--brain",
                "host"
              ],
              "command": "gbrain doctor --only runtime_build_skew --budget-ms 0 --json --brain host",
              "consent": [],
              "docs": "https://github.com/garrytan/gbrain/blob/master/docs/guides/troubleshooting.md#doctor-alert",
              "next": "run",
              "requires_exclusive": false,
              "verify": {
                "argv": [
                  "gbrain",
                  "doctor",
                  "--only",
                  "runtime_build_skew",
                  "--json",
                  "--brain",
                  "host"
                ]
              },
              "why": "Measures only this check now, with no overall budget; read-only."
            },
            "message": "runtime_build_skew did not run (the database checks did not run, or this tier or report skips it), so its health is unknown, not clear. Measure it with gbrain doctor --only runtime_build_skew --budget-ms 0 --json --brain host, run the full tier (gbrain doctor --alert --tier standard --json) or raise the alert budget (--budget-ms).",
            "reason": "not_run"
          },
          {
            "budget_ms": "<volatile>",
            "check": "managed_sync_blocked",
            "code": "doctor_alert_unknown",
            "fix": {
              "actor": "agent",
              "argv": [
                "gbrain",
                "doctor",
                "--only",
                "managed_sync_blocked",
                "--budget-ms",
                "0",
                "--json",
                "--brain",
                "host"
              ],
              "command": "gbrain doctor --only managed_sync_blocked --budget-ms 0 --json --brain host",
              "consent": [],
              "docs": "https://github.com/garrytan/gbrain/blob/master/docs/guides/troubleshooting.md#doctor-alert",
              "next": "run",
              "requires_exclusive": false,
              "verify": {
                "argv": [
                  "gbrain",
                  "doctor",
                  "--only",
                  "managed_sync_blocked",
                  "--json",
                  "--brain",
                  "host"
                ]
              },
              "why": "Measures only this check now, with no overall budget; read-only."
            },
            "message": "managed_sync_blocked did not run (the database checks did not run, or this tier or report skips it), so its health is unknown, not clear. Measure it with gbrain doctor --only managed_sync_blocked --budget-ms 0 --json --brain host, run the full tier (gbrain doctor --alert --tier standard --json) or raise the alert budget (--budget-ms).",
            "reason": "not_run"
          },
          {
            "budget_ms": "<volatile>",
            "check": "managed_sync_not_moving",
            "code": "doctor_alert_unknown",
            "fix": {
              "actor": "agent",
              "argv": [
                "gbrain",
                "doctor",
                "--only",
                "managed_sync_not_moving",
                "--budget-ms",
                "0",
                "--json",
                "--brain",
                "host"
              ],
              "command": "gbrain doctor --only managed_sync_not_moving --budget-ms 0 --json --brain host",
              "consent": [],
              "docs": "https://github.com/garrytan/gbrain/blob/master/docs/guides/troubleshooting.md#doctor-alert",
              "next": "run",
              "requires_exclusive": false,
              "verify": {
                "argv": [
                  "gbrain",
                  "doctor",
                  "--only",
                  "managed_sync_not_moving",
                  "--json",
                  "--brain",
                  "host"
                ]
              },
              "why": "Measures only this check now, with no overall budget; read-only."
            },
            "message": "managed_sync_not_moving did not run (the database checks did not run, or this tier or report skips it), so its health is unknown, not clear. Measure it with gbrain doctor --only managed_sync_not_moving --budget-ms 0 --json --brain host, run the full tier (gbrain doctor --alert --tier standard --json) or raise the alert budget (--budget-ms).",
            "reason": "not_run"
          },
          {
            "budget_ms": "<volatile>",
            "check": "global_maintenance_stalled",
            "code": "doctor_alert_unknown",
            "fix": {
              "actor": "agent",
              "argv": [
                "gbrain",
                "doctor",
                "--only",
                "global_maintenance_stalled",
                "--budget-ms",
                "0",
                "--json",
                "--brain",
                "host"
              ],
              "command": "gbrain doctor --only global_maintenance_stalled --budget-ms 0 --json --brain host",
              "consent": [],
              "docs": "https://github.com/garrytan/gbrain/blob/master/docs/guides/troubleshooting.md#doctor-alert",
              "next": "run",
              "requires_exclusive": false,
              "verify": {
                "argv": [
                  "gbrain",
                  "doctor",
                  "--only",
                  "global_maintenance_stalled",
                  "--json",
                  "--brain",
                  "host"
                ]
              },
              "why": "Measures only this check now, with no overall budget; read-only."
            },
            "message": "global_maintenance_stalled did not run (the database checks did not run, or this tier or report skips it), so its health is unknown, not clear. Measure it with gbrain doctor --only global_maintenance_stalled --budget-ms 0 --json --brain host, run the full tier (gbrain doctor --alert --tier standard --json) or raise the alert budget (--budget-ms).",
            "reason": "not_run"
          },
          {
            "budget_ms": "<volatile>",
            "check": "jsonb_integrity",
            "code": "doctor_alert_unknown",
            "fix": {
              "actor": "agent",
              "argv": [
                "gbrain",
                "doctor",
                "--only",
                "jsonb_integrity",
                "--budget-ms",
                "0",
                "--json",
                "--brain",
                "host"
              ],
              "command": "gbrain doctor --only jsonb_integrity --budget-ms 0 --json --brain host",
              "consent": [],
              "docs": "https://github.com/garrytan/gbrain/blob/master/docs/guides/troubleshooting.md#doctor-alert",
              "next": "run",
              "requires_exclusive": false,
              "verify": {
                "argv": [
                  "gbrain",
                  "doctor",
                  "--only",
                  "jsonb_integrity",
                  "--json",
                  "--brain",
                  "host"
                ]
              },
              "why": "Measures only this check now, with no overall budget; read-only."
            },
            "message": "jsonb_integrity did not run (the database checks did not run, or this tier or report skips it), so its health is unknown, not clear. Measure it with gbrain doctor --only jsonb_integrity --budget-ms 0 --json --brain host, run the full tier (gbrain doctor --alert --tier standard --json) or raise the alert budget (--budget-ms).",
            "reason": "not_run"
          },
          {
            "budget_ms": "<volatile>",
            "check": "rls",
            "code": "doctor_alert_unknown",
            "fix": {
              "actor": "agent",
              "argv": [
                "gbrain",
                "doctor",
                "--only",
                "rls",
                "--budget-ms",
                "0",
                "--json",
                "--brain",
                "host"
              ],
              "command": "gbrain doctor --only rls --budget-ms 0 --json --brain host",
              "consent": [],
              "docs": "https://github.com/garrytan/gbrain/blob/master/docs/guides/troubleshooting.md#doctor-alert",
              "next": "run",
              "requires_exclusive": false,
              "verify": {
                "argv": [
                  "gbrain",
                  "doctor",
                  "--only",
                  "rls",
                  "--json",
                  "--brain",
                  "host"
                ]
              },
              "why": "Measures only this check now, with no overall budget; read-only."
            },
            "message": "rls did not run (the database checks did not run, or this tier or report skips it), so its health is unknown, not clear. Measure it with gbrain doctor --only rls --budget-ms 0 --json --brain host, run the full tier (gbrain doctor --alert --tier standard --json) or raise the alert budget (--budget-ms).",
            "reason": "not_run"
          },
          {
            "budget_ms": "<volatile>",
            "check": "dream_paid_loop",
            "code": "doctor_alert_unknown",
            "fix": {
              "actor": "agent",
              "argv": [
                "gbrain",
                "doctor",
                "--only",
                "dream_paid_loop",
                "--budget-ms",
                "0",
                "--json",
                "--brain",
                "host"
              ],
              "command": "gbrain doctor --only dream_paid_loop --budget-ms 0 --json --brain host",
              "consent": [],
              "docs": "https://github.com/garrytan/gbrain/blob/master/docs/guides/troubleshooting.md#doctor-alert",
              "next": "run",
              "requires_exclusive": false,
              "verify": {
                "argv": [
                  "gbrain",
                  "doctor",
                  "--only",
                  "dream_paid_loop",
                  "--json",
                  "--brain",
                  "host"
                ]
              },
              "why": "Measures only this check now, with no overall budget; read-only."
            },
            "message": "dream_paid_loop did not run (the database checks did not run, or this tier or report skips it), so its health is unknown, not clear. Measure it with gbrain doctor --only dream_paid_loop --budget-ms 0 --json --brain host, run the full tier (gbrain doctor --alert --tier standard --json) or raise the alert budget (--budget-ms).",
            "reason": "not_run"
          },
          {
            "budget_ms": "<volatile>",
            "check": "dream_write_deferred",
            "code": "doctor_alert_unknown",
            "fix": {
              "actor": "agent",
              "argv": [
                "gbrain",
                "doctor",
                "--only",
                "dream_write_deferred",
                "--budget-ms",
                "0",
                "--json",
                "--brain",
                "host"
              ],
              "command": "gbrain doctor --only dream_write_deferred --budget-ms 0 --json --brain host",
              "consent": [],
              "docs": "https://github.com/garrytan/gbrain/blob/master/docs/guides/troubleshooting.md#doctor-alert",
              "next": "run",
              "requires_exclusive": false,
              "verify": {
                "argv": [
                  "gbrain",
                  "doctor",
                  "--only",
                  "dream_write_deferred",
                  "--json",
                  "--brain",
                  "host"
                ]
              },
              "why": "Measures only this check now, with no overall budget; read-only."
            },
            "message": "dream_write_deferred did not run (the database checks did not run, or this tier or report skips it), so its health is unknown, not clear. Measure it with gbrain doctor --only dream_write_deferred --budget-ms 0 --json --brain host, run the full tier (gbrain doctor --alert --tier standard --json) or raise the alert budget (--budget-ms).",
            "reason": "not_run"
          },
          {
            "budget_ms": "<volatile>",
            "check": "embedding_restamp_stalled",
            "code": "doctor_alert_unknown",
            "fix": {
              "actor": "agent",
              "argv": [
                "gbrain",
                "doctor",
                "--only",
                "embedding_restamp_stalled",
                "--budget-ms",
                "0",
                "--json",
                "--brain",
                "host"
              ],
              "command": "gbrain doctor --only embedding_restamp_stalled --budget-ms 0 --json --brain host",
              "consent": [],
              "docs": "https://github.com/garrytan/gbrain/blob/master/docs/guides/troubleshooting.md#doctor-alert",
              "next": "run",
              "requires_exclusive": false,
              "verify": {
                "argv": [
                  "gbrain",
                  "doctor",
                  "--only",
                  "embedding_restamp_stalled",
                  "--json",
                  "--brain",
                  "host"
                ]
              },
              "why": "Measures only this check now, with no overall budget; read-only."
            },
            "message": "embedding_restamp_stalled did not run (the database checks did not run, or this tier or report skips it), so its health is unknown, not clear. Measure it with gbrain doctor --only embedding_restamp_stalled --budget-ms 0 --json --brain host, run the full tier (gbrain doctor --alert --tier standard --json) or raise the alert budget (--budget-ms).",
            "reason": "not_run"
          }
        ]
      },
      "brain_checks_score": 100,
      "budget_ms": "<volatile>",
      "category_scores": {
        "brain": 100,
        "meta": 100,
        "ops": 80,
        "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",
          "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": "skill preconditions not checked (no connected brain)",
          "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": {
            "mode": "off",
            "mode_valid": true,
            "plane": "file-mirror-only",
            "transient_ttl": "3d",
            "ttl_valid": true
          },
          "elapsed_ms": "<volatile>",
          "message": "ambient writeback off (default; file-plane mirror — database unreachable)",
          "name": "memory_writeback",
          "status": "ok"
        },
        {
          "category": "ops",
          "elapsed_ms": "<volatile>",
          "message": "mode=notify",
          "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": "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": "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",
          "details": {
            "fix_hint": "Connection refused: nothing accepted the connection at the configured host and port. Check that the database server is running and that the URL names the right host and port. Run: gbrain db-repair",
            "reason": "conn_refused",
            "transient": true,
            "url_source": "database_url in <home>/.gbrain/config.json"
          },
          "elapsed_ms": "<volatile>",
          "fix": {
            "actor": "agent",
            "argv": [
              "gbrain",
              "db-repair",
              "--brain",
              "host"
            ],
            "command": "gbrain db-repair --brain host",
            "consent": [],
            "docs": "https://github.com/garrytan/gbrain/blob/master/docs/ENGINES.md#engine-detection-and-access-repair",
            "next": "run",
            "requires_exclusive": false,
            "verify": {
              "argv": [
                "gbrain",
                "doctor",
                "--only",
                "connection",
                "--json",
                "--brain",
                "host"
              ]
            },
            "why": "Connection refused: nothing accepted the connection at the configured host and port. Check that the database server is running and that the URL names the right host and port. `gbrain db-repair` diagnoses the database URL and access without changing anything (it prints the --yes command for a safe fix)."
          },
          "message": "Cannot connect to database: connect ECONNREFUSED  <REDACTED:ipv4>:1. Fix: Check the database URL; `gbrain engine status --probe` names where it comes from (environment variable or the config file under GBRAIN_HOME) (database URL from database_url in <home>/.gbrain/config.json)",
          "name": "connection",
          "readiness_state": "unknown",
          "status": "fail"
        }
      ],
      "complete": true,
      "db_url_source": "config-file",
      "elapsed_ms": "<volatile>",
      "health_score": 75,
      "schema_version": 2,
      "status": "unhealthy",
      "tier": "standard",
      "top_issues": [
        {
          "action": {
            "actor": "agent",
            "argv": [
              "gbrain",
              "db-repair",
              "--brain",
              "host"
            ],
            "command": "gbrain db-repair --brain host",
            "consent": [],
            "docs": "https://github.com/garrytan/gbrain/blob/master/docs/ENGINES.md#engine-detection-and-access-repair",
            "next": "run",
            "requires_exclusive": false,
            "verify": {
              "argv": [
                "gbrain",
                "doctor",
                "--only",
                "connection",
                "--json",
                "--brain",
                "host"
              ]
            },
            "why": "Connection refused: nothing accepted the connection at the configured host and port. Check that the database server is running and that the URL names the right host and port. `gbrain db-repair` diagnoses the database URL and access without changing anything (it prints the --yes command for a safe fix)."
          },
          "fix": "Connection refused: nothing accepted the connection at the configured host and port. Check that the database server is running and that the URL names the right host and port. Run: gbrain db-repair",
          "name": "connection",
          "status": "fail",
          "tier": "root"
        },
        {
          "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"
        }
      ],
      "unknown_scores": [
        "brain"
      ],
      "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.",
      "[doctor] DB-backed doctor run failed (Cannot connect to database: connect ECONNREFUSED  <REDACTED:ipv4>:1. Fix: Check the database URL; `gbrain engine status --probe` names where it comes from (environment variable or the config file under GBRAIN_HOME)) — falling back to filesystem-only checks",
      "GBRAIN_DB_ACCESS conn_refused",
      "Connection refused: nothing accepted the connection at the configured host and port. Check that the database server is running and that the URL names the right host and port. Run: gbrain db-repair",
      "[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-v1"
}