career-pilot
CLAUDE.md135 starsChanged 5 months agoMITView on GitHub
This file orients coding agents working in this repository. It is not a product doc; see README.md and docs/ for that. React 19 + Vite SPA (frontend/) on Cloudflare Pages, backed by a single Cloudflare Worker gateway (worker/) with Cloudflare D1. An optional Express backend (backend/) handles PDF rendering, portfolio deploys, community, queues and admin. A Chrome MV3 extension (extension/) tracks job listings. 1. Auth is D1-native (worker/src/auth.js): PBKDF2-SHA256 + HS256 JWT, auth_sessions rows, Google/GitHub OAuth. The SPA uses frontend/src/config/d1.js;…
- Reads credentials
The file
We split this CLAUDE.md into the rules it gives an agent
4 rules. About 0 are common, 1 is distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Very specific: line 44
Every user-owned query must include user_id = ?
- Distinctive: line 50
Express is optional: Don't move core flows back into it.
- Very specific: line 55
D1 migrations are append-only: Add worker/migrations/000N_*.sql.
- Very specific: line 68
Never commit secrets (worker/wrangler.toml holds only non-secret vars).
≈ “Common” is an estimate: at least 1 in 5 of the 29,248 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Career Pilot — Agent Guide
This file orients coding agents working in this repository. It is not a
product doc; see README.md and docs/ for that.
What this project is
React 19 + Vite SPA (frontend/) on Cloudflare Pages, backed by a single
Cloudflare Worker gateway (worker/) with Cloudflare D1. An optional Express
backend (backend/) handles PDF rendering, portfolio deploys, community,
queues and admin. A Chrome MV3 extension (extension/) tracks job listings.
Commands
# Install
npm run install:all
npm --prefix worker install
# Local dev
cd worker && npx wrangler d1 migrations apply DB --local && npx wrangler dev # :8787
cd frontend && npm run dev # :5173
cd backend && npm run dev # :5000 (optional)
# Checks
npm run lint # backend + frontend
npm run test:frontend # vitest
npm run test:backend # node:test
npm run test:worker # node:test (in-memory D1)
npm run test:all
npm run build # SPA + dist-portfolio
# Deploy (CI does this on main)
cd worker && npx wrangler deploy
cd frontend && npm run build && npx wrangler pages deploy dist --project-name=careerpilot --branch=mainArchitecture rules
- Auth is D1-native (
worker/src/auth.js): PBKDF2-SHA256 + HS256 JWT,auth_sessionsrows, Google/GitHub OAuth. The SPA usesfrontend/src/config/d1.js; do not add Clerk/Supabase/Firebase to the core. - Data goes through
/v1/db/*(worker/src/db.js→services/d1Data.js). Every user-owned query must includeuser_id = ?. Public reads are only byshare_tokenor public portfolio slug. - AI goes through
/v1/ai/generate(services/aiGateway.js). Platform mode uses Worker secrets; BYOK usesX-AI-*headers. KeepPROVIDER_REGISTRY(worker/src/index.js) andPROVIDER_META(frontend/src/stores/useAIConfigStore.js) in sync. - Express is optional. Don't move core flows back into it. New features should target the Worker unless they need Node-only libraries.
- Portfolio templates live in
frontend/src/components/portfolio/templates/<Id>/index.jsxand consumeusePortfolio(). The registry is filesystem-derived — no manual imports. - D1 migrations are append-only. Add
worker/migrations/000N_*.sql; never edit applied migrations. - CI:
.github/workflows/ci-cd.ymlruns frontend/backend/worker jobs, then onmainapplies D1 migrations, deploys the Worker and Pages, and runsscripts/verify-deploy.mjs. Update the docs when routes/env/schema change.
Conventions
- Match surrounding code style; ES modules, no TypeScript in app code (some UI
primitives are
.tsx). - Frontend data calls: use
services/api.js's facade ord1Data.js, not rawfetchin components. - Dates are ISO-8601 strings; D1 stores JSON in
TEXTcolumns. - Never commit secrets (
worker/wrangler.tomlholds only non-secret vars). - New env vars must be added to
docs/environment-setup.mdand the relevant.env.example.
Docs map
| Doc | Use |
docs/README.md | Index + freshness map |
ARCHITECTURE.md | System design, flows, security |
docs/DATABASE_SCHEMA.md | D1 tables/columns/indexes |
docs/UNIFIED_PLATFORM.md | Cloudflare architecture + runbook |
API_DOCS/README.md, API_DOCS/gateway.md | API contracts |
docs/portfolio-architecture.md, docs/creating-portfolio-themes.md | Portfolio internals |
docs/environment-setup.md, docs/deployment-setup.md | Env + deploy |
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

