Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
3325fd4
Add the new design tokens and the bundle adapter for the web app
Pranav-Mathad Nov 29, 2026
04494e3
Add the new shell, landing page and overview screen
Pranav-Mathad Nov 29, 2026
c9e0a95
Add the findings, map, decisions, change, trust and size screens
Pranav-Mathad Nov 29, 2026
5215c50
Remove the old web screens and document the new web app
Pranav-Mathad Nov 29, 2026
bc5f184
Show only real repositories in the top bar and reorder the report tabs
Pranav-Mathad Nov 29, 2026
1168846
Open the overview with what to fix first and the main modules
Pranav-Mathad Nov 29, 2026
89278e4
Put the ranked list first and say why each finding matters
Pranav-Mathad Nov 29, 2026
aead297
Say comparison date and drop slots the bundle never fills
Pranav-Mathad Nov 29, 2026
4c3e644
Cut the tab row to five and lead the landing page with the reports
Pranav-Mathad Nov 29, 2026
67515af
Open the report with what to fix first
Pranav-Mathad Nov 29, 2026
ed756b2
Show facts, judgement and fix in that order on the finding page
Pranav-Mathad Nov 29, 2026
b90ddaf
Turn the trust page into the approach page and trim before and after
Pranav-Mathad Nov 29, 2026
6c81da9
Simplify the map, decisions and size pages
Pranav-Mathad Nov 29, 2026
ff5bf82
Add journeys and trim the report to the pitch flow
Viraj5503 Nov 29, 2026
63150b1
Simplify the map and before and after pages and their wording
Viraj5503 Nov 29, 2026
041b3ec
Use a full border on the proposed fix box
Viraj5503 Nov 29, 2026
7b87533
Show the impact since the comparison date at a glance
Viraj5503 Nov 29, 2026
0a6b8aa
Order the report by the judging points and show robustness and AI use…
Viraj5503 Nov 29, 2026
ab57c15
Merge pull request #94 from Pranav-Mathad/viraj/pitch-ui
Viraj5503 Nov 29, 2026
7b1050e
Merge pull request #89 from Pranav-Mathad/simplify-report
Viraj5503 Nov 29, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,10 @@ These were needed to make the pieces fit. Each is open to change by the lanes it
6. **The web bundle** is `index.json`, `findings.json`, `decisions.json` and `map.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.
7. **Web navigation** lists the six screens of spec.md §10.2. The prototype has five tabs;
the web lane decides which screens are tabs and which open from a finding.
7. **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.tsx` and the screens in `web/src/routes/`.
8. **Python 3.12**, pinned in `.python-version`, because every dependency has ready-built
packages for it.

Expand Down
71 changes: 61 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ writes prose on top of those facts, and the app marks every AI sentence as AI.
| Stage 3, `model`: the map of modules per snapshot | Works on all three repositories |
| Stage 5, `analyze`: decisions, finding types, before and after | Works on all three repositories |
| Stage 7, `report`: ranking, `findings.json`, the web bundle | Works on all three repositories |
| Web app: Decisions, Structure grid, Close-up, Code, Before and after, Size, Report | Works on the three bundles in `web/public/bundles/` |
| Web app: the tabs Report, Findings (with finding detail), Map, Before and after, Approach, and the Decisions and Size screens | Works on the three bundles and the two synthetic fixtures in `web/public/bundles/`; see [Web app](#web-app) |
| Stage 6, `judge`: AI text for the shown findings | Works with `LLM_API_KEY` set; answers are cached in the run folder, so a re-run makes no call |
| `decisions propose`: rules proposed from written decision documents | Works with `LLM_API_KEY` set; writes `proposals.yaml` for review, and the reviewed rules are in `rules/` |
| `check <base>..<head>`: decisions a change breaks | Works; lists each broken decision with file and line, and exits 1 when there is one |
| Stability table (spec.md §11.3) | Measured on all three repositories: `make robustness REPO=<id>` after `report` measures it and rebuilds the report |
| Emerging-hotspots list (spec.md §12.2) | Filled on all three repositories; the Report screen lists up to 25 files, highest z first (25 on Artemis, 18 on Shopware, 1 on Graylog) |
| Emerging-hotspots list (spec.md §12.2) | Filled on all three repositories; the Change screen lists up to 25 files, highest z first (25 on Artemis, 18 on Shopware, 1 on Graylog) |

The results in this repository include AI text. On each repository `judge` judged the 25
highest-ranked findings of four types (broken rule, cheap loop, foundation depending on
Expand Down Expand Up @@ -127,7 +127,7 @@ does not depend on test code". A decision that is written but not checkable by m
## Token usage per analysis

The ledger of every AI call the gateway answered for these three runs, summed from
`results/<id>/usage.json`. The Report screen shows the same rows. Job B writes the claim
`results/<id>/usage.json`. The Trust screen shows the same rows. Job B writes the claim
and fix for the 25 judged findings (three votes per finding, and one more call for a vote
whose answer fails a check that allows a retry); job C writes a two-sentence description
of each module.
Expand Down Expand Up @@ -155,14 +155,14 @@ of each module.
- A re-run of `judge` answers from the cache in the run folder (`judgements/cache/`) and
makes no call; the ledger counts only calls the gateway answered, so it does not grow.
The stability step makes no AI call.
- With AI text switched off (the "AI text" switch in the app, kept in the address as
`ai=off`), every finding shows the fixed sentence built from the facts. Without `judge`
the report is complete with those sentences (spec.md §8.7).
- A finding without an AI answer that passed every check shows the fixed sentence built
from the facts, marked as computed. Without `judge` the report is complete with those
sentences (spec.md §8.7).

## Stability of the ranking

`make robustness REPO=<id>` runs the five tests of spec.md §11.3 and writes
`robustness.json`; the Report screen shows the same rows. Each cell says how many of the
`robustness.json`; the Trust screen shows the same rows. Each cell says how many of the
top 5 and of the top 10 are still in the top 5 and top 10 under the test.

| Test | Artemis top 5 | Artemis top 10 | Shopware top 5 | Shopware top 10 | Graylog top 5 | Graylog top 10 |
Expand All @@ -185,6 +185,50 @@ top 5 and of the top 10 are still in the top 5 and top 10 under the test.
- The step took 12.2 minutes on Artemis, 14.1 on Shopware and 10.4 on Graylog on a
10-core machine while other runs shared it.

## Web app

The web app shows one report per repository from the files in `web/public/bundles/`. It
loads static files only: it needs no server of its own and never calls an AI model. Every
AI sentence it shows was written by `judge` and stored in the bundle, and carries an "AI"
badge; everything else is marked as computed.

```sh
make web # development server at http://localhost:5173
cd web && npm run build && npm run preview # build the static app into web/dist and serve it
```

`web/dist` works offline and from any static host, opened at its `index.html`: every view
lives after the `#` of the address. `make bundle REPO=<id>` copies a run's bundle into
`web/public/bundles/<id>/` and lists it in `web/public/bundles/index.json`; build again
to include it in `web/dist`.

| Address (after `#`) | Screen |
|---|---|
| `/` | every repository, with the finding to fix first and its decisions by status; how the pipeline works |
| `/r/<id>` | Report: verdict, yardsticks, decisions, the simulated fix batch, the top findings |
| `/r/<id>/decisions` | Decisions, reached from Report: each checked decision with its conformance over time, and the written ones that cannot be checked |
| `/r/<id>/findings` | Findings: the ranked list and how the ranking is worked out |
| `/r/<id>/findings/<slug>` | one finding: the reading of the code, the cited lines, the simulation, the priority |
| `/r/<id>/map` | Map: the module grid. `?view=before\|now\|after`, `?cell=<src>,<dst>`, `?finding=<slug>`, `?fix=<slug>` |
| `/r/<id>/change` | Before and after: before and after the compared date, structural events, hotspots |
| `/r/<id>/trust` | Approach: coverage, limits, stability of the ranking, AI calls and their cost |
| `/r/<id>/size` | Size, reached from Map: lines by module and file, and where the new lines landed |

Some values show "not measured in this run" because the bundle does not carry them yet:

- the rules hash;
- the evidence behind the AI adoption date;
- the authority of a decision that no finding cites;
- the share of commits with an AI marker;
- the expected and found labels of module links;
- AI-marked changes against changes with no AI signal, by size band;
- agreement of the links, and of the file to module assignment, with the comparison
linkers;
- the share of silent misses;
- the after-fixes grid recoloured for the real repositories: the simulation counts links
between modules on a different basis from the grid, so its changes are listed but not
drawn on it.

## Limits

- Shopware and Graylog have no measured habit: no folder role met the settings for one
Expand All @@ -194,7 +238,7 @@ top 5 and of the top 10 are still in the top 5 and top 10 under the test.
answers. It does not make a new call, so it does not show how the AI text would change
on a run with the cache off.
- A simulated fix that leaves its target link on the map is shown as "Simulated: the link
remains" (on the grid, "Fix simulated: the link remains"), not as checked: 29 of the 50
remains" (on the finding page, "Fix simulated: the link remains."), not as checked: 29 of the 50
simulated fixes on Artemis, 1 of 19 on Shopware and 22 of 50 on Graylog.
- The simulation works on link counts between modules, and a move moves the whole
declaring file. Of the 119 simulated fixes, 14 are fixes that remove a link (Artemis 8,
Expand All @@ -215,7 +259,7 @@ top 5 and of the top 10 are still in the top 5 and top 10 under the test.
Links made while the program runs (computed paths, settings files, reflection) are not
seen.
- Thresholds and ranking weights are judgements, kept in `src/codexray/settings/`.
- Every run writes its own limits into `manifest.json` and the Report screen.
- Every run writes its own limits into `manifest.json`; the Trust screen lists them.

## Layout

Expand All @@ -236,7 +280,14 @@ schemas/ JSON Schema generated from contracts.py
rules/ reviewed decisions per analysed repository
repos.yaml the three repositories and their pinned commits
results/ findings, manifest, decisions, AI usage and stability of each repository's run
web/ the static web app (React, Vite, TypeScript)
web/ the static web app (React, Vite, TypeScript, Tailwind)
src/App.tsx the routes
src/routes/ one file per screen: Landing, Overview, Decisions, Findings,
FindingDetail, MapPage, Change, Trust, Size
src/components/cx/ shared parts: header, map grid, close-up, code pane, badges
src/cx/ the shapes the screens read, addresses, labels
src/data/ the bundle loader and the adapter from bundle to screens
scripts/ contract types and the stored map layouts, run at bundle-build time
public/bundles/ the bundles it loads: the three repositories and two synthetic fixtures
probes/ measurement scripts behind the spec's numbers; kept as measured
docs/research/ the team's research documents and starter kits
Expand Down
5 changes: 5 additions & 0 deletions web/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta
name="description"
content="CodeXray reads a repository’s written and enforced architecture decisions, measures how well the code keeps them over time, and ranks the exceptions worth fixing, with evidence for every claim."
/>
<meta name="theme-color" content="#f2f3ef" />
<title>CodeXray</title>
</head>
<body>
Expand Down
Loading