dev.md — YeeYee: the whole-project arc

dev.md — YeeYee: the whole-project arc

Screenshot 2026-06-08 at 8.11.03 PM Tyler Garrett ·
  • #update
  • #software

Purpose. A single onboarding map for a new dev: every major subsystem across the project's full history, what each one does, roughly when it landed, and whether it's shipped / gated / TODO. This is the breadth view. For the running feature timeline see [CHANGELOG.md](CHANGELOG.md); for subsystem deep-dives see [building_block/editor/README.md](building_block/editor/README.md) (editor) and [scripts/reward/phd.md](scripts/reward/phd.md) (the training pipeline / eval).

The one-sentence project: a local-first, offline LLM code editor whose thesis is the agent does the work — plus a full home-grown loop to mine real edit history, train ("forge") a small local coding model on it, and honestly evaluate whether that training actually helps.

The arc, four eras:

EraRoughlyWhat it is
0 — Foundation2025-01 →Monaco editor + Gateway backend + multi-app workspace + storage abstraction
1 — The Forge (mine → train → eval)2026-01 → 2026-06Harvest real edits, SFT a local yee-coder, and an honest eval/scoring instrument
2 — Hard mode editormatured pre-2026-06The full-power editor: Ty AI pipeline, agent loop, codebase index, provider routing
3 — Easy mode / YeeYee2026-06-28 → 2026-07-08Glass chat-to-code surface, live preview, chat branches, Python Space, per-language tuning

Legend: ✅ shipped & verified · 🟡 built, gated on a paid eval run · 🧭 partial / next-phase · ❌ not started... (no client data is used in the creation of this stats, only personal projects)


Era 0 — Foundation (2025-01 →)

Documented in the [dir_agent level-up logs](dir_agent/changelog.md) (2025-01-30/31). The bedrock the rest is built on.

FeatureWhat it doesWhenStatus
Monaco editor shellElectron desktop editor: file tree, tabs, diff mode, Chokidar file-watching, keyboard bindings, high-contrast a11y2025-01
The GatewayNode WebSocket control plane wrapping the local model: NDJSON streaming, reconnect/backoff, sessions, latency probe2025-01
YeeAgent chatChat service with persistent history + shared CODE_APPLICATION_RULES prompt2025-01
Multi-app workspaceApp-per-directory + MainMenu router (cycleplus, lightcycle, calendar, calculator, crm, musica, kanban, whiteboard…)2025-01
Storage abstractionstorageService + swappable backend (localStorage / Electron / future Postgres); 25 collections2025-01
dir_agent intelligenceSQLite + FTS5 full-text search over the codebase's own docs (BRAIN, changelog, ux-*)2025-01

Era 1 — The Forge: mine → train → eval (2026-01 → 2026-06)

The home-grown pipeline that harvests real edits, trains a local model, and measures it honestly. Lives under [scripts/reward/](scripts/reward/); the research log is [phd.md](scripts/reward/phd.md). The whole dashboard is served by forge-server.mjs at /forge.

GitHub harvesting / author mining (⛏ Mine)

FeatureWhat it doesWhenStatus
Edit warehouse~14.3K SFT pairs mined from ~5 months of real edit history (2026-01-09→2026-06-16), 65% GitHub; segmented by repo2026-06
⛏ Mine tabPaste a GitHub profile → harvest that author's own apply-verified edits → append git-<login>.jsonl to the warehouse2026-06
Author rosterAvatar + public/🔒-private pill + coverage + top-segment + "race on 4-bit"; reads public repo lists from HTML (no API budget)2026-06
Private-repo miningOwner's own repos mined locally from disk (gato/dev3lop/bloog…≈9.9K edits); GITHUB_TOKEN-gated, never via public API2026-06
Traceable rowsEvery mined edit carries github_url back to the exact commit — auditable, non-redistributive2026-06
Topic discovery + race/api/mine/discover-topic, /api/mine/race, combine-train — discover authors, race their data on the 4-bit base2026-06

SFT LLM builder (the local `yee-coder`)

FeatureWhat it doesWhenStatus
MLX SFT trainingFine-tune yee-coder locally via MLX (venv/caffeinate); 8-bit (4-bit NaNs) — train_local.py2026-06
Prompt-contract sealOne byte-identical prompt across prepare/eval/serve (buildSftPrompt) so train==eval==serve2026-06
Leak-clean dataset buildprepare_sft.js --exclude-ids, segment-build.mjs; disjoint train vs held-out enforced2026-06
Decoupled eval-workerSeparate eval process fixed the "climb-then-collapse" training artifact (eval_worker.py)2026-06
DPO from rejected editsContrastive negatives (negatives.jsonl) → dpo_pairs.py / dpo_train.py seed2026-06
Edit-reward / swe_checkPivot to EDIT-domain real-repo reward: run a repo's real tests → "resolved"; validated on Django2026-06🧭 next: edit-DPO from SFT trajectories

The Forge dashboard (`/forge`)

FeatureWhat it doesWhenStatus
Live training dashboard/forge shows runs live, per-run dropdown, launch/stop, base-model picker2026-06
Split-test tournamentSegment mined edits by folder, race each on a shared frozen held-out, branch into the winner, prune noise; live tree-map (tournament.mjs)2026-06
Canvas engineEvent-sourced single-writer daemon + ML-judge autopilot grows a tree of repo/folder segments toward the best training data (canvas-core.mjs)2026-06🧭 Phase 1 done; Phase 2 (interactive pan/zoom) + synthesize TODO
Data library (◧ Data)Scores the data segment (not the model): standalone vs marginal value; /api/data-library.json2026-06🧭 shipped; Composer + export-bundle next
Export bundleZip a scored data segment to hyper-train elsewhere (export-bundle.mjs)2026-06

The honest eval instrument (the part the author is proudest of)

FeatureWhat it doesWhenStatus
Apply-success metricReference-based RLVR: score 100 only if the edit applies cleanly through the real searchReplace.js engine; diff-F1 ladder, 0.3 floor2026-06
Leak gateeval-leakage-check.mjs — closes all 3 train/eval leak channels (found a 100% Run-mode leak, fixed it)2026-06
Frozen stratified held-outmake-heldout.mjs — deterministic, group/content-excluded, hash-stamped (24→96 tasks)2026-06
Bootstrap CIGreedy point estimate + bootstrap confidence interval, never a lonely number (eval_live.py)2026-06
pass@keval_live.score_passk + PASSK worker verb2026-06✅ built
gen2 scoring eraSave every model response + 5 judge lenses (form audit, helpfulness, trajectory, calibration, attribution) to re-score data2026-06
gen3 Opus-judgeInstruction-satisfaction rubric; honest apply-success + honesty gap (judge_score − byte), trust-checked2026-06
Data-quality scoringOpus-score the 330K mined corpus (data_quality.py, resumable); ~33% keep-rate; embedding-distill (κ0.48) ranks all free, Opus adjudicates the uncertain band2026-06
Quality-selected poolbuild_quality_pool.py → leak-clean, quality-weighted SFT pool that removes the honest-correct collapse2026-06

Headline finding (honest): SFT buys format compliance, not correctness. Lead with +22pts apply-rate and −0.122 honesty gap and the format win — never brag the ~1% (noise-level). See [phd.md §18 claims ledger](scripts/reward/phd.md).


Era 2 — Hard mode editor (matured pre-2026-06)

The full-power "awesome" editor. Deep-dive: [building_block/editor/README.md](building_block/editor/README.md). The local-model pipeline here is "paused, not gone" — the frontier/provider path took the lead for Easy mode.

Ty AI — the multi-stage edit pipeline

FeatureWhat it doesStatus
RewriterTurns a casual prompt into a precise instruction; gated by a specificity score (only rewrites if <45)
Locator (3-stage)Finds the exact excerpt + line range — deterministic (LanceDB index), LLM, or skip
ExecutorInstruction + excerpt → one SEARCH/REPLACE block
2/3-stage modes + named arrangementsSave/load rewriter→executor(→locator) combos; three built-in

The editing engine

FeatureWhat it doesStatus
SEARCH/REPLACE coreShared engine (shared/lib/searchReplace.js) — single source of truth for Apply, Cmd+K, agent tools
6-strategy fuzzy matchexact → trimEnd → whitespace → case-insensitive → block-anchor → line-similarity (≥0.9); returns closest region on miss
Smart retryFeeds the closest actual file region back to the model (up to 2×)
Whole-file fallbackFiles <400 lines: full rewrite through diff review
Diff review modalMonaco side-by-side, Accept (⌘↵)/Cancel (Esc), 12s Undo toast
Cmd+K inline editSelect code → ⌘K → instruction → one applied block

Agent (Auto mode) & orchestration

FeatureWhat it doesStatus
Agentic tool-use loopagentLoop.js: read/edit/run until done; tools emit fenced JSON
Tool setread/write/edit_existing/search_replace/single_find_and_replace/multi_edit/insert_code/list_files/run_terminal
Approval gatesEdits via diff review (auto-approve toggle, off by default); terminal always prompts (once / always / deny)
Self-correctionPost-edit lint self-heal (≤2), one-round project verify, terminal-error feedback
Kill switchStop button aborts via AbortController
Parallel plan executionorchestrator.js pure DAG scheduler (bounded concurrency) + global apply-lock (single diff modal); cycle/deadlock guards
Behavior modesEdit (one change) / Plan (checkable numbered plan) / Auto (full loop)

Context, models, backend, security

FeatureWhat it doesStatus
Codebase vector indexLanceDB + nomic-embed-text via Ollama; incremental, code-aware chunking; status pill; ripgrep fallback
@-mentions@codebase (semantic) / @<file> (specific); autocomplete
Models tabSystem resources, running/installed/available, quantization picker, live pull; "Oh Snap" RAM gate
The MixBenchmark harness for model arrangements; perfect-score requires a clean apply through the real engine
Provider routingmlx:/yee:/local: → forged local model · openai:/anthropic: → frontier · unprefixed → Gateway/Ollama; unified usage struct powers the token meter
Plan & summarization (Python)Agent 008 writes .yeeyee/plan.md; context summarizer condenses old turns
Security modelWorkspace sandbox (realpath + symlink refuse), approval gates, contextIsolation, CSP, DOMPurify, localhost-only
Integrated terminalxterm.js + node-pty per session, command approval allowlist

Era 3 — Easy mode / YeeYee (2026-06-28 → 2026-07-08)

The glass chat-to-code surface for non-experts — the current push. Full timeline in [CHANGELOG.md](CHANGELOG.md). Commit hashes below are from that log.

FeatureWhat it doesWhenStatus
Easy-mode chat roomFull-window glassmorphism chat-to-code + WebGL shader; pi-style collapsible tool cards with inline diffs2026-06-28
Live preview + fix loop▶ runs the repo's dev server in an in-app webview; console + stderr feed back to the agent as a one-round fix loop; lifecycle-hardened (tree-kill, timeouts, EADDRINUSE)2026-06-28
One-window workspace☰ repos & chats navigator + file tree (auto-refresh) + per-session terminal; switching chats swaps the workspace2026-06-28
SQLite persistencechatStore.js (sql.js, no native build); chats survive restart and re-seed context2026-06-28
Per-edit farmingApproved edits auto-apply + auto-write training rows; deleting a chat/repo prunes its rows2026-06-28
"Under the hood" split-testingSplit-test your agent's context, promote what measures leaner (CI-gated promote)2026-07-01
Python SpaceJupyter-quality notebook surface, zero Jupyter dependency (+ hardening pass)2026-07-02/03
Language-tier chipsHonest per-language capability ladder in-app + launch screen2026-07-03
Element pickerClick an element in the preview → agent jumps to its file:line (9 review fixes)2026-07-03
Screenshot → chat (vision)Agent sees the rendered preview; white-screen crash fixed via main-process capture2026-07-04
Direct-first tool routingKills the workspace-less-gateway bug class at the source2026-07-04
Chat branchesGit-backed checkpoint/branch DAG for AI chats: 3-way conflict resolution, AI-suggest, undeniable merge graph, permanent panel; per-repo scoping fix2026-07-04/0581e3ff8
Repo-map tree fallback (#5)Non-code files (config/docs/data) stop vanishing from the agent's map; own budget; binaries still skipped2026-07-05
Data-integrity (#6)Split-test streams localStorage→SQLite; live prompt-cache-break guard2026-07-05
Per-language-group tuning (#7)Packs/scores/eval keyed by (model, group: js-ts/css-html/python/general); live chat auto-uses its repo's group's pack; language: tab strip2026-07-06b986741e362658
Measured model save%Retired the hardcoded per-model save% for a measured per-language average; honest "unmeasured" until a real run2026-07-069da86d8
Variance-robust measurementStratified log-ratio bootstrap + hard n≥5 floor; powered-n advisory not veto — the honest token-savings instrument2026-07-07
Per-language prompts SHIPNative, tier-aware wd/rm/pa prompts per (model, group); guarded against silent collapse to identical2026-07-08

Open / gated / not started

The forward roadmap ("🗺 Priority Tracker", 2026-07-04 synthesis in [CHANGELOG.md](CHANGELOG.md)).

ItemStateBlocker
#1 — Element-pick + verify-compaction bench cells🟡 built, adversarially reviewed, dry-tested (37/37)Awaiting Ty's paid eval run for the CI verdict — no headline until MIN_PAIRS clears
#3 — Python S− eval cell🟡 built, reviewed, fixed (60/60 dry)Awaiting paid run; no tier promotion until a significant CI
#4 — Human-anchored honesty slice❌ not started≥50–100 gold edits, ≥2 annotators + κ, non-Opus judge (week+). Retires the two biggest phd.md §18.3 caveats
Canvas engine Phase 2🧭 partialInteractive pan/zoom canvas + synthesize step
Data library Composer🧭 partialConnect→race-union + export-bundle wiring
Edit-reward → edit-DPO🧭 nextswe_check validated on Django; next is edit-DPO from SFT trajectories

Completion — where we're at

Two honest denominators, because "% done" depends on what you're counting.

A) Current roadmap (Priority Tracker: P0 + #1–#7 = 8 items). This is the active push.

  • 5 fully done & verified (P0, #2, #5, #6, #7)
  • 2 code-complete, gated on a paid eval run (#1, #3)
  • 1 not started (#4)
  • 62.5% validated-only, ~81% crediting the two gated items at half.

B) Whole product. The four eras are each substantially built and shipping. Foundation, the Forge (mine/train/eval), and the hard-mode editor are effectively complete and in daily use; Easy mode is the maturing surface. The genuinely open work is narrow: a handful of gated eval runs (#1/#3), one unstarted research slice (#4), and two next-phase polish items (Canvas Phase 2, Data-library Composer). By breadth of shipped-and-verified subsystems, the project is ~85–90% of the way to the public launch scope, with the remaining gap concentrated in validation (spending API money to earn the honest CIs) rather than in unbuilt features.

The load-bearing caveat (house rule): no headline without a cell. Several features ship with their token-savings claims deliberately unclaimed until a paid eval run produces a significant confidence interval. Don't promote anything from #1/#3 until the CI clears. The single biggest measurement gap is #4 (human ground truth) — the only unstarted item and the most expensive.


Sources: [CHANGELOG.md](CHANGELOG.md) · [building_block/editor/README.md](building_block/editor/README.md) · [scripts/reward/phd.md](scripts/reward/phd.md) · [dir_agent/changelog.md](dir_agent/changelog.md). Keep this file's era tables in sync when a subsystem materially changes; keep CHANGELOG.md as the running log.


j7, by dev3lopcom, llc