From 0819f352695ad2cf99d4bc7b6d24f250a4ccf233 Mon Sep 17 00:00:00 2001 From: deepankar-sajwan Date: Thu, 14 May 2026 13:04:04 +0530 Subject: [PATCH] feat: auto-post test plan as comment on source GitHub issue or PR - Step 5 now saves the test plan to docs/test-plans/ first in all cases - If source is a GitHub issue, posts the plan as a comment on that issue - If source is a GitHub PR, posts the plan as a comment on that PR - Skips posting only for plain-text requirements (no issue/PR number) Co-Authored-By: Claude Sonnet 4.6 --- .../agents/quality-analyst/quality-analyst.md | 30 +++++++++++++++---- 1 file changed, 25 insertions(+), 5 deletions(-) diff --git a/claude/agents/quality-analyst/quality-analyst.md b/claude/agents/quality-analyst/quality-analyst.md index 25c28ab..3ff7c00 100644 --- a/claude/agents/quality-analyst/quality-analyst.md +++ b/claude/agents/quality-analyst/quality-analyst.md @@ -410,14 +410,34 @@ Use the quality-analyst-agent for --type ## Step 5 — Deliver the output -**GitHub context available:** +### 5a — Save the test plan file + +Always save the test plan first, regardless of source: + ```bash -gh issue comment --body "$(cat test-plan.md)" -gh pr comment --body "$(cat test-plan.md)" +# Save to docs/test-plans/ +docs/test-plans/--test-plan.md ``` -**No GitHub context:** -Save to `docs/test-plans/--test-plan.md` and print the path. +Print the saved path before posting. + +### 5b — Post as a comment on the source issue or PR + +If the source is a GitHub issue number, post the test plan as a comment on that issue: + +```bash +gh issue comment --repo / --body "$(cat docs/test-plans/--test-plan.md)" +``` + +If the source is a GitHub PR number, post on the PR: + +```bash +gh pr comment --repo / --body "$(cat docs/test-plans/--test-plan.md)" +``` + +If no GitHub issue or PR number is provided (plain-text requirement), skip posting and only print the saved file path. + +> **Always post on the same issue or PR from which the requirement was sourced.** Do not post on a different issue or PR. ---