docs(example): add layered development concept and extend tutorial
Some checks failed
Test Suite / unit-tests (3.11) (push) Has been cancelled
Test Suite / unit-tests (3.12) (push) Has been cancelled
Test Suite / integration-tests (push) Has been cancelled
Test Suite / e2e-tests (push) Has been cancelled
Test Suite / performance-tests (push) Has been cancelled
Test Suite / code-quality (push) Has been cancelled
Test Suite / security-scan (push) Has been cancelled
Test Suite / test-summary (push) Has been cancelled

Adds LAYERED-DEVELOPMENT.md documenting the concept for evolving a flat
entity collection into a structured systemic model through four layers:

  L0 Source text → L1 Raw entities (current) → L2 Typed entities
  → L3 Relation graph → L4 Minimal systemic model

Covers: the element/relation/principle/institution type taxonomy,
VSM as a structural coordinate system, the type × VSM coverage matrix,
triplet extraction with a controlled predicate vocabulary, feedback loop
detection, and the distillation hypothesis for finding the generative
core of a corpus.

Extends TUTORIAL.md with sections 17–23:
  17. Observing entity heterogeneity
  18. The four-layer model overview
  19. Layer 2 — classifying entities (schema, pipeline stage, metrics)
  20. Layer 3 — extracting the relation graph (triplets, feedback loops)
  21. Layer 4 — the minimal systemic model (core-model.md output)
  22. Planned CLI commands for layers 2–4
  23. Layers 2–4 as composed infospaces

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-20 10:43:32 +01:00
parent 9c32ad1837
commit c861520ccd
2 changed files with 851 additions and 0 deletions

View File

@@ -0,0 +1,409 @@
# Layered Infospace Development
A concept for evolving a flat entity collection into a structured systemic model.
---
## The Problem
After processing all 35 chapters of *The Wealth of Nations*, the infospace
contains ~988 entities. But reviewing them reveals a structural problem: they
are not all the same kind of thing.
Some are **stocks** — things that exist or persist:
- *Capital Stock*, *Colony Assemblies*, *Corn*, *Plate (Household Silver)*
Some are **processes** — things that happen or transform:
- *Bank Credit Extension*, *Agricultural Market Integration*, *Division of Labour*
Some are **principles** — abstract laws or invariants:
- *Agricultural Opportunity Cost*, *National Animosity in Commerce*
Some are **sequences** — ordered chains of events:
- *Agricultural Market Access Development Sequence*
When you apply the VSM mapping uniformly to this mixture, the result is
conceptually muddled. System 2 (coordination) ends up containing both a
*price signal* (a relation between operations) and a *market* (an element
those relations flow through). The mapping is not wrong — both genuinely
belong in S2 — but the lack of type distinction hides structural information.
The goal of layered development is to move from a flat collection of named
phenomena toward a **minimal viable systemic model**: the smallest set of
elements and relations that can generate Smith's argument from first
principles.
---
## The Ontological Distinction
The most important distinction is between **elements** and **relations**:
- An **element** is a thing that can exist independently: a stock, an agent,
an institution, a good. It is a *noun* in the grammar of the model.
- A **relation** is a structural dependency between elements: a mechanism,
a causal link, a regulatory signal. It is a *verb* or *connector* in the
grammar of the model.
This distinction is prior to the VSM assignment. Once you know whether
something is an element or a relation, the VSM question becomes:
*which control layer does this element inhabit?* or
*which control signal does this relation carry?*
---
## Five Entity Types
A complete taxonomy for the WoN infospace:
| Type | Definition | WoN examples |
|---|---|---|
| **Element** | A stock, agent, artifact, or institution that persists | Capital Stock, Corn, Colony, Guild |
| **Process** | A flow, activity, or transformation (has duration) | Division of Labour, Credit Extension, Trade Route |
| **Relation** | A structural dependency between two elements | Rent determined by price; Wages bounded by profit margin |
| **Principle** | An abstract law or invariant that holds across contexts | Opportunity Cost, Comparative Advantage, Diminishing Returns |
| **Institution** | A socially constructed rule system or norm | Banking system, Taille, Apprenticeship Law |
These types are not mutually exclusive at the margin — *Market Price* is
both a Relation (between cost components and clearing condition) and an
emergent Property of an Element (the market). The choice of primary type
should reflect its role in the argument being made.
---
## The VSM as Structural Lens
The Viable System Model provides a *recursive control hierarchy*. Applied to
the WoN, each VSM level corresponds to a layer of economic governance:
| VSM System | Economic function | What belongs here |
|---|---|---|
| **S1 — Operations** | Primary productive activities | Agricultural labour, manufacturing, carrying trade |
| **S2 — Coordination** | Anti-oscillation, price signals | Market price, natural price, wages of labour |
| **S3 — Management** | Resource allocation, operational control | Capital allocation, banking, taxation |
| **S3\* — Audit** | Inspection, compliance, integrity | Customs enforcement, assay, coinage |
| **S4 — Intelligence** | Adaptation, environment scanning | Invisible hand, mercantile intelligence, foreign trade |
| **S5 — Policy** | Identity, ultimate authority, purpose | Political economy systems, public debt policy |
Every typed entity gets a *coordinate* in the space of type × VSM system.
For example:
- *Natural Price* → **Relation / S2** (it is the coordination signal that
expresses the dependency between cost components and market clearing)
- *Capital Stock* → **Element / S1** (it is the persistent productive resource
at the operational level)
- *Invisible Hand* → **Principle / S4** (it is an abstract law describing
how distributed intelligence produces systemic order)
- *Banking System* → **Institution / S3** (it is the socially constructed
rule system for managing capital flows)
---
## The Four-Layer Model
```
L0 Source text 35 chapters — raw signal, no structure
│ extract-entities (existing pipeline stage)
L1 Raw entities ~988 named phenomena — heterogeneous, flat
│ [current state]
│ classify-entities (new stage)
L2 Typed entities Each entity assigned: type + VSM system
Coordinate: (Element | Process | Relation |
Principle | Institution) × (S1S5)
│ extract-relations (new stage)
L3 Relation graph Explicit triplets: Element → Relation → Element
Feedback loops, VSM channel mappings,
causal chains
│ distil-core (new analysis)
L4 Systemic model Minimal viable set — the generative core
~30 elements + ~20 relations + ~10 principles
that reproduce Smith's argument from scratch
```
Each layer is a **proper infospace** in its own right. L2 uses L1 as its
topic and VSM as its discipline. L3 uses L2 as its topic. The infospace
composition model (already built) makes this explicit, auditable, and
reproducible — each layer has its own `infospace.yaml`, schemas, and metrics.
---
## Layer 2 — Typed Entities
### What changes
Each entity file gains two new fields:
```markdown
## Entity Type
Relation
## VSM System
S2
```
The classification is produced by a new `classify-entities` pipeline stage
that runs as a per-entity LLM evaluation — a concise prompt per file asking
the model to assign type and VSM system and briefly justify both.
### New schema: `schemas/typed-entity-schema-v1.0.md`
Extends the economic entity schema with:
- **Entity Type** — one of: Element, Process, Relation, Principle, Institution
- **VSM System** — one of: S1, S2, S3, S3*, S4, S5
- **Type Rationale** — one sentence explaining why this type was assigned
- **VSM Rationale** — one sentence grounding the VSM assignment in Beer's definitions
### Metrics at Layer 2
Layer 2 enables a new set of quality checks:
| Metric | Concern | Question |
|---|---|---|
| **type_distribution** | Granularity | Is the collection balanced between elements, processes, and relations? |
| **vsm_type_coverage** | Coverage | Does every VSM level have at least one element, one process, and one relation? |
| **orphan_relations** | Coherence | Are there Relation-typed entities that name no elements they connect? |
| **principle_grounding** | Consistency | Does each Principle-typed entity have at least one Element or Process it constrains? |
The coverage metric gains a new dimension: instead of domain × chapter,
it becomes type × VSM system — a 5 × 5 or 5 × 6 matrix that reveals
structural blind spots.
---
## Layer 3 — The Relation Graph
### Triplets
The core artifact of Layer 3 is a set of **explicit triplets**:
```
Division of Labour ──[limited by]──> Market Extent
Market Extent ──[expanded by]──> Transportation Infrastructure
Capital Stock ──[enables]──> Division of Labour
Wages of Labour ──[regulated by]──> Profit of Stock
Natural Price ──[centres on]──> Market Price
```
Each triplet is a directed edge in the relation graph. The three roles are:
- **Subject**: an Element-typed entity
- **Predicate**: a Relation-typed entity (or one from the controlled vocabulary)
- **Object**: an Element-typed entity
### Controlled relation vocabulary
A small vocabulary constrains what predicates are available:
| Predicate class | VSM channel | Direction |
|---|---|---|
| **enables / constrains** | S1 → S1 | structural prerequisite |
| **regulates / is regulated by** | S3 → S1 or S2 → S1 | control signal |
| **produces / consumes** | S1 operational | flow |
| **coordinates** | S2 | anti-oscillation signal |
| **monitors / audits** | S3\* | audit loop |
| **adapts to / anticipates** | S4 | intelligence signal |
| **defines / is defined by** | S5 | policy authority |
| **contradicts / tensions with** | any | principle conflict |
### Feedback loops
The relation graph makes feedback loops visible as cycles. Smith describes
many:
```
Capital Accumulation
──[enables]──> Division of Labour
──[increases]──> Labour Productivity
──[raises]──> Profit Margin
──[funds]──> Capital Accumulation [positive loop]
Wages of Labour
──[raises]──> Consumer Demand
──[stimulates]──> Production
──[increases]──> Employment
──[raises]──> Wages of Labour [positive loop]
Market Price
──[above]──> Natural Price
──[attracts]──> Capital Inflow
──[increases]──> Supply
──[depresses]──> Market Price [negative/balancing loop]
```
These loops are the VSM S2 coordination signals made explicit. Finding them
is a primary goal of Layer 3.
### New output: `output/relations/`
One markdown file per triplet (or per relation cluster):
```markdown
# Division of Labour — limited by — Market Extent
## Subject
Division of Labour
## Predicate
limited by
## Object
Market Extent
## Relation Type
constrains
## VSM Channel
S1 → S2 (operational capacity constrained by coordination reach)
## Evidence
Book I, Chapter 3: "The division of labour is limited by the extent of
the market."
## Feedback Role
Part of the Market Expansion loop: larger market → more specialisation
→ higher productivity → greater surplus → expanded trade → larger market.
```
---
## Layer 4 — The Minimal Systemic Model
### The distillation hypothesis
The entire WoN argument can be reproduced from a **core set** of roughly
3040 elements, 1525 relations, and 812 principles. Everything else in
the 988-entity collection is either:
- a **refinement** — a special case of a core element (e.g., *Agricultural
Capital* is a refinement of *Capital Stock*)
- an **illustration** — a concrete historical example (e.g., *Taille* is an
illustration of *Distortionary Taxation*)
- a **historical context** — not part of the abstract theory (e.g.,
*Portuguese Gold Trade*)
### How to find the core
Two methods work together:
**FCA-based centrality**: The concept lattice already computed by the FCA
module identifies which entities participate in the most attributeobject
pairings. High-density concepts in the lattice are likely core elements.
In Layer 3 terms: entities with the highest in-degree + out-degree in the
relation graph are candidates for the core.
**VSM completeness check**: A viable economic system requires all five VSM
systems to be represented in the core. If any system is empty, the model
is not viable — it is missing a control loop. This is the stopping condition:
*distil until the minimal set is VSM-complete and answers all competency
questions.*
### The core model as infospace output
The final artifact is `output/core-model.md`:
```markdown
# Core Systemic Model — The Wealth of Nations
## Elements (S1 — Operations)
- Labour
- Capital Stock
- Land
- Commodity
## Processes (S1 — Operations)
- Division of Labour
- Agricultural Production
- Manufacturing
- Trade
## Relations (S2 — Coordination)
- Natural Price (centres market price)
- Wages of Labour (allocates labour supply)
- Profit of Stock (allocates capital)
- Rent of Land (allocates land use)
## Control Mechanisms (S3 — Management)
- Capital Allocation
- Banking (credit extension)
- Taxation
## Intelligence Principles (S4)
- Invisible Hand (distributed coordination)
- Comparative Advantage (specialisation signal)
## Policy Framework (S5)
- Mercantile System (policy thesis, critiqued)
- System of Natural Liberty (normative alternative)
## Core Feedback Loops
1. Capital Accumulation → Division of Labour → Productivity → Profit → Accumulation
2. Market Price → Capital Inflow → Supply → Market Price (balancing)
3. Wages → Demand → Employment → Wages (positive reinforcement)
## Viability Assessment
VSM coverage: S1 ✓ S2 ✓ S3 ✓ S4 ✓ S5 ✓
Competency questions answered: 6/6
```
---
## Infospace Composition as the Mechanism
The layering is not merely conceptual — it maps directly to the infospace
composition model already built in markitect. Each layer is a separate
infospace that uses the previous layer as its discipline:
```
L1 infospace (raw entities)
topic: Wealth of Nations source chapters
discipline: VSM reference
output: ~988 entity files
L2 infospace (typed entities)
topic: L1 entity files ← L1 as topic
discipline: VSM reference
output: ~988 typed entity files
L3 infospace (relation graph)
topic: L2 typed entity files ← L2 as topic
discipline: L2 infospace ← L2 as discipline
output: ~200500 relation triplet files
L4 infospace (core model)
topic: L3 relation graph ← L3 as topic
discipline: L3 infospace ← L3 as discipline
output: core-model.md
```
This makes every distillation decision auditable. A change in L2 (a
reclassification from Element to Process) propagates as a flag on dependent
L3 relations, which in turn flags the L4 core model for re-evaluation.
---
## Design Principles
**Distillation, not accumulation**: The layers run downward toward a minimal
core, not upward toward a larger taxonomy. Layer 4 is smaller than Layer 1.
**Viability as criterion**: The minimal model is judged not by completeness
(does it contain all entities?) but by viability (can it sustain itself as
a system? does it answer the competency questions?). This is the VSM
criterion applied to the model itself.
**Separation of concerns**: Each layer is independently queryable. L2
answers "what kind of thing is Capital?" — L3 answers "what does Capital
connect to?" — L4 answers "is Capital in the core?" These questions must
not bleed into each other.
**Git-traceable**: Every classification decision at L2, every relation
extraction at L3, and every inclusion/exclusion at L4 is a git commit. The
intellectual history of the distillation is preserved.

View File

@@ -674,3 +674,445 @@ To build your own infospace:
The key insight is that **schemas and guidelines are artifacts** — they
live in the repository and can be versioned and diffed just like code.
Every refinement decision is traceable through git history.
---
## 17. Observing Entity Heterogeneity
After processing all 35 chapters you will notice that the entity collection
is not homogeneous. Reviewing the files, some entities describe **things
that exist** (stocks, agents, institutions) while others describe **how
things connect** (mechanisms, signals, causal dependencies):
| Entity | Character |
|---|---|
| *Capital Stock* | A persistent resource — an element |
| *Division of Labour* | An ongoing activity — a process |
| *Natural Price* | A structural dependency — a relation |
| *Opportunity Cost* | An abstract invariant — a principle |
| *Banking System* | A socially constructed rule — an institution |
This heterogeneity is not a flaw in the extraction. It reflects the actual
structure of Smith's argument. But treating all entities identically — as
unnamed nodes in a flat collection — hides structural information that is
necessary for building a systemic model.
The VSM mapping compounds this: System 2 ends up containing both a *price
signal* (a relation) and a *market* (an element that hosts those signals).
Both are genuinely in S2, but conflating them makes it harder to answer the
competency questions precisely.
**The solution is layered development**: moving from the flat entity set
toward a typed, structured, minimal systemic model. The full concept and
rationale is documented in [`LAYERED-DEVELOPMENT.md`](LAYERED-DEVELOPMENT.md).
---
## 18. The Four Layers
Infospace development proceeds through four layers, each with its own
pipeline, schema, and viability check:
```
L0 Source text (35 chapters)
│ extract-entities
L1 Raw entities (~988) ← current state after full processing
│ classify-entities
L2 Typed entities Each entity has: type × VSM coordinate
│ extract-relations
L3 Relation graph Explicit triplets: Element → Relation → Element
│ distil-core
L4 Systemic model Minimal viable set (~30 elements + 20 relations)
```
Each layer is a **proper infospace** that uses the previous layer as its
topic (and sometimes as its discipline). The composition model already
built into MarkiTect makes this explicit and auditable.
---
## 19. Layer 2 — Classifying Entities
The goal of Layer 2 is to assign every entity a **type** and confirm or
refine its **VSM system assignment**, giving each entity a coordinate in a
structured space.
### Entity types
| Type | What it is | Examples |
|---|---|---|
| **Element** | A stock, agent, or artifact that persists | Capital Stock, Corn, Colony |
| **Process** | A flow or transformation (has duration) | Division of Labour, Trade, Credit Extension |
| **Relation** | A structural dependency between elements | Natural Price, Wages of Labour |
| **Principle** | An abstract law holding across contexts | Comparative Advantage, Opportunity Cost |
| **Institution** | A socially constructed rule system | Banking System, Guild, Taille |
### New schema: `schemas/typed-entity-schema-v1.0.md`
Extend the economic entity schema with two new required sections:
```markdown
## Entity Type
[Element | Process | Relation | Principle | Institution]
## VSM System
[S1 | S2 | S3 | S3* | S4 | S5]
```
And two supporting rationale fields (one sentence each):
```markdown
## Type Rationale
This is a Relation because it expresses a structural dependency between
Wages and Capital Stock rather than being an entity that exists independently.
## VSM Rationale
Assigned to S2 because Natural Price functions as the coordination signal
that prevents market price oscillation — Beer's primary definition of S2.
```
### New pipeline stage: `classify-entities`
Add the stage to `infospace.yaml` after the existing pipeline:
```yaml
pipeline:
stages:
- name: extract-entities
template: templates/extract-entities.md
output_dir: output/entities
...
- name: map-to-vsm
...
- name: synthesize-analysis
...
- name: classify-entities
template: templates/classify-entities.md
output_dir: output/typed-entities
output_macro: typed_entity
max_tokens: 1200
macros:
vsm_framework: artifacts/vsm-reference/vsm-framework.md
type_taxonomy: artifacts/guidelines/entity-type-taxonomy.md
```
This stage runs **once per entity** (not per chapter), taking the canonical
entity file as input and producing an enriched version in `output/typed-entities/`.
### New coverage metric — type × VSM matrix
At Layer 2, the coverage metric gains a new interpretation. The matrix is
no longer domain × chapter but **type × VSM system** — a 5 × 6 grid:
```
S1 S2 S3 S3* S4 S5
Element ████ ████ ██ · ██ ██
Process ████ ████ ██ · ████ ·
Relation ████ ████ ████ ██ ██ ██
Principle ██ ██ · · ████ ████
Institution· · ████ ████ · ████
```
An empty cell in this matrix means the VSM system has no entities of that
structural type — a genuine explanatory gap.
---
## 20. Layer 3 — Extracting the Relation Graph
The goal of Layer 3 is to make the **connections between entities explicit**.
Rather than inferring connectivity from embedding similarity or co-occurrence,
Layer 3 extracts directed, typed **triplets** from entity definitions and
source chapters.
### Triplet structure
Each triplet is a directed edge in the relation graph:
```
Subject Predicate Object
────────────────── ───────────────── ──────────────────
Division of Labour ←limited by→ Market Extent
Capital Stock ←enables→ Division of Labour
Natural Price ←centres on→ Market Price
Wages of Labour ←regulated by→ Profit of Stock
```
The predicate is drawn from a **controlled vocabulary** of twelve relation
classes, each mapped to a VSM channel:
| Predicate class | VSM channel |
|---|---|
| enables / constrains | S1 structural dependency |
| regulates / is regulated by | S3→S1 control |
| coordinates | S2 anti-oscillation |
| produces / consumes | S1 operational flow |
| monitors / audits | S3* audit loop |
| adapts to / anticipates | S4 intelligence |
| defines / is defined by | S5 policy authority |
| contradicts / tensions with | cross-level conflict |
### New output directory: `output/relations/`
One file per triplet (or per named relation cluster):
```markdown
# Division of Labour — limited by — Market Extent
## Subject
Division of Labour (Process / S1)
## Predicate
limited by
## Object
Market Extent (Element / S2)
## VSM Channel
S1 operational capacity constrained by S2 coordination reach
## Evidence
Book I, Chapter 3: "The division of labour is limited by the extent
of the market."
## Feedback Role
Entry point of the Market Expansion loop.
```
### Feedback loops
The relation graph will reveal feedback loops — cycles in the directed
graph. These are the most structurally important outputs of Layer 3 because
they are the mechanisms Smith describes throughout the WoN:
```
Capital Accumulation → Division of Labour → Productivity
→ Profit Margin → Capital Accumulation [positive reinforcement]
Market Price above Natural Price → Capital Inflow → Supply
→ Market Price restores [balancing loop, S2]
Wages rise → Consumer Demand → Employment
→ Wages rise [positive reinforcement, S1]
```
Finding and naming these loops is the primary intellectual payoff of
Layer 3. Each loop can be documented as a named pattern:
```bash
# Future command:
markitect infospace loops
# Detected feedback loops (3):
# Capital Accumulation Loop (positive, S1→S3→S1)
# Price Equilibration Loop (balancing, S2)
# Labour Market Loop (positive, S1→S2→S1)
```
---
## 21. Layer 4 — The Minimal Systemic Model
Layer 4 answers the ultimate question: **what is the smallest set of
elements and relations that can generate Smith's argument from first
principles?**
The hypothesis is that the 988-entity collection can be reduced to a core
of roughly 3040 elements, 1525 relations, and 812 principles. Everything
else is a refinement, an illustration, or historical context.
### How the core is identified
Two methods work together:
**Graph centrality**: Entities with the highest combined in-degree and
out-degree in the Layer 3 relation graph are candidates. An entity that
many other entities connect to or depend on is structurally load-bearing.
**VSM completeness**: The core must have at least one entity at each VSM
level, and each level must have at least one Element, one Process, and one
Relation. This is the stopping condition — the minimum viable set is the
smallest set that is VSM-complete.
**FCA concept density**: The concept lattice from Layer 1 (FCA already
computed) identifies which entities co-occur across the most attributes
(domains and chapters). High-density concepts are likely core entities.
### Output: `output/core-model.md`
The final artifact documents the core model with explicit VSM assignment,
named feedback loops, and competency question coverage:
```markdown
# Core Systemic Model — The Wealth of Nations (L4)
## Core Elements
### S1 — Operations
- Labour
- Capital Stock
- Land
- Commodity
### S2 — Coordination
- Market
### S3 — Management
- Banking System
## Core Processes
- Division of Labour (S1)
- Agricultural Production (S1)
- Trade (S1)
- Capital Allocation (S3)
## Core Relations
- Natural Price — centres — Market Price (S2)
- Wages of Labour — allocates — Labour (S2)
- Profit of Stock — allocates — Capital (S2)
## Core Principles
- Invisible Hand (S4)
- Comparative Advantage (S4)
- System of Natural Liberty (S5)
## Feedback Loops
1. Capital Accumulation (positive, S1S3)
2. Price Equilibration (balancing, S2)
3. Labour Market (positive, S1S2)
## Viability
VSM coverage: S1 ✓ S2 ✓ S3 ✓ S4 ✓ S5 ✓
Competency questions answered: 6/6
Entities in core: 28 / 988 (3%)
```
### What the core enables
With a validated core model, the infospace becomes far more useful as a
discipline:
- **Composability**: Another infospace can import the WoN core as its
discipline, knowing that only the 28 load-bearing entities will be
injected as context — not all 988.
- **Gap analysis**: New source material can be evaluated against the core:
does this modern supply chain text engage with Smith's three core
relations? If not, the analysis is incomplete.
- **Theory comparison**: Two economic theories (Smith and Ricardo, say)
can be compared at the core level — do they share elements? Where do
their feedback loops diverge?
---
## 22. Running Layers 24 (Planned)
The following commands are planned for a future implementation phase.
They are documented here to describe the intended workflow.
### Layer 2: classify all entities
```bash
# Classify entity types and confirm VSM assignments:
markitect infospace classify --provider openrouter
# Classify a single entity:
markitect infospace classify --entity division-of-labour --provider openrouter
# Review type × VSM coverage matrix:
markitect infospace check type-coverage
```
Expected output:
```
Classifying 988 entities...
[████████████████████] 988/988
Type distribution:
Element: 312 (32%)
Process: 248 (25%)
Relation: 201 (20%)
Principle: 142 (14%)
Institution: 85 (9%)
Type × VSM coverage: 25/30 cells populated
Missing: Institution/S1, Principle/S3*, Process/S5
```
### Layer 3: extract relations
```bash
# Extract relation triplets (per entity pair or per chapter):
markitect infospace extract-relations --provider openrouter
# View the relation graph:
markitect infospace graph --output output/relations/graph.dot
# Detect feedback loops:
markitect infospace loops
```
### Layer 4: distil the core
```bash
# Identify the minimal viable entity set:
markitect infospace distil --provider openrouter
# Review the core model:
cat output/core-model.md
# Check VSM completeness of the core:
markitect infospace viability --layer 4
```
---
## 23. Layer 24 as Composed Infospaces
The cleanest way to implement Layers 24 is as **separate infospaces**,
each using the previous layer as its topic and discipline. This is already
supported by the MarkiTect composition model.
```bash
# Layer 2 infospace — using L1 entities as the topic:
mkdir ../won-typed/
cd ../won-typed/
markitect infospace init \
--topic "WoN Typed Entities" \
--domain "Ontological Classification" \
--discipline "Viable System Model"
# Bind the L1 infospace as the source topic:
markitect infospace bind-discipline ../infospace-with-history
# Layer 3 infospace — using L2 typed entities as the topic:
mkdir ../won-relations/
markitect infospace init \
--topic "WoN Relation Graph" \
--domain "Systemic Modelling"
markitect infospace bind-discipline ../won-typed
# Layer 4 infospace — the core model:
mkdir ../won-core/
markitect infospace init \
--topic "WoN Core Model" \
--domain "Systemic Modelling"
markitect infospace bind-discipline ../won-relations
```
This structure makes every distillation decision auditable through git
history. A reclassification in L2 (an entity's type changes from Process
to Relation) propagates as a flag on dependent L3 triplets, which in turn
flags the L4 core model for re-evaluation.
The intellectual history of how a theory was extracted from a text, typed,
connected, and distilled to its minimal core is fully preserved — as a set
of git commits, each with a human-readable rationale.