Problem
Leadtype has strong task-specific commands (generate, sync, lint, score) and machine-readable output, but no single read-only command that explains the resolved project before work begins.
As the config gains source acquisition, inheritance, mounts, navigation, redirects, agent surfaces, and compatibility aliases, users and coding agents need to answer questions such as:
- Which config file was discovered?
- Is this a local, remote, or multi-repo project?
- Which values were explicit, inferred, inherited, or deprecated?
- Which collections share a Git acquisition?
- Which source revision is currently cached?
- What public routes and output files will be produced?
- Are human and agent-facing navigation using the same graph?
- Which command fixes the current problem?
Blume’s doctor command is good inspiration, but Leadtype’s version should focus on its pipeline and supply-chain model.
Proposal
Add a read-only leadtype doctor command with concise human output and stable structured output via --json.
Checks should include:
Config
- discovered config path and config mode;
- schema errors, mutually exclusive fields, and deprecated aliases;
- explicit versus inferred values;
- source-owned inheritance with field-level provenance.
Sources
- local directories and config files exist;
- remote repository/ref/cache resolution;
- mutable versus pinned revisions;
- collections sharing one acquisition;
- whether sync is required or the cache is stale/missing;
- include/exclude patterns that match no content.
Routes and navigation
- route-prefix and mount collisions;
- unresolved, duplicate, or unrepresented pages;
- summary of the resolved navigation tree;
- human/agent navigation parity.
Outputs and integrations
- output root and expected artifacts;
- artifact freshness relative to config/content;
- enabled MCP/NLWeb/skills/robots/redirect/feed surfaces;
- detected framework adapter and obvious missing wiring where it can be checked safely.
UX requirements
- Read-only by default; no cloning, refreshing, rewriting, or generating.
- Every failure names the owning config field/file and a concrete next command.
- Exit
0 when healthy, non-zero when required inputs are invalid/missing.
--json uses stable issue IDs and includes provenance so agents can act without parsing prose.
- Warnings and failures should be reusable by config loading,
generate, and sync, rather than creating a separate validation implementation.
A later --fix mode can be considered separately after the diagnostics are proven.
Acceptance criteria
Problem
Leadtype has strong task-specific commands (
generate,sync,lint,score) and machine-readable output, but no single read-only command that explains the resolved project before work begins.As the config gains source acquisition, inheritance, mounts, navigation, redirects, agent surfaces, and compatibility aliases, users and coding agents need to answer questions such as:
Blume’s
doctorcommand is good inspiration, but Leadtype’s version should focus on its pipeline and supply-chain model.Proposal
Add a read-only
leadtype doctorcommand with concise human output and stable structured output via--json.Checks should include:
Config
Sources
Routes and navigation
Outputs and integrations
UX requirements
0when healthy, non-zero when required inputs are invalid/missing.--jsonuses stable issue IDs and includes provenance so agents can act without parsing prose.generate, andsync, rather than creating a separate validation implementation.A later
--fixmode can be considered separately after the diagnostics are proven.Acceptance criteria
leadtype doctorexplains config discovery, sources, routes, navigation, and output surfaces without mutating state.