3. Delete this header block before committing
Add the new file to the table in docs/README.md (flows section). Also add the flow to the table in docs/authoring-flows.md (Built-in flows). Register it in flows/registry.go Default(). ───────────────────────────────────────────────────────────────────────── -->
| Field | Value |
|---|---|
| ID | _flow-id_ |
| Title | Flow Title |
| File | flows/_flow_id_.go |
| Root question | _root_question_id_ |
| ID | Type | Label | Options / Default |
|---|---|---|---|
_id_ |
Text | "label" | Default: "_default_" |
_id_ |
Option | "label" | _opt1_, _opt2_ |
_id_ |
Confirm | "label" | Default: true |
_root_question_id_
└── _next_question_id_
├── [option A] → _branch_a_
│ └── _shared_question_
└── [option B] → _shared_question_
└── confirm_generate
└── (end)
| Condition | Generators added |
|---|---|
| Always | base_project |
_answer_key_ = _value_ |
_generator_name_ |
(plugin) _plugin_key_ = true |
_plugin_id_._gen_ |
Happy path (tools/test-flow/testdata/_fixture_name_.json):
{
"name": "_fixture_name_",
"flow_id": "_flow-id_",
"answers": {
"_root_question_id_": "_value_",
"confirm_generate": true
},
"expected_visited": [
"_root_question_id_",
"confirm_generate"
],
"skip_post_commands": false,
"skip_test_commands": false
}flows/_flow_id_.go