Skip to content

Conversation

@bewithgaurav
Copy link
Collaborator

@bewithgaurav bewithgaurav commented Jan 5, 2026

Work Item / Issue Reference

AB#41340

GitHub Issue:


Summary

Add VS Code Copilot on-demand prompts to streamline developer workflows for the mssql-python project. These prompts provide guided assistance for common development tasks using VS Code Copilot agent mode.

Added 4 prompts in .github/prompts/:

Prompt Invocation Purpose
setup-dev-env.prompt.md /mssql-python-setup One-time dev environment setup (venv, Python, deps, prerequisites)
build-ddbc.prompt.md /mssql-python-build Rebuild C++ pybind11 extensions after code changes
run-tests.prompt.md /mssql-python-test Run pytest with various options (all, specific, coverage)
create-pr.prompt.md /mssql-python-pr Create well-structured PRs with GitHub MCP integration

Features

  • Agent mode enabled via YAML frontmatter for all prompts
  • Descriptive filenames without numeric prefixes for natural discovery
  • Project-namespaced invocations (mssql-python-*) to avoid conflicts with other workspace prompts
  • Cross-referenced prompts for seamless workflow transitions
  • Team-specific branch naming with prefixes for core team members
  • CI-compliant PR format matching pr-format-check.yml requirements
  • Comprehensive troubleshooting sections for common issues
  • Platform-specific guidance for macOS, Linux, and Windows
  • Smart venv detection across multiple venv patterns (myvenv, venv, .venv, testenv)
  • Directory management - Build prompt automatically returns to repo root after completion

Usage

Prerequisites:

  • VS Code with GitHub Copilot extension
  • Copilot Chat enabled

How to use:

  1. Open VS Code in the mssql-python workspace
  2. Open Copilot Chat (Cmd+Shift+I / Ctrl+Shift+I)
  3. Type / to see available prompts, or use directly:
    • /mssql-python-setup - First-time environment setup
    • /mssql-python-build - Rebuild C++ extension after changes
    • /mssql-python-test - Run pytest
    • /mssql-python-pr - Create a pull request

Example:

/mssql-python-test

Copilot will check prerequisites (venv, pytest, DB connection) and guide you through running tests.

Tip: Prompts are interactive - Copilot will ask clarifying questions and execute commands step-by-step.

- setup-dev-env: One-time environment setup (venv, deps, prerequisites)
- build-ddbc: Rebuild C++ pybind11 extensions
- run-tests: Run pytest with various options
- create-pr: Create well-structured pull requests with GitHub MCP

Prompts use agent mode and cross-reference each other for seamless workflow.
Copilot AI review requested due to automatic review settings January 5, 2026 13:49
@github-actions
Copy link

github-actions bot commented Jan 5, 2026

📊 Code Coverage Report

🔥 Diff Coverage

100%


🎯 Overall Coverage

76%


📈 Total Lines Covered: 5442 out of 7117
📁 Project: mssql-python


Diff Coverage

Diff: main...HEAD, staged and unstaged changes

No lines with coverage information in this diff.


📋 Files Needing Attention

📉 Files with overall lowest coverage (click to expand)
mssql_python.pybind.logger_bridge.hpp: 58.8%
mssql_python.pybind.logger_bridge.cpp: 59.2%
mssql_python.row.py: 66.2%
mssql_python.helpers.py: 67.5%
mssql_python.pybind.ddbc_bindings.cpp: 69.4%
mssql_python.pybind.ddbc_bindings.h: 71.7%
mssql_python.pybind.connection.connection.cpp: 73.6%
mssql_python.ddbc_bindings.py: 79.6%
mssql_python.pybind.connection.connection_pool.cpp: 79.6%
mssql_python.connection.py: 84.1%

🔗 Quick Links

⚙️ Build Summary 📋 Coverage Details

View Azure DevOps Build

Browse Full Coverage Report

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR introduces AI-powered Copilot prompts to streamline developer workflows for the mssql-python project. The prompts provide guided assistance through common development tasks including environment setup, building C++ extensions, running tests, and creating pull requests.

Key Changes:

  • Added 4 comprehensive prompt files in .github/prompts/ with agent mode enabled
  • Created cross-referenced workflow between prompts for seamless task transitions
  • Included platform-specific guidance for macOS, Linux, and Windows with detailed troubleshooting sections

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 10 comments.

File Description
.github/prompts/setup-dev-env.prompt.md Provides comprehensive one-time setup instructions for Python environment, dependencies, and platform-specific prerequisites
.github/prompts/build-ddbc.prompt.md Guides developers through rebuilding C++ pybind11 extensions after code changes
.github/prompts/run-tests.prompt.md Offers multiple test execution options with pytest, including coverage and selective test running
.github/prompts/create-pr.prompt.md Assists with PR creation following project conventions, including branch naming, CI requirements, and team-specific workflows

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

- Add security warnings for credentials and TrustServerCertificate=yes
- Reference pyproject.toml for Python version requirements
- Remove duplicate team member table, add maintenance note
- Fix git add/stash guidance inconsistencies
- Clarify that TrustServerCertificate is for local dev only
- Add sequential prerequisite checks: venv → pytest → DB connection
- Ask user for connection string if not set (instead of offering unit tests only)
- Remove 'unit tests only' option
- Consolidate connection string setup in prerequisites section
- Check if venv is already active first
- Search for common venv directories (myvenv, venv, .venv, testenv)
- Offer to create new venv if none found
Renamed prompts to reflect natural workflow sequence:
- 01-setup-dev-env.prompt.md (first-time setup)
- 02-build-ddbc.prompt.md (build C++ extension)
- 03-run-tests.prompt.md (run pytest)
- 04-create-pr.prompt.md (submit work)

Updated all cross-references between prompts
@bewithgaurav bewithgaurav changed the title FEAT: Introduce AI-powered Copilot prompts for developers FEAT: Introduce Copilot prompts for AI-assisted development Jan 5, 2026
@bewithgaurav bewithgaurav changed the title FEAT: Introduce Copilot prompts for AI-assisted development Add VS Code Copilot prompts for developer workflows Jan 5, 2026
…ools

- Added short names for easier invocation (/setup, /build, /test, /pr)
- Added descriptions for prompt picker
- Added argument hints to guide user input
- Set claude-sonnet-4 as preferred model
- Specified relevant tools for each prompt
- Remove argument-hint (prompts are interactive)
- Update tool names to new prefixed format (read/, search/, web/)
- Add github/* MCP server tools for PR creation
- Remove model field (use user's selected model)
Tools field was limiting agent capabilities. Removed to allow
full tool access based on VS Code settings.
@bewithgaurav bewithgaurav changed the title Add VS Code Copilot prompts for developer workflows FEAT: Introduce Copilot prompts for AI-assisted development Jan 5, 2026
…confusion

- Combine cd commands with build script to automatically return to root
- Update both macOS/Linux and Windows build commands
- Fix verification paths to assume repo root location
- Add note documenting the automatic directory return
- Prevents directory navigation issues during build verification
- All prompts now use numeric prefixes (01-04) for ordering
- Updated frontmatter with agent, description, and name fields
- Removed invalid/blocking fields (model, argument-hint, tools)
- Fixed tool references to use correct prefixes (read/, search/, web/)
- Build prompt enforces returning to repo root
- Test prompt has sequential prerequisites with proper venv checks
- setup -> mssql-python-setup
- build -> mssql-python-build
- test -> mssql-python-test
- pr -> mssql-python-pr

This provides better namespace clarity and avoids conflicts with other project prompts.
@saurabh500
Copy link
Contributor

The prompt file names have changed. Update the description to reflect the prompt files.

Also is it possible to drop the number prefix from the prompt files so that the prompts can be memorized with verbs/words rather than numbers. This will be a good usability boost

- Rename 01-setup-dev-env.prompt.md -> setup-dev-env.prompt.md
- Rename 02-build-ddbc.prompt.md -> build-ddbc.prompt.md
- Rename 03-run-tests.prompt.md -> run-tests.prompt.md
- Rename 04-create-pr.prompt.md -> create-pr.prompt.md

- Update all cross-references to use new names without numbers
- Improves discoverability and memorability of prompts
- Natural naming makes prompts easier to find via #mssql-python-*
…up prompts

- Add Step 4 in run-tests prompt to verify SQL Server is running before tests
- Run main.py to check connectivity and fail fast with helpful guidance
- Add comprehensive STEP 6 in setup-dev-env prompt for SQL Server setup
- Include Docker, native installation, and Azure SQL Database options
- Add detailed troubleshooting section with common issues and solutions
- Include connectivity testing with sqlcmd and Python
- Add debugging tools: port verification, log locations, network config
- Prevent wasted time on connection errors by validating environment first
@saurabh500
Copy link
Contributor

I tried the prompts. The dev env setup and the build-ddbc worked well.
The run tests prompt requires some refining.

@saurabh500
Copy link
Contributor

I dont have a need to create a PR, so couldnt try that prompt.

- Remove Driver={ODBC Driver 18 for SQL Server} from all connection string examples
- Driver is reserved and automatically added by the driver
- Update format to use SERVER=, DATABASE=, UID=, PWD= keywords
- Add Encrypt=yes parameter for security
- Add clarifying notes about Driver being auto-added
- Addresses Saurabh's review comment on PR #393
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-size: large Substantial code update

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants