CommitGraph uses a Pipe-and-Filter architecture.
- Extraction Layer (Git): Uses
child_process.spawnto stream raw git logs. - Normalization Layer: Converts raw logs into a
CommitRecordinterface. - Analysis Engine: A collection of pure functions that process
CommitRecord[]. - Scoring Engine: Aggregates analyzer outputs into a weighted health score.
- Reporting Layer: Formats the final data for the CLI, JSON, or Markdown.
All analyzers must adhere to the CommitRecord interface:
- hash: string
- author: string
- timestamp: number
- files: string[]
- message: string
- No Shell:
exec()is forbidden. All Git calls must usespawn. - Stateless: The core logic must not write to the file system except for requested reports.