Skip to content

feat(morning-brief): inline brief prompt into task description#889

Merged
harshithmullapudi merged 2 commits into
mainfrom
harshith/morning-brief-task-description
Jun 4, 2026
Merged

feat(morning-brief): inline brief prompt into task description#889
harshithmullapudi merged 2 commits into
mainfrom
harshith/morning-brief-task-description

Conversation

@harshithmullapudi

Copy link
Copy Markdown
Member

Summary

  • Remove the "Morning Brief" skill document from the default seed. The full brief prompt now lives directly on the recurring task's page via createScheduledTask({ description }), so the agent has the instructions on every firing without a skill-lookup indirection.
  • Initial scope is Gmail only — GitHub and Calendar sections are stubbed in the prompt for later. Slack send + the exact <h3>Brief — ...</h3> scratchpad-update structure are preserved.
  • Backfill: missing tasks are created with the description; existing tasks with an empty page get the description written; tasks with a non-empty description are left alone (avoids clobbering customizations).

Files

  • apps/webapp/app/services/morning-brief.ts (new) — exports MORNING_BRIEF_TASK_DESCRIPTION.
  • apps/webapp/app/models/workspace.server.ts — drops the skill gate, seeds the task with the description.
  • apps/webapp/app/scripts/backfill-morning-brief.ts — drops skill ensuring; backfills descriptions for legacy seeds.
  • apps/webapp/app/services/skills.defaults.ts — removes the Morning Brief entry from DEFAULT_SKILL_DEFINITIONS.

Out of scope (call out)

  • Existing morning-brief skill documents in already-seeded workspaces are not deleted. They become redundant but harmless. Happy to add a soft-delete step in the backfill if we want a clean slate.
  • The update_task description-guard for recurring tasks is unchanged — seeding bypasses it via direct createScheduledTask and the backfill writes via setPageContentFromHtml. A separate change can add an editPrompt: true opt-in to update_task if needed.

Test plan

  • Create a fresh workspace and confirm the seeded "Morning brief" task has the Gmail-only description on its page.
  • Run MODE=morning WORKSPACE_IDS=<id> tsx apps/webapp/app/scripts/backfill-morning-brief.ts against a workspace whose morning-brief task currently has an empty page; verify the description is written.
  • Re-run the backfill and confirm it reports skipped: task ... already has a description.
  • Run the backfill against a workspace with no morning-brief task; confirm seeded: task id=... (created with description).
  • Wait for a 9am firing (or manually trigger one) and confirm the brief is delivered over Slack AND appended to today's scratchpad under the exact <h3>Brief — ...</h3> block.

🤖 Generated with Claude Code

harshithmullapudi and others added 2 commits June 1, 2026 22:31
The Morning Brief skill is no longer seeded as a separate document. Every
workspace gets the brief instructions directly on its recurring task page
(via createScheduledTask description), so the agent has the prompt on every
firing without a skill-lookup indirection. Initial scope is Gmail only —
GitHub and Calendar are stubbed out in the prompt; the Slack send +
scratchpad-update structure is preserved.

- New: apps/webapp/app/services/morning-brief.ts exports
  MORNING_BRIEF_TASK_DESCRIPTION.
- workspace.server.ts: drop the morning-brief skill gate; seed the task
  with the description.
- backfill-morning-brief.ts: drop skill ensuring; create missing tasks
  with the description, and write the description into existing tasks
  that have an empty page (legacy seeds). Tasks with a non-empty
  description are left alone.
- skills.defaults.ts: remove the Morning Brief entry from
  DEFAULT_SKILL_DEFINITIONS.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…structions

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@harshithmullapudi harshithmullapudi merged commit 60df0fe into main Jun 4, 2026
1 check 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