Answer product-owner round 1: 0 🔴, 2 🟡 (1 misread); open the goals file with project-record, and say in the help where it prints

This commit is contained in:
2026-11-14 21:27:23 +01:00
parent 3a2d72a007
commit b514dcfe85
4 changed files with 19 additions and 10 deletions
+1 -1
View File
@@ -127,7 +127,7 @@ Claude Code reads this section by its heading when it compacts a conversation. K
- **chunk** — the unit of work, shipped as one PR; "Working loop" says what it holds.
- **cycle** — in `loop-claude`, worker runs and the judge's verdict on each, until the chunk closes or is left for the next cycle. In between, the human answers any interrupt, or the worker resumes with an answer the judge quoted from the premises or the judge's records.
- **gate** — the merge gate: the checks a PR passes before it merges.
- **goals file** — the file holding a project's `## Goals` and `## Audience`: the one its config names as `goals-and-audience`, which `~/.claude/bin/project-config goals-and-audience` prints. It is `README.md`, unless a client's project keeps it in the config's folder, or in a Jira epic's description, which the loop only reads.
- **goals file** — the file holding a project's `## Goals` and `## Audience`: the one its config names as `goals-and-audience`. Read it in the file `~/.claude/bin/project-record open goals-and-audience` prints. It is `README.md`, unless a client's project keeps it in the config's folder, or in a Jira epic's description, which the loop only reads.
- **interrupt** — `loop-claude` asking the human, on its terminal, for a decision that is theirs. They type a one-line answer there, or `/talk` to open the worker's session there with `claude --resume`. A release ready to cut opens that session at once. A routing call opens claude on that terminal too, in `~/code/claude-config`, the checkout where this setup is developed.
- **judge** — the headless claude that reads a worker's transcript each cycle and decides whether to interrupt and whether the chunk is finished.
- **judge's records** — the files the judge reads beside the premises: the project's `AGENTS.md` and `docs/decisions.md`, then the human's `~/.claude/CLAUDE.md` and the `.md` files in `~/.claude/rules/` and `~/.claude/skills/larv-review/standards/`.
+4 -3
View File
@@ -26,9 +26,10 @@ starts with / or ~/. In a worktree, a "checkout:" path is the worktree's own fil
Jira's backlog order, and `project-config plan` prints the setting as the config spells it. Such a
config must set `env-file`, and that file must hold ATLASSIAN_EMAIL and ATLASSIAN_API_TOKEN.
`goals-and-audience` may name a Jira Cloud epic the same way. Its description is then the goals
file, with ## Goals and ## Audience as headings, and the same `env-file` rule holds. It is only
read: edit the description in Jira. Reviewers get a copy in the review folder.
`goals-and-audience` may name a Jira Cloud epic the same way, where `plan` names one too. The
epic's description is then the goals file, with ## Goals and ## Audience as headings, and
`project-config goals-and-audience` prints the setting as the config spells it. The description is
only read: edit it in Jira.
`env-file` is an optional setting: the file of KEY=value credentials the project's tools read,
a path that starts with / or ~/ and lies outside the checkout and the config's folder, such as
+9 -5
View File
@@ -4,7 +4,9 @@ usage: project-record open <record>
project-record save <record>
Run inside a checkout, or a worktree of one. <record> is one of decisions, score-anchors,
comprehension-history, reading-cost and changelog, each kept where the project's config names it.
comprehension-history, reading-cost and changelog, each kept where the project's config names it,
or goals-and-audience, the goals file. Goals kept in a Jira epic's description are only read, so
save refuses them: edit the epic in Jira.
open prints the path of a file holding the record's text, and nothing else. Read and edit that
file. Where the record is kept as a file, the path is that file. Where it is kept elsewhere, the
@@ -22,25 +24,27 @@ import pathlib
import sys
from failure import Failure
from record_store.stores import FileStore, local_file, RECORDS, RecordStore, store, stored
from record_store.stores import FileStore, goals_store, local_file, RECORDS, RecordStore, store, stored
from project_config.main import located
# Not git's verbs, such as checkout and commit: those read as acting on the repo.
COMMANDS = ("open", "save")
# Where the copy of a record kept outside files goes, under the user's home, in a folder per project.
COPIES = ".local/state/project-record"
# The goals file opens like a record, though it is a setting of its own.
GOALS = "goals-and-audience"
def main(argv: list[str]) -> int:
if argv[:1] in (["-h"], ["--help"]):
print(__doc__.strip())
return 0
if len(argv) != 2 or argv[0] not in COMMANDS or argv[1] not in RECORDS:
print(f"usage: project-record {'|'.join(COMMANDS)} <record>, where <record> is one of {', '.join(RECORDS)}", file=sys.stderr)
if len(argv) != 2 or argv[0] not in COMMANDS or argv[1] not in (*RECORDS, GOALS):
print(f"usage: project-record {'|'.join(COMMANDS)} <record>, where <record> is one of {', '.join((*RECORDS, GOALS))}", file=sys.stderr)
return 2
home = pathlib.Path.home()
config = located(None, home)
done = config if isinstance(config, Failure) else act(argv[0], store(config, argv[1]), home / COPIES / config.key / f"{argv[1]}.md")
done = config if isinstance(config, Failure) else act(argv[0], goals_store(config) if argv[1] == GOALS else store(config, argv[1]), home / COPIES / config.key / f"{argv[1]}.md")
if isinstance(done, Failure):
print(f"project-record: {done.reason}", file=sys.stderr)
return 1
+5 -1
View File
@@ -53,11 +53,15 @@ class BlackBox(unittest.TestCase):
self.assertEqual((saved.returncode, saved.stdout, saved.stderr), (0, f"{self.top}/docs/decisions.md is the record itself, so nothing is left to store.\n", ""))
self.assertFalse((pathlib.Path(os.environ["HOME"]) / ".local").exists(), "a file record gets no copy")
def test_the_goals_file_opens_as_the_config_names_it(self):
opened = self.run_tool("open", "goals-and-audience")
self.assertEqual((opened.returncode, opened.stdout, opened.stderr), (0, f"{self.top}/README.md\n", ""))
def test_exits_2_with_the_usage_on_an_unknown_command_or_record(self):
for args in ([], ["open"], ["open", "plan"], ["close", "decisions"], ["open", "decisions", "changelog"]):
ran = self.run_tool(*args)
self.assertEqual((ran.returncode, ran.stdout), (2, ""), args)
self.assertIn("usage: project-record open|save <record>, where <record> is one of decisions, score-anchors, comprehension-history, reading-cost, changelog", ran.stderr)
self.assertIn("usage: project-record open|save <record>, where <record> is one of decisions, score-anchors, comprehension-history, reading-cost, changelog, goals-and-audience", ran.stderr)
def test_exits_1_saying_why_where_no_config_names_the_checkout(self):
(pathlib.Path(os.environ["HOME"]) / ".claude-projects" / self.top.name / "config.toml").unlink()