diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.json index 68360ba..7fb8d09 100644 --- a/.claude-plugin/marketplace.json +++ b/.claude-plugin/marketplace.json @@ -6,7 +6,7 @@ }, "metadata": { "description": "Ticket-to-PR development workflow skills. Jira, Azure DevOps and GitHub Issues, or a backlog in the repo when there is no tracker at all.", - "version": "1.1.0" + "version": "1.2.0" }, "plugins": [ { diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.json index f26fe14..764f672 100644 --- a/.claude-plugin/plugin.json +++ b/.claude-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "workbench", - "version": "1.1.0", + "version": "1.2.0", "description": "Ticket-to-PR development workflow: triage, plan with verified citations, implement inside the plan, review, commit, PR. Pluggable issue trackers (Jira, Azure DevOps, GitHub Issues) or a backlog in the repo, so it works with no tracker at all.", "author": { "name": "matheusPavaneli", diff --git a/CHANGELOG.md b/CHANGELOG.md index a83f947..21ed7b9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,32 @@ command's own output, and one that removes it. A `--json` payload that loses or renames a key raises its `schema` number in the same release, and `contract.VERSIONS` is asserted against the real output so it cannot drift. +## 1.2.0 + +Work in a critical zone is planned from the start, not after a finished fix, +and the billing zone stops matching every path that contains "plan". + +### Changed + +- **`wb start` plans first when the ticket names code in a critical zone.** It + reads the identifiers the ticket spells (in backticks, snake_case or + CamelCase, at most six), finds where each is defined, and keeps the ticket + off the light path when that file is in a critical zone. It prints + `light no: the ticket names , defined in , which is in the + zone: plan it first`. On the benchmark's BN-4 this took the cost from + 6.7x to 5.3x a plain session. **Upgrade cost:** such a ticket starts on the + standard route. `"light_path": false` is unchanged. +- **A ticket `wb finish` moves to the standard route keeps its change.** The + message and `plan-change` say to plan around the change on disk, never to + revert it. **Upgrade cost:** none. + +### Fixed + +- **The billing zone counts `plan` only as a pricing plan** (`plans/`, + `plan_limits.py`, `subscription_plan.ts`), no longer `plan-change`, + `planner` or `explanation`. `pricing` is added. **Upgrade cost:** a plan + audited with the old zones reports a zone mismatch at its next audit. + ## 1.1.0 Small work stops paying for the whole flow, and the benchmark can now show diff --git a/README.md b/README.md index 968bf76..43eea65 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ Ticket-to-PR development workflow skills for Claude Code, with pluggable issue trackers (Jira Cloud, Azure DevOps, GitHub Issues, GitLab Issues, Linear, or a backlog in the repo). -Ten skills, one CLI, two hooks, 1202 tests, no third-party dependencies. +Ten skills, one CLI, two hooks, 1206 tests, no third-party dependencies. ## Quickstart @@ -261,7 +261,10 @@ arm, so a direction rather than a verdict): | one-character bug | fixed, no test (2/2) | fixed, with a test | 1.7x tokens, 1.5x wall | | one-file chore | fixed, no test (2/2) | fixed, with a test | 2.1x tokens, 1.8x wall | | ticket naming a renamed function | **fixed a dead copy; hidden tests fail (2/2)** | fixed the live check, with a test | 2.8x tokens, 2.9x wall | -| bug in user data | fixed, no test (2/2) | fixed, with a test, planned (critical zone) | 6.7x tokens, 5.8x wall | +| bug in user data | fixed, no test (2/2) | fixed, with a test, planned (critical zone) | 5.3x tokens, 5.2x wall* | + +\* Re-measured after 1.2.0 ([ed58420](bench/results/2026-09-27-ed58420/report.md)), which plans a +critical-zone ticket from the start instead of after a finished fix (6.7x before). Small work now costs about twice a plain session; work in a critical zone still costs the full plan. [What workbench caught](docs/caught.md) walks through each diff --git a/bench/results/2026-09-27-ed58420/BN-4-plain-1.json b/bench/results/2026-09-27-ed58420/BN-4-plain-1.json new file mode 100644 index 0000000..5be844a --- /dev/null +++ b/bench/results/2026-09-27-ed58420/BN-4-plain-1.json @@ -0,0 +1,26 @@ +{ + "ticket": "BN-4", + "arm": "plain", + "run": 1, + "metrics": { + "hidden_pass": 1, + "out_of_scope": 0, + "rework": 0, + "tokens": 241982, + "cost_usd": 0.10434500000000002, + "wall_s": 25.3, + "tests_missing": 1, + "invalid_refs": 0, + "unexpected_changes": 0 + }, + "out_of_scope_files": [], + "invalid_ref_list": [], + "changed": [ + "shop/users.py" + ], + "commits": 1, + "session_id": "7baa3f5e-d95c-474b-8ef6-10a7541f1edd", + "num_turns": 8, + "workflow_artifacts": [], + "error": null +} diff --git a/bench/results/2026-09-27-ed58420/BN-4-plain-2.json b/bench/results/2026-09-27-ed58420/BN-4-plain-2.json new file mode 100644 index 0000000..704d212 --- /dev/null +++ b/bench/results/2026-09-27-ed58420/BN-4-plain-2.json @@ -0,0 +1,26 @@ +{ + "ticket": "BN-4", + "arm": "plain", + "run": 2, + "metrics": { + "hidden_pass": 1, + "out_of_scope": 0, + "rework": 0, + "tokens": 241750, + "cost_usd": 0.1033944, + "wall_s": 26.4, + "tests_missing": 1, + "invalid_refs": 0, + "unexpected_changes": 0 + }, + "out_of_scope_files": [], + "invalid_ref_list": [], + "changed": [ + "shop/users.py" + ], + "commits": 1, + "session_id": "6e85e066-fc2b-4cf8-ba64-9421e5ea8d14", + "num_turns": 7, + "workflow_artifacts": [], + "error": null +} diff --git a/bench/results/2026-09-27-ed58420/BN-4-workbench-1.json b/bench/results/2026-09-27-ed58420/BN-4-workbench-1.json new file mode 100644 index 0000000..cfa1d0f --- /dev/null +++ b/bench/results/2026-09-27-ed58420/BN-4-workbench-1.json @@ -0,0 +1,37 @@ +{ + "ticket": "BN-4", + "arm": "workbench", + "run": 1, + "metrics": { + "hidden_pass": 1, + "out_of_scope": 0, + "rework": 0, + "tokens": 1561050, + "cost_usd": 0.5082442000000001, + "wall_s": 152.3, + "tests_missing": 0, + "invalid_refs": 0, + "unexpected_changes": 0 + }, + "out_of_scope_files": [], + "invalid_ref_list": [], + "changed": [ + "shop/users.py", + "tests/test_users.py" + ], + "commits": 1, + "session_id": "0e1ec04c-c698-4319-9d97-3560ef228bde", + "num_turns": 41, + "workflow_artifacts": [ + ".workflow/BN-4/audit.json", + ".workflow/BN-4/commit.txt", + ".workflow/BN-4/commit_draft.txt", + ".workflow/BN-4/evidence.json", + ".workflow/BN-4/evidence.md", + ".workflow/BN-4/git.log.json", + ".workflow/BN-4/sdd.json", + ".workflow/BN-4/sdd.md", + ".workflow/BN-4/triage.json" + ], + "error": null +} diff --git a/bench/results/2026-09-27-ed58420/BN-4-workbench-2.json b/bench/results/2026-09-27-ed58420/BN-4-workbench-2.json new file mode 100644 index 0000000..1879883 --- /dev/null +++ b/bench/results/2026-09-27-ed58420/BN-4-workbench-2.json @@ -0,0 +1,33 @@ +{ + "ticket": "BN-4", + "arm": "workbench", + "run": 2, + "metrics": { + "hidden_pass": 1, + "out_of_scope": 0, + "rework": 0, + "tokens": 999730, + "cost_usd": 0.3895148, + "wall_s": 117.6, + "tests_missing": 0, + "invalid_refs": 0, + "unexpected_changes": 0 + }, + "out_of_scope_files": [], + "invalid_ref_list": [], + "changed": [ + "shop/users.py", + "tests/test_users.py" + ], + "commits": 0, + "session_id": "05d8bf79-576a-428a-a755-876e38bb2f86", + "num_turns": 32, + "workflow_artifacts": [ + ".workflow/BN-4/audit.json", + ".workflow/BN-4/git.log.json", + ".workflow/BN-4/sdd.json", + ".workflow/BN-4/sdd.md", + ".workflow/BN-4/triage.json" + ], + "error": null +} diff --git a/bench/results/2026-09-27-ed58420/report.md b/bench/results/2026-09-27-ed58420/report.md new file mode 100644 index 0000000..7aa8791 --- /dev/null +++ b/bench/results/2026-09-27-ed58420/report.md @@ -0,0 +1,38 @@ +# Benchmark report + +- workbench commit: `ed58420` +- model: `claude-sonnet-5` +- date: 2026-09-27 +- runs recorded: 4, with an error (left out of every metric): 0, skipped by the spend cap: 0 +- arms: plain, workbench +- workbench and run sessions that left workflow artifacts: 2 of 2 +- auth: subscription +- spent: US$1.11 (Claude Code's estimate; drawn from the subscription's usage limit, not billed) + +Metrics and their direction are defined in docs/bench.md. + +## BN-4 + +| metric | better | plain median | plain min-max | workbench median | workbench min-max | +|---|---|---|---|---|---| +| hidden_pass | higher | 1 | 1-1 (n=2) | 1 | 1-1 (n=2) | +| out_of_scope | lower | 0 | 0-0 (n=2) | 0 | 0-0 (n=2) | +| rework | lower | 0 | 0-0 (n=2) | 0 | 0-0 (n=2) | +| tokens | lower | 241866 | 241750-241982 (n=2) | 1280390 | 999730-1561050 (n=2) | +| cost_usd | lower | 0.10 | 0.10-0.10 (n=2) | 0.45 | 0.39-0.51 (n=2) | +| wall_s | lower | 25.85 | 25.30-26.40 (n=2) | 134.95 | 117.60-152.30 (n=2) | +| tests_missing | lower | 1 | 1-1 (n=2) | 0 | 0-0 (n=2) | +| invalid_refs | lower | 0 | 0-0 (n=2) | 0 | 0-0 (n=2) | +| unexpected_changes | lower | 0 | 0-0 (n=2) | 0 | 0-0 (n=2) | + +## Caught errors + +Runs that made each error, per arm, wherever the arms differ (for hidden_pass: runs that failed the hidden tests). + +- BN-4 tests_missing: plain 2 of 2 runs, workbench 0 of 2 + +## Where workbench loses + +- BN-4 tokens: workbench median 1280390 against plain 241866 (lower is better) +- BN-4 cost_usd: workbench median 0.45 against plain 0.10 (lower is better) +- BN-4 wall_s: workbench median 134.95 against plain 25.85 (lower is better) diff --git a/docs/bench.md b/docs/bench.md index ac6b071..8122a7a 100644 --- a/docs/bench.md +++ b/docs/bench.md @@ -194,5 +194,12 @@ cheaper arm is the one that shipped the wrong fix) or on BN-4, which leaves the light path by design because it touches user data, and then pays for the full plan. The first run put the same kind of work at 3.6-10x. +[2026-09-27, commit ed58420](../bench/results/2026-09-27-ed58420/report.md): BN-4 +again, after WB-58. `wb start` now reads `display_name` in the ticket, finds it +defined in `shop/users.py` (user-data zone) and plans first, so no session +finishes a fix and then re-plans it. BN-4 went from 6.7x to 5.3x plain's tokens +and 5.8x to 5.2x its wall time. What remains is the standard route itself, +the bar a critical zone is held to by design. Two runs per arm, no leak, no error. + Run it on demand, when a change moves the cost of the flow — a new gate, a new tier bound, a skill that grew. diff --git a/docs/caught.md b/docs/caught.md index c017a24..9f17127 100644 --- a/docs/caught.md +++ b/docs/caught.md @@ -74,8 +74,8 @@ section counts `tests_missing` for each arm. **Plain, 2 of 2 runs.** Fixed, no test, committed. 7-8 turns. -**Workbench, 2 of 2 runs.** This is the one guardrail that fired. The session -fixed the bug on the light path, then `wb finish` refused: +**Workbench, 2 of 2 runs (9abd3c9).** This is the one guardrail that fired. +The session fixed the bug on the light path, then `wb finish` refused: `BN-4 outgrew the light path: touches user-data. It now takes the standard route`. The session then planned the change, audited the plan, verified it and committed, with a test. The result matched plain's plus a test, and it cost @@ -84,6 +84,11 @@ which WB-58 records as waste. Records: [BN-4-workbench-1](../bench/results/2026-09-27-9abd3c9/BN-4-workbench-1.json), [BN-4-workbench-2](../bench/results/2026-09-27-9abd3c9/BN-4-workbench-2.json). +**Since 1.2.0** ([ed58420](../bench/results/2026-09-27-ed58420/report.md)), +`wb start` catches the zone before the work begins: it reads `display_name` in +the ticket, finds it in `shop/users.py`, and plans first. Both sessions planned, +fixed and tested once, and the cost fell to 5.3x. + **What caught it.** The zone check did what it is for: a change to user data is held to the highest bar in the repo. Whether that bar paid for itself on a whitespace fix is a fair question, and this record is the evidence either way. diff --git a/lib/workbench/__init__.py b/lib/workbench/__init__.py index 6854e5d..2b9b201 100644 --- a/lib/workbench/__init__.py +++ b/lib/workbench/__init__.py @@ -5,4 +5,4 @@ list. Anything a model could invent is something this package decides. """ -__version__ = "1.1.0" +__version__ = "1.2.0"