Bundle Builder — Workflow Synthesis Engine
This sub-skill is loaded after the interviewer (active mode) or observer
(passive mode) achieves convergence. It reads the accumulated workflow
state from memory and generates an output bundle directory.
Input
All workflow-architect:state:* memory entries. Read them all at once:
Read: workflow-architect:state:entry_points
Read: workflow-architect:state:phases
Read: workflow-architect:state:branching
Read: workflow-architect:state:pain_points
Read: workflow-architect:state:exit_criteria
If any required fields are missing (entry_points, phases, branching, exit_criteria),
abort with a clear message about what's missing.
Output Structure
The bundle is written to ~/.hermes/skills/<category>/<bundle-name>/ with this layout:
<bundle-name>/
├── SKILL.md # *** UMBRELLA ENTRY POINT *** — makes the bundle
│ # loadable via skill_view() and discoverable by
│ # the agent's skill scanner on trigger keywords.
│ # CRITICAL: without this, the bundle is invisible.
├── README.md # Summary of this bundle
├── manifest.yaml # Skill-to-trigger mapping
├── skills/
│ ├── entry-skill.md # One per discovered phase
│ ├── phase-two.md
│ └── ...
├── decision-map.md # Mermaid flowchart
├── AGENTS.md # Agent loading instructions for this bundle
├── kanban/
│ └── board-definition.yaml # Only if kanban is appropriate
└── references/
└── generated-from.md # Metadata about how this bundle was created
The SKILL.md umbrella is not optional. Without it, individual sub-skills
may exist on disk but the agent's skill scanner has no entry point to match
trigger keywords against. The umbrella is how the agent discovers and enters
the bundle.
Bundle naming
Ask the user for a bundle name at the start of synthesis:
"Before I generate the bundle — what should I call it?
Something short, lowercase with hyphens, like 'my-triage-workflow'
or 'dev-sprint-routine'."
Fallback if user doesn't provide one: my-workflow-<archetype>-<date>.
Writing the files
For each file in the output bundle, use the shared templates in ../../templates/ as
starting points. Render them by substituting the state values.
Step-by-step file creation order:
Umbrella SKILL.md — MANDATORY FIRST STEP. This is the entry point
that makes the bundle discoverable. Write it directly to the bundle directory
as SKILL.md, then register it via skill_manage(action='create').
The umbrella must include:
name: <bundle-name> matching the bundle name
description with broad trigger keywords covering all common ways the
user enters this workflow (e.g., "I want to write about X", "I read
something interesting", "can you research this", "draft it", "ship it")
compatibility: Hermes Agent
metadata.tags including workflow, bundle, and domain-relevant tags
Body content:
# <Bundle Name>
A <N>-phase workflow covering <brief summary>.
## Pipeline
<Phase 1> → <Phase 2> → <Phase 3> → ...
(Include a Mermaid flowchart graph LR showing the phase sequence.)
## Sub-Skills
| Phase | Skill | Trigger |
|-------|-------|---------|
| <name> | `<bundle-name>/<phase-file>` | <when to load> |
| ... | ... | ... |
## Navigation
When you load this umbrella, identify which phase the user is in,
load the corresponding sub-skill via skill_view(), and follow its
instructions. Use the transition signals in each sub-skill to know
when to move to the next phase.
## Pipeline Heuristics
- Can the user enter at any phase, or must they start at Phase 1?
- Are any phases automatic (e.g., refine always follows draft)?
- What's the relationship between phases (sequential, branching, optional)?
Category choice: Place the bundle in a category that matches where its
sub-skills live (e.g., content for blogging pipelines, devops for
deployment workflows). Ask the user if unsure.
manifest.yaml — Use ../../templates/manifest.yaml.tmpl. Substitute:
{{BUNDLE_NAME}} — the bundle name
{{PHASES}} — each phase with its trigger keywords, entry signals,
typical tools, and exit signals
{{HAS_KANBAN}} — true/false based on kanban decision
README.md — Write from scratch (no template needed, it's prose).
Structure:
# <Bundle Name>
Generated by workflow-architect on <date>.
This bundle covers a <archetype>-style workflow with <N> phases.
## Skills
| Skill | Trigger | When it fires |
|-------|---------|---------------|
| <name> | <trigger description> | <when to load> |
## Loading
Skills in this bundle are loaded automatically by trigger conditions.
To load a specific skill: `skill_view(name='<bundle-name>/<skill-name>')`
## Kanban
(Only if kanban exists) This workflow maps to a kanban board with <N> lanes.
Sub-skills — For each phase in workflow-architect:state:phases,
generate a .md file in skills/ using ../../templates/skill-skeleton.md.
Naming convention: kebab-case-phase-name.md (e.g., morning-triage.md).
Each sub-skill file is a valid Agent Skills SKILL.md with:
name matching the filename (without .md)
description that includes trigger keywords from the phase's typical
openers and tools
compatibility: Compatible with any agent supporting the Agent Skills format
- Body sections:
- When to use — the trigger condition in natural language
- What to do — step-by-step instructions for the agent in this phase
- Transition signals — what the user typically says or does that
transitions out of this phase
- What to tell the user — guidance on how the agent should communicate
during this phase
decision-map.md — Use ../../templates/decision-map.md.tmpl. Substitute:
{{WORKFLOW_NAME}} — bundle name
{{PHASE_NODES}} — phase names
{{BRANCHING}} — decision diamonds
{{ENTRY}} — how sessions start
{{EXITS}} — how sessions end
AGENTS.md — Standard agent loading instructions for this bundle.
Short — just says which skills exist and when to load them.
kanban/ directory — Only if the kanban-decision-criteria.md reference
indicates kanban is appropriate. Generates three files:
a) kanban/board-setup.sh — Use ../../templates/kanban-board-setup.sh.tmpl.
Substitutes:
{{BOARD_SLUG}} — bundle name (kebab-case)
{{BOARD_NAME}} — title-case version or user-provided name
{{FIRST_PHASE_SKILL}} — skill file for the first phase
{{FIRST_PHASE_PRIORITY}} — priority for first-phase tasks
{{GENERATION_DATE}} — current date
The setup script creates the board via hermes kanban boards create
and prints instructions for adding work.
b) kanban/task-blueprints.yaml — Use ../../templates/kanban-task-blueprints.yaml.tmpl.
Substitutes:
{{BLUEPRINT_ENTRIES}} — one blueprint entry per phase, each with:
phase: — phase name (kebab-case)
title_template: — e.g. "Build: {{feature}}"
skill: — path to the sub-skill file (e.g. my-workflow/build)
default_priority: — descending from first phase (highest) to last
initial_status: — first phase = todo, rest = ready
body: — instructions for the worker: what skill to load,
definition of done, and transition to next phase
c) kanban/README.md — Brief usage guide explaining how to set up and
use the board. Structure:
# Kanban Board: <Bundle Name>
This workflow maps to a Hermes Kanban board with <N> phases in sequence.
## Setup
Run `kanban/board-setup.sh` to create the board:
```bash
bash kanban/board-setup.sh
The script creates the board and switches to it. If you prefer to set
it up manually:
hermes kanban boards create <bundle-name> --name "<Bundle Name>"
Task Lifecycle
<Phase 1> → <Phase 2> → <Phase 3>
Each phase's task depends on the previous phase's task completing.
When a task is done, the next phase's task auto-promotes to "ready"
and the dispatcher picks it up.
Adding Work
Create a task for the first phase:
hermes kanban create "Build: <feature description>" \\
--skill <bundle-name>/<phase-1-skill> \\
--priority 3
Then create subsequent-phase tasks with --parent pointing to the
first task's ID:
hermes kanban create "Review: <feature>" \\
--parent <task-id> \\
--skill <bundle-name>/<phase-2-skill> \\
--priority 2
Task Blueprints
See kanban/task-blueprints.yaml for template definitions of each
phase's task, including default priorities, skill mappings, and
worker instructions.
references/generated-from.md — Metadata about the generation process:
# Generated From
- **Skill:** workflow-architect
- **Mode:** active | passive
- **Date:** <date>
- **Archetype:** <archetype>
- **Convergence Score:** <score>
Register sub-skills with Hermes skill system — For each sub-skill .md
file written in step 3, register it so it appears in skills_list() and
can be loaded with skill_view(). This is the critical step that makes
generated skills actually usable by the agent.
For each sub-skill file in skills/<name>.md:
skill_manage(action='create',
name='<bundle-name>-<skill-name>',
content=read_file('<bundle-path>/skills/<name>.md')['content'],
category='generated')
This creates a proper skill directory with SKILL.md entry point, making
the sub-skill discoverable and loadable. The sub-skill's existing valid
Agent Skills frontmatter (name, description, license, tags) is used as-is.
Why separate registration is needed: The skill_manage() call also
handles the skill directory structure (SKILL.md at root, not <name>.md
in a skills/ subdirectory). Without this step, the sub-skill files exist
on disk but no Hermes mechanism discovers them. Only the umbrella SKILL.md
(registered in step 0) would be loadable.
Verification: After registering all sub-skills, verify at least one:
skill_view(name='<bundle-name>-<first-phase-name>')
If it errors, the registration failed — check that the sub-skill file's
frontmatter name field matches and the content has valid YAML.
Kanban Decision
Before generating kanban files, consult ../../references/kanban-decision-criteria.md
to decide whether a board is appropriate. The decision depends on the phases
and branching structure discovered:
- If phases form a clear linear sequence (A → B → C → D), kanban adds value
- If branching is emergent (session depends on context), kanban is likely inappropriate
- If the user mentioned waiting on others, hand-offs, or status tracking, kanban is a strong fit
Present the decision to the user:
"Your workflow has a [linear/emergent] structure. A kanban board [would/wouldn't]
add much value here because [reason]. [If yes: I'll add one to the bundle.]"
Register sub-skills — For each generated sub-skill .md file in
skills/, register it so Hermes can discover it via skill_view() and
skills_list():
For each sub-skill file `skills/<phase-name>.md`:
Read the file content
skill_manage(
action='create',
name='<bundle-name>/<phase-name>',
content=file_content
)
This makes each sub-skill loadable as skill_view('<bundle-name>/<phase-name>').
The bundle name prefix prevents naming collisions with other skills.
If skill_manage is not available in the agent's toolset, note this for
the user and suggest they run the registration manually.
Cleanup
After writing all files:
Verify the umbrella registered successfully:
skill_view(name='<bundle-name>')
If it returns status: available, proceed. If not found, re-run the
skill_manage(action='create') call.
Remove all workflow-architect:state:* memory entries
(memory(action='remove', target='memory', old_text='workflow-architect:state:'))
Remove all workflow-architect:state:* memory entries
(memory(action='remove', target='memory', old_text='workflow-architect:state:'))
Tell the user where the bundle was written and what it contains
Verify the umbrella loads correctly with skill_view(name='<bundle-name>')
— if it doesn't resolve, check that skill_manage(action='create') was run
and the SKILL.md has valid frontmatter
Verify at least one registered sub-skill loads:
skill_view(name='<bundle-name>-<first-phase-name>')
Suggest they enter the workflow via any trigger phrase covered by the
umbrella's description, or by manually loading the umbrella skill
When not to use
Do not load this skill without a converged workflow model — it requires the workflow-architect:state:* entries produced by the interviewer or observer. If the workflow has not been discovered yet, load the interviewer (active) or observer (passive) first.
1---2name: bundle-builder3description: Render accumulated workflow state from memory into a valid Agent Skills bundle directory for workflow-architect, with sub-skills, manifest, decision map, and optional kanban board. Loaded after the interviewer or observer achieves convergence.4license: MIT5---67# Bundle Builder — Workflow Synthesis Engine89This sub-skill is loaded after the interviewer (active mode) or observer10(passive mode) achieves convergence. It reads the accumulated workflow11state from memory and generates an output bundle directory.1213## Input1415All `workflow-architect:state:*` memory entries. Read them all at once:1617```18Read: workflow-architect:state:entry_points19Read: workflow-architect:state:phases20Read: workflow-architect:state:branching21Read: workflow-architect:state:pain_points22Read: workflow-architect:state:exit_criteria23```2425If any required fields are missing (entry_points, phases, branching, exit_criteria),26abort with a clear message about what's missing.2728## Output Structure2930The bundle is written to `~/.hermes/skills/<category>/<bundle-name>/` with this layout:3132```33<bundle-name>/34├── SKILL.md # *** UMBRELLA ENTRY POINT *** — makes the bundle35│ # loadable via skill_view() and discoverable by36│ # the agent's skill scanner on trigger keywords.37│ # CRITICAL: without this, the bundle is invisible.38├── README.md # Summary of this bundle39├── manifest.yaml # Skill-to-trigger mapping40├── skills/41│ ├── entry-skill.md # One per discovered phase42│ ├── phase-two.md43│ └── ...44├── decision-map.md # Mermaid flowchart45├── AGENTS.md # Agent loading instructions for this bundle46├── kanban/47│ └── board-definition.yaml # Only if kanban is appropriate48└── references/49 └── generated-from.md # Metadata about how this bundle was created50```5152**The `SKILL.md` umbrella is not optional.** Without it, individual sub-skills53may exist on disk but the agent's skill scanner has no entry point to match54trigger keywords against. The umbrella is how the agent discovers and enters55the bundle.5657### Bundle naming5859Ask the user for a bundle name at the start of synthesis:6061```62"Before I generate the bundle — what should I call it?63Something short, lowercase with hyphens, like 'my-triage-workflow'64or 'dev-sprint-routine'."65```6667Fallback if user doesn't provide one: `my-workflow-<archetype>-<date>`.6869### Writing the files7071For each file in the output bundle, use the shared templates in `../../templates/` as72starting points. Render them by substituting the state values.7374**Step-by-step file creation order:**75760. **Umbrella SKILL.md** — **MANDATORY FIRST STEP.** This is the entry point77 that makes the bundle discoverable. Write it directly to the bundle directory78 as `SKILL.md`, then register it via `skill_manage(action='create')`.7980 The umbrella must include:8182 - `name: <bundle-name>` matching the bundle name83 - `description` with **broad trigger keywords** covering all common ways the84 user enters this workflow (e.g., "I want to write about X", "I read85 something interesting", "can you research this", "draft it", "ship it")86 - `compatibility: Hermes Agent`87 - `metadata.tags` including `workflow`, `bundle`, and domain-relevant tags8889 Body content:9091 ```markdown92 # <Bundle Name>9394 A <N>-phase workflow covering <brief summary>.9596 ## Pipeline9798 <Phase 1> → <Phase 2> → <Phase 3> → ...99100 (Include a Mermaid flowchart graph LR showing the phase sequence.)101102 ## Sub-Skills103104 | Phase | Skill | Trigger |105 |-------|-------|---------|106 | <name> | `<bundle-name>/<phase-file>` | <when to load> |107 | ... | ... | ... |108109 ## Navigation110111 When you load this umbrella, identify which phase the user is in,112 load the corresponding sub-skill via skill_view(), and follow its113 instructions. Use the transition signals in each sub-skill to know114 when to move to the next phase.115116 ## Pipeline Heuristics117118 - Can the user enter at any phase, or must they start at Phase 1?119 - Are any phases automatic (e.g., refine always follows draft)?120 - What's the relationship between phases (sequential, branching, optional)?121 ```122123 **Category choice:** Place the bundle in a category that matches where its124 sub-skills live (e.g., `content` for blogging pipelines, `devops` for125 deployment workflows). Ask the user if unsure.1261. **manifest.yaml** — Use `../../templates/manifest.yaml.tmpl`. Substitute:127 - `{{BUNDLE_NAME}}` — the bundle name128 - `{{PHASES}}` — each phase with its trigger keywords, entry signals,129 typical tools, and exit signals130 - `{{HAS_KANBAN}}` — true/false based on kanban decision1311322. **README.md** — Write from scratch (no template needed, it's prose).133 Structure:134135 ```markdown136 # <Bundle Name>137138 Generated by workflow-architect on <date>.139140 This bundle covers a <archetype>-style workflow with <N> phases.141142 ## Skills143144 | Skill | Trigger | When it fires |145 |-------|---------|---------------|146 | <name> | <trigger description> | <when to load> |147148 ## Loading149150 Skills in this bundle are loaded automatically by trigger conditions.151 To load a specific skill: `skill_view(name='<bundle-name>/<skill-name>')`152153 ## Kanban154155 (Only if kanban exists) This workflow maps to a kanban board with <N> lanes.156 ```1571583. **Sub-skills** — For each phase in `workflow-architect:state:phases`,159 generate a `.md` file in `skills/` using `../../templates/skill-skeleton.md`.160161 Naming convention: `kebab-case-phase-name.md` (e.g., `morning-triage.md`).162163 Each sub-skill file is a valid Agent Skills SKILL.md with:164 - `name` matching the filename (without .md)165 - `description` that includes trigger keywords from the phase's typical166 openers and tools167 - `compatibility: Compatible with any agent supporting the Agent Skills format`168 - Body sections:169 - **When to use** — the trigger condition in natural language170 - **What to do** — step-by-step instructions for the agent in this phase171 - **Transition signals** — what the user typically says or does that172 transitions out of this phase173 - **What to tell the user** — guidance on how the agent should communicate174 during this phase1751764. **decision-map.md** — Use `../../templates/decision-map.md.tmpl`. Substitute:177 - `{{WORKFLOW_NAME}}` — bundle name178 - `{{PHASE_NODES}}` — phase names179 - `{{BRANCHING}}` — decision diamonds180 - `{{ENTRY}}` — how sessions start181 - `{{EXITS}}` — how sessions end1821835. **AGENTS.md** — Standard agent loading instructions for this bundle.184 Short — just says which skills exist and when to load them.1851866. **kanban/ directory** — Only if the kanban-decision-criteria.md reference187 indicates kanban is appropriate. Generates three files:188189 a) **kanban/board-setup.sh** — Use `../../templates/kanban-board-setup.sh.tmpl`.190 Substitutes:191 - `{{BOARD_SLUG}}` — bundle name (kebab-case)192 - `{{BOARD_NAME}}` — title-case version or user-provided name193 - `{{FIRST_PHASE_SKILL}}` — skill file for the first phase194 - `{{FIRST_PHASE_PRIORITY}}` — priority for first-phase tasks195 - `{{GENERATION_DATE}}` — current date196197 The setup script creates the board via `hermes kanban boards create`198 and prints instructions for adding work.199200 b) **kanban/task-blueprints.yaml** — Use `../../templates/kanban-task-blueprints.yaml.tmpl`.201 Substitutes:202 - `{{BLUEPRINT_ENTRIES}}` — one blueprint entry per phase, each with:203 - `phase:` — phase name (kebab-case)204 - `title_template:` — e.g. "Build: {{feature}}"205 - `skill:` — path to the sub-skill file (e.g. `my-workflow/build`)206 - `default_priority:` — descending from first phase (highest) to last207 - `initial_status:` — first phase = `todo`, rest = `ready`208 - `body:` — instructions for the worker: what skill to load,209 definition of done, and transition to next phase210211 c) **kanban/README.md** — Brief usage guide explaining how to set up and212 use the board. Structure:213214 ```markdown215 # Kanban Board: <Bundle Name>216217 This workflow maps to a Hermes Kanban board with <N> phases in sequence.218219 ## Setup220221 Run `kanban/board-setup.sh` to create the board:222 ```bash223 bash kanban/board-setup.sh224 ```225226 The script creates the board and switches to it. If you prefer to set227 it up manually:228 ```bash229 hermes kanban boards create <bundle-name> --name "<Bundle Name>"230 ```231232 ## Task Lifecycle233234 <Phase 1> → <Phase 2> → <Phase 3>235236 Each phase's task depends on the previous phase's task completing.237 When a task is done, the next phase's task auto-promotes to "ready"238 and the dispatcher picks it up.239240 ## Adding Work241242 Create a task for the first phase:243 ```bash244 hermes kanban create "Build: <feature description>" \\245 --skill <bundle-name>/<phase-1-skill> \\246 --priority 3247 ```248249 Then create subsequent-phase tasks with `--parent` pointing to the250 first task's ID:251 ```bash252 hermes kanban create "Review: <feature>" \\253 --parent <task-id> \\254 --skill <bundle-name>/<phase-2-skill> \\255 --priority 2256 ```257258 ## Task Blueprints259260 See `kanban/task-blueprints.yaml` for template definitions of each261 phase's task, including default priorities, skill mappings, and262 worker instructions.263 ```2642657. **references/generated-from.md** — Metadata about the generation process:266267 ```markdown268 # Generated From269270 - **Skill:** workflow-architect271 - **Mode:** active | passive272 - **Date:** <date>273 - **Archetype:** <archetype>274 - **Convergence Score:** <score>275 ```2762778. **Register sub-skills with Hermes skill system** — For each sub-skill `.md`278 file written in step 3, register it so it appears in `skills_list()` and279 can be loaded with `skill_view()`. This is the critical step that makes280 generated skills actually usable by the agent.281282 For each sub-skill file in `skills/<name>.md`:283284 ```python285 skill_manage(action='create',286 name='<bundle-name>-<skill-name>',287 content=read_file('<bundle-path>/skills/<name>.md')['content'],288 category='generated')289 ```290291 This creates a proper skill directory with `SKILL.md` entry point, making292 the sub-skill discoverable and loadable. The sub-skill's existing valid293 Agent Skills frontmatter (name, description, license, tags) is used as-is.294295 **Why separate registration is needed:** The `skill_manage()` call also296 handles the skill directory structure (`SKILL.md` at root, not `<name>.md`297 in a `skills/` subdirectory). Without this step, the sub-skill files exist298 on disk but no Hermes mechanism discovers them. Only the umbrella SKILL.md299 (registered in step 0) would be loadable.300301 **Verification:** After registering all sub-skills, verify at least one:302 ```python303 skill_view(name='<bundle-name>-<first-phase-name>')304 ```305306 If it errors, the registration failed — check that the sub-skill file's307 frontmatter `name` field matches and the content has valid YAML.308309## Kanban Decision310311Before generating kanban files, consult `../../references/kanban-decision-criteria.md`312to decide whether a board is appropriate. The decision depends on the phases313and branching structure discovered:314315- If phases form a clear linear sequence (A → B → C → D), kanban adds value316- If branching is emergent (session depends on context), kanban is likely inappropriate317- If the user mentioned waiting on others, hand-offs, or status tracking, kanban is a strong fit318319Present the decision to the user:320321```322"Your workflow has a [linear/emergent] structure. A kanban board [would/wouldn't]323add much value here because [reason]. [If yes: I'll add one to the bundle.]"324```3253268. **Register sub-skills** — For each generated sub-skill `.md` file in327 `skills/`, register it so Hermes can discover it via `skill_view()` and328 `skills_list()`:329330 ```331 For each sub-skill file `skills/<phase-name>.md`:332 Read the file content333 skill_manage(334 action='create',335 name='<bundle-name>/<phase-name>',336 content=file_content337 )338 ```339340 This makes each sub-skill loadable as `skill_view('<bundle-name>/<phase-name>')`.341 The bundle name prefix prevents naming collisions with other skills.342343 If `skill_manage` is not available in the agent's toolset, note this for344 the user and suggest they run the registration manually.345346## Cleanup347348After writing all files:3493501. Verify the umbrella registered successfully:351 ```352 skill_view(name='<bundle-name>')353 ```354 If it returns `status: available`, proceed. If not found, re-run the355 `skill_manage(action='create')` call.3563572. Remove all `workflow-architect:state:*` memory entries358 (`memory(action='remove', target='memory', old_text='workflow-architect:state:')`)3592. Remove all `workflow-architect:state:*` memory entries360 (`memory(action='remove', target='memory', old_text='workflow-architect:state:')`)3612. Tell the user where the bundle was written and what it contains3623. Verify the umbrella loads correctly with `skill_view(name='<bundle-name>')`363 — if it doesn't resolve, check that `skill_manage(action='create')` was run364 and the SKILL.md has valid frontmatter3654. Verify at least one registered sub-skill loads:366 `skill_view(name='<bundle-name>-<first-phase-name>')`3675. Suggest they enter the workflow via any trigger phrase covered by the368 umbrella's description, or by manually loading the umbrella skill369370## When not to use371372Do not load this skill without a converged workflow model — it requires the `workflow-architect:state:*` entries produced by the interviewer or observer. If the workflow has not been discovered yet, load the interviewer (active) or observer (passive) first.