# Graph Report - /home/runner/work/flame-mcp/flame-mcp/src  (2026-06-23)

## Corpus Check
- Corpus is ~32,758 words - fits in a single context window. You may not need a graph.

## Summary
- 408 nodes · 719 edges · 20 communities (19 shown, 1 thin omitted)
- Extraction: 100% EXTRACTED · 0% INFERRED · 0% AMBIGUOUS
- Token cost: 0 input · 0 output

## Community Hubs (Navigation)
- [[_COMMUNITY_server|server]]
- [[_COMMUNITY__plan_schema|_plan_schema]]
- [[_COMMUNITY__get_config|_get_config]]
- [[_COMMUNITY_journal|journal]]
- [[_COMMUNITY_search|search]]
- [[_COMMUNITY__ast_validate|_ast_validate]]
- [[_COMMUNITY__session_stats|_session_stats]]
- [[_COMMUNITY_routing|routing]]
- [[_COMMUNITY_suggestions|suggestions]]
- [[_COMMUNITY__to_thread_with_heartbeat|_to_thread_with_heartbeat]]
- [[_COMMUNITY__workspace_snapshot|_workspace_snapshot]]
- [[_COMMUNITY_build_index|build_index]]
- [[_COMMUNITY_error_scrub|error_scrub]]
- [[_COMMUNITY__config|_config]]
- [[_COMMUNITY__decorator_is_destructive|_decorator_is_destructive]]
- [[_COMMUNITY_safety|safety]]
- [[_COMMUNITY_session_stats|session_stats]]
- [[_COMMUNITY_config|config]]

## God Nodes (most connected - your core abstractions)
1. `_track_dedicated()` - 33 edges
2. `_call_flame()` - 32 edges
3. `_fmt()` - 28 edges
4. `_execute_python_impl()` - 25 edges
5. `_tok()` - 15 edges
6. `_journal_record()` - 14 edges
7. `validate_python()` - 13 edges
8. `list_clips()` - 11 edges
9. `search_flame_docs()` - 11 edges
10. `Journal` - 10 edges

## Surprising Connections (you probably didn't know these)
- `_execute_python_impl()` --calls--> `validate_python()`  [EXTRACTED]
  flame_mcp/server.py → flame_mcp/_ast_validate.py
- `_execute_python_impl()` --calls--> `format_issues()`  [EXTRACTED]
  flame_mcp/server.py → flame_mcp/_ast_validate.py
- `_track_timing()` --calls--> `persist_timing()`  [EXTRACTED]
  flame_mcp/server.py → flame_mcp/_session_stats.py
- `_execute_python_impl()` --calls--> `invalidate()`  [EXTRACTED]
  flame_mcp/server.py → flame_mcp/_workspace_snapshot.py
- `_fmt()` --calls--> `scrub_secrets()`  [EXTRACTED]
  flame_mcp/server.py → flame_mcp/error_scrub.py

## Import Cycles
- None detected.

## Communities (20 total, 1 thin omitted)

### Community 0 - "server"
Cohesion: 0.06
Nodes (76): _call_flame(), collect_media_paths(), _connect_bridge(), create_batch_group(), create_folder(), create_library(), create_reel(), create_reel_group() (+68 more)

### Community 1 - "_plan_schema"
Cohesion: 0.06
Nodes (49): BaseModel, Exception, CreateBatchGroupArgs, CreateFolderArgs, CreateLibraryArgs, CreateReelArgs, CreateReelGroupArgs, dispatch_plan() (+41 more)

### Community 2 - "_get_config"
Cohesion: 0.08
Nodes (43): description, Field, execute_python(), _execute_python_impl(), _fallback_model_name(), _get_config(), _get_current_model(), learn_pattern() (+35 more)

### Community 3 - "journal"
Cohesion: 0.07
Nodes (24): Journal, journal.py ========== Operation journaling system for Flame MCP execute_python c, Reset the journal, removing all entries., Build undo code that deletes a *structural* Flame object safely.      Direct ``f, Undo ws.create_library('Name') → scheduled flame.delete(lib).      Structural de, Undo create_reel('Name') → scheduled flame.delete(reel).      Structural delete:, Undo create_batch_group('Name') → scheduled flame.delete(bg).      Structural de, Undo obj.name = 'NewName' → obj.name = 'OldName'.      Requires the result to co (+16 more)

### Community 4 - "search"
Cohesion: 0.10
Nodes (30): Any, describe_registry(), Wire a handler for an op declared in :data:`_OP_REGISTRY`.      The handler's pa, Return a serialisable description of the registry for docs / tests.      Does NO, register_op(), clear_cache(), _get_bm25(), _get_collection() (+22 more)

### Community 5 - "_ast_validate"
Cohesion: 0.09
Nodes (28): Attribute, AstValidation, _dotted_path(), _FlameAttrCollector, format_issues(), _graph_symbols(), _load_graph(), _ast_validate.py ================ F4b — AST dry-run walker for ``execute_python` (+20 more)

### Community 6 - "_session_stats"
Cohesion: 0.10
Nodes (23): datetime, build_scoped_mcp_config(), capture_suggestions(), log_usage(), Read-only console support: deny-list + improvement-suggestion capture.  The in-F, Pull ``@@SUGGESTION@@`` lines from *text*, append them to *dest*, and     return, Return a ``--mcp-config`` JSON string with only *keep_servers*, read from     *m, Append a per-call token-usage record (best-effort; never raises). (+15 more)

### Community 7 - "routing"
Cohesion: 0.15
Nodes (18): concept_map.py ============== Static lookup table mapping common Flame operation, Extract lowercase alphanumeric tokens from a string., Score a concept map entry against query tokens.      Uses a weighted keyword ove, Fuzzy-match a user query against the concept map.      Uses keyword-based scorin, resolve_concept(), _score_entry(), _tokenize(), _load_api_graph() (+10 more)

### Community 8 - "suggestions"
Cohesion: 0.14
Nodes (19): list_flame_logs(), List all log files available in /opt/Autodesk/logs.     Shows file name, size, a, _format_block(), maybe_annotate_with_suggestions(), Per-tool chaining hints for flame-mcp (text-response variant).  Design note ----, Pick the first clip under the first reel header and suggest metadata.      The l, Pick the most recent log and suggest a filtered read.      `list_flame_logs` pri, Kill switch. Set FLAME_MCP_DISABLE_SUGGESTIONS=1 to bypass hints. (+11 more)

### Community 9 - "_to_thread_with_heartbeat"
Cohesion: 0.15
Nodes (17): Context, execute_plan(), _execute_plan_impl(), export_clip(), flame_wiretap_tree(), _flame_wiretap_tree_impl(), import_clips(), Inspect the Wiretap IFFFS node tree at the given path using the     wiretap_prin (+9 more)

### Community 10 - "_workspace_snapshot"
Cohesion: 0.13
Nodes (14): F, cache_workspace_read(), get(), invalidate(), _make_key(), _workspace_snapshot.py ====================== F4a — Workspace snapshot cache wit, Return number of entries currently cached. Mainly for tests., Compose a stable cache key from a function name + call args.      Args order mat (+6 more)

### Community 11 - "build_index"
Cohesion: 0.25
Nodes (10): build(), chunk_markdown(), collect_docs(), _make_embedding_fn(), _method_group_chunks(), build_index.py ============== Indexes documentation files into a local ChromaDB, Split a markdown file into meaningful chunks by section (## headers).      For A, Return all .md files to index, excluding non-API docs. (+2 more)

### Community 12 - "error_scrub"
Cohesion: 0.33
Nodes (6): BaseException, error_scrub.py — OPSEC-safe error-message sanitisation shared across the MCP eco, Redact credential-shaped values embedded in free text.      Replaces the *value*, Return a scrubbed, length-bounded string for *exc*.      Scrub FIRST, then trunc, safe_error_message(), scrub_secrets()

### Community 13 - "_config"
Cohesion: 0.33
Nodes (6): load_model_config(), _config.py ========== Shared helper for loading the persisted LLM model/backend, Read the `ollama_keep_alive` knob from `config.json` (F1b).      Ollama's `/api/, Load persisted model, backend, Ollama server URL, and cloud key     from a confi, resolve_keep_alive(), PathLike

### Community 14 - "_decorator_is_destructive"
Cohesion: 0.33
Nodes (6): _decorator_is_destructive(), discover_mcp_tools(), True if an @mcp.tool(...) AST decorator carries annotations=_DST., Return the ``mcp__flame__<name>`` ids for every @mcp.tool in ``source``.      Se, On every server start, ensure all NON-DESTRUCTIVE @mcp.tool functions are     li, _sync_tool_permissions()

### Community 15 - "safety"
Cohesion: 0.50
Nodes (3): _check_dangerous(), safety.py ========= Known-crasher pattern detection for Autodesk Flame execute_p, Scan code for patterns known to crash Flame (regex + AST).     Returns a formatt

### Community 16 - "session_stats"
Cohesion: 0.50
Nodes (4): Return a summary of token usage and RAG savings for this session.     Call this, REC-001: format last 10 call timings for get_session_stats output., session_stats(), _timings_summary()

## Knowledge Gaps
- **1 thin communities (<3 nodes) omitted from report** — run `graphify query` to explore isolated nodes.

## Suggested Questions
_Questions this graph is uniquely positioned to answer:_

- **Why does `validate_python()` connect `_ast_validate` to `server`, `_get_config`?**
  _High betweenness centrality (0.103) - this node is a cross-community bridge._
- **Why does `maybe_annotate_with_suggestions()` connect `suggestions` to `server`, `_get_config`?**
  _High betweenness centrality (0.078) - this node is a cross-community bridge._
- **Why does `resolve_query()` connect `routing` to `server`?**
  _High betweenness centrality (0.069) - this node is a cross-community bridge._
- **What connects `_ast_validate.py ================ F4b — AST dry-run walker for ``execute_python``, `Load and cache ``rag/api_graph.json``.      Returns an empty dict when the file`, `Test-only hook: force the next ``_load_graph`` call to re-read.` to the rest of the system?**
  _188 weakly-connected nodes found - possible documentation gaps or missing edges._
- **Should `server` be split into smaller, more focused modules?**
  _Cohesion score 0.05741626794258373 - nodes in this community are weakly interconnected._
- **Should `_plan_schema` be split into smaller, more focused modules?**
  _Cohesion score 0.05877551020408163 - nodes in this community are weakly interconnected._
- **Should `_get_config` be split into smaller, more focused modules?**
  _Cohesion score 0.08305647840531562 - nodes in this community are weakly interconnected._