markitect-main/markitect/infospace
tegwick e3e5b8ecc1 feat(infospace): systematic long-text processing — rich commit bodies, per-source eval/classify, chapters view
Three coordinated changes that let the pipeline produce a clean
chapter-by-chapter git history on long texts without archaeology after
the fact.

1. Richer commit messages. `SourcePipeline._git_commit` now diffs the
   staged changes, buckets added files by output subdirectory (entities,
   evaluations, classifications, mappings, analyses, metrics, logs), and
   includes counts in the commit body. So `git log` reads "entities:
   +23, evaluations: +23" per chapter instead of the same generic blurb
   on every commit. Zero behaviour change when no output changed; falls
   back to the original message if the diff query fails.

2. --eval-after-source / --classify-after-source on `infospace process`.
   After a source's stages succeed, the pipeline identifies which entity
   files are *new* (set diff of entity slugs before vs after), loads
   their EntityMeta, and runs per-entity evaluation and/or
   classification scoped to just those slugs before the per-source git
   commit lands. Result: each chapter's commit is self-contained —
   extraction + evaluation + classification in one atomic unit. Gated
   behind explicit flags because the cost is real (LLM latency per
   chapter rather than amortised across one bulk batch).

3. `markitect infospace chapters` subcommand. Lists source files in
   canonical order with entity count, evaluated count, classified
   count, and mean per-entity score per source. Text or JSON output.
   Natural triage surface for long-text infospaces — spot chapters that
   under-extracted or evaluated poorly.

Also: `docs/advanced-usage.md` gets a new "Systematic processing of
long texts" section with the recommended flag combo and the tradeoff
note on cost.

11 new unit tests cover the chapters command (text/json/no-sources),
the process flag wiring (help + provider requirement), and the
commit-body bucket logic. Full infospace+llm unit suite (315 tests)
green; 3 pre-existing infospace failures unchanged.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-22 08:24:26 +02: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(example): add L2 classifications for 823/988 WoN entities (S3.4) 2026-02-23 12:49:11 +01:00
classification_io.py feat(example): add L2 classifications for 823/988 WoN entities (S3.4) 2026-02-23 12:49:11 +01:00
classifier.py feat(example): add L2 classifications for 823/988 WoN entities (S3.4) 2026-02-23 12:49:11 +01:00
cli.py feat(infospace): systematic long-text processing — rich commit bodies, per-source eval/classify, chapters view 2026-04-22 08:24:26 +02: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,llm): stabilize free-tier eval workflow 2026-04-22 00:51:00 +02: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
graph_export.py feat(infospace): add entity-relation graph export (Mermaid + DOT) 2026-02-23 13:14:25 +01:00
history.py feat(infospace,llm): stabilize free-tier eval workflow 2026-04-22 00:51:00 +02:00
models.py feat(infospace): add entity metadata parser (S1.1) 2026-02-19 00:27:45 +01:00
pipeline.py feat(infospace): systematic long-text processing — rich commit bodies, per-source eval/classify, chapters view 2026-04-22 08:24:26 +02: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,llm): agent ergonomics — entity lookup, model fallback, better errors 2026-04-22 01:07:25 +02:00
validator.py feat(infospace): add schema compliance validator (S1.2) 2026-02-19 00:48:57 +01:00