From e994496046ad60c6b419e49e919a92f9bdc9b6f6 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 16 Oct 2025 19:30:51 +0000 Subject: [PATCH 1/3] Initial plan From 08937662c436cd545f396e587b58865b4cf43a6b Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 16 Oct 2025 19:35:50 +0000 Subject: [PATCH 2/3] Initial exploration and planning Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> --- .github/workflows/brave.lock.yml | 35 ++++++++++++++++++- .../workflows/changeset-generator.lock.yml | 35 ++++++++++++++++++- .github/workflows/dev.lock.yml | 35 ++++++++++++++++++- .github/workflows/issue-classifier.lock.yml | 35 ++++++++++++++++++- .github/workflows/pdf-summary.lock.yml | 35 ++++++++++++++++++- .github/workflows/plan.lock.yml | 35 ++++++++++++++++++- .github/workflows/poem-bot.lock.yml | 35 ++++++++++++++++++- .github/workflows/q.lock.yml | 35 ++++++++++++++++++- .github/workflows/scout.lock.yml | 35 ++++++++++++++++++- .github/workflows/tidy.lock.yml | 35 ++++++++++++++++++- .github/workflows/unbloat-docs.lock.yml | 35 ++++++++++++++++++- 11 files changed, 374 insertions(+), 11 deletions(-) diff --git a/.github/workflows/brave.lock.yml b/.github/workflows/brave.lock.yml index b2c8b2f19d8..3a7c168e346 100644 --- a/.github/workflows/brave.lock.yml +++ b/.github/workflows/brave.lock.yml @@ -571,7 +571,40 @@ jobs: core.setOutput("comment-repo", `${context.repo.owner}/${context.repo.repo}`); return; } else if (eventName === "discussion_comment") { - core.info("Updating discussion comments is not supported by GitHub's GraphQL API"); + const discussionNumber = parseInt(endpoint.split(":")[1], 10); + const workflowLinkText = `Agentic [${workflowName}](${runUrl}) triggered by this discussion comment.`; + const { repository } = await github.graphql( + ` + query($owner: String!, $repo: String!, $num: Int!) { + repository(owner: $owner, name: $repo) { + discussion(number: $num) { + id + } + } + }`, + { owner: context.repo.owner, repo: context.repo.repo, num: discussionNumber } + ); + const discussionId = repository.discussion.id; + const result = await github.graphql( + ` + mutation($dId: ID!, $body: String!) { + addDiscussionComment(input: { discussionId: $dId, body: $body }) { + comment { + id + url + } + } + }`, + { dId: discussionId, body: workflowLinkText } + ); + const comment = result.addDiscussionComment.comment; + core.info(`Successfully created discussion comment with workflow link`); + core.info(`Comment ID: ${comment.id}`); + core.info(`Comment URL: ${comment.url}`); + core.info(`Comment Repo: ${context.repo.owner}/${context.repo.repo}`); + core.setOutput("comment-id", comment.id); + core.setOutput("comment-url", comment.url); + core.setOutput("comment-repo", `${context.repo.owner}/${context.repo.repo}`); return; } let eventTypeDescription; diff --git a/.github/workflows/changeset-generator.lock.yml b/.github/workflows/changeset-generator.lock.yml index 9ef7cf11890..973e233aaaf 100644 --- a/.github/workflows/changeset-generator.lock.yml +++ b/.github/workflows/changeset-generator.lock.yml @@ -568,7 +568,40 @@ jobs: core.setOutput("comment-repo", `${context.repo.owner}/${context.repo.repo}`); return; } else if (eventName === "discussion_comment") { - core.info("Updating discussion comments is not supported by GitHub's GraphQL API"); + const discussionNumber = parseInt(endpoint.split(":")[1], 10); + const workflowLinkText = `Agentic [${workflowName}](${runUrl}) triggered by this discussion comment.`; + const { repository } = await github.graphql( + ` + query($owner: String!, $repo: String!, $num: Int!) { + repository(owner: $owner, name: $repo) { + discussion(number: $num) { + id + } + } + }`, + { owner: context.repo.owner, repo: context.repo.repo, num: discussionNumber } + ); + const discussionId = repository.discussion.id; + const result = await github.graphql( + ` + mutation($dId: ID!, $body: String!) { + addDiscussionComment(input: { discussionId: $dId, body: $body }) { + comment { + id + url + } + } + }`, + { dId: discussionId, body: workflowLinkText } + ); + const comment = result.addDiscussionComment.comment; + core.info(`Successfully created discussion comment with workflow link`); + core.info(`Comment ID: ${comment.id}`); + core.info(`Comment URL: ${comment.url}`); + core.info(`Comment Repo: ${context.repo.owner}/${context.repo.repo}`); + core.setOutput("comment-id", comment.id); + core.setOutput("comment-url", comment.url); + core.setOutput("comment-repo", `${context.repo.owner}/${context.repo.repo}`); return; } let eventTypeDescription; diff --git a/.github/workflows/dev.lock.yml b/.github/workflows/dev.lock.yml index 187839ef79f..b7dfd6e7024 100644 --- a/.github/workflows/dev.lock.yml +++ b/.github/workflows/dev.lock.yml @@ -479,7 +479,40 @@ jobs: core.setOutput("comment-repo", `${context.repo.owner}/${context.repo.repo}`); return; } else if (eventName === "discussion_comment") { - core.info("Updating discussion comments is not supported by GitHub's GraphQL API"); + const discussionNumber = parseInt(endpoint.split(":")[1], 10); + const workflowLinkText = `Agentic [${workflowName}](${runUrl}) triggered by this discussion comment.`; + const { repository } = await github.graphql( + ` + query($owner: String!, $repo: String!, $num: Int!) { + repository(owner: $owner, name: $repo) { + discussion(number: $num) { + id + } + } + }`, + { owner: context.repo.owner, repo: context.repo.repo, num: discussionNumber } + ); + const discussionId = repository.discussion.id; + const result = await github.graphql( + ` + mutation($dId: ID!, $body: String!) { + addDiscussionComment(input: { discussionId: $dId, body: $body }) { + comment { + id + url + } + } + }`, + { dId: discussionId, body: workflowLinkText } + ); + const comment = result.addDiscussionComment.comment; + core.info(`Successfully created discussion comment with workflow link`); + core.info(`Comment ID: ${comment.id}`); + core.info(`Comment URL: ${comment.url}`); + core.info(`Comment Repo: ${context.repo.owner}/${context.repo.repo}`); + core.setOutput("comment-id", comment.id); + core.setOutput("comment-url", comment.url); + core.setOutput("comment-repo", `${context.repo.owner}/${context.repo.repo}`); return; } let eventTypeDescription; diff --git a/.github/workflows/issue-classifier.lock.yml b/.github/workflows/issue-classifier.lock.yml index e207f3849ff..aecbb1d663f 100644 --- a/.github/workflows/issue-classifier.lock.yml +++ b/.github/workflows/issue-classifier.lock.yml @@ -565,7 +565,40 @@ jobs: core.setOutput("comment-repo", `${context.repo.owner}/${context.repo.repo}`); return; } else if (eventName === "discussion_comment") { - core.info("Updating discussion comments is not supported by GitHub's GraphQL API"); + const discussionNumber = parseInt(endpoint.split(":")[1], 10); + const workflowLinkText = `Agentic [${workflowName}](${runUrl}) triggered by this discussion comment.`; + const { repository } = await github.graphql( + ` + query($owner: String!, $repo: String!, $num: Int!) { + repository(owner: $owner, name: $repo) { + discussion(number: $num) { + id + } + } + }`, + { owner: context.repo.owner, repo: context.repo.repo, num: discussionNumber } + ); + const discussionId = repository.discussion.id; + const result = await github.graphql( + ` + mutation($dId: ID!, $body: String!) { + addDiscussionComment(input: { discussionId: $dId, body: $body }) { + comment { + id + url + } + } + }`, + { dId: discussionId, body: workflowLinkText } + ); + const comment = result.addDiscussionComment.comment; + core.info(`Successfully created discussion comment with workflow link`); + core.info(`Comment ID: ${comment.id}`); + core.info(`Comment URL: ${comment.url}`); + core.info(`Comment Repo: ${context.repo.owner}/${context.repo.repo}`); + core.setOutput("comment-id", comment.id); + core.setOutput("comment-url", comment.url); + core.setOutput("comment-repo", `${context.repo.owner}/${context.repo.repo}`); return; } let eventTypeDescription; diff --git a/.github/workflows/pdf-summary.lock.yml b/.github/workflows/pdf-summary.lock.yml index ea6ed351878..961c8a25858 100644 --- a/.github/workflows/pdf-summary.lock.yml +++ b/.github/workflows/pdf-summary.lock.yml @@ -592,7 +592,40 @@ jobs: core.setOutput("comment-repo", `${context.repo.owner}/${context.repo.repo}`); return; } else if (eventName === "discussion_comment") { - core.info("Updating discussion comments is not supported by GitHub's GraphQL API"); + const discussionNumber = parseInt(endpoint.split(":")[1], 10); + const workflowLinkText = `Agentic [${workflowName}](${runUrl}) triggered by this discussion comment.`; + const { repository } = await github.graphql( + ` + query($owner: String!, $repo: String!, $num: Int!) { + repository(owner: $owner, name: $repo) { + discussion(number: $num) { + id + } + } + }`, + { owner: context.repo.owner, repo: context.repo.repo, num: discussionNumber } + ); + const discussionId = repository.discussion.id; + const result = await github.graphql( + ` + mutation($dId: ID!, $body: String!) { + addDiscussionComment(input: { discussionId: $dId, body: $body }) { + comment { + id + url + } + } + }`, + { dId: discussionId, body: workflowLinkText } + ); + const comment = result.addDiscussionComment.comment; + core.info(`Successfully created discussion comment with workflow link`); + core.info(`Comment ID: ${comment.id}`); + core.info(`Comment URL: ${comment.url}`); + core.info(`Comment Repo: ${context.repo.owner}/${context.repo.repo}`); + core.setOutput("comment-id", comment.id); + core.setOutput("comment-url", comment.url); + core.setOutput("comment-repo", `${context.repo.owner}/${context.repo.repo}`); return; } let eventTypeDescription; diff --git a/.github/workflows/plan.lock.yml b/.github/workflows/plan.lock.yml index f805c985ac8..91b66b56ff3 100644 --- a/.github/workflows/plan.lock.yml +++ b/.github/workflows/plan.lock.yml @@ -567,7 +567,40 @@ jobs: core.setOutput("comment-repo", `${context.repo.owner}/${context.repo.repo}`); return; } else if (eventName === "discussion_comment") { - core.info("Updating discussion comments is not supported by GitHub's GraphQL API"); + const discussionNumber = parseInt(endpoint.split(":")[1], 10); + const workflowLinkText = `Agentic [${workflowName}](${runUrl}) triggered by this discussion comment.`; + const { repository } = await github.graphql( + ` + query($owner: String!, $repo: String!, $num: Int!) { + repository(owner: $owner, name: $repo) { + discussion(number: $num) { + id + } + } + }`, + { owner: context.repo.owner, repo: context.repo.repo, num: discussionNumber } + ); + const discussionId = repository.discussion.id; + const result = await github.graphql( + ` + mutation($dId: ID!, $body: String!) { + addDiscussionComment(input: { discussionId: $dId, body: $body }) { + comment { + id + url + } + } + }`, + { dId: discussionId, body: workflowLinkText } + ); + const comment = result.addDiscussionComment.comment; + core.info(`Successfully created discussion comment with workflow link`); + core.info(`Comment ID: ${comment.id}`); + core.info(`Comment URL: ${comment.url}`); + core.info(`Comment Repo: ${context.repo.owner}/${context.repo.repo}`); + core.setOutput("comment-id", comment.id); + core.setOutput("comment-url", comment.url); + core.setOutput("comment-repo", `${context.repo.owner}/${context.repo.repo}`); return; } let eventTypeDescription; diff --git a/.github/workflows/poem-bot.lock.yml b/.github/workflows/poem-bot.lock.yml index b251fd2f7d0..737696e0af8 100644 --- a/.github/workflows/poem-bot.lock.yml +++ b/.github/workflows/poem-bot.lock.yml @@ -596,7 +596,40 @@ jobs: core.setOutput("comment-repo", `${context.repo.owner}/${context.repo.repo}`); return; } else if (eventName === "discussion_comment") { - core.info("Updating discussion comments is not supported by GitHub's GraphQL API"); + const discussionNumber = parseInt(endpoint.split(":")[1], 10); + const workflowLinkText = `Agentic [${workflowName}](${runUrl}) triggered by this discussion comment.`; + const { repository } = await github.graphql( + ` + query($owner: String!, $repo: String!, $num: Int!) { + repository(owner: $owner, name: $repo) { + discussion(number: $num) { + id + } + } + }`, + { owner: context.repo.owner, repo: context.repo.repo, num: discussionNumber } + ); + const discussionId = repository.discussion.id; + const result = await github.graphql( + ` + mutation($dId: ID!, $body: String!) { + addDiscussionComment(input: { discussionId: $dId, body: $body }) { + comment { + id + url + } + } + }`, + { dId: discussionId, body: workflowLinkText } + ); + const comment = result.addDiscussionComment.comment; + core.info(`Successfully created discussion comment with workflow link`); + core.info(`Comment ID: ${comment.id}`); + core.info(`Comment URL: ${comment.url}`); + core.info(`Comment Repo: ${context.repo.owner}/${context.repo.repo}`); + core.setOutput("comment-id", comment.id); + core.setOutput("comment-url", comment.url); + core.setOutput("comment-repo", `${context.repo.owner}/${context.repo.repo}`); return; } let eventTypeDescription; diff --git a/.github/workflows/q.lock.yml b/.github/workflows/q.lock.yml index 4785306c990..7e32cfb95e9 100644 --- a/.github/workflows/q.lock.yml +++ b/.github/workflows/q.lock.yml @@ -613,7 +613,40 @@ jobs: core.setOutput("comment-repo", `${context.repo.owner}/${context.repo.repo}`); return; } else if (eventName === "discussion_comment") { - core.info("Updating discussion comments is not supported by GitHub's GraphQL API"); + const discussionNumber = parseInt(endpoint.split(":")[1], 10); + const workflowLinkText = `Agentic [${workflowName}](${runUrl}) triggered by this discussion comment.`; + const { repository } = await github.graphql( + ` + query($owner: String!, $repo: String!, $num: Int!) { + repository(owner: $owner, name: $repo) { + discussion(number: $num) { + id + } + } + }`, + { owner: context.repo.owner, repo: context.repo.repo, num: discussionNumber } + ); + const discussionId = repository.discussion.id; + const result = await github.graphql( + ` + mutation($dId: ID!, $body: String!) { + addDiscussionComment(input: { discussionId: $dId, body: $body }) { + comment { + id + url + } + } + }`, + { dId: discussionId, body: workflowLinkText } + ); + const comment = result.addDiscussionComment.comment; + core.info(`Successfully created discussion comment with workflow link`); + core.info(`Comment ID: ${comment.id}`); + core.info(`Comment URL: ${comment.url}`); + core.info(`Comment Repo: ${context.repo.owner}/${context.repo.repo}`); + core.setOutput("comment-id", comment.id); + core.setOutput("comment-url", comment.url); + core.setOutput("comment-repo", `${context.repo.owner}/${context.repo.repo}`); return; } let eventTypeDescription; diff --git a/.github/workflows/scout.lock.yml b/.github/workflows/scout.lock.yml index 9466c032c74..196de888b2a 100644 --- a/.github/workflows/scout.lock.yml +++ b/.github/workflows/scout.lock.yml @@ -626,7 +626,40 @@ jobs: core.setOutput("comment-repo", `${context.repo.owner}/${context.repo.repo}`); return; } else if (eventName === "discussion_comment") { - core.info("Updating discussion comments is not supported by GitHub's GraphQL API"); + const discussionNumber = parseInt(endpoint.split(":")[1], 10); + const workflowLinkText = `Agentic [${workflowName}](${runUrl}) triggered by this discussion comment.`; + const { repository } = await github.graphql( + ` + query($owner: String!, $repo: String!, $num: Int!) { + repository(owner: $owner, name: $repo) { + discussion(number: $num) { + id + } + } + }`, + { owner: context.repo.owner, repo: context.repo.repo, num: discussionNumber } + ); + const discussionId = repository.discussion.id; + const result = await github.graphql( + ` + mutation($dId: ID!, $body: String!) { + addDiscussionComment(input: { discussionId: $dId, body: $body }) { + comment { + id + url + } + } + }`, + { dId: discussionId, body: workflowLinkText } + ); + const comment = result.addDiscussionComment.comment; + core.info(`Successfully created discussion comment with workflow link`); + core.info(`Comment ID: ${comment.id}`); + core.info(`Comment URL: ${comment.url}`); + core.info(`Comment Repo: ${context.repo.owner}/${context.repo.repo}`); + core.setOutput("comment-id", comment.id); + core.setOutput("comment-url", comment.url); + core.setOutput("comment-repo", `${context.repo.owner}/${context.repo.repo}`); return; } let eventTypeDescription; diff --git a/.github/workflows/tidy.lock.yml b/.github/workflows/tidy.lock.yml index a6961dc708e..84fb4aff849 100644 --- a/.github/workflows/tidy.lock.yml +++ b/.github/workflows/tidy.lock.yml @@ -418,7 +418,40 @@ jobs: core.setOutput("comment-repo", `${context.repo.owner}/${context.repo.repo}`); return; } else if (eventName === "discussion_comment") { - core.info("Updating discussion comments is not supported by GitHub's GraphQL API"); + const discussionNumber = parseInt(endpoint.split(":")[1], 10); + const workflowLinkText = `Agentic [${workflowName}](${runUrl}) triggered by this discussion comment.`; + const { repository } = await github.graphql( + ` + query($owner: String!, $repo: String!, $num: Int!) { + repository(owner: $owner, name: $repo) { + discussion(number: $num) { + id + } + } + }`, + { owner: context.repo.owner, repo: context.repo.repo, num: discussionNumber } + ); + const discussionId = repository.discussion.id; + const result = await github.graphql( + ` + mutation($dId: ID!, $body: String!) { + addDiscussionComment(input: { discussionId: $dId, body: $body }) { + comment { + id + url + } + } + }`, + { dId: discussionId, body: workflowLinkText } + ); + const comment = result.addDiscussionComment.comment; + core.info(`Successfully created discussion comment with workflow link`); + core.info(`Comment ID: ${comment.id}`); + core.info(`Comment URL: ${comment.url}`); + core.info(`Comment Repo: ${context.repo.owner}/${context.repo.repo}`); + core.setOutput("comment-id", comment.id); + core.setOutput("comment-url", comment.url); + core.setOutput("comment-repo", `${context.repo.owner}/${context.repo.repo}`); return; } let eventTypeDescription; diff --git a/.github/workflows/unbloat-docs.lock.yml b/.github/workflows/unbloat-docs.lock.yml index 3bcb51ff36f..0e59aa8d148 100644 --- a/.github/workflows/unbloat-docs.lock.yml +++ b/.github/workflows/unbloat-docs.lock.yml @@ -415,7 +415,40 @@ jobs: core.setOutput("comment-repo", `${context.repo.owner}/${context.repo.repo}`); return; } else if (eventName === "discussion_comment") { - core.info("Updating discussion comments is not supported by GitHub's GraphQL API"); + const discussionNumber = parseInt(endpoint.split(":")[1], 10); + const workflowLinkText = `Agentic [${workflowName}](${runUrl}) triggered by this discussion comment.`; + const { repository } = await github.graphql( + ` + query($owner: String!, $repo: String!, $num: Int!) { + repository(owner: $owner, name: $repo) { + discussion(number: $num) { + id + } + } + }`, + { owner: context.repo.owner, repo: context.repo.repo, num: discussionNumber } + ); + const discussionId = repository.discussion.id; + const result = await github.graphql( + ` + mutation($dId: ID!, $body: String!) { + addDiscussionComment(input: { discussionId: $dId, body: $body }) { + comment { + id + url + } + } + }`, + { dId: discussionId, body: workflowLinkText } + ); + const comment = result.addDiscussionComment.comment; + core.info(`Successfully created discussion comment with workflow link`); + core.info(`Comment ID: ${comment.id}`); + core.info(`Comment URL: ${comment.url}`); + core.info(`Comment Repo: ${context.repo.owner}/${context.repo.repo}`); + core.setOutput("comment-id", comment.id); + core.setOutput("comment-url", comment.url); + core.setOutput("comment-repo", `${context.repo.owner}/${context.repo.repo}`); return; } let eventTypeDescription; From 12e8c5339cbbd1fa107f518b2ad08ed5dc506cc1 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 16 Oct 2025 19:38:51 +0000 Subject: [PATCH 3/3] Update scout.md to always reply with a comment, even with no findings Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> --- .github/workflows/scout.lock.yml | 30 ++++++++++++++++++++++++++++-- .github/workflows/scout.md | 28 +++++++++++++++++++++++++++- 2 files changed, 55 insertions(+), 3 deletions(-) diff --git a/.github/workflows/scout.lock.yml b/.github/workflows/scout.lock.yml index 196de888b2a..2599ac0dab7 100644 --- a/.github/workflows/scout.lock.yml +++ b/.github/workflows/scout.lock.yml @@ -2001,15 +2001,19 @@ jobs: ## Research Guidelines + - **Always Respond**: You must ALWAYS post a comment, even if you found no relevant information - **Be Thorough**: Don't stop at the first search result - investigate deeply - **Be Critical**: Evaluate source quality and cross-check information - **Be Specific**: Provide concrete examples, code snippets, or implementation details when relevant - **Be Organized**: Structure your findings clearly with headers and bullet points - **Be Actionable**: Focus on practical insights that can be applied to the issue/PR - **Cite Sources**: Include links to important references and documentation + - **Report Null Results**: If searches yield no relevant results, explain what was searched and why nothing was found ## Output Format + **IMPORTANT**: You must ALWAYS post a comment with your findings, even if you did not find any relevant information. If you didn't find anything useful, explain what you searched for and why no relevant results were found. + Your research summary should be formatted as a comment with: ```markdown @@ -2018,7 +2022,7 @@ jobs: *Triggered by @${{ github.actor }}* ## Executive Summary - [Brief overview of key findings] + [Brief overview of key findings - or state that no relevant findings were discovered]
Click to expand detailed findings @@ -2049,6 +2053,28 @@ jobs:
``` + **If no relevant findings were discovered**, use this format: + + ```markdown + # 🔍 Scout Research Report + + *Triggered by @${{ github.actor }}* + + ## Executive Summary + No relevant findings were discovered for this research request. + + ## Search Conducted + - Query 1: [What you searched for] + - Query 2: [What you searched for] + - [...] + + ## Explanation + [Brief explanation of why no relevant results were found - e.g., topic too specific, no recent information available, search terms didn't match available content, etc.] + + ## Suggestions + [Optional: Suggestions for alternative searches or approaches that might yield better results] + ``` + ## SHORTER IS BETTER Focus on the most relevant and actionable information. Avoid overwhelming detail. Keep it concise and to the point. @@ -4322,7 +4348,7 @@ jobs: env: WORKFLOW_NAME: "Scout" WORKFLOW_DESCRIPTION: "No description provided" - WORKFLOW_MARKDOWN: "\n\n\n\n\n\n\n\n\n\n\n\n# Scout Deep Research Agent\n\nYou are the Scout agent - an expert research assistant that performs deep, comprehensive investigations using web search capabilities.\n\n## Mission\n\nWhen invoked with the `/scout` command in an issue or pull request comment, OR manually triggered with a research topic, you must:\n\n1. **Understand the Context**: Analyze the issue/PR content and the comment that triggered you, OR use the provided research topic\n2. **Identify Research Needs**: Determine what questions need answering or what information needs investigation\n3. **Conduct Deep Research**: Use the Tavily MCP search tools to gather comprehensive information\n4. **Synthesize Findings**: Create a well-organized, actionable summary of your research\n\n## Current Context\n\n- **Repository**: ${{ github.repository }}\n- **Triggering Content**: \"${{ needs.activation.outputs.text }}\"\n- **Research Topic** (if workflow_dispatch): \"${{ github.event.inputs.topic }}\"\n- **Issue/PR Number**: ${{ github.event.issue.number || github.event.pull_request.number }}\n- **Triggered by**: @${{ github.actor }}\n\n**Note**: If a research topic is provided above (from workflow_dispatch), use that as your primary research focus. Otherwise, analyze the triggering content to determine the research topic.\n\n## Research Process\n\n### 1. Context Analysis\n- Read the issue/PR title and body to understand the topic\n- Analyze the triggering comment to understand the specific research request\n- Identify key topics, questions, or problems that need investigation\n\n### 2. Research Strategy\n- Formulate targeted search queries based on the context\n- Use available research tools to find:\n - **Tavily**: Web search for technical documentation, best practices, recent developments\n - **DeepWiki**: GitHub repository documentation and Q&A for specific projects\n - **Microsoft Docs**: Official Microsoft documentation and guides\n - **Context7**: Semantic search over stored knowledge and documentation\n - **arXiv**: Academic research papers and preprints for scientific and technical topics\n- Conduct multiple searches from different angles if needed\n\n### 3. Deep Investigation\n- For each search result, evaluate:\n - **Relevance**: How directly it addresses the issue\n - **Authority**: Source credibility and expertise\n - **Recency**: How current the information is\n - **Applicability**: How it applies to this specific context\n- Follow up on promising leads with additional searches\n- Cross-reference information from multiple sources\n\n### 4. Synthesis and Reporting\nCreate a comprehensive research summary that includes:\n- **Executive Summary**: Quick overview of key findings\n- **Main Findings**: Detailed research results organized by topic\n- **Recommendations**: Specific, actionable suggestions based on research\n- **Sources**: Key references and links for further reading\n- **Next Steps**: Suggested actions based on the research\n\n## Research Guidelines\n\n- **Be Thorough**: Don't stop at the first search result - investigate deeply\n- **Be Critical**: Evaluate source quality and cross-check information\n- **Be Specific**: Provide concrete examples, code snippets, or implementation details when relevant\n- **Be Organized**: Structure your findings clearly with headers and bullet points\n- **Be Actionable**: Focus on practical insights that can be applied to the issue/PR\n- **Cite Sources**: Include links to important references and documentation\n\n## Output Format\n\nYour research summary should be formatted as a comment with:\n\n```markdown\n# 🔍 Scout Research Report\n\n*Triggered by @${{ github.actor }}*\n\n## Executive Summary\n[Brief overview of key findings]\n\n
\nClick to expand detailed findings\n## Research Findings\n\n### [Topic 1]\n[Detailed findings with sources]\n\n### [Topic 2]\n[Detailed findings with sources]\n\n[... additional topics ...]\n\n## Recommendations\n- [Specific actionable recommendation 1]\n- [Specific actionable recommendation 2]\n- [...]\n\n## Key Sources\n- [Source 1 with link]\n- [Source 2 with link]\n- [...]\n\n## Suggested Next Steps\n1. [Action item 1]\n2. [Action item 2]\n[...]\n
\n```\n\n## SHORTER IS BETTER\n\nFocus on the most relevant and actionable information. Avoid overwhelming detail. Keep it concise and to the point.\n\n## Important Notes\n\n- **Security**: Evaluate all sources critically - never execute untrusted code\n- **Relevance**: Stay focused on the issue/PR context - avoid tangential research\n- **Efficiency**: Balance thoroughness with time constraints\n- **Clarity**: Write for the intended audience (developers working on this repo)\n- **Attribution**: Always cite your sources with proper links\n\nRemember: Your goal is to provide valuable, actionable intelligence that helps resolve the issue or improve the pull request. Make every search count and synthesize information effectively.\n" + WORKFLOW_MARKDOWN: "\n\n\n\n\n\n\n\n\n\n\n\n# Scout Deep Research Agent\n\nYou are the Scout agent - an expert research assistant that performs deep, comprehensive investigations using web search capabilities.\n\n## Mission\n\nWhen invoked with the `/scout` command in an issue or pull request comment, OR manually triggered with a research topic, you must:\n\n1. **Understand the Context**: Analyze the issue/PR content and the comment that triggered you, OR use the provided research topic\n2. **Identify Research Needs**: Determine what questions need answering or what information needs investigation\n3. **Conduct Deep Research**: Use the Tavily MCP search tools to gather comprehensive information\n4. **Synthesize Findings**: Create a well-organized, actionable summary of your research\n\n## Current Context\n\n- **Repository**: ${{ github.repository }}\n- **Triggering Content**: \"${{ needs.activation.outputs.text }}\"\n- **Research Topic** (if workflow_dispatch): \"${{ github.event.inputs.topic }}\"\n- **Issue/PR Number**: ${{ github.event.issue.number || github.event.pull_request.number }}\n- **Triggered by**: @${{ github.actor }}\n\n**Note**: If a research topic is provided above (from workflow_dispatch), use that as your primary research focus. Otherwise, analyze the triggering content to determine the research topic.\n\n## Research Process\n\n### 1. Context Analysis\n- Read the issue/PR title and body to understand the topic\n- Analyze the triggering comment to understand the specific research request\n- Identify key topics, questions, or problems that need investigation\n\n### 2. Research Strategy\n- Formulate targeted search queries based on the context\n- Use available research tools to find:\n - **Tavily**: Web search for technical documentation, best practices, recent developments\n - **DeepWiki**: GitHub repository documentation and Q&A for specific projects\n - **Microsoft Docs**: Official Microsoft documentation and guides\n - **Context7**: Semantic search over stored knowledge and documentation\n - **arXiv**: Academic research papers and preprints for scientific and technical topics\n- Conduct multiple searches from different angles if needed\n\n### 3. Deep Investigation\n- For each search result, evaluate:\n - **Relevance**: How directly it addresses the issue\n - **Authority**: Source credibility and expertise\n - **Recency**: How current the information is\n - **Applicability**: How it applies to this specific context\n- Follow up on promising leads with additional searches\n- Cross-reference information from multiple sources\n\n### 4. Synthesis and Reporting\nCreate a comprehensive research summary that includes:\n- **Executive Summary**: Quick overview of key findings\n- **Main Findings**: Detailed research results organized by topic\n- **Recommendations**: Specific, actionable suggestions based on research\n- **Sources**: Key references and links for further reading\n- **Next Steps**: Suggested actions based on the research\n\n## Research Guidelines\n\n- **Always Respond**: You must ALWAYS post a comment, even if you found no relevant information\n- **Be Thorough**: Don't stop at the first search result - investigate deeply\n- **Be Critical**: Evaluate source quality and cross-check information\n- **Be Specific**: Provide concrete examples, code snippets, or implementation details when relevant\n- **Be Organized**: Structure your findings clearly with headers and bullet points\n- **Be Actionable**: Focus on practical insights that can be applied to the issue/PR\n- **Cite Sources**: Include links to important references and documentation\n- **Report Null Results**: If searches yield no relevant results, explain what was searched and why nothing was found\n\n## Output Format\n\n**IMPORTANT**: You must ALWAYS post a comment with your findings, even if you did not find any relevant information. If you didn't find anything useful, explain what you searched for and why no relevant results were found.\n\nYour research summary should be formatted as a comment with:\n\n```markdown\n# 🔍 Scout Research Report\n\n*Triggered by @${{ github.actor }}*\n\n## Executive Summary\n[Brief overview of key findings - or state that no relevant findings were discovered]\n\n
\nClick to expand detailed findings\n## Research Findings\n\n### [Topic 1]\n[Detailed findings with sources]\n\n### [Topic 2]\n[Detailed findings with sources]\n\n[... additional topics ...]\n\n## Recommendations\n- [Specific actionable recommendation 1]\n- [Specific actionable recommendation 2]\n- [...]\n\n## Key Sources\n- [Source 1 with link]\n- [Source 2 with link]\n- [...]\n\n## Suggested Next Steps\n1. [Action item 1]\n2. [Action item 2]\n[...]\n
\n```\n\n**If no relevant findings were discovered**, use this format:\n\n```markdown\n# 🔍 Scout Research Report\n\n*Triggered by @${{ github.actor }}*\n\n## Executive Summary\nNo relevant findings were discovered for this research request.\n\n## Search Conducted\n- Query 1: [What you searched for]\n- Query 2: [What you searched for]\n- [...]\n\n## Explanation\n[Brief explanation of why no relevant results were found - e.g., topic too specific, no recent information available, search terms didn't match available content, etc.]\n\n## Suggestions\n[Optional: Suggestions for alternative searches or approaches that might yield better results]\n```\n\n## SHORTER IS BETTER\n\nFocus on the most relevant and actionable information. Avoid overwhelming detail. Keep it concise and to the point.\n\n## Important Notes\n\n- **Security**: Evaluate all sources critically - never execute untrusted code\n- **Relevance**: Stay focused on the issue/PR context - avoid tangential research\n- **Efficiency**: Balance thoroughness with time constraints\n- **Clarity**: Write for the intended audience (developers working on this repo)\n- **Attribution**: Always cite your sources with proper links\n\nRemember: Your goal is to provide valuable, actionable intelligence that helps resolve the issue or improve the pull request. Make every search count and synthesize information effectively.\n" with: script: | const fs = require('fs'); diff --git a/.github/workflows/scout.md b/.github/workflows/scout.md index 554f81ed411..b9ef73c9abe 100644 --- a/.github/workflows/scout.md +++ b/.github/workflows/scout.md @@ -88,15 +88,19 @@ Create a comprehensive research summary that includes: ## Research Guidelines +- **Always Respond**: You must ALWAYS post a comment, even if you found no relevant information - **Be Thorough**: Don't stop at the first search result - investigate deeply - **Be Critical**: Evaluate source quality and cross-check information - **Be Specific**: Provide concrete examples, code snippets, or implementation details when relevant - **Be Organized**: Structure your findings clearly with headers and bullet points - **Be Actionable**: Focus on practical insights that can be applied to the issue/PR - **Cite Sources**: Include links to important references and documentation +- **Report Null Results**: If searches yield no relevant results, explain what was searched and why nothing was found ## Output Format +**IMPORTANT**: You must ALWAYS post a comment with your findings, even if you did not find any relevant information. If you didn't find anything useful, explain what you searched for and why no relevant results were found. + Your research summary should be formatted as a comment with: ```markdown @@ -105,7 +109,7 @@ Your research summary should be formatted as a comment with: *Triggered by @${{ github.actor }}* ## Executive Summary -[Brief overview of key findings] +[Brief overview of key findings - or state that no relevant findings were discovered]
Click to expand detailed findings @@ -136,6 +140,28 @@ Your research summary should be formatted as a comment with:
``` +**If no relevant findings were discovered**, use this format: + +```markdown +# 🔍 Scout Research Report + +*Triggered by @${{ github.actor }}* + +## Executive Summary +No relevant findings were discovered for this research request. + +## Search Conducted +- Query 1: [What you searched for] +- Query 2: [What you searched for] +- [...] + +## Explanation +[Brief explanation of why no relevant results were found - e.g., topic too specific, no recent information available, search terms didn't match available content, etc.] + +## Suggestions +[Optional: Suggestions for alternative searches or approaches that might yield better results] +``` + ## SHORTER IS BETTER Focus on the most relevant and actionable information. Avoid overwhelming detail. Keep it concise and to the point.