vectorize-io / hindsight
Code health
Hotspots average 5.1, the place fixes pay off most.
Explore this codebase
- Code health map113hotspots across 4,411 files
- Ownership1,425sole-owned files: one author, no second reader
- Architecture17modules, 151 entry points
- Decisions87recorded, of which 0 in force and 87 background
- Refactoring297open opportunities, one per file
- TestsNo coverage report yet. Run your tests with coverage on, then add the report:
AlsoDocsChatFilesKnowledge graphChange couplingCommitsStatsCosts
Do next · 9
12 things worth doing in the week to Nov 7, the last indexed commit, 4 of them now.
Now
- High
Start breaking up ToMap (CCN 61, 184 lines): first lift lines 2549-2618
hindsight-clients/go/model_bank_template_config.go:2549
ToMap has many paths; easier to read and change once split, which also removes a duplicate; its file is imported by 21 files, changed 10 times in 90 days.
- gain
- +0.7 health on this file(inferred)
- health recoverable
- +0.7(inferred)
- size
- CCN 61, 184 lines
- steps
- 1 (0 mechanical)
Medium effort
Worth planning
Start breaking up _search_with_retries (CCN 211, 967 lines): first lift lines 10346-10357
hindsight-api-slim/hindsight_api/engine/memory_engine.py:10346
_search_with_retries nests deeply; easier to read and change once split; its file is imported by 177 files, changed 94 times in 90 days.
- gain
- up to under +0.1 health on this file(inferred)
- finding
- Nested complexity
- size
- CCN 211, 967 lines, nests 5 deep
- severity
- high
Medium effort, worth a checkBreak up _read_env (CCN 160, 1,188 lines)
hindsight-api-slim/hindsight_api/config.py:4951
_read_env has many paths; easier to read and change once split, which also removes a duplicate; its file is imported by 320 files, changed 43 times in 90 days.
- gain
- up to under +0.1 health on this file(inferred)
- finding
- Complex method
- size
- CCN 160, 1,188 lines
- severity
- high
Medium effort, worth a checkTidy the code shape this week's commits left: 30 findings in 11 files
12 commits in the last 7 days added or worsened long, complex or deeply nested code, still open. Start with
hindsight-api-slim/hindsight_api/engine/memory_engine.py(8 findings): tidying it while the change is fresh costs less than after the next one.- code-shape findings
- 30
- files
- 11
- commits
- 12
Large effortSimplify
api_retaininhindsight-api-slim/hindsight_api/api/http.py: tests reach it, and fixes keep landingChanged 46 times in 90 days, and 17 of those commits were bug fixes.
- commits in 90 days
- 46
- bug-fix commits
- 17
- line coverage
- Unknown, no report
- tests that reach it
- 26 test files, call graph(inferred)
Large effort, worth a check
Everything we found
5 areas
Every detector's open count by area. The actions above are the part worth doing.
- Code health4,742 open findingsCriticalChange entropy · hindsight-api-slim/hindsight_api/engine/reflect/agent.py44 findings · 13.5 deducted
- Refactoring297 open opportunitiesMediumto_dict+2.8 health, M effort · hindsight-clients/python/hindsight_client_api/models/bank_template_config.py
- Doc drift68Mediumskills/hindsight-docs/references/developer/api/mental-models.mdLink points at #decision-model-refresh, which ../knowledge-pages.md no longer declares.
- Decisions0 drifting from the codeMediumhindsight-api-slim/hindsight_api/engine/memory_engine.pyHigh-churn file with no governing decision
- Ownership1,425 sole-owned filesMediumhindsight-api-slim/hindsight_api/engine/memory_engine.pyOne author, no second reader