PRD: Separate agent and bottle selection #270

Merged
didericis merged 8 commits from separate-agent-bottle-selection into main 2026-06-25 16:40:54 -04:00
Collaborator

Closes #269.

PRD

Summary

  • Makes bottle: in agent frontmatter optional
  • Adds a multi-select bottle picker after the agent selector in ./cli.py start
  • Selected bottles are merged in order (later overrides earlier) via the extends machinery
  • Persists bottle_names in launch metadata so ./cli.py resume replays the same configuration
Closes #269. [PRD](https://gitea.dideric.is/didericis/bot-bottle/src/commit/1bec3559ab8fbb56ace1454a97a6c68450bbc307/docs/prds/prd-new-separate-agent-bottle-selection.md) ## Summary - Makes `bottle:` in agent frontmatter optional - Adds a multi-select bottle picker after the agent selector in `./cli.py start` - Selected bottles are merged in order (later overrides earlier) via the extends machinery - Persists `bottle_names` in launch metadata so `./cli.py resume` replays the same configuration
Owner

Couple changes to make:

  1. Select in the multiselect should use space, and then enter should continue
  2. Bottles which extend from other bottles should have their hierarchy listed
    • EX: if claude-dev extends from bot-bottle-dev, which extend from dev, should show as claude-dev <- bot-bottle-dev <- dev
  3. The preflight step should display the yaml version of the final manifest that will be used to launch things (do this instead of the existing info)
Couple changes to make: 1. Select in the multiselect should use space, and then enter should continue 2. Bottles which extend from other bottles should have their hierarchy listed - EX: if `claude-dev` extends from `bot-bottle-dev`, which extend from `dev`, should show as `claude-dev <- bot-bottle-dev <- dev` 3. The preflight step should display the yaml version of the final manifest that will be used to launch things (do this instead of the existing info)
didericis force-pushed separate-agent-bottle-selection from 508a16b68e to 61e101178d 2026-06-25 03:46:37 -04:00 Compare
Author
Collaborator

Done in a455ed6.

  • Space/Enter split: Space now toggles selection, Enter confirms and continues. Ctrl-D still works as a confirm-even-if-empty escape hatch.
  • Bottle lineage: The picker reads each bottle’s extends: chain at launch time and shows labels like claude-dev <- bot-bottle-dev <- dev. Bottles with no parent show as bare names.
  • YAML preflight: The preflight step now prints the resolved manifest as YAML instead of the key-value summary.
Done in a455ed6. - **Space/Enter split**: Space now toggles selection, Enter confirms and continues. Ctrl-D still works as a confirm-even-if-empty escape hatch. - **Bottle lineage**: The picker reads each bottle’s `extends:` chain at launch time and shows labels like `claude-dev <- bot-bottle-dev <- dev`. Bottles with no parent show as bare names. - **YAML preflight**: The preflight step now prints the resolved manifest as YAML instead of the key-value summary.
didericis force-pushed separate-agent-bottle-selection from a455ed6e00 to dfc035959e 2026-06-25 04:54:21 -04:00 Compare
didericis force-pushed separate-agent-bottle-selection from dfc035959e to 0b7345f79b 2026-06-25 07:56:14 -04:00 Compare
didericis force-pushed separate-agent-bottle-selection from 54ea1d6057 to afa8cd5dd9 2026-06-25 16:07:23 -04:00 Compare
didericis added 8 commits 2026-06-25 16:13:24 -04:00
Closes #269.
- `bottle:` in agent frontmatter is now optional; agents without it
  are portable and require bottles to be selected at launch.
- Adds `filter_multiselect` to `tui.py`: multi-select picker with
  ordered selection list, Space/Enter to toggle, Ctrl-D to confirm.
- `ManifestIndex` gains `all_bottle_names` and `load_for_agent` accepts
  `bottle_names: tuple[str, ...]` to merge bottles in order at runtime.
- `merge_bottles_runtime` in `manifest_extends.py` applies the same
  field-merge rules as `extends:` to pre-resolved bottle objects.
- `BottleSpec` gains `bottle_names`; `_validate` and `write_launch_metadata`
  thread it through so `resume` replays the same bottle configuration.
- `cmd_start` shows the bottle multiselect after agent selection,
  pre-populated from the agent's `bottle:` field when present.
- Existing agents with `bottle:` declared continue to work unchanged.
Tab switches focus to the selected-order panel; K/J shift the
highlighted item up/down; Space/Enter removes it. The filter list dims
while the order panel is active. Help line updates per focus mode.
- manifest.py: remove unused load_bottle_chain_from_dir import
- manifest_extends.py: drop redundant ManifestEgressRoute annotation
- test_cli_start_selector.py: remove unused call import
- test_cli_tui.py: move Optional/constants to top, annotate FakeScreen,
  remove unused curses import
- test_manifest_bottle_merge.py: add type args to dict, annotate **kwargs
Three UX improvements requested in #270 review:

- filter_multiselect: Space toggles selection, Enter confirms (was both)
- bottle picker: bottles with extends chains show ancestry labels
  (e.g. 'claude-dev <- bot-bottle-dev <- dev') for at-a-glance lineage
- preflight: replaces key-value summary with YAML of the resolved manifest
fix(start): show bottle lineage root-first with -> arrows
lint / lint (push) Successful in 1m51s
test / unit (push) Successful in 43s
test / integration (push) Successful in 17s
test / unit (pull_request) Successful in 43s
test / integration (pull_request) Successful in 18s
prd-number / assign-numbers (push) Successful in 21s
Update Quality Badges / update-badges (push) Failing after 1m47s
ca910f8f4f
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
didericis force-pushed separate-agent-bottle-selection from afa8cd5dd9 to ca910f8f4f 2026-06-25 16:13:24 -04:00 Compare
didericis merged commit ca910f8f4f into main 2026-06-25 16:40:54 -04:00
didericis deleted branch separate-agent-bottle-selection 2026-06-25 16:40:55 -04:00
Sign in to join this conversation.