feat(html-artifact): saved-template clone mode + named gallery - #916
Merged
Conversation
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)
Skill-eval coverageChanged skills in this PR: 1 ( Report only. CI cannot run evals (the runner needs the Uncoveredno eval coverage for changed skill(s): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.business-review,project-kickoff,system-design, all in the Birchline design system, each with a.slots.jsonmanifest.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).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).
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
ruff check+ruff format --checkclean on new filesvalidate-artifact.py(structure, self-containment, slop scan)Not done (by design)
No Office-binary output. If editable
.pptx/.xlsx/.docxis ever wanted, that's a separate python-pptx/openpyxl toolchain decision.