Proposals
In a project whose workflows folder is a git repository, a workflow change is a git change.
Saving or deleting a workflow, from the UI or the API, does not write the file in place. Instead
internal/proposal opens a proposal:
- It cuts a branch named
wfx/edit-<workflow>-<unix-ts>(with-2,-3… added on a clash) in its owngit worktree, and commits the change there aswfx. - If the repo has a remote (
originwhen it exists), it runsgit push -uand thengh pr create. The PR body says who proposed the change and what validation said. - It asks a classifier to review the diff (see below), and records the verdict on the proposal.
If the push fails, the proposal stays local and says so. If gh fails, the proposal notes
“pushed, but no pull request was opened”. A project that is a plain directory, not a git repo,
is still written directly.
Commands
Section titled “Commands”wfx workflow proposals [--project p] [--workflow w] # pending changes (branches / PRs)wfx workflow approve <id> # merge it; the project's checkout pullswfx workflow reject <id> --reason "why" # close its PR and delete its branchwfx workflow drift [--project p] # workflows changed on disk, never committedwfx workflow drift --propose <w> [--project p] # open a proposal from that on-disk changeApprove with a PR runs gh pr merge --merge --delete-branch, fetches, and brings the
checkout up to the remote base. Without a PR it runs a local git merge --no-edit, deletes the
branch, and pushes the base if it tracks a remote. Either way the catalog reloads.
Reject requires a reason; the CLI refuses an empty one. With a PR it runs
gh pr close --delete-branch --comment "Rejected: <reason>". It then deletes the local branch,
and the remote branch too if it was pushed.
Classifier review
Section titled “Classifier review”Each proposal is reviewed by a classifier: WFX_DEFAULT_CLASSIFIER, the same one
decide: uses. It gets the diff and the validation result and
returns approve, reject or unreviewed (unreviewed when no classifier is configured), plus a
reason and a score.
The review is advisory. Auto-approval happens only when WFX_PROPOSAL_AUTO_APPROVE is above 0,
the verdict is approve, and the score is at or above that threshold. The default is 0, which is
off. An auto-approval is recorded with wfx-classifier as the approver, and if the merge fails
the proposal stays pending.
Someone can edit .wfx/workflows/nightly.yaml in their editor and never commit it.
wfx workflow drift lists every workflow with uncommitted or untracked changes under the
workflows folder. It is read-only. --propose <workflow> turns exactly that on-disk change into a
proposal, so it goes through the same review.