An AI agent should attempt to run cli commands on behalf of the user when they are needed.
Before running any command as a terminal command, the AI agent should check if there is a relevant MCP (Machine Command Protocol) command available in the project. If there is, it should use that instead of running a terminal command directly.
Check type safety using the npm run typecheck
task instead of tsc
directly.
The database schema can be found in schema.ts.
For timestamp
and date
column types use { mode: "date" }
to give the column the Date
type.
When the database schema is changed run npm run generate
to generate a migration.
Review all generated migrations and if ok run npm run migrate
to apply them to the database.
When the schema of the connected PostgreSQL database changes npm run seed:sync
must be run to update the types used by the seed script. A TypeScript check should be done to verify the seed script is still valid.
This has been incredibly useful for automating the steps of turning Drizzle schema changes into a migration.
copilot-instructions.md is a part of your repository
.github/copilot-instructions.md
.Our primary goal is to get Copilot to use it's ability to execute npm tasks directly instead of it's ability to run an arbitrary terminal command.
This way you are able to give it workspace level permission to always run the safe generate, seed:sync, and typecheck commands without prompting.
migration.prompt.md lives in
.github/prompts/migration.prompt.md
inside your repo and creates a/migration
command you can use in Copilot.