4.8 KiB
4.8 KiB
AGENTS.md
Codebase Intelligence for ottyl (Repowise)
Indexed by Repowise. Last indexed: 2026-09-07 (commit 0c41048). Confidence: 98%.
How to work in this repo
- Trust the index.
verified: truemeans the bytes were checked against the live tree, so never re-read those lines. Re-read only onbounds: "approximate",_meta.stale_warning,search_method: "bm25"orconfidence: "low";index_behind: truealone is informational. - 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) |
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?) |
What history says about touching these files. PR mode (changed_files) leads with a directive: read will_break / missing_cochanges / missing_tests / tests_to_run first. |
get_change_risk(revspec, extensions?, exclude_patterns?) |
Defect score for a whole commit or base..head range, from its diff on the live checkout. Lead with risk_percentile. Scores a range; 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() |
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
ottyl ingests log & metric streams -> processes via Rust engine (parsing, filtering, PromQL) -> outputs visualized data via TypeScript web UI.
Key modules
root— What the prose above calls things, the identifier to search for, and where it lives
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/lib/api.ts— 1 bug fix, last fix today; 41 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; 16 commits/90d
Code health
Three co-equal signals: defect risk 7.53/10 avg, hotspot health 7.15/10 (stable), worst src/engine/snapshot/mod.rs at 5.5/10 · maintainability 7.91/10 · performance risk 21 open static I/O-in-loop / N+1 findings. Detail: get_health().
Critical files:
webapp/src/components/NavMenu.tsx— churn risk — impact −2.4src/engine/tests.rs— churn risk — impact −2.4src/engine/mod.rs— churn risk — impact −2.4src/config/mod.rs— churn risk — impact −2.4src/api/dto.rs— churn risk — impact −2.4
Commands
- Build:
make build - Test:
make test - Lint:
make lint - Dev:
make dev