Docs

Retrospecting

Tranche and Milestone close

When a tranche's last task Issue closes, a command archives it automatically. The Tranche Archivist adds the judgement, and the Milestone closes once nothing holds it open.

Tranche Archivist
Retrospective
Milestone
Ring 2

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:

MechanismTriggerWrites
vinaya archive tranche <slug> --yes (mechanical)Automatic: a task pull request merges, a task Issue closes without a merge, or the daily catch-upA ### 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.

RoleDoesRefuses when
Tranche ArchivistVerifies 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
PrincipalDeclares the tranche done; ratifies; decides on unbuilt tasks (defer, backlog, abandon)—
PlannerMoves unstarted tasks out before close when a new plan supersedes the tranche—

How it works

What starts the archive

TriggerWorkflow jobHow the tranche is found
A task pull request merges to mainpost-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: labelFrom the Issue's own vinaya/tranche:<slug> labels, re-read from the forge. Slugs with characters outside [A-Za-z0-9._-] are skipped.
Daily at 02:00 UTC, or a manual rundaily-drift, step "Archive every finished tranche not yet archived"Every vinaya/tranche:* label in the repository

All three steps run with continue-on-error: true. A refusal while task Issues remain open is the expected result on every close but the last.

What vinaya archive tranche <slug> does

  1. 1

    Read the tranche

    It reads every Issue labelled vinaya/tranche:<slug>, 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.

  2. 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. 3

    Stop if already archived

    A Milestone that is closed and carries the retrospective is reported as archived, and nothing changes.

  4. 4

    Decide whether the Milestone may close

    Two things hold it open: another attached Issue is still open, or the Milestone has a ### Tranche intents section and not every declared tranche is complete. An intents section with no readable line also holds it open.

  5. 5

    Write the retrospective

    It writes - Tasks: <count>, - Rounds per task: #<pr> (<rounds>) and - Merged PRs: …, from the merged pull requests on head:task/<slug>/. Rounds come from <!-- aeg:developer:round-<n> --> markers, and count as 1 when there are none. A re-run replaces the section, never duplicates it.

  6. 6

    Update the Milestone

    It updates the Milestone description, and sets its state to closed when 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 --yes 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. 1

    Check it may start

    All facts come from the forge: no open pull request on task/<slug>/*, no open Issue labelled vinaya/tranche:<slug>, an explicit Principal declaration, and an open Milestone. A task is finished when it is merged, dropped (NOT_PLANNED) or moved.

  2. 2

    Verify per-task provenance

    Every task pull request must carry a provenance block. A missing one is flagged before going on.

  3. 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. 4

    Close the Milestone

    It first reads vinaya milestone status <n> and closes only when every declared tranche is complete. It then runs vinaya milestone close --slug <slug>, which itself only verifies attachment.

  5. 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. 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 the tranche-close token 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

GateWhenRefuses
Tranche archival statusarchive trancheAny open Issue in the tranche
Milestone close decisionarchive trancheClosing a Milestone with other open Issues or unfinished declared tranches. It records the retrospective and leaves the Milestone open.
Attachment checkmilestone close --slugAny tranche Issue not attached to the resolved Milestone
Tranche Archivist entry gateTurn startOpen work, no declaration, Milestone already closed
Planner readiness item 8Next planA finished, unarchived earlier tranche on an in-scope product

Configuration

KeyEffect
rings.ring2_asyncAuditsDoes not affect archive tranche or archive tranches; neither reads it
managedThe generated workflow carries the triggers and the fixed 0 2 * * * schedule

What gets logged

ActLog events
archive tranche, archive tranches, milestone close, milestone statusoperation · completed
A dispatched Tranche Archivist turndispatch, role_attempt, usage

What's next