# Context Layer: Content Visualization & Exposure

**Date**: 2026-06-01  
**Packet Topic**: Academic grounding for three-mode content exposure (view system refactoring)  
**Issue Reference**: jgwill/Miadi#388  
**RISE Spec**: `rispecs/view-system/view-system.spec.md`

---

## Shared Framing & Canonical Terms

### The Refactoring at Hand

The view system refactoring (commit 886bbec) separates application chrome from content display via:
- **SiteChrome component**: Unified layout wrapper that hides navbar on `/v` routes
- **ViewFilePage component**: Renders files in audience-appropriate formats
- **Three exposure modes**:
  1. **Rendered HTML** — iframe sandbox for interactive exploration
  2. **Rendered Markdown** — formatted article view for reading
  3. **Raw API** — `?raw=1` parameter rewrites to `/api/v/raw` for programmatic access

### Why This Matters Academically

The refactoring is not just "extracting components." It enacts three research traditions:

1. **Information Visualization** — How to present file content effectively depends on the audience and purpose
2. **Content Format Negotiation** — The same file served to humans (rendered), other systems (raw), or interactive contexts (sandboxed) requires multiple presentation layers
3. **Reading Interfaces** — Distraction-free UI (hiding navbar while reading) is grounded in cognitive load theory, not just aesthetic preference

---

## MECE Field Decomposition

| Field | Scope | Boundary |
|-------|-------|----------|
| **Information Visualization** | How humans perceive and interact with visual representations; visual hierarchy; progressive disclosure; Gestalt principles | Does NOT cover data visualization (charts, graphs); focuses on interface design and content presentation |
| **Content Format Negotiation** | Serving the same logical content in multiple formats (HTML, Markdown, raw text); HTTP content negotiation patterns; API-first design | Does NOT cover serialization formats (JSON, YAML); focuses on consumption patterns and routing |
| **Reading Interfaces & Cognitive Load** | Minimizing extraneous cognitive load while reading; distraction-free UI; screen real estate allocation; typography and spacing | Does NOT cover accessibility (WCAG); focuses on general cognitive science of reading |

---

## Canonical Terms

| Term | Definition | Use in View System |
|------|-----------|-------------------|
| **Progressive Disclosure** | Revealing features or content in stages; showing essential information first, advanced features on demand | Three modes: rendered (simple), raw (advanced); distraction-free reading (navbar hidden until needed) |
| **Visual Hierarchy** | Using size, color, position, and spacing to guide the viewer's attention to important information first | ViewFilePage form emphasizes file path input; content dominates the viewport |
| **Extraneous Cognitive Load** | Mental effort required to process UI elements that do not directly support the primary task | Navbar on `/v` routes = extraneous load during reading; SiteChrome hides it |
| **Content Negotiation** | HTTP mechanism where a single resource is served in multiple formats based on client preferences (e.g., Accept header) | View system pattern: same file served as rendered HTML, rendered Markdown, or raw text |
| **Audience-Aware Interface** | Design that adapts presentation based on user role or consumption context (human reader vs. programmatic API consumer) | Rendered vs. raw modes serve different audiences with different needs |

---

## Source Quality Rules

For this packet:
- Prefer peer-reviewed HCI papers (Nielsen, Shneiderman, Sweller, Tufte, Ware)
- Accept widely-cited design books (Morville & Rosenfeld on information architecture)
- Accept strong practitioner writing (Few on dashboards, Beyer & Holtzblatt on contextual inquiry)
- Training-knowledge sourced from Claude's training; marked as `verification_status: training-knowledge` until live-verified

---

## Repo Placement & Indexing

**Location**: `/a/src/Miadi-18/foundations/content-visualization-and-exposure/`

**Cross-References**:
- Complements `foundations/human-computer-interaction-and-information-architecture/` (broader HCI field)
- May inform future work in `foundations/knowledge-organization-archives-and-provenance/` if archival/distribution becomes critical
- Supports engineering decisions in `rispecs/view-system/` and code at `app/v/`, `components/site-chrome.tsx`, `middleware.ts`

**QMD Federation Note**: This packet is Miadi-local and specific to issue #388. If other repos build similar three-mode content systems, a Mighty Eagle registry should be considered.

---

## Related Artifacts

- **Issue**: jgwill/Miadi#388 (View System Refactoring)
- **Commits**: 
  - d3a0447 (Code refactoring: layout simplification, ViewFilePage extraction)
  - 886bbec (RISE spec documentation)
- **Spec**: `rispecs/view-system/view-system.spec.md` (detailed feature specification)
- **Code**:
  - `app/layout.tsx` (root layout using SiteChrome)
  - `components/site-chrome.tsx` (audience-aware chrome wrapper)
  - `app/v/viewer.tsx` (file visualization component)
  - `app/v/file-loader.ts` (file loading utility)
  - `middleware.ts` (raw mode rewrite logic)
