Read the function, not the file
Ask how ripgrep handles its --glob flag. Read it the obvious way and that is one Read of crates/core/flags/defs.rs,
a 7,700-line file, all of it into context. Instead, ask sym for a map of the repository, find the name, and read the one
implementation you need. Three calls to the hosted tier at api.s2ar.dev, each with a receipt; the last one is compared
against the whole file it replaced.
Run 2026-10-11 05:26 UTC against api.s2ar.dev 0.1.1 · 3 calls · 926 ms · list price $0.02 for a stranger (these ran on the operator's key and cost nothing) · every number on this page re-derived by tools/walkthrough.py before it was written
1. A map of the repository, fitted to 600 tokens
The map ranks files by how many others import them, so the core of the program comes first.
curl -s -X POST 'https://api.s2ar.dev/v1/sym/map' \
-H "Authorization: Bearer $S2AR_KEY" \
-H 'content-type: application/json' \
-d '{"repo": "https://github.com/BurntSushi/ripgrep", "ref": "14.1.1", "budget": 600}'
| tokens_est | 577 |
|---|
the answer, as JSON
{
"tokens_est": 577
}
The text field:
crates/core/flags/mod.rs:
trait Flag: Debug + Send + Sync + UnwindSafe + RefUnwindSafe + 'static
enum Category
impl Category
enum CompletionType
enum FlagValue
impl FlagValue
crates/core/flags/defs.rs:
pub(super) const FLAGS: &[&dyn Flag] = &[
struct AfterContext;
impl Flag for AfterContext
fn test_after_context()
struct AutoHybridRegex;
impl Flag for AutoHybridRegex
… 66 more lines
| re-derived by the generator | |
|---|---|
| ✓ | receipt sha256:fbcb3ff1a1588319… re-derived: sha256 over the canonical answer, header and body agree |
2. Where is Glob defined?
curl -s -X POST 'https://api.s2ar.dev/v1/sym/find' \
-H "Authorization: Bearer $S2AR_KEY" \
-H 'content-type: application/json' \
-d '{"repo": "https://github.com/BurntSushi/ripgrep", "ref": "14.1.1", "name": "Glob"}'
| tokens_est | 122 |
|---|
the answer, as JSON
{
"tokens_est": 122
}
The text field:
crates/core/flags/defs.rs:2457-2457 struct Glob struct Glob;
crates/globset/src/glob.rs:75-80 struct Glob pub struct Glob
crates/globset/src/glob.rs:250-553 impl Glob impl Glob
crates/ignore/src/gitignore.rs:32-43 struct Glob pub struct Glob
crates/ignore/src/gitignore.rs:45-76 impl Glob impl Glob
crates/ignore/src/overrides.rs:27-27 struct Glob pub struct Glob<'a>(GlobInner<'a>);
crates/ignore/src/types.rs:111-111 struct Glob pub struct Glob<'a>(GlobInner<'a>);
| re-derived by the generator | |
|---|---|
| ✓ | receipt sha256:4f828637803fd86b… re-derived: sha256 over the canonical answer, header and body agree |
3. Read the one implementation
The symbol is named the way sym lists it: Glob as Flag, the impl Flag for Glob block.
curl -s -X POST 'https://api.s2ar.dev/v1/sym/read' \
-H "Authorization: Bearer $S2AR_KEY" \
-H 'content-type: application/json' \
-d '{"repo": "https://github.com/BurntSushi/ripgrep", "ref": "14.1.1", "file": "crates/core/flags/defs.rs", "symbol": "Glob as Flag"}'
| tokens_est | 565 |
|---|
the answer, as JSON
{
"tokens_est": 565
}
The text field:
impl Glob as Flag (crates/core/flags/defs.rs, lines 2459-2512)
2459 impl Flag for Glob {
2460 fn is_switch(&self) -> bool {
2461 false
2462 }
2463 fn name_short(&self) -> Option<u8> {
2464 Some(b'g')
2465 }
2466 fn name_long(&self) -> &'static str {
2467 "glob"
2468 }
2469 fn doc_variable(&self) -> Option<&'static str> {
2470 Some("GLOB")
2471 }
2472 fn doc_category(&self) -> Category {
2473 Category::Filter
2474 }
2475 fn doc_short(&self) -> &'static str {
2476 r"Include or exclude file paths."
2477 }
2478 fn doc_long(&self) -> &'static str {
2479 r#"
2480 Include or exclude files and directories for searching that match the given
2481 glob. This always overrides any other ignore logic. Multiple glob flags may
2482 be used. Globbing rules match \fB.gitignore\fP globs. Precede a glob with a
2483 \fB!\fP to exclude it. If multiple globs match a file or directory, the glob
2484 given later in the command line takes precedence.
2485 .sp
… 27 more lines
| re-derived by the generator | |
|---|---|
| ✓ | receipt sha256:598d5e19ec2bace6… re-derived: sha256 over the canonical answer, header and body agree |
| ✓ | the whole file is 230911 bytes, about 57,728 tokens; this answer is about 565 tokens: 57,163 tokens kept out of context |
The same reads run locally and free with the sym binary (cargo install starlab-sym), or inside Claude
Code as the sym@starlab plugin, where a whole-file Read of a big source file comes back as its skeleton.
The hosted tier is for agents that have no checkout: a public git URL is enough.
What this cannot buy
From the signed proceedings (/.well-known/proceedings.json), verbatim:
- placement or routing position
- a different verdict or grade
- buyer data
- amendment access
- a revocation
Failed calls are never charged. Nothing about a caller is kept. The rules: the charter.