Render Recipe
Produce a compact, structured overview of an AutoSkillit recipe. Reads the recipe YAML (provided in the prompt or loaded via load_recipe), analyzes the step graph, and writes a formatted Markdown file to temp/render-recipe/.
When to Use
- User explicitly says "render recipe", "show recipe overview", or invokes
/render-recipe
- Do NOT auto-invoke when a recipe is loaded — only on explicit user request
Critical Constraints
NEVER:
- Modify any source code or recipe files
- Invent steps, ingredients, or routing not in the YAML
- Add decorative flair, emoji, or unnecessary commentary
- Create files outside
temp/render-recipe/ and recipes/diagrams/
- Use Unicode characters, emoji, or non-ASCII symbols. ASCII only — use
* for pass, x for fail, ? for confirm, | for spine, + for joins. No box-drawing characters, no arrows like → or ↑, no check marks, no crosses. Write -> and (up) instead.
- Include HTML comments, hash markers, format version markers, or any metadata in the output. No
<!-- ... --> lines.
- Include "Agent-managed" lines listing internal context variables. The user doesn't need to see plumbing state.
ALWAYS:
- Read the recipe YAML carefully and render exactly what exists
- Write output to
temp/render-recipe/{recipe-name}_{YYYY-MM-DD_HHMMSS}.md
- Print the rendered content to terminal after writing the file
Rendering Specification
The output has exactly two sections. Follow this structure precisely.
Note: The inputs table is NOT part of the diagram output. It is generated at runtime from the recipe YAML by _format_ingredients_table (single source of truth). Do not include an inputs table in the diagram file.
Section 1: Header
## {name}
Just the name. No description — the user already chose the recipe from the picker.
Section 2: Flow Diagram
Build an ASCII flow diagram showing the step graph. This is the core visual.
Infrastructure steps to hide:
The diagram shows ONLY the skill work — run_skill invocations and test_check. Everything else is plumbing. Hide:
- All
run_cmd steps — value capture, shell one-liners, branch computation. All plumbing.
- All
push_to_remote steps — mechanical transport.
- All
clone_repo steps — setup plumbing.
- All issue lifecycle steps —
get_issue_title, claim_issue, release_issue. Plumbing.
- All branch creation steps —
create_unique_branch, create_branch. Plumbing.
- All CI/CD steps —
wait_for_ci, wait_for_merge_queue, enable_auto_merge, route_queue_mode, reenter_merge_queue, queue_ejected_fix, diagnose_ci. Plumbing.
- All
merge_worktree steps — worktree-back-to-branch merge. Plumbing.
- All cleanup steps —
delete_clone, cleanup_failure, confirm_cleanup. Teardown.
- All post-PR steps —
review_pr, resolve_review, diagnose_ci, resolve_ci. Post-delivery plumbing.
- All
action: route steps — pure routing nodes with no work.
If a hidden step is the only path between two visible steps, collapse the route — just connect the visible steps directly. The reader should see: "what skills run, in what order, and what happens on failure."
Diagram layout:
Use a vertical spine with | and +-- branches. ASCII only — no Unicode.
- Main flow runs down the left spine. Show meaningful steps in order.
- Optional steps always go on their own
+-- branch off the vertical spine: +-- [step-name] (optional). They are never inlined on a horizontal chain. Never repeat the step name outside the brackets.
- Iteration loops are wrapped in a
FOR EACH block using +----+ / +----+. Only use this when note: fields indicate iteration over plan_parts or groups.
- Self-loops go on the same line with a bidirectional arrow:
step <-> [x fail -> handler].
- Multi-way routing (
on_result) is shown with labeled paths on separate lines.
- Back-edges use brackets:
-> plan [-> dry_walkthrough].
- Terminal steps are omitted. The last visible step is the end of the diagram.
- Do not show retry counts, model annotations, or other per-step metadata.
test_check steps display as test.
- Use the skill name, not the step key for
run_skill steps. But apply these short display names:
implement-worktree-no-merge -> implement
audit-impl -> audit
resolve-failures -> fix
open-integration-pr -> open-pr
- Everything else: use the skill name as-is (e.g.,
make-plan, dry-walkthrough, rectify)
- FOR EACH loop routing (more parts? / all done?) is implicit — omit it. The loop block itself conveys iteration. The first step inside the loop connects directly to the
+----+ box — no extra | line needed between them.
- Context limit recovery (
retry_worktree, on_context_limit) is automatic plumbing — omit it.
- Consistent failure language. Always use
x fail for failure branches. Never use "NO GO", "FAIL", "failure", or other variants.
- Back-edge targets must be the actual destination, not an intermediate optional step. When a back-edge (e.g. audit fail) routes to a step that then passes through an optional step before reaching the real target, show the back-edge pointing to the real target directly. Example: if audit fail routes to
make_plan and make_plan.on_success is dry_walkthrough, show x fail [-> make-plan] with the arrow going to make-plan, not to review-approach. The optional step is only reachable from its primary path, not from back-edges that happen to pass through the same chain.
- Center step names on the vertical spine. When a step name appears on the main spine (not on a branch), center the text relative to the
| character column. All spine-level step names should align to the same visual center.
Reference example for implementation:
+-- [make-groups] (optional)
|
+----+ FOR EACH GROUP:
| |
| make-plan --- [review-approach] (optional) --- dry-walkthrough --- implement --- test <-> [x fail -> fix]
|
+----+
|
+-- [audit] (optional)
| x fail [-> make-plan]
|
open-pr
Adapting to simpler recipes:
- Recipes without iteration do not use
FOR EACH blocks. Just show the linear flow with branches.
- Recipes with few optional steps can show them inline on the main flow:
clone ─── audit ─── investigate ─── plan ─── implement ─── test ─── merge ─── push.
- Very simple recipes (under 8 meaningful steps) can use a single horizontal chain.
- Always adapt the shape to the recipe — do not force a complex layout on a simple recipe.
Workflow
Step 1: Parse the Recipe
Read the recipe YAML from the prompt context or from disk if a path is given. Identify:
- All ingredients and their properties
- All steps in declaration order
- Infrastructure steps to hide (see expanded list in Section 2)
- The happy path (follow on_success chain from first step)
- Branch points (on_failure to non-terminal, on_result routing)
- Back-edges (on_success/on_failure targets that appear earlier in declaration order)
- Optional steps (optional: true)
- Terminal steps (action: stop)
Step 2: Build the Flow Diagram
Construct the ASCII diagram following the rules in Section 2. Start with the happy path, omit infrastructure steps, then layer in branches and optional annotations.
Step 3: Verify the Diagram
Before writing, check the diagram for alignment errors. Scan every line and verify:
- Spine consistency. The main vertical spine (
│, ├, └) must stay in the same column throughout the diagram. Find the column of the first │ — every subsequent │, ├──, and └── on the main spine must start in that same column. If a FOR EACH block's ┌, │, └ characters are indented further than the spine, shift them left to match.
- Box closure. Every
┌ must have a matching └ at the same indentation level.
- Branch alignment. All
├── branches off the same spine share the same column.
- No trailing whitespace drift. Right-side annotations (
← only if ...) should be column-aligned with each other where practical.
If any check fails, fix the diagram before proceeding. This is a mechanical check — count character positions, do not eyeball it.
Step 4: Assemble and Write
Combine both sections and write to two locations:
temp/render-recipe/{recipe-name}_{YYYY-MM-DD_HHMMSS}.md — timestamped history copy
- The recipe's diagram file — for bundled recipes:
src/autoskillit/recipes/diagrams/{recipe-name}.md; for project recipes: .autoskillit/recipes/diagrams/{recipe-name}.md. This is the file that load_recipe serves to Claude.
Print the full content to terminal.
Output Rules
| Content |
Destination |
| Rendered recipe overview |
temp/render-recipe/ (history) + recipes/diagrams/ (live) + terminal |
| Validation warnings (if any) |
Terminal only |
1---2name: render-recipe3description: Render a recipe YAML as a compact visual overview with ASCII flow diagram and input table. Only invoke when the user explicitly says "render recipe" or "/render-recipe".4---5
6# Render Recipe
7
8Produce a compact, structured overview of an AutoSkillit recipe. Reads the recipe YAML (provided in the prompt or loaded via `load_recipe`), analyzes the step graph, and writes a formatted Markdown file to `temp/render-recipe/`.
9
10## When to Use
11
12- User explicitly says "render recipe", "show recipe overview", or invokes `/render-recipe`
13- Do NOT auto-invoke when a recipe is loaded — only on explicit user request
14
15## Critical Constraints
16
17**NEVER:**
18- Modify any source code or recipe files
19- Invent steps, ingredients, or routing not in the YAML
20- Add decorative flair, emoji, or unnecessary commentary
21- Create files outside `temp/render-recipe/` and `recipes/diagrams/`
22- Use Unicode characters, emoji, or non-ASCII symbols. ASCII only — use `*` for pass, `x` for fail, `?` for confirm, `|` for spine, `+` for joins. No box-drawing characters, no arrows like `→` or `↑`, no check marks, no crosses. Write `->` and `(up)` instead.
23- Include HTML comments, hash markers, format version markers, or any metadata in the output. No `<!-- ... -->` lines.
24- Include "Agent-managed" lines listing internal context variables. The user doesn't need to see plumbing state.
25
26**ALWAYS:**
27- Read the recipe YAML carefully and render exactly what exists
28- Write output to `temp/render-recipe/{recipe-name}_{YYYY-MM-DD_HHMMSS}.md`
29- Print the rendered content to terminal after writing the file
30
31---
32
33## Rendering Specification
34
35The output has exactly two sections. Follow this structure precisely.
36
37**Note:** The inputs table is NOT part of the diagram output. It is generated at runtime from the recipe YAML by `_format_ingredients_table` (single source of truth). Do not include an inputs table in the diagram file.
38
39### Section 1: Header
40
41```
42## {name}
43```
44
45Just the name. No description — the user already chose the recipe from the picker.
46
47### Section 2: Flow Diagram
48
49Build an ASCII flow diagram showing the step graph. This is the core visual.
50
51**Infrastructure steps to hide:**
52The diagram shows ONLY the *skill work* — `run_skill` invocations and `test_check`. Everything else is plumbing. Hide:
53- **All `run_cmd` steps** — value capture, shell one-liners, branch computation. All plumbing.
54- **All `push_to_remote` steps** — mechanical transport.
55- **All `clone_repo` steps** — setup plumbing.
56- **All issue lifecycle steps** — `get_issue_title`, `claim_issue`, `release_issue`. Plumbing.
57- **All branch creation steps** — `create_unique_branch`, `create_branch`. Plumbing.
58- **All CI/CD steps** — `wait_for_ci`, `wait_for_merge_queue`, `enable_auto_merge`, `route_queue_mode`, `reenter_merge_queue`, `queue_ejected_fix`, `diagnose_ci`. Plumbing.
59- **All `merge_worktree` steps** — worktree-back-to-branch merge. Plumbing.
60- **All cleanup steps** — `delete_clone`, `cleanup_failure`, `confirm_cleanup`. Teardown.
61- **All post-PR steps** — `review_pr`, `resolve_review`, `diagnose_ci`, `resolve_ci`. Post-delivery plumbing.
62- **All `action: route` steps** — pure routing nodes with no work.
63
64If a hidden step is the *only* path between two visible steps, collapse the route — just connect the visible steps directly. The reader should see: "what skills run, in what order, and what happens on failure."
65
66**Diagram layout:**
67
68Use a vertical spine with `|` and `+--` branches. ASCII only — no Unicode.
69
701. **Main flow** runs down the left spine. Show meaningful steps in order.
712. **Optional steps** always go on their own `+--` branch off the vertical spine: `+-- [step-name] (optional)`. They are never inlined on a horizontal chain. Never repeat the step name outside the brackets.
723. **Iteration loops** are wrapped in a `FOR EACH` block using `+----+` / `+----+`. Only use this when `note:` fields indicate iteration over plan_parts or groups.
734. **Self-loops** go on the same line with a bidirectional arrow: `step <-> [x fail -> handler]`.
745. **Multi-way routing** (`on_result`) is shown with labeled paths on separate lines.
756. **Back-edges** use brackets: `-> plan [-> dry_walkthrough]`.
767. **Terminal steps** are omitted. The last visible step is the end of the diagram.
778. Do **not** show retry counts, model annotations, or other per-step metadata.
789. **`test_check` steps** display as `test`.
7910. **Use the skill name, not the step key** for `run_skill` steps. But apply these short display names:
80 - `implement-worktree-no-merge` -> `implement`
81 - `audit-impl` -> `audit`
82 - `resolve-failures` -> `fix`
83 - `open-integration-pr` -> `open-pr`
84 - Everything else: use the skill name as-is (e.g., `make-plan`, `dry-walkthrough`, `rectify`)
8511. **FOR EACH loop routing** (more parts? / all done?) is implicit — omit it. The loop block itself conveys iteration. The first step inside the loop connects directly to the `+----+` box — no extra `|` line needed between them.
8612. **Context limit recovery** (`retry_worktree`, `on_context_limit`) is automatic plumbing — omit it.
8713. **Consistent failure language.** Always use `x fail` for failure branches. Never use "NO GO", "FAIL", "failure", or other variants.
8814. **Back-edge targets must be the actual destination, not an intermediate optional step.** When a back-edge (e.g. audit fail) routes to a step that then passes through an optional step before reaching the real target, show the back-edge pointing to the real target directly. Example: if audit fail routes to `make_plan` and `make_plan.on_success` is `dry_walkthrough`, show `x fail [-> make-plan]` with the arrow going to `make-plan`, not to `review-approach`. The optional step is only reachable from its primary path, not from back-edges that happen to pass through the same chain.
8915. **Center step names on the vertical spine.** When a step name appears on the main spine (not on a branch), center the text relative to the `|` character column. All spine-level step names should align to the same visual center.
90
91**Reference example for implementation:**
92
93```
94 +-- [make-groups] (optional)
95 |
96 +----+ FOR EACH GROUP:
97 | |
98 | make-plan --- [review-approach] (optional) --- dry-walkthrough --- implement --- test <-> [x fail -> fix]
99 |
100 +----+
101 |
102 +-- [audit] (optional)
103 | x fail [-> make-plan]
104 |
105 open-pr
106```
107
108**Adapting to simpler recipes:**
109- Recipes without iteration do not use `FOR EACH` blocks. Just show the linear flow with branches.
110- Recipes with few optional steps can show them inline on the main flow: `clone ─── audit ─── investigate ─── plan ─── implement ─── test ─── merge ─── push`.
111- Very simple recipes (under 8 meaningful steps) can use a single horizontal chain.
112- Always adapt the shape to the recipe — do not force a complex layout on a simple recipe.
113
114---
115
116## Workflow
117
118### Step 1: Parse the Recipe
119
120Read the recipe YAML from the prompt context or from disk if a path is given. Identify:
121- All ingredients and their properties
122- All steps in declaration order
123- Infrastructure steps to hide (see expanded list in Section 2)
124- The happy path (follow on_success chain from first step)
125- Branch points (on_failure to non-terminal, on_result routing)
126- Back-edges (on_success/on_failure targets that appear earlier in declaration order)
127- Optional steps (optional: true)
128- Terminal steps (action: stop)
129
130### Step 2: Build the Flow Diagram
131
132Construct the ASCII diagram following the rules in Section 2. Start with the happy path, omit infrastructure steps, then layer in branches and optional annotations.
133
134### Step 3: Verify the Diagram
135
136Before writing, check the diagram for alignment errors. Scan every line and verify:
137
1381. **Spine consistency.** The main vertical spine (`│`, `├`, `└`) must stay in the same column throughout the diagram. Find the column of the first `│` — every subsequent `│`, `├──`, and `└──` on the main spine must start in that same column. If a `FOR EACH` block's `┌`, `│`, `└` characters are indented further than the spine, shift them left to match.
1392. **Box closure.** Every `┌` must have a matching `└` at the same indentation level.
1403. **Branch alignment.** All `├──` branches off the same spine share the same column.
1414. **No trailing whitespace drift.** Right-side annotations (`← only if ...`) should be column-aligned with each other where practical.
142
143If any check fails, fix the diagram before proceeding. This is a mechanical check — count character positions, do not eyeball it.
144
145### Step 4: Assemble and Write
146
147Combine both sections and write to two locations:
1481. `temp/render-recipe/{recipe-name}_{YYYY-MM-DD_HHMMSS}.md` — timestamped history copy
1492. The recipe's diagram file — for bundled recipes: `src/autoskillit/recipes/diagrams/{recipe-name}.md`; for project recipes: `.autoskillit/recipes/diagrams/{recipe-name}.md`. This is the file that `load_recipe` serves to Claude.
150
151Print the full content to terminal.
152
153---
154
155## Output Rules
156
157| Content | Destination |
158|---------|-------------|
159| Rendered recipe overview | `temp/render-recipe/` (history) + `recipes/diagrams/` (live) + terminal |
160| Validation warnings (if any) | Terminal only |