A build method + a tool
J-Code
Spec first. Tests first. No claim without a check.
Vibe-coded projects look finished — but they ship with calls to functions that were never written, client code talking to endpoints that don't exist, and references to files that aren't there. J-Code is how I build so those errors never ship, and the tool that finds them when they already have.
The Method
- Spec first. Write down what the thing must do — and what “done” means — before any code exists.
- Tests first. Write the checks and watch them fail. The failing tests are the contract.
- Build until they pass. Then prove it on the real thing, live — never call something fixed until it is verified where it actually runs.
J-Code itself was built this way: its spec and acceptance gates were fixed before the first line of the tool was written.
The Tool
The J-Code tool audits a web project (JavaScript + PHP + HTML + Python), writes an error spec — every finding with its file and line — and generates fix proposals. It never edits your project in place: patches are proposed, applied only to a copy you choose, and the copy is re-audited so you see before/after counts.
jcode audit <project> # find the errors jcode fix <project> --out jcode-fixes # propose the fixes
What it checks
- Undefined JS functions — calls to functions defined nowhere in the project
- Duplicate definitions — the same function defined in two or more files
- Contract breaks — client URLs that match no server file or route
- Missing files — page and code references to files that don't exist
- Undefined PHP functions — calls with no definition and no builtin
- Undefined Python functions — calls with no definition, no import and no builtin
Proof
J-Code v0.1 — first run against real code
- 27 / 27 tests pass
- 7 / 7 planted errors caught, each with the exact file and line
- 0 false positives on a clean project
- First real audit — SarOak's live web app: found a genuine undefined-function call still shipping to readers, and zero client↔server contract breaks
Honest limits: v0.1 is static, name-based analysis for JS/PHP/HTML/Python projects. Dynamic URLs are skipped, not guessed. Some fixes are proposals only — which copy of a duplicated function should live is a human decision, and J-Code leaves it to the human.
J Repair — the same method, on a phone-repair tool
- 34 / 34 tests pass — parsers, connection lanes, knowledge pack
- 7 connection lanes — plug a phone in and it is checked live, in the app window
- Live proof on a real phone — Google Pixel 8a (Android 17): battery health PASS at 98% capacity (4,412 / 4,486 mAh, cycle count 119, 30.0 °C) and 0 fatal crashes in the crash record
- Shipped as JRepair-0.2.1.exe — a single file, verified running on the shop PC it was built for
Audit — find functions that were never written
This demo runs the real J-Code audit on one file, right here — no install, no sign-up. Paste JavaScript, HTML, PHP or Python and it checks for the classic vibe-code bug: calls to functions that were never written. Your code is analysed, never run, and it is not stored.
An illustration of the audit at work. The live audit is the box below — your code, checked for real.
Single-file scope: a function defined in another file of your project is not visible here. The project-wide checks — duplicate definitions, client URLs vs server routes, missing files — need the J-Code CLI on the whole project.
The drop-in file — audit and fix a whole project
One file. Copy jcode.py into any project folder
and run it — no install, no dependencies, Python 3.9+ standard
library only. Audit checks the whole project;
Fix first prints a dry-run report and changes
nothing. Only with --yes does it apply the safe
mechanical fixes — a stub for a function that was never written,
a file path that has exactly one match — backing up everything
it touches to .jcode-backup/, re-checking each fix,
and rolling back any fix that does not clear its finding.
Everything else stays a written proposal with file and line.
J-Code never guesses.
python3 jcode.py audit . python3 jcode.py fix .
Proven before it shipped: the full test suite plus randomised end-to-end fixture projects, run 10,000 times in a row with zero errors and zero wrong fixes.
From the same workshop: J Repair — a Windows app that checks phones for repair shops, built the J-Code way. Download it on its page.
More tools are coming to this tab — next is Write, a spec-first drafting desk. Each one lands here when it works, not before.