"Behavior First. Structure Second. Implementation Third. Evaluation Separate. Trust Role-Scoped. Macro Informs Slices. Slices Validate Macro."
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.
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.
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.
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.
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."
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
Converts narrative into falsifiable scenarios. Surfaces edge cases. MAY NOT design structure or implement.
Translates scenarios into "must-always-be-true" laws. Defines state transitions. MAY NOT implement or modify scenarios.
Implements from scenarios + invariants. MAY NOT invent requirements. If missing truth → HALT → return to Role 1 or 2.
Evaluates behavior + invariant preservation. MAY NOT implement fixes. Runs in SEPARATE CONTEXT from Builder.
Provides domain knowledge. MAY NOT freeze invariants or implement. Advisory ONLY — never legislative. (Gemini's correct role.)
Works backward from verified end-state to derive slices. Produces contract scenarios + slice sequences. MAY NOT design schema or implement.
1. Clarifier never codes · 2. Structuralizer never codes · 3. Builder never defines truth · 4. Judge never fixes what it evaluates
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."
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."
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.
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."
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.
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.
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
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?"
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.
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.
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.
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
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/)
/discover-standards — Extract conventions from existing Entity Veracity Hub codebase into documented standards/inject-standards — Deploy relevant standards at session start, complementing our rehydration protocol/shape-spec — Useful but must be wrapped in Three Truths framework (scenarios → invariants → implementation)/plan-product — Product docs useful, but our /spec/ directory already covers this groundAgent 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.
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.
Extract tribal knowledge already embedded in the code. Document conventions that should persist through the governance transition. Populate /standards/ directory.
Three Truths + Six Roles + Slicing Protocol + Anti-Patterns. The complete governance system committed to repo as canonical truth.
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?"
Claude (Builder / Scenario Interrogator) · Gemini (Domain Expert Advisor ONLY) · ChatGPT (Invariant Extractor / Second Opinion) · Russell (Sensor + Output Cartographer). Declare active role at session start.