Guidance for Claude Code in this repository. Topic rules live in .claude/rules/ and load automatically (path-scoped ones only when you touch matching files).
Production-grade blueprint for AWS Serverless services in Python: a Lambda handler skeleton plus CDK deployment code, a CI/CD pipeline, and tests.
- Runtime: Python
>=3.14, managed withuv. Infra: AWS CDK. Docs: MkDocs → GitHub Pages.
- service/ — app code, layered
handlers/→logic/→dal/, withmodels/(Pydantic) shared. - cdk/ — CDK stacks and constructs (
cdk/service/). - tests/ —
unit/,integration/,infrastructure/,e2e/. - docs/ — documentation and runnable examples.
.claude/rules/makefile.md— command reference; always usemaketargets. (loaded every session).claude/rules/github-actions.md— CI workflows; SHA-pinning. (scoped to.github/workflows/).claude/rules/service.md— handler/logic/dal layering, Powertools, Pydantic. (scoped toservice/).claude/rules/models.md— Pydantic model conventions and placement. (scoped toservice/**/models/).claude/rules/testing.md— unit / integration / e2e / infra test patterns. (scoped totests/).claude/rules/cdk.md— construct and stack structure. (scoped tocdk/).claude/rules/docs.md— Zensical build, markdownlint, OpenAPI sync. (scoped todocs/).claude/rules/security.md— secrets, IAM, cdk-nag, WAF, OIDC. (loaded every session).claude/rules/dependencies.md— uv + npm,make update-deps, audits. (loaded every session).claude/rules/git-pr.md— Conventional Commits, release bumps, PR labels. (loaded every session)
- Explore the relevant
service/layer and its tests before proposing changes; name the files you'll touch. - Respect the layering — never move logic into handlers or bypass the DAL.
- Every behavior change names the suite that covers it and updates/adds tests.
- Never run cloud-mutating commands while planning or exploring —
make deploy/destroy,cdk deploy/destroy,aws …. Planning uses read-only and local commands only. - Verify before claiming done: run
make lintplus the narrowest relevant suite; report real output.