Skip to content

Commit a74580b

Browse files
feat: improve PreToolUse hook relevance with multi-signal search
Replace FTS-only file retrieval with 3-signal ranking (symbol name, file path, FTS content). Remove git signals and Bash interception from enrichment. Update README and changelog.
1 parent 1cb471b commit a74580b

2 files changed

Lines changed: 23 additions & 14 deletions

File tree

README.md

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -269,24 +269,25 @@ Most MCP tools are passive — the agent has to know to call them. repowise hook
269269

270270
### PreToolUse — every search gets graph context
271271

272-
When your AI agent runs `Grep` or `Glob`, repowise intercepts the call and enriches it with:
272+
When your AI agent runs `Grep` or `Glob`, repowise intercepts the call and enriches it with the top 3 related files — found via multi-signal search (symbol name match, file path match, and full-text search on wiki content), ranked by relevance then PageRank:
273273

274-
- **Matching files** from the wiki's full-text search index
275-
- **Symbols** — functions, classes, and methods in those files
276-
- **Importers** — who depends on this file (callers)
277-
- **Dependencies** — what this file imports (callees)
278-
- **Git signals** — hotspot status, bus factor, primary owner
274+
- **Symbols** — top functions, classes, and methods in each file
275+
- **Imported by** — who depends on this file
276+
- **Uses** — what this file depends on
279277

280-
Average latency: **24ms**. No LLM calls. No network. Pure local SQLite queries.
278+
No LLM calls. No network. Pure local SQLite queries.
281279

282280
```
283-
[repowise] 2 related file(s) found:
281+
[repowise] 3 related file(s) found:
284282
285-
src/auth/middleware.ts
286-
Symbols: class:AuthMiddleware, function:validateToken, function:refreshSession
287-
Imported by: api/routes/index.ts, api/routes/payments.ts, api/routes/admin.ts
288-
Depends on: auth/jwt.ts, db/sessions.ts, config/auth.ts
289-
Git: HOTSPOT, bus-factor=1, owner=@alex
283+
src/core/ingestion/graph.py
284+
Symbols: class:GraphBuilder, method:__init__, method:build
285+
Imported by: src/core/ingestion/__init__.py
286+
Uses: src/core/analysis/communities.py, src/core/analysis/execution_flows.py
287+
288+
src/core/ingestion/__init__.py
289+
Imported by: src/cli/commands/update_cmd.py, src/core/pipeline/orchestrator.py
290+
Uses: src/core/ingestion/graph.py
290291
```
291292

292293
### PostToolUse — auto-detect stale wiki

docs/CHANGELOG.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
99

1010
---
1111

12+
## [0.3.1] — Unreleased
13+
14+
### Changed
15+
- **PreToolUse hook** — replaced FTS-only file retrieval with multi-signal ranking: symbol name match (highest weight), file path match, then FTS on wiki content. Returns top 3 files instead of 5. Removed git signals (HOTSPOT, bus-factor, owner) from enrichment output — use `get_risk` for that. Removed Bash command interception. Dependencies shown as "Uses" (2 per file) alongside symbols (3) and importers (3).
16+
17+
---
18+
1219
## [0.3.0] — 2026-04-13
1320

1421
### Added
@@ -286,7 +293,8 @@ See git history for releases prior to 0.2.0.
286293

287294
---
288295

289-
[0.3.0]: https://github.com/repowise-dev/repowise/compare/v0.2.3...HEAD
296+
[0.3.1]: https://github.com/repowise-dev/repowise/compare/v0.3.0...HEAD
297+
[0.3.0]: https://github.com/repowise-dev/repowise/compare/v0.2.3...v0.3.0
290298
[0.2.3]: https://github.com/repowise-dev/repowise/compare/v0.2.2...v0.2.3
291299
[0.2.2]: https://github.com/repowise-dev/repowise/compare/v0.2.1...v0.2.2
292300
[0.2.1]: https://github.com/repowise-dev/repowise/compare/v0.2.0...v0.2.1

0 commit comments

Comments
 (0)