Create a new conductor workflow (.wf file) from a plain-English description.
Guide the user through creating a new conductor workflow .wf file from scratch.
Resolve target directory: If the user provided a directory path as an argument, use it. Otherwise use the current working directory.
Validate the target directory is the root of a git repo:
git -C <target_dir> rev-parse --show-toplevel 2>/dev/null
<target_dir> is not a git repository. Please provide the root of a git repo."<target_dir>, stop and tell the user: "The path <target_dir> is inside a git repo but is not its root (root is <output>). Please provide the repo root."All subsequent paths in this skill are relative to <target_dir>.
Ensure .conductor/ exists: Check whether the required subdirectories are present:
ls <target_dir>/.conductor/agents/ <target_dir>/.conductor/workflows/ 2>/dev/null || echo "MISSING"
If either directory is missing, invoke /conductor-workflow-init <target_dir> (silently, no confirmation prompt needed) to create the full directory structure before continuing.
Read docs/workflow/engine.md for the full grammar, all constructs, and design rationale. This is the authoritative source — use it throughout this session.
Ask the user:
worktree for branch-level work, repo for repo-level work, or both)ticket_id, pr_url)If the user already provided this information as arguments to the skill, skip to step 2.
Run these commands to understand what's available:
ls <target_dir>/.conductor/agents/
ls <target_dir>/.conductor/workflows/
ls <target_dir>/.conductor/prompts/ 2>/dev/null || echo "(no prompts directory)"
Note the exact filenames (without .md/.wf extension) — these are the identifiers you can use in call statements. Do not suggest call targets that don't exist without noting they need to be created.
Design the .wf file using the correct DSL constructs. Key rules:
Structure:
workflow <name> {
meta {
description = "..."
trigger = "manual"
targets = ["worktree"] # or ["repo"] or ["worktree", "repo"]
}
inputs {
my_input required
optional_input default = "value"
}
# steps go here
}
Choosing constructs:
call <agent-name>if <step>.<marker> { ... } or unless <step>.<marker> { ... }while <step>.<marker> { max_iterations = N ... }do { ... } while <step>.<marker>parallel { call a; call b; call c }gate human_review { prompt = "..." timeout = "48h" on_timeout = fail }gate pr_checks { timeout = "2h" on_timeout = fail }always { call notify-result }call workflow <name>Loop options (required/optional):
max_iterations = N — required on while and do {} whilestuck_after = N — optional, must be < max_iterationson_max_iter = fail — optional, defaults to failContext threading:
{{prior_context}} — context string from the immediately preceding step{{prior_contexts}} — JSON array of all prior step contexts{{gate_feedback}} — feedback text from a human_review gatePrompt snippets (reusable .md files from .conductor/prompts/):
call review { with = ["review-diff-scope"] }
parallel { with = ["review-diff-scope"]; call review-security }
Workflow composition:
call workflow lint-fix
call workflow test-coverage { inputs { pr_url = "{{pr_url}}" } }
Avoid creating a cycle — check existing .wf files to ensure the workflow you're creating doesn't reference a workflow that would transitively reference it back.
Compare the call statements in your draft against the existing agents listed in step 2. For any agent that doesn't exist yet, note that you will need to create a stub .md file at .conductor/agents/<name>.md.
Stub format:
---