Review workflow defaults and Git triggers
Open Settings → Workflows in the terminal, web console or desktop app. The same settings apply to each client. Choose user defaults or a project, then an agent from Settings → Agents. A project rule inherits its user default until an explicit override is saved. Disabling an agent does not delete its account, credentials, session history or saved rule; it stops admitting new automatic review work for that agent.
Configure commit and push-attempt triggers separately. Choose the reviewer from the account/model bindings already authorized for review, and an execution host available to this user. The source may use another selected agent, including Antigravity. The existing native review executor supports Claude and Codex as reviewers; this feature does not claim Antigravity reviewer execution or trusted model/vendor identity that its adapter cannot attest.
An enabled trigger is explicit permission to request the configured review, subject to the project's existing execution policy, account/model binding, immutable review profile, budget admission and required checks. It does not weaken any of those requirements. Unknown identity, unsupported prerequisites, missing budget and unobserved checks remain visible blockers. A configured vendor/provider label is not trusted inference evidence.
What the hooks observe
post-commitrecords the actual committed head and its first parent.pre-pushrecords the actual pushed local head and remote previous head from Git's standard input. It observes an attempted push, not successful remote delivery. A new branch uses its merge base with the configured local default branch, falling back to the local head's first parent. An initial commit with no committed comparison base is blocked explicitly.- Deleted remote refs start no code review. Up to 128 changed refs and 1 MiB of Git ref-update input are accepted per push.
The host verifies the real session checkout, its host-owned receipt, the pinned Git metadata namespace, committed comparison and clean source before the existing review executor can start. If the checkout moved before capture, the old trigger becomes blocked; it never silently reviews a newer commit. Later gate refreshes retain the comparison base and observe the current head so changed source becomes stale.
The hook writes a local journal and returns promptly. The enrolled host or local agent relays it over its existing authenticated channel. A hook contains no controller token, model prompt or account credential. Delivery acknowledgement removes only the exact bytes accepted by the controller. Offline or failed delivery retains the original record. The relay binds every journal record to that checkout's project, source session and agent; a repository cannot use the daemon to submit another project's records.
Existing hooks and local checkouts
Installation adds a marked shell block before the existing hook body. Existing
arguments, push standard input, interpreter and exit logic remain in place,
including Oxlint and version/release checks. A custom core.hooksPath, non-shell
hook or non-executable hook is preserved and reported as requiring manual
integration. Devctrl does not replace another hook manager or change Git's
configuration to bypass it. In a verified local context the private runner remains available through
git rev-parse --git-path devctrl-review-workflows/runner.mjs for an explicit
integration. A pre-push integration must replay the original input to the
existing hook after the managed runner; simply invoking two stdin readers is
incorrect.
Unknown/managed contexts do not create that runner automatically; an operator
must explicitly arrange manual integration in the actual Git execution host.
Automatic installation requires a registered native local execution context
without runtime Git configuration or namespace overrides. System configuration
must be explicitly disabled with GIT_CONFIG_NOSYSTEM=1 or identified by an
absolute GIT_CONFIG_SYSTEM path. The helper snapshots that system file, the
effective HOME/XDG_CONFIG_HOME or explicit GIT_CONFIG_GLOBAL files, repository
configuration and their bounded include closure through no-follow descriptors.
It preserves their bytes and checks them again immediately before publishing a
hook. Conditional include targets are checked conservatively even when their
conditions do not match; a hook manager in any target requires manual integration.
Relative and ~/ includes are supported. Cyclic, aliased, hardlinked, oversized,
unreadable, shared-writable or unsupported include paths remain manual.
The closure is limited to 32 file snapshots, 32 parser invocations, 128 include
edges and three seconds shared across inspection and publication checks.
Completed filename/content snapshots are inspected once, so repeated includes
cannot multiply parser work. Exceeding a limit requires manual integration.
An implicit compiled system configuration path still requires
manual_integration_required: Git's path-reporting command reads configuration
before returning that path, so it cannot supply the helper's bounded no-follow
discovery guarantee. Managed remote hosts also remain manual. The enrolled host
currently sees a mounted checkout and UID, while Git runs in the session's
container with a different HOME, system configuration and filesystem namespace.
Its checkout receipt does not attest that execution context. A future supported
probe and installer must run in that exact namespace and identity; host-side
configuration cannot substitute for it. Existing
verified outbox records can still be relayed independently; manual status does
not claim automatic trigger enforcement. Registered local worktrees pin their
common Git directory when the user registers them.
The configuration file order and include rules follow the
official Git configuration documentation.
The implicit-system discovery restriction follows the configuration read before
variable dispatch in Git's variable command.
A repository-controlled .git redirect cannot authorize another repository’s
hooks. Verified local worktrees install independently while sharing the repository's
existing hooks. If legacy sessions share one checkout, installation reports the
ambiguity instead of assigning one session's rules to another.
For a native local agent, explicitly register the checkout on that computer:
devctrl review hooks register PROJECT SOURCE_SESSION --directory /absolute/checkout
The private registry defaults to ~/.devctl/review-hook-roots.json; both the CLI
and agent honor DEVCTL_REVIEW_HOOK_ROOTS_FILE. Automatic installation uses POSIX ownership semantics; native Windows hook
manager integration remains explicit. A containerized local helper may relay
an existing outbox with this owner-bound registry and the checkout mounted, but
cannot claim the registered native hostname/user/HOME execution context and
therefore cannot install hooks automatically. A remote controller project path is never
permission to write arbitrary local files. Unregistered or unavailable roots
remain explicit in project hook status; managed remote worktrees do not need
this local registration for their bounded delivery scope.
All access to agent-writable Git metadata runs in a dedicated POSIX Python 3 helper after switching to the exact runtime UID/GID and clearing privileged supplementary groups. Descriptor-relative, no-follow reads and writes reject symlinks, hardlinked leaves and redirects outside the registered Git namespace. Atomic publication compares the original hook's bytes and identity immediately before replacing it; concurrent edits are retained and reported. Interrupted stages and changed acknowledgement candidates remain bounded recoverable data, not evidence that delivery succeeded. Hosts without Python 3 require manual integration. Node.js missing from the Git host does not break an existing non-blocking/disabled push hook; an explicitly enabled blocking gate refuses with an actionable message instead of an unexplained exit 127.
Hook events never contain Git remote URLs or their credentials. Original hook arguments remain unchanged. Review subject capture requires a remote without query parameters or fragments rather than recording those values as identity.
Optional blocking push
Push remains non-blocking by default. An explicitly enabled blocking push checks the exact base/head, configuration digest, clean source and passing controller gate. The daemon caches an affirmative decision for at most ten seconds; the underlying trusted source capture must also be no more than thirty seconds old. Offline, missing, stale and blocked decisions refuse the local push. Trigger delivery is still asynchronous: retry after the review actually passes.
Local hooks and their files can be bypassed by someone controlling that checkout. They are not a security boundary. Use the existing authoritative VCS status publisher and protected-branch required statuses for server enforcement. No hook result can waive the controller's normal review/writeback gate.
Queue, history and cleanup
The controller persists exact-subject jobs before acknowledging a trigger. Commit/push retries for the same owner, project, source session, agent, comparison and effective configuration deduplicate to one job. A manual request can reconsider a pre-execution skipped/blocked job without replaying an already launched review. Changed settings or lost ownership prevent stale queued work from starting. Only a passing server gate produces a passed history entry.
History is paginated and scoped to the signed-in owner/project. It distinguishes pending capture, running review, skipped trigger, blocked prerequisites, reviewer execution/result and the server gate. Each entry retains trigger type, exact commit range, requested/observed model, result and concrete blocker. Project review remains available for manual requests, profile setup and detailed artifacts.
Resource limits are explicit: at most 128 local events, sixteen bounded stdin replay files and sixteen atomic journal temporary files, ten thousand retained controller jobs per user and the configured daily review limit per project/source agent (admitted jobs in the previous 24 hours). Abandoned stdin replays and journal temporary files expire after an hour; acknowledged events are deleted. Terminal controller history expires after thirty days in bounded batches; pending work is not silently deleted by age. Existing managed task cleanup retains authority over isolated reviewer processes and workspaces.
API, CLI and MCP
Owner/operator API:
| Operation | Route |
|---|---|
| Read/save user defaults | GET/PUT /v1/preferences/review-workflows |
| Read/save project overrides | GET/PUT /v1/projects/:projectId/review/workflows |
| Read bounded trigger history | GET /v1/review/workflow-history?projectId=…&limit=20&before=… |
| Manually enqueue configured review | POST /v1/projects/:projectId/review/workflow-trigger |
| Check an exact-subject local gate | POST /v1/projects/:projectId/review/workflow-gate |
Saved defaults/overrides carry an expected revision; a conflict requires reload.
The canonical operator may inspect/configure a tenant-owned project through a
server-resolved owner scope; audit records retain both principals. Configuration
reads/writes never enqueue or execute a review. Manual execution stays bound to
the source owner; operator administration cannot impersonate that user. Other
tenant administrators receive no cross-owner access.
Manual trigger input is {sourceSessionId,idempotencyKey,base,head}. The enrolled
daemon endpoints accept only sessions served by that host or owned/scoped client.
Their desired state is paginated; no full history is sent on console startup.
devctrl review defaults get
devctrl review defaults put --file defaults.json
devctrl review workflows get PROJECT
devctrl review workflows put PROJECT --file overrides.json
devctrl review trigger-history PROJECT --limit 20
devctrl review trigger PROJECT --file exact-comparison.json
Session MCP exposes get_review_workflows({}),
get_review_trigger_history({limit,before?}) and
trigger_configured_review({idempotencyKey,base,head}). Project, owner and source
session come from its authenticated broker. It cannot edit defaults, choose an
unapproved reviewer, waive a profile or request another owner's session.