Skip to main content

Playbook Schema

A playbook is a YAML file that defines a pipeline as a graph of stages. Playbooks are an alternative to database-configured pipelines — they're useful for bundling standard workflows with fluxaOS.

Playbooks live in the bundled pipelines directory (FLUXAOS_BUNDLED_PIPELINES_DIR, default: src/core/pipeline/bundled/).

Top-level fields

FieldRequiredTypePurpose
nameYesstringDisplay name; used to look up the playbook
descriptionYesstringHuman-readable description
promptYesstringSystem prompt injected into every stage's context
stagesYesarrayOne or more stage definitions

Stage types

Sequential (default)

Runs one skill. If type is omitted, sequential is assumed.

- id: research
skill: research
onPass: implement # next stage on pass verdict
onFail: research # next stage on fail verdict
fallback: blocked # next stage on blocked verdict
trustMode: prescriptive # prescriptive | declarative
rules: [] # gate rules (same format as UI rules)
FieldRequiredDefaultPurpose
idYesUnique stage identifier within this playbook
skillYesSkill name to run
onPassYesNext stage ID on pass verdict
onFailYesNext stage ID on fail verdict
fallbackYesNext stage ID on blocked verdict
trustModeNoprescriptiveprescriptive = follow rules strictly; declarative = skill has more autonomy
rulesNo[]Gate rules array

Parallel group

Runs multiple skills concurrently, then aggregates their verdicts.

- type: parallel
id: parallel-review
children:
- id: lint-check
skill: lint-review
- id: security-check
skill: security-review
aggregation: all-pass # how to aggregate child verdicts
onPass: deploy
onFail: rework
fallback: blocked
FieldRequiredDefaultPurpose
typeYesMust be parallel
childrenYesArray of child stages (minimum 2); each has id and skill
aggregationYesHow to combine child verdicts: all-pass, any-pass, majority-pass, or none
onPassYesNext stage ID when aggregation condition is met
onFailYesNext stage ID when aggregation condition is not met
fallbackYesNext stage ID on blocked verdict

Loop node

Repeats a skill until a condition is met or a maximum iteration count is reached.

- type: loop
id: review-loop
skill: code-review
until: VERDICT_PASS # stop condition
maxIterations: 5 # hard cap
onComplete: deploy # next stage when loop exits successfully
onExhausted: rework # next stage when maxIterations is hit
fallback: blocked # next stage on blocked verdict
FieldRequiredDefaultPurpose
untilYesStop condition (see below)
maxIterationsNo10Maximum number of iterations before onExhausted
onCompleteYesNext stage when the until condition is met
onExhaustedYesNext stage when maxIterations is hit

until values:

ValueMeaning
VERDICT_PASSStop when skill emits pass verdict
VERDICT_FAILStop when skill emits fail verdict
ISSUE_OUT_OF_ACTIVE_STATEAlias for VERDICT_PASS — stops when the skill emits pass verdict. The skill is expected to check whether the issue has left active state and emit pass when it has.
ALWAYSAlways loop until maxIterations is hit

Special stage IDs

IDMeaning
completePipeline finishes successfully; issue moves to Complete state
blockedPipeline halts; issue status set to Blocked

Example: standard-dev playbook

name: standard-dev
description: Research → implement → review → deploy with conditional rework.
prompt: |
You are a fluxaOS pipeline agent running in headless, unattended mode.
Your only job is to do the work your skill describes and produce an honest
result document at the path in the ${RESULT_DOC_PATH} environment variable.

stages:
- id: research
skill: research
onPass: implement
onFail: research
fallback: blocked

- id: implement
skill: implement
onPass: review
onFail: rework
fallback: blocked
rules:
- field: timing.duration_sec
operator: less_than
value: 7200
severity: warn
onFail: hold
label: Implementation time cap (2 hours)

- id: review
skill: review
onPass: deploy
onFail: rework
fallback: blocked

- id: rework
skill: rework
onPass: review
onFail: blocked
fallback: blocked
rules:
- field: run.attempt
operator: less_than
value: 4
severity: block
onFail: abort
label: Rework attempt cap (3 max)

- id: deploy
skill: deploy
onPass: complete
onFail: blocked
fallback: complete