Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/cortex_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ on:
- "rulings/**"
- "batches/**"
- "projects.yaml"
- "epics.md"
- "checkin.yaml"
- "dashboard.md"
- "dashboard.html"
- "scripts/**"
Expand All @@ -29,7 +29,7 @@ on:
- "rulings/**"
- "batches/**"
- "projects.yaml"
- "epics.md"
- "checkin.yaml"
- "dashboard.md"
- "dashboard.html"
- "scripts/**"
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/dashboard_refresh.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ name: Dashboard Refresh
# Keeps the generated Cortex pages (`dashboard.md`, linked from the README, and
# `dashboard.html`, the Pages index) in step with the registry they describe.
# The pages are rendered by PyAutoBrain's cortex conductor from `phases/`,
# `rulings/`, `batches/`, `projects.yaml` and `epics.md`, so any push that files
# a phase, moves it, records a run or lands a ruling makes them stale.
# `rulings/`, `batches/`, `projects.yaml` and `checkin.yaml`, so any push that
# files a phase, moves it, records a run, lands a ruling or stamps a check-in
# makes them stale.
#
# Same shape as the Mind's dashboard_refresh.yml, and for the same reason: on
# pull requests a stale page is an error the author fixes on the branch; on
Expand Down Expand Up @@ -33,7 +34,7 @@ on:
- "rulings/**"
- "batches/**"
- "projects.yaml"
- "epics.md"
- "checkin.yaml"
- "dashboard.md"
- "dashboard.html"
pull_request:
Expand All @@ -42,7 +43,7 @@ on:
- "rulings/**"
- "batches/**"
- "projects.yaml"
- "epics.md"
- "checkin.yaml"
- "dashboard.md"
- "dashboard.html"
workflow_dispatch:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ledger_merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ name: Cortex Ledger Merge
# pushed it ever comes back.
#
# WHAT IT WILL AND WILL NOT MERGE. Only a branch whose whole diff is *ledger*:
# `phases/`, `rulings/`, `batches/`, `epics.md`. The line is drawn by
# `phases/`, `rulings/`, `batches/`, `checkin.yaml`. The line is drawn by
# scripts/ledger_merge.py — a script, so it is testable and a session can
# predict the verdict — and it is DEFAULT DENY: anything under `scripts/`,
# `tests/`, `.github/`, `policy/`, `docs/`, `projects.yaml`, the prose pages,
Expand Down
9 changes: 6 additions & 3 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,11 @@ human's turn. Full rules in [rulings/AGENTS.md](rulings/AGENTS.md).
human's verbatim reviews under `reviews/`, kept because 13 rulings cite them
and append-only for the merge gate: never modified, only added. Nothing
writes new ones (the review-slot apparatus was retired 2026-09-03).
- **`epics.md`** — the Cortex half of every split epic; `- mind-half:` names
the Mind entry by slug.
- **`checkin.yaml`** — one key, `refreshed: <UTC ISO 8601>`: when the science
state was last actually checked in, written by `pyauto-brain cortex checkin
--apply` and read back by the board. It means *last check-in*, never last
render, so a doc-only push cannot fake freshness; the HTML board reddens it
on the reader's own clock once it is more than an hour old.
- **`scripts/cortex.py`** — the one lifecycle script (stdlib only):
- `check` — every structural rule, hermetic; `cortex check: OK` or `DRIFT`
with one ` - …` line per finding, exit 1.
Expand All @@ -97,7 +100,7 @@ human's turn. Full rules in [rulings/AGENTS.md](rulings/AGENTS.md).
(see "Driving the Cortex" below). They are ledger for the merge gate.
- **`scripts/ledger_merge.py`** — the default-deny classifier behind
`.github/workflows/ledger_merge.yml`: a `claude/**` push whose whole diff is
ledger (`phases/`, `rulings/`, `batches/`, `epics.md`, the two generated
ledger (`phases/`, `rulings/`, `batches/`, `checkin.yaml`, the two generated
dashboards) lands on `main` by itself; anything else waits for a human — and
that "anything else" includes an `AGENTS.md` or `TEMPLATE.md` *inside* a
ledger dir, which is doctrine, not an entry. `python3
Expand Down
25 changes: 21 additions & 4 deletions REFERENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ GitHub ref — whatever a human would open.
| `Runs:` | comma-separated job **stems** | the index of the `## Runs` body; equal to the set of body stems |
| `Ruling:` | ruling id | the chain head (see "Rulings") |
| `Review-minutes:` | integer | a seed, not a measurement |
| `Epic:` | slug | shared with the Mind — the join key across the two dashboards |
| `Epic:` | slug | OPTIONAL join key to a **Mind** epic; the Cortex keeps no epics file of its own |
| `Filed:` | `YYYY-MM-DD` | |
| `Migrated-from:` | source path or ledger anchor | the Mind prompt, review file or project-ledger entry this phase was transcribed from (phase 4 of the birth epic) |

Expand Down Expand Up @@ -174,7 +174,7 @@ PyAutoCortex/
├── LICENSE .gitignore
│
├── projects.yaml ← the science body map — CODE, not ledger (read with PyYAML)
├── epics.md ← the Cortex half of each split epic (`- mind-half:`)
├── checkin.yaml ← `refreshed: <UTC ISO>` — the last check-in stamp; LEDGER
├── dashboard.md ← GENERATED board — cortex conductor (`dashboard --apply`); LEDGER
├── dashboard.html ← GENERATED board, the Pages index; LEDGER
│
Expand Down Expand Up @@ -409,7 +409,7 @@ deny**:
| Ledger — merged automatically | Code — always a human |
|---|---|
| `phases/**`, `rulings/**`, `batches/**` | `scripts/`, `tests/`, `.github/`, `policy/`, `docs/` |
| `epics.md` | `projects.yaml`, `README.md`, `AGENTS.md`, `REFERENCE.md`, … |
| `checkin.yaml` | `projects.yaml`, `README.md`, `AGENTS.md`, `REFERENCE.md`, … |
| `dashboard.md`, `dashboard.html` (generated) | **`AGENTS.md` / `TEMPLATE.md` inside a ledger dir** |
| | anything unclassified — a new root file, a new top-level folder |
| | **any modification or deletion under `rulings/` or `batches/`** (append-only) |
Expand Down Expand Up @@ -518,6 +518,23 @@ phase (the six legs below), moves `running → pulled → awaiting-ruling`,
re-renders `dashboard.md` + `dashboard.html`, and prints a summary keyed **by
project** — the last thing on screen, so a chat sees it first.

### `checkin.yaml` — the last-check-in stamp

One key, one line, committed and pushed with the ledger:

```yaml
refreshed: 2026-09-04T14:03:00Z
```

It records the last **check-in**, not the last render: `checkin --apply` (and
`collect --apply`) writes it from the same stamp it scored against, before the
pages are rendered, so a doc-only push that re-renders the board cannot fake
freshness. The board reads it back as "Last check-in"; the HTML twin computes
the age on the *viewer's* clock and reddens it past sixty minutes, because a
static page cannot know when it is being read. Absent, the board says "never
checked in". The file is stable between renders, so `dashboard --check` needs
no rule for it.

### The by-project view

The summary is a tree, and it is the same tree in three places: the
Expand Down Expand Up @@ -667,7 +684,7 @@ for exactly that reason.

| Workflow | Trigger | Writes |
|---|---|---|
| `cortex_check.yml` | push/PR on `phases/ rulings/ batches/ projects.yaml epics.md dashboard.* scripts/ tests/` | nothing (`cortex.py check` + pytest) |
| `cortex_check.yml` | push/PR on `phases/ rulings/ batches/ projects.yaml checkin.yaml dashboard.* scripts/ tests/` | nothing (`cortex.py check` + pytest) |
| `dashboard_refresh.yml` | push to main + PR on the ledger paths and the two pages, nightly **03:35 UTC**, dispatch | `dashboard.md`, `dashboard.html` on main (3-attempt fetch/reset/render/commit/push); a PR run errors instead of healing |
| `pages_dashboard.yml` | push to `dashboard.html`, dispatch | nothing in git — publishes `dashboard.html` as the Pages index |
| `ledger_merge.yml` | push to `claude/**`, dispatch | merges a ledger-only branch into main |
Expand Down
1 change: 1 addition & 0 deletions checkin.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
refreshed: 2026-09-04T17:18Z
Loading
Loading