harness-python-react
CLAUDE.md2 starsChanged 7 months agoMITView on GitHub
You are working in harness-python-react, a template repo whose harness IS the product. Code quality here is enforced mechanically — every gate fails CI, not just tests. Keep that bar as you work. A production-quality LLM-driven coding harness over a minimal FastAPI + React scaffold. The point isn't the features (one /health, one /echo, one hello page); the point is that every layer of the pipeline — lint, types, architecture, security, eval, agent hooks — catches a different failure class…
- Reads credentials
In this repository6 other files it gives its agents.
- architectSkill
- code-reviewerSkill
- devopsSkill
- frontendSkill
- qa-engineerSkill
- technical-writerSkill
The file
We split this CLAUDE.md into the rules it gives an agent
12 rules. About 0 are common, 1 is distinctive, and 11 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.
11
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 27
Type hints: every public function. from __future__ import annotations at module top.
- Very specific: line 29
API: every route under /api/v1/.
- Very specific: line 36
Don't bypass gates. --no-verify / --no-hooks / --no-gpg-sign are blocked by pretooluse_bash.py for a reason.
- Very specific: line 37
Don't introduce a new commit-type prefix without updating both pyproject.toml's commitizen schema AND pr-title.yml (the Commit-type sync …
- Very specific: line 38
Don't add a CI job without listing it in .github/branch-protection/{develop,main}.json (the Branch-protection contexts sync meta-gate will …
- Very specific: line 39
Don't skip the architecture contract by accident — lint-imports runs in CI and locally via just architecture.
- Very specific: line 40
Don't write code without tests.
- Very specific: line 41
Don't hand-roll secrets into config.
- Distinctive: line 42
Don't create files unless they're necessary.
- Very specific: line 59
If the change touches a gate, update the meta-gate inputs (branch-protection/*.json, pr-title.yml, check_required_contexts.py's exemption …
- Very specific: line 60
If the change touches an invariant, decide whether the invariant is wrong (update docs/INVARIANTS.md in the same PR) or the change is wrong …
- Very specific: line 61
If a CI job is failing for a reason that doesn't match the change, dig — don't reroll.
≈ “Common” is an estimate: at least 1 in 5 of the 28,633 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 — agent project instructions
You are working in harness-python-react, a template repo whose harness IS the product. Code quality here is enforced mechanically — every gate fails CI, not just tests. Keep that bar as you work.
What this repo is
A production-quality LLM-driven coding harness over a minimal FastAPI + React scaffold. The point isn't the features (one /health, one /echo, one hello page); the point is that every layer of the pipeline — lint, types, architecture, security, eval, agent hooks — catches a different failure class without anyone remembering to run it.
Read first
docs/HARNESS.md— umbrella; the controls and where they live.docs/INVARIANTS.md— the load-bearing rules. Every PR is checked against them.docs/BOUNDARIES.md— layered import-linter contract; reverse imports fail CI.docs/DEVELOPMENT.md— branching, commit format, justfile, CI overview.
Workflow
- One issue per change. Branch name:
feat|fix|chore|docs|test|refactor/<issue-number>-<kebab-title>. - One PR per branch, base
develop. PR title = the conventional-commit subject. develop → mainhappens via arelease:PR.- The pre-push gate is
just check(lint + typecheck + architecture + tests). Run it before pushing. - For frontend changes, also run
just frontend-check.
Code conventions
- Python: 3.14,
uv run --frozeneverywhere, mypy--strict, ruff with the wide select set (E W F I N UP B SIM TCH S RUF). - Type hints: every public function.
from __future__ import annotationsat module top. - Models: anything crossing a module / process seam inherits from
StrictModel(src/models/_base.py).extra="forbid". Addstrict=Trueto the class when you want strict type coercion (rejecting"3.14"→ float). - API: every route under
/api/v1/. Typed Pydantic responses, not raw dicts. - Layer flow: one-way. Reverse imports are a CI failure. See
docs/BOUNDARIES.md. - Observability: OTel
agent_span(...)for any operation in the request path; semconv-defined attribute keys only (constants at the top ofsrc/observability/spans.py). - Frontend: React 19 + TS strict; functional components + hooks; never
dangerouslySetInnerHTMLon backend output; SSE consumers use the typed primitive atfrontend/src/lib/api/client.ts.
What NOT to do
- Don't bypass gates.
--no-verify/--no-hooks/--no-gpg-signare blocked bypretooluse_bash.pyfor a reason. If a hook is wrong, fix the hook. - Don't introduce a new commit-type prefix without updating both
pyproject.toml's commitizen schema ANDpr-title.yml(theCommit-type syncmeta-gate will fail otherwise). - Don't add a CI job without listing it in
.github/branch-protection/{develop,main}.json(theBranch-protection contexts syncmeta-gate will fail). - Don't skip the architecture contract by accident —
lint-importsruns in CI and locally viajust architecture. - Don't write code without tests. Coverage gate is 75% on
src/. - Don't hand-roll secrets into config. Use env /
.env(gitignored) →Settingsfromsrc/models/config.py. - Don't create files unless they're necessary. The scaffold has no dead modules.
Use the skills
The agent-side skills in .claude/skills/ auto-activate based on context:
architect— when designing module boundaries, API contracts, layer-flow decisions.code-reviewer— after writing/editing code; runs the 10-point review checklist.devops— when touching Docker, CI, pyproject.toml, observability config.frontend— when working infrontend/(React 19 + TS + Vite).qa-engineer— when writing tests or extending the eval harness.technical-writer— when updating docs / READMEs.
Trust their guidance — they encode this project's conventions.
When in doubt
- If the change touches a gate, update the meta-gate inputs (
branch-protection/*.json,pr-title.yml,check_required_contexts.py's exemption list). - If the change touches an invariant, decide whether the invariant is wrong (update
docs/INVARIANTS.mdin the same PR) or the change is wrong (rework). - If a CI job is failing for a reason that doesn't match the change, dig — don't reroll. Recent fix patterns: tag-vs-commit SHA in pinned action references,
if: hashFiles(...)startup failures (see project-memory), pytest exit-5 on empty test suites.
The harness exists to make sloppy work hard. Lean into it — when a gate trips, it's protecting the next person reading this codebase.
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.

