Replace workflows and scheduled prompts with project-bound routines #576
Labels
No labels
backend
bug
chore
duplication
effort:complex
effort:medium
effort:trivial
enhancement
follow-up
frontend
fullstack
priority:high
ready-for-agent
refactor
security
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
dries/ocman#576
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem Statement
Ocman currently exposes two overlapping automation concepts: heavyweight DAG-based Workflows and project-level Scheduled Prompts. The intended product model is simpler: users need named, project-bound prompts that execute from a schedule and can also be invoked explicitly by a user or another coding agent. Workflows are no longer wanted, while Scheduled Prompts are hidden inside Project Detail, unnamed, lack durable per-invocation history, and cannot be discovered or triggered through MCP.
Users need one clear automation concept—Routine—with a dedicated main-menu experience, durable scheduling, local and remote project ownership, explicit invocation, and an additive trigger model that can support webhooks later without implementing them now.
Solution
Replace Workflows and Scheduled Prompts with Routines.
A Routine is a named prompt bound to exactly one project on one machine. It has exactly one configured trigger (
once,interval, orcron), a timezone where relevant, an enabled flag, and a session mode (freshorreuse). Automatic scheduling, UI Run now, and MCP invocation all execute the same Routine through one backend service and record a durable Routine Run.Add Routines as a main-menu destination showing local and connected-remote projects together. Users can filter, create, edit, delete, enable or disable, run immediately, inspect the next run and last result, open linked sessions, and inspect run history. Agents can list, inspect, trigger, and inspect runs through MCP, but cannot author or mutate Routine definitions.
Migrate every existing Scheduled Prompt into an equivalent Routine. Remove all active Workflow/Dagu runtime, API, MCP, UI, examples, installed skill, documentation, and command surfaces. Preserve historical Workflow database tables and migrations as inert data; do not convert Workflow definitions or runs into Routines.
User Stories
schedule,ui, ormcp), so that I know why it happened.Implementation Decisions
project + name + prompt + one trigger + enabled state + session mode. It is not a DAG, does not contain nodes or dependencies, and does not invoke another Routine as an internal graph operation.(remote, project)scope.once,interval, and five-fieldcron; preserve explicit IANA timezone handling. The representation must permit a later additivewebhooktype, but no webhook placeholder UI, endpoint, secret, or receiver is built now.schedule,ui,mcp), timestamps, dispatch status, platform/session link when known, and error text.dispatchedmeans the platform accepted the prompt; the run does not follow the later agent turn to completion.mcp; no verified caller-agent identity is claimed because the transport does not provide one.Testing Decisions
Out of Scope
Further Notes