Repository navigation
cortex: dashboard, pages and gate-grading workflows; ledger carve-out; first render (PyAutoMind#380) - #2
Merged
Conversation
…; first render (PyAutoMind#380) Phase 2 of the cortex-birth epic, Cortex half: the Cortex gets a published board, a nightly self-heal for it, and the one scheduled job allowed to move a phase. Workflows: - dashboard_refresh.yml — renders `dashboard.md`/`dashboard.html` with the Brain's cortex conductor (two checkouts; runner python3, both sides stdlib). PR runs error on drift, push/cron/dispatch self-heal main in a 3-attempt fetch/reset/render/commit/push loop. The `check()` wrapper keeps the exit-code contract: 1 is drift and nothing else, anything higher is a renderer failure and is reported as one. Both dispatch sites for pages_dashboard.yml are kept — the fresh path as well as the heal path, because a GITHUB_TOKEN push fires no events and folding the two together is what stranded the Mind's published board on 2026-08-27. - pages_dashboard.yml — publishes `dashboard.html` as the Pages index and `batches/packets/*.html` under `/packets/`; `enablement: true`, `group: pages`. - gates_grade.yml — daily 06:47 UTC `cortex.py gates --grade --write`. The one scheduled mutator: `gated → ready` (and `ready → gated` on a reopen), phase headers only, explicit `git add phases`. An unreadable ref fails closed and reddens the job AFTER committing whatever flipped, then re-dispatches cortex_check.yml and dashboard_refresh.yml by name. - cortex_check.yml — paths gain the two generated pages; its "no self-heal" sentence now points at dashboard_refresh.yml. - All three main-writers (including ledger_merge.yml, whose group is renamed) share `concurrency: group: cortex-main-writers, cancel-in-progress: false`. Ledger carve-out (scripts/ledger_merge.py + tests): - `AGENTS.md` / `TEMPLATE.md` under a ledger dir are CODE — ledger by location, instructional by content; auto-merging a rewrite of `rulings/AGENTS.md` would let a branch edit the rule that governs its own merge. - `dashboard.md` / `dashboard.html` are LEDGER — generated and self-healed, so the heal commit must land without a human. - Tests: the five doctrine paths are code, every tracked ledger-dir path gets the right verdict, the dashboards are ledger, every workflow file (all five, named) is code, and the workflows are pinned to the spellings they invoke. Docs: AGENTS.md and REFERENCE.md gain "Driving the Cortex" (conductor verbs, the `--apply`/`--write` split, the `--check` exit-code contract, what each workflow may write, the Pages URL); README links the board; schema_decisions.md 38–48. First render committed: `dashboard --check` is clean on the empty tree. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SESCzU1FcwktEAdTZfmf3j
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Phase 2 of the
cortex-birthepic (PyAutoLabs/PyAutoMind#380), Cortex side — the workflows that drive the registry now that the Brain conductor exists (merge after PyAutoBrain's cortex-conductor PR):dashboard_refresh.yml— mirror of the Mind's (Brain checkout, exit-code contract, PR errors / push+cron+dispatch self-heal, both Pages redispatch sites),pages_dashboard.yml(index =dashboard.html, packets under/packets/),gates_grade.yml— the one scheduled job that mutates state: dailycortex.py gates --grade --write, commits flips, redispatches the check and the refresh, and reddens on an unreadable ref after committing what flipped. All main-writers share thecortex-main-writersconcurrency group.AGENTS.md/TEMPLATE.mdunder ledger dirs are code (a doctrine edit needs a human);dashboard.md/dashboard.htmlare ledger (the self-heal commit auto-merges).dashboard.md+dashboard.html(empty registry)..cortex/pull.jsonschema phase 3 writes,--pulldoctrine,--apply/--writespelling, zip-over-dir, and more).Scripts Changed
.github/workflows/{dashboard_refresh,pages_dashboard,gates_grade}.yml(new),cortex_check.yml,ledger_merge.ymlscripts/ledger_merge.py,tests/test_ledger_merge.py(+8)dashboard.md,dashboard.html(new render)AGENTS.md,REFERENCE.md,README.md,docs/schema_decisions.mdTest Plan
cortex.py checkOK;pytest tests -q→ 127 passeddashboard --checkclean against the merged Brain conductorledger_merge.py classify batches/AGENTS.md→ code;dashboard.md→ ledgerrepos_sync.py --check15 legs OKcortex_check.yml+dashboard_refresh.ymlgreen on this PR; first Pages deploy live after mergeGenerated by the PyAutoLabs agent workflow.