agentleFS
MicrosoftKnown publishermicrosoft/spec-to-agents/.github/copilot-instructions.md

spec-to-agents

Copilot instructions115 starsChanged 13 months agoMITView on GitHub

This document provides context-aware guidance for GitHub Copilot when working in this codebase. This is a Python project using Microsoft Agent Framework to build a multi-agent event planning workflow with the following agents: - Event Coordinator (orchestrates overall planning) - Venue Specialist (researches and recommends venues) - Budget Analyst (manages costs and financial constraints) - Catering Coordinator (handles food and beverage planning) - Logistics Manager (coordinates schedules and resources) Important: Each agent/workflow must have an __init__.py that exports the required…

  • Reads credentials

The file

Show its rules and text

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

21 rules. About 0 are common, 14 are distinctive, and 7 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈14

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 7

    Very specific

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

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

    Use uv for all Python operations:

    line 38
  2. Very specific:

    Use modern built-in type hints: dict[str, int], list[str], tuple[int, ...]

    line 51
  3. Very specific:

    Use | for unions: str | None instead of Optional[str]

    line 52
  4. Distinctive:

    Prefer composition over large monolithic modules

    line 53
  5. Distinctive:

    Keep modules focused on single responsibility

    line 54
  6. Distinctive:

    Use numpy-style docstrings for functions, classes, and modules

    line 59
  7. Distinctive:

    Document WHY and HOW, not WHAT (code shows what it does)

    line 60
  8. Very specific:

    Write tests in tests/ directory using pytest

    line 85
  9. Distinctive:

    Use pytest-mock for mocking dependencies

    line 86
  10. Distinctive:

    Never create throwaway test scripts - use proper test suite

    line 87
  11. Distinctive:

    Test critical paths and edge cases (empty inputs, invalid types, large datasets)

    line 88
  12. Distinctive:

    Write highly modular code that separates concerns:

    line 93
  13. Distinctive:

    Keep modules focused with clear boundaries and minimal public APIs.

    line 99
  14. Distinctive:

    Use Managed Identity for Azure resources (no API key authentication)

    line 104
  15. Very specific:

    Create specification files in specs/ directory

    line 109
  16. Very specific:

    Update specs/README.md with links to new specs

    line 113
  17. Distinctive:

    When working with agents:

    line 118
  18. Very specific:

    Use Agent Framework DevUI (uv run app) for testing workflows end-to-end

    line 121
  19. Distinctive:

    Ask for clarification on unclear design decisions (human-in-the-loop)

    line 126
  20. Distinctive:

    Use existing libraries - avoid reinventing the wheel

    line 128
  21. Distinctive:

    Prefer incremental changes with clear progress tracking

    line 129

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

GitHub Copilot Instructions

This document provides context-aware guidance for GitHub Copilot when working in this codebase.

Project Overview

This is a Python project using Microsoft Agent Framework to build a multi-agent event planning workflow with the following agents:

  • Event Coordinator (orchestrates overall planning)
  • Venue Specialist (researches and recommends venues)
  • Budget Analyst (manages costs and financial constraints)
  • Catering Coordinator (handles food and beverage planning)
  • Logistics Manager (coordinates schedules and resources)

Technology Stack

  • Python 3.11+ with modern type hints and features
  • Pydantic for data validation and settings
  • Microsoft Agent Framework for building and orchestrating agents
  • uv for dependency management (NOT pip/poetry/conda)
  • pytest for testing with pytest-mock for mocking
  • Microsoft Foundry for infrastructure (Managed Identity, no API keys)

Project Structure

src/spec_to_agents/
├── agents/          # Agent definitions (budget_analyst.py, venue_specialist.py, etc.)
├── prompts/         # System prompts for each agent
├── tools/           # Reusable tool definitions
├── workflow/        # Workflow orchestration logic
└── clients.py       # Shared AI Foundry client code

Important: Each agent/workflow must have an __init__.py that exports the required variable (agent or workflow) to be discovered by DevUI.

Development Commands

Use uv for all Python operations:

  • uv sync --dev - Install/sync dependencies
  • uv add <package> - Add a dependency
  • uv run pytest - Run tests
  • uv run ruff . - Run linting/formatting
  • uv run mypy . - Type checking
  • uv run app - Start Agent Framework DevUI

Never activate virtual environments manually - always prefix commands with uv run.

Code Style Guidelines

Python Code

  • Use modern built-in type hints: dict[str, int], list[str], tuple[int, ...]
  • Use | for unions: str | None instead of Optional[str]
  • Prefer composition over large monolithic modules
  • Keep modules focused on single responsibility
  • Break complex functions into smaller, manageable pieces

Documentation

  • Documentation = docstrings + type hints in code (NOT separate markdown files)
  • Use numpy-style docstrings for functions, classes, and modules
  • Document WHY and HOW, not WHAT (code shows what it does)
  • Skip docstrings for trivial/obvious functions
  • Focus on edge cases, non-obvious behavior, and design decisions

Example docstring:

def calculate_area(radius: float) -> float:
    """
    Calculate the area of a circle given the radius.

    Parameters
    ----------
    radius : float
        The radius of the circle.

    Returns
    -------
    float
        The area of the circle, calculated as π * radius**2.
    """
    import math
    return math.pi * radius ** 2

Testing

  • Write tests in tests/ directory using pytest
  • Use pytest-mock for mocking dependencies
  • Never create throwaway test scripts - use proper test suite
  • Test critical paths and edge cases (empty inputs, invalid types, large datasets)
  • Include comments explaining edge cases and expected behavior

Modularity Principles

Write highly modular code that separates concerns:

  • Testability: Each module can be tested in isolation
  • Reusability: Modules can be used independently
  • Maintainability: Changes are localized to specific modules
  • Readability: Clear separation of concerns

Keep modules focused with clear boundaries and minimal public APIs.

Configuration

  • .env contains Azure OpenAI config (refer to .env.example if missing)
  • Use Managed Identity for Azure resources (no API key authentication)

ExecPlans

For complex features or significant refactors:

  1. Create specification files in specs/ directory
  2. Follow specs/PLANS.md format
    The specs/PLANS.md format typically includes: a summary, problem statement, goals/non-goals, proposed solution/architecture, implementation steps, and acceptance criteria. See specs/PLANS.md for a detailed template.
  3. For multiple specs, create a master ExecPlan linking to individual specs
  4. Update specs/README.md with links to new specs
  5. Skip ExecPlans for straightforward tasks (~25% easiest)

Agent Framework Patterns

When working with agents:

  • Each agent has associated tools and system prompts
  • Tools include: Bing Search with Grounding, Weather, Calendar (ICal), Code Interpreter (Python REPL)
  • Use Agent Framework DevUI (uv run app) for testing workflows end-to-end
  • Agents are organized in a multi-agent workflow architecture

General Development Guidelines

  • Ask for clarification on unclear design decisions (human-in-the-loop)
  • Explain plan before implementing large refactors
  • Use existing libraries - avoid reinventing the wheel
  • Prefer incremental changes with clear progress tracking

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.