agentleFS
MicrosoftKnown publishermicrosoft/FeatureManagement-Python/.github/copilot-instructions.md

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

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
  1. Distinctive:

    Use this as the authoritative source for SDK development guidance

    line 13
  2. Distinctive:

    Always activate the Python virtual environment before running Python commands:

    line 17
  3. Very specific:

    Use python -m pip instead of bare pip when installing packages.

    line 20
  4. Distinctive:

    All source files must include the Microsoft copyright header.

    line 50
  5. Distinctive:

    All modules must have a module-level docstring.

    line 51
  6. Distinctive:

    Use type annotations on all functions and methods.

    line 53
  7. Very specific:

    Run tests with: pytest tests

    line 123
  8. Distinctive:

    When adding a new user-facing feature or capability:

    line 129
  9. Very specific:

    Create a sample in samples/ demonstrating the feature.

    line 131
  10. Distinctive:

    Add corresponding unit tests (sync and async where applicable).

    line 132

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
copilot-instructions.md

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
  • Use python -m pip instead of bare pip when 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 code
  • featuremanagement/aio/ — Async equivalents of feature management classes
  • featuremanagement/_models/ — Data models (feature flags, variants, telemetry)
  • featuremanagement/_time_window_filter/ — Time window filter with recurrence support
  • featuremanagement/azuremonitor/ — Optional Azure Monitor telemetry integration
  • tests/ — 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 featuremanagement

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.


PYLINT OPERATIONS

RUNNING PYLINT

COMMAND:

pylint featuremanagement

FIXING 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 featuremanagement

The project uses strict = True in mypy.ini.


TESTING

RUNNING TESTS

COMMAND:

pytest tests
  • Sync tests are in tests/test_*.py
  • Async tests use pytest-asyncio and 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).

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.