How tomtastisch/agent-governance works
Agent Governance is a harness-neutral governance bundle and transactional installer, exposed through an interactive CLI and package APIs. The principal workflow is user-selected harness discovery, explicit target confirmation, install/update planning, reversible mutation, and verification. Separate public capabilities classify work items, persist and resolve resume checkpoints, and expose routing, command, discovery, and template registries. The sampled excerpts confirm parts of init and transaction handling; edges for unsampled modules are limited to documented capabilities and visible entry-point roles.
Main entry points: orchestrator.ts Init orchestrator · public-commands.ts Public commands · transaction.ts Installer transaction · cli.ts CLI
Components 24
User entry
- CLI
src/cli.ts - Public commands
src/public-commands.ts - Init orchestrator
src/init/orchestrator.ts - Interactive prompts
src/init/prompt.ts - Harness discovery
src/discovery-catalog.ts
Installation lifecycle
- Target bindings
src/init/bindings.ts - Target inspection
src/target.ts - Installer transaction
src/transaction.ts - Transaction context
src/installer/context.ts - Release verification
src/release.ts - Install planning
src/planner.ts - Recovery
src/installer/recovery.ts - Secure filesystem
src/native-filesystem.ts
Governance catalogs
- Governance routing
src/routing-catalog.ts - Command catalog
src/command-catalog.ts - SSOT manifest
src/ssot-manifest.ts - Template registry
src/templates-catalog.ts - Governance contract
src/governance-contract.ts
Agent state APIs
- Work-item classification
src/work-items.ts - Resume checkpoints
src/resume-checkpoint.ts - Resume resolution
src/resume-resolve.ts - TOON projection
src/resume-toon.ts
Harness integration
- Microsoft toolkit bridge
integrations/microsoft-agent-governance-toolkit/bridge/provider.mjs
Other components
- Developer
Connections 21
- Developer → CLI: runs
- CLI → Init orchestrator: starts init
- CLI → Public commands: dispatches
- Init orchestrator → Harness discovery: discovers harnesses
- Init orchestrator → Interactive prompts: requests selection
- Init orchestrator → Target bindings: resolves targets
- Init orchestrator → Installer transaction: creates transactions
- Interactive prompts → Init orchestrator: returns choices
- Installer transaction → Transaction context: resolves context
- Transaction context → Target inspection: inspects target
- Transaction context → Release verification: verifies release
- Installer transaction → Install planning: plans operation
- Recovery → Secure filesystem: uses secure operations
- Installer transaction → Recovery: recovers mutation
- Governance contract → Governance routing: defines tool fields
- Public commands → Work-item classification: exposes API
- Public commands → Resume checkpoints: exposes API
- Public commands → TOON projection: exposes API
- Resume resolution → Resume checkpoints: resolves checkpoint
- TOON projection → Resume checkpoints: projects checkpoint
- Microsoft toolkit bridge → Governance contract: loads verified policy