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

Before this PR, prismic field add text --help did not say that Prismic models a title as rich text limited to one heading. The convention appeared only in the EXAMPLES section of prismic field add rich-text --help, which a reader reaches only if they already suspect rich text.

For example, someone who needs a title runs prismic field add text title and never learns otherwise.

After this PR, the text help states the convention and gives the command for a title. The text row in prismic field add --help carries the same pointer.

No command behavior changes. This is help text only.

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

$ 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"

🤖 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