Skip to content

feat(html-artifact): saved-template clone mode + named gallery - #916

Merged
notque merged 2 commits into
mainfrom
feat/html-artifact-clone-templates
Aug 18, 2026
Merged

feat(html-artifact): saved-template clone mode + named gallery#916
notque merged 2 commits into
mainfrom
feat/html-artifact-clone-templates

Conversation

@notque

@notque notque commented Aug 18, 2026

Copy link
Copy Markdown
Owner

What

Adopts the clone-don't-regenerate pattern from OpenAI's curated-template skills — without importing their skills. Those 20 skills ship editable Office binaries (.pptx/.xlsx/.docx, 27 MB) and are host-locked to an OpenAI Office runtime; they self-abort elsewhere and are thin wrappers (20 copies of one skill). We kept the idea, rejected the files.

A frozen HTML template in templates/saved/ is cloned and slot-filled by a deterministic script. Layout is fixed; only declared content slots change.

Added

  • scripts/fill-template.py — clone-and-fill engine. Fails loud (exit 1) on a missing required slot, an undeclared slot name (catches typos), or a leftover {{MARKER}}. Enforces content-vs-layout authority mechanically, not by prompt discipline.
  • Gallery (one skill, many template files — not a skill per template): business-review, project-kickoff, system-design, all in the Birchline design system, each with a .slots.json manifest.
  • SKILL.md — Phase 0 clone-first check + "Fidelity & Authority" section (clone-don't-regenerate; content controls content, template controls layout; fail loud).
  • PHILOSOPHY.md — worked example under External Components Are Research Inputs, Not Imports (practice adopted, files rejected).
  • 13 tests, incl. gallery-integrity guards (every declared slot has a marker; every marker is declared).

Blind A/B: clone vs regenerate

Same 3 content briefs, two arms: clone (frozen template + slot fill) vs regenerate (3 independent agents build layout from scratch). 6 outputs anonymized and scored by a blind grader (no arm labels, no key).

Dimension Clone Regen Δ
Visual consistency 5.00 4.33 +0.67
Professional polish 5.00 4.00 +1.00
Slop-free 5.00 3.33 +1.67
Structural completeness 3.00 5.00 −2.00
Overall 4.50 4.17 +0.33

Read: Clone wins decisively on consistency, polish, and slop — its purpose. The blind grader independently clustered the 3 clone outputs as "one identical design system" and the 3 regen outputs as each "comparatively bespoke" (blue gradients, card shadows, differing headers) — i.e. it detected the drift clone mode removes, without knowing the arms.

The completeness gap is a test-harness artifact, not a design flaw: the clone arm was fed thin placeholder slot text; the regen agents wrote fuller prose. Content is the variable there, not layout. With real content, clone mode keeps its consistency edge and fills completely — see the fully-populated Issue #907 kickoff rendered from the same template.

Verification

  • 211/211 html-artifact script tests pass (13 new + 198 existing)
  • ruff check + ruff format --check clean on new files
  • Generated artifacts pass validate-artifact.py (structure, self-containment, slop scan)

Not done (by design)

No Office-binary output. If editable .pptx/.xlsx/.docx is ever wanted, that's a separate python-pptx/openpyxl toolchain decision.

Adopt the clone-don't-regenerate pattern from the OpenAI curated-template
skills without importing their Office-binary skills. A frozen HTML template
in templates/saved/ is cloned and slot-filled by fill-template.py, which
enforces content-vs-layout authority with exit codes: layout is fixed, only
declared content slots change.

- fill-template.py: deterministic clone-and-fill; fails loud on missing
  required slot, undeclared slot, or leftover marker
- gallery: business-review, project-kickoff, system-design (Birchline)
- SKILL.md: Phase 0 clone-first check + Fidelity & Authority section
- PHILOSOPHY.md: worked example under External Components Are Research
  Inputs, Not Imports (practice adopted, files rejected)
- 13 tests incl. gallery integrity (every marker declared, every slot marked)
@github-actions

github-actions Bot commented Aug 18, 2026

Copy link
Copy Markdown

Skill-eval coverage

Changed skills in this PR: 1 (4651345990f5..9abfb0c6e342).

Report only. CI cannot run evals (the runner needs the claude CLI). Run the ablation locally to get the base->head delta.

Uncovered

no eval coverage for changed skill(s): html-artifact
A gap to consider, not a failure.

@notque
notque merged commit 1e439d4 into main Aug 18, 2026
11 checks passed
@notque
notque deleted the feat/html-artifact-clone-templates branch August 18, 2026 23:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant