Skip to content

Agent KB_readmenator

grisun0 edited this page Oct 16, 2026 · 36 revisions

Subsystem: readmenator (page 1 of 5)

Pages: KB_readmenator.md, KB_readmenator_p2.md, KB_readmenator_p3.md, KB_readmenator_p4.md, KB_readmenator_p5.md

readmenator/init.py

readmenator/main.py

readmenator/_agent_injector.py

  • Doc: Injects KNOWLEDGE_BASE.md references into AI agent instruction files.
  • Layer: infrastructure
  • Language: py
  • Symbols:
    • ensure_readmenator_installed (function, line 120) def ensure_readmenator_installed()
    • AgentInjector (class, line 142) class AgentInjector
    • __init__ (method, line 153) def __init__(self, kb_filename, agent_output_dir, agent_files, agent_globs, wiki_output_dir, agent_heading...
    • inject (method, line 173) def inject(self, project_root)
    • remove (method, line 191) def remove(self, project_root)
    • find_agent_files (method, line 204) def find_agent_files(self, project_root)
    • _find_agent_files (method, line 208) def _find_agent_files(self, root)
    • _inject_single (method, line 222) def _inject_single(self, path)
    • _extract_current_injection (method, line 260) def _extract_current_injection(content)
    • _remove_old_injection (method, line 269) def _remove_old_injection(content)
    • _remove_single (method, line 279) def _remove_single(self, path)
    • _build_injection (method, line 295) def _build_injection(self, fmt)
    • _build_mdc_injection (method, line 318) def _build_mdc_injection(self)
    • _prepend_mdc_frontmatter (method, line 323) def _prepend_mdc_frontmatter(content, injection)
  • Imported by: readmenator/_pipeline.py, tests/test_agent_injector.py, tests/test_agent_output.py, tests/test_project_config.py

readmenator/_agent_output.py

  • Doc: Agent-friendly output generator for ReadMenator.
  • Layer: utility
  • Language: py
  • Symbols:
    • AgentOutputGenerator (class, line 71) class AgentOutputGenerator
    • __init__ (method, line 78) def __init__(self, config)
    • generate (method, line 82) def generate(self, nodes, edges, resolved_edges, analysis, analysis_v2, findings, layers, project_root)
    • _infer_subsystems (method, line 139) def _infer_subsystems(self, nodes)
    • _build_index (method, line 174) def _build_index(self, nodes, subsystems, imported_by)
    • _build_architecture (method, line 206) def _build_architecture(self, edges, resolved_edges, nodes)
    • _build_security (method, line 258) def _build_security(self, findings, nodes)
    • _enclosing_symbol (method, line 294) def _enclosing_symbol(symbols, line)
    • _is_public (method, line 304) def _is_public(self, sym)
    • _qualified_names (method, line 311) def _qualified_names(symbols)
    • _build_api (method, line 329) def _build_api(self, nodes, resolved_map, imported_by, layers)
    • _build_manifest (method, line 387) def _build_manifest(self, nodes, edges, resolved_edges, findings, project_root, subsystems, layers, out_dir)
    • _entrypoints (method, line 461) def _entrypoints(self, nodes, layers)
    • _inventory (method, line 472) def _inventory(self, out_dir)
    • _build_symbols (method, line 487) def _build_symbols(self, nodes)
    • _closed_loop (method, line 502) def _closed_loop(cycle)
    • _build_gotchas (method, line 509) def _build_gotchas(self, analysis, analysis_v2, nodes, layers, imported_by)
    • _build_concepts (method, line 631) def _build_concepts(self, analysis_v2)
    • _safe_name (method, line 671) def _safe_name(name)
    • _write_subsystem_files (method, line 678) def _write_subsystem_files(self, out_dir, subsystems, resolved_map, imported_by, layers)
    • _build_subsystem_content (method, line 693) def _build_subsystem_content(self, name, file_nodes, resolved_map, imported_by, layers)
    • _write_recipes (method, line 743) def _write_recipes(self, recipes_dir, analysis, analysis_v2, findings, layers)
    • _deps_by_source (method, line 871) def _deps_by_source(resolved_map)
    • _build_resolved_map (method, line 881) def _build_resolved_map(resolved_edges)
    • _build_imported_by_map (method, line 891) def _build_imported_by_map(resolved_edges)
    • _page_name (method, line 901) def _page_name(filename, page)
    • _split_units (method, line 909) def _split_units(body, is_table)
    • _chunk_unit (method, line 922) def _chunk_unit(unit, budget)
    • _paginate (method, line 939) def _paginate(self, filename, content)
    • _write_paged (method, line 978) def _write_paged(self, out_dir, filename, content)
    • _prune_owned (method, line 988) def _prune_owned(out_dir)
    • _write (method, line 995) def _write(path, content)
    • keep (function, line 528) def keep(file_id)
  • Depends on: readmenator/_cache.py, readmenator/_config.py, readmenator/_folder_readme.py, readmenator/_gitmeta.py, readmenator/_models.py, readmenator/_purpose.py, readmenator/_resolver.py, readmenator/_security.py
  • Imported by: readmenator/_pipeline.py, tests/test_agent_friendliness.py, tests/test_agent_output.py, tests/test_folder_readme.py

readmenator/_analytics.py

  • Doc: Corpus analytics aggregations for the readmenator knowledge graph.
  • Layer: utility
  • Language: py
  • Symbols:
    • AnalyticsBuilder (class, line 25) class AnalyticsBuilder
    • __init__ (method, line 28) def __init__(self, config)
    • build (method, line 36) def build(self, nodes, edges, resolved_edges, analysis, findings, layers, v2, hotspots)
    • _layer_distribution (method, line 100) def _layer_distribution(self, nodes, layers)
    • _language_distribution (method, line 112) def _language_distribution(self, nodes)
    • _hotspot_ranking (method, line 120) def _hotspot_ranking(self, nodes, fan_in, fan_out, hotspots)
    • _rule_yield (method, line 152) def _rule_yield(self, findings)
    • _size_bands (method, line 164) def _size_bands(self, nodes)
    • _scatter (method, line 181) def _scatter(self, nodes, fan_in, fan_out, layers)
  • Depends on: readmenator/_config.py, readmenator/_models.py
  • Imported by: readmenator/_documentation.py, readmenator/_explorer.py, readmenator/_exporter.py, readmenator/_pipeline.py, tests/test_interactive_graph.py

readmenator/_analyzer.py

  • Doc: Graph analysis engine for the readmenator knowledge graph.
  • Layer: utility
  • Language: py
  • Symbols:
    • dominant_directory (function, line 22) def dominant_directory(file_ids)
    • _is_test_path (function, line 40) def _is_test_path(file_id)
    • GraphAnalyzer (class, line 46) class GraphAnalyzer
    • __init__ (method, line 54) def __init__(self, config)
    • analyze (method, line 62) def analyze(self, nodes, edges, resolved_edges)
    • _build_adjacency (method, line 115) def _build_adjacency(self, nodes, edges)
    • _build_reverse_adjacency (method, line 129) def _build_reverse_adjacency(self, adjacency)
    • _compute_god_nodes (method, line 139) def _compute_god_nodes(self, nodes, adjacency, reverse_adjacency)
    • _detect_communities (method, line 161) def _detect_communities(self, nodes, adjacency)
    • _finalize_communities (method, line 213) def _finalize_communities(self, labels, adjacency)
    • _louvain (method, line 233) def _louvain(self, file_ids, adjacency)
    • partition (method, line 268) def partition(self, ids, adjacency)
    • _louvain_pass (method, line 282) def _louvain_pass(self, graph, resolution, epsilon)
    • _aggregate (method, line 322) def _aggregate(graph, partition)
    • _merge_small_communities (method, line 334) def _merge_small_communities(self, groups, adjacency, weights)
    • _vote_weights (method, line 381) def _vote_weights(self, file_ids, adjacency)
    • _label_communities (method, line 398) def _label_communities(self, nodes, communities)
    • _core_file (method, line 426) def _core_file(members, node_map)
    • _build_community_map (method, line 441) def _build_community_map(self, communities)
    • _compute_cohesion (method, line 451) def _compute_cohesion(self, communities, adjacency)
    • _find_surprising_connections (method, line 476) def _find_surprising_connections(self, nodes, adjacency, community_map)
    • _shortest_path_communities (method, line 516) def _shortest_path_communities(self, source, target, adjacency, community_map)
    • _suggest_questions (method, line 543) def _suggest_questions(self, nodes, god_nodes, communities, community_labels, surprising, adjacency)
  • Depends on: readmenator/_config.py, readmenator/_models.py
  • Imported by: readmenator/_graphrag.py, readmenator/_pipeline.py, readmenator/_wiki.py, tests/test_agent_friendliness.py, tests/test_analyzer.py

readmenator/_apidocs.py

  • Doc: Deterministic API reference model: extraction, cross-references, coverage.
  • Layer: utility
  • Language: py
  • Symbols:
    • ApiParam (class, line 76) class ApiParam
    • ApiEntity (class, line 98) class ApiEntity
    • DocWarning (class, line 180) class DocWarning
    • ApiReference (class, line 204) class ApiReference
    • _unparse (function, line 244) def _unparse(node)
    • _PythonExtractor (class, line 254) class _PythonExtractor
    • _matching_close (function, line 564) def _matching_close(lines, start, scan_limit)
    • _indent_end (function, line 620) def _indent_end(lines, start)
    • _split_top_level (function, line 639) def _split_top_level(text, sep)
    • _param_span (function, line 668) def _param_span(signature, name)
    • parse_signature_params (function, line 685) def parse_signature_params(signature, name, language)
    • is_vendored_path (function, line 759) def is_vendored_path(file_id, config)
    • ApiReferenceBuilder (class, line 772) class ApiReferenceBuilder
    • to_dict (method, line 91) def to_dict(self)
    • is_documented (method, line 156) def is_documented(self)
    • to_dict (method, line 160) def to_dict(self)
    • to_dict (method, line 197) def to_dict(self)
    • children (method, line 221) def children(self, uid, kinds)
    • to_dict (method, line 232) def to_dict(self, schema_version)
    • __init__ (method, line 257) def __init__(self, file_id, language, include_private)
    • extract (method, line 272) def extract(self, content)
    • _read_all (method, line 286) def _read_all(tree)
    • _visibility (method, line 305) def _visibility(self, name, parent_uid)
    • _keep (method, line 317) def _keep(self, name, visibility, documented)
    • _walk_body (method, line 325) def _walk_body(self, body, parent_uid, prefix)
    • _class (method, line 344) def _class(self, node, parent_uid, prefix)
    • _params (method, line 391) def _params(self, args, drop_receiver)
    • _render_params (method, line 410) def _render_params(params, args, receiver)
    • _body_facts (method, line 432) def _body_facts(node)
    • _function (method, line 455) def _function(self, node, parent_uid, prefix, in_class)
    • _data (method, line 513) def _data(self, stmt, body, pos, parent_uid, prefix, in_class)
    • __init__ (method, line 775) def __init__(self, config)
    • _is_test_path (method, line 783) def _is_test_path(self, file_id)
    • _is_vendored (method, line 792) def _is_vendored(self, file_id)
    • build (method, line 796) def build(self, nodes, edges, resolved_edges, content_map)
    • _module_entity (method, line 873) def _module_entity(self, node, doc_text)
    • _extract_file (method, line 881) def _extract_file(self, node, content)
    • _extract_generic (method, line 894) def _extract_generic(self, node, content)
    • _is_include_guard (method, line 987) def _is_include_guard(name, kind, doc)
    • _generic_visibility (method, line 994) def _generic_visibility(name, decl, language, parent)
    • _generic_bases (method, line 1020) def _generic_bases(signature, name)
    • _type_index (method, line 1040) def _type_index(reference)
    • _link_inheritance (method, line 1049) def _link_inheritance(self, reference, edges)
    • _inherit_docs (method, line 1082) def _inherit_docs(reference)
    • _link_calls (method, line 1122) def _link_calls(self, reference, nodes, edges, resolved_edges, contents)
    • _owner_chain (method, line 1216) def _owner_chain(reference, entity)
    • _receiver_plausible (method, line 1229) def _receiver_plausible(self, reference, receiver, caller, callee, confidence)
    • _lint (method, line 1259) def _lint(self, reference)
    • _coverage (method, line 1317) def _coverage(reference)
    • innermost (function, line 1154) def innermost(file_id, line, name)
    • target_entity (function, line 1166) def target_entity(file_id, line, name)
    • counts (function, line 1320) def counts(items)
  • Depends on: readmenator/_config.py, readmenator/_docstrings.py, readmenator/_models.py, readmenator/_pytypes.py, readmenator/_symindex.py
  • Imported by: readmenator/_apidocs_page.py, readmenator/_apidocs_render.py, readmenator/_app.py, readmenator/_flowcharts.py, readmenator/_pipeline.py, tests/test_apidocs.py, tests/test_flowcharts.py

readmenator/_apidocs_page.py

readmenator/_apidocs_render.py

  • Doc: Markdown, JSON, and writer layer for the deterministic API reference.
  • Layer: presentation
  • Language: py
  • Symbols:
    • module_display_name (function, line 64) def module_display_name(entity)
    • page_slug (function, line 75) def page_slug(module_uid)
    • jsonl_index_path (function, line 81) def jsonl_index_path(config)
    • jsonl_warnings_path (function, line 86) def jsonl_warnings_path(config)
    • _jsonl_line (function, line 91) def _jsonl_line(record)
    • jsonl_pages (function, line 96) def jsonl_pages(reference, config)
    • read_api_jsonl (function, line 143) def read_api_jsonl(api_dir, config)
    • anchor_slug (function, line 171) def anchor_slug(qualname)
    • _cell (function, line 176) def _cell(text)
    • _inline_code (function, line 181) def _inline_code(text)
    • ApiLinker (class, line 190) class ApiLinker
    • ApiMarkdownRenderer (class, line 308) class ApiMarkdownRenderer
    • ApiDocsWriter (class, line 823) class ApiDocsWriter
    • __init__ (method, line 193) def __init__(self, reference)
    • module_of (method, line 210) def module_of(self, entity)
    • resolve (method, line 214) def resolve(self, name, context_file)
    • href (method, line 251) def href(self, entity, from_module)
    • link (method, line 260) def link(self, entity, from_module, label)
    • link_uid (method, line 265) def link_uid(self, uid, from_module)
    • autolink (method, line 272) def autolink(self, text, from_module)
    • _replace (method, line 292) def _replace(self, match, from_module)
    • __init__ (method, line 311) def __init__(self, config)
    • render (method, line 319) def render(self, reference, project_name)
    • _module_link (method, line 341) def _module_link(self, linker, entity)
    • _top_link (method, line 346) def _top_link(self, linker, entity, label)
    • _summary (method, line 351) def _summary(self, entity)
    • _index (method, line 360) def _index(self, reference, linker, project_name)
    • _descendants (method, line 415) def _descendants(reference, uid)
    • _hierarchy (method, line 427) def _hierarchy(self, reference, linker)
    • _genindex (method, line 464) def _genindex(self, reference, linker)
    • _coverage (method, line 491) def _coverage(self, reference, linker)
    • _source_link (method, line 541) def _source_link(self, entity)
    • _module (method, line 549) def _module(self, reference, linker, uid)
    • _entity (method, line 589) def _entity(self, reference, linker, entity, module_uid, fence, level)
    • _doc_block (method, line 659) def _doc_block(self, doc, linker, module_uid, entity)
    • _merged_params (method, line 712) def _merged_params(entity, doc)
    • _call_refs (method, line 736) def _call_refs(self, linker, entity, module_uid)
    • _mermaid_id (method, line 749) def _mermaid_id(uid)
    • _mermaid_label (method, line 754) def _mermaid_label(text)
    • _class_diagram (method, line 758) def _class_diagram(self, reference, uid)
    • _call_graph (method, line 791) def _call_graph(self, reference, uid)
    • __init__ (method, line 826) def __init__(self, config)
    • write (method, line 835) def write(self, reference, project_root, project_name, architecture_markdown, flow_graphs)
    • _prune_jsonl (method, line 913) def _prune_jsonl(self, out_dir, pages)
    • walk (function, line 438) def walk(entity, depth)
  • Depends on: readmenator/_apidocs.py, readmenator/_apidocs_page.py, readmenator/_config.py, readmenator/_docstrings.py, readmenator/_flowlayout.py, readmenator/_flowpage.py
  • Imported by: readmenator/_pipeline.py, tests/test_apidocs.py

readmenator/_app.py

  • Doc: Application orchestrator: scan, resolve, analyze, and write every output.
  • Layer: utility
  • Language: py
  • Symbols:
    • readmenatorApplication (class, line 54) class readmenatorApplication
    • __init__ (method, line 55) def __init__(self, config)
    • _scan (method, line 64) def _scan(self, target_dir)
    • _scan_with_content (method, line 72) def _scan_with_content(self, target_dir)
    • _resolve_imports (method, line 82) def _resolve_imports(self, nodes, edges, target_dir)
    • _apply_project_config (method, line 101) def _apply_project_config(self, target_dir)
    • _write_viewer_config (method, line 132) def _write_viewer_config(self, root)
    • run (method, line 150) def run(self, target_dir, resolve_imports, run_analysis, run_security, run_v2_analysis)
    • check_freshness (method, line 304) def check_freshness(self, target_dir)
    • _maybe_refresh_pages (method, line 331) def _maybe_refresh_pages(self, root)
    • _maybe_publish_github_wiki (method, line 349) def _maybe_publish_github_wiki(self, root)
    • publish_github_wiki (method, line 367) def publish_github_wiki(self, target_dir, dry_run)
    • _write_sidecar_outputs (method, line 383) def _write_sidecar_outputs(self, root, findings, analysis_v2)
    • _write_folder_readmes (method, line 409) def _write_folder_readmes(self, root)
    • _inject_readme_link (method, line 424) def _inject_readme_link(self, root)
    • _inject_agent_files (method, line 432) def _inject_agent_files(self, root)
    • generate_uml_code (method, line 440) def generate_uml_code(self, target_dir, language, output_path)
    • _log_summary (method, line 452) def _log_summary(self, nodes, edges, root, resolved_edges, analysis, layer_summary, analysis_v2, findings)
    • update (method, line 507) def update(self, target_dir, run_security)
    • _scan_for_cache (method, line 623) def _scan_for_cache(self, root, cache)
    • query (method, line 641) def query(self, target_dir, question)
    • explain (method, line 646) def explain(self, target_dir, symbol_name)
    • find_path (method, line 658) def find_path(self, target_dir, symbol_a, symbol_b)
    • summary (method, line 671) def summary(self, target_dir)
    • rank_query (method, line 676) def rank_query(self, target_dir, query, top_n)
    • rebuild (method, line 706) def rebuild(self, target_dir, run_security)
    • analyze (method, line 709) def analyze(self, target_dir)
    • export_json (method, line 713) def export_json(self, target_dir, output_path)
    • export_html (method, line 730) def export_html(self, target_dir, output_path)
    • export_svg (method, line 741) def export_svg(self, target_dir, output_path)
    • export (method, line 752) def export(self, target_dir)
    • _forcegraph_dest (method, line 759) def _forcegraph_dest(self, target_dir, output_path)
    • _write_forcegraph (method, line 774) def _write_forcegraph(self, dest, nodes, edges, resolved, analysis, layers, findings, home_href, content_map)
    • _write_bundlegraph (method, line 829) def _write_bundlegraph(self, dest, force_payload, home_href, explorer_href)
    • _explorer_cards (method, line 868) def _explorer_cards(self, dest, href, home_href, nodes, edges, resolved, analysis, layers, findings, content_map...
    • _write_components_card (method, line 940) def _write_components_card(self, maps_dir, nodes, edges, resolved, analysis, content_map, project_root, gallery_dir)
    • export_forcegraph (method, line 1017) def export_forcegraph(self, target_dir, output_path)
    • export_bundlegraph (method, line 1036) def export_bundlegraph(self, target_dir, output_path)
    • export_components (method, line 1062) def export_components(self, target_dir, output_dir)
    • _maybe_write_apidocs (method, line 1090) def _maybe_write_apidocs(self, root, nodes, edges, resolved_edges, content_map, analysis, layers)
    • _architecture_markdown (method, line 1121) def _architecture_markdown(self, nodes, edges, resolved_edges, content_map, analysis, layers)
    • _flow_graphs (method, line 1140) def _flow_graphs(self, nodes, edges, resolved_edges, content_map, analysis, layers)
    • _write_flows_card (method, line 1155) def _write_flows_card(self, maps_dir, nodes, edges, resolved, analysis, layers, content_map)
    • build_api_reference (method, line 1198) def build_api_reference(self, target_dir)
    • export_apidocs (method, line 1210) def export_apidocs(self, target_dir)
    • export_flows (method, line 1232) def export_flows(self, target_dir)
    • explorer_state (method, line 1249) def explorer_state(self, target_dir)
    • serve_explorer (method, line 1265) def serve_explorer(self, target_dir, open_browser)
    • analytics (method, line 1278) def analytics(self, target_dir)
    • scan_texts (method, line 1295) def scan_texts(self, target_dir)
    • near (method, line 1307) def near(self, target_dir, query, top_k)
    • audit_provenance (method, line 1321) def audit_provenance(self, target_dir)
    • validate_yaralite (method, line 1344) def validate_yaralite(self, target_dir)
    • export_graphml (method, line 1358) def export_graphml(self, target_dir, output_path)
    • export_cypher (method, line 1369) def export_cypher(self, target_dir, output_path)
    • export_obsidian (method, line 1385) def export_obsidian(self, target_dir, output_dir)
    • export_wiki (method, line 1400) def export_wiki(self, target_dir, output_dir)
    • lint_wiki (method, line 1424) def lint_wiki(self, target_dir)
    • export_diagrams (method, line 1442) def export_diagrams(self, target_dir, output_dir, full)
    • _site_stats (method, line 1489) def _site_stats(nodes, edges, analysis)
    • _live_renderer (method, line 1501) def _live_renderer(self)
    • export_diagram (method, line 1511) def export_diagram(self, target_dir, kind, output_path, full)
    • export_pages (method, line 1550) def export_pages(self, target_dir, output_dir, full)
    • export_video (method, line 1595) def export_video(self, target_dir, output_path)
    • _maybe_export_video (method, line 1619) def _maybe_export_video(self, root, nodes, edges, resolved_edges, analysis, layers, findings, analysis_v2...
    • _read_contents (method, line 1658) def _read_contents(self, root, nodes)
    • _refresh_explorers (method, line 1682) def _refresh_explorers(self, root, nodes, edges, resolved_edges, analysis, layers, findings)
    • _maybe_export_forcegraph (method, line 1721) def _maybe_export_forcegraph(self, root, nodes, edges, resolved_edges, analysis, layers, findings, content_map)
    • _maybe_write_graphrag (method, line 1754) def _maybe_write_graphrag(self, root, nodes, edges, resolved_edges, analysis, layers, findings, analysis_v2...
    • _memory_notes (method, line 1790) def _memory_notes(self, root)
    • _maybe_write_memory (method, line 1796) def _maybe_write_memory(self, root, nodes, analysis, analysis_v2, findings, content_map)
    • memory (method, line 1822) def memory(self, target_dir)
    • remember (method, line 1845) def remember(self, target_dir, note, kind)
    • install_skills (method, line 1859) def install_skills(self, target_dir, target)
    • build_graphrag (method, line 1871) def build_graphrag(self, target_dir)
    • graphrag_search (method, line 1895) def graphrag_search(self, target_dir, query, mode, budget_tokens)
    • watch (method, line 1916) def watch(self, target_dir)
    • audit (method, line 1926) def audit(self, target_dir)
    • audit_deep (method, line 1933) def audit_deep(self, target_dir)
    • export_sarif (method, line 1953) def export_sarif(self, target_dir, output_path)
    • export_rules (method, line 1963) def export_rules(self, target_dir, output_dir)
    • detect_layers (method, line 1974) def detect_layers(self, target_dir)
    • lint (method, line 1984) def lint(self, target_dir)
    • strip_dead_code (method, line 1997) def strip_dead_code(self, target_dir)
    • generate_cursorrules (method, line 2007) def generate_cursorrules(self, target_dir)
    • refactor_monolith (method, line 2022) def refactor_monolith(self, target_dir)
    • on_change (function, line 1920) def on_change()
  • Depends on: readmenator/_apidocs.py, readmenator/_bundlegraph.py, readmenator/_cache.py, readmenator/_config.py, readmenator/_cursorrules_generator.py, readmenator/_dead_code.py, readmenator/_diagrams.py, readmenator/_explorer.py, readmenator/_flowcharts.py, readmenator/_flowlayout.py, readmenator/_flowpage.py, readmenator/_gh_wiki.py, readmenator/_gitmeta.py, readmenator/_graphrag.py, readmenator/_layers.py, readmenator/_linter.py, readmenator/_models.py, readmenator/_pipeline.py, readmenator/_project_config.py, readmenator/_query.py, readmenator/_rank.py, readmenator/_refactorizer.py, readmenator/_resolver.py, readmenator/_video.py, readmenator/_watcher.py, readmenator/_yaralite.py
  • Imported by: readmenator/__init__.py, readmenator/__main__.py, readmenator/_mcp_server.py, tests/test_agent_friendliness.py, tests/test_apidocs.py, tests/test_bundlegraph.py, tests/test_components.py, tests/test_diagrams.py, tests/test_folder_readme.py, tests/test_gh_wiki.py, tests/test_htmlpack.py, tests/test_integration.py, tests/test_interactive_graph.py, tests/test_mcp_server.py, tests/test_sourceview.py, tests/test_video.py

readmenator/_bundlegraph.py

readmenator/_bundlegraph_page.py

readmenator/_cache.py

  • Doc: File-content hash cache for incremental scanning and analysis caching.
  • Layer: infrastructure
  • Language: py
  • Symbols:
    • FileCache (class, line 20) class FileCache
    • source_fingerprint (function, line 179) def source_fingerprint(project_root, file_ids)
    • __init__ (method, line 31) def __init__(self, config, project_root)
    • load (method, line 38) def load(self)
    • save (method, line 49) def save(self, hashes)
    • compute_hash (method, line 55) def compute_hash(self, file_path)
    • compute_hashes (method, line 64) def compute_hashes(self, file_paths)
    • find_changed (method, line 72) def find_changed(self, file_paths)
    • prune_deleted (method, line 84) def prune_deleted(self, current_file_ids)
    • save_analysis (method, line 95) def save_analysis(self, key, data)
    • load_analysis (method, line 118) def load_analysis(self, key)
    • clear_analysis (method, line 135) def clear_analysis(self, key)
    • _prune_analysis_cache (method, line 155) def _prune_analysis_cache(self, current_file_ids)
    • has_changed_since_last_analysis (method, line 166) def has_changed_since_last_analysis(self, file_paths)
  • Depends on: readmenator/_config.py
  • Imported by: readmenator/_agent_output.py, readmenator/_app.py, readmenator/_components.py, tests/test_agent_friendliness.py, tests/test_cache.py

readmenator/_category.py

  • Doc: Category theory model for the readmenator code graph.
  • Layer: utility
  • Language: py
  • Symbols:
    • EdgeKind (class, line 24) class EdgeKind(str, Enum)
    • Morphism (class, line 57) class Morphism
    • Category (class, line 78) class Category
    • TypedGraph (class, line 181) class TypedGraph
    • build_category_from_edges (function, line 236) def build_category_from_edges(edges, resolved_edges, node_ids)
    • _infer_edge_kind (function, line 278) def _infer_edge_kind(relation)
    • __str__ (method, line 38) def __str__(self)
    • weight (method, line 73) def weight(self)
    • __init__ (method, line 86) def __init__(self)
    • add_object (method, line 92) def add_object(self, obj_id)
    • add_morphism (method, line 95) def add_morphism(self, m)
    • objects (method, line 103) def objects(self)
    • morphisms (method, line 107) def morphisms(self)
    • outgoing (method, line 110) def outgoing(self, obj_id)
    • incoming (method, line 113) def incoming(self, obj_id)
    • compose (method, line 116) def compose(self, a, b)
    • paths (method, line 133) def paths(self, source, target, max_depth)
    • _compose_kind (method, line 157) def _compose_kind(a, b)
    • __init__ (method, line 188) def __init__(self, category)
    • _compute_out_weights (method, line 197) def _compute_out_weights(self)
    • nodes (method, line 203) def nodes(self)
    • size (method, line 207) def size(self)
    • node_index (method, line 210) def node_index(self, node_id)
    • transition_weight (method, line 213) def transition_weight(self, source, target)
    • stochastic_row (method, line 221) def stochastic_row(self, source)
    • dfs (function, line 139) def dfs(current, goal, path, depth)
  • Imported by: readmenator/__init__.py, readmenator/_explain.py, readmenator/_graphrag.py, readmenator/_models.py, readmenator/_pipeline.py, readmenator/_projections.py, readmenator/_query.py, readmenator/_rank.py, tests/test_ranking.py

readmenator/_components.py

  • Doc: Component architecture diagrams, token-free by default.
  • Layer: presentation
  • Language: py
  • Symbols:
    • sanitize (function, line 45) def sanitize(name)
    • ComponentDiagramBuilder (class, line 57) class ComponentDiagramBuilder
    • _rank_layout (function, line 1002) def _rank_layout(cids, pairs)
    • __init__ (method, line 60) def __init__(self, config)
    • build (method, line 70) def build(self, nodes, edges, resolved_edges, analysis, project_root, content_map)
    • mermaid_lr (method, line 165) def mermaid_lr(self, components, relations, docs_ref)
    • overview_markdown (method, line 199) def overview_markdown(self, analysis, docs_ref, rel_prefix)
    • component_markdown (method, line 247) def component_markdown(self, component)
    • write (method, line 275) def write(self, analysis, output_dir, project_root)
    • _rel_prefix (method, line 331) def _rel_prefix(project_root, output_dir)
    • _components_of (method, line 349) def _components_of(self, nodes, analysis)
    • _component (method, line 363) def _component(self, cid, label, members, by_id, rank, index, calls, depth, resolved, raw, layers)
    • _dominant_layer (method, line 461) def _dominant_layer(members, layers)
    • _split (method, line 481) def _split(self, members)
    • _relations (method, line 492) def _relations(self, components, file_of_component, resolved, raw, calls, index)
    • _describe (method, line 564) def _describe(self, label, members, member_nodes, top_symbols, outgoing)
    • _root_description (method, line 589) def _root_description(self, nodes, components)
    • render_page (method, line 611) def render_page(self, analysis, title, home_href, rel_prefix, link_files)
    • _legend (method, line 683) def _legend(self, components)
    • _relations_section (method, line 704) def _relations_section(self, relations)
    • thumbnail_svg (method, line 738) def thumbnail_svg(self, components, relations)
    • _meta_chips (method, line 785) def _meta_chips(self, analysis)
    • _component_card (method, line 798) def _component_card(self, component, rel_prefix, link_files)
    • _layer_color (method, line 869) def _layer_color(self, layer)
    • _svg_level (method, line 881) def _svg_level(self, components, relations, svg_id, anchor_prefix)
  • Depends on: readmenator/_cache.py, readmenator/_config.py, readmenator/_layers.py, readmenator/_models.py, readmenator/_ollama.py, readmenator/_purpose.py, readmenator/_rank.py, readmenator/_symindex.py
  • Imported by: readmenator/__init__.py, readmenator/_pipeline.py, tests/test_components.py, tests/test_folder_readme.py

readmenator/_concepts.py

  • Doc: Deterministic semantic concept graph over the structural knowledge graph.
  • Layer: utility
  • Language: py
  • Symbols:
    • verb_for_relation (function, line 33) def verb_for_relation(relation)
    • ConceptExtractor (class, line 38) class ConceptExtractor
    • __init__ (method, line 41) def __init__(self, config)
    • extract (method, line 47) def extract(self, nodes, edges, resolved_edges)
    • _tokens_for_node (method, line 101) def _tokens_for_node(self, node)
    • _tokenize (method, line 115) def _tokenize(self, text)
    • _build_relations (method, line 130) def _build_relations(self, edges, file_to_concepts)
    • _build_dialectic (method, line 169) def _build_dialectic(self, concepts, relations)
  • Depends on: readmenator/_config.py, readmenator/_models.py
  • Imported by: readmenator/__init__.py, readmenator/_pipeline.py, tests/test_concepts.py

readmenator/_config.py

readmenator/_cpg.py

  • Doc: Code Property Graph (CPG) generator emitting JSON-LD for AI agents.
  • Layer: utility
  • Language: py
  • Symbols:
    • CodePropertyGraph (class, line 16) class CodePropertyGraph
    • __init__ (method, line 26) def __init__(self, privacy_mode, cpg_context)
    • generate (method, line 30) def generate(self, nodes, edges, resolved_edges, analysis, findings)
    • _severity_counts (method, line 147) def _severity_counts(self, findings)
    • _build_symbol_list (method, line 153) def _build_symbol_list(self, node)
    • _compute_node_hash (method, line 169) def _compute_node_hash(node)
  • Depends on: readmenator/_models.py
  • Imported by: readmenator/_documentation.py, readmenator/_pipeline.py, tests/test_cpg.py

Next: KB_readmenator_p2.md

Clone this wiki locally