Skip to content

chore(claude): add Claude Code config + harmonize lint/format/typecheck - #3

Merged
Ardnived merged 5 commits into
mainfrom
chore/claude-config
Jun 17, 2026
Merged

Ardnived merged 5 commits into
mainfrom
chore/claude-config

Conversation

@Ardnived

Copy link
Copy Markdown
Contributor

Summary

  • Adds a full Claude Code configuration under .claude/, adapted from the sy-devs-cms and WeMeditateWeb repos but tailored to this Vite/React/NextUI/Mapbox widget (Payload/Cloudflare-specific pieces dropped as N/A).
  • Harmonizes ESLint, Prettier, and typecheck tooling so all three SY projects share the same formatting standard.
  • Adds a CI workflow gating PRs on lint + typecheck + build.

Changes

.claude/ configuration

  • CLAUDE.md project guide + docs/ (architecture, environment, mcp-setup)
  • 7 hooks: block-wrong-bash, block-generated-files, prettier-format, eslint-fix, typecheck (PostToolUse), security-scan (blocks sk. Mapbox secrets — the bundle is public), status-line
  • settings.json (scoped permissions, hook wiring, status line)
  • 5 path-scoped rules (code-style, components, mapbox, data-layer, i18n-and-state)
  • 2 output styles, 2 subagents (security-reviewer, researcher)
  • 4 skills (implement-issue, pr-prep, reflect-session, draft-ticket)
  • .mcp.json — GitHub + Playwright MCP

Tooling harmonization

  • .prettierrc — shared standard (no semicolons, single quotes, trailing commas, width 100)
  • Migrated legacy .eslintrc.json → flat eslint.config.js
  • Added typecheck script; lint is now eslint .
  • .github/workflows/ci.yml — lint + typecheck + build

The second commit is a mechanical Prettier reformat applying the shared config (no behavior change).

Verification

  • Lint: ✓ No errors (pnpm lint)
  • Types: ✓ Clean (pnpm typecheck)
  • Build: ✓ Success (pnpm build)

Notes for reviewer

  • No test suite exists yet, so CI's gate is lint + typecheck + build.
  • The existing accent-sync workflows were left untouched.
  • .claude/settings.local.json is intentionally conservative and not committed (local-only).

🤖 Generated with Claude Code

Adds a full .claude/ setup adapted from the sy-devs-cms and WeMeditateWeb
repos, tailored to this Vite/React/NextUI/Mapbox widget:

- CLAUDE.md project guide; architecture/environment/mcp-setup docs
- 7 hooks (block-wrong-bash, block-generated-files, prettier-format,
  eslint-fix, typecheck, security-scan, status-line)
- settings.json (scoped permissions, hook wiring, status line)
- 5 path-scoped rules, 2 output styles, 2 subagents
- 4 skills (implement-issue, pr-prep, reflect-session, draft-ticket)
- .mcp.json with GitHub + Playwright MCP

Harmonizes tooling across all three SY projects:
- shared .prettierrc (no-semi, single-quote, width 100)
- migrate legacy .eslintrc.json -> flat eslint.config.js
- add typecheck script; lint is now `eslint .`
- CI workflow gating PRs on lint + typecheck + build

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jun 17, 2026 •

Copy link
Copy Markdown

Deploying atlas-legacy with  Cloudflare Pages  Cloudflare Pages

Latest commit: 5aadb97
Status: ✅  Deploy successful!
Preview URL: https://8e3a75d6.syatlas.pages.dev
Branch Preview URL: https://chore-claude-config.syatlas.pages.dev

View logs

Mechanical reformat to the shared .prettierrc (no semicolons, single
quotes, trailing commas, width 100). No behavior change.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
@Ardnived
Ardnived force-pushed the chore/claude-config branch from afa8dc7 to 6a26e07 Compare June 17, 2026 16:37
Ardnived and others added 3 commits June 18, 2026 00:46
The initial config wrongly assumed Vercel. Cloudflare Pages (project
atlas-legacy) is the primary deploy target.

- Replace vercel.json with public/_redirects (/* /index.html 200) — the
  Cloudflare Pages SPA-fallback equivalent for the standalone BrowserRouter
  build. Cloudflare ignores vercel.json, so the fallback was unmet.
- Add the cloudflare-docs MCP server (.mcp.json) + its permission and the
  developers.cloudflare.com WebFetch domain (settings.json)
- Guard CLOUDFLARE_API_TOKEN in the security-scan hook
- Fix deploy references in CLAUDE.md, architecture.md, mcp-setup.md

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Replicates the reference repos' smoke-test pattern, scoped to a single
"is the deploy alive" check for now:

- vitest (v2, vite-5 compatible) with a dedicated vitest.smoke.config.ts so
  smoke specs never run in the fast local lane
- tests/smoke/root.smoke.test.ts — fetches the preview root, asserts 200 +
  the SPA shell (id="syatlas", <title>Sahaj Atlas). Skips when PREVIEW_URL is
  unset
- scripts/get-cloudflare-preview-url.mjs — discovers the Cloudflare Pages
  preview URL (commit status / deployment / PR comment), waits for it to be
  reachable, skips gracefully if absent
- ci.yml: new `smoke` job that discovers the preview and runs test:smoke
  against it

Verified locally: passes against `pnpm dev`, skips with no PREVIEW_URL.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
The CF preview domain is syatlas.pages.dev (the dashboard project is named
atlas-legacy). Use the actual subdomain for the URL-preference match.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
@Ardnived
Ardnived merged commit 2363470 into main Jun 17, 2026
3 checks passed
@Ardnived
Ardnived deleted the chore/claude-config branch June 17, 2026 17:51
sydevs-bot pushed a commit that referenced this pull request Nov 17, 2026
The block above `BUDGET_KIB` was 117 lines and gained a paragraph per
bump, while `git log -p` on the constant holds the same history, dated.
Seven budget steps and three loader steps are now one row each: the
figure, the ticket, and the one line of why that does not survive in a
diff. 117 lines to 48.

Every `#NNN` breadcrumb, every ⚠ and the live rules are kept — the
ratchet, the loader's tighter budget, zod's ratchet-back trigger, and
#3's lesson that a swap adding a package can still win space. The one
thing dropped is `5c85fda`, the commit #246 measured against, which the
log holds.

The derived figures this block carried are what drifted in the parent
commit. Ten rows of measurements drift less than ten paragraphs of prose.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Mg9rjVwQh5urM6FuEM4YX7
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