copilot-agentic-business-process / workflow-console
AGENTS.md1 starsChanged 52 days agoMITView on GitHub
React 19 + TypeScript + Vite + Tailwind CSS 4 + TanStack Query, hosted as a Power Apps code app. It gives users their task queue, the review widget for each task, and the timeline, attachments, artifacts, and outputs of every process instance. Full developer guide: README.md. The console is part of the core and shared by every business process. The usual reason a process touches it is to add a review widget. npm test reads ../../plugins/business-process-api/spec/ — keep the…
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
- business-processes/order-processing/AGENTS.mdAGENTS.md
- core/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
4 rules. About 0 are common, 0 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 45
Reuse first: If reviewers only need to read structured JSON and approve/reject with notes, register your ID against the schema-agnostic …
- Very specific: line 56
Run npm test, npm run lint, npm run build.
- Very specific: line 91
Keep Custom API request/response shapes in *-api-contracts.ts aligned with core/plugins/business-process-api/spec/ — tests enforce this.
- Very specific: line 102
Update the packaged app in core/solution/export/CanvasApps/cr522_workflowconsole_75f6c_CodeAppPackages/ with the contents of dist/, 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 — Workflow Console (Power Apps code app)
React 19 + TypeScript + Vite + Tailwind CSS 4 + TanStack Query, hosted as a Power Apps code app. It gives users their task queue, the review widget for each task, and the timeline, attachments, artifacts, and outputs of every process instance. Full developer guide: README.md.
The console is part of the core and shared by every business process. The usual reason a process touches it is to add a review widget.
Commands (run from this folder, Node 22.12+)
npm ci
npm test # node --experimental-strip-types --test tests/*.test.mjs
npm run lint # eslint
npm run build # tsc -b && vite build -> dist/
pwsh -NoProfile -File tests/link-existing-app.test.ps1 # offline, only if scripts/ changednpm test reads ../../plugins/business-process-api/spec/ — keep the sibling plug-in
folder in place. Visual fixtures: npm run dev, then /tests/task-workflow.html or
/tests/process-detail.html (fixtures only; not a substitute for the Power Apps host).
Layout
| Path | Contents |
src/features/tasks/ | Task queue, task detail, claim/start/complete (task-api.ts, submitTaskOutcome.ts), attachments |
src/features/tasks/widgets/ | registry.ts (widget contract + map), generic widgets, <process>/ widget folders |
src/features/instances/ | Process list/detail, step timeline, outputs, files (process-api.ts, contracts, models) |
src/lib/bp/ | Choice constants (choices.ts — mirrors core option sets) and domain helpers |
src/lib/dataverse/ | Connector client and OData helpers |
src/components/ui/ | shadcn-style primitives (Radix + Tailwind) — reuse before adding new ones |
src/generated/, .power/ | Generated by the Power Apps CLI — never hand-edit |
tests/ | Node test runner *.test.mjs, HTML fixtures, PowerShell tests |
Adding a review widget for a business process
The flow that raises the task decides the widget: it writes faf001_widgetid and the
JSON faf001_inputdata. The console maps the ID to a component in
registry.ts; unknown IDs fall back to
RawJsonWidget instead of crashing.
- Reuse first. If reviewers only need to read structured JSON and approve/reject
with notes, register your ID against the schema-agnostic
DataReviewWidget— no new component (that is howorder-evaluation-review-uiworks). - Otherwise create
src/features/tasks/widgets/<process>/<Name>Widget.tsx(one folder per business process, kebab-case process name) exporting a component typedBpWidget/(props: BpWidgetProps) => JSX.Element. - Register it in
registry.tsunder an ID ending in-ui, unique across all processes and prefixed with the domain, e.g.'claim-damage-review-ui'. - Test pure logic (input parsing, validation, building
values) in a sibling.tsmodule that uses relative imports with.tsextensions (Node strip-types cannot resolve@/aliases or TSX), and cover it withtests/<process>-<widget>.test.mjs. - Run
npm test,npm run lint,npm run build.
Existing ExtractedOrderReviewWidget.tsx and src/lib/bp/order.ts predate the
per-process folder convention and stay where they are; do not copy that placement.
Widget contract (BpWidgetProps)
| Prop | Meaning |
task | The task row (faf001_taskname, faf001_widgetid, status, …) |
inputData / rawInputData / parseError | Parsed faf001_inputdata; on parse failure render <RawJsonWidget {...props} /> |
readOnly | The task is closed — render the result without submit controls |
submitting | A submission is in flight — disable actions |
onSubmit(submission) | Returns a promise that rejects on failure; keep the user's edits on screen when it does |
BpWidgetSubmission = { outcome, notes?, values? }:
outcomefromTASK_OUTCOMEinsrc/lib/bp/choices.ts(Approved / Rejected / Needs More Info).values[]items are{ key, type: 'text'|'json'|'number'|'boolean'|'datetime', value }; max 100, keys unique,decisionandnotesreserved.- The server stores each as
faf001_bpdatavaluekey<widget-id-without--ui>.<key>, plus<prefix>.decisionand<prefix>.notes. The downstream flow reads exactly these keys — document them in the process README and keep widget and flow in sync.
UI conventions: Tailwind utility classes and src/components/ui/* primitives,
lucide-react icons, server state through TanStack Query hooks (no ad-hoc fetch in
components), path alias @/ inside src/.
Data access
- Tables and Custom APIs are reached through generated services in
src/generated/. To add or refresh one, use the project-local CLI —npx --no-install pa, notpac:pa app add data-source …/pa app add dataverse-api --api-name faf001_<Name>(see README "Register Data Sources"), then review and commit the generated diff. - Keep Custom API request/response shapes in
*-api-contracts.tsaligned withcore/plugins/business-process-api/spec/— tests enforce this. power.config.jsonholds local app/environment/connection IDs and is git-ignored; the versioned template ispower.config.template.json. Link an existing app withscripts/link-existing-app.ps1.
Shipping a console change
A widget is code in the core console, so it ships with the core solution:
npm run build.- Update the packaged app in
core/solution/export/CanvasApps/cr522_workflowconsole_75f6c_CodeAppPackages/with the contents ofdist/, and update the<CodeAppPackageUris>entries (hashed asset names) and<AppVersion>incr522_workflowconsole_75f6c.meta.xmlto match. Do not rename thecr522_…app. Alternative:npx --no-install pa app push --solution-id <core solution id>to a dev environment, then sync the core solution back (root AGENTS.md, Option B close-out). - Bump and repack
BusinessProcessCoreper the root AGENTS.md.
pa app push replaces the live app immediately with no rollback — only run it with the
user's confirmation of the target environment and appId.
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.

