agentpace 0.11.2__tar.gz → 0.12.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (105) hide show
  1. {agentpace-0.11.2 → agentpace-0.12.0}/CHANGELOG.md +55 -0
  2. {agentpace-0.11.2 → agentpace-0.12.0}/CITATION.cff +1 -1
  3. {agentpace-0.11.2 → agentpace-0.12.0}/CONTRIBUTING.md +1 -1
  4. {agentpace-0.11.2 → agentpace-0.12.0}/PKG-INFO +3 -3
  5. {agentpace-0.11.2 → agentpace-0.12.0}/README.md +2 -2
  6. {agentpace-0.11.2 → agentpace-0.12.0}/docs/DESIGN.md +2 -0
  7. {agentpace-0.11.2 → agentpace-0.12.0}/docs/cli.md +7 -5
  8. {agentpace-0.11.2 → agentpace-0.12.0}/docs/index.html +1 -1
  9. {agentpace-0.11.2 → agentpace-0.12.0}/skills/agentpace/SKILL.md +3 -3
  10. agentpace-0.12.0/skills/agentpace/assets/portable-prompt.md +48 -0
  11. {agentpace-0.11.2 → agentpace-0.12.0}/skills/agentpace/references/method.md +1 -1
  12. {agentpace-0.11.2 → agentpace-0.12.0}/skills/pace-estimate/SKILL.md +3 -3
  13. {agentpace-0.11.2 → agentpace-0.12.0}/src/agentpace/__init__.py +1 -1
  14. {agentpace-0.11.2 → agentpace-0.12.0}/src/agentpace/claims.py +33 -14
  15. {agentpace-0.11.2 → agentpace-0.12.0}/src/agentpace/classify.py +19 -0
  16. {agentpace-0.11.2 → agentpace-0.12.0}/src/agentpace/cli.py +8 -1
  17. {agentpace-0.11.2 → agentpace-0.12.0}/src/agentpace/estimate.py +25 -4
  18. {agentpace-0.11.2 → agentpace-0.12.0}/tests/test_claims.py +107 -6
  19. agentpace-0.12.0/tests/test_classify.py +120 -0
  20. {agentpace-0.11.2 → agentpace-0.12.0}/tests/test_estimate.py +33 -0
  21. agentpace-0.12.0/tests/test_plan_risk.py +176 -0
  22. {agentpace-0.11.2 → agentpace-0.12.0}/tests/test_skills.py +1 -1
  23. agentpace-0.11.2/skills/agentpace/assets/portable-prompt.md +0 -31
  24. agentpace-0.11.2/tests/test_classify.py +0 -54
  25. {agentpace-0.11.2 → agentpace-0.12.0}/.gitattributes +0 -0
  26. {agentpace-0.11.2 → agentpace-0.12.0}/.github/ISSUE_TEMPLATE/config.yml +0 -0
  27. {agentpace-0.11.2 → agentpace-0.12.0}/.github/ISSUE_TEMPLATE/ingest-found-nothing.yml +0 -0
  28. {agentpace-0.11.2 → agentpace-0.12.0}/.github/ISSUE_TEMPLATE/remove-my-rows.yml +0 -0
  29. {agentpace-0.11.2 → agentpace-0.12.0}/.github/dependabot.yml +0 -0
  30. {agentpace-0.11.2 → agentpace-0.12.0}/.github/pull_request_template.md +0 -0
  31. {agentpace-0.11.2 → agentpace-0.12.0}/.github/workflows/ci.yml +0 -0
  32. {agentpace-0.11.2 → agentpace-0.12.0}/.github/workflows/publish.yml +0 -0
  33. {agentpace-0.11.2 → agentpace-0.12.0}/.github/workflows/validate-data.yml +0 -0
  34. {agentpace-0.11.2 → agentpace-0.12.0}/.gitignore +0 -0
  35. {agentpace-0.11.2 → agentpace-0.12.0}/CODE_OF_CONDUCT.md +0 -0
  36. {agentpace-0.11.2 → agentpace-0.12.0}/LICENSE +0 -0
  37. {agentpace-0.11.2 → agentpace-0.12.0}/SECURITY.md +0 -0
  38. {agentpace-0.11.2 → agentpace-0.12.0}/data/LICENSE +0 -0
  39. {agentpace-0.11.2 → agentpace-0.12.0}/data/README.md +0 -0
  40. {agentpace-0.11.2 → agentpace-0.12.0}/data/runs/4546788e7930eccd-2026-W40-2026-W45.jsonl +0 -0
  41. {agentpace-0.11.2 → agentpace-0.12.0}/data/runs/4546788e7930eccd-2026-W44-2026-W45.jsonl +0 -0
  42. {agentpace-0.11.2 → agentpace-0.12.0}/docs/.nojekyll +0 -0
  43. {agentpace-0.11.2 → agentpace-0.12.0}/docs/assets/backtest-coverage.svg +0 -0
  44. {agentpace-0.11.2 → agentpace-0.12.0}/docs/assets/hero.webp +0 -0
  45. {agentpace-0.11.2 → agentpace-0.12.0}/docs/assets/run-ranges.svg +0 -0
  46. {agentpace-0.11.2 → agentpace-0.12.0}/docs/assets/social-preview.png +0 -0
  47. {agentpace-0.11.2 → agentpace-0.12.0}/docs/backtest.json +0 -0
  48. {agentpace-0.11.2 → agentpace-0.12.0}/docs/backtest.md +0 -0
  49. {agentpace-0.11.2 → agentpace-0.12.0}/docs/releasing.md +0 -0
  50. {agentpace-0.11.2 → agentpace-0.12.0}/docs/robots.txt +0 -0
  51. {agentpace-0.11.2 → agentpace-0.12.0}/docs/sitemap.xml +0 -0
  52. {agentpace-0.11.2 → agentpace-0.12.0}/docs/verify-adapter.md +0 -0
  53. {agentpace-0.11.2 → agentpace-0.12.0}/examples/plan.json +0 -0
  54. {agentpace-0.11.2 → agentpace-0.12.0}/examples/quote-plan.json +0 -0
  55. {agentpace-0.11.2 → agentpace-0.12.0}/pyproject.toml +0 -0
  56. {agentpace-0.11.2 → agentpace-0.12.0}/schema/run.schema.json +0 -0
  57. {agentpace-0.11.2 → agentpace-0.12.0}/schema/turn.schema.json +0 -0
  58. {agentpace-0.11.2 → agentpace-0.12.0}/skills/pace-log/SKILL.md +0 -0
  59. {agentpace-0.11.2 → agentpace-0.12.0}/skills/pace-share/SKILL.md +0 -0
  60. {agentpace-0.11.2 → agentpace-0.12.0}/src/agentpace/__main__.py +0 -0
  61. {agentpace-0.11.2 → agentpace-0.12.0}/src/agentpace/adapters/__init__.py +0 -0
  62. {agentpace-0.11.2 → agentpace-0.12.0}/src/agentpace/adapters/base.py +0 -0
  63. {agentpace-0.11.2 → agentpace-0.12.0}/src/agentpace/adapters/claude_code.py +0 -0
  64. {agentpace-0.11.2 → agentpace-0.12.0}/src/agentpace/adapters/cline.py +0 -0
  65. {agentpace-0.11.2 → agentpace-0.12.0}/src/agentpace/adapters/codex.py +0 -0
  66. {agentpace-0.11.2 → agentpace-0.12.0}/src/agentpace/adapters/gemini_cli.py +0 -0
  67. {agentpace-0.11.2 → agentpace-0.12.0}/src/agentpace/adapters/opencode.py +0 -0
  68. {agentpace-0.11.2 → agentpace-0.12.0}/src/agentpace/backtest.py +0 -0
  69. {agentpace-0.11.2 → agentpace-0.12.0}/src/agentpace/cache.py +0 -0
  70. {agentpace-0.11.2 → agentpace-0.12.0}/src/agentpace/charts.py +0 -0
  71. {agentpace-0.11.2 → agentpace-0.12.0}/src/agentpace/forecasts.py +0 -0
  72. {agentpace-0.11.2 → agentpace-0.12.0}/src/agentpace/ingest.py +0 -0
  73. {agentpace-0.11.2 → agentpace-0.12.0}/src/agentpace/paths.py +0 -0
  74. {agentpace-0.11.2 → agentpace-0.12.0}/src/agentpace/pseudonym.py +0 -0
  75. {agentpace-0.11.2 → agentpace-0.12.0}/src/agentpace/py.typed +0 -0
  76. {agentpace-0.11.2 → agentpace-0.12.0}/src/agentpace/render.py +0 -0
  77. {agentpace-0.11.2 → agentpace-0.12.0}/src/agentpace/report.py +0 -0
  78. {agentpace-0.11.2 → agentpace-0.12.0}/src/agentpace/schema.py +0 -0
  79. {agentpace-0.11.2 → agentpace-0.12.0}/src/agentpace/share.py +0 -0
  80. {agentpace-0.11.2 → agentpace-0.12.0}/src/agentpace/site.py +0 -0
  81. {agentpace-0.11.2 → agentpace-0.12.0}/src/agentpace/turns.py +0 -0
  82. {agentpace-0.11.2 → agentpace-0.12.0}/src/agentpace/validate.py +0 -0
  83. {agentpace-0.11.2 → agentpace-0.12.0}/tests/__init__.py +0 -0
  84. {agentpace-0.11.2 → agentpace-0.12.0}/tests/fixtures/__init__.py +0 -0
  85. {agentpace-0.11.2 → agentpace-0.12.0}/tests/fixtures/cline_tasks.py +0 -0
  86. {agentpace-0.11.2 → agentpace-0.12.0}/tests/fixtures/gemini_cli.py +0 -0
  87. {agentpace-0.11.2 → agentpace-0.12.0}/tests/fixtures/opencode.py +0 -0
  88. {agentpace-0.11.2 → agentpace-0.12.0}/tests/synthetic.py +0 -0
  89. {agentpace-0.11.2 → agentpace-0.12.0}/tests/test_backtest.py +0 -0
  90. {agentpace-0.11.2 → agentpace-0.12.0}/tests/test_cli.py +0 -0
  91. {agentpace-0.11.2 → agentpace-0.12.0}/tests/test_cline.py +0 -0
  92. {agentpace-0.11.2 → agentpace-0.12.0}/tests/test_codex.py +0 -0
  93. {agentpace-0.11.2 → agentpace-0.12.0}/tests/test_docs.py +0 -0
  94. {agentpace-0.11.2 → agentpace-0.12.0}/tests/test_forecasts.py +0 -0
  95. {agentpace-0.11.2 → agentpace-0.12.0}/tests/test_frozen_method.py +0 -0
  96. {agentpace-0.11.2 → agentpace-0.12.0}/tests/test_gemini_cli.py +0 -0
  97. {agentpace-0.11.2 → agentpace-0.12.0}/tests/test_ingest.py +0 -0
  98. {agentpace-0.11.2 → agentpace-0.12.0}/tests/test_labels.py +0 -0
  99. {agentpace-0.11.2 → agentpace-0.12.0}/tests/test_opencode.py +0 -0
  100. {agentpace-0.11.2 → agentpace-0.12.0}/tests/test_outcomes.py +0 -0
  101. {agentpace-0.11.2 → agentpace-0.12.0}/tests/test_review_capacity.py +0 -0
  102. {agentpace-0.11.2 → agentpace-0.12.0}/tests/test_schema.py +0 -0
  103. {agentpace-0.11.2 → agentpace-0.12.0}/tests/test_share_validate.py +0 -0
  104. {agentpace-0.11.2 → agentpace-0.12.0}/tests/test_site.py +0 -0
  105. {agentpace-0.11.2 → agentpace-0.12.0}/tests/test_turns.py +0 -0
@@ -4,6 +4,61 @@ This project follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) an
4
4
 
5
5
  ## Unreleased
6
6
 
7
+ ## 0.12.0 - 2026-11-09
8
+
9
+ ### Changed
10
+
11
+ - A plan task's `risk` is now read as the recorded category it matches against. In the rows, risk is the agent's role (review and research agents `low`, migration agents `high`, everything else `normal`), not how hard or how reversible the work is.
12
+ - A written risk is used only where the rows can record that kind at that risk: `review` low, `migration` high, `other` low (research) or normal, every other kind normal.
13
+ - Any other value, and an omitted one, takes the kind's recorded risk, and a warning names each task it changed, such as `risk as written was not used for api (high -> normal), review (normal -> low): …`.
14
+ - Before, such a task matched an empty `kind x risk` cell, which dropped the model. For an Opus feature marked `high`, that cut the P50 by a factor of 16, in the shorter direction.
15
+ - An explicit `"risk": null` in a plan now means "not given", as `"model": null` already did, instead of being refused.
16
+ - The skills stop advising `risk: high`: they leave `risk` out except for research (`other` with `risk: low`), ask for the model, which is the strongest split in the data, and pass a stated review capacity as the figure itself, in at most 80 characters, or not at all.
17
+ - `docs/cli.md`, the README, DESIGN section 5, `method.md` and CONTRIBUTING say the same. CONTRIBUTING's `label` example no longer sets `--risk high`.
18
+
19
+ ### Added
20
+
21
+ - `agentpace estimate --use-risk` looks every written risk up as given, for datasets whose labelled rows hold other pairs.
22
+
23
+ Training, the back-off order, the backtest's queries and the frozen selection are unchanged. Forecasts for plans with such risks change by design; the published example quantiles, the backtest numbers and the record ids of canonical plans do not. No published number moved.
24
+
25
+ ## 0.11.3 - 2026-11-09
26
+
27
+ ### Changed
28
+
29
+ - The portable prompt's table is now by task kind, recorded risk and model (claim `cell_table`, replacing `kind_table`), with a pooled `all models` row per kind and risk and an `all kinds` row, and no range for rows under 30 runs, the estimator's own pooling threshold. The old table pooled every model, so its feature row was mostly Sonnet runs.
30
+ - The retired rows were: docs 21 runs 45 s / 3 min / 6 min; feature 1,353 runs 56 s / 3 min / 24 min; review 1,560 runs 2 min / 6 min / 12 min; other 445 runs 8 min / 24 min / 43 min.
31
+ - The new rows, as generated:
32
+
33
+ | Task kind | Recorded risk | Model | Runs | P50 | P80 | P90 |
34
+ |---|---|---|---:|---:|---:|---:|
35
+ | docs | normal | all models | 21 | too few runs | | |
36
+ | docs | normal | claude-sonnet-5-5 | 21 | too few runs | | |
37
+ | feature | normal | all models | 1,353 | 56 s | 3 min | 24 min |
38
+ | feature | normal | claude-sonnet-5-5 | 1,148 | 50 s | 2 min | 2 min |
39
+ | feature | normal | claude-opus-5-5 | 205 | 33 min | 66 min | 87 min |
40
+ | other | low | all models | 48 | 4 min | 13 min | 20 min |
41
+ | other | low | claude-sonnet-5-5 | 29 | too few runs | | |
42
+ | other | low | claude-opus-5-5 | 12 | too few runs | | |
43
+ | other | normal | all models | 397 | 9 min | 26 min | 44 min |
44
+ | other | normal | gpt-6.1-sol | 157 | 9 min | 18 min | 26 min |
45
+ | other | normal | claude-opus-5-5 | 95 | 24 min | 63 min | 83 min |
46
+ | other | normal | claude-sonnet-5-5 | 78 | 5 min | 15 min | 21 min |
47
+ | other | normal | claude-fable-5-1 | 46 | 11 min | 32 min | 41 min |
48
+ | other | normal | gpt-6-astra | 16 | too few runs | | |
49
+ | review | low | all models | 1,560 | 2 min | 6 min | 12 min |
50
+ | review | low | claude-opus-5-5 | 1,255 | 2 min | 5 min | 8 min |
51
+ | review | low | claude-fable-5-1 | 198 | 7 min | 15 min | 22 min |
52
+ | review | low | claude-sonnet-5-5 | 107 | 3 min | 12 min | 19 min |
53
+ | all kinds | all | all models | 3,383 | 2 min | 8 min | 20 min |
54
+
55
+ - The prompt now asks for the model and states the fallback order (the model's row, then the kind's `all models` row, then `all kinds`) instead of "the broadest fitting row". It says that recorded risk is the agent's role, not a rating of the work.
56
+ - The table counts completed runs with a positive duration, the estimator's own filter. No row is affected today.
57
+ - The site says recorded risk is the agent's role.
58
+ - The test that keeps data values inside claim markers now covers the portable prompt too, including each number in its table.
59
+
60
+ No run changed, and no number in the README, the backtest or the site moved. The portable prompt's table is regenerated from the same rows.
61
+
7
62
  ## 0.11.2 - 2026-11-09
8
63
 
9
64
  ### Changed
@@ -8,7 +8,7 @@ authors:
8
8
  repository-code: https://github.com/mohamedzhioua/agentpace
9
9
  url: https://mohamedzhioua.github.io/agentpace/
10
10
  license: MIT
11
- version: 0.11.2
11
+ version: 0.12.0
12
12
  date-released: 2026-11-09
13
13
  keywords:
14
14
  - coding agents
@@ -28,7 +28,7 @@ Rows from an experimental adapter (Gemini CLI, OpenCode, Cline) fail "Validate d
28
28
 
29
29
  ## Label your runs
30
30
 
31
- Metadata cannot tell a feature from a bug fix. Labels can: without them, bug fixes and refactors look like any other implementation run, so the `bugfix` and `refactor` cells stay thin until people label runs. Run `agentpace runs` to find a reference, then `agentpace label <ref> --kind bugfix --risk high`. Do this before `agentpace share`.
31
+ Metadata cannot tell a feature from a bug fix. Labels can: without them, bug fixes and refactors look like any other implementation run, so the `bugfix` and `refactor` cells stay thin until people label runs. Run `agentpace runs` to find a reference, then `agentpace label <ref> --kind bugfix`. Do this before `agentpace share`.
32
32
 
33
33
  ## Add a harness
34
34
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: agentpace
3
- Version: 0.11.2
3
+ Version: 0.12.0
4
4
  Summary: Stop estimating agent work in human weeks. agentpace measures how long coding agents actually take: P50/P80/P90 ranges from real Claude Code and Codex runs, the human part stated apart, never derived. Open CC0 dataset, zero-dependency Python CLI, agent skill.
5
5
  Project-URL: Homepage, https://mohamedzhioua.github.io/agentpace/
6
6
  Project-URL: Repository, https://github.com/mohamedzhioua/agentpace
@@ -83,7 +83,7 @@ The plan it estimated is [examples/plan.json](examples/plan.json), where each ta
83
83
  }
84
84
  ```
85
85
 
86
- To estimate your own, write a plan like it and run `agentpace estimate plan.json`, or pass `-` to read it from stdin. In a plan, `depends_on`, `risk` and `model` are optional. Effective parallelism is work divided by elapsed time. It can be below 1, because a session's clock includes the time between runs.
86
+ To estimate your own, write a plan like it and run `agentpace estimate plan.json`, or pass `-` to read it from stdin. In a plan, `depends_on` and `model` are optional, and `risk` can be left out: it defaults to the risk the rows record for the task's kind, because in the data risk is the agent's role, not a rating of the work. Effective parallelism is work divided by elapsed time. It can be below 1, because a session's clock includes the time between runs.
87
87
 
88
88
  Why a range and not one number? Agent run times have a long tail, so any single number misses most of the time. P50 is a coin flip, and P80 is the one to plan on.
89
89
 
@@ -306,7 +306,7 @@ Each of these does something better than agentpace:
306
306
  - **Not a model speed ranking.** People send harder work to stronger models, so a slower row may just mean harder tasks.
307
307
  - **`feature` means any implementation work.** Without reading prompts, metadata cannot separate features, bug fixes and refactors. Those kinds stay thin until people label runs.
308
308
  - **Retries are not separated.** A run's duration includes any test-fix loop inside it. `retries` counts errored tool results, a proxy, because a real retry cannot be seen without reading content, and no field that describes what happened in a run (`retries`, `tool_calls`, `tokens`, `outcome`) ever predicts a duration. Codex upkeep sessions (`compact`) are skipped; nothing else is split out.
309
- - **Pooled by kind, risk and model only.** A cell with fewer than 30 runs leans on broader cells, with a warning. Repository size is not recorded, and `size` is an edit count measured after the run, so neither can segment the published runs. Long integration work has no cell of its own.
309
+ - **Pooled by kind, risk and model only.** A cell with fewer than 30 runs leans on broader cells, with a warning. Repository size is not recorded, and `size` is an edit count measured after the run, so neither can segment the published runs. Long integration work has no cell of its own. `risk` in the rows is the agent's role (review and research agents `low`, migration agents `high`, all else `normal`), and a plan's `risk` is read the same way, so marking a task `high` does not lengthen its range.
310
310
  - **Two harnesses, still one person.** The published rows hold Claude Code subagent runs and, since 0.6.0, Codex turns, all from the same contributor. Codex is scored on its own, never in the headline. Each Codex exec session is a single turn, so the session effect and the parallelism factor learn nothing from Codex, and a Codex plan borrows Claude Code's session structure. Gemini CLI, OpenCode and Cline have experimental adapters: built from each tool's source, not yet verified on real sessions, with no published rows (`validate` rejects them until each adapter is verified; [how to verify one](docs/verify-adapter.md)), and problems go in an [issue](https://github.com/mohamedzhioua/agentpace/issues). Other harnesses have no adapter.
311
311
  - **No human allowance, and short waits sit inside the clock.** The plan total is a forecast on the session clock, which counts agent runs and the gaps between them, each gap up to the idle cap (900 s in the published rows). So a wait on you shorter than that sits inside the total, a longer one is clipped at the cap, and no allowance for review, testing or decisions is added. Every estimate says so on its own lines and never derives the human part from agent time. `agentpace turns` measures your own wait per human turn from your main-session timestamps and keeps it on your machine. That is elapsed time, not effort, shown beside the range and never added to it.
312
312
  - **Failed runs are under-counted.** Only runs with a clear completion signal train the estimator, so P90 may run low. Recorded runs that did not complete (failed or unknown), by harness: <!-- claim:not_completed_by_harness -->claude-code 13 of 3,219 (0.4%), codex 34 of 211 (16.1%)<!-- /claim -->. Those are harness outcomes, not task acceptance, and every estimate prints the counts for the rows it loaded.
@@ -56,7 +56,7 @@ The plan it estimated is [examples/plan.json](examples/plan.json), where each ta
56
56
  }
57
57
  ```
58
58
 
59
- To estimate your own, write a plan like it and run `agentpace estimate plan.json`, or pass `-` to read it from stdin. In a plan, `depends_on`, `risk` and `model` are optional. Effective parallelism is work divided by elapsed time. It can be below 1, because a session's clock includes the time between runs.
59
+ To estimate your own, write a plan like it and run `agentpace estimate plan.json`, or pass `-` to read it from stdin. In a plan, `depends_on` and `model` are optional, and `risk` can be left out: it defaults to the risk the rows record for the task's kind, because in the data risk is the agent's role, not a rating of the work. Effective parallelism is work divided by elapsed time. It can be below 1, because a session's clock includes the time between runs.
60
60
 
61
61
  Why a range and not one number? Agent run times have a long tail, so any single number misses most of the time. P50 is a coin flip, and P80 is the one to plan on.
62
62
 
@@ -279,7 +279,7 @@ Each of these does something better than agentpace:
279
279
  - **Not a model speed ranking.** People send harder work to stronger models, so a slower row may just mean harder tasks.
280
280
  - **`feature` means any implementation work.** Without reading prompts, metadata cannot separate features, bug fixes and refactors. Those kinds stay thin until people label runs.
281
281
  - **Retries are not separated.** A run's duration includes any test-fix loop inside it. `retries` counts errored tool results, a proxy, because a real retry cannot be seen without reading content, and no field that describes what happened in a run (`retries`, `tool_calls`, `tokens`, `outcome`) ever predicts a duration. Codex upkeep sessions (`compact`) are skipped; nothing else is split out.
282
- - **Pooled by kind, risk and model only.** A cell with fewer than 30 runs leans on broader cells, with a warning. Repository size is not recorded, and `size` is an edit count measured after the run, so neither can segment the published runs. Long integration work has no cell of its own.
282
+ - **Pooled by kind, risk and model only.** A cell with fewer than 30 runs leans on broader cells, with a warning. Repository size is not recorded, and `size` is an edit count measured after the run, so neither can segment the published runs. Long integration work has no cell of its own. `risk` in the rows is the agent's role (review and research agents `low`, migration agents `high`, all else `normal`), and a plan's `risk` is read the same way, so marking a task `high` does not lengthen its range.
283
283
  - **Two harnesses, still one person.** The published rows hold Claude Code subagent runs and, since 0.6.0, Codex turns, all from the same contributor. Codex is scored on its own, never in the headline. Each Codex exec session is a single turn, so the session effect and the parallelism factor learn nothing from Codex, and a Codex plan borrows Claude Code's session structure. Gemini CLI, OpenCode and Cline have experimental adapters: built from each tool's source, not yet verified on real sessions, with no published rows (`validate` rejects them until each adapter is verified; [how to verify one](docs/verify-adapter.md)), and problems go in an [issue](https://github.com/mohamedzhioua/agentpace/issues). Other harnesses have no adapter.
284
284
  - **No human allowance, and short waits sit inside the clock.** The plan total is a forecast on the session clock, which counts agent runs and the gaps between them, each gap up to the idle cap (900 s in the published rows). So a wait on you shorter than that sits inside the total, a longer one is clipped at the cap, and no allowance for review, testing or decisions is added. Every estimate says so on its own lines and never derives the human part from agent time. `agentpace turns` measures your own wait per human turn from your main-session timestamps and keeps it on your machine. That is elapsed time, not effort, shown beside the range and never added to it.
285
285
  - **Failed runs are under-counted.** Only runs with a clear completion signal train the estimator, so P90 may run low. Recorded runs that did not complete (failed or unknown), by harness: <!-- claim:not_completed_by_harness -->claude-code 13 of 3,219 (0.4%), codex 34 of 211 (16.1%)<!-- /claim -->. Those are harness outcomes, not task acceptance, and every estimate prints the counts for the rows it loaded.
@@ -153,6 +153,8 @@ All math lives in `src/agentpace/estimate.py`. Fields used as predictors: `model
153
153
 
154
154
  `size` is accepted as the brief specifies, but it is ignored by default. Stored `size` is an edit count measured after the run (F6), and a user's S/M/L guess made before the run is a different quantity. `--use-size` opts in, and the output names the oracle-size track. Phase 4 shows what that costs or gains. If the backtest supports it, this default can change.
155
155
 
156
+ `risk` is read the same way (0.12.0). In the rows, `risk` is the agent's role, set by the classifier (section 4). A plan's `risk` is a judgment about the work, which no row records. So a task's risk is looked up as written only where the rows can record that kind at that risk; any other value, and an omitted one, takes the kind's recorded risk, and the output names the tasks it changed. `--use-risk` looks every written value up as given, for datasets whose labelled rows hold other pairs. The rule lives at the plan boundary (`tasks_from_json`), never in `fit` or `locate`, so training, the back-off order and the backtest's held-out queries are unchanged, and the frozen selection stands without re-registration.
157
+
156
158
  **Single-task distribution, on the log scale**
157
159
 
158
160
  *Superseded:* this section first gave every run a session weight of `1 / sqrt(runs in that session)` (F2), with `n_eff` the Kish effective size under those weights. The pre-registered selection chose the unweighted `shrunk` (section 11), so the default is unweighted and `n_eff` equals `n`. Session weighting survives only as the `weighted` candidate.
@@ -100,7 +100,7 @@ stdout: `labeled <ref>: <kind>, <risk> risk`.
100
100
  ## estimate
101
101
 
102
102
  ```text
103
- agentpace estimate (PLAN | - | --example) [--data PATH]... [--method NAME] [--use-size] [--draws N] [--seed N] [--json] [--turns FILE] [--record] [--quoted TEXT] [--review-capacity TEXT]
103
+ agentpace estimate (PLAN | - | --example) [--data PATH]... [--method NAME] [--use-size] [--use-risk] [--draws N] [--seed N] [--json] [--turns FILE] [--record] [--quoted TEXT] [--review-capacity TEXT]
104
104
  ```
105
105
 
106
106
  Simulates a plan of tasks and prints P50, P80 and P90 per task (agent run time) and for the plan (its span on the session clock).
@@ -112,6 +112,7 @@ Simulates a plan of tasks and prints P50, P80 and P90 per task (agent run time)
112
112
  | `--data PATH` | the seed data plus `~/.agentpace/runs.jsonl` if it exists | A rows file or folder. Repeatable. When given, only these rows are used. |
113
113
  | `--method` | `shrunk` | One of `global`, `kind`, `backoff`, `shrunk`, `weighted`. The default is the backtest's pre-registered winner. |
114
114
  | `--use-size` | off | Use `size`. An oracle track, because stored size is measured after a run. |
115
+ | `--use-risk` | off | Look each task's `risk` up as written, as a recorded category (review and research agents `low`, migration agents `high`, all else `normal`), even where no recorded run has that kind at that risk. By default such a task takes its kind's recorded risk; see `risk` under Plan JSON. |
115
116
  | `--draws` | `20000` | Simulations. At least 100. |
116
117
  | `--seed` | `20261107` | Random seed. The same plan, data and seed give the same result. |
117
118
  | `--json` | off | Print the result as JSON instead of text. |
@@ -158,12 +159,12 @@ Each task:
158
159
  |---|---|---|---|
159
160
  | `id` | string or integer | required | Unique within the plan. An integer is read as its string form. |
160
161
  | `kind` | string | required | One of `feature`, `bugfix`, `refactor`, `migration`, `tests`, `docs`, `review`, `other`. |
161
- | `risk` | string | `normal` | One of `low`, `normal`, `high`. |
162
+ | `risk` | string or `null` | the kind's recorded risk: `low` for `review`, `high` for `migration`, else `normal` | One of `low`, `normal`, `high`. In the rows, risk is the agent's role, not a rating of the work. A written value is used when the rows can record that kind at that risk (`review` low, `migration` high, `other` low for research or normal, all else normal); any other value takes the kind's recorded risk and a warning names the task; `--use-risk` looks every written value up as given. |
162
163
  | `size` | string or `null` | `null` | One of `S`, `M`, `L`, `XL`, `na`. Ignored, with a warning, unless `--use-size` is given. |
163
164
  | `model` | string or `null` | the plan's `model` | Overrides the plan's model for this task. An explicit `null` means no model for this task; it does not inherit the plan's `model`. |
164
165
  | `depends_on` | list of task ids | `[]` | Tasks that must finish before this one starts. Each must be in the plan, and the graph must have no cycle. |
165
166
 
166
- The plan holds no durations: every number comes from the data. A task with a model draws from the model × kind × risk cell, and one without from kind × risk. A model name the data has never seen falls back to the broader cell with a wider interval and a warning, so use the model family as it appears in `agentpace runs`, such as `claude-opus-5-5`.
167
+ The plan holds no durations: every number comes from the data. A task with a model draws from the model × kind × risk cell, and one without from kind × risk. A model name the data has never seen falls back to the broader cell with a wider interval and a warning, so use the model family as it appears in `agentpace runs`, such as `claude-opus-5-5`. A cell with no recorded run gets a warning that names the level that had none (kind, risk or model), which of the task's levels were therefore not used, where the mean and the residuals came from, and what is recorded under the broader cell. A cell with too few runs to stand alone gets one that says its mean was shrunk toward broader cells and names the cell its residuals were pooled from. A written risk the rows cannot record at that kind gets one that names each such task with its risk as written and the risk used.
167
168
 
168
169
  A plan that breaks these rules is refused with exit 2. A field problem is reported by the task's position and the rule (`task #2: ...`), never by the plan's text. A dependency on an id that is not in the plan is reported with both ids; a duplicate id or a cycle is reported as such. `model` must be a string or `null`, at plan and task level.
169
170
 
@@ -173,7 +174,8 @@ A plan that breaks these rules is refused with exit 2. A field problem is report
173
174
  "model": "claude-opus-5-5",
174
175
  "tasks": [
175
176
  { "id": "schema", "kind": "feature" },
176
- { "id": "api", "kind": "feature", "risk": "high", "depends_on": ["schema"] },
177
+ { "id": "research", "kind": "other", "risk": "low" },
178
+ { "id": "api", "kind": "feature", "depends_on": ["schema"] },
177
179
  { "id": "docs", "kind": "docs", "model": null, "depends_on": ["api"] }
178
180
  ]
179
181
  }
@@ -200,7 +202,7 @@ One JSON object. Every duration is in seconds, as a number.
200
202
  | `outcomes` | object | Recorded harness outcomes of every row the estimate loaded, after duplicates are dropped, and never per cell: `rows`, `completed`, `failed`, `unknown`, `completed_without_duration` (completed rows with a duration of 0), and `by_harness`, a list sorted by harness name of objects with `harness`, `rows`, `completed`, `failed` and `unknown`. An outcome is how the run ended in its harness, not task acceptance, and `unknown` is not counted as a failure. The counts are shown, never used to change the range. `rows` is `completed` + `failed` + `unknown`, `rows_used` is `completed` - `completed_without_duration`, and `rows_excluded` is `failed` + `unknown` + `completed_without_duration`. |
201
203
  | `draws` | integer | Simulations run. |
202
204
  | `seed` | integer | The random seed. |
203
- | `warnings` | list of strings | Thin or unseen cells, ignored sizes, an assumed parallelism. Pass them on. |
205
+ | `warnings` | list of strings | Thin or unseen cells, ignored sizes, a written risk the estimate did not use, an assumed parallelism. Pass them on. |
204
206
  | `human` | object | The human part. `status` is `not measured` or `measured`, and `included_in_total` is always `false`: no allowance for the human part is added to the total (waits shorter than the idle cap sit inside the session clock already). When measured, it also holds `source`, `per_turn_p50`, `per_turn_p80`, `per_turn_p90` (seconds per human turn), `gaps` and `sessions`. With `--review-capacity`, it holds `review_capacity_stated`, your text as given, stripped. Keys without a value are left out. |
205
207
 
206
208
  The JSON output does not change with `--record` or `--quoted`.
@@ -228,7 +228,7 @@
228
228
 
229
229
  <section aria-labelledby="board-title">
230
230
  <h2 id="board-title">Times by model, kind and risk</h2>
231
- <p class="section-note">Completed runs only. Grey rows have fewer than 10 runs, so treat them as anecdotes.</p>
231
+ <p class="section-note">Completed runs only. Grey rows have fewer than 10 runs, so treat them as anecdotes. Risk is the agent's role as recorded (review and research agents low, migration agents high, all else normal), not a rating of the work.</p>
232
232
  <div class="filters">
233
233
  <label>Model <select id="filter-model"></select></label>
234
234
  <label>Kind <select id="filter-kind"></select></label>
@@ -48,7 +48,7 @@ If they do not want to install anything, use [assets/portable-prompt.md](assets/
48
48
  agentpace estimate plan.json
49
49
  ```
50
50
 
51
- Kinds: `feature`, `bugfix`, `refactor`, `migration`, `tests`, `docs`, `review`, `other`. Risks: `low`, `normal`, `high`. Use `risk: high` for migrations and for work that is hard to reverse. `model` is optional.
51
+ Kinds: `feature`, `bugfix`, `refactor`, `migration`, `tests`, `docs`, `review`, `other`, as the data records them: `feature` is implementation work of any kind, `review` a read-only review, `other` anything else; research is `other` with `risk: low`. Leave `risk` out otherwise: in the rows it is the agent's role, not how hard or how reversible the work is, so `high` buys nothing and the output says when a written risk was not used. Set `model` whenever you know which model will run the task; it is the strongest split in the data. `bugfix`, `refactor` and `migration` have few or no seed runs: an estimate with them leans on broader runs, up to all runs, and says so; pass that on rather than relabel the work.
52
52
 
53
53
  ## Re-answer a human quote
54
54
 
@@ -65,9 +65,9 @@ If the user wants to see later which number held, offer the same command with `-
65
65
  ## Report the result
66
66
 
67
67
  - Lead with the plan total as a range: P50, P80 and P90, on the session clock. Recommend P80 for planning.
68
- - Pass on the session-clock line and the human part line as the CLI prints them. The first says that gaps between runs count toward the total up to the idle cap, so short waits on the user sit inside it. Unmeasured, the human part line says no allowance for review, testing, decisions and waiting between agent turns is added. Measured by `agentpace turns`, it quotes the user's own wait per human turn, from their local history. Either way, do not derive a number for it from the agent time, and do not multiply the per-turn wait by a guessed number of turns. If the user gives their own figure, repeat it and label it as theirs. If they state their review capacity, such as "4 PRs a day", pass it verbatim with `--review-capacity "<figure>"`, relay the `Review capacity:` line as printed, and never turn it into a timeline.
68
+ - Pass on the session-clock line and the human part line as the CLI prints them. The first says that gaps between runs count toward the total up to the idle cap, so short waits on the user sit inside it. Unmeasured, the human part line says no allowance for review, testing, decisions and waiting between agent turns is added. Measured by `agentpace turns`, it quotes the user's own wait per human turn, from their local history. Either way, do not derive a number for it from the agent time, and do not multiply the per-turn wait by a guessed number of turns. If the user gives their own figure, repeat it and label it as theirs. If they state their review capacity, such as "4 PRs a day", pass it verbatim with `--review-capacity "<figure>"`, relay the `Review capacity:` line as printed, and never turn it into a timeline. Pass the figure itself, not the sentence around it, in at most 80 characters; if it does not fit, leave the flag off and repeat the user's figure as theirs beside the result.
69
69
  - Name the critical path and the effective parallelism.
70
- - Pass every warning on. A warning means a cell had too few runs, so that range leans on broader data.
70
+ - Pass every warning on, as printed. One names a cell with no or few recorded runs and says what the range could not use (the kind, the risk level or the model) and where it leaned instead; one says a written risk or size was not used; one says parallelism was assumed.
71
71
  - Do not state a single number, even when pressed. If someone needs one figure to plan around, give the P80 and call it the P80.
72
72
 
73
73
  ## Limits to state when they matter
@@ -0,0 +1,48 @@
1
+ # Portable prompt
2
+
3
+ Paste everything below this line into any assistant that cannot run the agentpace CLI. It gives a rule of thumb, not the CLI's range: there is no simulation and no learned throughput.
4
+
5
+ ---
6
+
7
+ You estimate how long software work will take when coding agents do the implementation. Use this whenever someone asks how long a feature, fix, plan or roadmap will take, even if they do not mention agents. Use the measured durations below, not human-team timelines. Always answer with a range: P50, P80 and P90. Never give a single number.
8
+
9
+ Measured durations of completed agent runs (Claude Code subagents and Codex turns), from one person's real history, by task kind, recorded risk and model:
10
+
11
+ <!-- claim:cell_table -->
12
+ | Task kind | Recorded risk | Model | Runs | P50 | P80 | P90 |
13
+ |---|---|---|---:|---:|---:|---:|
14
+ | docs | normal | all models | 21 | too few runs | | |
15
+ | docs | normal | claude-sonnet-5-5 | 21 | too few runs | | |
16
+ | feature | normal | all models | 1,353 | 56 s | 3 min | 24 min |
17
+ | feature | normal | claude-sonnet-5-5 | 1,148 | 50 s | 2 min | 2 min |
18
+ | feature | normal | claude-opus-5-5 | 205 | 33 min | 66 min | 87 min |
19
+ | other | low | all models | 48 | 4 min | 13 min | 20 min |
20
+ | other | low | claude-sonnet-5-5 | 29 | too few runs | | |
21
+ | other | low | claude-opus-5-5 | 12 | too few runs | | |
22
+ | other | normal | all models | 397 | 9 min | 26 min | 44 min |
23
+ | other | normal | gpt-6.1-sol | 157 | 9 min | 18 min | 26 min |
24
+ | other | normal | claude-opus-5-5 | 95 | 24 min | 63 min | 83 min |
25
+ | other | normal | claude-sonnet-5-5 | 78 | 5 min | 15 min | 21 min |
26
+ | other | normal | claude-fable-5-1 | 46 | 11 min | 32 min | 41 min |
27
+ | other | normal | gpt-6-astra | 16 | too few runs | | |
28
+ | review | low | all models | 1,560 | 2 min | 6 min | 12 min |
29
+ | review | low | claude-opus-5-5 | 1,255 | 2 min | 5 min | 8 min |
30
+ | review | low | claude-fable-5-1 | 198 | 7 min | 15 min | 22 min |
31
+ | review | low | claude-sonnet-5-5 | 107 | 3 min | 12 min | 19 min |
32
+ | all kinds | all | all models | 3,383 | 2 min | 8 min | 20 min |
33
+ <!-- /claim -->
34
+
35
+ Recorded risk is the agent's role in the run, not a rating of the work: read-only review and research agents are `low`, migration agents `high`, everything else `normal`. A row with fewer than 30 runs shows no range: 30 is the estimator's own pooling threshold, and this prompt cannot widen an interval the way the agentpace CLI does. Slower rows for stronger models reflect what those models were given, not their speed.
36
+
37
+ To estimate:
38
+
39
+ 1. Break the work into separate agent tasks. Give each one the kind the data records for it (`feature` is implementation work of any kind, `review` a read-only review, `docs`, `tests`, and `other` for anything else; research is `other` at recorded risk `low`) and the model that will run it. Ask for the model if it is not known.
40
+ 2. Take the row for that kind, risk and model. If there is none, or it shows no range, use the `all models` row for that kind and risk and say that it pools models. If that row is missing or shows no range too, use the `all kinds` row and say so. Never present another row's numbers as the task's own.
41
+ 3. For a single task, report its row as it is.
42
+ 4. For a plan, work out the P50 total as the larger of two numbers: the P50 values added up along the longest chain of tasks that depend on each other, and the P50 values of all tasks added up and divided by the number of agents running at once.
43
+ 5. Multiply that P50 total by <!-- claim:plan_width80 -->2.0x<!-- /claim --> for the P80 and by <!-- claim:plan_width -->2.7x<!-- /claim --> for the P90. Those are the typical ratios between the CLI's plan ranges in its published whole-session test. Say this is a rule of thumb, and that the agentpace CLI gives the real range.
44
+ 6. Say which chain is the critical path.
45
+ 7. State the human part on its own line: "Human part (review, testing, decisions, waiting between agent turns): not measured. No allowance for it is added to the total above." Do not derive it from the agent time, and do not invent a number for it. If the user gives their own figure, repeat it and label it as theirs.
46
+ 8. If someone already quoted a timeline in days, weeks or months, show it beside your range, label it unverified, and do not divide it by any constant. Never say what the difference between the quote and your range is, and never call it the human part.
47
+
48
+ If the user asks for one number, give the P80 and call it the P80.
@@ -2,7 +2,7 @@
2
2
 
3
3
  Use this page to answer questions about the method. It is not needed for a routine estimate.
4
4
 
5
- **A task.** The estimator finds the closest cell of past runs by kind, risk and model. A thin cell leans on broader cells, so a cell with few runs gets a wider range and a warning.
5
+ **A task.** The estimator finds the closest cell of past runs by kind, risk and model. A thin cell leans on broader cells, so a cell with few runs gets a wider range and a warning. Risk is the agent's role as recorded, not a rating of the work; a plan's risk is read the same way.
6
6
 
7
7
  **A plan.** Each simulation draws a duration for every task, then takes the longer of two limits: the longest dependency path, and the total work divided by the throughput real sessions achieved at that agent cap. Tasks in one plan share a session effect, because they share a repo, a model and a day. Without it, the total of many tasks would come out falsely narrow.
8
8
 
@@ -26,6 +26,6 @@ The plan to estimate: $ARGUMENTS
26
26
  }
27
27
  ```
28
28
 
29
- Kinds: `feature`, `bugfix`, `refactor`, `migration`, `tests`, `docs`, `review`, `other`. Risks: `low`, `normal`, `high`.
30
- 3. Run `agentpace estimate <file>`. If the conversation already holds a timeline in days, weeks or months, add `--quoted "<quote>"` in the words it was given. Only if the user stated their own review capacity, such as "4 PRs a day", add `--review-capacity "<figure>"` with their words verbatim.
31
- 4. Report the total as P50, P80 and P90, then the `Quoted:` line as printed when there is one, then the session-clock line and the human part line exactly as the CLI prints them, and the `Review capacity:` line as printed when there is one, never turned into a timeline, then the critical path, the effective parallelism and every warning. Do not derive a number for the human part from the agent time. Never convert the quote, compare it with the range, say what the difference between them is, or say what the quote counts: it is calendar time, as quoted, and nothing has checked it. Never reduce the result to one number.
29
+ Kinds: `feature`, `bugfix`, `refactor`, `migration`, `tests`, `docs`, `review`, `other`; `feature` is implementation work of any kind, and research is `other` with `risk: low`. Leave `risk` out otherwise: in the rows it is the agent's role, not how hard the work is, so `high` buys nothing. Set `model` whenever you know it; it is the strongest split in the data.
30
+ 3. Run `agentpace estimate <file>`. If the conversation already holds a timeline in days, weeks or months, add `--quoted "<quote>"` in the words it was given. Only if the user stated their own review capacity, such as "4 PRs a day", add `--review-capacity "<figure>"` with their words verbatim: the figure itself, in at most 80 characters; otherwise leave the flag off and repeat their figure as theirs.
31
+ 4. Report the total as P50, P80 and P90, then the `Quoted:` line as printed when there is one, then the session-clock line and the human part line exactly as the CLI prints them, and the `Review capacity:` line as printed when there is one, never turned into a timeline, then the critical path, the effective parallelism and every warning as printed. Do not derive a number for the human part from the agent time. Never convert the quote, compare it with the range, say what the difference between them is, or say what the quote counts: it is calendar time, as quoted, and nothing has checked it. Never reduce the result to one number.
@@ -1,3 +1,3 @@
1
1
  """agentpace: real run times for coding agents, as P50/P80/P90 ranges."""
2
2
 
3
- __version__ = "0.11.2"
3
+ __version__ = "0.12.0"
@@ -22,19 +22,38 @@ _MARKER = re.compile(r"<!-- claim:([a-z0-9_]+) -->(.*?)<!-- /claim -->", re.DOTA
22
22
  _MIN_TABLE_ROWS = 10
23
23
 
24
24
 
25
- def _kind_table(rows: Sequence[Row]) -> str:
26
- completed = [row for row in rows if row["outcome"] == "completed"]
27
- entries = []
28
- for kind in sorted({row["task_kind"] for row in completed}):
29
- values = sorted(row["duration_s"] for row in completed if row["task_kind"] == kind)
30
- if len(values) >= _MIN_TABLE_ROWS:
31
- entries.append((kind, len(values), *(est.quantile(values, q) for q in est.QUANTILES)))
32
- entries.sort(key=lambda entry: entry[2])
33
- lines = ["| Task kind | Runs | P50 | P80 | P90 |", "|---|---:|---:|---:|---:|"]
34
- lines += [
35
- f"| {kind} | {n:,} | {render.duration(p50)} | {render.duration(p80)} | "
36
- f"{render.duration(p90)} |"
37
- for kind, n, p50, p80, p90 in entries
25
+ def _cell_table(rows: Sequence[Row]) -> str:
26
+ """Durations by task kind, recorded risk and model, in the order the CLI backs off.
27
+
28
+ Each `(task_kind, risk)` group lists its pooled row first, then its models; the `all kinds`
29
+ row is last. A row needs `_MIN_TABLE_ROWS` runs to be listed and `est.POOL_MIN` to show a range.
30
+ """
31
+ usable = [row for row in rows if row["outcome"] == "completed" and row["duration_s"] > 0]
32
+
33
+ def line(kind: str, risk: str, model: str, chosen: Sequence[Row]) -> str | None:
34
+ if len(chosen) < _MIN_TABLE_ROWS:
35
+ return None
36
+ if len(chosen) < est.POOL_MIN:
37
+ cells = "too few runs | |"
38
+ else:
39
+ values = sorted(row["duration_s"] for row in chosen)
40
+ cells = " | ".join(render.duration(est.quantile(values, q)) for q in est.QUANTILES)
41
+ return f"| {kind} | {risk} | {model} | {len(chosen):,} | {cells} |"
42
+
43
+ entries: list[str | None] = []
44
+ for kind, risk in sorted({(row["task_kind"], row["risk"]) for row in usable}):
45
+ group = [row for row in usable if row["task_kind"] == kind and row["risk"] == risk]
46
+ entries.append(line(kind, risk, "all models", group))
47
+ counts: dict[str, int] = {}
48
+ for row in group:
49
+ counts[row["model"]] = counts.get(row["model"], 0) + 1
50
+ for model in sorted(counts, key=lambda name: (-counts[name], name)):
51
+ entries.append(line(kind, risk, model, [r for r in group if r["model"] == model]))
52
+ entries.append(line("all kinds", "all", "all models", usable))
53
+ lines = [
54
+ "| Task kind | Recorded risk | Model | Runs | P50 | P80 | P90 |",
55
+ "|---|---|---|---:|---:|---:|---:|",
56
+ *(entry for entry in entries if entry is not None),
38
57
  ]
39
58
  return "\n" + "\n".join(lines) + "\n"
40
59
 
@@ -160,7 +179,7 @@ def values(
160
179
  "contributor_split": contributor,
161
180
  "loss_count": str(len(report["losses"])),
162
181
  "not_completed_by_harness": _not_completed_by_harness(rows),
163
- "kind_table": _kind_table(rows),
182
+ "cell_table": _cell_table(rows),
164
183
  "example_output": _example_output(rows, plan_path),
165
184
  "quote_example_output": _example_output(rows, quote_plan_path, QUOTE_EXAMPLE),
166
185
  }
@@ -43,6 +43,25 @@ def classify_risk(agent_type: str | None, kind: str) -> str:
43
43
  return "normal"
44
44
 
45
45
 
46
+ RECORDED_RISKS: Mapping[str, frozenset[str]] = {
47
+ "review": frozenset({"low"}),
48
+ "migration": frozenset({"high"}),
49
+ "other": frozenset({"low", "normal"}),
50
+ }
51
+
52
+
53
+ def kind_default_risk(kind: str) -> str:
54
+ return {"review": "low", "migration": "high"}.get(kind, "normal")
55
+
56
+
57
+ def recorded_risk(kind: str, risk: str | None) -> str:
58
+ """The risk a plan task is looked up at: as written when the rows can record that kind at that
59
+ risk, else the kind's recorded risk."""
60
+ if risk is not None and risk in RECORDED_RISKS.get(kind, frozenset({"normal"})):
61
+ return risk
62
+ return kind_default_risk(kind)
63
+
64
+
46
65
  def size_bucket(edit_calls: int) -> str:
47
66
  """Measured after the run, so it is kept out of the default forecast."""
48
67
  if edit_calls == 0:
@@ -304,7 +304,7 @@ def cmd_estimate(args: argparse.Namespace) -> int:
304
304
  document = json.loads(text)
305
305
  except json.JSONDecodeError:
306
306
  raise ValueError("the plan is not valid JSON") from None
307
- tasks, cap = estimate.tasks_from_json(document)
307
+ tasks, cap = estimate.tasks_from_json(document, args.use_risk)
308
308
  rows = _dataset(args.data)
309
309
  # Only the default pool takes in rows unasked; rows passed with --data were chosen.
310
310
  experimental = None if args.data else _experimental_rows_note(rows)
@@ -659,6 +659,13 @@ def build_parser() -> argparse.ArgumentParser:
659
659
  action="store_true",
660
660
  help="use size: an oracle track, because stored size is measured after a run",
661
661
  )
662
+ estimate_cmd.add_argument(
663
+ "--use-risk",
664
+ action="store_true",
665
+ help="use each task's risk as written, as a recorded category (review and research agents "
666
+ "low, migration agents high, all else normal), even where no recorded run has that kind "
667
+ "at that risk; by default such a task takes its kind's recorded risk",
668
+ )
662
669
  estimate_cmd.add_argument("--draws", type=int, default=estimate.DEFAULT_DRAWS)
663
670
  estimate_cmd.add_argument("--seed", type=int, default=estimate.DEFAULT_SEED)
664
671
  estimate_cmd.add_argument("--json", action="store_true", help="machine-readable output")
@@ -38,6 +38,7 @@ from collections.abc import Iterable, Mapping, Sequence
38
38
  from dataclasses import dataclass, field
39
39
  from typing import Any
40
40
 
41
+ from agentpace import classify
41
42
  from agentpace.schema import Row
42
43
 
43
44
  QUANTILES = (0.5, 0.8, 0.9)
@@ -479,6 +480,8 @@ class Task:
479
480
  size: str | None = None
480
481
  model: str | None = None
481
482
  depends_on: tuple[str, ...] = ()
483
+ # The plan's risk as written, kept to say when the lookup used another; None when omitted.
484
+ risk_given: str | None = None
482
485
 
483
486
 
484
487
  @dataclass(frozen=True)
@@ -635,6 +638,18 @@ def _warnings(model: Model, tasks: Sequence[Task], located: Mapping[str, Located
635
638
  "size ignored: stored size is measured after a run, so it is left out unless you "
636
639
  "pass --use-size."
637
640
  )
641
+ changed = [
642
+ f"{task.id} ({task.risk_given} -> {task.risk})"
643
+ for task in tasks
644
+ if task.risk_given is not None and task.risk_given != task.risk
645
+ ]
646
+ if changed:
647
+ notes.append(
648
+ f"risk as written was not used for {', '.join(changed)}: in the recorded runs, risk "
649
+ "is the agent's role (review and research agents low, migration agents high, "
650
+ "everything else normal), not how hard or how reversible the work is, so each took "
651
+ "the risk recorded for its kind. Pass --use-risk to look the values up as written."
652
+ )
638
653
  return notes
639
654
 
640
655
 
@@ -780,8 +795,12 @@ def cell_quantiles(
780
795
  return p50, p80, p90
781
796
 
782
797
 
783
- def tasks_from_json(document: Any) -> tuple[list[Task], int]:
784
- """Validate a plan document. Errors name the problem, never the document's text."""
798
+ def tasks_from_json(document: Any, use_risk: bool = False) -> tuple[list[Task], int]:
799
+ """Validate a plan document. Errors name the problem, never the document's text.
800
+
801
+ A task's risk is looked up as written only where the rows can record that kind at that risk;
802
+ any other value, and an omitted one, takes the kind's recorded risk. `use_risk=True` keeps
803
+ every written value. The rule lives here, at the plan boundary, never in `fit` or `locate`."""
785
804
  from agentpace import schema
786
805
 
787
806
  if not isinstance(document, dict) or not isinstance(document.get("tasks"), list):
@@ -800,9 +819,10 @@ def tasks_from_json(document: Any) -> tuple[list[Task], int]:
800
819
  kind = item.get("kind")
801
820
  if kind not in schema.enum("task_kind"):
802
821
  raise ValueError(f"{where}: kind must be one of {schema.enum('task_kind')}")
803
- risk = item.get("risk", "normal")
804
- if risk not in schema.enum("risk"):
822
+ given = item.get("risk")
823
+ if given is not None and given not in schema.enum("risk"):
805
824
  raise ValueError(f"{where}: risk must be one of {schema.enum('risk')}")
825
+ risk = given if (use_risk and given is not None) else classify.recorded_risk(kind, given)
806
826
  size = item.get("size")
807
827
  if size is not None and size not in schema.enum("size"):
808
828
  raise ValueError(f"{where}: size must be one of {schema.enum('size')}")
@@ -820,6 +840,7 @@ def tasks_from_json(document: Any) -> tuple[list[Task], int]:
820
840
  size=size,
821
841
  model=item.get("model", plan_model),
822
842
  depends_on=tuple(str(dependency) for dependency in dependencies),
843
+ risk_given=given,
823
844
  )
824
845
  )
825
846
  return tasks, cap