# Graph Report - /opt/nami-army  (2026-07-03)

## Corpus Check
- 8 files · ~6,359 words
- Verdict: corpus is large enough that graph structure adds value.

## Summary
- 110 nodes · 159 edges · 15 communities detected
- Extraction: 99% EXTRACTED · 1% INFERRED · 0% AMBIGUOUS · INFERRED: 1 edges (avg confidence: 0.8)
- Token cost: 0 input · 0 output

## Community Hubs (Navigation)
- [[_COMMUNITY_Community 0|Community 0]]
- [[_COMMUNITY_Community 1|Community 1]]
- [[_COMMUNITY_Community 2|Community 2]]
- [[_COMMUNITY_Community 3|Community 3]]
- [[_COMMUNITY_Community 4|Community 4]]
- [[_COMMUNITY_Community 5|Community 5]]
- [[_COMMUNITY_Community 6|Community 6]]
- [[_COMMUNITY_Community 7|Community 7]]
- [[_COMMUNITY_Community 8|Community 8]]
- [[_COMMUNITY_Community 9|Community 9]]
- [[_COMMUNITY_Community 10|Community 10]]
- [[_COMMUNITY_Community 11|Community 11]]
- [[_COMMUNITY_Community 12|Community 12]]
- [[_COMMUNITY_Community 13|Community 13]]
- [[_COMMUNITY_Community 14|Community 14]]

## God Nodes (most connected - your core abstractions)
1. `BrowserAgent` - 17 edges
2. `cli_main()` - 13 edges
3. `main()` - 9 edges
4. `main()` - 6 edges
5. `main()` - 6 edges
6. `main()` - 6 edges
7. `check_all()` - 5 edges
8. `db_query()` - 4 edges
9. `get_latest_draw()` - 4 edges
10. `get_prediction_for_draw()` - 4 edges

## Surprising Connections (you probably didn't know these)
- `main()` --calls--> `BrowserAgent`  [INFERRED]
  test_browser.py → browser_agent.py

## Communities (15 total, 6 thin omitted)

### Community 0 - "Community 0"
Cohesion: 0.13
Nodes (12): api_backup(), api_services(), api_status(), check_all_services(), check_systemd(), get_system_metrics(), health(), Get status of all services (+4 more)

### Community 1 - "Community 1"
Cohesion: 0.19
Nodes (14): fetch_status(), format_daily_summary(), format_down_alert(), format_recovery_alert(), load_state(), main(), Format a DOWN alert message, Format a RECOVERY alert message (+6 more)

### Community 2 - "Community 2"
Cohesion: 0.18
Nodes (15): check_all(), check_port(), check_systemd(), detect_changes(), format_telegram_message(), load_previous_state(), main(), Check if a systemd service is active. (+7 more)

### Community 3 - "Community 3"
Cohesion: 0.26
Nodes (11): db_query(), format_alert(), get_latest_draw(), get_prediction_for_draw(), main(), mark_notified(), Format draw result alert, Mark draw as notified to prevent re-send (+3 more)

### Community 4 - "Community 4"
Cohesion: 0.25
Nodes (9): db_query(), fetch_vip_data(), format_message(), main(), Format VIP message in HTML, Send message to VIP channel, Run a psql query and return stripped output, Fetch all VIP prediction data from DB (+1 more)

### Community 5 - "Community 5"
Cohesion: 0.48
Nodes (6): Colors, fail(), info(), main(), ok(), warn()

### Community 6 - "Community 6"
Cohesion: 0.33
Nodes (3): Navigate the active tab to a URL., Click an element by CSS selector., Send a message and wait for a matching response.

### Community 7 - "Community 7"
Cohesion: 0.4
Nodes (3): cli_main(), Check if browser is alive., Connect to Nami Bridge and register as agent.

### Community 8 - "Community 8"
Cohesion: 0.4
Nodes (3): BrowserAgent, Close the WebSocket connection., High-level browser control via Nami Bridge WebSocket relay.

## Knowledge Gaps
- **39 isolated node(s):** `High-level browser control via Nami Bridge WebSocket relay.`, `Connect to Nami Bridge and register as agent.`, `Send a message and wait for a matching response.`, `Check if browser is alive.`, `Navigate the active tab to a URL.` (+34 more)
  These have ≤1 connection - possible missing edges or undocumented components.
- **6 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 `BrowserAgent` connect `Community 8` to `Community 5`, `Community 6`, `Community 7`, `Community 9`, `Community 10`, `Community 11`, `Community 12`, `Community 13`, `Community 14`?**
  _High betweenness centrality (0.062) - this node is a cross-community bridge._
- **Why does `main()` connect `Community 5` to `Community 8`?**
  _High betweenness centrality (0.030) - this node is a cross-community bridge._
- **Why does `cli_main()` connect `Community 7` to `Community 6`, `Community 8`, `Community 9`, `Community 10`, `Community 11`, `Community 12`, `Community 13`, `Community 14`?**
  _High betweenness centrality (0.017) - this node is a cross-community bridge._
- **What connects `High-level browser control via Nami Bridge WebSocket relay.`, `Connect to Nami Bridge and register as agent.`, `Send a message and wait for a matching response.` to the rest of the system?**
  _39 weakly-connected nodes found - possible documentation gaps or missing edges._
- **Should `Community 0` be split into smaller, more focused modules?**
  _Cohesion score 0.13 - nodes in this community are weakly interconnected._