@link-assistant/hive-mind 1.26.4 → 1.28.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,47 @@
1
1
  # @link-assistant/hive-mind
2
2
 
3
+ ## 1.28.0
4
+
5
+ ### Minor Changes
6
+
7
+ - docs: expand best practices with CI/CD guide, universal prompts, and architecture improvement (Issue #1403)
8
+
9
+ Splits the existing `docs/BEST-PRACTICES.md` into two focused documents:
10
+ - **`docs/CI-CD-BEST-PRACTICES.md`** (renamed from the original) — Updated and expanded CI/CD guide covering all key points from existing workflow templates, including: running checks only on relevant file changes, fast-fail job ordering, fresh merge simulation, concurrency control, changeset exemptions for docs-only PRs, secrets detection, documentation validation, and OIDC trusted publishing.
11
+ - **`docs/BEST-PRACTICES.md`** (new general guide) — Universal best practices for AI-driven development including: deep analysis bug/feature prompts, universal validation prompt, plan mode prompt, issue writing guidelines with acceptance criteria patterns, an architecture improvement prompt linking to the Code Architecture Principles repository, CI/CD summary with link to the CI/CD guide, and subagent coordination patterns.
12
+
13
+ Also updates `README.md` to link to both new documents in the Best Practices section.
14
+
15
+ feat: enable --auto-restart-until-mergeable by default (Issue #1360)
16
+
17
+ The `--auto-restart-until-mergeable` feature has become stable enough to be enabled by default. Previously, users had to explicitly pass this flag to enable automatic restart until the PR becomes mergeable.
18
+
19
+ Now the feature is enabled by default, meaning the solver will automatically restart on new comments from non-bot users, CI failures, merge conflicts, or other issues — without requiring any extra flags. Users who want to disable this behavior can pass `--no-auto-restart-until-mergeable`.
20
+
21
+ fix: filter GitHub Pages deployment workflows from PR CI check (Issue #1399)
22
+
23
+ `getActiveRepoWorkflows()` included the `pages-build-deployment` workflow (path: `dynamic/pages/pages-build-deployment`) as if it were a PR CI workflow. This workflow is auto-created by GitHub for GitHub Pages and only runs on the default branch after merge — it never creates check-runs on PR branches. As a result, `--auto-restart-until-mergeable` got stuck in an infinite loop waiting for CI checks that would never appear.
24
+
25
+ The fix filters out workflows with the `dynamic/pages/` prefix from `getActiveRepoWorkflows()`. These are GitHub Pages internal workflows, not user-defined CI pipelines.
26
+
27
+ Affected scenario: repositories with GitHub Pages enabled but no `.github/workflows/` files (e.g., `konard/links-visuals`).
28
+
29
+ fix: resolve Prettier formatting issue in README.md (Issue #1401)
30
+
31
+ The CI/CD `lint` job was failing on the `main` branch because README.md had Prettier formatting violations after commit `da376061` ("Clarify Time Freedom and Any Device Programming features"). That commit added longer text to two table cells, which made the table column widths inconsistent with Prettier's expected format.
32
+
33
+ The fix runs `prettier --write` on README.md to re-align the table column widths, bringing the file back into conformance with the `format:check` CI step.
34
+
35
+ ## 1.27.0
36
+
37
+ ### Minor Changes
38
+
39
+ - f6e909e: feat: make --gitkeep-file enabled by default for all --tools (Issue #1385)
40
+
41
+ Previously, `--claude-file` was the default for `--tool claude`, while `--gitkeep-file` was the default for other tools. Now `--gitkeep-file` is the universal default for all `--tool` values, including `--tool claude`.
42
+
43
+ As explained in the referenced video, CLAUDE.md and AGENT.md files generally do not help AI tools and should be avoided. Users who need CLAUDE.md-based task passing can still explicitly opt in with `--claude-file`.
44
+
3
45
  ## 1.26.4
4
46
 
5
47
  ### Patch Changes
package/README.md CHANGED
@@ -21,18 +21,18 @@ Inspired by [konard/problem-solving](https://github.com/konard/problem-solving)
21
21
 
22
22
  Hive Mind is a **generalist AI** (mini-AGI) capable of working on a wide range of tasks - not just programming. Almost anything that can be done with files in a repository can be automated.
23
23
 
24
- | Feature | What It Means For You |
25
- | ---------------------------- | -------------------------------------------------------------------------------------------------- |
26
- | **No Babysitting** | Full autonomous mode with sudo access. AI has creative freedom like a real programmer. |
27
- | **Cloud Isolation** | Runs on dedicated VMs or Docker. Easy to restore if broken. |
28
- | **Full Internet + Sudo** | AI can install packages, fetch docs, and configure the system as needed. |
29
- | **Pre-installed Toolchain** | 25GB+ ready: 10 language runtimes, 2 theorem provers, build tools. Can install more. |
30
- | **Token Efficiency** | Routine tasks automated in code, so AI tokens focus on creative problem-solving. |
31
- | **Time Freedom** | What takes humans 2-8 hours, AI completes in 10-25 minutes. "The code is written while you sleep." |
32
- | **Scale with Orchestration** | Parallel workers feel like a team of developers, all for ~$200/month. |
33
- | **Human Control** | AI creates draft PRs - you decide what merges. Quality gates where they matter. |
34
- | **Any Device Programming** | Manage AI from any device with `/solve` and `/hive`. No PC, IDE, or laptop required. |
35
- | **100% Open Source** | Unlicense (public domain). Full transparency, no vendor lock-in. |
24
+ | Feature | What It Means For You |
25
+ | ---------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
26
+ | **No Babysitting** | Full autonomous mode with sudo access. AI has creative freedom like a real programmer. |
27
+ | **Cloud Isolation** | Runs on dedicated VMs or Docker. Easy to restore if broken. |
28
+ | **Full Internet + Sudo** | AI can install packages, fetch docs, and configure the system as needed. |
29
+ | **Pre-installed Toolchain** | 25GB+ ready: 10 language runtimes, 2 theorem provers, build tools. Can install more. |
30
+ | **Token Efficiency** | Routine tasks automated in code, so AI tokens focus on creative problem-solving. |
31
+ | **Time Freedom** | What takes humans 2-8 hours, AI completes each working session in 10-25 minutes. Mass execution of tasks in repository is possible. "The code is written while you sleep." |
32
+ | **Scale with Orchestration** | Parallel workers feel like a team of developers, all for ~$200/month. |
33
+ | **Human Control** | AI creates draft PRs - you decide what merges. Quality gates where they matter. |
34
+ | **Any Device Programming** | Manage AI from any device with `/solve` and `/hive` via Telegram bot. No PC, IDE, or laptop required. |
35
+ | **100% Open Source** | Unlicense (public domain). Full transparency, no vendor lock-in. |
36
36
 
37
37
  > _"Compared to Codex for $200, this solution is fire."_ - User feedback
38
38
 
@@ -404,9 +404,9 @@ The Hive Mind includes a Telegram bot interface (SwarmMindBot) for remote comman
404
404
 
405
405
  ### 🚀 Test Drive
406
406
 
407
- Want to see the Hive Mind in action? Join our Telegram channel where you can execute the Hive Mind on your own issues and watch AI solve them:
407
+ Want to see the Hive Mind in action? Request a free demo or get faster support by messaging the developer directly on Telegram:
408
408
 
409
- **[Join https://t.me/hive_mind_pull_requests](https://t.me/hive_mind_pull_requests)**
409
+ **[Message @drakonard on Telegram](https://t.me/drakonard)**
410
410
 
411
411
  ### Setup
412
412
 
@@ -839,6 +839,30 @@ screen -wipe
839
839
  screen -ls
840
840
  ```
841
841
 
842
+ ### Top with full arguments of each command
843
+
844
+ ```bash
845
+ top -c
846
+ ```
847
+
848
+ ### See the full tree of processes
849
+
850
+ ```bash
851
+ ps -eo pid,ppid,user,args --forest
852
+ ```
853
+
854
+ or
855
+
856
+ ```bash
857
+ ps axjf
858
+ ```
859
+
860
+ ### Kill all commands spawned by specific task
861
+
862
+ ```bash
863
+ pkill -f gh-issue-solver-1773073065743
864
+ ```
865
+
842
866
  That can be done, but not recommended as reboot have better effect.
843
867
 
844
868
  ## 📄 License
@@ -847,7 +871,10 @@ Unlicense License - see [LICENSE](./LICENSE)
847
871
 
848
872
  ## 🏆 Best Practices
849
873
 
850
- Hive Mind works even better when repositories have strong CI/CD pipelines. See [BEST-PRACTICES.md](./docs/BEST-PRACTICES.md) for recommended configurations that maximize AI solver quality.
874
+ Hive Mind works even better when repositories have strong CI/CD pipelines and clear issue requirements. See:
875
+
876
+ - [BEST-PRACTICES.md](./docs/BEST-PRACTICES.md) — Universal prompts, issue writing guidelines, architecture improvement, and subagent patterns
877
+ - [CI-CD-BEST-PRACTICES.md](./docs/CI-CD-BEST-PRACTICES.md) — CI/CD pipeline setup, recommended templates, and enforcement strategies
851
878
 
852
879
  Key benefits of proper CI/CD:
853
880
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@link-assistant/hive-mind",
3
- "version": "1.26.4",
3
+ "version": "1.28.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",
@@ -1403,20 +1403,31 @@ export async function getWorkflowRunsForSha(owner, repo, sha, verbose = false) {
1403
1403
  * When a repo has NO workflows, no_checks means no CI configured.
1404
1404
  * When a repo HAS workflows, no_checks means CI checks haven't started yet (race condition).
1405
1405
  *
1406
+ * Issue #1399: GitHub Pages deployment workflows (path: "dynamic/pages/...") are excluded
1407
+ * because they only run on the default branch after merge, never on PR branches. Counting
1408
+ * them as "CI workflows" causes an infinite loop waiting for check-runs that never appear.
1409
+ *
1406
1410
  * @param {string} owner - Repository owner
1407
1411
  * @param {string} repo - Repository name
1408
1412
  * @param {boolean} verbose - Whether to log verbose output
1409
- * @returns {Promise<{count: number, hasWorkflows: boolean, workflows: Array<{id: number, name: string, state: string}>}>}
1413
+ * @returns {Promise<{count: number, hasWorkflows: boolean, workflows: Array<{id: number, name: string, state: string, path: string}>}>}
1410
1414
  */
1411
1415
  export async function getActiveRepoWorkflows(owner, repo, verbose = false) {
1412
1416
  try {
1413
- const { stdout } = await exec(`gh api "repos/${owner}/${repo}/actions/workflows" --jq '[.workflows[] | select(.state == "active")] | map({id: .id, name: .name, state: .state})'`);
1414
- const workflows = JSON.parse(stdout.trim() || '[]');
1417
+ const { stdout } = await exec(`gh api "repos/${owner}/${repo}/actions/workflows" --jq '[.workflows[] | select(.state == "active")] | map({id: .id, name: .name, state: .state, path: .path})'`);
1418
+ const allWorkflows = JSON.parse(stdout.trim() || '[]');
1419
+
1420
+ // Issue #1399: Filter out GitHub Pages deployment workflows.
1421
+ // These have path "dynamic/pages/pages-build-deployment" and only run on the
1422
+ // default branch after merge — they never produce check-runs on PR branches.
1423
+ // Including them causes an infinite loop when waiting for PR CI checks.
1424
+ const workflows = allWorkflows.filter(wf => !wf.path.startsWith('dynamic/pages/'));
1415
1425
 
1416
1426
  if (verbose) {
1417
- console.log(`[VERBOSE] /merge: Found ${workflows.length} active workflows in ${owner}/${repo}`);
1418
- for (const wf of workflows) {
1419
- console.log(`[VERBOSE] /merge: - ${wf.name} (${wf.id}): ${wf.state}`);
1427
+ console.log(`[VERBOSE] /merge: Found ${allWorkflows.length} active workflows in ${owner}/${repo} (${workflows.length} PR-relevant after filtering out GitHub Pages deployment workflows)`);
1428
+ for (const wf of allWorkflows) {
1429
+ const filtered = wf.path.startsWith('dynamic/pages/');
1430
+ console.log(`[VERBOSE] /merge: - ${wf.name} (${wf.id}): ${wf.state}, path=${wf.path}${filtered ? ' [excluded: GitHub Pages deployment]' : ''}`);
1420
1431
  }
1421
1432
  }
1422
1433
 
@@ -70,8 +70,8 @@ export async function handleAutoPrCreation({ argv, tempDir, branchName, issueNum
70
70
  }
71
71
  }
72
72
  } else {
73
- // .gitkeep mode (via explicit --gitkeep-file or auto-gitkeep-file fallback)
74
- const modeDesc = argv.gitkeepFile === true ? '.gitkeep (explicit --gitkeep-file)' : '.gitkeep (CLAUDE.md is ignored)';
73
+ // .gitkeep mode (default for all tools, or auto-gitkeep-file fallback)
74
+ const modeDesc = argv.claudeFile === false ? '.gitkeep (default)' : '.gitkeep (CLAUDE.md is ignored)';
75
75
  await log(formatAligned('📝', 'Creating:', modeDesc));
76
76
 
77
77
  filePath = path.join(tempDir, '.gitkeep');
@@ -133,7 +133,7 @@ Proceed.
133
133
  }
134
134
  } else {
135
135
  // .gitkeep: Use minimal metadata format (explicit --gitkeep-file or auto-gitkeep-file fallback)
136
- const creationReason = argv.gitkeepFile === true ? '# This file was created with --gitkeep-file flag' : '# This file was created because CLAUDE.md is in .gitignore (--auto-gitkeep-file=true)';
136
+ const creationReason = argv.claudeFile === false ? '# This file was created with --gitkeep-file (default)' : '# This file was created because CLAUDE.md is in .gitignore (--auto-gitkeep-file=true)';
137
137
  const gitkeepContent = `# Auto-generated file for PR creation
138
138
  # Issue: ${issueUrl}
139
139
  # Branch: ${branchName}
@@ -297,8 +297,8 @@ ${creationReason}
297
297
  }
298
298
 
299
299
  await log(formatAligned('📝', 'Creating commit:', `With ${commitFileName} file`));
300
- // Commit message distinguishes between explicit --gitkeep-file and auto-gitkeep-file fallback
301
- const fileDesc = commitFileName === 'CLAUDE.md' ? 'CLAUDE.md with task information for AI processing' : `.gitkeep for PR creation (${argv.gitkeepFile === true ? 'created with --gitkeep-file flag' : 'CLAUDE.md is in .gitignore'})`;
300
+ // Commit message distinguishes between CLAUDE.md and .gitkeep modes
301
+ const fileDesc = commitFileName === 'CLAUDE.md' ? 'CLAUDE.md with task information for AI processing' : `.gitkeep for PR creation (${argv.claudeFile === false ? 'default mode' : 'CLAUDE.md is in .gitignore'})`;
302
302
  const commitMessage = `Initial commit with task details\n\nAdding ${fileDesc}.\nThis file will be removed when the task is complete.\n\nIssue: ${issueUrl}`;
303
303
 
304
304
  // Use explicit cwd option for better reliability
@@ -101,13 +101,13 @@ export const SOLVE_OPTION_DEFINITIONS = {
101
101
  },
102
102
  'claude-file': {
103
103
  type: 'boolean',
104
- description: 'Create CLAUDE.md file for task details (default for --tool claude, mutually exclusive with --gitkeep-file)',
105
- default: true,
104
+ description: 'Create CLAUDE.md file for task details (mutually exclusive with --gitkeep-file)',
105
+ default: false,
106
106
  },
107
107
  'gitkeep-file': {
108
108
  type: 'boolean',
109
- description: 'Create .gitkeep file instead of CLAUDE.md (default for --tool agent/opencode/codex, mutually exclusive with --claude-file)',
110
- default: false,
109
+ description: 'Create .gitkeep file instead of CLAUDE.md (default for all --tool values, mutually exclusive with --claude-file)',
110
+ default: true,
111
111
  },
112
112
  'auto-gitkeep-file': {
113
113
  type: 'boolean',
@@ -179,7 +179,7 @@ export const SOLVE_OPTION_DEFINITIONS = {
179
179
  'auto-restart-until-mergeable': {
180
180
  type: 'boolean',
181
181
  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.',
182
- default: false,
182
+ default: true,
183
183
  },
184
184
  'auto-restart-on-non-updated-pull-request-description': {
185
185
  type: 'boolean',
@@ -541,20 +541,6 @@ export const parseArguments = async (yargs, hideBin) => {
541
541
  argv.model = 'minimax-m2.5-free';
542
542
  }
543
543
 
544
- // Tool-specific defaults for --claude-file and --gitkeep-file
545
- // For non-Claude tools, use .gitkeep by default to avoid polluting CLAUDE.md
546
- // (CLAUDE.md has special meaning for Claude Code as a project-level instruction file)
547
- // See: https://github.com/link-assistant/hive-mind/issues/1158
548
- const claudeFileExplicitlyProvided = rawArgs.includes('--claude-file') || rawArgs.includes('--no-claude-file');
549
- const gitkeepFileExplicitlyProvided = rawArgs.includes('--gitkeep-file') || rawArgs.includes('--no-gitkeep-file');
550
-
551
- if (argv.tool !== 'claude' && !claudeFileExplicitlyProvided && !gitkeepFileExplicitlyProvided) {
552
- // User did not explicitly provide either option, so use the correct defaults for non-Claude tools
553
- // Non-Claude tools (agent, opencode, codex) should use .gitkeep by default
554
- argv.claudeFile = false;
555
- argv.gitkeepFile = true;
556
- }
557
-
558
544
  // Validate mutual exclusivity of --claude-file and --gitkeep-file
559
545
  // Check if both are explicitly enabled (user passed both --claude-file and --gitkeep-file)
560
546
  if (argv.claudeFile && argv.gitkeepFile) {
@@ -588,7 +574,7 @@ export const parseArguments = async (yargs, hideBin) => {
588
574
  argv.claudeFile = false;
589
575
  }
590
576
 
591
- // If user explicitly set --no-gitkeep-file, enable claude-file (this is the default anyway)
577
+ // If user explicitly set --no-gitkeep-file, enable claude-file
592
578
  if (noGitkeepFile && !argv.claudeFile) {
593
579
  argv.claudeFile = true;
594
580
  argv.gitkeepFile = false;