{"id":51438565,"url":"https://github.com/yuchenz27/claude-code-roa","last_synced_at":"2026-07-05T09:30:26.296Z","repository":{"id":366801265,"uuid":"1277873988","full_name":"yuchenz27/claude-code-roa","owner":"yuchenz27","description":"Claude Code ROA — Return on Attention: how much agent work each hour of your attention moves.","archived":false,"fork":false,"pushed_at":"2026-06-23T12:41:47.000Z","size":140,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-23T12:45:53.916Z","etag":null,"topics":["anthropic","claude","claude-code","developer-tools","productivity","statusline"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yuchenz27.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-06-23T09:07:35.000Z","updated_at":"2026-06-23T10:55:48.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/yuchenz27/claude-code-roa","commit_stats":null,"previous_names":["yuchenz27/claude-code-roa"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/yuchenz27/claude-code-roa","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuchenz27%2Fclaude-code-roa","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuchenz27%2Fclaude-code-roa/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuchenz27%2Fclaude-code-roa/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuchenz27%2Fclaude-code-roa/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yuchenz27","download_url":"https://codeload.github.com/yuchenz27/claude-code-roa/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuchenz27%2Fclaude-code-roa/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35150062,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-05T02:00:06.290Z","response_time":100,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["anthropic","claude","claude-code","developer-tools","productivity","statusline"],"created_at":"2026-07-05T09:30:25.545Z","updated_at":"2026-07-05T09:30:26.287Z","avatar_url":"https://github.com/yuchenz27.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Claude Code ROA — Return on Attention\n\n**Measure how much agent work each hour of your attention moves.**\n\nWhen you work with coding agents, the scarce resource is not tokens — it's *your\nattention*. It's the one serial station: an agent can run while you look away,\nbut only you can decide, unblock, and redirect. ROA turns that idea into a live\ngauge and a set of reports, straight from Claude Code's own hooks. No wrappers,\nno account, all local.\n\n![ROA in a live statusline](assets/hud.png)\n\n*The top two lines are [claude-hud](https://github.com/jarrodwatts/claude-hud)\n(identity, context/usage); everything below — Output Style, H2A, A2H, and the two\n`Today` bands — is ROA, appended beneath it.*\n\n\u003e A `Time Lev` of 1.58× means that for every hour of your active attention, you\n\u003e pulled 1.58 agent-hours of work — because parallel sessions add up.\n\n## What it measures\n\n- **H2A** (*you wait the agent*) — time the agent is actually working. Permission\n  waits are carved out, because those are the agent waiting on *you*.\n- **A2H** (*the agent waits you*) — split into **prompt wait** (between turns) and\n  **permission wait** (mid-turn, blocked on your approval).\n- **Time Leverage** = AI working time ÷ your active wall-clock. Parallel sessions\n  sum, so this goes above 1× when you orchestrate.\n- **Tokens** — output (the real work) vs total (mostly cache re-reads — a\n  footprint), plus **Token Leverage** (output per active minute, speed-invariant).\n- **Switches** — how often you hop between sessions (attention fragmentation).\n- **Session health** — whether sessions close same-day or drag across days.\n\nIt's a directional dashboard, not a precise score. See [docs/design.md](docs/design.md).\n\n## Install\n\nROA is a Claude Code plugin distributed as its own marketplace.\n\n```\n/plugin marketplace add yuchenz27/claude-code-roa\n/plugin install roa@claude-code-roa\n```\n\nThe hooks load automatically and data collection starts immediately. To turn on\nthe live statusline HUD (a plugin can't set `statusLine` itself), run the setup\nskill once:\n\n```\n/setup        # wires statusLine into your settings.json, then restart\n```\n\nROA composes with **any** statusline, not just one. Claude Code has a single\n`statusLine` slot, so ROA renders *below* whatever upstream statusline you already\nrun: set `ROA_WRAP` to that command and ROA appends its lines beneath it (leave it\nunset for a clean ROA-only statusline). `/setup` also recognizes\n[claude-hud](https://github.com/jarrodwatts/claude-hud) and wires it for you.\n\nReports, any time:\n\n```\n/roa            # today + leverage / tokens / permission / session health\n/roa --today\n```\n\n…or from a shell: `python3 \u003crepo\u003e/bin/report --today`.\n\n## Where the data lives\n\nEverything is local, under `~/.claude/roa/` (override with `ROA_DIR`):\n\n```\n~/.claude/roa/\n├── observer-YYYY-MM-DD.jsonl   # per-day event log (submit/stop)\n├── state/\u003csession_id\u003e.json     # per-session running totals\n├── active.json                 # active session + today's switch count\n└── daily.jsonl                 # one summary line per day (permanent trend)\n```\n\nCode and data are kept separate on purpose: the plugin can be updated or\nreinstalled without ever touching your history.\n\n## Develop\n\nIt's plain Python, no build step. Point your own hooks at a working copy and\nedits go live on the next hook fire:\n\n```\ngit clone \u003crepo\u003e \u0026\u0026 cd claude-code-roa\npython3 tests/test_core.py      # run the test suite (zero deps)\n```\n\nThe logic lives in `src/roa/core.py` (pure, replayable); `tracker.py` / `hud.py`\n/ `report.py` are thin I/O around it; `bin/` holds the entrypoints hooks call.\n\n## License\n\nMIT — see [LICENSE](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyuchenz27%2Fclaude-code-roa","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyuchenz27%2Fclaude-code-roa","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyuchenz27%2Fclaude-code-roa/lists"}