Skip to content

Commit 38a3cfb

Browse files
ci: standardize formatting and clarify reporting requirements in doc-check workflow
1 parent f1546aa commit 38a3cfb

File tree

1 file changed

+45
-32
lines changed

1 file changed

+45
-32
lines changed

.github/workflows/doc-check.yaml

Lines changed: 45 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -168,9 +168,9 @@ jobs:
168168
TASK_PROMPT=$(cat <<EOF
169169
Doc Check: PR #${PR_NUMBER} - Full Analysis
170170
171-
═══════════════════════════════════════════════════════════════
171+
═══════════════════════════════════════════════════════════
172172
NEW PR DOCUMENTATION CHECK - Full Analysis Required
173-
═══════════════════════════════════════════════════════════════
173+
═══════════════════════════════════════════════════════════
174174
175175
Review PR #${PR_NUMBER} and determine if documentation needs updating or creating.
176176
This is a NEW PR - perform a complete analysis from scratch.
@@ -182,46 +182,52 @@ jobs:
182182
⚠️ CRITICAL REQUIREMENTS:
183183
1. You MUST complete each step below and SHOW YOUR WORK.
184184
2. DO NOT skip steps. DO NOT make assumptions. DO NOT comment until Step 5.
185-
3. You MUST use coder_report_task MCP tool to report progress:
186-
- After each STEP completion, call coder_report_task with state="working" and a summary
187-
- After posting your comment, call coder_report_task with state="idle" to signal completion
188-
Example: coder_report_task(state="working", summary="Step 1 complete - fetched PR info")
189-
Example: coder_report_task(state="idle", summary="Analysis complete - posted comment")
185+
3. You MUST use the coder_report_task tool to report your progress:
190186
191-
The CI is monitoring your status - you MUST report "idle" when done or it will timeout!
187+
Tool: coder_report_task
188+
Parameters:
189+
- state: "working" | "idle"
190+
- summary: string (max 160 chars, no newlines)
191+
- link: optional URL (e.g., PR URL)
192192
193-
═══════════════════════════════════════════════════════════════
193+
REQUIRED CALLS:
194+
- After each STEP: coder_report_task(state="working", summary="Step N: <brief desc>")
195+
- FINAL STEP (after posting comment): coder_report_task(state="idle", summary="Complete", link="${PR_URL}")
196+
197+
⚠️ The CI monitors your state. You MUST call coder_report_task(state="idle") when finished or it will timeout!
198+
199+
═══════════════════════════════════════════════════════════
194200
STEP 1: Fetch and display PR info
195-
═══════════════════════════════════════════════════════════════
201+
═══════════════════════════════════════════════════════════
196202
Run these commands and SHOW THE OUTPUT:
197203
git fetch origin pull/${PR_NUMBER}/head:pr-${PR_NUMBER}
198204
git checkout pr-${PR_NUMBER}
199205
git log -1 --format="PR Title: %s%nAuthor: %an%nDate: %ad"
200206
201207
CHECKPOINT: State the PR title and what it claims to do.
202208
203-
═══════════════════════════════════════════════════════════════
209+
═══════════════════════════════════════════════════════════
204210
STEP 2: Review the actual diff
205-
═══════════════════════════════════════════════════════════════
211+
═══════════════════════════════════════════════════════════
206212
Run and SHOW KEY PORTIONS:
207213
git diff main...pr-${PR_NUMBER} --stat
208214
git diff main...pr-${PR_NUMBER} -- "*.go" "*.ts" "*.md" | head -200
209215
210216
CHECKPOINT: List the files changed and summarize what ACTUALLY changed.
211217
Include specific line references (e.g., "+// NewFunction added at line 45")
212218
213-
═══════════════════════════════════════════════════════════════
219+
═══════════════════════════════════════════════════════════
214220
STEP 3: Search existing documentation
215-
═══════════════════════════════════════════════════════════════
221+
═══════════════════════════════════════════════════════════
216222
Based on what you found in Step 2, search for related docs:
217223
grep -ri "relevant_term" ~/coder/docs/ --include="*.md" -l
218224
cat ~/coder/docs/manifest.json | jq '.routes[] | {title, path}' | head -30
219225
220226
CHECKPOINT: List which docs you searched and what you found (or didn't find).
221227
222-
═══════════════════════════════════════════════════════════════
228+
═══════════════════════════════════════════════════════════
223229
STEP 4: Make your determination WITH EVIDENCE
224-
═══════════════════════════════════════════════════════════════
230+
═══════════════════════════════════════════════════════════
225231
Answer these questions explicitly:
226232
1. What files were modified? (list them from Step 2)
227233
2. Is this user-facing? Why or why not?
@@ -235,9 +241,9 @@ jobs:
235241
236242
CHECKPOINT: State your decision and the SPECIFIC EVIDENCE from the diff that supports it.
237243
238-
═══════════════════════════════════════════════════════════════
244+
═══════════════════════════════════════════════════════════
239245
STEP 5: Post your comment (FINAL STEP - only after completing 1-4)
240-
═══════════════════════════════════════════════════════════════
246+
═══════════════════════════════════════════════════════════
241247
Now and ONLY now, post a comment on the PR using this format:
242248
243249
${COMMENT_FORMAT}
@@ -258,9 +264,9 @@ jobs:
258264
TASK_PROMPT=$(cat <<EOF
259265
Doc Check: PR #${PR_NUMBER} - Update
260266
261-
═══════════════════════════════════════════════════════════════
267+
═══════════════════════════════════════════════════════════
262268
PR UPDATE - Quick Documentation Re-check
263-
═══════════════════════════════════════════════════════════════
269+
═══════════════════════════════════════════════════════════
264270
265271
PR #${PR_NUMBER} has been UPDATED with new commits (trigger: ${TRIGGER_TYPE}).
266272
@@ -275,36 +281,43 @@ jobs:
275281
276282
⚠️ CRITICAL REQUIREMENTS:
277283
1. You MUST show your work before commenting. DO NOT skip steps.
278-
2. You MUST use coder_report_task MCP tool to report progress:
279-
- After each STEP, call coder_report_task with state="working" and a summary
280-
- After posting your comment, call coder_report_task with state="idle" to signal completion
281-
Example: coder_report_task(state="idle", summary="Posted update - no docs needed")
284+
2. You MUST use the coder_report_task tool to report your progress:
285+
286+
Tool: coder_report_task
287+
Parameters:
288+
- state: "working" | "idle"
289+
- summary: string (max 160 chars, no newlines)
290+
- link: optional URL
291+
292+
REQUIRED CALLS:
293+
- After each STEP: coder_report_task(state="working", summary="Step N: <brief desc>")
294+
- FINAL STEP (after posting comment): coder_report_task(state="idle", summary="Update complete", link="${PR_URL}")
282295
283-
The CI is monitoring your status - you MUST report "idle" when done or it will timeout!
296+
⚠️ The CI monitors your state. You MUST call coder_report_task(state="idle") when finished or it will timeout!
284297
285-
═══════════════════════════════════════════════════════════════
298+
═══════════════════════════════════════════════════════════
286299
STEP 1: Check what changed since last analysis
287-
═══════════════════════════════════════════════════════════════
300+
═══════════════════════════════════════════════════════════
288301
Run and SHOW OUTPUT:
289302
git fetch origin pull/${PR_NUMBER}/head:pr-${PR_NUMBER}
290303
git checkout pr-${PR_NUMBER}
291304
git log --oneline -5
292305
293306
CHECKPOINT: List the recent commits and what they claim to do.
294307
295-
═══════════════════════════════════════════════════════════════
308+
═══════════════════════════════════════════════════════════
296309
STEP 2: Quick diff review
297-
═══════════════════════════════════════════════════════════════
310+
═══════════════════════════════════════════════════════════
298311
Run and SHOW KEY CHANGES:
299312
git diff HEAD~3..HEAD --stat
300313
git diff HEAD~3..HEAD -- "*.md" | head -50 # Check if docs were updated
301314
302315
CHECKPOINT: Summarize what actually changed in the recent commits.
303316
Note any doc file changes.
304317
305-
═══════════════════════════════════════════════════════════════
318+
═══════════════════════════════════════════════════════════
306319
STEP 3: Make determination and post comment (FINAL STEP)
307-
═══════════════════════════════════════════════════════════════
320+
═══════════════════════════════════════════════════════════
308321
Based on Steps 1-2, post a BRIEF update comment:
309322
310323
UPDATE COMMENT FORMAT (keep it SHORT!):
@@ -498,7 +511,7 @@ jobs:
498511
MSG_COUNT=$(echo "$MESSAGES" | jq '.messages | length')
499512
echo "Retrieved ${MSG_COUNT} messages from task conversation"
500513
echo ""
501-
echo "$MESSAGES" | jq -r '.messages[] | "═══════════════════════════════════════════════════════════════\n[\(.role | ascii_upcase)]\n═══════════════════════════════════════════════════════════════\n\(.content)\n"' 2>/dev/null || echo "Failed to parse messages"
514+
echo "$MESSAGES" | jq -r '.messages[] | "═══════════════════════════════════════════════════════════\n[\(.role | ascii_upcase)]\n═══════════════════════════════════════════════════════════════\n\(.content)\n"' 2>/dev/null || echo "Failed to parse messages"
502515
else
503516
echo "No messages retrieved or task not accessible"
504517
fi

0 commit comments

Comments
 (0)