From 73d33e99d9cb911af7d35e81491fb4cf8af238ed Mon Sep 17 00:00:00 2001 From: Sebastien Taggart Date: Wed, 10 Jun 2026 08:09:16 -0400 Subject: [PATCH] Auto-post follow-up cross-link comment on originating issue after Step 9 follow-up creation --- .agents/skills/submit-for-review/SKILL.md | 23 ++++++++++++++++++++++- .claude/commands/submit-for-review.md | 23 ++++++++++++++++++++++- .cursor/rules/submit-for-review.mdc | 23 ++++++++++++++++++++++- .gemini/skills/submit-for-review/SKILL.md | 23 ++++++++++++++++++++++- skills/github-agile/submit-for-review.md | 21 +++++++++++++++++++++ 5 files changed, 109 insertions(+), 4 deletions(-) diff --git a/.agents/skills/submit-for-review/SKILL.md b/.agents/skills/submit-for-review/SKILL.md index b9e365a..e5e97f3 100644 --- a/.agents/skills/submit-for-review/SKILL.md +++ b/.agents/skills/submit-for-review/SKILL.md @@ -348,6 +348,27 @@ If a single `gh issue create` call fails, report the failure for that finding an - If one or more issues were created: `"Created N follow-up issue(s): #X, #Y, #Z"`. - If the user chose `none` or all creations were skipped: say nothing further, proceed to end. +**Post a cross-link comment on the originating issue.** If one or more follow-ups were created **and** a linked originating issue number was identified in Step 3, post a single comment on that issue listing the new follow-ups so a reader of the thread can see the trailing work without digging into the PR. Skip silently if no follow-ups were created or no originating issue is linked. + +Use your file-writing tool (not Bash) to create `/followup_link_comment.md` (same temp directory from Step 6): + +```markdown +## Follow-up tickets from PR # + +The code review on the PR for this issue surfaced non-blocking items tracked separately: + +- # +- # +``` + +Then post via the comment-posting script (do NOT use `gh issue comment` with `--body` or heredocs): + +``` +python3 CodeCannon/skills/github-agile/scripts/post-issue-comment.py /followup_link_comment.md +``` + +Use the unqualified `#N` form for all issue and PR references in the body. If `/submit-for-review` is later run again against the same originating issue and produces more follow-ups, a separate comment is posted then — comments accumulate naturally on the thread, each referencing its own PR. + --- ## Important constraints @@ -359,4 +380,4 @@ If a single `gh issue create` call fails, report the failure for that finding an - `/submit-for-review` merges only to `dev` — never directly to `main`. - If `make merge` fails for any reason, report it and stop — do not attempt workarounds. - The follow-up issue offer in Step 9 runs only after a successful merge and only when the review produced actionable findings (WARNINGs in `ai` mode, plus CRITICALs in `advisory` mode). Never prompt the user for follow-ups when the review blocked the merge — those findings should be fixed, not ticketed. NOTEs never become follow-up tickets. - + diff --git a/.claude/commands/submit-for-review.md b/.claude/commands/submit-for-review.md index 682cfe2..6499c9e 100644 --- a/.claude/commands/submit-for-review.md +++ b/.claude/commands/submit-for-review.md @@ -343,6 +343,27 @@ If a single `gh issue create` call fails, report the failure for that finding an - If one or more issues were created: `"Created N follow-up issue(s): #X, #Y, #Z"`. - If the user chose `none` or all creations were skipped: say nothing further, proceed to end. +**Post a cross-link comment on the originating issue.** If one or more follow-ups were created **and** a linked originating issue number was identified in Step 3, post a single comment on that issue listing the new follow-ups so a reader of the thread can see the trailing work without digging into the PR. Skip silently if no follow-ups were created or no originating issue is linked. + +Use your file-writing tool (not Bash) to create `/followup_link_comment.md` (same temp directory from Step 6): + +```markdown +## Follow-up tickets from PR # + +The code review on the PR for this issue surfaced non-blocking items tracked separately: + +- # +- # +``` + +Then post via the comment-posting script (do NOT use `gh issue comment` with `--body` or heredocs): + +``` +python3 CodeCannon/skills/github-agile/scripts/post-issue-comment.py /followup_link_comment.md +``` + +Use the unqualified `#N` form for all issue and PR references in the body. If `/submit-for-review` is later run again against the same originating issue and produces more follow-ups, a separate comment is posted then — comments accumulate naturally on the thread, each referencing its own PR. + --- ## Important constraints @@ -354,4 +375,4 @@ If a single `gh issue create` call fails, report the failure for that finding an - `/submit-for-review` merges only to `dev` — never directly to `main`. - If `make merge` fails for any reason, report it and stop — do not attempt workarounds. - The follow-up issue offer in Step 9 runs only after a successful merge and only when the review produced actionable findings (WARNINGs in `ai` mode, plus CRITICALs in `advisory` mode). Never prompt the user for follow-ups when the review blocked the merge — those findings should be fixed, not ticketed. NOTEs never become follow-up tickets. - + diff --git a/.cursor/rules/submit-for-review.mdc b/.cursor/rules/submit-for-review.mdc index c98f3d7..919c82f 100644 --- a/.cursor/rules/submit-for-review.mdc +++ b/.cursor/rules/submit-for-review.mdc @@ -349,6 +349,27 @@ If a single `gh issue create` call fails, report the failure for that finding an - If one or more issues were created: `"Created N follow-up issue(s): #X, #Y, #Z"`. - If the user chose `none` or all creations were skipped: say nothing further, proceed to end. +**Post a cross-link comment on the originating issue.** If one or more follow-ups were created **and** a linked originating issue number was identified in Step 3, post a single comment on that issue listing the new follow-ups so a reader of the thread can see the trailing work without digging into the PR. Skip silently if no follow-ups were created or no originating issue is linked. + +Use your file-writing tool (not Bash) to create `/followup_link_comment.md` (same temp directory from Step 6): + +```markdown +## Follow-up tickets from PR # + +The code review on the PR for this issue surfaced non-blocking items tracked separately: + +- # +- # +``` + +Then post via the comment-posting script (do NOT use `gh issue comment` with `--body` or heredocs): + +``` +python3 CodeCannon/skills/github-agile/scripts/post-issue-comment.py /followup_link_comment.md +``` + +Use the unqualified `#N` form for all issue and PR references in the body. If `/submit-for-review` is later run again against the same originating issue and produces more follow-ups, a separate comment is posted then — comments accumulate naturally on the thread, each referencing its own PR. + --- ## Important constraints @@ -360,4 +381,4 @@ If a single `gh issue create` call fails, report the failure for that finding an - `/submit-for-review` merges only to `dev` — never directly to `main`. - If `make merge` fails for any reason, report it and stop — do not attempt workarounds. - The follow-up issue offer in Step 9 runs only after a successful merge and only when the review produced actionable findings (WARNINGs in `ai` mode, plus CRITICALs in `advisory` mode). Never prompt the user for follow-ups when the review blocked the merge — those findings should be fixed, not ticketed. NOTEs never become follow-up tickets. - + diff --git a/.gemini/skills/submit-for-review/SKILL.md b/.gemini/skills/submit-for-review/SKILL.md index 1f58800..7d8c4a1 100644 --- a/.gemini/skills/submit-for-review/SKILL.md +++ b/.gemini/skills/submit-for-review/SKILL.md @@ -348,6 +348,27 @@ If a single `gh issue create` call fails, report the failure for that finding an - If one or more issues were created: `"Created N follow-up issue(s): #X, #Y, #Z"`. - If the user chose `none` or all creations were skipped: say nothing further, proceed to end. +**Post a cross-link comment on the originating issue.** If one or more follow-ups were created **and** a linked originating issue number was identified in Step 3, post a single comment on that issue listing the new follow-ups so a reader of the thread can see the trailing work without digging into the PR. Skip silently if no follow-ups were created or no originating issue is linked. + +Use your file-writing tool (not Bash) to create `/followup_link_comment.md` (same temp directory from Step 6): + +```markdown +## Follow-up tickets from PR # + +The code review on the PR for this issue surfaced non-blocking items tracked separately: + +- # +- # +``` + +Then post via the comment-posting script (do NOT use `gh issue comment` with `--body` or heredocs): + +``` +python3 CodeCannon/skills/github-agile/scripts/post-issue-comment.py /followup_link_comment.md +``` + +Use the unqualified `#N` form for all issue and PR references in the body. If `/submit-for-review` is later run again against the same originating issue and produces more follow-ups, a separate comment is posted then — comments accumulate naturally on the thread, each referencing its own PR. + --- ## Important constraints @@ -359,4 +380,4 @@ If a single `gh issue create` call fails, report the failure for that finding an - `/submit-for-review` merges only to `dev` — never directly to `main`. - If `make merge` fails for any reason, report it and stop — do not attempt workarounds. - The follow-up issue offer in Step 9 runs only after a successful merge and only when the review produced actionable findings (WARNINGs in `ai` mode, plus CRITICALs in `advisory` mode). Never prompt the user for follow-ups when the review blocked the merge — those findings should be fixed, not ticketed. NOTEs never become follow-up tickets. - + diff --git a/skills/github-agile/submit-for-review.md b/skills/github-agile/submit-for-review.md index eb59186..a3a59eb 100644 --- a/skills/github-agile/submit-for-review.md +++ b/skills/github-agile/submit-for-review.md @@ -388,6 +388,27 @@ If a single `gh issue create` call fails, report the failure for that finding an - If one or more issues were created: `"Created N follow-up issue(s): #X, #Y, #Z"`. - If the user chose `none` or all creations were skipped: say nothing further, proceed to end. +**Post a cross-link comment on the originating issue.** If one or more follow-ups were created **and** a linked originating issue number was identified in Step 3, post a single comment on that issue listing the new follow-ups so a reader of the thread can see the trailing work without digging into the PR. Skip silently if no follow-ups were created or no originating issue is linked. + +Use your file-writing tool (not Bash) to create `/followup_link_comment.md` (same temp directory from Step 6): + +```markdown +## Follow-up tickets from PR # + +The code review on the PR for this issue surfaced non-blocking items tracked separately: + +- # +- # +``` + +Then post via the comment-posting script (do NOT use `gh issue comment` with `--body` or heredocs): + +``` +python3 CodeCannon/skills/github-agile/scripts/post-issue-comment.py /followup_link_comment.md +``` + +Use the unqualified `#N` form for all issue and PR references in the body. If `/submit-for-review` is later run again against the same originating issue and produces more follow-ups, a separate comment is posted then — comments accumulate naturally on the thread, each referencing its own PR. + --- ## Important constraints