Repository navigation
Description
Overview
Phase 5 (last) of the mind-post-cortex epic — assessment gap 6. A library merge
landing mid-validation restales Heart and costs ~75 minutes, but nothing tells a
/prm run or a batch member "library mains are frozen for the next N minutes".
This adds a Heart-owned freeze flag with its own CLI verb, and three read-only
Brain surfaces that show it — one of which (/prm) actually stops on it, for
library repos only.
Prompt: PyAutoMind/active/mind_post_cortex_p5_heart_freeze_flag.md.
Epic ledger: PyAutoMind/draft/maintenance/pyautomind/mind_post_cortex_epic.md.
Decision taken by the architect (reverse before merge if disagreed)
The prompt names one human-required decision: may /prm override an active
freeze with an explicit --thaw? Adopted per the prompt's own recommendation:
yes, with the override logged. /prm --thaw "<why>" merges a library PR
through an active freeze and appends one row to PyAutoMind/autonomy_log.md
under a new Freeze overrides section (no new log file):
| date | task / PR | freeze reason | until | thawed by | why |
This was decided by the architect on the prompt's recommendation, not by a
human. Reverse it before merge if you disagree — the change is confined to the
--thaw bullets in skills/prm/prm.md and the section in autonomy_log.md.
Plan
- Heart owns the flag. A new
pyauto-heart freezeverb writes/reads/clears
$HEART_STATE_DIR/freeze.json(~/.pyauto-heart/freeze.json) carrying
{reason, set_at, until, set_by}. Expiry is byuntil: an expired flag reads
as clear and--showsays so, so a forgotten set is visible rather than
permanent. - Real call sites, not just a verb.
pyauto-heart validate --ingestclears
the freeze when it persists a validation report (that ingest is the end of
the window).review_releasegains the check-and-clear step; the Hands
pre_buildskill gains the set-at-dispatch / clear-at-review step; the
nightly release run is documented rather than edited (it is CI YAML). - Brain reads it, three surfaces. The
vitalsfaculty prints
FROZEN: <reason> until <ts>as a warning line;/prmgains a merge-gate leg
that stops on a library-repo PR while the freeze is active (--thaw
overrides, logged);batch collect's summary and report carry one line, and
the status-box renderer gains the same line as a caller-supplied fact. - Heart's verdict is deliberately unchanged. The freeze does not enter
readiness's colour or reason lists — that would make every ship and release
gate block on it, contradicting the prompt's "advice-with-teeth for/prm
only". It is a separate, live read. - Three PRs: PyAutoHeart (flag + CLI + call sites + tests), PyAutoBrain (the
three read surfaces + tests), PyAutoHands (onepre_buildcall-site step).
Detailed implementation plan
Work Classification
Library / Workspace / Both → neither: three organ repos (Heart, Brain,
Hands). Shipped through start_library / ship_library as the organ-repo path.
Affected Repositories
- PyAutoHeart (primary) — the flag, the verb, its call sites
- PyAutoBrain — vitals,
/prm, batch (read-only consumers) - PyAutoHands — one step in
skills/pre_build/pre_build.md - PyAutoMind — ledger only (
active.md,autonomy_log.mdsection); auto-merges
Branch Survey
| Repository | Current Branch | Dirty? |
|---|---|---|
| ./PyAutoHeart | main | clean |
| ./PyAutoBrain | main | clean |
| ./PyAutoHands | main | clean |
| ./PyAutoMind | main | dirty (another session's staged ledger move — untouched) |
Suggested branch: feature/mind-post-cortex-p5-heart-freeze
Worktree root: ~/Code/PyAutoLabs-wt/mind-post-cortex-p5-heart-freeze/
worktree_check_conflict exits 1: sibling phases p2/p3/p4 of this same epic
claim PyAutoBrain and PyAutoHeart. Known parallel claim, disjoint files —
recorded as a parallel-claim: line on the active.md row, verified by
git merge-tree against each sibling branch before ship.
Implementation Steps
PyAutoHeart
heart/freeze.py(new) —read(now),set_freeze(reason, until, set_by),
clear(),render_line(),main(argv). State file
$HEART_STATE_DIR/freeze.json, written withstate.atomic_write_json.
--untilaccepts an ISO-8601 timestamp or a<N>m/<N>hduration.
--showexits 3 while a freeze is active and 0 when clear or expired, so a
shell gate needs no JSON parse;--jsonfor programmatic readers.bin/pyauto-heart—freezeverb:SUBCOMMAND_ORDER,SHORT_DESC,
help_freeze,cmd_freeze(delegates topython3 -m heart.freeze).heart/validate.py— clear the freeze when--ingestpersists a report.skills/review_release/review_release.md— the freeze check/clear step.REFERENCE.md— CLI row, the state-file entry, and one "Release freeze
window" section: schema, expiry, every call site, and who reads it.tests/test_freeze.py(new) + onetests/test_validate.pycase.
PyAutoBrain
agents/faculties/vitals/AGENTS.md+vitals.sh— read
pyauto-heart freeze --show --jsonand printFROZEN: <reason> until <ts>
as a warning; state explicitly that the verdict colour is unchanged.skills/prm/prm.md(+reference.md) — the freeze gate leg in section 4,
the--thawflag in Usage, the guard bullet in section 6, and the
autonomy_log.mdrow format.agents/conductors/batch/_status.py—freeze_line()(the one wording) and
an optional caller-suppliedfreezefact rendered in both renderers.
_intake.pydeliberately does not supply it: the dashboard is a
committed artifact and CI regenerates it with no Heart state, so a live
freeze would read as dashboard drift.agents/conductors/batch/_batch.py—heart_freeze()reader (honours
expiry) + one line incollect_report()andemit_collect().tests/test_batch_status.py/tests/test_batch_collect.pyadditions.
PyAutoHands
skills/pre_build/pre_build.md— set the freeze before the dispatch step,
and say who clears it (review_release, or the ingest, or expiry).
Key Files
PyAutoHeart/heart/freeze.py— the flag (new)PyAutoHeart/bin/pyauto-heart— thefreezeverbPyAutoHeart/heart/validate.py— auto-clear at ingestPyAutoBrain/agents/conductors/batch/_status.py/_batch.py— the box + collect linesPyAutoBrain/skills/prm/prm.md— the gate leg and--thawPyAutoBrain/agents/faculties/vitals/{AGENTS.md,vitals.sh}— the warning linePyAutoHands/skills/pre_build/pre_build.md— the set call site
Original Prompt
Click to expand starting prompt
Heart freeze flag: make the library-main validation window visible to /prm and batch members
Type: feature
Target: pyautoheart
Repos:
- PyAutoHeart
- PyAutoBrain
Themes: - mind-workflow
Difficulty: medium
Autonomy: supervised
Priority: normal
Status: draft
Consequence: judge
Witness:pyauto-heart freeze --set "release validation" --until <ts>writesstate/freeze.json;pyauto-brain vitalsprints the freeze with its reason and expiry;/prmon a library PR while the freeze is active stops with the freeze message instead of merging (workspace/organ PRs unaffected);batch collect/status box show the freeze line; the flag clears itself past--untiland on--clear; Heart and Brain tests cover set/clear/expiry
Review-minutes: 20
Unattended: ready
Epic: mind-post-cortex
Phase: 5
Filed: 2026-09-03
Phase 5 of mind-post-cortex — assessment gap 6. Two PRs: Heart (the flag
and its CLI) and Brain (vitals faculty, /prm gate leg, batch status line).
Why
A library merge landing mid-validation restales Heart and costs ~75 minutes
(memory: feedback_library_merge_mid_validation_restales_heart, 2026-08-29).
heart-ack: is recorded per task and per shift, but nothing tells a member or
a /prm run "library mains are frozen for the next N minutes".
Design
- Heart owns the flag:
state/freeze.json{reason, set_at, until, set_by}
written by a newfreezeverb on the Heart CLI (--set,--until,
--clear,--show). The release/validation drivers (review_release,
pre_build, the nightly release run) set it at validation start and clear
it at the end; document the exact call sites and add them. - Brain reads it: the
vitalsfaculty prints it as a YELLOW reason
(FROZEN: <reason> until <ts>);/prmadds it as a gate leg before merge
for PRs whose repo is inLIBRARY_REPOS(organ and workspace repos are not
gated); the batch status box andbatch collectsummary carry one line.
The flag is advice-with-teeth for/prmonly — no other skill blocks on it. - Expiry is by
until; a stale flag past expiry reads as clear, and--show
says "expired" so a forgotten set is visible.
Human-required decision to surface in the plan: whether /prm may override
with an explicit --thaw (recommended: yes, logged to autonomy_log.md).
Activity
Jammy2211 commentedon Sep 3, 2026
Shipped to PR-open — three PRs, merge stays human
mainheart/freeze.py+ thefreezeverb,validate --ingestclears,review_releasechecks, REFERENCE.mdmainvitalsline,/prmmerge-gate leg +--thaw,batch collect/status-box linemainpre_buildstep 1b — the set call siteBranch
feature/mind-post-cortex-p5-heart-freezein all three; worktree~/Code/PyAutoLabs-wt/mind-post-cortex-p5-heart-freeze.Merge order: PyAutoHeart#197 first (it ships the verb the other two document), then the other two in either order.
The CLI, as built
$HEART_STATE_DIR/freeze.json→{reason, set_at, until, set_by}.--untilmandatory; expired reads as clear everywhere while--showsaysexpired; a read exits 3 while active, 0 otherwise (--setalways 0, forset -edrivers).Spelling note: the prompt wrote
state/freeze.json. That is Heart's state directory (~/.pyauto-heart/), not the repo'sstate/folder — writing into the checkout would break the observer rule and dirty the repo. Same file, resolved the only way that is consistent with the rest of Heart.Two judgement calls to know about
/prmonly". It is a separate, live read._status.pyrenders it only when a caller supplies it, and the Mind dashboard renderer deliberately does not: that page is a committed artifact regenerated in CI, where the dev box's Heart state does not exist, so a live freeze would read as dashboard drift on the next--check.batch collect(terminal, on the box that holds the state) does supply it.The
--thawdecision — taken by the architect, reversibleAnswered per the prompt's own recommendation: yes,
/prm --thaw "<why>"overrides, logged — one row appended toPyAutoMind/autonomy_log.mdunder a## Freeze overridesheading created on first use (no new log file):Decided by the architect on the prompt's recommendation, not by a human — reverse before merge if you disagree. It is confined to the
--thawbullets inskills/prm/prm.md(§4 item 1, the Usage line, the §6 guard) and the mirror inskills/prm/reference.md. The section is not pre-created inautonomy_log.mdon purpose: a Mind ledger push auto-merges tomainand would land the decision ahead of its review.Tests
pytest -q: 679 passed (19 newtest_freeze.py, 3 new intest_validate.py).pytest -q: 872 passed, 1 failed — the pre-existing worktree-onlytest_cortex_conductor::test_a_fixture_tree_finds_the_schema_its_checkout_ships. 12 new intest_batch_freeze.py.git merge-treeagainst the p3 and p4 sibling branches: 0 conflicts in Brain (against both) and in Heart (against p3).Heart at ship
RED, unacked, unrelated:
PyAutoLens: CI failure,release validation FAILED (stage integrate),PyAutoArray: open PR 11d old. No library source and no release surface in this diff. Merge needs the human's own call.This is the last phase of the
mind-post-cortexepic.Jammy2211 commentedon Sep 3, 2026
Shipped
Phase 5 (last) of the
mind-post-cortexepic. All three PRs merged 2026-09-03 afterorigin/mainwas merged into each branch and CI re-judged on the new heads (every run,every leg green).
4b87304767971f21128d9a1dMerged in that order — Brain reads the
freezeverb Heart ships.What landed
heart/freeze.py(new):~/.pyauto-heart/freeze.jsoncarrying{reason, set_at, until, set_by}, expiry byuntilso a forgotten set reads asclear and
--showsays "expired". Newpyauto-heart freezeverb(
--set/--until/--clear/--show).validate --ingestclears the freeze when itpersists a report.
review_releasegained the check-and-clear step. Tests:tests/test_freeze.py+tests/test_validate.pyadditions.vitalsfaculty printsFROZEN: <reason> until <ts>,/prmgained a merge-gate leg that stops on alibrary-repo PR while the freeze is active (
--thaw "<why>"overrides, logged toautonomy_log.md→ Freeze overrides), andbatch collect/ the status-boxrenderer carry the same line.
tests/test_batch_freeze.py.pre_buildsets the freeze at dispatch and clears it at review.Heart's
readinessverdict is deliberately unchanged: the freeze is a separate liveread, advice-with-teeth for
/prmonly.Decision confirmed at merge. The architect's
--thawanswer (yes, with theoverride logged) was not reversed before merge.
Heart at merge. The task's
heart-noterecorded three unacked RED reasons(PyAutoLens CI failure, release validation FAILED at stage integrate, PyAutoArray open
PR 11d old). None touches this diff — one new Heart module and CLI verb, one
ingest-side clear, skill/doc files and their tests; no library source, no release
surface. The merge was the human's own
/prmcall.Record:
PyAutoMind/complete/2026/09/mind-post-cortex-p5-heart-freeze.md.With this phase the
mind-post-cortexepic is COMPLETE (all five phases shipped) andits ledger is archived to
PyAutoMind/complete/archive/epics/mind_post_cortex_epic.md.