8000 feat(automations): five starter automations, switched off, and a journey test from an email to a yes by adeelahmad · Pull Request #606 · adeelahmad/lense · GitHub
[go: up one dir, main page]

Skip to content

feat(automations): five starter automations, switched off, and a journey test from an email to a yes - #606

Merged
adeelahmad merged 3 commits into
mainfrom
claude/project-thread-li6m25
Oct 18, 2026
Merged

adeelahmad merged 3 commits into
mainfrom
claude/project-thread-li6m25

Conversation

@adeelahmad
Copy link
Copy Markdown
Owner

Requested by Adeel · project thread

Description

Before: every automation started from a blank builder or a sentence. No test followed one email all the way through an automation, an approval and the timeline.

After: GET /api/v1/automations/starters lists five ready-made drafts. Each is what POST /automations takes, switched off:

  • Tell me about school emails: an email from an address with "school" in it tells you in your chat app. Posting it to the family room asks you first.
  • Router alerts: a router sensor's alert tells you, at most once an hour.
  • Morning digest: every weekday at 07:00, the agent sums up yesterday's unreviewed timeline items and tells you.
  • No reply in two days: an email that asks something, with nothing sent within two days, reminds you.
  • Webhook to note: a call to its webhook writes a note.

Nothing is stored. A starter is saved only when someone saves it, and runs only once it is turned on.

A new journey test follows an email from arrival to the timeline:

  1. The email arrives through the sources feed.
  2. The automation tells you at once.
  3. The post to the family room waits as an approval.
  4. Approving it over the API posts it.
  5. The timeline lists the email, the run and the decision, linked by cause.

Motivation and Context

Workflow studio M12, Build steps 3 (starters) and 4 (journey test). Starters stay off by default, as the brief says: listing them changes nothing that runs. The builder shows them in the next PR.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change; ! in the title)

Checklist:

  • The title is a Conventional Commit.
  • My code follows the code style of this project (make hooks checks it on commit).
  • I added or updated tests:
    • test_automation_starters.py, 4 tests: every starter saves as it is and stays off; signed-in only; each call returns copies; the school starter tells you at once and asks before posting.
    • test_automation_journey.py: the email-to-approval journey. It passes in the embedded and the server suites.
  • My change requires documentation updates: docs/automations.md (Starters), docs/api.md, README, docs/requirements.md.
  • CHANGELOG: n/a, the title says it.

Local CI on these commits (ci/local-ci.sh): FastAPI embedded pass, FastAPI server pass and Next.js pass, all stacked on #600 before it merged. pre-commit pass on this head. make openapi regenerated the client, which is unchanged on today's main.

Done questions (AGENTS.md)

  • Goal: starters and the journey test for M12; merged on green.
  • Agents: starters are an API call. Agents save one with save_automation as they would any draft.
  • Zero setup: nothing to install or set.
  • Fewest clicks: a starter is a whole automation in one pick (the builder shows them next).
  • Configurable: n/a, no new settings.
  • Light: a constant list, no new dependency.
  • Private and secure: signed-in only. Starters are drafts, and saving one goes through the same checks. The family post still asks first.
  • Cost: no model calls to list starters. The digest starter's agent call is logged and budgeted like any other, once it is turned on.
  • User decides: every starter is off until someone turns it on.
  • Upgrades: n/a, nothing is stored.
  • Honest: the docs say what each starter does and what to change first.
  • Tested and documented: tests added, docs updated, generated client regenerated with tooling.
  • Open: n/a.
  • Reported in the project thread.
  • Reuse: the existing automations schema, save checks and test fixtures.

Generated by Claude Code

…ions/starters

Five ready-made drafts (school emails, router alerts, a morning digest, no
reply in two days, webhook to note) that POST /automations takes as they
are. Nothing is stored until someone saves one.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AjJqXgjj1cNdKGRQbX5frb
An email from a mailbox watch (sources._ingest) is email.received; an
automation saved over the API matches it when the stream is followed; its
ask_model step (stand-in model) feeds a notify to me, done at once, and a
notify to a Matterbridge gateway, which waits as an approval; approved over
the API it is posted; and the timeline lists the email, the run and the
decision linked by cause. Only the model, channels.tell and Matterbridge are
stand-ins. Runs in the embedded and the server suites.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AjJqXgjj1cNdKGRQbX5frb
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AjJqXgjj1cNdKGRQbX5frb
@adeelahmad adeelahmad self-assigned this Oct 18, 2026
@adeelahmad
adeelahmad merged commit 449ce4f into main Oct 18, 2026
11 checks passed
@adeelahmad
adeelahmad deleted the claude/project-thread-li6m25 branch October 18, 2026 13:38
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.

2 participants

0