6.5 KiB
6.5 KiB
AGENTS.md
Codebase Intelligence for ottyl (Repowise)
Indexed by Repowise. Last indexed: 2026-09-07 (commit dbe2ea9). Confidence: 100%.
How to work in this repo
- Trust the index.
verified: trueand_meta.completemean the bytes were checked against the live tree, so never re-read them. Re-read only whatbounds: "approximate"or_meta.stale_warningnames.confidencerates the prose, not the evidence: onlowread thefallback_targetsorbest_guessesthe reply names, and runrepowise updateand ask again if_meta.hintsays the index is behind HEAD.index_behind: truealone is informational. - A zero carries its basis. An empty
callers/callees/used_bycomes with a*_basissaying how much of that language's calls the graph resolved, so read it before concluding nothing calls a symbol._meta.scope_hintnames the areas the answer did not touch. - Pre-edit, not instead-of-edit. These tools decide which files to read and edit. Reading a file before you edit it is correct and expected.
- Noisy commands (tests, builds,
git log/diff, searches, listings): preferrepowise distill <cmd>, the same command with its exit code preserved and errors-first output. A[repowise#<ref>: N lines omitted]marker is recoverable viarepowise expand <ref>(add-q <regex>to filter); never re-run the command to see omitted output. - Recording a decision you had to reason out:
repowise decision add --title T --decision Drecords it without prompting and prints the id (--format jsonto parse it back). It landsproposed, for a person to confirm.
Tools
| Tool | When and why |
|---|---|
get_answer(question) |
First call for any how/where/why question. Cite confidence: "high" or grounding: "extracted" directly; degraded means judge by retrieval_quality. symbol_bodies has live bodies. |
get_context(targets=[...]) |
Triage card for files/modules/symbols: docs, signatures, hotspot, fix history. No source bytes — include=["skeleton"] for the whole file verified, `["callers" |
get_symbol(id, depth?) |
Follow-up, not an entry point — one verified body for an id a prior response named (path.py::Name, path.py:140-180, repowise#<hex>). Never walk a file symbol by symbol; Read it. |
search_codebase(query) |
Hybrid search, auto-routed by query shape; force with `mode=symbol |
get_why(query, targets?) |
Why the code is shaped this way: decision records, git archaeology, rationale comments. Call before a refactor or a pattern divergence. |
get_risk(targets, changed_files?, include?) |
File history and structural reach. PR mode leads with directive; its 0-10 structural heuristic is uncalibrated, not a probability. Read typed test recommendations and coverage state first. |
get_change_risk(revspec?, extensions?, exclude_patterns?) |
Deterministic live-diff review signal for a commit or range. Lead with benchmarked percentile/classification; the 0-10 diff-shape score is supporting, not a probability. get_risk scores paths. |
get_health(targets?, include?) |
Defect / maintainability / performance scores and findings. Self-check the files you touched before finishing. |
get_dead_code(tier?, min_confidence?, safe_only?) |
Confidence-tiered unreachable files / unused exports / zombie packages. For cleanup sweeps, not targeted fixes. |
get_overview() |
Architecture map. Call once, first, in an unfamiliar repo; skip it after that. |
Architecture
Files: 81 | Lines: 18237 | Import cycles: 1 ottyl is a rust codebase of 81 files. Execution starts at src/main.rs, webapp/src/App.tsx, webapp/src/main.tsx. --- *Built from the code's structure. It states what is there, not why it is that way.
Key modules
webapp/src— webapp/src · webapp/src/components · webapp/src/lib · webapp/src/lib/api Language: typescript | Files: 30 | Public symbols: 97…webapp/src/lib— webapp/src/lib · webapp/src/lib/api Language: typescript | Files: 14 | Public symbols: 67 / 74 Covers the 14 source files in 2…src/engine— src/engine Language: rust | Files: 14 | Public symbols: 122 / 531 Covers the 14 source files in src/enginewebapp/src/components— webapp/src/components Language: typescript | Files: 14 | Public symbols: 29 / 94 Covers the 14 source files in…src— src · src/api · src/cli · src/config · src/flavour Language: rust | Files: 10 | Public symbols: 300 / 598 Covers the 10 source…src/engine/snapshot— src/engine/snapshot Language: rust | Files: 6 | Public symbols: 0 / 139 Covers the 6 source files in src/engine/snapshotwebapp— webapp · webapp/src Language: typescript | Files: 3 | Public symbols: 1 / 19 Covers the 3 source files in 2 directories under…
Entry points
src/main.rswebapp/src/main.tsxwebapp/src/App.tsx
Files that need care (bug-fix history first, then churn — check get_risk before editing)
webapp/src/App.tsx— 3 bug fixes, last fix today; 22 commits/90dwebapp/src/components/Dashboards.tsx— 3 bug fixes, last fix today; 17 commits/90dwebapp/src/components/Params.tsx— 2 bug fixes, last fix today; 15 commits/90dwebapp/src/components/NavMenu.tsx— 1 bug fix, last fix today; 22 commits/90dwebapp/src/components/Docs.tsx— 1 bug fix, last fix today; 17 commits/90d
Code health
Three co-equal signals: defect risk 5.95/10 avg, hotspot health 4.94/10 (stable), worst src/engine/snapshot/mod.rs at 2.0/10 · maintainability 7.48/10 · performance risk 16 open static I/O-in-loop / N+1 findings. Detail: get_health().
Critical files:
webapp/src/components/LogPreview.tsx— untested hotspot — impact −2.0webapp/src/lib/useSettingsPanel.ts— untested hotspot — impact −2.0webapp/src/components/NavMenu.tsx— change entropy — impact −1.3src/main.rs— change entropy — impact −1.3webapp/src/App.tsx— change entropy — impact −1.3
Commands
- Build:
make build - Test:
make test - Lint:
make lint - Dev:
make dev