1---2name: scripts3description: Scripts subsystem in TTA.dev: get_open_prs, calculate_pr_age, calculate_pr_staleness and related code. 187 symbols | 39 files | Cohesion: 91%4---56# Scripts78187 symbols | 39 files | Cohesion: 91%910## When to Use1112- Working on `scripts`-related functionality in TTA.dev13- Modifying `get_open_prs`, `calculate_pr_age`14- Navigating `scripts/pr_manager.py`, `scripts/issue_manager.py`1516## Key Files1718| File | Symbols |19|------|---------|20| `scripts/pr_manager.py` | get_open_prs, calculate_pr_age, calculate_pr_staleness, categorize_pr, prioritize_pr (+7) |21| `scripts/issue_manager.py` | get_issue, auto_label, assign_milestone, label_unlabeled, main (+7) |22| `scripts/git_manager.py` | run_git, get_status, get_branches, get_merged_branches, analyze_stashes (+6) |23| `scripts/lazy_dev.py` | create_branch, collaborate_on_pr, collaborate_on_issue, show_status, interactive_mode (+6) |24| `scripts/agent_oversight.py` | colored, get_pending_commits, show_status, review_commit, approve_commit (+4) |25| `scripts/agent-activity-tracker.py` | _should_track, _get_file_type, _start_session, _update_session, on_modified (+4) |26| `scripts/smoke_test_primitives.py` | _ctx, _check_ollama, test_router_groq, test_router_gemini, test_router_ollama_skip_small (+3) |27| `scripts/scan-codebase-todos.py` | by_category, by_file_type, scan, _scan_directory, _scan_file (+3) |28| `scripts/branch_manager.py` | analyse_branches, audit, delete_closed_pr_branches, delete_orphaned_branches, main (+3) |29| `scripts/validate-primitive-usage.py` | add_warning, visit_Call, visit_For, visit_AsyncFunctionDef, _is_asyncio_call (+2) |3031## Entry Points3233Start here when exploring this area:3435- **`get_open_prs`** (Function) — `scripts/pr_manager.py:45`36- **`calculate_pr_age`** (Function) — `scripts/pr_manager.py:103`37- **`calculate_pr_staleness`** (Function) — `scripts/pr_manager.py:117`38- **`categorize_pr`** (Function) — `scripts/pr_manager.py:131`39- **`prioritize_pr`** (Function) — `scripts/pr_manager.py:184`4041## Key Symbols4243| Symbol | Type | File | Line |44|--------|------|------|------|45| `get_open_prs` | Function | `scripts/pr_manager.py` | 45 |46| `calculate_pr_age` | Function | `scripts/pr_manager.py` | 103 |47| `calculate_pr_staleness` | Function | `scripts/pr_manager.py` | 117 |48| `categorize_pr` | Function | `scripts/pr_manager.py` | 131 |49| `prioritize_pr` | Function | `scripts/pr_manager.py` | 184 |50| `get_recommendations` | Function | `scripts/pr_manager.py` | 252 |51| `display_dashboard` | Function | `scripts/pr_manager.py` | 316 |52| `analyze_prs` | Function | `scripts/pr_manager.py` | 381 |53| `triage_prs` | Function | `scripts/pr_manager.py` | 453 |54| `health_check` | Function | `scripts/pr_manager.py` | 497 |55| `recommend_actions` | Function | `scripts/pr_manager.py` | 564 |56| `main` | Function | `scripts/pr_manager.py` | 626 |57| `run_git` | Function | `scripts/git_manager.py` | 23 |58| `get_status` | Function | `scripts/git_manager.py` | 30 |59| `get_branches` | Function | `scripts/git_manager.py` | 66 |60| `get_merged_branches` | Function | `scripts/git_manager.py` | 75 |61| `analyze_stashes` | Function | `scripts/git_manager.py` | 86 |62| `clean_experimental_branches` | Function | `scripts/git_manager.py` | 113 |63| `sync_with_remote` | Function | `scripts/git_manager.py` | 136 |64| `display_status_dashboard` | Function | `scripts/git_manager.py` | 150 |6566## Execution Flows6768| Flow | Type | Steps |69|------|------|-------|70| `Main → _build_messages` | cross_community | 7 |71| `Test_router_ollama_skip_small → _build_messages` | cross_community | 6 |72| `Test_router_ollama_allow_large → _build_messages` | cross_community | 6 |73| `Main → _categorize_file` | intra_community | 5 |74| `Main → _run_gh` | cross_community | 5 |75| `Main → Validate_against_schema` | cross_community | 5 |76| `Main → _run_gh` | intra_community | 4 |77| `Main → _is_cooling` | cross_community | 4 |78| `Main → _mark_cooling` | cross_community | 4 |79| `Main → Get_integration` | cross_community | 4 |8081## Connected Areas8283| Area | Connections |84|------|-------------|85| Llm | 5 calls |86| Tests | 1 calls |8788## How to Explore89901. `gitnexus_context({name: "get_open_prs"})` — see callers and callees912. `gitnexus_query({query: "scripts"})` — find related execution flows923. Read key files listed above for implementation details