Skip to content

Mind-workflow gaps: memory floor, batch slice, docs conductor, close-out guard - #591

Merged
Jammy2211 merged 6 commits into
mainfrom
claude/pyautomind-queue-management-vdiv9c
Nov 5, 2026
Merged

Jammy2211 merged 6 commits into
mainfrom
claude/pyautomind-queue-management-vdiv9c

Conversation

@Jammy2211

Copy link
Copy Markdown
Contributor

Five grouped PyAutoMind tasks, one commit each (cherry-pickable apart). Merge before the companion PyAutoMind PR.

Commit Task (Mind prompt) Change
2df373d intake_injects_memory_citations_that_match_on Intake cites a Memory page only when the prompt shares distinctive terms (idf-weighted, ≤5% of pages) above a floor; nav pages (reading-queue.md, index, log…) never cited. Calibrated on all 276 drafts vs the live digest. Trade-off accepted by the human: two arguably-right citations are lost.
017e9b9 batch_slice pyauto-brain batch slice <prompt> validates declared ## Slices/## Phases (or --slices FILE) against the seam rules via sizing judge_slices; refuses witness-less children and counts outside 2–4; --apply writes children + epics.md entry, parent untouched. /intake offers it on needs-slicing. "Not built yet" removed.
0a27dbc docs_conductor New agents/conductors/docs/: pyauto-brain docs <request> → DocsDecision (surface, repo, WRITING_STYLE template, siblings in step; tutorials deferred to Workspace); docs audit <file> read-only style score. /docs routes through it; registry/board list it.
47a3d0b brain_board_follow_ups item 2 Overtaken — the board: lists were deleted from policy.yaml (41ec5c5, e6a48ff); stale keep-in-step comments corrected.
147609a close_out_guard_catch_shipped_work_whose intake looks-shipped / reconcile --strong: flags drafts with strong evidence of shipping (witness now exists + changed since Filed; a ship-claiming commit names the draft; a completion record duplicates it). Flags only; writes looks_shipped.json, dashboard section, state.json items; batch plan rejects flagged drafts until closed or dismissed. Today: 0/271 flagged; pre-sweep Mind: 5/295, all genuinely shipped. Merge-time hook deferred.

Tests

python3 -m pytest -q -n auto tests: 1625 passed, 1 skipped.

Follow-ups

  • After merge: bin/install.sh --write-agents-surface across organs (new docs verb).
  • Close-out guard workflow (in the Mind PR) has never run; private/Jammy2211/* clones may fail under the org token.

Generated by Claude Code

…ages

memory_citations() attached the top raw-count digest pages to every
prompt, so long pages dense in generic vocabulary ("model", "profile",
"fit") were cited on tooling prompts with no science question
(massive-ellipticals.md on a jax-compile tooling prompt).

A page is now cited only when the query terms it shares that are
distinctive in PyAutoMemory (on <= 5% of its pages) weigh at least
min(9.0, 0.15 per distinct query term), each term scoring
log(N/df)/log(N). Calibrated on the 276 Mind drafts against the live
digest: long EP prompts score 11.5-15 on expectation-propagation.md,
the jax-compile / numba-preset tooling prompts top out at 8.4 / 5.4;
67 of 276 drafts now carry a line. Navigation pages (index, log,
AGENTS, README, reading-queue) are never cited. No hits still writes
no line.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016nhQ8MpP3MhbHCt6dL6o6r
… prompts

`pyauto-brain batch slice <prompt>` proposes two to four children of an
`Unattended: needs-slicing` prompt, offline and stdlib-only, beside plan and
collect. The cut is declared, never invented: slices come from the parent's
own `## Slices`/`## Phases` section (numbered items with `*Witness:*`,
optional `*Repos:*`/`*Consequence:*`/`*Difficulty:*`/`*Lane:*`/`*Depends:*`)
or from an agent-authored plan passed with `--slices FILE`.

The sizing faculty judges each rendered child against the seam rules
(`judge_slices`): one unattended run (grades ready), its own witness (none is
"a smaller judge task, not a slice"), names a repo and depends on no later
slice; mixed library/workspace slices and workspace-before-library ordering
are warnings. Fewer than 2 or more than 4 slices is refused.

Without --apply it only prints; --apply writes a clean proposal's children
beside the parent (never overwriting) plus an epics.md entry with the parent
as ledger unless it already is one. The parent is never edited. /intake now
offers the verb when a prompt sizes needs-slicing. batch AGENTS.md's
"Not built yet" section is replaced by the verb's documentation.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016nhQ8MpP3MhbHCt6dL6o6r
Promote /docs from a work-type entry to a conductor under
agents/conductors/docs/ that owns skills/WRITING_STYLE.md:

- `pyauto-brain docs <prompt>` classifies the request by surface (README,
  setup page, Read the Docs, tutorial narrative, agent-facing file) and
  emits a DocsDecision: target repo, whether WRITING_STYLE.md applies, the
  page template parsed from the guide, where long material moves, siblings
  to keep in step (e.g. the four assistant READMEs). Text and --json.
- Tutorial science prose is deferred to the Workspace conductor's
  workspace/howto registers (the decision names the command and register).
- `pyauto-brain docs audit <page>` read-only scores a page against the
  guide's checklist, labelling each check mechanical or heuristic, and
  lists concrete fixes with line numbers.
- Registered in bin/pyauto-brain (so the board and help list it), command
  surface block regenerated with install.sh, /docs skill and COMMANDS.md
  route through it. Tests mirror the workspace conductor's.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016nhQ8MpP3MhbHCt6dL6o6r
The board: overnight_jobs and board: version_stamps lists these comments
pointed at were retired with the Brain board simplification (41ec5c5,
e6a48ff); each script's list is now the only copy, so there is nothing
left to single-source.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016nhQ8MpP3MhbHCt6dL6o6r
…idence they shipped

Adds agents/conductors/intake/_shipped.py and the `intake looks-shipped`
mode (plus `intake reconcile --strong`, which lists these flags graded
above every vocabulary band). Three legs, each cited with its evidence line,
a one-line close command and a one-line dismissal:

- witness-exists: the draft's Witness names a test/function now defined in a
  target checkout, added or edited after Filed (pickaxe, then git log -L);
- commit-names-draft / pr-names-draft: a commit on an organism main since
  Filed (or a merged PR in an optional JSON cache) names the draft's path,
  filename or distinctive slug on a line claiming it shipped;
- record-duplicates-draft: a complete/ record's `## Original prompt` matches
  an open draft by title or body (difflib).

It only flags: --apply writes PyAutoMind/looks_shipped.json and nothing under
draft/. Dismissals live in PyAutoMind/looks_shipped_dismissed.md. The
dashboard renders a "Looks shipped — confirm" section (and state.json items)
and leaves flagged drafts out of the pick lists; `batch plan` rejects them
until a human closes or dismisses them. Absent checkouts and caches degrade
to no evidence.

Measured: 0 flags on today's Mind (271 drafts); 5 on the pre-sweep Mind
(295 drafts), all genuinely shipped. Merge-time hook left as a follow-up.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016nhQ8MpP3MhbHCt6dL6o6r
The docs conductor now derives repo categories, step groups and family words
from PyAutoMind/repos.yaml instead of a built-in table; the AI-options page is
referenced via WRITING_STYLE.md rule 5. Tests use a fixture body map with
invented repo names; _shipped.py's docstring example is generic.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016nhQ8MpP3MhbHCt6dL6o6r
@Jammy2211
Jammy2211 merged commit c6192aa into main Nov 5, 2026
2 checks passed
@Jammy2211
Jammy2211 deleted the claude/pyautomind-queue-management-vdiv9c branch November 5, 2026 23:26
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.

2 participants