agentleFS
MicrosoftKnown publishermicrosoft/copilot-agentic-business-process/AGENTS.md

copilot-agentic-business-process

AGENTS.md1 starsChanged 52 days agoMITView on GitHub

Guidance for coding agents working in this repository. Read this file first, then the nested AGENTS.md closest to the files you are changing — it takes precedence for its folder. VS Code users: nested AGENTS.md files are only loaded when chat.useNestedAgentsMdFiles is enabled in settings. Without it, open the nested file listed in the repository map yourself before working in that folder. A reusable runtime for long-running, auditable, agentic business processes on Power Platform and Copilot Studio (GitHub Copilot harness),…

The file

We split this AGENTS.md into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈5

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Do not change the core to accommodate a single process: If something genuinely belongs in the core, stop and propose it to the user (and as …

    line 48
  2. Distinctive:

    Least privilege: Never widen the runtime identity's role or grant System Administrator to fix a runtime failure.

    line 62
  3. Very specific:

    Keep exactly one zip per solution in build/.

    line 99
  4. Distinctive:

    Import order is always BusinessProcessCore first, then each process.

    line 101
  5. Distinctive:

    Run the smallest set that covers what you touched.

    line 121
  6. Distinctive:

    Never run anything that writes to a Dataverse environment, Entra ID, or Exchange without the user's explicit confirmation of the target …

    line 131
  7. Very specific:

    Follow .github/PULL_REQUEST_TEMPLATE.md and CONTRIBUTING.md: agreed issue for non-trivial work, no environment values, tests for every area …

    line 157

≈ “Common” is an estimate: at least 1 in 5 of the 40,246 AGENTS.md 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
AGENTS.md

AGENTS.md

Guidance for coding agents working in this repository. Read this file first, then the nested AGENTS.md closest to the files you are changing — it takes precedence for its folder.

VS Code users: nested AGENTS.md files are only loaded when chat.useNestedAgentsMdFiles is enabled in settings. Without it, open the nested file listed in the repository map yourself before working in that folder.

What this repository is

A reusable runtime for long-running, auditable, agentic business processes on Power Platform and Copilot Studio (GitHub Copilot harness), plus reference implementations built on it.

  • BusinessProcessCore (core/) owns state, identity, and experience: the Dataverse process-tracking tables, the Business Process API (Custom Actions), the Workflow Console code app, and the monitoring agent. It knows nothing about any business domain.
  • A business process (business-processes/<name>/) owns its own logic: Copilot Studio workflows, agents with skills and knowledge files, security roles, environment variables, and the review widgets its human tasks need.

The only contract between them: a workflow writes a faf001_bpstep row, and the creation or completion of that row triggers the next workflow. No workflow calls another, no workflow holds state, and no workflow needs to know who will act on a task.

Repository map

PathWhat it holdsRead next
core/Core runtime: data model spec, plug-in, console, solution exportcore/AGENTS.md
core/spec/Data model specification — source of truth for tables, columns, choicescore/AGENTS.md
core/plugins/business-process-api/C# Dataverse plug-in exposing the faf001_* Custom APIsits AGENTS.md
core/codeapps/workflow-console/Power Apps code app (React/TS/Vite): task queue, review widgets, timelinesits AGENTS.md
core/solution/BusinessProcessCore unpacked export, built zip, config, deployment guidecore/AGENTS.md
business-processes/One folder per business process solutionbusiness-processes/AGENTS.md
business-processes/order-processing/The reference implementation to copyits AGENTS.md
.github/skills/GitHub Copilot deployment skills (deploy-business-process-core, deploy-order-processing)Deployment skills
scripts/Shared, idempotent deployment helpers (Python via uv, PowerShell 7) used by the skills and guidesShared scripts
docs/README images and architecture diagram sources (.drawio)—

Golden rules

  1. Publisher prefix is faf001; option values start at 324010000. Every new schema name, environment variable, agent, and Custom API uses it.
  2. Do not change the core to accommodate a single process. If something genuinely belongs in the core, stop and propose it to the user (and as an issue) first.
  3. Never commit secrets or environment-bound values — credentials, org URLs, connection IDs, role GUIDs, tenant IDs. Credentials go in the ignored .secrets/ folder; per-environment values go in the ignored **/deployment-settings.*.json. Resolve roles and environment variables by name at runtime. Environment values already captured inside a solution export (for example environmentvariablevalues.json) are the one tolerated exception — leave them as exported.
  4. Do not hand-edit generated code: core/codeapps/workflow-console/src/generated/, .power/, or opaque solution blobs (see what not to edit).
  5. An unpacked change alone never reaches an environment. Both deployment guides import the committed build/*.zip, so every change under export/ must be repacked.
  6. Single business unit assumption — roles are resolved by name.
  7. Least privilege. Never widen the runtime identity's role or grant System Administrator to fix a runtime failure; find the missing privilege.
  8. Keep docs in step with behavior: the data model spec, API README, process README, DEPLOYMENT.md guides, and the .github/skills/ copies of them.

Changing Power Platform solutions

Solutions live as unpacked exports (<solution>/export/, pac solution unpack layout) plus a committed unmanaged zip (<solution>/build/<Name>_<major>_<minor>_<build>_<rev>_unmanaged.zip).

Before changing any solution component, ask the user which approach to use, and recommend Option A:

Option A — local authoring + pack + import (recommended)Option B — targeted Dataverse Web API scripts
HowEdit files under export/, pac solution pack into build/, pac solution import into a dev environment, verifyWrite small idempotent scripts that create/update tables, workflows, bots, bot components, etc. directly via the Dataverse Web API
ProsRepo is always the source of truth; reviewable diff; same artifact the guides deployFaster inner loop for iterative changes
ConsSlower round-tripCreates drift between environment and export/. Must finish with export → unpack → repack (below) before the work is done

Option A commands (run from repo root; adjust names and version):

# 1. Bump <Version> in export/Other/Solution.xml when the change ships
# 2. Pack
pac solution pack --zipfile <solution>/build/<Name>_<ver>_unmanaged.zip --folder <solution>/export --packagetype Unmanaged
# 3. Import into a dev environment (settings file is ignored by git)
pac solution import --path <solution>/build/<Name>_<ver>_unmanaged.zip --settings-file <solution>/config/deployment-settings.<env>.json --publish-changes

Option B close-out (mandatory) — sync the environment back into the repo:

pac solution export --name <Name> --path <temp>.zip --managed false
pac solution unpack --zipfile <temp>.zip --folder <solution>/export --packagetype Unmanaged --allowWrite true --allowDelete true
pac solution pack   --zipfile <solution>/build/<Name>_<ver>_unmanaged.zip --folder <solution>/export --packagetype Unmanaged

Keep exactly one zip per solution in build/; when the version changes, delete the old zip and update every reference to the file name (deployment guides, skills, READMEs). Import order is always BusinessProcessCore first, then each process.

Safe and unsafe edits in export/

Safe to author locallyDo not hand-edit
Workflows/<name>-<GUID>.json (flow definition) and its .json.data.xml (name, description)bots/*/bot.xml (identity, template cliagent-1.0.0 = GitHub Copilot harness, icon)
bots/*/configuration.json — only agentSettings.instructions text and agentSettings.modelbots/*/configuration.json structure, recognizer, and any other settings
botcomponents/*/filedata/* — skill SKILL.md and knowledge files (JSON, schemas)botcomponents/*.skill.*/data (skill bundle pointer) and any opaque data blob
botcomponents/*/botcomponent.xml description / name textpluginpackages/**/*.nupkg (produce it from the plug-in build)
Roles/*.xml, environmentvariabledefinitions/*CanvasApps/* except as described in the console AGENTS.md
Other/Solution.xml <Version> and <RootComponents> for components you addOther/Customizations.xml beyond adding a connection reference that mirrors an existing one

New components need fresh GUIDs, file names that follow the existing pattern (Workflows/<kebab-name>-<UPPERCASE-GUID>.json), and a RootComponent entry mirroring the existing ones of the same type. When unsure about a component format, prefer creating it in the environment and syncing back with the Option B close-out.

Validation by area

Run the smallest set that covers what you touched.

AreaCommand (from the area folder unless stated)
Business Process APIdotnet restore business-process-api.sln --locked-mode, dotnet build ... --configuration Release --no-restore, dotnet test business-process-api.sln --configuration Release --no-restore
Workflow Consolenpm ci, npm test, npm run lint, npm run build
Deployment skills and guidesFrom repo root: pwsh -NoProfile -File .github/skills/deploy-business-process-core/scripts/test_deployment_readiness.ps1 (offline)
Solution exportspac solution pack succeeds; import into a dev environment when one is available; for flows, validate JSON parses and trigger filters match the step contract
Data modelcore/spec/business-process-data-model-spec.md updated alongside any schema change

Never run anything that writes to a Dataverse environment, Entra ID, or Exchange without the user's explicit confirmation of the target environment.

Deployment skills

.github/skills/deploy-business-process-core/ and .github/skills/deploy-order-processing/ each contain SKILL.md, references/ (copies of the deployment guide, prerequisites, roles and licensing, readiness report) and scripts/ (readiness checks).

  • The references/DEPLOYMENT.md copies must stay consistent with core/solution/DEPLOYMENT.md and business-processes/*/solution/DEPLOYMENT.md.
  • Skills resolve their own folder at runtime ($skillFolder); never hardcode paths.
  • A new business process gets its own deploy-<process> skill modelled on deploy-order-processing — see business-processes/AGENTS.md.

Shared scripts

scripts/ holds process-agnostic, idempotent helpers: Dataverse roles, seeding, solution users, connections, agent connections, Entra user creation and licensing. Python scripts declare inline dependencies (# /// script) and run with uv run; PowerShell scripts require PowerShell 7. Generated output and per-environment config (scripts/config/deploy.*.json other than the sample) are git-ignored. Keep these scripts generic — process-specific logic belongs in the process's solution/scripts/.

Pull requests

Follow .github/PULL_REQUEST_TEMPLATE.md and CONTRIBUTING.md: agreed issue for non-trivial work, no environment values, tests for every area touched, export/ and build/ updated together, deployment guides and skill copies consistent.

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.