Smior has one job: give your coding agent the parts of your code a task needs, and nothing more. It does this in three stages: it maps your code, ranks it for the task, and packs the result into a capsule that fits a token budget.
1. The code graph
When you open a trusted folder, Smior indexes it.
- Parsing. Smior parses each file with Tree-sitter grammars that ship with it, checked for integrity. It covers 47 language families and structured formats through 53 parsers. Vue, Svelte and Astro files are parsed as components, with their JavaScript or TypeScript parsed in place.
- What it records. Files; symbols such as functions, methods, classes and types; and the edges between files: imports, resolved symbol calls and API links between client calls and server routes.
- Where it lives. A SQLite database at
.smior/index.dbin your workspace. Smior adds.smior/to.gitignoreon first run. - What it leaves out.
.envfiles are never indexed. Secrets in other files are left out when Smior indexes. - Keeping up. With
smior.liveIndexingon (the default), Smior reindexes each file as you save it. Smior: Reindex now runs a full pass.
Run smior languages to list the supported language families. See CLI reference.
A second opinion from your editor
For a file that the parser could only partly recover, or where it found no symbols, Smior: Enhance index with editor symbols (LSP assist) asks your editor’s language servers for a second opinion.
2. Ranking for a task
When your agent asks for context, Smior ranks the files that matter for the task. It combines:
- matches between the task and file and symbol names;
- the import, call and API links around those matches, followed a bounded distance through the graph;
- each file’s centrality in the graph (PageRank);
- files you pinned with Smior: Pin file as priority path.
Ranking depth
Your plan sets a ranking depth: how many items Smior ranks in each repository. Items are functions, methods, classes and types in source files, plus each Markdown file, each of its headings and each of its links.
These are indexed but never counted: tests, examples, fixtures, generated files, const and let declarations, JSON keys, CSS rules, SQL tables, and anything declared inside a function.
Depth narrows ranking only. The index still holds and searches everything. When a repository is larger than your plan’s depth, Smior ranks the most central items and says so once in the sidebar and in the capsule. Nothing stops. See Plans and limits.
3. The capsule
A capsule is the text Smior hands your agent. It is built in layers:
| Part | What it contains |
|---|---|
[FULL] |
The most relevant files, in full, when they fit. |
[FOCUS] |
The relevant spans of a larger file, around the symbols that matter. |
[SKELETON] |
Neighbouring files as signatures only. |
[STUB] |
Files further out, as a line each. |
[DELTA] |
A file your agent already has, sent as the lines that changed. |
Each file carries a short note saying why it was included.
Already in context
Smior keeps a register of what it sent your agent in this session. A file the agent already has, unchanged, is listed under Already in context (unchanged, not resent) with its content hash, instead of being sent again.
After you clear your agent’s conversation, tell Smior so it stops assuming the agent still holds those files: run Smior: Start a fresh session, or let the agent call smior_new_session.
Relevant local memory
Decisions your agent saved with smior_remember that match the task appear under Relevant local memory. A note whose linked file has changed is marked [STALE — re-check]. See Memory.
The footer
Every capsule ends with a footer line, for example:
capsule 7f3a… · query "…" · 3,812/4,000 tokens · 2 carried · 1 secret(s) redacted · baseline 21,400 · graph 118It gives the capsule id (use it with smior_stale_check), the tokens used against the budget, how many files were carried over, how many secrets were redacted, the size of the same files in full, and the index version.
The token budget
A capsule never exceeds its budget. Smior aims a little under it, to leave a margin for differences in how agents count tokens.
- The default budget is 4,000 tokens, set by
smior.maxContextTokens(200 to 50,000). smior_contextaccepts its ownbudget(200 to 50,000; default 4,000).smior_orchestrateaccepts abudgetfor the whole reply (400 to 50,000; default 6,000). About 72% of it goes to the capsule and the rest to impact and memory.
Automatic context
For Claude Code, Smior can attach indexed context to each prompt you send, through a prompt hook. This is on by default (smior.autoContextEnabled). Turn it off with Smior: Toggle automatic context, for example to compare.
Several repositories in one workspace
Smior: Add repository to workspace links another repository, so capsules can draw from both. The number of linked repositories depends on your plan.