Skip to content

Agent KB_readmenator_p3

grisun0 edited this page Oct 16, 2026 · 32 revisions

Subsystem: readmenator (page 3 of 5)

Previous: KB_readmenator_p2.md

readmenator/_gh_wiki.py

  • Doc: GitHub wiki publisher: mirrors generated knowledge into the repository wiki.
  • Layer: utility
  • Language: py
  • Symbols:
    • WikiPublishResult (class, line 40) class WikiPublishResult
    • GitHubWikiPublisher (class, line 60) class GitHubWikiPublisher
    • __init__ (method, line 63) def __init__(self, config, runner)
    • page_name (method, line 73) def page_name(self, rel_path)
    • collect_sources (method, line 97) def collect_sources(self, project_root)
    • _blob_base (method, line 122) def _blob_base(self, remote, commit)
    • rewrite (method, line 130) def rewrite(self, text, rel_path, names, project_root, blob_base)
    • render (method, line 180) def render(self, project_root, remote)
    • _fallback_home (method, line 206) def _fallback_home(self, project_name)
    • _sidebar (method, line 214) def _sidebar(self, names)
    • _footer (method, line 242) def _footer(git)
    • wiki_remote (method, line 250) def wiki_remote(self, project_root)
    • _origin (method, line 268) def _origin(self, project_root)
    • _call (method, line 280) def _call(self, command, cwd)
    • _write_pages (method, line 294) def _write_pages(self, target, pages)
    • publish (method, line 314) def publish(self, project_root, dry_run)
    • link (function, line 152) def link(match)
    • permalink (function, line 165) def permalink(match)
  • Depends on: readmenator/_config.py, readmenator/_folder_readme.py, readmenator/_gitmeta.py
  • Imported by: readmenator/_app.py, readmenator/_pipeline.py, tests/test_folder_readme.py, tests/test_gh_wiki.py

readmenator/_gitmeta.py

readmenator/_graphlayout.py

  • Doc: Deterministic graph layout algorithms for animated renders.
  • Layer: utility
  • Language: py
  • Symbols:
    • ForceAtlas2Settings (class, line 40) class ForceAtlas2Settings
    • _initial_positions (function, line 66) def _initial_positions(n, seed, dims)
    • forceatlas2_frames (function, line 73) def forceatlas2_frames(ids, edges, settings)
    • _snapshot_steps (function, line 113) def _snapshot_steps(iterations, snapshots)
    • _fa2_numpy (function, line 119) def _fa2_numpy(n, pairs, start, cfg)
    • _fa2_python (function, line 166) def _fa2_python(n, pairs, start, cfg)
    • fit_frames (function, line 221) def fit_frames(frames, box, margin, trim)
    • interpolate_frames (function, line 266) def interpolate_frames(frames, t)
    • BundleLayout (class, line 281) class BundleLayout
    • _bspline (function, line 301) def _bspline(control, samples)
    • _bundle_curves (function, line 324) def _bundle_curves(leaves, member_group, hub, root, edges, beta, samples)
    • hierarchical_edge_bundling (function, line 374) def hierarchical_edge_bundling(groups, edges, center, radius, beta, samples, group_gap, inner_ratio)
    • fibonacci_sphere (function, line 429) def fibonacci_sphere(count)
    • _unit (function, line 452) def _unit(v)
    • SphereBundleLayout (class, line 461) class SphereBundleLayout
    • _split_caps (function, line 479) def _split_caps(labels, sizes, points, lattice, out)
    • spherical_edge_bundling (function, line 516) def spherical_edge_bundling(groups, edges, radius, beta, samples, inner_ratio, refine_sweeps, affinity_edges)
    • normalize_cloud (function, line 586) def normalize_cloud(points, quantile, max_radius)
    • _undirected_weights (function, line 623) def _undirected_weights(groups, edges)
    • _angular_distance (function, line 648) def _angular_distance(a, b)
    • bundle_angular_cost (function, line 654) def bundle_angular_cost(groups, edges, group_gap)
    • _center_out (function, line 676) def _center_out(members)
    • _group_order_cost (function, line 688) def _group_order_cost(order, sizes, weights, gap)
    • optimize_bundle_order (function, line 702) def optimize_bundle_order(groups, edges, sweeps, passes, group_gap)
    • refine_sphere_leaves (function, line 804) def refine_sphere_leaves(layout, groups, edges, sweeps)
    • chord_total (function, line 829) def chord_total(leaves)
  • Imported by: readmenator/_bundlegraph.py, readmenator/_forcegraph.py, readmenator/_video.py, tests/test_graphlayout.py, tests/test_layout_quality.py

readmenator/_graphrag.py

  • Doc: Zero-token GraphRAG index and retrieval for AI agents.
  • Layer: utility
  • Language: py
  • Symbols:
    • RagEntity (class, line 67) class RagEntity
    • RagRelation (class, line 94) class RagRelation
    • RagTextUnit (class, line 115) class RagTextUnit
    • RagCommunity (class, line 136) class RagCommunity
    • GraphRagIndex (class, line 169) class GraphRagIndex
    • RagContext (class, line 216) class RagContext
    • tokenize (function, line 240) def tokenize(text, min_len, stopwords)
    • Bm25Index (class, line 267) class Bm25Index
    • _file_entity (function, line 322) def _file_entity(file_id)
    • _edge_kind (function, line 327) def _edge_kind(relation)
    • _relation_weight (function, line 335) def _relation_weight(relation)
    • _short (function, line 340) def _short(file_id)
    • GraphRagBuilder (class, line 345) class GraphRagBuilder
    • GraphRagSearcher (class, line 942) class GraphRagSearcher
    • GraphRagStore (class, line 1212) class GraphRagStore
    • to_dict (method, line 186) def to_dict(self)
    • from_dict (method, line 197) def from_dict(cls, data)
    • __init__ (method, line 270) def __init__(self, documents, k1, b)
    • scores (method, line 298) def scores(self, query)
    • __init__ (method, line 348) def __init__(self, config)
    • build (method, line 358) def build(self, nodes, edges, resolved_edges, analysis, layers, findings, analysis_v2, concept_graph, content_map...
    • _kind_counts (method, line 578) def _kind_counts(entities)
    • _undirected_graph (method, line 585) def _undirected_graph(self, ids, relations)
    • _entity_rank (method, line 597) def _entity_rank(self, ids, relations)
    • _file_rank (method, line 608) def _file_rank(self, nodes, resolved_edges)
    • _text_units (method, line 615) def _text_units(self, nodes, content_map)
    • _risk_score (method, line 649) def _risk_score(self, files, findings)
    • _reports (method, line 659) def _reports(self, nodes, resolved_edges, analysis, layers, findings, analysis_v2, file_rank, entities)
    • _community_report (method, line 704) def _community_report(self, index, label, members, node_by_id, resolved_edges, layers, findings, analysis_v2...
    • _rating (method, line 851) def _rating(self, mass, top_mass, risk)
    • _themes (method, line 864) def _themes(self, reports, links)
    • _root_report (method, line 908) def _root_report(self, reports, themes, nodes, analysis)
    • __init__ (method, line 945) def __init__(self, config, index)
    • _tok (method, line 970) def _tok(self, text)
    • _entity_doc (method, line 974) def _entity_doc(self, entity)
    • _walk_graph (method, line 979) def _walk_graph(self)
    • choose_mode (method, line 987) def choose_mode(self, query)
    • search (method, line 1004) def search(self, query, mode, budget_tokens)
    • _budget_chars (method, line 1020) def _budget_chars(self, budget_tokens)
    • local_search (method, line 1025) def local_search(self, query, budget_tokens)
    • global_search (method, line 1106) def global_search(self, query, budget_tokens)
    • _location (method, line 1151) def _location(entity)
    • _section (method, line 1158) def _section(title, items)
    • _report_block (method, line 1163) def _report_block(report)
    • _unit_block (method, line 1170) def _unit_block(unit)
    • _pack (method, line 1175) def _pack(self, header, sections, budget_tokens, shares)
    • __init__ (method, line 1215) def __init__(self, config)
    • directory (method, line 1223) def directory(self, project_root)
    • write (method, line 1227) def write(self, index, project_root)
    • load (method, line 1257) def load(self, project_root)
    • render_reports (method, line 1279) def render_reports(index)
    • add_relation (function, line 406) def add_relation(source, target, relation, description, confidence)
    • resolve_symbol (function, line 452) def resolve_symbol(file_id, name)
  • Depends on: readmenator/_analyzer.py, readmenator/_category.py, readmenator/_config.py, readmenator/_models.py, readmenator/_purpose.py, readmenator/_rank.py, readmenator/_resolver.py
  • Imported by: readmenator/_app.py, readmenator/_pipeline.py, tests/test_graphrag.py, tests/test_memory.py

readmenator/_hotspots.py

  • Doc: Hotspot, dependency cycle, and change impact analysis.
  • Layer: utility
  • Language: py
  • Symbols:
    • HotspotAnalyzer (class, line 22) class HotspotAnalyzer
    • __init__ (method, line 31) def __init__(self, config)
    • analyze_hotspots (method, line 34) def analyze_hotspots(self, nodes, edges, resolved_edges)
    • detect_cycles (method, line 90) def detect_cycles(self, nodes, resolved_edges)
    • analyze_change_impact (method, line 155) def analyze_change_impact(self, nodes, resolved_edges)
    • _dfs_visit (function, line 114) def _dfs_visit(current)
    • _record_cycle (function, line 125) def _record_cycle(start, end)
  • Depends on: readmenator/_config.py, readmenator/_models.py
  • Imported by: readmenator/_pipeline.py, tests/test_hotspots.py

readmenator/_htmlpack.py

readmenator/_layer_rules.py

  • Doc: Architecture layer rule engine: forbidden and warning edges between layers.
  • Layer: business_logic
  • Language: py
  • Symbols:
    • LayerRuleEngine (class, line 11) class LayerRuleEngine
    • __init__ (method, line 36) def __init__(self, config)
    • detect_violations (method, line 39) def detect_violations(self, nodes, edges, resolved_edges, layers)
    • violation_summary (method, line 111) def violation_summary(violations)
  • Depends on: readmenator/_config.py, readmenator/_models.py
  • Imported by: readmenator/_pipeline.py, tests/test_layer_rules.py

readmenator/_layers.py

readmenator/_linter.py

  • Doc: Architecture linter for the readmenator knowledge graph.
  • Layer: utility
  • Language: py
  • Symbols:
    • ArchitectureLinter (class, line 21) class ArchitectureLinter
    • __init__ (method, line 34) def __init__(self, config)
    • lint (method, line 37) def lint(self, nodes, edges, resolved_edges, layers, content_map)
    • _check_file_length (method, line 72) def _check_file_length(self, nodes, content_map)
    • _check_cross_layer_violations (method, line 103) def _check_cross_layer_violations(self, nodes, edges, resolved_edges, layers)
    • _check_circular_dependencies (method, line 134) def _check_circular_dependencies(self, nodes, resolved_edges)
    • _check_unresolved_calls (method, line 195) def _check_unresolved_calls(self, nodes, edges, resolved_edges, content_map)
    • _dfs (function, line 153) def _dfs(current)
  • Depends on: readmenator/_config.py, readmenator/_layers.py, readmenator/_models.py, readmenator/_symindex.py
  • Imported by: readmenator/_app.py, tests/test_linter.py

readmenator/_mcp_server.py

  • Doc: MCP (Model Context Protocol) stdio server for ReadMenator.
  • Layer: utility
  • Language: py
  • Symbols:
    • MCPError (class, line 58) class MCPError(Exception)
    • MCPRequest (class, line 71) class MCPRequest
    • MCPTool (class, line 92) class MCPTool
    • MCPResource (class, line 119) class MCPResource
    • MCPServer (class, line 146) class MCPServer
    • main (function, line 1074) def main()
    • __init__ (method, line 59) def __init__(self, code, message, data)
    • __init__ (method, line 72) def __init__(self, msg)
    • is_notification (method, line 79) def is_notification(self)
    • response (method, line 82) def response(self, result)
    • error (method, line 85) def error(self, code, message, data)
    • __init__ (method, line 93) def __init__(self, name, description, handler, input_schema)
    • definition (method, line 108) def definition(self)
    • call (method, line 115) def call(self, arguments)
    • __init__ (method, line 120) def __init__(self, uri, name, description, mime_type, handler)
    • definition (method, line 134) def definition(self)
    • read (method, line 142) def read(self)
    • __init__ (method, line 147) def __init__(self, app, target_dir)
    • register_tool (method, line 155) def register_tool(self, tool)
    • register_resource (method, line 158) def register_resource(self, resource)
    • _ensure_kb (method, line 161) def _ensure_kb(self)
    • _handle_initialize (method, line 173) def _handle_initialize(self, req)
    • _handle_list_tools (method, line 187) def _handle_list_tools(self, req)
    • _handle_call_tool (method, line 192) def _handle_call_tool(self, req)
    • _handle_list_resources (method, line 214) def _handle_list_resources(self, req)
    • _handle_read_resource (method, line 219) def _handle_read_resource(self, req)
    • dispatch (method, line 241) def dispatch(self, req)
    • run (method, line 261) def run(self)
    • _register_all (method, line 285) def _register_all(self)
    • _scan (method, line 590) def _scan(self)
    • _scan_deep (method, line 596) def _scan_deep(self)
    • _tool_summary (method, line 604) def _tool_summary(self)
    • _tool_query (method, line 642) def _tool_query(self, text)
    • _tool_explain (method, line 647) def _tool_explain(self, name)
    • _tool_path (method, line 659) def _tool_path(self, symbol_a, symbol_b)
    • _tool_findings (method, line 670) def _tool_findings(self, min_severity)
    • _tool_security_summary (method, line 700) def _tool_security_summary(self)
    • _tool_taint (method, line 705) def _tool_taint(self)
    • _tool_hotspots (method, line 726) def _tool_hotspots(self, top_n)
    • _tool_cycles (method, line 742) def _tool_cycles(self)
    • _tool_communities (method, line 753) def _tool_communities(self)
    • _tool_layers (method, line 768) def _tool_layers(self)
    • _tool_layer_violations (method, line 786) def _tool_layer_violations(self)
    • _tool_rebuild (method, line 802) def _tool_rebuild(self)
    • _tool_update (method, line 812) def _tool_update(self)
    • _tool_export_json (method, line 820) def _tool_export_json(self)
    • _tool_concepts (method, line 824) def _tool_concepts(self)
    • _tool_analytics (method, line 850) def _tool_analytics(self)
    • _tool_near (method, line 870) def _tool_near(self, query, top_k)
    • _tool_provenance (method, line 887) def _tool_provenance(self)
    • _tool_forcegraph (method, line 900) def _tool_forcegraph(self)
    • _tool_memory (method, line 914) def _tool_memory(self)
    • _tool_remember (method, line 918) def _tool_remember(self, note, kind)
    • _tool_graphrag (method, line 925) def _tool_graphrag(self, query, mode, budget_tokens)
    • _resource_summary (method, line 936) def _resource_summary(self)
    • _resource_graph (method, line 953) def _resource_graph(self)
    • _resource_findings (method, line 972) def _resource_findings(self)
    • _resource_analysis (method, line 988) def _resource_analysis(self)
    • _resource_kb (method, line 1018) def _resource_kb(self)
    • _resource_concepts (method, line 1022) def _resource_concepts(self)
    • _resource_forcegraph (method, line 1049) def _resource_forcegraph(self)
    • _resource_graphrag (method, line 1055) def _resource_graphrag(self)
    • _resource_analytics (method, line 1063) def _resource_analytics(self)
    • _get_query_engine (method, line 1069) def _get_query_engine(self, nodes, edges, resolved)
  • Depends on: readmenator/_app.py, readmenator/_config.py, readmenator/_layers.py, readmenator/_query.py
  • Imported by: readmenator/__init__.py, readmenator/__main__.py, tests/test_mcp_server.py

readmenator/_memory.py

  • Doc: Persistent project memory for agents, generated with zero tokens.
  • Layer: utility
  • Language: py
  • Symbols:
    • DeclaredRule (class, line 53) class DeclaredRule
    • MemoryNote (class, line 70) class MemoryNote
    • sanitize_note (function, line 84) def sanitize_note(text, max_chars)
    • ProjectMemory (class, line 102) class ProjectMemory
    • __init__ (method, line 105) def __init__(self, config)
    • path (method, line 113) def path(self, project_root)
    • read (method, line 117) def read(self, project_root)
    • notes (method, line 124) def notes(self, project_root)
    • _notes_block (method, line 141) def _notes_block(text)
    • remember (method, line 149) def remember(self, project_root, note, kind, today)
    • _skeleton (method, line 182) def _skeleton(self)
    • _log_section (method, line 190) def _log_section(self, block)
    • _splice (method, line 201) def _splice(self, document, block)
    • _write (method, line 209) def _write(self, project_root, text)
    • write (method, line 218) def write(self, project_root, generated)
    • build (method, line 231) def build(self, project_root, nodes, analysis, analysis_v2, findings, concept_graph, content_map)
    • extract_rules (method, line 291) def extract_rules(self, project_root)
    • _categorise (method, line 360) def _categorise(heading, keywords)
    • _purpose_section (method, line 368) def _purpose_section(self, root, nodes, analysis, concept_graph)
    • _readme_lead (method, line 400) def _readme_lead(self, root)
    • detect_commands (method, line 419) def detect_commands(self, root, nodes)
    • _safe_read (method, line 473) def _safe_read(self, path)
    • _is_test (method, line 483) def _is_test(file_id)
    • _workflow_section (method, line 492) def _workflow_section(self, root, nodes)
    • _declared_section (method, line 512) def _declared_section(title, rules, category, measured)
    • _style_baselines (method, line 524) def _style_baselines(self, nodes, content_map)
    • _deliverable_baselines (method, line 559) def _deliverable_baselines(self, root, nodes, findings, analysis_v2)
    • _risk_section (method, line 579) def _risk_section(self, analysis, analysis_v2)
    • _pct (method, line 601) def _pct(part, whole)
    • _count_severe (method, line 606) def _count_severe(findings)
  • Depends on: readmenator/_config.py, readmenator/_gitmeta.py, readmenator/_models.py, readmenator/_purpose.py
  • Imported by: readmenator/_pipeline.py, tests/test_memory.py

readmenator/_mermaid.py

  • Doc: Mermaid graph renderer with intelligent pruning.
  • Layer: utility
  • Language: py
  • Symbols:
    • MermaidRenderer (class, line 17) class MermaidRenderer
    • __init__ (method, line 26) def __init__(self, max_nodes, max_symbols_per_file, module_style, class_style, function_style, external_style...
    • _sanitize_id (method, line 75) def _sanitize_id(node_id)
    • render (method, line 86) def render(self, nodes, edges, resolved_edges, analysis)
  • Depends on: readmenator/_models.py
  • Imported by: readmenator/_documentation.py, tests/test_mermaid.py

readmenator/_models.py

readmenator/_ollama.py

  • Doc: Local Ollama client for optional LLM enrichment.
  • Layer: utility
  • Language: py
  • Symbols:
    • strip_thinking (function, line 21) def strip_thinking(text)
    • OllamaClient (class, line 33) class OllamaClient
    • __init__ (method, line 36) def __init__(self, config)
    • enabled (method, line 44) def enabled(self)
    • available (method, line 48) def available(self, timeout)
    • generate (method, line 69) def generate(self, prompt, system)
    • describe_component (method, line 104) def describe_component(self, name, files, symbols, imports)
  • Depends on: readmenator/_config.py
  • Imported by: readmenator/__init__.py, readmenator/_components.py, readmenator/_pipeline.py, tests/test_ollama.py

readmenator/_pipeline.py

readmenator/_project_config.py

  • Doc: Per-project persistent configuration (readmenator.toml).
  • Layer: infrastructure
  • Language: py
  • Symbols:
    • _toml_str (function, line 136) def _toml_str(value)
    • _toml_value (function, line 148) def _toml_value(value)
    • template_text (function, line 159) def template_text(config)
    • config_path (function, line 286) def config_path(project_root, config)
    • ensure_project_config (function, line 300) def ensure_project_config(project_root, config)
    • _mini_toml_parse (function, line 333) def _mini_toml_parse(text)
    • _strip_toml_comment (function, line 367) def _strip_toml_comment(value)
    • _mini_toml_value (function, line 395) def _mini_toml_value(value)
    • parse_toml (function, line 450) def parse_toml(text)
    • _field_types (function, line 484) def _field_types()
    • _coerce (function, line 492) def _coerce(field_name, value, default)
    • load_project_config (function, line 544) def load_project_config(project_root, base)
    • display_name (function, line 595) def display_name(config, fallback)
    • safe_url (function, line 609) def safe_url(url)
    • safe_color (function, line 624) def safe_color(value, fallback)
    • branding_css (function, line 642) def branding_css(config)
    • viewer_config_dict (function, line 663) def viewer_config_dict(config, project_root)
    • write_viewer_config (function, line 717) def write_viewer_config(maps_dir, config, project_root)
  • Depends on: readmenator/_config.py
  • Imported by: readmenator/__init__.py, readmenator/__main__.py, readmenator/_app.py, readmenator/_bundlegraph.py, readmenator/_diagrams.py, readmenator/_flowpage.py, readmenator/_forcegraph.py, readmenator/_viewer_ui.py, tests/test_project_config.py

readmenator/_projections.py

  • Doc: Functors and projections for the readmenator code category.
  • Layer: utility
  • Language: py
  • Symbols:
    • Projection (class, line 17) class Projection(Protocol)
    • IdentityProjection (class, line 32) class IdentityProjection
    • DocProjection (class, line 42) class DocProjection
    • RiskProjection (class, line 63) class RiskProjection
    • apply_view (function, line 95) def apply_view(category, view_config)
    • map_node (method, line 23) def map_node(self, node)
    • map_morphism (method, line 27) def map_morphism(self, m)
    • map_node (method, line 35) def map_node(self, node)
    • map_morphism (method, line 38) def map_morphism(self, m)
    • __init__ (method, line 49) def __init__(self, documented_ids)
    • map_node (method, line 52) def map_node(self, node)
    • map_morphism (method, line 57) def map_morphism(self, m)
    • __init__ (method, line 70) def __init__(self, fan_in, fan_out, test_files)
    • map_node (method, line 80) def map_node(self, node)
    • map_morphism (method, line 91) def map_morphism(self, m)
  • Depends on: readmenator/_category.py, readmenator/_models.py
  • Imported by: tests/test_ranking.py

Next: KB_readmenator_p4.md

Clone this wiki locally