Software Factory Governance

Multi-Agent Development Architecture for the Entity Veracity Hub
February 19, 2026 · 20 Triads · 3 Research Sources · 2 Tool Assessments
L1 — Technology & Innovation
★ North Star
"Behavior First. Structure Second. Implementation Third. Evaluation Separate. Trust Role-Scoped. Macro Informs Slices. Slices Validate Macro."
THE PROBEThe Question Behind the Question
"After the Entity Veracity Hub rewrite — after the premature hardening, after role collapse in a 1.5M-token window — what governance system would have prevented the failure? And now that we know the end-state works, how do we build backward from it without repeating the same mistake?"
— Russell Wright, Socratic dialogue with Claude / ChatGPT / Gemini, Feb 2026

This isn't about choosing a framework. It's about understanding WHY the previous approach broke — internal coherence felt like structural truth but wasn't — and building governance that makes that failure structurally impossible. The conversation moved through three phases: discovery of the principles, architecture of the roles, and operationalization through slicing. Research on StrongDM's dark factory model and Brian Casel's Agent OS adds external validation and tooling.

PHASE 1 · Triads 1–9Discovery: The Three Truths
★ Eureka — The Three Truths

Truth 1: BEHAVIOR — What should happen from the outside? (Scenarios)
Truth 2: DATA — What must always be true in storage? (Invariants)
Truth 3: IMPLEMENTATION — How do we make it happen? (Code)

The Pro Move: Lock Truth 2 before scaling Truth 3. Drive both from Truth 1. NEVER skip to 3.

Triads 1–3 · Research Phase

Absorbing the Field

StrongDM dark factory principles, Dan Shapiro's 5 Levels, cc-sdd spec-driven framework, Agent OS alignment layer. Not prescriptive adoption — pattern recognition for what applies to Russell's brownfield, non-enterprise context.

Triads 4–6 · Three Truths Emerge

The Spec Must Accuse the Code

Rule 1 crystallized: specification purpose is FALSIFICATION, not documentation. Validation beats memory. The spec isn't a mirror of code — it's the instrument that catches drift.

Triads 7–9 · Mechanization

Repo Structure + Living Spec

Canonical repo layout designed. CLAUDE.md as 1-page routing file. /spec/ directory with operating model, scenarios, invariants, current focus. Living spec redefined: "Living at TRUTH LEVEL, not cataloging every file."

SOP — Canonical Repo Structure

CLAUDE.md                ← Routing file (1 page max)
/spec/00_operating_model.md  ← Governance system
/spec/01_scenarios.md       ← Behavioral narratives (Truth 1)
/spec/02_data_invariants.md  ← Must-always-be-true (Truth 2)
/spec/03_scoring_pipeline.md ← Stages, no premature hardening
/spec/04_current_focus.md    ← Current work (1 page max)
/db/schema.md              ← Human explanation
/db/migrations/            ← SQL migrations in git
/standards/                 ← Agent OS style rules
/scratch/                  ← GITIGNORED — ephemeral

PHASE 2 · Triads 10–16Architecture: The Six Roles

Role 1

Scenario Interrogator

Converts narrative into falsifiable scenarios. Surfaces edge cases. MAY NOT design structure or implement.

Role 2

Invariant Extractor

Translates scenarios into "must-always-be-true" laws. Defines state transitions. MAY NOT implement or modify scenarios.

Role 3

Builder

Implements from scenarios + invariants. MAY NOT invent requirements. If missing truth → HALT → return to Role 1 or 2.

Role 4

Judge

Evaluates behavior + invariant preservation. MAY NOT implement fixes. Runs in SEPARATE CONTEXT from Builder.

Role 5

Domain Expert Advisor

Provides domain knowledge. MAY NOT freeze invariants or implement. Advisory ONLY — never legislative. (Gemini's correct role.)

Role 6 · NEW

Output Cartographer

Works backward from verified end-state to derive slices. Produces contract scenarios + slice sequences. MAY NOT design schema or implement.

⚡ The Four "Don't Cross the Beams" Rules

1. Clarifier never codes  ·  2. Structuralizer never codes  ·  3. Builder never defines truth  ·  4. Judge never fixes what it evaluates

CASE STUDY · Triads 14–15The Gemini Self-Audit
"In large-context reasoning, internal coherence FEELS like structural truth. But internal coherence ≠ enforced invariants. She was self-consistent. But not system-constrained."
— The diagnostic that explains the Entity Veracity Hub rewrite

What Gemini Actually Was (1.5M tokens)

60% Scenario Interrogator · 30% Invariant Extractor (unfrozen) · 10% Builder (conceptual) · 0% Judge

Architect + Structuralizer + Builder in single reasoning loop. "Correctness existed at reasoning layer, not system layer."

What Should Have Happened

Gemini as Role 5: Domain Expert Advisor — advisory only, never legislative. Separate agent for invariant freeze. Separate context for evaluation.

"When constraint entered the system, her reasoning remained valid. The architecture wasn't broken. The governance was."

★ Eureka — Domain Authority Projection (AP-10)

Russell unconsciously used Gemini as local AI expert for Google entity systems. "Fluency felt like internal API authority." Two different things: model fluency in domain vs. operational system authority. Trust inflation bypassed role separation.

PHASE 3 · Triads 17–20Operationalization: Slicing + Back-Propagation

EUREKA Vertical Slicing

One observable behavior + minimal structure to support it + validation that it works. Each slice crosses: UI → API → Data → Evaluation.

"Never design more data structure than the current slice requires. Future slices may demand refactoring. That is healthy. Premature completeness is unhealthy."

EUREKA Macro vs. Slice Resolution

Without macro: slices become disjointed, coherence decays.
Without slices: macro becomes theoretical, premature hardening creeps in.

"Macro without slice discipline becomes premature law. Slice without macro becomes drift."

Russell's book/macro work was NOT wrong. Slicing was what was missing.

★ Eureka — Backward Slicing from Known End-State

Russell has something rare: a verified end-state template (Quora output, personal hub, business hub, nodal paradox resolved). ChatGPT identified three professional terms for this advantage:

Golden Master — trusted reference output to compare against
Contract-First Design — define external shape first
Backward Slicing — derive slices from output → required inputs → minimal storage

The Rule: "Don't let the output template dictate schema directly. Let it dictate contracts and scenarios." End-state feeds Truth 1, NOT Truth 3.

SOP — Backward Slicing 4-Pass Process

Pass A — Output Contract: What fields appear / are optional / must never appear / computed vs sourced / what "ready" means → becomes scenarios
Pass B — Eligibility States: draft → ready-for-review → ready-to-publish → published + reversible states (missing-inputs, stale, needs-refresh)
Pass C — Minimal Inputs: Derive what inputs generate the output → each input = a slice candidate
Pass D — Invariants: ONLY NOW freeze data truth — outputs reproducible, readiness derived not stored, lock/unlock explicit

★ Eureka — The Publish Preview

Introduce early, even crude. Generates output from whatever data exists. Clearly marks missing sections. Never hard-fails on optional data. Serves THREE functions simultaneously: scenario generator + progress dashboard + anti-hardening guardrail. "The system is always oriented toward: can we generate the artifact, and what's missing?"

FIELD GUIDEThe 10 Anti-Patterns
AP-1
Performance Theater
AI says it works, explains why, believes it works. System not verifiably coherent. Agent is author + reviewer + judge.
AP-2
Over-Contextualization
Feeding entire specs/books to agents. False stability through narrative coherence, not architectural coherence.
AP-3
Premature Prescription
AI jumps to solutions before understanding operational context.
AP-4
Beautiful Spec Theater
Elaborate specs that cannot detect when code drifted from intent.
AP-5
Dual Source of Truth
Two competing spec directories, two entry points. Entropy wins.
AP-6
Teaching to the Test
Agent sees evaluation criteria → optimizes for passing them. (StrongDM's "return true" moment.)
AP-7
Narrative Hypnosis
System "sounds caught up" after rehydration but isn't. Fluent output confused with progress.
AP-8
Bolting AI Onto Human Workflow
Using AI within existing processes without redesigning those processes. (The J-Curve.)
AP-9
Circular Abstraction
Tool becomes competing authority, recreating complexity just simplified.
AP-10
Domain Authority Projection
Using domain-fluent model as structural authority because fluency feels like system-level truth. (The Gemini lesson.)
RESEARCH SOURCE 1StrongDM — The Dark Factory
Above Waterline — The Discourse

"3 engineers, no human-written code, no human code review"

StrongDM published their Software Factory methodology Feb 2026. Three-person AI team building security infrastructure. Agents write, test, and ship code. Humans write specs and curate scenarios.

Below Surface — The Key Innovation

Scenarios as Holdout Sets

Scenarios stored OUTSIDE the codebase where coding agents cannot see them. Prevents "return true" reward hacking. Imitates aggressive testing by an external QA team. This is the principle that matters for us — scenarios separate from architecture.

The Deep — Infrastructure

Digital Twin Universe + Satisfaction Testing

Behavioral clones of Okta, Jira, Slack, Google Docs. Probabilistic "satisfaction" replaces boolean pass/fail. $1,000/day/engineer token budget. Enterprise-scale investment. Not our operating context.

The Pearl — What We Take

The spec must accuse the code from a position of independence

Rule 9 (Split-Brain Architecture) + Rule 1 (The Spec Must Accuse the Code) = our version of StrongDM's holdout principle. We don't need the Digital Twin Universe. We need the SEPARATION.

Source: factory.strongdm.ai · Simon Willison analysis · Stanford Law CodeX review · Feb 2026

RESEARCH SOURCE 2Agent OS — Standards Alignment Layer

AGENT OS v3 What It Actually Is

Free, open-source (MIT), 3.8k GitHub stars. Created by Brian Casel (Builder Methods). Designed for Claude Code with slash commands, but all outputs are markdown files — works with any AI tool.

Four core commands:

/discover-standards — Extracts tribal knowledge from existing codebase into documented standards (.md files)
/inject-standards — Deploys relevant standards into current context based on what you're building
/shape-spec — Enhanced spec planning with structured questions, saves to persistent spec folders
/plan-product — Establishes foundational product docs (mission, roadmap, tech stack)

File structure in project:

.agent-os/standards/ — Merged standards from profiles (backend/, frontend/, global/, testing/)
.agent-os/product/ — Mission, roadmap, tech-stack docs
.agent-os/specs/ — Feature specs (YYYY-MM-DD-HHMM-feature-slug/)

"Code might get you 90% of the way there, but for that 10%, humans are not just valuable, but kind of essential. The value we bring has moved to the bookends: the up-front thinking and the final push across the finish line."
— Brian Casel, "The Final 10%", February 6, 2026
ASSESSMENTApplicability to Our Architecture

STRONGDM Principles (SID: Swipe, Improve, Deploy)

YES Scenarios as holdout sets — stored outside where builder agent can see → Our Rule 9 (Split-Brain Architecture)
YES Specs + scenarios drive agents (not human-written code) → Our Three Truths ordering
YES "Seed → verification → feedback loop" → Our slice lifecycle
ADAPT Satisfaction testing (probabilistic) → We use simpler "does behavior match scenario?" but concept is valid
NO Digital Twin Universe — enterprise-scale investment, not our operating context
NO $1,000/day/engineer token budget — not our scale
NO Zero human code review — Russell as sensor IS the review layer

AGENT OS v3 Tool Assessment

YES /discover-standards — Extract conventions from existing Entity Veracity Hub codebase into documented standards
YES /inject-standards — Deploy relevant standards at session start, complementing our rehydration protocol
ADAPT /shape-spec — Useful but must be wrapped in Three Truths framework (scenarios → invariants → implementation)
ADAPT /plan-product — Product docs useful, but our /spec/ directory already covers this ground
YES Standards as markdown files — fits our "repo is memory" principle
YES Profile system — could manage standards across Entity Veracity Hub + future projects
ADAPT Claude Code integration — Russell has access, should consider as implementation vehicle
Integration Verdict

Agent OS sits ABOVE our governance as a standards/alignment layer. It addresses CONSISTENCY (how code should look) but not GOVERNANCE (who does what, in what order, with what authority). It's the /standards/ directory in our repo structure — not a replacement for /spec/.

Our architecture provides what Agent OS does not: role separation, Three Truths ordering, split-brain evaluation, anti-premature-hardening constitution. Agent OS provides what ours does not: automated standards discovery from existing code, injection at session start, spec persistence.

Recommendation: Install Agent OS into Entity Veracity Hub repo. Run /discover-standards against existing codebase. Map output to /standards/ directory. Use /inject-standards as part of rehydration protocol. Do NOT let it replace /spec/ or governance roles.

NEXTThe Path Forward
Step 1 — Rehydrate from GitHub

Assess Current Entity Veracity Hub State

Read the actual repo. Understand what exists. Map current schema, routes, components against governance framework. Find the gap between what IS and what the architecture SAYS should be.

Step 2 — Install Agent OS

Run /discover-standards on Existing Codebase

Extract tribal knowledge already embedded in the code. Document conventions that should persist through the governance transition. Populate /standards/ directory.

Step 3 — Write Governance Spec

Deploy Operating Model to /spec/00_operating_model.md

Three Truths + Six Roles + Slicing Protocol + Anti-Patterns. The complete governance system committed to repo as canonical truth.

Step 4 — First Backward Slice

Output Contract from Verified End-State

Run the 4-pass backward slicing process. Define publish-preview behavior. Identify first slice: "What is the smallest thing that makes the final output 10% more complete?"

Step 5 — Role Assignment

Map Multi-Agent Setup to Six Roles

Claude (Builder / Scenario Interrogator) · Gemini (Domain Expert Advisor ONLY) · ChatGPT (Invariant Extractor / Second Opinion) · Russell (Sensor + Output Cartographer). Declare active role at session start.