Skip to content

Commit 183eb6f

Browse files
Jammy2211claude
andauthored
Board round 2: readiness deepening, dev-box publish leg, autonomy strip, trend (#256)
Readiness & release: the section now renders the Heart's structured blockers verbatim from its newly-published board.json (each chip is the blocker's OWN /bug prompt — composed, never re-derived), the Hands badge headline joins it, and a ⏸ blocked-gate row prints its ::warning annotation inline so the morning glance needs no click. Dev box: `pyauto-brain board publish` (board/_publish.py, the Heart's heart/publish.py pattern) distills the hygiene conductor's own --json pre-scan plus worktree state (off-default branches, unpushed, dirty, stashes — names only, home paths collapsed to ~) into state/devbox_board.json: main-only guard, rebase-retry push, and brain_board.yml republishes on that push. morning.sh runs it as its last step (--no-publish to skip), so the board reads 'observed this morning' every day; observations go stale at 48h and drop at 7d. Also: the autonomy log's tail renders as a section, and the header carries a self-carrying 'N need you' trend sparkline (yesterday's published board.json hands its history forward — no commits, no state). 421 tests pass (6 new: blockers verbatim + own-prompt chips, gate annotation inline, devbox fresh/expired render, publish dry-run scrub, publish push/idempotence/main-guard); firewall gate green. Co-authored-by: Claude <noreply@anthropic.com>
1 parent fce59d5 commit 183eb6f

7 files changed

Lines changed: 688 additions & 21 deletions

File tree

.github/workflows/brain_board.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,13 @@ on:
2828
schedule:
2929
- cron: "30 5 * * *"
3030
workflow_dispatch:
31+
# A dev-box publish (`pyauto-brain board publish`, usually morning.sh's
32+
# last step) pushes state/devbox_board.json to main — republish so the
33+
# board shows this morning's local observations a minute later.
34+
push:
35+
branches: [main]
36+
paths:
37+
- "state/devbox_board.json"
3138

3239
permissions:
3340
contents: read

bin/morning.sh

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,11 @@
99
# touch YOUR checkout — sync and clean-slate. This script is exactly those two
1010
# steps, so the morning is: run this in a terminal, then open the board.
1111
#
12-
# bash PyAutoBrain/bin/morning.sh # sync + clean, then board URL
12+
# bash PyAutoBrain/bin/morning.sh # sync + clean + publish,
13+
# # then board URL
1314
# bash PyAutoBrain/bin/morning.sh --digest # also print the board's
1415
# # markdown digest (needs gh)
16+
# bash PyAutoBrain/bin/morning.sh --no-publish # skip the dev-box publish
1517
# DRY_RUN=1 bash PyAutoBrain/bin/morning.sh # preview clean-slate only
1618
#
1719
# Both steps are the recoverable, git-aware ones /wake_up auto-ran (its
@@ -30,6 +32,16 @@ echo
3032
echo "== morning: clean slate (untracked regenerable artifacts + cruft) =="
3133
bash "$HERE/clean_slate.sh"
3234

35+
if [ "${1:-}" != "--no-publish" ]; then
36+
echo
37+
echo "== morning: publish the dev-box observation (hygiene + worktrees) =="
38+
# Best-effort: the board just shows an older stamp if this leg fails.
39+
# The push itself triggers brain_board.yml, so the board refreshes with
40+
# this morning's local observations a minute later.
41+
bash "$HERE/../board/board.sh" publish \
42+
|| echo "morning: dev-box publish skipped (see above) — the board keeps its last stamp"
43+
fi
44+
3345
echo
3446
echo "== morning: done — the rest of the routine is on the board =="
3547
# Board URL from the checkout's own remote (no hardcoded org).

board/AGENTS.md

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,20 @@ copy-for-Claude payload:
1616
| Section | Signal owner | One-tap payload |
1717
|---------|--------------|-----------------|
1818
| ⌨ Morning sync | `bin/morning.sh` (local) | the terminal command itself |
19-
| 🌙 Overnight | scheduled workflows (`config/policy.yaml board: overnight_jobs`) | `/bug … — <run url>` on failures |
20-
| ❤️ Readiness | the Heart board's `badge.json` (cross-board contract) | `/health` |
19+
| 🌙 Overnight | scheduled workflows (`config/policy.yaml board: overnight_jobs`); a ⏸ blocked gate's ::warning annotation is rendered inline | `/bug … — <run url>` on failures |
20+
| ❤️ Readiness & release | the Heart board's `badge.json` + `board.json` (structured blockers, each carrying its OWN `/bug` prompt — rendered verbatim, never re-derived) and the Hands badge | `/health`, the blockers' own prompts |
2121
| 🏷️ Version consistency | the coupled-set stamps (`board: version_stamps`) | `/bug version drift: …` |
22-
| 💬 Community | the Ears (`community scan`, reused wholesale) | `/community`, `/community triage <ref>` |
22+
| 💬 Community | the Ears (`community scan`, reused wholesale) — every open conversation gets a row | `/community`, `/community triage <ref>` |
2323
| 🔄 Resume | the Mind's registry + generated counts; pending-release PRs | `/start_dev …`, `/prm <url>` |
2424
| 🧹 Upkeep | open-issue count; the cleanup doors | `/issue_cleanup`, `/hygiene`, `/repo_cleanup` |
25+
| 🖥️ Dev box | `state/devbox_board.json` — hygiene pre-scan rows + worktree state, pushed by `board publish` (morning.sh's last step); age-stamped, stale at 48h, dropped after 7d | each hygiene row's own delegate door |
26+
| 🤖 Autonomous runs | the tail of the Mind's `autonomy_log.md`, verbatim ||
2527
| 🚪 All doors | `bin/pyauto-brain`'s own registry (never a second copy) | `/<verb>` |
2628

29+
The header also carries a **trend sparkline** — the "N need you" count per
30+
day, handed forward through the published `board.json` itself (no commits, no
31+
extra state: each render reads yesterday's page, appends today, caps at 30).
32+
2733
**Compose, don't recompute** — the board re-derives nothing. The community
2834
section imports the community conductor's `build_scan()`; the resume counts
2935
are parsed from the Mind's own generated `dashboard.md`; readiness comes from
@@ -41,6 +47,10 @@ bin/pyauto-brain board # markdown digest in the terminal
4147
bin/pyauto-brain board --html # the one-tap page
4248
bin/pyauto-brain board --badge # the cross-board headline contract
4349
bin/pyauto-brain board --apply # write _site/ (what brain_board.yml serves)
50+
bin/pyauto-brain board publish # dev-box leg: distill hygiene + worktree
51+
# state into state/devbox_board.json and
52+
# push (morning.sh runs this for you;
53+
# --dry-run prints, --no-hygiene is fast)
4454
```
4555

4656
Publishing is `.github/workflows/brain_board.yml`: a morning cron plus manual

0 commit comments

Comments
 (0)