Skip to content

Conversation

Copy link

Copilot AI commented Aug 28, 2025

This PR adds a comprehensive .github/copilot-instructions.md file that provides GitHub Copilot coding agents with detailed guidance on how to work effectively in the PostgreSQL Query Builder codebase.

What's Included

The instructions cover all essential aspects for a coding agent working with a fresh clone:

  • Setup & Dependencies: Exact commands for npm install with timing expectations (~2-3 seconds)
  • No Build Required: Clear guidance that this is pure JavaScript with no build step
  • Testing Strategy: Since no formal test suite exists, detailed manual validation approaches including:
    • Running the provided examples (queryBuilder.examples.js)
    • Creating custom validation scripts in /tmp
    • Testing both PostgreSQL and MySQL dialects via DB_DIALECT environment variable
  • Repository Structure: Overview of key files and their purposes
  • Development Guidelines: Best practices for making changes with emphasis on manual validation
  • Comprehensive Validation: End-to-end test script for thorough functionality verification

Key Features

  • Imperative tone throughout ("Run this command", "Do not do this")
  • All commands validated - every single command in the instructions has been tested to ensure it works
  • Database dialect support - Clear instructions for testing both PostgreSQL ($1, $2, ...) and MySQL (?) parameter binding
  • Manual testing patterns - Practical examples since no formal test infrastructure exists
  • Quick reference commands - Copy-pasteable validation commands for common scenarios

Example Usage

The instructions enable agents to quickly validate changes:

# Basic functionality test
node -e "const QB=require('./queryBuilder'); const q=new QB.QueryBuilder().select('*').from('users').sql(); console.log('✓ Works:', !!q.sql)"

# MySQL dialect test  
DB_DIALECT=mysql node -e "const QB=require('./queryBuilder'); const q=new QB.QueryBuilder().select('*').whereEquals('id',1).sql(); console.log('MySQL:', q)"

The comprehensive validation script tests library loading, instance creation, SQL generation, parameter binding, and JOIN functionality - providing confidence that changes don't break core functionality.

Fixes #5.


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

Copilot AI and others added 2 commits August 28, 2025 08:23
Co-authored-by: mattstabeler <237220+mattstabeler@users.noreply.github.com>
Co-authored-by: mattstabeler <237220+mattstabeler@users.noreply.github.com>
Copilot AI changed the title [WIP] ✨ Set up Copilot instructions Add comprehensive GitHub Copilot instructions for PostgreSQL Query Builder Aug 28, 2025
Copilot AI requested a review from mattstabeler August 28, 2025 08:33
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

2 participants