Skip to content

feat(flows): author flows and create checkpoints from the CLI - #201

Draft
joshdholtz wants to merge 2 commits into
mainfrom
josh/cli-flow-authoring
Draft

joshdholtz wants to merge 2 commits into
mainfrom
josh/cli-flow-authoring

Conversation

@joshdholtz

@joshdholtz joshdholtz commented Oct 28, 2026 •

Copy link
Copy Markdown
Member

Checklist

  • Tests added or updated, if applicable
  • go build ./..., go test ./..., and gofmt pass

Motivation

Let CLI clients author paywalls, web funnels, and general flows using the same draft and publishing lifecycle as the dashboard.

Description

Adds flows show, export, update, create, duplicate, validate, and publish. The existing experimental group stays hidden from help. Export produces an editable update file with its revision; saves preserve omitted steps and require explicit deletion. Publish requires a revision and confirmation. Adds checkpoints create --identifier and targeting-rule filters for checkpoint and flow IDs.

Depends on the development API stack ending at khepri #27201. Existing targeting commands attach flows to checkpoints. MCP support is separate.

Implementation and testing

Uses typed API methods and the existing config reader, with a 5 MiB limit for flow content. Nested screen JSON and explicit null settings survive export/update without converting numbers to floats. A stale revision is returned to the caller without retrying the write.

Tests cover export/update, integer precision, localized screens, explicit nulls, overwrite refusal, strict config input, revision conflicts, validation exit status, unpublished create/duplicate, and publish confirmation. Build, vet, formatting, the full race-enabled test suite, and golangci-lint pass. Local terminal tests require TERM=xterm-256color; the default TERM=dumb also fails on the unchanged base branch.

Checkpoint tests cover request serialization, human and JSON output, missing or blank identifiers before mutation, duplicate errors, and rule filters with pagination.

All CLI CI checks pass. Live flowapi4 testing on Catbone also passed checkpoint creation, inactive paywall assignment, rule readback/filtering, and duplicate-identifier rejection. Creation, editing, validation, and publishing also passed for new three-screen paywall/general flows and a four-screen web funnel with Test Store checkout. Both native flows have new inactive checkpoint rules. Stale revisions and incomplete funnel publishing were rejected. A published paywall was duplicated and the copy validated after assigning its offering. No rule was activated; this is API testing only.

The overlay tracks the development endpoints and generates their path builders. Custom models preserve raw screen JSON.

@joshdholtz joshdholtz changed the title feat(flows): add CLI draft authoring validation and publishing feat(flows): author flows and create checkpoints from the CLI Oct 29, 2026
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