Skip to content

feat: rename retrofit command to liberate#10

Merged
TonyCasey merged 2 commits intomainfrom
tony/git-31-rename-retrofit-command-to-liberate
Feb 6, 2026
Merged

feat: rename retrofit command to liberate#10
TonyCasey merged 2 commits intomainfrom
tony/git-31-rename-retrofit-command-to-liberate

Conversation

@TonyCasey
Copy link
Copy Markdown
Owner

@TonyCasey TonyCasey commented Feb 6, 2026

Summary

  • Renames the retrofit CLI command, MCP tool, service classes, interfaces, errors, file names, source type, tags, and all documentation to liberate
  • Better reflects the tool's purpose of freeing knowledge locked in git history
  • 9 files renamed, 22 files edited across source, tests, and docs

Test plan

  • npm run build — compiles cleanly
  • npm test — all 135 tests pass
  • grep -ri retrofit — zero remaining references

Closes GIT-31

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Refactor

    • Rebranded core functionality from "Retrofit" to "Liberate" across CLI, tools, commands and service names
    • Updated CLI command description to "Liberate knowledge from existing commit history"
  • Documentation

    • Added comprehensive Getting Started guide and updated README to point to it
    • Updated environment/example docs to reference the new liberate CLI usage and ANTHROPIC_API_KEY guidance
  • Tests

    • Updated test suites and integration tests to use Liberate naming and flows

Renames the CLI command, MCP tool, service classes, interfaces, errors,
file names, source type, tags, and all documentation from "retrofit" to
"liberate" to better reflect the tool's purpose of freeing knowledge
locked in git history.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@chatgpt-codex-connector
Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Feb 6, 2026

📝 Walkthrough

Walkthrough

Renames "Retrofit" to "Liberate" across the codebase (services, interfaces, CLI, MCP tools, domain types, docs, and tests), replaces README content with a Getting Started link, and adds comprehensive docs/getting-started.md. No behavioral changes.

Changes

Cohort / File(s) Summary
Core Application Services & Interfaces
src/application/interfaces/ILiberateService.ts, src/application/services/LiberateService.ts
Renamed service/interface and related types from Retrofit* → Liberate*. Method renamed retrofit()liberate(). Internal tags and result shapes updated to use "liberate".
CLI & Commands
src/cli.ts, src/commands/liberate.ts, src/commands/init-mcp.ts
Replaced CLI command retrofit with liberate; updated command handler, option interface, descriptions, and help text.
MCP Tools & Server
src/mcp/tools/liberate.ts, src/mcp/server.ts, src/mcp/README.md
MCP tool renamed git_mem_retrofitgit_mem_liberate; registration function renamed (registerLiberateTool); imports/use of LiberateService replace RetrofitService; docs updated.
Domain Types & Errors
src/domain/errors/GitMemError.ts, src/domain/types/IMemoryQuality.ts, src/domain/interfaces/ILLMClient.ts
Error class renamed RetrofitError → LiberateError (code/name updated). SourceType, SOURCE_VALUES, DEFAULT_CONFIDENCE updated to include 'liberate' instead of 'retrofit'. Doc comments adjusted.
Documentation & Config Examples
README.md, docs/getting-started.md, docs/mcp-setup.md, .env.example, CLAUDE.md
README trimmed and redirected to new docs/getting-started.md (added). Docs updated to use liberate naming; .env example comments and CLI usage examples changed to git mem liberate --enrich.
Integration Tests
tests/integration/liberate.test.ts, tests/integration/liberate-enrich.test.ts, tests/integration/mcp-e2e.test.ts, tests/integration/mcp-liberate.test.ts
Tests updated to reference LiberateService and liberate() calls; test names, expectations, and MCP tool payloads changed to git_mem_liberate/liberate.
Unit Tests
tests/unit/application/services/LiberateService.test.ts, tests/unit/application/services/LiberateServiceEnrichment.test.ts
Unit tests renamed/imports changed to LiberateService; method calls updated to liberate(); test repo names/descriptions reflect new nomenclature.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the primary change: renaming the retrofit command to liberate across the codebase, which is the core objective of this PR.

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

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch tony/git-31-rename-retrofit-command-to-liberate

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: 5

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
docs/mcp-setup.md (1)

87-96: ⚠️ Potential issue | 🟡 Minor

Documentation update: Consider adding the enrich parameter.

The git_mem_liberate section documents dry_run, since, max_commits, and threshold, but omits the enrich parameter that's available in the tool implementation (see src/mcp/tools/liberate.ts line 25).

📝 Proposed documentation addition
 - `dry_run` — Preview without writing (default: false)
 - `since` — Start date (ISO 8601)
 - `max_commits` — Maximum commits to process
 - `threshold` — Interest score threshold (default: 3)
+- `enrich` — Enable LLM enrichment (requires ANTHROPIC_API_KEY)
🤖 Fix all issues with AI agents
In `@docs/getting-started.md`:
- Around line 319-323: Add a single trailing newline character at the end of the
file so the file ends with a newline (i.e., ensure the last line containing the
code block with "./scripts/reinstall-global.sh" is followed by a newline
character); update the file so the final byte is a newline without changing any
other content.
- Around line 159-162: Update the three/ four fenced ASCII diagram code blocks
(the blocks that show "refs/notes/mem   └── <commit-sha> → { \"memories\": [ ...
] }" and the other two/three similar ASCII diagrams) to include a language
specifier (e.g., use ```text or ```plaintext) so markdownlint warnings are
resolved; locate the fenced blocks surrounding the ASCII diagrams and prefix the
opening backticks with "text" (apply the same change to the other ASCII diagram
blocks referenced in the review).
- Around line 1-3: Remove the trailing space at the end of the markdown heading
"Getting Started" on the first line (i.e., change "# Getting Started " to "#
Getting Started") so the heading has no trailing whitespace.

In `@README.md`:
- Line 7: Remove the trailing space at the end of the README.md line "Every
commit message, every PR description — it's all there." (the text in the diff)
to resolve markdownlint MD009; either trim the trailing whitespace to zero
characters or intentionally add two spaces if you want a hard line break, and
commit the updated README.md.

In `@src/domain/types/IMemoryQuality.ts`:
- Line 18: Fix the typo in the documentation comment for IMemoryQuality: replace
the word "liberateting" with the correct spelling "liberating" in the comment
that defines the "liberate" entry so the description reads "Generated by
liberating existing history"; update the doc block near the IMemoryQuality
definition to reflect this change.

- Fix trailing whitespace in README.md and docs/getting-started.md
- Fix typo "liberateting" → "liberating" in IMemoryQuality.ts
- Add language specifiers to ASCII diagram code blocks
- Add trailing newline to docs/getting-started.md
- Add missing enrich parameter to mcp-setup.md docs

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@TonyCasey
Copy link
Copy Markdown
Owner Author

All 5 CodeRabbit review comments addressed in 9f5bcec:

  1. docs/getting-started.md:1 — Fixed trailing space on heading
  2. docs/getting-started.md:159,171,207,240 — Added text language specifier to ASCII diagram code blocks
  3. docs/getting-started.md:323 — Added trailing newline
  4. README.md:7 — Fixed trailing whitespace
  5. src/domain/types/IMemoryQuality.ts:18 — Fixed typo: liberatetingliberating

Also addressed the outside-diff suggestion: added missing enrich parameter to docs/mcp-setup.md.

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: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
docs/mcp-setup.md (1)

98-104: 🧹 Nitpick | 🔵 Trivial

Consider adding a liberate-specific verification example.

The verification section provides good general examples for testing the MCP tools. Since this PR introduces the renamed liberate tool as a key feature, consider adding a specific verification step for it.

📝 Suggested addition
 2. Recall memories: *"What do you remember about the database?"*
 3. Check context: *"What memories are relevant to my staged changes?"*
+4. Liberate history: *"Scan the last 50 commits and liberate interesting patterns"*
🤖 Fix all issues with AI agents
In `@docs/getting-started.md`:
- Around line 289-293: Remove the misleading OPEN_API_KEY row from the
environment variables table in the docs: locate the table entry that defines
`OPEN_API_KEY` (adjacent to `ANTHROPIC_API_KEY`) and delete that entire row so
only `ANTHROPIC_API_KEY` remains as the documented enrichment key; ensure table
formatting (pipes and separators) remains valid after removal.

@TonyCasey TonyCasey merged commit 30814bc into main Feb 6, 2026
2 checks passed
@TonyCasey TonyCasey deleted the tony/git-31-rename-retrofit-command-to-liberate branch February 11, 2026 13:18
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