About tranche and Milestone close
A finished tranche is closed so the next plan starts from what is true now. Closing never deletes anything. The closed Milestone, its attached closed Issues with their rationale, and the provenance blocks on the merged pull requests are the permanent record.
Two mechanisms close a tranche:
| Mechanism | Trigger | Writes |
|---|---|---|
vinaya archive tranche <slug> - (mechanical) | Automatic: a task pull request merges, a task Issue closes without a merge, or the daily catch-up | A ### Retrospective: <slug> section in the Milestone description; closes the Milestone when nothing holds it open |
| Tranche Archivist (judgement) | Only an explicit Principal statement: "Run the Tranche Archivist for tranche <name>." | A retrospective comment on the pinned lessons Issue; the Milestone close; a tranche provenance comment on the last merged task pull request |
A tranche counts as archived when a closed Milestone carries its ### Retrospective: <slug> section. That closed Milestone is the signal the Planner's readiness item 8 reads before the next plan.
| Role | Does | Refuses when |
|---|---|---|
| Tranche Archivist | Verifies the forge, writes the retrospective, closes the Milestone, surfaces pending Type 1 ratifications, checks docs-index.md, posts tranche provenance. Flags stale worktrees, orphaned branches, unbuilt tasks and missing per-task provenance. | Open task work remains; the Principal has not declared the tranche done; the Milestone is already closed |
| Principal | Declares the tranche done; ratifies; decides on unbuilt tasks (defer, backlog, abandon) | — |
| Planner | Moves unstarted tasks out before close when a new plan supersedes the tranche | — |
How it works
What starts the archive
| Trigger | Workflow job | How the tranche is found |
|---|---|---|
A task pull request merges to main | post-merge, step "Self-archive the tranche once its last task merges" | From the merged head branch task/<slug>/<n> |
| A task Issue is closed without a merge (dropped, replaced, closed by hand) | issue-closed, on issues: closed with a vinaya/tranche: label | From the Issue's own vinaya/ labels, re-read from the forge. Slugs with characters outside [A-Za-z0-9._-] are skipped. |
| Daily at 02:00 UTC, or a manual run | daily-drift, step "Archive every finished tranche not yet archived" | Every vinaya/tranche:* label in the repository |
All three steps run with continue-. A refusal while task Issues remain open is the expected result on every close but the last.
What vinaya archive tranche <slug> does
- 1
Read the tranche
It reads every Issue labelled
vinaya/, across all pages and in any state. With no Issues it errors (exit 1). If any is open, it refuses, lists them, and exits 1.tranche:<slug> - 2
Find the Milestone
The target is the Milestone the tranche's own Issues are attached to, never one that is merely titled with the slug. If no Issue has a Milestone, it reuses a Milestone titled exactly the slug, or creates one, and attaches the tranche's closed Issues. An Issue already on a Milestone is never moved.
- 3
Stop if already archived
A Milestone that is closed and carries the retrospective is reported as archived, and nothing changes.
- 4
Decide whether the Milestone may close
Two things hold it open: another attached Issue is still open, or the Milestone has a
### Tranche intentssection and not every declared tranche iscomplete. An intents section with no readable line also holds it open. - 5
Write the retrospective
It writes
- Tasks: <count>,-andRounds per task: #<pr> (<rounds>) - Merged PRs: …, from the merged pull requests onhead:task/. Rounds come from<slug>/ <!-markers, and count as 1 when there are none. A re-run replaces the section, never duplicates it.- aeg:developer:round- <n> - - > - 6
Update the Milestone
It updates the Milestone description, and sets its state to
closedwhen nothing holds it. Otherwise the Milestone stays open and the output names every reason.
Without --yes, the command asks for confirmation. If two runs race to create the Milestone, both end on the existing one.
The daily catch-up
vinaya archive tranches - lists every tranche slug, skips any with an open Issue or already archived, and archives the rest. One failure does not stop the others; the exit code reports any failure.
The Tranche Archivist turn
- 1
Check it may start
All facts come from the forge: no open pull request on
task/<slug>/*, no open Issue labelledvinaya/, an explicit Principal declaration, and an open Milestone. A task is finished when it istranche:<slug> merged,dropped(NOT_PLANNED) ormoved. - 2
Verify per-task provenance
Every task pull request must carry a provenance block. A missing one is flagged before going on.
- 3
Write the retrospective
A new comment on the pinned lessons Issue: duration, tasks completed, dropped or deferred, moved out, what went well, what stalled, lessons to carry forward, Type 1 decisions, unbuilt tasks. It is assembled from merged pull requests and lessons comments. A missing fact reads "unknown — Principal to fill".
- 4
Close the Milestone
It first reads
vinaya milestone status <n>and closes only when every declared tranche iscomplete. It then runsvinaya milestone close -, which itself only verifies attachment.- slug <slug> - 5
Surface what needs the Principal
Pending Type 1 ratifications are listed as
PENDING RATIFICATION — requires Principal action at next ratification window.Tier 3 changes with no decision record are listed too, as a report only. - 6
Confirm the docs index and post provenance
It confirms
docs-index.md, then posts### AEG tranche provenance — <tranche>on the last merged task pull request, with thetranche-closetoken row appended.
When a Milestone closes
A Milestone is a product Goal. It closes only when every tranche its ### Tranche intents section declares is complete, including tranches that have no Issues yet. A Milestone with no intents section closes when no attached Issue is open. Its lifecycle (planned, active, complete) is derived; see Goals and milestones.
Gates
| Gate | When | Refuses |
|---|---|---|
| Tranche archival status | archive tranche | Any open Issue in the tranche |
| Milestone close decision | archive tranche | Closing a Milestone with other open Issues or unfinished declared tranches. It records the retrospective and leaves the Milestone open. |
| Attachment check | milestone close - | Any tranche Issue not attached to the resolved Milestone |
| Tranche Archivist entry gate | Turn start | Open work, no declaration, Milestone already closed |
| Planner readiness item 8 | Next plan | A finished, unarchived earlier tranche on an in-scope product |
Configuration
| Key | Effect |
|---|---|
rings. | Does not affect archive tranche or archive tranches; neither reads it |
managed | The generated workflow carries the triggers and the fixed 0 2 * * * schedule |
What gets logged
| Act | Log events |
|---|---|
archive tranche, archive tranches, milestone close, milestone status | operation · completed |
| A dispatched Tranche Archivist turn | dispatch, role_attempt, usage |