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

MA
7mo ago
+165-219

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/schedule → tg-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.