feat(doctor): implement doctor engine and markdown reporter#4
Merged
Conversation
Add Module interface with Name() and Run() methods for registering audit modules. Add Registry struct for managing module registration. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add Engine struct with RunAll() that iterates through registered modules and collects results. Handles partial failures gracefully, continuing execution even when individual modules fail. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add Summary struct with counts by severity and weighted score. Add ComputeSummary(), HighestSeverity(), and ExitCode() functions. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Implement doctor command with module registration for AWS, Docker, Terraform, and Git. Aggregates results and computes summary with severity scoring. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add unit tests for module registration, duplicate registration, nil module, running all modules, and partial failure handling. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add MarkdownReporter implementing the Reporter interface for generating markdown-formatted audit reports with severity, check, resource, and message columns. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
5 tasks
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.
Summary
Implements the doctor aggregator module and markdown report output for
devopsctl.internal/doctor/registry.go): definesModuleinterface and registry for all audit modulesinternal/doctor/engine.go): runs all registered modules, collects results, handles failures gracefullyinternal/doctor/scoring.go): aggregates results into an overall severity score and summaryinternal/doctor/engine_test.go): tests for orchestrator logic, module registration, and error handlinginternal/cli/doctor.go):devopsctl doctorcommand wired to engineinternal/reporter/markdown.go): outputs check results as a structured markdown reportTest plan
go build ./...passesgo test ./...passes (all doctor package tests green)go vet ./...produces no warningsdevopsctl doctorcommand aggregates all modules and outputs results🤖 Generated with Claude Code