Skip to main content

Overview

WikiPrepareViewer displays planning documentation in a structured, project-based format. The “prepare” phase represents work between ideation (OnIt) and verification (Prove), focusing on detailed planning before implementation.

Architecture

Dual Mode System:
  1. Project Mode (preferred): Folder-based with README.md manifest
  2. Document Mode (legacy): Flat files with timestamp naming
Class Structure:
2.25x larger than OnIt (789 vs 350 lines) due to dual mode support and project features.

Data Models

PrepareProject (Modern)

Structure:
  • Folder-based organization
  • README.md as project manifest
  • Multiple files per project
  • Status from frontmatter
  • Progress from checkbox counting
Example Structure:

PrepareDocument (Legacy)

Structure:
  • Flat file structure
  • Timestamp-based naming
  • Single file per document
  • Analysis type inference
Filename Pattern:

Status System

Four Project States: Status Extraction:
  1. Priority 1: Explicit frontmatter in README.md
  2. Priority 2: Content keywords (blocked, completed, in progress)
  3. Priority 3: Default to “ready”

Progress Tracking

Automatic checkbox counting in README.md: Example:
Patterns:
  • Unchecked: - [ ]
  • Checked: - [x] or - [X] (case-insensitive)
Display format: [2/4 50%] in project card header.

Rendering Modes

Project Mode (Preferred)

Card-based UI:
Features:
  • Expandable project cards
  • File list within each project
  • Status badges with progress indicators
  • First project auto-expanded

Document Mode (Legacy)

Type-grouped list:
Analysis Types:
  • Code: Blue dot, code analysis docs
  • Design: Purple dot, design/architecture docs
  • Dependency: Orange dot, integration docs
  • General: Gray dot, other planning docs
Type inference from filename keywords (code, design, dependency, etc.). Three Click Targets:
  1. WIP/Wiki Toggle: Switch data source (wip ↔ wiki)
  2. Project Card Headers: Expand/collapse file list
  3. File Accordion Headers: Load document content inline
Event Propagation:
  • File accordion clicks use stopPropagation() to prevent card toggle
  • Critical for nested click handlers (files inside cards)
Sticky Headers:
  • Project headers stick during content scroll
  • Calculated position accounts for viewer header height

State Management

Comparison with OnIt

Prepare is more complex due to dual mode support and project organization features.

Workflow Integration

OnIt → Prepare Transition:
  1. OnIt Phase: Document work in session files
  2. Prepare Phase: Crystallize into structured project
  3. Graduate: Move to wiki when planning complete
No automatic conversion - manual workflow by design. Human decides when work transitions to planning phase.
THE CENTER
Structure emerges from planning

Technical Credibility

Uses YAML frontmatter parsing for status. Regex-based checkbox counting. Dual data model supports gradual migration. Extends WikiBaseViewer for shared infrastructure. Implements SMPC principle: complexity only where needed.