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

  1. Spec first. Write down what the thing must do — and what “done” means — before any code exists.
  2. Tests first. Write the checks and watch them fail. The failing tests are the contract.
  3. 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