Skip to content

feat: questions inbox — watcher lands questions, answers resume tasks, /questions skill, dashboard section (M3.5 build B, #645) - #649

Merged
Jammy2211 merged 3 commits into
mainfrom
feature/m35-inbox
Nov 16, 2026
Merged

Jammy2211 merged 3 commits into
mainfrom
feature/m35-inbox

Conversation

@Jammy2211

Copy link
Copy Markdown
Contributor

Summary

Closes #645 with PyAutoLabs/PyAutoMind#576 (merged). M3.5 questions inbox. Design: Science/scratch/m3_4_m3_5_design/DESIGN.md §4. The human's decisions, all as recommended (2026-11-16): H7 a, no per-question @mention and one line at shift end; H9 a, drop shelves the task; H11 a/a, answered tasks keep their standing, and a shift resumes claimed tasks with the answer in the prompt.

  • Landing: a parked or blocked worker's question goes to Mind questions.md through the one Mind writer, as a critical question-add op that is held and retried, never lost silently. Parks and questions no longer @mention. The digest gets an inbox line and "unfiled" lines, and the stream says "Added to your inbox."
  • Release:
  • Clean-up: a merged close-out queues question-retire next to queue-retire, and a merged .done lands no question.
  • /questions skill: a bulk-sitting chat that follows /queue's write route. A paste there never starts dev.
  • Dashboard: a read-only inbox section; the CSP hash is unchanged.
  • pyauto-brain batch questions --backfill.
  • Doctrine: AUTONOMY items 4–5, joined to build A's 2026-11-16 amendment.

Test plan

  • tests/test_questions_inbox.py plus the updated mention tests. The full suite passes 2166 with the Mind branch present (1 environmental failure). Conftest blocks all gh seams, and a review run logged zero real calls.
  • Offline witness: a replayed shift with two parked workers lands two entries with no @mention and one digest line; answer one, and the next plan resumes it with the answer (build_b_witness.txt).
  • Independent review: FINDINGS (a resume could bypass a repo claim, one answer could release the task in every later shift, entries dangling after a merged close-out, plus 4 follow-ups), fixed in 5e64b77. Re-review CLEAN, and the post-rebase review CLEAN.

🤖 Generated with Claude Code

Jammy2211 and others added 3 commits November 16, 2026 14:22
…ume (#645)

M3.5 Build B, Brain half (needs the Mind half: scripts/questions_edit.py).

- A parked worker's question (or a worker blocked past the grace) no longer
  @-mentions the human: the reap queues a `question-add` op (sanitised ask
  and options from the worker's {task}.question.json sidecar), which the one
  Mind writer lands through Mind's own questions_edit.add_text.
  _mention_triggers returns neither; the mention machinery stays.
- Digest: one "Inbox: N questions added to your inbox this shift (Q..), M open
  in all — <dashboard #inbox>" line (H7 a); status comment: "- inbox: N".
- parked_elsewhere(slot, inbox, resumes): questions.md read from Mind
  origin/main (_questions.read_origin, local git after the one fetch).
  Answered releases, dropped shelves (H9 a), open/deferred waits, none or
  unreadable holds. Gate lines name the Q-ids.
- Resume (H11 a/a): resume_records grades a claimed task from active/ on
  origin; on_origin(resumes=) keeps it only for a shift-worker `- session:`
  and ignores its own repo claim; the worker gets RESUME_NOTE with the
  answer; the pick's why is "resumed after Q<n> was answered · <standing>".
- worker_template: sidecar paragraph, pinned session line. policy.yaml
  question_notice: end. AUTONOMY.md amendment items 4–5 (2026-11-16).
- Dashboard: read-only inbox section after the steering box, 📋 copies
  "Use the questions skill. Q<n>" (portable-copy contract); CSP unchanged.
- skills/questions: the /questions sitting, through the /queue write route.
- `batch questions --backfill`: prints questions_edit.py add lines for
  today's holds.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…er, retire on merge (#645)

Independent review of Build B (FINDINGS), fixed:

1. A resumed task's repo check reads every other non-coordinated claim, not
   `claimed_repos`' first-per-repo pick: its own claim first no longer hides
   a later desktop claim on the same repo.
2. A release is used up by the first later shift that picks the task: if
   that worker is still out, crashes or is abandoned, the task is held again
   ("resumed in shift … and not finished"); only an answer given after that
   pick releases it again. A claim resumes only on the template's exact
   `- session: shift worker <slot> (<id>)` line, for a slot of this home
   that picked the task, so a human takeover is never resumed.
3. A merged `.done` lands no question, and every queue-retire (in-turn and
   unattended close-out) is joined by a `question-retire` op that answers
   the task's open entries (`lifecycle.questions_close_text`).
4. `question-add` and `question-retire` are critical: held and retried on a
   missing script; a question is set aside only when its task is gone
   (`GoneError`). An unfiled question is named in the digest.
5. SHIFT_WORKER_SESSION_RE anchored to the template's wording.
6. start_dev's description names both the /queue and /questions chats.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…#647 (#645)

- The stream's `question` and `parked` lines say "Added to your inbox." and
  carry `inbox: true` when the reap filed the question (DESIGN §1.4); a
  merged task's question, or one not filed, keeps A's plain line. The
  `digest` event's tail counts the questions added to the inbox.
- `/add`'s "(was parked)" note reads the inbox: parked_elsewhere(slot,
  read_origin(mind)), so an answered park is not "was parked".
- Tests: a filed vs merged question on the stream; the mention tests stub
  the scratch Mind's writer (its failed commit of the new question ops is
  A's needs-you event, not a mention), and the inbox tests count only
  mention-form comments, not A's event comments.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Jammy2211
Jammy2211 merged commit e69b7e8 into main Nov 16, 2026
2 checks passed
@Jammy2211
Jammy2211 deleted the feature/m35-inbox branch November 16, 2026 15:20
Jammy2211 added a commit that referenced this pull request Nov 16, 2026
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>
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: questions inbox — questions.md, watcher landing, answer releases the hold, /questions skill, dashboard section (M3.5 build B)

1 participant