How pyjamasamm/logrena works
LogReNa is a local-first log and code analysis CLI. Its main workflow parses and templates logs, checks events against configured feature-readiness signals and registered anti-pattern detectors, then correlates violations with retrieved code; its ask command combines logs, code, graph, and violations into grounded model answers. A separate indexing workflow prepares code chunks for hybrid retrieval. README describes the detector and Q&A capabilities; some implementation details for feature loading, correlation, and answering were not sampled, so those links follow the documented and CLI-visible orchestration.
Main entry points: cli.py CLI commands · __init__.py Detector registry · reranker.py Result reranker · llm_client.py Model clients
Components 18
Inputs and Indexing
- Log parser
src/log_parser.py - Feature graph
src/feature_graph.py
Log Analysis
- CLI commands
src/cli.py - Detector registry
src/detectors/__init__.py - Dependency check
src/detectors/dependency_violation.py - Silent failure check
src/detectors/silent_failure.py - Retry storm check
src/detectors/retry_storm.py - Violation correlation
src/correlate.py
Code Retrieval
- Repository indexer
src/repo_indexer.py - Code index
src/repo_indexer.py - Result reranker
src/reranker.py
Q&A and Privacy
- Grounded Q&A
src/qna.py - Model clients
src/llm_client.py - Privacy guard
src/privacy_guard.py
Other components
- Engineer
- Ollama
- Anthropic API
- CLI output
Connections 22
- Engineer → CLI commands: runs commands
- CLI commands → Log parser: parses logs
- CLI commands → Feature graph: loads signals
- CLI commands → Detector registry: runs checks
- Detector registry → Dependency check: dispatches
- Detector registry → Silent failure check: dispatches
- Detector registry → Retry storm check: dispatches
- CLI commands → Repository indexer: builds index
- Repository indexer → Code index: stores chunks
- CLI commands → Code index: loads index
- CLI commands → Violation correlation: correlates violations
- Violation correlation → Result reranker: retrieves code
- Result reranker → Code index: queries
- CLI commands → Grounded Q&A: asks question
- Grounded Q&A → Result reranker: retrieves evidence
- Grounded Q&A → Model clients: requests answer
- Result reranker → Model clients: judges candidates
- Repository indexer → Model clients: embeds chunks
- Model clients → Privacy guard: guards requests
- Privacy guard → Ollama: permits local calls
- Privacy guard → Anthropic API: permits opt-in calls
- CLI commands → CLI output: prints results