Imported from clpi/xx (
AGENTS.md). Install upstream withnpx skills add clpi/xx. Copyright stays with the author.
Repository Guidelines
Project Structure & Module Organization
- Keep features grouped under
src/; mirror withtests/. - Place helper tooling in
scripts/, static data inassets/, docs indocs/, and CI in.github/.
Example layout:
src/
core/
api/
cli/
tests/
core/
api/
scripts/
assets/
docs/
.github/
Build, Test, and Development Commands
- Preferred (Make):
make setup— install deps and prepare local tooling.make run— run the app/CLI locally.make test— run full test suite with coverage.make lint— static checks (lint + type checks if applicable).make fmt— auto-format the codebase.
- If no Makefile exists, use native tools for your stack (e.g.,
python -m pytest,npm test,cargo test).
Coding Style & Naming Conventions
- Indentation: 4 spaces for Python; 2 spaces for web/TS.
- Line length target: 100 columns.
- Naming:
snake_casemodules/functions,PascalCaseclasses,camelCaselocals; JS/TS fileskebab-case, Python filessnake_case.py. - Formatting/Linting: Prettier (JS/TS), Ruff/Black (Python), shfmt (Shell). Run via
make fmtandmake lint.
Testing Guidelines
- Frameworks: pytest (Python) or Vitest/Jest (JS/TS). Keep tests close to subjects under
tests/feature_x/mirroringsrc/. - Naming: Python
test_*.py; JS/TS*.spec.ts/*.test.ts. - Coverage: aim ≥ 85% overall; changed lines ≥ 90%.
- Defaults: run fast unit tests; gate slow/e2e with a tag (e.g.,
-m 'not slow').
Commit & Pull Request Guidelines
- Use Conventional Commits:
feat:,fix:,docs:,refactor:,test:,chore:. - Commits are small and focused; subject ≤ 72 chars.
- PRs include purpose, approach, logs/screenshots when UI/CLI output changes, and linked issues.
- CI must pass:
make lint test(or native equivalents) before requesting review.
Security & Configuration
- Never commit secrets; store in environment variables. Provide
.env.examplewith safe defaults. - Validate inputs at boundaries (API, CLI, file IO) and add tests for failure paths.
- Pin critical dependencies when practical; document upgrade steps in
docs/.
Agent‑Specific Instructions
- This AGENTS.md applies repo-wide. Deeper AGENTS.md files take precedence for their subtrees.
- Prefer minimal, focused diffs; update docs and Makefile when adding commands.
- Follow existing code style; avoid unrelated changes.