agentleFS
Azure-SamplesAzure-Samples/snippy/.github/copilot-instructions.md

snippy

Copilot instructions114 starsChanged 19 months agoMITView on GitHub

The file

Show its rules and text

We split this copilot-instructions.md into the rules it gives an agent

13 rules. About 0 are common, 4 are distinctive, and 9 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 9

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Always target Azure Functions Python v2 (azure-functions >= 1.23, blueprint model).

    line 2
  2. Very specific:

    Create the global app = func.FunctionApp() once and call app.register_blueprint(bp).

    line 3
  3. Very specific:

    Durable orchestrators: must be def (sync) and use yield + context.task_all(...).

    line 4
  4. Very specific:

    Activity functions: should be async def and return JSON-serialisable data.

    line 5
  5. Distinctive:

    Use type hints throughout and a one-line Google-style docstring summary.

    line 6
  6. Very specific:

    Use logging (level INFO) instead of print.

    line 7
  7. Very specific:

    Default to Python 3.11 features (e.g., match statements are allowed).

    line 9
  8. Very specific:

    When calling Azure SDKs, prefer their async variants (BlobServiceClient.from_connection_string, etc.).

    line 10
  9. Distinctive:

    Keep test payloads small; embed them inline rather than external files.

    line 18
  10. Very specific:

    Verify no synchronous APIs are accidentally awaited.

    line 21
  11. Distinctive:

    Ensure every orchestrator is registered in a blueprint and yields on tasks.

    line 22
  12. Distinctive:

    Check for missing logging, un-handled exceptions, or secret leakage.

    line 23
  13. Very specific:

    Follow Conventional Commits (feat:, fix:, test:, chore: …).

    line 28

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

👉 Code-generation instructions

  • Always target Azure Functions Python v2 (azure-functions >= 1.23, blueprint model).
  • Create the global app = func.FunctionApp() once and call app.register_blueprint(bp).
  • Durable orchestrators must be def (sync) and use yield + context.task_all(...).
  • Activity functions should be async def and return JSON-serialisable data.
  • Use type hints throughout and a one-line Google-style docstring summary.
  • Use logging (level INFO) instead of print.
  • Access secrets via os.environ[...]; never commit literals.
  • Default to Python 3.11 features (e.g., match statements are allowed).
  • When calling Azure SDKs, prefer their async variants (BlobServiceClient.from_connection_string, etc.).
  • Return HTTP results with azure.functions.HttpResponse and do not await sync methods (req.get_json(), client.create_check_status_response()).

👉 Test-generation instructions

  • Use pytest + pytest-asyncio.
  • Mark async tests with @pytest.mark.asyncio.
  • Patch Azure SDK calls with unittest.mock.AsyncMock / MagicMock.
  • Aim for 100 % branch coverage of orchestrator fan-out/fan-in paths.
  • Keep test payloads small; embed them inline rather than external files.

👉 Code-review instructions

  • Verify no synchronous APIs are accidentally awaited.
  • Ensure every orchestrator is registered in a blueprint and yields on tasks.
  • Check for missing logging, un-handled exceptions, or secret leakage.
  • Confirm environment-variable names match those used in local.settings.json.
  • Flag any direct network calls inside orchestrators (should be in activities).

👉 Commit-message generation instructions

  • Follow Conventional Commits (feat:, fix:, test:, chore: …).
  • First line ≤ 72 chars, present-tense imperative.
  • Include a short body describing why and reference issues (fixes #123).

👉 Pull-request title/description instructions

  • Title: Imperative, ≤ 60 chars (e.g., “feat: add Cosmos vector search”).
  • Description:
    1. What & why (one paragraph).
    2. “### Changes” bullet list.
    3. “### Testing” explaining manual/automated tests.
    4. “### Notes” for env vars, breaking changes, or deployment steps.

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.