markitect-main/markitect/infospace
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
..
checks docs(metrics): clarify C2 coverage — domain×chapter matrix, not domain×VSM 2026-02-20 00:08:46 +01:00
__init__.py feat(infospace): add infospace configuration model and state (S2.1) 2026-02-19 01:44:14 +01:00
classification.py feat(infospace): add L2 entity classification with type × VSM matrix (S2.9) 2026-02-23 09:35:58 +01:00
classification_io.py feat(infospace): add L2 entity classification with type × VSM matrix (S2.9) 2026-02-23 09:35:58 +01:00
classifier.py feat(infospace): add L2 entity classification with type × VSM matrix (S2.9) 2026-02-23 09:35:58 +01:00
cli.py feat(infospace): add L2 entity classification with type × VSM matrix (S2.9) 2026-02-23 09:35:58 +01:00
composition.py feat(infospace): add composition model for discipline binding (S2.6) 2026-02-19 02:03:54 +01:00
config.py feat(infospace): add L2 entity classification with type × VSM matrix (S2.9) 2026-02-23 09:35:58 +01:00
entity_parser.py feat(example): add supply-chain-vsm composition demo (S3.5) 2026-02-23 00:08:51 +01:00
evaluate.py feat(infospace): add eval-summary command and improve evaluate pipeline (S3.3) 2026-02-23 01:26:45 +01:00
evaluation.py feat(infospace): add structured evaluation output with history and diffing (S1.5) 2026-02-19 01:35:22 +01:00
evaluation_io.py feat(infospace): add structured evaluation output with history and diffing (S1.5) 2026-02-19 01:35:22 +01:00
history.py feat(infospace): add eval-summary command and improve evaluate pipeline (S3.3) 2026-02-23 01:26:45 +01:00
models.py feat(infospace): add entity metadata parser (S1.1) 2026-02-19 00:27:45 +01:00
pipeline.py fix(pipeline): retry on all LLM errors (not just rate limits) 2026-02-19 20:32:23 +01:00
relation_models.py feat(infospace): add L3 relation graph with VSM-aware triplets (S2.8) 2026-02-23 06:04:28 +01:00
relation_parser.py feat(infospace): add L3 relation graph with VSM-aware triplets (S2.8) 2026-02-23 06:04:28 +01:00
schema.py feat(infospace): add schema compliance validator (S1.2) 2026-02-19 00:48:57 +01:00
state.py feat(infospace): add infospace configuration model and state (S2.1) 2026-02-19 01:44:14 +01:00
validator.py feat(infospace): add schema compliance validator (S1.2) 2026-02-19 00:48:57 +01:00