From 68808e7eee6759759b9426c2f1c46c2bc4462027 Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Sat, 14 Nov 2026 21:27:23 +0100 Subject: [PATCH] =?UTF-8?q?Answer=20prose=20round=201:=200=20=F0=9F=94=B4,?= =?UTF-8?q?=208=20=F0=9F=9F=A1=20(0=20misread);=20reword=20the=20README=20?= =?UTF-8?q?paragraph,=20help,=20docstrings=20and=20messages?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 +- bin/loop_claude/loop/usage.py | 40 ++++++++++++++-------------- bin/loop_claude/project/premises.py | 2 +- bin/plan_store/stores.py | 3 ++- bin/record_store/jira_description.py | 6 ++--- bin/record_store/stores.py | 4 +-- 6 files changed, 29 insertions(+), 28 deletions(-) diff --git a/README.md b/README.md index ceb0c6ff..23bd8687 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. -A client that keeps its goals and audience in an epic's description names that epic as the goals file: `goals-and-audience = "jira:https://acme.atlassian.net/browse/ABC-12"`, which may be the plan's own epic. The description needs `## Goals` and `## Audience` as headings, level-2 headings in Jira's editor, and the same `env-file`. The loop only reads it, so edit the description in Jira. Whoever may edit that description sets the premises every worker and judge follows, so keep its edit rights to the people who own the project's goals. +A client that keeps its goals and audience in an epic's description names that epic as the goals file: `goals-and-audience = "jira:https://acme.atlassian.net/browse/ABC-12"`, which may be the plan's own epic. Such a config keeps its plan in Jira too, and reads both with the same `env-file`. The description needs `## Goals` and `## Audience` as headings, level-2 headings in Jira's editor. The loop only reads the description, so edit it in Jira; `project-record open goals-and-audience` prints a file holding its text. Whoever may edit that description sets the premises every worker and judge follows, so keep its edit rights to the people who own the project's goals. 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. diff --git a/bin/loop_claude/loop/usage.py b/bin/loop_claude/loop/usage.py index b9b0a3d5..1ca02464 100644 --- a/bin/loop_claude/loop/usage.py +++ b/bin/loop_claude/loop/usage.py @@ -4,26 +4,26 @@ usage: loop-claude Run it anywhere inside a project checkout whose goals file has ## Goals and ## Audience, the premises. The goals file is the one the project's config, ~/.claude-projects//config.toml, sets -as goals-and-audience: a file, or a Jira epic whose description holds it. `project-config -goals-and-audience` prints where it is. The task runs at the checkout root. -Each cycle a worker runs the task. A chunk's first worker prompt also quotes the premises. -They, with code health (~/.claude/CLAUDE.md → "Shared goal") ranked first unless the goals file -voids it, choose between ways to deliver the chunk's todo.md items, or else the task, and never -widen them. A judge then reads the transcript's end, the premises, and the records: the project's -AGENTS.md and docs/decisions.md, and the human's ~/.claude/CLAUDE.md, ~/.claude/rules/*.md and -~/.claude/skills/larv-review/standards/*.md, where they exist. It rules whether the chunk, the work -of one PR, is finished. A chunk stays unfinished until each answer the human typed in it that a -later chunk could need is recorded: the premises or the records hold it, or the transcript shows the -worker writing it into the premises, AGENTS.md, docs/decisions.md, todo.md or a code comment. A -choice the worker made that the premises or the records settle is not asked about. When the worker -asks a question they answer, the judge quotes the answer, loop-claude prints it, and the worker -resumes with it. A quote they do not hold word for word is dropped, and the question goes to the -human. So does a question asked again after its answer. A question the human answered earlier in the -chunk goes back to the worker with that answer, unless the question quotes the words of the answer -that leave it open. The fourth question they answer in one cycle goes to the human too, with the -quote. An unfinished chunk resumes its session next cycle, and the worker is shown the passage the -judge quoted as the work remaining. The next chunk starts a fresh session. Cycles continue until an -exit below or Ctrl-C. Words: ~/.claude/CLAUDE.md → "Vocabulary". +as goals-and-audience: a file, or a Jira epic's description. `project-config goals-and-audience` +prints where it is. The task runs at the checkout root. Each cycle a worker runs the task. A chunk's +first worker prompt also quotes the premises. They, with code health (~/.claude/CLAUDE.md → +"Shared goal") ranked first unless the goals file voids it, choose between ways to deliver the +chunk's todo.md items, or else the task, and never widen them. A judge then reads the transcript's +end, the premises, and the records: the project's AGENTS.md and docs/decisions.md, and the human's +~/.claude/CLAUDE.md, ~/.claude/rules/*.md and ~/.claude/skills/larv-review/standards/*.md, where +they exist. It rules whether the chunk, the work of one PR, is finished. A chunk stays unfinished +until each answer the human typed in it that a later chunk could need is recorded: the premises or +the records hold it, or the transcript shows the worker writing it into the premises, AGENTS.md, +docs/decisions.md, todo.md or a code comment. A choice the worker made that the premises or the +records settle is not asked about. When the worker asks a question they answer, the judge quotes the +answer, loop-claude prints it, and the worker resumes with it. A quote they do not hold word for +word is dropped, and the question goes to the human. So does a question asked again after its +answer. A question the human answered earlier in the chunk goes back to the worker with that answer, +unless the question quotes the words of the answer that leave it open. The fourth question they +answer in one cycle goes to the human too, with the quote. An unfinished chunk resumes its session +next cycle, and the worker is shown the passage the judge quoted as the work remaining. The next +chunk starts a fresh session. Cycles continue until an exit below or Ctrl-C. Words: +~/.claude/CLAUDE.md → "Vocabulary". A question only the human can answer is an interrupt (bin/loop_claude/cycle/interrupt.py). loop-claude prints the question on its terminal, where the human answers it: diff --git a/bin/loop_claude/project/premises.py b/bin/loop_claude/project/premises.py index 665229a8..41beafad 100644 --- a/bin/loop_claude/project/premises.py +++ b/bin/loop_claude/project/premises.py @@ -7,7 +7,7 @@ from release_plan.goals_file import section def read_premises(root: str, home: pathlib.Path) -> str | Failure: - """Where the goals file is kept, then its ## Goals and ## Audience; the goals file is the one that the config under home of root's project names, a file or a Jira epic's description. A Failure where no config names root's checkout, the goals file cannot be read or is empty, or it lacks a section, holds one twice or leaves one empty.""" + """Where the goals file is kept, then its ## Goals and ## Audience. The goals file is the one that the config of root's checkout, under home, names: a file or a Jira epic's description. A Failure where no config names the checkout, or the goals file cannot be read, is missing or empty, lacks a section, holds one twice or leaves one empty.""" config = located(root, home) if isinstance(config, Failure): return Failure(f"{config.reason} - no premises.") diff --git a/bin/plan_store/stores.py b/bin/plan_store/stores.py index 60aae6d8..a5151fb9 100644 --- a/bin/plan_store/stores.py +++ b/bin/plan_store/stores.py @@ -22,8 +22,9 @@ TAGLINE = "Tagline" FIELDS = ("Release", BLOCKED_BY, "Exempt", TAGLINE, "L", "E", "I", "S", MOVES) -# What the reader of a missing todo.md, or of a missing or empty goals file, is told. +# What the reader of a missing todo.md is told. MISSING = "every project keeps a todo.md, and rank_todo.py --help shows one" +# What the reader of a missing or empty goals file is told. GOALS_HINT = "rank_todo.py weighs goals from the goals file the project's config names as goals-and-audience" diff --git a/bin/record_store/jira_description.py b/bin/record_store/jira_description.py index 7ad27d7c..1e748743 100644 --- a/bin/record_store/jira_description.py +++ b/bin/record_store/jira_description.py @@ -1,6 +1,6 @@ -"""A project's goals and audience kept as the description of one Jira Cloud epic, read over Jira's REST API with the plan store's credentials and the adf-codec shim. +"""A project's goals and audience kept as the description of one Jira Cloud epic, read over Jira's REST API with the credentials of the config's env-file, and converted by the adf-codec shim. -The store only reads: a write is a Failure, so a tool that edits the goals file says to edit the epic in Jira.""" +The store only reads: a write, such as `project-record save goals-and-audience`, fails, saying to edit the epic in Jira.""" import dataclasses import pathlib @@ -39,7 +39,7 @@ class EpicDescription: return Failure(f"cannot read the epic {key}: {answer.reason}") fields = answer.get("fields") if isinstance(answer, dict) else None if not isinstance(fields, dict) or "description" not in fields or not isinstance(fields["description"], dict | None): - return Failure(f"the epic {key} is not in the shape Jira Cloud's REST API version 3 documents: it holds no description field of a document or null") + return Failure(f"the epic {key} is not in the shape Jira Cloud's REST API version 3 documents: its description field is missing, or neither a document nor null") if fields["description"] is None: return "" texts = self.to_markdown([fields["description"]]) diff --git a/bin/record_store/stores.py b/bin/record_store/stores.py index 93e15944..317983a0 100644 --- a/bin/record_store/stores.py +++ b/bin/record_store/stores.py @@ -1,6 +1,6 @@ """The one way a tool reads or writes a project's records: through the store its config names for each. -Each record has its own setting in the config, so a project may keep one record in its wiki and another as a file. The setting's value names the backend. A path names a markdown file, the only backend of a record so far; the goals file may also be a Jira epic's description, which `goals_store` reads.""" +Each record has its own setting in the config, so a project may keep one record in its wiki and another as a file. The setting's value names the backend. A path names a markdown file, the only backend of a record so far; the goals file may also be a Jira epic's description, which `goals_store` picks.""" import dataclasses import pathlib import typing @@ -69,7 +69,7 @@ def store(config: ProjectConfig, record: str) -> RecordStore: def goals_store(config: ProjectConfig) -> RecordStore: - """The store config names for the goals file, which holds ## Goals and ## Audience: a markdown file, or the description of a Jira epic, which only reads.""" + """The store config names for the goals file, which holds ## Goals and ## Audience: a markdown file, or a Jira epic's description, which the store only reads.""" if config.goals_epic is None: return FileStore(config.paths["goals-and-audience"], config.tracked("goals-and-audience")) # Imported here, since the Jira store builds on plan_store, which builds on this module.