Skip to content

Unified Object Model Demo

This demo provides a guided walkthrough of the FCC object model abstraction layer -- from facade construction through cross-model search, entity retrieval, vocabulary mapping, and evolution assessment.


Table of Contents

  1. Overview
  2. Prerequisites
  3. Running the Demo
  4. Step-by-Step Walkthrough
  5. Expected Output
  6. What You Will Learn
  7. Next Steps

Overview

The FCC object model abstraction layer provides a protocol-based Repository[T] and ModelFacade API that unifies access to heterogeneous domain models. The VocabularyMapping system normalizes terminology across projects, while EvolutionStage assessments track maturity. This demo shows how these components work together to enable seamless cross-model operations.


Prerequisites

  • Python 3.10+ with FCC installed (pip install -e ".[dev]")
  • No API key required -- all operations use the example repository

Running the Demo

CLI

fcc demo run unified-object-model

Programmatic

from fcc.demos.registry import DemoRegistry
from fcc.demos.runner import DemoRunner

registry = DemoRegistry.from_builtin()
demo = registry.get("unified_object_model")
runner = DemoRunner()
result = runner.run(demo)
print(f"Success: {result.success}, Steps: {result.steps_completed}/{result.total_steps}")

Step-by-Step Walkthrough

Step 1: Create Unified Facade

Initialize a ModelFacade wrapping multiple domain repositories with vocabulary mappings.

from fcc.objectmodel.examples import ExampleFacade, create_sample_model

facade = ExampleFacade()
model = create_sample_model()

Step 2: Search Across Models

Execute a search query through the unified facade spanning all connected repositories with vocabulary-mapped term normalization.

Step 3: Get Entity Full

Retrieve a complete entity representation including all attributes, relationships, and cross-model references.

entity = facade.get_full("persona:architect")
print(f"Entity: {entity['name']}, Refs: {len(entity.get('references', []))}")

Step 4: Show Cross-Model Results

Aggregate and display results spanning multiple domain models with conflict resolution and provenance tracking.

Step 5: Assess Evolution Stage

Run an ObjectModelAssessment to evaluate the evolution stage of each connected model and generate alignment recommendations.


Expected Output

Step 1/5: Create Unified Facade .................. OK
Step 2/5: Search Across Models ................... OK
Step 3/5: Get Entity Full ........................ OK
Step 4/5: Show Cross-Model Results ............... OK
Step 5/5: Assess Evolution Stage ................. OK

Demo complete: 5/5 steps passed (5.1 ms)

What You Will Learn

  • How to create and configure ModelFacade instances
  • Cross-model search with vocabulary-mapped normalization
  • Full entity retrieval with relationship expansion
  • Cross-model result aggregation and conflict resolution
  • Evolution stage assessment and maturity tracking
  • Integration with the CTO bridge (optional)

Next Steps