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

copilot-agentic-business-process / order-processing

AGENTS.md1 starsChanged 52 days agoMITView on GitHub

Purchase orders arrive by email, agents extract and validate them, two human gates approve, and a final agent emits an SAP-ready payload. Business-level description: README.md. Generic patterns: business-processes/AGENTS.md. Use this file to customize Order Processing or to find the exact component to copy for a new process. Data keys: extracted-order, extracted-order-review.{decision,notes,edited_order}, order-evaluation.result, order-evaluation-review.{decision,notes}.

The file

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

3 rules. About 0 are common, 1 is distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    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:

    Use this file to customize Order Processing or to find the exact component to copy for a new process.

    line 6
  2. Very specific:

    Keep the agent's design decision intact unless the user asks otherwise: the validation verdict is pass only when product identity and …

    line 58
  3. Very specific:

    After any change under solution/export/: bump Other/Solution.xml version, repack solution/build/OrderProcessing_<ver>_unmanaged.zip, and …

    line 62

≈ “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 — Order Processing (reference implementation)

Purchase orders arrive by email, agents extract and validate them, two human gates approve, and a final agent emits an SAP-ready payload. Business-level description: README.md. Generic patterns: business-processes/AGENTS.md. Use this file to customize Order Processing or to find the exact component to copy for a new process.

Process map

#Workflow (solution/export/Workflows/)TriggerWrites / doesNext trigger it creates
1mail-order-intakeNew mail in shared mailbox faf001_OrderMailboxAddress (Office 365 Outlook)Instance (Order Processing Intake, business key from|subject), attachment + file; step Order Intake Validation; on invalid attachment: failed step, instance Failed, reply to senderstep Order Extraction Step created (status Not Started)
2extract-order-dataOrder Extraction Step createdInline Extraction Agent (InvokeDefinition) on the latest attachment → data value extracted-order (JSON); human step + task Extracted Order Data Review, widget extracted-order-review-ui, role Order Reviewer, team Order Reviewers Global; Teams notificationhuman step completed
3validate-orderExtracted Order Data Review human step completedReads extracted-order-review.decision / .edited_order; if not approved closes the instance; else step Order Evaluation, published Order Validation Agent (InvokeAgent) → order-evaluation.result; human step + task Order Evaluation Review, widget order-evaluation-review-ui, role Order Approver, team Order Approvers Global; Teams notificationhuman step completed
4finalize-orderOrder Evaluation Review human step completedReads order-evaluation-review.decision; reject → Order Rejected step, instance closed; approve → Order Validated, reads extracted-order-review.edited_order, Generate SAP order payload, SAP File Integration Agent (sap-order-json) → artifact SAP_SalesOrder_<customer PO>.json, instance Completed—

Data keys: extracted-order, extracted-order-review.{decision,notes,edited_order}, order-evaluation.result, order-evaluation-review.{decision,notes}.

Components

KindWhereNotes
Agentsbots/faf001_ordervalidationagent/, bots/faf001_sapfileintegrationagent/Instructions in configuration.json → agentSettings.instructions; model in agentSettings.model
Skillsbotcomponents/faf001_<agent>.skill.<skill-name>_<suffix>/botcomponent.xml (name, description) + opaque data — do not edit data
Skill filesbotcomponents/faf001_<agent>.file.<file>_<suffix>/filedata/botcomponent.xml <name> is the path inside the skill (./SKILL.md, ./assets/catalog.json, ./references/…) and <parentbotcomponentid> names the owning skill. Folder suffixes are random — find a skill's files by parentbotcomponentid, not by folder name.
Inline extraction agentWorkflows/extract-order-data-*.json → Extraction_AgentInstructions in body/message, output schema in body/botDefinition.structuredOutputSchema (escaped JSON string)
RolesRoles/Order Reviewer.xml, Roles/Order Approver.xmlResolved by name in flows and FetchXML — renaming requires updating flows, README, DEPLOYMENT.md, and the deploy skill
Env varenvironmentvariabledefinitions/faf001_OrderMailboxAddress/Value supplied by deployment settings
Connection refsOther/Customizations.xmlfaf001_sharedagentnode, faf001_sharedoffice365, faf001_sharedteams; Dataverse reference comes from core
Widgetcore/codeapps/workflow-console/src/features/tasks/widgets/ExtractedOrderReviewWidget.tsx (+ src/lib/bp/order.ts)order-evaluation-review-ui reuses the generic DataReviewWidget
Activationsolution/scripts/activate-flows.ps1Activates the four flows downstream-first; update its flow list if you add or rename a flow
Deploymentsolution/DEPLOYMENT.md, .github/skills/deploy-order-processing/Keep in sync

Skill → knowledge file map

AgentSkillKnowledge
Order Validationvalidate-order-product-identity./assets/catalog.json
Order Validationvalidate-order-product-availability./assets/inventory.json
Order Validationevaluate-order-discounts-promotions./assets/promotions.json
SAP File Integrationsap-order-json (used by finalize-order)./references/sap-sales-order.schema.json
SAP File Integrationsap-order-excel./references/sap-order-template.xlsx

Common customizations

GoalChangeKeep in sync
Use real catalog / stock / promotionsReplace catalog.json, inventory.json, promotions.json (keep the shape the SKILL.md describes) or change the skill to call a real systemREADME "Demo data and limits"
Change a validation ruleEdit the owning skill's SKILL.mdvalidate-order body/outputSchema and DataReviewWidget rendering if the result shape changes
Add a validation skillPrefer creating it in Copilot Studio and syncing back (Option B close-out) — a skill is a type 9 component plus type 14 file components and a bundle referenceAgent instructions, skill_results enum in validate-order output schema, README agent table
Change extracted fieldsExtraction_Agent schema + instructions in extract-order-dataExtractedOrderReviewWidget / src/lib/bp/order.ts, validate-order prompt, finalize-order SAP agent prompt, README field list
Change SAP mappingsap-sales-order.schema.json and sap-order-json SKILL.mdfinalize-order artifact naming if PurchaseOrderByCustomer changes
Post to a real ERPAdd an action after Create_SAP_order_payload_artifact in finalize-order with a new connection referenceDEPLOYMENT.md, deploy skill, README
Rename a stepEvery trigger filter that names it, README, monitoring expectations—

Keep the agent's design decision intact unless the user asks otherwise: the validation verdict is pass only when product identity and availability pass; promotion findings are reported but never block an order.

After any change under solution/export/: bump Other/Solution.xml version, repack solution/build/OrderProcessing_<ver>_unmanaged.zip, and update the zip name in solution/DEPLOYMENT.md and .github/skills/deploy-order-processing/ (see root AGENTS.md).

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.