Skip to content

feat(doctor): implement doctor engine and markdown reporter#4

Merged
kaustuvbot merged 6 commits into
mainfrom
feat/doctor-module
Feb 22, 2026
Merged

feat(doctor): implement doctor engine and markdown reporter#4
kaustuvbot merged 6 commits into
mainfrom
feat/doctor-module

Conversation

@kaustuvbot
Copy link
Copy Markdown
Owner

Summary

Implements the doctor aggregator module and markdown report output for devopsctl.

  • Module registry & interface (internal/doctor/registry.go): defines Module interface and registry for all audit modules
  • Orchestrator engine (internal/doctor/engine.go): runs all registered modules, collects results, handles failures gracefully
  • Severity scoring (internal/doctor/scoring.go): aggregates results into an overall severity score and summary
  • Unit tests (internal/doctor/engine_test.go): tests for orchestrator logic, module registration, and error handling
  • CLI wiring (internal/cli/doctor.go): devopsctl doctor command wired to engine
  • Markdown reporter (internal/reporter/markdown.go): outputs check results as a structured markdown report

Test plan

  • go build ./... passes
  • go test ./... passes (all doctor package tests green)
  • go vet ./... produces no warnings
  • devopsctl doctor command aggregates all modules and outputs results

Note: Merge after feat/git-module (PR #1). PR #3 (config toggles + colored output) follows this.

🤖 Generated with Claude Code

kaustuvbot and others added 6 commits February 22, 2026 10:21
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>
@kaustuvbot kaustuvbot merged commit 5d85925 into main Feb 22, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant