Theme authoring

From 5throck/ai-workspace-standards · View interactive version

Theme authoring is an AI agent skill from the GitHub repository 5throck/ai-workspace-standards. Entry point for creating a new co-deck theme or style. PM dispatches the appropriate workflow (Style Workflow or T-Stage) based on user request. Responds to: "create a new theme", "add a new style", "make a dark theme", "create a dark style", "add zen theme".

How to use this skill

Skill file

Context

co-deck uses a two-layer system: Theme (HTML structure + rendering paradigm) and Style (CSS variable set). Authoring either requires a dedicated pipeline separate from the 11-Stage lecture production pipeline.


When to Use

| User says | Route |

|-----------|-------|

| "create a new style", "add dark style", "add style variant" | Style Workflow |

| "create a new theme", "add zen variant", "new theme" | T-Stage (Theme Workflow) |


Style Workflow (lightweight, 3 steps)

Trigger: User requests a new visual style variant — changes color, font, or spacing only.

Step S-1: PM — collect style spec

Ask the user:

  1. Style name (kebab-case, e.g., dark-premium)
  2. Visual characteristics: background color, accent color, font, spacing intent
  3. Target audience / lecture type (used for THEMES.md "Best For" annotation)

Step S-2: PM dispatches Design

Design agent authors two files in docs/html-themes/styles/<name>/:

style.css:

pdf_color_spec.json:

Step S-3: PM — preview + approval + registration

  1. Provide preview link: docs/html-themes/preview/preview.html?theme=pitch-enhanced&style=<name>
  2. Wait for user approval
  3. On approval:

T-Stage Pipeline (Theme Workflow, 5 steps)

Trigger: User requests a new HTML rendering paradigm — a new theme changes the DOM skeleton, navigation, and TOC structure.

T-0: PM — collect theme spec

Ask the user:

  1. Theme name (kebab-case, e.g., magazine, card-deck)
  2. Rendering paradigm: how are slides displayed? (scrollable, stacked, carousel, grid…)
  3. Navigation: how does the user move between slides?
  4. TOC required? (yes / no)
  5. Which existing styles should be compatible?

T-1: PM dispatches html-build

html-build authors docs/html-themes/themes/<name>/template.html:

Also authors docs/html-themes/themes/<name>/pdf_layout_spec.json:

T-2: PM dispatches design

design authors docs/html-themes/themes/<name>/theme.json:

{
  "name": "<name>",
  "version": "1.0.0",
  "description": "...",
  "rendering": { "paradigm": "...", "navigation": "...", "progress_indicator": "..." },
  "content_rules": {
    "max_bullets_per_slide": N,
    "max_title_chars": N,
    "recommended_slide_count": "X-Y",
    "slide_type_usage": {
      "standard": "All content slides (mandatory)",
      "punchline": "Last content slide only — single-statement message (≤1 line, no bullets)",
      "divider": "Chapter/part boundaries only",
      "profile": "Speaker intro only",
      "title": "First slide (cover) only",
      "contact": "Final slide only"
    },
    "notes": "..."
  },
  "compatible_styles": ["classic", "minimal"],
  "incompatible_styles": [],
  "toc_required": true|false,
  "css_base": "docs/html-themes/styles/base.css"
}

T-3: PM dispatches storyline

storyline reviews and authors:

  1. content_rules validation: are max_bullets, max_title_chars, and recommended_slide_count realistic for actual lecture production?
  2. recommended_structure: authors the recommended_structure field in theme.json:
"recommended_structure": {
  "pattern": "Cover → [Part Divider → 8-12 Content → Summary] × N → Contact",
  "audience_fit": ["practitioner", "graduate"],
  "notes": "..."
}
  1. THEMES.md Best For: provides audience fit annotation for the Styles table

T-4: PM — preview + approval + registration

  1. Provide preview link: docs/html-themes/preview/preview.html?theme=<name>&style=classic
  2. Wait for user approval
  3. On approval:

Registration Gate: After scaffolding, run bun scripts/co-deck/verify-new-theme.ts <name> to validate the theme passes all 5 checks: (1) structural validation, (2) manifest freshness, (3) THEMES.md marker consistency, (4) fixture HTML build + extraction round-trip, (5) PDF generation. Use --fast to skip checks 4–5 during iterative development. Use --style <name> to test with a specific style (default: classic). Use --json for machine-readable output. Registration is blocked until the gate exits 0.



Execution Steps

Style Workflow (3 steps)

  1. S-1 (PM): Collect style name + visual characteristics from user (see Style Workflow section above)
  2. S-2 (design): Author docs/html-themes/styles/<name>/style.css (CSS variable overrides) + pdf_color_spec.json (12 role-based RGB keys)
  3. S-3 (PM): Provide preview link → user approval → register in THEMES.md + update compatible_styles in theme.json files

T-Stage / Theme Workflow (5 steps)

  1. T-0 (PM): Collect theme name + rendering paradigm from user (see T-Stage Pipeline section above)
  2. T-1 (html-build): Author template.html (HTML skeleton + navigation JS) + pdf_layout_spec.json (geometry, layout percentages, slide_types)
  3. T-2 (design): Author theme.json — content_rules + compatible_styles + slide_types
  4. T-3 (storyline): Validate content_rules + author recommended_structure field in theme.json
  5. T-4 (PM): Provide preview link → user approval → register in THEMES.md + update all affected files

Output Format

Style Workflow outputs:

Theme Workflow outputs:

Constraints

Related Skills

Related Files

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.