Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .claude-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ucsd-decorator",
"version": "2.1.0",
"version": "2.2.0",
"license": "MIT",
"description": "Build and edit UC San Diego web pages on the Decorator 5 design system without damaging the shared page chrome. Provides one writable canvas, a pinned source of truth for markup, and a CI-checkable chrome contract.",
"author": {
Expand Down
35 changes: 34 additions & 1 deletion .cursorrules
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,45 @@ All new content, components, markup, and application logic go inside the canvas.

**Chrome is not yours to edit.** That means the header, the title band, the
`#uc-emergency` container, the desktop navbar, the mobile offcanvas drawer, both
search forms, the footer, and any embedded campus widget.
search forms, the footer, and any embedded campus widget. The one exception is
the wording of the site name in the title band, below.

If a task appears to require a chrome change: **stop and say so.** Name the
region, explain why the task seems to need it, and let a human decide. Do not
reshape the shell so a content change fits.

### The site name is the one piece of chrome text you may change

The title band carries the site's own name twice — a long form for tablet and
desktop, and a short form that replaces it below 480px:

```html
<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>
```

When asked to change the site name or title, change the **text** of these two
links and nothing else. Keep both elements, their classes, and their `href`.
Do not touch `a.title-logo` — its destination is fixed at
`https://www.ucsd.edu` on every Decorator site — and do not add markup inside
either link: no `<span>`, image, icon, or inline style.

**Always propose the short form.** If the request names only the long title,
suggest a short one and say you did. The short form renders uppercase, with
letter spacing, at 20px on the smallest phones, so keep it to a word or an
acronym — roughly a dozen characters at most. "Decorator V5" becomes "V5";
"Division of Physical Sciences" becomes "Physical Sciences" or "DPS". Never
leave it as the old site's name, and never leave it empty.

Change it on **every page**, identically. If the project builds its header
from a data file, edit the data file, not the rendered markup.

`verify` is built for this: tier 2 ignores the text of `a.title-header`, so
no `--accept` is needed. Tier 1 still fails if one page's name differs from
another's, and tier 3 fails if either link is left empty. Any other change in
the title band — an `href`, a class, an added element — is still a chrome
edit, and is still not yours to make.

### The chrome integrity gate is not yours to satisfy

A separate automated check — `verify` (`checks/chrome-contract.mjs`, or
Expand Down
35 changes: 34 additions & 1 deletion .github/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,45 @@ All new content, components, markup, and application logic go inside the canvas.

**Chrome is not yours to edit.** That means the header, the title band, the
`#uc-emergency` container, the desktop navbar, the mobile offcanvas drawer, both
search forms, the footer, and any embedded campus widget.
search forms, the footer, and any embedded campus widget. The one exception is
the wording of the site name in the title band, below.

If a task appears to require a chrome change: **stop and say so.** Name the
region, explain why the task seems to need it, and let a human decide. Do not
reshape the shell so a content change fits.

### The site name is the one piece of chrome text you may change

The title band carries the site's own name twice — a long form for tablet and
desktop, and a short form that replaces it below 480px:

```html
<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>
```

When asked to change the site name or title, change the **text** of these two
links and nothing else. Keep both elements, their classes, and their `href`.
Do not touch `a.title-logo` — its destination is fixed at
`https://www.ucsd.edu` on every Decorator site — and do not add markup inside
either link: no `<span>`, image, icon, or inline style.

**Always propose the short form.** If the request names only the long title,
suggest a short one and say you did. The short form renders uppercase, with
letter spacing, at 20px on the smallest phones, so keep it to a word or an
acronym — roughly a dozen characters at most. "Decorator V5" becomes "V5";
"Division of Physical Sciences" becomes "Physical Sciences" or "DPS". Never
leave it as the old site's name, and never leave it empty.

Change it on **every page**, identically. If the project builds its header
from a data file, edit the data file, not the rendered markup.

`verify` is built for this: tier 2 ignores the text of `a.title-header`, so
no `--accept` is needed. Tier 1 still fails if one page's name differs from
another's, and tier 3 fails if either link is left empty. Any other change in
the title band — an `href`, a class, an added element — is still a chrome
edit, and is still not yours to make.

### The chrome integrity gate is not yours to satisfy

A separate automated check — `verify` (`checks/chrome-contract.mjs`, or
Expand Down
35 changes: 34 additions & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,45 @@ All new content, components, markup, and application logic go inside the canvas.

**Chrome is not yours to edit.** That means the header, the title band, the
`#uc-emergency` container, the desktop navbar, the mobile offcanvas drawer, both
search forms, the footer, and any embedded campus widget.
search forms, the footer, and any embedded campus widget. The one exception is
the wording of the site name in the title band, below.

If a task appears to require a chrome change: **stop and say so.** Name the
region, explain why the task seems to need it, and let a human decide. Do not
reshape the shell so a content change fits.

### The site name is the one piece of chrome text you may change

The title band carries the site's own name twice — a long form for tablet and
desktop, and a short form that replaces it below 480px:

```html
<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>
```

When asked to change the site name or title, change the **text** of these two
links and nothing else. Keep both elements, their classes, and their `href`.
Do not touch `a.title-logo` — its destination is fixed at
`https://www.ucsd.edu` on every Decorator site — and do not add markup inside
either link: no `<span>`, image, icon, or inline style.

**Always propose the short form.** If the request names only the long title,
suggest a short one and say you did. The short form renders uppercase, with
letter spacing, at 20px on the smallest phones, so keep it to a word or an
acronym — roughly a dozen characters at most. "Decorator V5" becomes "V5";
"Division of Physical Sciences" becomes "Physical Sciences" or "DPS". Never
leave it as the old site's name, and never leave it empty.

Change it on **every page**, identically. If the project builds its header
from a data file, edit the data file, not the rendered markup.

`verify` is built for this: tier 2 ignores the text of `a.title-header`, so
no `--accept` is needed. Tier 1 still fails if one page's name differs from
another's, and tier 3 fails if either link is left empty. Any other change in
the title band — an `href`, a class, an added element — is still a chrome
edit, and is still not yours to make.

### The chrome integrity gate is not yours to satisfy

A separate automated check — `verify` (`checks/chrome-contract.mjs`, or
Expand Down
36 changes: 36 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,41 @@
# Changelog

## 2.2.0

### Changed

- **Sites can change their own site name.** Renaming the site — the text of
`a.title-header.title-header-large` and `a.title-header.title-header-short`
in the title band — used to fail `verify` at tier 2, so every rename needed
a human `--accept`. The `site-title` region now declares
`ignoreTextOf: ["a.title-header"]`: tier 2 drops the text inside those two
links and still pins their elements, classes, and `href`, and everything
else in the band, `a.title-logo` included. Tier 1 still compares the text,
so the name must match on every page.
- **Rule: "The site name is the one piece of chrome text you may change"** in
`rules/00-canvas.md`, with matching guidance in the skill and in
`references/protected-regions.md`. Agents change only the text, on every
page, and always propose a short form for the link that shows below 480px —
a word or an acronym ("Decorator V5" → "V5") — even when only the long name
was given.

### Added

- **`ignoreTextOf` on a chrome region** (`contracts/chrome-regions.json` and
its schema, and `chrome-regions.local.json` overlays). Like
`ignoreChildrenOf`, but drops only text, so an element added inside a
matching node still fails tier 2.
- **`hasText` requirement in tier 3 rules.** `site-title.branding` now
requires exactly one long and one short title link, each with text. An
emptied site name fails, and `--accept` cannot clear it.

### Fixed

- Tier 2 now re-canonicalizes the golden's recorded tree under the current
region options instead of comparing its stored hash. A golden accepted with
2.1.0 or earlier keeps passing after the upgrade, and its recorded site name
no longer pins the new one. No project needs to re-run `--accept`.

## 2.1.0

### Added
Expand Down
35 changes: 34 additions & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,45 @@ All new content, components, markup, and application logic go inside the canvas.

**Chrome is not yours to edit.** That means the header, the title band, the
`#uc-emergency` container, the desktop navbar, the mobile offcanvas drawer, both
search forms, the footer, and any embedded campus widget.
search forms, the footer, and any embedded campus widget. The one exception is
the wording of the site name in the title band, below.

If a task appears to require a chrome change: **stop and say so.** Name the
region, explain why the task seems to need it, and let a human decide. Do not
reshape the shell so a content change fits.

### The site name is the one piece of chrome text you may change

The title band carries the site's own name twice — a long form for tablet and
desktop, and a short form that replaces it below 480px:

```html
<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>
```

When asked to change the site name or title, change the **text** of these two
links and nothing else. Keep both elements, their classes, and their `href`.
Do not touch `a.title-logo` — its destination is fixed at
`https://www.ucsd.edu` on every Decorator site — and do not add markup inside
either link: no `<span>`, image, icon, or inline style.

**Always propose the short form.** If the request names only the long title,
suggest a short one and say you did. The short form renders uppercase, with
letter spacing, at 20px on the smallest phones, so keep it to a word or an
acronym — roughly a dozen characters at most. "Decorator V5" becomes "V5";
"Division of Physical Sciences" becomes "Physical Sciences" or "DPS". Never
leave it as the old site's name, and never leave it empty.

Change it on **every page**, identically. If the project builds its header
from a data file, edit the data file, not the rendered markup.

`verify` is built for this: tier 2 ignores the text of `a.title-header`, so
no `--accept` is needed. Tier 1 still fails if one page's name differs from
another's, and tier 3 fails if either link is left empty. Any other change in
the title band — an `href`, a class, an added element — is still a chrome
edit, and is still not yours to make.

### The chrome integrity gate is not yours to satisfy

A separate automated check — `verify` (`checks/chrome-contract.mjs`, or
Expand Down
11 changes: 11 additions & 0 deletions checks/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,17 @@ project added its first one. `contracts/chrome-regions.json` already declares
`ignoreChildrenOf` for the drawer's and navbar's nav-link lists, so this is
handled by default rather than something each project has to discover.

**Drop site-owned text, not the markup around it.** The site name in the title
band is the site's to set, but the two `a.title-header` links carrying it are
chrome. The `site-title` region declares `ignoreTextOf: ["a.title-header"]`:
tier 2 drops the text inside those links and keeps everything else, so a
rename passes without `--accept` while an added `<span>` or a changed `href`
still fails. Tier 1 compares the text, so every page must agree, and tier 3's
`hasText` requirement keeps either link from being emptied. Tier 2 also
re-canonicalizes the recorded tree under the current region options instead
of trusting its stored hash, so a golden accepted before a region gained an
ignore option keeps passing.

**Exclude routes that carry no chrome.** Standalone pages (a presentation deck,
a bare redirect) will otherwise report total chrome loss. `discoverRoutes`
only walks `*.html`; a route with no chrome markup at all needs to live
Expand Down
Loading
Loading