Feature record

A safer path from symptom to repair.

Repo Doctor keeps diagnosis, explanation, repair, and verification in one deliberate workflow.

01

Diagnose

Ground every finding in real analysis.

Deterministic scanners inspect the repository before any AI runs, so the initial record comes from observable code structure rather than opinion alone.

DETERMINISTIC CHECKS

Broken imports
Dead files
Hardcoded secrets
Weak test coverage
02

Explain

Make the risk legible.

Each diagnosis pairs severity, confidence, affected files, and a plain-language root cause.

DIAGNOSIS / RD-027

Broken import in billing/summary.ts

WARNINGMedium confidence

AFFECTED FILES

  • billing/summary.ts :8
  • billing/index.ts :3

EVIDENCE

A local module path no longer resolves from the billing summary entry point.

WHY IT MATTERS

The screen can fail at runtime until the import path is corrected.

03

Repair

Treat one issue safely.

Each proposed treatment is isolated, reviewable, and gated by your approval before it can touch a repository.

TREATMENT PROTOCOL

  • Isolated working copy
  • Readable diff
  • Explicit approval
  • Full test re-run
BeforeAfter
// config/api.ts
export const apiConfig = {
  apiKey: process.env.REPO_DOCTOR_API_KEY,
  baseUrl: process.env.API_BASE_URL,
};
Before
// config/api.ts
export const apiConfig = {
  apiKey: "sk_live_7f3a...",
  baseUrl: "https://api.example.com",
};
Same file, before and after a Repo Doctor treatment.
04

Verify

Confirm the repair changed the record.

Before-and-after health scores make the result visible. Tests are re-run after every treatment, and no change is applied without approval.

VERIFICATION RECORD

BEFORE

58

Health Score

AFTER

82

Health Score