Documentation
¶
Overview ¶
Command coordination shows the gsm "Governed State Machine" convergence layer surfaced through the govern package: multiple agents mutating SHARED state converge to the same valid normal form regardless of interleaving, proven at build time (not asserted at runtime). Two scenes, both with NO API key (a small inline scripted Model drives the agent tool calls):
Scene 1 (single registry, verify-or-repair): declare an invariant with no explicit compensation and let gsm SYNTHESIZE a convergent repair (Registry.BuildOrSynthesize), wrap the verified machine with govern.New, and drive it through an agent via govern.EventTool. Applying past the cap clamps back to a valid normal form.
Scene 2 (cyclic non-monotone federation): a two-registry federation with a cycle that plain Build rejects (it cannot converge). CoordinationPlan() names the one morphism edge to place under external coordination; BuildCoordinated(plan) then builds a convergent FedMachine, which govern.NewFederated wraps as a crash-recoverable governor.
go run ./examples/coordination