arborist/docs/diagrams/aborist-modules.dot
russell@unturf.com 8d6961fcc1
aborist/arborist
modified:   .gitlab-ci.yml
	modified:   bench/qa_questions.txt
	modified:   bench/qa_sweep.py
	modified:   bench/run.sh
	modified:   docs/TICKETS.md
	modified:   docs/_source/README.md
	modified:   docs/_source/_ext/makefile_targets.py
	modified:   docs/_source/api/cli.rst
	modified:   docs/_source/api/distill.rst
	modified:   docs/_source/api/mesh.rst
	modified:   docs/_source/api/qa.rst
	modified:   docs/_source/api/retrieval.rst
	modified:   docs/_source/api/storage.rst
	modified:   docs/_source/api/substrate.rst
	modified:   docs/_source/concepts.rst
	modified:   docs/_source/conf.py
	modified:   docs/_source/cookbook.rst
	modified:   docs/_source/index.rst
	modified:   docs/_source/license.rst
	modified:   docs/_source/quickstart.rst
	modified:   docs/bench-maxing.md
	modified:   docs/benchmarks.md
	modified:   docs/cti-architecture.md
	modified:   docs/diagrams/aborist-modules.dot
	modified:   docs/diagrams/aborist-modules.svg
	modified:   docs/diagrams/mesh-data-flow.dot
	modified:   docs/diagrams/mesh-epoch-lifecycle.dot
	modified:   docs/diagrams/mesh-epoch-lifecycle.svg
	modified:   docs/diagrams/mesh-group-decisions.dot
	modified:   docs/diagrams/mesh-group-decisions.svg
	modified:   docs/diagrams/mesh-identity-stack.dot
	modified:   docs/diagrams/mesh-secret-envelope.dot
	modified:   docs/mesh.md
	modified:   docs/qa-modes-bench.md
	modified:   docs/seven-point-program.md
	modified:   docs/tickets/ticket-000001-retrieval-keywords-audit-gap.md
	modified:   docs/tickets/ticket-000002-reference-frame-polarity-contract.md
	modified:   docs/tickets/ticket-000003-anchor-class-warrant.md
	modified:   docs/tickets/ticket-000005-label-ladder-migration.md
	modified:   docs/tickets/ticket-000006-bench-emergent-findings.md
	modified:   docs/tickets/ticket-000007-query-layer-hyphen-fold.md
	modified:   docs/tickets/ticket-000008-broad-quantifier-preflight-guard.md
	modified:   docs/tickets/ticket-000009-quantifier-preflight-dag-binding.md
	modified:   docs/tickets/ticket-000010-metacognition-preflight-guard.md
	modified:   docs/tickets/ticket-000011-soft-preflight-hint-sidecar.md
	modified:   scripts/backfill_concepts.py
	modified:   scripts/bench_emergent.py
	modified:   tests/crawler/test_async_web_fetcher.py
	modified:   tests/crawler/test_bridge.py
	modified:   tests/crawler/test_web_fetch.py
	modified:   tests/test_bench_qa_sweep.py
	modified:   tests/test_burn.py
	modified:   tests/test_burn_doc.py
	modified:   tests/test_claim_lattice.py
	modified:   tests/test_cli_render.py
	modified:   tests/test_compress.py
	modified:   tests/test_concepts.py
	modified:   tests/test_dag.py
	modified:   tests/test_directives.py
	modified:   tests/test_distill.py
	modified:   tests/test_distill_recursive.py
	modified:   tests/test_evict.py
	modified:   tests/test_frame.py
	modified:   tests/test_grok_source.py
	modified:   tests/test_html_source.py
	modified:   tests/test_ingest.py
	modified:   tests/test_inspect.py
	modified:   tests/test_journal.py
	modified:   tests/test_keys.py
	modified:   tests/test_llm_context_base.py
	modified:   tests/test_merkle.py
	modified:   tests/test_mesh.py
	modified:   tests/test_mesh_aead.py
	modified:   tests/test_mesh_chain.py
	modified:   tests/test_mesh_cli.py
	modified:   tests/test_mesh_cli_pull.py
	modified:   tests/test_mesh_wire.py
	modified:   tests/test_mesh_wire_e2e.py
	modified:   tests/test_metacognition.py
	modified:   tests/test_migration_audit_mode.py
	modified:   tests/test_providence_source.py
	modified:   tests/test_qa.py
	modified:   tests/test_qa_quality_live.py
	modified:   tests/test_quantifier_caps.py
	modified:   tests/test_quantifier_classifier.py
	modified:   tests/test_quantifier_phase4.py
	modified:   tests/test_quantifier_reminder.py
	modified:   tests/test_query.py
	modified:   tests/test_reclassify.py
	modified:   tests/test_repair.py
	modified:   tests/test_resume.py
	modified:   tests/test_snapshot.py
	modified:   tests/test_soft_preflight.py
	modified:   tests/test_tfidf.py
	modified:   tests/test_vcs_source.py
	modified:   tests/test_verify.py
	modified:   tests/test_verify_json.py
	modified:   tests/test_versioned_ingest.py
	modified:   tests/test_warrant.py
	modified:   tests/test_wikipedia_old.py
	modified:   tests/test_wikipedia_xml.py
	modified:   tests/test_wikitext.py
2026-05-07 09:31:49 -04:00

144 lines
6.2 KiB
Text

// Arborist module graph — top-level packages & their dependencies.
//
// Arrows point in the import direction (A → B means A imports from B).
// Cluster boxes group modules with shared concerns (storage, retrieval,
// federation, etc.).
//
// Render: dot -Tsvg arborist-modules.dot -o arborist-modules.svg
digraph arborist_modules {
rankdir=LR
node [shape=box, style="rounded,filled", fontname="Helvetica", fontsize=10]
edge [fontname="Helvetica", fontsize=9]
bgcolor="white"
// ---- Substrate (pure crypto / serialization, no SQL) ----
subgraph cluster_substrate {
label="substrate"
style="rounded,dashed"
color="#999999"
merkle [label="merkle.py\n(Python port of Go merkle.go)", fillcolor="#fff7e6"]
document [label="document.py\nDocument · Edge · Chunker", fillcolor="#fff7e6"]
wikitext [label="wikitext.py\nto_base() prose-strip", fillcolor="#fff7e6"]
}
// ---- Storage layer ----
subgraph cluster_storage {
label="storage"
style="rounded,dashed"
color="#999999"
store [label="store.py\nv9.8 SQLite schema +\naudit chain helpers", fillcolor="#e6f0ff"]
ingest [label="ingest.py\nnormalize → chunk → merkle → upsert", fillcolor="#e6f0ff"]
evict [label="evict.py\nhot ↔ cold tier", fillcolor="#e6f0ff"]
}
// ---- Sources (corpus producers) ----
subgraph cluster_sources {
label="sources/"
style="rounded,dashed"
color="#999999"
wikipedia [label="wikipedia.py\ncur + old SQL dumps", fillcolor="#e7ffe7"]
wiki_xml [label="wikipedia_xml.py\nphase IV iterparse", fillcolor="#e7ffe7"]
html_page [label="html_page.py\nselectolax + httpx", fillcolor="#e7ffe7"]
crawler [label="crawler/\nasync HTML BFS", fillcolor="#e7ffe7"]
grok [label="grok.py\nxAI export", fillcolor="#e7ffe7"]
vcs [label="vcs.py\ngit + Mercurial", fillcolor="#e7ffe7"]
}
// ---- Retrieval & verifier ----
subgraph cluster_retrieval {
label="retrieval & verifier"
style="rounded,dashed"
color="#999999"
search [label="search/\nFTS5 backend + ABC", fillcolor="#ffe6f0"]
concepts [label="concepts/\nsynonym & rivalry overlay\n(per-shard concept_relations)", fillcolor="#ffe6f0"]
qa_query [label="qa/query.py\nmulti-source RAG", fillcolor="#ffe6f0"]
qa_verify [label="qa/verify.py\nquote/span/entity/paraphrase\n+ claim_lattice (7 hard checks)", fillcolor="#ffe6f0"]
qa_warrant[label="qa/warrant.py\n5 anchor classes\n(proper-noun · date · count\n · entity-list · cause)", fillcolor="#ffe6f0"]
qa_evidence[label="qa/evidence.py\nEvidenceObject + spotlight", fillcolor="#ffe6f0"]
qa_runner [label="qa/runner.py\nask(): single-doc Q&A", fillcolor="#ffe6f0"]
qa_dag [label="qa/dag.py\nper-run Merkle DAG\n(7/8 quote · 9/10 CTI · 3 reject)\npreflight_node_hash + 5 clauses", fillcolor="#ffe6f0"]
qa_keys [label="qa/keys.py\n8-dim cache_key + question_hash", fillcolor="#ffe6f0"]
qa_inspect[label="qa/inspect.py\nsidecar diagnostic\n(read-only)", fillcolor="#ffe6f0"]
// Preflight modules (Tickets #000008 + #000010)
qa_quantifier [label="qa/quantifier.py\n10-rung intensity classifier\n(#000008)", fillcolor="#ffe6f0"]
qa_model_profiles [label="qa/model_profiles.py\nper-model claim-cap profiles\n(#000008)", fillcolor="#ffe6f0"]
qa_quantifier_reminder[label="qa/quantifier_reminder.py\nbroad-query reminder text\n(#000008)", fillcolor="#ffe6f0"]
qa_metacognition [label="qa/metacognition.py\nQuestionState + 4 detectors\n(temporal · contradiction ·\n false-premise · out-of-corpus)\n(#000010)", fillcolor="#ffe6f0"]
}
// ---- Distill (surface → core) ----
distill [label="distill/\nDistiller ABC + tfidf + first_sentence", fillcolor="#fff0e0"]
// ---- Federation (off by default) ----
mesh [label="mesh/\nfederation: identity, roster,\nAEAD epoch secret, gossip wire", fillcolor="#f0e6ff"]
// ---- Entry point ----
cli [label="cli.py\nargparse entrypoint\n(make targets call into here)", fillcolor="#dddddd", shape=note]
// Substrate dependencies
document -> merkle
store -> merkle
store -> document
ingest -> store
ingest -> document
// Sources -> ingest path
wikipedia -> ingest
wiki_xml -> ingest
html_page -> ingest [label="parse_html →\nedges rows"]
crawler -> html_page
grok -> ingest
vcs -> ingest
// Retrieval pipeline
qa_query -> search
qa_query -> concepts [label="synonym_expand /\nrivalry_excluded"]
qa_query -> qa_keys
qa_query -> qa_verify
qa_query -> qa_evidence
qa_query -> qa_dag
qa_query -> wikitext [label="to_base()"]
qa_verify -> qa_warrant
qa_verify -> qa_evidence
qa_runner -> qa_query
qa_inspect -> qa_query [style=dashed, label="read-only sidecar"]
// Preflight wiring (#000008 + #000010 → #000009 DAG binding)
qa_query -> qa_quantifier [label="classify_question_quantifier"]
qa_query -> qa_model_profiles [label="cap_for_intensity"]
qa_query -> qa_quantifier_reminder [label="broad_quantifier_reminder"]
qa_query -> qa_metacognition [label="preflight_question"]
qa_runner -> qa_quantifier
qa_runner -> qa_model_profiles
qa_runner -> qa_quantifier_reminder
qa_runner -> qa_metacognition
qa_dag -> qa_quantifier [style=dotted, label="preflight clause"]
qa_dag -> qa_metacognition [style=dotted, label="preflight clause"]
// Concepts reads existing edges
concepts -> store [label="reads edges,\nwrites concept_relations"]
// Search reads chunks
search -> store
// Distill consumes store, writes derivations
distill -> store
distill -> document
// Eviction
evict -> store
// Mesh
mesh -> store
// CLI dispatches everywhere
cli -> ingest
cli -> qa_runner
cli -> qa_query
cli -> qa_inspect
cli -> distill
cli -> evict
cli -> mesh
cli -> concepts
}