Skip to content

feat(intake): Themes: keyword list and theme-keyed cross-repo bundling - #312

Merged
Jammy2211 merged 2 commits into
mainfrom
feature/bundle-themes
Aug 28, 2026
Merged

feat(intake): Themes: keyword list and theme-keyed cross-repo bundling#312
Jammy2211 merged 2 commits into
mainfrom
feature/bundle-themes

Conversation

@Jammy2211

Copy link
Copy Markdown
Contributor

Summary

Bundles phase 1 (closes #311). The auto-bundler shipped in #310 grouped on Target: — "three things that live in autoarray". Prompts now carry an optional Themes: keyword list; the first keyword is the primary theme and the grouping key, the rest are packing affinity. Bundles are now topical and cross-repo — the thing Target keying could not produce.

Changes

  • _intake.py: Themes: list parsing (same form as Repos:), vocabulary from PyAutoMind/themes.md, unknown-keyword ⚠️ on the card + Hygiene count. auto_bundles() pools by primary theme (Target fallback for un-themed prompts) and packs greedily by Jaccard affinity of the full theme list under the existing caps (8 pts, ≤4 members, ≤1 large, min 2); each prompt in ≤1 bundle. Titles = theme + shared secondaries (samplers · jax-gradient); theme-keyed cards gain a Repo column. intake classify --themes a,b writes the header at formalisation, never blocking.
  • Byte-identity: an un-themed Mind renders exactly as before — verified against origin/main's renderer on six fixtures (md + html) and pinned by test_an_unthemed_backlog_renders_exactly_as_it_did_before_themes.
  • Intake AGENTS.md documents the header and the packing.
  • 12 new tests.

Result on the live backlog (companion Mind PR)

23 auto bundles: 22 theme-keyed, 1 Target-fallback (the 4 un-themed prompts). Top 8 rendered, every one spanning 2–3 repos: pixelization (autoarray + workspaces), point-source (autogalaxy + autolens + pyautolens), ci-smoke, notebooks, samplers · jax-gradient (autofit + autolens_profiling), visualization, jax-compile, pixelization — bundle 2.

API Changes

None. Prompt headers gain an optional Themes: list; intake classify gains --themes.

Downstream

Companion PyAutoMind PR: themes.md vocabulary (24 keywords), REFERENCE.md, spawn/ledger rules, workflow triggers, Themes: backfilled on 130/136 drafts, regenerated dashboard. Merge this PR first — the Mind PR's dashboard check renders with Brain main.

Design decisions: empty vocabulary disables the unknown-keyword warning (fresh Minds); themes.md is a controlled vocabulary and therefore code in ledger-merge terms (needs a human, like repos.yaml), not ledger. Vocabulary gap noted: no keyword for PyAutoMemory/knowledge-wiki work yet.

Test plan

  • pytest tests/test_intake_dashboard.py -q → 96 passed
  • full PyAutoBrain/tests → 618 passed
  • dashboard --apply then --check clean on the themed Mind

Heart RED at ship for unrelated reasons (release integrate failure, shared_preloads.py timeout, hook-manifest drift, stale PyAutoFit PR); shipped on explicit human acknowledgement.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Px3t8Ggy1PUmL9JdiLGip3

#311)

Bundles phase 1. Auto-bundling keyed on Target: grouped by where code
lives, not what the work is about. Prompts now carry an optional
`Themes:` list (same form as `Repos:`, controlled vocabulary in
PyAutoMind/themes.md): the first keyword is the primary theme and the
grouping key, the rest are affinity for packing.

- parse_list_header / parse_themes / unknown_themes; census records
  carry `themes`, the census carries the vocabulary and unknown flags.
- auto_bundles(): pool by primary theme (Target as fallback for
  un-themed prompts); greedy affinity packing (seed = highest priority,
  then max Jaccard overlap of theme lists; ties priority -> seed's
  target -> path) under the existing caps; every prompt in <= 1 bundle.
  Titles = theme + shared secondaries; theme-keyed cards gain a Repo
  column; unknown keywords warn on the card and in Hygiene.
- intake classify --themes a,b writes `Themes:` after `Repos:`;
  formalisation never blocks on it.
- Un-themed Minds render byte-identically to before (regression test
  pins the card head, table and html row).
- 12 tests.

Closes #311

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Px3t8Ggy1PUmL9JdiLGip3
@Jammy2211
Jammy2211 merged commit 8e0361d into main Aug 28, 2026
2 checks passed
@Jammy2211
Jammy2211 deleted the feature/bundle-themes branch August 28, 2026 15:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: bundles phase 1 — Themes: keyword list and theme-keyed cross-repo bundling

1 participant