Skip to content

fix(ghost): the draft template emitted raw HTML, so no draft could be reviewed (v0.1.6) - #58

Merged
schuettc merged 2 commits into
devfrom
fix/ghost-draft-banner-blocks-galley
Aug 22, 2026
Merged

schuettc merged 2 commits into
devfrom
fix/ghost-draft-banner-blocks-galley

Conversation

@schuettc

Copy link
Copy Markdown
Owner

draft-post's template stamped this as the first line of every draft body:

<!-- DRAFT — produced by /ghost:draft-post. Run /ghost:revise-post to refine. -->

Drafts are reviewed in galley, which refuses raw HTML outright — and an HTML comment is raw HTML. So every draft this skill produced was unopenable for review before the author had typed a character. The tool put the blocker in ahead of the writing.

Measured rather than reasoned, against a real corpus: 19 of 24 drafts in ghost-site refused, every one on that banner, at lines 7–11. Not scattered content — one generated line, in every file.

The fix

Provenance moves into front matter as generator and next. galley parses and skips front matter, and push-draft reads named keys and ignores the rest, so nothing downstream needs teaching and the note survives.

Proved both directions with the real binary:

OLD shape: galley: markdown: raw HTML not supported (line 8)
NEW shape: OPENS

The comment above the template says not to put an HTML comment back, and why — this is the kind of thing that gets helpfully re-added.

Why this half exists

The first half landed in ghost-site: its style guide and create-blog-post skill now separate a prose-only draft from a publish-prep transform that adds the HTML tables and card markers Ghost wants. Fixing the authoring rules without fixing the generator would have left every new draft broken anyway — the rules said "prose-only" while the tool wrote HTML into the file. That gap is what the acceptance test caught; the spec review did not.

Note for whoever owns this repo

ghost/skills/draft-post/SKILL.md and ghost/skills/revise-post/SKILL.md have had uncommitted edits in the primary clone since 2026-07-15 — a matched pair of one-line style rules ("Answering unasked questions"). They look complete and deliberate. I worked in a worktree off dev and did not touch or commit them, so they are still sitting there and still uncommitted. Worth triaging.

https://claude.ai/code/session_01YNgqJnFLD1gunVWy5bHNAT

… reviewed (v0.1.6)

draft-post's template stamped

    <!-- DRAFT — produced by /ghost:draft-post. Run /ghost:revise-post to refine. -->

as the first line of every draft body. Drafts are reviewed in galley, which
REFUSES raw HTML outright — and an HTML comment is raw HTML. So every draft
this skill produced was unopenable for review before the author had typed a
character: the tool put the blocker in ahead of the writing.

Measured rather than reasoned, against a real corpus: 19 of 24 drafts in
ghost-site refused, every one on that banner, at lines 7-11. Not scattered
content — one generated line, in every file.

The provenance moves into front matter as `generator` and `next`. galley parses
and skips front matter, and push-draft reads named keys and ignores the rest, so
nothing downstream needs teaching and the note survives.

Proved both directions with the real binary: the old shape refuses at line 8,
the new shape opens.

This is the second half of a fix whose first half landed in ghost-site — that
repo's style guide and create-blog-post skill now separate a prose-only draft
from a publish-prep transform that adds the HTML tables and card markers Ghost
wants. Fixing the rules without fixing the generator would have left every new
draft broken anyway, which is why this half exists.

The comment above the template says not to put an HTML comment back, and why.

Claude-Session: https://claude.ai/code/session_01YNgqJnFLD1gunVWy5bHNAT
@schuettc
schuettc merged commit 08d7f59 into dev Aug 22, 2026
2 checks passed
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