Original Reddit post

While I’ve never got along with vector/graph RAG type tools, there is obviously a lot of value in giving agents a way to query the code without wild grep storms. To that end, I’ve been using a slice-cli tool for the last few months. Posting in the event that someone finds this useful. Nothing particularly sophisticated here - queryable markdown with yaml frontmatter describing a region of the codebase - files, deps, call stacks, relevant notes/invariants. No embeddings, no graph DB, easy to view and interact with. slice-cli can query these files in a few ways:

  • slice context src/auth/middleware.py - the owning slice for a file plus its deps, invariants and runtime flows, before you touch it
  • slice deps auth-service --reverse --transitive - blast radius: every slice that transitively depends on this one
  • slice show auth-service --call-stacks - the runtime flows through a slice (request -> require_auth -> verify_token -> get_session -> handler)
  • slice find session - locate which slice a concept lives in
  • slice list / for <file> - list slices, or find the slice that owns a path Handles project doc staleness via DOCS.yaml, which maps project docs to slices. Those docs can be queried for info, and when a doc’s tracked code changes, slice stale-docs flags it for agent review. The check is a content fingerprint - a hash of the actual code each doc was last verified against (recorded by slice stamp). Works well with precommit hooks. Comes with the slice-codebase skill and codebase-slicer agent to create and maintain slices. These are added by default if installed as a Claude Code plugin, otherwise can be vendored in. With fzf installed there’s also a lightweight tui browser (slice browse) to interrogate slices, for those of you daring enough to want to read them. Give it a spin: https://github.com/scodge-24/slice-cli (of course it’s vibe coded) submitted by /u/scodgey

Originally posted by u/scodgey on r/ClaudeCode