From cf411cb933b8c28c2dab77c66724b27316b8a8dc Mon Sep 17 00:00:00 2001 From: Vuong Hoang Date: Mon, 15 Jun 2026 20:38:38 -0700 Subject: [PATCH] chore(graphify): refresh GRAPH_REPORT snapshot --- graphify-out/GRAPH_REPORT.md | 235 ++++++++++++++++++----------------- 1 file changed, 120 insertions(+), 115 deletions(-) diff --git a/graphify-out/GRAPH_REPORT.md b/graphify-out/GRAPH_REPORT.md index 11411d2..c23f5f3 100644 --- a/graphify-out/GRAPH_REPORT.md +++ b/graphify-out/GRAPH_REPORT.md @@ -1,15 +1,16 @@ -# Graph Report - . (2026-06-10) +# Graph Report - ratatoskr (2026-06-15) ## Corpus Check -- cluster-only mode — file stats not available +- 61 files · ~157,407 words +- Verdict: corpus is large enough that graph structure adds value. ## Summary -- 1974 nodes · 4551 edges · 132 communities (128 shown, 4 thin omitted) -- Extraction: 66% EXTRACTED · 34% INFERRED · 0% AMBIGUOUS · INFERRED: 1560 edges (avg confidence: 0.51) +- 2045 nodes · 4675 edges · 152 communities (124 shown, 28 thin omitted) +- Extraction: 66% EXTRACTED · 34% INFERRED · 0% AMBIGUOUS · INFERRED: 1582 edges (avg confidence: 0.52) - Token cost: 0 input · 0 output ## Graph Freshness -- Built from commit: `5b9a3f4c` +- Built from commit: `335c8358` - Run `git rev-parse HEAD` and compare to check if the graph is stale. - Run `graphify update .` after code changes (no API cost). @@ -144,6 +145,26 @@ - [[_COMMUNITY_No Worldtree Imports Test|No Worldtree Imports Test]] - [[_COMMUNITY_Ratatoskr Worldtree API TUI|Ratatoskr Worldtree API TUI]] - [[_COMMUNITY_Ratatoskr Web Browser Debug Companion|Ratatoskr Web Browser Debug Companion]] +- [[_COMMUNITY_Community 132|Community 132]] +- [[_COMMUNITY_Community 133|Community 133]] +- [[_COMMUNITY_Community 134|Community 134]] +- [[_COMMUNITY_Community 135|Community 135]] +- [[_COMMUNITY_Community 136|Community 136]] +- [[_COMMUNITY_Community 137|Community 137]] +- [[_COMMUNITY_Community 138|Community 138]] +- [[_COMMUNITY_Community 139|Community 139]] +- [[_COMMUNITY_Community 140|Community 140]] +- [[_COMMUNITY_Community 141|Community 141]] +- [[_COMMUNITY_Community 142|Community 142]] +- [[_COMMUNITY_Community 143|Community 143]] +- [[_COMMUNITY_Community 144|Community 144]] +- [[_COMMUNITY_Community 145|Community 145]] +- [[_COMMUNITY_Community 146|Community 146]] +- [[_COMMUNITY_Community 147|Community 147]] +- [[_COMMUNITY_Community 148|Community 148]] +- [[_COMMUNITY_Community 149|Community 149]] +- [[_COMMUNITY_Community 150|Community 150]] +- [[_COMMUNITY_Community 151|Community 151]] ## God Nodes (most connected - your core abstractions) 1. `TuiPresenterState` - 84 edges @@ -158,89 +179,89 @@ 10. `ToolStart` - 67 edges ## Surprising Connections (you probably didn't know these) -- `_GatedStream` --uses--> `UsageError` [INFERRED] - tests/test_cli.py → src/ratatoskr/cli.py -- `CaptureFixture` --uses--> `UsageError` [INFERRED] - tests/test_cli.py → src/ratatoskr/cli.py -- `Event` --uses--> `UsageError` [INFERRED] - tests/test_cli.py → src/ratatoskr/cli.py -- `MonkeyPatch` --uses--> `UsageError` [INFERRED] - tests/test_cli.py → src/ratatoskr/cli.py -- `TestAmain` --uses--> `UsageError` [INFERRED] - tests/test_cli.py → src/ratatoskr/cli.py +- `test_build_app_from_env_builds_app_with_routes()` --calls--> `build_app_from_env()` [INFERRED] + tests/test_provider_serve.py → src/ratatoskr/provider/serve.py +- `test_build_app_from_env_requires_heimdall_key()` --calls--> `build_app_from_env()` [INFERRED] + tests/test_provider_serve.py → src/ratatoskr/provider/serve.py +- `test_get_absent_returns_none()` --calls--> `open_affect_store()` [INFERRED] + tests/test_provider_affect.py → src/ratatoskr/provider/affect_store.py +- `test_open_advertises_capability_and_schema()` --calls--> `open_affect_store()` [INFERRED] + tests/test_provider_affect.py → src/ratatoskr/provider/affect_store.py +- `test_reopen_existing_file_is_idempotent()` --calls--> `open_affect_store()` [INFERRED] + tests/test_provider_affect.py → src/ratatoskr/provider/affect_store.py ## Import Cycles - None detected. -## Communities (132 total, 4 thin omitted) +## Communities (152 total, 28 thin omitted) ### Community 0 - "TuiPresenterState Management" Cohesion: 0.05 -Nodes (39): Per-turn presenter state for TUI mode (issue #12). See `docs/contracts/issu, TuiPresenterState, _make_tui_done(), _mounted_renderables(), current_invokes_callback_with_snapshot: AffectUpdate(current, snapshot), scheduled_does_not_invoke_callback: status=scheduled has no snapshot, so, callback_exception_swallowed: a raising callback does NOT crash the pres, Tests for the new TuiPresenterState — per issue #12 contract. (+31 more) +Nodes (40): Per-turn presenter state for TUI mode (issue #12). See `docs/contracts/issu, TuiPresenterState, _make_tui_done(), _mounted_renderables(), current_invokes_callback_with_snapshot: AffectUpdate(current, snapshot), scheduled_does_not_invoke_callback: status=scheduled has no snapshot, so, callback_exception_swallowed: a raising callback does NOT crash the pres, done_label_styled_success [v0.9.0]: [done] label mounts as Static carryi (+32 more) ### Community 1 - "EventSource SSE Consumer" -Cohesion: 0.06 -Nodes (49): EventSource, AffectUpdate, AwaitingLlmFirstToken, cancel_turn(), CancelResult, InvalidLastEventId, _iter_events(), SSE consumer for the Worldtree Conversation API. Implements docs/contracts/issu (+41 more) +Cohesion: 0.08 +Nodes (14): Sync entry point — delegates to the async resolve-then-run flow. Per issue, run_tui(), happy_new_session_resolve [happy]: --new path through _resolve_then_run., happy_new_with_end_user_id_resolve [happy]: args.end_user_id threads into POST b, user_agent_header_sent [trace]: outbound requests carry the ratatoskr User-Agent, alt_screen_never_opens_on_resolve_error [trace]: 404 → run_tui=12; run_async unh, session_api_failed_on_resolve [error]: --new + 500 → [session_api_failed] stderr, network_error_on_resolve [error]: --new + ConnectError → [network_error] stderr. (+6 more) ### Community 2 - "Parsed CLI Arguments Handling" Cohesion: 0.14 -Nodes (53): ParsedArgs, Raised on argument violations; mapped to exit code 10 by main()., Resolved CLI invocation. Post-validation: exactly one of session_id / new is set, UsageError, AgentInfo, Worldtree agent envelope from GET /agents (issue #8). INV-005: required fie, Cancelled, Done (+45 more) +Nodes (73): NamedTuple, ParsedArgs, Resolved CLI invocation. Post-validation: exactly one of session_id / new is set, AgentInfo, Worldtree agent envelope from GET /agents (issue #8). INV-005: required fie, AffectUpdate, AwaitingLlmFirstToken, Cancelled (+65 more) ### Community 3 - "Agent Information Management" -Cohesion: 0.19 -Nodes (55): AgentInfo, ComposeResult, Exception, FileResponse, JSONResponse, _ArgparseError, _AuthError, Raised when no API key is resolvable; mapped to exit code 11 by main(). (+47 more) +Cohesion: 0.08 +Nodes (86): AgentInfo, ComposeResult, EventSource, Exception, FileResponse, _ArgparseError, _AuthError, Raised when no API key is resolvable; mapped to exit code 11 by main(). (+78 more) ### Community 4 - "TUI Tests and Contract Verification" -Cohesion: 0.08 -Nodes (36): _args_existing(), _noop_worker(), MonkeyPatch, Tests for ratatoskr.tui per docs/contracts/issues/4.contract.md., Fake _stream_turn_worker that never completes (lets state stay 'streaming')., happy_submit_echoes_and_spawns [happy,tracer]: …, empty_submit_no_op [trace]: '' + Enter → no change; no worker spawned., submit_during_streaming_shows_busy_notice [adversarial]: … (+28 more) +Cohesion: 0.13 +Nodes (17): _args_existing(), Type content into the input and submit; wait for worker to finish., happy_text_done_no_double_print [happy,tracer, v0.9.0]: Text("hello") mo, raw_flag_skips_markdown_render [trace, v0.9.0]: With --raw, the response, error_terminal_returns_to_idle [happy]: …, cancelled_terminal_returns_to_idle [happy]: …, active_turn_id_set_on_first_event [trace]: …, connection_dropped_returns_to_idle [error]: … (+9 more) ### Community 5 - "CLI Arguments Parsing Contract" -Cohesion: 0.06 -Nodes (26): _parse_args(), argparse + env-fallback + xor-validation per the contract., happy_existing_session: --send --session --api-key → ParsedArgs with session_id., api_key_from_env: WORLDTREE_API_KEY env var fills in when --api-key omitted., api_key_flag_beats_env: explicit --api-key wins over WORLDTREE_API_KEY., server_default: no --server, no WORLDTREE_API_URL → http://localhost:8000., server_env_fallback: WORLDTREE_API_URL fills in when --server omitted., server_flag_beats_env: explicit --server wins over WORLDTREE_API_URL. (+18 more) +Cohesion: 0.04 +Nodes (26): main(), _parse_args(), argparse + env-fallback + xor-validation per the contract., Sync entry point. Maps UsageError/_AuthError to exit codes BEFORE the event loop, happy_existing_session: --send --session --api-key → ParsedArgs with session_id., api_key_from_env: WORLDTREE_API_KEY env var fills in when --api-key omitted., server_default: no --server, no WORLDTREE_API_URL → http://localhost:8000., server_env_fallback: WORLDTREE_API_URL fills in when --server omitted. (+18 more) ### Community 6 - "Sync Entry Point and Session Resolution" -Cohesion: 0.07 -Nodes (28): Sync entry point — delegates to the async resolve-then-run flow. Per issue, run_tui(), _args_new_no_agent(), CaptureFixture, Tests at the `_resolve_then_run` layer — pre-`App.run()` session resolution, happy_new_session_resolve [happy]: --new path through _resolve_then_run., happy_new_with_end_user_id_resolve [happy]: args.end_user_id threads into POST b, user_agent_header_sent [trace]: outbound requests carry the ratatoskr User-Agent (+20 more) +Cohesion: 0.17 +Nodes (7): POST a message and yield typed Events. See contract FN stream_turn., stream_turn(), session_not_found: 404 -> SseConnectFailed(status=404)., malformed_id_no_seq: id `42` (missing :seq) -> MalformedSseId; no event yielded., malformed_id_alpha: id `foo:bar` -> MalformedSseId., INV-001: empty stream (no events at all) -> SseConnectionDropped(None)., ERROR_ROUTING: SseConnectFailed.body is truncated to <= 1024 bytes. ### Community 7 - "Stream Turn Rendering and Cancellation" -Cohesion: 0.10 -Nodes (25): Drive stream_turn, render events, race against sigint_event for mid-stream cance, _run_turn(), _GatedStream, Event, no_busy_loop_after_cancel [trace]: only one sigint_event.wait()-task created., cancel_failed_drains_anyway [scenario]: …, render_called_once_per_event [trace]: spy on render; call_count == event count., sigint_handler_installed_and_removed [trace]: signal handler add/remove paired. (+17 more) +Cohesion: 0.05 +Nodes (53): _amain(), Drive stream_turn, render events, race against sigint_event for mid-stream cance, Async orchestrator: create-session (if --new) → SIGINT install → _run_turn → cle, Raised on argument violations; mapped to exit code 10 by main()., _run_turn(), UsageError, SSE event `text_boundary`: speakable breakpoint after a `text` event., TextBoundary (+45 more) ### Community 8 - "Worldtree Session Client" -Cohesion: 0.06 -Nodes (26): InvalidCursor, list_sessions(), Worldtree Conversation API session-lifecycle client. Implements docs/contracts/, GET /sessions. See contract FN list_sessions., Worldtree session envelope; shared shape for create + list responses. INV-0, One page of GET /sessions results. `next_cursor=None` on the last page., Raised on HTTP 422 cursor_invalid from GET /sessions., SessionInfo (+18 more) +Cohesion: 0.04 +Nodes (47): AgentNotAvailable, AuthScopeDenied, get_persona_state(), InvalidCursor, list_sessions(), PersonaNotConfigured, Worldtree Conversation API session-lifecycle client. Implements docs/contracts/, Raised on HTTP 404 `agent_not_available` from GET persona_state. The agent_ (+39 more) ### Community 9 - "Tier 3 Agent Lifecycle Client" -Cohesion: 0.07 -Nodes (32): _build_parser(), define_agent(), _extract_error_code(), _extract_error_field(), main(), _parse_tier3_agent_info(), patch_agent(), Worldtree Tier 3 (consumer-defined) agent lifecycle client. Implements docs/con (+24 more) +Cohesion: 0.08 +Nodes (19): _args_new(), Construct RatatoskrApp with pre-resolved state (issue #6 lifecycle). Produc, happy_new_session_mount [happy,tracer]: identity populated from pre-resolved sta, footer_identity_visible_first_frame [trace]: identity widget rendered first fram, main_row_is_horizontal [tracer]: compose() yields Horizontal#main-row., left_column_content_only [v0.9.0]: left column = transcript-scroll Verti, right_column_has_tabbed_content_with_tools_tab: #side-panes + TabPane#tools-tab., tools_log_inside_tools_tab: tools-transcript RichLog is a descendant of tools-ta (+11 more) ### Community 10 - "CLI Presenter State Management" -Cohesion: 0.09 -Nodes (23): CliPresenterState, Per-turn presenter state for `--send` mode (issue #12). See `docs/contracts, SSE event `text_boundary`: speakable breakpoint after a `text` event., TextBoundary, _make_done(), Tests for the new CliPresenterState — per issue #12 contract., thinking_coalesce_single_run [happy,tracer]: Thinking("hello") + Thinkin, thinking_closes_on_first_non_thinking_event [happy]: Thinking → WorkerPh (+15 more) +Cohesion: 0.11 +Nodes (36): Any, Connection, build_affect_provider_app(), _ctx_actor(), open_affect_store(), RatatoskrAffectStore, SQLite-backed, conduit-opaque affect store (Bifrost affect plane, v1). Contract, Read-back of the stored snapshot (tests / future rehydrate-seed). (+28 more) ### Community 11 - "Ratatoskr Application Argument Handling" -Cohesion: 0.09 -Nodes (23): _args_new(), Construct RatatoskrApp with pre-resolved state (issue #6 lifecycle). Produc, happy_new_session_mount [happy,tracer]: identity populated from pre-resolved sta, happy_existing_session_mount: identity shows when agent_id is None., footer_identity_visible_first_frame [trace]: identity widget rendered first fram, INV-013 + INV-014 + INV-017: Horizontal two-column layout with Tools tab., main_row_is_horizontal [tracer]: compose() yields Horizontal#main-row., left_column_content_only [v0.9.0]: left column = transcript-scroll Verti (+15 more) +Cohesion: 0.07 +Nodes (26): CliPresenterState, _format_duration_ms(), Auto-scale duration formatting per issue #12 INV-006. Locale-blind., Per-turn presenter state for `--send` mode (issue #12). See `docs/contracts, Render one Worldtree SSE event with editorial hierarchy + coalescing., _make_done(), Tests for the new CliPresenterState — per issue #12 contract., thinking_coalesce_single_run [happy,tracer]: Thinking("hello") + Thinkin (+18 more) ### Community 12 - "Stream Turn Event Processing" -Cohesion: 0.07 -Nodes (21): POST a message and yield typed Events. See contract FN stream_turn., stream_turn(), heartbeat_sequence_monotonic [scenario]: three consecutive heartbeats in, happy_one_text_done: text then done; same turn_id; iter ends after done., full_event_vocab: one of each variant; all carry parsed sse_id., error_terminal: text then error; iteration ends; error_code populated., cancelled_terminal: cancelled with phase=cancelled, turn_id; iteration ends., session_not_found: 404 -> SseConnectFailed(status=404). (+13 more) +Cohesion: 0.14 +Nodes (8): happy_one_text_done: text then done; same turn_id; iter ends after done., error_terminal: text then error; iteration ends; error_code populated., connection_drop: RemoteProtocolError after one text -> SseConnectionDropped((42,, no_text_aggregation: consumer yields each text event separately; no concat., Compose one SSE event in wire format. Trailing blank line per spec., current_status_parsed_with_snapshot [tracer]: status=current carries the, scheduled_status_parsed_no_snapshot [trace]: status=scheduled carries no, _sse_chunk() ### Community 13 - "Local Tier 3 Agent Index Management" -Cohesion: 0.14 -Nodes (22): LocalAgentEntry, add_local_agent(), load_local_agents(), LocalAgentEntry, Local index of tier-3 agents defined via `python -m ratatoskr.tier3`. Workaroun, Add (or replace) an agent in the local index. agent_id is the key., Update an existing entry. Identical semantics to ``add_local_agent`` (agent_, Remove an entry by agent_id. No-op if absent (idempotent). (+14 more) +Cohesion: 0.07 +Nodes (43): LocalAgentEntry, Namespace, add_local_agent(), load_local_agents(), _local_agents_path(), LocalAgentEntry, make_description(), Local index of tier-3 agents defined via `python -m ratatoskr.tier3`. Workaroun (+35 more) ### Community 14 - "Ratatoskr Application Core" -Cohesion: 0.09 -Nodes (19): RatatoskrApp, Populate identity widget from pre-resolved state; set idle hint. Per is, Hydrate persona-header + Persona pane via GET /agents/{id}/persona_state., Update sticky header + Persona pane from a fresh snapshot. Called on bo, Render an italic-dim placeholder in the Persona pane; keep header empty., v0.6.0: turn-ID headers across every pane for cross-pane correlation. v0, Set the hint state attribute AND update the visible Static widget., Write a timestamped audit line to the debug pane. v0.10.0: shared sink (+11 more) +Cohesion: 0.07 +Nodes (19): _cancel_via_sse(), Populate identity widget from pre-resolved state; set idle hint. Per is, Hydrate persona-header + Persona pane via GET /agents/{id}/persona_state., Render an italic-dim placeholder in the Persona pane; keep header empty., v0.6.0: turn-ID headers across every pane for cross-pane correlation. v0, Set the hint state attribute AND update the visible Static widget., Write a timestamped audit line to the debug pane. v0.10.0: shared sink, Set self.state with debug-pane audit log. Every state machine transitio (+11 more) ### Community 15 - "Async Main Orchestrator" -Cohesion: 0.08 -Nodes (21): _amain(), Async orchestrator: create-session (if --new) → SIGINT install → _run_turn → cle, _clear_env(), CaptureFixture, MonkeyPatch, user_agent_header_sent [trace]: outbound requests carry the ratatoskr User-Agent, happy_new_session_then_stream [happy,tracer]: …, happy_existing_session: --session, no create POST; just SSE stream → exit 0. (+13 more) +Cohesion: 0.17 +Nodes (7): happy_submit_echoes_and_spawns [happy,tracer]: …, empty_submit_no_op [trace]: '' + Enter → no change; no worker spawned., submit_during_streaming_shows_busy_notice [adversarial]: …, submit_during_cancelling_shows_busy_notice [adversarial]: …, sse_connect_failed_returns_to_idle [error]: …, Patch RichLog.write AND VerticalScroll.mount to record every renderable or m, _spy_writes() ### Community 16 - "Contract Parsing and Function Extraction" -Cohesion: 0.11 -Nodes (31): Contract, ErrorSpec, _extract_function_blocks(), FunctionBlock, main(), _parse_body_sections(), parse_contract(), _parse_frontmatter() (+23 more) +Cohesion: 0.10 +Nodes (34): Contract, ErrorSpec, _extract_function_blocks(), FunctionBlock, _is_issue_scoped(), main(), _parse_body_sections(), parse_contract() (+26 more) ### Community 17 - "Behavioral Guidelines Documentation" Cohesion: 0.06 @@ -251,8 +272,8 @@ Cohesion: 0.07 Nodes (16): _parse_sse_id(), Parse the SSE wire `id:` as composite `{turn_id}:{seq}`. See contract FN _parse_, negative_seq [adversarial]: '42:-1' -> ValueError., trailing_whitespace [adversarial]: '42:3 ' -> ValueError (strict; no strip)., truncation [security]: 5000-char no-colon -> ValueError msg contains only raw[:6, PRE-001 hard: raw is a string -- isinstance check before parse., happy_simple [happy,tracer]: '42:3' -> SseId(turn_id=42, seq=3)., happy_seq_one: smallest valid id per spec — first event of first turn. (+8 more) ### Community 19 - "Tier 3 Error Handling" -Cohesion: 0.11 -Nodes (19): Raised on HTTP 429 ``agent_quota_exceeded`` — 50-agent cap reached on the He, Raised on HTTP 403 ``tier3_user_id_unsupported`` — auth's user_id is not slu, Raised on HTTP 422 ``layer_deferred`` — define request carried a non-null la, Raised on HTTP 404 — PATCH or DELETE on a non-existent agent_id (spec §2634, Tier3AgentNotFound, Tier3LayerDeferred, Tier3QuotaExceeded, Tier3UserIdUnsupported (+11 more) +Cohesion: 0.25 +Nodes (5): _args_new_no_agent(), ParsedArgs for bare --new (no --agent) — TUI-mode picker entry., picker_happy_path [happy,tracer]: agents fetched → picker exits with id → create, picker_esc_clean_exit: picker returns None → exit 0; no create_session; no main, list_agents 500 → stderr [session_api_failed]; exit 20; picker NOT opened. ### Community 20 - "Web Packaging and CLI Argument Tests" Cohesion: 0.07 @@ -262,45 +283,33 @@ Nodes (23): ArgumentParser, Packaging + lazy-import discipline tests for ratatos Cohesion: 0.07 Nodes (26): Admin inspection endpoints, Appendix: `agent.ui_hints` config block, Authentication, Base URL, Client Implementation Guide, Custom exception handler status-code mapping, Endpoints, Error Codes (+18 more) -### Community 22 - "CLI Command Rendering and Usage" -Cohesion: 0.12 -Nodes (13): _format_duration_ms(), _format_usage(), main(), Ratatoskr CLI — non-interactive `--send` stdout presenter. Implements docs/cont, Auto-scale duration formatting per issue #12 INV-006. Locale-blind., Natural-language usage formatting per issue #12 INV-007. `arrow="->"` for C, Render one Worldtree SSE event with editorial hierarchy + coalescing., Sync entry point. Maps UsageError/_AuthError to exit codes BEFORE the event loop (+5 more) - ### Community 23 - "TUI Shell Implementation" -Cohesion: 0.09 -Nodes (18): _audit_line(), _format_persona_detail(), _format_persona_header(), _plain_label(), Ratatoskr Textual TUI shell — interactive primary presenter. Implements docs/co, Pre-flight session resolution then App.run_async() inside one event loop. E, Pre-amendment labeled-line shape for INV-009 render-exception fallback. Use, HH:MM:SS.fff wall-clock timestamp for debug-pane log lines. (+10 more) +Cohesion: 0.15 +Nodes (12): _format_usage(), Natural-language usage formatting per issue #12 INV-007. `arrow="->"` for C, _audit_line(), _plain_label(), Ratatoskr Textual TUI shell — interactive primary presenter. Implements docs/co, Pre-flight session resolution then App.run_async() inside one event loop. E, Pre-amendment labeled-line shape for INV-009 render-exception fallback. Use, HH:MM:SS.fff wall-clock timestamp for debug-pane log lines. (+4 more) ### Community 24 - "Contract Amendments for Presenter States" Cohesion: 0.09 Nodes (22): Acceptance, `_amain` STEPS amended, Architecture, `CLASS CliPresenterState` (NEW), `CLASS TuiPresenterState` (NEW), Constraints, Context, Data flow (+14 more) ### Community 25 - "Session Creation API" -Cohesion: 0.12 -Nodes (13): create_session(), POST /sessions to create a new session. See contract FN create_session. Per, validation_failed: 422 -> SessionApiFailed(status=422); body truncated., unexpected_status_truncates: 500 + 5000-byte body -> SessionApiFailed; body == 1, empty_agent_id [adversarial]: '' -> AssertionError; no HTTP issued., happy_create_with_end_user_id [happy]: body carries both keys (issue #5)., default_omits_end_user_id [trace]: omit kwarg → body has no end_user_id (INV-002, empty_end_user_id [adversarial]: '' → AssertionError before HTTP (PRE-003). (+5 more) +Cohesion: 0.05 +Nodes (22): create_session(), list_agents(), POST /sessions to create a new session. See contract FN create_session. Per, GET /agents — list available agents. See contract FN list_agents (issue #8)., AsyncClient, validation_failed: 422 -> SessionApiFailed(status=422); body truncated., unexpected_status_truncates: 500 + 5000-byte body -> SessionApiFailed; body == 1, empty_agent_id [adversarial]: '' -> AssertionError; no HTTP issued. (+14 more) ### Community 26 - "Web Server Endpoint Handling" -Cohesion: 0.10 -Nodes (21): _agents_endpoint(), _as_dict(), _create_session_endpoint(), _format_sse(), _persona_state_endpoint(), Starlette app factory + endpoint handlers for ratatoskr.web. Per docs/contracts, POST /api/sessions → upstream POST /sessions. Per FN create_session_endpoint., POST /api/turns/{session_id} → allocate turn_id + register handle. Per FN s (+13 more) +Cohesion: 0.09 +Nodes (33): JSONResponse, Request, v0.16.0 — cancel paths must target the UPSTREAM turn_id, not the browser-loc, A registered handle whose local turn_id (1) differs from its captured up, A handle with upstream_turn_id still None (turn never opened the upstrea, stream_turn_endpoint INV-005 — browser disconnect mid-stream triggers upstre, TestDisconnectCancel, TestUpstreamTurnIdCancel (+25 more) ### Community 27 - "SSE ID Parsing" -Cohesion: 0.20 -Nodes (20): NamedTuple, Parsed composite SSE wire `id:` per spec §SSE id format., SseId, _check(), _load_fixture(), Drift-detection between TUI presentation discipline and web JS presenter per iss, Assert (event_type, data) for `event` matches the fixture entry., test_affect_update_matches_fixture() (+12 more) - -### Community 28 - "Persona State Retrieval" -Cohesion: 0.13 -Nodes (13): get_persona_state(), GET /agents/{agent_id}/persona_state — fetch current persona snapshot. Worl, Any, Worldtree #204 / v0.28.0 — GET /agents/{agent_id}/persona_state. Bootstrap, happy_full_snapshot [happy,tracer]: 200 → snapshot dict with pad + domin, persona_not_configured_404 [error]: 404 with error_code persona_not_conf, agent_not_available_404 [error]: 404 with error_code agent_not_available, auth_scope_denied_403 [error]: 403 with error_code auth_scope_denied → A (+5 more) +Cohesion: 0.19 +Nodes (17): _check(), _load_fixture(), Drift-detection between TUI presentation discipline and web JS presenter per iss, Assert (event_type, data) for `event` matches the fixture entry., test_affect_update_matches_fixture(), test_awaiting_llm_first_token_matches_fixture(), test_cancelled_matches_fixture(), test_done_matches_fixture() (+9 more) ### Community 29 - "Agent Deletion and Authentication" -Cohesion: 0.15 -Nodes (16): Namespace, delete_agent(), DELETE /agents/ — owner hard-delete (cancels active sessions server-side, No API key resolvable → exit 11., Resolve API key + server URL with the same env-var fallback as cli.py., _resolve_auth(), _run_define(), _run_delete() (+8 more) - -### Community 30 - "Agent Listing Client" -Cohesion: 0.15 -Nodes (11): list_agents(), GET /agents — list available agents. See contract FN list_agents (issue #8)., AsyncClient, happy_full_shape [happy,tracer]: spec full-shape mimir example → all fields., happy_minimum_shape: required-only agent → optional fields default., happy_multi_agent: 3 agents preserve order., happy_empty: 200 with [] returns empty list (no error)., omit_capabilities_empty: explicit [] from server still defaults to []. (+3 more) +Cohesion: 0.50 +Nodes (3): lifespan_shutdown FN — INV-006: drain turn_registry within 5s budget., happy [tracer]: 2 in-flight turns + shutdown → upstream cancels called., TestLifespanShutdown ### Community 31 - "Browser SSE Stream Parsing" -Cohesion: 0.17 -Nodes (12): _parse_browser_sse(), Response, Parse a server-to-browser SSE stream into [{"event": str, "data": dict}, ...]., happy [tracer]: respx mock one text+done → SSE stream yields text + done events., The stream generator captures upstream turn_id from the first event's ss, stream_turn_endpoint full_event_vocab — one of each Event type proxied., full_event_vocab [scenario]: a stream with the non-terminal Event types, error terminal [scenario]: an SSE `error` event (distinct from the synth (+4 more) +Cohesion: 0.14 +Nodes (16): _parse_browser_sse(), AsyncByteStream, Response, Tests for ratatoskr.web.server per docs/contracts/issues/16.contract.md. The Te, SSE response backed by a live AsyncByteStream (for gated/hanging streams in, Parse a server-to-browser SSE stream into [{"event": str, "data": dict}, ...]., happy [tracer]: respx mock one text+done → SSE stream yields text + done events., The stream generator captures upstream turn_id from the first event's ss (+8 more) ### Community 32 - "Canonical Sync Documentation" Cohesion: 0.12 @@ -323,16 +332,16 @@ Cohesion: 0.12 Nodes (16): arousal, dominance, pleasure, snapshot, arousal_delta, valence_delta, arousal, dominance (+8 more) ### Community 37 - "Web Server Functional Tests" -Cohesion: 0.13 -Nodes (12): AsyncByteStream, Tests for ratatoskr.web.server per docs/contracts/issues/16.contract.md. The Te, SSE response backed by a live AsyncByteStream (for gated/hanging streams in, root_endpoint FN + /static mount — index.html + static asset serving., happy [tracer]: GET / → 200, content-type text/html, body contains ' ()`. Per worl, _resolve_user_agent(), version_endpoint FN — tracer per contract issue #16., happy [tracer]: GET /version → 200, body == {"ratatoskr": ""}., TestVersionEndpoint +Cohesion: 0.50 +Nodes (3): version_endpoint FN — tracer per contract issue #16., happy [tracer]: GET /version → 200, body == {"ratatoskr": ""}., TestVersionEndpoint ### Community 85 - "Architecture Overview" Cohesion: 0.29 @@ -590,10 +587,6 @@ Nodes (4): SSE frame with id but empty data (server-emitted keepalive shape)., e Cohesion: 0.33 Nodes (4): stream_turn_endpoint FN — open upstream SSE, proxy events to browser., unknown_turn [error]: GET with turn_id not in registry → 404., upstream_error [error]: respx 500 → synthetic error SSE event., TestStreamTurnEndpoint -### Community 105 - "Upstream Turn ID Cancellation" -Cohesion: 0.33 -Nodes (4): v0.16.0 — cancel paths must target the UPSTREAM turn_id, not the browser-loc, A registered handle whose local turn_id (1) differs from its captured up, A handle with upstream_turn_id still None (turn never opened the upstrea, TestUpstreamTurnIdCancel - ### Community 106 - "Triadic Block Routing" Cohesion: 0.40 Nodes (5): 2.1.A — `ERROR_ROUTING:` triadic block (SHIELDA), Example, Syntax, v2.0 back-compat, Why three axes @@ -608,11 +601,11 @@ Nodes (5): Authorization model — agent invocation, Common pitfalls, Quick deci ### Community 109 - "SSE Content Data" Cohesion: 0.40 -Nodes (6): content, sse_id, text, data, event_type, data +Nodes (6): content, sse_id, data, thinking, data, event_type ### Community 110 - "Cancelled Message Handling" -Cohesion: 0.40 -Nodes (5): cancelled, data, event_type, partial_message_id, reason +Cohesion: 0.22 +Nodes (8): Concurrency, Constraints, Context, Data flow, Division of labor (library vs store), Integration points, Invariants, Out of scope (deferred — do NOT flag as drift) ### Community 111 - "Implicit Tool Call Narration" Cohesion: 0.50 @@ -678,20 +671,32 @@ Nodes (3): Amendment — SSE phase events (issue #151, INV-053..INV-061), Integr Cohesion: 0.67 Nodes (3): Amendment — Tier 3 consumer-defined agents (issue #181, Phase 2.0), Invariants (Phase 2.0 scope), Persona-state observability (issue #204) +### Community 133 - "Community 133" +Cohesion: 0.14 +Nodes (9): _format_persona_detail(), _format_persona_header(), Update sticky header + Persona pane from a fresh snapshot. Called on bo, One-line persona summary for the sticky header widget. Shape: `agent_id · d, Multi-line persona detail for the Persona TabPane. Renders the full v0.28.0, header_compact_summary: agent_id · dominant_emotion · pad(P,A,D) · N emotions., header_singular_emotion: single emotion → '1 emotion active' (no 's')., header_no_emotions_drops_count: empty emotions list → no count suffix. (+1 more) + +### Community 135 - "Community 135" +Cohesion: 0.28 +Nodes (7): build_app_from_env(), main(), Runnable entrypoint: serve the affect provider as an ASGI app. For the live neg, Build the affect ASGI app from environment config (testable seam)., Tests for the affect-provider serve entrypoint (ratatoskr.provider.serve). Only, test_build_app_from_env_builds_app_with_routes(), test_build_app_from_env_requires_heimdall_key() + +### Community 143 - "Community 143" +Cohesion: 0.04 +Nodes (66): Raised on unexpected response status from /sessions endpoints. `body` is tr, SessionApiFailed, define_agent(), delete_agent(), _extract_error_code(), _extract_error_field(), _parse_tier3_agent_info(), patch_agent() (+58 more) + ## Knowledge Gaps -- **522 isolated node(s):** `allow`, `Any`, `Path`, `Any`, `Any` (+517 more) +- **538 isolated node(s):** `Context`, `Data flow`, `Invariants`, `Out of scope`, `Constraints` (+533 more) These have ≤1 connection - possible missing edges or undocumented components. -- **4 thin communities (<3 nodes) omitted from report** — run `graphify query` to explore isolated nodes. +- **28 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 `LocalAgentEntry` connect `Local Tier 3 Agent Index Management` to `TuiPresenterState Management`, `Parsed CLI Arguments Handling`, `TUI Tests and Contract Verification`, `Sync Entry Point and Session Resolution`, `Tier 3 Agent Lifecycle Client`, `Ratatoskr Application Argument Handling`, `Tier 3 Error Handling`, `Agent Deletion and Authentication`, `Browser SSE Stream Parsing`, `Web Server Functional Tests`, `Tier 3 Agent Patching Tests`, `Mock Client Factory for Persona State`, `Turn Cancellation Endpoint`, `Monkey Patching for Local Agents`, `Local Agents Path Resolution`, `Description Synthesis for Picker`, `Session Creation Endpoint Tests`, `Turn Submission Endpoint Tests`, `Server-Side End User ID Handling`, `Application Creation and Routing`, `User Agent Versioning`, `Stream Turn Endpoint Tests`, `Upstream Turn ID Cancellation`?** - _High betweenness centrality (0.055) - this node is a cross-community bridge._ -- **Why does `SessionApiFailed` connect `Agent Information Management` to `TuiPresenterState Management`, `Parsed CLI Arguments Handling`, `Tier 3 Agent Patching Tests`, `Worldtree Session Client`, `Tier 3 Agent Lifecycle Client`, `CLI Presenter State Management`, `Ratatoskr Application Core`, `Tier 3 Error Handling`, `Session Creation API`, `Persona State Retrieval`, `Agent Deletion and Authentication`, `Agent Listing Client`?** - _High betweenness centrality (0.054) - this node is a cross-community bridge._ -- **Why does `create_app()` connect `Turn Cancellation Endpoint` to `Agent Information Management`, `Web Server Functional Tests`, `Stream Turn Endpoint Tests`, `Upstream Turn ID Cancellation`, `Session Creation Endpoint Tests`, `Turn Submission Endpoint Tests`, `Server-Side End User ID Handling`, `Application Creation and Routing`, `User Agent Versioning`, `Mock Client Factory for Persona State`, `Web Packaging and CLI Argument Tests`, `Web Server Endpoint Handling`, `Monkey Patching for Local Agents`, `Browser SSE Stream Parsing`?** - _High betweenness centrality (0.039) - this node is a cross-community bridge._ +- **Why does `LocalAgentEntry` connect `Local Tier 3 Agent Index Management` to `TuiPresenterState Management`, `Parsed CLI Arguments Handling`, `Web Server Functional Tests`, `Stream Turn Endpoint Tests`, `Community 143`, `Session Creation Endpoint Tests`, `Server-Side End User ID Handling`, `Application Creation and Routing`, `Turn Submission Endpoint Tests`, `User Agent Versioning`, `Mock Client Factory for Persona State`, `Turn Cancellation Endpoint`, `Web Server Endpoint Handling`, `Monkey Patching for Local Agents`, `Agent Deletion and Authentication`, `Browser SSE Stream Parsing`?** + _High betweenness centrality (0.081) - this node is a cross-community bridge._ +- **Why does `SessionApiFailed` connect `Community 143` to `TuiPresenterState Management`, `Parsed CLI Arguments Handling`, `Agent Information Management`, `Stream Turn Rendering and Cancellation`, `Worldtree Session Client`, `Ratatoskr Application Argument Handling`, `Local Tier 3 Agent Index Management`, `Session Creation API`, `Web Server Endpoint Handling`?** + _High betweenness centrality (0.044) - this node is a cross-community bridge._ +- **Why does `create_app()` connect `Turn Cancellation Endpoint` to `Agent Information Management`, `Web Server Functional Tests`, `Stream Turn Endpoint Tests`, `Session Creation Endpoint Tests`, `Turn Submission Endpoint Tests`, `Server-Side End User ID Handling`, `Application Creation and Routing`, `User Agent Versioning`, `Mock Client Factory for Persona State`, `Web Packaging and CLI Argument Tests`, `Web Server Endpoint Handling`, `Monkey Patching for Local Agents`, `Agent Deletion and Authentication`, `Browser SSE Stream Parsing`?** + _High betweenness centrality (0.044) - this node is a cross-community bridge._ - **Are the 51 inferred relationships involving `TuiPresenterState` (e.g. with `ParsedArgs` and `AgentInfo`) actually correct?** _`TuiPresenterState` has 51 INFERRED edges - model-reasoned connections that need verification._ - **Are the 75 inferred relationships involving `Done` (e.g. with `AgentInfo` and `ComposeResult`) actually correct?**