turbo-editors/turbo-jspublic Fork 0
v1.0.2
Commits
Clone
git clone https://git.rickub.com/turbo-editors/turbo-js.git
git clone ssh://git@rickub.com/turbo-editors/turbo-js.git

Host key fingerprint (ed25519): SHA256:iycHnxEyq0Q7uyVpB7JlznP0G7JrTPXLYRcAU5CSLhc — verify it before your first connect.

📦 Turbo JS 91999d1 · on v1.0.2 · k33g · 12h ago
2026-09-16-first-editor.md · 37 lines · 4.9 KBmarkdown
Blame HistoryOpen raw

Handoff — 2026-09-16 — Turbo JS, first build

State

The editor is complete and green. make check passes with typescript-language-server 6.0.0 + typescript 6.0.3 on PATH (the nine real-server tests skip themselves without them, and under -short), the quality gate passes (0/0/0, complexity 108), the documentation is complete in both languages (37 pages each), the root README.md is written, demos/greeter runs, and the tutorial has been driven through a pty and read back as SGR codes. Nothing is in flight.

The working tree is uncommitted: the repository has no commits at all; everything is untracked on main. No commit, tag or push was asked for.

What was touched outside this repository

Each with its own history entry and handoff, each needing its own commit:

  • turbo-coreREADME.md, docs/{en,fr}/README.md, docs/{en,fr}/how-to/test-without-publishing.md, profile/profile.go (comment only), .memory/summary.md (six editors; two new "Not yet established" bullets), .memory/history.md, .memory/handoffs/2026-09-16-sixth-editor.md. No code change. Its tree also carries the still-uncommitted ACP trace work of 2026-09-16 that predates this session.
  • turbo-python, turbo-moonbitdocs/{en,fr}/explanation/architecture.md: "all five editors" → six.
  • turbo-golo — the same two pages plus docs/fr/explanation/design-decisions.md.
  • The kit: kits/dev-toolkit/files/home/.claude/skills/turbo-new-editor/SKILL.md and its installed copy ~/.claude/skills/turbo-new-editor/SKILL.md (kept byte-identical), with this cycle's lessons.
  • agent-memory/ was copied back into the live ~/.claude/projects/…/memory/, which had lost twelve of its thirteen entries.

Next steps

  1. Review the decisions in summary.md — none was approved by the user: the name Turbo JS, the ~J~avaScript menu, typescript-language-server + typescript@6 rather than TypeScript 7's own server, package.json as the only root marker, the seven starter tools, replacing turbo-core's JavaScript scanner, registering JSON here.
  2. Commit — this repository (everything), then turbo-core, turbo-python, turbo-moonbit, turbo-golo, then the kit.
  3. Add a LICENSE if wanted; the siblings are MIT, Copyright (c) 2026 turbo-editors. The root README says the file is the owner's to add.
  4. Tag v0.1.0 when ready: release.env already says so; 01-release.tag.sh runs make check and refuses a live replace. Create turbo-js.token.env first (gitignored by *.env).
  5. Open an agent window from this editor once, on the Mac — Alt-A ▸ Create agents file, point it at mini-me or docker agent, and check a ```js fence in an answer comes out coloured. Nobody has.
  6. Two turbo-core cycles this editor exposed, when wanted: languageId from the profile in lsp.Client.DidOpen, and pull diagnostics (textDocument/diagnostic) — which would let this editor run on TypeScript 7's server from one npm install -g typescript. internal/jslang/editor_test.go is the harness: point ServerCommand at a node_modules/.bin/tsc with --lsp --stdio and the diagnostics test is the one that fails.

Watch out for

  • typescript@6, never bare typescript. The current typescript is 7 and has no tsserver.js; the server then fails at initialize, after --version succeeded. The hint, the installer, the tutorial and the docs all pin @6; profile_test.go holds the hint to it.
  • Language is syntax.LanguageJavaScript, on purpose. A private constant would register a second JavaScript beside the library's instead of replacing it, and .js files would then be claimed by whichever registration sorts last. TestRegisterReplacesTheLibrarysOwnJavaScriptScanner and TestTheEditorColoursJavaScriptItOpens both prove the override by finding a coloured regex.
  • Enter repeats the previous line's indentation in turbo-core's editor. Any driver that types an indented listing must type only the change, or the buffer doubles its indents. /tmp/tj/tut_script.json does it right; the tutorial says so.
  • docs/*/reference/languages.md is read by reference_test.go; changing a JavaScript or JSON row means changing the test, and the FR page by hand.
  • The pty drivers live in /tmp/tj/ (pty_run.py, screen.py, tut_script.json, FACTS.md, the .raw captures) and will not survive the sandbox. screen.py replays a whole capture per query, so a 3 MB capture takes ~10 s per frame — batch the queries.
  • The sandbox is Linux, the user is on macOS: /tmp/tj/turbo-js is an ELF outside the tree; bin/ is empty and must stay so.
  • cp on this sandbox has produced NUL-filled files before; every copy this session was done from Python with a byte comparison afterwards.
  • npm install -g in the sandbox writes to /usr/local/share/npm-global; the user's Mac will have it elsewhere — the editor searches nvm, npm-prefix, pnpm, Volta, /usr/local/bin and /opt/homebrew/bin, and the docs list them.
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# Handoff — 2026-09-16 — Turbo JS, first build

## State

The editor is complete and green. `make check` passes with `typescript-language-server` 6.0.0 + `typescript` 6.0.3 on PATH (the nine real-server tests skip themselves without them, and under `-short`), the quality gate passes (0/0/0, complexity 108), the documentation is complete in both languages (37 pages each), the root `README.md` is written, `demos/greeter` runs, and the tutorial has been driven through a pty and read back as SGR codes. Nothing is in flight.

The working tree is **uncommitted**: the repository has no commits at all; everything is untracked on `main`. No commit, tag or push was asked for.

## What was touched outside this repository

Each with its own history entry and handoff, each needing its own commit:

- **turbo-core** — `README.md`, `docs/{en,fr}/README.md`, `docs/{en,fr}/how-to/test-without-publishing.md`, `profile/profile.go` (comment only), `.memory/summary.md` (six editors; two new "Not yet established" bullets), `.memory/history.md`, `.memory/handoffs/2026-09-16-sixth-editor.md`. **No code change.** Its tree also carries the still-uncommitted ACP trace work of 2026-09-16 that predates this session.
- **turbo-python**, **turbo-moonbit**`docs/{en,fr}/explanation/architecture.md`: "all five editors" → six.
- **turbo-golo** — the same two pages plus `docs/fr/explanation/design-decisions.md`.
- **The kit**: `kits/dev-toolkit/files/home/.claude/skills/turbo-new-editor/SKILL.md` and its installed copy `~/.claude/skills/turbo-new-editor/SKILL.md` (kept byte-identical), with this cycle's lessons.
- **`agent-memory/`** was copied back into the live `~/.claude/projects/…/memory/`, which had lost twelve of its thirteen entries.

## Next steps

1. **Review the decisions** in `summary.md` — none was approved by the user: the name `Turbo JS`, the `~J~avaScript` menu, `typescript-language-server` + `typescript@6` rather than TypeScript 7's own server, `package.json` as the only root marker, the seven starter tools, replacing turbo-core's JavaScript scanner, registering JSON here.
2. **Commit** — this repository (everything), then turbo-core, turbo-python, turbo-moonbit, turbo-golo, then the kit.
3. **Add a `LICENSE`** if wanted; the siblings are MIT, `Copyright (c) 2026 turbo-editors`. The root README says the file is the owner's to add.
4. **Tag `v0.1.0`** when ready: `release.env` already says so; `01-release.tag.sh` runs `make check` and refuses a live `replace`. Create `turbo-js.token.env` first (gitignored by `*.env`).
5. **Open an agent window from this editor once**, on the Mac — `Alt-A` ▸ Create agents file, point it at `mini-me` or `docker agent`, and check a ```js fence in an answer comes out coloured. Nobody has.
6. **Two turbo-core cycles this editor exposed**, when wanted: `languageId` from the profile in `lsp.Client.DidOpen`, and pull diagnostics (`textDocument/diagnostic`) — which would let this editor run on TypeScript 7's server from one `npm install -g typescript`. `internal/jslang/editor_test.go` is the harness: point `ServerCommand` at a `node_modules/.bin/tsc` with `--lsp --stdio` and the diagnostics test is the one that fails.

## Watch out for

- **`typescript@6`, never bare `typescript`.** The current `typescript` is 7 and has no `tsserver.js`; the server then fails at `initialize`, after `--version` succeeded. The hint, the installer, the tutorial and the docs all pin `@6`; `profile_test.go` holds the hint to it.
- **`Language` is `syntax.LanguageJavaScript`, on purpose.** A private constant would register a second JavaScript beside the library's instead of replacing it, and `.js` files would then be claimed by whichever registration sorts last. `TestRegisterReplacesTheLibrarysOwnJavaScriptScanner` and `TestTheEditorColoursJavaScriptItOpens` both prove the override by finding a coloured regex.
- **`Enter` repeats the previous line's indentation** in turbo-core's editor. Any driver that types an indented listing must type only the change, or the buffer doubles its indents. `/tmp/tj/tut_script.json` does it right; the tutorial says so.
- **`docs/*/reference/languages.md` is read by `reference_test.go`**; changing a JavaScript or JSON row means changing the test, and the FR page by hand.
- **The pty drivers live in `/tmp/tj/`** (`pty_run.py`, `screen.py`, `tut_script.json`, `FACTS.md`, the `.raw` captures) and will not survive the sandbox. `screen.py` replays a whole capture per query, so a 3 MB capture takes ~10 s per frame — batch the queries.
- **The sandbox is Linux, the user is on macOS**: `/tmp/tj/turbo-js` is an ELF outside the tree; `bin/` is empty and must stay so.
- **`cp` on this sandbox has produced NUL-filled files before**; every copy this session was done from Python with a byte comparison afterwards.
- **`npm install -g` in the sandbox writes to `/usr/local/share/npm-global`**; the user's Mac will have it elsewhere — the editor searches nvm, npm-prefix, pnpm, Volta, `/usr/local/bin` and `/opt/homebrew/bin`, and the docs list them.