FeatureManagement-Python
Copilot instructions26 starsChanged 3 years agoMITView on GitHub
Install all dependencies with: This project requires Python 3.10 or newer. Line length is configured to 120 in pyproject.toml. Always run black before pylint and mypy, as formatting fixes can resolve issues those tools detect. ALLOWED ACTIONS: - ✅ Fix warnings with 100% confidence - ✅ Use existing files for all solutions - ✅ Reference official guidelines FORBIDDEN ACTIONS: - ❌ Fix warnings without complete confidence - ❌ Create new files for solutions - ❌ Import non-existent modules - ❌…
- Installs packages
In this repository3 other files it gives its agents.
- ci-failure-debuggingSkill
- samplesSkill
- sync-async-patternSkill
The file
We split this copilot-instructions.md into the rules it gives an agent
10 rules. About 0 are common, 7 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈7
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 13
Use this as the authoritative source for SDK development guidance
- Distinctive: line 17
Always activate the Python virtual environment before running Python commands:
- Very specific: line 20
Use python -m pip instead of bare pip when installing packages.
- Distinctive: line 50
All source files must include the Microsoft copyright header.
- Distinctive: line 51
All modules must have a module-level docstring.
- Distinctive: line 53
Use type annotations on all functions and methods.
- Very specific: line 123
Run tests with: pytest tests
- Distinctive: line 129
When adding a new user-facing feature or capability:
- Very specific: line 131
Create a sample in samples/ demonstrating the feature.
- Distinctive: line 132
Add corresponding unit tests (sync and async where applicable).
≈ “Common” is an estimate: at least 1 in 5 of the 1,644 Copilot instructions files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
FEATURE MANAGEMENT FOR PYTHON - COPILOT INSTRUCTIONS
CORE PRINCIPLES
RULE 1: DO NOT REPEAT INSTRUCTIONS
NEVER repeat instructions when guiding users. Users should follow instructions independently.
RULE 2: REFERENCE OFFICIAL DOCUMENTATION
ALWAYS reference the Azure SDK Python Design Guidelines
- Link to specific pages when answering guidelines questions
- Use this as the authoritative source for SDK development guidance
RULE 3: VERIFY ENVIRONMENT FIRST
REQUIRED CONDITIONS:
- Always activate the Python virtual environment before running Python commands:
- On Windows:
.venv\Scripts\activate - On Linux/macOS:
source .venv/bin/activate
- On Windows:
- Use
python -m pipinstead of barepipwhen installing packages.
DEV SETUP
Install all dependencies with:
python -m pip install -e ".[dev,test]"This project requires Python 3.10 or newer.
PROJECT STRUCTURE
featuremanagement/— Synchronous feature management codefeaturemanagement/aio/— Async equivalents of feature management classesfeaturemanagement/_models/— Data models (feature flags, variants, telemetry)featuremanagement/_time_window_filter/— Time window filter with recurrence supportfeaturemanagement/azuremonitor/— Optional Azure Monitor telemetry integrationtests/— Unit tests (sync and async)samples/— Sample applications
CODE CONVENTIONS
- All source files must include the Microsoft copyright header.
- All modules must have a module-level docstring.
- Maximum line length is 120 characters.
- Use type annotations on all functions and methods.
CODE FORMATTING
RUNNING BLACK
COMMAND:
black featuremanagementLine length is configured to 120 in pyproject.toml.
Always run black before pylint and mypy, as formatting fixes can resolve issues those tools detect.
PYLINT OPERATIONS
RUNNING PYLINT
COMMAND:
pylint featuremanagementFIXING PYLINT WARNINGS
ALLOWED ACTIONS:
- ✅ Fix warnings with 100% confidence
- ✅ Use existing files for all solutions
- ✅ Reference official guidelines
FORBIDDEN ACTIONS:
- ❌ Fix warnings without complete confidence
- ❌ Create new files for solutions
- ❌ Import non-existent modules
- ❌ Add new dependencies/imports
- ❌ Make unnecessary large changes
- ❌ Change code style without reason
- ❌ Delete code without clear justification
MYPY OPERATIONS
RUNNING MYPY
COMMAND:
mypy featuremanagementThe project uses strict = True in mypy.ini.
TESTING
RUNNING TESTS
COMMAND:
pytest tests- Sync tests are in
tests/test_*.py - Async tests use
pytest-asyncioand are in files ending with_async.py - Run tests with:
pytest tests
NEW FEATURES
When adding a new user-facing feature or capability:
- Create a sample in
samples/demonstrating the feature. - Add corresponding unit tests (sync and async where applicable).
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

