Finish item 378: name a Jira plan's chunks by the issue key through the branch and title templates
CI / tests (pull_request) Successful in 2m7s

This commit is contained in:
2026-11-14 20:37:30 +01:00
parent 93bad95bfd
commit 2b4c8b4cab
6 changed files with 30 additions and 5 deletions
+1
View File
@@ -2,6 +2,7 @@
## Unreleased ## 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 `<checkout>-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 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://<site>/browse/<KEY>`: 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 project config may name its plan as `jira:https://<site>/browse/<KEY>`: 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. - 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.
+2
View File
@@ -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. 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 ```sh
mkdir -p ~/.claude-projects/acme && cd ~/.claude-projects/acme mkdir -p ~/.claude-projects/acme && cd ~/.claude-projects/acme
git init git init
+3
View File
@@ -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 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 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. 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 <checkout>-ABC-123, and its commits read "ABC-123 - …".
`project-config <setting>` prints each one's value, and the full listing shows it only where the `project-config <setting>` prints each one's value, and the full listing shows it only where the
config changes it from what it is when left out. config changes it from what it is when left out.
+7
View File
@@ -35,6 +35,13 @@ class TitleTest(unittest.TestCase):
self.assertEqual(branch_of("item-{id}", 357), "item-357") self.assertEqual(branch_of("item-{id}", 357), "item-357")
self.assertEqual(branch_of("feature/PAY-{id}", 357), "feature/PAY-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: def test_reads_the_summary_out_of_a_title_that_fits(self) -> None:
cases = { cases = {
("{summary}", "Answer prose round 1: 0 🔴, 0 🟡 (0 misread)"): "Answer prose round 1: 0 🔴, 0 🟡 (0 misread)", ("{summary}", "Answer prose round 1: 0 🔴, 0 🟡 (0 misread)"): "Answer prose round 1: 0 🔴, 0 🟡 (0 misread)",
+17
View File
@@ -2067,3 +2067,20 @@ Read most (opens and searches):
- `bin/plan_store/contract.py` 1 - `bin/plan_store/contract.py` 1
- `bin/release_plan/todo_table.py` 1 - `bin/release_plan/todo_table.py` 1
- `bin/todo_item/main.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
-5
View File
@@ -12,7 +12,6 @@
| ID | Release | Blocked by | Exempt | Item | L | E | I | R | S | Moves | Score | | 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 | | 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 | | 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 | | 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 ## 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. ### 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. 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.