claude-architect / cca-cert-buddy
CLAUDE.md90 starsChanged 6 months agoMITView on GitHub
Guidance for Claude Code when working in this sub-project. This is a self-contained web app inside the claude-architect course repo. A local-first CCA-F exam study aid whose own architecture demonstrates the five CCA-F exam domains. It is a real app - Express backend, standalone MCP server, vanilla-TS SPA, SQLite store - not a Copilot agent pack. When you change a layer, keep it both a working feature AND a clean teaching example of its domain. The loop.ts switch (stopReason) must…
In this repository2 other files it gives its agents.
- claude-cookbooks-main/CLAUDE.mdCLAUDE.md
- CLAUDE.mdCLAUDE.md
The file
We split this CLAUDE.md into the rules it gives an agent
3 rules. About 0 are common, 0 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
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
- Very specific: line 28
Paths: never hand-roll join(here, "..", ...).
- Very specific: line 32
No em dashes (use - ), no "ask" as a noun, no AWS mentions, bold key terms in docs.
- Very specific: line 39
If you touched the agent core or MCP server, run a live npm run generate -- --count 1 (needs a key) and confirm the agent trace looks right.
≈ “Common” is an estimate: at least 1 in 5 of the 12,729 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
CLAUDE.md - cca-cert-buddy
Guidance for Claude Code when working in this sub-project. This is a self-contained web app inside the claude-architect course repo.
What this is
A local-first CCA-F exam study aid whose own architecture demonstrates the five CCA-F exam domains. It is a real app - Express backend, standalone MCP server, vanilla-TS SPA, SQLite store - not a Copilot agent pack. When you change a layer, keep it both a working feature AND a clean teaching example of its domain.
Domain-to-code map (do not break these mappings)
| Domain | The code that demonstrates it |
| D1 Agentic | server/agent/loop.ts (explicit stop_reason switch), server/agent/subagent-validator.ts |
| D2 Tools/MCP | mcp-server/* (all three primitives), server/agent/mcp-client.ts (runtime discovery) |
| D3 Claude Code | mcp-server/prompts.ts (MCP prompts), this file |
| D4 Structured output | server/agent/generate.ts (forced tool_choice, validate-and-repair) |
| D5 Context | isolated per-call context in generate.ts, dup guard in shared/question-validator.ts |
The loop.ts switch (stopReason) must keep an explicit, documented branch for every value (end_turn, tool_use, max_tokens, pause_turn, stop_sequence, refusal). That switch IS the Domain 1 lesson - do not collapse it into an if.
Stack and conventions
- TypeScript everywhere. ESM (
"type": "module"),NodeNextresolution. Import paths use the.jsextension even for.tssources. - Backend: Express 5, better-sqlite3, run via
tsxin dev. - Frontend: vanilla TS + Vite. No framework, no CSS library. Keep it that way - the small dependency surface is deliberate.
- Validation: zod for API bodies and the MCP tool schemas.
- Models:
claude-haiku-4-5by default;claude-sonnet-4-6only for question authoring (AUTHORING_MODELinserver/anthropic.ts). Never Opus. - Paths: never hand-roll
join(here, "..", ...). Import anchors fromshared/paths.tsso code resolves correctly whether run as.tsvia tsx or as compiled.jsfromdist/.
Voice rules (enforced by the validator)
No em dashes (use -), no "ask" as a noun, no AWS mentions, bold key terms in docs. shared/question-validator.ts enforces these on every question; npm run validate:bank is the gate.
Before you commit
npm run build- both client and server must compile clean.npm test- thenode:testsuite must pass.npm run validate:bank- the question bank must stay structurally clean.- If you touched the agent core or MCP server, run a live
npm run generate -- --count 1(needs a key) and confirm the agent trace looks right.
Things that will bite you
- The Bash tool's working directory does not persist between calls on this box - prefer PowerShell, or prefix every Bash call with
cd. data/question-bank.jsonis committed and seeded from the parent repo'spractice-questions.json. Re-runningnpm run seedreplaces onlysource: "seed"entries; generated questions survive..data/progress.dbis gitignored runtime state. The test suite appends rows to it - that is expected for a local study aid.- The MCP client spawns
mcp-server/index.tsviatsx, so the.tssource must ship alongside the build.
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.

