# proxy/flow | 2294 func | 12 pipelines | 16 hub-types | 2026-03-25

PIPELINES[12] (Core:11, IO:1):
  Src [Core]: ? → T
              → start() → None                          CC=2    mutation ▶
              → _event_loop() → None                    CC=6    pure
              → _handle_job_event(event:JobCompleted | JobFailed) → None CC=5    pure
              → _handle_failed_job(mgr:Any, ticket:Ticket, event:JobFailed) → None CC=4    pure
              → _review_job(ticket:Ticket, event:JobCompleted | JobFailed) → dict[str, Any] CC=3    IO
              → _review_model() → str                   CC=4    pure
              → get_settings() → Settings               CC=1    mutation
              → get_singleton(instance_var:T | None, instance_class:Type[T]) → T CC=2    pure ■
              PURITY: 5/8 pure  BOTTLENECK: _event_loop(CC=6)

  Src [Core]: Request → T
              → receive_delta(request:Request)          CC=9    pure ▶
              → update_project(project_id:str, req:UpdateProjectReq) → dict[str, Any] CC=2    pure
              → _cmd_bus()                              CC=1    pure
              → get_command_bus() → CommandBus          CC=2    mutation
              → _get_registry()                         CC=4    mutation
              → _seed_workspace_project(registry) → None CC=8    mutation
              → get_settings() → Settings               CC=1    mutation
              → get_singleton(instance_var:T | None, instance_class:Type[T]) → T CC=2    pure ■
              PURITY: 4/8 pure  BOTTLENECK: receive_delta(CC=9)

  Src [IO]: Path | None → bool
              → sync_from_git_log(repo_path:Path | None) → list[User] CC=6    pure ▶
              → _sync_git_users_from_repo(cwd:Path, git_dir:Path) → list[User] CC=2    pure
              → _collect_git_authors_from_objects(git_dir:Path) → list[tuple[str, str]] CC=7    mutation
              → _iter_git_starting_shas(git_dir:Path) → list[str] CC=2    pure
              → _read_git_ref(git_dir:Path, ref_name:str) → str | None CC=2    pure
              → _read_packed_git_ref(git_dir:Path, ref_name:str) → str | None CC=5    IO
              → _parse_packed_git_ref_line(line:str, ref_name:str) → str | None CC=7    pure
              → _is_git_sha(value:str) → bool           CC=3    pure ■
              PURITY: 6/8 pure  BOTTLENECK: _collect_git_authors_from_objects(CC=7)

  Src [Core]: str | None → T
              → list_projects(status:str | None, source_type:str | None) → list[dict[str, Any]] CC=1    pure ▶
              → _qry_bus()                              CC=1    pure
              → get_query_bus() → QueryBus              CC=2    mutation
              → _get_registry()                         CC=4    mutation
              → _seed_workspace_project(registry) → None CC=8    mutation
              → get_settings() → Settings               CC=1    mutation
              → get_singleton(instance_var:T | None, instance_class:Type[T]) → T CC=2    pure ■
              PURITY: 3/7 pure  BOTTLENECK: _seed_workspace_project(CC=8)

  Src [Core]: str → T
              → get_project(project_id:str) → dict[str, Any] CC=2    pure ▶
              → _qry_bus()                              CC=1    pure
              → get_query_bus() → QueryBus              CC=2    mutation
              → _get_registry()                         CC=4    mutation
              → _seed_workspace_project(registry) → None CC=8    mutation
              → get_settings() → Settings               CC=1    mutation
              → get_singleton(instance_var:T | None, instance_class:Type[T]) → T CC=2    pure ■
              PURITY: 3/7 pure  BOTTLENECK: _seed_workspace_project(CC=8)

  Src [Core]: AddProjectReq → T
              → add_project(req:AddProjectReq) → dict[str, Any] CC=2    pure ▶
              → _cmd_bus()                              CC=1    pure
              → get_command_bus() → CommandBus          CC=2    mutation
              → _get_registry()                         CC=4    mutation
              → _seed_workspace_project(registry) → None CC=8    mutation
              → get_settings() → Settings               CC=1    mutation
              → get_singleton(instance_var:T | None, instance_class:Type[T]) → T CC=2    pure ■
              PURITY: 3/7 pure  BOTTLENECK: _seed_workspace_project(CC=8)

  Src [Core]: str → T
              → remove_project(project_id:str) → dict[str, str] CC=2    pure ▶
              → _cmd_bus()                              CC=1    pure
              → get_command_bus() → CommandBus          CC=2    mutation
              → _get_registry()                         CC=4    mutation
              → _seed_workspace_project(registry) → None CC=8    mutation
              → get_settings() → Settings               CC=1    mutation
              → get_singleton(instance_var:T | None, instance_class:Type[T]) → T CC=2    pure ■
              PURITY: 3/7 pure  BOTTLENECK: _seed_workspace_project(CC=8)

  Src [Core]: ScanReq → T
              → scan_directory(req:ScanReq) → dict[str, Any] CC=1    pure ▶
              → _cmd_bus()                              CC=1    pure
              → get_command_bus() → CommandBus          CC=2    mutation
              → _get_registry()                         CC=4    mutation
              → _seed_workspace_project(registry) → None CC=8    mutation
              → get_settings() → Settings               CC=1    mutation
              → get_singleton(instance_var:T | None, instance_class:Type[T]) → T CC=2    pure ■
              PURITY: 3/7 pure  BOTTLENECK: _seed_workspace_project(CC=8)

  Src [Core]: str → T
              → project_tickets(project_id:str) → list[dict[str, Any]] CC=1    pure ▶
              → _qry_bus()                              CC=1    pure
              → get_query_bus() → QueryBus              CC=2    mutation
              → _get_registry()                         CC=4    mutation
              → _seed_workspace_project(registry) → None CC=8    mutation
              → get_settings() → Settings               CC=1    mutation
              → get_singleton(instance_var:T | None, instance_class:Type[T]) → T CC=2    pure ■
              PURITY: 3/7 pure  BOTTLENECK: _seed_workspace_project(CC=8)

  Src [Core]: str → T
              → export_project(project_id:str, include_logs:bool) → dict[str, Any] CC=6    IO ▶
              → _qry_bus()                              CC=1    pure
              → get_query_bus() → QueryBus              CC=2    mutation
              → _get_registry()                         CC=4    mutation
              → _seed_workspace_project(registry) → None CC=8    mutation
              → get_settings() → Settings               CC=1    mutation
              → get_singleton(instance_var:T | None, instance_class:Type[T]) → T CC=2    pure ■
              PURITY: 2/7 pure  BOTTLENECK: _seed_workspace_project(CC=8)

  Src [Core]: ? → T
              → get_setup_state() → dict[str, Any]      CC=1    pure ▶
              → _qry_bus()                              CC=1    pure
              → get_query_bus() → QueryBus              CC=2    mutation
              → _get_registry()                         CC=4    mutation
              → _seed_workspace_project(registry) → None CC=8    mutation
              → get_settings() → Settings               CC=1    mutation
              → get_singleton(instance_var:T | None, instance_class:Type[T]) → T CC=2    pure ■
              PURITY: 3/7 pure  BOTTLENECK: _seed_workspace_project(CC=8)

  Src [Core]: str → T
              → toggle_setup_step(step_id:str, req:ToggleSetupStepReq | None) → dict[str, Any] CC=3    pure ▶
              → _cmd_bus()                              CC=1    pure
              → get_command_bus() → CommandBus          CC=2    mutation
              → _get_registry()                         CC=4    mutation
              → _seed_workspace_project(registry) → None CC=8    mutation
              → get_settings() → Settings               CC=1    mutation
              → get_singleton(instance_var:T | None, instance_class:Type[T]) → T CC=2    pure ■
              PURITY: 3/7 pure  BOTTLENECK: _seed_workspace_project(CC=8)


TRANSFORMS (fan-out ≥10):
  TicketsPanel()                                          fan=56   !! mutation-heavy
  useDashboardData()                                      fan=50   !! mutation-heavy
  TasksPanel()                                            fan=46   !! mutation-heavy
  EnvironmentsPanel()                                     fan=42   !! mutation-heavy
  SetupPanel()                                            fan=36   !! mutation-heavy
  VoiceChat()                                             fan=31   !! mutation-heavy
  ProjectFormUnified() → AnalysisResult                   fan=31   !! mutation-heavy
  DiagnosticsPanel()                                      fan=30   !! mutation-heavy
  run_all_tests(request:Request)                          fan=28   !! side-effects
  chat_completions(request:Request, x_task_tier:str | None) fan=27   !! side-effects
  batch_cmd(ctx, yaml_file, wait, analyze, parallel, timeout) fan=27   !! side-effects
  QuickTaskCreator()                                      fan=27   !! side-effects
  ToolHealthPanelRefactored()                             fan=27   !! side-effects
  dispatch_job(req:DispatchRequest) → dict[str, Any]      fan=26   !! side-effects
  ProjectsPanel() → AnalysisResult                        fan=26   !! side-effects

CONTRACTS:
  Pipeline: Src
    start() → None
      IN:  ()
      OUT: None
      SIDE-EFFECT: mutates self._running, self._task

    _event_loop() → None
      IN:  ()
      OUT: None

    _handle_job_event(event:JobCompleted | JobFailed) → None
      IN:  event:JobCompleted | JobFailed
      OUT: None

    _handle_failed_job(mgr:Any, ticket:Ticket, event:JobFailed) → None
      IN:  mgr:Any, ticket:Ticket, event:JobFailed
      OUT: None

    _review_job(ticket:Ticket, event:JobCompleted | JobFailed) → dict[str, Any]
      IN:  ticket:Ticket, event:JobCompleted | JobFailed
      OUT: dict[str, Any]
      SIDE-EFFECT: IO(loads)

    _review_model() → str
      IN:  ()
      OUT: str

    get_settings() → Settings
      IN:  ()
      OUT: Settings
      SIDE-EFFECT: global(_settings)

    get_singleton(instance_var:T | None, instance_class:Type[T]) → T
      IN:  instance_var:T | None, instance_class:Type[T]
      OUT: T

  Pipeline: Src
    receive_delta(request:Request)
      IN:  request:Request
      OUT: None

    update_project(project_id:str, req:UpdateProjectReq) → dict[str, Any]
      IN:  project_id:str, req:UpdateProjectReq
      OUT: dict[str, Any]

    _cmd_bus()
      IN:  ()
      OUT: None

    get_command_bus() → CommandBus
      IN:  ()
      OUT: CommandBus
      SIDE-EFFECT: global(_command_bus)

    _get_registry()
      IN:  ()
      OUT: None
      SIDE-EFFECT: global(_registry)

    _seed_workspace_project(registry) → None
      IN:  registry
      OUT: None
      SIDE-EFFECT: pure

    get_settings() → Settings
      IN:  ()
      OUT: Settings
      SIDE-EFFECT: global(_settings)

    get_singleton(instance_var:T | None, instance_class:Type[T]) → T
      IN:  instance_var:T | None, instance_class:Type[T]
      OUT: T

  Pipeline: Src
    sync_from_git_log(repo_path:Path | None) → list[User]
      IN:  repo_path:Path | None
      OUT: list[User]

    _sync_git_users_from_repo(cwd:Path, git_dir:Path) → list[User]
      IN:  cwd:Path, git_dir:Path
      OUT: list[User]

    _collect_git_authors_from_objects(git_dir:Path) → list[tuple[str, str]]
      IN:  git_dir:Path
      OUT: list[tuple[str, str]]
      SIDE-EFFECT: pure

    _iter_git_starting_shas(git_dir:Path) → list[str]
      IN:  git_dir:Path
      OUT: list[str]

    _read_git_ref(git_dir:Path, ref_name:str) → str | None
      IN:  git_dir:Path, ref_name:str
      OUT: str | None

    _read_packed_git_ref(git_dir:Path, ref_name:str) → str | None
      IN:  git_dir:Path, ref_name:str
      OUT: str | None
      SIDE-EFFECT: IO(read_text)

    _parse_packed_git_ref_line(line:str, ref_name:str) → str | None
      IN:  line:str, ref_name:str
      OUT: str | None

    _is_git_sha(value:str) → bool
      IN:  value:str
      OUT: bool

  Pipeline: Src
    list_projects(status:str | None, source_type:str | None) → list[dict[str, Any]]
      IN:  status:str | None, source_type:str | None
      OUT: list[dict[str, Any]]

    _qry_bus()
      IN:  ()
      OUT: None

    get_query_bus() → QueryBus
      IN:  ()
      OUT: QueryBus
      SIDE-EFFECT: global(_query_bus)

    _get_registry()
      IN:  ()
      OUT: None
      SIDE-EFFECT: global(_registry)

    _seed_workspace_project(registry) → None
      IN:  registry
      OUT: None
      SIDE-EFFECT: pure

    get_settings() → Settings
      IN:  ()
      OUT: Settings
      SIDE-EFFECT: global(_settings)

    get_singleton(instance_var:T | None, instance_class:Type[T]) → T
      IN:  instance_var:T | None, instance_class:Type[T]
      OUT: T

  Pipeline: Src
    get_project(project_id:str) → dict[str, Any]
      IN:  project_id:str
      OUT: dict[str, Any]

    _qry_bus()
      IN:  ()
      OUT: None

    get_query_bus() → QueryBus
      IN:  ()
      OUT: QueryBus
      SIDE-EFFECT: global(_query_bus)

    _get_registry()
      IN:  ()
      OUT: None
      SIDE-EFFECT: global(_registry)

    _seed_workspace_project(registry) → None
      IN:  registry
      OUT: None
      SIDE-EFFECT: pure

    get_settings() → Settings
      IN:  ()
      OUT: Settings
      SIDE-EFFECT: global(_settings)

    get_singleton(instance_var:T | None, instance_class:Type[T]) → T
      IN:  instance_var:T | None, instance_class:Type[T]
      OUT: T

  Pipeline: Src
    add_project(req:AddProjectReq) → dict[str, Any]
      IN:  req:AddProjectReq
      OUT: dict[str, Any]

    _cmd_bus()
      IN:  ()
      OUT: None

    get_command_bus() → CommandBus
      IN:  ()
      OUT: CommandBus
      SIDE-EFFECT: global(_command_bus)

    _get_registry()
      IN:  ()
      OUT: None
      SIDE-EFFECT: global(_registry)

    _seed_workspace_project(registry) → None
      IN:  registry
      OUT: None
      SIDE-EFFECT: pure

    get_settings() → Settings
      IN:  ()
      OUT: Settings
      SIDE-EFFECT: global(_settings)

    get_singleton(instance_var:T | None, instance_class:Type[T]) → T
      IN:  instance_var:T | None, instance_class:Type[T]
      OUT: T

  Pipeline: Src
    remove_project(project_id:str) → dict[str, str]
      IN:  project_id:str
      OUT: dict[str, str]

    _cmd_bus()
      IN:  ()
      OUT: None

    get_command_bus() → CommandBus
      IN:  ()
      OUT: CommandBus
      SIDE-EFFECT: global(_command_bus)

    _get_registry()
      IN:  ()
      OUT: None
      SIDE-EFFECT: global(_registry)

    _seed_workspace_project(registry) → None
      IN:  registry
      OUT: None
      SIDE-EFFECT: pure

    get_settings() → Settings
      IN:  ()
      OUT: Settings
      SIDE-EFFECT: global(_settings)

    get_singleton(instance_var:T | None, instance_class:Type[T]) → T
      IN:  instance_var:T | None, instance_class:Type[T]
      OUT: T

  Pipeline: Src
    scan_directory(req:ScanReq) → dict[str, Any]
      IN:  req:ScanReq
      OUT: dict[str, Any]

    _cmd_bus()
      IN:  ()
      OUT: None

    get_command_bus() → CommandBus
      IN:  ()
      OUT: CommandBus
      SIDE-EFFECT: global(_command_bus)

    _get_registry()
      IN:  ()
      OUT: None
      SIDE-EFFECT: global(_registry)

    _seed_workspace_project(registry) → None
      IN:  registry
      OUT: None
      SIDE-EFFECT: pure

    get_settings() → Settings
      IN:  ()
      OUT: Settings
      SIDE-EFFECT: global(_settings)

    get_singleton(instance_var:T | None, instance_class:Type[T]) → T
      IN:  instance_var:T | None, instance_class:Type[T]
      OUT: T

  Pipeline: Src
    project_tickets(project_id:str) → list[dict[str, Any]]
      IN:  project_id:str
      OUT: list[dict[str, Any]]

    _qry_bus()
      IN:  ()
      OUT: None

    get_query_bus() → QueryBus
      IN:  ()
      OUT: QueryBus
      SIDE-EFFECT: global(_query_bus)

    _get_registry()
      IN:  ()
      OUT: None
      SIDE-EFFECT: global(_registry)

    _seed_workspace_project(registry) → None
      IN:  registry
      OUT: None
      SIDE-EFFECT: pure

    get_settings() → Settings
      IN:  ()
      OUT: Settings
      SIDE-EFFECT: global(_settings)

    get_singleton(instance_var:T | None, instance_class:Type[T]) → T
      IN:  instance_var:T | None, instance_class:Type[T]
      OUT: T

  Pipeline: Src
    export_project(project_id:str, include_logs:bool) → dict[str, Any]
      IN:  project_id:str, include_logs:bool
      OUT: dict[str, Any]
      SIDE-EFFECT: IO(print)

    _qry_bus()
      IN:  ()
      OUT: None

    get_query_bus() → QueryBus
      IN:  ()
      OUT: QueryBus
      SIDE-EFFECT: global(_query_bus)

    _get_registry()
      IN:  ()
      OUT: None
      SIDE-EFFECT: global(_registry)

    _seed_workspace_project(registry) → None
      IN:  registry
      OUT: None
      SIDE-EFFECT: pure

    get_settings() → Settings
      IN:  ()
      OUT: Settings
      SIDE-EFFECT: global(_settings)

    get_singleton(instance_var:T | None, instance_class:Type[T]) → T
      IN:  instance_var:T | None, instance_class:Type[T]
      OUT: T

  Pipeline: Src
    get_setup_state() → dict[str, Any]
      IN:  ()
      OUT: dict[str, Any]

    _qry_bus()
      IN:  ()
      OUT: None

    get_query_bus() → QueryBus
      IN:  ()
      OUT: QueryBus
      SIDE-EFFECT: global(_query_bus)

    _get_registry()
      IN:  ()
      OUT: None
      SIDE-EFFECT: global(_registry)

    _seed_workspace_project(registry) → None
      IN:  registry
      OUT: None
      SIDE-EFFECT: pure

    get_settings() → Settings
      IN:  ()
      OUT: Settings
      SIDE-EFFECT: global(_settings)

    get_singleton(instance_var:T | None, instance_class:Type[T]) → T
      IN:  instance_var:T | None, instance_class:Type[T]
      OUT: T

  Pipeline: Src
    toggle_setup_step(step_id:str, req:ToggleSetupStepReq | None) → dict[str, Any]
      IN:  step_id:str, req:ToggleSetupStepReq | None
      OUT: dict[str, Any]

    _cmd_bus()
      IN:  ()
      OUT: None

    get_command_bus() → CommandBus
      IN:  ()
      OUT: CommandBus
      SIDE-EFFECT: global(_command_bus)

    _get_registry()
      IN:  ()
      OUT: None
      SIDE-EFFECT: global(_registry)

    _seed_workspace_project(registry) → None
      IN:  registry
      OUT: None
      SIDE-EFFECT: pure

    get_settings() → Settings
      IN:  ()
      OUT: Settings
      SIDE-EFFECT: global(_settings)

    get_singleton(instance_var:T | None, instance_class:Type[T]) → T
      IN:  instance_var:T | None, instance_class:Type[T]
      OUT: T


DATA_TYPES (by cross-function usage) [973 annotated, 69 inferred / 2294 functions]:
  str                  consumed:511 produced:85   !! HUB-TYPE → split interface
  dict[str, Any]       consumed:42  produced:162  !! HUB-TYPE → split interface
  str | None           consumed:132 produced:15   !! HUB-TYPE → split interface
  bool                 consumed:23  produced:49   !! HUB-TYPE → split interface
  int                  consumed:58  produced:6    !! HUB-TYPE → split interface
  list[str]            consumed:28  produced:31   !! HUB-TYPE → split interface
  AnalysisResult       consumed:5   produced:52 
  click.Context        consumed:56  produced:0    !! HUB-TYPE → split interface
  dict                 consumed:28  produced:18   !! HUB-TYPE → split interface
  Path                 consumed:35  produced:1    !! HUB-TYPE → split interface
  float                consumed:28  produced:3    !! HUB-TYPE → split interface
  Ticket               consumed:22  produced:3    !! HUB-TYPE → split interface
  list[Ticket]         consumed:11  produced:14   !! HUB-TYPE → split interface
  list[str] | None     consumed:20  produced:0    !! HUB-TYPE → split interface
  Path | None          consumed:10  produced:8    !! HUB-TYPE → split interface
  VMConfig             consumed:16  produced:1    !! HUB-TYPE → split interface
  list[dict]           consumed:8   produced:9  
  dict[str, Any] | None consumed:5   produced:11 
  dict[str, str]       consumed:6   produced:8  
  Request              consumed:12  produced:0    !! HUB-TYPE → split interface

  HUB TYPES (consumed ≥10):
    str → 511 consumers → split into:
      - (analyze consumers to suggest sub-interfaces)
    dict[str, Any] → 42 consumers → split into:
      - (analyze consumers to suggest sub-interfaces)
    str | None → 132 consumers → split into:
      - (analyze consumers to suggest sub-interfaces)
    bool → 23 consumers → split into:
      - (analyze consumers to suggest sub-interfaces)
    int → 58 consumers → split into:
      - (analyze consumers to suggest sub-interfaces)
    list[str] → 28 consumers → split into:
      - (analyze consumers to suggest sub-interfaces)
    click.Context → 56 consumers → split into:
      - (analyze consumers to suggest sub-interfaces)
    dict → 28 consumers → split into:
      - replace with typed alternatives (dataclass/TypedDict)
    Path → 35 consumers → split into:
      - (analyze consumers to suggest sub-interfaces)
    float → 28 consumers → split into:
      - (analyze consumers to suggest sub-interfaces)
    Ticket → 22 consumers → split into:
      - (analyze consumers to suggest sub-interfaces)
    list[Ticket] → 11 consumers → split into:
      - (analyze consumers to suggest sub-interfaces)
    list[str] | None → 20 consumers → split into:
      - (analyze consumers to suggest sub-interfaces)
    Path | None → 10 consumers → split into:
      - (analyze consumers to suggest sub-interfaces)
    VMConfig → 16 consumers → split into:
      - (analyze consumers to suggest sub-interfaces)
    Request → 12 consumers → split into:
      - (analyze consumers to suggest sub-interfaces)

SIDE_EFFECTS:
  IO:        main, install_voice_deps, main, main, web_cmd, config_set, config_get, _parse, is_sqlite_database, SQLiteNamespaceStore._open
  Cache:     TodoStore.create, TodoStore.get, TodoStore.update, TodoStore.delete, TodoStore.idx, TodoStore.stats, ct, get, post, put
  Mutation:  _make_args, SQLiteNamespaceStore.__init__, WebhookManager.__init__, WebhookManager.start, WebhookManager.stop, build_ticket_export_rows, get_settings, _get_registry, _seed_workspace_project, list_providers
  Pure:      check_voice_deps, cli, serve, status, models, chat, logs_cmd, providers_cmd, routing_test_cmd, projects_cmd

  PIPELINE PURITY:
    Src             ██░░ 62% pure
    Src             ██░░ 50% pure
    Src             ███░ 75% pure
    Src             █░░░ 42% pure
    Src             █░░░ 42% pure
    Src             █░░░ 42% pure
    Src             █░░░ 42% pure
    Src             █░░░ 42% pure
    Src             █░░░ 42% pure
    Src             █░░░ 28% pure
    Src             █░░░ 42% pure
    Src             █░░░ 42% pure
