Skip to content

feat(hygiene): /ca:standup morning briefing + /ca:watch PR babysitter (v2.1.0-beta.4) - #46

Merged
SUaDtL merged 4 commits into
mainfrom
sprint/session-hygiene
Jun 13, 2026
Merged

feat(hygiene): /ca:standup morning briefing + /ca:watch PR babysitter (v2.1.0-beta.4)#46
SUaDtL merged 4 commits into
mainfrom
sprint/session-hygiene

Conversation

@SUaDtL

@SUaDtL SUaDtL commented Jun 13, 2026

Copy link
Copy Markdown
Collaborator

Summary

Two opt-in repo-hygiene features from the session-hygiene sprint, built test-first under subagent-driven-development. Both are dormant in a repo without arbiter: enabled, and neither changes an existing gate.

/ca:standup — daily hygiene + SessionStart morning briefing (Feature 1)

  • The SessionStart hook emits a read-only hygiene briefing on the first session of each local calendar day (a one-line offer on later sessions): branch divergence, merged-but-unpruned branches, stale worktrees, stashes/dirty state. The remote git fetch is detached and non-blocking — session start never awaits the network.
  • /ca:standup performs the cleanups, each under per-action confirmation: ff-only pull on a clean tree (refuses on divergence/dirty), prune of merged branches (never the current or default branch), stale-worktree removal, and report-only surfacing of stashes/un-pushed work.
  • New hooks/_standuplib.py pure-logic parsers (porcelain / ahead-behind / merged-branch / worktree / stash) with full unittest coverage.

/ca:watch <PR> — PR CI babysitter (Feature 2)

  • Watches a PR's checks via the server-side gh pr checks --watch block — zero model tokens while CI runs, not a polling loop.
  • On red: diagnoses at CODEARBITER_BABYSIT_ONRED depth — propose (default, no tracked-file edit) | branch (an unmergeable spike/fix-*).
  • On green: notifies and offers the merge — never auto-merges; a merge into the default branch still routes through the merge-to-default hard gate.
  • A global flag CODEARBITER_BABYSIT (default off, mirrors CODEARBITER_PRUNE) auto-attaches a watcher when /ca:pr opens a PR; the flag is never set on the user's behalf.
  • New hooks/_babysitlib.py flag reader with unittest coverage.

Test plan

  • _standuplib / _babysitlib / session-start unittest suites — 114 tests green
  • cold-install interpreter matrix — 131 assertions
  • guard-logic matrix — 62 assertions
  • check-plugin-refs.py — reference graph intact
  • all tracked JSON parse; py_compile on the 3 touched hooks
  • version-bump guard satisfied (payload changed → 2.1.0-beta.3 → 2.1.0-beta.4)
  • no plugins/ca/tools/** change → farm typecheck/test/build leg not triggered

Tradeoffs

  • Slice C introduces no committed executable security surface — _babysitlib.py is a pure env reader; the gh calls live in orchestrator-executed command prose, already guarded (auth precondition, no poll loop, no auto-merge, default-branch hard gate). Resolved at conflict-hierarchy level 1 (security) — see .codearbiter/sprint-log.md.

🤖 Generated with Claude Code

SUaDtL and others added 4 commits June 13, 2026 14:19
…sitter

Two opt-in repo-hygiene features for the session-hygiene sprint, built
test-first under subagent-driven-development. Both dormant without
arbiter: enabled; no change to existing gates.

standup-hygiene (Feature 1):
- SessionStart hook emits a read-only hygiene briefing on the first
  session of each local calendar day (one-line offer on later sessions):
  branch divergence, merged-but-unpruned branches, stale worktrees,
  stashes/dirty state. Remote git fetch is detached and non-blocking.
- /ca:standup performs the cleanups, each under per-action confirmation:
  ff-only pull on a clean tree, prune of merged branches (never current
  or default), stale-worktree removal, report-only stash/dirty surfacing.
- New hooks/_standuplib.py pure-logic parsers with full unittest coverage.

pr-babysitter (Feature 2):
- /ca:watch <PR> watches CI via the server-side gh pr checks --watch block
  (no poll loop). On red: diagnose at CODEARBITER_BABYSIT_ONRED depth
  (propose | branch). On green: notify + offer the merge, never auto-merge;
  default-branch merge still routes through the merge-to-default hard gate.
- /ca:pr auto-attaches a watcher only when CODEARBITER_BABYSIT is on
  (default off, mirrors CODEARBITER_PRUNE); the flag is never set for the
  user. New hooks/_babysitlib.py flag reader with unittest coverage.

Version bumped 2.1.0-beta.3 -> 2.1.0-beta.4 (plugin.json, README badge,
CHANGELOG). Catalog/routing updated (counts 32->34). CI-parity sweep green.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Post-landing bookkeeping: plan task 19 marked ACCEPTED (PR #46; merge to
default deferred to the user per the hard gate); sprint-log SH-T19 +
sprint-complete entries recorded. Transient sprint-active lock removed.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The SessionStart narrative described persona + startup-state injection but
not the new first-session-of-day repo-hygiene briefing (and its /ca:standup
cleanups). Add a sentence so the prose matches the shipped hook behavior.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Consolidate the user-facing environment variables (CODEARBITER_BABYSIT[_ONRED]
and the CODEARBITER_PRUNE family) into one Configuration section after
Statusline. They were previously documented only inside individual command
bodies, so the opt-in toggles were effectively undiscoverable. Maintainer-only
CODEARBITER_DEV is intentionally excluded — it stays in the /ca:dev catalog row.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@SUaDtL
SUaDtL merged commit 4d5bf6d into main Jun 13, 2026
7 checks passed
@SUaDtL
SUaDtL deleted the sprint/session-hygiene branch June 13, 2026 18:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant