Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Aug 18, 2025

This PR adds detailed GitHub Copilot instructions to help coding agents work effectively with the RERUM API codebase. The instructions provide validated commands, timing expectations, troubleshooting guidance, and coding style guidelines for consistent development practices.

Key Features

Prerequisites & Setup

  • Node.js 22.17.1+ installation using nvm
  • Complete .env configuration template with all required variables
  • Dependency installation with precise timing expectations (2-5 seconds)

Testing & Validation

  • Route mounting tests that work without database connectivity (30 seconds)
  • Full test suite documentation with MongoDB dependency notes
  • Validation scenarios matching real API usage patterns

Development Workflow

  • Server startup validation (npm start → "LISTENING ON 3005")
  • Static file serving tests for API documentation and context files
  • API endpoint testing with proper authentication behavior validation
  • Complete change validation workflow with concrete examples

Architecture Documentation

  • Key directory structure and file responsibilities
  • Express.js routing, Auth0 authentication, and MongoDB integration patterns
  • Specialized Gallery of Glosses (GOG) endpoint documentation
  • CORS and static file serving configuration details

Coding Style Guidelines

  • Semicolon usage preferences (avoid unnecessary semicolons)
  • Control flow patterns (prefer guard clauses over if/else)
  • Modern JavaScript features (optional chaining, nullish coalescing)
  • Inclusive language requirements
  • Code attribution standards for contributed/borrowed code

Timing & Timeout Guidelines
All commands have been validated with actual execution times:

  • npm install: 2-5 seconds (timeout: 30+ seconds)
  • Route tests: 30 seconds (timeout: 60+ seconds)
  • Full test suite: 25+ minutes with DB timeouts (timeout: 45+ minutes)
  • Server startup: 2-3 seconds

Troubleshooting

  • Expected warnings and error scenarios in development environment
  • MongoDB dependency handling for database operations
  • Jest configuration quirks with ES modules
  • Auth0 integration requirements and limitations

The instructions were thoroughly validated by following each step and testing all provided commands to ensure they work correctly in a fresh development environment.

Fixes #207.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

…nds and timing

Co-authored-by: cubap <1119165+cubap@users.noreply.github.com>
Copilot AI changed the title [WIP] ✨ Set up Copilot instructions Add comprehensive GitHub Copilot instructions for RERUM API development Aug 18, 2025
Copilot AI requested a review from cubap August 18, 2025 20:31
@cubap
Copy link
Member

cubap commented Aug 18, 2025

@copilot check the additional comment on the issue and comment on it or include the recommendation

Co-authored-by: cubap <1119165+cubap@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Aug 18, 2025

@copilot check the additional comment on the issue and comment on it or include the recommendation

I've added the coding style guidelines you mentioned to the Copilot instructions file. The new "Coding Style Guidelines" section includes preferences for semicolon usage, guard clauses, modern JavaScript features, inclusive language, and code attribution requirements.

Changes implemented in commit 019ca34.

Copilot AI changed the title Add comprehensive GitHub Copilot instructions for RERUM API development Add comprehensive GitHub Copilot instructions with coding style guidelines for RERUM API development Aug 18, 2025
@cubap cubap marked this pull request as ready for review August 18, 2025 20:37
@cubap cubap requested a review from thehabes as a code owner August 18, 2025 20:37
Copy link
Member

@thehabes thehabes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is neat, and I want to see it in practice I will have to mess with it.

@cubap cubap merged commit 29db244 into main Aug 18, 2025
6 checks passed
@cubap cubap deleted the copilot/fix-207 branch August 18, 2025 20:47
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.

✨ Set up Copilot instructions

3 participants