paperclip/scripts
scotttong e0bbf3c911 refactor(ui): extract remaining bracket values, add token gate check (Phase 2 batch 4/4)
Final batch of the design-token extraction: mints tokens for every
remaining value-bearing arbitrary Tailwind bracket in
ui/src/components/** and ui/src/pages/**, then adds a gate script so
the "zero hardcoded value" rule is enforced going forward instead of
re-audited by hand each time.

Codemod: scripts/codemod-extract-misc.mjs (198 sites, 84 files, 96 new
tokens: 58 --gtc-*/3 --gtr-* grid track lists, 19 --tp-*
transition-property lists, 6 --z-* z-index values, --s-*/--e-*/--va-*/
--sw-* scale/ease/vertical-align/stroke-width, 2 --blur-*, 1
--drop-shadow-extract-*, 4 *-resolved wrapper tokens resolving
FileViewerSheet.tsx's half-migrated var(x, fallback) sites Batch 1
deferred, and 2 --gradient-extract-* continuing Batch 1's counter for
2 hsl(var())/color-mix() gradient sites its color-literal audit didn't
catch). Mandatory Step 0 syntax spike confirmed every paren form
byte-equivalent via scratch stories + built-CSS grep, and confirmed
the tw-animate-css plugin utilities (zoom-in-[0.97] etc.) are
currently dead/no-op classes (plugin not installed) — allowlisted,
not rewritten, since there's no visual behavior to preserve or change.

Gate script: scripts/check-token-gates.mjs (new, wired as
`pnpm check:token-gates`) implements the three DONE-WHEN gates
(hex/color-literal, arbitrary-bracket-value, raw-font-size) over
ui/src/components/** and ui/src/pages/**, parsing a new
machine-readable ALLOWLIST block appended to ui/src/index.css that
consolidates Batches 1-3's free-form allowlist prose into
`* allow <path> — <reason>` lines. Resolved TOKEN-AUDIT.md's open
"test file policy" question by allowlisting 43 test-fixture hex-literal
sites across 18 *.test.tsx files (mock prop/API-response data, not
rendered CSS). Gate exits 0 clean.

AGENTS.md's existing Design system section now names the gate command.
TOKEN-AUDIT.md gets a Batch 4 log appendix with counts, allowlist
rationale, and the remaining out-of-scope debt (36 hex sites in
ui/src/lib|context|plugins; the ~3,115-site Tailwind-palette-class
scope question is still unresolved and flagged for a human decision).

Verify: node scripts/check-token-gates.mjs exit 0 (all 3 gates clean);
pnpm build-storybook exit 0; Storybook visual suite 510/510 (Playwright,
tests/storybook-visual); pnpm typecheck (ui/) exit 0; codemod idempotent
on re-run.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-06 15:50:09 -07:00
..
__tests__ perf(ci): build standalone public packages concurrently (#8567) 2026-06-23 17:52:12 -07:00
smoke [codex] Add built-in Hermes adapters (#8543) 2026-06-26 16:04:58 -05:00
backfill-issue-reference-mentions.ts Add first-class issue references (#4214) 2026-04-21 10:02:52 -05:00
backup-db.sh
bootstrap-npm-package.mjs [codex] Add built-in Hermes adapters (#8543) 2026-06-26 16:04:58 -05:00
bootstrap-npm-package.test.mjs [codex] Add built-in Hermes adapters (#8543) 2026-06-26 16:04:58 -05:00
build-npm.sh
build-standalone-public-packages.mjs perf(ci): build standalone public packages concurrently (#8567) 2026-06-23 17:52:12 -07:00
capture-acpx-skills-screenshots.mjs Add ACPX local adapter runtime (#4893) 2026-04-30 19:57:05 -05:00
capture-pap-2351-binding-picker.mjs Add secrets provider vaults and remote import (#5429) 2026-05-09 18:22:17 -05:00
check-docker-deps-stage.mjs Add E2B sandbox provider plugin (#4452) 2026-04-25 11:01:11 -07:00
check-forbidden-tokens.mjs
check-no-git-push.mjs PAPA-430: workspace finalize gates + no-remote-git enforcement (#6969) 2026-05-29 08:25:29 -07:00
check-no-git-push.test.mjs PAPA-430: workspace finalize gates + no-remote-git enforcement (#6969) 2026-05-29 08:25:29 -07:00
check-release-package-bootstrap.mjs fix(ci): gate new release packages on npm bootstrap (#5146) 2026-05-03 19:31:28 -07:00
check-release-package-bootstrap.test.mjs fix(ci): gate new release packages on npm bootstrap (#5146) 2026-05-03 19:31:28 -07:00
check-token-gates.mjs refactor(ui): extract remaining bracket values, add token gate check (Phase 2 batch 4/4) 2026-07-06 15:50:09 -07:00
clean-onboard-git.sh
clean-onboard-npm.sh
clean-onboard-ref.sh
codemod-extract-colors.mjs refactor(ui): extract color literals to tokens (Phase 2 batch 1/4) 2026-07-06 14:17:05 -07:00
codemod-extract-misc.mjs refactor(ui): extract remaining bracket values, add token gate check (Phase 2 batch 4/4) 2026-07-06 15:50:09 -07:00
codemod-extract-sizes.mjs refactor(ui): extract size/spacing/radius/shadow values to tokens (Phase 2 batch 3/4) 2026-07-06 15:15:08 -07:00
codemod-extract-type.mjs refactor(ui): extract font-size and letter-spacing to tokens (Phase 2 batch 2/4) 2026-07-06 14:29:51 -07:00
create-github-release.sh
dev-runner-output.mjs Guard dev health JSON parsing 2026-04-06 21:23:33 -05:00
dev-runner-output.ts fix(runtime): handle empty dev runner responses 2026-04-06 21:56:13 -05:00
dev-runner-paths.mjs [codex] Add backup endpoint and dev runtime hardening (#4087) 2026-04-20 06:08:55 -05:00
dev-runner-snapshot.mjs Address dev runner snapshot review feedback 2026-06-01 22:03:51 +00:00
dev-runner.mjs [codex] Add skills CLI and catalog management (#6782) 2026-05-28 07:33:51 -10:00
dev-runner.ts Add dev runner snapshot race regression test 2026-06-01 21:55:30 +00:00
dev-service-profile.ts Introduce bind presets for deployment setup 2026-04-11 07:09:07 -05:00
dev-service.ts
discord-daily-digest.sh [codex] Harden heartbeat scheduling and runtime controls (#4223) 2026-04-21 12:24:11 -05:00
docker-build-test.sh
docker-entrypoint.sh fix: skip gosu when already running as target user (#2908) 2026-06-12 10:33:52 -07:00
docker-onboard-smoke.sh
ensure-plugin-build-deps.mjs [codex] Add skills CLI and catalog management (#6782) 2026-05-28 07:33:51 -10:00
ensure-workspace-package-links.ts [codex] fix worktree dev dependency ergonomics (#3743) 2026-04-15 09:47:29 -05:00
generate-company-assets.ts
generate-npm-package-json.mjs [codex] Add built-in Hermes adapters (#8543) 2026-06-26 16:04:58 -05:00
generate-org-chart-images.ts
generate-org-chart-satori-comparison.ts
generate-plugin-package-json.mjs Add E2B sandbox provider plugin (#4452) 2026-04-25 11:01:11 -07:00
generate-ui-package-json.mjs
kill-agent-browsers.sh [codex] Stabilize tests and local maintenance assets (#4423) 2026-04-24 15:11:42 -05:00
kill-dev.sh kill chrome test servers too 2026-04-09 06:14:12 -05:00
kill-vitest.sh [codex] Harden heartbeat scheduling and runtime controls (#4223) 2026-04-21 12:24:11 -05:00
kill-workspaces.sh Add workspace runtime kill script 2026-06-05 03:28:07 +00:00
link-plugin-dev-sdk.mjs fix(plugins): move dev SDK linking out of plugin postinstall scripts (#8255) 2026-06-18 07:45:53 -07:00
link-plugin-dev-sdk.test.js fix(plugins): move dev SDK linking out of plugin postinstall scripts (#8255) 2026-06-18 07:45:53 -07:00
measure-issue-chat-long-thread.mjs Improve issue thread scale and markdown polish (#4861) 2026-04-30 13:18:01 -05:00
migrate-inline-env-secrets.ts
paperclip-commit-metrics.ts feat: implement multi-user access and invite flows (#3784) 2026-04-17 09:44:19 -05:00
paperclip-issue-update.sh chore: improve worktree tooling and security docs 2026-04-10 22:26:30 -05:00
prepare-server-ui-dist.sh ci: speed up PR verify workflow (#6137) 2026-05-16 11:28:25 -07:00
provision-worktree.sh [codex] Add starred resource sidebar controls (#9085) 2026-07-06 14:09:11 -05:00
release-lib.sh [codex] Recover duplicate npm provenance canary publishes (#7839) 2026-06-09 15:35:07 -05:00
release-lib.test.mjs [codex] Recover duplicate npm provenance canary publishes (#7839) 2026-06-09 15:35:07 -05:00
release-package-manifest.json [codex] Add built-in Hermes adapters (#8543) 2026-06-26 16:04:58 -05:00
release-package-map.mjs fix(release): publish all remaining @paperclipai workspace packages from CI + guard unpublishable edges (#8365) 2026-06-19 19:11:20 -07:00
release-package-map.test.mjs [codex] Add built-in Hermes adapters (#8543) 2026-06-26 16:04:58 -05:00
release.sh [codex] Recover duplicate npm provenance canary publishes (#7839) 2026-06-09 15:35:07 -05:00
rollback-latest.sh
run-typecheck-build-gaps.mjs ci: speed up PR verify workflow (#6137) 2026-05-16 11:28:25 -07:00
run-vitest-stable.mjs perf(ci): shard the general-server test lane across 3 runners (#8360) 2026-06-19 19:22:17 -07:00
screenshot-blocked-inbox.mjs [codex] Add blocked inbox attention view (#5603) 2026-05-13 16:41:36 -05:00
screenshot-file-viewer.mjs Add workspace file viewer and artifact links (#7681) 2026-06-09 17:17:43 -05:00
screenshot-one.mjs Add workspace file viewer and artifact links (#7681) 2026-06-09 17:17:43 -05:00
screenshot-pap2373.mjs Cancel stale queued heartbeats when issue graph changes (PAP-2314) (#4534) 2026-04-26 21:17:38 -05:00
screenshot-recovery-card.cjs [codex] Add source-scoped recovery actions (#5599) 2026-05-12 09:37:15 -05:00
screenshot-subissues.mjs Present ordered sub-issues as a workflow checklist (#4523) 2026-04-26 07:36:49 -05:00
screenshot.cjs
serve-storybook-static.mjs test: Storybook visual snapshot suite (Phase 0 tooling) 2026-07-06 13:48:28 -07:00
verify-release-registry-state.mjs fix: harden release registry verification against npm lag (#4816) 2026-05-09 22:18:12 -07:00
verify-release-registry-state.test.mjs fix: harden release registry verification against npm lag (#4816) 2026-05-09 22:18:12 -07:00