diff --git a/.agents-docs/AGENTS-architecture.md b/.agents-docs/AGENTS-architecture.md
index b824e39..6fc8f54 100644
--- a/.agents-docs/AGENTS-architecture.md
+++ b/.agents-docs/AGENTS-architecture.md
@@ -52,7 +52,7 @@ plan2code/
│ ├── capture-screenshots.mjs # Stages web console screens and saves the docs screenshots (needs a local Chrome or Edge, through `playwright-core`)
│ ├── browser.mjs # The one place a browser is launched (Chrome, then Edge, through `playwright-core`; `PLAN2CODE_TEST_BROWSER` forces one); page tests, the screenshots and the bench use it
│ ├── css-snapshot.mjs # Dev-only: every element's computed style on every screen, both themes; take one before a stylesheet move and `--compare` after
-│ ├── vendor-overtype.mjs # Dev-only: loads the vendored OverType in a browser and writes the CSS it would inject into `public/styles/notepad.css`, above the `/* end OverType */` marker; run it after upgrading the vendored file
+│ ├── vendor-codemirror.mjs # Dev-only: bundles the pinned CodeMirror 6 packages with esbuild into `public/vendor/codemirror.esm.js` (installed in a temp folder from `vendor-codemirror-lock.json`, never in the repo)
│ ├── check-skill-table.mjs # src/plan2code.md "What each skill reads and writes" table vs each skill's prompt and references
│ ├── parse-check.mjs # Imports every shipped browser module as real ESM
│ ├── screenshots/ # JSON payloads posted per shot (`ask` reuses `question.json`; `finish` follows `signoff.json`)
@@ -252,11 +252,14 @@ Optional local browser UI shipped with **every** skill. Source lives in `src/web
| `public/favicon.js` | The tab icon's status bar. `faviconState({ mood, spin, finished })` (PURE) maps the call `renderStatus()` makes for Planny's line to `busy` (the spinning ring), `ready` (`point`), `attention` (`adrift`, `gone`, or `work` without the ring — the stale line) or `plain` (finished, `happy`); `faviconSvg()` is `FAVICON_BODY` (kept equal to `favicon.svg` by a test) plus a bar along the bottom edge in the `FAVICON_COLORS` color (busy dashed on a white strip, so the states differ by pattern; the rest solid); `setFavicon()` swaps both `` hrefs only on a change — the SVG as a data URL, the PNG link drawn through a canvas. Called from `say()` in `renderStatus()`, which runs every second |
| `public/subagents.js` | PURE, no imports: the Subagents switch. `SUBAGENT_WORKFLOWS` / `offered()` (the opt-in table: `implement`, `implement-review`, `quick-task`, `review`, `pathfinder`, each with its default instruction), `cleanSetting()` (`{ on, instruction, max }` or `{ error }`: `bad`, `too-long` past 2,000 characters, `max` outside 1-20), `FRAME_LINES`, `blockFor(setting, told)` (the `Subagents:` lines and `subagents` field an agent is owed, given the session setting and its cursor; never says "off" to an agent not told "on"), `checkHelper()` / `checkHelpers()` (the `helpers` house rule) and the page's view rules `showSwitch()`, `switchLabel()`, `helperRows()`, `showTab()`, `CHECKIN_LINE`. Imported by the server, the `cmd-*.mjs` files, `patches.mjs`, `settings.mjs`, the page and the tests; in `SERVABLE` and preloaded |
| `handoffs.mjs` | the handoff store, the only code that names, lists, marks, deletes and sweeps handoffs, all in `~/.plan2code/handoffs/` (`PLAN2CODE_HANDOFFS_DIR` for tests; `PLAN2CODE_NOW` pins its clock): `newHandoff()` claims `YYYY-MM-DD-HHmm-handoff` (`-2`, `-3` on a clash, the `.json` created exclusively) and writes only `.json` (`{ v: 1, id, title, worktree, project, spec, workflow, skill, written, fromStop, usedAt }`), the agent writing `.md`; `listHandoffs(worktree)` (unused, same worktree, `.md` present, newest first, title and Next task read off the document); `readHandoffMeta()`, `markHandoffUsed()`; `removeHandoff()` (`HANDOFF_ID` only, regular files, never a link, realpath inside the folder, throws on any refusal); `staleHandoffs()` / `removeHandoffs()` for the sweep |
-| `notepads.mjs` | the notepad store, the only code that names, reads, writes and removes notepads, one per folder Plan2Code runs in, in `~/.plan2code/notepads/-<12 hex>/` (`PLAN2CODE_NOTEPADS_DIR` for tests): `notepadKey()` (the folder's basename slug and the first 12 hex of `sha256(foldKey(folder))`), `readNotepad()` (never creates or writes anything), `saveNote()` (1 MB cap, atomic), `addImage()` / `addThumb()` / `removeImage()` (JPEG bytes only, 200 pictures at most, UUID names), `imagePath()` (regular files whose realpath stays inside the folder), `staleNotepads(now, maxAgeMs)` (the real folders directly under it named like a key, never a link or a file, whose newest file is at least `maxAgeMs` old, as `{ key, folder, path }` with `folder` from `meta.json` or null), `removeNotepad(key)` (the key checked against `NOTEPAD_KEY_RE`, the path kept inside the notepads folder by `path.relative`, a link refused, then the whole folder removed; User Preferences, Cleanup is its only caller) and `NotepadError` (`code` and `status`, turned into `{ error }` by the `/notepad` routes). Every write runs under a `notepad.lock` in the notepad's folder. The agent CLI never imports it: nothing in a notepad reaches the agent |
-| `public/notepad.js` | PURE, no imports: the Notepad's rules. `SAVE_DEBOUNCE_MS` 800, `RETRY_STEPS_MS` (1 s up to 30 s), `NOTE_MAX_BYTES` / `NOTEPAD_MAX_IMAGES` / `IMAGE_ID_RE` (kept equal to `notepads.mjs` by a test), `noteBytes()`, the save-state reducer `nextSave(state, event)` from `SAVE_START` (states `idle`, `pending`, `saving`, `saved`, `failed`, `too-long`; it returns the timer to arm), `saveStatus()` (the status line's words), `unsaved()` (what `beforeunload` asks on), `keepsText()` (unsaved or too long: a reopen never replaces the editor's text then), `NOT_LOADED`, `errorSentence()` (one sentence per `/notepad` refusal, else a lost connection), `withoutStyleAttrs()` (OverType's HTML without its inline `style` attributes, which the policy refuses: a link's `anchor-name` moves to `data-anchor`), `topLevelParts()` and `changedRange()` (the styled layer cut into its top-level elements as strings, and which run of them changed) and `step()` (wrapping through the pictures) |
-| `public/screens/notepad.js` | the Notepad: `#btn-notepad` in the top bar on every screen (disabled while the server is gone, `renderNotepadButton()` in the render pass), `#notepad-modal`, the one OverType editor (made on first open, after setting `OverType.stylesInjected = true`), the text read from `GET /notepad` on every open (the editor is read-only until the first read lands, so nothing typed into an empty editor is saved over the note), and autosave through `nextSave()` to `POST /notepad/text`, flushed on close and when the tab is hidden. Three things lean on OverType's internals: `buildWithoutStyleAttrs()` swaps `document.createElement` only while the editor is built, so the elements OverType makes (its preview and its link tooltip among them) get an `innerHTML` that runs `withoutStyleAttrs()`; `patchPreview()`, behind that same `innerHTML` on the preview, swaps only the lines that changed (a whole-note redraw took about 310 ms a key at 200 KB) and clears the code-fence shading OverType re-applies right after; and `linkTooltip.findAnchorElement` is pointed at `data-anchor` |
-| `public/vendor/overtype.esm.js` | OverType 2.6.1 (MIT), vendored unchanged from `https://cdn.jsdelivr.net/npm/overtype@2.6.1/dist/overtype.esm.js` (sha256 `87bc797660d2b1cf6bc13551be6fa9ffa6393a98af453293c0530d5ca4950874`): the Notepad's styled-in-place Markdown editor over a real textarea. Regenerate the CSS with `scripts/vendor-overtype.mjs` after any upgrade, then recheck what `screens/notepad.js` relies on: `updatePreview()` setting `preview.innerHTML` then calling `_applyCodeBlockBackgrounds()`, the elements `_createDOM()` and `LinkTooltip.createTooltip()` make with `document.createElement`, `_init()` reporting its first value through `onChange`, the `anchor-name` style on links and `linkTooltip.findAnchorElement()`, and `OverType.stylesInjected` |
-| `public/styles/notepad.css` | OverType's generated CSS (between its header and `/* end OverType */`, rewritten by `scripts/vendor-overtype.mjs`, since the page's `style-src 'self'` blocks the `