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}.
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 31,439 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository12 other files it gives its agents.
- AGENTS.mdAGENTS.md
- business-processes/AGENTS.mdAGENTS.md
- core/AGENTS.mdAGENTS.md
- core/codeapps/workflow-console/AGENTS.mdAGENTS.md
- core/plugins/business-process-api/AGENTS.mdAGENTS.md
- evaluate-order-discounts-promotionsSkill
- validate-order-product-identitySkill
- validate-order-product-availabilitySkill
- sap-order-jsonSkill
- sap-order-excelSkill
- deploy-business-process-coreSkill
- deploy-order-processingSkill
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
- Distinctive: line 6
Use this file to customize Order Processing or to find the exact component to copy for a new process.
- Very specific: line 58
Keep the agent's design decision intact unless the user asks otherwise: the validation verdict is pass only when product identity and …
- Very specific: line 62
After any change under solution/export/: bump Other/Solution.xml version, repack solution/build/OrderProcessing_<ver>_unmanaged.zip, and …
≈ “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.
Files
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/) | Trigger | Writes / does | Next trigger it creates |
| 1 | mail-order-intake | New 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 sender | step Order Extraction Step created (status Not Started) |
| 2 | extract-order-data | Order Extraction Step created | Inline 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 notification | human step completed |
| 3 | validate-order | Extracted Order Data Review human step completed | Reads 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 notification | human step completed |
| 4 | finalize-order | Order Evaluation Review human step completed | Reads 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
| Kind | Where | Notes |
| Agents | bots/faf001_ordervalidationagent/, bots/faf001_sapfileintegrationagent/ | Instructions in configuration.json → agentSettings.instructions; model in agentSettings.model |
| Skills | botcomponents/faf001_<agent>.skill.<skill-name>_<suffix>/ | botcomponent.xml (name, description) + opaque data — do not edit data |
| Skill files | botcomponents/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 agent | Workflows/extract-order-data-*.json → Extraction_Agent | Instructions in body/message, output schema in body/botDefinition.structuredOutputSchema (escaped JSON string) |
| Roles | Roles/Order Reviewer.xml, Roles/Order Approver.xml | Resolved by name in flows and FetchXML — renaming requires updating flows, README, DEPLOYMENT.md, and the deploy skill |
| Env var | environmentvariabledefinitions/faf001_OrderMailboxAddress/ | Value supplied by deployment settings |
| Connection refs | Other/Customizations.xml | faf001_sharedagentnode, faf001_sharedoffice365, faf001_sharedteams; Dataverse reference comes from core |
| Widget | core/codeapps/workflow-console/src/features/tasks/widgets/ExtractedOrderReviewWidget.tsx (+ src/lib/bp/order.ts) | order-evaluation-review-ui reuses the generic DataReviewWidget |
| Activation | solution/scripts/activate-flows.ps1 | Activates the four flows downstream-first; update its flow list if you add or rename a flow |
| Deployment | solution/DEPLOYMENT.md, .github/skills/deploy-order-processing/ | Keep in sync |
Skill → knowledge file map
| Agent | Skill | Knowledge |
| Order Validation | validate-order-product-identity | ./assets/catalog.json |
| Order Validation | validate-order-product-availability | ./assets/inventory.json |
| Order Validation | evaluate-order-discounts-promotions | ./assets/promotions.json |
| SAP File Integration | sap-order-json (used by finalize-order) | ./references/sap-sales-order.schema.json |
| SAP File Integration | sap-order-excel | ./references/sap-order-template.xlsx |
Common customizations
| Goal | Change | Keep in sync |
| Use real catalog / stock / promotions | Replace catalog.json, inventory.json, promotions.json (keep the shape the SKILL.md describes) or change the skill to call a real system | README "Demo data and limits" |
| Change a validation rule | Edit the owning skill's SKILL.md | validate-order body/outputSchema and DataReviewWidget rendering if the result shape changes |
| Add a validation skill | Prefer 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 reference | Agent instructions, skill_results enum in validate-order output schema, README agent table |
| Change extracted fields | Extraction_Agent schema + instructions in extract-order-data | ExtractedOrderReviewWidget / src/lib/bp/order.ts, validate-order prompt, finalize-order SAP agent prompt, README field list |
| Change SAP mapping | sap-sales-order.schema.json and sap-order-json SKILL.md | finalize-order artifact naming if PurchaseOrderByCustomer changes |
| Post to a real ERP | Add an action after Create_SAP_order_payload_artifact in finalize-order with a new connection reference | DEPLOYMENT.md, deploy skill, README |
| Rename a step | Every 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).
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
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.

