Part I · The workbench · 9 min

The instruction stack

The always-on constitution, AGENTS.md interop, and scoped instructions with applyTo globs — written live into the engagement repo.

Objectives

  • Distinguish the always-on, repo-wide, and scoped layers of the instruction stack
  • Write an engagement constitution that encodes the rules once
  • Scope an instruction to part of the repo with an applyTo glob

Instructions are how you tell every agent the things you should never have to say twice. VS Code reads several layers, and they stack: a repo-wide copilot-instructions.md that is always on, an AGENTS.md file (gated by a setting, with CLAUDE.md interop for teams that keep one), and scoped *.instructions.md files that attach only to paths matching an applyTo glob. Personal, repo, and organization instructions all apply, in that order of specificity.

The constitution

The always-on file is the engagement’s constitution. It is short and it is non-negotiable: the artifact-pipeline framing, citation discipline, the fiction/real boundary that keeps customer data of record out of the repo, the tool-separation rules, the determinism rule for generated data, and the tone for customer-facing artifacts. Here it is in full — every later lesson assumes these rules are in force:

contoso-financial/.github/copilot-instructions.md
# The Demo Harness — drewbreyer.com/harness — starter file, as of 2026-07-06

# Contoso Financial — engagement instructions (always on)

You are working inside a single customer engagement repo. Your job is to help
produce a pipeline of artifacts — account research, discovery findings, a data
model, sample data, demo agents, a rehearsed script, and a leave-behind — for a
Dynamics 365 / Copilot Studio demo. Read the numbered folders in order.

## The artifact pipeline
00-intake -> 01-research -> 02-discovery -> 03-model -> 04-data -> 05-agents ->
06-rehearsal -> 07-leave-behind. Each folder is the input to the next. Do not
skip ahead; a later artifact that does not trace to an earlier one is a bug.

## Citation discipline
Every claim in a research artifact carries a source URL. Prefer primary sources.
Flag anything single-sourced. If a claim cannot be sourced, soften it to
pattern-generic language or drop it. No uncited claims ship.

## Fiction / real boundary
Contoso Financial is a fictional demo subject. Customer data of record never
enters this repo. Only public research, your own notes, and fiction-safe
summaries live here. The system of record keeps the rest.

## Tool separation
Agents are scoped on purpose. Research agents may read the web and Learn; they
may not write to any environment. Only the operator loads or queries the
Dataverse environment. The fabricator writes data files but never loads them.
Respect the scope declared in each agent file; do not widen it.

## Determinism
Anything generated — sample data above all — is seeded. Same seed, same output.
The environment must be rebuildable from the spec in an afternoon.

## Tone for customer-facing artifacts
Plain and precise. No superlatives, no "powerful" or "seamless", no exclamation
marks. Name preview features as previews. Say what a thing does, then stop.

Notice what it does not contain: cleverness. It is a list of constraints, not a personality. The agents supply the work; the constitution supplies the fences.

AGENTS.md, for interop

AGENTS.md is the widely-adopted, tool-neutral cousin of the constitution. If your team or another tool reads it, keep a short version there that points at the real rules:

contoso-financial/AGENTS.md
# The Demo Harness — drewbreyer.com/harness — starter file, as of 2026-07-06

# AGENTS.md — Contoso Financial engagement

This repo is a demo engagement, not an app. The work is a pipeline of artifacts
in the numbered folders. See .github/copilot-instructions.md for the full rules;
the short version:

- Read 00 -> 07 in order. Later artifacts trace to earlier ones.
- Cite every research claim. No uncited claims ship.
- Customer data of record never enters this repo.
- Respect each agent's declared tool scope. Only the operator writes to the
  environment.
- Seed everything generated. Same seed, same world.

Scoping with applyTo

Some rules only make sense in one place. Research artifacts must carry a source on every claim; data-loading artifacts must use only schema names from the model and must be idempotent. Encoding those as always-on rules would nag every file in the repo. Instead, scope them:

contoso-financial/.github/instructions/research.instructions.md
---
applyTo: "01-research/**"
---

# The Demo Harness — drewbreyer.com/harness — starter file, as of 2026-07-06

# Research artifacts

- Every factual claim carries a source URL on the same line or in a linked
  reference. A claim without a source is not done.
- Prefer primary sources: product docs, release plans, filings. Vendor blogs are
  acceptable when they are the primary announcement; forums are not.
- Mark anything you found in only one place as single-sourced, so the
  fact-checker can prioritize it.
- Keep company facts fiction-safe: this is a demo subject, not a real firm.

The applyTo glob at the top means this file’s rules attach only to anything under 01-research/. An agent editing the data model never sees them; an agent drafting the dossier cannot escape them.

In the field

Fill in the empty copilot-instructions.md you created in lesson 1 with your own five rules — the ones you are tired of repeating. Then add one scoped *.instructions.md for a part of the repo that has its own discipline. Commit both. The harness now has a spine.

In the repo after this lesson

  • .github/copilot-instructions.md — the engagement constitution
  • .github/instructions/research.instructions.md — scoped to research
  • AGENTS.md — the short version, for interop