Customize Exponent for your codebase
exponent.txt
are included whenever a message is handled by Exponent, helping it understand your project’s structure, conventions, and best practices.
If you are familiar with .cursorrules
or .github/copilot-instructions.md
files, exponent.txt
is similar in spirit for Exponent.
exponent.txt
file:
exponent.txt
file. Try this prompt:
Explore my codebase and create an exponent.txt file that describes the project structure, coding conventions, and important guidelines.
exponent.txt
file for a project. Notice that it does not adhere completely to the instructions above, but is catered to the specific project, developers, and types of tasks that Exponent is being used for.
Sample exponent.txt
tests/
and are generally one file per-route. So, tests for GET /friends
go in tests/test_get_friends.py
tests/test_add_user_device.py
and tests/test_update_user_device.py
api/endpoints
; for example, new endpoints for “friends” goes in api/endpoints/friends.py
api/api_router.py
, following the examples provided therein.api/endpoints/devices.py
external_services.py
.models.py
: Add it to the model with the correct sqlalchemy column mapping (e.g. in the User model, add: is_active: Mapped[bool] = mapped_column( Boolean, default=True, nullable=False,)
)schemas.py
: Add it to any appropriate schemas (e.g. UserResponse)