@link-assistant/hive-mind 1.12.0 → 1.14.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,39 @@
1
1
  # @link-assistant/hive-mind
2
2
 
3
+ ## 1.14.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 3a48254: Add configurable experiments/examples folder paths with ability to disable
8
+
9
+ New CLI options for both `solve` and `hive` commands:
10
+ - `--prompt-experiments-folder <path>`: Path to experiments folder used in system prompt. Set to empty string to disable experiments folder prompt. Default: `./experiments`
11
+ - `--prompt-examples-folder <path>`: Path to examples folder used in system prompt. Set to empty string to disable examples folder prompt. Default: `./examples`
12
+
13
+ Features:
14
+ - Backwards compatible: defaults to `./experiments` and `./examples` as before
15
+ - Custom paths: Specify custom folder paths for experiments and examples
16
+ - Disable functionality: Set to empty string (`''`) to disable the experiments/examples prompt section entirely
17
+ - Works with all AI tools: claude, opencode, codex, and agent
18
+
19
+ ## 1.13.0
20
+
21
+ ### Minor Changes
22
+
23
+ - 03adcb6: Add --auto-merge and --auto-restart-until-mergable options for autonomous PR management
24
+
25
+ New CLI options:
26
+ - `--auto-merge`: Automatically merge the pull request when CI passes and PR is mergeable. Implies --auto-restart-until-mergable.
27
+ - `--auto-restart-until-mergable`: Auto-restart the AI agent until PR becomes mergeable (no iteration limit). Restarts on new comments from non-bot users, CI failures, merge conflicts, or uncommitted changes. Does NOT auto-merge.
28
+
29
+ Features:
30
+ - Non-bot comment detection with configurable bot patterns
31
+ - Automatic detection of CI/CD status and merge readiness
32
+ - Continuous monitoring loop with configurable check intervals
33
+ - Progress and status reporting throughout the process
34
+ - Graceful handling of API errors with exponential backoff
35
+ - Session data tracking for accurate pricing across iterations
36
+
3
37
  ## 1.12.0
4
38
 
5
39
  ### Minor Changes
package/README.md CHANGED
@@ -106,7 +106,40 @@ bun install -g @link-assistant/hive-mind
106
106
  npm install -g @link-assistant/hive-mind
107
107
  ```
108
108
 
109
- ### Docker Installation
109
+ ### Installing Docker
110
+
111
+ If you don't have Docker installed yet, follow these steps to install Docker Engine on Ubuntu:
112
+
113
+ ```bash
114
+ # Install prerequisites
115
+ sudo apt update
116
+ sudo apt install ca-certificates curl
117
+
118
+ # Add Docker's official GPG key
119
+ sudo install -m 0755 -d /etc/apt/keyrings
120
+ sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
121
+ sudo chmod a+r /etc/apt/keyrings/docker.asc
122
+
123
+ # Add Docker repository
124
+ sudo tee /etc/apt/sources.list.d/docker.sources <<EOF
125
+ Types: deb
126
+ URIs: https://download.docker.com/linux/ubuntu
127
+ Suites: $(. /etc/os-release && echo "${UBUNTU_CODENAME:-$VERSION_CODENAME}")
128
+ Components: stable
129
+ Signed-By: /etc/apt/keyrings/docker.asc
130
+ EOF
131
+
132
+ # Install Docker
133
+ sudo apt update
134
+ sudo apt install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
135
+
136
+ # Verify installation
137
+ sudo docker run hello-world
138
+ ```
139
+
140
+ **For other operating systems** or detailed instructions, see the [official Docker documentation](https://docs.docker.com/engine/install/).
141
+
142
+ ### Using Docker
110
143
 
111
144
  Run the Hive Mind using Docker for safer local installation - no manual setup required:
112
145
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@link-assistant/hive-mind",
3
- "version": "1.12.0",
3
+ "version": "1.14.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",
@@ -4,6 +4,7 @@
4
4
  */
5
5
 
6
6
  import { getArchitectureCareSubPrompt } from './architecture-care.prompts.lib.mjs';
7
+ import { getExperimentsExamplesSubPrompt } from './experiments-examples.prompts.lib.mjs';
7
8
 
8
9
  /**
9
10
  * Build the user prompt for Agent
@@ -137,9 +138,7 @@ ${workspaceInstructions}General guidelines.
137
138
  - When CI is failing, make sure you download the logs locally and carefully investigate them.
138
139
  - When a code or log file has more than 1500 lines, read it in chunks of 1500 lines.
139
140
  - When facing a complex problem, do as much tracing as possible and turn on all verbose modes.
140
- - When you create debug, test, or example/experiment scripts for fixing, always keep them in an examples and/or experiments folders so you can reuse them later.
141
- - When testing your assumptions, use the experiment scripts, and add it to experiments folder.
142
- - When your experiments can show real world use case of the software, add it to examples folder.
141
+ ${getExperimentsExamplesSubPrompt(argv)}
143
142
  - When you face something extremely hard, use divide and conquer — it always helps.
144
143
 
145
144
  Initial research.
@@ -4,6 +4,7 @@
4
4
  */
5
5
 
6
6
  import { getArchitectureCareSubPrompt } from './architecture-care.prompts.lib.mjs';
7
+ import { getExperimentsExamplesSubPrompt } from './experiments-examples.prompts.lib.mjs';
7
8
 
8
9
  /**
9
10
  * Build the user prompt for Claude
@@ -163,9 +164,7 @@ ${workspaceInstructions}General guidelines.
163
164
  Note: If user says "failing" but tools show "passing", this might indicate stale data - consider downloading fresh logs and checking timestamps to resolve the discrepancy.
164
165
  - When a code or log file has more than 1500 lines, read it in chunks of 1500 lines.
165
166
  - When facing a complex problem, do as much tracing as possible and turn on all verbose modes.
166
- - When you create debug, test, or example/experiment scripts for fixing, always keep them in an examples and/or experiments folders so you can reuse them later.
167
- - When testing your assumptions, use the experiment scripts, and add it to experiments folder.
168
- - When your experiments can show real world use case of the software, add it to examples folder.
167
+ ${getExperimentsExamplesSubPrompt(argv)}
169
168
  - When you face something extremely hard, use divide and conquer — it always helps.
170
169
 
171
170
  Initial research.
@@ -4,6 +4,7 @@
4
4
  */
5
5
 
6
6
  import { getArchitectureCareSubPrompt } from './architecture-care.prompts.lib.mjs';
7
+ import { getExperimentsExamplesSubPrompt } from './experiments-examples.prompts.lib.mjs';
7
8
 
8
9
  /**
9
10
  * Build the user prompt for Codex
@@ -144,9 +145,7 @@ ${workspaceInstructions}General guidelines.
144
145
  Note: If user says "failing" but tools show "passing", this might indicate stale data - consider downloading fresh logs and checking timestamps to resolve the discrepancy.
145
146
  - When a code or log file has more than 1500 lines, read it in chunks of 1500 lines.
146
147
  - When facing a complex problem, do as much tracing as possible and turn on all verbose modes.
147
- - When you create debug, test, or example/experiment scripts for fixing, always keep them in an examples and/or experiments folders so you can reuse them later.
148
- - When testing your assumptions, use the experiment scripts, and add it to experiments folder.
149
- - When your experiments can show real world use case of the software, add it to examples folder.
148
+ ${getExperimentsExamplesSubPrompt(argv)}
150
149
  - When you face something extremely hard, use divide and conquer — it always helps.
151
150
 
152
151
  Initial research.
@@ -0,0 +1,48 @@
1
+ /**
2
+ * Experiments and examples folder prompts module
3
+ * Handles building configurable prompts for experiments/examples folders
4
+ *
5
+ * @see https://github.com/link-assistant/hive-mind/issues/1199
6
+ */
7
+
8
+ /**
9
+ * Build the experiments/examples sub-prompt based on configuration
10
+ * @param {Object} argv - Command line arguments
11
+ * @param {string} argv.promptExperimentsFolder - Path to experiments folder (empty string to disable)
12
+ * @param {string} argv.promptExamplesFolder - Path to examples folder (empty string to disable)
13
+ * @returns {string} The formatted sub-prompt for experiments/examples folders
14
+ */
15
+ export const getExperimentsExamplesSubPrompt = argv => {
16
+ const experimentsFolder = argv?.promptExperimentsFolder ?? './experiments';
17
+ const examplesFolder = argv?.promptExamplesFolder ?? './examples';
18
+
19
+ // If both are disabled, return empty string
20
+ if (!experimentsFolder && !examplesFolder) {
21
+ return '';
22
+ }
23
+
24
+ const lines = [];
25
+
26
+ // Both folders are enabled (with their respective paths)
27
+ if (experimentsFolder && examplesFolder) {
28
+ lines.push(` - When you create debug, test, or example/experiment scripts for fixing, always keep them in an ${examplesFolder} and/or ${experimentsFolder} folders so you can reuse them later.`);
29
+ lines.push(` - When testing your assumptions, use the experiment scripts, and add it to ${experimentsFolder} folder.`);
30
+ lines.push(` - When your experiments can show real world use case of the software, add it to ${examplesFolder} folder.`);
31
+ }
32
+ // Only experiments folder is enabled
33
+ else if (experimentsFolder) {
34
+ lines.push(` - When you create debug or test scripts for fixing, always keep them in ${experimentsFolder} folder so you can reuse them later.`);
35
+ lines.push(` - When testing your assumptions, use the experiment scripts, and add it to ${experimentsFolder} folder.`);
36
+ }
37
+ // Only examples folder is enabled
38
+ else if (examplesFolder) {
39
+ lines.push(` - When you create example scripts that show real world use cases, keep them in ${examplesFolder} folder.`);
40
+ lines.push(` - When your experiments can show real world use case of the software, add it to ${examplesFolder} folder.`);
41
+ }
42
+
43
+ return lines.join('\n');
44
+ };
45
+
46
+ export default {
47
+ getExperimentsExamplesSubPrompt,
48
+ };
@@ -239,6 +239,16 @@ export const createYargsConfig = yargsInstance => {
239
239
  alias: 'w',
240
240
  default: false,
241
241
  })
242
+ .option('auto-merge', {
243
+ type: 'boolean',
244
+ description: 'Automatically merge the pull request when the working session is finished and all CI/CD statuses pass and PR is mergeable. Implies --auto-restart-until-mergable.',
245
+ default: false,
246
+ })
247
+ .option('auto-restart-until-mergable', {
248
+ type: 'boolean',
249
+ description: 'Auto-restart until PR becomes mergeable (no iteration limit). Restarts on new comments from non-bot users, CI failures, merge conflicts, or other issues. Does NOT auto-merge.',
250
+ default: false,
251
+ })
242
252
  .option('issue-order', {
243
253
  type: 'string',
244
254
  description: 'Order issues by publication date: "asc" (oldest first) or "desc" (newest first)',
@@ -291,6 +301,16 @@ export const createYargsConfig = yargsInstance => {
291
301
  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
302
  default: true,
293
303
  })
304
+ .option('prompt-experiments-folder', {
305
+ type: 'string',
306
+ description: 'Path to experiments folder used in system prompt. Set to empty string to disable experiments folder prompt. Default: ./experiments',
307
+ default: './experiments',
308
+ })
309
+ .option('prompt-examples-folder', {
310
+ type: 'string',
311
+ description: 'Path to examples folder used in system prompt. Set to empty string to disable examples folder prompt. Default: ./examples',
312
+ default: './examples',
313
+ })
294
314
  .option('prompt-architecture-care', {
295
315
  type: 'boolean',
296
316
  description: '[EXPERIMENTAL] Include guidance for managing REQUIREMENTS.md and ARCHITECTURE.md files. When enabled, agents will update these documentation files when changes affect requirements or architecture.',
package/src/hive.mjs CHANGED
@@ -770,7 +770,11 @@ if (isDirectExecution) {
770
770
  if (argv.promptIssueReporting) args.push('--prompt-issue-reporting');
771
771
  if (argv.promptCaseStudies) args.push('--prompt-case-studies');
772
772
  if (argv.promptPlaywrightMcp !== undefined) args.push(argv.promptPlaywrightMcp ? '--prompt-playwright-mcp' : '--no-prompt-playwright-mcp');
773
+ if (argv.promptExperimentsFolder !== undefined) args.push('--prompt-experiments-folder', argv.promptExperimentsFolder);
774
+ if (argv.promptExamplesFolder !== undefined) args.push('--prompt-examples-folder', argv.promptExamplesFolder);
773
775
  if (argv.executeToolWithBun) args.push('--execute-tool-with-bun');
776
+ if (argv.autoMerge) args.push('--auto-merge');
777
+ if (argv.autoRestartUntilMergable) args.push('--auto-restart-until-mergable');
774
778
  // Log the actual command being executed so users can investigate/reproduce
775
779
  await log(` 📋 Command: ${solveCommand} ${args.join(' ')}`);
776
780
 
@@ -4,6 +4,7 @@
4
4
  */
5
5
 
6
6
  import { getArchitectureCareSubPrompt } from './architecture-care.prompts.lib.mjs';
7
+ import { getExperimentsExamplesSubPrompt } from './experiments-examples.prompts.lib.mjs';
7
8
 
8
9
  /**
9
10
  * Build the user prompt for OpenCode
@@ -139,9 +140,7 @@ General guidelines.
139
140
  - When CI is failing, make sure you download the logs locally and carefully investigate them.
140
141
  - When a code or log file has more than 1500 lines, read it in chunks of 1500 lines.
141
142
  - When facing a complex problem, do as much tracing as possible and turn on all verbose modes.
142
- - When you create debug, test, or example/experiment scripts for fixing, always keep them in an examples and/or experiments folders so you can reuse them later.
143
- - When testing your assumptions, use the experiment scripts, and add it to experiments folder.
144
- - When your experiments can show real world use case of the software, add it to examples folder.
143
+ ${getExperimentsExamplesSubPrompt(argv)}
145
144
  - When you face something extremely hard, use divide and conquer — it always helps.
146
145
  ${workspaceInstructions}
147
146
  Initial research.