python-yama 0.10.4__tar.gz → 0.10.6__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 (76) hide show
  1. {python_yama-0.10.4 → python_yama-0.10.6}/PKG-INFO +7 -6
  2. {python_yama-0.10.4 → python_yama-0.10.6}/README.md +6 -5
  3. {python_yama-0.10.4 → python_yama-0.10.6}/README.zh-CN.md +6 -5
  4. {python_yama-0.10.4 → python_yama-0.10.6}/docs/agent-skill-test-framework-design.md +47 -30
  5. {python_yama-0.10.4 → python_yama-0.10.6}/docs/case-schema-reference.md +5 -4
  6. python_yama-0.10.6/docs/superpowers/plans/2026-08-17-concurrency-defaults.md +249 -0
  7. python_yama-0.10.6/docs/superpowers/plans/2026-08-17-step-timeout-failure.md +489 -0
  8. python_yama-0.10.6/docs/superpowers/specs/2026-08-17-concurrency-defaults-design.md +50 -0
  9. python_yama-0.10.6/docs/superpowers/specs/2026-08-17-step-timeout-failure-design.md +116 -0
  10. {python_yama-0.10.4 → python_yama-0.10.6}/docs/yama-intro.html +4 -4
  11. {python_yama-0.10.4 → python_yama-0.10.6}/skills/eval-plugin-with-yama/SKILL.md +18 -13
  12. {python_yama-0.10.4 → python_yama-0.10.6}/skills/eval-plugin-with-yama/references/case-schema.md +6 -4
  13. {python_yama-0.10.4 → python_yama-0.10.6}/skills/eval-plugin-with-yama/references/debugging.md +18 -7
  14. {python_yama-0.10.4 → python_yama-0.10.6}/tests/test_cli.py +306 -7
  15. {python_yama-0.10.4 → python_yama-0.10.6}/tests/test_runner.py +129 -10
  16. {python_yama-0.10.4 → python_yama-0.10.6}/tests/test_thread_case.py +1 -1
  17. {python_yama-0.10.4 → python_yama-0.10.6}/tests/test_workspace.py +30 -0
  18. {python_yama-0.10.4 → python_yama-0.10.6}/yama/cli.py +64 -17
  19. {python_yama-0.10.4 → python_yama-0.10.6}/yama/runner.py +79 -10
  20. {python_yama-0.10.4 → python_yama-0.10.6}/yama/workspace.py +1 -0
  21. {python_yama-0.10.4 → python_yama-0.10.6}/.github/workflows/publish.yml +0 -0
  22. {python_yama-0.10.4 → python_yama-0.10.6}/.gitignore +0 -0
  23. {python_yama-0.10.4 → python_yama-0.10.6}/CLAUDE.md +0 -0
  24. {python_yama-0.10.4 → python_yama-0.10.6}/LICENSE +0 -0
  25. {python_yama-0.10.4 → python_yama-0.10.6}/pyproject.toml +0 -0
  26. {python_yama-0.10.4 → python_yama-0.10.6}/skills/eval-plugin-with-yama/references/install-upgrade.md +0 -0
  27. {python_yama-0.10.4 → python_yama-0.10.6}/tests/test_assertions.py +0 -0
  28. {python_yama-0.10.4 → python_yama-0.10.6}/tests/test_cli_shim.py +0 -0
  29. {python_yama-0.10.4 → python_yama-0.10.6}/tests/test_dashboard.py +0 -0
  30. {python_yama-0.10.4 → python_yama-0.10.6}/tests/test_framework.py +0 -0
  31. {python_yama-0.10.4 → python_yama-0.10.6}/tests/test_judge_llm.py +0 -0
  32. {python_yama-0.10.4 → python_yama-0.10.6}/tests/test_llm.py +0 -0
  33. {python_yama-0.10.4 → python_yama-0.10.6}/tests/test_main_entrypoint.py +0 -0
  34. {python_yama-0.10.4 → python_yama-0.10.6}/tests/test_mocks.py +0 -0
  35. {python_yama-0.10.4 → python_yama-0.10.6}/tests/test_openai_llm.py +0 -0
  36. {python_yama-0.10.4 → python_yama-0.10.6}/tests/test_pr.py +0 -0
  37. {python_yama-0.10.4 → python_yama-0.10.6}/tests/test_preview.py +0 -0
  38. {python_yama-0.10.4 → python_yama-0.10.6}/tests/test_public_api.py +0 -0
  39. {python_yama-0.10.4 → python_yama-0.10.6}/tests/test_report.py +0 -0
  40. {python_yama-0.10.4 → python_yama-0.10.6}/tests/test_report_bundle.py +0 -0
  41. {python_yama-0.10.4 → python_yama-0.10.6}/tests/test_report_upload.py +0 -0
  42. {python_yama-0.10.4 → python_yama-0.10.6}/tests/test_run_plan.py +0 -0
  43. {python_yama-0.10.4 → python_yama-0.10.6}/tests/test_skill_loader.py +0 -0
  44. {python_yama-0.10.4 → python_yama-0.10.6}/tests/test_skill_tool.py +0 -0
  45. {python_yama-0.10.4 → python_yama-0.10.6}/tests/test_tool_loader.py +0 -0
  46. {python_yama-0.10.4 → python_yama-0.10.6}/tests/test_usage.py +0 -0
  47. {python_yama-0.10.4 → python_yama-0.10.6}/uv.lock +0 -0
  48. {python_yama-0.10.4 → python_yama-0.10.6}/yama/__init__.py +0 -0
  49. {python_yama-0.10.4 → python_yama-0.10.6}/yama/__main__.py +0 -0
  50. {python_yama-0.10.4 → python_yama-0.10.6}/yama/assertions.py +0 -0
  51. {python_yama-0.10.4 → python_yama-0.10.6}/yama/dashboard.py +0 -0
  52. {python_yama-0.10.4 → python_yama-0.10.6}/yama/judge_llm.py +0 -0
  53. {python_yama-0.10.4 → python_yama-0.10.6}/yama/judge_routing.py +0 -0
  54. {python_yama-0.10.4 → python_yama-0.10.6}/yama/llm.py +0 -0
  55. {python_yama-0.10.4 → python_yama-0.10.6}/yama/loaders/__init__.py +0 -0
  56. {python_yama-0.10.4 → python_yama-0.10.6}/yama/loaders/case.py +0 -0
  57. {python_yama-0.10.4 → python_yama-0.10.6}/yama/loaders/common.py +0 -0
  58. {python_yama-0.10.4 → python_yama-0.10.6}/yama/loaders/skill_loader.py +0 -0
  59. {python_yama-0.10.4 → python_yama-0.10.6}/yama/loaders/tool_loader.py +0 -0
  60. {python_yama-0.10.4 → python_yama-0.10.6}/yama/mocks.py +0 -0
  61. {python_yama-0.10.4 → python_yama-0.10.6}/yama/models.py +0 -0
  62. {python_yama-0.10.4 → python_yama-0.10.6}/yama/openai_llm.py +0 -0
  63. {python_yama-0.10.4 → python_yama-0.10.6}/yama/pr.py +0 -0
  64. {python_yama-0.10.4 → python_yama-0.10.6}/yama/preview.py +0 -0
  65. {python_yama-0.10.4 → python_yama-0.10.6}/yama/report.py +0 -0
  66. {python_yama-0.10.4 → python_yama-0.10.6}/yama/report_bundle.py +0 -0
  67. {python_yama-0.10.4 → python_yama-0.10.6}/yama/report_upload.py +0 -0
  68. {python_yama-0.10.4 → python_yama-0.10.6}/yama/thread_case.py +0 -0
  69. {python_yama-0.10.4 → python_yama-0.10.6}/yama/tools/__init__.py +0 -0
  70. {python_yama-0.10.4 → python_yama-0.10.6}/yama/tools/base.py +0 -0
  71. {python_yama-0.10.4 → python_yama-0.10.6}/yama/tools/bash/__init__.py +0 -0
  72. {python_yama-0.10.4 → python_yama-0.10.6}/yama/tools/bash/_cli_shim.py +0 -0
  73. {python_yama-0.10.4 → python_yama-0.10.6}/yama/tools/bash/bash.py +0 -0
  74. {python_yama-0.10.4 → python_yama-0.10.6}/yama/tools/bash/fs.py +0 -0
  75. {python_yama-0.10.4 → python_yama-0.10.6}/yama/tools/skill/__init__.py +0 -0
  76. {python_yama-0.10.4 → python_yama-0.10.6}/yama/tools/skill/skill.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: python-yama
3
- Version: 0.10.4
3
+ Version: 0.10.6
4
4
  Summary: A reproducible evaluation runner for tool-using Agent skills
5
5
  Project-URL: Repository, https://github.com/world-sim-dev/yama
6
6
  Project-URL: Issues, https://github.com/world-sim-dev/yama/issues
@@ -34,7 +34,8 @@ English | [简体中文](https://github.com/world-sim-dev/yama/blob/main/README.
34
34
  ## Quick start
35
35
 
36
36
  ```bash
37
- # Run from a plugin root; collects __evals__/cases/**/*.yaml by default
37
+ # Run from a plugin root; collects __evals__/cases/**/*.yaml by default,
38
+ # excluding macOS AppleDouble ._* sidecars
38
39
  cd dingding-simple
39
40
  YAMA_LLM_API_KEY=... uv run --project yama yama
40
41
 
@@ -66,7 +67,7 @@ model = "claude-sonnet-4-5"
66
67
 
67
68
  An unmapped, unrecognized model is API-first. Only after its original API exhausts retryable failures may `[defaults.judge.local.agent]` run as the terminal fallback: configured local model, then the same Agent's default whenever that named-model attempt fails, then end. There is no fallback-model API call. External cancellation always stops the chain immediately. The HTML report shows the complete Judge attempt chain, including mapped/configured/default/fallback source, retries, failures, and the effective local model when the Agent reports it.
68
69
 
69
- CI and `pr-run` are API-only. Local agents receive the mapped model slug or original Judge model name and a compatible `reasoning_effort`, but never temperature, credentials, or endpoint settings. Cursor Judge passes `--trust` only for its per-attempt empty temporary workspace so non-interactive execution cannot stop at Workspace Trust; it still omits `--force`/`--yolo`, and Yama does not edit Cursor's global trust configuration. Evaluated Agent API attempts default to a 180-second transport timeout; Judge API attempts and local Judge processes default to 120 seconds. The whole-Step timeout remains independently configured by `execution.timeout_seconds_per_step` (default 300 seconds).
70
+ CI and `pr-run` are API-only. Local agents receive the mapped model slug or original Judge model name and a compatible `reasoning_effort`, but never temperature, credentials, or endpoint settings. Cursor Judge passes `--trust` only for its per-attempt empty temporary workspace so non-interactive execution cannot stop at Workspace Trust; it still omits `--force`/`--yolo`, and Yama does not edit Cursor's global trust configuration. Evaluated Agent API attempts default to a 180-second transport timeout; Judge API attempts and local Judge processes default to 120 seconds. The whole-Step timeout remains independently configured by `execution.timeout_seconds_per_step` (default 300 seconds). Expiring that whole-Step deadline creates a `step_timeout` hard failure, stops the current run, and yields exit code `1`; a model-interface timeout after retries remains `status="error"` / `error_kind="llm"` and yields exit code `2` when no FAIL exists.
70
71
 
71
72
  ## Writing a Case
72
73
 
@@ -123,8 +124,8 @@ uv run --project yama yama --plugin dingding-simple --report
123
124
  | `--all-plugins` | Run every plugin configured in `yama.toml` |
124
125
  | `-k, --filter PATTERN` (repeatable) | Only run cases whose case key (path relative to the plugin root) matches — a substring, or an fnmatch glob when the pattern contains `*` `?` `[`; with several patterns a case runs if any matches |
125
126
  | `--result-dir PATH` | Override the artifact root (default `<plugin_root>/.yama/runs`) |
126
- | `--concurrency N` | Maximum number of cases running in parallel (default 10; `1` runs cases one at a time) |
127
- | `--run-concurrency N` | Maximum number of runs active across all cases (default 32) |
127
+ | `--concurrency N` | Maximum number of cases running in parallel (default 1; cases run one at a time) |
128
+ | `--run-concurrency N` | Maximum number of runs active across all cases (default 3) |
128
129
  | `--report [PATH]` | Also generate a single-file HTML report. Without PATH it writes a timestamped `.yama/reports/report-<ts>.html` (history accumulates) and keeps `.yama/reports/latest.html` as a symlink to the newest one; an explicit PATH writes exactly that file |
129
130
  | `--preview` | Don't run anything (no LLM calls): resolve the collected Cases and write an HTML case preview (default `.yama/reports/preview.html`; `--report PATH` overrides), or print a JSON preview to stdout when combined with `--json` |
130
131
  | `--list` | Only print the collected Cases, without running them |
@@ -159,4 +160,4 @@ the just-run cases into the previous remote Plugin report.
159
160
 
160
161
  ### Output
161
162
 
162
- Cases run in parallel, up to 10 at a time by default (`--concurrency` changes the cap). Runs produced by one Case's `execution.repeat` also run in parallel: omitted `execution.repeat_concurrency` means all expanded runs, subject to the command-wide `--run-concurrency` cap (default 32); set it to `1` to restore serial runs for that Case. Case results keep collection order and run results keep `run_index` order regardless of completion order. Whenever Cases or runs overlap, a transient dashboard at the bottom of the terminal shows one row per Case and each completed Case's full run/step detail is printed above it as one block, so concurrent output never interleaves. Fully serial execution streams each Case, run, and assertion as it completes. Either way a per-Case summary table closes the output, and with `--json` the progress stream goes to stderr so stdout stays valid JSON.
163
+ Cases run one at a time by default (`--concurrency` changes the cap). Runs produced by one Case's `execution.repeat` still run in parallel: omitted `execution.repeat_concurrency` means all expanded runs, subject to the command-wide `--run-concurrency` cap (default 3); set it to `1` to restore serial runs for that Case. Case results keep collection order and run results keep `run_index` order regardless of completion order. Whenever Cases or runs overlap, a transient dashboard at the bottom of the terminal shows one row per Case and each completed Case's full run/step detail is printed above it as one block, so concurrent output never interleaves. Fully serial execution streams each Case, run, and assertion as it completes. Either way a per-Case summary table closes the output, and with `--json` the progress stream goes to stderr so stdout stays valid JSON.
@@ -7,7 +7,8 @@ English | [简体中文](https://github.com/world-sim-dev/yama/blob/main/README.
7
7
  ## Quick start
8
8
 
9
9
  ```bash
10
- # Run from a plugin root; collects __evals__/cases/**/*.yaml by default
10
+ # Run from a plugin root; collects __evals__/cases/**/*.yaml by default,
11
+ # excluding macOS AppleDouble ._* sidecars
11
12
  cd dingding-simple
12
13
  YAMA_LLM_API_KEY=... uv run --project yama yama
13
14
 
@@ -39,7 +40,7 @@ model = "claude-sonnet-4-5"
39
40
 
40
41
  An unmapped, unrecognized model is API-first. Only after its original API exhausts retryable failures may `[defaults.judge.local.agent]` run as the terminal fallback: configured local model, then the same Agent's default whenever that named-model attempt fails, then end. There is no fallback-model API call. External cancellation always stops the chain immediately. The HTML report shows the complete Judge attempt chain, including mapped/configured/default/fallback source, retries, failures, and the effective local model when the Agent reports it.
41
42
 
42
- CI and `pr-run` are API-only. Local agents receive the mapped model slug or original Judge model name and a compatible `reasoning_effort`, but never temperature, credentials, or endpoint settings. Cursor Judge passes `--trust` only for its per-attempt empty temporary workspace so non-interactive execution cannot stop at Workspace Trust; it still omits `--force`/`--yolo`, and Yama does not edit Cursor's global trust configuration. Evaluated Agent API attempts default to a 180-second transport timeout; Judge API attempts and local Judge processes default to 120 seconds. The whole-Step timeout remains independently configured by `execution.timeout_seconds_per_step` (default 300 seconds).
43
+ CI and `pr-run` are API-only. Local agents receive the mapped model slug or original Judge model name and a compatible `reasoning_effort`, but never temperature, credentials, or endpoint settings. Cursor Judge passes `--trust` only for its per-attempt empty temporary workspace so non-interactive execution cannot stop at Workspace Trust; it still omits `--force`/`--yolo`, and Yama does not edit Cursor's global trust configuration. Evaluated Agent API attempts default to a 180-second transport timeout; Judge API attempts and local Judge processes default to 120 seconds. The whole-Step timeout remains independently configured by `execution.timeout_seconds_per_step` (default 300 seconds). Expiring that whole-Step deadline creates a `step_timeout` hard failure, stops the current run, and yields exit code `1`; a model-interface timeout after retries remains `status="error"` / `error_kind="llm"` and yields exit code `2` when no FAIL exists.
43
44
 
44
45
  ## Writing a Case
45
46
 
@@ -96,8 +97,8 @@ uv run --project yama yama --plugin dingding-simple --report
96
97
  | `--all-plugins` | Run every plugin configured in `yama.toml` |
97
98
  | `-k, --filter PATTERN` (repeatable) | Only run cases whose case key (path relative to the plugin root) matches — a substring, or an fnmatch glob when the pattern contains `*` `?` `[`; with several patterns a case runs if any matches |
98
99
  | `--result-dir PATH` | Override the artifact root (default `<plugin_root>/.yama/runs`) |
99
- | `--concurrency N` | Maximum number of cases running in parallel (default 10; `1` runs cases one at a time) |
100
- | `--run-concurrency N` | Maximum number of runs active across all cases (default 32) |
100
+ | `--concurrency N` | Maximum number of cases running in parallel (default 1; cases run one at a time) |
101
+ | `--run-concurrency N` | Maximum number of runs active across all cases (default 3) |
101
102
  | `--report [PATH]` | Also generate a single-file HTML report. Without PATH it writes a timestamped `.yama/reports/report-<ts>.html` (history accumulates) and keeps `.yama/reports/latest.html` as a symlink to the newest one; an explicit PATH writes exactly that file |
102
103
  | `--preview` | Don't run anything (no LLM calls): resolve the collected Cases and write an HTML case preview (default `.yama/reports/preview.html`; `--report PATH` overrides), or print a JSON preview to stdout when combined with `--json` |
103
104
  | `--list` | Only print the collected Cases, without running them |
@@ -132,4 +133,4 @@ the just-run cases into the previous remote Plugin report.
132
133
 
133
134
  ### Output
134
135
 
135
- Cases run in parallel, up to 10 at a time by default (`--concurrency` changes the cap). Runs produced by one Case's `execution.repeat` also run in parallel: omitted `execution.repeat_concurrency` means all expanded runs, subject to the command-wide `--run-concurrency` cap (default 32); set it to `1` to restore serial runs for that Case. Case results keep collection order and run results keep `run_index` order regardless of completion order. Whenever Cases or runs overlap, a transient dashboard at the bottom of the terminal shows one row per Case and each completed Case's full run/step detail is printed above it as one block, so concurrent output never interleaves. Fully serial execution streams each Case, run, and assertion as it completes. Either way a per-Case summary table closes the output, and with `--json` the progress stream goes to stderr so stdout stays valid JSON.
136
+ Cases run one at a time by default (`--concurrency` changes the cap). Runs produced by one Case's `execution.repeat` still run in parallel: omitted `execution.repeat_concurrency` means all expanded runs, subject to the command-wide `--run-concurrency` cap (default 3); set it to `1` to restore serial runs for that Case. Case results keep collection order and run results keep `run_index` order regardless of completion order. Whenever Cases or runs overlap, a transient dashboard at the bottom of the terminal shows one row per Case and each completed Case's full run/step detail is printed above it as one block, so concurrent output never interleaves. Fully serial execution streams each Case, run, and assertion as it completes. Either way a per-Case summary table closes the output, and with `--json` the progress stream goes to stderr so stdout stays valid JSON.
@@ -7,7 +7,8 @@
7
7
  ## 快速开始
8
8
 
9
9
  ```bash
10
- # 在 Plugin 根目录下直接运行,默认收集 __evals__/cases/**/*.yaml
10
+ # 在 Plugin 根目录下直接运行,默认收集 __evals__/cases/**/*.yaml,
11
+ # 并忽略 macOS AppleDouble 的 ._* 边车文件
11
12
  cd dingding-simple
12
13
  YAMA_LLM_API_KEY=... uv run --project yama yama
13
14
 
@@ -39,7 +40,7 @@ model = "claude-sonnet-4-5"
39
40
 
40
41
  未映射且未识别的模型走 API-first。只有原始 API 的可重试错误耗尽后,才会启用 `[defaults.judge.local.agent]` 作为终止型兜底:“配置的本地模型 → 该次尝试发生任何错误时使用同一 Agent 默认模型 → 结束”。不再调用 fallback-model API;外部取消始终立即终止整条链。HTML 报告会展示完整 Judge 尝试链,包括映射/原始配置/默认/兜底来源、重试、失败原因,以及本地 Agent 能上报时的实际模型。
41
42
 
42
- CI 和 `pr-run` 均只走 API。本地 Agent 只接收命中的本地模型 slug 或原始 Judge 模型名,以及兼容的 `reasoning_effort`;不会接收 temperature、凭据或 endpoint 设置。Cursor Judge 只为当前单次调用的空临时 Workspace 传入 `--trust`,避免非交互执行停在 Workspace Trust;仍不使用 `--force`/`--yolo`,Yama 也不会修改 Cursor 的全局信任配置。被评测 Agent 的 API 单次请求默认超时为 180 秒;Judge API 单次请求和本地 Judge 进程默认超时均为 120 秒。整条 Step 的超时仍由 `execution.timeout_seconds_per_step` 独立控制,默认 300 秒。
43
+ CI 和 `pr-run` 均只走 API。本地 Agent 只接收命中的本地模型 slug 或原始 Judge 模型名,以及兼容的 `reasoning_effort`;不会接收 temperature、凭据或 endpoint 设置。Cursor Judge 只为当前单次调用的空临时 Workspace 传入 `--trust`,避免非交互执行停在 Workspace Trust;仍不使用 `--force`/`--yolo`,Yama 也不会修改 Cursor 的全局信任配置。被评测 Agent 的 API 单次请求默认超时为 180 秒;Judge API 单次请求和本地 Judge 进程默认超时均为 120 秒。整条 Step 的超时仍由 `execution.timeout_seconds_per_step` 独立控制,默认 300 秒。整条 Step deadline 到期会生成 `step_timeout` 硬失败、终止当前 run,并返回退出码 `1`;模型接口重试耗尽后的超时仍是 `status="error"` / `error_kind="llm"`,没有 FAIL 时返回退出码 `2`。
43
44
 
44
45
  ## 编写一个 Case
45
46
 
@@ -96,8 +97,8 @@ uv run --project yama yama --plugin dingding-simple --report
96
97
  | `--all-plugins` | 运行 `yama.toml` 中配置的全部 Plugin |
97
98
  | `-k, --filter PATTERN`(可重复) | 只运行 case key(相对 Plugin Root 的路径)匹配 PATTERN 的 Case——默认子串匹配,PATTERN 含 `*` `?` `[` 时按 fnmatch 通配符匹配;传多个时命中任意一个即运行 |
98
99
  | `--result-dir PATH` | 覆盖产物根目录(默认 `<plugin_root>/.yama/runs`) |
99
- | `--concurrency N` | 同时运行的 Case 数上限(默认 10;`1` 表示逐个顺序执行) |
100
- | `--run-concurrency N` | 所有 Case 的活跃 run 总上限(默认 32) |
100
+ | `--concurrency N` | 同时运行的 Case 数上限(默认 1,即逐个顺序执行) |
101
+ | `--run-concurrency N` | 所有 Case 的活跃 run 总上限(默认 3) |
101
102
  | `--report [PATH]` | 额外生成单文件 HTML 报告。省略 PATH 时写带时间戳的 `.yama/reports/report-<ts>.html`(历史累积),并把 `.yama/reports/latest.html` 维护成指向最新报告的软链;显式给 PATH 时精确写到该文件 |
102
103
  | `--preview` | 不运行、不发起任何 LLM 调用:解析收集到的 Case 后生成用例预览 HTML(默认 `.yama/reports/preview.html`,`--report PATH` 可覆盖);与 `--json` 组合时改为向 stdout 打印 JSON 预览 |
103
104
  | `--list` | 只打印匹配到的 Case,不运行 |
@@ -131,4 +132,4 @@ CI 需要把报告发布到 Yama Eval Report 服务时,在 `--report` 之外
131
132
 
132
133
  ### 输出
133
134
 
134
- Case 之间并行执行,默认最多同时 10 个(用 `--concurrency` 调整上限)。同一 Case 的 `execution.repeat` 展开的 run 也会并行:未设置 `execution.repeat_concurrency` 时自动使用展开后的总 run 数,但受命令级 `--run-concurrency`(默认 32)限制;设为 `1` 可恢复该 Case 的串行 run。Case 结果保持收集顺序,run 结果保持 `run_index` 顺序,与完成先后无关。只要 Case 或 run 存在重叠执行,终端底部就会显示逐 Case 状态面板,每个 Case 完成后把完整 Run/Step 明细作为一个整块打印到面板上方,避免并发输出交错;完全串行时则逐 Case、Run、断言实时流式打印。两种模式最后都以逐 Case 的汇总表格收尾;使用 `--json` 时进度流打印到 stderr,stdout 保持为纯 JSON。
135
+ Case 默认逐个顺序执行(用 `--concurrency` 调整上限)。同一 Case 的 `execution.repeat` 展开的 run 仍可并行:未设置 `execution.repeat_concurrency` 时自动使用展开后的总 run 数,但受命令级 `--run-concurrency`(默认 3)限制;设为 `1` 可恢复该 Case 的串行 run。Case 结果保持收集顺序,run 结果保持 `run_index` 顺序,与完成先后无关。只要 Case 或 run 存在重叠执行,终端底部就会显示逐 Case 状态面板,每个 Case 完成后把完整 Run/Step 明细作为一个整块打印到面板上方,避免并发输出交错;完全串行时则逐 Case、Run、断言实时流式打印。两种模式最后都以逐 Case 的汇总表格收尾;使用 `--json` 时进度流打印到 stderr,stdout 保持为纯 JSON。
@@ -226,8 +226,8 @@ yama --plugin-root ./dingding-simple
226
226
  | `--all-plugins` | 运行 `yama.toml` 中配置的全部 Plugin |
227
227
  | `-k, --filter PATTERN`(可重复) | Case 筛选:只保留 case key 匹配 PATTERN 的 Case(见下) |
228
228
  | `--result-dir PATH` | 覆盖产物根目录(默认每个 Case 写到其所属 `plugin_root/.yama/runs`) |
229
- | `--concurrency N` | 同时运行的 Case 数上限(必须 ≥ 1,默认 10);`1` 表示按收集顺序逐个执行 |
230
- | `--run-concurrency N` | 所有 Case 的活跃 run 总上限(必须 ≥ 1,默认 32) |
229
+ | `--concurrency N` | 同时运行的 Case 数上限(必须 ≥ 1,默认 1);`1` 表示按收集顺序逐个执行 |
230
+ | `--run-concurrency N` | 所有 Case 的活跃 run 总上限(必须 ≥ 1,默认 3) |
231
231
  | `--report [PATH]` | 额外写一份单文件 HTML 报告;省略路径时写到 `<第一个 result_root 的上级>/reports/report-<时间戳>.html`(历史累积),并把同目录的 `latest.html` 维护成指向最新报告的软链;显式给 PATH 时精确写到该文件、不建软链 |
232
232
  | `--preview` | 不运行任何 Case、不发起任何 LLM 调用:解析收集到的 Case 后输出**用例预览**。默认写一张与报告同风格的 HTML(`<第一个 result_root 的上级>/reports/preview.html`,`--report PATH` 可覆盖目标路径);与 `--json` 组合时改为向 stdout 打印逐 Case 的 JSON 预览数组(见第 13 节) |
233
233
  | `--list` | 只收集并打印 `case_key` 列表,不运行 |
@@ -304,6 +304,9 @@ PATTERN 含 `*`/`?`/`[` 任一字符时按 `fnmatch` 通配符(大小写敏感
304
304
  所以被筛掉的 Case 即使 YAML 损坏也不会阻塞本次运行;`--list` 同样受筛选影响。
305
305
  筛选后一个 Case 都不剩时报 `No eval cases matched the case filter.` 并以退出码 2
306
306
  结束(与"根本没收集到 Case"同级别,但错误信息区分两种情况)。
307
+ glob 或显式路径展开后,basename 以 `._` 开头的 macOS AppleDouble 边车文件会在
308
+ `is_file()` 校验和上述筛选之前直接丢弃;它们是 exFAT 等文件系统上的二进制元数据,
309
+ 不是 Case YAML。这里只保留 `._*` 前缀,不会泛化为忽略所有点文件。
307
310
 
308
311
  **Case/run 两级并发调度(`--concurrency` / `--run-concurrency`,`cli.py:_run`)。**
309
312
  收集到的多个 Case 先用 `asyncio.Semaphore(concurrency)` + `asyncio.gather` 在同一事件
@@ -312,8 +315,8 @@ PATTERN 含 `*`/`?`/`[` 任一字符时按 `fnmatch` 通配符(大小写敏感
312
315
  `repeat_concurrency` semaphore 和共享 limiter 双重限流。
313
316
  语义边界:
314
317
 
315
- - `--concurrency` 只限制活跃 **Case**,默认 10;`--run-concurrency` 限制本次命令的
316
- 活跃 **run 总数**,默认 32。二者都必须是正整数。
318
+ - `--concurrency` 只限制活跃 **Case**,默认 1;`--run-concurrency` 限制本次命令的
319
+ 活跃 **run 总数**,默认 3。二者都必须是正整数。
317
320
  - Case 未声明 `execution.repeat_concurrency` 时按展开后的总 run 数自动并行;显式值必须
318
321
  是正整数,`1` 恢复串行。实际 Case 上限会先被总 run 数和全局 run 上限钳制。
319
322
  - 每个并行 run 使用 `LLMClient.fork()` 得到独立 adapter wrapper;Agent/Judge 本来是同一
@@ -322,9 +325,15 @@ PATTERN 含 `*`/`?`/`[` 任一字符时按 `fnmatch` 通配符(大小写敏感
322
325
  - 结果数组保持**收集顺序**(`gather` 保序),与完成先后无关;汇总表格、`--json`
323
326
  输出、HTML 报告的 Case 顺序因此稳定;Case 内第二层 `gather` 同样让 `runs` 始终按
324
327
  `run_index` 排列。
325
- - 某个 Case 抛出异常(罕见:run 内的错误都会被 `_run_once` 捕获进
326
- `RunResult.error`)时,其余 Case 仍会跑完并写完产物(`gather`
327
- `return_exceptions=True`),随后第一个异常按原有 `main()` 错误出口重新抛出。
328
+ - 某个 Case 逸出普通、非 `LLMError` 的 `Exception`(罕见:run 内的错误通常都会被
329
+ `_run_once` 捕获进 `RunResult.error`)时,其余 Case 仍会跑完并写完产物(`gather`
330
+ `return_exceptions=True`);CLI 随后为该 Case 合成一个 `run_index=1`、
331
+ `status=error`、`error_kind=framework` 的 RunResult,使终端、JSON、HTML 和 PR
332
+ summary/report 都保留正确的 Case 顺序、错误计数或错误详情,HTML 另保留 traceback。
333
+ suite 完成报告后返回退出码 2;
334
+ 普通 CLI 的顶层 `LLMError` 继续走现有 LLM error 出口;`pr-run` 则把它附着为
335
+ 对应 Case 的 `error_kind=llm` 结果,以便继续写完整 summary/report。
336
+ `KeyboardInterrupt`、`SystemExit`、`asyncio.CancelledError` 等非普通异常仍向上传播。
328
337
  - run 间的 Mock state、bash 沙箱工作目录、持久 shell 会话和产物目录都已按
329
338
  `run_index` 隔离;Case 级旧目录清理只在并发任务启动前执行一次。
330
339
  - 进度输出按实际并发模式切换(见第 13 节):多个 Case 可重叠或任一 Case 的有效 run
@@ -1581,6 +1590,11 @@ mock 脚本与旧文件,结果不可复现。run 结束(成功、断言失
1581
1590
  进程贯穿整个 run,`cd`、`export`、写文件等状态天然延续到下一次 Tool Call,不需要
1582
1591
  额外的状态字典维护 cwd/环境。
1583
1592
 
1593
+ 启动前删除通过 `shutil.rmtree(onexc=...)` 逐项处理:某个目录项已经消失产生的
1594
+ `FileNotFoundError`/`ENOENT` 视为删除目标已达成并继续遍历,权限、I/O、非空目录等
1595
+ 其他异常不被静默吞掉。这个精确容错同时用于下述旧产物目录清理,专门覆盖 macOS +
1596
+ exFAT 上 AppleDouble `._*` 文件在扫描与 `unlink` 之间消失的竞态。
1597
+
1584
1598
  **命令执行:持久 shell + marker 协议。** 每次 Tool Call 把命令包装成如下 payload
1585
1599
  写入这个 shell 的 stdin:
1586
1600
 
@@ -1715,21 +1729,20 @@ execution:
1715
1729
  ```
1716
1730
 
1717
1731
  - `timeout_seconds_per_step`:单个 Step 的总时限,默认 **300**。通过
1718
- `asyncio.wait_for` 真实生效(`runner.py:_run_once`),但需要注意:超时触发的是
1719
- `asyncio.TimeoutError`,**没有**被单独捕获转换成"仅本 Step 失败、run 继续"——它
1720
- 会被 `_run_once` 外层的 `except Exception` 当成整条 run 的基础设施异常处理
1721
- (`RunResult.status = "error"`,`RunResult.passed = False`,`RunResult.error`
1722
- 记录异常信息),run 直接终止,不会再跑后续 Step。这个 300 秒总预算覆盖该 Step 的
1732
+ `runner.py:_run_with_step_deadline` 的 `asyncio.timeout` context 生效;只有这个外层
1733
+ deadline 确认到期时才转换成 `StepTimeoutExceeded`。`_run_once` 会把 Transcript
1734
+ 回滚到该 Step 开始前的快照,生成一条 `type: step_timeout` 的人工硬失败
1735
+ `StepResult`,将当前 run 标为 `fail` 并终止,不再执行后续 Step。它进入 pass/fail
1736
+ 分母,CLI 返回退出码 1。这个 300 秒总预算覆盖该 Step 的
1723
1737
  全部 Provider attempts、retry delay、Tool 执行与后续 Tool Loop 请求,不会按 attempt
1724
1738
  或 Tool round 重置。被测 Agent 的默认 transport timeout 是 180 秒,每个 attempt 的
1725
1739
  绝对 deadline 是 185 秒;若包含 retry 的完整 completion chain 超过 300 秒,整 Step
1726
- deadline 会先
1727
- 取消当前请求,而不是为所有 attempts 额外扩张总预算。Judge 调用仍在这个
1728
- candidate-Step `wait_for` 之外。`LLMError`(Provider
1729
- 请求失败、接口异常、脚本回放耗尽等)同样归为 run/case 的 `error` 状态,而不是
1730
- hard check/Judge 失败。
1731
- 这与下面 `max_tool_rounds_per_step` 超限的处理方式(仅本 Step 记为失败、run 继续
1732
- 跑完剩余 Step)不同。
1740
+ deadline 会先取消当前请求,而不是为所有 attempts 额外扩张总预算。Judge 调用仍在
1741
+ 这个 candidate-Step deadline 之外。内层模型接口 `TimeoutError` 和 `LLMError`
1742
+ (Provider 请求失败、接口异常、脚本回放耗尽等)不会被误认成 Step deadline,仍归为
1743
+ run/case 的 `error` / `error_kind="llm"`,没有 FAIL 时 CLI 返回退出码 2。
1744
+ 这与下面 `max_tool_rounds_per_step` 超限的处理方式(同样生成硬失败,但 run 继续跑完
1745
+ 剩余 Step)不同。
1733
1746
  - `max_tool_rounds_per_step`:一个 Step 内允许的最大 Tool Call 循环轮数,默认 **10**。
1734
1747
  超出时该 Step 会被标记为一条硬失败(`type: max_tool_rounds_exceeded`),
1735
1748
  Transcript 回滚到该 Step 开始前的状态,run 继续执行后续 Step(见第 10 节)。
@@ -1755,7 +1768,7 @@ execution:
1755
1768
  - `repeat` 在 defaults / plugin / Case 三层间按整值替换(`dict.update`),
1756
1769
  不做逐条目合并:Case 写 `repeat: 3` 会整体覆盖全局矩阵,反之亦然。
1757
1770
  - `repeat_concurrency`:同一 Case 的活跃 run 上限。显式值必须是正整数;`1` 表示串行。
1758
- 省略时为 **auto**,即展开后的总 run 数;CLI 再用 `--run-concurrency`(默认 32)限制
1771
+ 省略时为 **auto**,即展开后的总 run 数;CLI 再用 `--run-concurrency`(默认 3)限制
1759
1772
  所有 Case 的总活跃 run。显式值超过总 run 数或全局上限时按较小值分批执行,不报错。
1760
1773
 
1761
1774
  ### 8.6 `steps[]`:确定性推进的用户回合
@@ -2374,8 +2387,8 @@ async def run_step(case, step, messages, registry, run_index, requests):
2374
2387
  终止**:`_run_once` 会捕获这个异常,把 Transcript 回滚到该 Step 开始前的快照,
2375
2388
  生成一条人工构造的失败 `StepResult`(`hard_checks` 里有一条
2376
2389
  `type: max_tool_rounds_exceeded` 的失败记录),然后**继续执行后续 Step**——这与
2377
- `execution.timeout_seconds_per_step` 超时(会让整条 run 标为 `status="error"` 并终止,见 8.5 节)
2378
- 的处理方式不同,容易混淆,需要分别记住。
2390
+ `execution.timeout_seconds_per_step` 超时(生成 `type: step_timeout` 硬失败、将当前
2391
+ run 标为 `status="fail"` 并终止,见 8.5 节)的处理方式不同,容易混淆,需要分别记住。
2379
2392
  - `context.builders`(case scope,第 7.3 节)与 `steps[].message_inject`(Step
2380
2393
  scope,第 7.6 节)是两套独立的插入机制:前者只在第一个 Step 开始前跑一次,后者
2381
2394
  按上面伪代码里的四个触发点、随每个 Step/每一轮 Tool Call 反复触发。两者产生的
@@ -2509,6 +2522,8 @@ class ToolCallRecord:
2509
2522
  `execution.repeat` 比上次小,不清理就会留下过期的 `run-002` 等目录,人工或脚本
2510
2523
  扫描 `.yama/runs` 时会把旧执行误当成本次结果。`--no-artifacts` 时不写也不删任何
2511
2524
  产物目录(用户显式选择不落盘,不应顺带删掉历史产物),但 fs-runs 工作目录照常清理。
2525
+ 每个 run 重写自身产物目录前也使用同一条“只忽略 ENOENT”的删除规则;创建目录、复制
2526
+ fixture 或写入新产物失败仍产生 framework error,不会被清理容错隐藏。
2512
2527
 
2513
2528
  `--report` 触发的单文件 HTML 报告(`report.py:write_html_report` /
2514
2529
  `write_timestamped_report`)是 CLI 层面单独生成的汇总产物,**不属于**上面这份逐
@@ -2793,9 +2808,10 @@ hard_pass"这条规则。未知 tag/key、阈值不是 `[0, 1]` 区间内的数
2793
2808
  `{"passed", "hard_pass", "judge_pass", "quality_score", "reason"}` 这种顶层扁平
2794
2809
  结构——`hard_pass`/`judge_result` 这类判定分散在每个 Step 上,run 级别和 Case 级别
2795
2810
  各自有一个三态 `status`(`pass`/`fail`/`error`)和一个兼容旧调用的 `passed`
2796
- 布尔:`passed` 只在 `status == "pass"` 时为 `true`。LLM 请求异常或
2797
- `timeout_seconds_per_step` 超时会把 run/case 标成 `error`,不进入 pass/fail 分母;
2798
- 断言/Judge 的行为性不达标是 `fail`;断言配置错误、Mock/Builder/Checker 代码异常等
2811
+ 布尔:`passed` 只在 `status == "pass"` 时为 `true`。`timeout_seconds_per_step`
2812
+ 超时会生成 `type: step_timeout` 硬失败,把 run/case 标成 `fail` 并进入 pass/fail
2813
+ 分母;模型接口超时重试耗尽和其他 LLM 请求异常会标成 `error` / `error_kind="llm"`,
2814
+ 不进入 pass/fail 分母。断言/Judge 的行为性不达标也是 `fail`;断言配置错误、Mock/Builder/Checker 代码异常等
2799
2815
  未捕获框架异常也是 `error`,但 `error_kind="framework"`,与
2800
2816
  `error_kind="llm"` 的大模型异常分开统计。
2801
2817
 
@@ -2888,9 +2904,10 @@ Request 的详情会展示 Method、Duration、Retries、Arguments、Response,
2888
2904
  **LLM TOKENS**。`CASES PASSED` 是通过 Case 数 / 总 Case 数;`CASES ERRORS`
2889
2905
  是 error Case 数 / 总 Case 数;错误 Case 的具体 `error_kind` 与错误文本展示在对应
2890
2906
  Case header 里(如 **LLM error** / **Framework error**),而不是在顶部摘要里再拆
2891
- 全局错误分类。整体 verdict 的优先级是 fail > error > pass(有断言/Judge 失败时为
2892
- FAIL;没有失败但有 LLM/超时错误时为 ERROR;全部非 error 项通过且无 error 时为
2893
- PASS)。`error_kind="llm"` 对应 LLM 请求异常和 Step 超时;`error_kind="framework"`
2907
+ 全局错误分类。整体 verdict 的优先级是 fail > error > pass(有断言/Judge/Step
2908
+ deadline 失败时为 FAIL;没有失败但有模型接口超时或其他 LLM 错误时为 ERROR;全部
2909
+ 非 error 项通过且无 error 时为 PASS)。`error_kind="llm"` 对应模型接口超时重试耗尽
2910
+ 和其他 LLM 请求异常;`error_kind="framework"`
2894
2911
  对应断言配置、Mock/Builder/Checker 代码、Mock sequence、未声明 Tool 等框架/Case
2895
2912
  代码异常。
2896
2913
 
@@ -3265,8 +3282,8 @@ stdout 仍只输出 YAML,stderr 只输出 record/response/DSL 抓取诊断信
3265
3282
  `model`,没有对 Step 输入、Mock 配置等任意参数做笛卡尔展开的通用参数矩阵。
3266
3283
  - **HTML Transcript Viewer 的进一步能力**、**人工评分与 Judge 校准**、**远程
3267
3284
  执行**:`report.py` 目前只产出一个静态汇总 HTML,没有专门的单 Case 交互式
3268
- Transcript Viewer;Case/run 两级的本地并发调度已实现(CLI `--concurrency` 默认 10、
3269
- `--run-concurrency` 默认 32,见 4.3 节),但仍没有把执行分发到远程机器的能力。
3285
+ Transcript Viewer;Case/run 两级的本地并发调度已实现(CLI `--concurrency` 默认 1、
3286
+ `--run-concurrency` 默认 3,见 4.3 节),但仍没有把执行分发到远程机器的能力。
3270
3287
 
3271
3288
  已经完成、且与原设计基本对齐或已按上文修正描述的能力(供快速核对现状):
3272
3289
 
@@ -751,9 +751,10 @@ mocks:
751
751
  | 子字段 | 类型 | 默认值 | 作用 |
752
752
  |---|---|---|---|
753
753
  | `timeout_seconds_per_step` | number | `300` | 单个 Step(从发出 User Message 到
754
- 拿到无 Tool Call 的最终 Assistant Message)允许的最长耗时。**超时的后果是整条 run
755
- 标为 ERROR 并终止**(`status=error`,不只是当前 Step 失败),因为超时通常意味着模型陷入了某种不会自然收敛的
756
- 循环,继续跑后续 Step 意义不大,应在报告中单独反映"这条 run 卡死了"。 |
754
+ 拿到无 Tool Call 的最终 Assistant Message)允许的最长耗时。**超时会生成
755
+ `type: step_timeout` 硬失败,将整条 run 标为 FAIL 并终止**(`status=fail`,后续 Step
756
+ 不再执行),并进入 pass/fail 分母;模型接口 `model.timeout` 重试耗尽则仍标为
757
+ `status=error` / `error_kind=llm`,不进入该分母。 |
757
758
  | `max_tool_rounds_per_step` | integer | `10` | 单个 Step 内允许的最大"发一次请求给
758
759
  模型"轮数(每轮可能包含多个并发 Tool Call)。**超限的后果只影响当前 Step**:这个
759
760
  Step 被记为 `max_tool_rounds_exceeded` 硬失败,transcript 回滚到这个 Step 开始前的
@@ -776,7 +777,7 @@ execution:
776
777
 
777
778
  最简单的形式是一个正整数 `N`:用 Case 的 `model` 原样重复跑 `N` 次,统计通过率。
778
779
  这些 run 默认并行执行;省略 `repeat_concurrency` 时并发值取展开后的总 run 数,CLI
779
- 再用 `--run-concurrency`(默认 32)限制所有 Case 的活跃 run 总数。显式值必须是正整数;
780
+ 再用 `--run-concurrency`(默认 3)限制所有 Case 的活跃 run 总数。显式值必须是正整数;
780
781
  它大于总 run 数或全局上限时会被自然钳制,而不会报错。
781
782
 
782
783
  更复杂的场景——比较同一个 Case 在不同模型/不同参数下的表现——可以写成运行矩阵:
@@ -0,0 +1,249 @@
1
+ # Lower Default Evaluation Concurrency Implementation Plan
2
+
3
+ > **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking.
4
+
5
+ **Goal:** Make both `yama` and `yama pr-run` schedule one Case at a time and allow at most three active runs by default, while preserving explicit CLI overrides.
6
+
7
+ **Architecture:** Change only the argparse defaults and help text; keep the existing positive-integer validation, Case semaphore, and shared `RunConcurrencyLimiter` unchanged. Lock the behavior with parser tests first, then synchronize every tracked user-facing description of these defaults.
8
+
9
+ **Tech Stack:** Python 3.12+, `argparse`, `unittest` tests executed with `pytest`, Markdown/HTML documentation.
10
+
11
+ ## Global Constraints
12
+
13
+ - Both `yama` and `yama pr-run` default `--concurrency` to `1`.
14
+ - Both commands default `--run-concurrency` to `3`.
15
+ - Explicit positive CLI values continue to override both defaults.
16
+ - Do not add a hard maximum or change scheduling semantics.
17
+ - Do not change `execution.repeat_concurrency` behavior.
18
+ - Preserve unrelated tracked and untracked workspace changes.
19
+
20
+ ---
21
+
22
+ ## File Structure
23
+
24
+ - `yama/cli.py`: owns the ordinary and `pr-run` argument parser defaults.
25
+ - `tests/test_cli.py`: verifies parser defaults and explicit overrides.
26
+ - `README.md`, `README.zh-CN.md`: primary English and Chinese CLI documentation.
27
+ - `docs/agent-skill-test-framework-design.md`: detailed framework behavior reference.
28
+ - `docs/case-schema-reference.md`: Case execution schema reference.
29
+ - `docs/yama-intro.html`: introductory CLI option table.
30
+ - `skills/eval-plugin-with-yama/SKILL.md`: bundled operational instructions for agents.
31
+ - `skills/eval-plugin-with-yama/references/case-schema.md`: bundled skill's Case schema reference.
32
+
33
+ ### Task 1: Change and test CLI defaults
34
+
35
+ **Files:**
36
+ - Modify: `tests/test_cli.py:137-150,245-267`
37
+ - Modify: `yama/cli.py:698-717,1025-1048`
38
+
39
+ **Interfaces:**
40
+ - Consumes: `_parser() -> argparse.ArgumentParser` and `_pr_run_parser() -> argparse.ArgumentParser`.
41
+ - Produces: parsed namespaces whose `concurrency` defaults to `1` and whose `run_concurrency` defaults to `3`; explicit positive values remain unchanged.
42
+
43
+ - [ ] **Step 1: Write failing assertions for both parser defaults**
44
+
45
+ Update `ParserTests.test_defaults` and the existing `pr-run` parser test so the relevant assertions are:
46
+
47
+ ```python
48
+ self.assertEqual(args.concurrency, 1)
49
+ self.assertEqual(args.run_concurrency, 3)
50
+ ```
51
+
52
+ Keep `test_pr_run_parser_accepts_run_concurrency` and add a matching explicit Case override assertion:
53
+
54
+ ```python
55
+ def test_pr_run_parser_accepts_concurrency(self) -> None:
56
+ args = _pr_run_parser().parse_args(
57
+ ["--json-summary", "summary.json", "--concurrency", "4"]
58
+ )
59
+ self.assertEqual(args.concurrency, 4)
60
+ ```
61
+
62
+ - [ ] **Step 2: Run the focused tests and verify RED**
63
+
64
+ Run:
65
+
66
+ ```bash
67
+ uv run pytest \
68
+ tests/test_cli.py::ParserTests::test_defaults \
69
+ tests/test_cli.py::ParserTests::test_pr_run_parser_accepts_upload_flags \
70
+ tests/test_cli.py::ParserTests::test_pr_run_parser_accepts_concurrency \
71
+ -vv
72
+ ```
73
+
74
+ Expected: the first two tests fail because the parsers still return `10` and/or `32`; the explicit override test passes.
75
+
76
+ - [ ] **Step 3: Apply the minimal parser change**
77
+
78
+ In the ordinary parser, use these defaults and help strings:
79
+
80
+ ```python
81
+ parser.add_argument(
82
+ "--concurrency",
83
+ type=_positive_int,
84
+ default=1,
85
+ metavar="N",
86
+ help=(
87
+ "Maximum number of cases to run in parallel"
88
+ " (default: 1; cases run one at a time)"
89
+ ),
90
+ )
91
+ parser.add_argument(
92
+ "--run-concurrency",
93
+ type=_positive_int,
94
+ default=3,
95
+ metavar="N",
96
+ help=(
97
+ "Maximum number of runs active across all cases"
98
+ " (default: 3; 1 disables run overlap)"
99
+ ),
100
+ )
101
+ ```
102
+
103
+ In `_pr_run_parser`, change only the two defaults:
104
+
105
+ ```python
106
+ parser.add_argument("--concurrency", type=_positive_int, default=1)
107
+ parser.add_argument("--run-concurrency", type=_positive_int, default=3)
108
+ ```
109
+
110
+ - [ ] **Step 4: Run parser tests and verify GREEN**
111
+
112
+ Run:
113
+
114
+ ```bash
115
+ uv run pytest tests/test_cli.py::ParserTests -q
116
+ ```
117
+
118
+ Expected: all parser tests pass, including existing positive-value validation and explicit `--run-concurrency 48` coverage.
119
+
120
+ - [ ] **Step 5: Run the complete CLI test module**
121
+
122
+ Run:
123
+
124
+ ```bash
125
+ uv run pytest tests/test_cli.py -q
126
+ ```
127
+
128
+ Expected: all tests pass with no warnings or errors.
129
+
130
+ - [ ] **Step 6: Commit the tested behavior change**
131
+
132
+ ```bash
133
+ git add yama/cli.py tests/test_cli.py
134
+ git commit -m "feat: lower default evaluation concurrency"
135
+ ```
136
+
137
+ ### Task 2: Synchronize user-facing documentation
138
+
139
+ **Files:**
140
+ - Modify: `README.md:100-101,136`
141
+ - Modify: `README.zh-CN.md:100-101,135`
142
+ - Modify: `docs/agent-skill-test-framework-design.md:229-230,318-319,1771-1773,3284-3285`
143
+ - Modify: `docs/case-schema-reference.md:777-780`
144
+ - Modify: `docs/yama-intro.html:630`
145
+ - Modify: `skills/eval-plugin-with-yama/SKILL.md:281-286`
146
+ - Modify: `skills/eval-plugin-with-yama/references/case-schema.md:331-333`
147
+
148
+ **Interfaces:**
149
+ - Consumes: the parser behavior established in Task 1.
150
+ - Produces: documentation that consistently states Case default concurrency `1`, global run default concurrency `3`, and continued CLI override support.
151
+
152
+ - [ ] **Step 1: Update the primary English and Chinese documentation**
153
+
154
+ Use the following meaning consistently in `README.md`:
155
+
156
+ ```markdown
157
+ | `--concurrency N` | Maximum number of cases running in parallel (default 1; cases run one at a time) |
158
+ | `--run-concurrency N` | Maximum number of runs active across all cases (default 3) |
159
+ ```
160
+
161
+ Rewrite the output paragraph to begin with:
162
+
163
+ ```markdown
164
+ Cases run one at a time by default (`--concurrency` changes the cap). Runs produced by one Case's `execution.repeat` also run in parallel: omitted `execution.repeat_concurrency` means all expanded runs, subject to the command-wide `--run-concurrency` cap (default 3).
165
+ ```
166
+
167
+ Use the equivalent wording in `README.zh-CN.md`:
168
+
169
+ ```markdown
170
+ | `--concurrency N` | 同时运行的 Case 数上限(默认 1,即逐个顺序执行) |
171
+ | `--run-concurrency N` | 所有 Case 的活跃 run 总上限(默认 3) |
172
+ ```
173
+
174
+ The Chinese output paragraph must begin with:
175
+
176
+ ```markdown
177
+ Case 默认逐个顺序执行(用 `--concurrency` 调整上限)。同一 Case 的 `execution.repeat` 展开的 run 仍可并行:未设置 `execution.repeat_concurrency` 时自动使用展开后的总 run 数,但受命令级 `--run-concurrency`(默认 3)限制。
178
+ ```
179
+
180
+ - [ ] **Step 2: Update framework and schema references**
181
+
182
+ Replace concurrency-default claims in the detailed design and both schema references with these exact values:
183
+
184
+ ```text
185
+ --concurrency default: 1
186
+ --run-concurrency default: 3
187
+ ```
188
+
189
+ Do not change the separate `max_tool_rounds_per_step` default of `10`, and do not change the meaning of automatic `repeat_concurrency`.
190
+
191
+ - [ ] **Step 3: Update the intro page and bundled skill**
192
+
193
+ Change the intro table row to:
194
+
195
+ ```html
196
+ <tr><td><code>--concurrency N</code></td><td>Case 级并行上限(默认 1,即逐个顺序执行);提高该值可并行执行多个 Case</td></tr>
197
+ ```
198
+
199
+ In the bundled skill, describe the defaults as:
200
+
201
+ ```markdown
202
+ 多个 Case 默认顺序执行(`--concurrency` 默认为 1,可用 `--concurrency N` 调整)。Case 内由
203
+ `execution.repeat` 展开的 run 仍默认并行:省略 `execution.repeat_concurrency` 时使用
204
+ 展开后的总 run 数,所有 Case 再共享 `--run-concurrency N`(默认 3)的全局上限;
205
+ ```
206
+
207
+ - [ ] **Step 4: Verify no stale concurrency defaults remain**
208
+
209
+ Run:
210
+
211
+ ```bash
212
+ rg -n \
213
+ 'concurrency.{0,40}(default 10|default 32|默认 10|默认 32)|默认最多同时 10 个|up to 10 at a time by default' \
214
+ yama tests README.md README.zh-CN.md docs skills \
215
+ --glob '!docs/superpowers/**'
216
+ ```
217
+
218
+ Expected: exit status `1` with no matches. Any matches referring specifically to concurrency must be corrected; unrelated defaults such as `max_tool_rounds_per_step: 10` must remain unchanged.
219
+
220
+ - [ ] **Step 5: Re-run behavior verification**
221
+
222
+ Run:
223
+
224
+ ```bash
225
+ uv run pytest tests/test_cli.py tests/test_runner.py tests/test_run_plan.py -q
226
+ ```
227
+
228
+ Expected: all tests pass with no warnings or errors.
229
+
230
+ - [ ] **Step 6: Review and commit the documentation change**
231
+
232
+ Run:
233
+
234
+ ```bash
235
+ git diff --check
236
+ git diff -- README.md README.zh-CN.md docs/agent-skill-test-framework-design.md docs/case-schema-reference.md docs/yama-intro.html skills/eval-plugin-with-yama/SKILL.md skills/eval-plugin-with-yama/references/case-schema.md
237
+ ```
238
+
239
+ Confirm the diff changes only the two concurrency defaults and corresponding explanatory wording, then commit:
240
+
241
+ ```bash
242
+ git add README.md README.zh-CN.md \
243
+ docs/agent-skill-test-framework-design.md \
244
+ docs/case-schema-reference.md \
245
+ docs/yama-intro.html \
246
+ skills/eval-plugin-with-yama/SKILL.md \
247
+ skills/eval-plugin-with-yama/references/case-schema.md
248
+ git commit -m "docs: document lower concurrency defaults"
249
+ ```