Skip to content

docs: add Mintlify site and guides#4

Merged
omsherikar merged 1 commit intomainfrom
docs/mintlify-documentation
Apr 4, 2026
Merged

docs: add Mintlify site and guides#4
omsherikar merged 1 commit intomainfrom
docs/mintlify-documentation

Conversation

@omsherikar
Copy link
Copy Markdown
Contributor

@omsherikar omsherikar commented Apr 4, 2026

Summary by CodeRabbit

  • Documentation
    • Added comprehensive API reference documentation covering adapters, models, and orchestrator interfaces
    • Added CLI command guides for analyze, autofix, verification, sessions, and issue browser
    • Added concept guides explaining blast radius, work sessions, temporal analysis, and verification engine
    • Added configuration guide with schema and examples
    • Added language-specific guides for Python and TypeScript
    • Added introduction and quickstart documentation with usage examples
    • Configured documentation site structure and navigation

Copilot AI review requested due to automatic review settings April 4, 2026 20:01
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 4, 2026

📝 Walkthrough

Walkthrough

This pull request introduces comprehensive documentation for Refactron across API references, CLI commands, core concepts, configuration guides, quick-start materials, and language adapters. All changes are documentation-only, using Mintlify as the site generator with a structured navigation layout across "Getting Started," "Core Concepts," "CLI," "Languages," and "API Reference" sections.

Changes

Cohort / File(s) Summary
API Documentation
docs/api/adapters.mdx, docs/api/models.mdx, docs/api/orchestrator.mdx, docs/api/overview.mdx
Documents TypeScript API surface including ILanguageAdapter interface, core data models (CodeIssue, BlastRadius, TemporalProfile, AnalysisResult, VerificationResult), Orchestrator class public methods, and published package layout with stability guidance.
CLI Command Documentation
docs/cli/analyze.mdx, docs/cli/autofix.mdx, docs/cli/issue-browser.mdx, docs/cli/other-commands.mdx, docs/cli/overview.mdx, docs/cli/session.mdx, docs/cli/verify.mdx
Defines all CLI/REPL commands (analyze, autofix, verify, session, issues, diff, rollback, login, logout, etc.), their syntax, flags, behavior, output format, and control flow including verification gates and atomic writes.
Core Concepts
docs/concepts/blast-radius.mdx, docs/concepts/sessions.mdx, docs/concepts/temporal-analysis.mdx, docs/concepts/verification.mdx
Documents key architectural concepts: blast radius scoring (weighted file/function/test coverage), work session lifecycle, optional Git-driven temporal enrichment, and verification engine with check selection by risk level.
Configuration & Introduction
docs/configuration.mdx, docs/introduction.mdx, docs/quickstart.mdx
Covers refactron.yaml schema (analyzers, verification, autofix, output), high-level tool overview with differentiators table, and step-by-step quick-start including installation, authentication, and typical workflow examples.
Language Adapters
docs/languages/python.mdx, docs/languages/typescript.mdx
Documents Python and TypeScript adapter selection criteria, analysis capabilities, auto-fix transform sets, verification flows, and runtime requirements.
Documentation Configuration
docs/mint.json
Mintlify site configuration defining branding, navigation structure, footer links, and top-bar CTA.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐰 Hop along, dear docs so bright,
New pages arranged just right!
From CLI to API's gleaming glow,
Safe refactoring seeds we sow!

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'docs: add Mintlify site and guides' accurately describes the main change: adding comprehensive Mintlify documentation site configuration and multiple documentation guide files covering API, CLI, concepts, languages, and introduction pages.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/mintlify-documentation

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 6

♻️ Duplicate comments (1)
docs/introduction.mdx (1)

90-92: ⚠️ Potential issue | 🔴 Critical

Verification flow diagram contradicts the implementation.

The diagram shows:

Blast trivial → syntax only
Blast medium  → syntax+imports
Blast critical→ full test suite

This implies three-tier gating, but the actual implementation is binary:

  • Trivial → syntax only
  • All other levels (low, medium, high, critical) → syntax + imports + test gate

This is the same inconsistency flagged in docs/cli/verify.mdx. The verification engine does not implement a medium threshold for imports or a high/critical threshold for the test gate.

📝 Proposed fix
   Verification Engine
   ┌─────────────────────────────────┐
-  │  Blast trivial → syntax only    │
-  │  Blast medium  → syntax+imports │
-  │  Blast critical→ full test suite│
+  │  Trivial blast → syntax only    │
+  │  All other levels → syntax,     │
+  │    imports, and full test suite │
   └─────────────────────────────────┘
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/introduction.mdx` around lines 90 - 92, Update the verification flow
diagram so it matches the actual binary gating implemented by the verification
engine: replace the three-line tiered mapping ("Blast trivial → syntax only",
"Blast medium → syntax+imports", "Blast critical→ full test suite") with a
two-tier mapping that shows "Blast trivial → syntax only" and "All other levels
(low, medium, high, critical) → syntax + imports + test gate"; make the same
correction in the corresponding docs/cli/verify.mdx diagram/text so both docs
reflect the verification engine behavior (i.e., there is no medium/high/critical
threshold for tests).
🧹 Nitpick comments (1)
docs/quickstart.mdx (1)

30-30: Avoid brittle hardcoded operational numbers in Quickstart.

0.1.0-beta.2 and “Run 7 analyzers” can drift quickly and create doc/code mismatch. Prefer placeholders or wording that doesn’t encode volatile values.

Suggested doc tweak
 refactron --version
-# 0.1.0-beta.2
+# x.y.z
-2. Run 7 analyzers in parallel
+2. Run multiple analyzers in parallel

Also applies to: 64-64

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/quickstart.mdx` at line 30, Replace the hardcoded release/version and
analyzer count in the quickstart header and text (e.g., "0.1.0-beta.2" and "Run
7 analyzers") with non‑brittle wording or placeholders: update the header to a
generic version token like "vX.Y.Z" or "current version" and change the sentence
"Run 7 analyzers" to something like "Run the configured analyzers" or "Run N
analyzers" (or use a template variable such as {ANALYZER_COUNT}) so
documentation does not encode volatile numeric values.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@docs/cli/verify.mdx`:
- Around line 24-25: The docs incorrectly state thresholded gating; update the
documentation text in docs/cli/verify.mdx to match the implementation: state
that selectChecks runs only syntaxCheck for blast.level === 'trivial' and runs
syntaxCheck, importsCheck and testGate for any non-trivial levels (low, medium,
high, critical); reference the selectChecks function and the symbols
syntaxCheck, importsCheck, testGate and blast.level from
src/verification/engine.ts so readers understand the exact behavior.

In `@docs/concepts/blast-radius.mdx`:
- Around line 40-47: Update the documented score ranges in
docs/concepts/blast-radius.mdx so they match the implementation in
src/analysis/blast-radius.ts: change the Level ranges to trivial = 0, low =
1–19, medium = 20–49, high = 50–74, and critical = 75–100 (keep the Verification
descriptions as appropriate). Reference the named levels trivial, low, medium,
high, critical in the table to ensure consistency with the constants/logic in
blast-radius.ts.

In `@docs/concepts/verification.mdx`:
- Line 59: The docs incorrectly state tests run only for `high`/`critical`;
update docs/concepts/verification.mdx (the sentence at line ~59 and the table at
~65-72) to match runtime behavior in src/verification/engine.ts (the test gate
logic around lines 55-64) by documenting that the test gate executes for every
blast level except `trivial` (i.e., `low`, `medium`, `high`, and `critical` run
the test suite), and adjust the table entries to mark `low`/`medium` as running
tests rather than "no test suite".
- Around line 134-136: The documentation example showing backup filenames with a
“.bak” suffix is inconsistent with the actual backup implementation in
src/infrastructure/backup.ts (the backup routine that stores files under their
original basename); update docs/concepts/verification.mdx to show the real
filenames (remove the “.bak” suffix) in the example code block so the doc
matches the code, or alternatively explicitly note the naming difference and
show both formats if you intend to keep the current names in code.

In `@docs/languages/python.mdx`:
- Line 20: Update the Python docs to accurately list only the implemented fixers
by replacing the current sentence in docs/languages/python.mdx with a statement
that the Python adapter currently supports only the "unused-imports" and
"trailing-whitespace" fixers; reference the implementation in
src/adapters/python/fixer.ts where the handler checks issue.fixerName ===
'unused-imports' and issue.fixerName === 'trailing-whitespace' so readers see
the source of truth and remove mentions of unimplemented fixers like dead code,
type hints, f-string safety, and import sorting.

In `@docs/languages/typescript.mdx`:
- Line 30: The docs line claiming "vitest or jest auto-detection" is inaccurate
because the TypeScript adapter's test-run invocation currently only runs vitest
(see the test-run block that invokes vitest in the TypeScript adapter), so
update the sentence in docs/languages/typescript.mdx to say that only vitest
auto-detection is implemented (remove or rephrase any mention of jest
auto-detection) and make the wording explicit that jest is not currently
supported by the adapter's test-run code.

---

Duplicate comments:
In `@docs/introduction.mdx`:
- Around line 90-92: Update the verification flow diagram so it matches the
actual binary gating implemented by the verification engine: replace the
three-line tiered mapping ("Blast trivial → syntax only", "Blast medium →
syntax+imports", "Blast critical→ full test suite") with a two-tier mapping that
shows "Blast trivial → syntax only" and "All other levels (low, medium, high,
critical) → syntax + imports + test gate"; make the same correction in the
corresponding docs/cli/verify.mdx diagram/text so both docs reflect the
verification engine behavior (i.e., there is no medium/high/critical threshold
for tests).

---

Nitpick comments:
In `@docs/quickstart.mdx`:
- Line 30: Replace the hardcoded release/version and analyzer count in the
quickstart header and text (e.g., "0.1.0-beta.2" and "Run 7 analyzers") with
non‑brittle wording or placeholders: update the header to a generic version
token like "vX.Y.Z" or "current version" and change the sentence "Run 7
analyzers" to something like "Run the configured analyzers" or "Run N analyzers"
(or use a template variable such as {ANALYZER_COUNT}) so documentation does not
encode volatile numeric values.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: af973e3f-1bbe-4206-827c-3c9ec2cee6b8

📥 Commits

Reviewing files that changed from the base of the PR and between 81c28a1 and 22c0e71.

📒 Files selected for processing (21)
  • docs/api/adapters.mdx
  • docs/api/models.mdx
  • docs/api/orchestrator.mdx
  • docs/api/overview.mdx
  • docs/cli/analyze.mdx
  • docs/cli/autofix.mdx
  • docs/cli/issue-browser.mdx
  • docs/cli/other-commands.mdx
  • docs/cli/overview.mdx
  • docs/cli/session.mdx
  • docs/cli/verify.mdx
  • docs/concepts/blast-radius.mdx
  • docs/concepts/sessions.mdx
  • docs/concepts/temporal-analysis.mdx
  • docs/concepts/verification.mdx
  • docs/configuration.mdx
  • docs/introduction.mdx
  • docs/languages/python.mdx
  • docs/languages/typescript.mdx
  • docs/mint.json
  • docs/quickstart.mdx

Comment on lines +24 to +25
- Import resolution (at medium+ blast)
- Test gate (at high / critical blast)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

Documentation contradicts the actual implementation.

The documentation claims checks are gated by specific blast level thresholds:

  • "Import resolution (at medium+ blast)"
  • "Test gate (at high / critical blast)"

However, the actual selectChecks implementation (see src/verification/engine.ts:55-64) uses binary logic:

if (blast.level === 'trivial') {
  return [this.syntaxCheck];
}
return [this.syntaxCheck, this.importsCheck, testGate];

The code runs all three checks (syntax, imports, test gate) for any blast level that is not trivial—including low and medium. There are no threshold comparisons for medium+ or high/critical as documented.

📝 Proposed fix to align documentation with implementation
-The verification engine runs checks based on **blast radius** (see [Verification engine](/concepts/verification)):
-
-- Syntax
-- Import resolution (at medium+ blast)
-- Test gate (at high / critical blast)
+The verification engine runs checks based on **blast radius** (see [Verification engine](/concepts/verification)):
+
+- **Trivial blast** — Syntax only
+- **All other levels** (low, medium, high, critical) — Syntax, import resolution, and test gate
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/cli/verify.mdx` around lines 24 - 25, The docs incorrectly state
thresholded gating; update the documentation text in docs/cli/verify.mdx to
match the implementation: state that selectChecks runs only syntaxCheck for
blast.level === 'trivial' and runs syntaxCheck, importsCheck and testGate for
any non-trivial levels (low, medium, high, critical); reference the selectChecks
function and the symbols syntaxCheck, importsCheck, testGate and blast.level
from src/verification/engine.ts so readers understand the exact behavior.

Comment on lines +40 to +47
| Level | Score | Verification |
|-------|-------|-------------|
| `trivial` | 0–10 | Syntax check only |
| `low` | 11–25 | Syntax check only |
| `medium` | 26–50 | Syntax + import resolution |
| `high` | 51–75 | Syntax + imports + test gate |
| `critical` | 76–100 | Full: syntax + imports + test suite (120s timeout) |

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Blast-level score ranges do not match implementation.

The table currently documents trivial: 0–10, low: 11–25, etc., but src/analysis/blast-radius.ts uses trivial=0, low=1–19, medium=20–49, high=50–74, critical=75–100. Please align the ranges to avoid incorrect risk interpretation in docs.

Proposed fix
 | Level | Score | Verification |
 |-------|-------|-------------|
-| `trivial` | 0–10 | Syntax check only |
-| `low` | 11–25 | Syntax check only |
-| `medium` | 26–50 | Syntax + import resolution |
-| `high` | 51–75 | Syntax + imports + test gate |
-| `critical` | 76–100 | Full: syntax + imports + test suite (120s timeout) |
+| `trivial` | 0 | Syntax check only |
+| `low` | 1–19 | Syntax + imports + test gate |
+| `medium` | 20–49 | Syntax + imports + test gate |
+| `high` | 50–74 | Syntax + imports + test gate |
+| `critical` | 75–100 | Full: syntax + imports + test suite (120s timeout) |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/concepts/blast-radius.mdx` around lines 40 - 47, Update the documented
score ranges in docs/concepts/blast-radius.mdx so they match the implementation
in src/analysis/blast-radius.ts: change the Level ranges to trivial = 0, low =
1–19, medium = 20–49, high = 50–74, and critical = 75–100 (keep the Verification
descriptions as appropriate). Reference the named levels trivial, low, medium,
high, critical in the table to ensure consistency with the constants/logic in
blast-radius.ts.

- **Python:** runs `pytest` with a 45s timeout (120s for critical blast)
- **TypeScript:** runs `vitest` or `jest` (auto-detected)

This is the most expensive check and only runs for `high` and `critical` blast radius issues.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Verification gating by blast level is documented incorrectly.

Implementation (src/verification/engine.ts:55-64) runs test gate for every non-trivial blast level. Current docs say tests are only for high/critical, and the table marks low/medium as no test suite. Please update to match runtime behavior.

Proposed fix
-This is the most expensive check and only runs for `high` and `critical` blast radius issues.
+This is the most expensive check and runs for all non-`trivial` blast radius issues.
 | Blast Level | Syntax | Imports | Test Suite |
 |-------------|--------|---------|------------|
 | `trivial` | ✓ | — | — |
-| `low` | ✓ | — | — |
-| `medium` | ✓ | ✓ | — |
+| `low` | ✓ | ✓ | ✓ |
+| `medium` | ✓ | ✓ | ✓ |
 | `high` | ✓ | ✓ | ✓ |
 | `critical` | ✓ | ✓ | ✓ (120s) |

Also applies to: 65-72

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/concepts/verification.mdx` at line 59, The docs incorrectly state tests
run only for `high`/`critical`; update docs/concepts/verification.mdx (the
sentence at line ~59 and the table at ~65-72) to match runtime behavior in
src/verification/engine.ts (the test gate logic around lines 55-64) by
documenting that the test gate executes for every blast level except `trivial`
(i.e., `low`, `medium`, `high`, and `critical` run the test suite), and adjust
the table entries to mark `low`/`medium` as running tests rather than "no test
suite".

Comment on lines +134 to +136
src/auth/token.ts.bak
src/api/routes.ts.bak
```
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Backup filename example does not match current backup implementation.

The docs show *.bak backup names, but src/infrastructure/backup.ts:7-31 stores backups with the original basename (no .bak suffix). Aligning this prevents operator confusion during manual recovery.

Proposed fix
 .refactron/
   backups/
     {session-id}/
-      src/auth/token.ts.bak
-      src/api/routes.ts.bak
+      token.ts
+      routes.ts
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
src/auth/token.ts.bak
src/api/routes.ts.bak
```
src/auth/token.ts.bak
src/api/routes.ts.bak
Suggested change
src/auth/token.ts.bak
src/api/routes.ts.bak
```
token.ts
routes.ts
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/concepts/verification.mdx` around lines 134 - 136, The documentation
example showing backup filenames with a “.bak” suffix is inconsistent with the
actual backup implementation in src/infrastructure/backup.ts (the backup routine
that stores files under their original basename); update
docs/concepts/verification.mdx to show the real filenames (remove the “.bak”
suffix) in the example code block so the doc matches the code, or alternatively
explicitly note the naming difference and show both formats if you intend to
keep the current names in code.


## Auto-fixes

Transforms are applied in-memory and then gated by the **verification engine** before write. Python-specific fixers include unused imports, dead code, type hints, f-string safety, trailing whitespace, import sorting, and others registered in the autofix engine.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

Documentation overstates implemented fixers.

The documentation claims Python fixers include: "unused imports, dead code, type hints, f-string safety, trailing whitespace, import sorting, and others."

However, the actual Python adapter implementation (src/adapters/python/fixer.ts:5-27) only supports two fixers:

if (issue.fixerName === 'unused-imports') {
  return removeUnusedImport(code, issue);
}

if (issue.fixerName === 'trailing-whitespace') {
  return {
    transformedCode: code.replace(/[ \t]+$/gm, ''),
    description: 'Remove trailing whitespace',
    riskLevel: 'low',
  };
}

The fixers for dead code, type hints, f-string safety, and import sorting are not implemented.

📝 Proposed fix to reflect actual capabilities
-Transforms are applied in-memory and then gated by the **verification engine** before write. Python-specific fixers include unused imports, dead code, type hints, f-string safety, trailing whitespace, import sorting, and others registered in the autofix engine.
+Transforms are applied in-memory and then gated by the **verification engine** before write. Python-specific fixers currently include **unused imports** and **trailing whitespace** cleanup.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/languages/python.mdx` at line 20, Update the Python docs to accurately
list only the implemented fixers by replacing the current sentence in
docs/languages/python.mdx with a statement that the Python adapter currently
supports only the "unused-imports" and "trailing-whitespace" fixers; reference
the implementation in src/adapters/python/fixer.ts where the handler checks
issue.fixerName === 'unused-imports' and issue.fixerName ===
'trailing-whitespace' so readers see the source of truth and remove mentions of
unimplemented fixers like dead code, type hints, f-string safety, and import
sorting.


- **Syntax** — TypeScript compiler API in check-only mode.
- **Imports** — Module resolution against the project layout.
- **Tests** — `vitest` or `jest` auto-detection where implemented.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Verification docs currently overstate test-runner support.

The implementation shown in src/adapters/typescript/index.ts:80-98 runs vitest only; jest auto-detection is not present there. Please reword this line to avoid implying current jest support.

✏️ Suggested doc fix
-- **Tests** — `vitest` or `jest` auto-detection where implemented.
+- **Tests** — `vitest` execution is supported in current builds; other runners may be added in future versions.
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- **Tests**`vitest` or `jest` auto-detection where implemented.
- **Tests**`vitest` execution is supported in current builds; other runners may be added in future versions.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/languages/typescript.mdx` at line 30, The docs line claiming "vitest or
jest auto-detection" is inaccurate because the TypeScript adapter's test-run
invocation currently only runs vitest (see the test-run block that invokes
vitest in the TypeScript adapter), so update the sentence in
docs/languages/typescript.mdx to say that only vitest auto-detection is
implemented (remove or rephrase any mention of jest auto-detection) and make the
wording explicit that jest is not currently supported by the adapter's test-run
code.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new Mintlify documentation site for Refactron, covering onboarding, core concepts, CLI usage, language adapters, and internal API reference to help users understand and operate the tool.

Changes:

  • Introduces Mintlify site configuration (docs/mint.json) and navigation structure.
  • Adds “Getting Started” docs (Introduction, Quickstart, Configuration) and concept guides (blast radius, verification, sessions, temporal analysis).
  • Adds CLI and internal API reference pages, plus language-specific pages for Python and TypeScript.

Reviewed changes

Copilot reviewed 21 out of 21 changed files in this pull request and generated 17 comments.

Show a summary per file
File Description
docs/mint.json Mintlify site configuration (branding, nav, links).
docs/introduction.mdx High-level product overview and differentiators.
docs/quickstart.mdx First-run walkthrough and core workflow summary.
docs/configuration.mdx refactron.yaml configuration reference and examples.
docs/concepts/blast-radius.mdx Explains blast radius scoring and levels.
docs/concepts/verification.mdx Explains verification checks, timeouts, and write/backup model.
docs/concepts/sessions.mdx Documents persisted work sessions and lifecycle.
docs/concepts/temporal-analysis.mdx Documents Git-history enrichment and risk labeling.
docs/cli/overview.mdx CLI entry points, authentication, detection, and command map.
docs/cli/analyze.mdx analyze REPL command behavior and prerequisites.
docs/cli/issue-browser.mdx TUI issue browser layout and keybindings.
docs/cli/autofix.mdx autofix REPL command behavior and flags.
docs/cli/verify.mdx verify REPL command behavior and outputs.
docs/cli/session.mdx Session listing/loading behavior in the REPL.
docs/cli/other-commands.mdx Auth/status/diff/rollback/help/exit command docs.
docs/languages/python.mdx Python adapter behavior and verification expectations.
docs/languages/typescript.mdx TypeScript adapter behavior and verification expectations.
docs/api/overview.mdx Package layout and stability guidance for programmatic use.
docs/api/models.mdx Core public types reference.
docs/api/adapters.mdx ILanguageAdapter interface reference.
docs/api/orchestrator.mdx Orchestrator API reference and pipeline description.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.


Refactron will:
1. Detect your language (Python or TypeScript)
2. Run 7 analyzers in parallel
Copy link

Copilot AI Apr 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The quickstart says Refactron "runs 7 analyzers in parallel", but the current AnalysisEngine runs analyzers sequentially per file (only graph building / temporal profiling is parallelized). Please update this claim to match actual behavior, or adjust the implementation if parallel analyzer execution is intended.

Suggested change
2. Run 7 analyzers in parallel
2. Run 7 analyzers across your codebase

Copilot uses AI. Check for mistakes.
Analysis Engine
┌─────────────────────────────────┐
│ 7 analyzers run in parallel │
Copy link

Copilot AI Apr 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The "How It Works" diagram states "7 analyzers run in parallel", but the current AnalysisEngine runs analyzers sequentially per file (graphs/temporal profiling are parallelized, analyzer loop is not). Please adjust the diagram text to avoid overstating parallelism.

Suggested change
│ 7 analyzers run in parallel
│ 7 analyzers process each file

Copilot uses AI. Check for mistakes.
Comment on lines +45 to +50
Verifies that all imports in the transformed file can still be resolved.

- **Python:** runs `py_compile` to catch broken import paths
- **TypeScript:** checks that all `import` statements resolve to real modules

This catches fixes that accidentally removed a needed import or renamed an exported symbol.
Copy link

Copilot AI Apr 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This section describes the Python "Import Resolution Check" as catching broken imports via py_compile, but py_compile.compile() only byte-compiles and does not resolve/import dependencies, so missing modules typically won't be detected. Please clarify what this check actually guarantees (or change the check implementation if true import resolution is intended).

Suggested change
Verifies that all imports in the transformed file can still be resolved.
- **Python:** runs `py_compile` to catch broken import paths
- **TypeScript:** checks that all `import` statements resolve to real modules
This catches fixes that accidentally removed a needed import or renamed an exported symbol.
Confirms that module references still look valid after the transform, within the guarantees of each language-specific check.
- **Python:** runs `py_compile` to byte-compile the transformed file; this confirms the file can be compiled, but does **not** resolve or import its dependencies
- **TypeScript:** checks that all `import` statements resolve to real modules
For TypeScript, this catches fixes that accidentally removed a needed import or renamed an exported symbol. For Python, `py_compile` only guarantees compileability of the file itself; missing modules are typically caught later by tests or a real runtime import.

Copilot uses AI. Check for mistakes.
Comment on lines +59 to +72
This is the most expensive check and only runs for `high` and `critical` blast radius issues.

---

## Check Selection by Blast Level

| Blast Level | Syntax | Imports | Test Suite |
|-------------|--------|---------|------------|
| `trivial` | ✓ | — | — |
| `low` | ✓ | — | — |
| `medium` | ✓ | ✓ | — |
| `high` | ✓ | ✓ | ✓ |
| `critical` | ✓ | ✓ | ✓ (120s) |

Copy link

Copilot AI Apr 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The docs say the test gate "only runs for high and critical blast radius issues" and the table below skips imports/tests for low/medium. The current VerificationEngine runs syntax+imports+test-gate for every level except trivial. Please update the blast-level check mapping (or update the engine to match the documented behavior).

Copilot uses AI. Check for mistakes.
Comment on lines +75 to +90
## Confidence Score

The confidence score (`0.0–1.0`) reflects how many required checks passed:

```
score = checks_passed / checks_run
```

A score of `1.0` means every required check passed. A score below `1.0` with `safeToApply: false` means at least one check failed.

In the issue browser, confidence is shown after verifying:

```
✔ Safe to apply (confidence: 100%)
✘ Blocked — 3 tests failed (83%)
```
Copy link

Copilot AI Apr 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The confidence score is documented as checks_passed / checks_run, with non-zero confidence shown even when blocked. In the current implementation, confidence is a fixed heuristic (0.7/0.85/0.97) on pass and 0 on any block. Please align the docs/examples with the actual scoring behavior (or adjust the scoring implementation to match the documented formula).

Copilot uses AI. Check for mistakes.
Comment on lines +128 to +132
autofix . --verify → fix + verify in one command
status → review session summary
rollback → undo all fixes
diff → show unified diff of fixes
```
Copy link

Copilot AI Apr 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The workflow summary says rollback will "undo all fixes". In the current REPL implementation, rollback is informational-only (no restore is performed). Please adjust the summary to avoid promising functionality that isn’t currently available.

Copilot uses AI. Check for mistakes.
All file writes use a temp-file-then-rename strategy. Partial writes and corrupted files are impossible.
</Card>
<Card title="Backup & Rollback" icon="rotate-left">
Every session is backed up automatically. Run `rollback` to restore the previous state at any time.
Copy link

Copilot AI Apr 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This card says "Run rollback to restore the previous state at any time", but the current REPL rollback command does not perform any restore (it only prints guidance). Please soften/qualify this claim or wire rollback to actually restore from .refactron/backups/.

Suggested change
Every session is backed up automatically. Run `rollback` to restore the previous state at any time.
Every session is backed up automatically. Use `rollback` for restore guidance and recover from the saved backups when needed.

Copilot uses AI. Check for mistakes.
Comment on lines +44 to +46
<Card title="Verification Gate" icon="shield-check">
Changes are verified (syntax, imports, test suite) before being written to disk. Strictness scales automatically with blast radius.
</Card>
Copy link

Copilot AI Apr 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The "Verification Gate" card claims strictness scales with blast radius, but the current VerificationEngine runs syntax+imports+test-gate for every blast level except trivial (no medium/high differentiation). Please update this statement to reflect current behavior or implement blast-level-specific check selection.

Copilot uses AI. Check for mistakes.
Comment on lines +136 to +140
```

Run `rollback` at any time to restore all files from the session backup.

```
Copy link

Copilot AI Apr 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This section suggests rollback restores all files from the session backup. In the current REPL implementation, rollback does not perform any restore (it only prints guidance). Please update this section to match reality or connect rollback to BackupManager.restore() for an actual restore flow.

Copilot uses AI. Check for mistakes.

The Verification Engine is the safety gate between an auto-fix transform and a disk write. It runs a set of checks proportional to the blast radius of the change. A trivial fix in an isolated file only needs a syntax check. A change to a widely-imported core module runs the full test suite.

**Nothing is written to disk until verification passes.**
Copy link

Copilot AI Apr 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The statement "Nothing is written to disk until verification passes" is unconditional, but verification can be disabled via autofix.require_verification: false (or overridden by CLI options), in which case writes can occur without any checks. Consider qualifying this as the default behavior / when verification is enabled.

Suggested change
**Nothing is written to disk until verification passes.**
**By default, nothing is written to disk until verification passes. If verification is disabled, writes can occur without these checks.**

Copilot uses AI. Check for mistakes.
@omsherikar omsherikar merged commit 344e87f into main Apr 4, 2026
18 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.

2 participants