Skip to content

Commit 5689c01

Browse files
aksOpsclaude
andcommitted
Update README badges and CLAUDE.md for Phase 2 completion
204 files, 23,370 LOC, 75 detectors, 415 tests, 0 vulnerabilities. Updated CLAUDE.md: tech debt resolved, adding detector now needs zero registry changes (auto-discovered). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent bebf0d9 commit 5689c01

1 file changed

Lines changed: 25 additions & 9 deletions

File tree

CLAUDE.md

Lines changed: 25 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -81,15 +81,31 @@ FileDiscovery → Parsers → Detectors → GraphBuilder (buffered) → Linkers
8181
| `analyzer.py` | Pipeline orchestrator |
8282
| `cli.py` | CLI commands (analyze, graph, query, find, cypher, bundle, cache, plugins) |
8383

84-
## Known Tech Debt (Phase 2)
85-
86-
- Registry has 75-entry hardcoded detector list — needs auto-discovery
87-
- `imports_detector.py` is 723 lines — needs splitting per language
88-
- 60+ detectors have no tests — need coverage
89-
- `_parse_structured()` has 11-branch elif chain — needs dispatch table
90-
- Linker protocol uses `_new_module_nodes` private attribute hack — needs `LinkResult`
91-
- Missing extensions: `.html`, `.css`, `.mjs`, `.cjs`, `.jsonc`, `.groovy`, `.pyi`
92-
- No extensionless file support (Dockerfile, Makefile, go.mod)
84+
## Tech Debt Resolved (Phase 2 — Complete)
85+
86+
- Registry auto-discovers detectors via `pkgutil.walk_packages()` — new detector = create file, done
87+
- `imports_detector.py` split into `kotlin_structures.py`, `rust_structures.py`, `scala_structures.py` with fixed regexes
88+
- 54 new tests added for 10 previously untested detectors (415 total tests)
89+
- `_parse_structured()` uses `_STRUCTURED_PARSERS` dispatch dict
90+
- Linker protocol uses `LinkResult(nodes, edges)` dataclass — no more private attribute hack
91+
- 16 new extensions added (.html, .css, .mjs, .cjs, .jsonc, .groovy, .pyi, .razor, .cshtml, .adoc, etc.)
92+
- Extensionless files supported via `_FILENAME_MAP` (Dockerfile, Makefile, go.mod, Jenkinsfile)
93+
- Shared `detectors/utils.py` with `decode_text`, `iter_lines`, `find_line_number`, `filename`, `matches_filename`
94+
95+
## Adding a New Detector (Updated)
96+
97+
1. Create file in `detectors/<category>/my_detector.py`
98+
2. Implement `Detector` protocol (name, supported_languages, detect method)
99+
3. **No registry changes needed** — auto-discovered by package scanning
100+
4. Create test in `tests/detectors/<category>/test_my_detector.py`
101+
5. Include a determinism test (run twice, assert identical output)
102+
6. Run `pytest tests/ -x -q` — all tests must pass
103+
104+
## Remaining Work
105+
106+
- Phase 3: Flow generator (GitLab CI, Helm, enhanced Dockerfile, Mermaid flow command)
107+
- Phase 4: 30+ new framework detectors (Go web, EF Core, Prisma, Pydantic, etc.)
108+
- KuzuDB bulk import optimization for edge insertion
93109

94110
## Updating This File
95111

0 commit comments

Comments
 (0)