You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
2.**Check the `imports` array** for `.github/agents/` references:
82
+
- Imports can include paths like `.github/agents/my-agent.agent.md`
83
+
- These are custom agent files that need to be imported alongside the workflow
84
+
85
+
3.**Fetch referenced custom agents** from the source repository:
86
+
- Use `get_file_contents` to fetch each custom agent file from the source repository
87
+
- Custom agent files are markdown files with frontmatter and agent instructions
88
+
- Save each custom agent to `.github/agents/<agent-name>.agent.md` in this repository
89
+
90
+
4.**Note**: According to gh-aw documentation, only one custom agent file is allowed per workflow
91
+
92
+
## Step 4: Adapt the workflow for general use
74
93
75
94
The workflow from the source repository may contain project-specific references. Adapt it:
76
95
77
96
- Remove references specific to the source project (internal tools, specific file paths, project-specific patterns)
78
97
- Generalize the prompt to work across different repository types and languages
79
98
- Keep the core value and behavior of the workflow intact
80
99
- Preserve the frontmatter structure (triggers, permissions, safe-outputs, tools, timeout)
100
+
-**Preserve custom agent references** (engine.agent and imports) if they were imported
81
101
82
102
Save the adapted workflow to `workflows/<workflow-name>.md`.
83
103
84
-
## Step 4: Create the documentation page
104
+
## Step 5: Create the documentation page
85
105
86
106
Create a new file at `docs/<workflow-name>.md` following the established documentation pattern used by other docs pages in this repository. The documentation page MUST include these sections:
87
107
@@ -119,7 +139,7 @@ Create a new file at `docs/<workflow-name>.md` following the established documen
119
139
120
140
Study the existing docs pages (e.g., `docs/ci-doctor.md`, `docs/issue-triage.md`, `docs/plan.md`, `docs/daily-doc-updater.md`) to match the tone and style.
121
141
122
-
## Step 5: Update README.md
142
+
## Step 6: Update README.md
123
143
124
144
Add the new workflow to the appropriate section in `README.md`. The existing categories are:
125
145
@@ -137,18 +157,19 @@ Use the format: `- [<Emoji> <Title>](docs/<name>.md) - <Short description>`
137
157
138
158
If the workflow doesn't fit any existing category, create a new appropriately-named category section. Place it logically among the existing sections.
139
159
140
-
## Step 6: Compile the workflow
160
+
## Step 7: Compile the workflow
141
161
142
162
Run `gh aw compile --dir workflows` to generate the `.lock.yml` file for the new workflow.
143
163
144
164
If `gh aw` is not installed, install it first with `gh extension install github/gh-aw`.
145
165
146
-
## Step 7: Create a pull request
166
+
## Step 8: Create a pull request
147
167
148
168
Create a draft pull request with all the changes:
149
169
150
170
- The new workflow file in `workflows/`
151
171
- The compiled `.lock.yml` file
172
+
- Any imported custom agent files in `.github/agents/`
152
173
- The new documentation page in `docs/`
153
174
- The updated `README.md`
154
175
@@ -157,6 +178,7 @@ The PR description should include:
157
178
-**Source**: Link to the original workflow in the source repository
158
179
-**What it does**: Brief description of the workflow's purpose
159
180
-**Adaptations**: What was changed to generalize the workflow
181
+
-**Custom agents**: List any custom agent files that were imported
160
182
-**Category**: Which README section it was added to
0 commit comments