Skip to content

fix(field): say a title is rich text limited to one heading - #296

Open
angeloashmore wants to merge 6 commits into
mainfrom
claude/prismic-cli-275-fix-mbov4s
Open

fix(field): say a title is rich text limited to one heading#296
angeloashmore wants to merge 6 commits into
mainfrom
claude/prismic-cli-275-fix-mbov4s

Conversation

@angeloashmore

@angeloashmore angeloashmore commented Sep 9, 2026

Copy link
Copy Markdown
Member

Resolves: #275

Description

The CLI states the single-heading title convention only in the EXAMPLES section of prismic field add rich-text --help. An agent asked for a title reads prismic field add text --help instead, never opens the rich text help, and adds the title as text.

This PR puts the convention on both help surfaces the agent reads, and the eval goes from 5 of 18 trials to 10 of 10.

Checklist

  • If my changes require tests, I added them.
  • If my changes affect backward compatibility, it has been discussed.
  • If my changes require an update to the CONTRIBUTING.md guide, I updated it.

Preview

prismic field add text --help:

Add a text field to a slice or custom type.

A text field holds a short plain string with no formatting.

For a title or a heading, rich text limited to a single heading block
is usually a better fit:

  prismic field add rich-text title --to-type blog_post --allow heading1 --single

How to QA 1

In a container or a disposable VM:

$ node --run build
$ IS_SANDBOX=1 EVAL_TRIALS=10 PRISMIC_ALLOW_EVALS=true node --run evals -- \
    evals/design-sensible-models.eval.ts \
    -t "models a title as single-heading rich text|models a testimonial slice from a text description"

The testimonial eval is the counter-check. It wants a text field for the author name, so it catches this text pushing plain strings into rich text. It holds at 10 of 10.

🤖 Generated with Claude Code

https://claude.ai/code/session_01YRv7FgAiL76NgBHywdGKPC

Footnotes

  1. Please use these labels when submitting a review:
    ❓ #ask: Ask a question.
    💡 #idea: Suggest an idea.
    ⚠️ #issue: Strongly suggest a change.
    🎉 #nice: Share a compliment.

The title convention was only in the EXAMPLES of `field add rich-text
--help`. An agent that reads `field add --help` and `field add text
--help` never sees it, and adds a title as key text.

The `text` router row and the `field add text` description now say that
key text is for short plain strings, and give the command for a title.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YRv7FgAiL76NgBHywdGKPC
The text read like an instruction. It now reads as guidance, and it says
what key text is good for before it points to rich text.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YRv7FgAiL76NgBHywdGKPC
The examples said key text is a good fit for names. An agent asked to
model a blog author then adds the author as key text, but a link to an
author type is better. The title guidance does not need the examples.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YRv7FgAiL76NgBHywdGKPC
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YRv7FgAiL76NgBHywdGKPC
@angeloashmore
angeloashmore marked this pull request as ready for review September 10, 2026 16:47
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.

evals: agent does not model a title as single-heading rich text

2 participants