fix(ghost): the draft template emitted raw HTML, so no draft could be reviewed (v0.1.6) - #58
Merged
Merged
Conversation
… 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
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.
draft-post's template stamped this 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 fix
Provenance moves into front matter as
generatorandnext. galley parses and skips front matter, andpush-draftreads named keys and ignores the rest, so nothing downstream needs teaching and the note survives.Proved both directions with the real binary:
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 andcreate-blog-postskill 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.mdandghost/skills/revise-post/SKILL.mdhave 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 offdevand did not touch or commit them, so they are still sitting there and still uncommitted. Worth triaging.https://claude.ai/code/session_01YNgqJnFLD1gunVWy5bHNAT