Repository navigation
fix(content): let the Content Agent use a placeholder only for a missing fact - #1620
Merged
Merged
Conversation
…son must find, never a page, a document or a competitor
A new page held its send to Webflow on six placeholders, and four were no
missing fact: "[About]" and "[Documentation]" pages, "[OpenAI release
notes]" (twice) and "[Google AI updates]" were pages and documents the
agent could name in plain words, and "[competitor]" a word it could write.
Each placeholder holds a send or an export until the person fills it, so
every one the agent writes is work for them.
One rule (PLACEHOLDER_RULE) now goes into every prompt that writes a page's
words: writing a new page, the Improve suggestions, Apply rules and
Rewrite the whole page. A placeholder is only for a number, a price, a
date, a person's or a customer's name, or a quote. A page, a document, a
link, a product, a brand, a company or a competitor is written in plain
words ("your About page", "OpenAI's release notes"), the competitors given
by name, else "competitors". Write as few as the facts need.
The number and name guards still turn an unsourced figure, name or quote
into a placeholder, as before.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
… each above its own rule The new rule went in between ATTRIBUTION_RULE and its JSDoc: each comment now sits over the rule it explains. Co-Authored-By: Claude Opus 5.5 <[email protected]>
gkhngyk
approved these changes
Oct 28, 2026
gkhngyk
left a comment
Contributor
There was a problem hiding this comment.
Looks good.
PLACEHOLDER_RULE goes into all four prompts that write a page's words: write, suggest, rewrite and the agent's Apply rules. It sits after each one's "never invent… write a placeholder" line, so the two read together. With the brief rules off, the prompts stay the constants, so "asks as before while they are off" still holds. The new test fails without the change. The branch is on an older main (dcd1d953) but merges clean on 3f6a4d4b, and with #1626 and #1627, which edit the same files. content-writer, content-agent and content-rewrite tests pass on the merged tree.
Before the API deploy: no change. It's a server prompt, so the agent keeps writing [About]-style placeholders until the deploy.
7 of 12 tasks
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.
Summary
Of the 6 placeholders that held the Webflow send, 4 weren't missing facts:
[About],[Documentation],[OpenAI release notes]twice,[Google AI updates]. Another was[competitor].PLACEHOLDER_RULEincontent-agent.jslimits placeholders to what the agent can't know: a number, a price, a date, a person's or customer's name, a quote.Needs the API deploy.
Related issue
None. From Ansvisor’s production test of the Content Editor and Send to CMS (2026-10-27).
Type of change
feat— New featurefix— Bug fixchore— Maintenance / dependenciesdocs— Documentation onlyrefactor— Code change that neither fixes a bug nor adds a featuretest— Adding or updating testsHow to test
cd server && npx vitest run src/lib/content-agent.test.js src/lib/content-writer.test.jsChecklist
feature/,fix/,chore/,docs/) — see CONTRIBUTING.mdyarn lintpasses (run fromweb/)yarn typecheckpasses (run fromweb/)yarn format:checkpasses (run fromweb/)Checked together with the other PRs from the same test (one integration tree of all eleven on main 3f6a4d4):
server/:npm run format,npm run lintandnpm test(3,349 tests).web/:yarn format,yarn lint(0 errors, the 7 earlier warnings),yarn typecheck,yarn test(4,385 tests) andyarn build.🤖 Generated with Claude Code