hive-mind-agent 1.0.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/.cursor/mcp.json.example +11 -0
- package/.cursor/rules/hive-mind-central-brain.mdc +68 -0
- package/.cursor/settings.json +13 -0
- package/CONTRIBUTING.md +35 -0
- package/LICENSE +21 -0
- package/PUBLISH.md +62 -0
- package/README.md +98 -0
- package/api-server.mjs +159 -0
- package/cli.mjs +130 -0
- package/core/adapters/file-context-store.mjs +71 -0
- package/core/adapters/file-outcome-store.mjs +50 -0
- package/core/adapters/llm-provider.mjs +161 -0
- package/core/index.mjs +37 -0
- package/core/schema/config-schema.json +87 -0
- package/core/types.js +63 -0
- package/docs/agent-gaps-design.md +366 -0
- package/docs/api-server.md +42 -0
- package/docs/central-brain-interface.md +54 -0
- package/docs/config.md +61 -0
- package/docs/enterprise-agent-taxonomy.md +74 -0
- package/docs/graduation-path.md +53 -0
- package/docs/marketing-agent-suite-design.md +237 -0
- package/docs/mcp-server.md +36 -0
- package/docs/shared-state-format.md +71 -0
- package/docs/software-firmware-hardware-agent-design.md +364 -0
- package/docs/worker-contract.md +56 -0
- package/hive.config.example.json +21 -0
- package/mcp-server/index.mjs +148 -0
- package/package.json +41 -0
- package/scripts/install-skill.mjs +45 -0
- package/skill/CONTEXT_TEMPLATE.md +28 -0
- package/skill/SKILL.md +53 -0
- package/skill/reference.md +66 -0
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* Install hive-mind-orchestrator skill to ~/.cursor/skills/
|
|
4
|
+
* Run: npm run skill:install
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import { mkdir, readdir, readFile, writeFile } from 'fs/promises';
|
|
8
|
+
import { dirname, join } from 'path';
|
|
9
|
+
import { fileURLToPath } from 'url';
|
|
10
|
+
|
|
11
|
+
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
12
|
+
const ROOT = join(__dirname, '..');
|
|
13
|
+
const SKILL_SOURCE = join(ROOT, 'skill');
|
|
14
|
+
const SKILL_DEST = join(process.env.HOME || process.env.USERPROFILE, '.cursor', 'skills', 'hive-mind-orchestrator');
|
|
15
|
+
|
|
16
|
+
const FILES = ['SKILL.md', 'reference.md', 'CONTEXT_TEMPLATE.md'];
|
|
17
|
+
|
|
18
|
+
async function install() {
|
|
19
|
+
try {
|
|
20
|
+
await readdir(SKILL_SOURCE);
|
|
21
|
+
} catch (e) {
|
|
22
|
+
console.error('Skill source not found at', SKILL_SOURCE);
|
|
23
|
+
process.exit(1);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
await mkdir(SKILL_DEST, { recursive: true });
|
|
27
|
+
for (const f of FILES) {
|
|
28
|
+
const src = join(SKILL_SOURCE, f);
|
|
29
|
+
try {
|
|
30
|
+
const content = await readFile(src, 'utf-8');
|
|
31
|
+
await writeFile(join(SKILL_DEST, f), content);
|
|
32
|
+
console.log(' Installed', f);
|
|
33
|
+
} catch (e) {
|
|
34
|
+
if (e.code === 'ENOENT') console.log(' Skipped (missing)', f);
|
|
35
|
+
else throw e;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
console.log('\nSkill installed to', SKILL_DEST);
|
|
39
|
+
console.log('Restart Cursor or reload the window for the skill to be discovered.');
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
install().catch((e) => {
|
|
43
|
+
console.error(e);
|
|
44
|
+
process.exit(1);
|
|
45
|
+
});
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Hive Context
|
|
2
|
+
|
|
3
|
+
## Goals
|
|
4
|
+
|
|
5
|
+
- **Primary:** [Describe the main objective for this hive]
|
|
6
|
+
- **Target product:** [Product/project name and path]
|
|
7
|
+
- [Optional supporting goals]
|
|
8
|
+
|
|
9
|
+
## Strategy
|
|
10
|
+
|
|
11
|
+
[Current approach: what the central brain has decided to do next]
|
|
12
|
+
|
|
13
|
+
## Pending Tasks
|
|
14
|
+
|
|
15
|
+
| ID | Description | Assigned | Status |
|
|
16
|
+
|----|-------------|----------|--------|
|
|
17
|
+
| 1 | [Task 1] | - | pending |
|
|
18
|
+
| 2 | [Task 2] | - | pending |
|
|
19
|
+
|
|
20
|
+
## Recent Outcomes (last 10)
|
|
21
|
+
|
|
22
|
+
| Date | Task | Status | Result |
|
|
23
|
+
| ---------- | ------ | ------- | -------- |
|
|
24
|
+
| YYYY-MM-DD | [Task] | success | [Summary] |
|
|
25
|
+
|
|
26
|
+
## Learnings
|
|
27
|
+
|
|
28
|
+
- [What the hive has learned from outcomes]
|
package/skill/SKILL.md
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: hive-mind-orchestrator
|
|
3
|
+
description: Orchestrates multi-agent hive workflows. Use when user says "unleash the hive", "advance the hive", "hive cycle", or wants autonomous parallel task execution across multiple agents. Works with any project—targets come from hive.config.json.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Hive-Mind Orchestrator
|
|
7
|
+
|
|
8
|
+
Orchestrate parallel subagent workflows. Project-agnostic, model-agnostic, platform-agnostic.
|
|
9
|
+
|
|
10
|
+
## When to Use
|
|
11
|
+
|
|
12
|
+
- User says "unleash the hive", "advance the hive", "hive cycle", "run the hive"
|
|
13
|
+
- User wants autonomous parallel task execution across multiple agents
|
|
14
|
+
- User wants a central brain that assigns tasks and ingests outcomes
|
|
15
|
+
- Any project with `hive.config.json` or `context.md` + `outcomes/`
|
|
16
|
+
|
|
17
|
+
## Quick Start
|
|
18
|
+
|
|
19
|
+
1. **Locate config** — Look for `hive.config.json` or `.hive/config.json` in workspace root
|
|
20
|
+
2. **Read context** — Use `contextPath` from config (default `context.md`)
|
|
21
|
+
3. **Decide tasks** — Pick 2–3 independent tasks that advance goals
|
|
22
|
+
4. **Launch workers** — Call `mcp_task` for each (in parallel when independent)
|
|
23
|
+
5. **Ingest outcomes** — Update context with results; add to Recent Outcomes, Learnings
|
|
24
|
+
|
|
25
|
+
## Config (hive.config.json)
|
|
26
|
+
|
|
27
|
+
If present, use:
|
|
28
|
+
- `contextPath` — shared state file (default `context.md`)
|
|
29
|
+
- `outcomesPath` — worker outputs (default `outcomes`)
|
|
30
|
+
- `targetProducts` — products/projects to operate on
|
|
31
|
+
- `maxParallelTasks` — max parallel subagents (default 3)
|
|
32
|
+
|
|
33
|
+
## Task Assignment
|
|
34
|
+
|
|
35
|
+
When invoking `mcp_task`:
|
|
36
|
+
- **description** — 3–5 word summary
|
|
37
|
+
- **prompt** — Full instructions: what to do, relevant context from context.md, expected outcome
|
|
38
|
+
- **subagent_type** — `explore` | `shell` | `generalPurpose` (plus role in prompt for enterprise types)
|
|
39
|
+
|
|
40
|
+
For enterprise roles (implementer, architect, evangelist, etc.), use `generalPurpose` and pass the role in the prompt; MCP has fixed enum.
|
|
41
|
+
|
|
42
|
+
## Outcome Ingestion
|
|
43
|
+
|
|
44
|
+
- Add row to Recent Outcomes (Date, Task, Status, Result)
|
|
45
|
+
- Add learnings to Learnings section
|
|
46
|
+
- Remove completed tasks from Pending Tasks
|
|
47
|
+
|
|
48
|
+
## Shared State
|
|
49
|
+
|
|
50
|
+
- **Context** — Central brain reads and writes; workers do not
|
|
51
|
+
- **Outcomes** — Workers write; central brain reads to ingest
|
|
52
|
+
|
|
53
|
+
See [reference.md](reference.md) for full format and worker contract.
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# Hive-Mind Reference
|
|
2
|
+
|
|
3
|
+
## Context Format (context.md)
|
|
4
|
+
|
|
5
|
+
```markdown
|
|
6
|
+
# Hive Context
|
|
7
|
+
|
|
8
|
+
## Goals
|
|
9
|
+
- [Objective 1]
|
|
10
|
+
- [Objective 2]
|
|
11
|
+
|
|
12
|
+
## Strategy
|
|
13
|
+
[Current approach]
|
|
14
|
+
|
|
15
|
+
## Pending Tasks
|
|
16
|
+
| ID | Description | Assigned | Status |
|
|
17
|
+
|----|-------------|----------|--------|
|
|
18
|
+
| 1 | [Task] | - | pending |
|
|
19
|
+
|
|
20
|
+
## Recent Outcomes (last 10)
|
|
21
|
+
| Date | Task | Status | Result |
|
|
22
|
+
|------|------|--------|--------|
|
|
23
|
+
| 2024-01-15 | [Brief] | success | [Summary] |
|
|
24
|
+
|
|
25
|
+
## Learnings
|
|
26
|
+
- [Learning 1]
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Outcome Format (outcomes/YYYY-MM-DD-slug.md)
|
|
30
|
+
|
|
31
|
+
```markdown
|
|
32
|
+
# Outcome: [Task description]
|
|
33
|
+
|
|
34
|
+
**Status:** success | partial | blocked | failed
|
|
35
|
+
|
|
36
|
+
## Result
|
|
37
|
+
[Summary]
|
|
38
|
+
|
|
39
|
+
## Artifacts
|
|
40
|
+
- path/to/file
|
|
41
|
+
|
|
42
|
+
## Suggested Follow-ups
|
|
43
|
+
- [Optional next task]
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## Config Schema (hive.config.json)
|
|
47
|
+
|
|
48
|
+
```json
|
|
49
|
+
{
|
|
50
|
+
"targetProducts": [{"name": "...", "path": "...", "description": "..."}],
|
|
51
|
+
"workspaceRoots": ["/path/to/hive", "/path/to/product"],
|
|
52
|
+
"contextPath": "context.md",
|
|
53
|
+
"outcomesPath": "outcomes",
|
|
54
|
+
"maxParallelTasks": 3
|
|
55
|
+
}
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## Subagent Types
|
|
59
|
+
|
|
60
|
+
| Type | Use when |
|
|
61
|
+
|------|----------|
|
|
62
|
+
| `explore` | Codebase search, finding patterns |
|
|
63
|
+
| `shell` | Commands, terminal operations |
|
|
64
|
+
| `generalPurpose` | Research, complex tasks, enterprise roles (pass role in prompt) |
|
|
65
|
+
|
|
66
|
+
Enterprise roles: architect, implementer, reviewer, deployer, researcher, evangelist, launchSpecialist, etc. — use `generalPurpose` + role in prompt.
|