Skip to content

Op: Replace spells with Temporal-backed deployment workflows #11

@lex00

Description

@lex00

Overview

Replaces the spells system with Op — a core composite that declares a Temporal workflow. A new Temporal lexicon bridges chant's build artifacts to Temporal's execution engine. chant run <name> replaces chant spell cast. Worker lifecycle is managed via profiles in chant.config.ts. Deployment reports replace agent briefing prompts.

Prerequisite: chant migrates from Bun to Node.js (unblocks Temporal worker support).

What Op is

Op is a Composite in packages/core that declares a named, phased Temporal workflow. Declared in *.op.ts files anywhere in the project. Discovered and built by chant build alongside other Declarables; the Temporal lexicon serializer emits compiled workflow code to dist/ops/. Running an Op means starting the Temporal workflow.

export default Op({
  name: "alb-deploy",
  overview: "Build and deploy the ALB multi-service stack",
  phases: [
    phase("Build", [
      activity(build("examples/gitlab-aws-alb-infra")),
    ], { parallel: true }),
    phase("Deploy", [
      activity(gitlabPipeline("alb-infra")),
      activity(waitForStack("shared-alb")),
    ]),
  ],
})

Why Temporal

  • Durable execution — workflows survive crashes and resume from the current phase
  • Signals — unblock gate steps from CLI or MCP (DNS delegation, manual approvals)
  • Parallelism — multi-region deployments run phases concurrently
  • Retry policies — transient failures in kubectl apply, aws cloudformation don't require human intervention
  • temporal server start-dev — zero-setup local dev server, MIT licensed

Child issues (in order)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions