Skip to content

feat: ship an agent harness and split the docs for humans and AI agents - #210

Merged
tenphi merged 27 commits into
mainfrom
claude/ecstatic-cori-peq9hk
Nov 23, 2026
Merged

tenphi merged 27 commits into
mainfrom
claude/ecstatic-cori-peq9hk

Conversation

@tenphi

@tenphi tenphi commented Nov 21, 2026 •

Copy link
Copy Markdown
Owner

Summary

Cookbook now ships an agent harness for harnesspm, uses harnesspm itself, and splits its docs into For humans and For AI agents, as UI Kit and harnesspm do.

  • 🧩 @tenphi/cookbook passes on the Tasty, Glaze and Tasty lint harnesses, adapted so their tools read a site's own theme.
  • 🛠️ This repository uses harnesspm, with those harnesses trusted and patched for engine work.
  • 📚 The docs have two tabs. Humans get short pages with prompts and decisions; agents get a start page, every guide and the reference.
  • 🐛 Cookbook issues found on the way are fixed here; upstream issues are filed, and the straightforward ones are fixed, released and used here (links below).

🧩 Agent harness in @tenphi/cookbook

packages/facade/harness/ (plugin cookbook):

Unit What it does
extends @tenphi/tasty, @tenphi/glaze, @tenphi/eslint-plugin-tasty. They became facade dependencies, at the versions the renderer already installs, because harnesspm resolves extends from the facade's folder.
cookbook:rules/usage One short always-on rule (1.1 KiB): site files, styling surfaces, checking a site.
cookbook:docs The packaged docs, indexed by a new hand-written docs/llms.txt (the Tasty convention). It also helps agents without harnesspm.
Patches Glaze "Where colors come from" / "Checking a theme": colors live in theme.brand and theme.palette, checked with cookbook doctor and glaze:inspect. Tasty "Checking styles": tasty:styles --setup with Cookbook's theme. Lint "After you change styles": the rules need a tasty.config.ts built with createValidationConfig(docs.theme), so they know Cookbook's helpers and the site's palette names (without it they check nothing in a site, and tasty-lint:check notes such files when you name them); they never read theme.styles, theme.customStyles or theme.recipes in docs.config.ts, so those go through tasty:styles. Each patch keeps the upstream generic steps and guardrails and marks the steps for a Cookbook site.
replace Glaze's glaze-theme skill → harness/skills/glaze-theme/: the same skill name, with the steps for a site's theme.brand and theme.palette (no glaze() call, no export step, checks with cookbook doctor and the theme module). Needs harnesspm 0.10.1 or later. In a monorepo where another workspace gets Glaze's harness without Cookbook (directly or through a package such as UI Kit), harnesspm keeps Glaze's own skill and warns; the patched Glaze rule then points the site's agent to Cookbook's SKILL.md. harnesspm counts the skill as Cookbook's file, so Claude Code runs it without asking only when @tenphi/cookbook is trusted too; the docs say so.
dev.harnesspm/theme.mjs Loads a site's docs.config.ts like a build does: configures Tasty on import (for tasty:styles --setup) and exports the palette as one Glaze theme (for glaze:inspect). It also declares the names Cookbook's components define on their own roots, such as #callout-text, so tasty:styles does not report them as undefined. Without a docs.config.* in the current folder it says so on stderr.

To build the module without copying engine code:

  • @tenphi/docs exports createColorTheme(theme) (the Glaze part of resolveColorTheme, split out unchanged).
  • @tenphi/renderer exports configureTastyTheme(theme) (moved out of integration.ts unchanged) and declareComponentTokensForTools(), which adds the component names in COMPONENT_TOKENS to Tasty's global styles for agent tools only. A test keeps that list equal to the names the component style trees define; builds never call it, so shipped CSS does not change.

Checked in a real consumer built from the packed tarballs, with npx harnesspm init: the block lists Tasty, Glaze and lint "via @tenphi/cookbook", and with trust tasty:styles, glaze:inspect and tasty-lint:check all see the site's custom #note color, units, presets and states.

🛠️ harnesspm in this repository

  • @tenphi/harnesspm 0.10.1 dev dependency; pnpm install runs harnesspm sync (postinstall, as init writes it).
  • harnesspm.json trusts the three upstream packages (as UI Kit does) and patches their rules and Cookbook's own rule for work on this repository (harnesspm/patches/), so the workspaces never get consumer-only steps such as a validate script. It also gives the whole repository the facade's glaze-theme skill: packages/docs and packages/renderer use Glaze directly, so harnesspm would otherwise keep Glaze's skill and warn on every sync.
  • @tenphi/eslint-plugin-tasty moved to the pnpm catalog, so the root, renderer and facade can't drift apart.
  • Generated AGENTS.md blocks and CLAUDE.md imports in the five workspaces; harnesspm.lock.json.
  • CI: harnesspm sync --check after install, pnpm check:harness after build. The facade's prepack runs harnesspm check.
  • .agents/skills was a symlink to .claude/skills. It is now a folder with one link per skill, as in UI Kit, so a Windows checkout without symlinks still gives harnesspm a folder to link into.
  • Upstream versions with the fixes this PR needed: Tasty 3.19.2 (tasty:styles resolves --setup from the current folder and warns about undefined color and token names), Glaze 3.2.0 (glaze:inspect takes a package path since 3.1.1; its docs ship as plain Markdown in harness/docs/ since 3.2.0), eslint-plugin-tasty 1.21.3 (notes files with no styles; lints TypeScript 7 files without installing TypeScript 6; follows a site's lint config set up through @tenphi/cookbook/eslint-plugin or oxlint.config.mjs; the edit hook tells the agent when eslint is missing) and harnesspm 0.10.1 (check skips links in code samples; sync leaves out a built, git-ignored docs folder; replace works on skills; subfolder projects get correct git excludes; patches stay in the workspaces that use them).

📚 Docs: For humans / For AI agents

Tab Pages
For humans Home, Getting started (now opens with an "Ask your agent" prompt), Compare tools, Working examples, Ask your agent (new: prompts, what the agent does, what you decide), AI agents (rewritten: what your agent gets, optional harnesspm with the trust decision, agent-readable sites)
For AI agents For AI agents start page (new: what is installed, rules that always apply, the page for each task), Author, Customize (customization rules first), Extend, Publish, Maintain (with the new Agent harness guide), Reference
  • Translated home and getting-started pages (es, ru, ja, zh) get the same agent path and new tab labels.
  • The generated site's AGENTS.md starts agents at docs/agents.md and mentions harnesspm as an option; the upgrade skill runs harnesspm sync and sync --check in sites that use it.
  • README files get a "Coding agents" note.

🐛 Cookbook issues fixed here

  • The published llms.txt listed every page alphabetically by file, with translations mixed in. It now follows the default language's sidebar, as pages build it: a Documentation section for top-level items, one section per tab with items, each page under the tab that pages show for it, pages in sidebar order, then Other pages (translations, pages hidden from the sidebar). Tested on single-language sites, a root locale with a translation, a URL-prefixed default locale, and top-level items that overlap a tab. One defaultLocaleKey() helper now replaces the four copies of the default-locale fallback on main, and the new code uses it too.
  • A navigation tab whose items were all drafts, or empty, shifted the sidebar of every tab after it, so those tabs' pages showed another tab's sidebar or none (on main too). pageSidebar() now hides drafts in each group and keeps every group in its place. New navigation test; changeset sidebar-hidden-tab.
  • The lint setup in docs/custom-components.md could not run in a site from the project creator: typescript-eslint supports TypeScript below 6.1, and those sites use TypeScript 7. The guide now gives the .js/.mjs and oxlint paths for them.

⚖️ Entropy

From a focused Entropy review (per .claude/rules/entropy.md), updated after its findings were fixed:

Context Change level Why
@tenphi/cookbook package Slightly Increased A harness/ folder (a rule, three patches, one replacement skill, the theme module) and three direct dependencies that the renderer already installs at the same versions (now one catalog entry each). No new JS exports. Justified: consumers' agents get Cookbook's rule and tools that read their theme.
@tenphi/docs / @tenphi/renderer exports Slightly Increased createColorTheme() and configureTastyTheme() are code moved behind an export, unchanged; the harness module can only reach them through exports. declareComponentTokensForTools() adds one list of 51 names, kept honest by a test.
Consumer setup without harnesspm Neutral The generated AGENTS.md points at one start page and mentions harnesspm in one optional line.
Consumer setup with harnesspm Slightly Increased Install, init, trust, approve, tasty.config.ts. In return the Tasty and Glaze tools use the site's own tokens and palette.
Docs, agent-assisted readers Slightly Decreased One prompts page, one start page with a task table.
Docs, people configuring by hand Slightly Increased Every guide sits under "For AI agents". This is the split the task asked for.
Repository maintenance Moderately Increased harnesspm, a lock, generated blocks in five workspaces, four patches and one skill choice (no excludes), two CI steps, per-skill links, the hand-written docs/llms.txt (every new English page needs a line, which a test enforces), the component token list (a test enforces it too), and a longer root AGENTS.md. Justified by the request; AGENTS.md documents each part.
Published llms.txt, renderer maintainers Slightly Increased Sections come from pageSidebar(), localizedNavigation() and activeNavigationTab(), so the file matches what readers see without a second navigation model. Partly offset: one defaultLocaleKey() replaces the four copies of the locale fallback on main.
Published llms.txt, agents reading it Slightly Decreased Sections in sidebar order, under the tabs readers see; translations listed apart.

Exceptions: none. All upstream workarounds this PR needed along the way are gone, including the last one (tenphi/eslint-plugin-tasty#175): every fix is released and used here. The Yarn step to add eslint stays, because eslint is a required peer that Yarn does not install.

✅ Verification

Run locally (Linux, Node 22.23, pnpm 11.24):

  • ✅ format:check, lint (0 warnings), typecheck, test (incl. the new harness.test.ts and llms.txt tests), knip, check:boundaries, check:changelog, check:types
  • ✅ check:development, check:locales, check:theming, check:plugins, check:publishing-site, check:authoring, check:recipes
  • ✅ check:packages, check:publishing (publint + attw), check:install with npm (packed and generated) and pnpm (packed); it now also imports the harness module in the installed site and checks that it reads the site's own config
  • ✅ build:reference, reference budgets, cookbook doctor and check-build on the reference site
  • ✅ check:browser: 126 passed
  • ✅ harnesspm sync --check (with and without a build) and harnesspm check packages/facade
  • ✅ By hand: a site installed from the packed tarballs, npx harnesspm init, trust, then tasty:styles, glaze:inspect and tasty-lint:check through npx -y @tenphi/harnesspm run

After the upstream releases, I re-ran harnesspm sync --check, format, lint, typecheck, tests, knip, check:harness, check:types, check:theming, check:recipes, check:publishing-site, check:packages, check:publishing, the reference build, budgets and check-build, and check:install with npm and pnpm: all pass. The Glaze and lint releases change only their agent tools.

harnesspm 0.10.0 upgrade: format, lint, typecheck, 479 tests (one new: the replaced skill still exists upstream under its name), knip, check:harness, sync --check with and without a build (no warning now), harnesspm doctor, check:packages and check:install. By hand, a site in a docs-site/ subfolder of a git repository, installed from the packed tarballs with harnesspm 0.10.0: init links Cookbook's glaze-theme skill, git status lists only the files to commit, and after trust glaze:inspect reads the site's palette. In a consumer monorepo where another workspace uses Glaze directly, that workspace's help @tenphi/glaze and help @tenphi/tasty now show the generic steps, with Cookbook's steps marked for a site.

Upstream fixes (Tasty 3.19.2, eslint-plugin-tasty 1.21.2, harnesspm 0.10.1): format, lint, typecheck, 480 tests, knip, check:harness, sync --check, check:theming, check:changelog, check:packages, check:install, the reference build, budgets, doctor, check-build and check:browser (126) pass. By hand: with Cookbook's module, tasty:styles warns about #surfce and $gapp and stays quiet on valid names (#surface-2.5, #current, #clear, $margin-block-start); in an npm site from the creator on TypeScript 7.0.2, tasty-lint:check and the edit hook lint a .ts style module, and no nested TypeScript 6 is installed; in a consumer monorepo on harnesspm 0.10.1, the site's workspace gets Cookbook's patched rules, another Glaze workspace gets Glaze's own, and the pointer to Cookbook's SKILL.md resolves.

Component tokens: 482 tests (two new: the token list matches the style trees, and Tasty's own tasty:styles script stays quiet on #callout-text and $copy-button-size but warns on #surfce; the second fails without the fix), format, lint, typecheck, knip, check:boundaries, check:types, check:harness, sync --check, check:changelog, check:packages, check:install (it imports the module from the packed renderer), check:theming, the reference build (largest CSS unchanged, 182 497 bytes), budgets, doctor and check-build.

Merge with main and Glaze 3.2.0: format, lint, typecheck, 482 tests (the pack-docs test now checks the Markdown pages and the kept site link), knip, check:harness, sync --check, check:boundaries, check:changelog, check:types, the reference build (largest CSS unchanged, 182 497 bytes), budgets, doctor, check-build, check:theming, check:packages, check:install and check:browser (126) pass.

Rounds 14 and 15: format, lint, typecheck, 482 tests (the end-to-end token test fails on the old 32-name list and passes on the new one), knip, check:harness, sync --check, check:boundaries, check:types, check:packages, check:install, the reference build, budgets and check-build pass. By hand, in a Yarn 4 site and an npm site built from the packed tarballs: after yarn add -D eslint, the lint tool and the edit hook report a file's problems; with the guide's strict ESLint config, tasty-lint:check --strict reports what the site's ESLint reports.

Round 16: format, lint, typecheck, 482 tests (the end-to-end token test now also checks that $surface still warns; it fails on the previous build), knip, check:harness, sync --check, check:boundaries, check:types, check:packages, check:install, the reference build, budgets and check-build pass.

Round 17: a text-only change; format, the harness tests, check:harness and sync --check pass.

Round 18: a text-only change; format, the harness tests, check:harness and sync --check pass.

Round 19: a text-only change; format, the harness tests, check:harness and sync --check pass.

eslint-plugin-tasty 1.21.3: format, lint, typecheck, 482 tests, knip, check:harness, sync --check, check:changelog, check:packages and check:install pass; the lockfile and the harness resolve only 1.21.3.

CI passed all 12 jobs on each push so far, including the Windows, macOS and Yarn consumers. Each round's fixes also pass format, lint, typecheck, the full test suite, knip, check:harness, sync --check, the reference build (its llms.txt is unchanged), budgets, doctor, check-build, check:locales, check:publishing-site, check:development and check:packages.

🔗 Upstream issues

Repository Issue Status
harnesspm tenphi/harnesspm#55 — check reports links inside code samples as missing files ✅ Fixed in tenphi/harnesspm#60, released in 0.9.2, used here
harnesspm tenphi/harnesspm#57 — docs say approve turns the tools on, but trust already does ✅ Fixed in tenphi/harnesspm#60 (docs site)
Glaze tenphi/glaze#117 — glaze:inspect cannot take a module inside an installed package ✅ Fixed in tenphi/glaze#118, released in 3.1.1, used here
ESLint Tasty tenphi/eslint-plugin-tasty#167 — tasty-lint:check says "No problems" when it recognized no styles ✅ Fixed in tenphi/eslint-plugin-tasty#168, released in 1.21.1, used here
harnesspm tenphi/harnesspm#54 — a project harness whose docs folder is built and git-ignored makes the lock depend on whether a build ran ✅ Fixed in tenphi/harnesspm#63, released in 0.10.0, used here: the exclude is gone
harnesspm tenphi/harnesspm#56 — replace works on rules only, though the spec says any unit ✅ Fixed in tenphi/harnesspm#63, released in 0.10.0, used here: Cookbook replaces the glaze-theme skill
harnesspm tenphi/harnesspm#62 — a project in a subfolder of a git repository writes exclude patterns that miss its per-machine files ✅ Fixed in tenphi/harnesspm#63, released in 0.10.0, used here: the agent guide's note is gone
ESLint Tasty tenphi/eslint-plugin-tasty#171 — tasty-lint:check and the edit hook cannot lint .ts files in a TypeScript 7 project ✅ Fixed in tenphi/eslint-plugin-tasty#172, released in 1.21.2, used here: the TypeScript 7 advice and the nested TypeScript 6 copy are gone
harnesspm tenphi/harnesspm#65 — a package's patch and replace reach workspaces that do not depend on it ✅ Fixed in tenphi/harnesspm#66, released in 0.10.1, used here: the pointers to Glaze's own skill are gone
Tasty tenphi/tasty#473 — tasty:styles does not flag #color or $token names that the loaded config does not define ✅ Fixed in tenphi/tasty#476, released in 3.19.2, used here: the caveat is gone
ESLint Tasty tenphi/eslint-plugin-tasty#174 — the edit hook stays silent when eslint is missing, so an agent never learns its edits went unlinted ✅ Fixed in tenphi/eslint-plugin-tasty#176, released in 1.21.3, used here: the hook now tells the agent once per session
ESLint Tasty tenphi/eslint-plugin-tasty#175 — tasty-lint:check and the edit hook miss a lint config that loads the plugin through a re-export or an oxlint.config.mjs ✅ Fixed in tenphi/eslint-plugin-tasty#176, released in 1.21.3, used here: the --strict workaround is gone

Related: tenphi/harnesspm#52 (check judges docs by the tarball), fixed by the owner in 0.9.1. Tasty 3.19.0 resolved --setup from the project root; 3.19.1 fixed it, so this PR bumps Tasty instead of filing an issue.

🔁 Review rounds

After the first push, review rounds run until one finds nothing to fix; rounds 4 and 20 did. Each round: five independent reviewers (repository rules, Entropy, correctness, docs, a consumer agent's view from packed tarballs), then skeptics who try to refute every finding. Round 1 fixed the multilingual llms.txt, the TypeScript 7 lint path, lint config for the site's palette names, the approve step after upgrades with pinned trust, the "pin" wording, and the managed block's position in AGENTS.md (now at the top, as harnesspm status asks). Round 2 found only nits: llms.txt sections when top-level items overlap a tab, the hand-set-up snippet now starts at agents.md, the edit hook is Claude Code only, Yarn setup commands, the tasty:styles name check (filed as tenphi/tasty#473), and one fact repeated in two pages. In round 3 the correctness, rules and Entropy reviewers found nothing. The docs and consumer reviewers found five wording issues: -C and the theme module, sites that use configFile (they get the default theme, and the notice now says so), a second copy of the resolve-docs command, and two pointers in this repository's patches. Round 4 found nothing to fix: the correctness, rules and consumer reviewers found no problems, and the skeptics rejected the three remaining nits (a duplicated @tenphi/harnesspm range, a translated heading that still says "guide", and loose wording about where the rule text lives) as style.

Round 5 (after the harnesspm 0.10.0 upgrade) confirmed 8 findings in the new skill and its docs, all fixed: the skill's brand preview now uses glaze:inspect --color accent,focus (the glaze:color preview matched no Cookbook role); the docs say the replaced skill needs @tenphi/cookbook trusted to run without asking; Cookbook's patches and skill reach every workspace in a monorepo (filed as tenphi/harnesspm#65, so the text now marks site-only steps and points other Glaze code to Glaze's own skill); this repository's Glaze patch keeps only the skill's writing steps; and harnesspm before 0.10 warns rather than keeping Glaze's skill.

Round 6 confirmed 4 findings, all fixed: a sidebar bug on main (a tab with only drafts or no items shifted later tabs' sidebars; fixed with a test, see above); the facade Glaze patch now keeps Glaze's generic guardrails unscoped and writes npx harnesspm why; and the upgrade skill asks for approve when sync --check names a pinned package, because sync never lists @tenphi/cookbook, which has no tools. These fixes also pass check:browser (126) and check:development.

Rounds 7 and 8 found only nits, all fixed: this repository's Glaze patch says the skill's pointer to Glaze's own skill does not apply to palette.ts; the harnesspm#65 record in AGENTS.md lists that note; and the TypeScript 6 lint route names @typescript-eslint/parser too.

Round 9 found 2 nits, both fixed: docs/deployment.md now links straight to "Page text for readers and agents", and the install cost of the facade's lint-plugin dependency in npm sites on TypeScript 7 is recorded (also added to tenphi/eslint-plugin-tasty#171).

Round 10 found 1 nit, fixed: the lint patch and the agent guide now say that the rules never read theme.styles, theme.customStyles or theme.recipes in docs.config.ts (and doctor does not check their values), and point to tasty:styles and glaze:inspect --color for those objects.

Round 11 found 1 nit, fixed: that note now names theme.customStyles too. Round 12 found that harnesspm 0.10.1, released that day, made the monorepo text out of date; the upgrade below fixes it.

Upgrade to the upstream fixes: Tasty 3.19.2, eslint-plugin-tasty 1.21.2 and harnesspm 0.10.1 fix the last three open issues, so their workarounds are removed and no exceptions remain. Tasty 3.19.2 then reported component names such as #callout-text as undefined when an agent checked a theme.styles override; the theme module now declares them (a test runs Tasty's own tasty:styles script to check it).

Round 13 found 2 issues, fixed: the skill pointer now also covers a workspace that gets Glaze through another package, such as UI Kit, with npx harnesspm why as the check, and the agent guide says the lint tools need only tasty.config.ts.

Merge with main and Glaze 3.2.0: main brought the 0.33.2 release (#204) and eslint-plugin-tasty 1.21.2 (#212). The conflicts in package.json, packages/renderer/package.json and pnpm-lock.yaml keep main's versions plus this PR's catalog entries and harnesspm. main's changeset already announces the lint plugin bump, so this PR's changeset no longer repeats it. Glaze 3.2.0 ships its docs as plain Markdown in harness/docs/ instead of MDX in docs/, and each example now prints its code and a table of resolved colors. So pack-docs names each package's docs folder and keeps each Glaze page's "built from the Glaze site" link on the live page (it had become a link to the page itself). The customization guide no longer says Glaze's examples need the website. Glaze's rule and glaze-theme skill did not change, so the patches and the replaced skill stay as they are, and the skill's Glaze page names still resolve.

Round 14 (on 4bcc7e8): the correctness, rules, Entropy and docs reviewers found nothing. The consumer reviewer found 1 issue, fixed: the agent guide said the lint tool and edit hook need only tasty.config.ts, but they also need the eslint package, a peer of the lint plugin. npm and pnpm install it with Cookbook; Yarn 4 does not, so in a Yarn site tasty-lint:check stops and the edit hook lints nothing and says nothing. The guide and Cookbook's lint patch now tell Yarn sites to add eslint as a dev dependency. Checked in a Yarn 4 site built from the packed tarballs: after yarn add -D eslint, the tool and the hook both report the file's 3 problems. The silent hook is reported upstream as tenphi/eslint-plugin-tasty#174.

Round 15 (on ae48198): the Entropy reviewer found nothing, and the skeptics confirmed 4 issues, all fixed:

  • COMPONENT_TOKENS missed 19 names that Mermaid's style tree defines, because Prettier writes single-word keys without quotes and some names start with _ ($bg, $_line…). The test only matched quoted keys, so it passed, and tasty:styles still warned on those names. The test now matches quoted and unquoted keys, the list has all 51 names, and the end-to-end test checks $bg and $_line (it fails on the old list).
  • The lint tools find a site's own lint config only when it names @tenphi/eslint-plugin-tasty. A config set up as "Custom components" shows, through @tenphi/cookbook/eslint-plugin or oxlint.config.mjs, is not found, so they run the recommended rules and miss what a strict config reports. The lint patch and the agent guide now say so and send agents to --strict and the site's lint script. Checked in a site: the site's ESLint reports an unknown $card-gap; the tool says "No tasty/* problems (recommended rules)", and with --strict reports it. Filed upstream as tasty-lint:check and the edit hook miss a lint config that loads the plugin through a re-export or an oxlint.config.mjs eslint-plugin-tasty#175.
  • docs/llms.txt now points at Glaze's own docs index, which Glaze 3.2.0 ships, instead of its API reference, so an agent without harnesspm also finds "Designing a palette".
  • pack-docs no longer maps GitHub fallback links to Glaze's harness/docs/, which Glaze builds when it packs and does not commit; at the release tag the sources are in docs/. No current link used that path.

Round 16 (on b37fa3b): the rules, Entropy and consumer reviewers found nothing; the skeptics confirmed 2 nits from the correctness and docs reviewers, both fixed in 886198a:

  • Mermaid's $surface and $border share their names with the palette colors #surface and #border. Declaring them hid a $surface typed for #surface in any override, which renders a transparent fill. declareComponentTokensForTools() now skips any $name whose #name is in COOKBOOK_PALETTE_NAMES, so the list stays complete and the tool keeps reporting those two. The end-to-end test checks that $surface still warns (it fails on the previous build).
  • The lint note said "run the site's lint script", but neither the creator nor "Custom components" adds one. It now names the command: the site's lint script if it has one, else the eslint or oxlint --config oxlint.config.mjs command from that page (a bare oxlint skips oxlint.config.mjs).

Round 17 (on 886198a): the correctness reviewer found nothing; the skeptics confirmed 2 wording nits, both fixed in 7fbd88a: the AGENTS.md record of the #175 workaround still said "the site's lint script", and Cookbook's lint patch said tasty-lint:check notes every file without styles, while it notes only the files you name (a folder run stays quiet). The patch now says so and asks agents to name the files they changed, as the agent guide already did.

Round 18 (on 7fbd88a): the correctness, rules, Entropy and docs reviewers found nothing; the skeptics confirmed 1 nit from the consumer reviewer, fixed in a1c5a2d: Cookbook's always-on Glaze patch said a new palette role is a declaration "with base, tone and contrast". Read literally, a decorative fill gets a contrast floor too, and Glaze then moves it to a mid-tone that passes every check. The patch now matches the glaze-theme skill and the theme docs: an absolute tone or a base with a tone step, and a contrast floor only when the color must be read.

Round 19 (on a1c5a2d): the correctness, rules, Entropy and consumer reviewers found nothing; the skeptics confirmed 1 nit from the docs reviewer, fixed in d3fa355: round 18's wording offered an absolute tone or a base and then a contrast floor, so an agent could write a floor without a base, which Glaze 3.2.0 rejects ("contrast" without "base"). A color that must be read now names its base and gets a floor against it. Checked against the built @tenphi/docs: an absolute tone, a base with a step, and both readable forms resolve; a floor without a base fails.

Round 20 found nothing to fix (on d3fa355): the correctness, rules, docs and consumer reviewers found no problems, and the Entropy review passed with the table above unchanged. The skeptics rejected the two remaining candidates as style: the always-on Glaze patch summarizes the skill's declaration rules (accurate, and Glaze's own rule does the same), and a request to say that component-root names such as #callout-text have values only inside their component (the patch already scopes them, and custom properties inherit).

eslint-plugin-tasty 1.21.3: a separate session fixed tenphi/eslint-plugin-tasty#174 and #175 in tenphi/eslint-plugin-tasty#176. The tools now treat the packages in importSources of tasty.config.* as possible re-exporters of the plugin, and find oxlint.config.mjs. Without eslint, the edit hook tells the agent once per session, through PostToolUse additionalContext, without blocking. Cookbook's validation config already lists @tenphi/cookbook/styling in importSources, so sites need no change. Reviewed with the PR build in a Yarn site set up as "Custom components" shows: the strict ESLint config through @tenphi/cookbook/eslint-plugin is followed without --strict, the edit hook reports the same problem, oxlint.config.mjs through the re-export is followed, and without eslint the hook tells the agent once and then stays quiet. This PR now uses 1.21.3 and drops the --strict workaround from the lint patch, docs/agent-harness.md and AGENTS.md.

👀 For reviewers

  • Trust (confirmed by the maintainer): harnesspm.json trusts Tasty, Glaze and the Tasty lint plugin, so their tools and the edit hook run in this repository, as in UI Kit.
  • harnesspm holds back allow rules and hooks until a person runs npx harnesspm approve (or the default branch records them).

🤖 Generated with Claude Code

https://claude.ai/code/session_01Gr8S7G5oPdr674FRgPScx3

- Ship a harnesspm harness in @tenphi/cookbook. It extends the Tasty,
  Glaze and Tasty lint harnesses, adds a short Cookbook rule and a docs
  index (docs/llms.txt), and patches the upstream rules for a site.
  harness/dev.harnesspm/theme.mjs loads a site's docs.config.ts, so
  tasty:styles --setup and glaze:inspect see its tokens and palette.
- Export createColorTheme() from @tenphi/docs and configureTastyTheme()
  from @tenphi/renderer for that module; both are moved code.
- Use harnesspm in this repository: trust the upstream packages, patch
  their rules and Cookbook's rule for engine work, commit the lock and
  the workspace blocks, check them in CI and at prepack.
- Split the docs into For humans and For AI agents tabs, with new
  For AI agents, Ask your agent and Agent harness pages, and the same
  agent path in the translated pages.
- Generated sites point agents at the new start page and mention
  harnesspm; the upgrade skill syncs it.
- Order the published llms.txt like the sidebar, one section per tab.
- Bump Tasty to 3.19.1 and move the Tasty ESLint plugin to the catalog.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Gr8S7G5oPdr674FRgPScx3
- harnesspm 0.9.2 skips links in code samples (tenphi/harnesspm#55), so the content-sources sample keeps its inline image.
- Glaze 3.1.1 resolves a package path in glaze:inspect (tenphi/glaze#117), so the patches name @tenphi/cookbook/harness/dev.harnesspm/theme.mjs in every layout.
- eslint-plugin-tasty 1.21.1 notes files in which tasty-lint:check found no styles (tenphi/eslint-plugin-tasty#167); the lint patch says so.
- AGENTS.md keeps only the two workarounds whose upstream issues are open.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Gr8S7G5oPdr674FRgPScx3
…peq9hk

# Conflicts:
#	package.json
#	packages/renderer/package.json
#	pnpm-lock.yaml
#	pnpm-workspace.yaml
- llms.txt builds its sections from the default language's sidebar, as
  pages do, so translations go under Other pages and a URL-prefixed
  default locale keeps its order. Tested with both kinds of site.
- The lint advice works in sites from the project creator: build
  tasty.config.ts with createValidationConfig(docs.theme), so the site's
  palette names are known, and keep style modules in .js or .mjs files on
  TypeScript 7, which typescript-eslint does not support
  (tenphi/eslint-plugin-tasty#171).
- Upgrades with "pin" trust: the skill, the upgrade guide and the agent
  guide say that sync --check fails until a person runs approve.
- The agent guide says what to commit for a site in a folder of a larger
  repository (tenphi/harnesspm#62), and how "pin" trust works.
- The managed block sits at the top of AGENTS.md, as harnesspm status
  asks; AGENTS.md records the two new upstream workarounds.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Gr8S7G5oPdr674FRgPScx3
- llms.txt lists each page under the tab that pages select for it, so
  top-level items that overlap a tab no longer claim its pages, and a
  tab's own page leads its section even when its items leave it out.
- One defaultLocaleKey() helper replaces five copies of the
  default-locale fallback.
- Docs: the hand-set-up agent snippet starts at agents.md; migration
  links to "Keep it current" instead of repeating it; the lint hook is
  Claude Code only; Yarn setup commands; tasty:styles does not check
  color or token names (tenphi/tasty#473), also in both Tasty patches;
  publishing.md keeps the llms.txt facts in one paragraph.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Gr8S7G5oPdr674FRgPScx3
- agent-harness.md says plainly that -C does not change the folder the
  theme module reads, and that a site using configFile gets the default
  theme; the module's notice says so too.
- The command that finds the installed docs lives only in agents.md;
  customization-rules.md links to it.
- The repository's Glaze patch points to the color-role rule under
  "Behavior layer", and its lint patch names every ignore AGENTS.md
  allows, including the legacy customization hooks.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Gr8S7G5oPdr674FRgPScx3
- harnesspm 0.10.0 leaves a built, git-ignored docs folder out of sync
  (tenphi/harnesspm#54), so harnesspm.json no longer excludes
  cookbook:docs and sync no longer warns before a build.
- It replaces skills (tenphi/harnesspm#56): Cookbook's harness replaces
  Glaze's glaze-theme skill with the steps for a site's theme.brand and
  theme.palette, keeping the skill's name. The Glaze patch points at it,
  the repository's patch says it also holds for palette.ts, and a test
  checks that the upstream skill still exists under that name.
- It writes per-machine excludes for a project in a subfolder of a git
  repository (tenphi/harnesspm#62), so the agent guide drops its note
  on which files to commit there.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Gr8S7G5oPdr674FRgPScx3
- The skill and the Glaze patch preview a brand with glaze:inspect and
  --color accent,focus, which shows what Cookbook derives from it; the
  glaze:color preview did not match any Cookbook role.
- harnesspm counts the replaced skill as Cookbook's file, so the docs say
  that trusting @tenphi/cookbook lets Claude Code run it without asking,
  and that a pinned Cookbook upgrade waits for approve.
- harnesspm applies a package's patches and replacements to every
  workspace that uses the patched package (tenphi/harnesspm#65). The
  facade's patches now keep the generic step and mark the Cookbook steps,
  the skill and the Glaze patch name Glaze's own skill for other Glaze
  code, and the monorepo paragraph and AGENTS.md record the workaround.
- The repository's Glaze patch keeps only the skill's writing steps for
  palette.ts and points to "Checking a theme".
- harnesspm before 0.10 warns on every sync; it does not keep Glaze's
  skill, as the docs said.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Gr8S7G5oPdr674FRgPScx3
- A navigation tab whose items are all drafts, or empty, no longer shifts
  the sidebar of every later tab: pageSidebar() hides drafts in each
  group and keeps every group in its place, so a tab's sidebarGroup
  index still points at its own group. New navigation test.
- The facade's Glaze patch keeps Glaze's generic guardrails unscoped
  (change the theme, not exported CSS; no hand-written dark or
  high-contrast values; fix every ✗ and warning), marks the Cookbook
  steps, and writes `npx harnesspm why`.
- The upgrade skill asks for approve when `sync --check` names a pinned
  package, Cookbook included: `sync` never lists a package that has no
  tools. It also looks for harnesspm.json at the repository root.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Gr8S7G5oPdr674FRgPScx3
In this repository, the replaced glaze-theme skill sends other glaze()
code to Glaze's own skill, which describes palette.ts, while the
repository's Glaze patch says the skill's writing steps hold there. The
patch now says the pointer does not apply to palette.ts, and that only
the Cookbook pages the skill names are in docs/.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Gr8S7G5oPdr674FRgPScx3
- The TypeScript 6 route for linting .ts style modules also needs
  @typescript-eslint/parser; the lint patch and the agent guide name it.
- AGENTS.md's harnesspm#65 record lists the repository Glaze patch's note
  on the skill's pointer, so it is dropped together with the pointer.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Gr8S7G5oPdr674FRgPScx3
…size

- docs/deployment.md links straight to "Page text for readers and
  agents" for how agents read the published site, instead of the
  rewritten page for people.
- The eslint-plugin-tasty#171 record and the changeset say that npm
  sites on TypeScript 7 get a second nested copy of the lint plugin with
  TypeScript 6 (about 28 MB) under @tenphi/cookbook. The changeset also
  says the upgrade skill runs `sync --check`.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Gr8S7G5oPdr674FRgPScx3
The lint rules never read theme.styles or theme.recipes in
docs.config.ts, and neither cookbook doctor nor the build checks their
values. The facade's lint patch and the agent guide now say so and point
to tasty:styles and glaze:inspect --color for those objects, so an agent
on TypeScript 7 does not ask for TypeScript 6 to lint a file the rules
skip.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Gr8S7G5oPdr674FRgPScx3
theme.customStyles is also a Tasty style object in docs.config.ts that the
lint rules never read and doctor checks only by name, so the lint patch
and the agent guide name it next to theme.styles and theme.recipes.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Gr8S7G5oPdr674FRgPScx3
- harnesspm 0.10.1 keeps a package's patches in the workspaces that use
  it and keeps the original skill when workspaces disagree
  (tenphi/harnesspm#65). The pointers to Glaze's own skill are gone; the
  Glaze patch and the agent guide now say where a site's agent finds
  Cookbook's skill when harnesspm keeps Glaze's. harnesspm.json gives
  this repository the facade's skill, so sync does not warn.
- Tasty 3.19.2's tasty:styles warns about color and token names the
  theme does not define (tenphi/tasty#473): the caveat in both Tasty
  patches and the agent guide is gone.
- eslint-plugin-tasty 1.21.2 lints TypeScript 7 files and no longer
  pulls in TypeScript 6 (tenphi/eslint-plugin-tasty#171): the .js/.mjs
  advice, the TypeScript 6 route and the install-size note are gone.
- AGENTS.md has no upstream workarounds left; the changesets name the
  new versions.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Gr8S7G5oPdr674FRgPScx3
- harnesspm keeps Glaze's own glaze-theme skill whenever another
  workspace gets Glaze's harness without Cookbook, also through a
  package such as UI Kit. The Glaze patch and the agent guide say so and
  give `npx harnesspm why glaze:skills/glaze-theme` as the check.
- With eslint-plugin-tasty 1.21.2, the lint tool and hook need only
  tasty.config.ts, so the agent guide no longer sends agents through the
  site's own ESLint setup first.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Gr8S7G5oPdr674FRgPScx3
Tasty 3.19.2's tasty:styles warns about color and token names the loaded
config does not define. Cookbook's components define some documented
names on their own roots, such as #callout-text or $copy-button-size, so
checking a theme.styles override reported correct names as missing.

- @tenphi/renderer lists those names in COMPONENT_TOKENS and exports
  declareComponentTokensForTools(), which adds them to Tasty's global
  styles with neutral values. A test keeps the list equal to the names
  the component style trees define. Builds never call it, so the CSS a
  site ships does not change.
- The harness's theme.mjs calls it after configureTastyTheme(). A test
  runs Tasty's own tasty:styles script: component names stay quiet and
  a typo still warns.
- The Tasty patches, the agent guide, AGENTS.md and the changeset say so.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Gr8S7G5oPdr674FRgPScx3
…peq9hk

# Conflicts:
#	package.json
#	packages/renderer/package.json
#	pnpm-lock.yaml
Glaze 3.2.0 ships its docs as plain Markdown in harness/docs/ instead
of MDX in docs/. pack-docs now names each package's docs folder, maps
GitHub fallback links back to that folder, and keeps each Glaze page's
link to its live version on the Glaze site instead of turning it into
a link to itself. The customization guide and the changesets say so;
the lint plugin's 1.21.2 bump is already announced by main's changeset.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Gr8S7G5oPdr674FRgPScx3
The agent guide said the lint tool and edit hook need only
tasty.config.ts. They also need the eslint package, a peer of the lint
plugin. npm and pnpm install it with Cookbook; Yarn 4 does not, so in a
Yarn site tasty-lint:check stops and the edit hook lints nothing and
says nothing. The guide and Cookbook's lint patch now tell agents to add
eslint as a dev dependency in a Yarn site. The silent hook is reported
upstream as tenphi/eslint-plugin-tasty#174.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Gr8S7G5oPdr674FRgPScx3
…s miss

Round 15 review fixes:
- The COMPONENT_TOKENS test matched only quoted keys, so it missed the
  19 names Mermaid's style tree writes unquoted or with a leading
  underscore ($bg, $_line), and tasty:styles still warned on them. The
  test now matches both forms, the list has all 51 names, and the
  end-to-end test checks $bg and $_line.
- tasty-lint:check and the edit hook find a site's lint config only when
  it names @tenphi/eslint-plugin-tasty, not one set up through
  @tenphi/cookbook/eslint-plugin or oxlint.config.mjs as Custom
  components shows. The lint patch and the agent guide now send agents
  to --strict and the site's lint script; AGENTS.md records the removal
  condition (tenphi/eslint-plugin-tasty#175).
- docs/llms.txt points at Glaze's own docs index, new in Glaze 3.2.0.
- pack-docs no longer maps GitHub fallback links to Glaze's harness/docs,
  which is built at pack time and not in the repository.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Gr8S7G5oPdr674FRgPScx3
Round 16 review fixes:
- declareComponentTokensForTools() skips a $name whose #name is a
  built-in palette color. Mermaid's $surface and $border otherwise hid a
  $surface typed for #surface in any override, which renders a
  transparent fill. COMPONENT_TOKENS stays complete; the end-to-end test
  checks that $surface still warns.
- The lint note told agents to run the site's lint script, which neither
  the creator nor Custom components adds. It now names the site's own
  lint command and warns that a bare oxlint skips oxlint.config.mjs.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Gr8S7G5oPdr674FRgPScx3
Round 17 review fixes:
- The AGENTS.md record of the eslint-plugin-tasty#175 workaround still
  said the notes send agents to "the site's lint script"; round 16
  changed the notes to the site's own lint command.
- The facade lint patch said tasty-lint:check notes each file it found
  no styles in. It notes only the files named on the command line, so
  the patch now says so and asks agents to name the files they changed,
  as the agent guide already did.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Gr8S7G5oPdr674FRgPScx3
Round 18 review fix: Cookbook's always-on Glaze patch said a new palette
role is a Glaze declaration "with base, tone and contrast". Read
literally, a decorative fill gets a floor too, and Glaze then moves it
to a mid-tone that passes every check. The patch now matches the
glaze-theme skill and the theme docs: an absolute tone or a base with a
tone step, and a contrast floor only when the color must be read.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Gr8S7G5oPdr674FRgPScx3
Round 19 review fix: the reworded Glaze patch offered an absolute tone
or a base as alternatives and then a contrast floor, so an agent could
write a floor without a base, which Glaze rejects ("contrast" without
"base"). A color that must be read now names its base and gets a floor
against it, as the glaze-theme skill says.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Gr8S7G5oPdr674FRgPScx3
tenphi/eslint-plugin-tasty#176 (fixing #174 and #175) makes
tasty-lint:check and the edit hook follow a lint config that loads the
plugin through a package in importSources, such as
@tenphi/cookbook/eslint-plugin, and oxlint.config.mjs; without eslint,
the hook now tells the agent once per session that it did not lint the
edit. Cookbook's validation config lists @tenphi/cookbook/styling in
importSources, so sites need no change.

Remove the --strict workaround from the lint patch, docs/agent-harness.md
and its AGENTS.md record, and say what the hook does without eslint.
These docs describe the plugin's next release; the next commit bumps
@tenphi/eslint-plugin-tasty to it, and PR #210 is not merged before.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Gr8S7G5oPdr674FRgPScx3
1.21.3 (tenphi/eslint-plugin-tasty#176) fixes #174 and #175:
tasty-lint:check and the edit hook follow a lint config set up through
@tenphi/cookbook/eslint-plugin or oxlint.config.mjs, and the hook tells
the agent once per session when eslint is missing. The previous commit
already dropped the --strict workaround; the harness changeset now says
what the release brings to Cookbook sites.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Gr8S7G5oPdr674FRgPScx3
@tenphi
tenphi merged commit 9f0a649 into main Nov 23, 2026
12 checks passed
@github-actions github-actions Bot mentioned this pull request Nov 23, 2026
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.

The edit hook stays silent when eslint is missing, so an agent never learns its edits went unlinted

2 participants