Skip to content

Commit cbcced6

Browse files
authored
Merge branch 'main' into dependabot/github_actions/actions/setup-node-7
2 parents 7d406b3 + 5ce61a4 commit cbcced6

71 files changed

Lines changed: 6500 additions & 3829 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.claude/agents/docs-curator.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
name: docs-curator
3+
description: Sweeps all repo documentation (README, SECURITY, CLAUDE.md, TEST.md, REVIEW.md, mcp/README, wrangler.toml comments, MCP tool descriptions) for drift against the current code, and fixes it. Use after feature merges or on a maintenance cadence.
4+
---
5+
6+
You are the documentation curator for the workspace-tools repo. Follow `.claude/skills/docs-sync/SKILL.md`: check the docs in canonical order, grep the known drift markers, compare the README's MCP tool table against the actual `registerTool` calls, and fix any drift you find.
7+
8+
Rules: docs state what the code does today — never aspirations. If you change any TypeScript (tool descriptions), run the verify sequence before committing. Commit with a `Docs consistency:` prefix on the current feature branch. If nothing drifted, report "consistent" and change nothing.

.claude/agents/studio-qa.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
name: studio-qa
3+
description: Renders sample Studio cards to PNG and visually inspects them for overlap, truncation, contrast, and hex-label correctness. Use after any change to signature-generator/src/engines/nyuchi.
4+
---
5+
6+
You are the visual QA agent for the Nyuchi Studio engine. Follow `.claude/skills/studio-qa/SKILL.md`: write a temporary vitest render harness in `mcp/tests/`, render the required layout/theme matrix to the scratchpad, view every image, and report defects with the offending layout/theme/params.
7+
8+
Delete the temporary test file when done. Never "fix" output by post-processing SVG — defects are engine bugs. The banner engine is frozen/deprecated; do not test or modify it.

.claude/agents/verifier.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
name: verifier
3+
description: Runs the workspace-tools verification sequence (lint, typecheck, both vitest suites, site build) and reports pass/fail. Use proactively after any code change and before every push.
4+
tools: Bash, Read, Grep, Glob
5+
---
6+
7+
You are the verification agent for the workspace-tools repo. Follow `.claude/skills/verify/SKILL.md` exactly: run the engine-side checks inside `signature-generator/`, the worker-side checks at the repo root, stop at the first failure.
8+
9+
Report one line per step with counts, then an overall verdict. On failure, include the exact failing output and the most likely cause — never push, fix, or commit anything yourself; verification is read-only.

.claude/skills/docs-sync/SKILL.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
---
2+
name: docs-sync
3+
description: Sweep the repo's documentation for consistency with the current code and fix drift. Use after feature work, tool/schema changes, renames, or on a maintenance cadence.
4+
---
5+
6+
# Docs-sync — keep every doc telling the same story
7+
8+
The documentation set, in canonical order (check each against the code, in this order):
9+
10+
1. `README.md` — public front door. MCP tool table, page list, commands, deployment.
11+
2. `SECURITY.md` — Apps Script scopes/delegation AND the Worker/MCP auth model, secrets, input handling.
12+
3. `CLAUDE.md` — agent instructions: architecture notes, invariants, byte-lock rules, current tool behavior.
13+
4. `TEST.md` — test infrastructure: suites, stubs, commands, what CI runs, what needs manual/visual checks.
14+
5. `REVIEW.md` — review standard and the latest review record.
15+
6. Secondary: `mcp/README.md`, `wrangler.toml` comments, MCP tool descriptions in `mcp/src/index.ts`, `mcp/src/server-card.ts` description, `signature-generator/README.md`, `CHANGELOG.md`/`RELEASES.md` links.
16+
17+
## Procedure
18+
19+
1. `git log --oneline -10` and `git diff` to know what changed recently.
20+
2. Grep for known drift markers — phrases that have gone stale before:
21+
- `PNG rasterization is a follow-up`, `SVG only`, `three tools`, `exactly the three`
22+
- `nyuchitech` (org renamed to `nyuchi`)
23+
- `8px per char` (stub is now size-aware)
24+
- counts of tools/tests that may have moved
25+
3. Compare the MCP tool table in `README.md` against `server.registerTool` calls in `mcp/src/index.ts` (names, deprecations, output modes).
26+
4. Check `CLAUDE.md` claims against reality (paths that must exist, invariants still true).
27+
5. Fix what's wrong, run the `verify` skill if any `.ts` changed, commit with a `Docs consistency:` message, push to the current feature branch.
28+
6. If nothing drifted: report "consistent" and change nothing.
29+
30+
Never describe aspirations as shipped: docs state what the code does today.

.claude/skills/studio-qa/SKILL.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
name: studio-qa
3+
description: Visually verify Studio engine output by rasterizing sample cards and inspecting them. Use after ANY change to signature-generator/src/engines/nyuchi (layouts, typography, colors, themes) — structural tests alone have missed real visual defects.
4+
---
5+
6+
# Studio-QA — render and look
7+
8+
Assertions catch numbers; only renders catch collisions, contrast problems, and dead space. Both the dek/divider overlap and the layout-2 dek truncation were found this way.
9+
10+
## Procedure
11+
12+
1. Write a **temporary** vitest file in `mcp/tests/` (so it gets the wasm plugin + fonts) that calls the worker's `nyuchi_generate_studio_card` with `returnFormat: "png"` and writes PNGs to the session scratchpad. Serve ASSETS from `signature-generator/public` via a small fs-backed stub (copy the pattern in `mcp/tests/worker.test.ts` `FONT_ASSETS_STUB`).
13+
2. Render at minimum:
14+
- layout 1, dark, short one-word title (hook mode) + dek
15+
- layout 1, accent theme, same content
16+
- layout 3 and layout 4, dark, medium title
17+
- layout 2, dark, two-line title + full-sentence dek (the tightest vertical budget)
18+
- layout 5 twice: title = mineral name (hex labels must show) and generic title (hex labels must be hidden)
19+
- one non-square format (og or story) for any layout touched
20+
3. View every PNG. Check: no text/graphic overlap, dek complete (never truncated mid-sentence), chip/eyebrow legible, hex labels only on mineral cards, lockup intact, contrast sane on both dark and accent.
21+
4. Delete the temporary test file before committing.
22+
5. If a defect is visible, fix the engine (never post-process output) and re-render before shipping.
23+
24+
The Studio is the only image generator — the legacy Banner tool was removed entirely (its `/banner` route now redirects to `/studio`).

.claude/skills/verify/SKILL.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
name: verify
3+
description: Run this repo's full verification sequence (lint, typecheck, both vitest suites, site build) in the right directories, and report a pass/fail summary. Use before every commit/push, after dependency changes, or when asked whether the repo is green.
4+
---
5+
6+
# Verify — full check sequence for workspace-tools
7+
8+
Run these in order. Stop at the first failure and report it with the failing output; do not push on red.
9+
10+
```bash
11+
cd signature-generator
12+
npm run lint
13+
npx tsc -b
14+
npx vitest run
15+
npm run build
16+
cd ..
17+
npm run typecheck:worker
18+
npm run test:worker
19+
```
20+
21+
Notes:
22+
- Directory matters: the engine suite/`tsc -b`/lint run **inside** `signature-generator/`; the worker suite and `typecheck:worker` run at the **repo root** (its config is root `vitest.worker.config.ts`, deps are root deps).
23+
- If dependencies were never installed in this container: `npm install` at the root **and** in `signature-generator/` first.
24+
- A changed engine also warrants visual verification — see the `studio-qa` skill.
25+
- Optionally confirm deployability with `npx wrangler deploy --dry-run --outdir <scratch>` (no credentials needed).
26+
27+
Report: one line per step (pass/fail + counts), then overall verdict. If everything passes and the working tree is clean, say so and stop — no pushes, no commits unless the caller asked.

CHANGELOG.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
165165

166166
## Links
167167

168-
- [GitHub Repository](https://github.com/nyuchitech/workspace-tools)
169-
- [Issue Tracker](https://github.com/nyuchitech/workspace-tools/issues)
168+
- [GitHub Repository](https://github.com/nyuchi/workspace-tools)
169+
- [Issue Tracker](https://github.com/nyuchi/workspace-tools/issues)
170170
- [Security Policy](./SECURITY.md)

0 commit comments

Comments
 (0)