Skip to content

docs: add CLAUDE.md onboarding guide - #30

Merged
antosubash merged 1 commit into
mainfrom
feature/confident-matsumoto-44e328
Apr 17, 2026
Merged

antosubash merged 1 commit into
mainfrom
feature/confident-matsumoto-44e328

Conversation

@antosubash

Copy link
Copy Markdown
Owner

Summary

Adds a top-level CLAUDE.md so future Claude Code sessions can be productive without reverse-engineering the repo.

What's in it

  • Commands: the make targets a session will actually invoke, including how to run a single pytest / vitest test.
  • Architecture: the non-obvious pieces that require reading multiple files — entry-point discovery + topological sort, lifecycle hook ordering, LIFO middleware pipeline, per-module DB isolation (Postgres schema vs SQLite __tablename__ prefix), host-owned Alembic migrations with per-module branch_labels, and the Inertia page-key mapping (<ModuleName>/<PageName> → modules/<name>/<name>/pages/<PageName>.tsx).
  • Conventions: SQLModel-everywhere (no Pydantic BaseModel or DeclarativeBase), the 300-line file cap, SM_<MODULE>_* settings convention, the framework→plugin import ban (SM009), the Zod-inside-useT() gotcha, and the ty rules deliberately disabled for SQLModel.
  • Diagnostic codes (SM001–SM016) that show up in make doctor.
  • Tests & fixtures: what conftest.py actually provides (db_session, client, authenticated_client with forged session cookie + CSRF).
  • Pointers to docs/framework-conventions.md, docs/module-authoring.md, docs/e2e-testing.md, and docs/plans/ as source of truth rather than duplicating them.

Why

Without this, a fresh Claude Code session spends its first several turns re-discovering the module system, the SM* diagnostic codes, the LIFO middleware ordering, and the SQLModel-vs-Pydantic rule. The doc consolidates what's non-obvious and links to the authoritative references for everything else.

Test plan

  • cat CLAUDE.md renders the expected sections
  • Linked paths resolve (docs/framework-conventions.md, docs/module-authoring.md, docs/e2e-testing.md, docs/plans/)
  • No source files changed — CI's non-doc checks should be unaffected

Captures the non-obvious pieces of the repo so future Claude Code
sessions don't have to reverse-engineer them: make targets (including
single-test invocation), entry-point discovery and topo-sorted lifecycle
hooks, LIFO middleware pipeline, per-module DB isolation, host-owned
Alembic migrations, Inertia page-key mapping, the SQLModel-everywhere
rule, the 300-line file cap, the SM_<MODULE>_* settings convention, and
the ty rules deliberately disabled for SQLModel. Points at
docs/framework-conventions.md and docs/module-authoring.md as the
source of truth rather than duplicating them.
@antosubash
antosubash merged commit b4b944c into main Apr 17, 2026
8 checks passed
@antosubash
antosubash deleted the feature/confident-matsumoto-44e328 branch October 8, 2026 11:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant