Files
markitect-main/examples/infospace-with-history/infospace.yaml
tegwick 81a4c8796a feat(infospace): add L2 entity classification with type × VSM matrix (S2.9)
Implements the L2 typed-entities layer — each entity is assigned an
Entity Type (Element, Process, Relation, Principle, Institution) and a
VSM System (S1–S5) by an LLM, with one-sentence rationales for each.

New modules:
- markitect/infospace/classification.py — EntityClassification dataclass
  + ENTITY_TYPES / VSM_SYSTEMS controlled vocabularies
- markitect/infospace/classification_io.py — write/read classification
  files (YAML frontmatter + markdown body, mirrors evaluation_io)
- markitect/infospace/classifier.py — build_classification_prompt(),
  parse_classification_response(), run_entity_classification(); batch
  runner writes files incrementally (same resumable pattern as evaluate)

CLI: markitect infospace classify [--entity SLUG] [--provider P] [--model M]
  - Incremental skip: checks output/classifications/ for existing files
  - Defaults to openrouter provider; 2000 max_tokens (Gemini 2.5 Flash
    uses ~787 thinking tokens, so 800 was too low)

CLI: markitect infospace classify-summary [--update-metrics]
  - Entity type counts + VSM system counts with percentages
  - 5 × 6 type × VSM matrix (spots structural blind spots at a glance)
  - --update-metrics writes type_distribution, type_entropy,
    vsm_type_matrix_cells to metrics.yaml

Config: InfospaceConfig gains classifications_dir (default output/classifications)
Schema: schemas/typed-entity-schema-v1.0.md — type/VSM vocabulary tables,
  rationale format rules, validation rules, metrics enabled at L2
infospace.yaml: schemas.typed_entity references typed-entity-schema-v1.0.md

Seed classifications (3): division_of_labour (Process/S1),
  natural_price_as_central_price (Principle/S2),
  invisible_hand_mechanism (Principle/S4)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-23 09:35:58 +01:00

74 lines
2.4 KiB
YAML

# Infospace: The Wealth of Nations through the Viable System Model
#
# This configuration declares the infospace built by processing
# Adam Smith's "The Wealth of Nations" (1776) through the lens of
# Stafford Beer's Viable System Model (VSM).
topic:
name: "The Wealth of Nations"
domain: "Classical Economics"
sources: artifacts/sources/
disciplines:
- name: "Viable System Model"
path: artifacts/vsm-reference/
schemas:
entity: schemas/economic-entity-schema-v1.0.md
mapping: schemas/vsm-mapping-schema-v1.0.md
analysis: schemas/chapter-analysis-schema-v1.0.md
relation: schemas/relation-schema-v1.0.md
typed_entity: schemas/typed-entity-schema-v1.0.md
competency_questions: |
1. How does Smith's division of labour map to VSM System 1 operations?
2. What mechanisms in WoN correspond to VSM coordination (System 2)?
3. Where does Smith describe self-organising regulation (System 3)?
4. What role does the "invisible hand" play as a System 4 mechanism?
5. How do Smith's views on government map to System 5 policy?
6. Is the WoN entity set viable as an explanatory framework?
viability:
redundancy_ratio:
max: 0.10
coverage_ratio:
min: 0.40 # multi-book corpus: domain sparsity is expected
coherence_components:
max: 3
consistency_cycles:
max: 0
granularity_entropy:
min: 1.0
per_entity_mean:
min: 3.5 # LLM quality score across 5 dimensions (1-5 scale)
pipeline:
stages:
- name: extract-entities
template: templates/extract-entities.md
output_dir: output/entities
output_macro: entities
split_entities: true
max_tokens: 8000
macros:
extraction_rules: artifacts/guidelines/extraction-rules.md
vsm_framework: artifacts/vsm-reference/vsm-framework.md
- name: map-to-vsm
template: templates/map-to-vsm.md
output_dir: output/mappings
output_macro: mappings
max_tokens: 10000
macros:
mapping_rules: artifacts/guidelines/mapping-rules.md
vsm_framework: artifacts/vsm-reference/vsm-framework.md
- name: synthesize-analysis
template: templates/synthesize-analysis.md
output_dir: output/analyses
output_macro: analysis
max_tokens: 4000
macros:
vsm_framework: artifacts/vsm-reference/vsm-framework.md
post_batch:
- name: assess-metrics
template: templates/assess-metrics.md