@link-assistant/hive-mind 0.42.3 → 0.43.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,35 @@
1
1
  # @link-assistant/hive-mind
2
2
 
3
+ ## 0.43.0
4
+
5
+ ### Minor Changes
6
+
7
+ - fe002f8: Add --prompt-issue-reporting flag for automatic issue creation
8
+
9
+ This release introduces a new opt-in feature that enables the AI to automatically create GitHub issues when it spots bugs, errors, or minor issues during working sessions that are not related to the main task.
10
+
11
+ **New Features:**
12
+
13
+ - Added `--prompt-issue-reporting` CLI flag (disabled by default)
14
+ - Issues include reproducible examples, workarounds, and fix suggestions
15
+ - Supports creating issues in both current and third-party repositories
16
+ - Automatic duplicate checking before creating issues
17
+
18
+ **Usage:**
19
+
20
+ ```bash
21
+ hive solve <issue-url> --prompt-issue-reporting
22
+ solve <issue-url> --prompt-issue-reporting
23
+ ```
24
+
25
+ **Implementation:**
26
+
27
+ - New guideline in system prompt (conditional on flag)
28
+ - Flag added to both `hive` and `solve` commands
29
+ - Uses `gh` CLI for authenticated issue creation (works with private repos)
30
+
31
+ This feature helps ensure that no bugs slip through the cracks during development while giving users full control over when it's active.
32
+
3
33
  ## 0.42.3
4
34
 
5
35
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@link-assistant/hive-mind",
3
- "version": "0.42.3",
3
+ "version": "0.43.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",
@@ -115,6 +115,7 @@ General guidelines.
115
115
  - When you execute commands, always save their logs to files for easier reading if the output becomes large.
116
116
  - 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.
117
117
  - 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.
118
+ ${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.` : ''}
118
119
  - When CI is failing or user reports failures, consider adding a detailed investigation protocol to your todo list with these steps:
119
120
  Step 1: List recent runs with timestamps using: gh run list --repo ${owner}/${repo} --branch ${branchName} --limit 5 --json databaseId,conclusion,createdAt,headSha
120
121
  Step 2: Verify runs are after the latest commit by checking timestamps and SHA
@@ -251,6 +251,11 @@ export const createYargsConfig = (yargsInstance) => {
251
251
  description: 'Prompt AI to use general-purpose sub agents for processing large tasks with multiple files/folders. Only supported for --tool claude.',
252
252
  default: false
253
253
  })
254
+ .option('prompt-issue-reporting', {
255
+ type: 'boolean',
256
+ description: 'Enable automatic issue creation for spotted bugs/errors not related to main task. Issues will include reproducible examples, workarounds, and fix suggestions. Works for both current and third-party repositories. Only supported for --tool claude.',
257
+ default: false
258
+ })
254
259
  .parserConfiguration({
255
260
  'boolean-negation': true,
256
261
  'strip-dashed': false,
package/src/hive.mjs CHANGED
@@ -757,6 +757,7 @@ async function worker(workerId) {
757
757
  const prefixForkNameWithOwnerNameFlag = argv.prefixForkNameWithOwnerName ? ' --prefix-fork-name-with-owner-name' : '';
758
758
  const interactiveModeFlag = argv.interactiveMode ? ' --interactive-mode' : '';
759
759
  const promptExploreSubAgentFlag = argv.promptExploreSubAgent ? ' --prompt-explore-sub-agent' : '';
760
+ const promptIssueReportingFlag = argv.promptIssueReporting ? ' --prompt-issue-reporting' : '';
760
761
 
761
762
  // Use spawn to get real-time streaming output while avoiding command-stream's automatic quote addition
762
763
  const { spawn } = await import('child_process');
@@ -806,9 +807,10 @@ async function worker(workerId) {
806
807
  if (argv.prefixForkNameWithOwnerName) args.push('--prefix-fork-name-with-owner-name');
807
808
  if (argv.interactiveMode) args.push('--interactive-mode');
808
809
  if (argv.promptExploreSubAgent) args.push('--prompt-explore-sub-agent');
810
+ if (argv.promptIssueReporting) args.push('--prompt-issue-reporting');
809
811
 
810
812
  // Log the actual command being executed so users can investigate/reproduce
811
- const command = `${solveCommand} "${issueUrl}" --model ${argv.model}${toolFlag}${forkFlag}${autoForkFlag}${verboseFlag}${attachLogsFlag}${targetBranchFlag}${logDirFlag}${dryRunFlag}${skipToolConnectionCheckFlag}${autoContinueFlag}${thinkFlag}${promptPlanSubAgentFlag}${noSentryFlag}${watchFlag}${prefixForkNameWithOwnerNameFlag}${interactiveModeFlag}${promptExploreSubAgentFlag}`;
813
+ const command = `${solveCommand} "${issueUrl}" --model ${argv.model}${toolFlag}${forkFlag}${autoForkFlag}${verboseFlag}${attachLogsFlag}${targetBranchFlag}${logDirFlag}${dryRunFlag}${skipToolConnectionCheckFlag}${autoContinueFlag}${thinkFlag}${promptPlanSubAgentFlag}${noSentryFlag}${watchFlag}${prefixForkNameWithOwnerNameFlag}${interactiveModeFlag}${promptExploreSubAgentFlag}${promptIssueReportingFlag}`;
812
814
  await log(` 📋 Command: ${command}`);
813
815
 
814
816
  let exitCode = 0;
@@ -1496,4 +1498,4 @@ try {
1496
1498
  process.exit(1);
1497
1499
  }
1498
1500
 
1499
- } // End of main execution block
1501
+ } // End of main execution block
@@ -255,6 +255,11 @@ export const createYargsConfig = (yargsInstance) => {
255
255
  description: 'Prompt AI to use general-purpose sub agents for processing large tasks with multiple files/folders. Only supported for --tool claude.',
256
256
  default: false
257
257
  })
258
+ .option('prompt-issue-reporting', {
259
+ type: 'boolean',
260
+ description: 'Enable automatic issue creation for spotted bugs/errors not related to main task. Issues will include reproducible examples, workarounds, and fix suggestions. Works for both current and third-party repositories. Only supported for --tool claude.',
261
+ default: false
262
+ })
258
263
  .parserConfiguration({
259
264
  'boolean-negation': true
260
265
  })