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
4 changes: 4 additions & 0 deletions pkg/cli/copilot-agents.go
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,10 @@ func deleteOldAgentFiles(verbose bool) error {
"create-agentic-workflow.agent.md",
"debug-agentic-workflow.agent.md",
"create-shared-agentic-workflow.agent.md",
"create-agentic-workflow.md",
"setup-agentic-workflows.md",
"update-agentic-workflows.md",
"upgrade-agentic-workflows.md",
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot also upgrade-agentic-workflows.md in That folder

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added upgrade-agentic-workflows.md to the deletion list in 5be30eb.


// Also delete the dangling singular form file from .github/aw/
Expand Down
38 changes: 38 additions & 0 deletions pkg/cli/copilot_agents_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,44 @@ func TestDeleteOldAgentFiles(t *testing.T) {
".github/aw/upgrade-agentic-workflow.md",
},
},
{
name: "deletes old non-.agent.md files from .github/agents",
filesToCreate: []string{
".github/agents/create-agentic-workflow.md",
".github/agents/setup-agentic-workflows.md",
".github/agents/update-agentic-workflows.md",
".github/agents/upgrade-agentic-workflows.md",
},
expectedDeleted: []string{
".github/agents/create-agentic-workflow.md",
".github/agents/setup-agentic-workflows.md",
".github/agents/update-agentic-workflows.md",
".github/agents/upgrade-agentic-workflows.md",
},
},
{
name: "deletes all old agent files together",
filesToCreate: []string{
".github/agents/create-agentic-workflow.agent.md",
".github/agents/debug-agentic-workflow.agent.md",
".github/agents/create-shared-agentic-workflow.agent.md",
".github/agents/create-agentic-workflow.md",
".github/agents/setup-agentic-workflows.md",
".github/agents/update-agentic-workflows.md",
".github/agents/upgrade-agentic-workflows.md",
".github/aw/upgrade-agentic-workflow.md",
},
expectedDeleted: []string{
".github/agents/create-agentic-workflow.agent.md",
".github/agents/debug-agentic-workflow.agent.md",
".github/agents/create-shared-agentic-workflow.agent.md",
".github/agents/create-agentic-workflow.md",
".github/agents/setup-agentic-workflows.md",
".github/agents/update-agentic-workflows.md",
".github/agents/upgrade-agentic-workflows.md",
".github/aw/upgrade-agentic-workflow.md",
},
},
{
name: "handles no files to delete",
filesToCreate: []string{},
Expand Down
2 changes: 1 addition & 1 deletion pkg/cli/templates/create-agentic-workflow.md

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

2 changes: 1 addition & 1 deletion pkg/cli/templates/create-shared-agentic-workflow.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ You are a conversational chat agent that interacts with the user to design secur
**Move Write Operations to Safe Outputs**
- Never grant direct write permissions in shared components
- Use `safe-outputs:` configuration for all write operations
- Common safe outputs: `create-issue`, `add-comment`, `create-pull-request`, `update-issue`
- Common safe outputs: `create-issue`, `add-comment`, `create-pull-request`, `update-issue`, `dispatch-workflow`
- Let consuming workflows decide which safe outputs to enable

**Process Agent Output in Safe Jobs**
Expand Down
8 changes: 8 additions & 0 deletions pkg/cli/templates/github-agentic-workflows.md
Original file line number Diff line number Diff line change
Expand Up @@ -568,6 +568,14 @@ The YAML frontmatter supports these fields:
target-repo: "owner/repo" # Optional: cross-repository
```
Publishes workflow artifacts to an orphaned git branch for persistent storage. Default allowed extensions include common non-executable types. Maximum file size is 50MB (51200 KB).
- `dispatch-workflow:` - Trigger other workflows with inputs
```yaml
safe-outputs:
dispatch-workflow:
workflows: [workflow-name] # Required: list of workflow names to allow
max: 3 # Optional: max dispatches (default: 1, max: 3)
```
Triggers other agentic workflows in the same repository using workflow_dispatch. Agent output includes `workflow_name` (without .md extension) and optional `inputs` (key-value pairs). Not supported for cross-repository operations.
- `create-code-scanning-alert:` - Generate SARIF security advisories
```yaml
safe-outputs:
Expand Down