Skip to content

Commit b6f48c5

Browse files
authored
Add workflow status message style guide (#20052)
1 parent 4a22b99 commit b6f48c5

File tree

1 file changed

+110
-0
lines changed

1 file changed

+110
-0
lines changed

.github/aw/messages.md

Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
---
2+
description: Style guide for workflow status messages (all safe-outputs.messages template types).
3+
---
4+
5+
# Workflow Status Messages
6+
7+
Apply this guide when writing `safe-outputs.messages` in any workflow. Messages appear in GitHub issues, PR comments, and discussions.
8+
9+
## Rules
10+
11+
**Tone:** Plain and professional. Describe what the workflow does or what happened. No casual phrases ("Mission accomplished!", "Knowledge acquired!"), no dramatic language ("interrupted!", "crashed!"), no excitement punctuation (`!!`).
12+
13+
**Emoji:** One per message, at the start. Use the same emoji across `run-started`, `run-success`, `run-failure`, and `footer` for consistency. Do not append trailing emojis (`🏆`, ``, `📋`, etc.).
14+
15+
Emoji by domain: 🔍 search · 📐 architecture · 🔬 analysis/security · 📦 dependencies · 📝 docs · 🧪 testing · 🚀 release · 👀 review
16+
17+
## All Message Types
18+
19+
### Status messages (shown on the triggering issue/PR/discussion)
20+
21+
| Key | Variables | Default |
22+
|-----|-----------|---------|
23+
| `run-started` | `{workflow_name}`, `{run_url}`, `{event_type}` | `Agentic [{workflow_name}]({run_url}) triggered by this {event_type}.` |
24+
| `run-success` | `{workflow_name}`, `{run_url}` | `✅ Agentic [{workflow_name}]({run_url}) completed successfully.` |
25+
| `run-failure` | `{workflow_name}`, `{run_url}`, `{status}` | `❌ Agentic [{workflow_name}]({run_url}) {status} and wasn't able to produce a result.` |
26+
| `detection-failure` | `{workflow_name}`, `{run_url}` | `⚠️ Security scanning failed for [{workflow_name}]({run_url}). Review the logs for details.` |
27+
28+
### Footer messages (appended to every AI-generated comment/issue/PR)
29+
30+
| Key | Variables | Default |
31+
|-----|-----------|---------|
32+
| `footer` | `{workflow_name}`, `{run_url}`, `{triggering_number}`, `{workflow_source}`, `{workflow_source_url}` | *(system default)* |
33+
| `footer-install` | `{workflow_source}`, `{workflow_source_url}` | *(system default)* |
34+
| `footer-workflow-recompile` | `{workflow_name}`, `{run_url}`, `{repository}` | `> Workflow sync report by [{workflow_name}]({run_url}) for {repository}` |
35+
| `footer-workflow-recompile-comment` | `{workflow_name}`, `{run_url}`, `{repository}` | `> Update from [{workflow_name}]({run_url}) for {repository}` |
36+
| `agent-failure-issue` | `{workflow_name}`, `{run_url}` | `> Agent failure tracked by [{workflow_name}]({run_url})` |
37+
| `agent-failure-comment` | `{workflow_name}`, `{run_url}` | `> Agent failure update from [{workflow_name}]({run_url})` |
38+
39+
### Activation comment links (appended to `run-started` comment when resources are created)
40+
41+
| Key | Variables | Default |
42+
|-----|-----------|---------|
43+
| `pull-request-created` | `{item_number}`, `{item_url}` | `Pull request created: [#{item_number}]({item_url})` |
44+
| `issue-created` | `{item_number}`, `{item_url}` | `Issue created: [#{item_number}]({item_url})` |
45+
| `commit-pushed` | `{commit_sha}`, `{short_sha}`, `{commit_url}` | `Commit pushed: [\`{short_sha}\`]({commit_url})` |
46+
47+
### Staged mode messages (shown when `staged: true`)
48+
49+
| Key | Variables | Default |
50+
|-----|-----------|---------|
51+
| `staged-title` | `{operation}` | `🎭 Preview: {operation}` |
52+
| `staged-description` | `{operation}` | `The following {operation} would occur if staged mode was disabled:` |
53+
54+
### Boolean options
55+
56+
| Key | Default | Description |
57+
|-----|---------|-------------|
58+
| `append-only-comments` | `false` | When `true`, creates a new comment for completion instead of editing the activation comment |
59+
60+
## Templates
61+
62+
### `run-started`
63+
```
64+
"{emoji} [{workflow_name}]({run_url}) is [present-tense verb] for this {event_type}..."
65+
```
66+
End with `...`. Use `{event_type}` to show what triggered the run.
67+
68+
### `run-success`
69+
```
70+
"{emoji} [{workflow_name}]({run_url}) has [past-tense completion phrase]."
71+
```
72+
End with `.`. Be specific about what was produced or verified.
73+
74+
### `run-failure`
75+
```
76+
"{emoji} [{workflow_name}]({run_url}) {status}. [One sentence on what could not be completed]."
77+
```
78+
Include `{status}` to surface the failure reason. Keep the follow-up sentence factual.
79+
80+
### `footer`
81+
```
82+
"> {emoji} *[Action noun] by [{workflow_name}]({run_url})*{history_link}"
83+
```
84+
Blockquote + italics. Include `{history_link}` for navigation to run history.
85+
86+
## Examples
87+
88+
**Search workflow:**
89+
```yaml
90+
run-started: "🔍 [{workflow_name}]({run_url}) is searching the web for this {event_type}..."
91+
run-success: "🔍 [{workflow_name}]({run_url}) has completed the web search and posted results."
92+
run-failure: "🔍 [{workflow_name}]({run_url}) {status}. The search could not be completed."
93+
footer: "> 🔍 *Search results by [{workflow_name}]({run_url})*{history_link}"
94+
```
95+
96+
✅ **Compatibility checker:**
97+
```yaml
98+
run-started: "🔬 [{workflow_name}]({run_url}) is analyzing API compatibility for this {event_type}..."
99+
run-success: "🔬 [{workflow_name}]({run_url}) has completed the compatibility analysis."
100+
run-failure: "🔬 [{workflow_name}]({run_url}) {status}. The compatibility analysis could not be completed."
101+
footer: "> 🔬 *Compatibility report by [{workflow_name}]({run_url})*{history_link}"
102+
```
103+
104+
❌ **Avoid — casual language, mismatched emojis, trailing decorations:**
105+
```yaml
106+
run-started: "🔍 Brave Search activated! [{workflow_name}]({run_url}) is venturing into the web..."
107+
run-success: "🦁 Mission accomplished! [{workflow_name}]({run_url}) returned with findings. Knowledge acquired! 🏆"
108+
run-failure: "🔍 Search interrupted! [{workflow_name}]({run_url}) {status}. The web remains unexplored..."
109+
footer: "> 🦁 *Search results brought to you by [{workflow_name}]({run_url})*{history_link}"
110+
```

0 commit comments

Comments
 (0)