Skip to content

docs: update CLAUDE.md and skills to match today's production-readiness work#92

Merged
Samurai33 merged 4 commits into
mainfrom
docs/update-claude-config-post-audit
Jul 12, 2026
Merged

docs: update CLAUDE.md and skills to match today's production-readiness work#92
Samurai33 merged 4 commits into
mainfrom
docs/update-claude-config-post-audit

Conversation

@Samurai33

Copy link
Copy Markdown
Owner

Summary

Documentation-only update — no app code touched. Fixes several stale claims in CLAUDE.md and project skills that would have misled a future Claude Code session:

  • Rate limiting / CSP: previously said neither existed; both do now (app/actions/auth.ts rate limiter, next.config.mjs CSP). Documented the two CSP choices that look like bugs but aren't (images.unoptimized, media-src scoped to github.com).
  • Deleted vendor files: CLAUDE.md and token-economy referenced components/ui/carousel.tsx/sidebar.tsx/use-mobile.tsx and issue Fix pre-existing React Compiler lint violations downgraded to warn #61 — all three files were deleted as confirmed dead code, and eslint.config.mjs has no rule overrides at all (contradicting the old description).
  • ship skill: claimed no test script and no lint in CI — both false. Added pnpm test/pnpm lint to the checklist, plus a CSP-allowlist check and a "verify the live site after merge" step (learned the hard way today: Vercel's Git integration silently pointed at a dead/renamed repo with zero CI-visible error).
  • performance skill: listed recharts/embla-carousel-react as real deps (removed today) and said audio lives in public/audio/ (it's actually GitHub Release assets, cross-origin, subject to CSP media-src).
  • Custom domain: documented cyberjus.org + SITE_URL/NEXT_PUBLIC_SITE_URL in CLAUDE.md and .env.example.

Test plan

  • Docs-only change; CI (lint/type-check/test/build) should be unaffected. Ran no manual verification beyond confirming no .ts/.tsx files are in this diff.

… domain

Connected cyberjus.org to the Vercel project today (A record @ -> 216.198.79.1,
CNAME www -> Vercel's assigned target, both DNS-only on Cloudflare to avoid
double-proxying the TLS handshake). Update the code-level fallback so
metadataBase/OpenGraph/robots.txt/sitemap.xml resolve to the real domain
without needing NEXT_PUBLIC_SITE_URL set as an env var.
Episode audio broke in production after the CSP added in the earlier
security-headers pass: audio.src (contexts/AudioContext.tsx) points at
github.com/.../releases/download/... and its release-assets.githubusercontent.com
redirect target, but the CSP had no media-src directive, so it fell back to
default-src 'self' and silently blocked every episode's audio in the browser
- no network error, just a CSP violation and a stuck "loading" spinner.

Verified locally: before the fix, `next start` + actually clicking play left
the UI unresponsive; after adding media-src, clicking play flips the button to
"Reproduzindo..." with zero console errors.
…endation cards

Root-audited every episode's playback: 3 of 6 have a real audioUrl (7, 6, 5),
3 legitimately have none (13, ESPECIAL, 3 - no recording exists yet, already
handled correctly by the "SEM ÁUDIO"/hidden-button logic elsewhere). For the
3 with real audio, playback itself worked (confirmed via direct React
onClick invocation - no error, state updates), but <AudioPlayer/> - the fixed
bottom bar with play/pause/seek/volume - was only mounted in app/page.tsx
(the homepage). Clicking "Ouvir" from /episodes or /episodes/[id] silently
started playback with zero visible feedback: no bar, no button state change,
audio (if you knew to expect it) with no way to pause or seek. That reads as
"disabled" even though the button and audioUrl are both fine.

Moved <AudioPlayer/> into the root layout so it's available on every route,
and brought EpisodesFilterGrid.tsx (episode list cards) and
EpisodeRecommendations.tsx ("you might also like") up to the same
play/pause-reflecting pattern already used correctly by EpisodePlayButton.tsx
and ProjectCard.tsx, instead of a static "Ouvir" label that never changes.

Verified with lint + type-check + test (27/27) + build. Isolated a local
Browser-pane rendering issue on /episodes during manual testing by reverting
this exact change, rebuilding, and reproducing the same blank-render
independent of it - pre-existing tool flakiness, not a regression here.
…ss work

Several claims in CLAUDE.md and the project skills were stale after today's
audit/fix pass and would have misled a future session:

- CLAUDE.md/security-guardian: said there was no rate limiting on dashboard
  login and no CSP - both now exist (auth.ts rate limiter, next.config.mjs
  headers()). Documented the two things on the CSP that look like bugs but
  aren't (images.unoptimized, media-src scoped to github.com) so they don't
  get "fixed" again by someone who hasn't read the history.
- CLAUDE.md: referenced components/ui/carousel.tsx, sidebar.tsx, use-mobile.tsx
  as vendor files with downgraded lint rules and pointed at issue #61 - all
  three files were deleted (confirmed dead code) and the eslint.config.mjs
  they described has no rule overrides at all. Replaced with the actual
  current lint warnings.
- ship: claimed "no test script exists" and "CI does not lint" - both false,
  pnpm test and pnpm lint are real CI steps. Added them to the checklist,
  added a CSP-allowlist check and a "verify the live site after merge" step
  after today's Vercel Git-integration-pointed-at-a-dead-repo incident.
- performance: listed recharts/embla-carousel-react as real dependencies and
  said audio lived in public/audio/ - both wrong (removed as dead deps today;
  audio is GitHub Release assets, streamed cross-origin, subject to CSP
  media-src).
- token-economy: cited components/ui/sidebar.tsx as a large file to avoid
  reading in full - deleted today, swapped for a file that's still large.
- CLAUDE.md/.env.example: documented SITE_URL/NEXT_PUBLIC_SITE_URL and the
  custom domain (cyberjus.org) added today.

Docs-only change, no app code touched.
@vercel

vercel Bot commented Jul 12, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
v0-cyber-justica Ready Ready Preview, Comment, Open in v0 Jul 12, 2026 4:08pm

@Samurai33
Samurai33 merged commit 9adc87d into main Jul 12, 2026
3 checks passed
@Samurai33
Samurai33 deleted the docs/update-claude-config-post-audit branch July 12, 2026 16:18
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