Add semantic directory orientation#7
Conversation
b023af8 to
973140d
Compare
Greptile SummaryThis PR ports semantic directory orientation from a premium build:
Confidence Score: 5/5Safe to merge — the changes are well-scoped to output formatting and the fallback cascade is correctly bounded by the existing 15k token hard cap. The budget-adaptive fallback cascade correctly exhausts all render modes before surfacing an error, the symbol preview parsing correctly strips the range bracket before kind-matching, and the directory footer additions are purely additive. Integration tests cover the new anchor format and the directory listing changes end-to-end. No files require special attention. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A["overview --symbols called"] --> B["generate_at_depth"]
B --> C["extract_symbol_previews per file\n(kind + name + range)"]
C --> D["symbol_modes = [Anchored/3, Anchored/2, Compact]"]
D --> E["Loop: format_overview_base with mode"]
E --> F{"enforce_hard_cap\n<= 15k tokens?"}
F -- Yes --> G["Return output"]
F -- No --> H{"More modes?"}
H -- Yes --> E
H -- No --> I{"Has relations?"}
I -- Yes --> J["Degraded loop:\nformat without relations,\ncycle through modes"]
J --> K{"enforce_hard_cap?"}
K -- Yes --> G
K -- No --> L["Error: output too large"]
I -- No --> L
M["srcwalk read dir"] --> N["list_directory"]
N --> O["Header: sizes ~= tokens\nEntries: ~N per file"]
O --> P["Next-action footers:\noverview --scope DIR --symbols\ndiscover symbol --scope DIR"]
Reviews (2): Last reviewed commit: "feat: add semantic directory orientation" | Re-trigger Greptile |
973140d to
f97e06e
Compare
Summary
overview --scope <dir> --symbolsanddiscover <symbol> --scope <dir>footers.overview --symbolsemit budget-adaptive inline symbol anchors (kind name@line-range) and fall back top3 -> top2 -> compact names under the existing 15k hard cap.sizes ~= tokens; rows use compact~Nvalues instead of repeating(N tokens).Validation
git diff --cached --checkcargo fmt --checkcargo test --locked --test map_outputcargo test --locked --test path_exactcargo clippy --locked -- -D warningscargo test --lockedsrcwalk src/readandsrcwalk overview --scope src/read --symbolsRelease note
No version bump, tag, release, npm publish, or crates publish in this PR.