- Big picture vision is kept in
IDEA.md. - The specific plan we're executing is in
PLAN.md.
- Keep work aligned to
PLAN.md; propose plan updates if scope shifts. - Use
pixifor reproducible envs - Add small, focused docstrings and comments only where non-obvious intent needs clarity.
- Plans should include overviews of goals and success criteria.
- Plans should include summaries of decisions made and motivations for specific choices.
- The general format of a plan is as a series of "phases," each with a clear milestone at the end, and a to-do list of steps to be taken to get there.
- Each phase should be small enough to be represented as a single PR.
- Default to Pythonic patterns: type hints, f-strings, dataclasses where helpful, and small pure functions.
- Avoid hitting real AWS: mock AWS calls with
motoand inject sessions/clients for testability. - Prefer dependency injection for boto3 clients; never hardcode regions or credentials.
- Tests: aim for fast, isolated
pytestcases; use fixtures for setup/teardown; measure coverage withpytest-covwhen meaningful. - Run tests with
pytestto ensure that they pass before sharing code.
- Keep infrastructure code formatted and validated:
tofu fmtandtofu validatebefore sharing. - Separate plan/apply steps; never apply without review. Capture variables in
.tfvarsor env, not inline secrets. - AWS resources should be tagged with
managed_by, defaulting tolambdacronif not set.
- Use structured logging over prints; avoid noisy logs in hot paths.
- Fail fast with clear errors; prefer explicit exceptions to silent fallbacks.
- Keep configuration externalized (env vars/config files) and document defaults.
- Write docs in Markdown and keep them under
docs/for MkDocs rendering. - Follow Diataxis and keep content intent-specific:
docs/tutorials/for guided learning.docs/how-to/for task-oriented procedures.docs/reference/for factual API/module/config details.docs/explanation/for rationale, tradeoffs, and architecture context.
- Do not mix Diataxis types on a single page; split pages when intent changes.
- Any PR that changes behavior, inputs/outputs, or operations should update the corresponding docs in the same PR.
- Prefer runnable, copy/paste-safe examples with prerequisites and expected outcomes.
- Keep MkDocs navigation explicit in
mkdocs.ymland use stable page paths/titles to reduce link churn.