Campaign Recipe Authoring Skill
Guides users through a 6-phase interactive workflow to decompose a campaign goal into a validated campaign recipe YAML.
When to Use
- User says "make campaign", "create campaign", "author campaign", "new campaign recipe"
- User wants to decompose a campaign goal into dispatches
- User wants to orchestrate multiple recipe runs as a campaign
- User says "decompose into dispatches"
Critical Constraints
NEVER:
- Modify or write to any source code files
- Create files outside
.autoskillit/recipes/campaigns/(final output) or{{AUTOSKILLIT_TEMP}}/make-campaign/(temp/validation drafts) - Write the final campaign YAML without first passing
validate_recipein Phase 5 - Use recipe names not confirmed by
find_recipe_by_nameorlist_recipes - Accept ingredient keys that do not exist in the target recipe's declared ingredients
ALWAYS:
- Use
find_recipe_by_nameto confirm dispatch targets exist before accepting a recipe name - Use
load_recipeto inspect each target recipe'singredientsschema before populating dispatch ingredients - Validate the campaign YAML with
validate_recipebefore writing the final manifest - Emit the structured output token
campaign_pathas the absolute path to the written campaign YAML:
Usecampaign_path = /absolute/path/to/.autoskillit/recipes/campaigns/<name>.yaml$(pwd)to resolve the absolute path when writing the output file. - Run cycle detection on
depends_onbefore proceeding to Phase 5
Phase 1 — Goal Clarification
Prompt the user for the following information interactively:
- Campaign name (kebab-case, e.g.
my-feature-campaign) - Description (1–2 sentences describing the campaign's purpose)
- Target outcome (what the campaign achieves when all dispatches succeed)
- Rough dispatch count (how many dispatch phases the user anticipates)
continue_on_failure— should the campaign proceed if a dispatch fails? (default:false)categories— which recipe family this campaign targets (default:orchestration-family)requires_recipe_packs— which recipe pack(s) the dispatches will draw from (e.g.implementation-family)
Produce a Goal Artifact with: name, description, categories, requires_recipe_packs, continue_on_failure.
Phase 2 — Dispatch Decomposition
For each dispatch (repeat until the user signals done):
- Ask the user to describe the dispatch's task in one sentence.
- Call
list_recipesto show available recipes matching the declared packs. - Ask the user which recipe this dispatch targets.
- Verify the recipe exists by calling
find_recipe_by_name(or confirming fromlist_recipesresults).- If not found: show available options and re-prompt.
- If found: accept the recipe name.
- Capture:
name— kebab-case dispatch name (e.g.phase-1-implement)recipe— confirmed recipe nametask— non-empty task description
- Optionally allow the user to add entries to
allowed_recipesfor dispatches that use recipes outside the declared packs.
Do not proceed to Phase 3 until all dispatch names, recipes, and tasks are confirmed.
Phase 3 — Ingredient Population
For each dispatch captured in Phase 2:
- Call
load_recipeon the target recipe to inspect itsingredientsschema. - Present the ingredient table: name, description, required, default.
- For each ingredient the user wants to set:
- Ask for the value (string) or a campaign-level pass-through using
${{ inputs.<name> }}syntax. - Validate that the key exists in the target recipe's schema — reject unknown keys immediately.
- Ask for the value (string) or a campaign-level pass-through using
- Collect all key-value pairs as
ingredients: {key: "value"}under the dispatch.
Proceed to Phase 4 only after all dispatches have their ingredients populated (even if empty).
Phase 4 — Dependency Ordering
- Present all dispatches in capture order with their names.
- For each dispatch, ask: "Which earlier dispatches does this one depend on?" (comma-separated names, or none).
- Build the
depends_onadjacency map. - Run cycle detection (DFS):
- If a cycle is found: report the full cycle path (e.g.
a → b → c → a) and re-prompt affected dispatches. - Loop until the dependency graph is acyclic.
- If a cycle is found: report the full cycle path (e.g.
- Suggest the topological sort order; ask the user to confirm or adjust dispatch ordering.
Phase 5 — Schema Validation
- Assemble the complete campaign YAML from all captured data (Phases 1–4).
- Write a draft file (relative to the current working directory) to
{{AUTOSKILLIT_TEMP}}/make-campaign/<name>_draft.yaml. - Call
validate_recipewith the draft path. - If validation returns errors:
- Display each error with its rule name and message.
- Guide the user through the correction.
- Update the draft and re-call
validate_recipe. - Repeat until validation passes (structural + all 14 campaign semantic rules clean).
- Proceed to Phase 6 only when
validate_recipereports no errors.
Phase 6 — Manifest Write
Ensure the
.autoskillit/recipes/campaigns/directory exists (create withmkdir -pif absent).Write the validated YAML to
.autoskillit/recipes/campaigns/<name>.yaml.Print the absolute path of the written file.
Print the next-step hint:
Campaign recipe written. Use the dispatch_food_truck MCP tool (with kitchen open) to execute this campaign.
Output
Emit the structured output token on its own line:
campaign_path = {absolute_path_to_campaign_yaml}
Example:
campaign_path = /home/user/project/.autoskillit/recipes/campaigns/my-campaign.yaml