The pipeline is a chain: each stage reads what the one before it wrote. To let everyone start at once, the scaffold fixes the things stages hand to each other and gives every lane something to test against before the stage upstream exists.
Pick a lane and put your name in the Owner column in your first pull request.
| Lane | Owner | You write | Spec | Reads | Start without waiting by |
|---|---|---|---|---|---|
| repository | Pranav, Aryan | src/codexray/repository/, core/schema/01_repository.sql, settings/repository.yaml |
§5 | a Git repository | the tiny_repo test fixture |
| parse | Pranav | src/codexray/parse/, core/schema/02_parse.sql, settings/parse.yaml, settings/grammars.yaml |
§6 | snapshot_files, file contents |
reading files from tiny_repo with git ls-tree and git cat-file |
| model | Pranav | src/codexray/model/, core/schema/03_model.sql, settings/model.yaml |
§7 | links, snapshot_files, path_map |
inserting a few rows into an in-memory database (db.connect(":memory:")) |
| analyze | Pranav, Aryan | src/codexray/analyze/, the measured-habit and built-in parts of src/codexray/decisions/, core/schema/05_analyze.sql, settings/analyze.yaml |
§9, §12 | nodes, edges, history tables |
inserting a small map by hand |
| judge | Pranav, Aryan | src/codexray/judge/, job A in src/codexray/decisions/, settings/judge.yaml |
§8 | candidate_findings, the map |
the findings in web/public/bundles/fixture/findings.json |
| report | Pranav, Aryan | src/codexray/report/, src/codexray/check/, settings/report.yaml |
§11 | candidate_findings, decision_checks, judgements/ |
inserting candidate findings by hand |
| web | Viraj, Pranav | web/ |
§10 | the web bundle | the synthetic bundle in web/public/bundles/fixture/ |
Each package's __init__.py is that lane's brief: what it reads, what it writes, when it
is done, and which probe or starter kit to begin from. The order in which the product
comes together is spec.md §16; step 6 there is the first end-to-end demo.
Two lanes share src/codexray/decisions/. Keep job A and the computed decisions in
separate files so they do not collide.
Everything in src/codexray/core/ is read by more than one lane.
| File | Holds |
|---|---|
core/contracts.py |
The evidence record, the map's nodes and edges, decisions, findings, judgements, the web bundle files |
core/schema/*.sql |
The database tables, one file per stage |
core/runs.py |
The run folder layout, params_hash, sorted JSON writing |
core/db.py |
Opening the run's database; fingerprint() for "two runs give the same tables" |
core/settings.py |
Loads settings/*.yaml |
Use these instead of building your own: write JSON with runs.write_json, open the
database with db.connect, take paths from RunPaths.
A stage's own schema file and settings file are yours to change. Tell the lane that reads your tables when a column changes.
For core/contracts.py, core/runs.py and another lane's schema file:
- Say what you need in the team chat before writing it.
- Make the change in its own small pull request, with nothing else in it.
- Run
make contracts. It regeneratesschemas/codexray.schema.json, the fixture bundle andweb/src/contracts/generated.ts. Commit all three. - Merge it quickly, so nobody builds on the old shape for long.
The tests fail if the generated files are out of date, and if a table is added or renamed
without updating the list in tests/core/test_db.py.
- Branch from
main, named<lane>/<what>. Keep branches short-lived: merge several times a day. make checkbefore you push. CI runs the same thing.- Rebase on
mainbefore opening a pull request.mainstays green. - When your stage works, delete its line from
STUBSintests/test_cli.pyand add your own tests. - Nothing under
runs/orrepos/is committed. The gateway key lives in.envonly.
These come from spec.md §2. A change that breaks one needs a team decision.
- Facts before AI. Detection, counting and ranking are ordinary code.
- No fact without evidence.
Evidencerefuses a record without its lines or commits. - The snapshot is a key. Every row carries a repo and a snapshot commit. A stage never assumes it is looking at the newest snapshot: the bonus is the same stage run on two.
- No language or project names in the engine.
tests/test_engine_neutral.pyfails if one appears insrc/codexray/**/*.pyor*.sql. Put it in a settings file. - Same input, same output. Sort everything you write. No clock time, no random order, no absolute paths in output.
- State the limits, report what is healthy, blame no one, never guess AI authorship. The label for code without an explicit marker is "no AI signal".
These were needed to make the pieces fit. Each is open to change by the lanes it affects.
- Finding the run.
codexray ingestrecords the run inruns/<repo_id>/CURRENT; later commands take--repo <id>and read it. params_hashand the rules file. Rules are written after ingest, soparams_hashcovers only the git flags, tool and grammar versions and settings, and reviewing a rule does not move the run. The rules file has its ownrules_hash(runs.compute_rules_hash), recorded in the manifest and part of the cache key of anything that depends on rules. Recorded in spec.md §4.3.- Repo ids are short lower-case names (
artemis), set inrepos.yamlor withingest --id; the full name (ls1intum/Artemis) is therepofield in records. - Timestamps are stored as UTC without a zone, so they print the same everywhere.
- Tables beyond spec.md §5.8 and §6.2:
blobs_read,links,parse_coverage,candidate_findings,yardsticks,module_order. - The web bundle is
index.json,findings.json,decisions.jsonandmap.json. Only the finding record is fixed by the spec; the rest is a first draft for the report and web lanes to settle. Code slices for the code pane are not in it yet. - Web navigation has seven tabs per repository: Overview, Decisions, Findings, Map,
Change, Trust and Size. A finding opens on its own page from the Findings tab, and the
Map shows a finding or its simulated fix from a link on that page. The routes are in
web/src/App.tsxand the screens inweb/src/routes/. - Python 3.12, pinned in
.python-version, because every dependency has ready-built packages for it.
The visual direction for the web app is in
.impeccable/surfaces/prototype-codexray-demo.md. The clickable prototype is at
https://claude.ai/artifact/LmwJSrUkE3Bf1PPdTEHxVU (ask Pranav to share it with you).
PRODUCT.md says who the app is for and how it should speak.