Skip to content

Add skill nudging — surface emergent skills via Telegram#3

Merged
not-reed merged 1 commit intomainfrom
feat/skill-nudging
Apr 6, 2026
Merged

Add skill nudging — surface emergent skills via Telegram#3
not-reed merged 1 commit intomainfrom
feat/skill-nudging

Conversation

@not-reed
Copy link
Copy Markdown
Owner

@not-reed not-reed commented Apr 6, 2026

Summary

  • When the observer detects a high-confidence reusable pattern (≥0.7 confidence), queues a proactive Telegram message with Save it / Ignore buttons
  • On Save it: fires processMessage with a direct skill_create instruction — skill gets created with full instruction extraction
  • On Ignore: records a 7-day per-skill cooldown so the same pattern isn't re-suggested
  • 24h global rate limit per chat prevents nudge spam
  • Name-based dedup skips candidates that already exist as skills
  • CLI sessions are excluded (Telegram-only)
  • Also tightens system prompt rule on scheduled reminders and relabels recent memories preamble to reduce proactive timer surfacing

Implementation

Settings table used as a lightweight queue (no new DB tables):

  • skill_nudge:<chatId> — pending candidate, written by async observer chain in agent.ts, consumed by bot.ts post-reply
  • skill_nudge_pending:<chatId> — held for callback handler while awaiting user response
  • skill_nudge_cooldown:<chatId> — 24h rate limit timestamp
  • ignored_skill:<normalized-name> — 7-day ignore timestamp

Test plan

  • Have a multi-turn conversation that repeats a tool-chaining pattern (observer threshold must fire)
  • Check logs for "Queued skill nudge for chat"
  • Verify nudge message appears in Telegram with buttons after the next reply
  • Click Save it → skill created, confirmation sent
  • Click Ignore → message edits to "Got it, skipping that one." → no nudge for 7 days on that skill
  • Verify stale button (after bot restart) shows "This suggestion has expired."

🤖 Generated with Claude Code

When the observer detects a high-confidence reusable pattern (>=0.7),
queue a proactive Telegram message with Save it / Ignore buttons. On
save, fire processMessage to call skill_create. On ignore, record a
7-day cooldown. 24h rate limit prevents nudge spam.

Also tighten system prompt rule on scheduled reminders and relabel
recent memories preamble to discourage proactive surfacing.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages bot commented Apr 6, 2026

Deploying sprawl with  Cloudflare Pages  Cloudflare Pages

Latest commit: 6d24dca
Status: ✅  Deploy successful!
Preview URL: https://a2934e67.sprawl.pages.dev
Branch Preview URL: https://feat-skill-nudging.sprawl.pages.dev

View logs

@not-reed not-reed merged commit 420c68f into main Apr 6, 2026
2 checks passed
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