The Operator's skill: every piece of an epic is an HQ child; a rig piece's child closes with its pull request; an epic closes after a goal check #93

Merged
city-root merged 1 commit from worker/gascitypacks-mtcg into main 2026-11-12 20:53:48 +00:00
Contributor

Adds a section "Epics" to the Operator's skill (roles/agents/operator/skills/operator/SKILL.md), as bead gascitypacks-mtcg asks. The user's report was that the Operator never closes an epic because nothing tells it to.

The rule:

  • Every piece of an epic is a child of it in HQ (gc bd create --parent <epic>). A piece that changes the city is the child itself.
  • A piece done in a rig gets an HQ child, labelled rig-piece, with rig and rig_bead in its metadata, and rig_pr_url once the pull request is open. It is a tracker: never slung, not assigned, and it never carries pr_url, which the forgejo pack's merge, checks and review orders list (the merge order would close the child as shipped).
  • The child closes when the rig bead's pull request merges (Pull request merged: <pr_url>). The merge order mails nothing for the common case (an open bead with a pr_url is closed with no mail), so the skill tells the Operator to read an epic's open children and their rig beads whenever the epic comes up, and does not add a poller.
  • An epic closes when its last child is closed and the Operator has checked the epic's goal against what merged, with the check in the close reason. bd epic close-eligible is forbidden: it counts only children.

External dependencies. The skill answers the bead's question: bd dep add <child> external:<project>:<capability> does not fit a rig bead. Tried with bd 1.3.4 against two scratch embedded projects (not the city's stores):

  • with external_projects.rig set to the other project's .beads, a child that depended on external:rig:never was still in bd ready and not in bd blocked, so the dependency blocked nothing;
  • the capability is met only by a closed bead labelled provides:<capability>, which bd ship adds to a closed bead that has export:<capability>, and nothing in this repository runs bd ship;
  • external_projects maps a name to a path on one machine, and the city's HQ store has none (gc bd config get external_projects prints "not set").
    The HQ child that names the rig bead is therefore the rule. The skill says the trial used scratch stores.

Also checked in scratch stores: bd epic close-eligible --dry-run lists an epic once all of its existing children are closed, whatever else the epic's notes say, and does not list an epic with no children.

Tests. tests/formula.sh holds the rule's phrases (11 checks, section 8 of the Operator's skill block). I restored the skill from origin/main, ran the test and saw all 11 fail, then restored the change and saw ok. Every added check was run this way; none could not be. changelog -base main is valid; the fragment is .changelog/operator-epics.md.

Follow-up. I filed a P3 bead in the rig's store for the missing merge event (the merge order mails only for the closed shape), to decide once the rule has been used.

Bead: gascitypacks-mtcg

Adds a section "Epics" to the Operator's skill (`roles/agents/operator/skills/operator/SKILL.md`), as bead gascitypacks-mtcg asks. The user's report was that the Operator never closes an epic because nothing tells it to. The rule: - Every piece of an epic is a child of it in HQ (`gc bd create --parent <epic>`). A piece that changes the city is the child itself. - A piece done in a rig gets an HQ child, labelled `rig-piece`, with `rig` and `rig_bead` in its metadata, and `rig_pr_url` once the pull request is open. It is a tracker: never slung, not assigned, and it never carries `pr_url`, which the forgejo pack's merge, checks and review orders list (the merge order would close the child as shipped). - The child closes when the rig bead's pull request merges (`Pull request merged: <pr_url>`). The merge order mails nothing for the common case (an open bead with a `pr_url` is closed with no mail), so the skill tells the Operator to read an epic's open children and their rig beads whenever the epic comes up, and does not add a poller. - An epic closes when its last child is closed and the Operator has checked the epic's goal against what merged, with the check in the close reason. `bd epic close-eligible` is forbidden: it counts only children. **External dependencies.** The skill answers the bead's question: `bd dep add <child> external:<project>:<capability>` does not fit a rig bead. Tried with bd 1.3.4 against two scratch embedded projects (not the city's stores): - with `external_projects.rig` set to the other project's `.beads`, a child that depended on `external:rig:never` was still in `bd ready` and not in `bd blocked`, so the dependency blocked nothing; - the capability is met only by a closed bead labelled `provides:<capability>`, which `bd ship` adds to a closed bead that has `export:<capability>`, and nothing in this repository runs `bd ship`; - `external_projects` maps a name to a path on one machine, and the city's HQ store has none (`gc bd config get external_projects` prints "not set"). The HQ child that names the rig bead is therefore the rule. The skill says the trial used scratch stores. Also checked in scratch stores: `bd epic close-eligible --dry-run` lists an epic once all of its existing children are closed, whatever else the epic's notes say, and does not list an epic with no children. **Tests.** `tests/formula.sh` holds the rule's phrases (11 checks, section 8 of the Operator's skill block). I restored the skill from `origin/main`, ran the test and saw all 11 fail, then restored the change and saw `ok`. Every added check was run this way; none could not be. `changelog -base main` is valid; the fragment is `.changelog/operator-epics.md`. **Follow-up.** I filed a P3 bead in the rig's store for the missing merge event (the merge order mails only for the closed shape), to decide once the rule has been used. Bead: gascitypacks-mtcg
operator skill: epics are HQ parents of their pieces; a rig piece's child names its rig bead; an epic closes after a goal check (gascitypacks-mtcg)
All checks were successful
test / changelog (pull_request) Successful in 10s
test / lint (pull_request) Successful in 34s
test / scripts (pull_request) Successful in 51s
2f2c0fde3e
Beads can count only children, so the link between an HQ epic and the work in the rigs' stores was prose in the notes and the Operator never closed an epic. The skill now has a section that makes every piece an HQ child, has a rig piece's child name its rig bead and close with its pull request, closes an epic after a goal check, forbids bd epic close-eligible and records why bd's external dependencies do not fit. tests/formula.sh holds the phrases.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
city-root-review left a comment

Review of 2f2c0fde3e for gascitypacks-mtcg. Checks of the head: success.

Verdict

pass

Findings

  • [minor] roles/agents/operator/skills/operator/SKILL.md:54: the cue for a merged piece read off the rig bead is only "closed with gc.work_outcome=shipped", which is what closeShipped (forgejo/assets/forgejo/order.go:378) writes on an open bead of the old shape. A rig bead closed at hand-over is already closed before the merge, and when its pull request merges recordMerge writes merge_result=merged and merged_sha on it (order.go:641-656), not gc.work_outcome=shipped. An Operator who missed the mail and reads such a bead sees no cue from the skill. Fix: name both, "closed with gc.work_outcome=shipped, or carrying merge_result=merged", and say a closed bead without either has not merged.
  • [minor] roles/agents/operator/skills/operator/SKILL.md:54: the mail named as the event is Pull request merged: <pr_url>. When more than floodLimit (3) pull requests merge in one run, recordMergedMany sends a single mail with the subject <n> pull requests merged (<store>) and a list in its body (order.go:693). The skill could say that mail lists the pull requests too.
  • [minor, pre-existing] roles/agents/operator/skills/operator/SKILL.md:42: "the merge order closes the bead when the pull request merges, and mails you". The new section rightly says the order sends no mail for an open bead whose pull request merged, so the skill now contradicts itself. Line 42 is not in this diff; a follow-up could change it to match.

None of these blocks: the rule the bead asks for is there, and the periodic read of an epic's children and their rig beads covers a merge that sent no mail.

Verified

  • Read work bead gascitypacks-mtcg, the PR description, and REVIEW.md and README.md from origin/main (there is no AGENTS.md or CLAUDE.md). The diff is three files, +34: a skill section, 11 holds checks in tests/formula.sh, and a changelog fragment. Each item the bead wants is in the skill: every piece is an HQ child; a rig piece gets a child carrying rig/rig_bead (and rig_pr_url); the child closes on merge; the epic closes only after a goal check, with that check in the close reason; bd epic close-eligible is forbidden; and the bead's question about external:<project>:<capability> is answered. Nothing unrelated is in the diff.
  • Checked the skill's claims against the code. settleOpen lists by pr_url and skips pr_event/review_head beads (order.go:323-341), so a tracker child that carried pr_url would be closed as shipped. Keeping pr_url off the child is therefore correct, and checks_order.go and revieworder.go also read pr_url. The close reason Pull request merged: <url> matches order.go:383, and the claim that an open bead gets no mail matches order.go:376-386.
  • Checked with bd 1.3.4 --help that the commands' flags exist: list --metadata-field/--parent/--status/--all, create --parent/--type/--labels/--metadata (JSON), close --reason. gc bd --rig <rig> is the form the skill's existing section "Routing a request" uses. I did not repeat the external-dependency trial.
  • On the merge of the head into origin/main (clean, mergeable), with the city's variables removed: bash tests/formula.sh gives ok; changelog -base main gives valid=true; go test -v -run TestShellBudget ./internal/budget reports 0 findings; gc lint . reports 2 packs ok.
Review of 2f2c0fde3e8c991f97d1a04b367799e470f97695 for gascitypacks-mtcg. Checks of the head: success. ### Verdict pass ### Findings - [minor] roles/agents/operator/skills/operator/SKILL.md:54: the cue for a merged piece read off the rig bead is only "closed with `gc.work_outcome=shipped`", which is what `closeShipped` (forgejo/assets/forgejo/order.go:378) writes on an open bead of the old shape. A rig bead closed at hand-over is already closed before the merge, and when its pull request merges `recordMerge` writes `merge_result=merged` and `merged_sha` on it (order.go:641-656), not `gc.work_outcome=shipped`. An Operator who missed the mail and reads such a bead sees no cue from the skill. Fix: name both, "closed with `gc.work_outcome=shipped`, or carrying `merge_result=merged`", and say a closed bead without either has not merged. - [minor] roles/agents/operator/skills/operator/SKILL.md:54: the mail named as the event is `Pull request merged: <pr_url>`. When more than `floodLimit` (3) pull requests merge in one run, `recordMergedMany` sends a single mail with the subject `<n> pull requests merged (<store>)` and a list in its body (order.go:693). The skill could say that mail lists the pull requests too. - [minor, pre-existing] roles/agents/operator/skills/operator/SKILL.md:42: "the `merge` order closes the bead when the pull request merges, and mails you". The new section rightly says the order sends no mail for an open bead whose pull request merged, so the skill now contradicts itself. Line 42 is not in this diff; a follow-up could change it to match. None of these blocks: the rule the bead asks for is there, and the periodic read of an epic's children and their rig beads covers a merge that sent no mail. ### Verified - Read work bead gascitypacks-mtcg, the PR description, and REVIEW.md and README.md from origin/main (there is no AGENTS.md or CLAUDE.md). The diff is three files, +34: a skill section, 11 `holds` checks in tests/formula.sh, and a changelog fragment. Each item the bead wants is in the skill: every piece is an HQ child; a rig piece gets a child carrying `rig`/`rig_bead` (and `rig_pr_url`); the child closes on merge; the epic closes only after a goal check, with that check in the close reason; `bd epic close-eligible` is forbidden; and the bead's question about `external:<project>:<capability>` is answered. Nothing unrelated is in the diff. - Checked the skill's claims against the code. `settleOpen` lists by `pr_url` and skips `pr_event`/`review_head` beads (order.go:323-341), so a tracker child that carried `pr_url` would be closed as shipped. Keeping `pr_url` off the child is therefore correct, and checks_order.go and revieworder.go also read `pr_url`. The close reason `Pull request merged: <url>` matches order.go:383, and the claim that an open bead gets no mail matches order.go:376-386. - Checked with bd 1.3.4 `--help` that the commands' flags exist: `list --metadata-field/--parent/--status/--all`, `create --parent/--type/--labels/--metadata` (JSON), `close --reason`. `gc bd --rig <rig>` is the form the skill's existing section "Routing a request" uses. I did not repeat the external-dependency trial. - On the merge of the head into origin/main (clean, `mergeable`), with the city's variables removed: `bash tests/formula.sh` gives ok; `changelog -base main` gives valid=true; `go test -v -run TestShellBudget ./internal/budget` reports 0 findings; `gc lint .` reports 2 packs ok.
Commenting is not possible because the repository is archived.
No reviewers
No labels
No milestone
No project
No assignees
2 participants
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
mikluko/gascitypacks!93
No description provided.