Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
---
name: agentic-workflow-designer
description: Conversational skill that interviews users to design new agentic workflows
disable-model-invocation: true
---

# Workflow Designer

Use this skill to run a structured interview with users who know their goal but not the workflow syntax yet, then generate one complete workflow `.md` file.
Expand All @@ -12,7 +6,7 @@ Use this skill to run a structured interview with users who know their goal but

Use this before `.github/aw/create-agentic-workflow.md` when requirements are unclear or incomplete.

- Use `skills/agentic-workflow-designer/SKILL.md` to discover and confirm requirements.
- Use `.github/aw/designer.md` to discover and confirm requirements.
- Use `.github/aw/create-agentic-workflow.md` once requirements are clear and ready for implementation.
- Use `.github/aw/agentic-chat.md` when the user wants a specification/pseudo-code instead of a runnable workflow file.

Expand Down
4 changes: 2 additions & 2 deletions .github/skills/agentic-workflows/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ Load these files from `github/gh-aw` (they are not available locally).
- `.github/aw/debug-agentic-workflow.md`
- `.github/aw/dependabot.md`
- `.github/aw/deployment-status.md`
- `.github/aw/designer.md`
- `.github/aw/experiments.md`
- `.github/aw/github-agentic-workflows.md`
- `.github/aw/github-mcp-server.md`
Expand Down Expand Up @@ -70,9 +71,8 @@ Load these files from `github/gh-aw` (they are not available locally).
- `.github/aw/workflow-editing.md`
- `.github/aw/workflow-patterns.md`

- `.github/skills/agentic-workflow-designer/SKILL.md`
After loading the matching workflow prompt or skill, follow it directly:
- Design workflows from scratch via interview: `skills/agentic-workflow-designer/SKILL.md`
- Design workflows from scratch via interview: `.github/aw/designer.md`
- Create new workflows: `.github/aw/create-agentic-workflow.md`
Comment on lines 74 to 76
- Update existing workflows: `.github/aw/update-agentic-workflow.md`
- Debug, audit, or investigate workflows: `.github/aw/debug-agentic-workflow.md`
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/designer-drift-audit.lock.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions .github/workflows/designer-drift-audit.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ steps:
- name: Extract designer file metadata
run: |
# Skill file
SKILL=".github/skills/agentic-workflow-designer/SKILL.md"
SKILL=".github/aw/designer.md"
if [ -f "$SKILL" ]; then
{
echo "=== SKILL.md ==="
Expand Down Expand Up @@ -104,7 +104,7 @@ steps:

# Commits in the last 7 days that touched designer files
git log --oneline --since="7 days ago" -- \
.github/skills/agentic-workflow-designer/SKILL.md \
.github/aw/designer.md \
.github/agents/interactive-agent-designer.agent.md \
> /tmp/gh-aw/data/recent-designer-commits.txt 2>/dev/null || true

Expand Down
2 changes: 1 addition & 1 deletion docs/src/content/docs/setup/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ Commands are organized by workflow lifecycle: creating, building, testing, monit

#### `init`

Initialize repository for agentic workflows. Configures `.gitattributes`, creates the dispatcher skill file (`.github/skills/agentic-workflows/SKILL.md`), the workflow designer skill (`.github/skills/agentic-workflow-designer/SKILL.md`), creates the Agentic Workflows custom agent (`.github/agents/agentic-workflows.md`), and performs non-interactive setup. Enables MCP server integration by default (use `--no-mcp` to skip). Use `--no-skill` or `--no-agent` to skip either artifact, or `--engine` to select a non-Copilot engine and skip Copilot-specific artifacts.
Initialize repository for agentic workflows. Configures `.gitattributes`, creates the dispatcher skill file (`.github/skills/agentic-workflows/SKILL.md`), creates the Agentic Workflows custom agent (`.github/agents/agentic-workflows.md`), and performs non-interactive setup. Enables MCP server integration by default (use `--no-mcp` to skip). Use `--no-skill` or `--no-agent` to skip either artifact, or `--engine` to select a non-Copilot engine and skip Copilot-specific artifacts.

```bash wrap
gh aw init # Initialize repository with defaults (non-interactive)
Expand Down
85 changes: 25 additions & 60 deletions pkg/cli/copilot_agents.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,6 @@ var agenticWorkflowsSkillTemplate string
//go:embed data/agentic_workflows_fallback_aw_files.json
var agenticWorkflowsFallbackAWFiles string

//go:embed data/agentic_workflow_designer_skill.md
var agenticWorkflowDesignerSkillTemplate string

var listAgenticWorkflowsMarkdownFiles = fetchAgenticWorkflowsMarkdownFiles

// ensureAgenticWorkflowsDispatcher ensures that .github/skills/agentic-workflows/SKILL.md
Expand Down Expand Up @@ -104,63 +101,6 @@ func ensureAgenticWorkflowsDispatcher(verbose bool, skipInstructions bool) error
return nil
}

// ensureAgenticWorkflowDesignerSkill ensures that
// .github/skills/agentic-workflow-designer/SKILL.md exists and matches the
// bundled workflow designer skill content.
func ensureAgenticWorkflowDesignerSkill(verbose bool, skipInstructions bool) error {
copilotAgentsLog.Print("Ensuring agentic workflow designer skill")

if skipInstructions {
copilotAgentsLog.Print("Skipping skill creation: instructions disabled")
return nil
}

gitRoot, err := gitutil.FindGitRoot()
if err != nil {
return err // Not in a git repository, skip
}

targetDir := filepath.Join(gitRoot, ".github", "skills", "agentic-workflow-designer")
targetPath := filepath.Join(targetDir, "SKILL.md")

if err := fileutil.EnsureParentDir(targetPath, constants.DirPermPublic); err != nil {
return fmt.Errorf("failed to create .github/skills/agentic-workflow-designer directory: %w", err)
}

existingContent := ""
if content, err := os.ReadFile(targetPath); err == nil {
existingContent = string(content)
}

expectedContent := strings.TrimSpace(agenticWorkflowDesignerSkillTemplate)
if strings.TrimSpace(existingContent) == expectedContent {
copilotAgentsLog.Printf("Agentic workflow designer skill is up-to-date: %s", targetPath)
if verbose {
fmt.Fprintln(os.Stderr, console.FormatInfoMessage("Agentic workflow designer skill is up-to-date: "+targetPath))
}
return nil
}

if err := os.WriteFile(targetPath, []byte(agenticWorkflowDesignerSkillTemplate), constants.FilePermPublic); err != nil {
copilotAgentsLog.Printf("Failed to write agentic workflow designer skill: %s, error: %v", targetPath, err)
return fmt.Errorf("failed to write agentic workflow designer skill: %w", err)
}

if existingContent == "" {
copilotAgentsLog.Printf("Created agentic workflow designer skill: %s", targetPath)
if verbose {
fmt.Fprintln(os.Stderr, console.FormatSuccessMessage("Created agentic workflow designer skill: "+targetPath))
}
} else {
copilotAgentsLog.Printf("Updated agentic workflow designer skill: %s", targetPath)
if verbose {
fmt.Fprintln(os.Stderr, console.FormatSuccessMessage("Updated agentic workflow designer skill: "+targetPath))
}
}

return nil
}

// ensureAgenticWorkflowsAgent ensures that .github/agents/agentic-workflows.md contains the custom agent.
func ensureAgenticWorkflowsAgent(verbose bool) error {
copilotAgentsLog.Print("Ensuring agentic workflows custom agent")
Expand Down Expand Up @@ -323,6 +263,31 @@ func cleanupOldPromptFile(promptFileName string, verbose bool) error {
return nil
}

// deleteAgenticWorkflowDesignerSkillDir removes the legacy
// .github/skills/agentic-workflow-designer/ directory if it exists.
// The designer instructions are now bundled inside the agentic-workflows skill
// at .github/aw/designer.md (loaded on demand from
// github/gh-aw) and no longer need to be written to user repositories.
func deleteAgenticWorkflowDesignerSkillDir(verbose bool) error {
gitRoot, err := gitutil.FindGitRoot()
if err != nil {
return nil // Not in a git repository, skip
}

designerDir := filepath.Join(gitRoot, ".github", "skills", "agentic-workflow-designer")
if _, err := os.Stat(designerDir); os.IsNotExist(err) {
return nil // Already removed, nothing to do
}

if err := os.RemoveAll(designerDir); err != nil {
return fmt.Errorf("failed to remove legacy agentic-workflow-designer skill directory: %w", err)
}
if verbose {
fmt.Fprintln(os.Stderr, console.FormatInfoMessage("Removed legacy skill directory: "+designerDir))
}
return nil
}

// deleteSetupAgenticWorkflowsAgent deletes the setup-agentic-workflows.agent.md file if it exists
func deleteSetupAgenticWorkflowsAgent(verbose bool) error {
gitRoot, err := gitutil.FindGitRoot()
Expand Down
21 changes: 2 additions & 19 deletions pkg/cli/copilot_agents_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ func TestBuildAgenticWorkflowsSkillContent(t *testing.T) {
if strings.Contains(content, ".github/agents/agentic-workflows") {
t.Fatalf("expected generated skill content to avoid agent cross-references:\n%s", content)
}
assert.Contains(t, content, "Design workflows from scratch via interview: `skills/agentic-workflow-designer/SKILL.md`")
assert.Contains(t, content, "Design workflows from scratch via interview: `.github/aw/designer.md`")
}

func TestBuildAgenticWorkflowsSkillContentWithoutAWDirectory(t *testing.T) {
Expand Down Expand Up @@ -372,24 +372,7 @@ func TestBuildAgenticWorkflowsSkillContentFallsBackToEmbeddedFileList(t *testing

assert.NotContains(t, content, agenticWorkflowsSkillFileListPlaceholder, "expected generated skill content to replace the file-list placeholder")
assert.Contains(t, content, "- `.github/aw/create-agentic-workflow.md`\n", "expected embedded fallback markdown file list to be used")
assert.Contains(t, content, "- `.github/skills/agentic-workflow-designer/SKILL.md`\n", "expected generated skill content to include agentic-workflow-designer skill")
}

func TestCheckedInAgenticWorkflowDesignerSkillMatchesEmbeddedTemplate(t *testing.T) {
_, file, _, ok := runtime.Caller(0)
if !ok {
t.Fatal("Failed to locate test file")
}

gitRoot := filepath.Clean(filepath.Join(filepath.Dir(file), "..", ".."))
actual, err := os.ReadFile(filepath.Join(gitRoot, ".github", "skills", "agentic-workflow-designer", "SKILL.md"))
if err != nil {
t.Fatalf("Failed to read checked-in workflow designer skill file: %v", err)
}

if strings.TrimSpace(string(actual)) != strings.TrimSpace(agenticWorkflowDesignerSkillTemplate) {
t.Fatalf("Checked-in workflow designer skill file is out of sync with embedded template\nexpected:\n%s\nactual:\n%s", agenticWorkflowDesignerSkillTemplate, string(actual))
}
assert.Contains(t, content, "- `.github/aw/designer.md`\n", "expected generated skill content to include designer instruction file")
}

func TestCheckedInAgenticWorkflowsSkillMatchesGeneratedContent(t *testing.T) {
Expand Down
Loading