Skip to main content
AdvancedCollaboration & OpsEst. Time: 30-45 min

Organization-Wide Governance & Policy Enforcement

Roll out centralized MCP configurations, pre-tool guard plugins, and standardized engineering rules across entire developer fleets.

The Problem

When developers across an organization configure AI coding assistants independently, rules drift, security policies are ignored, and agents write rogue code without tracking.

Who It Is For

VP of Engineering, platform engineering teams, and security officers managing AI tool adoption across engineering fleets.

Prerequisites & Tools

Prerequisites Checklist:
  • Central release host or repository
  • Multiple developer machines or workstations
Tool / CommandTypeRole in Tutorial
devwf fleet statuscliInspect toolCatalogDigest convergence across fleet
devwf fleet upgradecliDeploy staged runtime upgrades across machines
node managed/rollout.cjscliSynchronize AI rules and guard plugins fleet-wide

Example Task Contract

Exact start_task payload representing this workflow in DevWorkflow local-first governance.

AI Tool Call: start_task payload
{
  "description": "Deploy DevWorkflow 2.1 pre-tool guard plugin and rules fleet-wide across all developer workstations",
  "type": "feature",
  "plan": [
    "Build and test managed/plugins/dev-workflow-guard.ts",
    "Run unit tests verifying OpenCode 1.x and 2.x hook compatibility",
    "Execute node managed/rollout.cjs --rules-only to sync all devices",
    "Verify convergence with devwf fleet status --json"
  ],
  "definitionOfDone": [
    "Pre-tool guard plugin blocks mutating tools until start_task is registered",
    "Unit test suite passes 5/5 tests",
    "All 3 fleet workstations (workstation-main, workstation-mac, workstation-server) report synchronized status"
  ]
}

Step-by-Step Tutorial Workflow

Follow these sequential actions with validated copyable commands and expected outputs.

1

Check Fleet Convergence

Run devwf fleet status to inspect whether all workstations share the same tool catalog digest and release tag.

Copyable Command
Terminal Command
devwf fleet status --json
Expected Terminal Output
{
  "converged": true,
  "fleetRelease": "v3.1.3",
  "machines": [
    { "name": "workstation-main", "status": "online", "version": "3.1.3" },
    { "name": "workstation-mac", "status": "online", "version": "3.1.3" },
    { "name": "workstation-server", "status": "online", "version": "3.1.3" }
  ]
}
2

Deploy Guard Plugin Fleet-Wide

Synchronize pre-tool guard plugins across OpenCode, Codex, and Claude Code configurations.

Copyable Command
Terminal Command
node managed/rollout.cjs --rules-only
Expected Terminal Output
[rollout] workstation-main: .gemini/GEMINI.md, codex/AGENTS.md, opencode/AGENTS.md UPDATED
[rollout] workstation-mac: .gemini/GEMINI.md, codex/AGENTS.md, opencode/AGENTS.md UPDATED
[rollout] workstation-server: .gemini/GEMINI.md, codex/AGENTS.md, opencode/AGENTS.md UPDATED
Fleet rollout complete. 3/3 machines synchronized.
3

Verify Enforcement

Test that rogue agent executions without start_task are blocked immediately by the guard hook.

Copyable Command
Terminal Command
node --test tests/opencode-guard-plugin.test.js
Expected Terminal Output
✔ blocks mutating tools when session has not registered task (1.2ms)
ℹ tests 5 · pass 5 · fail 0

Verification Steps

Verify that your work genuinely satisfies the task contract before closing.

Run `devwf fleet status --json` to verify `converged: true`
Run test suite on each machine to confirm guard plugin blocks unmanaged edits

Limitations & Troubleshooting

Issue: Machine offline during rollout
Resolution: Run `node managed/rollout.cjs` with `--resume` to re-attempt sync only on remaining offline nodes.