From eb9a565dd3efb2c220615d8eef5428cff454b70e Mon Sep 17 00:00:00 2001 From: Hector Martinez Date: Mon, 22 Jun 2026 13:16:17 +0200 Subject: [PATCH] feat(agents): add action-hints footer to review, triage, and fix comments MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Users receiving agent comments don't know what commands are available. Add contextual "Next steps" footers so available actions are discoverable at the decision point — review (request-changes only), triage (sufficient only), and fix (always). Closes #1789, closes #2493, closes #2494 Co-Authored-By: Claude Opus 4.6 Signed-off-by: Hector Martinez --- .../scaffold/fullsend-repo/agents/triage.md | 8 ++++++++ .../scripts/process-fix-result-test.py | 13 +++++++++++++ .../fullsend-repo/scripts/process-fix-result.py | 8 ++++++++ .../fullsend-repo/skills/pr-review/SKILL.md | 17 +++++++++++++++-- 4 files changed, 44 insertions(+), 2 deletions(-) diff --git a/internal/scaffold/fullsend-repo/agents/triage.md b/internal/scaffold/fullsend-repo/agents/triage.md index 58cc303e0..b963b3a13 100644 --- a/internal/scaffold/fullsend-repo/agents/triage.md +++ b/internal/scaffold/fullsend-repo/agents/triage.md @@ -313,3 +313,11 @@ Information is sufficient for a developer to investigate and fix. - Do not present unverified assumptions with certainty. Convey uncertainty when appropriate. - Write in second person ("you") addressing the reporter. Do not use first person ("I") — the comment is from the triage system, not an individual. - If you include `label_actions`, the pipeline appends your label reason to the comment automatically — do not include label justifications in the `comment` field yourself. +- **Action hints footer (sufficient action only):** When `action` is `sufficient`, append the following footer to the end of the `comment` field. Omit it for all other actions (`insufficient`, `duplicate`, `prerequisites`, `question`). + + ```markdown + --- + **Next steps:** + - `/fs-code` — agent creates a PR to implement this issue + - `/fs-code ` — agent implements with your specific guidance + ``` diff --git a/internal/scaffold/fullsend-repo/scripts/process-fix-result-test.py b/internal/scaffold/fullsend-repo/scripts/process-fix-result-test.py index a69cc9d40..a38884268 100644 --- a/internal/scaffold/fullsend-repo/scripts/process-fix-result-test.py +++ b/internal/scaffold/fullsend-repo/scripts/process-fix-result-test.py @@ -165,6 +165,19 @@ def test_fix_without_path(self): self.assertIn("**typo in docs**:", body) self.assertNotIn("(`", body) + def test_action_hints_footer_present(self): + data = { + "summary": "Fixed.", + "tests_passed": True, + "actions": [ + {"type": "fix", "finding": "bug", "description": "Fixed"}, + ], + } + body = build_summary_body(data) + self.assertIn("**Next steps:**", body) + self.assertIn("/fs-review", body) + self.assertIn("/fs-fix", body) + post_summary = mod.post_summary MAX_COMMENT_LENGTH = mod.MAX_COMMENT_LENGTH diff --git a/internal/scaffold/fullsend-repo/scripts/process-fix-result.py b/internal/scaffold/fullsend-repo/scripts/process-fix-result.py index e80ed9e9a..bbc7f7848 100644 --- a/internal/scaffold/fullsend-repo/scripts/process-fix-result.py +++ b/internal/scaffold/fullsend-repo/scripts/process-fix-result.py @@ -88,6 +88,14 @@ def build_summary_body(data): if dp_text: sections.append(dp_text) + sections.append( + "\n---\n" + "**Next steps:**\n" + "- `/fs-review` — request a re-review of the changes\n" + "- `/fs-fix ` — run another fix pass with specific guidance\n" + "- Push commits directly — review re-runs automatically on push" + ) + sections.append( '\nUpdated by ' "fullsend fix agent" diff --git a/internal/scaffold/fullsend-repo/skills/pr-review/SKILL.md b/internal/scaffold/fullsend-repo/skills/pr-review/SKILL.md index 7d3226834..1ea8e697d 100644 --- a/internal/scaffold/fullsend-repo/skills/pr-review/SKILL.md +++ b/internal/scaffold/fullsend-repo/skills/pr-review/SKILL.md @@ -725,8 +725,21 @@ where `[open]` = `<` + `!--` and `[close]` = `--` + `>`. section. If there are no findings at all, set the body to the hidden SHA comment followed by a newline and "Looks good to me" — omit the `## Review` header and `### Findings` section entirely. -- **No footer.** Do not repeat the outcome or include boilerplate - about pushes clearing the review. +- **No general footer.** Do not repeat the outcome or include + boilerplate about pushes clearing the review. **Exception:** for + `request-changes` outcomes only, append an action-hints footer + after the findings: + + ```markdown + --- + **Next steps:** + - `/fs-fix` — agent addresses review findings automatically + - `/fs-fix ` — agent fixes with your specific guidance + - Push commits directly — review re-runs automatically on push + - `/fs-fix-stop` — disable automatic fix runs for this PR + ``` + + Omit this footer for `approve`, `comment`, and `reject` outcomes. If `PRIOR_REVIEW_PROVENANCE` starts with `unverifiable-`, include an info-level finding in the review output: