@link-assistant/hive-mind 0.52.1 → 0.53.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @link-assistant/hive-mind
2
2
 
3
+ ## 0.53.0
4
+
5
+ ### Minor Changes
6
+
7
+ - b750286: Add `--prompt-check-sibling-pull-requests` flag (default: true) to control whether the AI is prompted to study related/sibling pull requests during issue solving
8
+
3
9
  ## 0.52.1
4
10
 
5
11
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@link-assistant/hive-mind",
3
- "version": "0.52.1",
3
+ "version": "0.53.0",
4
4
  "description": "AI-powered issue solver and hive mind for collaborative problem solving",
5
5
  "main": "src/hive.mjs",
6
6
  "type": "module",
@@ -108,8 +108,12 @@ Initial research.
108
108
  - When you see screenshots or images in issue descriptions, pull request descriptions, comments, or discussions, use WebFetch tool to download the image first, then use Read tool to view and analyze it.
109
109
  - When you need issue details, use gh issue view https://github.com/${owner}/${repo}/issues/${issueNumber}.
110
110
  - When you need related code, use gh search code --owner ${owner} [keywords].
111
- - When you need repo context, read files in your working directory.
112
- - When you study related work, study the most recent related pull requests.
111
+ - When you need repo context, read files in your working directory.${
112
+ argv?.promptCheckSiblingPullRequests !== false
113
+ ? `
114
+ - When you study related work, study the most recent related pull requests.`
115
+ : ''
116
+ }
113
117
  - When issue is not defined enough, write a comment to ask clarifying questions.
114
118
  - When accessing GitHub Gists, use gh gist view command instead of direct URL fetching.
115
119
  - When you are fixing a bug, please make sure you first find the actual root cause, do as many experiments as needed.
@@ -100,8 +100,12 @@ export const buildSystemPrompt = params => {
100
100
  General guidelines.
101
101
  - When you execute commands, always save their logs to files for easier reading if the output becomes large.
102
102
  - When running commands, do not set a timeout yourself — let them run as long as needed (default timeout - 2 minutes is more than enough), and once they finish, review the logs in the file.
103
- - When running sudo commands (especially package installations like apt-get, yum, npm install, etc.), always run them in the background to avoid timeout issues and permission errors when the process needs to be killed. Use the run_in_background parameter or append & to the command.
104
- ${argv && argv.promptIssueReporting ? ` - When you spot any errors or bugs or minor issues during working session that are not related to requirements of the main task, create issues to track them if they do not exist yet. The issue should contain reproducible examples (ideally minimum reproducible example), workarounds, and suggestions for fixing the issue in code. For issues in the current repository, use gh issue create --repo ${owner}/${repo} --title "Issue title" --body "Issue description". For issues in third-party repositories on GitHub (libraries/components used in the working repository), use gh issue create --repo owner/repo --title "Issue title" --body "Issue description". Always check first if similar issues already exist using gh issue list --repo owner/repo --search "keywords" to avoid duplicates. If a similar issue already exists, add a comment to that issue using gh issue comment <issue-number> --repo owner/repo --body "Comment text" describing your specific case, including logs (anonymized with redacted personal and sensitive data), ways to reproduce, ideally minimum reproducible example, workarounds, and suggestions for fix - similar to how you would describe the issue if it didn't exist yet.` : ''}
103
+ - When running sudo commands (especially package installations like apt-get, yum, npm install, etc.), always run them in the background to avoid timeout issues and permission errors when the process needs to be killed. Use the run_in_background parameter or append & to the command.${
104
+ argv && argv.promptIssueReporting
105
+ ? `
106
+ - When you spot any errors or bugs or minor issues during working session that are not related to requirements of the main task, create issues to track them if they do not exist yet. The issue should contain reproducible examples (ideally minimum reproducible example), workarounds, and suggestions for fixing the issue in code. For issues in the current repository, use gh issue create --repo ${owner}/${repo} --title "Issue title" --body "Issue description". For issues in third-party repositories on GitHub (libraries/components used in the working repository), use gh issue create --repo owner/repo --title "Issue title" --body "Issue description". Always check first if similar issues already exist using gh issue list --repo owner/repo --search "keywords" to avoid duplicates. If a similar issue already exists, add a comment to that issue using gh issue comment <issue-number> --repo owner/repo --body "Comment text" describing your specific case, including logs (anonymized with redacted personal and sensitive data), ways to reproduce, ideally minimum reproducible example, workarounds, and suggestions for fix - similar to how you would describe the issue if it didn't exist yet.`
107
+ : ''
108
+ }
105
109
  - When CI is failing or user reports failures, consider adding a detailed investigation protocol to your todo list with these steps:
106
110
  Step 1: List recent runs with timestamps using: gh run list --repo ${owner}/${repo} --branch ${branchName} --limit 5 --json databaseId,conclusion,createdAt,headSha
107
111
  Step 2: Verify runs are after the latest commit by checking timestamps and SHA
@@ -124,8 +128,17 @@ Initial research.
124
128
  - When you see screenshots or images in issue descriptions, pull request descriptions, comments, or discussions, use WebFetch tool (or fetch tool) to download the image first, then use Read tool to view and analyze it. IMPORTANT: Before reading downloaded images with the Read tool, verify the file is a valid image (not HTML). Use a CLI tool like 'file' command to check the actual file format. Reading corrupted or non-image files (like GitHub's HTML 404 pages saved as .png) can cause "Could not process image" errors and may crash the AI solver process. If the file command shows "HTML" or "text", the download failed and you should retry or skip the image.
125
129
  - When you need issue details, use gh issue view https://github.com/${owner}/${repo}/issues/${issueNumber}.
126
130
  - When you need related code, use gh search code --owner ${owner} [keywords].
127
- - When you need repo context, read files in your working directory.${argv && argv.promptExploreSubAgent ? '\n - When you need to learn something about the codebase structure, patterns, or how things work, use the Task tool with subagent_type=Explore to thoroughly explore the codebase.' : ''}
128
- - When you study related work, study the most recent related pull requests.
131
+ - When you need repo context, read files in your working directory.${
132
+ argv && argv.promptExploreSubAgent
133
+ ? `
134
+ - When you need to learn something about the codebase structure, patterns, or how things work, use the Task tool with subagent_type=Explore to thoroughly explore the codebase.`
135
+ : ''
136
+ }${
137
+ argv?.promptCheckSiblingPullRequests !== false
138
+ ? `
139
+ - When you study related work, study the most recent related pull requests.`
140
+ : ''
141
+ }
129
142
  - When issue is not defined enough, write a comment to ask clarifying questions.
130
143
  - When accessing GitHub Gists (especially private ones), use gh gist view command instead of direct URL fetching to ensure proper authentication.
131
144
  - When you are fixing a bug, please make sure you first find the actual root cause, do as many experiments as needed.
@@ -135,7 +148,17 @@ Initial research.
135
148
  2. PR conversation comments (general discussion): gh api repos/${owner}/${repo}/issues/${prNumber}/comments --paginate
136
149
  3. PR reviews (approve/request changes): gh api repos/${owner}/${repo}/pulls/${prNumber}/reviews --paginate
137
150
  IMPORTANT: The command "gh pr view --json comments" ONLY returns conversation comments and misses review comments!
138
- - When you need latest comments on issue, use gh api repos/${owner}/${repo}/issues/${issueNumber}/comments --paginate.${argv && argv.promptGeneralPurposeSubAgent ? '\n - When the task is big and requires processing of lots of files or folders, you should use the `general-purpose` sub agents to delegate work. Each separate file or folder can be delegated to a sub agent for more efficient processing.' : ''}${argv && argv.promptCaseStudies ? `\n - When working on this issue, create a comprehensive case study in the ./docs/case-studies/issue-${issueNumber}/ directory. Download all logs and data related to the issue to the repository. Perform deep case study analysis by searching online for additional facts and data, reconstructing the timeline/sequence of events, identifying root causes of the problem, and proposing possible solutions. Include files like README.md (executive summary, problem statement, timeline, root cause), TECHNICAL_SUMMARY.md (deep technical analysis), ANALYSIS.md (detailed investigation findings), improvements.md (proposed solutions), and supporting logs/data files.` : ''}
151
+ - When you need latest comments on issue, use gh api repos/${owner}/${repo}/issues/${issueNumber}/comments --paginate.${
152
+ argv && argv.promptGeneralPurposeSubAgent
153
+ ? `
154
+ - When the task is big and requires processing of lots of files or folders, you should use the \`general-purpose\` sub agents to delegate work. Each separate file or folder can be delegated to a sub agent for more efficient processing.`
155
+ : ''
156
+ }${
157
+ argv && argv.promptCaseStudies
158
+ ? `
159
+ - When working on this issue, create a comprehensive case study in the ./docs/case-studies/issue-${issueNumber}/ directory. Download all logs and data related to the issue to the repository. Perform deep case study analysis by searching online for additional facts and data, reconstructing the timeline/sequence of events, identifying root causes of the problem, and proposing possible solutions. Include files like README.md (executive summary, problem statement, timeline, root cause), TECHNICAL_SUMMARY.md (deep technical analysis), ANALYSIS.md (detailed investigation findings), improvements.md (proposed solutions), and supporting logs/data files.`
160
+ : ''
161
+ }
139
162
 
140
163
  Solution development and testing.
141
164
  - When issue is solvable, implement code with tests.
@@ -196,7 +219,29 @@ GitHub CLI command patterns.
196
219
  - When adding PR comment, use gh pr comment NUMBER --body "text" --repo OWNER/REPO.
197
220
  - When adding issue comment, use gh issue comment NUMBER --body "text" --repo OWNER/REPO.
198
221
  - When viewing PR details, use gh pr view NUMBER --repo OWNER/REPO.
199
- - When filtering with jq, use gh api repos/\${owner}/\${repo}/pulls/\${prNumber}/comments --paginate --jq 'reverse | .[0:5]'.${argv && argv.promptPlaywrightMcp ? '\n\nPlaywright MCP usage (browser automation via mcp__playwright__* tools).\n - When you develop frontend web applications (HTML, CSS, JavaScript, React, Vue, Angular, etc.), use Playwright MCP tools to test the UI in a real browser.\n - When WebFetch tool fails to retrieve expected content (e.g., returns empty content, JavaScript-rendered pages, or login-protected pages), use Playwright MCP tools (browser_navigate, browser_snapshot) as a fallback for web browsing.\n - When you need to interact with dynamic web pages that require JavaScript execution, use Playwright MCP tools.\n - When you need to visually verify how a web page looks or take screenshots, use browser_take_screenshot from Playwright MCP.\n - When you need to fill forms, click buttons, or perform user interactions on web pages, use Playwright MCP tools (browser_click, browser_type, browser_fill_form).\n - When you need to test responsive design or different viewport sizes, use browser_resize from Playwright MCP.\n - When you finish using the browser, always close it with browser_close to free resources.' : ''}${argv && argv.promptPlanSubAgent ? '\n\nPlan sub-agent usage.\n - When you start working on a task, consider using the Plan sub-agent to research the codebase and create an implementation plan.\n - When using the Plan sub-agent, you can add it as the first item in your todo list.\n - When you delegate planning, use the Task tool with subagent_type="Plan" before starting implementation work.' : ''}`;
222
+ - When filtering with jq, use gh api repos/\${owner}/\${repo}/pulls/\${prNumber}/comments --paginate --jq 'reverse | .[0:5]'.${
223
+ argv && argv.promptPlaywrightMcp
224
+ ? `
225
+
226
+ Playwright MCP usage (browser automation via mcp__playwright__* tools).
227
+ - When you develop frontend web applications (HTML, CSS, JavaScript, React, Vue, Angular, etc.), use Playwright MCP tools to test the UI in a real browser.
228
+ - When WebFetch tool fails to retrieve expected content (e.g., returns empty content, JavaScript-rendered pages, or login-protected pages), use Playwright MCP tools (browser_navigate, browser_snapshot) as a fallback for web browsing.
229
+ - When you need to interact with dynamic web pages that require JavaScript execution, use Playwright MCP tools.
230
+ - When you need to visually verify how a web page looks or take screenshots, use browser_take_screenshot from Playwright MCP.
231
+ - When you need to fill forms, click buttons, or perform user interactions on web pages, use Playwright MCP tools (browser_click, browser_type, browser_fill_form).
232
+ - When you need to test responsive design or different viewport sizes, use browser_resize from Playwright MCP.
233
+ - When you finish using the browser, always close it with browser_close to free resources.`
234
+ : ''
235
+ }${
236
+ argv && argv.promptPlanSubAgent
237
+ ? `
238
+
239
+ Plan sub-agent usage.
240
+ - When you start working on a task, consider using the Plan sub-agent to research the codebase and create an implementation plan.
241
+ - When using the Plan sub-agent, you can add it as the first item in your todo list.
242
+ - When you delegate planning, use the Task tool with subagent_type="Plan" before starting implementation work.`
243
+ : ''
244
+ }`;
200
245
  };
201
246
 
202
247
  // Export all functions as default object too
@@ -116,8 +116,12 @@ Initial research.
116
116
  - When you see screenshots or images in issue descriptions, pull request descriptions, comments, or discussions, use WebFetch tool (or fetch tool) to download the image first, then use Read tool to view and analyze it.
117
117
  - When you need issue details, use gh issue view https://github.com/${owner}/${repo}/issues/${issueNumber}.
118
118
  - When you need related code, use gh search code --owner ${owner} [keywords].
119
- - When you need repo context, read files in your working directory.
120
- - When you study related work, study the most recent related pull requests.
119
+ - When you need repo context, read files in your working directory.${
120
+ argv?.promptCheckSiblingPullRequests !== false
121
+ ? `
122
+ - When you study related work, study the most recent related pull requests.`
123
+ : ''
124
+ }
121
125
  - When issue is not defined enough, write a comment to ask clarifying questions.
122
126
  - When accessing GitHub Gists (especially private ones), use gh gist view command instead of direct URL fetching to ensure proper authentication.
123
127
  - When you are fixing a bug, please make sure you first find the actual root cause, do as many experiments as needed.
@@ -271,6 +271,11 @@ export const createYargsConfig = yargsInstance => {
271
271
  description: 'Enable Playwright MCP browser automation hints in system prompt (enabled by default, only takes effect if Playwright MCP is installed). Use --no-prompt-playwright-mcp to disable. Only supported for --tool claude.',
272
272
  default: true,
273
273
  })
274
+ .option('prompt-check-sibling-pull-requests', {
275
+ type: 'boolean',
276
+ description: 'Include prompt to check related/sibling pull requests when studying related work. Enabled by default, use --no-prompt-check-sibling-pull-requests to disable.',
277
+ default: true,
278
+ })
274
279
  .parserConfiguration({
275
280
  'boolean-negation': true,
276
281
  'strip-dashed': false,
@@ -108,8 +108,12 @@ Initial research.
108
108
  - When you see screenshots or images in issue descriptions, pull request descriptions, comments, or discussions, use WebFetch tool to download the image first, then use Read tool to view and analyze it. IMPORTANT: Before reading downloaded images with the Read tool, verify the file is a valid image (not HTML). Use a CLI tool like 'file' command to check the actual file format. Reading corrupted or non-image files (like GitHub's HTML 404 pages saved as .png) can cause "Could not process image" errors and may crash the AI solver process. If the file command shows "HTML" or "text", the download failed and you should retry or skip the image.
109
109
  - When you need issue details, use gh issue view https://github.com/${owner}/${repo}/issues/${issueNumber}.
110
110
  - When you need related code, use gh search code --owner ${owner} [keywords].
111
- - When you need repo context, read files in your working directory.
112
- - When you study related work, study the most recent related pull requests.
111
+ - When you need repo context, read files in your working directory.${
112
+ argv?.promptCheckSiblingPullRequests !== false
113
+ ? `
114
+ - When you study related work, study the most recent related pull requests.`
115
+ : ''
116
+ }
113
117
  - When issue is not defined enough, write a comment to ask clarifying questions.
114
118
  - When accessing GitHub Gists, use gh gist view command instead of direct URL fetching.
115
119
  - When you are fixing a bug, please make sure you first find the actual root cause, do as many experiments as needed.
@@ -286,6 +286,11 @@ export const createYargsConfig = yargsInstance => {
286
286
  description: 'Enable Playwright MCP browser automation hints in system prompt (enabled by default, only takes effect if Playwright MCP is installed). Use --no-prompt-playwright-mcp to disable. Only supported for --tool claude.',
287
287
  default: true,
288
288
  })
289
+ .option('prompt-check-sibling-pull-requests', {
290
+ type: 'boolean',
291
+ description: 'Include prompt to check related/sibling pull requests when studying related work. Enabled by default, use --no-prompt-check-sibling-pull-requests to disable.',
292
+ default: true,
293
+ })
289
294
  .parserConfiguration({
290
295
  'boolean-negation': true,
291
296
  })