Workflow Definition Schema
Machine-readable YAML definitions for workflow commands and the workflow manifest.
Per-Command YAML Schema
Each command has a co-located .yaml file describing its interface.
Annotated Example
# Unique command identifier: {phase}:{action}
command: "discovery:create"
# Workflow phase this command belongs to
phase: discovery
# Relative path to the command's .md implementation file
path: commands/project/discovery/create-epic-discovery.md
# Relative path to the human-readable overview in docs/workflow/
description: docs/workflow/discovery-create.md
# Ordered list of inputs the command accepts
inputs:
- name: epic-key
type: string
required: true
description: Jira epic key (e.g., CC-60)
# Ordered list of outputs the command produces
outputs:
- name: discovery-document
type: url
path: "/epics/Discovery/{epic-key}/"
description: Published Confluence discovery document
# Backend capabilities this command depends on
# Valid values: ticketing, documentation, or empty list
requires:
- ticketing
- documentation
# Command lifecycle status (default: existing)
status: existing
# CLI syntax hint shown in help text
argument-hint: "<epic-key>"
# Whether this command is invoked multiple times per epic (default: false)
repeat: false
Field Reference
| Field |
Type |
Required |
Default |
Constraints |
command |
string |
yes |
— |
Format {phase}:{action} or bare name for utilities. Unique across all definitions. |
phase |
string |
yes |
— |
One of: intake, discovery, planning, execution, retrospectives. Required for phase commands. Omit for utility commands. |
path |
string |
yes |
— |
Relative path from repo root to the .md command file. Must resolve to an existing file when status: existing. When status: planned, the path is not required to resolve to an existing file. |
description |
string |
yes |
— |
Relative path from repo root to the overview .md in docs/workflow/. Must resolve to an existing file. |
inputs |
list |
yes |
— |
Ordered list of input objects. May be empty ([]). |
inputs[].name |
string |
yes |
— |
Kebab-case identifier. |
inputs[].type |
string |
yes |
— |
One of: string, url, list[url], list[string], flag. |
inputs[].required |
boolean |
yes |
— |
Whether the input must be provided. |
inputs[].description |
string |
yes |
— |
Human-readable description of the input. |
outputs |
list |
yes |
— |
Ordered list of output objects. May be empty ([]). |
outputs[].name |
string |
yes |
— |
Kebab-case identifier. |
outputs[].type |
string |
yes |
— |
One of: url, document, tickets, report, file. |
outputs[].path |
string |
no |
— |
Template path for the output location. Supports {input-name} interpolation. |
outputs[].description |
string |
no |
— |
Human-readable description of the output. |
requires |
list |
yes |
— |
Backend capabilities needed. Valid values: ticketing, documentation. Empty list ([]) if no backends needed. |
status |
string |
no |
existing |
One of: existing, planned, deprecated. |
argument-hint |
string |
no |
— |
CLI syntax hint (e.g., <epic-key>). |
repeat |
boolean |
no |
false |
true if the command is invoked multiple times per epic (e.g., per-ticket commands). |
Input Types
| Type |
Description |
Example |
string |
Single string value |
CC-60 |
url |
Single URL |
https://confluence/doc |
list[url] |
Space-separated URLs |
url1 url2 url3 |
list[string] |
Space-separated strings |
--decision=D1:B --decision=D2:Y |
flag |
Boolean flag |
--list, --check, --graph |
Output Types
| Type |
Description |
url |
A URL to a published document or page |
document |
A generated document (Confluence page, local markdown) |
tickets |
Jira tickets created in the ticketing system |
report |
A generated report (completion report, retrospective) |
file |
A local file produced on disk |
Workflow Manifest Schema
The manifest at commands/workflow-manifest.yaml defines the phase DAG and command ordering.
Annotated Example
# Manifest schema version
version: "1.0"
# Ordered phases forming the workflow DAG
phases:
intake:
# Relative path to the phase overview markdown
description: docs/workflow/intake-phase.md
# Phase dependencies (empty = entry point)
depends_on: []
# Whether this phase runs once per project (vs. per-epic)
run_once: true
# Ordered list of commands in this phase
commands:
- command: "intake:document-codebase"
definition: commands/intake/document-codebase.yaml
- command: "intake:capture-behavior"
definition: commands/intake/capture-behavior.yaml
- command: "intake:create-system-description"
definition: commands/intake/create-system-description.yaml
discovery:
description: docs/workflow/discovery-phase.md
depends_on:
- phase: intake
strength: recommended # Not strictly required, but recommended
optional: true # Phase can be skipped entirely
external_skills:
- skill: feature-forge
role: prerequisite # Feature-forge identifies unknowns that trigger discovery
commands:
- command: "discovery:create"
definition: commands/project/discovery/create.yaml
- command: "discovery:synthesize"
definition: commands/project/discovery/synthesize.yaml
- command: "discovery:approve"
definition: commands/project/discovery/approve.yaml
# Utility commands not tied to a specific phase
utilities:
- command: common-ground
definition: commands/common-ground/common-ground.yaml
invocation: on-demand # Can be invoked at any point
Manifest Field Reference
| Field |
Type |
Required |
Description |
version |
string |
yes |
Manifest schema version. Currently "1.0". |
phases |
map |
yes |
Ordered map of phase name → phase definition. |
phases.<name>.description |
string |
yes |
Path to the phase overview markdown. |
phases.<name>.depends_on |
list |
yes |
Phase dependencies. Empty list for entry points. |
phases.<name>.depends_on[].phase |
string |
yes |
Name of the dependency phase. |
phases.<name>.depends_on[].strength |
string |
yes |
required or recommended. |
phases.<name>.run_once |
boolean |
no |
true if the phase runs once per project. Default false. |
phases.<name>.optional |
boolean |
no |
true if the phase can be skipped. Default false. |
phases.<name>.external_skills |
list |
no |
Skills from outside the workflow that feed into this phase. |
phases.<name>.external_skills[].skill |
string |
yes |
Skill name. |
phases.<name>.external_skills[].role |
string |
yes |
Relationship: prerequisite, companion, output-consumer. |
phases.<name>.commands |
list |
yes |
Ordered list of commands in this phase. |
phases.<name>.commands[].command |
string |
yes |
Command identifier matching the YAML definition's command field. |
phases.<name>.commands[].definition |
string |
yes |
Relative path to the command's .yaml definition file. |
utilities |
list |
no |
Commands not tied to a phase. |
utilities[].command |
string |
yes |
Command identifier. |
utilities[].definition |
string |
yes |
Path to the command's .yaml definition file. |
utilities[].invocation |
string |
yes |
Invocation pattern: on-demand, scheduled, triggered. |
Validation Rules
- No cycles: The
depends_on graph must be a DAG. A phase cannot transitively depend on itself.
- Command uniqueness: Every
command value across all phases and utilities must be unique.
- Path resolution: All
definition and description paths must resolve to existing files.
- Phase reference validity: Every
depends_on[].phase must reference a phase defined in the manifest.
- Definition consistency: Each
commands[].command must match the command field inside the referenced YAML definition file.
- Status gating: Commands with
status: planned should be flagged as unavailable when the manifest is consumed at runtime.
1---2name: 1411-workflow-definition-schema-7edbfcf93description: Workflow Definition Schema4---5# Workflow Definition Schema67Machine-readable YAML definitions for workflow commands and the workflow manifest.89---1011## Per-Command YAML Schema1213Each command has a co-located `.yaml` file describing its interface.1415### Annotated Example1617```yaml18# Unique command identifier: {phase}:{action}19command: "discovery:create"2021# Workflow phase this command belongs to22phase: discovery2324# Relative path to the command's .md implementation file25path: commands/project/discovery/create-epic-discovery.md2627# Relative path to the human-readable overview in docs/workflow/28description: docs/workflow/discovery-create.md2930# Ordered list of inputs the command accepts31inputs:32 - name: epic-key33 type: string34 required: true35 description: Jira epic key (e.g., CC-60)3637# Ordered list of outputs the command produces38outputs:39 - name: discovery-document40 type: url41 path: "/epics/Discovery/{epic-key}/"42 description: Published Confluence discovery document4344# Backend capabilities this command depends on45# Valid values: ticketing, documentation, or empty list46requires:47 - ticketing48 - documentation4950# Command lifecycle status (default: existing)51status: existing5253# CLI syntax hint shown in help text54argument-hint: "<epic-key>"5556# Whether this command is invoked multiple times per epic (default: false)57repeat: false58```5960### Field Reference6162| Field | Type | Required | Default | Constraints |63|-------|------|----------|---------|-------------|64| `command` | string | yes | — | Format `{phase}:{action}` or bare name for utilities. Unique across all definitions. |65| `phase` | string | yes | — | One of: `intake`, `discovery`, `planning`, `execution`, `retrospectives`. Required for phase commands. Omit for utility commands. |66| `path` | string | yes | — | Relative path from repo root to the `.md` command file. Must resolve to an existing file when `status: existing`. When `status: planned`, the path is not required to resolve to an existing file. |67| `description` | string | yes | — | Relative path from repo root to the overview `.md` in `docs/workflow/`. Must resolve to an existing file. |68| `inputs` | list | yes | — | Ordered list of input objects. May be empty (`[]`). |69| `inputs[].name` | string | yes | — | Kebab-case identifier. |70| `inputs[].type` | string | yes | — | One of: `string`, `url`, `list[url]`, `list[string]`, `flag`. |71| `inputs[].required` | boolean | yes | — | Whether the input must be provided. |72| `inputs[].description` | string | yes | — | Human-readable description of the input. |73| `outputs` | list | yes | — | Ordered list of output objects. May be empty (`[]`). |74| `outputs[].name` | string | yes | — | Kebab-case identifier. |75| `outputs[].type` | string | yes | — | One of: `url`, `document`, `tickets`, `report`, `file`. |76| `outputs[].path` | string | no | — | Template path for the output location. Supports `{input-name}` interpolation. |77| `outputs[].description` | string | no | — | Human-readable description of the output. |78| `requires` | list | yes | — | Backend capabilities needed. Valid values: `ticketing`, `documentation`. Empty list (`[]`) if no backends needed. |79| `status` | string | no | `existing` | One of: `existing`, `planned`, `deprecated`. |80| `argument-hint` | string | no | — | CLI syntax hint (e.g., `<epic-key>`). |81| `repeat` | boolean | no | `false` | `true` if the command is invoked multiple times per epic (e.g., per-ticket commands). |8283### Input Types8485| Type | Description | Example |86|------|-------------|---------|87| `string` | Single string value | `CC-60` |88| `url` | Single URL | `https://confluence/doc` |89| `list[url]` | Space-separated URLs | `url1 url2 url3` |90| `list[string]` | Space-separated strings | `--decision=D1:B --decision=D2:Y` |91| `flag` | Boolean flag | `--list`, `--check`, `--graph` |9293### Output Types9495| Type | Description |96|------|-------------|97| `url` | A URL to a published document or page |98| `document` | A generated document (Confluence page, local markdown) |99| `tickets` | Jira tickets created in the ticketing system |100| `report` | A generated report (completion report, retrospective) |101| `file` | A local file produced on disk |102103---104105## Workflow Manifest Schema106107The manifest at `commands/workflow-manifest.yaml` defines the phase DAG and command ordering.108109### Annotated Example110111```yaml112# Manifest schema version113version: "1.0"114115# Ordered phases forming the workflow DAG116phases:117 intake:118 # Relative path to the phase overview markdown119 description: docs/workflow/intake-phase.md120121 # Phase dependencies (empty = entry point)122 depends_on: []123124 # Whether this phase runs once per project (vs. per-epic)125 run_once: true126127 # Ordered list of commands in this phase128 commands:129 - command: "intake:document-codebase"130 definition: commands/intake/document-codebase.yaml131 - command: "intake:capture-behavior"132 definition: commands/intake/capture-behavior.yaml133 - command: "intake:create-system-description"134 definition: commands/intake/create-system-description.yaml135136 discovery:137 description: docs/workflow/discovery-phase.md138 depends_on:139 - phase: intake140 strength: recommended # Not strictly required, but recommended141 optional: true # Phase can be skipped entirely142 external_skills:143 - skill: feature-forge144 role: prerequisite # Feature-forge identifies unknowns that trigger discovery145 commands:146 - command: "discovery:create"147 definition: commands/project/discovery/create.yaml148 - command: "discovery:synthesize"149 definition: commands/project/discovery/synthesize.yaml150 - command: "discovery:approve"151 definition: commands/project/discovery/approve.yaml152153# Utility commands not tied to a specific phase154utilities:155 - command: common-ground156 definition: commands/common-ground/common-ground.yaml157 invocation: on-demand # Can be invoked at any point158```159160### Manifest Field Reference161162| Field | Type | Required | Description |163|-------|------|----------|-------------|164| `version` | string | yes | Manifest schema version. Currently `"1.0"`. |165| `phases` | map | yes | Ordered map of phase name → phase definition. |166| `phases.<name>.description` | string | yes | Path to the phase overview markdown. |167| `phases.<name>.depends_on` | list | yes | Phase dependencies. Empty list for entry points. |168| `phases.<name>.depends_on[].phase` | string | yes | Name of the dependency phase. |169| `phases.<name>.depends_on[].strength` | string | yes | `required` or `recommended`. |170| `phases.<name>.run_once` | boolean | no | `true` if the phase runs once per project. Default `false`. |171| `phases.<name>.optional` | boolean | no | `true` if the phase can be skipped. Default `false`. |172| `phases.<name>.external_skills` | list | no | Skills from outside the workflow that feed into this phase. |173| `phases.<name>.external_skills[].skill` | string | yes | Skill name. |174| `phases.<name>.external_skills[].role` | string | yes | Relationship: `prerequisite`, `companion`, `output-consumer`. |175| `phases.<name>.commands` | list | yes | Ordered list of commands in this phase. |176| `phases.<name>.commands[].command` | string | yes | Command identifier matching the YAML definition's `command` field. |177| `phases.<name>.commands[].definition` | string | yes | Relative path to the command's `.yaml` definition file. |178| `utilities` | list | no | Commands not tied to a phase. |179| `utilities[].command` | string | yes | Command identifier. |180| `utilities[].definition` | string | yes | Path to the command's `.yaml` definition file. |181| `utilities[].invocation` | string | yes | Invocation pattern: `on-demand`, `scheduled`, `triggered`. |182183### Validation Rules1841851. **No cycles:** The `depends_on` graph must be a DAG. A phase cannot transitively depend on itself.1862. **Command uniqueness:** Every `command` value across all phases and utilities must be unique.1873. **Path resolution:** All `definition` and `description` paths must resolve to existing files.1884. **Phase reference validity:** Every `depends_on[].phase` must reference a phase defined in the manifest.1895. **Definition consistency:** Each `commands[].command` must match the `command` field inside the referenced YAML definition file.1906. **Status gating:** Commands with `status: planned` should be flagged as unavailable when the manifest is consumed at runtime.