Skip to content
16 changes: 16 additions & 0 deletions .codecrew/roles/coordinator.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,22 @@ read every seat's credentials through its own 401
without a plan.** `gh codecrew task new --milestone <n>`; the seat writes
the plan and runs `task start`. A seat dispatched with no task issue
behind it stops and asks for one — that is its contract, not a stall.
- **A milestone adopts a backlog capture with `--adopts`, not with
prose.** When a task delivers what an unlabelled capture already
describes, name it on the task that carries it:
`gh codecrew task new --milestone <n> --adopts <ref>[,<ref>]` —
repeatable, comma-separated, a bare number resolving against the task's
repo. The verb records the captures under `## Adopts` in the task body
and comments on each one, and `task finish` closes them when the task's
PR merges, pointing back at the task and the PR. A ref that is not an
open issue refuses `ADOPT_NOT_OPEN` before the task is created, so fix
the ref and rerun. "adopts #N" written into a Goal is a note to a
reader and nothing else: it is the flag that makes the protocol do the
bookkeeping, and until it was there every adopted capture stayed open
after its task shipped
([#193](https://github.com/radiusred/gh-codecrew/issues/193)). Never
close an adopted capture by hand, and never ask an implementer for a
`Closes` line for one.
- **Dispatch by the routing table.** `gh codecrew role <name>` says who
holds a seat, typed: `app:<slug>` is an agent to dispatch, `user:<login>`
and `team:<org>/<slug>` are humans to notify — and a review request they
Expand Down
7 changes: 6 additions & 1 deletion .codecrew/roles/implementer.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,12 @@ Then, every run:
obvious the answer seems.
- **Open the PR** referencing the task (`Closes #123`) and finalize its
description as the task summary: what was done, which requirements it
satisfies, links to any deviation comments. Whether to request a review
satisfies, links to any deviation comments. The task's own number is the
only one that needs a closing keyword: a backlog capture listed under the
task's `## Adopts` section is adopted, and `task finish` closes it after
the merge with a comment pointing back at the task and this PR — do not
add a `Closes` line for one, and do not close it by hand
([#193](https://github.com/radiusred/gh-codecrew/issues/193)). Whether to request a review
is the reviewer seat's identity kind, and one command answers it:

```
Expand Down
32 changes: 32 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,38 @@ semantic versioning, and the protocol carries its own version (SPEC §5).

## [Unreleased]

### A task adopts a backlog capture, and the merge closes it
- **`task new --adopts <ref>[,<ref>]`** records the backlog issues a task
takes up: repeatable and comma-separated, a bare number resolving against
the task's own repo and `owner/repo#n` naming one anywhere. The refs go
into an `## Adopts` section of the task body and each capture gets a
comment naming the task. Every ref must be an open issue, checked before
anything is created — `refused[ADOPT_NOT_OPEN]` for one that cannot be
read as much as for one already closed — so a refusal leaves no
half-adopted task; duplicates collapse, and a comment that fails once the
task exists is a `note:`, the body carrying the link either way.
- **`task finish` closes them after the merge**, each with a comment naming
the task, the pull request and the commit the merge left on the default
branch. Nothing there refuses, because the merge has happened: a capture
already closed is reported, and one that cannot be closed is a `note:`
naming it. `--dry-run` lists each capture it would close, and each it
would skip, beside the branch it would delete.
- **The section is read strictly**, since what it lists is closed after a
merge where nothing can refuse: the heading counts only as a heading, so
prose quoting `## Adopts` cannot shadow the real section (a task about
this feature quotes it); only the ref at the head of a list line is an
adoption, the prose after it being the capture's title; and the body is
read through `StripCode`, so a ref inside a code span, a fenced block or
an indented one is content, exactly as it is for the verdict scan and the
citation walk (M13-R6).
- The protocol now does the bookkeeping the link already describes: an
adopted capture stays open exactly as long as the task carrying it, and no
PR body has to remember a `Closes` line for one. Every hub milestone since
M3 closed with a manual sweep of the captures it had adopted, or forgot
one. SPEC §4 says what adoption means, §6's `task new` and `task finish`
rows say what the verbs do, and the coordinator and implementer contracts
follow (#270, closing #193).

### `task finish` tidies the clone it ran in
- **The local task branch goes with the remote one.** `task finish` merged
the PR and deleted the head branch on GitHub, and left the operator
Expand Down
4 changes: 3 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ CodeCrew is developed with CodeCrew: the protocol in [SPEC.md](SPEC.md) is
the contribution process.

- **Ideas and bugs** — open an issue. Leave it unlabelled: that is a backlog
capture, not protocol traffic, until it is adopted into a milestone.
capture, not protocol traffic, until it is adopted into a milestone — at
which point the task that delivers it names it (`task new --adopts`), and
`task finish` closes it with the merge.
- **Work** — every change is a task under the open milestone
(`gh codecrew status` names it; [ROADMAP.md](ROADMAP.md) lists the
finished ones): a task issue with a plan written
Expand Down
Loading
Loading