Skip to content

feat: slow-mode, welcome-mat, poll, standup, link-archive hooks#2

Draft
wca4a wants to merge 1 commit intomasterfrom
feat/new-hooks
Draft

feat: slow-mode, welcome-mat, poll, standup, link-archive hooks#2
wca4a wants to merge 1 commit intomasterfrom
feat/new-hooks

Conversation

@wca4a
Copy link

@wca4a wca4a commented Mar 6, 2026

Five new channel hooks

1. slow-mode — Per-author post cooldown

Enforces a minimum time between top-level posts per author. Too-fast posts are denied with a message.

Config:

  • cooldown: @dr (default ~m5)

State: (map ship @da) — last post time per author

Host is always exempt. Thread replies pass through unaffected.


2. welcome-mat — First-post welcome

Auto-posts a welcome message when a new author sends their first message in the channel.

Config:

  • welcome-msg: cord with {author} placeholder (default "Welcome aboard, {author}!")

State: (set ship) — tracks who has been welcomed

Note: Hooks cannot currently observe group join events directly, so this triggers on first post rather than on join. A future %on-join event type would enable true join-time welcomes.


3. poll — Reaction-based polling with timed results

Posts matching a configurable prefix trigger a timed poll. Uses %wait to schedule a results tally.

Config:

  • prefix: cord (default "📊 POLL")
  • duration: @dr (default ~h1)

State: Stateless (uses %wait for deferred execution)

On wake, posts a results summary as a reply to the original poll post. Currently posts a closing message — full reaction tallying depends on future hook capabilities to read reaction state from the post.


4. standup — Scheduled daily prompt

Posts a configurable prompt via cron, then closes the collection window after a set duration.

Config:

  • prompt: cord (default "What are you working on today?")
  • collect-window: @dr (default ~h2)

State: Stateless (cron + wake)

Setup:

-groups!hook-schedule id nest [%start ~d1 config]

Set the start time to your desired standup hour. Fires daily.


5. link-archive — Auto-archive URLs to heap

Scans new posts for %link inlines and cross-posts each URL to a configured heap/gallery channel. Deduplicates by URL.

Config:

  • archive-nest: cord, name of the heap channel on the host ship (required)

State: (set cord) — archived URLs for dedup

Captions include the original author ship. Recursively extracts links from bold, italic, strike, and blockquote inlines.

TODO: parse-nest currently uses the config cord as a heap channel name on our. Proper kind/~ship/name parsing needed for cross-ship archiving.


Usage pattern (all hooks)

::  1. Add the hook
-groups!hook-add 'slow-mode' '<paste hook source>'

::  2. Configure it
-groups!hook-configure id nest (my ['cooldown' !>(~m5)] ~)

::  3. Bind to channel
-groups!hook-order nest [id ~]

::  4. (For standup/poll) Schedule cron
-groups!hook-schedule id nest [%start ~d1 config]

Testing

All hooks can be dry-run tested with:

-groups!hooks-run <event> [%origin nest ~ ~] '<src>'

Five new channel hooks:

1. slow-mode — Per-author cooldown between posts. Denies posts that
   come too fast. Config: 'cooldown' (default ~m5). Host exempt.
   Thread replies pass through.

2. welcome-mat — Welcomes new authors on their first post in a channel.
   Posts a configurable greeting with {author} interpolation.
   Tracks welcomed ships in state to avoid duplicates.

3. poll — Reaction-based polling. Posts matching a prefix trigger a
   timed poll. Uses %wait to schedule a results tally after the
   configured duration. Config: 'prefix', 'duration' (default ~h1).

4. standup — Scheduled daily prompt via cron. Posts a configurable
   prompt, then closes the window after a collection period.
   Setup: schedule with hook-schedule at desired time + ~d1 interval.

5. link-archive — Watches for %link inlines in posts and cross-posts
   them to a configured heap/gallery channel. Deduplicates URLs
   in state. Captions include the original author.
@wca4a
Copy link
Author

wca4a commented Mar 6, 2026

UI Mockups

Interactive mockups for how these hooks could surface in the Tlon Messenger UI:

View Mockups (works on mobile)

7 screens covering:

  • Hook Store (discovery & install)
  • Channel Settings hooks panel (config, toggle, reorder)
  • In-chat: slow-mode composer countdown
  • In-chat: welcome-mat system messages
  • In-chat: native poll component (tap to vote)
  • In-chat: standup prompt with timer
  • In-chat: link-archive badges

Built with the Ochre 2024 design tokens. Light/dark mode toggle included.

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