Skip to content

feat(prm): append the tier-notify shadow row at close-out #364

Closed

Description

@Jammy2211

Overview

The tier-notify auto-merge decision is pre-registered: over a window of at least 40 tier-notify candidates, the human's action at close-out (merged-unchanged / merged-after-substantive-change / not-merged) decides whether an agent may ever merge its own low-consequence work. The shadow table in PyAutoMind/autonomy_log.md holds 2 rows because the append was anchored to a batch review slot that rarely runs. This task moves the append to the act that happens on every shipped task: /prm close-out. The deliverable is the mechanism only; the doctrine edit (AUTONOMY.md "an explicit future flag may extend autonomy to merge") is written when the window reaches 40 and the human rules.

Plan

  • Add a shadow-row subcommand to PyAutoMind/scripts/lifecycle.py that appends one six-cell row under ## Shadow window in autonomy_log.md and maintains a count line in that section's header (dry-run by default, --apply writes).
  • Add a /prm close-out sub-step (tier-notify candidates only) that fills the row from the task's existing ship calibration row, asks the human one question ("merged unchanged, or did you change something substantive first?"), and calls the script inside the same Mind commit and push the close-out already makes.
  • Document the row's cell sources in skills/prm/reference.md beside the Freeze-overrides mechanism.
  • Rewrite the shadow-window header in autonomy_log.md: counted-not-dated window, count line, corrected history sentence; move the mis-filed 2026-09-07 corrective row into the main calibration log.
  • Tests in PyAutoMind (schema + count line + script append) and PyAutoBrain (board rendering of a six-column row).
Detailed implementation plan

Affected Repositories

  • PyAutoBrain (primary)
  • PyAutoMind

Work Classification

Library (organ repos)

Branch Survey

Repository Current Branch Dirty?
./PyAutoBrain main (65d2006) clean
./PyAutoMind main (d5181ad5) another session's staged close-out in the index

Suggested branch: feature/prm-shadow-row-notify-tier
Worktree root: ~/Code/PyAutoLabs-wt/prm-shadow-row-notify-tier/

Implementation Steps

  1. PyAutoMind/scripts/lifecycle.py: new shadow-row subcommand beside record — --date --task --tier --gate --action {merged-unchanged,merged-after-substantive-change,not-merged} --stage {1,2} [--apply]. Locates ## Shadow window — the tier-\notify` merge decision, appends the row to that section's table, rewrites the Count toward 40:line (total, stage 1, stage 2, first/prm-appended row date). Dry-run prints the row and the new count line; --apply` writes.
  2. PyAutoBrain/skills/prm/prm.md §5: new sub-step between 5.3 and 5.4, "Shadow row — tier-notify only": read the prompt's Consequence: (declared header wins; otherwise pyauto-brain sizing <prompt>); if not notify, do nothing and say nothing. If notify: copy the gate cell from the task's ship calibration row in autonomy_log.md; stage = 2 if the adversary leg ran, else 1; ask the human the one question, quoting the one-line substantive definition; not-merged is recorded from a /prm guard stop, never asked; run lifecycle.py shadow-row … --apply; the row rides the 5.4 Mind commit + push; the 5.7 ledger line names it.
  3. PyAutoBrain/skills/prm/reference.md: beside the Freeze-overrides paragraph, the schema, each cell's source, and "append only after the merge is confirmed MERGED". The substantive vocabulary stays canonical in autonomy_log.md.
  4. PyAutoMind/autonomy_log.md shadow-window header: window counted to 40 not dated; add the count line; correct the "batch workflow was retired" sentence (the slot door lives on but runs only when a batch is launched; /prm is the act that always happens); move the 2026-09-07 corrective row out of the shadow table into the main calibration table.
  5. Tests: PyAutoMind/tests/test_autonomy_log_shadow.py (heading exists; header row matches the six-column schema verbatim; every data row has six cells with human action in the allowed set; count line agrees with the rows; shadow-row dry-run leaves the file unchanged, --apply on a fixture copy appends and recounts). PyAutoBrain/tests/test_board.py: collect_autonomy renders a six-column shadow row sanely.

Key Files

  • PyAutoMind/scripts/lifecycle.py — shadow-row
  • PyAutoMind/autonomy_log.md — shadow window header + rows
  • PyAutoBrain/skills/prm/prm.md, PyAutoBrain/skills/prm/reference.md — close-out step
  • PyAutoBrain/board/_board.py collect_autonomy — rendering check
  • PyAutoMind/tests/, PyAutoBrain/tests/test_board.py

Witness

python3 PyAutoMind/scripts/lifecycle.py shadow-row … --apply on a copy of autonomy_log.md appends a row and updates the count line with no input beyond the one question's answer; the header states the re-opened window and the count toward 40 reads off the table; pytest PyAutoMind/tests PyAutoBrain/tests green.

Original Prompt

Click to expand starting prompt

The tier-notify auto-merge decision — re-open the shadow window, then decide

Type: feature
Target: pyautobrain
Repos:

  • PyAutoBrain
  • PyAutoMind
    Themes:
  • mind-workflow
    Difficulty: medium
    Autonomy: human-required
    Priority: high
    Status: draft
    Consequence: judge
    Review-minutes: 20
    Unattended: never
    Filed: 2026-08-30

Decided 2026-08-30: shadow the tier before granting or refusing it. The
question is whether an agent may ever merge its own low-consequence work —
AUTONOMY.md says merge and issue-close are "human, always" at every level, and
that "an explicit future flag may extend autonomy to merge; it does not exist
and must not be assumed". This prompt is the protocol for deciding whether to
write that flag, and the protocol is pre-registered: the decision rule is fixed
before the data arrives, so the answer cannot be rationalised afterwards.

The window is re-opening, not closing. Measured 2026-09-03: the shadow table
in autonomy_log.md holds 2 rows, against the 40 its own pre-registered
rule requires, and nothing has fed it since 2026-08-31 — the rows were being
appended by a batch review slot, and the batch workflow was retired on
2026-09-03 (complete/archive/epics/two_slot_batching_epic.md). Two rows is not
a weak answer, it is no answer. The rule's own instruction covers exactly this
case — "Fewer than 40 candidates at the end of the window is not a pass. Extend
the window; do not lower the bar."
— so the nominal close of 2026-09-27 is
void, and the window re-opens from the first row appended under the new
mechanism below.

Why this is worth measuring at all

Every other workflow change re-times the human's review — schedules it, batches
it, moves it later. This is the only mechanism that removes some of it. August
shipped 332 completion records, about eleven a day, with the human in-session;
there was never a throughput problem. The scarce resource is the human's
judgement, and re-timing it does not create more of it.

What the tier would cover, and how much of the flow that is

Measured over all 332 August records, bucketed by the repos their PRs name:

Bucket Share Tier
organ repos only (Brain, Mind, Memory, Heart, Hands, Gut, Scientist) 56 · 17% the notify candidate pool
workspace / assistant / profiling only 52 · 16% mostly glance, some notify
touches a core library 99 · 30% glance or judge
names no PR at all — research, decisions, verdicts 125 · 38% judge by nature

Two honest readings of that table, and both belong in the decision:

  1. The window will be well powered. At ~56 candidates a month, four weeks
    yields roughly fifty — enough to decide on, without waiting a quarter.
  2. The ceiling is about 17% of throughput. Auto-merge is worth the doctrine
    change, but it is not the answer on its own. The single biggest bucket is the
    38% that produce no PR at all: research, decisions and written verdicts,
    whose review is the judgement. Nothing here makes those cheaper, and no
    claim should imply otherwise. If the human wants that bucket cheaper too, it
    is a separate question about how verdicts are structured, not about merge
    automation.

The protocol

The row must be appended by the act that actually happens. The first attempt
anchored the append to a batch review slot; two slots ever ran, so two rows
exist. The act that happens on every shipped task, every time, on every surface,
is /prm close-out — it already judges the PR's checks, merges, closes the
issue, moves the prompt to complete/ and regenerates the dashboard. Appending
one row there is the deliverable of this prompt:

  • /prm appends the shadow row for every tier-notify candidate it merges,
    reading the gate legs it has already evaluated and the human action it has
    just taken. No new surface, no separate discipline to remember, and the row
    cannot be forgotten by a session that never came back.
  • The window re-opens from the first row appended that way and runs until
    40 candidates have accumulated. Report the counts against the rule at that
    point — not on a calendar date.

Two stages, unchanged and never pooled:

  • Stage 1 — the four-leg gate plus whether the witness held.
  • Stage 2 — the same rows with the independent-model adversarial leg's
    verdict recorded too. Rows are marked stage: 1|2.

Where the rows live: appended to PyAutoMind/autonomy_log.md as its own
table, as they are today. That file is already an append-only calibration record
and already a root ledger file, so the window needs no new infrastructure and no
allowlist edit.

One row per tier-notify candidate:

| date | task | tier | gate (tests/smoke/review/heart/witness[/adversary]) | human action | stage |

human action ∈ merged-unchanged / merged-after-substantive-change /
not-merged.

"Substantive" is defined now, not later, so the judgement at close-out is
mechanical: a change the human would have minded finding already merged. A
changed default, a user-visible error message, a removed or weakened test, a
renamed public thing, a docs claim that was wrong — substantive. Typos, wording,
formatting, comment polish — not.

The decision rule, pre-registered

Over a window of at least 40 tier-notify candidates (2 as of 2026-09-03 —
the count restarts from the first /prm-appended row):

  • Grant the tier if merged-after-substantive-change + not-merged = 0.
  • Grant it narrowed if every such case falls in one identifiable sub-class
    (say, "organ repos with no tests"): exclude that sub-class from the tier by
    rule, and grant the rest. The exclusion is written into the doctrine edit.
  • Refuse otherwise, and say so plainly. Nothing else depends on the answer —
    the workflow is unchanged either way — so the decision is not loaded.

Fewer than 40 candidates is not a pass. Extend the window; do not lower the bar.
This rule has already fired once, on 2026-09-03, and is why the window is being
re-opened rather than closed.

The base rates this is being judged against, both from this organism's own
ledger: 20% of August records carry a correction or a retraction, and the
review leg on autonomous ships is today, in practice, the branch's own author.

If the answer is yes

The doctrine edit in AUTONOMY.md must be dated, scoped and revertible.
AUTONOMY.md today says merge and issue-close are "human, always" at every
level, and that "an explicit future flag may extend autonomy to merge; it does
not exist and must not be assumed." This is that flag. Write it as such.

Scope, as narrow as it can usefully be:

  • Tier decided by rules over repo class and surface (the sizing faculty),
    never by the agent's own reading of its work.
  • Never where the diff touches a public API, a default, an error contract, or a
    file named in an external reporter's issue — regardless of tier.
  • Never for a run that flagged a decision.
  • The full six-leg gate, with any leg that did not run counting as a park.
  • A weekly digest of everything merged this way, so "notified" is a fact rather
    than a theory.
  • A kill switch, in the manner of NIGHTLY_RELEASES.
  • A standing revert condition: one substantive escape retires the tier pending
    a fresh window.

Done when

  • /prm's close-out appends the shadow row for every tier-notify candidate it
    merges, and the row lands without the human doing anything extra.
  • The shadow table in autonomy_log.md is growing again, its header states the
    re-opened window, and the count toward 40 is readable from the table itself.
  • At 40 candidates the counts are reported against the pre-registered rule
    before any recommendation is written.
  • The human's yes, narrowed-yes or no is recorded in AUTONOMY.md, dated.

Activity

  1. Jammy2211 commented on Sep 7, 2026

    @Jammy2211
    ContributorAuthor

    PRs opened: Mind PyAutoLabs/PyAutoMind#395 (merge first), Brain #366. End at PR-open; merge is human (/prm).

  2. Jammy2211 commented on Sep 8, 2026

    @Jammy2211
    ContributorAuthor

    Shipped — merged in PyAutoLabs/PyAutoMind#395 (merge eec96d41) and #366 (merge af8f2ef).

    • lifecycle.py shadow-row: appends the tier-notify shadow-window row and maintains the Count toward 40: line; dry-run by default.
    • /prm sub-step 5.3b: for tier-notify candidates only, fills the row from the ship calibration row, asks one question, and appends it inside the close-out's own Mind commit and push.
    • autonomy_log.md: window restated as counted (to 40) and re-opened from the first /prm-appended row; mis-filed corrective row moved to the main table.
    • The AUTONOMY.md merge-flag edit is deferred to the 40-candidate ruling, per the pre-registered protocol.

    Completion record: PyAutoMind/complete/2026/09/prm-shadow-row-notify-tier.md.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions