Skip to content

v7: /goal IS autopilot, drop topic emoji, silence allowed, codex goals=true#215

Open
MagMueller wants to merge 1 commit into
v6-steering-and-cardsfrom
v7-simplify-modes
Open

v7: /goal IS autopilot, drop topic emoji, silence allowed, codex goals=true#215
MagMueller wants to merge 1 commit into
v6-steering-and-cardsfrom
v7-simplify-modes

Conversation

@MagMueller
Copy link
Copy Markdown
Contributor

@MagMueller MagMueller commented May 15, 2026

Stacked on #214 (v6). Reshapes the mode model per your "/goal IS autopilot, the whole box is copilot otherwise" clarification.

Mode model (final)

  • Whole box defaults to copilot. Every topic, every DM. Draft + ask before anything visible.
  • /goal <X> is the ONLY autopilot trigger. Spawns a fresh topic, agent works end-to-end without approvals until done/blocked/impossible. No cards, just progress updates + result.
  • /autopilot and /copilot per-topic toggles remain as fallbacks but aren't doctrinally primary.
  • Dropped 🛟/🚀 topic-title emoji prefix entirely. No _decorate_topic_title, no editForumTopic on mode switch, no rename logic. Topics aren't visually labeled by mode anymore — the mode lives in the agent's behavior, not the title.

System prompt — additions you specifically asked for

  • "Silence is allowed." If a heartbeat fires and nothing's actionable, send nothing. Empty turns are fine; filler isn't. (OpenClaw HEARTBEAT.md pattern.)
  • Onboarding a new topic. When the user creates a topic manually (not via /goal), the agent asks ONE question: "What should I help you with here? Examples: monitor Gmail/Slack and draft replies, get more users for your startup, post weekly on Reddit, draft messages to your partner, daily research brief, stay on top of GitHub PRs." Saves to private/goals.md and starts a heartbeat.
  • Daily summary. Once per day (evening heartbeat), generate a shareable image-card of the day's work and ask "Should I post this on X?" Tap Yes/Skip.
  • agency.db as preference history. Explicitly framed for the agent — read it to learn what the user accepts vs ignores.
  • File trimmed to 124 lines (was 161).

Codex /goal config — enabled by default

Research confirmed: it's [features]\ngoals = true in ~/.codex/config.toml (Codex CLI v0.128.0+, experimental).

Both install.sh and bootstrap.sh now write this idempotently. If the user has a custom [features] block, we leave it alone with a warning rather than clobber. Codex's native /goal slash command now works out of the box.

agency-report — drop legacy

  • Removed --draft, --reasoning, --description, --draft-title, --draft-emoji, --reasoning-title, --reasoning-emoji, --draft-html, --reasoning-html. Only --block (JSON) remains.
  • Auto-generates one draft block from --prompt when no --block is passed (so the user always sees what'll fire on Yes-tap).
  • File: ~750 lines → still ~750 (mostly argparse + image rendering), but the API is now half the size.

schedule alias

/usr/local/bin/scheduletg-schedule symlink. Both names work — agent + user can use either.

Test plan

  • 29 tests pass
  • Shell + Python syntax checks
  • On a box: /goal X in a forum → verify a new topic spawns with an autopilot-ack message + heartbeat queued (atq)
  • Create a new topic manually + send any message → verify the goal-elicitation question fires
  • codex after install/bootstrap → verify /goal is available ([features] goals = true is set)
  • which schedule → resolves to tg-schedule

🤖 Generated with Claude Code


Summary by cubic

Simplifies modes: /goal always launches an autopilot topic, and everything else defaults to copilot. Drops topic-title emojis, allows quiet heartbeats, enables Codex goals by default, streamlines agency-report, and adds a schedule alias.

  • New Features

    • /goal <X> opens a new AUTOPILOT topic; /autopilot and /copilot still toggle a topic as needed.
    • Removed 🛟/🚀 title prefixes and all rename logic; mode lives in behavior, not titles.
    • System prompt: silence on empty heartbeats, one-question onboarding for new topics (saved to private/goals.md with a heartbeat), and a daily shareable summary card; agency.db treated as preference history.
    • install.sh and bootstrap.sh now set [features] goals = true in ~/.codex/config.toml so codex /goal works out of the box (idempotent).
    • Added schedule as an alias to tg-schedule.
  • Migration

    • agency-report: removed --draft, --reasoning, --description, and their --*-html variants; use repeatable --block JSON. If only --prompt is provided, a single draft block is auto-generated.
    • Topic mode emojis are gone; remove any scripts or expectations that rely on them.
    • /goal now always starts in autopilot; use /copilot if you need to flip a topic back.

Written for commit 3392ab6. Summary will update on new commits. Review in cubic

…ex goals=true, schedule alias

Per Magnus's v7 spec: simplify the mode model and drop the visual clutter.

**Modes (clarified):**
- The whole box is **copilot by default** — every topic, every DM, every interaction.
- `/goal <X>` is the ONLY way to engage autopilot. Spawns a fresh topic, agent works end-to-end without approvals until done/blocked/impossible.
- /autopilot and /copilot per-topic toggles still exist as fallbacks but aren't doctrinally primary anymore.
- Drop the 🛟/🚀 topic-title emoji prefix entirely (no _decorate_topic_title, no editForumTopic on mode switch). Topics aren't visually labeled by mode anymore.

**System prompt updates:**
- "Silence is allowed" — if a heartbeat fires and nothing's actionable, send nothing. Empty turns are fine. (OpenClaw HEARTBEAT.md pattern.)
- "Onboarding a new topic" section — when user creates a topic manually (not via /goal), agent asks one question: "What should I help you with here?" with example goals (Gmail monitoring, distribution, Reddit posting, partner messages, daily brief, GitHub PRs). Saves to private/goals.md and starts a heartbeat.
- "Daily summary" doctrine — once per day, generate a shareable image-card of the day's work and ask "share on X?". User taps Yes/Skip.
- agency.db is explicitly framed as the user's preference history; agent reads it to learn what they accept vs ignore.
- File trimmed to 124 lines (was 161).

**Codex config:**
- install.sh + bootstrap.sh now write `[features]\ngoals = true` to /home/bux/.codex/config.toml so codex's `/goal` slash command works out of the box. Idempotent — preserves user customization.

**agency-report cleanup:**
- Dropped legacy --draft / --reasoning / --description / --draft-html / --reasoning-html flags. Only --block (JSON) remains.
- Auto-generates a single draft block from --prompt when no --block is given.
- Docstring + arg help cleaned up.

**Aliases:**
- /usr/local/bin/schedule symlinks to tg-schedule. Both names work.

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.

2 issues found across 6 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="agent/telegram_bot.py">

<violation number="1" location="agent/telegram_bot.py:4718">
P2: The hint `/go` references a command that doesn't exist. Since `/goal` is the sole autopilot trigger (per this PR), the hint should say `/goal` so the user re-tries the same command with an argument.</violation>
</file>

<file name="agent/agency-report">

<violation number="1" location="agent/agency-report:711">
P2: Store plain text in `description` instead of rendered `body_html`; current code persists HTML markup that pollutes refine/more context and displays escaped tags.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review, or fix all with cubic.
Re-trigger cubic

Comment thread agent/telegram_bot.py
) -> None:
title = " ".join((title or "").split()).strip()
if not title:
cmd_hint = "/go" if mode == "autopilot" else "/goal"
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot May 15, 2026

Choose a reason for hiding this comment

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

P2: The hint /go references a command that doesn't exist. Since /goal is the sole autopilot trigger (per this PR), the hint should say /goal so the user re-tries the same command with an argument.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At agent/telegram_bot.py, line 4718:

<comment>The hint `/go` references a command that doesn't exist. Since `/goal` is the sole autopilot trigger (per this PR), the hint should say `/goal` so the user re-tries the same command with an argument.</comment>

<file context>
@@ -4725,12 +4711,14 @@ def _start_agency_goal_from_command(
     ) -> None:
         title = " ".join((title or "").split()).strip()
         if not title:
+            cmd_hint = "/go" if mode == "autopilot" else "/goal"
             self.send(
                 chat_id,
</file context>
Suggested change
cmd_hint = "/go" if mode == "autopilot" else "/goal"
cmd_hint = "/goal"
Fix with Cubic

Comment thread agent/agency-report
# DB description was historically the legacy --reasoning text. After v7
# the blocks fully replace it; we store the concatenated block bodies so
# search / dedup still see something searchable.
db_description = "\n\n".join(
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot May 15, 2026

Choose a reason for hiding this comment

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

P2: Store plain text in description instead of rendered body_html; current code persists HTML markup that pollutes refine/more context and displays escaped tags.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At agent/agency-report, line 711:

<comment>Store plain text in `description` instead of rendered `body_html`; current code persists HTML markup that pollutes refine/more context and displays escaped tags.</comment>

<file context>
@@ -745,10 +705,16 @@ def main() -> int:
+    # DB description was historically the legacy --reasoning text. After v7
+    # the blocks fully replace it; we store the concatenated block bodies so
+    # search / dedup still see something searchable.
+    db_description = "\n\n".join(
+        (b.get("body_html") or "").strip() for b in blocks
+    ).strip() or (args.prompt or "")
</file context>
Fix with 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