-
Notifications
You must be signed in to change notification settings - Fork 33
FEAT: Introduce Copilot prompts for AI-assisted development #393
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
- 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.
📊 Code Coverage Report
Diff CoverageDiff: main...HEAD, staged and unstaged changesNo 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
|
There was a problem hiding this 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
…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.
…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.
|
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-*
…b.com/microsoft/mssql-python into bewithgaurav/feat/add-copilot-prompts
…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
|
I tried the prompts. The dev env setup and the build-ddbc worked well. |
|
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
Work Item / Issue Reference
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/:setup-dev-env.prompt.md/mssql-python-setupbuild-ddbc.prompt.md/mssql-python-buildrun-tests.prompt.md/mssql-python-testcreate-pr.prompt.md/mssql-python-prFeatures
mssql-python-*) to avoid conflicts with other workspace promptspr-format-check.ymlrequirementsUsage
Prerequisites:
How to use:
mssql-pythonworkspaceCmd+Shift+I/Ctrl+Shift+I)/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 requestExample:
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.