diff --git a/ARCHITECTURE.md b/ARCHITECTURE.md index 7f98519..f3e69b7 100644 --- a/ARCHITECTURE.md +++ b/ARCHITECTURE.md @@ -41,7 +41,7 @@ This makes the code easy to modify from a terminal or by an agent. static/ index.html HTML template (served from disk) style.css All CSS - ui.js DOM helpers, renderMd, tool cards, model dropdown (~809 lines) + ui.js DOM helpers, renderMd, tool cards, model dropdown (~846 lines) workspace.js File tree, preview, file ops (~169 lines) sessions.js Session CRUD, list rendering, search, SVG icons, overlay actions (~532 lines) messages.js send(), SSE event handlers, approval, transcript (~293 lines) @@ -49,7 +49,7 @@ This makes the code easy to modify from a terminal or by an agent. boot.js Event wiring + boot IIFE (~175 lines) tests/ conftest.py Isolated test server (port 8788, separate HERMES_HOME) (~240 lines) - test_sprint1-11.py Feature tests per sprint (13 files, Sprints 1-11) + test_sprint1-16.py Feature tests per sprint (14 files, Sprints 1-11 + 16) test_regressions.py Permanent regression gate AGENTS.md Instruction file for agents working in this directory. ROADMAP.md Feature and product roadmap document. @@ -330,11 +330,11 @@ read_file_content(workspace, rel): ### 5.1 Structure The frontend is served from static/ as separate files: one HTML template, one CSS file, -and six JavaScript modules (~2,750 lines total). External dependencies: Prism.js (syntax +and six JavaScript modules (~2,786 lines total). External dependencies: Prism.js (syntax highlighting) and Mermaid.js (diagrams) from CDN, both loaded async/deferred with SRI hashes. Six JS modules loaded in order at end of : - 1. ui.js (~809 lines) DOM helpers, renderMd, tool card rendering, global state + 1. ui.js (~846 lines) DOM helpers, renderMd, tool card rendering, global state 2. workspace.js (~169 lines) File tree, preview, file operations 3. sessions.js (~532 lines) Session CRUD, list rendering, search, SVG icons, overlay actions, project picker 4. messages.js (~293 lines) send(), SSE event handlers, approval, transcript @@ -414,25 +414,43 @@ Boot IIFE: ### 5.4 Markdown Renderer (renderMd) -A hand-rolled regex chain. Processes in this order: -1. Code blocks (``` lang ... ```) ->
 with language header
-2. Inline code (`...`) -> 
-3. Bold+italic (***..***) -> 
-4. Bold (**...**) -> 
-5. Italic (*...*) -> 
-6. Headings (# ## ###) -> 

-7. Horizontal rules (---+) ->
-8. Blockquotes (> ...) ->
-9. Unordered lists (- or * or + at line start) ->