v8: drop --spawn-topic, --importance; trim agency-report docstring
Stacked on #215 (v7). Pure simplification — agency-report -120 LOC, telegram_bot -45.
What's gone
--spawn-topic / --no-spawn-topic
Every Yes-tap now dispatches in the card's own topic. One-goal-one-topic is the rule; if the agent needs a fresh lane for a big new project, it spawns one explicitly via tg-schedule "+1 minute" --fresh from inside the dispatched turn. Removed:
- The flags from
agency-reportargparse - The auto-default logic (
if args.spawn_topic is None: args.spawn_topic = not bool(args.thread_id)) - The "auto-spawn on Yes" branch in
_handle_agency_callback(createForumTopic+ fall-through error handling) - The "🧵 Open thread" deep-link URL-button row that used to glue onto cards when work spawned elsewhere
--importance
Was high|med|low but the only thing it did was color the PIL gradient (high→purple/pink, low→slate/grey). Removed:
- The argparse flag
- The gradient-by-importance branch in
_render_image_text_file(always uses default colors now) - The
importance=args.importancekwarg onagency_db.insert(uses schema default'med')
File-level docstring
Trimmed 105 → 25 lines. The verbose field-mapping table moved into per-flag argparse help= strings where the agent actually reads them.
DB compatibility
agency.db schema still has the spawn_topic and importance columns. We don't touch them. Existing rows keep their values; new rows get the schema defaults. No migration needed.
Test plan
- 29 tests pass
- Syntax check
- On a box: post a card with default buttons, tap ✅ Yes → verify dispatch lands in the same topic (no new topic spawns)
- Run
agency-report --help— verify the flag list is the slim one -
sqlite3 /var/lib/bux/agency.db ".schema suggestions"— verify spawn_topic and importance columns still present
🤖 Generated with Claude Code
Summary by cubic
Simplifies the agency flow by removing --spawn-topic/--no-spawn-topic and --importance, enforcing one-goal-one-topic. All taps now run in the card’s topic, and the agency-report docstring is trimmed.
- Refactors
- telegram_bot: removed auto-spawn-on-Yes logic and the "🧵 Open thread" deep-link; button taps always dispatch in the card’s topic.
- agency-report: dropped
--spawn-topic/--no-spawn-topicand--importance; removed importance-based gradient (default colors only); trimmed file-level docstring and improved per-flag help. - DB compatibility: kept
spawn_topicandimportancecolumns for existing rows; inserts no longer write to them; no migration required.