Skip to content

Add sctx doctor #176

Open
Open

Description

@mindsocket

Initial list of checks

  • config health check (exists)
  • when run in a folder, check if config discovery shadows a global space config relevant to that path. eg a foo/bar/baz space in global config but running doctor in foo/bar discovers a config in foo/.sctx.json -> global space ends up hidden under certain circumstances.

Activity

  1. mindsocket commented on Oct 27, 2026

    @mindsocket
    OwnerAuthor

    Design note from #192 (sctx spaces no longer audits spaces):

    • sctx spaces and the Claude Code session-start check now cover the config only. The per-space checks that used to run there (path exists, schema set, resolves and parses) were removed, so they are candidates for doctor.
    • Doctor should delegate rather than re-implement: a schema is checked by the schema loader, the config by the config loader, and a space's path by the plugin that reads it. A path is not always a local file (a plugin may read a URL), so core cannot judge it alone. That needs a way for a plugin to vouch for a path, which is a plugin-surface change and its own decision.
    • Doctor's value beyond what the owners already report is the specialist cross-cutting checks, such as the discovery-shadowing check listed above.
    • Existing code and fix text for the removed checks (E_SPACE_PATH_MISSING, E_SCHEMA_*, E_NO_SPACES) stay in src/config/health.ts for doctor to reuse.
    • sctx spaces add still requires the path to exist (src/config/write.ts), the same file-path assumption.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions