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
@@ -79,10 +98,11 @@ The workflow from the source repository may contain project-specific references.
79
98
- Keep the core value and behavior of the workflow intact
80
99
- Preserve the frontmatter structure (triggers, permissions, safe-outputs, tools, timeout)
81
100
- Add a `source:` field in the frontmatter pointing to the original workflow URL
101
+
-**Preserve custom agent references** (engine.agent and imports) if they were imported
82
102
83
103
Save the adapted workflow to `workflows/<workflow-name>.md`.
84
104
85
-
## Step 4: Create the documentation page
105
+
## Step 5: Create the documentation page
86
106
87
107
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:
88
108
@@ -120,7 +140,7 @@ Create a new file at `docs/<workflow-name>.md` following the established documen
120
140
121
141
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.
122
142
123
-
## Step 5: Update README.md
143
+
## Step 6: Update README.md
124
144
125
145
Add the new workflow to the appropriate section in `README.md`. The existing categories are:
126
146
@@ -138,18 +158,19 @@ Use the format: `- [<Emoji> <Title>](docs/<name>.md) - <Short description>`
138
158
139
159
If the workflow doesn't fit any existing category, create a new appropriately-named category section. Place it logically among the existing sections.
140
160
141
-
## Step 6: Compile the workflow
161
+
## Step 7: Compile the workflow
142
162
143
163
Run `gh aw compile --dir workflows` to generate the `.lock.yml` file for the new workflow.
144
164
145
165
If `gh aw` is not installed, install it first with `gh extension install github/gh-aw`.
146
166
147
-
## Step 7: Create a pull request
167
+
## Step 8: Create a pull request
148
168
149
169
Create a draft pull request with all the changes:
150
170
151
171
- The new workflow file in `workflows/`
152
172
- The compiled `.lock.yml` file
173
+
- Any imported custom agent files in `.github/agents/`
153
174
- The new documentation page in `docs/`
154
175
- The updated `README.md`
155
176
@@ -158,6 +179,7 @@ The PR description should include:
158
179
-**Source**: Link to the original workflow in the source repository
159
180
-**What it does**: Brief description of the workflow's purpose
160
181
-**Adaptations**: What was changed to generalize the workflow
182
+
-**Custom agents**: List any custom agent files that were imported
161
183
-**Category**: Which README section it was added to
0 commit comments