monomind 2.1.0 → 2.1.4
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/README.md +77 -94
- package/package.json +3 -3
- package/packages/@monomind/cli/.claude/commands/mastermind/createorg.md +8 -9
- package/packages/@monomind/cli/.claude/helpers/handlers/capture-handler.cjs +24 -10
- package/packages/@monomind/cli/.claude/helpers/handlers/gates-handler.cjs +2 -2
- package/packages/@monomind/cli/.claude/helpers/handlers/route-handler.cjs +29 -0
- package/packages/@monomind/cli/.claude/helpers/handlers/session-handler.cjs +35 -23
- package/packages/@monomind/cli/.claude/helpers/hook-handler.cjs +21 -0
- package/packages/@monomind/cli/.claude/helpers/utils/monograph.cjs +73 -2
- package/packages/@monomind/cli/.claude/skills/mastermind-skills/createorg.md +91 -701
- package/packages/@monomind/cli/.claude/skills/mastermind-skills/org-settings.md +46 -47
- package/packages/@monomind/cli/.claude/skills/mastermind-skills/runorg.md +12 -1
- package/packages/@monomind/cli/README.md +77 -94
- package/packages/@monomind/cli/dist/src/browser/workflow/store.d.ts +2 -2
- package/packages/@monomind/cli/dist/src/commands/browse.d.ts +1 -1
- package/packages/@monomind/cli/dist/src/commands/doctor-env-checks.js +5 -0
- package/packages/@monomind/cli/dist/src/commands/org.js +46 -29
- package/packages/@monomind/cli/dist/src/commands/platforms.d.ts +1 -1
- package/packages/@monomind/cli/dist/src/init/executor.js +30 -6
- package/packages/@monomind/cli/dist/src/mcp-tools/auto-install.d.ts +8 -8
- package/packages/@monomind/cli/dist/src/mcp-tools/coherence/types.d.ts +31 -31
- package/packages/@monomind/cli/dist/src/mcp-tools/hive-mind-tools.js +5 -1
- package/packages/@monomind/cli/dist/src/mcp-tools/monograph-tools.js +28 -3
- package/packages/@monomind/cli/dist/src/mcp-tools/quality/coverage-analysis/prioritize-gaps.d.ts +36 -36
- package/packages/@monomind/cli/dist/src/mcp-tools/quality/security-compliance/detect-secrets.d.ts +4 -4
- package/packages/@monomind/cli/dist/src/memory/ewc-consolidation.d.ts +12 -0
- package/packages/@monomind/cli/dist/src/memory/sona-optimizer.d.ts +12 -0
- package/packages/@monomind/cli/dist/src/orgrt/broker.d.ts +3 -1
- package/packages/@monomind/cli/dist/src/orgrt/broker.js +8 -3
- package/packages/@monomind/cli/dist/src/orgrt/bus.d.ts +5 -1
- package/packages/@monomind/cli/dist/src/orgrt/bus.js +5 -1
- package/packages/@monomind/cli/dist/src/orgrt/daemon.d.ts +35 -1
- package/packages/@monomind/cli/dist/src/orgrt/daemon.js +190 -21
- package/packages/@monomind/cli/dist/src/orgrt/forwarder.js +47 -10
- package/packages/@monomind/cli/dist/src/orgrt/inbox.d.ts +11 -0
- package/packages/@monomind/cli/dist/src/orgrt/inbox.js +56 -0
- package/packages/@monomind/cli/dist/src/orgrt/policy.d.ts +5 -1
- package/packages/@monomind/cli/dist/src/orgrt/policy.js +58 -5
- package/packages/@monomind/cli/dist/src/orgrt/server.d.ts +3 -2
- package/packages/@monomind/cli/dist/src/orgrt/server.js +31 -40
- package/packages/@monomind/cli/dist/src/orgrt/session.d.ts +11 -1
- package/packages/@monomind/cli/dist/src/orgrt/session.js +32 -1
- package/packages/@monomind/cli/dist/src/orgrt/test-loop.js +8 -8
- package/packages/@monomind/cli/dist/src/orgrt/types.d.ts +53 -53
- package/packages/@monomind/cli/dist/src/output.d.ts +29 -29
- package/packages/@monomind/cli/dist/src/output.js +10 -2
- package/packages/@monomind/cli/dist/src/pricing/model-pricing.d.ts +1 -1
- package/packages/@monomind/cli/dist/src/types.d.ts +2 -2
- package/packages/@monomind/cli/dist/src/ui/collector.mjs +20 -5
- package/packages/@monomind/cli/dist/src/ui/dashboard.html +465 -500
- package/packages/@monomind/cli/dist/src/ui/orgs-files.js +192 -0
- package/packages/@monomind/cli/dist/src/ui/orgs.html +21 -52
- package/packages/@monomind/cli/dist/src/ui/server.mjs +174 -164
- package/packages/@monomind/cli/package.json +12 -16
- package/packages/@monomind/cli/scripts/publish.sh +6 -0
- package/scripts/generate-agent-avatars.mjs +3 -3
- package/packages/@monomind/cli/dist/src/orgrt/live.html +0 -56
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: mastermind-org-settings
|
|
3
|
-
description: Mastermind org-settings — edit
|
|
3
|
+
description: Mastermind org-settings — edit Org Runtime v2 configuration (name, goal, schedule, budget_tokens, memory_namespace, max_turns_per_message), export org as portable JSON, and import an org from a previously exported file.
|
|
4
4
|
type: domain-skill
|
|
5
5
|
default_mode: confirm
|
|
6
6
|
---
|
|
@@ -9,6 +9,8 @@ default_mode: confirm
|
|
|
9
9
|
|
|
10
10
|
This skill is invoked by `mastermind:org-settings` or directly via `/mastermind:org-settings`.
|
|
11
11
|
|
|
12
|
+
It edits `.monomind/orgs/<org_name>.json` in place, and only ever touches fields that `OrgDefSchema` (`packages/@monomind/cli/src/orgrt/types.ts`) actually defines — every field listed below is read by the daemon (`org.ts`/`daemon.ts`/`session.ts`) at `monomind org run`/`serve` time. There is no `topology`, `governance`, `alert_threshold`, or `ceo_adapter` in Org Runtime v2 — those were v1 board/prompt-orchestration fields with no runtime effect and have been removed from this skill.
|
|
13
|
+
|
|
12
14
|
---
|
|
13
15
|
|
|
14
16
|
## Inputs
|
|
@@ -16,7 +18,7 @@ This skill is invoked by `mastermind:org-settings` or directly via `/mastermind:
|
|
|
16
18
|
- `brain_context`: BRAIN CONTEXT block (injected by command, or loaded below if standalone)
|
|
17
19
|
- `org_name`: org to configure (required)
|
|
18
20
|
- `action`: show | edit | export | import
|
|
19
|
-
- `field`: field to edit (name, goal,
|
|
21
|
+
- `field`: field to edit (name, goal, schedule, budget_tokens, memory_namespace, max_turns_per_message)
|
|
20
22
|
- `value`: new value for the field
|
|
21
23
|
- `export_path`: path to write exported JSON (default: `.monomind/exports/<org_name>-<timestamp>.json`)
|
|
22
24
|
- `import_path`: path to JSON file to import from
|
|
@@ -49,19 +51,18 @@ Display current org config in a readable format:
|
|
|
49
51
|
echo "ORG SETTINGS — ${org_name}"
|
|
50
52
|
echo "──────────────────────────────────────────"
|
|
51
53
|
jq -r '
|
|
52
|
-
" Name:
|
|
53
|
-
" Goal:
|
|
54
|
-
"
|
|
55
|
-
"
|
|
56
|
-
"
|
|
57
|
-
"
|
|
58
|
-
"
|
|
59
|
-
"
|
|
60
|
-
" Roles: \(.roles | length) agents"
|
|
54
|
+
" Name: \(.name // "-")",
|
|
55
|
+
" Goal: \(.goal // "-")",
|
|
56
|
+
" Status: \(.status // "stopped")",
|
|
57
|
+
" Schedule: \(.schedule // "manual (no auto-schedule)")",
|
|
58
|
+
" Budget: \(.run_config.budget_tokens // 1000000) tokens",
|
|
59
|
+
" Memory namespace: \(.run_config.memory_namespace // ("org:" + (.name // "-")))",
|
|
60
|
+
" Max turns/message: \(.run_config.max_turns_per_message // 30)",
|
|
61
|
+
" Roles: \(.roles | length) agents"
|
|
61
62
|
' "$orgFile"
|
|
62
63
|
echo ""
|
|
63
64
|
echo " Run /mastermind:org-settings --org ${org_name} --action edit --field <field> --value <value>"
|
|
64
|
-
echo " Fields: name | goal |
|
|
65
|
+
echo " Fields: name | goal | schedule | budget_tokens | memory_namespace | max_turns_per_message"
|
|
65
66
|
```
|
|
66
67
|
|
|
67
68
|
### edit
|
|
@@ -79,23 +80,30 @@ case "$field" in
|
|
|
79
80
|
echo "$value" | grep -qE '^[a-z0-9][a-z0-9-]{0,63}$' || { echo "ERROR: name must match ^[a-z0-9][a-z0-9-]{0,63}$"; exit 1; }
|
|
80
81
|
newOrgFile=".monomind/orgs/${value}.json"
|
|
81
82
|
[ -f "$newOrgFile" ] && { echo "ERROR: An org named '${value}' already exists."; exit 1; }
|
|
83
|
+
# Refuse to rename while the daemon has this org running — it holds the old
|
|
84
|
+
# name's paths (defPath, cwd, runtime.json) in memory; a rename mid-run would
|
|
85
|
+
# orphan that live state instead of moving it.
|
|
86
|
+
runtime_status=$(jq -r '.status // "stopped"' ".monomind/orgs/${org_name}/runtime.json" 2>/dev/null || echo "stopped")
|
|
87
|
+
[ "$runtime_status" = "running" ] && { echo "ERROR: org '${org_name}' is running — stop it first: monomind org stop ${org_name}"; exit 1; }
|
|
82
88
|
# Update the name field inside the JSON
|
|
83
89
|
jq --arg v "$value" '.name = $v' "$orgFile" > "$tmp" && mv "$tmp" "$orgFile"
|
|
84
90
|
# Rename the main config file
|
|
85
91
|
mv "$orgFile" "$newOrgFile"
|
|
86
|
-
# Rename all side-car
|
|
87
|
-
|
|
92
|
+
# Rename all side-car artifact files — same suffix list as ORG_ARTIFACT_SUFFIXES
|
|
93
|
+
# in packages/@monomind/cli/src/commands/org.ts (single source of truth for what
|
|
94
|
+
# counts as an org-internal artifact vs. the org's own config file).
|
|
95
|
+
for suffix in -state -goals -threads -activity -approvals -members -secrets -budgets \
|
|
96
|
+
-routines -issues -projects -workspaces -worktrees -environments \
|
|
97
|
+
-plugins -adapters -join-requests -bootstrap -project-workspaces \
|
|
98
|
+
-approval-comments -skills; do
|
|
88
99
|
old_file=".monomind/orgs/${org_name}${suffix}.json"
|
|
89
100
|
[ -f "$old_file" ] && mv "$old_file" ".monomind/orgs/${value}${suffix}.json" || true
|
|
90
101
|
old_jsonl=".monomind/orgs/${org_name}${suffix}.jsonl"
|
|
91
102
|
[ -f "$old_jsonl" ] && mv "$old_jsonl" ".monomind/orgs/${value}${suffix}.jsonl" || true
|
|
92
103
|
done
|
|
93
|
-
# Rename
|
|
94
|
-
|
|
95
|
-
[ -
|
|
96
|
-
# Rename stop file if present
|
|
97
|
-
old_stop=".monomind/orgs/.stops/${org_name}.stop"
|
|
98
|
-
[ -f "$old_stop" ] && mv "$old_stop" ".monomind/orgs/.stops/${value}.stop" || true
|
|
104
|
+
# Rename the org's runtime subdirectory (runs/, workspace/, stop file) if present
|
|
105
|
+
old_dir=".monomind/orgs/${org_name}"
|
|
106
|
+
[ -d "$old_dir" ] && mv "$old_dir" ".monomind/orgs/${value}" || true
|
|
99
107
|
echo "Renamed org '${org_name}' → '${value}'"
|
|
100
108
|
org_name="$value"
|
|
101
109
|
orgFile="$newOrgFile"
|
|
@@ -104,42 +112,33 @@ case "$field" in
|
|
|
104
112
|
jq --arg v "$value" '.goal = $v' "$orgFile" > "$tmp" && mv "$tmp" "$orgFile"
|
|
105
113
|
echo "Updated: goal → $value"
|
|
106
114
|
;;
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
esac
|
|
118
|
-
jq --arg v "$value" '.governance.policy = $v' "$orgFile" > "$tmp" && mv "$tmp" "$orgFile"
|
|
119
|
-
echo "Updated: governance → $value"
|
|
115
|
+
schedule)
|
|
116
|
+
# daemon format (parseSchedule in orgrt/scheduler.ts): "<N>s" | "<N>m" | "<N>h", or "none"/"" to clear
|
|
117
|
+
if [ "$value" = "none" ] || [ -z "$value" ]; then
|
|
118
|
+
jq '.schedule = null' "$orgFile" > "$tmp" && mv "$tmp" "$orgFile"
|
|
119
|
+
echo "Updated: schedule → none (manual — run with monomind org run ${org_name})"
|
|
120
|
+
else
|
|
121
|
+
echo "$value" | grep -qE '^[0-9]+(s|m|h)$' || { echo "ERROR: schedule must match ^[0-9]+(s|m|h)$ (e.g. 30m, 2h) or 'none'"; exit 1; }
|
|
122
|
+
jq --arg v "$value" '.schedule = $v' "$orgFile" > "$tmp" && mv "$tmp" "$orgFile"
|
|
123
|
+
echo "Updated: schedule → $value (pick up with: monomind org serve)"
|
|
124
|
+
fi
|
|
120
125
|
;;
|
|
121
126
|
budget_tokens)
|
|
122
127
|
[[ "$value" =~ ^[0-9]+$ ]] || { echo "ERROR: budget_tokens must be a positive integer"; exit 1; }
|
|
123
128
|
jq --argjson v "$value" '.run_config.budget_tokens = $v' "$orgFile" > "$tmp" && mv "$tmp" "$orgFile"
|
|
124
129
|
echo "Updated: budget_tokens → $value"
|
|
125
130
|
;;
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
value=$(awk "BEGIN{printf \"%.2f\",$value/100}")
|
|
130
|
-
fi
|
|
131
|
-
jq --argjson v "$value" '.run_config.alert_threshold = $v' "$orgFile" > "$tmp" && mv "$tmp" "$orgFile"
|
|
132
|
-
echo "Updated: alert_threshold → $value"
|
|
131
|
+
memory_namespace)
|
|
132
|
+
jq --arg v "$value" '.run_config.memory_namespace = $v' "$orgFile" > "$tmp" && mv "$tmp" "$orgFile"
|
|
133
|
+
echo "Updated: memory_namespace → $value"
|
|
133
134
|
;;
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
jq --arg v "$value" '.run_config.ceo_adapter = $v' "$orgFile" > "$tmp" && mv "$tmp" "$orgFile"
|
|
139
|
-
echo "Updated: ceo_adapter → $value"
|
|
135
|
+
max_turns_per_message)
|
|
136
|
+
[[ "$value" =~ ^[0-9]+$ ]] || { echo "ERROR: max_turns_per_message must be a positive integer"; exit 1; }
|
|
137
|
+
jq --argjson v "$value" '.run_config.max_turns_per_message = $v' "$orgFile" > "$tmp" && mv "$tmp" "$orgFile"
|
|
138
|
+
echo "Updated: max_turns_per_message → $value"
|
|
140
139
|
;;
|
|
141
140
|
*)
|
|
142
|
-
echo "ERROR: Unknown field '$field'. Valid fields: name, goal,
|
|
141
|
+
echo "ERROR: Unknown field '$field'. Valid fields: name, goal, schedule, budget_tokens, memory_namespace, max_turns_per_message"
|
|
143
142
|
exit 1
|
|
144
143
|
;;
|
|
145
144
|
esac
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: mastermind-runorg
|
|
3
|
-
description: Mastermind runorg — load a saved org definition and start it as a persistent
|
|
3
|
+
description: "DEPRECATED (2026-07): superseded by `monomind org run <name>` (SDK Org Runtime v2). Mastermind runorg — load a saved org definition and start it as a persistent, prompt-orchestrated agent organization. The boss agent coordinates all roles, agents pick up tasks from a shared board, and the org runs until stopped."
|
|
4
4
|
type: domain-skill
|
|
5
5
|
default_mode: auto
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# Mastermind Run Org
|
|
9
9
|
|
|
10
|
+
> **DEPRECATED (2026-07): superseded by `monomind org run <name>` (SDK Org Runtime v2).**
|
|
11
|
+
> This prompt-orchestrated path (Task-tool-spawned boss, monotask board, `ORG_VARS`/`runcontext.json`-style variable threading, manual dashboard-event curl calls) has no delivery guarantees and no ground-truth event stream — the v2 daemon spawns every role as its own live SDK session, routes messages directly via the `org_send` tool, and forwards dashboard events itself. It remains only for orgs not yet migrated off the v1 `topology`/`communication`/`board_id` config shape. New orgs created with `/mastermind:createorg` are already v2-shaped and MUST be started with `monomind org run <name>` — do not route them through this skill.
|
|
12
|
+
|
|
10
13
|
This skill is invoked by `mastermind:runorg` or directly via `/mastermind:runorg`.
|
|
11
14
|
|
|
12
15
|
---
|
|
@@ -40,6 +43,14 @@ fi
|
|
|
40
43
|
```
|
|
41
44
|
Return `status: blocked` with message: "Org '<org_name>' not found. Run /mastermind:createorg to define it."
|
|
42
45
|
|
|
46
|
+
**v2 config guard — check this before anything else.** `/mastermind:createorg` now writes v2-shaped configs with no `topology`/`board_id`/`communication` field at all:
|
|
47
|
+
```bash
|
|
48
|
+
is_v2=$(jq -r 'if has("topology") or has("board_id") then "no" else "yes" end' ".monomind/orgs/${org_name}.json")
|
|
49
|
+
```
|
|
50
|
+
If `is_v2 == "yes"`, **stop and return `status: blocked`** with message: "Org '<org_name>' is a v2 config (Org Runtime v2) — this skill only understands the deprecated v1 board/topology shape. Start it with: `monomind org run <org_name>` (or `monomind org serve` if it has a `schedule`)." Do not attempt to derive a topology, spawn a boss via Task tool, or touch a monotask board for a v2 config — every field this skill reads from Step 2 onward (`topology`, `board_id`, `todo_col_id`, `communication`) is simply absent there.
|
|
51
|
+
|
|
52
|
+
Only proceed past this guard for a genuine legacy v1 config (has `topology` and/or `board_id`).
|
|
53
|
+
|
|
43
54
|
Validate the config has at minimum: `name`, `goal`, `roles` (non-empty array). The `communication` field is optional; fall back to `edges` if absent (both have the same schema: `from`, `to`, `type`).
|
|
44
55
|
|
|
45
56
|
---
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
<p align="center">
|
|
2
|
-
<img src="assets/banner.png" alt="Monomind" width="600" />
|
|
2
|
+
<img src="https://raw.githubusercontent.com/monoes/monomind/main/assets/banner.png" alt="Monomind" width="600" />
|
|
3
3
|
</p>
|
|
4
4
|
|
|
5
5
|
<h1 align="center">Monomind</h1>
|
|
6
6
|
|
|
7
7
|
<p align="center">
|
|
8
|
-
<strong>
|
|
9
|
-
|
|
8
|
+
<strong>An open-source MCP server that extends Claude Code with a codebase knowledge graph, persistent memory, and multi-agent coordination.</strong><br/>
|
|
9
|
+
MIT licensed · Fully local · No data leaves your machine
|
|
10
10
|
</p>
|
|
11
11
|
|
|
12
12
|
<p align="center">
|
|
@@ -30,126 +30,106 @@
|
|
|
30
30
|
|
|
31
31
|
## What is Monomind?
|
|
32
32
|
|
|
33
|
-
Claude Code
|
|
33
|
+
Monomind is an **open-source CLI and MCP server** that plugs into Claude Code via the standard [Model Context Protocol](https://modelcontextprotocol.io/). It adds capabilities that Claude Code doesn't ship with out of the box:
|
|
34
34
|
|
|
35
|
-
|
|
35
|
+
- **Codebase knowledge graph** — tree-sitter parses your code into a SQLite-backed graph of files, functions, classes, and their relationships. Query imports, callers, and blast radius before making changes.
|
|
36
|
+
- **Persistent memory** — a JSON pattern store with episodic recall that survives across sessions. Agents and orgs share context without re-prompting.
|
|
37
|
+
- **Multi-agent coordination** — in-session, spawn ad-hoc agent teams via Claude Code's Task tool; for persistent background work, `monomind org run` starts a real SDK-backed daemon with policy-gated role agents and a live dashboard.
|
|
38
|
+
- **Reusable slash commands** — 30+ development workflows (build, review, debug, TDD, architecture) available as `/mastermind:*` commands inside Claude Code.
|
|
36
39
|
|
|
37
40
|
```bash
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
# Or run the autonomous code improvement loop
|
|
43
|
-
/mastermind:autodev --tillend --focus security
|
|
41
|
+
npm install -g monomind # MIT licensed, runs entirely on your machine
|
|
42
|
+
cd your-project && monomind init
|
|
43
|
+
claude mcp add monomind -- npx -y monomind@latest mcp start
|
|
44
44
|
```
|
|
45
45
|
|
|
46
|
-
|
|
46
|
+
### Trust & Security
|
|
47
|
+
|
|
48
|
+
| Concern | Answer |
|
|
49
|
+
|---|---|
|
|
50
|
+
| **License** | [MIT](LICENSE) — use it however you want |
|
|
51
|
+
| **Data privacy** | Everything runs locally — your code and memory store never leave your machine. The one exception: crash reporting is on by default (`monomind crash-reporting disable` to opt out) — a hard crash in monomind/mono-agent/monotask/mono-clip files a GitHub issue on that tool's own repo via the GitHub API. That's the only network call Monomind itself makes; it never phones a monoes-controlled server. |
|
|
52
|
+
| **Dependencies** | Standard npm packages (tree-sitter, better-sqlite3, sql.js, zod). tree-sitter and better-sqlite3 are native (prebuilt) Node addons, not pure JS/WASM — sql.js is WASM. No post-install scripts that download code. |
|
|
53
|
+
| **Permissions** | Registers as an MCP server — Claude Code controls what tools are available and prompts you before executing anything sensitive. |
|
|
54
|
+
| **Source** | Fully open. Read every line at [github.com/monoes/monomind](https://github.com/monoes/monomind). |
|
|
55
|
+
| **Maintenance** | Active development, regular releases on npm. |
|
|
47
56
|
|
|
48
57
|
---
|
|
49
58
|
|
|
50
59
|
## 🏢 Autonomous Organizations
|
|
51
60
|
|
|
52
|
-
> **This is the headline feature.**
|
|
61
|
+
> **This is the headline feature.** `monomind org run` starts a persistent, SDK-backed daemon that runs an autonomous agent organization — roles, hierarchy, policy-gated tool access, a live dashboard — until you stop it.
|
|
53
62
|
|
|
54
63
|
### The idea
|
|
55
64
|
|
|
56
|
-
Every business function needs a team.
|
|
65
|
+
Every business function needs a team. Define the org once as a JSON file — goal, roles, who reports to whom, per-role tool/file/budget policy — then run it as a real background daemon backed by the Claude Agent SDK. It persists across sessions, streams live into the dashboard Claude Code auto-starts for the project, and can discover and message other Monomind orgs running on the same machine.
|
|
57
66
|
|
|
58
67
|
```mermaid
|
|
59
68
|
flowchart TD
|
|
60
69
|
U(["You"])
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
BOSS["Boss Agent\
|
|
64
|
-
W["Writer
|
|
70
|
+
DEF["org.json\nGoal + roles + policy"]
|
|
71
|
+
RUN["monomind org run\nStart SDK daemon"]
|
|
72
|
+
BOSS["Boss Agent\nAgent SDK session"]
|
|
73
|
+
W["Writer"]
|
|
65
74
|
S["SEO Specialist"]
|
|
66
75
|
R["Reviewer"]
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
MEM[("Persistent\nMemory")]
|
|
76
|
+
DASH[("Dashboard\n:4242\nauto-started by\nClaude Code hook")]
|
|
77
|
+
XORG[("Other orgs\ncross-process")]
|
|
70
78
|
|
|
71
|
-
U -->
|
|
79
|
+
U --> DEF --> RUN --> BOSS
|
|
72
80
|
BOSS -->|spawns| W
|
|
73
81
|
BOSS -->|spawns| S
|
|
74
82
|
BOSS -->|spawns| R
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
W <-->|stores output| MEM
|
|
78
|
-
S <-->|reads context| MEM
|
|
83
|
+
RUN -->|forwards events| DASH
|
|
84
|
+
RUN <-.->|--cross-process| XORG
|
|
79
85
|
|
|
80
86
|
style BOSS fill:#00D2AA22,stroke:#00D2AA
|
|
81
|
-
style
|
|
82
|
-
style
|
|
87
|
+
style DASH fill:#F59E0B22,stroke:#F59E0B
|
|
88
|
+
style XORG fill:#8B5CF622,stroke:#8B5CF6
|
|
83
89
|
```
|
|
84
90
|
|
|
85
|
-
###
|
|
86
|
-
|
|
87
|
-
**Step 1 — Design it:**
|
|
88
|
-
|
|
89
|
-
```
|
|
90
|
-
/ mastermind:createorg content-team
|
|
91
|
-
"Build and publish 3 blog posts per week on AI dev tools"
|
|
92
|
-
|
|
93
|
-
Deriving roles from goal...
|
|
94
|
-
|
|
95
|
-
╔ ORG: content-team
|
|
96
|
-
║ TOPOLOGY: star (5 roles)
|
|
97
|
-
|
|
98
|
-
boss → coordinator
|
|
99
|
-
writer → Content Creator
|
|
100
|
-
reviewer → reviewer
|
|
101
|
-
marketer → Growth Hacker
|
|
102
|
-
seo → SEO Specialist
|
|
91
|
+
### Run one
|
|
103
92
|
|
|
104
|
-
|
|
105
|
-
|
|
93
|
+
```bash
|
|
94
|
+
# .monomind/orgs/<name>.json defines the org: goal, roles, policy.
|
|
95
|
+
# See .monomind/orgs/sample-team.json in a fresh `monomind init` for a working example.
|
|
96
|
+
# Open the project in Claude Code first — a SessionStart hook auto-launches
|
|
97
|
+
# the dashboard at http://localhost:4242 if it isn't already running.
|
|
106
98
|
|
|
107
|
-
|
|
108
|
-
→ Run: /mastermind:runorg --org content-team
|
|
109
|
-
```
|
|
99
|
+
monomind org run content-team --task "Build and publish 3 blog posts per week"
|
|
110
100
|
|
|
111
|
-
|
|
101
|
+
# ✓ Boss agent (Claude Agent SDK session) spawns, reads the org goal,
|
|
102
|
+
# assigns work to role agents, coordinates until the task completes
|
|
103
|
+
# or you stop it. Every event streams into the dashboard above.
|
|
112
104
|
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
# Boss agent spawns in background
|
|
117
|
-
# Coordinates all roles via shared task board
|
|
118
|
-
# Checkpoints every 30 minutes
|
|
119
|
-
# Loops until you stop it
|
|
105
|
+
monomind org status content-team # runtime state
|
|
106
|
+
monomind org stop content-team # request a graceful stop
|
|
107
|
+
monomind org list # every org + status
|
|
120
108
|
```
|
|
121
109
|
|
|
122
110
|
### What runs under the hood
|
|
123
111
|
|
|
124
112
|
| What | How |
|
|
125
113
|
|---|---|
|
|
126
|
-
| **
|
|
127
|
-
| **
|
|
128
|
-
| **
|
|
129
|
-
| **
|
|
130
|
-
| **
|
|
131
|
-
| **Governance** | `auto` (free), `board` (approve sensitive), `strict` (approve all external actions) |
|
|
132
|
-
|
|
133
|
-
### Topology is auto-derived
|
|
134
|
-
|
|
135
|
-
```mermaid
|
|
136
|
-
graph LR
|
|
137
|
-
A["1-3 roles"] -->|mesh| B["All-to-all\ndirect comms"]
|
|
138
|
-
C["4-6 roles"] -->|star| D["Boss to workers\nfan-out"]
|
|
139
|
-
E["7+ roles"] -->|hierarchical| F["Boss to leads to workers\nmiddle management"]
|
|
140
|
-
```
|
|
114
|
+
| **OrgDaemon** | Hosts one or more orgs in a single process; real Claude Agent SDK sessions per role, not simulated |
|
|
115
|
+
| **PolicyEngine** | Per-role gates on tool access, file read/write scope, web access, token budget — enforced, with a full audit trail |
|
|
116
|
+
| **Dashboard** | `org run` forwards every event to the control server on `:4242` (found via `.monomind/control.json`) — that server is auto-launched by a Claude Code SessionStart hook, not by any CLI command; there's no separate per-org dashboard process |
|
|
117
|
+
| **Cross-process comms** | `--cross-process` (default on) lets orgs on different `monomind` processes/projects discover and message each other |
|
|
118
|
+
| **Scheduling** | `monomind org serve` hosts orgs whose definition has a `schedule` field, running them on interval |
|
|
141
119
|
|
|
142
120
|
### Org management commands
|
|
143
121
|
|
|
144
122
|
```bash
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
123
|
+
monomind org run <name> [--task "..."] [--cross-process] # start a daemon
|
|
124
|
+
monomind org stop <name> # request a running org to stop
|
|
125
|
+
monomind org status [name] # runtime state for one or all orgs
|
|
126
|
+
monomind org list # list every org + status
|
|
127
|
+
monomind org serve [--cross-process] # host-only mode, runs scheduled orgs
|
|
128
|
+
monomind org delete <name> # remove an org
|
|
151
129
|
```
|
|
152
130
|
|
|
131
|
+
> **Note:** the older `/mastermind:createorg` + `/mastermind:runorg` prompt-orchestrated flow is deprecated — it has no delivery guarantees or ground-truth event stream. It still runs for orgs not yet migrated, but new orgs should use `monomind org run` directly against a hand-authored `.monomind/orgs/<name>.json`.
|
|
132
|
+
|
|
153
133
|
---
|
|
154
134
|
|
|
155
135
|
## ⚡ The Autonomous Build Loop
|
|
@@ -200,17 +180,17 @@ cd your-project
|
|
|
200
180
|
monomind init
|
|
201
181
|
|
|
202
182
|
# 3. Wire into Claude Code as an MCP server
|
|
203
|
-
claude mcp add monomind npx monomind mcp start
|
|
183
|
+
claude mcp add monomind -- npx -y monomind@latest mcp start
|
|
204
184
|
|
|
205
185
|
# 4. Health check
|
|
206
186
|
monomind doctor --fix
|
|
207
187
|
```
|
|
208
188
|
|
|
209
|
-
Open Claude Code. You now have
|
|
189
|
+
Open Claude Code. You now have 49 `/mastermind:*` workflows available:
|
|
210
190
|
|
|
211
191
|
```bash
|
|
212
192
|
/mastermind:autodev --tillend # start autonomous code loop
|
|
213
|
-
|
|
193
|
+
monomind org run my-team # run your first AI org (see .monomind/orgs/sample-team.json)
|
|
214
194
|
/mastermind:help # show all commands
|
|
215
195
|
```
|
|
216
196
|
|
|
@@ -262,7 +242,7 @@ Before touching any file, Monomind queries **Monograph** — a SQLite-backed kno
|
|
|
262
242
|
|
|
263
243
|
## 🎣 Hooks & Workers
|
|
264
244
|
|
|
265
|
-
Monomind wires
|
|
245
|
+
Monomind wires 29 hook subcommands into Claude Code across edit, task, command, and session lifecycle events — logging patterns, routing agents, and feeding the intelligence system.
|
|
266
246
|
|
|
267
247
|
```mermaid
|
|
268
248
|
flowchart LR
|
|
@@ -296,7 +276,7 @@ const result = await fence.detect(userInput);
|
|
|
296
276
|
|
|
297
277
|
---
|
|
298
278
|
|
|
299
|
-
## 📋
|
|
279
|
+
## 📋 49 Mastermind Commands
|
|
300
280
|
|
|
301
281
|
Everything runs from inside Claude Code via slash commands. Here's the highlight reel:
|
|
302
282
|
|
|
@@ -315,9 +295,9 @@ Everything runs from inside Claude Code via slash commands. Here's the highlight
|
|
|
315
295
|
### Organizations
|
|
316
296
|
| Command | What it does |
|
|
317
297
|
|---|---|
|
|
318
|
-
|
|
|
319
|
-
|
|
|
320
|
-
|
|
|
298
|
+
| `monomind org run <name>` | Start an org as a real SDK-backed daemon |
|
|
299
|
+
| `monomind org status` / `list` | Runtime state for one or all orgs |
|
|
300
|
+
| `monomind org stop <name>` | Request a graceful stop |
|
|
321
301
|
| `/mastermind:approve` | Action pending approval requests |
|
|
322
302
|
|
|
323
303
|
### Business Domains
|
|
@@ -329,7 +309,7 @@ Everything runs from inside Claude Code via slash commands. Here's the highlight
|
|
|
329
309
|
| `/mastermind:finance` | Budgets, invoicing, modeling |
|
|
330
310
|
| `/mastermind:ops` | Operations and workflow automation |
|
|
331
311
|
|
|
332
|
-
**[→ Full reference (
|
|
312
|
+
**[→ Full reference (49 commands)](https://monoes.github.io/monomind/#slash)**
|
|
333
313
|
|
|
334
314
|
---
|
|
335
315
|
|
|
@@ -351,24 +331,27 @@ graph TD
|
|
|
351
331
|
CC["Claude Code"]
|
|
352
332
|
MCP["MCP Server\nmonomind mcp start"]
|
|
353
333
|
D["Background Workers\n(@monomind/hooks, in-process)"]
|
|
334
|
+
ORG["OrgDaemon\nmonomind org run\nreal SDK sessions"]
|
|
354
335
|
|
|
355
|
-
CC <-->|"MCP tools: monograph, memory
|
|
336
|
+
CC <-->|"MCP tools: monograph, memory"| MCP
|
|
356
337
|
MCP <--> D
|
|
357
338
|
|
|
358
339
|
D --> ADB[("Memory store\npatterns + episodes")]
|
|
359
340
|
D --> MG[("Monograph\ncode graph")]
|
|
360
|
-
D --> HK["Hooks\
|
|
361
|
-
D --> SW["Swarm\n4 topologies\n3 consensus strategies"]
|
|
341
|
+
D --> HK["Hooks\n29 subcommands"]
|
|
362
342
|
|
|
363
|
-
CC -->|"Task tool - spawns agents"| AG["
|
|
343
|
+
CC -->|"Task tool - spawns agents"| AG["In-session agents\narchitect, coder\ntester, reviewer\nsecurity, perf"]
|
|
364
344
|
AG <-->|reads and writes| ADB
|
|
345
|
+
ORG -->|"spawns, policy-gated"| RA["Role agents"]
|
|
346
|
+
ORG <-->|reads and writes| ADB
|
|
365
347
|
|
|
366
348
|
style CC fill:#00D2AA22,stroke:#00D2AA
|
|
367
349
|
style AG fill:#8B5CF622,stroke:#8B5CF6
|
|
368
350
|
style ADB fill:#F59E0B22,stroke:#F59E0B
|
|
351
|
+
style ORG fill:#F59E0B22,stroke:#F59E0B
|
|
369
352
|
```
|
|
370
353
|
|
|
371
|
-
**Claude Code
|
|
354
|
+
**Claude Code's Task tool drives in-session multi-agent work; `monomind org run` drives persistent background orgs.** Your data never leaves your machine.
|
|
372
355
|
|
|
373
356
|
---
|
|
374
357
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { WorkflowDef, RunRecord } from './types.js';
|
|
2
2
|
export declare class WorkflowStoreError extends Error {
|
|
3
|
-
readonly cause?: unknown
|
|
4
|
-
constructor(message: string, cause?: unknown
|
|
3
|
+
readonly cause?: unknown;
|
|
4
|
+
constructor(message: string, cause?: unknown);
|
|
5
5
|
}
|
|
6
6
|
export declare function readWorkflow(filePath: string): Promise<WorkflowDef>;
|
|
7
7
|
export declare function writeRunRecord(record: RunRecord): Promise<void>;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
declare const browseCommand: {
|
|
2
|
-
subcommands: import("../types.js").Command[];
|
|
3
2
|
name: string;
|
|
4
3
|
description: string;
|
|
5
4
|
aliases?: string[];
|
|
@@ -7,6 +6,7 @@ declare const browseCommand: {
|
|
|
7
6
|
examples?: import("@monoes/monobrowse/cli/types").CommandExample[];
|
|
8
7
|
action?: import("@monoes/monobrowse/cli/types").CommandAction;
|
|
9
8
|
hidden?: boolean;
|
|
9
|
+
subcommands: import("../types.js").Command[];
|
|
10
10
|
};
|
|
11
11
|
export default browseCommand;
|
|
12
12
|
//# sourceMappingURL=browse.d.ts.map
|
|
@@ -87,6 +87,11 @@ export async function checkDiskSpace() {
|
|
|
87
87
|
}
|
|
88
88
|
}
|
|
89
89
|
export async function checkBuildTools() {
|
|
90
|
+
// Only meaningful for Node/TS projects — a Go, Python, or Rust repo has no
|
|
91
|
+
// reason to install TypeScript, and warning about it there is just noise.
|
|
92
|
+
if (!existsSync(join(process.cwd(), 'package.json'))) {
|
|
93
|
+
return { name: 'TypeScript', status: 'pass', message: 'N/A — no package.json (not a Node.js project)' };
|
|
94
|
+
}
|
|
90
95
|
try {
|
|
91
96
|
const tscVersion = await runCommand('npx tsc --version', 10000);
|
|
92
97
|
if (!tscVersion || tscVersion.includes('not found')) {
|