Skip to content

Let sites set their own site name; prepare 2.2.0 - #5

Merged
chorta merged 1 commit into
mainfrom
claude/chrome-site-name-rules-b182c6
Sep 23, 2026
Merged

chorta merged 1 commit into
mainfrom
claude/chrome-site-name-rules-b182c6

Conversation

@chorta

@chorta chorta commented Sep 23, 2026

Copy link
Copy Markdown
Contributor

Why

Changing a site's name in the title band failed verify, because the golden baseline pins the region's text:

<a href="index.html" class="title-header title-header-large">Decorator V5</a>
<a href="index.html" class="title-header title-header-short">V5</a>

The site name belongs to the site, so every rename needing a human --accept was the wrong default.

What changed

Gate (checks/, contracts/)

  • New region option ignoreTextOf. The site-title region sets ignoreTextOf: ["a.title-header"]. Tier 2 drops only the text inside those links. Their elements, classes and href, and the rest of the band (including a.title-logo), stay pinned. An added <span>/<img> or a changed href still fails.
  • Tier 1 still compares the text, so the name must match on every page.
  • New tier 3 requirement type hasText. site-title.branding now requires exactly one long and one short title link, each non-empty. --accept cannot clear this.
  • Tier 2 now re-canonicalizes the recorded golden tree under the current region options instead of trusting its stored hash. Goldens accepted with 2.1.0 keep passing after upgrade, and no project has to re-run --accept. A test covers this.
  • Schemas are updated for ignoreTextOf and hasText.

Rules and docs

  • rules/00-canvas.md has a new section: "The site name is the one piece of chrome text you may change." Agents change only the text, on every page (or in the nav/header data file), and always propose a short form for the link shown below 480px, even when only a long name was given ("Decorator V5" → "V5", roughly 12 characters max).
  • The same guidance is in the skill, protected-regions.md, canvas-contract.md, checks/README.md and the user guide. Compiled rule files and library/tritonai/ are regenerated.

Release

  • Version 2.2.0 in package.json and .claude-plugin/plugin.json, with a CHANGELOG.md entry.

Reviewer notes

  • The "~12 characters" guidance for the short name is an estimate based on base.css (the short link shows at max-width: 479px and is 20px uppercase at ≤360px), not a measured limit.
  • After merge, publish a GitHub release tagged v2.2.0 to trigger the npm publish.

Testing

npm test: compile check, library check, and 122 tests passing. The 9 new tests cover a rename on every page, a mismatch between pages, an element added inside a title link, an href change, an emptied link, and the 2.1.0 golden migration.

🤖 Generated with Claude Code

Renaming the site in the title band failed verify at tier 2, so every
rename needed a human --accept. The site-title region now declares
ignoreTextOf: ["a.title-header"], which drops only the text inside the two
title links before the golden comparison and keeps their elements, classes,
and href pinned. Tier 1 still compares the text across pages, and a new
tier 3 hasText requirement keeps either link from being emptied.

Tier 2 now re-canonicalizes the recorded golden tree under the current
region options, so goldens accepted with 2.1.0 keep passing after upgrade.

Rules, skill, and user guide tell agents to change only the text, on every
page, and to always propose a short form for the link shown below 480px.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@chorta
chorta merged commit 0b58a6a into main Sep 23, 2026
1 check passed
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.

1 participant