--- phase: 02-vault-core-and-rendering plan: 02 type: execute wave: 2 depends_on: - "02-01" files_modified: - src/renderer.rs autonomous: true requirements: - REND-01 - REND-02 - REND-03 - REND-04 - REND-05 - REND-06 - REND-07 - REND-08 - REND-09 - REND-10 must_haves: truths: - "Headings H1-H6 render with distinct CGA colors and decorators (H1=LightCyan+══, H2=LightYellow+──, H3-H6 color-only)" - "Bold text uses Modifier::BOLD, italic uses Modifier::ITALIC, inline code uses LightCyan styling" - "Fenced code blocks render with rounded box-drawing borders (╭─╮│╰─╯) and syntax-highlighted content via highlighter.rs" - "Ordered and unordered lists render with bullets/numbers and proper indentation per nesting depth" - "Blockquotes render with a yellow │ left border and gray content" - "Horizontal rules render as full-width ─── lines in DarkGray" - "Images render as [IMAGE: alt text] placeholders in DarkGray+DIM" - "GFM tables render with full box-drawing grid (┌┬┐├┼┤└┴┘) and bold LightCyan header row" artifacts: - path: "src/renderer.rs" provides: "Complete markdown-to-styled-lines conversion pipeline" exports: ["render_markdown"] min_lines: 200 key_links: - from: "src/renderer.rs" to: "pulldown-cmark" via: "Parser::new_ext with TextMergeStream consuming all Event variants" pattern: "TextMergeStream" - from: "src/renderer.rs" to: "src/highlighter.rs" via: "highlight_code() called for fenced code blocks" pattern: "highlight_code" - from: "src/renderer.rs" to: "ratatui::text" via: "Produces Vec> with Span styling" pattern: "Vec>" --- Build the complete markdown-to-styled-lines renderer that converts a markdown string into `Vec>` using pulldown-cmark event processing, CGA-themed styling, syntax-highlighted code blocks, and box-drawing table grids. Purpose: This is the core content pipeline — every markdown construct the user sees flows through this module. Output: `src/renderer.rs` with a public `render_markdown(input: &str, width: u16) -> Vec>` function. @/Users/ruohki/.claude/get-shit-done/workflows/execute-plan.md @/Users/ruohki/.claude/get-shit-done/templates/summary.md @.planning/PROJECT.md @.planning/ROADMAP.md @.planning/STATE.md @.planning/phases/02-vault-core-and-rendering/02-RESEARCH.md @.planning/phases/02-vault-core-and-rendering/02-CONTEXT.md @.planning/phases/02-vault-core-and-rendering/02-01-SUMMARY.md @src/highlighter.rs Task 1: Build core markdown renderer with inline and block elements src/renderer.rs Create `src/renderer.rs` with the public function `render_markdown(input: &str, width: u16) -> Vec>`. The `width` parameter is needed for horizontal rules (full-width `─` repeats) and could be used for code block border sizing. **Internal state struct (private):** ```rust struct RenderState { lines: Vec>, current_spans: Vec>, style_stack: Vec