Answer product-owner round 1: 1 🔴, 3 🟡 (1 misread); finish a sub-task too, name the transition in the config where several close an issue, say how to start the blocked chunks after a refused move

This commit is contained in:
2026-11-18 23:38:02 +01:00
parent 42cff3a8a7
commit 720b558bbf
9 changed files with 92 additions and 34 deletions
+9 -3
View File
@@ -7,18 +7,20 @@ One pair per machine, the same for every epic (docs/decisions.md → `do-epic: d
repoless-model = "claude-opus-5-5"
clone-folder = "~/code"
language = "Swedish"
jira-finish-transition = "Mark as done"
- `jira-url` is the Jira site's address: https, a host, and no path.
- `env-file` is the file of Jira credentials: a path that starts with / or ~/, outside every folder of `~/.claude-projects` and outside the clone folder, which hold git checkouts. `~/.claude-projects/<key>.env` is fine.
- `repoless-model` is the model that works an epic item with no repo: a model on the routing ladder, `model_routing/routing-ladder.json`.
- `clone-folder` is the folder a missing repo is cloned into: a path that starts with / or ~/. `~/code` where left out.
- `language` is the default language of Jira text, by its English name. English where left out.
- `jira-finish-transition` is the name Jira shows of the transition that moves a finished chunk's issue to done. It is needed only where an issue's status offers more than one transition to a done status, such as Resolve and Close. Left out, do-epic takes the one transition that leads to a done status.
- `repo-rule.md` is prose that says how to tell an item's repo, and mustn't be blank."""
import dataclasses
import pathlib
import re
from project_config.settings import anywhere, CONFIG, DO_EPIC, ENV_FILE, LANGUAGE, language_fault, lies_in, parsed, PROJECTS, SITE
from project_config.settings import anywhere, CONFIG, DO_EPIC, ENV_FILE, JIRA_FINISH_TRANSITION, LANGUAGE, language_fault, lies_in, name_of, parsed, PROJECTS, SITE
from failure import Failure
from model_routing.ladder_file import read_ladder, SHIPPED
@@ -28,7 +30,7 @@ JIRA_URL = "jira-url"
REPOLESS_MODEL = "repoless-model"
CLONE_FOLDER = "clone-folder"
SETTINGS = (JIRA_URL, ENV_FILE, REPOLESS_MODEL)
OPTIONAL = (CLONE_FOLDER, LANGUAGE)
OPTIONAL = (CLONE_FOLDER, LANGUAGE, JIRA_FINISH_TRANSITION)
LISTED = f"The settings are {', '.join(SETTINGS)}, and optionally {' and '.join(OPTIONAL)}."
@@ -42,6 +44,8 @@ class DoEpicConfig:
language: str
repoless_model: str
repo_rule: str
# The name of the transition that finishes an issue where its status offers several to a done status; None where the config names none.
finish_transition: str | None = None
def load(home: pathlib.Path, ladder_file: pathlib.Path = SHIPPED) -> DoEpicConfig | Failure:
@@ -63,6 +67,7 @@ def load(home: pathlib.Path, ladder_file: pathlib.Path = SHIPPED) -> DoEpicConfi
clone_folder = anywhere(values.get(CLONE_FOLDER, "~/code"), home)
env_file = anywhere(values.get(ENV_FILE), home)
language = values.get(LANGUAGE, "English")
finish = values.get(JIRA_FINISH_TRANSITION)
url, model = values.get(JIRA_URL), values.get(REPOLESS_MODEL)
faults = [
*(f"`{name}` is missing" for name in SETTINGS if name not in values),
@@ -72,6 +77,7 @@ def load(home: pathlib.Path, ladder_file: pathlib.Path = SHIPPED) -> DoEpicConfi
*([f"`{ENV_FILE}` is {values[ENV_FILE]!r}, not a path that starts with / or ~/"] if ENV_FILE in values and env_file is None else []),
*([f"`{ENV_FILE}` is {values[ENV_FILE]!r}, inside a folder of ~/{PROJECTS} or the clone folder, which hold git checkouts"] if env_file and lies_in(env_file, *config_folders, *([clone_folder] if clone_folder else [])) else []),
*([f"`{LANGUAGE}` is {language!r}, {fault}"] if LANGUAGE in values and (fault := language_fault(language)) else []),
*([f"`{JIRA_FINISH_TRANSITION}` is {finish!r}, not the name Jira shows, such as \"Mark as done\""] if JIRA_FINISH_TRANSITION in values and not name_of(finish) else []),
*([f"`{REPOLESS_MODEL}` is {model!r}, not a model on the routing ladder: {', '.join(models)}"] if REPOLESS_MODEL in values and model not in models else []),
*([rule.reason] if isinstance(rule, Failure) else [f"`{REPO_RULE}` is blank"] if not rule.strip() else []),
]
@@ -79,4 +85,4 @@ def load(home: pathlib.Path, ladder_file: pathlib.Path = SHIPPED) -> DoEpicConfi
return Failure(f"{folder}: {'; '.join(faults)}. {LISTED}")
# Without a fault, each value above is present and of the type asserted here.
assert clone_folder and env_file and isinstance(url, str) and isinstance(model, str) and isinstance(language, str) and isinstance(rule, str)
return DoEpicConfig(folder, url, env_file, clone_folder, language, model, rule)
return DoEpicConfig(folder, url, env_file, clone_folder, language, model, rule, name_of(finish))