From 9f09912a02fe9a22ec07cd83372a7d77709850fb Mon Sep 17 00:00:00 2001 From: Lilleman Date: Fri, 20 Nov 2026 11:18:07 +0100 Subject: [PATCH 1/8] Name the team's label for each repo in do-epic's finding and release-review prompts --- bin/do_epic/findings.py | 21 ++++++++++++++------- bin/do_epic/finish.py | 5 +++-- bin/do_epic/test_findings.py | 10 +++++++++- bin/do_epic/test_finish.py | 9 ++++++++- 4 files changed, 34 insertions(+), 11 deletions(-) diff --git a/bin/do_epic/findings.py b/bin/do_epic/findings.py index 53bdbce0..87182108 100644 --- a/bin/do_epic/findings.py +++ b/bin/do_epic/findings.py @@ -7,7 +7,7 @@ import fcntl import pathlib import typing -from do_epic.repo_pick import also, CLAUDE_LABEL, HUMAN_LABEL, LabelRepos, of_label, REPO_PREFIX, REVIEW_LABEL +from do_epic.repo_pick import CLAUDE_LABEL, HUMAN_LABEL, LabelRepos, of_label, REPO_PREFIX, REVIEW_LABEL, team_label from do_epic.backend.protocol import EpicIssue, EpicStore from do_epic.epic_record import EpicRecord from failure import Failure @@ -20,15 +20,22 @@ LABEL = "--label" BLOCKED_BY = "--blocked-by" PARENT = "--parent" RECORD_DECISION = "--record-decision" -# The labels that say where an issue is worked, as do-epic's scheduler reads them. -LABELS = f"`{REPO_PREFIX}` for the repo that works it, `{CLAUDE_LABEL}` for work of Claude's that changes no repo, or `{HUMAN_LABEL}` for a task of the human's" + + +def worked_by(team: LabelRepos) -> str: + """The labels that say where an issue is worked, as do-epic's scheduler reads them. Each repo the team's table names takes the team's label, and `repo:` stays for any other.""" + named = [f"`{label}` for the repo {name}" for name in dict.fromkeys(team.values()) if (label := team_label(name, team))] + repos = ", ".join([*named, f"`{REPO_PREFIX}` for {'any other repo' if named else 'the repo'} that works it"]) + return f"{repos}, `{CLAUDE_LABEL}` for work of Claude's that changes no repo, or `{HUMAN_LABEL}` for a task of the human's" + + # Under the epic's folder, the file a do-epic holds locked while it appends a decision. DECISIONS_LOCK = "decisions.lock" USAGE = f"""do-epic {FILE} [{LABEL}