feat(doctor): make the site doctor framework-agnostic#686
Merged
Conversation
The site doctor was Laravel only. This rebuilds it as a framework-agnostic engine that runs a universal baseline for every site, the env file being present, env drift against the example, the application key, composer and node dependency install plus lockfile state, composer and npm security audits, and the PHP version range, alongside each framework's own checks declared in the lerd-frameworks store. The store checks are fully declarative through four typed evaluators (env_key_set, env_combo, symlink, command), so a framework gains doctor coverage by editing the store rather than Go, and Laravel's app_debug, storage_link, and migrations checks move into that model unchanged. The doctor is now available everywhere rather than gated to Laravel: the web button and the TUI tab show for every site, there is a new lerd site:doctor command with a --json flag, and the MCP diag tool gains a site_doctor action. Each check carries a readable label, and the dependency and audit findings expose a Fix button that runs an allowlisted package manager command (composer install, composer update, npm install, npm audit fix) through a loopback-only endpoint that streams its output into the existing command run modal. The Laravel doctor checks ship through the lerd-frameworks store, so this depends on the companion change adding the doctor sections to the Laravel store definitions.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #685.
The site doctor was Laravel only. This rebuilds it as a framework-agnostic engine that runs a universal baseline for every site, the env file being present, env drift against the example, the application key, composer and node dependency install plus lockfile state, composer and npm security audits, and the PHP version range, alongside each framework's own checks declared in the lerd-frameworks store. The store checks are fully declarative through four typed evaluators, env_key_set, env_combo, symlink, and command, so a framework gains doctor coverage by editing the store rather than Go, and Laravel's app_debug, storage_link, and migrations checks move into that model unchanged.
The doctor is now available everywhere rather than gated to Laravel: the web button and the TUI tab show for every site, there is a new lerd site:doctor command with a --json flag, and the MCP diag tool gains a site_doctor action. Each check carries a readable label, and the dependency and audit findings expose a Fix button that runs an allowlisted package manager command through a loopback-only endpoint that streams its output into the existing command run modal.
The Laravel doctor checks ship through the lerd-frameworks store, so this depends on a companion change adding the doctor sections to the Laravel store definitions.