agentleFS
darinhdarinh/copilot-tools/templates/copilot-instructions.md

copilot-tools / templates

Copilot instructions1 starsChanged 4 months agoMITView on GitHub

Not rendered. render() replaces this preamble with a generated header, and replaces the Project Configuration System section with this project's resolved ids and paths. Every other section is copied through, gated on its feature flag. All work happens in a worktree. Never edit the primary checkout. Use operator worktree new|finish. - Leave worktrees you did not create alone. Nothing outside tells an idle tree from an occupied one. By hand: the worktrees skill. Probes, reproductions, scratch copies and fixtures go…

The file

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

3 rules. About 0 are common, 2 are distinctive, and 1 is 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.

  • 1

    Very specific

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

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

    Not rendered. render() replaces this preamble with a generated header, and replaces the Project Configuration System section with this …

    line 3
  2. Distinctive:

    Tell your subagents the same thing, by name: No tool can check a prompt you wrote.

    line 25
  3. Distinctive:

    Volunteer them — don't wait to be asked: No skill can be loaded on noticing something transferable.

    line 104

≈ “Common” is an estimate: at least 1 in 5 of the 3,779 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

User Workflow Conventions

Not rendered. render() replaces this preamble with a generated header, and replaces the Project Configuration System section with this project's resolved ids and paths. Every other section is copied through, gated on its feature flag.


Git Worktrees — Always

All work happens in a worktree. Never edit the primary checkout. Use operator worktree new|finish.

  • Leave worktrees you did not create alone. Nothing outside tells an idle tree from an occupied one.

By hand: the worktrees skill.


Scratch Files — Never in the Checkout

Probes, reproductions, scratch copies and fixtures go in a temp directory, never in a checkout.

  • Tell your subagents the same thing, by name. No tool can check a prompt you wrote.
  • An explanation that fits the evidence is not the explanation. Reproduce the mechanism before explaining the artifact.

Why: docs/rationale.md.


Handing a Worktree to a Subagent

Commit before you delegate. Staging is not enough. Point reviewers at git diff main...HEAD.

  • Forbid the mutating git verbs by name — stash, checkout, reset, clean, restore, rebase. Git plumbing writes no new files.
  • Verify the worktree before you read the findings. A reviewer once destroyed 454 lines and mentioned it in passing.

Project Configuration System

Replaced at render time. Nothing written here ships.


Session Handoff Protocol

Enabled by feature flag: session-handoff

operator session start --instance NAME, and to close: operator session end --instance NAME --status TEXT --next TEXT, plus --done to release the work item.

  • Write it proactively. Noticing that context has got heavy is a judgement no tool can make.
  • Never write the handoff file by hand — it destroys an unread one and raises no restart marker.

Session History

Enabled by feature flag: session-history

Recorded by operator session start|end. No schema to paste, no table to create.

  • A session left open is recorded as abandoned, not lost. Say what happened rather than reopening it quietly.

Parallel Agents

Enabled by feature flag: parallel-agents

Claim before you edit: operator work request|release|list.

  • A refused claim is an answer. Take other ready work; never wait, never take a claim a peer holds.

Tracked Backlog

Enabled by feature flag: tracked-backlog

Open work belongs in the repository, not in a handoff. operator backlog ready|close; format in the backlog skill.

  • Evidence is what was measured — a command and its output, a mutation that ran green. Without it, a rumour.
  • Never seed an item you have not verified yourself.
  • A guard that cannot fire reads exactly like coverage. Violate each check once and watch it go red.

Field Notes (Agent Journal)

A cross-project journal on working with AI, in its own repository. See the field-notes skill.

  • Volunteer them — don't wait to be asked. No skill can be loaded on noticing something transferable.
  • Don't edit an old entry to make it right. Being wrong is data.

Specification-Driven Development

Enabled by feature flag: spec-driven

Specs are the source of truth, under .specify/ and specs/.

  • Write factual specs, not aspirational ones, naming real code in every claim. Should reads exactly like does.

Operator — Peer Agents

Enabled by feature flag: operator-agents

operator starts a peer, not a sub-agent: its own process and git work, still running after you stop watching.

  • A boundary is enforceable once declared. operator ownership check refuses a branch that left its subproject; undeclared, only your instruction enforces it.
  • Answer what you are asked before you end your session. A peer blocked on your reply is burning sessions doing nothing.

See the peer-agents skill.


Branching Strategy

Enabled by feature flag: branching-strategy

  • main is the integration branch; never commit to it directly. There is no develop branch — don't create one, don't assume one.
  • feat/, fix/, docs/ off main, worked in a worktree. Conventional commits.

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.