flow

package
v0.58.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 11, 2026 License: MIT Imports: 3 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package flow is the grammar of a flow entry, `step:arg[label]`, and the predicates every reader of a flow shares. It imports nothing of f10's, so facts, state and timing can all depend on it.

Index

Constants

This section is empty.

Variables

View Source
var Delivering = []string{"implement", "commit", "push", "pr", "deploy"}

Delivering are the generic steps whose output is a run's shipment.

View Source
var GenericSteps = []string{
	"audit", "brainstorm", "capture", "catchup", "cleanup", "commit", "debug", "demo", "deploy", "explain",
	"fetch", "finish", "handoff", "implement", "judge", "plan", "pr", "push", "resolve", "review", "standup",
}

GenericSteps is every generic step a flow entry may name, plus finish, which drive runs. A label never takes one of these names, so status and stats never show a step that did not run.

View Source
var Guarded = []string{"implement", "pr", "judge"}

Guarded are the entries ship's catchup guard runs before.

Functions

func CutLabel

func CutLabel(s string) (string, string)

CutLabel cuts an entry's trailing `[label]`: `pr[pr-polish]` is pr and pr-polish. An entry with none has label "".

Types

type Entry

type Entry struct {
	Step  string
	Arg   string
	Label string
}

An Entry is one flow entry: `review:local[deep-review]` is step review, argument local, label deep-review. The label is a display name only.

func Parse

func Parse(s string) Entry

Parse reads one entry as written.

func (Entry) String

func (e Entry) String() string

String is the entry in the colon form, its label cut: what a state file's pipeline and a skill's prompt hold.

func (Entry) Written

func (e Entry) Written() string

Written is the entry as a flow writes it, its label in brackets.

type Flow

type Flow []Entry

A Flow is entries in the order they run.

func Of

func Of(written []string) Flow

Of parses each written entry.

func Zip

func Zip(entries, labels []string) Flow

Zip is a flow from the colon-form entries and their labels by index, the two lines a state file keeps; a missing label is "".

func (Flow) Delivered

func (f Flow) Delivered() string

Delivered is the last delivering entry's step, "" with none.

func (Flow) JudgeKind

func (f Flow) JudgeKind(i int) string

JudgeKind is what the judge at entry i judges: the plan before any `implement`, the change after one.

func (Flow) Labels

func (f Flow) Labels() []string

Labels is every entry's label by index, nil when none has one.

func (Flow) MarshalJSON

func (f Flow) MarshalJSON() ([]byte, error)

MarshalJSON writes the flow as its written entries, labels in brackets.

func (Flow) Plans

func (f Flow) Plans() bool

Plans reports a flow led by `plan`: it writes a plan file, and ship runs only the entries after it.

func (Flow) PublishedBefore

func (f Flow) PublishedBefore(i int) bool

PublishedBefore reports a pr or push among the entries before i, which a CI review needs.

func (Flow) Ship

func (f Flow) Ship() Flow

Ship is what /f10:ship runs: the flow after a leading `plan`.

func (Flow) Strings

func (f Flow) Strings() []string

Strings is every entry in the colon form.

func (*Flow) UnmarshalJSON

func (f *Flow) UnmarshalJSON(b []byte) error

UnmarshalJSON reads what MarshalJSON writes.

func (Flow) Written

func (f Flow) Written() []string

Written is every entry as written, labels in brackets.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL