AGENTS.md
This file provides information about this project and instructions on how to develop code for it.
Information
- The
README.mdfile contains a section titled “Functionality” that describes the intended functionality of the application.
Commands
The application and its Pyenv environments are managed using a Makefile:
make env-dev: Activates the Pyenv development environment. This must be done before executing any Python code.make run: Activates the Pyenv run environment and starts the development server using gunicorn with eventlet workers.make lint: Activates the Pyenv development environment and runsruffto detect linting mistakes.make test: Activates the Pyenv development environment and runs all tests.make coverage: Provides a tabular overview of the test code coverage.- Add new Python dependencies to
requirements.base.txtwithout specifying versions, AND add them with version torequirements.txt. Then, runmake envsto install these dependencies in all Pyenv environments. - Always run
make lint,make testandmake coverageafter making changes to verify the code is lint-free and tests pass and maintain coverage.
Dependencies
The project uses two requirements files:
requirements.base.txt: Base dependencies without version constraints. Used bytoxfor testing environments. Always add new dependencies here first.requirements.txt: Locked dependencies with specific versions. Used by the runtime environment.
When adding a new dependency:
- Add the package name to
requirements.base.txt(no version) - Add the package with version to
requirements.txt - Run
make envsto update all environments
Architecture
The codebase is organized into two directories: modulename and tests.
- The
moduledirectory contains the main application logic. - The
testsdirectory contains unit and integration tests.
The application is built using Baseweb, a wrapper around Flask. It also provides a configured Flask-RESTful instance and access to Flask-SocketIO. Front-end support is provided through Vue and Vuetify. Backend Python code and frontend JavaScript code are kept together in a module directory, which is imported from the main application logic.
Best Practices to Strictly Follow
- VERY IMPORTANT: You MUST avoid using the Bash tool for search commands like find and grep. Instead use Grep, Glob, or Task to search.
- Always begin with an overview of your plan
- Always explain your actions before executing them.
- Always use two spaces for indentation in all file types.
- Always write tests for new functionality and integrate them into the
testsdirectory. - Ensure that all tests are working at all times.
- Maintain test coverage.
- Ensure that every exception in the backend code is captured gracefully and reported back to the client in a human readable format. Also log the problem with context.
- Ignore the
.localfolder. - Ignore the
notesfolder. - Continue working on unchecked tasks from the
TODO.mdfile in a top-down manner. Treat each task as the next prompt to process. Cross the Markdown checkbox when a task is completed and move it to the bottom of the file. At the end of each task, request a review before proceeding to the next task.