Skip to content

Search the repository's memory in the Autter cloud from the CLI - #79

Merged
sagnik11 merged 2 commits into
mainfrom
claude/cli-memory-search
Oct 26, 2026
Merged

sagnik11 merged 2 commits into
mainfrom
claude/cli-memory-search

Conversation

@sagnik11

@sagnik11 sagnik11 commented Oct 25, 2026 •

Copy link
Copy Markdown
Member

What

  • autter memory search "<question>" ranks what Autter knows about the repository you're in by meaning: its shared memory pages, learnings, production lessons, team rules, past review and scan findings, the wiki and code.
    • --path keeps results about the files you're touching.
    • --kind narrows the sources.
    • --limit, --repo and --org work as in autter ask.
    • --json prints the server payload for agents.
  • autter memory show [<page>] prints the repository memory home page and its page index, or one page.
  • Memory for the files at hand. The platform's memory keeps its detail in one page per area of the codebase (each covering a path prefix) and a what-works ledger.
    • autter memory for [<file>...] prints the area pages covering those files, most specific first: how that part of the codebase works, its conventions, what breaks and what works there. It then prints the ledger lines about those areas (Works, Doesn't work, Team waves off) and lists the files no area covers. Without files, it uses the files changed in the checkout. Reviews read the same view for a pull request.
    • autter memory areas lists the areas and the path each covers. autter memory ledger prints the ledger. show now groups the home page's index into areas and other pages.
  • New embedded skill, repo-memory (installed with autter install --skills). It tells coding agents to read the memory home page at the start of a task and to search before editing an area. Agents use the CLI when the Autter MCP server isn't connected, and the MCP tools when it is.

How

  • Uses the existing autter login. Sign-in and organization selection moved out of ask.rs into org_api_context, so ask and memory share them.
  • Calls the platform's POST /api/cli/orgs/:slug/memory/search and GET /api/cli/orgs/:slug/memory. These ship in the platform PR Autter-dev/autter-monorepo#620 (RM-12), which builds on the repository-memory work (RM-10: memory pages embedded in the semantic index).
  • The repository is the checkout's default remote, normalized the same way uploads normalize it (normalize_repo_url).
  • Sharing policy: nothing is sent in local mode (platform_sync_enabled), or for a repository whose effective prompt storage is local (excluded via exclude_prompts_in_repositories, or not in the include list). effective_prompt_storage_with_remotes is now pub(crate) so an explicit --repo is checked too.
  • Older API deployments without the routes get a clear message instead of a parse error.

Tests

  • Unit (commands::memory, 11 tests): option parsing and validation, the sharing-policy decision, --repo normalization, resolving file paths against the checkout root, and rendering of search results, area pages, the ledger, the area list and the home page. All pass, as do the ask and skills_installer tests.
  • Integration (tests/integration/memory_command.rs, 6 tests): nothing is sent in local mode (search, show, for, areas, ledger); an excluded repository is refused, with and without --repo; connected mode stops at sign-in; bad usage is rejected; memory for with no changes asks for files, and a path outside the checkout is refused. All 6 pass locally. One failed on the first run because the test daemon didn't start, and passed on rerun.
  • Not covered here: a live call against the API. The new routes have their own tests in the platform PR.

Notes

  • cargo clippy -D warnings on the local 1.99 toolchain reports 12 lints that already exist on main (CI pins 1.93). None are in the changed files.
  • commands::debug::tests::test_run_command_capture_with_timeout_reports_partial_output fails on this Windows machine on main too. It's unrelated to this change.

🤖 Generated with Claude Code


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

sagnik11 and others added 2 commits October 25, 2026 21:47
`autter memory search "<question>"` ranks what Autter knows about the
repository you're in by meaning: its shared memory pages, learnings,
production lessons, team rules, past review and scan findings, the wiki and
code. `--path` keeps results about the files you're touching, `--kind`
narrows the sources, `--json` is for agents. `autter memory show [<page>]`
prints the memory home page and index, or one page.

Both use the existing `autter login` (sign-in and org selection are now
shared with `autter ask`) and call the platform's /api/cli memory routes.
The repository is the checkout's default remote. Nothing is sent in local
mode or for a repository excluded from prompt sharing.

The new embedded `repo-memory` skill tells coding agents to read the memory
home page at the start of a task and search before editing an area, through
the CLI when the Autter MCP server isn't connected.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The platform's repository memory keeps its detail in one page per area of
the codebase (each covering a path prefix) and a what-works ledger.

- `autter memory for [<file>...]` prints the area pages covering the files,
  most specific first, then the ledger lines about those areas (Works,
  Doesn't work, Team waves off) and the files no area covers. Without files
  it asks about the files changed in the checkout. Paths are relative to the
  current directory and sent relative to the checkout root.
- `autter memory areas` lists the areas and the path each covers;
  `autter memory ledger` prints the ledger; `autter memory show` groups the
  home page's index into areas and other pages.
- The repo-memory skill tells agents to read the area pages for the files
  they are about to edit before changing them.
- Errors print the message without the "Generic error:" prefix.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@sagnik11
sagnik11 merged commit 43d4c08 into main Oct 26, 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