Copilot Quick Reference

Tool-belt series · Companion to Copilot Without Babysitting

All the context.
None of the reading.

Every table, flag, checklist and copy-paste file from the field-notes page, with the essay cut out. Built for the moment at your desk when you need the answer, not the argument for it.

↪ Full field notes, quotes & sources

If you only have ten seconds

  1. Autonomy is a dial, not a switch. Plan first, autopilot second. Never the reverse.
  2. A run without a verify command is a run you have to babysit. Tests are the stop condition.
  3. Corrections belong in a file, not in a chat. If you said it twice, it should have been written down once.
  4. Fan out only where work is genuinely independent. Parallel dependent tasks just fail four times.
  5. The repo is the source of truth; the workspace is the runtime. True for code, doubly true for Power BI.
  6. Agents draft, humans post. Nothing an agent writes reaches a system of record unreviewed.
Loop

The daily rhythm

Four beats. Only one of them is you typing.

First 10 min

Triage before you create

My Work is the single pane — active sessions, issues, PRs, automations. Read what ran overnight before starting anything new.

Dispatch

Delegate 3–5, not one

Each session gets its own git worktree, created and cleaned up for you. One agent at a time wastes the architecture.

Steer

Review the plan, not the keystrokes

Plans and diffs land on canvases you approve. Kill a bad plan at step two — it costs the whole session at step twenty.

Last 5 min

Harvest the corrections

Whatever you said twice today goes into the memory file tonight, not "sometime." Loop is below.

Why this orderReview capacity is the bottleneck, not agent capacity. Clear the queue first — then you know how many new sessions you can afford to start.
Dial

The autonomy dial

Pick the lowest rung that finishes the job. Real product modes, not a metaphor.

LvlModeWhat it doesApprovalBlast radius
0AskRead-only questions, no editsn/aNone
1PlanWrites the step list, not codeYou approve the planNone
2Interactive (default)Asks before every tool callEvery toolOne keystroke
3AutopilotMulti-step to completion, cappedUp front, onceThe worktree
4Cloud automationScheduled / triggered, laptop shutThe pull requestOne repo, chosen tools
Command

Autopilot, from the terminal

copilot --autopilot --yolo --max-autopilot-continues 10 -p "…"
The flag people regret--yolo / --allow-all grants every tool, path and URL. Prefer --allow-tool / --allow-url scoped to the task. For unattended runs also set --no-ask-user, --model (stop a silent swap), and -s for clean output. Autopilot is sticky across tasks unless "stayInAutopilot": false in ~/.copilot/settings.json.
Field notes

What holds up, what burns people

One line each. Every line traces to a source — follow it for the full story.

Holds up

  • ~60% of bug tickets closed with zero steering, pointed at a Sentry queue from outside the IDE.Milbradt · Honest review
  • Spec built as acceptance tests ≈ 20× ROI. Mercari measured +150% vs. baseline, +80% vs. freeform, after six months.Field study · spec-driven dev
  • 54-measure model refactor in 30–40 min (vs. 30–90 by hand) — 8 planned steps, checkpointed.BI Insight
  • Search & summarize on a model you didn't build is agents' single strongest Power BI move.Buhler · TMDL files

Burns people

  • Forces single-threaded test runs to make failures disappear instead of fixing the environment; weak on merge conflicts.Milbradt
  • Rate limits are 2026's #1 complaint — lockouts up to 44 hours reported after a token-counting fix.The Register, Apr 2026
  • Elaborate specs get partially ignored — "control is partly illusory." One framework hit 1,300 lines of markdown for a date field.Field study
  • MCP servers eat context before work starts — the Power BI modeling MCP alone measured at 29%.Buhler · Power BI MCP servers
The pattern under all of itEvery failure here is a verification failure, not an intelligence failure. Give the run something that can say no.
Run alone

5 conditions before you walk away

Fails any one → stay in the chair. Passes all five → runs overnight, review with coffee.

The recipe, compressedPlan → read it → accept into autopilot with a cap → it pushes a branch and opens a PR → Agent Merge watches CI and waits on reviewers → you review a green PR in the morning.
Fleet

Sub-agents: when fanning out helps

Value is context isolation first, speed second. It costs a coordination layer — spend it deliberately.

PatternShapeUse it when
Research, then actOne agent gathers facts, a second implementsDefault for unfamiliar repos/models. /research does this for you.
Coordinator & workersPlanner → implementer → reviewerMulti-file work with real dependencies. Keep the orchestrator thin.
Multi-perspective reviewParallel reviewers: correctness, security, perf, conventionsBefore a PR you can't easily unwind.
Fleet/fleet decomposes, runs background sub-agents, synthesisesGenuinely independent tracks. Headless: copilot -p "/fleet …" --no-ask-user
Two settings to know firstRecursive delegation is off by default in VS Code (chat.subagents.allowInvocationsFromSubagents). Recent CLI builds let you cap parallelism/depth in /settings. Turn recursion on only after you've watched a flat fleet behave.
Where the files liveMarkdown with frontmatter in .github/agents/*.agent.md. Key keys: tools, agents (delegate allowlist), user-invocable: false, disable-model-invocation: true.
Memory

The Hermes loop, ported to Copilot

A small curated memory file, self-updating. You can build this today.

Step 1
It gets it wrong
Wrong folder, wrong naming, wrong order.
Step 2
You correct it once
+ four words: "write that down."
Step 3
One line gets appended
Imperative, specific, dated → Local norms.
Step 4
Tomorrow it starts there
Same mistake, never twice.
Hermes does thisSteal thisYour Copilot version
Two memory files~2,200 / ~1,375 char hard capsAGENTS.md + short learnings.md
Frozen snapshot at session startMid-session writes land tomorrowSame — instruction files are read at start
Background self-improvement reviewRuns post-turn, on a cheap modelsessionEnd hook, distilled on Sonnet not Opus
write_approval gateStaged writes reviewed before they landThe memory file is in git — the PR is the gate
Skills that self-improveCompleted workflows → procedure docs.github/skills/<name>/SKILL.md
Failure mode is bloat, not forgettingCap the file at roughly two pages. Run a weekly compaction pass: merge duplicates, delete dead rules, promote anything permanent up into AGENTS.md.
Power BI

What to hand over, what to keep

Semantic models punish small errors silently. The community consensus is unusually clear.

TaskHand it over?Why
Summarise / search an unfamiliar modelYesAgents' strongest move here
Backfill descriptionsYesBulk, low-risk, tedious
Refactor / move measures, display foldersYesProven, with checkpoints + a revertable repo
Formatting / labels across PBIR report JSONYesScale work; reopen in Desktop after
Generate whole new TMDL from scratchNoTMDL/PBIR are sparse in training data
Rename a table/measure with dependentsNoRenames don't propagate — breaks hide downstream
Anything pointed at a .pbixNoOpaque binary, no diff — convert to PBIP first
Writing to a system of recordNoDraft / reconcile / flag only — humans post
Four gotchas that cost an afternoonTMDL indentation is structural — one bad indent breaks the parse, and multi-line DAX continuations get mangled. Fabric Git sync isn't automatic on push — someone has to pull from the Source control pane. PBIR JSON can capture slicer values and filters — check before that repo goes anywhere shared. Credits go fast: one measure-reorg run consumed ≈35% of a month's free-tier credits.
The setup that makes it safePBIP + TMDL + PBIR in git — repo as source of truth, workspace as runtime. BPA wired into CI so mistakes fail a build, not reach a report. Tabular Editor open to validate. MCP servers on only for the job that needs them, then off.
Worth schedulingDaily: refresh-failure triage → an issue naming the table + last good run. On PR: BPA + a plain-English variance note. Weekly: description backfill + the memory compaction pass. Monthly close: variance commentary drafted from script-pulled numbers only, never model memory — lands as a draft you sign.
Kit

Copy-paste kit

Six blocks. Paste, adjust the names, commit.

File

AGENTS.md — the skeleton that survives contact

# AGENTS.md

## Commands
- Validate model:   pwsh ./scripts/validate-model.ps1
- Run BPA:          pwsh ./scripts/run-bpa.ps1 -Path ./Sales.SemanticModel
- Tests:            pytest -q
- Format check:     ruff check .
(Run the validate + BPA pair before claiming any model change is done.)

## Stack
Power BI Project (PBIP). Semantic model as TMDL, report as PBIR.
Python 3.11 + semantic-link-labs for notebook-side automation.
Fabric workspace is the runtime. This repo is the source of truth.

## Code map
- Sales.SemanticModel/definition/tables/*.tmdl   measures + columns
- Sales.Report/definition/pages/*                report layout
- scripts/                                       validation + deploy
If this map is wrong or stale, fix it in this file as part of your change.

## Local norms
- Measure names: Title Case With Spaces. No abbreviations except FX, YTD, QTD.
- Every new measure gets a description and a display folder. No exceptions.
- Never edit a .pbix. If one appears, stop and tell me.
- Do not modify tests to make them pass.
- Currency measures format "#,##0;(#,##0)" — parentheses for negatives, finance house style.

## Boundaries
- Never commit secrets, connection strings, or workspace IDs.
- Never touch main directly. Branch, then open a pull request.
- Never rename a table, column or measure that has dependents without listing
  every dependent expression first and showing me the list.

## Self-update rule
When I correct how work is done in this repo, append the correction to
"Local norms" as one imperative line before you continue. Keep this file
under two pages: merge duplicates, delete rules about code that no longer
exists. If you are unsure whether a correction is durable, put it in
docs/learnings.md instead and leave this file alone.
Prompt

The end-of-day harvest — run it in the last five minutes

Review this session's conversation only. Find every place I corrected you —
naming, ordering, tools, conventions, things you assumed that were wrong.

For each one, decide:
  DURABLE  → true next week too. Append one imperative line to
             "Local norms" in AGENTS.md.
  LOCAL    → true only for this task. Append to docs/learnings.md
             under today's date.
  NOISE    → a one-off. Drop it.

Rules for what you write:
- One line each. Imperative. No hedging, no "consider", no explanation.
- No duplicates: if a rule already covers it, sharpen the existing line
  instead of adding a new one.
- If AGENTS.md is over two pages after your edit, compact it in the same
  commit — merge overlapping rules, delete anything about code that no
  longer exists.

Then show me the diff and stop. Do not commit.
File

.github/hooks/hooks.json — make the harvest automatic

{
  "version": 1,
  "hooks": {
    "sessionStart": [
      {
        "type": "command",
        "bash": "cat docs/learnings.md 2>/dev/null | tail -40",
        "powershell": "Get-Content docs/learnings.md -Tail 40 -EA SilentlyContinue",
        "timeoutSec": 5
      }
    ],
    "sessionEnd": [
      {
        "type": "command",
        "bash": "./scripts/harvest-learnings.sh",
        "powershell": "./scripts/harvest-learnings.ps1",
        "timeoutSec": 30
      }
    ]
  }
}
What goes in that scriptOne line: a headless Copilot call with the harvest prompt above, on a cheap fast model, writing to docs/learnings.md. Keep hooks under ~5 seconds — they block the agent; do the heavy version as a scheduled weekly job instead.
Command

The overnight run

# 1. plan first — read this before you go anywhere
copilot -p "Plan only, no edits: add descriptions to every measure in
Sales.SemanticModel missing one. List files touched and the validation
command you'll run." --model claude-sonnet-5 -s

# 2. then let it run, capped, with only the tools it needs
copilot --autopilot \
  --max-autopilot-continues 12 \
  --allow-tool 'shell(pytest)' --allow-tool 'shell(pwsh ./scripts/run-bpa.ps1)' \
  --allow-tool 'write' --allow-tool 'read' \
  --no-ask-user --model claude-sonnet-5 -s \
  -p "Execute the plan in plan.md. After each file, run the BPA script.
      Stop and write BLOCKED.md if BPA fails twice on the same file.
      When green, commit to branch feat/measure-descriptions and open a PR."
File

.github/agents/close-pack.agent.md — a coordinator worth having

---
name: 'Close Pack Coordinator'
description: 'Runs the month-end reporting checks end to end and reports what needs a human.'
tools: ['read', 'search', 'edit', 'runCommands', 'agent']
agents: ['Model Validator', 'Variance Writer', 'Number Checker']
user-invocable: true
---

You coordinate. You do not write DAX and you do not write commentary yourself.

Sequence:
1. Delegate to Model Validator: run BPA + the refresh check. If it fails,
   stop everything and report. A broken model makes the rest meaningless.
2. Delegate to Variance Writer: draft commentary for every variance over
   the threshold in config/thresholds.json. Numbers come from
   scripts/pull-actuals.py output ONLY. Never state a figure you did not
   read from that file.
3. Delegate to Number Checker: independently re-derive every figure quoted
   in the draft against the same file. Flag every mismatch. Do not fix them.

Output one markdown file: docs/close/YYYY-MM.md, with a "NEEDS A HUMAN"
section at the top listing mismatches, missing data and anything you
guessed at. If that section is empty, say so explicitly — do not omit it.

Never post, send, email or write to any system of record. You produce a
draft. A person signs it.
Prompt

The model-refactor prompt, with real checkpoints

The semantic model at  has measures spread across
several tables. Move them into a dedicated measure table with display
folders.

Structure I want — be exact, do not improvise a hierarchy:
  Averages & Aggregations/  → Cost, Internet, Reseller as SUBFOLDERS
  Margins/                  → flat
  Time Intelligence/        → YTD, QTD, PY as subfolders

Before you change anything:
1. Inventory every measure and its current home. Show me the list.
2. Show me the target mapping. Wait for my yes.
3. Then move in batches of ten, validating after each batch.

Rules:
- This runs against a live model, so checkpoint before each batch and
  stop on the first validation failure.
- Do not rename any measure. Moving only.
- Do not create, delete or edit measure expressions.
- If a measure's home is ambiguous, put it in a NEEDS DECISION folder and
  keep going. Do not guess.

Finish by listing every measure in NEEDS DECISION and what you'd suggest.
Cost

Credits, models, the throttle

Usage-based AI credits since 1 June 2026. Model choice is your biggest lever.

JobReach forWhy
Long loop: refactors, backfills, tests, docsSonnet classNear-top agentic benchmarks at a fraction of the flagship rate — 90% of unattended hours
Hard hour: root-cause, gnarly modelling, security reviewOpus classWorth it interactively; never inside an uncapped loop
Janitor: harvesting learnings, triage, summariesFast / cheap tierSmall model, narrow job, runs constantly
Budget for the throttle, not just the creditsPut long jobs on cloud sessions / scheduled automations so they run on their own clock. Keep MCP servers off unless the current task needs them. Always set --model explicitly, so a fallback shows up in your logs instead of silently in your output.