From 2b4c8b4cab65da757f9cf30c12a09c6f69137727 Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Sat, 14 Nov 2026 20:37:30 +0100 Subject: [PATCH 1/4] Finish item 378: name a Jira plan's chunks by the issue key through the branch and title templates --- CHANGELOG.md | 1 + README.md | 2 ++ bin/project_config/main.py | 3 +++ bin/project_config/test_templates.py | 7 +++++++ docs/reading-cost.md | 17 +++++++++++++++++ todo.md | 5 ----- 6 files changed, 30 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6ffc18a0..3b5cd264 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ## Unreleased +- Project configs may name chunks of a Jira plan by the issue key: `branch = "ABC-{id}"` and `commit-title = "ABC-{id} - {summary}"` give the branch `ABC-123`, the worktree `-ABC-123` and commits titled `ABC-123 - …`. `project-config --help` and the README say so. - A read of a plan in a Jira epic converts every issue description in one `adf_codec` container run, however many issues the epic holds. The codec builds its image inside one of the machine's heavy slots that `run-heavy` shares, so sessions reading at once build it once. - A project config may name its plan as `jira:https:///browse/`: the plan is then read from the open child issues of that Jira Cloud epic, in backlog order, with the credentials in the config's `env-file`. Such a plan is only read so far: file, edit and finish its issues in Jira. - A new `adf_codec` package converts markdown to ADF, the rich text of Jira Cloud and Confluence, and back with `@larvit/adf-codec` 0.3.1. It runs in a pinned Node container with a memory limit and no network, and returns adf-codec's error codes as a `Failure`. No tool calls it yet. diff --git a/README.md b/README.md index 615e4282..b851234f 100644 --- a/README.md +++ b/README.md @@ -113,6 +113,8 @@ A client that plans in Jira Cloud names an epic as its project's plan: `plan = " A read fails, naming the issue, where a child is in another Jira project or names no such Fix Version. The config's `env-file` must hold `ATLASSIAN_EMAIL` and `ATLASSIAN_API_TOKEN`, an API token of that Atlassian account, and only its owner may read that file: `chmod 600` it. The loop only reads such a plan so far. `todo-item add`, `edit`, `move` and `finish` fail, so file, edit and finish its issues in Jira. `rank_todo.py` doesn't rank it, since Jira's backlog does. The four things not supported for a plan outside the checkout, above, are not supported for a plan in Jira either. +To name a chunk's branch, worktree, commits and pull request by the issue key, as in `ABC-123` and `ABC-123 - …`, set `branch = "ABC-{id}"`, `commit-title = "ABC-{id} - {summary}"` and `pull-request-title = "ABC-{id} - {summary}"`; `project-config --help` says how the templates work. + ```sh mkdir -p ~/.claude-projects/acme && cd ~/.claude-projects/acme git init diff --git a/bin/project_config/main.py b/bin/project_config/main.py index a3f236bf..d3ed15f2 100644 --- a/bin/project_config/main.py +++ b/bin/project_config/main.py @@ -53,6 +53,9 @@ character; left out, it is "{summary}". `branch` holds {id} once, among letters, A title must fit its template only on a branch that fits `branch`. On any other branch, as for a chunk with no plan item, such as a release review, it may be the bare summary. A tool that reads a title for its summary tries `commit-title`, then `pull-request-title`, then takes the title whole. +For a Jira plan the item's ID is the issue's number, so a project key such as ABC gives the ticket-style names with +`branch = "ABC-{id}"`, `commit-title = "ABC-{id} - {summary}"` and `pull-request-title = "ABC-{id} - {summary}"`: +the chunk of ABC-123 is on the branch ABC-123, in the worktree -ABC-123, and its commits read "ABC-123 - …". `project-config ` prints each one's value, and the full listing shows it only where the config changes it from what it is when left out. diff --git a/bin/project_config/test_templates.py b/bin/project_config/test_templates.py index 9d9847b6..1ce29106 100644 --- a/bin/project_config/test_templates.py +++ b/bin/project_config/test_templates.py @@ -35,6 +35,13 @@ class TitleTest(unittest.TestCase): self.assertEqual(branch_of("item-{id}", 357), "item-357") self.assertEqual(branch_of("feature/PAY-{id}", 357), "feature/PAY-357") + def test_the_ticket_style_templates_of_a_jira_plan_name_the_branch_and_title_by_the_issue_key(self) -> None: + self.assertIsNone(branch_fault("ABC-{id}")) + self.assertIsNone(title_fault("ABC-{id} - {summary}")) + self.assertEqual(branch_of("ABC-{id}", 123), "ABC-123") + self.assertTrue(branch_fits("ABC-{id}", "ABC-123")) + self.assertEqual(summary_of("ABC-{id} - {summary}", "ABC-123 - Regression tests for GET /v4/clients"), "Regression tests for GET /v4/clients") + def test_reads_the_summary_out_of_a_title_that_fits(self) -> None: cases = { ("{summary}", "Answer prose round 1: 0 🔴, 0 🟡 (0 misread)"): "Answer prose round 1: 0 🔴, 0 🟡 (0 misread)", diff --git a/docs/reading-cost.md b/docs/reading-cost.md index c3e1286e..a92e4975 100644 --- a/docs/reading-cost.md +++ b/docs/reading-cost.md @@ -2067,3 +2067,20 @@ Read most (opens and searches): - `bin/plan_store/contract.py` 1 - `bin/release_plan/todo_table.py` 1 - `bin/todo_item/main.py` 1 + +## Reading cost, chunk ca7c9a18d77d, finished 2026-11-14T19:36:20Z + +87192 new input tokens before the first commit. + +Read most (opens and searches): + +- `bin/plan_store/test_jira_epic.py` 11 +- `bin/adf_codec/convert.py` 3 +- `bin/adf_codec/test_adf_codec.py` 3 +- `bin/plan_store/jira_epic.py` 3 +- `bin/run_heavy/main.py` 3 +- `README.md` 2 +- `bin/adf_codec/__init__.py` 2 +- `bin/machine_load/slots.py` 2 +- `docs/decisions.md` 2 +- `bin/adf_codec/node_shim/Dockerfile` 1 diff --git a/todo.md b/todo.md index 624d3d43..709f250c 100644 --- a/todo.md +++ b/todo.md @@ -12,7 +12,6 @@ | ID | Release | Blocked by | Exempt | Item | L | E | I | R | S | Moves | Score | |---|---|---|---|---|---|---|---|---|---|---|---| -| 378 | 0.11.0 | | | **Name the branches, worktrees and commit and PR titles of a Jira plan's chunks by the issue key, as in `ABC-123` and `ABC-123 - ...`.** | 2 | 2 | 3 | 5 | 2 | 1.6 by 4 | 1.4 | | 353 | 0.11.0 | | | **Let a project's config take its goals and audience from a Jira epic's description, under the same two headings.** | 2 | 2 | 3 | 5 | 3 | 1.6 by 4 | 1.3 | | 358 | 0.11.0 | | | **Let a project's config allow its runtime and tests on the host, and set the comprehension score under which code health is very important.** | 2 | 2 | 3 | 5 | 3 | 1.6 by 4 | 1.3 | | 362 | 0.11.0 | | | **Send loop-claude's notices through the notifier a project's config names, with Mattermost as the first backend.** | 2 | 1 | 2 | 3 | 3 | 1.6 by 3 | 1.0 | @@ -85,10 +84,6 @@ ## Details -### 378. Name the branches, worktrees and commit and PR titles of a Jira plan's chunks by the issue key, as in `ABC-123` and `ABC-123 - ...`. - -lilleman's call, 2026-11-14: split from item 351. Item IDs stay `int`: the Jira store holds the project key and an issue's number is the item's ID. A branch template `ABC-{id}` and a commit-title template `ABC-{id} - {summary}` already give the ticket-style names `CLAUDE.md`'s ticket rules ask for. Make a project with a Jira plan get them without spelling its key twice, or document the two templates where the plan setting is documented, whichever is simpler, and check `chunk-preflight` names the worktree the same way. - ### 353. Let a project's config take its goals and audience from a Jira epic's description, under the same two headings. lilleman's call, 2026-11-12: this client keeps its goals and audience in the plan epic's description. The source is a config setting, never hard-coded; item 346 builds the file source this one adds to. Read through the adf-codec shim. -- 2.52.0 From 20f8ba29da1842836421c47fc8d8464a2bd526b4 Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Sat, 14 Nov 2026 20:40:07 +0100 Subject: [PATCH 2/4] =?UTF-8?q?Answer=20stability=20round=201:=200=20?= =?UTF-8?q?=F0=9F=94=B4,=201=20=F0=9F=9F=A1=20(0=20misread);=20delete=20th?= =?UTF-8?q?e=20test=20that=20repeats=20the=20PAY-{id}=20cases?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bin/project_config/test_templates.py | 7 ------- 1 file changed, 7 deletions(-) diff --git a/bin/project_config/test_templates.py b/bin/project_config/test_templates.py index 1ce29106..9d9847b6 100644 --- a/bin/project_config/test_templates.py +++ b/bin/project_config/test_templates.py @@ -35,13 +35,6 @@ class TitleTest(unittest.TestCase): self.assertEqual(branch_of("item-{id}", 357), "item-357") self.assertEqual(branch_of("feature/PAY-{id}", 357), "feature/PAY-357") - def test_the_ticket_style_templates_of_a_jira_plan_name_the_branch_and_title_by_the_issue_key(self) -> None: - self.assertIsNone(branch_fault("ABC-{id}")) - self.assertIsNone(title_fault("ABC-{id} - {summary}")) - self.assertEqual(branch_of("ABC-{id}", 123), "ABC-123") - self.assertTrue(branch_fits("ABC-{id}", "ABC-123")) - self.assertEqual(summary_of("ABC-{id} - {summary}", "ABC-123 - Regression tests for GET /v4/clients"), "Regression tests for GET /v4/clients") - def test_reads_the_summary_out_of_a_title_that_fits(self) -> None: cases = { ("{summary}", "Answer prose round 1: 0 🔴, 0 🟡 (0 misread)"): "Answer prose round 1: 0 🔴, 0 🟡 (0 misread)", -- 2.52.0 From 22265462e06203fd2aa49b7c7a7a0df19e525e6d Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Sat, 14 Nov 2026 20:40:07 +0100 Subject: [PATCH 3/4] =?UTF-8?q?Answer=20prose=20round=201:=200=20?= =?UTF-8?q?=F0=9F=94=B4,=202=20=F0=9F=9F=A1=20(0=20misread);=20reword=20th?= =?UTF-8?q?e=20Jira=20template=20paragraph,=20README=20sentence=20and=20ch?= =?UTF-8?q?angelog=20bullet?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 2 +- README.md | 2 +- bin/project_config/main.py | 13 ++++++++++--- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3b5cd264..def31367 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,7 @@ ## Unreleased -- Project configs may name chunks of a Jira plan by the issue key: `branch = "ABC-{id}"` and `commit-title = "ABC-{id} - {summary}"` give the branch `ABC-123`, the worktree `-ABC-123` and commits titled `ABC-123 - …`. `project-config --help` and the README say so. +- A project with a Jira plan can name each chunk's branch, worktree, commits and pull request by the issue key, as in `ABC-123` and `ABC-123 - …`. The README shows the three templates to set. - A read of a plan in a Jira epic converts every issue description in one `adf_codec` container run, however many issues the epic holds. The codec builds its image inside one of the machine's heavy slots that `run-heavy` shares, so sessions reading at once build it once. - A project config may name its plan as `jira:https:///browse/`: the plan is then read from the open child issues of that Jira Cloud epic, in backlog order, with the credentials in the config's `env-file`. Such a plan is only read so far: file, edit and finish its issues in Jira. - A new `adf_codec` package converts markdown to ADF, the rich text of Jira Cloud and Confluence, and back with `@larvit/adf-codec` 0.3.1. It runs in a pinned Node container with a memory limit and no network, and returns adf-codec's error codes as a `Failure`. No tool calls it yet. diff --git a/README.md b/README.md index b851234f..eca08cce 100644 --- a/README.md +++ b/README.md @@ -113,7 +113,7 @@ A client that plans in Jira Cloud names an epic as its project's plan: `plan = " A read fails, naming the issue, where a child is in another Jira project or names no such Fix Version. The config's `env-file` must hold `ATLASSIAN_EMAIL` and `ATLASSIAN_API_TOKEN`, an API token of that Atlassian account, and only its owner may read that file: `chmod 600` it. The loop only reads such a plan so far. `todo-item add`, `edit`, `move` and `finish` fail, so file, edit and finish its issues in Jira. `rank_todo.py` doesn't rank it, since Jira's backlog does. The four things not supported for a plan outside the checkout, above, are not supported for a plan in Jira either. -To name a chunk's branch, worktree, commits and pull request by the issue key, as in `ABC-123` and `ABC-123 - …`, set `branch = "ABC-{id}"`, `commit-title = "ABC-{id} - {summary}"` and `pull-request-title = "ABC-{id} - {summary}"`; `project-config --help` says how the templates work. +To name a chunk's branch, worktree, commits and pull request by the issue key, as in `ABC-123` and `ABC-123 - …`, set these three templates, with your Jira project's key in place of `ABC`: `branch = "ABC-{id}"`, `commit-title = "ABC-{id} - {summary}"` and `pull-request-title = "ABC-{id} - {summary}"`. `project-config --help` says how the templates work. ```sh mkdir -p ~/.claude-projects/acme && cd ~/.claude-projects/acme diff --git a/bin/project_config/main.py b/bin/project_config/main.py index d3ed15f2..ee85fcbf 100644 --- a/bin/project_config/main.py +++ b/bin/project_config/main.py @@ -53,12 +53,19 @@ character; left out, it is "{summary}". `branch` holds {id} once, among letters, A title must fit its template only on a branch that fits `branch`. On any other branch, as for a chunk with no plan item, such as a release review, it may be the bare summary. A tool that reads a title for its summary tries `commit-title`, then `pull-request-title`, then takes the title whole. -For a Jira plan the item's ID is the issue's number, so a project key such as ABC gives the ticket-style names with -`branch = "ABC-{id}"`, `commit-title = "ABC-{id} - {summary}"` and `pull-request-title = "ABC-{id} - {summary}"`: -the chunk of ABC-123 is on the branch ABC-123, in the worktree -ABC-123, and its commits read "ABC-123 - …". `project-config ` prints each one's value, and the full listing shows it only where the config changes it from what it is when left out. +In a Jira plan an item's ID is its issue's number. To name a chunk by its issue key, write the +Jira project's key before {id}, as here for the key ABC: + + branch = "ABC-{id}" + commit-title = "ABC-{id} - {summary}" + pull-request-title = "ABC-{id} - {summary}" + +The chunk for the issue ABC-123 is then on the branch ABC-123, in the worktree -ABC-123, +and its commits and pull request are titled "ABC-123 - …". + Exit 1, naming each fault on stderr, where no config names the checkout, or its config leaves out a setting, names an unknown one, misspells a path, a language or a template, or sets `wait-for-approval` to anything but true or false, and where `env-file` is asked for and not set. No path setting has a default. -- 2.52.0 From c99c53202d6cd377fa4de0934773a3233aaa37a2 Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Sat, 14 Nov 2026 20:40:07 +0100 Subject: [PATCH 4/4] =?UTF-8?q?Answer=20product-owner=20round=201:=200=20?= =?UTF-8?q?=F0=9F=94=B4,=200=20=F0=9F=9F=A1=20(0=20misread)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit -- 2.52.0