Workflow templates
A template is a process: which departments touch the work, in what order, with which approval gates between them, and what counts as done. 8 are registered, routing through 8 departments.
Catalogue8
Gate vocabulary5
- QA approvalauthority 1
Typically held by QA lead.
- Manager approvalauthority 2
Typically held by Department manager.
- Finance approvalauthority 3
Typically held by CFO.
- Executive approvalauthority 4
Typically held by Accountable executive.
- CEO approvalauthority 5
Typically held by You.
Authority orders the approvals queue, so the CEO’s own decisions sit above a QA sign-off — those are the ones nobody else can clear. Adding a sixth kind (Legal, Security, Clinical) is one row in APPROVAL_KINDS; it appears in the queue, the routing chain, the timeline and the builder at once.
Adding a template
Templates are configuration, and configuration is the only way any of them exist — including these 8. There is no hardcoded process anywhere in the module. Adding one is a single entry in lib/workflow/templates.ts: a name, a description, and the stages with their departments, tasks and gates.
That entry is enough for it to appear in this catalogue, in the builder, in the dashboard count and in search — and for instantiate() to turn it into a live workflow with stages, a task breakdown, dependency edges between the hand-offs, and an open gate wherever the template declares one. No component, type, route or selector changes.