- Never commit to
master. Alwaysgit checkout -b <feature-branch>before editing. Land via PR. - Every PR bumps the version. Even doc-only PRs — at minimum a patch bump. Update
gtfparse/__init__.py::__version__. - "Done" means merged AND deployed to PyPI — never stop at merge. After a PR merges, run
./deploy.shfrom a clean master. Skipping deploy = task not done. - File problems as issues, don't silently work around them. If you hit a bug here or in a sibling openvax/pirl-unc repo, open a GitHub issue on the correct repo and link it from the PR.
- After a PR ships, look for the next block of work. Read open issues across the relevant openvax repos, group by dependency + urgency. Prefer foundational changes that unblock multiple downstream improvements; otherwise chain the smallest independent improvements.
Before considering any code change complete, you MUST:
- Run
./lint.sh- Verify linting passes (runsruff check) - Run
./test.sh- Verify all tests pass with coverage
Do not tell the user you are "done" or that changes are "complete" until both pass.
./lint.sh- Checks linting with ruff (must pass). Always use this for linting if it exists../test.sh- Runs pytest with coverage (must pass)./lint-and-test.sh- Runs lint and test back-to-back./deploy.sh- Deploys to PyPI (gates on lint.sh and test.sh). Always use this for deploying if it exists../develop.sh- Installs package in development mode (pip install -e .)
- Use ruff for linting
- Configuration is in
pyproject.tomlunder[tool.ruff] - Target Python version: 3.9+ (CI matrix runs 3.9 / 3.10 / 3.11)
- Package:
gtfparse/(thin library — attribute parsing, GTF reading, missing feature creation) - Tests:
tests/(pytest; fixtures undertests/data/) - Core deps: polars, pyarrow, pandas (see
requirements.txt) - Version lives in
gtfparse/__init__.pyand is exposed viasetuptools.dynamicinpyproject.toml
- For ANY non-trivial task (3+ steps or architectural decisions): write a detailed spec before touching code
- If something goes sideways, STOP and re-plan immediately — don't keep pushing
- Use planning/verification steps, not just building
- Write detailed specs upfront to reduce ambiguity
- After ANY correction from the user: update
tasks/lessons.mdwith the pattern - Write rules for yourself that prevent the same mistake
- Ruthlessly iterate on these lessons until mistake rate drops
- Review lessons at session start for relevant project
- Never mark a task complete without proving it works
- Diff behavior between the latest code and your changes when relevant
- Ask yourself: "Would a staff engineer approve this?"
- Run tests, check logs, demonstrate correctness
- For non-trivial changes: pause and ask "is there a more elegant way?"
- If a fix feels hacky: "Knowing everything I know now, implement the elegant solution"
- Skip this for simple, obvious fixes — don't over-engineer
- Challenge your own work before presenting it
- When given a bug report: just fix it. Don't ask for hand-holding
- Point at logs, errors, failing tests — then resolve them
- Zero context switching required from the user
- Fix failing unit tests without being told how
- Plan First: Write plan to
tasks/todo.mdwith checkable items - Verify Plan: Check in before starting implementation
- Track Progress: Mark items complete as you go
- Explain Changes: High-level summary at each step
- Document Results: Add review section to
tasks/todo.md - Capture Lessons: Update
tasks/lessons.mdafter corrections
- Simplicity First: Make every change as simple as possible. Impact minimal code.
- No Laziness: Find root causes. No temporary fixes. Senior developer standards.
- Minimal Impact: Changes should only touch what's necessary. Avoid introducing bugs.
- Read the literature: if some code involves genomic or biological concepts (GTF/GFF formats, feature hierarchies, attribute conventions), feel free to search for specs/review papers before changing code that expresses scientific concepts.
- Flag inconsistencies: if code expresses a scientific model that's at odds with your understanding, note that inconsistency and ask for clarification.