Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
262 commits
Select commit Hold shift + click to select a range
b02b2f2
docs: add tree command rework spec and plan
kanoru3101 Jun 12, 2026
5cbdc48
refactor: rename graph command to tree
kanoru3101 Jun 12, 2026
643906d
feat: add pointer-to-node mapping for the tree structure view
kanoru3101 Jun 12, 2026
0fd392e
feat: add internal-structure builder for the tree command
kanoru3101 Jun 12, 2026
6c9072f
refactor: make stylish summary and empty message caller-provided
kanoru3101 Jun 12, 2026
9473d77
feat: match affected-by inputs against tree nodes
kanoru3101 Jun 12, 2026
f9a14d5
feat: make document structure the default tree view behind --files fa…
kanoru3101 Jun 12, 2026
d6e2caa
test: cover tree structure mode end to end
kanoru3101 Jun 12, 2026
8c77337
docs: document the tree command and update the changeset
kanoru3101 Jun 12, 2026
649e927
Merge branch 'main' into feat/graph-command
kanoru3101 Jun 12, 2026
5730de6
fix: hoist entity test imports to avoid per-test transform timeout
kanoru3101 Jun 12, 2026
5eec56f
docs: unbreak documentation tests for the tree command
kanoru3101 Jun 15, 2026
da60c95
refactor(tree): share toNodeId/byString/OPERATION_METHODS via node-id
kanoru3101 Jun 15, 2026
c9fe0d7
fix: improvments
kanoru3101 Jun 15, 2026
93b9830
Merge branch 'main' into feat/graph-command
kanoru3101 Jun 17, 2026
49904e3
refactor: tidy tree renderer sort and trim a restating comment
kanoru3101 Jun 17, 2026
a25a166
test: drop redundant tree tests (runtime round-trip, path.resolve var…
kanoru3101 Jun 17, 2026
d63acb4
docs: clarify --affected-by per mode and JSON field scope in tree docs
kanoru3101 Jun 17, 2026
d9eb1f4
test: cover multi-API rejection in default view and multi-API --files…
kanoru3101 Jun 17, 2026
2bfb339
fix: tidy tree command — share mode context, dedupe location mapping,…
kanoru3101 Jun 17, 2026
0fe4623
Merge remote-tracking branch 'origin/main' into feat/graph-command
kanoru3101 Jun 17, 2026
619ada1
fix: remove comments
kanoru3101 Jun 17, 2026
0a49e51
Merge remote-tracking branch 'origin/main' into feat/graph-command
kanoru3101 Jun 22, 2026
a9845ec
fix: refactoring
kanoru3101 Jun 22, 2026
2748189
fix: resolve bug with splitted files
kanoru3101 Jun 22, 2026
d45ab50
fix: update tests
kanoru3101 Jun 22, 2026
9afbdc0
Apply suggestions from code review
JLekawa Jun 23, 2026
c3c29af
Update tree.md
JLekawa Jun 23, 2026
21ccf18
Update docs/@v2/commands/tree.md
JLekawa Jun 23, 2026
808714d
docs(cli): fix issues in file
JLekawa Jun 23, 2026
cafbab8
Apply suggestion from @JLekawa
JLekawa Jun 23, 2026
cc10b6a
Merge branch 'main' into feat/graph-command
kanoru3101 Jun 23, 2026
1ec983f
fix: add spaces in the options-table separator
kanoru3101 Jun 23, 2026
eeede48
fix: refactoring and update snapshots
kanoru3101 Jun 24, 2026
b2df52d
Merge branch 'main' into feat/graph-command
kanoru3101 Jun 24, 2026
ed18a16
fix: update docs
kanoru3101 Jun 24, 2026
a3a9227
Merge branches 'feat/graph-command' and 'feat/graph-command' of githu…
kanoru3101 Jun 24, 2026
7df48d3
fix: resolve cursor bugs
kanoru3101 Jun 24, 2026
7565984
fix: update docs
kanoru3101 Jun 24, 2026
518e767
Merge branch 'main' into feat/graph-command
kanoru3101 Jun 25, 2026
ebbcc71
chore: small fixes
kanoru3101 Jun 26, 2026
16fbb5b
Merge branch 'main' into feat/graph-command
kanoru3101 Jul 1, 2026
e75f4bb
Merge branch 'main' into feat/graph-command
kanoru3101 Jul 2, 2026
314e9dc
feat: add level flag
kanoru3101 Jul 13, 2026
879a918
test: add snapshot
kanoru3101 Jul 13, 2026
7031128
Merge branch 'main' into feat/graph-command
kanoru3101 Jul 13, 2026
8e15c82
feat(tree): show operationId on operation nodes
kanoru3101 Jul 16, 2026
890b336
docs(tree): fix options table having a stray fourth column
kanoru3101 Jul 17, 2026
b72d3d2
feat(core): add api-graph node model and node-id mapping
kanoru3101 Aug 1, 2026
79be267
feat(core): add api-graph builder walking the original document
kanoru3101 Aug 1, 2026
67dabde
refactor(cli): back the tree structure view with the core api-graph
kanoru3101 Aug 1, 2026
849d289
test(cli): update split-fixture tree snapshots for real source files
kanoru3101 Aug 1, 2026
badc7c6
fix(core): attribute foreign-file ref edges to their spine operation
kanoru3101 Aug 1, 2026
369815e
docs(cli): document unbundled tree structure view
kanoru3101 Aug 1, 2026
2fb842c
docs(cli): fix remaining bundling-era statements in tree reference
kanoru3101 Aug 1, 2026
9a708c5
fix(cli): align uses docs, e2e titles, and callback-ref test with unb…
kanoru3101 Aug 1, 2026
442dfd7
feat(core): collect index metadata in the api-graph walk
kanoru3101 Aug 1, 2026
c0adb41
feat(core): assemble the hierarchical api index from walk metadata
kanoru3101 Aug 1, 2026
0153e3c
refactor(core): inline single-use docDescription spread helper
kanoru3101 Aug 1, 2026
8b8d43c
feat(core): add api-graph retrieval slice with envelopes and refs
kanoru3101 Aug 1, 2026
9dfdd20
fix(core): share path normalization between index and retrieval slice
kanoru3101 Aug 1, 2026
9b0beda
feat(core): add dependency closure to api-graph envelopes
kanoru3101 Aug 1, 2026
6b3e051
fix(core): gate deps-closure seeds and restrict file aliasing to comp…
kanoru3101 Aug 1, 2026
f41c4da
feat(cli): render the agent index for tree --format json
kanoru3101 Aug 1, 2026
fdf18e4
refactor(core): consolidate component-section list into one export
kanoru3101 Aug 1, 2026
842b842
fix(cli): keep split components and warn about webhooks in uses-filte…
kanoru3101 Aug 3, 2026
d1d321c
feat(cli): add --node retrieval and --with-deps closure to tree
kanoru3101 Aug 3, 2026
c1e680a
fix(cli): match components by file only when split from the root docu…
kanoru3101 Aug 3, 2026
39fd095
fix(cli): apply --level as-is to --node sub-indexes and add the chang…
kanoru3101 Aug 3, 2026
4beb2d9
refactor: consolidate tree changesets, drop interim wrappers, documen…
kanoru3101 Aug 3, 2026
74e4b8e
docs(cli): complete tree usage and options for the agent index flags
kanoru3101 Aug 3, 2026
072800d
Merge remote-tracking branch 'origin/main' into feat/tree-v2
kanoru3101 Aug 3, 2026
26a35f3
feat(core): keep canonical component ids for split whole-file refs
kanoru3101 Aug 3, 2026
f5257d1
docs: add a guide measuring agent context savings from the tree index
kanoru3101 Aug 3, 2026
b616f1c
docs: state that the JSON index requires an OpenAPI description
kanoru3101 Aug 3, 2026
e248d68
docs: add Google Compute and GitHub scaling cases to the tree index b…
kanoru3101 Aug 4, 2026
db69271
docs: list the tree benchmark guide on the guides index
kanoru3101 Aug 4, 2026
55bd506
fix(core): take the tree index Servers section from the root server list
kanoru3101 Aug 4, 2026
ad2690a
docs: rebuild the tree index benchmark on the GitHub REST API descrip…
kanoru3101 Aug 4, 2026
c3854da
feat(core): add typed selection lookups for the api graph
kanoru3101 Aug 5, 2026
3ae33ff
feat(core): add reverse ref chains and shared node ref collection
kanoru3101 Aug 5, 2026
3cb69f0
feat(core): add overview and listing views over the api graph
kanoru3101 Aug 5, 2026
20d0890
feat(core): add operation and component cards with typed refs and usedBy
kanoru3101 Aug 5, 2026
5f05a6d
feat(core): add transitive used-by report and export the view api
kanoru3101 Aug 5, 2026
d1561e5
feat(cli): route tree through typed selectors
kanoru3101 Aug 5, 2026
8c86be8
feat(cli): render tree views and drop the node/uses/level surface
kanoru3101 Aug 5, 2026
632823c
test(e2e): pin the typed-selector tree surface
kanoru3101 Aug 5, 2026
e00ed11
docs: document the typed-selector tree surface
kanoru3101 Aug 6, 2026
def0c79
docs: re-measure the benchmark on the typed-selector surface
kanoru3101 Aug 6, 2026
a47c1f9
fix: close webhook and consistency gaps found in the tree final review
kanoru3101 Aug 6, 2026
43d6e73
feat(core): named webhooks, card-shaped listings, and the file view
kanoru3101 Aug 6, 2026
95b6f38
feat(cli): tree-glyph stylish views, --file selector, and --webhooks …
kanoru3101 Aug 6, 2026
ab40807
test(e2e): pin the revision-2 tree surface
kanoru3101 Aug 6, 2026
1a01d9e
docs: document the revision-2 tree surface and re-measure the benchmark
kanoru3101 Aug 6, 2026
0aac400
perf(core): index line offsets and graph lookups for tree views
kanoru3101 Aug 6, 2026
edb9a47
docs: add a live agent run to the tree benchmark
kanoru3101 Aug 6, 2026
9190aac
docs: add multi-operation workflow runs to the live tree benchmark
kanoru3101 Aug 6, 2026
8785f36
feat(cli): expand the default tree to operations and render cards as …
kanoru3101 Aug 7, 2026
0b26198
docs: measure the hybrid stylish-navigation chain in the tree benchmark
kanoru3101 Aug 7, 2026
0ec5a8b
docs: add an unguessable hard-task live run to the tree benchmark
kanoru3101 Aug 7, 2026
0190078
docs: add a tree-versus-grep head-to-head live run to the benchmark
kanoru3101 Aug 7, 2026
9417dab
docs: compare whole-spec-in-context against tree in the live benchmark
kanoru3101 Aug 7, 2026
ed17ef7
docs: add a free-method no-tree baseline to the benchmark comparison
kanoru3101 Aug 7, 2026
3661f64
docs: measure the no-instruction automatic-discovery run in the bench…
kanoru3101 Aug 7, 2026
4973ee1
feat(cli): collapse the default tree to tag counts past 100 operations
kanoru3101 Aug 7, 2026
0d821dc
docs: run the synthetic private-spec test and withdraw the refuted claim
kanoru3101 Aug 8, 2026
b3b6388
feat(cli): add --brief and --compact to cut tree JSON costs
kanoru3101 Aug 8, 2026
cc456fb
docs: measure the brief-compact chain and the trusted used-by protocol
kanoru3101 Aug 8, 2026
f706e73
feat(cli): fold brief and compact into a third tree output format
kanoru3101 Aug 8, 2026
5bd1a4b
docs: retarget the benchmark protocol to the brief output format
kanoru3101 Aug 8, 2026
7a5007b
docs: document the tree exploration protocol for AI assistants
kanoru3101 Aug 9, 2026
98dcd38
docs: measure how instruction placement changes agent cost
kanoru3101 Aug 9, 2026
36e5f58
docs: separate compactness ratios from head-to-head session costs in …
kanoru3101 Aug 9, 2026
899f79c
feat(cli): replace the brief format with an ai format that emits sche…
kanoru3101 Aug 10, 2026
58074d7
feat(core): add findMatches search over the api-graph index
kanoru3101 Aug 11, 2026
134ddb5
feat(core): allow building cards with raw content but no deps closure
kanoru3101 Aug 11, 2026
601fa0f
fix(core): seed withContent envelopes with the webhook container id
kanoru3101 Aug 11, 2026
988cd5a
feat(cli): add tree --find selector with stylish and json rendering
kanoru3101 Aug 11, 2026
762ec29
feat(cli): render ai overview, listings, and find as plain text
kanoru3101 Aug 11, 2026
e98bdf7
feat(cli): render ai cards and used-by as text with signature and coo…
kanoru3101 Aug 11, 2026
e514356
test(cli): cover tree --find and the ai text format end to end
kanoru3101 Aug 11, 2026
e79016c
docs: document the ai text format and the tree --find selector
kanoru3101 Aug 11, 2026
c324d12
docs: align the tree error example and --find matched fields
kanoru3101 Aug 11, 2026
29327cc
fix(cli): attribute files consistently in tree --find and reject --fi…
kanoru3101 Aug 11, 2026
97f3113
docs(tree): qualify the ai format's no-JSON claim and fix pluralized …
kanoru3101 Aug 11, 2026
2fd2b98
docs(cli): mention tags in the tree --find help text
kanoru3101 Aug 11, 2026
d72b78b
docs: record the re-measured ai text format and --find head-to-heads …
kanoru3101 Aug 11, 2026
eb4bb41
feat(cli): serialize ai card bodies as minified json with vendor keys…
kanoru3101 Aug 12, 2026
22ba376
docs: document json card bodies in the ai tree format
kanoru3101 Aug 12, 2026
b2508ca
docs: record the json card-body measurements and verification run in …
kanoru3101 Aug 12, 2026
85973f9
docs: show captured ai outputs in the benchmark guide's re-measured s…
kanoru3101 Aug 12, 2026
2c2a923
docs: state the benchmark verdict and trim superseded chain math from…
kanoru3101 Aug 12, 2026
b800acc
feat(cli): remove the tree --paths listing in favor of --operations
kanoru3101 Aug 13, 2026
140e65b
docs: drop the tree --paths listing from the command reference
kanoru3101 Aug 13, 2026
ddf1890
docs: condense the benchmark guide and add the three-description comp…
kanoru3101 Aug 14, 2026
778a7d3
Merge branch 'main' into feat/tree-v2
kanoru3101 Aug 14, 2026
c5013c9
fix(core): end api-graph node ranges at their own last content line
kanoru3101 Aug 14, 2026
98ab482
refactor(cli): split resolveTreeView selector branches into focused r…
kanoru3101 Aug 14, 2026
0ea5f06
fix(cli): use the renamed CollectSpecData type from core
kanoru3101 Aug 14, 2026
ca39db9
docs: anchor the benchmark on a multi-step task and split the compari…
kanoru3101 Aug 14, 2026
abdf55e
docs: measure the billing-API head-to-head across three model tiers
kanoru3101 Aug 14, 2026
61007fa
docs: state the model and session totals per description in the bench…
kanoru3101 Aug 14, 2026
f8a7b59
feat(core): resolve raw json pointers to indexed nodes or located dee…
kanoru3101 Aug 14, 2026
7e8a647
feat(cli): add tree --pointer navigation by raw json pointers
kanoru3101 Aug 14, 2026
85241c8
fix(cli): seed webhook used-by reports with the shared container node
kanoru3101 Aug 14, 2026
eb02bfa
docs: document tree --pointer navigation
kanoru3101 Aug 14, 2026
9b96e5c
docs: record pointer-card costs in the benchmark guide
kanoru3101 Aug 14, 2026
eaf0988
fix(core): route container pointers to bounded views and unify pointe…
kanoru3101 Aug 14, 2026
d32581a
fix(core): reject non-index array segments and route webhook containe…
kanoru3101 Aug 14, 2026
c6b010d
docs: strip the benchmark guide to prompts, commands, and measured to…
kanoru3101 Aug 14, 2026
fc64798
docs: trim the benchmark to the head-to-heads and name the cafe api p…
kanoru3101 Aug 15, 2026
d1a796c
docs: rebase the benchmark on english runs and native claude counters…
kanoru3101 Aug 15, 2026
157e576
docs: measure every description on every model tier
kanoru3101 Aug 15, 2026
bbfd388
docs: measure three prompt conditions across every description and model
kanoru3101 Aug 15, 2026
441b78c
feat: close every ai view with a next: line
kanoru3101 Aug 15, 2026
f0c1116
docs: measure the benchmark against the published snapshot
kanoru3101 Aug 15, 2026
5ee5b12
fix: skip the update banner when tree prints ai output
kanoru3101 Aug 15, 2026
3a90cd8
docs: report benchmark cost as context added, not session total
kanoru3101 Aug 16, 2026
8a2a0c1
docs: publish the reproduced benchmark grid
kanoru3101 Aug 16, 2026
1d8de14
docs: drop the is_error note from the benchmark guide
kanoru3101 Aug 16, 2026
44bda15
docs: report medians and the repeat spread in the benchmark
kanoru3101 Aug 16, 2026
16a4e6c
docs: list every benchmark sample behind the medians
kanoru3101 Aug 16, 2026
f26f0cb
docs: complete the benchmark grid with the repeated Sonnet cells
kanoru3101 Aug 16, 2026
b10332e
docs: refresh the command chains and drop the per-run appendix
kanoru3101 Aug 16, 2026
9fc0dff
docs: drop the stale run table and trim the benchmark notes
kanoru3101 Aug 16, 2026
3db1d8c
docs: explain the benchmark method in plain language
kanoru3101 Aug 17, 2026
3672052
docs: add cost next to context in the benchmark grid
kanoru3101 Aug 17, 2026
3d6f26e
docs: split the benchmark grid into context and cost tables
kanoru3101 Aug 17, 2026
7421b76
docs: describe each benchmark field where it is measured
kanoru3101 Aug 17, 2026
1821ec0
docs: trim the benchmark method section
kanoru3101 Aug 17, 2026
c482429
docs: drop the cost table and publish the steadier samples
kanoru3101 Aug 17, 2026
2699a33
docs: bring back the cost table with its caveat
kanoru3101 Aug 17, 2026
46b7f60
docs: add a benchmark that checks whether the flow an agent produces …
kanoru3101 Aug 18, 2026
b771d1c
docs: link the second benchmark from the sidebar and the guides index
kanoru3101 Aug 18, 2026
1d2af7d
docs: rewrite the second benchmark in the structure of the first
kanoru3101 Aug 18, 2026
0abb693
docs: split cost and pass rates into their own tables with per-run ve…
kanoru3101 Aug 18, 2026
d82a4bd
docs: show non-working benchmark cells with an explicit marker
kanoru3101 Aug 18, 2026
d59afbc
docs: recheck every benchmark run and show all three tree runs per model
kanoru3101 Aug 18, 2026
114dce4
docs: label every benchmark run tab with its model and condition
kanoru3101 Aug 18, 2026
cfb0bb7
docs: rerun the benchmark with a tree prompt that points at the comma…
kanoru3101 Aug 18, 2026
6063634
feat: shorten prose and error responses in tree --format=ai card bodies
kanoru3101 Aug 19, 2026
e4e6701
docs: remeasure the tree benchmark on the compacted ai output
kanoru3101 Aug 19, 2026
c363c25
docs: use the billing Fable cell's second batch of repeats and say so
kanoru3101 Aug 19, 2026
b6591e2
feat: state the effective security requirement in tree --format=ai
kanoru3101 Aug 19, 2026
06997f5
docs: remeasure the tree benchmark with the security line in the ai v…
kanoru3101 Aug 19, 2026
53ec13e
docs: show the inherited security line and date the first benchmark
kanoru3101 Aug 19, 2026
c783f5f
docs: repeat the billing Opus cell six times and state the spread it …
kanoru3101 Aug 19, 2026
4a2c97e
docs: say the ai body shortenings do not apply to json output
kanoru3101 Aug 19, 2026
1ef2ac1
docs: mark the first tree benchmark superseded and take it out of the…
kanoru3101 Aug 19, 2026
544fbea
fix(core): keep root servers and security when referenced files decla…
kanoru3101 Aug 19, 2026
6634c7e
feat: list every tag when tree --tag is given no name
kanoru3101 Aug 19, 2026
0203f10
test: refresh tree help snapshots for the new --tag description
kanoru3101 Aug 19, 2026
949aaf0
docs: add the third tree benchmark pilot over five descriptions
kanoru3101 Aug 19, 2026
a2f9d41
docs: extend the third benchmark to three models with five repeats a …
kanoru3101 Aug 19, 2026
a3bcf23
docs: bring the third benchmark to six descriptions with five runs a …
kanoru3101 Aug 19, 2026
c3e5506
docs: split the third benchmark grid and accept documented alternativ…
kanoru3101 Aug 19, 2026
9c50352
docs: add the prior-contamination experiment on the Stripe Climate co…
kanoru3101 Aug 20, 2026
c0da69b
docs: describe the third benchmark by what it now covers
kanoru3101 Aug 20, 2026
fc300e2
docs: state each benchmark description's size and file count above it…
kanoru3101 Aug 20, 2026
169c31b
fix: keep whole-file dependencies in the ai deps closure with signatures
kanoru3101 Aug 20, 2026
3c69b96
feat: report the ai file graph as a summary instead of the whole graph
kanoru3101 Aug 20, 2026
8391ecf
docs: add the DigitalOcean NFS task as a second prior-contamination c…
kanoru3101 Aug 20, 2026
73748ce
docs: split the third benchmark into a short guide and a full-run app…
kanoru3101 Aug 20, 2026
48d0da9
docs: name the description and the task apart in the third benchmark
kanoru3101 Aug 20, 2026
c06d245
docs: keep one task per description in the short benchmark guide
kanoru3101 Aug 20, 2026
1f7f245
docs: remeasure the third benchmark at ten runs a cell over six tasks
kanoru3101 Aug 20, 2026
769bf43
fix: compact ai card bodies for descriptions written in json
kanoru3101 Aug 21, 2026
304ed65
feat: return a tag's operations as one batch of cards with a shared c…
kanoru3101 Aug 21, 2026
a823f0e
revert: drop the batched tag cards from tree --format=ai
kanoru3101 Aug 21, 2026
31095ec
docs: remeasure the paypal tree cells on the current build
kanoru3101 Aug 21, 2026
77a6894
fix: say auth: none when an operation declares security: []
kanoru3101 Aug 25, 2026
141a696
docs: explain where the index costs more than it saves, and drop the …
kanoru3101 Aug 25, 2026
03428be
docs: make the tree page pass markdownlint
kanoru3101 Aug 25, 2026
8fc59c1
Merge branch 'main' into feat/tree-v2
kanoru3101 Aug 25, 2026
48d8c9a
docs: exempt the captured output blocks from the line-length rule in …
kanoru3101 Aug 25, 2026
a19c466
docs: correct the rule directories, rule types, and bundle size in th…
kanoru3101 Aug 25, 2026
93e7e2d
docs: fold the tree changesets into one and note api-graph in AGENTS.md
kanoru3101 Aug 25, 2026
e1c9de5
docs: cut the tree changeset down to what shipped
kanoru3101 Aug 25, 2026
5e9a29d
docs: cut the tree changeset to one sentence
kanoru3101 Aug 25, 2026
6ff7d7c
docs: rename the file-defines heading to an imperative
kanoru3101 Aug 25, 2026
eaa9374
docs: drop the superseded benchmark pages and unversion the current one
kanoru3101 Aug 25, 2026
b414d3e
docs: show works and cost under each tab instead of context
kanoru3101 Aug 25, 2026
6cfcdc4
perf: memoize a document's line split when slicing api-graph nodes
kanoru3101 Aug 26, 2026
102af8c
feat: add experimental generate-map command
kanoru3101 Aug 26, 2026
b0b0428
docs: document generate-map and add its condition to the benchmarks
kanoru3101 Aug 26, 2026
af60abb
docs: fill in the map results for the billing api and both github lay…
kanoru3101 Aug 26, 2026
68ec996
docs: price working answers and compare tree and map against no tree
kanoru3101 Aug 26, 2026
1e14e0d
docs: add the map condition's per-run verdicts and transcripts
kanoru3101 Aug 26, 2026
1d417c4
docs: drop the price-per-answer table and the redundant task column
kanoru3101 Aug 26, 2026
93d112a
docs: list the map condition's failures alongside the other two
kanoru3101 Aug 26, 2026
60cec05
docs: show the map prompt next to the other two in every tab
kanoru3101 Aug 26, 2026
d01edf4
docs: price cells as the mean of working runs and bill failures into …
kanoru3101 Aug 26, 2026
3fc3b5e
docs: break the answer price down by description and model
kanoru3101 Aug 26, 2026
864dbea
docs: add the against-no-tree deltas to the answer-price table
kanoru3101 Aug 26, 2026
651064a
docs: close both benchmark pages with objective conclusions
kanoru3101 Aug 26, 2026
3fd2610
docs: restyle the benchmark grids and conclude per model
kanoru3101 Aug 27, 2026
0431e79
docs: state the grid legend and the summary as plain text
kanoru3101 Aug 27, 2026
7f9beb5
docs: leave a cell with no working run unpriced and round costs exactly
kanoru3101 Aug 27, 2026
9d322a8
docs: collapse the duplicated benchmark prompts and tighten the write-up
kanoru3101 Aug 27, 2026
384b8fc
docs: show the cost change against original for both tree and map
kanoru3101 Aug 27, 2026
9ea7279
docs: say which condition each finding is about and split the cost ch…
kanoru3101 Aug 27, 2026
34eb762
docs: bold the larger of the two cost savings in each row
kanoru3101 Aug 27, 2026
02b3faa
docs: correct four conclusions that no longer matched the tables
kanoru3101 Aug 27, 2026
1ffa551
docs: put works, cost and the cost change in one summary table
kanoru3101 Aug 27, 2026
0669351
docs: shorten the summary table's API labels so ten columns need less…
kanoru3101 Aug 27, 2026
0d27aa8
docs: fit the summary table in the content column
kanoru3101 Aug 27, 2026
86baa79
docs: show the summary counts out of ten again
kanoru3101 Aug 28, 2026
a7a5bbd
docs: separate the conclusion figures with semicolons
kanoru3101 Aug 28, 2026
4f7649d
docs: state the conclusions against confidence intervals, not point e…
kanoru3101 Aug 28, 2026
bd32c03
docs: draw the conclusions from the grid itself
kanoru3101 Aug 28, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .changeset/calm-maps-appear.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@redocly/cli': minor
'@redocly/openapi-core': patch
---

Added an experimental `generate-map` command that writes a compressed plain-text map of an OpenAPI description — one line per operation with its auth, required fields, and source coordinates — for LLM agents to search locally instead of re-reading the description.
6 changes: 6 additions & 0 deletions .changeset/tree-command.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@redocly/openapi-core': minor
'@redocly/cli': minor
---

Added an experimental `tree` command that prints an API description as a navigable index of its operations, components, and files, with a `--format=ai` output for agents.
19 changes: 19 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ Key directories:
- `src/bundle/` — Bundling logic that resolves `$ref` across multiple files.
- `src/resolve.ts` — Document resolution for multi-file specs (local and remote).
- `src/types/` — TypeScript type definitions for OAS2, OAS3, AsyncAPI, Arazzo.
- `src/api-graph/` — The index the `tree` command reads: the node graph, its selectors, and the views built from it.

### `packages/cli` (@redocly/cli)

Expand Down Expand Up @@ -110,6 +111,24 @@ The root `npm run compile` runs both steps: tsc for core/respect-core, then the

The published CLI package ships from a staged `.publish/` directory (created by `packages/cli/scripts/prepare-publish-dir.mjs`) with a hand-crafted `package.json` that has zero runtime dependencies — everything is bundled.

## Explore an API description with `tree`

API descriptions are often too large to read directly — the OpenAPI descriptions used in this repository's benchmarks run to millions of tokens.
Use [`tree`](./docs/@v2/commands/tree.md) to walk one in bounded steps instead of reading or grepping the file:

```bash
redocly tree <file> --format=ai # overview: tags, webhooks, component sections
redocly tree <file> --find "<task words>" --format=ai # locate candidate operations/components
redocly tree <file> --pointer='<ptr>' --format=ai # already hold a $ref/lint pointer: jump straight to its location and usage
redocly tree <file> --path=<path> --operation=<method> --with-deps --format=ai # one operation with its full $ref closure, as schema signatures
redocly tree <file> --tag=<tag> --format=ai # a whole area's operations, only when browsing is genuinely needed
```

`--format=ai` is the agent format: plain text, one line per listing entry, and schema signatures instead of raw YAML in a `--with-deps` closure.
`--find` ranks operations and components by how many search terms hit their path, id, name, summary, or description, so step 2 usually narrows a whole API down to a few candidates in one call; anything a card's closure lists under `deeper` is one `--component`/`--name` call away.
Every result carries the defining `file` and `start_line`/`end_line`, so any answer can be checked against the source it came from.
Each view also ends with a `next:` line naming the flags that continue from it, so these five commands are enough — reading the full [command reference](./docs/@v2/commands/tree.md) costs more tokens than the exploration it saves.

## Respect the architecture: Walker, Visitors, Nodes

Linting in `packages/core` rests on three concepts: the **Walker** traverses the parsed API description and resolves `$ref`s, **Visitors** are objects keyed by **Node** type, and the Walker calls each visitor's `enter` / `leave` / `skip` hooks as it reaches a node.
Expand Down
224 changes: 224 additions & 0 deletions docs/@v2/commands/generate-map.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,224 @@
# `generate-map`

## Introduction

The `generate-map` command turns an API description into a single plain-text map for LLM agents:
one line per operation carrying the auth it requires, the request fields it needs, what to carry
from its response, and the file and line range that defines it.
Above the operations sit a security section and a table of contents whose line ranges point back
into the map itself.

An agent greps the map or reads one section of it and has the answer locally — no CLI at use time,
no network, and no re-reading of the description.
Generate it once, commit it next to the description, and regenerate it when the description changes.

Use `generate-map` to:

- Give an agent runtime a self-sufficient index of an API it can search with ordinary file tools.
- Keep the answer to "what does this call need" in one line instead of a `$ref` chase.
- Ship an index alongside a published description, the way a repository ships a README.

Generation is deterministic: no AI calls, no API keys, no timestamps.
The same description always produces byte-identical output, so the artifact diffs cleanly in git.

It is experimental and supports OpenAPI 2.0 and 3.x.
AsyncAPI and Arazzo descriptions are rejected — they have no operations to map.

For interactive exploration instead — impact analysis, `$ref` closures, search — use the
[`tree` command](./tree.md); `generate-map` is its precomputed, CLI-free counterpart.

## Usage

```bash
redocly generate-map <api>
redocly generate-map <api> -o <file>
redocly generate-map <api> --config=<path>
```

## Options

| Option | Type | Description |
| ------------- | ------- | ---------------------------------------------------------------------------------------------------------------- |
| api | string | OpenAPI description file path (or alias from `redocly.yaml` `apis:`). |
| --output, -o | string | Output file path. Defaults to `<name>.map.txt` next to the description. Required when the description is remote. |
| --config | string | Path to the configuration file. Defaults to `redocly.yaml` in the working directory. |
| --lint-config | string | Severity level for the configuration file. **Possible values:** `warn`, `error`, `off`. Default value is `warn`. |
| --help | boolean | Display help. |
| --version | boolean | Display version number. |

## Examples

### Generate a map

```bash
redocly generate-map cafe.yaml
```

```text
Map written to cafe.map.txt. 12 operations, 3 KB.
```

The whole artifact for the [Cafe demo description](https://github.com/Redocly/redocly-cli/blob/main/resources/cafe.yaml):

<!-- markdownlint-disable MD013 -->

```text
# Redocly Cafe · oas3_2 · 12 operations · generated by @redocly/cli from cafe.yaml — do not edit; regenerate after editing the spec
# one line per operation: METHOD /path · operationId — summary · auth: scheme (scopes) · body: required* fields · params: required query/header · 2xx→{what to carry} · src: file Lstart-end
# find your operation: grep this file by task words, or read the toc and sed its line range
servers: https://api.cafe.redocly.com

== security
OAuth2: oauth2 · token from https://api.cafe.redocly.com/oauth2/token
ApiKey: apiKey in header X-API-Key

== toc
Authorization (1) L17-18 — Create a client to demo the API.
Products (4) L20-24 — Operations related to products.
Orders (6) L26-32 — Order management operations.
Statistics (1) L34-35 — Statistics operations.

== operations
## Authorization
POST /oauth2/register · registerOAuth2Client — Create OAuth2 client · auth: none · body: name*, redirectUris:[any], scopes:[any], grantTypes:[any] · 201→{clientId, clientSecret, clientIdIssuedAt, clientSecretExpiresAt} · src: cafe.yaml L604-661

## Products
GET /menu · listMenuItems — List all menu items · auth: none · 200→{object, page, items} · src: cafe.yaml L32-111
POST /menu · createMenuItem — Create menu item · auth: OAuth2 (menu:write) · body: multipart/form-data · 201 · src: cafe.yaml L113-173
DELETE /menu/{menuItemId} · deleteMenuItem — Delete a menu item · auth: OAuth2 (menu:write) · 204 · src: cafe.yaml L178-198
GET /menu-item-images/{menuItemId} · getMenuItemPhoto — Retrieve a menu item photo · auth: none · 200 · src: cafe.yaml L203-226

## Orders
GET /orders · listOrders — List all orders · auth: OAuth2 (orders:read) · 200→{object, page, items, items[].id} · src: cafe.yaml L229-314
POST /orders · createOrder — Create order · auth: OAuth2 (orders:write) · body: customerName*, orderItems*:[{menuItemId*, quantity*}], id, object, status, totalPrice:int, createdAt, updatedAt · 201→{id, customerName, orderItems, orderItems[].menuItemId} · src: cafe.yaml L316-372
GET /orders/{orderId} · getOrderById — Retrieve an order · auth: OAuth2 (orders:read) · 200→{id, customerName, orderItems, orderItems[].menuItemId} · src: cafe.yaml L375-416
DELETE /orders/{orderId} · deleteOrder — Delete an order · auth: OAuth2 (orders:write) · 204 · src: cafe.yaml L478-502
PATCH /orders/{orderId} · updateOrder — Partially update an order · auth: OAuth2 (orders:write) · body: status*→OrderStatus · 200→{id, customerName, orderItems, orderItems[].menuItemId} · src: cafe.yaml L418-476
GET /order-items · listOrderItems — List all order items with menu item details · auth: OAuth2 (orders:read) · 200→{[].menuItemId} · src: cafe.yaml L505-546

## Statistics
GET /revenue · getRevenue — Get revenue statistics · auth: ApiKey (header X-API-Key) | OAuth2 (revenue:read) · 200→{revenue, averageOrderAmount, totalOrders, placedOrders} · src: cafe.yaml L549-601

== webhooks
POST webhook order-notification · orderNotificationWebhook — Order notification webhook · auth: none · body: orderId*, orderStatus*→OrderStatus, timestamp* · 200 · src: cafe.yaml L665-683
```

<!-- markdownlint-enable MD013 -->

### Sections

The map has four parts, in this order:

- **Header** — three comment lines: what this API is and where the map came from, the row legend,
and how to search the file.
The header names the source description, because line numbers in `src:` go stale as soon as it is edited.
- **`servers:`** — the servers the API declares at its root.
- **`== security`** — one line per scheme the description defines, with what it asks the caller to
send: `apiKey in header X-API-Key`, `http bearer`, or an OAuth2 scheme with its token endpoint.
A description that declares no scheme says so explicitly, because an empty section reads as
"this API needs no auth" when it means "this document never states how its calls authenticate".
- **`== toc`** — one line per tag with its operation count and the line range **into this map file**.
Those ranges are computed as the map is written and cannot go stale.
- **`== operations`** and **`== webhooks`** — the rows themselves, grouped by tag in the order the
description declares them.

### Row grammar

`METHOD /path · operationId — summary · auth: … · body: … · params: … · CODE→{…} · flags · src: file Lstart-end`

Every segment is omitted when it has nothing to say:

| Segment | What it carries |
| ------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `auth:` | The requirement the operation effectively has: its own, or the root one it inherits when it declares none. An `apiKey` scheme carries where the key goes (`ApiKey (header X-API-Key)`) so the row stands alone; an OAuth2 scheme carries its scopes. `\|` separates alternatives, `+` schemes that apply together. An operation that declares `security: []` reads `auth: none`. |
| `body:` | Top-level fields of the request schema: required first with `*`, compact types (`int`, `[str]`), enum values inline for required fields, one level into arrays of objects (`orderItems*:[{menuItemId*, quantity*}]`), capped at ten fields. A non-JSON body names its content type instead: `body: multipart/form-data`. |
| `params:` | Required query and header parameters. Path parameters are already visible in the path template. |
| `CODE→{…}` | The lowest success code and the fields worth carrying into the next call: the response's required top-level fields plus id-like fields at any depth as dotted paths (`orderItems[].menuItemId`), capped at four. When the operation overrides the server, its host follows: `⇒ uploads.github.com`. A response with no body renders as the bare code. |
| `deprecated` | Present when the operation is deprecated. |
| `src:` | The file that defines the operation and its line range, for checking any row against its source. |

An operation with several tags appears once, under its first tag.
Operations without tags group under `untagged`.

### Multi-file descriptions

A map of a multi-file description is one file all the same; each row's `src:` names the file that
defines that operation:

<!-- markdownlint-disable MD013 -->

```bash
redocly generate-map cafe-split/cafe.yaml
```

```text
## Authorization
POST /oauth2/register · registerOAuth2Client — Create OAuth2 client · auth: none · body: name*, redirectUris:[any], scopes:[any], grantTypes:[any] · 201→{clientId, clientSecret, clientIdIssuedAt, clientSecretExpiresAt} · src: cafe-split/paths/oauth2_register.yaml L2-57

## Products
```

<!-- markdownlint-enable MD013 -->

### Choose where the map goes

```bash
redocly generate-map cafe.yaml -o docs/cafe-index.txt
```

`--output` is required for a remote description, which has no local directory to write beside:

```bash
redocly generate-map https://example.com/openapi.yaml -o api.map.txt
```

## How agents use it

Point the agent at the file and let it search with the tools it already has.
Two access patterns cover almost everything.

**Grep by task words.** The summary on each row is the lexical surface:

```bash
grep -i "order" cafe.map.txt
```

**Read the toc, then one section.** The toc's ranges address the map itself, so a large map is
read in bounded slices instead of whole:

```bash
sed -n '26,32p' cafe.map.txt
```

<!-- markdownlint-disable MD013 -->

```text
## Orders
GET /orders · listOrders — List all orders · auth: OAuth2 (orders:read) · 200→{object, page, items, items[].id} · src: cafe.yaml L229-314
POST /orders · createOrder — Create order · auth: OAuth2 (orders:write) · body: customerName*, orderItems*:[{menuItemId*, quantity*}], id, object, status, totalPrice:int, createdAt, updatedAt · 201→{id, customerName, orderItems, orderItems[].menuItemId} · src: cafe.yaml L316-372
GET /orders/{orderId} · getOrderById — Retrieve an order · auth: OAuth2 (orders:read) · 200→{id, customerName, orderItems, orderItems[].menuItemId} · src: cafe.yaml L375-416
```

<!-- markdownlint-enable MD013 -->

When a row is not enough, `src:` opens the source at the right lines — a bounded read instead of
opening the whole description.

Tell the agent both patterns in the prompt.
In the benchmark, the same map produced very different costs depending on whether the prompt said
"start here" or "grep it, or read its toc and sed a range": the second wording kept a small model
inside a few kilobytes where the first let it read a 166 KB map in chunks.

For what this saves — 240 agent runs across eight description-task pairs, measured against both
reading the description directly and exploring it with `tree` — see
[Where the index pays](../guides/tree-agent-index-benchmark.md).

## Keep the map fresh

The map is generated, not maintained: the header says so, and every `src:` line range points into
a description that may have moved on.
Regenerate it whenever the description changes — in CI next to linting, or in a pre-commit hook:

```bash
redocly generate-map openapi.yaml && git add openapi.map.txt
```
1 change: 1 addition & 0 deletions docs/@v2/commands/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ API management commands:
- [`score`](score.md) Score an API for integration simplicity and AI agent readiness.
- [`split`](split.md) Split API description into a multi-file structure.
- [`stats`](stats.md) Gather statistics for a document.
- [`tree`](tree.md) Display the structure of an API description as a tree.

Linting commands:

Expand Down
Loading