Repository navigation
fix(content): read a rewrite's attributions line by line, read more wordings and two-name lists, and let a banned word drop only itself (#1520 follow-ups) - #1537
Conversation
…adings' answers and what the last rewrite came to, and offer a Length it can reach Co-Authored-By: Claude Opus 5.5 <[email protected]>
… for, keep its numbers on the row (00285), and read the floor's sections closer (pre-push review) Co-Authored-By: Claude Opus 5.5 <[email protected]>
…and count the last rewrite only within its Length's band and the same kept text (pre-push review) Co-Authored-By: Claude Opus 5.5 <[email protected]>
… one more pass Co-Authored-By: Claude Opus 5.5 <[email protected]>
…er to rewrite the cited passages too when they hold the Length out of reach Co-Authored-By: Claude Opus 5.5 <[email protected]>
…e back, release an unused hold, keep a cited-too miss as evidence, and offer it only when cited passages hold the Length (pre-push review) Co-Authored-By: Claude Opus 5.5 <[email protected]>
…he agent and Next step move on, and count open rules as the Rules tab does Co-Authored-By: Claude Opus 5.5 <[email protected]>
…es read the page, keep the Length's own words, and wait for the passages before dropping skips (pre-push review) Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ion, not the next step, and say how many placeholders it leaves to fill Co-Authored-By: Claude Opus 5.5 <[email protected]>
…aphs, and read a rewrite's once, not on every key (pre-push review) Co-Authored-By: Claude Opus 5.5 <[email protected]>
…y why a run left nothing, and show a failed last run on the card Co-Authored-By: Claude Opus 5.5 <[email protected]>
… id and kind, not by clocks, and clear a failed last run once another starts (pre-push review) Co-Authored-By: Claude Opus 5.5 <[email protected]>
…e rules before they're accepted, and say which rule met now one would break Co-Authored-By: Claude Opus 5.5 <[email protected]>
…age as it is now, and count a rewrite's Length as its own line reads it (pre-push review) Co-Authored-By: Claude Opus 5.5 <[email protected]>
…wasn't given or drops a name a passage has Co-Authored-By: Claude Opus 5.5 <[email protected]>
…give claims only to sources the page or its input names, and put a rewrite's as a placeholder (pre-push review) Co-Authored-By: Claude Opus 5.5 <[email protected]>
…editor shows them, and hold the rules chip until its count stands Co-Authored-By: Claude Opus 5.5 <[email protected]>
…aracters as the toolbar counts them, and the run's rule count Co-Authored-By: Claude Opus 5.5 <[email protected]>
…for the brief and catalog before the rules' count, hold the panel's counts with it, and read the shown rewrite's Length by the editor's count (pre-push review) Co-Authored-By: Claude Opus 5.5 <[email protected]>
…s open suggestions for the page before, and drop a batch's card once the page no longer has it Co-Authored-By: Claude Opus 5.5 <[email protected]>
…e left open never holds the next run out of sight Co-Authored-By: Claude Opus 5.5 <[email protected]>
…estions when they can't be set aside, and hold History while the agent works or a decision saves (pre-push review) Co-Authored-By: Claude Opus 5.5 <[email protected]>
… a sweep on the step under way, a line on what it does, and the page drawn in Co-Authored-By: Claude Opus 5.5 <[email protected]>
…, true without an outline, and silent on rules or sources read none of; even step spacing; steadier tests (pre-push review) Co-Authored-By: Claude Opus 5.5 <[email protected]>
…hich runs as a Fix, with its steps and Stop Co-Authored-By: Claude Opus 5.5 <[email protected]>
…a Start's write doesn't stand in for it; the rewrite prop says what it reads (pre-push review) Co-Authored-By: Claude Opus 5.5 <[email protected]>
…t once it's decided too, not only while it's shown Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ents say when it's read and who counts it (pre-push review) Co-Authored-By: Claude Opus 5.5 <[email protected]>
gkhngyk
left a comment
There was a problem hiding this comment.
Looks good, with follow-ups. Server only: two commits on #1526. #1520's two before-merge items (blocks read with textOf, no cap on a name's length) can go here instead; both are unchanged here (content-agent.js:722, :765, :325).
What I checked:
- The rewrite reads text, line by line.
editLinesisguardPeopleInHtml's line reading moved out. The people guard's edits are as before, andplaceholderAttributionsInHtmluses the same helper.- A linked name and
AT&Tare read whole. - A link left with only "[source]" goes, so the claim isn't left with its page.
- A
<br>ends a line for both guards. - A name that two wordings read ("As Zapier says") gets one edit (
attributionEdits).
- Wordings, each held to a claim's shape:
- "As X notes / puts it", before a comma, a colon or "that";
- "report / study / survey / paper / poll by or from X", before a comma or a claim verb;
- "data from X shows", before "that" or a figure;
- "X'ın raporuna / araştırmasına / verilerine … göre";
- "laut einer … von X".
- The event, CTA, tool and German-noun cases in the tests aren't read.
- Leaving out "X ranks / lists" is right while the brand's own name isn't a known source (item 1).
- Lists. "&" joins a list. Two names count as a list when either is camel-cased ("ChatGPT and Claude", "iOS and Android"), so "Sales and Marketing" and "SEO and AEO" stay terms.
- Banned words.
bannedWordsOfreads the words from the "aim: …" part of the detail.useRuleDescriberbuilds that part from the rule's own list.- With no words (a hand-off, an older editor), any item may go, as before.
- Fix and Start pass the words. "Leverage Shopify" losing "Leverage" keeps Shopify.
- AI traces may still drop any name, which is right: they're phrases.
- Merge. No migration of its own. It merges after #1520–#1526, through a temp base as the squash requires. Its own change and main's #1525 touch different hunks of
content-writer.js. Nothing changes on Vercel at merge.
Low, follow-up:
- Some product sentences read as claims (
server/src/lib/content-agent.js:351).- Any comma after "from X" counts. "Send a survey from Typeform, Jotform or Google Forms" and "Download the 2025 report from Gartner, then…" are read. Read the comma form only after "according to", "in" or "per" ("In a 2025 report by Gartner, …").
- "shows" is a tool's word too. "The Performance report from Google Search Console shows clicks and impressions" is read. Hold "show(s)" to "that" or a figure, as
data fromdoes (:357). "finds", "reveals" and the others belong to a claim. - The brand's own product reads the same way. "A weekly report from Acme shows your top pages" is read, and so is "Acme's data shows that…" (
:341, from #1520). Add the brand's name toattributableSources. That would also let "X ranks / lists" be read for other names. - Effect. Fix and Start drop the change. In a rewrite, the name becomes "[source]", unless the page already says it the same way.
- A possessive goes into the placeholder (
attributionEdits,:492-501).- "According to Gartner's latest survey" becomes "According to [source] latest survey", and "Gartner's research shows" becomes "[source] research shows".
- End the edit before an apostrophe ending, as
knownNamecuts it.
- Turkish and German.
- Not read:
- "Gartner'ın 2025 raporuna göre", "Gartner'ın son raporuna göre": a word comes between.
- "Gartner raporuna göre", "TÜİK verilerine göre": no genitive, the commoner form.
- German "Gartner zufolge" and "nach Angaben von Gartner".
- Misread:
- A "göre" name is one word, so a rewrite turns "Google Analytics'e göre" into "Google [source]'e göre".
- "laut Hersteller", "laut Herstellerangaben" and "laut Datenblatt" are common on product pages. They read as sources (
:344, from #1520) and become "laut [source]".
- Fix:
- Allow a year or one word before the noun.
- Take a name's capitalised words before its suffix.
- Read "zufolge".
- Skip "Hersteller…" and "Datenblatt" after "laut".
- Not read:
# Conflicts: # server/src/lib/content-writer.js
|
Merged #1526 forward (bdd90e0), which brings in Checks after the merge:
|
…ace between them, cap a source's name at eight words, read "en" after "göre" as the source's claim, never skip a name's last word, and read "per" and "states" as the page's language and grammar have them (review of ansvisor#1520) Co-Authored-By: Claude Opus 5.5 <[email protected]>
…age's language from its rules or My rules as the CMS send does, keep a name's last word only for an -ly word or a capitalised role, and read "states"/"claims" as nouns after a count but a year before a source (pre-push review) Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Done here, as you allowed (3fddfc2): #1520's two before-merge items, plus its low items 3–5. Before merge
Low items
Checks: server format and lint clean; 224 test files, 2,805 passed, 3 skipped. This PR's own follow-ups (product sentences, the possessive in the placeholder, the Turkish and German forms) will come in a follow-up PR on top of this one. |
|
Your three low follow-ups (product sentences, the possessive in the placeholder, the Turkish and German forms) are in #1544, stacked on this one. |
gkhngyk
left a comment
There was a problem hiding this comment.
Needs changes: one fix before merge, in the reading of a dotted name. #1520 is on main now, so this should go in before the next API deploy. The rest of #1520's items are done, with small follow-ups.
What I checked:
- Stack and merge.
- bdd90e0 only brings #1526's branch in: re-merging its parents gives the same tree.
- #1520–#1526 are squash-merged. Main's copies of the seven files this PR touches are #1526's head, so its own change (
origin/pr/1526..origin/pr/1537) applies to main as it is. - Server only, with no migration. Nothing changes on Vercel at merge.
- #1520's earlier items:
- Blocks read line by line. Done.
htmlLinesuses the guards' line reader. Each block and each<br>at block level is its own line, and inline tags are read with their line.- It reads an insert's blocks, a split replace's blocks (for both
dropsNameanddropsPlaceholder) and the page inattributableSources. - Compact
<ul><li>bullets keep their names, and dropping one is still caught. - "…according to Gartner.
</p><p>Most…" reads "Gartner". - A heading before "According to Zapier" or "Zapier says" neither hides the claim nor joins it.
- "
<a>Gartner</a>'s report shows that…" is read whole, as known or unknown. textOfis left only forsplitReplace's check for empty words.- One gap is left: a
<br>inside an inline tag (item 2).
- A cap on a name's length. Partly.
MAX_NAME_WORDS= 8 bounds a run of words inSOURCE_NAMEandITEM.- I timed every reader on 100 KB inputs: runs of capitals, of spaces, newlines and non-breaking spaces, of commas, list words and "and" pairs; one long word; possessives, "per" and "göre" runs.
attributedNamesanddropsNametake 35 ms or less.attributableSourceson a 100 KB page takes 10–90 ms and grows linearly with the page. - A dotted name still isn't bounded (item 1).
- "göre" before "en". Done. Only "daha" is skipped, and the test is flipped.
nameStartand a name's last word. Done, a bit narrower than asked:- the last word stays when it's an "-ly" word or a capitalised role ("Grammarly", "Coach");
- "Who says…", "Most said…" and "Our CEO said that…" are left alone.
- "According to Grammarly" becomes "According to [source]" in a rewrite, and is known in a Fix when the page cites it.
- Smaller reads. Partly.
- "per" by the page's language.
rulesLanguageis the CMS send's old expression, so the send reads the same language as before in every case.- Fix and Start call
draftLanguagethe same way, withrulesnow selected. - A draft's own Language rule works. My rules are read without the brand's kind of site (item 3).
- "states" and "claims" after a count. Done mid-sentence: "all 50 US states that", "most US states that" and "the 48 contiguous US states that" aren't read. Two loose ends are in item 4.
- "per" by the page's language.
- Blocks read line by line. Done.
- #1537's own round-31 follow-ups (product sentences, the possessive in the placeholder, Turkish and German) are left for the next PR, as you said.
Before merge:
- Bound the work on a dotted name (
server/src/lib/content-agent.js:336).- The two alternatives of
NAME_DOTcan both take the same dot: one after a single capital that is also followed by a letter, as in a run of initials. - When a pattern then fails, each such dot is tried both ways, so the time doubles with every dot. The cap on words doesn't help, since the run is one word.
- This reaches
SOURCE_NAME,ITEMand both "göre" names. So it reaches the page read at Fix and Start, the list check and a rewrite's placeholders. - Fix: let the second alternative take only a dot the first doesn't:
const NAME_DOT = String.raw`\.(?=[\p{L}\p{N}])|(?<=(?:^|[^\p{L}\p{N}]|\.)\p{Lu})\.(?![\p{L}\p{N}])`;
- With it, the dotted cases in the tests read the same: "U.S Census", "U.S. Census Bureau", "Node.js", "Gartner. The plan". So do "J.D. Power", "Per the U.N." and "U.S.'e göre".
- A run of 20,000 initials reads in about 13 ms.
- Add a speed test with a long "U.S.U.S.…" run beside the one for a run of capitals.
- The two alternatives of
Low, follow-up:
2. A <br> inside a bold or a link doesn't end a line (server/src/lib/content-people.js:659-665, inlineText in editLines).
walkends a line at a<br>, butinlineTextsteps over one. Some results:<p><strong>Forecasting basics<br>According to Zapier, …</strong></p>reads "basicsAccording", and the insert is kept.- In
<em>, "…according to Gartner.
Most teams…" reads "Gartner.Most", and the insert is dropped on a page that cites Gartner. - Bullets written as
<strong>ChatGPT<br>Gemini<br>Claude</strong>lose their names, and the change is dropped. - The page read has the same gap.
- Fix: end the run at a
<br>there too, e.g. return a break marker thatwalksplits the run on.
- My rules are read without the brand's kind of site (
server/src/lib/content-language.js:39-44).- Since 00227,
content_rule_setsis keyed by(organization_id, site_type, page_type), and 00227 copied each earlier set to all three kinds. - For those workspaces
.maybeSingle()finds three rows and errors. Fix and Start then log a warning and read the brand's language, as before this PR. - A workspace with a set saved for another kind only gets that kind's Language rule.
- The editor reads the brand's kind (
getMyRuleSets:.eq('site_type', brandSiteType(brand))). The test's mock returns one row, so it passes. - Fix: filter by
siteTypeOf({ siteType, industry, shoppingModeEnabled })fromcontent-page-types.js. Fix and Start already select those columns. - The CMS send's
myRuleSets(content-delivery.js:440-447) had the same gap before this PR: it keeps whichever kind's row comes last. The same filter fixes it.brandForwould then needsite_typeandshopping_mode_enabled.
- Since 00227,
- "states" and "claims" (
server/src/lib/content-agent.js:360-363).- At a sentence's start, the count is read as part of the name.
- "Most US states that allow it…" reads "Most US", and a rewrite writes "Most [source] states that…".
- "Every FDA states that…" reads the same way.
- "Southern states that…" and "New England states that…" are still read too. The test has New England only after "all 50".
- Fix: add the count words (All, Most, Many, Some, Several, Both, Every) to the name's negative lookahead in this pattern.
- The lowercase words after a count let a claim through. "In some cases Gartner states that…" and "For many years Gartner claims that…" aren't read.
- Fix: allow those words only after a number or "all" ("the 48 contiguous", "all the").
- At a sentence's start, the count is read as part of the name.
…als reads in linear time (review) Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Done (38dc169):
Your low follow-ups 2–4 (a Checks: server format and lint clean; 224 test files, 2,806 passed, 3 skipped. |
…rules by the brand's kind of site (Fix, Start and the CMS send), and read "states"/"claims" after a count at a sentence's start as nouns but small words before a source as a claim (review follow-ups of ansvisor#1537) Co-Authored-By: Claude Opus 5.5 <[email protected]>
gkhngyk
left a comment
There was a problem hiding this comment.
Looks good.
What I checked:
- Round 32's before-merge item: done (38dc169).
NAME_DOT's second alternative now takes only a dot that no letter or digit follows, so a dot is read one way only, and a run of initials is read in linear time. - The test runs 10,000 "U.S." through
addsAttribution,dropsNameandplaceholderAttributionswithin 500 ms, and checks the dotted names read as before: "U.S Census", "U.S. Census Bureau", "J.D. Power", "per the U.N." and "U.S.'e göre". - Nothing else changed in the commit:
content-agent.js(the pattern and its comment) and its test. - Merge. It goes in through a temp base on #1526's old head, as the squash needs: clean, and the combined tree with #1544, #1545 and the CE-017 chain passes server and web tests, tsc, lint, Prettier and the schema build.
- Round 32's low follow-ups 2–4 are in #1544.
…wn name, keep the possessive out of the placeholder, and read more Turkish and German forms (review follow-ups of #1537) (#1544) * fix(content): read a Length's reach from what a rewrite keeps, the headings' answers and what the last rewrite came to, and offer a Length it can reach Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(content): count the last rewrite only for the Length it was asked for, keep its numbers on the row (00285), and read the floor's sections closer (pre-push review) Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(content): name kept blocks only when they alone miss the Length, and count the last rewrite only within its Length's band and the same kept text (pre-push review) Co-Authored-By: Claude Opus 5.5 <[email protected]> * feat(content): cut a page rewrite that came well past its Length with one more pass Co-Authored-By: Claude Opus 5.5 <[email protected]> * feat(content): say when a shortening rewrite came out longer, and offer to rewrite the cited passages too when they hold the Length out of reach Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(content): take a cut only when restoreKept can put every kept line back, release an unused hold, keep a cited-too miss as evidence, and offer it only when cited passages hold the Length (pre-push review) Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(content): leave rules held by quoted passages to the person, so the agent and Next step move on, and count open rules as the Rules tab does Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(content): read a sentence rule held by quoted passages as the rules read the page, keep the Length's own words, and wait for the passages before dropping skips (pre-push review) Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(content): head the agent card with the result waiting for a decision, not the next step, and say how many placeholders it leaves to fill Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(content): count placeholders in list items written without paragraphs, and read a rewrite's once, not on every key (pre-push review) Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(content): read how an agent run ended when its answer is lost, say why a run left nothing, and show a failed last run on the card Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(content): keep why a run left nothing on its row, read its row by id and kind, not by clocks, and clear a failed last run once another starts (pre-push review) Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(content): check the agent's changes and a page rewrite against the rules before they're accepted, and say which rule met now one would break Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(content): check Accept all as it takes the changes, against the page as it is now, and count a rewrite's Length as its own line reads it (pre-push review) Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(content): keep no agent change that gives a claim to a source it wasn't given or drops a name a passage has Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(content): read a dropped name only in a list, check inserts too, give claims only to sources the page or its input names, and put a rewrite's as a placeholder (pre-push review) Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(content): count the rules and a rewrite's characters the way the editor shows them, and hold the rules chip until its count stands Co-Authored-By: Claude Opus 5.5 <[email protected]> * test(content): cover the rules chip holding its count, a rewrite's characters as the toolbar counts them, and the run's rule count Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(content): show the rewrite's toolbar counts in Compare too, wait for the brief and catalog before the rules' count, hold the panel's counts with it, and read the shown rewrite's Length by the editor's count (pre-push review) Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(content): restore once for two quick clicks, set aside the agent's open suggestions for the page before, and drop a batch's card once the page no longer has it Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(content): keep the agent's card while a suggestion is open, so one left open never holds the next run out of sight Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(content): close the agent's card on a restore, keep its open suggestions when they can't be set aside, and hold History while the agent works or a decision saves (pre-push review) Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(content): move the agent's waiting page while it works: its tile, a sweep on the step under way, a line on what it does, and the page drawn in Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(content): keep the waiting page's lines short enough for one line, true without an outline, and silent on rules or sources read none of; even step spacing; steadier tests (pre-push review) Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(content): show a live page's Start on the agent's waiting page, which runs as a Fix, with its steps and Stop Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(content): test that a new page's rewrite still shows its run and a Start's write doesn't stand in for it; the rewrite prop says what it reads (pre-push review) Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(content): read what the last rewrite came to by the editor's count once it's decided too, not only while it's shown Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(content): the last rewrite's action tests read its page too; comments say when it's read and who counts it (pre-push review) Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(content): end a source's or a list item's name at its sentence; read "per" only as an attribution, "claims" and "states" only before "that", and "göre" not as a comparison; keep a change that keeps every name worded or cased another way, or as bullets; know a source by its possessive, never its last word alone; let the prompts name Your input as a source (review) Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(content): know a source named after a role or an adverb ("CEO Jane Doe", "Recently Gartner"), keep a sentence's first word out of a placeholder, read "per" on English pages only, read "U.S." as one name, and start a name only at a word's start (pre-push review) Co-Authored-By: Claude Opus 5.5 <[email protected]> * test(content): time the long run of capitals with Date.now, as lint knows it Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(content): read a rewrite's attributions line by line in its text (a linked name, an entity), read more wordings ("As X notes", "a report by X", "data from X shows", "X'ın raporuna göre", "laut einer Studie von X"), read two names shaped as brands and "&" as a list, and let a change for a banned word drop only that item (#1520 review follow-ups) Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(content): read "As X notes," only before a comma or "that", "a report by X" only as a claim's source, "data from X shows" only before "that" or a figure, "laut … von X" only with "von", two names as a list only when one is camel-cased; drop a link that became the placeholder, end a line at a <br>, and let a banned word go without the name beside it (pre-push review) Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(content): read an insert's and a split replace's blocks with a space between them, cap a source's name at eight words, read "en" after "göre" as the source's claim, never skip a name's last word, and read "per" and "states" as the page's language and grammar have them (review of #1520) Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(content): read a change line by line as the guards do, read the page's language from its rules or My rules as the CMS send does, keep a name's last word only for an -ly word or a capitalised role, and read "states"/"claims" as nouns after a count but a year before a source (pre-push review) Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(content): read no product sentence as a claim (a comma after "from X" only after "according to", "in" or "per"; a tool's report "shows" only before "that" or a figure), know the brand's own name, keep the possessive out of the placeholder, and read more Turkish and German forms (review follow-ups of #1537) Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(content): read a Turkish report without its ending only mid-sentence or for a name-shaped one, skip German nouns before "zufolge", keep acronyms and the people guard as they were, cut only a lowercase possessive, and hold the comma form to a sentence's "In" (pre-push review) Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(content): take each dot of a name one way only, so a run of initials reads in linear time (review) Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(content): end a line at a break inside a bold or a link, read My rules by the brand's kind of site (Fix, Start and the CMS send), and read "states"/"claims" after a count at a sentence's start as nouns but small words before a source as a claim (review follow-ups of #1537) Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(content): read a long run of spaces in linear time, and a claim with a short aside after "a report by X" (review) Co-Authored-By: Claude Opus 5.5 <[email protected]> * test(content): time the long runs with Date.now, as the server's lint knows no performance global Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: Cihan <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
Summary
Follow-ups from the review of #1520 (item 4 and the lists). Stacked on #1526, the tip of the #1514–#1526 chain. This PR's own change is its commit after #1526's branch. Server only.
gkhngyk left these for a follow-up on #1520. All of them are here:
guardPeopleInHtml's line reading is now its own helper,editLines($, editsFor)in content-people.js: each line's text nodes and inline tags read as one, with edits put back node by node. Its people guard uses it unchanged.placeholderAttributionsInHtmluses the same helper. A name linked to its page ("According to Zapier, …") is now read, and an entity is read as its character:AT&T→ "[source]", never "[source];T".content-writer.js) uses it.bannedWordsOfreads the rule's words from the detail the editor sends ("aim: seamless, leverage · now: 2 found",useRuleDescriber), never the count alone, and the agent and the writer pass them on. Without the rule's words, it works as before.<br>ends a line, so "GartnerThe plan" keeps its "The". The people guard reads it the same way.
Left out on purpose: "Zapier ranks / lists …" from the review's list. The brand's own product does that on its own pages ("Ansvisor lists your prompts"), and the brand isn't among the sources a claim may be given to, so it would read as a new attribution there.
Related issue
Follow-ups to #1520 (review 2026-10-26, item 4 and the lists).
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-people.test.js src/lib/content-writer.test.js src/lib/no-fabrication.test.jsChecklist
feature/,fix/,chore/,docs/) — see CONTRIBUTING.mdyarn lintpasses (run fromweb/): no web changesyarn typecheckpasses (run fromweb/): no web changesyarn format:checkpasses (run fromweb/): no web changesServer:
npm run format,npm run lint(clean) andnpm test(2,767 passed, 1 skipped as on main).Tests:
bannedWordsOf, and a banned item that may go while others may not;<br>;A pre-push review ran; its findings are fixed in the second commit (the narrower wordings, camel-cased pairs, the link,
<br>, the banned word beside a name).🤖 Generated with Claude Code