Skip to content
Closed
Changes from 3 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
93 changes: 93 additions & 0 deletions create.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,99 @@ Here ROOT is the location where you found this file. For example,

If you need to clarify requirements or discuss options, and you are working in an interactive agent chat system, do so interactively with the user. If running non-interactively, make reasonable assumptions based on the repository context.

## Reusable Components

GitHub Agentic Workflows supports modular, reusable components that can be imported into your workflows. This enables:

- **DRY Principle**: Avoid duplicating configuration across multiple workflows
- **Rapid Development**: Compose workflows by importing pre-built capabilities
- **Separation of Concerns**: Maintain tool configs, permissions, and prompts independently
- **Consistent Patterns**: Use battle-tested components for common patterns

### Common Reusable Components

**Orchestration** - Coordinate multiple workflows or agents

Import `shared/orchestration.md` when your workflow needs to delegate work to other workflows or AI agents:

```yaml
imports:
- shared/orchestration.md
safe-outputs:
dispatch-workflow:
workflows: [worker-a, worker-b]
max: 10
assign-to-agent:
name: copilot
Copy link

Copilot AI Feb 4, 2026

Choose a reason for hiding this comment

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

The value for the name field should be enclosed in quotes for consistency with the reference documentation in shared/orchestration.md, which shows name: "copilot".

Copilot uses AI. Check for mistakes.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed in commit 373ae7a. Changed to name: "copilot" with quotes.

max: 5
```

**Use cases**: Multi-phase initiatives, fan-out work distribution, coordinating specialized workers

**Monitoring** - Track workflow progress in GitHub Projects

Import `shared/projects.md` when your workflow should update project boards:

```yaml
imports:
- shared/projects.md
safe-outputs:
update-project:
project: https://github.com/orgs/myorg/projects/123
Copy link

Copilot AI Feb 4, 2026

Choose a reason for hiding this comment

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

The project URL should be enclosed in quotes for consistency with examples throughout the codebase. The shared/projects.md file and actual workflow examples consistently use quotes around project URLs.

Copilot uses AI. Check for mistakes.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed in commit 373ae7a. Project URLs now have quotes.

max: 10
create-project-status-update:
project: https://github.com/orgs/myorg/projects/123
max: 1
```

**Use cases**: Tracking workflow-created issues, periodic status updates, operational dashboards

**Reporting** - Consistent report formatting

Import `shared/reporting.md` for standardized report structure:

```yaml
imports:
- shared/reporting.md
```

**Use cases**: Daily/weekly status reports, test results, analysis summaries

### Discovering Available Components

Repositories using gh-aw often organize shared components in:

- `.github/workflows/shared/` - Core capabilities (reporting, data analysis, tool configs)
- `.github/workflows/shared/mcp/` - MCP server configurations

List available components:

```bash
ls .github/workflows/shared/
```

### Using Imports

Add imports to your workflow frontmatter:

```yaml
---
on: issues
imports:
- shared/orchestration.md
- shared/projects.md
- shared/mcp/tavily.md
---
```

The compiler merges imported configurations with your workflow's config. See [Packaging & Distribution](/gh-aw/guides/packaging-imports/) for complete details on import behavior and merge semantics.

### Learn More

- **[Orchestration Guide](/gh-aw/guides/orchestration/)** - Orchestrator/worker pattern for coordinating multiple workflows
- **[Projects & Monitoring Guide](/gh-aw/guides/monitoring/)** - Track workflow activities in GitHub Projects boards
- **[Packaging & Distribution Guide](/gh-aw/guides/packaging-imports/)** - Import system, versioning, and shared components

## Step 3: Review Changes

Check what files were changed or created:
Expand Down
Loading