steps.go's StageYaegiGate tells the operator to migrate the deleted
.archie/gate.go hook to a registered YAML workflow step, and
BuiltinStepRegistry() exposed only the six shipped workflows' own stages,
so there was nothing to migrate to. What that hook did, from 924b02a1
which deleted it: it read the worktree's repository-authored Go,
exporting Check(GateContext{Diff, ChangedFiles, Dir, BaseRef, Repo})
[]Finding, where each Finding carried a level ("error" blocked the run,
"warn" was advisory) and an optional file and line, and it inspected the
committed diff.
gate.diff-rules is that behaviour as a typed step: operator-written rules
in a stored definition -- per-rule level, RE2 pattern, optional path and
exclude_path scope, message -- matched against the ADDED lines of the
diff against the base branch, reported with their new-file line numbers.
An error-level finding parks the run with the findings in the park
reason; a warn-level finding is logged and nothing else. Unlike the hook
it replaces, no code is read out of the repository being worked on, and
the rules are versioned and audited with the definition they live in.
The settings are validated at the factory, which runs where a definition
is validated and again where it is compiled: a missing level, pattern or
message, an unknown level or settings key, and an expression that is not
a RE2 all refuse the definition rather than load and check nothing.
It arrives through the extension point archie-core-fwmp landed: a
repo-hooks provider in internal/infrastructure/workflowsteps, so both
roots that resolve a step type (the State Store's validating side and the
daemon's workflow-definitions client) register it at once.
Deliberately not landed: a step type for .archie/stages/*.go, whose
faithful equivalent is running a configured command. That would make the
stored workflow-definitions resource a command-execution surface on the
agent host, which is a maintainer's trust decision, not this lane's; it
is escalated, so steps.go's repo-stages error stays as it is.