From 50658580e9949fbd6e8c60a4b4249a075f85611f Mon Sep 17 00:00:00 2001 From: ducoterra Date: Wed, 14 Oct 2026 09:54:01 -0400 Subject: [PATCH] chore(agent): phase roadmap from TODO.md, 2 phases Convert the 3 open TODO.md items into sequential phases appended to the existing pipeline (Protocol B, numbered after 179): - 180_markdown_inline_links_images: the shared escape-first renderer gains the [text](url) link transform, the ![alt](src) image transform, and the ####-###### heading levels, with CSS and the dedicated Playwright suite. - 181_svg_document_preview: SVGs index as vector image documents (text extracted from title/desc/text, no vision call), are served as sandboxed image/svg+xml, and preview as graphics instead of raw XML. TODO.md is cleared; its items now live in .agents/phases/. LLM-Generated: true --- .../00_phase.md | 54 ++++++++++++++++++ .../01_inline_links.md | 27 +++++++++ .../02_inline_images.md | 27 +++++++++ .../03_heading_ladder.md | 27 +++++++++ .../04_styles_markdown_inline.md | 26 +++++++++ .../05_unit_and_e2e.md | 36 ++++++++++++ .../todo/181_svg_document_preview/00_phase.md | 56 +++++++++++++++++++ .../01_svg_text_extraction.md | 33 +++++++++++ .../02_svg_index_as_image.md | 38 +++++++++++++ .../03_svg_bytes_route_csp.md | 31 ++++++++++ .../04_svg_preview_render.md | 28 ++++++++++ .../05_unit_integration_e2e.md | 38 +++++++++++++ 12 files changed, 421 insertions(+) create mode 100644 .agents/phases/todo/180_markdown_inline_links_images/00_phase.md create mode 100644 .agents/phases/todo/180_markdown_inline_links_images/01_inline_links.md create mode 100644 .agents/phases/todo/180_markdown_inline_links_images/02_inline_images.md create mode 100644 .agents/phases/todo/180_markdown_inline_links_images/03_heading_ladder.md create mode 100644 .agents/phases/todo/180_markdown_inline_links_images/04_styles_markdown_inline.md create mode 100644 .agents/phases/todo/180_markdown_inline_links_images/05_unit_and_e2e.md create mode 100644 .agents/phases/todo/181_svg_document_preview/00_phase.md create mode 100644 .agents/phases/todo/181_svg_document_preview/01_svg_text_extraction.md create mode 100644 .agents/phases/todo/181_svg_document_preview/02_svg_index_as_image.md create mode 100644 .agents/phases/todo/181_svg_document_preview/03_svg_bytes_route_csp.md create mode 100644 .agents/phases/todo/181_svg_document_preview/04_svg_preview_render.md create mode 100644 .agents/phases/todo/181_svg_document_preview/05_unit_integration_e2e.md diff --git a/.agents/phases/todo/180_markdown_inline_links_images/00_phase.md b/.agents/phases/todo/180_markdown_inline_links_images/00_phase.md new file mode 100644 index 0000000..6e36448 --- /dev/null +++ b/.agents/phases/todo/180_markdown_inline_links_images/00_phase.md @@ -0,0 +1,54 @@ +# Phase 180 — Markdown inline links, inline images, and the full heading ladder + +**Source:** `TODO.md` L4 ("Markdown [links](some-address) aren't being render correctly and show up as plain text"), L5 ("Quad-level headers (####) aren't being rendered and show up as plain text") and the in-answer half of L3 ("Need SVG render support on the front end when citing … source") +**Story:** n/a (TODO-derived phase, Protocol B append — owner roadmap confirmation 2026-10-14) +**Context:** `frontend/assets/markdown.js` — the SHARED escape-first renderer used by all three pages (`index.html` chat bubbles + thinking, `document.html` viewer, `shared.html`) and by `document-modal.js` through `document.js`'s `renderDocument`. Pipeline order: step 1 fence protection (`\u0000CODE n\u0000`) → step 1b GFM pipe-table protection (`\u0000TABLE n\u0000`, phase 44) → step 2 `text = inline(escapeHtml(text))` → step 2b blockquotes (phase 138) → step 3 the paragraph pass (split on `\n{2,}`, block guard `/^<(h\d|ul|ol|pre|li|blockquote)/`) → step 4 restore. The `inline(s)` chain (the single source of every inline transform, also applied per table cell) is today, in order: code span → `**strong**` → `*em*` → `^### `→`

` → `^## `→`

` → `^# `→`

` → `^\s*[-*] `→`
  • ` → `