agentleFS
MicrosoftKnown publishermicrosoft/What-I-Did-Copilot/.github/copilot-instructions.md

What-I-Did-Copilot

Copilot instructions51 starsChanged 6 months agoMITView on GitHub

Instructions for working on the What-I-Did-Copilot codebase — a tool that generates branded HTML impact reports from GitHub Copilot session logs.

The file

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

7 rules. About 0 are common, 2 are distinctive, and 5 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 5

    Very specific

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

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

    Update the formula in report.py (compute_formula_estimate)

    line 27
  2. Very specific:

    Update the AI prompt in prompts/analysis.txt (Step 2 signal rates)

    line 28
  3. Very specific:

    Update the signal guide in report.py (_signal_guide)

    line 29
  4. Very specific:

    Update the methodology doc in docs/effort-estimation-methodology.md

    line 30
  5. Distinctive:

    All four must stay aligned

    line 31
  6. Very specific:

    All report sections must show the same project names.

    line 35
  7. Distinctive:

    Never add telemetry, tracking, or external data collection.

    line 39

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

What-I-Did-Copilot Development Instructions

Architecture

This is a Python CLI tool with four core modules:

  • harvest.py — reads Copilot session logs from ~/.copilot/session-state/, extracts messages, tool calls, code changes, and computes metrics
  • analyze.py — sends session transcripts to GitHub Models API for semantic analysis, with a heuristic fallback when API is unavailable
  • report.py — generates a self-contained HTML report with KPI cards, goal summaries, collaboration charts, and estimation evidence
  • whatidid.py — CLI entry point that orchestrates harvest → analyze → report → email

Key Conventions

  • Zero external dependencies — core functionality uses only the Python standard library + GitHub Models API
  • All prompts live in prompts/ as plain text files — never hardcode prompt text in Python
  • The HTML report must be email-compatible — use inline styles, table-based layout, no JavaScript for content (JS only for interactive toggles)
  • Browser report renders at 960px, email version at 700px — controlled by max_width parameter on generate_html()
  • Session metrics include enriched signals — substantive_turns, reads, edits, runs, iteration_depth, files_touched_count — always aggregate these alongside the original fields

Effort Estimation

The estimation methodology is research-grounded (see docs/effort-estimation-methodology.md). When modifying estimation logic:

  • Update the formula in report.py (compute_formula_estimate)
  • Update the AI prompt in prompts/analysis.txt (Step 2 signal rates)
  • Update the signal guide in report.py (_signal_guide)
  • Update the methodology doc in docs/effort-estimation-methodology.md
  • All four must stay aligned

Project Name Consistency

All report sections must show the same project names. The project_label_map in generate_html() maps raw session folder names to AI-generated goal labels. When adding new sections that display project names, use this map.

Privacy

Never add telemetry, tracking, or external data collection. The tool is local-first. The privacy banner at the top of every report is intentional.

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.