Skip to content

v11: /goal is a verbatim CLI passthrough; bot is a dumb pipe#219

Open
MagMueller wants to merge 1 commit into
v10-self-schedule-only-when-neededfrom
v11-goal-passthrough
Open

v11: /goal is a verbatim CLI passthrough; bot is a dumb pipe#219
MagMueller wants to merge 1 commit into
v10-self-schedule-only-when-neededfrom
v11-goal-passthrough

Conversation

@MagMueller
Copy link
Copy Markdown
Contributor

@MagMueller MagMueller commented May 15, 2026

Stacked on #218 (v10). Final simplification per Magnus's 'the bot is a dumb pipe, the agent does everything' framing.

What's gone

  • /goal handler in the bot — no more special-casing. The literal '/goal X' text now flows through as a normal turn input. Codex (with [features] goals = true) interprets it as its native plan→act→test slash command. Claude treats it as a goal-shaped prompt and the in-prompt autopilot doctrine drives behavior.
  • /autopilot and /copilot commands — no per-topic mode toggle. Box is copilot by default; /goal triggers autopilot via the CLI.
  • _start_agency_goal_from_command (~100 LOC) — was spawning topics, building custom prompts, queueing heartbeats.
  • _agency_goal_prompt (~60 LOC) — custom mode-aware prompt.
  • _record_miniapp_goal / _get_goal_mode / _set_goal_mode (~150 LOC) — per-topic mode persistence.
  • _append_private_goal (~30 LOC) — the AGENT writes to goals.md when it notices new goals; bot doesn't.

−397 LOC from telegram_bot.py. 7789 → 7392.

System prompt: 128 → 80 lines

Tightened around 'agent does everything':

  • /goal section explains codex's native slash-command path vs claude's prompt-engineered autopilot.
  • 'You manage goals and memory yourself' — write to private/goals.md when you notice user goals.
  • Helper-script inventory (tg-send, tg-buttons, tg-schedule, new-topic, agency-report).
  • Card composition: the 2-option pattern + a pointer to agency-report --help.

Tests

21 pass (was 33; deleted the 12 tests for mode/prompt/decoration that no longer exist).

🤖 Generated with Claude Code


Summary by cubic

Makes /goal a verbatim CLI passthrough and removes all goal/mode logic from the bot. The agent now owns goal handling end-to-end, simplifying the bot and cutting 397 LOC.

  • Refactors

    • Removed /goal, /autopilot, and /copilot handlers; /goal <X> now flows as a normal turn.
    • Deleted goal-specific helpers and mode/state persistence; the bot no longer writes to private/goals.md.
    • Updated command help to reflect passthrough behavior.
    • Tightened system-prompt.md around “bot is a dumb pipe; agent does everything,” including /goal behavior for codex and claude.
    • Dropped 12 mode/prompt tests tied to the removed code.
  • Migration

    • Enable goals in codex ([features] goals = true) so native /goal works.
    • Stop using /autopilot and /copilot; use /goal or regular prompts.
    • The agent must persist goals to /opt/bux/repo/private/goals.md itself.

Written for commit 94ceb45. Summary will update on new commits. Review in cubic

Per Magnus: /goal shouldn't spawn topics, shouldn't have a custom prompt, shouldn't track modes, shouldn't append to goals.md. The bot is a dumb pipe. The agent does everything.

Removed from telegram_bot.py:
- /goal handler (it's no longer a special command — falls through as a normal turn input, codex/claude handles it)
- /autopilot and /copilot commands (no per-topic mode toggling — the box is copilot by default, /goal triggers autopilot via the CLI)
- _start_agency_goal_from_command (~100 LOC) — was spawning topics, building custom prompts, queueing heartbeats
- _agency_goal_prompt (~60 LOC) — custom mode-aware goal prompt; replaced by the system prompt's "/goal autopilot" doctrine
- _record_miniapp_goal (~50 LOC) — mode column writes
- _get_goal_mode / _set_goal_mode (~50 LOC) — per-topic mode persistence
- GOAL_MODES / DEFAULT_GOAL_MODE constants
- _append_private_goal (~30 LOC) — the AGENT writes to goals.md when it notices new goals; bot doesn't

Total deletion: -397 LOC from telegram_bot.py (7789 → 7392).

System prompt rewritten to ~80 lines (was 128). Tightened around "agent does everything, bot is a dumb pipe":
- /goal section: codex's native /goal runs the plan→act→test loop (gated by [features] goals=true which install.sh writes); claude treats /goal as a goal-shaped prompt with the in-prompt autopilot doctrine.
- "You manage goals and memory yourself" — write to private/goals.md when you notice user goals.
- Tighter helper-script inventory (tg-send, tg-buttons, tg-schedule, new-topic, agency-report, atq/atrm).
- Card composition reduced to the 2-option pattern + a pointer to agency-report --help.

Tests: 21 pass (was 33; deleted the 12 tests for the now-removed mode/prompt/decoration functions).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 3 files

Re-trigger cubic

MagMueller added a commit that referenced this pull request May 15, 2026
…omposio for codex

Lands 16 stacked PRs reviewed by multiple sub-agents:

- v1 (#209)  /goal as primitive, per-topic autopilot vs copilot
- v2 (#210)  drop agency-mode gate, fold doctrine into CLAUDE.md, delete old Mini App UI
- v3 (#211)  CLAUDE.md → system-prompt.md (source of truth), agent identity = "agency"
- v4 (#212)  trim system prompt to 87 lines, mode emoji in topic title, extract bot/markdown.py
- v5 (#213)  heartbeat-by-default plumbing (later removed), copilot voice fix, autopilot security note
- v6 (#214)  steering semantics, new-topic spawning, 2-option cards, source-aware images
- v7 (#215)  /goal IS autopilot framing, drop topic emoji prefix, silence allowed, codex goals=true, `schedule` alias
- v8 (#216)  drop --spawn-topic, --importance, trim agency-report docstring
- v9 (#217)  new-topic helper — spawn fresh lane synchronously, queue heartbeat
- v10 (#218) self-schedule only when waiting on something concrete; drop auto-heartbeats
- v11 (#219) /goal is a verbatim CLI passthrough; bot is a dumb pipe
- v12 (#220) drop 30-min timeout, kill lingering heartbeat, prompt-injection defenses, seed goals.md
- v13 (#221) /goal stays copilot by default; autopilot only on explicit user opt-in
- v14 (#222) doctrine fixes from final multi-agent review
- v15 (#223) tighten autopilot triggers — drop the loose phrases
- v16 (#224) register composio MCP for codex too; simplify autopilot trigger paragraph

Tests: 22 pass.

Follow-ups (tracked, not in this merge):
- P0: install bootstrap.sh as /usr/local/sbin root:root (closes the trivial bux→root)
- P1: stuck-lane watchdog (no-stdout-for-30-min SIGTERM)
- P1: /invite is a dead command (remove from BotFather menu)
- P1: composio tool names wrong-case in system prompt
- P1: help text + COMMANDS still reference dropped autopilot trigger phrases
- P1: BUX_BOX_TOKEN provenance for OSS self-host installs
- P2: button-tap dispatches bypass _enqueue (lane race on rapid taps)
- P2: persisted per-topic autopilot flag in state (instead of LLM phrase detection)
- P2: agency_db ghost columns (importance, spawn_topic)
- P2: mini app teardown decision (1700 LOC for an unreferenced surface)

Co-Authored-By: Claude Opus 4.7 (1M context) <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.

1 participant