-
Notifications
You must be signed in to change notification settings - Fork 0
Architecture
settletop-niles edited this page Nov 25, 2025
·
5 revisions
High-level pipeline:
- Writers: The extension instruments editor and file system events and appends PCM events to
.coderoot/v1/files/<rel>.xform.jsonl(rotated by size). - Snapshot builder:
snapshotBuilder.buildSnapshotFromJournal()consumes rotated journal files and materializes a per-file snapshot under.coderoot/v1/snapshots/<rel>.pcm.json(schema_version 1.1.8). - Index & manifest:
indexManifest.writeManifest()writes a small repository-level manifest used by reporters and maintenance tasks. - Reporter:
report.generateReport()locatesassets/ci-reporter.mjsand executesgenerateReport(workspaceRoot)to produce JSON and Markdown outputs.
Data shapes and storage:
- Journals: newline-delimited JSONL under
.coderoot/v1/files/*.xform.jsonl. - Snapshots: JSON
.pcm.jsonfiles under.coderoot/v1/snapshots/containing spans with origins and summary sections (lines_by_origin, chars_by_origin, time_by_day, etc.). - Refs: file binding and paths index under
.coderoot/v1/refs/(paths.json, bindings/*).
Maintenance & CI helpers:
- The extension includes helpers to seed or repair
.githubCI assets whencoderoot.ci.maintenance.enabledis set.
Architecture (expanded)
Diagram (placeholder)
[Editor/FS events] -> [Journal writer (.coderoot/v1/files/*.jsonl)] -> [Snapshot builder (.coderoot/v1/snapshots/*.pcm.json)] -> [Reporter (assets/ci-reporter.mjs) -> JSON/MD]
Key boundaries
- The writer only stores hashes, counts, ranges, and provenance — no source text.
- The snapshot builder is responsible for synthesizing spans and computing per-file totals.
- Reporter consumes snapshots and index data to produce human-readable reports.
Out of scope
- This repo does not store or expose raw file contents in
.coderoot. - It does not attempt to auto-fix user code or modify source files (except optional maintenance scripts guarded by settings).
How to verify
- Create a small test file, perform a few edits in VS Code, then run
CodeRoot: Generate Report. - Inspect
.coderoot/v1/snapshots/<file>.pcm.jsonand the generated Markdown for expected summaries.