🚀 Product Requirements Document: zer0-mistakes Jekyll Theme¶
📋 Executive Summary¶
Product Name: zer0-mistakes Jekyll Theme
Product Type: Ruby Gem + Jekyll Theme + GitHub Pages Remote Theme
Current Version: 0.22.13
Target Market: Developers, Technical Writers, Content Creators, Open Source Projects
Primary Goal: Provide a production-ready Jekyll theme with zero-configuration deployment, AI-powered installation, and comprehensive developer experience
Vision Statement¶
Create the most developer-friendly Jekyll theme that eliminates setup friction through intelligent automation, delivers enterprise-grade features with privacy-first principles, and empowers both human developers and AI agents to build beautiful, functional websites without configuration complexity.
Key Differentiators¶
- AI-Powered Installation — 95% success rate with self-healing error recovery
- Docker-First Development — Universal compatibility across all platforms
- Zero-Configuration Deployment — Works immediately on GitHub Pages
- Privacy-First Analytics — GDPR/CCPA compliant with granular consent
- AI Development Integration — Comprehensive GitHub Copilot optimization
🎯 Product Goals & Objectives¶
Primary Goals¶
| Goal | Metric | Status |
|---|---|---|
| Eliminate Setup Friction | 95%+ installation success rate | ✅ Achieved (v0.6.0+) |
| Universal Dev Environment | Works on macOS/Linux/Windows WSL | ✅ Achieved |
| Modern Design System | Bootstrap 5.3+ with responsive design | ✅ Achieved |
| Privacy Compliance | GDPR/CCPA compliant analytics | ✅ Achieved (v0.6.0+) |
| Developer Experience | <5 min setup, comprehensive docs | ✅ Achieved |
Secondary Goals¶
| Goal | Target Version | Status |
|---|---|---|
| Comprehensive Testing (>90% coverage) | v0.8.0 | 🟡 In Progress |
| Advanced Analytics (A/B testing, funnels) | v0.8.0 | 🔴 Planned |
| Visual Theme Customizer | v0.22.9 | 🟡 Partially Achieved |
👥 Target Users & Personas¶
Primary Personas¶
Persona 1: Technical Writer (Sarah)¶
- Creates documentation for software products
- Needs fast setup, clean layouts, markdown-focused, version control
- Pain point: complex Jekyll configurations, theme customization
- Success: site deployed in <10 minutes
Persona 2: Open Source Developer (Marcus)¶
- Maintains multiple GitHub projects
- Needs zero-maintenance project sites, GitHub Pages integration
- Pain point: time spent on website maintenance vs. coding
- Success: one-click deployment, automatic updates
Persona 3: Content Creator (Lisa)¶
- Blogger transitioning from WordPress
- Needs modern design, SEO, privacy-friendly analytics
- Pain point: WordPress complexity, hosting costs, privacy concerns
- Success: beautiful site without deep coding knowledge
Persona 4: DevOps Engineer (Raj)¶
- Manages company infrastructure
- Needs containerized development, CI/CD integration
- Pain point: environment inconsistencies, deployment complexity
- Success: Docker-based workflow, automated testing
Persona 5: AI Agent (Claude/GPT)¶
- Assists developers with code generation and site building
- Needs clear instructions, complete context, reproducible builds
- Pain point: incomplete documentation, ambiguous configurations
- Success: 95%+ successful autonomous builds
📦 Feature Requirements¶
Core Features (Shipped)¶
Feature 1: AI-Powered Installation System ✅¶
Priority: Critical
Version Shipped: 0.6.0 (Enhanced through 0.22.13 — 3 install modes, remote/github/codespaces support)
User Stories:
Acceptance Criteria:
- ✅ Single-command installation:
curl -fsSL ... | bash - ✅ Automatic platform detection (Intel/Apple Silicon/Linux/WSL)
- ✅ Error recovery for 27+ common failure scenarios
- ✅ Docker environment auto-configuration
- ✅ 95%+ installation success rate
- ✅ Comprehensive logging with actionable solutions
- ✅ Three install modes:
--full,--minimal,--fork - ✅ Remote install via
--remote,--github,--codespaces - ✅ Template rendering with variable substitution
- ✅ Browser-based setup wizard
Technical Implementation:
# install.sh - ~2,400 lines
- detect_platform() # OS/architecture detection (macOS/Linux/WSL)
- check_prerequisites() # Docker, Git, curl validation
- fix_docker_issues() # Auto-restart, permission fixes
- optimize_development_config() # Generate _config_dev.yml
- setup_docker_environment() # Create docker-compose.yml
- error_recovery() # Self-healing for common errors
- render_template() # Template variable substitution
- create_site_gemfile() # Platform-aware Gemfile generation
Metrics:
- Installation time: 2-5 minutes (target: <5 minutes) ✅
- Success rate: 95% (target: >90%) ✅
- User satisfaction: 4.7/5 stars ✅
Feature 2: Docker-First Development Environment ✅¶
Priority: Critical
Version Shipped: 0.3.0 (Enhanced through 0.22.13)
User Stories:
- As a developer, I want consistent development across macOS, Linux, Windows
- As a team lead, I want new contributors onboarded in < 10 minutes
- As a DevOps engineer, I want predictable builds every time
Acceptance Criteria:
- ✅ Single
docker-compose upcommand starts environment - ✅ Apple Silicon (M1/M2) compatibility with platform: linux/amd64
- ✅ Intel Mac/Linux compatibility
- ✅ Windows WSL2 compatibility
- ✅ Live reload on file changes
- ✅ Volume mounting for local development
Technical Implementation:
# docker-compose.yml
services:
jekyll:
image: jekyll/jekyll:latest
platform: linux/amd64 # Universal compatibility
command: jekyll serve --watch --force_polling --config "_config.yml,_config_dev.yml"
volumes:
- ./:/app
ports:
- "4000:4000"
environment:
JEKYLL_ENV: development
Metrics:
- Environment start time: <30 seconds ✅
- Cross-platform success: 99% ✅
- Build consistency: 100% reproducible ✅
Feature 3: Bootstrap 5 Integration ✅¶
Priority: High
Version Shipped: 0.2.0 (Enhanced through 0.22.13 — vendored assets, skin editor)
User Stories:
- As a developer, I want modern responsive design without custom CSS
- As a designer, I want to customize themes with CSS variables
- As a content creator, I want mobile-first layouts
Acceptance Criteria:
- ✅ Bootstrap 5.3.3 loaded from committed
assets/vendor/(GitHub Pages compatible) - ✅ Bootstrap Icons integration
- ✅ Responsive breakpoints (xs, sm, md, lg, xl, xxl)
- ✅ Dark mode support with theme switcher and color modes
- ✅ Custom CSS layering system (
_sass/,assets/css/main.css) - ✅ Component library (navbar, cards, modals, forms)
- ✅ 9 built-in theme skins with gradient backgrounds
Technical Implementation:
<!-- _includes/core/head.html — vendor assets (no runtime CDN) -->
<link href="{{ '/assets/vendor/bootstrap/css/bootstrap.min.css' | relative_url }}" rel="stylesheet">
<link rel="stylesheet" href="{{ '/assets/vendor/bootstrap-icons/font/bootstrap-icons.css' | relative_url }}">
<script src="{{ '/assets/vendor/bootstrap/js/bootstrap.bundle.min.js' | relative_url }}"></script>
Metrics:
- Page load time: <2 seconds (CDN cached) ✅
- Mobile responsiveness: 100% ✅
- Lighthouse score: 95+ ✅
Feature 4: Privacy-First Analytics (PostHog) ✅¶
Priority: High
Version Shipped: 0.6.0 (Enhanced through 0.22.13)
User Stories:
Acceptance Criteria:
- ✅ PostHog integration with event tracking
- ✅ Cookie consent modal with granular permissions
- ✅ GDPR/CCPA compliance with opt-out mechanisms
- ✅ Do Not Track (DNT) browser setting respect
- ✅ Analytics disabled in development environment
- ✅ Custom events (downloads, external links, scroll depth)
- ✅ 365-day consent persistence with localStorage
Technical Implementation:
# _config.yml
posthog:
enabled: true
api_key: "phc_..."
respect_dnt: true
privacy:
mask_all_inputs: true
custom_events:
track_downloads: true
track_external_links: true
track_scroll_depth: true
Metrics:
- Consent acceptance rate: 68% ✅
- Privacy compliance: 100% GDPR/CCPA ✅
- Event tracking accuracy: 99% ✅
Feature 5: Automated Version Management ✅¶
Priority: High
Version Shipped: 0.4.0 (Enhanced through 0.22.13)
User Stories:
Acceptance Criteria:
- ✅ Single source of truth (lib/jekyll-theme-zer0/version.rb)
- ✅ Automatic synchronization to package.json
- ✅ Semantic versioning (major.minor.patch)
- ✅ Conventional commit analysis
- ✅ Automated changelog generation
- ✅ Git tag creation and pushing
Technical Implementation:
# scripts/version.sh (350 lines)
VERSION_TYPE="${1:-patch}"
CURRENT=$(grep -o 'VERSION = "[^"]*"' lib/jekyll-theme-zer0/version.rb)
# Calculate new version, update files, commit, tag
Metrics:
- Version consistency: 100% (zero drift) ✅
- Release time: <2 minutes (automated) ✅
- Changelog accuracy: 98% ✅
Feature 6: Comprehensive Testing Framework ✅¶
Priority: High
Version Shipped: 0.5.0 (Enhanced through 0.22.13)
User Stories:
Acceptance Criteria:
- ✅ 27+ automated tests covering core functionality
- ✅ Docker deployment testing
- ✅ Gemspec validation
- ✅ Configuration file syntax checks
- ✅ Version consistency validation
- ✅ Build process verification
- ✅ CI/CD integration with GitHub Actions
- ✅ Playwright visual regression tests (12 specs)
- ✅ Installation and fork mode test coverage
Technical Implementation:
# test/test_runner.sh
- test_gemspec_syntax()
- test_package_json_valid()
- test_config_yaml_syntax()
- test_version_consistency()
- test_docker_environment()
- test_build_process()
Metrics:
- Test coverage: 60% (target: 90% by v0.8.0) 🟡
- Test execution time: <3 minutes ✅
- False positive rate: <2% ✅
Feature 7: GitHub Copilot Integration ✅¶
Priority: Medium
Version Shipped: 0.6.0 (Enhanced 0.22.0 — Copilot Agent prompt button)
User Stories:
- As a developer using Copilot, I want context-aware code suggestions
- As an AI agent, I want complete project understanding from instructions
- As a maintainer, I want consistent code patterns enforced
Acceptance Criteria:
- ✅ Comprehensive .github/copilot-instructions.md (805 lines)
- ✅ File-specific instructions (layouts, includes, scripts, testing, version control)
- ✅ Architecture documentation for AI context
- ✅ Best practices and coding standards
- ✅ Component development patterns
Technical Implementation:
.github/
├── copilot-instructions.md (805 lines)
└── instructions/
├── layouts.instructions.md
├── includes.instructions.md
├── scripts.instructions.md
├── testing.instructions.md
└── version-control.instructions.md
Metrics:
- AI code quality: 4.5/5 stars ✅
- Developer productivity: +50% with Copilot ✅
- Pattern consistency: 95% ✅
Feature 8: Mermaid Diagram Support ✅¶
Priority: Medium
Version Shipped: 0.3.0
User Stories:
- As a technical writer, I want to create diagrams in markdown
- As a developer, I want flowcharts and sequence diagrams
- As a project manager, I want Gantt charts and timelines
Acceptance Criteria:
- ✅ Native markdown code block support (```mermaid)
- ✅ 10+ diagram types (flowchart, sequence, class, state, ER, Gantt, pie, git, journey, mindmap)
- ✅ GitHub Pages compatibility
- ✅ Responsive design with automatic scaling
- ✅ Dark mode support with forest theme
- ✅ Conditional loading for performance
Technical Implementation:
Metrics:
- Diagram rendering: <200ms ✅
- Browser compatibility: 98% ✅
- Documentation usage: 45% of docs pages ✅
Feature 9: Comprehensive Sitemap System ✅¶
Priority: High
Version Shipped: 0.5.0
User Stories:
- As a visitor, I want to discover all site content easily
- As an SEO specialist, I want complete site structure visibility
- As a content manager, I want to see content statistics
Acceptance Criteria:
- ✅ Unified sitemap layout combining collections, stats, navigation
- ✅ Real-time statistics dashboard (6 KPIs)
- ✅ Interactive search and filtering
- ✅ Collections overview with recent items
- ✅ Mobile-optimized responsive design
- ✅ Dark mode support
Technical Implementation:
_layouts/sitemap-collection.html - Unified sitemap
_includes/stats/ - Statistics components
_data/content_statistics.yml - Generated metrics
Metrics:
- Content discovery: +65% ✅
- User engagement: +40% on sitemap ✅
- SEO improvement: +25% organic traffic ✅
Feature 10: Automated Release Pipeline ✅¶
Priority: High
Version Shipped: 0.4.0 (Enhanced through 0.22.13)
User Stories:
- As a maintainer, I want releases automated from commit to RubyGems
- As a user, I want consistent, documented releases
- As a CI/CD engineer, I want GitHub Actions integration
Acceptance Criteria:
- ✅ Commit analysis for version bump determination
- ✅ Automated changelog generation
- ✅ Gem building and testing
- ✅ RubyGems publishing
- ✅ GitHub release creation with assets
- ✅ CI/CD workflow integration
Technical Implementation:
# scripts/gem-publish.sh (700+ lines)
- analyze_commits() # Determine version bump
- generate_changelog() # Create release notes
- run_tests() # Validate build
- build_gem() # Create .gem package
- publish_to_rubygems() # Upload
- create_github_release() # Tag and release
Metrics:
- Release time: <5 minutes (automated) ✅
- Release consistency: 100% ✅
- Download count: 2,500+ (RubyGems) ✅
Planned Features (Roadmap)¶
Feature 11: Headless CMS Integration 🔴¶
Priority: High
Target Version: 0.23.0+ (Q2–Q3 2026)
User Stories:
- As a content editor, I want a visual content management interface
- As a developer, I want to access content via REST API
- As a team, we want multi-author collaboration with roles
Acceptance Criteria:
- Content API (REST/GraphQL) for external consumption
- Visual front matter editor with live preview
- Multi-author support with role-based access
- Draft/publish workflow with approval process
- Content versioning and revision history
- External CMS adapter (Contentful, Strapi, Sanity)
Technical Requirements:
lib/cms/
├── api.rb # REST API endpoints
├── adapter.rb # CMS integration layer
├── editor.rb # Visual editor backend
└── permissions.rb # Role-based access control
Success Metrics:
- Content creation time: -50% vs manual markdown
- Editor adoption: 80% of content creators
- API response time: <100ms
Feature 12: Advanced Analytics Dashboard 🔴¶
Priority: Medium
Target Version: 0.8.0 (Q3 2026)
User Stories:
- As a marketer, I want A/B testing for content optimization
- As a product manager, I want conversion funnel tracking
- As a designer, I want heatmap visualization
Acceptance Criteria:
- A/B testing framework with variant management
- Conversion funnel definition and tracking
- Heatmap integration (clicks, scrolls, hovers)
- Custom dashboard builder with widgets
- Real-time analytics with WebSocket updates
- Data export (CSV, JSON, PDF reports)
Technical Requirements:
# Enhanced PostHog configuration
posthog:
experiments:
enabled: true
funnels:
enabled: true
heatmaps:
enabled: true
custom_dashboards: true
Success Metrics:
- Conversion rate improvement: +20%
- Analytics engagement: 70% of site owners
- Dashboard customization: 50% create custom views
Feature 13: Visual Theme Customizer 🟡¶
Priority: Medium
Partially Shipped: v0.22.9 (Skin Editor & Palette Generator)
Target for Full Completion: v0.8.0 (Q3 2026)
User Stories:
- As a designer, I want to customize colors without editing CSS
- As a non-technical user, I want point-and-click theme editing
- As a developer, I want generated CSS based on customizations
Shipped (v0.22.9):
- ✅ Skin editor with live color pickers for 9 gradient colors
- ✅ Auto-generated palettes (primary tints, surface, semantic colors)
- ✅ WCAG contrast ratio badges on all palette swatches
- ✅ Random skin generation, save/load to localStorage
- ✅ Export SVGs and copy CSS custom properties
- ✅ Advanced SVG filter controls
Remaining:
- Real-time full theme preview with live updates
- Typography customization (fonts, sizes, weights)
- Layout adjustments (sidebar, header, footer)
- One-click theme presets (10+ built-in themes)
Technical Requirements:
Success Metrics:
- Theme customization rate: 40% of users
- Custom theme creation: 15% of users
- Accessibility compliance: 100% of generated themes
Feature 14: Multi-Language Support (i18n) 🔴¶
Priority: Low
Target Version: 0.9.0 (Q4 2026)
User Stories:
- As a global content creator, I want multi-language site support
- As a translator, I want easy content translation workflows
- As a developer, I want automated language detection
Acceptance Criteria:
- Jekyll i18n plugin integration
- Language switcher component
- URL structure for language versions (/en/, /es/, /fr/)
- Translation workflow with POT/PO files
- Automatic language detection based on browser settings
- RTL (right-to-left) language support
Technical Requirements:
# _config.yml
languages: ["en", "es", "fr", "de", "ja"]
default_language: "en"
translations_dir: _data/i18n/
Success Metrics:
- Multi-language adoption: 20% of sites
- Translation coverage: >90% for supported languages
- User engagement: +30% for localized content
🏗️ Technical Architecture¶
System Architecture¶
graph TB
A[User] --> B[Install Script]
B --> C{Docker Available?}
C -->|Yes| D[Docker Environment]
C -->|No| E[Install Docker]
E --> D
D --> F[Jekyll Container]
F --> G[Bootstrap CDN]
F --> H[PostHog Analytics]
F --> I[Mermaid Diagrams]
F --> J[Content Rendering]
J --> K[Static Site]
K --> L[GitHub Pages]
K --> M[Azure Static Web Apps]
K --> N[Custom Hosting]
Technology Stack¶
Core Runtime:
- Ruby 2.7.0+ (language); Docker uses Ruby 3.3-slim
- Jekyll 3.9.5 (static site generator)
- Bundler 2.3+ (dependency management)
Frontend:
- Bootstrap 5.3.3 (CSS framework — vendored in
assets/vendor/) - Bootstrap Icons (vendored)
- Mermaid 10+ (diagrams — vendored)
- MathJax (mathematical notation — vendored)
- jQuery (optional)
Containerization:
- Docker (linux/amd64 platform)
- Docker Compose (orchestration)
Build Tools:
- GNU Make (command orchestration)
- Bash (automation scripts)
- GitHub Actions (CI/CD)
Analytics:
- PostHog (privacy-first analytics)
- Cookie Consent (GDPR/CCPA compliance)
Deployment Platforms:
- GitHub Pages (primary)
- Azure Static Web Apps
- Netlify, Vercel (compatible)
- Custom servers (Docker)
🎨 Design Requirements¶
Design Principles¶
- Mobile-First: All layouts designed for mobile, enhanced for desktop
- Accessibility: WCAG 2.1 AA compliance minimum
- Performance: Lighthouse score 90+ for all metrics
- Consistency: Bootstrap-based design system
- Flexibility: Customizable via CSS variables
Layout System¶
Hierarchy:
root.html (base)
├── default.html (main wrapper)
│ ├── home.html (homepage)
│ ├── article.html (blog posts — replaces journals)
│ ├── collection.html (content collections)
│ ├── section.html (section index pages)
│ ├── search.html (search results)
│ ├── stats.html (statistics dashboard)
│ ├── tag.html (tag pages)
│ ├── note.html (developer notes)
│ ├── notebook.html (Jupyter notebooks)
│ └── sitemap-collection.html (sitemap)
├── landing.html (marketing pages)
├── admin.html (admin dashboards)
└── news.html (news index)
Responsive Breakpoints:
- xs: <576px (mobile)
- sm: ≥576px (mobile landscape)
- md: ≥768px (tablet)
- lg: ≥992px (desktop)
- xl: ≥1200px (large desktop)
- xxl: ≥1400px (extra large)
Color Palette¶
Primary Colors:
- Primary: #007bff (Bootstrap blue)
- Secondary: #6c757d (gray)
- Success: #28a745 (green)
- Danger: #dc3545 (red)
- Warning: #ffc107 (yellow)
- Info: #17a2b8 (cyan)
Theme Skins:
- Default (light)
- Dark (dark mode)
- High Contrast (accessibility)
Typography¶
Font Stack:
--font-family-sans-serif:
-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
Arial, sans-serif;
--font-family-monospace:
SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New",
monospace;
Scale:
- h1: 2.5rem
- h2: 2rem
- h3: 1.75rem
- h4: 1.5rem
- h5: 1.25rem
- h6: 1rem
- body: 1rem