Skip to content

feat: /cockpit chat skill — watch and steer a live shift (M3.4 build C, #646) - #648

Merged
Jammy2211 merged 3 commits into
mainfrom
feature/m34-cockpit-skill
Nov 16, 2026
Merged

Jammy2211 merged 3 commits into
mainfrom
feature/m34-cockpit-skill

Conversation

@Jammy2211

Copy link
Copy Markdown
Contributor

Summary

Closes #646 with the merged doctrine and hook (PyAutoLabs/PyAutoMind#575) and the engine (#647). This adds skills/cockpit/, which watches and steers a live shift from a Claude chat, inside the human's carve-out (PyAutoMind policy/shift_cockpit_watch.md).

  • Watch: only on an explicit request ("watch the shift"). A question gets a one-shot batch watch --once read. The watch is one Monitor on exactly the canonical batch watch --stream command, with resolved paths and 30-minute segments re-armed only at segment-end inside the window. "Stop watching" runs TaskStop.
  • Report: one plain line per event, and a PushNotification only on NEEDS YOU: lines.
  • Steer:
    • Plain words become exactly one comment on the shift issue from the human's login, with an audit line.
    • /stop and /kill are confirmed first. /stop is worded "stops new work; running workers continue", and each /kill is offered separately.
    • Every /cap is confirmed with its number (merged + running + 1 for "one more merge").
    • Unclear wording means ask, never guess.
  • Questions: the open-question count comes from questions.md, with a hand-off to /questions.
  • Routing: a paste in a /cockpit chat means /add, never start_dev. If /queue also ran, it asks. COMMANDS.md, route.md and start_dev are updated, and discovery is committed.

Test plan

  • tests/test_cockpit_skill.py (24): the skill's Monitor command matches the hook's STREAM_RE and passes the real installed hook mid-window, with a fixture workspace and the real resolver. It is refused at review-at + 46 min and with a stray $VAR.
  • Brain suite: 2165 passed. Line counts OK (the skill is at the 200-line cap).
  • Independent review: FINDINGS (a question could arm the watch, /cap number guessing, the /stop wording), fixed in a0891b7. Re-review in progress.

🤖 Generated with Claude Code

Jammy2211 and others added 3 commits November 16, 2026 14:28
The second half of M3.4 build C. skills/cockpit (SKILL.md + cockpit.md):
- Attach: one Monitor running exactly the canonical stream command the
  end-at-deliverable hook allows (`<BRAIN>/bin/pyauto-brain batch watch
  --stream --record <MIND>/batches/<slot>.md --from <seq> --for 28`, literal
  resolved checkouts, timeout 30 min), after a foreground `--check`;
  re-armed only on `segment-end`, never after any other exit.
- Report: one plain line per event; PushNotification only for
  `NEEDS YOU:` lines.
- Steering: plain words become exactly one comment on the shift issue from
  the human's login (/pause /resume /drop /stop /kill /cap /add, with an
  audit line); /stop and /kill confirmed first; /add after a premise check.
- Questions: counted from Mind origin/main questions.md and handed to
  /questions, with a one-line fallback while that skill is not installed.
- Routing: in a /cockpit chat a pasted prompt is an /add to the shift, never
  start dev (COMMANDS.md, route.md, start_dev's description and body).
- Committed discovery for Claude and Codex.

tests/test_cockpit_skill.py: the command matches the hook's own STREAM_RE
and passes this repo's installed hook mid-window (fixture workspace with the
real resolver), is refused at review-at + 46 min and with a `$VAR` left in;
the steering table covers exactly the watcher's COMMANDS; routing and
discovery.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…s, honest /stop

Review of f724d53 (#646):
- A question about the shift ("what's the shift doing?") gets a one-shot
  `batch watch --once` read, never a Monitor; the watch is armed only on an
  explicit request (policy condition 1). Dropped from the triggers.
- /cap: merge-cap counts the whole shift, so "one more merge" is
  merged + running + 1 read from the snapshot first; every /cap is confirmed
  with its number; "fewer workers" asks for one. Unclear wording means ask,
  never a guessed verb, task or number.
- "kill everything" -> /stop is confirmed as "stops new work; running
  workers continue", then each running worker's /kill is offered as its own
  confirmed comment.
- "Stop watching" stops the Monitor with TaskStop and leaves the shift be.
- route and start_dev: when both /queue and /cockpit ran in a chat, a
  paste is asked about.
The procedure is trimmed to stay within the 200-line budget.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Resolves COMMANDS.md and start_dev/SKILL.md so the /queue, /questions and
/cockpit routing notes coexist: each chat claims its own pastes, and when
two or more of them ran in one chat a paste is asked about, never guessed.
- COMMANDS.md keeps both new entries; the /cockpit entry states the rule.
- start_dev: one description naming all three chats (394 characters), and
  one compact body paragraph, within the 200-line budget.
- route.md, cockpit.md, queue.md and questions.md each carry the same
  ask-which rule. Discovery is unchanged (already current).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Jammy2211
Jammy2211 merged commit f88d01a into main Nov 16, 2026
2 checks passed
@Jammy2211
Jammy2211 deleted the feature/m34-cockpit-skill branch November 16, 2026 15:37
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.

feat: cockpit doctrine carve-out + Monitor/GitHub-poll hook + /cockpit skill (M3.4 build C)

1 participant