str-agentic-adventures
CLAUDE.md4 starsChanged 6 months agoMITView on GitHub
- Reads credentials
- Commits and pushes
In this repository5 other files it gives its agents.
- adr-workflowSkill
- agent-frameworkSkill
- api-clientSkill
- databaseSkill
- releaseSkill
The file
We split this CLAUDE.md into the rules it gives an agent
9 rules. About 0 are common, 5 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
4
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
- Distinctive: line 4
Never commit secrets, API keys, or real connection strings.
- Very specific: line 10
After backend API schema changes, run ./scripts/generate-client.sh and commit the updated openapi.json + schema.d.ts.
- Very specific: line 13
All backend API calls MUST go through frontend/src/services/api.ts (the SDK service layer).
- Distinctive: line 17
Only exception: external service calls (e.g., Azure Realtime SDP exchange).
- Distinctive: line 28
Use SQLAlchemy ORM for all DB interactions — never raw sqlite3/psycopg2.
- Distinctive: line 33
When tests fail, fix the code — never rewrite tests just to make them pass.
- Distinctive: line 38
Use Bun over npm/npx for frontend.
- Very specific: line 39
Use gh CLI for all GitHub operations.
- Very specific: line 53
Use Conventional Commits (feat:, fix:, docs:, chore:).
≈ “Common” is an estimate: at least 1 in 5 of the 26,980 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
Secure the Realm — Claude Code Guidelines
Security Guardrails
- Never commit secrets, API keys, or real connection strings.
.env.exampleand docs must use placeholders likeyour-api-key-goes-here.- Real credentials: local
.env(gitignored), GitHub secrets, or Azure Key Vault only.
Critical Gotchas
src/api-client/schema.d.tsis auto-generated and committed to git (commit-and-verify pattern). Regenerate via./scripts/generate-client.sh(no running backend needed). Usesopenapi-typescript.- After backend API schema changes, run
./scripts/generate-client.shand commit the updatedopenapi.json+schema.d.ts.
Frontend API Access Pattern
- All backend API calls MUST go through
frontend/src/services/api.ts(the SDK service layer). services/api.tswraps theopenapi-fetchSDK client atapi-client/client.ts.- Components import from
services/api.ts, NEVER directly fromapi-client/. - Direct
fetch()calls to the backend are prohibited — use the SDK. - Only exception: external service calls (e.g., Azure Realtime SDP exchange).
Agent Framework
- Chat runs through the GA Microsoft Agent Framework (
agent-framework-foundry): the singletonagent_client_managerinbackend/app/agent_client_setup.pywraps aFoundryChatClient(Foundry project endpoint +DefaultAzureCredential). Chat agents callself.azure_client.chat_completion(...)(theirazure_clientis the manager); never instantiate clients directly. - Availability is config-based:
settings.is_foundry_configured()(chat) andsettings.is_azure_openai_configured()(images). When unconfigured, agents use deterministic fallback logic — never call Azure. CI has no secrets, so fallback must always work. - Per-agent model: set
deployment_settingon the agent (envAZURE_OPENAI_{DM,NARRATOR,COMBAT}_DEPLOYMENT, defaulting toAZURE_OPENAI_CHAT_DEPLOYMENT). No model router. - Images only:
azure_openai_client(AsyncAzureOpenAI.images.generate, gpt-image-1 family). Not for chat. - Circuit breaker (pybreaker) wraps the real Azure chat + image calls — 3 failures trips open, 60s auto-reset. Check
/health/dependencies. - See ADR-0023 (supersedes-in-part ADR-0018) for architectural decisions.
Database
- Use SQLAlchemy ORM for all DB interactions — never raw sqlite3/psycopg2.
- Alembic migrations run automatically on startup.
Testing
- Coverage: 90% new code, 85% overall. Never commit
.onlyor.skip. - When tests fail, fix the code — never rewrite tests just to make them pass.
Tooling
- Python:
uv sync,uv run pytest backend/tests/ -v,uv run ruff check . - Frontend:
cd frontend && bun dev,bun test:run,bun lint - Use Bun over npm/npx for frontend. Use Biome (not eslint) for linting/formatting.
- Use
ghCLI for all GitHub operations.
GitHub Workflow
- All work is tracked in GitHub issues (#567 is the master tracking issue). Use
gh issue listto find open work. - Start work: mention the issue number in commits. Use worktrees for isolation:
git worktree add. - Complete work: close with
gh issue close <number> -c "Fixed in <commit>". - Create issues:
gh issue create --title "type: description" --label "label". - Assign to Copilot (small, mechanical tasks):
gh issue edit <number> --add-assignee @copilot. - Assign to yourself:
gh issue edit <number> --add-assignee @me. - Review Copilot PRs:
gh pr list --author "app/copilot-swe-agent". Merge ready ones withgh pr merge <n> --squash. - Sync before work:
git pull --rebase origin mainthengit push origin main. - Labels:
priority:critical,priority:high,priority:medium,bug,security,cleanup,architecture,game-engine,frontend,infra,cost.
Commits
- Use Conventional Commits (
feat:,fix:,docs:,chore:). - Reference issues:
fix: migrate to gpt-image-1-mini (closes #408).
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.

