fix(cli): drop comments from the import prompt's frontmatter example #274
No reviewers
Labels
No labels
bug
discussion
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
research
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
gram-lang/gram!274
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/cli-import-prompt-frontmatter"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The frontmatter has no comments: a trailing
# …becomes part of the value ('Tarte au Citron Meringuée' # original language…, quotes included), and a# …line or an indented line makes the whole block fall back to a text step. The frontmatter example ofgram import's prompt carried six trailing comments, which the model could copy into an imported recipe.packages/cli/src/prompts/gram-spec.ts: the frontmatter example has no comments any more; what they said moves to the Rules below it (originalTitle,authoras a string or an array,sourcealways an array,portionsan integer,makesnotsize,densities), with a new rule saying the frontmatter has no comments. The reference recipe uses yolks in the lemon curd (whites were used twice) and reuses the butter with@&butter{50g}, as its own rule asks; the egg count is unchanged (kitchen merges the two<@egg{3}).packages/cli/tests/ai-spec-examples.test.ts: every line of the frontmatter example iskey: value, every written key is read intometa, and no value holds a#. It also checks the gram-authoringSKILL.mdand its mirror when they are present:.agents/and.claude/are git-ignored, so CI checksgram-spec.tsalone. Failed before the fix, and on both traps reintroduced by hand.@gram-lang/cli.First step of PR 3 of the DX plan (AI spec examples test), which will extend this test to every example of the prompt on
dev/1.6.