Set up Copilot coding agent instructions and automated environment setup#1910
Set up Copilot coding agent instructions and automated environment setup#1910andrew-bierman merged 4 commits intomainfrom
Conversation
…tions Co-authored-by: andrew-bierman <94939237+andrew-bierman@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Adds repository-specific GitHub Copilot coding agent configuration so the agent can bootstrap the monorepo reliably (Bun + private package auth) and follow PackRat’s established architectural/coding patterns.
Changes:
- Added
.github/copilot-setup-steps.ymlto install Bun and runbun installwith the requiredPACKRAT_NATIVEWIND_UI_GITHUB_TOKEN. - Rewrote
.github/copilot-instructions.mdto remove duplication and document architecture, conventions, workflows, and common dev commands.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
.github/copilot-setup-steps.yml |
Automates agent environment bootstrap (Bun install + dependency install with private package token). |
.github/copilot-instructions.md |
Consolidates and expands agent guidance: architecture, coding conventions, workflows, validation, and timeouts. |
You can also share your feedback on Copilot code review. Take the survey.
| ### API Validation | ||
| ```bash | ||
| bun api | ||
| curl http://localhost:8787/api/health # expect 401 Unauthorized | ||
| ``` |
There was a problem hiding this comment.
The API validation example uses curl http://localhost:8787/api/health, but the API worker doesn't define a /api/health route (it mounts routes under /api/* and has a simple liveness endpoint at GET /). Also, a 401 expectation is only true for routes under protectedRoutes; public endpoints like /api/auth/*, /doc, and /scalar are accessible without bearer auth. Update the validation snippet to hit an existing endpoint and clarify what should/shouldn't require auth.
| - **ORM**: Drizzle ORM — define schemas in `packages/api/src/db/schema.ts` | ||
| - **Soft deletes**: Use a `deleted: boolean().default(false)` column, never hard-delete user data | ||
| - **Timestamps**: Always add `createdAt` and `updatedAt` server-controlled columns | ||
| - **Vector embeddings**: Use 1536-dimension vectors with HNSW cosine-similarity indexes |
There was a problem hiding this comment.
The Database conventions claim "never hard-delete user data" and "Always add createdAt and updatedAt". In the current API, the account deletion flow hard-deletes user rows and related data (e.g. db.delete(users) in packages/api/src/routes/auth/index.ts), and several tables only have createdAt (e.g. authProviders, oneTimePasswords, refreshTokens). Consider rephrasing these bullets to match current behavior (e.g. soft-delete for user-generated entities like packs/items, but account deletion is a hard delete; timestamps are recommended where needed for sync/auditing).
…instructions.md Co-authored-by: andrew-bierman <94939237+andrew-bierman@users.noreply.github.com>
|
@coderabbitai Please review this PR for code quality, best practices, and potential issues. |
🧩 Analysis chain🏁 Script executed: Length of output: 11540 🏁 Script executed: Length of output: 271
|
|
Important Review skippedBot user detected. To trigger a single review, invoke the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
@copilot CodeRabbit has provided review feedback on this PR. Please address the comments and suggestions. Once you've made the necessary changes, I'll ask CodeRabbit to re-review. |
…ocs, robust health check Co-authored-by: andrew-bierman <94939237+andrew-bierman@users.noreply.github.com>
Addressed all four CodeRabbit suggestions in commit
|
.github/copilot-setup-steps.ymlfor automated environment bootstrap.github/copilot-instructions.mdwith architecture overview, coding conventions, and reorganized sectionsGET /(public health check) and a real protected route (/api/packs) instead of non-existent/api/health--frozen-lockfiletobun installin copilot-setup-steps.yml to prevent silent lockfile driftsource ~/.bashrc→source "$HOME/.bun/env"for cross-shell compatibility (bash + zsh)bun cleandoes (removes node_modules, build artifacts, caches across all workspaces)Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.