Skip to content
This repository was archived by the owner on Jun 12, 2026. It is now read-only.
This repository was archived by the owner on Jun 12, 2026. It is now read-only.

πŸ’Ό Pre-built Templates: 10 ready-to-use artifact templates with YAML data inputΒ #16

Description

@ramsani

πŸ’Ό Feature: Pre-built Artifact Templates (5–10 Ready-to-Use Patterns)

Context

The current pattern system (22 patterns in patterns/) is comprehensive but requires the user to compose their own prompts. They must understand what the pattern does, what inputs it needs, and how to trigger it. This creates friction: the user needs to read the pattern documentation before they can use it effectively.

Pre-built templates solve this by bundling the pattern with its data structure: the user fills in a simple data object (YAML) and gets a complete, quality-verified artifact without writing a single prompt.

Problem

  • Using a pattern requires understanding the pattern's purpose and composition approach
  • The user must write a custom prompt for every artifact, even for very common use cases
  • Common workflows (e.g., "decision deck for two options", "project recap at end of sprint") are not single-command
  • The gap between "I know what I want" and "I generated a complete artifact" is too large for casual use

What This Resolves

10 pre-built templates that can be invoked with a single command and a data file:

  1. decision-deck β€” Compare 2–4 options with scores, risks, recommendations
  2. project-recap β€” Sprint or milestone recap with progress, blockers, next steps
  3. diff-review β€” PR/change review with annotated files, inline comments, approval signals
  4. architecture-review β€” System/module architecture with connections, boundaries, trade-offs
  5. audit-report β€” Security or process audit with findings, severity, actions
  6. incident-postmortem β€” Incident timeline, root cause, learnings, action items
  7. workflow-flowchart β€” Process workflow with steps, decision nodes, and roles
  8. module-map β€” Codebase module map with dependencies, ownership, data flow
  9. research-comparison β€” Options comparison with evidence, scores, trade-offs
  10. ticket-triage β€” Issue triage board with priority, category, owner assignments

Each template has a single-file YAML input (human-editable, no code required), generates a complete quality-verified HTML artifact via deliver-artifact.py, and includes validation of the YAML input before generation.

Proposed Approach

Template structure (templates/prebuilt/<name>.yaml):

---
name: decision-deck
version: "1.0"
description: "Compare 2–4 options and recommend the best next move"

input_schema:
  title:
    type: string
    required: true
  options:
    type: array
    required: true
    min_items: 2
    max_items: 4
    items:
      name: string
      score: integer  # 0-100
      risks: list[string]
      evidence: list[string]
  recommendation:
    type: string
    required: true
  next_action:
    type: string
    required: true

Template engine (scripts/generate-template.py):

python scripts/generate-template.py decision-deck /path/to/data.yaml
# Generates: ~/.claude/html-explainer/outputs/artifacts/temporal/decision-deck-<hash>.html
# Runs deliver-artifact.py at 90+
python scripts/generate-template.py validate decision-deck /path/to/data.yaml
# Validates YAML against schema, returns errors if schema violated

CI / smoke tests: Each template has a canonical example in templates/prebuilt/examples/<name>-example.yaml. validate-templates.sh (new) runs all examples through the generator and verifies all pass deliver-artifact.py at 90+.

Acceptance Criteria

  • At least 10 templates in templates/prebuilt/ directory, each with YAML schema and example
  • scripts/generate-template.py accepts template name and data YAML, generates valid artifact
  • generate-template.py validate <template> <data.yaml> returns schema errors before generation
  • All 10 templates generate artifacts that pass deliver-artifact.py at 90+ using their example data
  • validate-templates.sh (new) runs all template examples and asserts all pass 90+
  • /make-the-right-html command recognizes template invocation patterns in natural language
  • Template inputs are validated before generation (invalid YAML β†’ clear error, no partial output)
  • Documentation: each template file has a one-paragraph description and usage example
  • New templates can be added to templates/prebuilt/ without modifying the generator script

Quality Verification

Run validate-templates.sh to confirm all 10 templates generate artifacts at 90+. Verify generate-template.py list-templates shows all templates without hardcoding.

Labels

enhancement, templates, usability, pre-built

Milestone

v1.1 β€” Collaboration-ready artifacts

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions