Project Info
Inspiration
As a beginner programmer, I was constantly confused and discouraged by ModuleNotFoundError. I couldn't even start programming. I was already drowning in errors that had nothing to do with the code I was trying to write. The terminal told me a package was missing, but never why: which of the several Pythons on my machine my project was actually using, or where things had gone wrong. For beginner programmers, my story isn't just an example; it's literally a canon event. Sphere is the tool I wish I'd had: one that makes the invisible state of your machine visible, so the wall that stops so many people before they begin becomes something you can actually see and understand.
What it does
Sphere shows you the real state of your machine's Python setup as a live, interactive graph: every interpreter, every environment, and every installed package. It figures out which interpreter a given folder actually resolves to, then checks whether that interpreter can satisfy the project's requirements, showing each dependency as satisfied, version-mismatched, or missing. Crucially, it doesn't ask you to trust it: click any claim and Sphere shows the exact command it ran against that interpreter and what came back: a citation, not an opinion. And it doesn't just diagnose; it fixes. Sphere turns a broken environment into a working one, creating an isolated environment where one is needed rather than polluting your global Python, and re-scans to prove the fix worked instead of assuming it.
How we built it
Sphere is a Python backend and a React front-end. The backend is a truth engine: it discovers interpreters across every install method (PATH, pyenv, uv, Homebrew, conda), and reads each one's packages by running that interpreter in an isolated subprocess, so the data is the interpreter's own ground truth, never a guess. It diffs a project's declared requirements against that reality using correct version-specifier and package-name logic. The front-end renders this as a spherical graph with a per-claim evidence layer and a preview-then-execute fix loop. I built the core, the introspection engine and the fix loop, with Codex, and used GPT-5.6 to power the plain-English diagnosis layer that explains problems and proposes fixes for beginners.
Challenges we ran into
The hardest problems were about trust, because Sphere's whole value is being provably correct. Reading each environment's true package state meant running isolated subprocesses so an active shell couldn't contaminate the results, and we caught Sphere itself polluting the global Python with its own dependencies, the exact anti-pattern it warns against, which we fixed by making it install fully isolated. Building the verification layer meant capturing the actual command executed rather than reconstructing a plausible one: a fake receipt would have been worse than no receipt. And a subtle but critical bug: a failed fix once rendered as green "success," which would have broken the entire trust thesis. We caught it by deliberately testing the failure path, not just the happy path.
Accomplishments we're proud of
This is a beginning to a tool that never lies about your machine, something I'm not only incredibly passionate about, but also proud of. Every red edge and version number is something Sphere read directly from an interpreter and can prove with the exact command it ran. We're proud that the deterministic core works with zero API keys and zero network: the AI is an enhancement, not a crutch, and that Sphere practices what it preaches by never polluting the environments it inspects. Most of all, we built the full arc: not just diagnose, but prove, fix, and verify; a broken project going green, live, because a fresh scan confirmed it.
What we learned
That the hard part of a developer tool often isn't the feature; instead, it's being correct, and being able to prove it. We learned how deep the machinery under a simple ModuleNotFoundError really goes: interpreter resolution, PATH, environment isolation, the difference between a package being installed and being installed where your code will actually look for it. And we learned that the right division of labor with AI is deterministic code where correctness matters and language models where explanation and judgment matter: facts first, narration second.
What's next
Sphere's model is ecosystem-agnostic: Python is fully implemented, and the same graph extends naturally to other worlds: JavaScript and node_modules, then the "why doesn't this run on my machine" problem beyond a single language: CUDA toolchains, Docker images, and eventually Kubernetes and external vendors. The long-term vision (Orbis) is a single visible, verifiable map of everything a project needs to run, whoever or whatever is doing the fixing, human or agent. As AI does more to our systems, the layer that lets us see and trust what it changed only becomes more essential. ChatGPT Feedback Session 019f7162-3fd6-7b72-9fa3-c3a2f2bc87d4
Sphere
Sphere makes a machine's Python state visible: every interpreter, environment, and installed distribution is rendered as a live repository-to-runtime dependency graph. It shows what the current folder would run, which requirements are missing or at the wrong version, the evidence behind every verdict, and a guarded local repair plan.
Sphere is a localhost application. Its scanner and deterministic diagnosis run on the machine; topology data is not sent to a hosted service.
Judge quick start
Prerequisites
- macOS or Linux (Windows is not currently supported)
- Python 3.11 or newer, available as
python3 - Git, Make, and a POSIX shell
- Internet access during initial setup so
pipcan download dependencies and the small demo packages - A browser
On Debian/Ubuntu, install the OS package that provides venv if python3 -m venv
is unavailable (commonly python3-venv). Confirm the selected Python first:
python3 --version
Clone, prepare, and run
git clone https://github.com/RyanZWhalen/Sphere.git
cd Sphere
make setup
.sphere-venv/bin/sphere demo/sample-project --search-root demo
The two commands after cd are the complete demo path, in order. make setup:
- Creates the dedicated
.sphere-venvruntime. - Installs Sphere and its optional server dependencies only inside that runtime.
- Runs
demo.shto create the reproducible three-state fixture.
Sphere then chooses a free 127.0.0.1 port and opens the graph. Nothing needs to be
built with Node: the production frontend is committed in sphere/web/dist and ships
inside the Python package.
If python3 is not the desired Python, select an explicit 3.11+ executable:
make setup PYTHON=/absolute/path/to/python3.12
Expected demo topology
The setup script creates, but does not commit, these local fixtures:
demo/sample-project: no project environment; the folder resolves to a bare/shared interpreter that Sphere refuses to modify.demo/.venv-broken:six==1.15.0is installed, while the repository requiressix==1.16.0;idnaandtyping-extensionsare missing.demo/.venv-good: all three declared requirements are satisfied.
The first screen should therefore contain a red Runs now interpreter, a red
.venv-broken circle, and a green .venv-good circle marked The fix. Other bare
interpreters are collapsed into the expandable Other interpreters on this machine
group.
To reset only the sample data later:
make demo
Demo walkthrough
- Start on the red Runs now interpreter. The inspector shows that the folder's current Python is missing all three requirements, and Sphere recommends a local environment instead of polluting the shared interpreter.
- Click
.venv-broken. Its edge and node show one version mismatch and two missing packages. - Expand Show evidence under
six. Sphere displays the exact interpreter path, rerunnablepython -I -cmetadata command, verbatim distribution list, thereported 1.15.0 · requires ==1.16.0 · failsproof, and the live scan timestamp. - Click Preview fix. The local repair agent shows the three exact
pipcommands before anything runs. Do not choose Approve & run during a read-only demo unless you intentionally want to modify.venv-broken. - Click
.venv-goodto show the fully satisfied alternative.
Interpreter and environment circles are draggable; the deterministic column/arc is only their initial layout.
Use Sphere on another repository
After make setup, point the isolated Sphere executable at any repository:
.sphere-venv/bin/sphere /absolute/path/to/repository \
--search-root /absolute/path/to/search
The positional directory controls repository parsing and python/python3 context
resolution. Each --search-root is recursively searched for pyvenv.cfg; the option
may be repeated:
.sphere-venv/bin/sphere ~/code/project \
--search-root ~/code \
--search-root ~/work
Useful server options:
--port PORT use a specific localhost port instead of a free one
--no-browser start the server without opening a browser
For machine-readable output without the web server:
.sphere-venv/bin/python -m sphere.introspect \
--indent 2 \
--search-root /absolute/path/to/search \
/absolute/path/to/repository
What Sphere discovers
Interpreter sources include PATH, pyenv, conda, uv-managed Pythons, Homebrew, and
macOS framework/system locations. Environment discovery covers venv/virtualenv,
conda, uv project environments, common locations, and explicit search roots. Symlink
aliases are deduplicated through canonical real paths.
Repository declarations are read from:
requirements.txt[project].dependenciesinpyproject.toml[tool.poetry.dependencies]inpyproject.toml
Every target's installed packages are queried by running that target's own interpreter
with an isolated importlib.metadata subprocess. Sphere never imports discovered
packages into its own process.
Evidence and repair safety
Every requirement row has a collapsed Show evidence receipt sourced from the same authoritative repository-to-target edge as the visible verdict. Sphere never merges package evidence from another interpreter or environment. If a query did not produce enough evidence, the inspector says so rather than constructing a plausible result.
Scanning, topology, evidence, diagnosis, and fix preview are read-only. Writes require an explicit Approve & run action. Sphere:
- refuses to modify its own
.sphere-venv; - refuses to install into shared system, framework, Homebrew, pyenv, or uv-managed interpreters;
- fingerprints previewed commands and rejects a stale plan;
- targets an environment through its exact interpreter path;
- allows removal only for a virtual environment directly inside the selected repository, after a separate preview and explicit approval;
- records command output and a per-step receipt; and
- re-scans afterward to verify the resulting graph verdict.
The local diagnosis and repair planning are deterministic. Sphere does not download a language model, call GPT at runtime, or permit a model to generate arbitrary shell commands.
Test without rebuilding the frontend
The judge path itself is the fastest integration test:
make setup
.sphere-venv/bin/sphere demo/sample-project --search-root demo
Run the Python test suite with the isolated runtime:
.sphere-venv/bin/python -m unittest discover -s tests -v
Node is needed only when changing the React source. Frontend contributors can run:
npm --prefix frontend ci
npm --prefix frontend test
npm --prefix frontend run build
The final command refreshes the committed sphere/web/dist bundle.
Troubleshooting
python3 -m venvfails: install the platform's Python venv support or rerun setup withPYTHON=/absolute/path/to/a/python3.11+.- A demo environment is missing: run
make demo, then restart Sphere so it performs a fresh scan. - A project-local
.venvshould be removed: select it in Sphere, choose Preview environment removal, then review and choose Approve & remove. Sphere will only offer this for a venv directly inside the selected repository. - The browser does not open: add
--no-browser, copy the printed localhost URL, and open it manually. - A port is occupied: omit
--portto let Sphere choose a free port. - A project environment is absent from the graph: include its parent directory as
a
--search-root. - A discovery source is damaged: check the topology's
warningsarray. Discovery sources fail independently so one unusual Python installation cannot abort a scan.
Project structure
sphere/introspect.py: stdlib-only machine and package topology scannersphere/requirements.py: declaration parsing and package-version diffingsphere/diagnose.py: deterministic, edge-local plain-language diagnosissphere/fixplan.py: guarded command-plan intermediate representationsphere/apply.py: approved execution, receipts, and verification scansphere/serve.py: localhost API and prebuilt frontend serverfrontend/: React/React Flow source; not required for judge setupdemo.sh: reproducible sample-data builder
packaging is the only core runtime dependency. FastAPI and Uvicorn are isolated in
the optional serve extra installed into .sphere-venv.
How Codex and GPT-5.6 were used
Sphere was developed iteratively in Codex with GPT-5.6 as the collaborative coding and reasoning model. The human author set the product direction, safety boundaries, demo story, and acceptance criteria; Codex/GPT-5.6 helped turn those decisions into tested code. In particular, it was used to:
- trace Python discovery and subprocess data through the graph schema;
- implement and test interpreter, environment, and dependency introspection;
- design the exact-edge evidence contract and catch an inspector edge-merging bug;
- build the React Flow visualization and verify drag behavior in the rendered app;
- design the deterministic plan/approval/receipt/re-scan repair loop;
- maintain Sphere's dedicated isolated installation path; and
- run unit, browser, and clean-clone validation from the documented judge workflow.
GPT-5.6 is part of the development process, not a hidden runtime dependency. The shipped application remains local and deterministic so judges can reproduce every claim without an API key.
Supported platforms and current scope
Sphere currently supports macOS and Linux with Python 3.11+. Windows discovery and
activation semantics are outside this release. The application binds only to
127.0.0.1; it is not intended to be exposed as a remote multi-user service.
Analysis
View
Metric
- 13
- 1
Figures cover GitHub contributors during the hackathon window. A co-authored commit counts in full for each author, so per-member totals add up to more than the whole-team figures.
Technology
- CSSIn code
- FastAPIIn code
- HTMLIn code
- JavaScriptIn code
- PythonIn code
- ReactIn code
6 of 6 appear in the indexed code.
AI coding agents
- Claude CodeCommits
Detected from committed agent config files and commit authorship. Absence of a signal is not proof an agent was unused.
Codebase size
Source size
185 KB
Source files
25
Counts recognized source files only; vendored directories, binaries and lockfiles are excluded, so this is smaller than the repository on disk.
Repository
RyanZWhalen/Sphere
33 files · 276 KB · @ 622b783
Structure
Interface
1 file · 3%Screens, components and styles rendered to the user.
Application logic
16 files · 48%Domain rules, services and shared utilities.
Supporting
Layers are inferred from where files sit in the tree, not from reading the code. A project that names its directories unconventionally will read oddly here — open the file browser to check anything the diagram implies.
Languages
- Python66%
- JavaScript20%
- CSS7%
- Markdown5%
- Shell1%
- HTML0%
Share of indexed source by file size. Binary and vendored files are excluded.
Dependencies
frontend/package.json
npm · 5- @xyflow/react
- react
- react-dom
- +2 more
demo/sample-project/requirements.txt
pypi · 3- idna
- six
- typing-extensions
pyproject.toml
pypi · 3- packaging
- +2 more
Declared in the repository’s manifests at the indexed commit. A declared package is not proof it is used, and runtime dependencies are listed first.
This project’s features have not been analysed yet.
Export this project's context (description, README, evidence, key source files) to chat with an AI agent elsewhere.