# Project export: Codex Inspector

This document was generated by HackStack to give an AI agent context about a hackathon project. Sections are labeled with their provenance; content marked as truncated was cut to keep this document small.

## Project metadata

- Hackathon: OpenAI Build Week
- Tagline: Codex Inspector is a Codex plugin that helps AI engineers use Codex more effectively. It provides a metric dashboard, session inspection, and Codex powered reviews with actionable insights.
- Devpost: https://devpost.com/software/codex-coach
- GitHub: https://github.com/dylanjbarth/codex-inspector
- Demo: https://codex-inspector-sample.jungnerd.chatgpt.site/
- Video: https://www.youtube.com/embed/HDLG8PnUeYk?enablejsapi=1&hl=en_US&rel=0&start=&version=3&wmode=transparent
- Team: 3 GitHub contributor(s) — Dylan Barth (89 commits), Jungnerd (7 commits), Luis Gonzalez (3 commits)

## Devpost submission (written by the team)

### Inspiration

We are Codex power users and we wanted to be able to have more insight into how our tokens are spent and how we could use Codex more effectively. The app hides a lot of technical detail from the user. We want to be able to see what context Codex had received, or how work was distributed across agents. Answering those questions meant manually searching large session logs and reconstructing events by hand. We wanted the observability tools we expect from other developer systems, but designed specifically for private, local Codex workflows.

### What it does

Codex Inspector turns the Codex session logs already on your computer into a local dashboard. It shows where tokens and capacity went, lets you trace a root session through its turns, spawned agents, tool calls, compactions, and recorded evidence, and can launch an opt-in Effectiveness Review that offers evidence-backed strengths and improvements. Every insight remains connected to the session events behind it.

### How we built it

We built Inspector as three connected pieces: a Codex plugin with lifecycle hooks and skills, a Go CLI that creates a versioned local SQLite index, and a React dashboard for exploring usage, sessions, and reviews. Codex and GPT-5.6 helped us move from brainstorming and product-design grilling through architecture, implementation, browser-driven design reviews, and end-to-end verification. The team then combined the strongest ideas from independent MVP explorations into one coherent workflow.

### Challenges we ran into

Codex history is large, evolving, and spread across several formats that do not always have identical coverage or identifiers. We had to correctly connect root sessions with spawned agents, distinguish exact facts from derived, estimated, or unavailable information, and keep searches responsive across large histories. Preserving a strict privacy boundary while supporting exact evidence and model-powered reviews also required careful scope previews, explicit consent, compatibility checks, and failure-safe indexing.

### Accomplishments we're proud of

We shipped a complete local-first journey from aggregate usage to a causal session map, chronological event evidence, and an explicitly started GPT-5.6 review whose citations return to the original session. Inspector handles large histories incrementally, keeps model judgment separate from deterministic indexing, and never rewrites the source sessions. We are especially proud that the full installation and hero workflow were exercised repeatedly through clean-install, browser, crash-recovery, security, and synthetic end-to-end tests.

### What we learned

We learned that Codex’s local history contains enough information to build a surprisingly rich observability experience, but trustworthy interpretation depends on careful provenance and honest fidelity labels. Token usage alone rarely tells the whole story: context growth, retries, tool choice, task framing, and delegation matter just as much. Most importantly, improvement advice becomes far more useful when users can inspect its evidence and remain in control of whether Codex acts on it.

### What's next

Next, we want to support more platforms and Codex history versions, improve live inspection of active sessions, and add stronger privacy controls for sharing evidence. We also see opportunities for recurring reviews, longitudinal workflow trends, and detectors that identify repeated processes worth turning into skills, hooks, or automations. The long-term goal is to help every Codex user build a workflow that continuously becomes more understandable, reliable, and effective.

## README (from the GitHub repository)

# Codex Inspector

**[OpenAI Build Week 2026](https://openai.devpost.com/) · Developer Tools**

**See how you use Codex, understand what happened, and improve what happens
next.**

Codex Inspector gives people who use Codex heavily a clear view into how they
work. It turns the Codex sessions already on your Mac into a dashboard where
you can explore usage, investigate individual sessions, and ask Codex for
evidence-backed advice about your workflow.

Your session history and Inspector data stay on your machine. There is no
account, cloud dashboard, remote database, or sample data to configure.

## Try the hosted sample

[Open the interactive Codex Inspector sample](https://codex-inspector-sample.jungnerd.chatgpt.site/)
to explore the dashboard without installing anything. This separate public
sandbox uses a privacy-safe synthetic dataset with internally consistent
projects, sessions, models, reasoning levels, agent contributions, and token
records. It never reads local Codex files.

![Codex Inspector hosted sample dashboard](docs/screenshots/hosted-demo-dashboard.jpg)

_The 30-day overview includes eight matching root sessions and 3,137,000
recorded tokens._

<details>
<summary>See the same data with specific filters applied</summary>

![Codex Inspector hosted sample filtered to one project, model, reasoning level, and contribution type](docs/screenshots/hosted-demo-filtered.jpg)

_Filtering to the last seven days, Codex Inspector, gpt-5.6-sol, xhigh, and
spawned-agent work narrows the same dataset to one root session and 193,000
recorded tokens._

</details>

> [!NOTE]
> The current release supports **macOS on Apple Silicon** and Codex CLI/host
> `0.142.5` or newer. See the [support matrix](docs/contracts/support-matrix.md)
> for exact compatibility details.

## From session logs to an actionable answer

Without Inspector, answering “where did my Codex capacity go?” means searching
session files, connecting spawned-agent work by hand, reconstructing what
happened turn by turn, and finding the original evidence behind a suspected
problem.

With Inspector, you can start with usage across all sessions, open the session
responsible for that activity, separate main-session work from delegated work,
inspect the exact turn and events, and start a GPT-5.6 review whose findings
link back to that evidence.

## Questions Inspector helps you answer

- Where are my Codex tokens and available capacity going?
- Which projects and sessions account for the most activity?
- How much work happened in my main session, and how much was delegated to
  other agents?
- What did Codex actually do during a session or turn?
- Where did a session get stuck, repeat work, or accumulate too much context?
- What am I doing well, and what should I try differently next time?

Inspector connects every summary and recommendation back to the recorded
session evidence behind it. It does not reduce your work to a single quality or
efficiency score.

## Why Inspector is different

- **More than token accounting:** Usage leads directly to the sessions, turns,
  agents, and original evidence behind it.
- **Facts before judgment:** Normal indexing is local and repeatable. Reviews
  use a model only when you explicitly start one.
- **Advice you can verify:** Review findings cite recorded events instead of
  hiding their reasoning behind an opaque score.

## What you can do

### Understand your usage

See token use over time, the latest capacity readings recorded by Codex, and
the sessions that contributed the most. Work done by the main session and by
spawned agents is shown separately.

### Investigate a session

Search your sessions, follow work into spawned agents, and replay a turn in the
order it happened. You can inspect messages, tool calls, patches, searches,
context compactions, and token records without digging through log files.

![Session Inspector showing delegated work and an original tool request](docs/screenshots/hosted-demo-session-inspector.jpg)

_Synthetic session data shows the root turn, delegated work, and original
`exec_command` evidence side by side. No private Codex history is included._

### Improve your workflow

Start an Effectiveness Review for one session or a recent period. Codex looks
at task framing, execution, delegation, and opportunities to turn repeated work
into reusable guidance or automation. Each finding cites the local evidence
that supports it and suggests a concrete next step.

![Completed GPT-5.6 Effectiveness Review with a source-backed finding](docs/screenshots/hosted-demo-review.jpg)

_A completed GPT-5.6 review connects each finding to available evidence and a
concrete next action. No private Codex history is included._

## How it works

Codex Inspector has three parts:

1. **The Codex plugin** connects Inspector to your Codex workflow. Its hooks
   leave small signals when sessions change, and its bundled skills help you
   open Inspector, jump to the current session, and run reviews.
2. **The local CLI** reads your existing Codex history and builds a private,
   rebuildable index on your Mac. It never rewrites your Codex sessions.
3. **The local dashboard** turns that index into usage views, session traces,
   and review reports in your browser.

![How Codex Inspector turns local Codex sessions into a private index, dashboard, and explicitly requested reviews](docs/design/codex-inspector-how-it-works.png)

Normal indexing is local and deterministic. A review is different: it is an
explicit Codex task and may send the evidence it reads to your configured Codex
model service. Opening the dashboard never starts a review.

## Built with Codex and GPT-5.6

Codex Inspector is an OpenAI Build Week project in the Developer Tools track.
We used Codex throughout product discovery, design, implementation, and
verification:

- An initial brainstorming and grilling session challenged the target
  audience, product promise, privacy boundary, evidence standard, technical
  shape, and must-ship scope.
- Codex helped turn those decisions into the local-first architecture and the
  connected Token & Capacity, Context Inspector, and Effectiveness Reviews
  experience.
- We used Codex to implement and test the indexer, dashboard, plugin, review
  workflow, compatibility checks, and clean-install path.
- Browser-driven design reviews helped us improve the working interface through
  repeated implementation and verification passes.

GPT-5.6 Sol at high reasoning helped shape the initial product direction and
the Effectiveness Reviews experience. GPT-5.6 is also part of the finished
product: reviews use Sol by default, offer Terra and Luna, and start a persisted
Codex task with the model and reasoning level selected by the user. Each review
is bounded to the chosen work, and its findings must cite evidence that
Inspector can resolve back to the recorded session.

Codex accelerated the work, but the team made the final product, design, scope,
privacy, and release decisions. The original
[Build Week plan](docs/plans/build-week-plan.md),
[dashboard exploration](docs/brainstorming/codex-home-dashboard-metrics.md),
[session-map exploration](docs/brainstorming/context-inspector-session-map.md),
and [review exploration](docs/brainstorming/codex-effectiveness-reviews.md)
preserve the decisions and tradeoffs that shaped the project.

## Install

The easiest path is to install the plugin first, then let Codex install and
verify the local CLI.

### 1. Install the plugin

In a terminal, run:

```sh
codex plugin marketplace add "dylanjbarth/codex-inspector@v0.1.2"
codex plugin add codex-inspector@codex-inspector-development
```

Start a new Codex session. When Codex asks you to review the plugin hooks,
confirm that all seven Inspector hooks run `inspector-hook.sh`, then choose
**Trust all and continue**.

### 2. Ask Codex to open Inspector

In the new session, enter:

```text
Open Codex Inspector.
```

You can explicitly select the bundled skill if needed:

```text
Use $codex

[README truncated for size]

## Detected evidence (automated analysis)

Indexed codebase: 176 recognized source files, 3761 KB.
- CSS (language) — detected in the code
- Go (language) — detected in the code
- HTML (language) — detected in the code
- JavaScript (language) — detected in the code
- React (technology) — detected in the code
- SQL (language) — detected in the code
- Tailwind CSS (technology) — detected in the code
- TypeScript (language) — detected in the code

## Codebase structure (from repository index)

### Files (120 of 222)

```
.agents/plugins/marketplace.json
.agents/skills/wireframe-first/agents/openai.yaml
.agents/skills/wireframe-first/SKILL.md
.github/workflows/release.yml
.gitignore
cmd/codex-inspector/main.go
design-qa.md
docs/architecture/mvp-architecture.md
docs/brainstorming/codex-effectiveness-reviews.md
docs/brainstorming/codex-home-dashboard-metrics.md
docs/brainstorming/context-inspector-session-map.md
docs/contracts/fact-model.md
docs/contracts/internal-api.md
docs/contracts/metrics.md
docs/contracts/performance-budgets.md
docs/contracts/phase-0-verification.md
docs/contracts/README.md
docs/contracts/reviews.md
docs/contracts/schema.sql
docs/contracts/support-matrix.md
docs/demo-runbook.md
docs/phase1-verification.md
docs/phase2-verification.md
docs/phase3-verification.md
docs/phase4-verification.md
docs/phase5-verification.md
docs/phase6-verification.md
docs/plans/build-week-plan.md
docs/plans/demo-critical-feedback-implementation-plan.md
docs/plans/wireframing-workflow.md
docs/reports/compatibility-spike-2026-07-19.md
docs/ui/inspector-core/decisions.md
docs/ui/inspector-core/requirements.md
docs/ui/inspector-core/state-matrix.md
fixtures/codex-exec/thread-started.jsonl
fixtures/hooks/marker.json
fixtures/hooks/post-compact.json
fixtures/hooks/pre-compact.json
fixtures/hooks/session-start.json
fixtures/hooks/stop.json
fixtures/hooks/subagent-start.json
fixtures/hooks/subagent-stop.json
fixtures/hooks/user-prompt-submit.json
fixtures/local-structural/cohorts/codex-0-142-5.jsonl
fixtures/local-structural/cohorts/codex-0-144-0-alpha-4-parent.jsonl
fixtures/local-structural/cohorts/codex-0-144-0-alpha-4.jsonl
fixtures/local-structural/cohorts/codex-0-145-0-alpha-18-parent.jsonl
fixtures/local-structural/cohorts/codex-0-145-0-alpha-18.jsonl
fixtures/local-structural/cohorts/manifest.json
fixtures/local-structural/stage-01-compatibility-summary.json
fixtures/plugin-marketplace/.agents/plugins/marketplace.json
fixtures/plugin-marketplace/plugin/.codex-plugin/plugin.json
fixtures/plugin-marketplace/plugin/hooks/hooks.json
fixtures/plugin-marketplace/plugin/hooks/probe.sh
fixtures/plugin-marketplace/plugin/skills/review-session/SKILL.md
fixtures/synthetic/descendant.jsonl
fixtures/synthetic/expected-facts.json
fixtures/synthetic/expected-metrics.json
fixtures/synthetic/expected-revisions.json
fixtures/synthetic/root.jsonl
fixtures/synthetic/schema-v1.sql
fixtures/synthetic/session_index.jsonl
fixtures/synthetic/source-inventory.json
fixtures/synthetic/truncated.jsonl
fixtures/synthetic/unsupported.jsonl
go.mod
go.sum
install.sh
internal/cli/cli.go
internal/cli/phase2_test.go
internal/cli/progress_test.go
internal/cli/progress.go
internal/compat/compat_test.go
internal/compat/compat.go
internal/evidence/resolver_test.go
internal/evidence/resolver.go
internal/facts/facts.go
internal/home/home_test.go
internal/home/home.go
internal/home/umask_unix.go
internal/hook/hook_test.go
internal/hook/hook.go
internal/indexer/indexer_test.go
internal/indexer/indexer.go
internal/inspector/repository_test.go
internal/inspector/repository.go
internal/metrics/capacity_internal_test.go
internal/metrics/downsample_test.go
internal/metrics/engine_test.go
internal/metrics/engine.go
internal/phase0/contracts_test.go
internal/phase0/contracts.go
internal/phase0/epoch_contract.go
internal/phase0/fts_contract.go
internal/phase0/schema_v2_test.go
internal/phase1/contracts_test.go
internal/process/client.go
internal/process/lock_unix.go
internal/process/metadata_test.go
internal/process/metadata.go
internal/reviews/launch.go
internal/reviews/manager_test.go
internal/reviews/manager.go
internal/reviews/plan.go
internal/reviews/types.go
internal/server/assets/assets/index.css
internal/server/assets/assets/index.js
internal/server/assets/index.html
internal/server/server_test.go
internal/server/server.go
internal/sources/adapter_test.go
internal/sources/adapter.go
internal/sources/discovery.go
internal/sources/session_index.go
internal/storage/migrations/001_schema.sql
internal/storage/rebuild_test.go
internal/storage/source_inventory_test.go
internal/storage/store.go
internal/storage/validation_test.go
internal/version/version.go
[102 more files omitted for size]
```

### Dependencies

- go.mod: github.com/dustin/go-humanize@v1.0.1, github.com/getkin/kin-openapi@v0.142.0, github.com/go-openapi/jsonpointer@v0.22.5, github.com/go-openapi/swag/jsonname@v0.25.5, github.com/google/uuid@v1.6.0, github.com/kr/pretty@v0.3.1, github.com/mattn/go-isatty@v0.0.20, github.com/ncruces/go-strftime@v1.0.0, github.com/oasdiff/yaml@v0.1.1, github.com/oasdiff/yaml3@v0.0.14, github.com/remyoudompheng/bigfft@v0.0.0-20230129092748-24d4a6f8daec, github.com/santhosh-tekuri/jsonschema/v5@v5.3.1, github.com/santhosh-tekuri/jsonschema/v6@v6.0.2, golang.org/x/sys@v0.46.0, golang.org/x/text@v0.14.0, modernc.org/libc@v1.74.1, modernc.org/mathutil@v1.7.1, modernc.org/memory@v1.11.0, modernc.org/sqlite@v1.54.0
- package.json: @playwright/cli@0.1.17
- web/package.json: @eslint/js@9.39.2, @tailwindcss/vite@^4.3.3, @testing-library/jest-dom@6.9.1, @testing-library/react@16.3.2, @types/node@^26.1.1, @types/react@19.2.8, @types/react-dom@19.2.3, @vitejs/plugin-react@4.7.0, class-variance-authority@^0.7.1, clsx@^2.1.1, eslint@9.39.2, eslint-plugin-react-hooks@7.0.1, eslint-plugin-react-refresh@0.4.24, globals@16.5.0, jsdom@27.4.0, lucide-react@^1.25.0, radix-ui@^1.6.3, react@19.2.3, react-dom@19.2.3, recharts@^3.9.2, shadcn@^4.13.1, tailwind-merge@^3.6.0, tailwindcss@^4.3.3, tw-animate-css@^1.4.0, typescript@5.9.3, typescript-eslint@8.53.0, vite@7.3.1, vitest@4.0.18

### Recent commits (newest first)

- release: prepare v0.1.2
- Merge pull request #19 from dylanjbarth/codex/sample-data-demo-site
- docs: show the full inspector workflow
- docs: replace workflow diagram with Excalidraw image
- docs: keep hosted demo out of product source
- docs: add hosted demo screenshots
- merge latest main styling into hosted demo
- Merge pull request #6 from dylanjbarth/feat/mvp-architecture-phases
- chore: refresh generated web styles
- make demo filters data-driven
- fix demo site asset packaging
- Optimize session discovery pagination
- Document Build Week story and product outcome
- Improve Codex Inspector plugin copy
- fix(ui): keep panel widths consistent
- feat: add interactive sample data demo
- feat: refine inspector analytics and interface
- Simplify Inspector setup and README
- feat: streamline context turn inspection
- feat: clarify Codex effectiveness reviews

## Key source files (fetched from GitHub, selected and truncated for size)

### design-qa.md

```markdown
## Context Inspector discovery QA

**Comparison target**

- Source visual truth: `/Users/dylanbarth/Desktop/SCR-20260720-syto.png`
- Final desktop screenshot: `/Users/dylanbarth/Code/personal/codex-inspector/output/playwright/context-discovery-final.png`
- Final loading screenshot: `/Users/dylanbarth/Code/personal/codex-inspector/output/playwright/context-discovery-loading-final.png`
- Final mobile screenshot: `/Users/dylanbarth/Code/personal/codex-inspector/output/playwright/context-discovery-mobile-final.png`
- Viewports: 1481 × 1029 desktop and 390 × 844 mobile
- State: populated discovery, retained-results loading, filtered search, and result navigation

**Full-view comparison evidence**

- The annotated source and final browser-rendered desktop screenshot were inspected together at original resolution.
- The crossed-out discovery introduction is removed and the search/results area fills the available production content canvas.
- The implementation intentionally retains the current product sidebar, header, tokens, and index status rather than copying the older shell visible in the annotated source.
- Result rows replace raw environment wrappers with source-backed user-task titles and add project, start time, duration, completed turns, spawned count, stable session ID, token breakdown, and an explicit Open context action.

**Focused region comparison evidence**

- `context-discovery-loading-final.png` shows the button label changing to `Searching…`, a spinner/status message, and prior results retained at full readable contrast.
- A real `merge conflicts` query updated the URL, returned matching rows, and exposed match categories and source-backed snippets.
- `context-discovery-mobile-final.png` shows the search form stacked at 390 px, result metadata wrapping within the card, and no horizontal page overflow (`scrollWidth` 375 at a 390 px viewport).

**Findings**

- No actionable P0, P1, or P2 mismatch remains for discovery.
- Typography uses the established Inspector sans-serif system with clear title, metadata, and token hierarchy.
- Spacing and layout use the full content width while retaining consistent shell gutters and row rhythm.
- Colors and borders follow the existing light shell and dark evidence-card tokens with readable contrast in idle and loading states.
- The source requires no new raster imagery; the existing product logo and Lucide icon assets remain intact.
- Copy and content now lead with friendly task identity and explain exactly where a search match occurred.
- Responsive behavior contains long task titles and session identifiers without clipping or horizontal scrolling.

**Comparison history**

- Pass 1 [P1]: several rows used injected environment/history boilerplate as their title. Fix: ignore system/developer/environment wrappers, attachment wrappers, and known history-preface text when deriving the first user-authored task title.
- Pass 2 [P2]: retained results faded too aggressively during replacement searches. Fix: ke
[truncated — 9130 more characters]
```

### docs/phase1-verification.md

```markdown
# Phase 1 verification

Phase 1 supplies the plugin foundation only. Indexing and SQLite fact writes
begin in Phase 2, so `sync` reports an honest accepted empty state.

Run from a clean checkout on the frozen macOS arm64 demo target:

```text
pnpm install --frozen-lockfile
pnpm typecheck
pnpm lint
pnpm test
scripts/phase1/build-web.sh
GOCACHE="${TMPDIR}/codex-inspector-go-cache" GOPROXY=off GOSUMDB=off go test -count=1 ./...
GOCACHE="${TMPDIR}/codex-inspector-go-cache" GOPROXY=off GOSUMDB=off go test -race -count=1 ./...
GOCACHE="${TMPDIR}/codex-inspector-go-cache" GOPROXY=off GOSUMDB=off go vet ./...
GOCACHE="${TMPDIR}/codex-inspector-go-cache" GOPROXY=off GOSUMDB=off go build ./...
shellcheck scripts/phase1/*.sh plugin/codex-inspector/hooks/inspector-hook.sh
scripts/phase0/generate-internal-api.sh --check
scripts/phase0/generate-fact-golden.sh --check
scripts/phase1/package-macos.sh dist
(cd dist && shasum -a 256 -c codex-inspector-darwin-arm64.sha256)
GOCACHE="${TMPDIR}/codex-inspector-go-cache" go run ./tools/phase1/hookbench plugin/codex-inspector/hooks/inspector-hook.sh dist/codex-inspector-darwin-arm64 fixtures/hooks/stop.json
scripts/phase1/prove-clean-install.sh
```

The clean-install script uses isolated `CODEX_HOME` and
`CODEX_INSPECTOR_HOME` directories, installs from the development marketplace,
verifies the release-shaped macOS artifact, exercises missing, incompatible,
and available CLI hooks, verifies private payload-free `PLUGIN_DATA`
diagnostics through `doctor`, starts and reuses the process, loads the
dashboard through a real HTTP client, performs the frozen one-time
token/instance/protocol exchange, and observes idle shutdown. It never reads
the developer's Codex corpus.

The frozen `v0.1.x` plugin compatibility probe accepts the exact released CLI
shape `codex-inspector 0.1.x (protocol 1, index schema 2)`. A protocol or index
schema mismatch is non-blocking, records only the private payload-free
`protocol_mismatch` diagnostic, and does not invoke `_hook`. The clean-install
proof explicitly rejects the former index schema 1 output before proving that
the packaged schema 2 CLI creates marker-only queue state.

The hook benchmark times the registered plugin shell shim, including its CLI
version probe and second CLI process for marker creation. Before timing, it
also exercises the shim's missing-CLI diagnostic branch. A direct `_hook`
microbenchmark is only an optional breakdown and is not acceptance evidence.

Hook trust is deliberately manual. In the isolated home, start Codex, select
**Review hooks**, verify all seven definitions invoke the plugin-owned
`inspector-hook.sh`, then select **Trust all and continue**. Do not use the
hook-trust bypass flag. Run `codex-inspector doctor` in that same environment
and confirm all checks are `ok`. Finally run `codex-inspector open`, confirm the
browser fragment disappears after load and the empty state plus debugging tray
render, close the tab, and observe `codex-inspector status` repo
[truncated — 634 more characters]
```

### package.json

```
{
  "name": "codex-inspector-workspace",
  "private": true,
  "license": "MIT",
  "packageManager": "pnpm@10.28.0",
  "scripts": {
    "build": "pnpm --filter @codex-inspector/web build",
    "lint": "pnpm --filter @codex-inspector/web lint",
    "typecheck": "pnpm --filter @codex-inspector/web typecheck",
    "test": "pnpm --filter @codex-inspector/web test"
  },
  "devDependencies": {
    "@playwright/cli": "0.1.17"
  }
}

```

### go.mod

```
module github.com/dylanjbarth/codex-inspector

go 1.26.0

require (
	github.com/getkin/kin-openapi v0.142.0
	github.com/santhosh-tekuri/jsonschema/v5 v5.3.1
	modernc.org/sqlite v1.54.0
)

require (
	github.com/dustin/go-humanize v1.0.1 // indirect
	github.com/go-openapi/jsonpointer v0.22.5 // indirect
	github.com/go-openapi/swag/jsonname v0.25.5 // indirect
	github.com/google/uuid v1.6.0 // indirect
	github.com/kr/pretty v0.3.1 // indirect
	github.com/mattn/go-isatty v0.0.20 // indirect
	github.com/ncruces/go-strftime v1.0.0 // indirect
	github.com/oasdiff/yaml v0.1.1 // indirect
	github.com/oasdiff/yaml3 v0.0.14 // indirect
	github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect
	github.com/santhosh-tekuri/jsonschema/v6 v6.0.2 // indirect
	golang.org/x/sys v0.46.0 // indirect
	golang.org/x/text v0.14.0 // indirect
	modernc.org/libc v1.74.1 // indirect
	modernc.org/mathutil v1.7.1 // indirect
	modernc.org/memory v1.11.0 // indirect
)

```

### web/package.json

```
{
  "name": "@codex-inspector/web",
  "private": true,
  "version": "0.1.0",
  "license": "MIT",
  "type": "module",
  "scripts": {
    "build": "vite build",
    "lint": "eslint .",
    "typecheck": "tsc --noEmit",
    "test": "vitest run"
  },
  "dependencies": {
    "@tailwindcss/vite": "^4.3.3",
    "@vitejs/plugin-react": "4.7.0",
    "class-variance-authority": "^0.7.1",
    "clsx": "^2.1.1",
    "lucide-react": "^1.25.0",
    "radix-ui": "^1.6.3",
    "react": "19.2.3",
    "react-dom": "19.2.3",
    "recharts": "^3.9.2",
    "shadcn": "^4.13.1",
    "tailwind-merge": "^3.6.0",
    "tailwindcss": "^4.3.3",
    "tw-animate-css": "^1.4.0",
    "typescript": "5.9.3",
    "vite": "7.3.1"
  },
  "devDependencies": {
    "@eslint/js": "9.39.2",
    "@testing-library/jest-dom": "6.9.1",
    "@testing-library/react": "16.3.2",
    "@types/node": "^26.1.1",
    "@types/react": "19.2.8",
    "@types/react-dom": "19.2.3",
    "eslint": "9.39.2",
    "eslint-plugin-react-hooks": "7.0.1",
    "eslint-plugin-react-refresh": "0.4.24",
    "globals": "16.5.0",
    "jsdom": "27.4.0",
    "typescript-eslint": "8.53.0",
    "vitest": "4.0.18"
  }
}

```

### cmd/codex-inspector/main.go

```go
package main

import (
	"github.com/dylanjbarth/codex-inspector/internal/cli"
	"os"
)

func main() { os.Exit(cli.Main(os.Args[1:], cli.IO{In: os.Stdin, Out: os.Stdout, Err: os.Stderr})) }

```

### web/src/main.tsx

```typescript
import { createRoot } from 'react-dom/client'
import { App } from './app'
import './style.css'
import { TooltipProvider } from '@/components/ui/tooltip'

createRoot(document.getElementById('root')!).render(<TooltipProvider><App /></TooltipProvider>)

```

### tools/phase0/sqliteprobe/main.go

```go
package main

import (
	"database/sql"
	"fmt"
	"os"

	_ "modernc.org/sqlite"
)

func main() {
	db, err := sql.Open("sqlite", "file:phase0-proof?mode=memory&cache=shared")
	if err != nil {
		fail(err)
	}
	defer db.Close()
	if _, err := db.Exec(`CREATE TABLE proof(id INTEGER PRIMARY KEY, value TEXT NOT NULL); INSERT INTO proof(value) VALUES('self-contained');`); err != nil {
		fail(err)
	}
	var value string
	if err := db.QueryRow(`SELECT value FROM proof WHERE id = 1`).Scan(&value); err != nil {
		fail(err)
	}
	fmt.Printf("sqlite_driver=modernc.org/sqlite cgo=not-required round_trip=%s\n", value)
}

func fail(err error) {
	fmt.Fprintln(os.Stderr, err)
	os.Exit(1)
}

```

### tools/phase0/factgolden/main.go

```go
package main

import (
	"encoding/json"
	"fmt"
	"os"
	"path/filepath"

	"github.com/dylanjbarth/codex-inspector/internal/phase0"
)

func main() {
	names := []string{"root.jsonl", "descendant.jsonl", "unsupported.jsonl", "truncated.jsonl"}
	inputs := make([]phase0.CorpusInput, 0, len(names))
	for _, name := range names {
		data, err := os.ReadFile(filepath.Join("fixtures", "synthetic", name))
		if err != nil {
			fail(err)
		}
		inputs = append(inputs, phase0.CorpusInput{Name: name, Data: data})
	}
	corpus, err := phase0.NormalizeCorpus(inputs)
	if err != nil {
		fail(err)
	}
	encoder := json.NewEncoder(os.Stdout)
	encoder.SetIndent("", "  ")
	encoder.SetEscapeHTML(false)
	if err := encoder.Encode(corpus); err != nil {
		fail(err)
	}
}

func fail(err error) {
	fmt.Fprintln(os.Stderr, err)
	os.Exit(1)
}

```

### tools/phase0/reviewvalidate/main.go

```go
package main

import (
	"bytes"
	"encoding/json"
	"flag"
	"fmt"
	"os"

	"github.com/santhosh-tekuri/jsonschema/v5"
)

func main() {
	schemaPath := flag.String("schema", "", "Review JSON Schema path")
	documentPath := flag.String("document", "", "Review document path")
	flag.Parse()
	if *schemaPath == "" || *documentPath == "" {
		fmt.Fprintln(os.Stderr, "--schema and --document are required")
		os.Exit(2)
	}

	schemaBytes, err := os.ReadFile(*schemaPath)
	if err != nil {
		fail(err)
	}
	compiler := jsonschema.NewCompiler()
	compiler.Draft = jsonschema.Draft2020
	if err := compiler.AddResource("review.schema.json", bytes.NewReader(schemaBytes)); err != nil {
		fail(err)
	}
	schema, err := compiler.Compile("review.schema.json")
	if err != nil {
		fail(err)
	}

	documentBytes, err := os.ReadFile(*documentPath)
	if err != nil {
		fail(err)
	}
	var document any
	if err := json.Unmarshal(documentBytes, &document); err != nil {
		fail(err)
	}
	if err := schema.Validate(document); err != nil {
		fail(err)
	}
	fmt.Println("schema_valid=true")
}

func fail(err error) {
	fmt.Fprintln(os.Stderr, err)
	os.Exit(1)
}

```

[154 more indexed source files omitted to keep this export small. The full file list is in the Codebase structure section above.]