Managed workflows and development records
Projects whose workflow definitions and development records Synaxis keeps: drafts and published definitions, requirements, designs and tasks with their revisions, the delivery evidence Synaxis reads itself, and explicit acceptance, and triggers whose events are admitted as runs. No host runs a managed workflow yet: an admitted run waits until one can.
Projects
A managed project spans one or more repositories Synaxis already indexes. An administrator creates it:
synaxis workflows project create orders --repos bwtech/orders,bwtech/orders-api --title "Orders"
You can see a project only if you can read every one of its repositories (administrators see all). Each project has an acceptance policy saying what evidence each kind of delivery needs; by default a feature needs verified, reviewed and merged, a defect fix verified and merged, and documentation reviewed and merged.
Edits name the revision you read
Every definition and record has opaque revisions. An edit names the revision it was made on (--expected); a new
definition or record is saved without one. If someone else saved first, nothing is overwritten: your edit is kept
beside theirs as its own revision, and you get a conflict naming the current revision, so you can read it and merge
(see Editing together, and offline for definitions). Every command also carries an operation ID: sending the same command again returns its first answer, and
reusing an ID for a different request is refused.
Workflow definitions
synaxis workflows definitions orders
synaxis workflows save-definition orders release-check -f release-check.json --effects read --gates validation
synaxis workflows definition orders release-check
synaxis workflows publish orders release-check --expected <revision>
The file is a CodeWright Harness workflow definition. A draft can be anything that declares known effects and gates.
Publishing (administrators and curators) compiles it with the Harness compiler: a draft that does not compile is
refused with the compiler's reasons, and so is one whose steps have an effect it does not declare — a step that reads
the workspace needs read, one that writes it generate, an external effect publish, connector, merge or
promote. The published revision records the node versions and host capabilities the compiled plan needs.
Built-in and pack definitions are listed but never edited in place; save a copy under another ID.
Editing together, and offline
Two people can edit one definition, and either can work offline. A save made on a revision that is no longer the head (an offline edit, say) is kept as a conflicting draft beside the head, never lost and never applied over it. List the drafts still open, then merge them into a new head or dismiss them:
synaxis workflows drafts orders release-check
synaxis workflows resolve-drafts orders release-check --drafts <draft>,<draft> -f merged.json --expected <head> --effects read
synaxis workflows resolve-drafts orders release-check --drafts <draft> --dismiss --reason "folded into the merge"
A merge is a save on the head it names: if the head moved meanwhile, the merge is itself kept as a draft and nothing is closed. Anyone with the write scope can merge; only a draft's author, a curator or an administrator can dismiss it. Closed drafts stay readable as revisions. A definition with open drafts is not published until they are merged or dismissed.
Presence shows who has a definition open, on which revision, and whether that revision is behind the head:
synaxis workflows presence orders release-check
synaxis workflows presence orders release-check --announce editing --session desk-1 --base <revision>
synaxis workflows presence orders release-check --leave --session desk-1
A note lasts 60 seconds unless it is refreshed. It is only a hint: it does not lock the definition, reserve it, or let
anyone do anything they could not do without it. Announcing editing needs the write scope.
Development records
synaxis workflows save-record orders req-12 --kind requirement --title "Reject negative quantities" --body "…"
synaxis workflows save-record orders task-7 --kind task --deliverable feature --title "Validate quantities" \
--body-file task-7.md --depends req-12@<revision>@<content hash> --pin bwtech/orders@refs/heads/main@<commit>
synaxis workflows records orders --kind task
synaxis workflows record orders task-7
A dependency names the exact revision and content hash it was written against (synaxis workflows record shows both);
an unknown or altered one is refused. delete-record … --expected R --yes deletes a record for good: it is never
brought back by a later save.
Evidence and acceptance
Evidence is read by Synaxis from its own records, never taken from what someone says:
| State | Where it comes from (--source) |
|---|---|
| reported | an agent task's outcome (agent_task), or your own word (person) |
| verified | a CI result for the commit (ci, with --repo, --commit and the check's name as --ref), or an agent task's validation (agent_validation) |
| reviewed | an agent review task (agent_review) |
| merged | an agent task's pull request (agent_pull_request) |
synaxis workflows add-evidence orders task-7 --expected <revision> --state verified --source ci --repo bwtech/orders --commit <sha> --ref build
synaxis workflows evidence orders task-7
synaxis workflows accept orders task-7 --expected <revision> --note "Shipped in 4.2"
Acceptance (administrators and curators) is refused unless every state the policy requires has, as its newest item, passing evidence for the record's current revision, all for one commit, and each still reads the same when Synaxis checks it again. A failed, skipped or unknown result is never proof, and editing the record makes its evidence stale.
Triggers
A trigger runs a published definition revision when an event comes in. An administrator or curator activates it and becomes its authorizer:
synaxis workflows activate orders on-release --definition release-check@<published revision> \
--input sha=/head/sha:string --input attempt=/attempt:integer:optional --max-per-hour 30
synaxis workflows activate orders on-push --definition release-check@<revision> --source github --repo bwtech/orders --events push
synaxis workflows triggers orders
synaxis workflows candidates orders on-release
A webhook trigger gets its own address (POST /hooks/workflows/<project>/<trigger>) and a signing secret, shown once.
The sender signs each delivery: X-Synaxis-Timestamp is the Unix time, X-Synaxis-Signature is sha256= and the hex
HMAC-SHA256 of the timestamp, a dot and the raw body under the secret, and X-Synaxis-Delivery is the delivery's own
ID. A delivery more than five minutes from the server's clock, or with a wrong signature, is refused; one already
received is answered as a duplicate, and the same ID with a different body is refused. A github or ado trigger takes
the named events of one of the project's repositories from the connection's own webhooks.
Each event becomes one candidate: admissible, with the inputs taken from the delivery, or refused with the
reason — the trigger is disabled, revoked or cannot run here yet, its authorizer is no longer an administrator or
curator who can read the project, an input is missing or of the wrong type, or the hourly limit is reached. Inputs are
only ever taken by JSON pointer and type; nothing in a delivery can choose what runs or grant anything.
revoke … --expected R --yes ends a trigger for good and deletes its secret.
Schedules
A schedule is a trigger whose events are the occurrences of a calendar: a five-field cron expression (minute, hour, day of month, month, day of week) in an explicit timezone.
synaxis workflows activate orders nightly --definition release-check@<revision> --source schedule --cron "30 2 * * *" \
--timezone Europe/Berlin --input at=/occurrence/instant:string
synaxis workflows preview orders nightly --count 5
synaxis workflows occurrences orders nightly
Each occurrence is decided once, whichever server gets there first, and kept with its local time, the instant it
resolved to, the timezone rules used and what became of it. The policies choose what happens when the clocks change
or the server was down: a repeated local time runs once (--ambiguous earlier) or twice (both); a local time that does
not occur is skipped (--missing skip) or runs at the first valid instant (shift-forward); missed occurrences fold
into the latest (--misfire coalesce-latest) or are caught up, at most 100 within 24 hours (catch-up); and an
occurrence due while the schedule's run is still active is skipped (--overlap skip), waits (queue) or runs beside
it (allow). A due occurrence becomes a candidate and a run like any event; its inputs come from /occurrence/instant,
/occurrence/nominal, /occurrence/key and /occurrence/revision. A schedule starts when its revision is activated
and decides nothing while it is disabled.
Runs
An admissible candidate is admitted as a run in the same step: the exact definition revision, the inputs and an operation ID that every delivery attempt carries, so a host never receives two different requests for one event.
synaxis workflows runs orders --trigger on-release --state dead_letter
synaxis workflows run orders <run>
synaxis workflows replay orders <run> --yes
Before every attempt Synaxis checks the trigger again: a run is cancelled, with the reason, once its trigger is disabled, revoked or changed to another definition revision or other inputs, or its authorizer may no longer act. A failed attempt is tried again after a growing delay (at most eight attempts within 24 hours); one whose answer was lost is marked uncertain, and the host is asked whether it already has it before anything is sent again. A run whose attempts or window run out is dead_letter. A run no registered host can run is waiting. An administrator or curator replays a dead-lettered or waiting run: it keeps its operation ID and is checked again before it is delivered.
Hosts and limits
A run is executed by a workflow host: an enrolled executor that an administrator registers with the capabilities it offers and how many runs it takes at once. A delivered run is queued for a host that offers every capability its definition revision needs; each project runs at most its limit at once (4 unless an administrator sets another).
synaxis workflows fleet host <executor> --capabilities workspace.exec --capacity 2
synaxis workflows fleet limit orders 2 --priority 10 --max-cost 20 --max-daily-cost 100
synaxis workflows fleet
synaxis workflows cancel orders <run> --yes
synaxis workflows reconcile orders <run> --effects none --detail "nothing ran" --yes
A host holds a run under a lease it renews; an answer from a host that no longer holds it changes nothing and is kept
in the run's history. When a lease runs out the host may still be running it, so the run is reconciling and no other
host gets it until an administrator or curator says what took effect: none offers it to another host, succeeded
or failed settles it. Cancelling a run a host holds asks the host to stop; it is cancelled when the host says so.
synaxis workflows run shows the host, the lease, every claim and report, and why a queued run is still waiting.
A run reserves the tokens and cost its definition declares. A project may cap what its running runs reserve together
(--max-tokens, --max-cost) and what it spends in 24 hours (--max-daily-cost); a run that would pass a cap waits,
and one that declares no ceiling never runs in a project with that cap. Hosts report what each attempt used, with each
part of the run's share inside it; an attempt that ended without a report counts as having used its whole reservation.
Projects with a higher --priority go first, and a run that has waited 30 minutes goes before anything newer.
Watching and steering a run
The host running an attempt records what happens in it: each node's state, the route it took, and the approvals or answers it waits for. Synaxis shows exactly what was recorded. A node with no recorded state is never shown as done, and if some of the record never arrived, the graph says history is incomplete instead of guessing.
synaxis workflows graph orders <run>
synaxis workflows facts orders <run> --after 0
synaxis workflows command orders <run> approve --generation 1 --action-id approve-1 --reason "Checked"
synaxis workflows commands orders <run>
graph names the attempt and its generation. A curator or administrator sends a command (pause, resume, cancel,
approve, reject or answer) for the generation they saw. If another host has taken the run since, the command is
refused as stale; read the graph again. An approval or answer is accepted only while that action is waiting in the
current attempt, so an older attempt's history never approves anything. A command expires (after 10 minutes unless
you set --expires-minutes), and sending it again with the same --op gets the same answer. commands shows whether
the host applied or refused each one. Facts marked restricted show only to curators and administrators.
Environments and promotion
A project can have environments, such as staging and production, each running one published revision of each definition. An administrator creates them and says who approves what each runs (administrators, or curators too) and whether a revision must first have run successfully.
synaxis workflows environment create orders production --approver admin
synaxis workflows promote orders staging release-check@<revision> --yes
synaxis workflows promote orders production release-check@<revision> --from staging --expected <current> --yes
synaxis workflows rollback orders production release-check@<earlier> --expected <current> --reason "…" --yes
synaxis workflows environments orders
synaxis workflows selections orders production
A promotion is refused, with every reason, when the revision is not published, has not run successfully where that is
required, needs a capability no registered host offers, is not exactly what --from runs, or is weaker than what the
environment runs now: it adds an effect, drops a gate or an approval, or raises or removes a budget ceiling. Name the
revision the environment runs now with --expected; if it changed meanwhile, nothing happens. A rollback selects a
revision the environment ran before, under the same checks; it does not undo anything earlier runs did. Every
selection is kept with what it was checked against.
A trigger can follow what an environment runs instead of one revision:
synaxis workflows activate orders on-push --definition release-check --environment production
Each event then runs the revision production selects at that moment. A run that has not been delivered yet when production moves to another revision is cancelled, with the reason, rather than run with a revision nobody selected for it.
Research and reviewed proposals
Research behind a change is kept with the project. A source is a capture of what was read (a page, a document, a
record, a run or a note); it is never edited. Capture it again with --supersedes when it changes, or withdraw it.
Mark it --audience curators to keep it from other members.
synaxis workflows research capture orders --kind url --locator https://… --title "Benchmark" --content-file bench.txt
synaxis workflows research propose orders --title "Lower the cost ceiling" --body-file why.md --sources <id>,<id> \
--baseline release-check@<published> --target release-check@<new>
synaxis workflows research review orders <manifest> --approve --check replay=pass --note "…"
synaxis workflows research manifest orders <manifest>
A proposal is frozen with exactly the sources and revisions it was made from. It is refused if the new revision is
weaker than its baseline. A curator or administrator other than its author reviews it. An approval needs every
--check to pass. A proposal stays accepted only while its sources are current, its baseline is still what is
published, and no reviewer's latest review rejects it. An environment created with --requires-review promotes a
revision only with an accepted proposal of exactly it: promote … --proposal <manifest>. A rollback needs none.
Connectors and credentials
A run reaches an external service only through a connector binding. An administrator binds an account for a
project: the workflow host whose vault holds its secret, the reference that vault resolves (never the secret itself),
the operations (name@version) and egress hosts it allows, and the environment whose runs may use it. A definition
that calls connectors declares the connector effect.
synaxis workflows connectors bind orders gh --connector github --account acme-bot --host <executor> --vault-ref vault:github/acme --operations issues.create@1,issues.list@1 --egress api.github.com --environment production
synaxis workflows connectors show orders gh
synaxis workflows connectors rotate orders gh --vault-ref vault:github/acme-2 --yes
synaxis workflows connectors calls orders <run>
synaxis workflows connectors reconcile orders <run> <call> --outcome succeeded --detail "issue #12 exists"
Before each call the host asks Synaxis, which answers from what holds now: the host must hold the run's lease, the binding must be that host's, active, unexpired and at the revision the host resolved, and the operation, egress host and environment must be allowed. Nothing falls back to another binding, account or host, and credentials never cross environments. Refused calls are kept with the reason. When the host cannot tell whether a call that changes something took effect, the run makes no further such calls, cannot be reported as succeeded and cannot be queued again until an administrator or curator reconciles that call. Rotating a binding is a new revision you consent to; calls resolved at the old revision are refused. When the host's vault cannot read a binding, it needs rotating before it is used again.
A definition that declares the connector effect is promoted only to an environment that has at least one active,
unexpired binding of its own; bind one with --environment <id> first. The selection keeps which bindings were usable
when it was promoted.
Enrolled local projects
A local project on a desktop installation (its origin) can be enrolled into a managed project, so its development records are kept in Synaxis. A curator or administrator enrolls the origin under the sharing policy revision its owner reviewed, with aliases from its local IDs to records that already exist here. Aliases are kept for good.
Each change the origin sends is checked as the sender's own change now: they must be able to write the project, and the enrollment must be active. Synaxis answers each change once; sending it again after a lost answer gets the same answer. An edit must be made on the record's current revision; otherwise it is kept beside it as a conflict for someone to resolve. A deleted record is never brought back by a later change. Records carry no acceptance, approval or evidence; those are given here, explicitly.
A synchronized record can depend on other records of the project and pin repositories at exact commits. A dependency names the record (its local ID, or the server ID) at the revision and content hash the feed gave; one at any other content is refused. A change that leaves dependencies or pins out keeps the ones the record has.
synaxis workflows enrollments list orders
synaxis workflows enrollments show orders desk-1
synaxis workflows enrollments feed orders --after 0
synaxis workflows enrollments revoke orders desk-1 --reason "Laptop retired" --yes
show lists the origin's aliases and how far its changes have been imported. feed lists, in order, each revision that
became a record's current one, with the origin it came from. A revoked origin sends nothing more and is not enrolled
again.
The feed has an epoch. An administrator moves it after a restore from backup (synaxis workflows enrollments epoch --move; see Backup and restore). A client that names an older epoch then reads the feed
again from the start.
From an assistant
The same commands are MCP tools: org_workflow_projects, org_workflow_definitions, org_workflow_definition,
org_workflow_definition_save, org_workflow_definition_publish, org_workflow_records, org_workflow_record,
org_workflow_record_save, org_workflow_evidence, org_workflow_evidence_record, org_workflow_accept,
org_workflow_capabilities, and, to read only, org_workflow_triggers, org_workflow_trigger_candidates,
org_workflow_trigger_occurrences, org_workflow_runs and org_workflow_run. Record text reaches the assistant marked as data, not instructions. The REST API is under
/api/v1/workflows; a conflict or refusal is an RFC 9457 problem that also carries the receipt's fields.