Skip to content

Agent policy convergence architecture


1. Executive Summary & Core Doctrine

The Bluefly estate terminates the practice of authoring and distributing governance as disconnected Markdown files copied into vendor-specific directories (`.claude/rules/`, `.cursor/rules/`, `.agents/rules/`, `.codex/`).

The Core Principle

AUTHOR ONCE → COMPOSE THROUGH GAS CITY → ENFORCE MECHANICALLY → PROJECT TO VENDORS AS READ-ONLY


Gas City Doctrine Enforcement (v2.0) - Sessions perform work. (Sessions are disposable). - Beads remember work. (Durable universal substrate). - Convoys group work. - Mail coordinates work. - Formulas remember how. (Reusable methods). - Agents execute. - Packs configure. - Rigs scope. - Orders trigger. - Events prove what happened. - Work is not complete until verified and promoted (Capability, Skill, Formula, Pack, Order, Policy). (No parallel "learning lifecycles" or "agent memory" outside this machinery).

2. The 4-Tier Policy Separation

Governance is strictly separated into four distinct operational tiers:

┌───────────────────────────────────────────────────────────────────────────────────┐
│                             BLUEFLY AGENT GOVERNANCE                              │
└─────────┬──────────────────────────┬─────────────────────────────┬────────────────┘
          │                          │                             │
          ▼                          ▼                             ▼
   [1. HUMAN TRUTH]         [2. MACHINE POLICY]        [3. EXECUTABLE FRAGMENTS]
     BluCity-Docs              cedar-policies                blucity-packs
(Engineering-Standard)       Compliance Engine        (Gas City Prompt Fragments)
                               ContractPlane

Class 1: Universal Agent Operating Instructions

  • Location: `blucity-packs/core/prompts/shared/*.template.md`
  • Delivery: Injected City-wide via `[agent_defaults] append_fragments` in Gas City `pack.toml`.
  • Standard Fragments:
  • `reuse-first.template.md`: Search CodeGraph and rig catalog before creating new code; anti-reinvention.
  • `work-authority.template.md`: Beads is the sole work authority (WIP=1, claim before execution, Blu board ownership).
  • `provenance.template.md`: Autonomous service accounts, no human impersonation, ContextControl receipts.
  • `delegation.template.md`: Subagent capability grants, no privilege escalation.
  • `git-lifecycle.template.md`: Worktrees under `BluCity/.gc/worktrees//`, target `release/v0.1.x`.
  • `hygiene.template.md`: Dead code pruning, `trash` utility usage, zero root pollution.
  • `verification.template.md`: Work is complete only when effects are proven via tests/receipts.
  • `ownership.template.md`: Fix producer repositories rather than downstream projections.

Class 2: Machine Authorization Policy

  • Location: `library/cedar-policies/` + `ContractPlane` + `Compliance Engine`
  • Enforcement: Deterministic evaluation before tool execution.
  • Mechanism: Action classes (Read, Write, Cross-Rig, Irreversible Purge) evaluated by Cedar PDP. Gas City API write authorization (`write_auth_verify_key`) verifies signed ContractPlane grants. Prose instructions are never used as security gates.

Class 3: Machine Identity & Provenance

  • Location: `ContextControl Engine` + `OSSA Contract` + GitLab Service Accounts
  • Enforcement: Cryptographic trace (`trace:`) and immutable execution receipts (`receipt:`) logged for every bead lifecycle transition and merge request.

Class 4: Domain-Specific Standards

  • Location: Domain packs in `blucity-packs//prompts/shared/` (e.g. `blucity-packs/drupal/`)
  • Delivery: Injected only onto matching agents and rigs via Gas City pack composition (`[imports.drupal]`). Non-domain agents never receive domain-specific prompt overhead.

3. Estate Topology & Authority Boundaries

  1. Workstation Surface Is Not a Shared Repo: The operator's local workstation estate root is a private operator surface. It is NOT a Git repository and NOT a shared team workspace.
  2. Canonical Dolt Store: The single canonical Dolt store lives on Oracle at `127.0.0.1:3308/hq`. Rigs inherit the City endpoint via `gc.endpoint_origin: inherited_city`. Rigs must never run independent ad-hoc Dolt instances.
  3. Durable Work Authority: Beads and Gas City are the sole work authorities. Agents must never track work or state in `~/.gemini/` or private scratch files.
  4. Vendor Directories Are Read-Only Projections: `.claude/`, `.cursor/`, and `.codex/` receive compiled, read-only compatibility projections generated from `blucity-packs/core`. They are never authoring surfaces.

4. Upstream Pack Composition

In Gas City `pack.toml` (Schema 2):

```toml [pack] name = "core" schema = 2 version = "0.1.0" description = "Universal Bluefly operating doctrine, work authority, and hygiene laws"

[agent_defaults] append_fragments = [ "reuse-first", "work-authority", "provenance", "delegation", "git-lifecycle", "hygiene", "verification", "ownership" ] ```