agentleFS
anurag3407anurag3407/career-pilot/CLAUDE.md

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
  1. Very specific:

    Every user-owned query must include user_id = ?

    line 44
  2. Distinctive:

    Express is optional: Don't move core flows back into it.

    line 50
  3. Very specific:

    D1 migrations are append-only: Add worker/migrations/000N_*.sql.

    line 55
  4. Very specific:

    Never commit secrets (worker/wrangler.toml holds only non-secret vars).

    line 68

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
CLAUDE.md

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=main

Architecture rules

  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; do not add Clerk/Supabase/Firebase to the core.
  2. Data goes through /v1/db/* (worker/src/db.js → services/d1Data.js). Every user-owned query must include user_id = ?. Public reads are only by share_token or public portfolio slug.
  3. AI goes through /v1/ai/generate (services/aiGateway.js). Platform mode uses Worker secrets; BYOK uses X-AI-* headers. Keep PROVIDER_REGISTRY (worker/src/index.js) and PROVIDER_META (frontend/src/stores/useAIConfigStore.js) in sync.
  4. Express is optional. Don't move core flows back into it. New features should target the Worker unless they need Node-only libraries.
  5. Portfolio templates live in frontend/src/components/portfolio/templates/<Id>/index.jsx and consume usePortfolio(). The registry is filesystem-derived — no manual imports.
  6. D1 migrations are append-only. Add worker/migrations/000N_*.sql; never edit applied migrations.
  7. CI: .github/workflows/ci-cd.yml runs frontend/backend/worker jobs, then on main applies D1 migrations, deploys the Worker and Pages, and runs scripts/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 or d1Data.js, not raw fetch in components.
  • Dates are ISO-8601 strings; D1 stores JSON in TEXT columns.
  • Never commit secrets (worker/wrangler.toml holds only non-secret vars).
  • New env vars must be added to docs/environment-setup.md and the relevant .env.example.

Docs map

DocUse
docs/README.mdIndex + freshness map
ARCHITECTURE.mdSystem design, flows, security
docs/DATABASE_SCHEMA.mdD1 tables/columns/indexes
docs/UNIFIED_PLATFORM.mdCloudflare architecture + runbook
API_DOCS/README.md, API_DOCS/gateway.mdAPI contracts
docs/portfolio-architecture.md, docs/creating-portfolio-themes.mdPortfolio internals
docs/environment-setup.md, docs/deployment-setup.mdEnv + deploy

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.