Engineering
September 11, 2026
24 Min Read

Methodology Upstream, Verification Downstream: How ACM Uses an Entity-Relationship and Star Schema Layer to Enforce Human Authority

Methodology enters upstream as structured input, AI proposes within it and verifies downstream, and people decide and sign. If a proposed architecture lets AI decide something irreversible or treats human sign-off as anything less than truly independent, the design is wrong.

Data Architecture
Human-in-the-Loop
Auditability

# Methodology Upstream, Verification Downstream: How ACM Uses an Entity-Relationship and Star Schema Layer to Enforce Human Authority

Most enterprise AI failures are not model failures—they are data-modeling and authority-boundary failures.

When teams rush to bolt Large Language Models onto legal, financial, or operational workflows, they often collapse policy, reasoning, and execution into a single unstructured prompt loop. The AI reads a document, invents its own interpretation of corporate standards on the fly, mutates the record in place, and presents a tired human reviewer with a "Confirm" button.

At Effective Solutions, when we architected Agentic Contract Management (ACM), we started from a non-negotiable architectural axiom:

important

The First Law of Enterprise Agentic Design: Methodology enters upstream as structured input. AI proposes within that methodology and verifies downstream. People decide and sign. If a proposed design has AI deciding something irreversible, or relies on a human sign-off that isn't truly independent, the design is wrong.

Enforcing this law in production cannot be done with prompt engineering alone. Prompts are probabilistic; governance must be relational. To make this boundary mathematically unbreakable, we split ACM's PostgreSQL data architecture into two complementary layers:

  1. 1.An Upstream Entity-Relationship (3NF) Layer where human-authored legal methodology enters as normalized relational constraints—protected by air-gapped staging tables so AI can only propose, never self-promote.
  2. 2.A Downstream Kimball Star Schema Layer centered on immutable evaluation facts (ComplianceEvaluation) and snapshot-backed audit timelines (ContractTimelineEvent), where multi-agent verification is recorded and where human sign-off remains 100% independent and reversible.

Here is how we built both layers in ACM, complete with the SQLAlchemy schemas and FastAPI enforcement routes running in production.


1. The Architectural Litmus Test: Why Most "Human-in-the-Loop" Designs Are Broken

Before examining the database tables, consider how a flawed AI architecture behaves versus how ACM is engineered:

Architectural DimensionFlawed Agentic Design (Broken Authority)ACM Relational Architecture (Enforced Authority)
Where Methodology LivesBuried inside unstructured system prompts or ad-hoc RAG chunks that drift silently over time.Normalized upstream in a strict 3NF Entity-Relationship Layer (RuleCategory, Taxonomy, ValidationRule, Clause, GovernanceVariable).
How AI Proposes PolicyAgents directly insert or overwrite active validation rules and contract clauses in the production table.Agents write exclusively to Quarantine Staging Tables (StagedRule, StagedClause, StagedTaxonomy) with status="Staged". Only a human can promote them.
How Verification WorksA single LLM pass outputs a prose summary with no relational link between the clause, the rule, and the agent.Dedicated QA Validator nodes write granular pass/fail rows into a Star Schema Fact Table (ComplianceEvaluation) joining 5 dimension keys.
Reversibility of AI ActionsAI overwrites contract text in place or mutates rules that already governed historical contracts, destroying audit lineage.Every edit captures a full content_snapshot in ContractTimelineEvent for 1-click rollback, and modifying active rules triggers an HTTP 409 Intelligent Audit Block.
Independence of Human Sign-OffRubber-stamp UI where AI and human edits share the same actor state and the reviewer cannot verify which rule triggered which change.Cryptographic JWT RBAC separation (actor="System" vs. Legal Officer), independent dimensional drill-down, and explicit maker-checker state transitions.

Architect Speak

  • Separation of OLTP Methodology from OLAP Verification: Our upstream Entity-Relationship model operates as a normalized OLTP system of record for corporate methodology (preventing update anomalies across taxonomies and clauses), while our downstream Star Schema (compliance_evaluations) operates as a dimensional fact store for high-speed compliance aggregation and lineage traversal.
  • Structural Quarantine via Schema Segregation: Instead of relying on a boolean is_approved flag inside a single table—where a single missing WHERE clause leaks unvetted AI rules into production—ACM physically isolates AI proposals into separate staged_* tables.

CIO Speak

  • Eliminating "Rubber-Stamp" Liability: Regulators and external auditors immediately reject AI systems where human oversight is theatrical. By separating upstream methodology, downstream AI verification facts, and cryptographic human sign-off at the database layer, you can prove to any regulator that humans—not algorithms—hold the pen.
  • Zero Irreversible AI Mutations: No matter how complex an agentic workflow becomes, an AI agent in ACM cannot permanently alter a contract, delete a historical version, or activate a corporate policy rule without an independent, reversible human transaction.

2. Upstream: The Entity-Relationship Layer Where Methodology Enters as Input

In ACM, AI agents do not wake up and ask, *"What looks risky in this contract?"* Instead, institutional legal methodology enters upstream as a deterministic Entity-Relationship (ER) graph before a single token is sent to an LLM.

In apps/acm-backend/src/db/models.py, we model corporate legal methodology across five normalized relational entities and two many-to-many associative bridge tables:

  1. 1.RuleCategory: The high-level governance domain (e.g., *Data Privacy & GDPR*, *Financial Liability*, *Sovereign IP*).
  2. 2.Taxonomy: The specific instrument classification (MSA, NDA, SOW, SaaS Licensing).
  3. 3.ValidationRule: The mandatory or prohibited policy constraint, carrying an explicit risk_level (Low, Medium, High, Critical).
  4. 4.Clause: The gold-standard legal language approved by General Counsel.
  5. 5.GovernanceVariable: Bounded numerical or categorical negotiation tolerances (e.g., pay_terms: *Net 90* to *Net 15*; liability: *Strictly Prohibited* to *Fully Allowed*).
  6. 6.taxonomy_validation_association & taxonomy_clause_association: Many-to-many junction tables that deterministically bind which exact ValidationRule and Clause records enter the agent's context when a contract of a given Taxonomy is ingested.
python
Parsing Swarm Architecture...

Before any pipeline node or Mike AI micro-agent (scout_document, inspect_risks, draft_remediations) executes, ACM runs _fetch_legal_context(db, contract) to traverse the Entity-Relationship bridges and compile the exact Clause, ValidationRule, and active GovernanceVariable tolerances into a deterministic upstream methodology block:

python
Parsing Swarm Architecture...

The Staging Airlock: AI Proposes Within Methodology, Humans Promote

What happens when ACM's Demand-Driven Orchestrator (StagingService.evaluate_demand) analyzes a novel contract requirement and detects a capability or methodology gap (phase != "direct_match")? If the AI wrote directly to validation_rules or clauses, it would violate our core rule by mutating upstream methodology on its own authority.

Instead, in apps/acm-backend/src/services/staging_service.py and apps/acm-backend/src/api/staging.py, AI proposals are automatically written into quarantine staging tables (StagedRule, StagedClause, StagedTaxonomy) with status="Staged" and requires_human_promotion=True. A proposal remains completely inert until a human legal architect reviews it and calls the explicit promotion endpoint:

python
Parsing Swarm Architecture...
python
Parsing Swarm Architecture...

3. Downstream: The Star Schema Layer for Multi-Agent Verification

Once upstream methodology is locked in, ACM's pipeline engine executes a chained Maker-Checker Agent Topology (defined in apps/acm-backend/src/api/mike.py):

  1. 1.AI Document Scout $\rightarrow$ Scout QA Validator
  2. 2.AI Risk Inspector $\rightarrow$ Inspector QA Validator
  3. 3.AI Strategic Drafter $\rightarrow$ Drafter QA Validator

Notice that even inside the AI layer, no single agent is trusted to grade its own homework. Every generative agent ("Maker") is paired downstream with an adversarial QA Validator ("Checker") that verifies the proposal against the upstream ValidationRule and Clause methodology.

To store and query these verification results across tens of thousands of contracts, clauses, rules, and agents without grinding PostgreSQL to a halt with 8-table OLTP joins, we designed ComplianceEvaluation (apps/acm-backend/src/db/models.py) as a Kimball Star Schema Fact Table.

Diagram
[Click to Open Floating PiP Viewer]

Proof from ACM: The `ComplianceEvaluation` Fact Table (`models.py`)

In apps/acm-backend/src/db/models.py, every atomic verification event connects five dimension keys—Contract, Clause, Rule, Agent, and Pipeline Run—with the boolean compliance measure (is_compliant) and the verifier's exact reasoning (rationale):

python
Parsing Swarm Architecture...

Deterministic Verification & Live Star Schema Fact Persistence (`mike.py` & `pipeline_engine.py`)

Downstream verification in ACM combines LLM QA validation with deterministic Python substring checks (deterministic_substring_verified and deterministic_citation_verified in apps/acm-backend/src/services/mike.py) so hallucinated clause snippets or redline citations are immediately flagged (qa_flagged = True). At the conclusion of every pipeline or Mike AI review, record_compliance_evaluations_for_run writes atomic ComplianceEvaluation fact rows linking the contract, matched playbook clause, upstream rule, verifying agent, and pipeline run:

python
Parsing Swarm Architecture...

A subtle danger in enterprise compliance systems is silent methodology drift: what if someone edits a ValidationRule *after* 500 contracts were already verified and signed off under that rule? If the rule text changes in place, historical audit trails become a lie—it looks as though past contracts were verified against criteria that didn't exist at the time.

Because ACM's ComplianceEvaluation fact table tracks every evaluation by rule_id, our update_validation_rule endpoint in apps/acm-backend/src/api/legal_infra.py queries the Star Schema fact table before allowing any mutation. If the rule has already evaluated active contracts, ACM throws an HTTP 409 Intelligent Audit Block—and if an administrator forces a methodology update, ACM automatically traverses the Entity-Relationship bridge (taxonomy_validation_association) to downgrade every affected contract back to status="Needs Review":

python
Parsing Swarm Architecture...
tip

Look closely at those two queries working in tandem: the Star Schema fact query (ComplianceEvaluation) protects historical verification integrity, while the Entity-Relationship join (taxonomy_validation_association) automatically revokes stale contract statuses so humans must re-verify under the updated methodology.


4. People Decide and Sign: Enforcing Reversibility and True Independence

The final stage of our architectural axiom is the most critical: People decide and sign. If AI decides something irreversible, or if human sign-off isn't truly independent, the design is wrong.

What makes a human sign-off *truly independent*?

  1. 1.Independent Evidence: The human reviewer does not just see an AI-rewritten paragraph. By querying the ComplianceEvaluation Star Schema and PipelineRun.governance_snapshot, the reviewer sees the exact upstream ValidationRule, the original contract text, the AI Drafter's proposed redline, and the independent QA Validator's pass/fail rationale side by side.
  2. 2.Cryptographic Actor Separation: In apps/acm-backend/src/api/contracts.py, AI actions and human decisions are never conflated. AI redlines are logged with actor="System" (actor_role="Conversational Agent"), whereas human edits and workflow sign-offs extract the authenticated human's identity and RBAC role directly from their JWT token (get_current_user_info).
  3. 3.Absolute Reversibility (ContractTimelineEvent Snapshot Rollback): Before ACM allows *any* edit to touch a contract, it archives a complete Version 0 baseline in ContractTimelineEvent.content_snapshot. Every subsequent AI redline or manual revision writes a new immutable timeline event with its own full content_snapshot and trace_id.

Proof from ACM: Immutable Snapshot Auditing & 1-Click Rollback (`contracts.py`)

Here is the production code from apps/acm-backend/src/api/contracts.py showing how ACM guarantees that no AI action is ever irreversible, and how a human administrator can deterministically revert any contract to any historical point in time:

python
Parsing Swarm Architecture...

Enforcing Maker-Checker Sign-Off & Gating Irreversible Connectors (`contracts.py` & `pipeline_engine.py`)

Beyond snapshot reversibility, ACM enforces three hard runtime guards before any contract can transition to an irreversible state ("Finalized", "Active", or "Approved") or trigger a production outbound webhook:

  1. 1.Outbound Connector Gate (HTTP 202 pending_human_signoff): In apps/acm-backend/src/services/pipeline_engine.py, non-mock external connectors (e.g., DocuSign or ERP webhooks) are held in status="pending_human_signoff" unless metadata.get("human_approved") is true.
  2. 2.AI Actor Prohibition (HTTP 403): update_contract_workflow_state rejects any sign-off request where the actor or role is "System", "AI Engine", or "PIPELINE_ENGINE".
  3. 3.Maker-Checker Separation & Star Schema Verification Gate (HTTP 409): The human signer must be independent from the drafter (maker != actor_name), and if any downstream ComplianceEvaluation fact rows have is_compliant == False, ACM blocks finalization unless the independent reviewer provides an explicit sign-off rationale comment:
python
Parsing Swarm Architecture...

5. The Complete Authority Flow: From Upstream Methodology to Human Signature

When you put the Entity-Relationship layer, the Staging Airlock, the Star Schema verification facts, and the Snapshot Timeline together, the authority flow in ACM is unmistakable:

Diagram
[Click to Open Floating PiP Viewer]

Summary Checklist for Enterprise AI Architects

Whenever we review an enterprise AI blueprint during an architecture advisory engagement, we apply three simple tests derived from ACM's data model:

  1. 1.Can you query the methodology in SQL without running the LLM? If your compliance rules only exist inside prompt templates, methodology is not entering upstream as structured input. Model it in a normalized Entity-Relationship layer first.
  2. 2.Can an AI agent make a permanent write to a production entity or rule table? If yes, the design is wrong. Route all AI policy proposals to quarantine staging tables (StagedRule, StagedClause) and capture full content_snapshot rows on every document mutation.
  3. 3.Does the human reviewer have independent verification facts before signing? If the human only sees the AI's final output, their signature is a rubber stamp. Pair every generative agent with a downstream verification step that writes atomic, multi-dimensional facts into a Star Schema (ComplianceEvaluation)—giving human decision-makers the independent evidence they need to decide and sign with confidence.

Build with our
Architects

Bring your legacy silo data to life with autonomous reasoning swarms.

Book Review