Skip to content

Onboard repository to Copilot cloud agent#30

Draft
Copilot wants to merge 6 commits into
mainfrom
copilot/add-copilot-instructions-md
Draft

Onboard repository to Copilot cloud agent#30
Copilot wants to merge 6 commits into
mainfrom
copilot/add-copilot-instructions-md

Conversation

Copy link
Copy Markdown

Copilot AI commented May 26, 2026

Adds the two files needed to make the Copilot cloud agent productive on first contact with this repo.

.github/copilot-instructions.md

Comprehensive reference the agent reads before every session:

  • Architecture — Django 5.2 API + React 19 SPA structure, FeatureStore singleton (features_and_index.npz not in git, mocked in tests), PostgreSQL pg_trgm requirement, URL/serializer conventions
  • Environment variables — table of which vars are required for tests vs production (YOUTUBE_API_KEY is exempt during manage.py test)
  • Commands — backend (coverage run manage.py test, min 80%), frontend (npm run build/lint), migrations
  • Testing conventionsAPITestCase + factory_boy, mock targets (rec.recommend, FeatureStore), reset_sequence in tearDownClass
  • Endpoint addition checklist — model → serializer → view → url → test → @extend_schema
  • Common errors & workarounds — missing .npz, missing pg_trgm extension, FeatureStore reinitialization error, missing YOUTUBE_API_KEY

.github/workflows/copilot-setup-steps.yml

Pre-warms the agent's environment so it can run tests immediately without trial-and-error dependency discovery:

  • postgres:17 service container with health check
  • Python 3.13.13 + requirements-test.txt (pip-cached)
  • CREATE EXTENSION IF NOT EXISTS pg_trgm via psql
  • python manage.py migrate
  • Node 24 + npm ci in frontend/ (npm-cached)

This comment was marked as outdated.

@RadValentin
Copy link
Copy Markdown
Owner

RadValentin commented Jun 2, 2026

Made changes so the agent environment has:

  • YT API key injected through repository secrets
  • A cached version of the AcousticBrainz sample dataset (100k entries) that it can run the ingest pipeline on
  • Actions running on Node 24

Up next: I need to personally review the copilot-instructions.md and ensure they're in line with how the project's supposed to work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make AI code reviews more insightful by defining custom instructions

3 participants