monomind 2.3.3 → 2.3.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.
Files changed (41) hide show
  1. package/README.md +37 -4
  2. package/package.json +1 -1
  3. package/packages/@monomind/cli/.claude/commands/mastermind/{approve.md → approvev1.md} +12 -9
  4. package/packages/@monomind/cli/.claude/commands/mastermind/help.md +18 -0
  5. package/packages/@monomind/cli/.claude/commands/mastermind/master.md +3 -3
  6. package/packages/@monomind/cli/.claude/commands/mastermind/runorg.md +19 -107
  7. package/packages/@monomind/cli/.claude/commands/mastermind/runorgv1.md +159 -0
  8. package/packages/@monomind/cli/.claude/helpers/handlers/route-handler.cjs +45 -2
  9. package/packages/@monomind/cli/.claude/helpers/handlers/session-restore-handler.cjs +25 -18
  10. package/packages/@monomind/cli/.claude/skills/mastermind-skills/agents.md +5 -1
  11. package/packages/@monomind/cli/.claude/skills/mastermind-skills/{approve.md → approvev1.md} +8 -5
  12. package/packages/@monomind/cli/.claude/skills/mastermind-skills/env.md +7 -2
  13. package/packages/@monomind/cli/.claude/skills/mastermind-skills/{heartbeat.md → heartbeatv1.md} +7 -4
  14. package/packages/@monomind/cli/.claude/skills/mastermind-skills/inbox.md +14 -2
  15. package/packages/@monomind/cli/.claude/skills/mastermind-skills/instance.md +3 -1
  16. package/packages/@monomind/cli/.claude/skills/mastermind-skills/org-settings.md +4 -1
  17. package/packages/@monomind/cli/.claude/skills/mastermind-skills/orgs.md +14 -13
  18. package/packages/@monomind/cli/.claude/skills/mastermind-skills/orgstatus.md +19 -8
  19. package/packages/@monomind/cli/.claude/skills/mastermind-skills/projects.md +3 -0
  20. package/packages/@monomind/cli/.claude/skills/mastermind-skills/runorg.md +37 -725
  21. package/packages/@monomind/cli/.claude/skills/mastermind-skills/runorgv1.md +731 -0
  22. package/packages/@monomind/cli/.claude/skills/mastermind-skills/stoporg.md +10 -3
  23. package/packages/@monomind/cli/.claude/skills/mastermind-skills/tasks.md +4 -1
  24. package/packages/@monomind/cli/README.md +37 -4
  25. package/packages/@monomind/cli/dist/src/commands/cleanup.js +30 -8
  26. package/packages/@monomind/cli/dist/src/commands/doctor-project-checks.js +23 -10
  27. package/packages/@monomind/cli/dist/src/commands/org-observe.js +30 -26
  28. package/packages/@monomind/cli/dist/src/commands/org.js +52 -2
  29. package/packages/@monomind/cli/dist/src/knowledge/document-pipeline.js +0 -0
  30. package/packages/@monomind/cli/dist/src/memory/memory-bridge.js +31 -12
  31. package/packages/@monomind/cli/dist/src/orgrt/daemon.js +45 -9
  32. package/packages/@monomind/cli/dist/src/orgrt/mailbox.d.ts +23 -0
  33. package/packages/@monomind/cli/dist/src/orgrt/mailbox.js +33 -1
  34. package/packages/@monomind/cli/dist/src/orgrt/migrate.d.ts +26 -0
  35. package/packages/@monomind/cli/dist/src/orgrt/migrate.js +111 -0
  36. package/packages/@monomind/cli/dist/src/orgrt/reporting.js +8 -1
  37. package/packages/@monomind/cli/dist/src/orgrt/session.js +8 -2
  38. package/packages/@monomind/cli/dist/src/ui/dashboard.html +44 -0
  39. package/packages/@monomind/cli/dist/src/ui/orgs.html +2 -2
  40. package/packages/@monomind/cli/dist/src/ui/server.mjs +12 -1
  41. package/packages/@monomind/cli/package.json +2 -2
@@ -51,12 +51,15 @@ stateFile=".monomind/orgs/${org_name}-state.json"
51
51
 
52
52
  jq -r '(.roles // [])[] | "• [\(.id)] \(.title) agent=\(.agent_type) reports_to=\(.reports_to // "none")"' "$orgFile"
53
53
 
54
+ # LEGACY-ORG-V1: the state file's per-agent heartbeat tracking is a v1 concept —
55
+ # v2 orgs report live status via `monomind org status`/`org report` instead.
54
56
  # Overlay runtime status from state file if present
55
57
  if [ -f "$stateFile" ]; then
56
58
  echo ""
57
59
  echo "RUNTIME STATUS:"
58
60
  jq -r '.agents // {} | to_entries[] | " \(.key): \(.value.status // "unknown") last_beat=\(.value.last_heartbeat // "never")"' "$stateFile" 2>/dev/null || true
59
61
  fi
62
+ # end LEGACY-ORG-V1
60
63
  ```
61
64
 
62
65
  Render as table:
@@ -134,6 +137,7 @@ curl -s -X POST "${CTRL_URL}/api/mastermind/event" -H "x-monomind-token: $(cat "
134
137
 
135
138
  ### pause / resume
136
139
 
140
+ <!-- LEGACY-ORG-V1: the agent state/heartbeat file this pauses is a v1 concept. -->
137
141
  Update state file:
138
142
 
139
143
  ```bash
@@ -169,7 +173,7 @@ org: <org_name>
169
173
  agents_count: <N>
170
174
  ```
171
175
 
172
- Print summary and any suggested next actions (e.g. "Run /mastermind:heartbeat to trigger a manual heartbeat for this agent").
176
+ Print summary and any suggested next actions (e.g. "Run /mastermind:heartbeatv1 to trigger a manual heartbeat for this agent").
173
177
 
174
178
  ---
175
179
 
@@ -1,13 +1,16 @@
1
1
  ---
2
- name: mastermind-approve
3
- description: Mastermind approve — review and action pending approval requests from agents in a running org. Agents can request human approval before proceeding with sensitive actions.
2
+ name: mastermind-approvev1
3
+ description: "LEGACY-ORG-V1 (2026-07): v2 approvals arrive as question events in the dashboard Human Input tab — no skill needed. Mastermind approvev1 — review and action pending approval requests from agents in a running v1 (prompt-orchestrated) org. Agents can request human approval before proceeding with sensitive actions. Reach it only via `/mastermind:approvev1`."
4
4
  type: domain-skill
5
5
  default_mode: confirm
6
6
  ---
7
7
 
8
- # Mastermind Approve
8
+ # Mastermind Approve (v1, legacy)
9
9
 
10
- This skill is invoked by `mastermind:approve` or directly via `/mastermind:approve`.
10
+ > **LEGACY-ORG-V1 file-based approval queue for prompt-orchestrated v1 orgs. Reach it only via `/mastermind:approvev1`.**
11
+ > v2 approvals arrive as `question` events in the dashboard Human Input tab — there is no v2 approve skill, the dashboard UI is the approval surface. This skill remains only for orgs not yet migrated off the v1 `board_id`/`topology` config shape.
12
+
13
+ This skill is invoked by `mastermind:approvev1` or directly via `/mastermind:approvev1`.
11
14
 
12
15
  ---
13
16
 
@@ -150,7 +153,7 @@ jq --arg id "$approval_id" \
150
153
 
151
154
  2. Emit `org:approval:requested` event to dashboard (so the human is notified).
152
155
 
153
- 3. Poll for the approval decision — check the approvals file first (authoritative, updated by both the dashboard UI and `/mastermind:approve`), then fall back to memory:
156
+ 3. Poll for the approval decision — check the approvals file first (authoritative, updated by both the dashboard UI and `/mastermind:approvev1`), then fall back to memory:
154
157
  ```bash
155
158
  approvalsFile=".monomind/orgs/${orgName}-approvals.json"
156
159
  while true; do
@@ -81,6 +81,7 @@ echo " namespace: org:${org_name}"
81
81
  npx monomind@latest memory list --namespace "org:${org_name}" 2>/dev/null | wc -l | xargs echo " stored entries:"
82
82
  echo ""
83
83
 
84
+ # LEGACY-ORG-V1: board_id/*_col_id only exist on the pre-v2 board-backed org shape
84
85
  # Board config
85
86
  echo "TASK BOARD"
86
87
  echo "──────────"
@@ -90,6 +91,7 @@ echo " todo_col: $(jq -r '.todo_col_id // "NOT CONFIGURED"' "$orgFile")"
90
91
  echo " doing_col: $(jq -r '.doing_col_id // "NOT CONFIGURED"' "$orgFile")"
91
92
  echo " done_col: $(jq -r '.done_col_id // "NOT CONFIGURED"' "$orgFile")"
92
93
  echo ""
94
+ # end LEGACY-ORG-V1 board block
93
95
 
94
96
  # Run config
95
97
  echo "RUN CONFIG"
@@ -129,9 +131,12 @@ for key in ANTHROPIC_API_KEY; do
129
131
  fi
130
132
  done
131
133
 
132
- # Check board IDs
134
+ # LEGACY-ORG-V1: board_id belongs to the legacy v1 runner — see runorgv1. Org
135
+ # Runtime v2 configs have no board_id at all, so this check only applies to
136
+ # orgs still running the v1 board-backed shape.
133
137
  board_id=$(jq -r '.board_id // empty' "$orgFile")
134
- [ -z "$board_id" ] && { echo " ✗ MISSING: board_id — run /mastermind:createorg to rebuild"; errors=$((errors + 1)); } || echo " ✓ board_id"
138
+ [ -z "$board_id" ] && { echo " ✗ MISSING: board_id — boards belong to the legacy v1 runner, see runorgv1"; errors=$((errors + 1)); } || echo " ✓ board_id"
139
+ # end LEGACY-ORG-V1
135
140
 
136
141
  # Check roles
137
142
  role_count=$(jq '.roles | length' "$orgFile")
@@ -1,13 +1,16 @@
1
1
  ---
2
- name: mastermind-heartbeat
3
- description: Mastermind heartbeat — trigger a manual heartbeat for a specific agent in a running org. The agent wakes, checks its task queue, executes pending work, and reports back.
2
+ name: mastermind-heartbeatv1
3
+ description: "LEGACY-ORG-V1 (2026-07): v2: send the role a chat message from the dashboard, or inspect with `monomind org logs <name>` — no skill needed. Mastermind heartbeatv1 — trigger a manual heartbeat for a specific agent in a running v1 (prompt-orchestrated) org. The agent wakes, checks its task queue, executes pending work, and reports back. Reach it only via `/mastermind:heartbeatv1`."
4
4
  type: domain-skill
5
5
  default_mode: auto
6
6
  ---
7
7
 
8
- # Mastermind Heartbeat
8
+ # Mastermind Heartbeat (v1, legacy)
9
9
 
10
- This skill is invoked by `mastermind:heartbeat` or directly via `/mastermind:heartbeat`.
10
+ > **LEGACY-ORG-V1 manual task-board wake-up for prompt-orchestrated v1 orgs. Reach it only via `/mastermind:heartbeatv1`.**
11
+ > v2 roles run as live SDK sessions with no poll/wake cycle to trigger — send the role a chat message from the dashboard, or inspect activity with `monomind org logs <name>`. This skill remains only for orgs not yet migrated off the v1 `board_id`/`topology` config shape.
12
+
13
+ This skill is invoked by `mastermind:heartbeatv1` or directly via `/mastermind:heartbeatv1`.
11
14
 
12
15
  ---
13
16
 
@@ -54,17 +54,23 @@ for org in $orgs; do
54
54
  stateFile=".monomind/orgs/${org}-state.json"
55
55
  approvalsFile=".monomind/orgs/${org}-approvals.json"
56
56
 
57
+ # LEGACY-ORG-V1: approvals files only exist for the v1 prompt-orchestrated
58
+ # runner — see runorgv1 / approvev1.
57
59
  # 1. Pending approvals
58
60
  if [ -f "$approvalsFile" ]; then
59
61
  pending=$(jq '[(.approvals // [])[] | select(.status == "pending")] | length' "$approvalsFile" 2>/dev/null || echo 0)
60
62
  total_approvals=$((total_approvals + pending))
61
63
  fi
64
+ # end LEGACY-ORG-V1
62
65
 
66
+ # LEGACY-ORG-V1: state-file "heartbeats" are the v1 scheduler's running-agent
67
+ # tracking — v2 runs live under .monomind/orgs/<name>/run-*/bus.jsonl instead.
63
68
  # 2. Running agents (active heartbeats)
64
69
  if [ -f "$stateFile" ]; then
65
70
  running=$(jq '[.agents // {} | to_entries[] | select(.value.status == "running")] | length' "$stateFile" 2>/dev/null || echo 0)
66
71
  total_heartbeats=$((total_heartbeats + running))
67
72
  fi
73
+ # end LEGACY-ORG-V1
68
74
 
69
75
  # 3. Budget alerts
70
76
  budget=$(jq -r '.run_config.budget_tokens // 0' "$orgFile" 2>/dev/null || echo 0)
@@ -101,13 +107,16 @@ for org in $orgs; do
101
107
 
102
108
  has_items=0
103
109
 
110
+ # LEGACY-ORG-V1: approvals belong to the v1 prompt-orchestrated runner
104
111
  # Pending approvals
105
112
  if [ -f "$approvalsFile" ]; then
106
113
  pending_approvals=$(jq -r '(.approvals // [])[] | select(.status == "pending") | " [APPROVAL] [\(.id)] \(.agent_id): \(.title) risk=\(.risk_level // "low")"' \
107
114
  "$approvalsFile" 2>/dev/null)
108
115
  [ -n "$pending_approvals" ] && { has_items=1; echo "ORG: $org"; echo "$pending_approvals"; }
109
116
  fi
117
+ # end LEGACY-ORG-V1
110
118
 
119
+ # LEGACY-ORG-V1: state-file heartbeats are the v1 scheduler's tracking
111
120
  # Running agents
112
121
  if [ -f "$stateFile" ]; then
113
122
  running_agents=$(jq -r '
@@ -116,6 +125,7 @@ for org in $orgs; do
116
125
  ' "$stateFile" 2>/dev/null)
117
126
  [ -n "$running_agents" ] && { has_items=1; [ $has_items -eq 1 ] || echo "ORG: $org"; echo "$running_agents"; }
118
127
  fi
128
+ # end LEGACY-ORG-V1
119
129
 
120
130
  [ $has_items -eq 1 ] && echo ""
121
131
  done
@@ -127,13 +137,14 @@ fi
127
137
 
128
138
  ### filter: approvals only
129
139
 
140
+ <!-- LEGACY-ORG-V1: approvals belong to the v1 prompt-orchestrated runner — see runorgv1 / approvev1. -->
130
141
  ```bash
131
142
  for org in $orgs; do
132
143
  approvalsFile=".monomind/orgs/${org}-approvals.json"
133
144
  [ -f "$approvalsFile" ] || continue
134
145
  echo "=== $org ==="
135
146
  jq -r '(.approvals // [])[] | select(.status == "pending") |
136
- "[\(.id)] \(.agent_id): \(.title)\n Action: \(.action)\n Risk: \(.risk_level // "low")\n → /mastermind:approve --org '"$org"' --action approve --approval-id \(.id)"
147
+ "[\(.id)] \(.agent_id): \(.title)\n Action: \(.action)\n Risk: \(.risk_level // "low")\n → /mastermind:approvev1 --org '"$org"' --action approve --approval-id \(.id)"
137
148
  ' "$approvalsFile" 2>/dev/null || echo " No pending approvals."
138
149
  echo ""
139
150
  done
@@ -141,6 +152,7 @@ done
141
152
 
142
153
  ### filter: heartbeats only
143
154
 
155
+ <!-- LEGACY-ORG-V1: state-file heartbeats are the v1 scheduler's running-agent tracking. -->
144
156
  Show currently running agent heartbeats across all orgs:
145
157
 
146
158
  ```bash
@@ -181,7 +193,7 @@ From the inbox, the user can directly:
181
193
 
182
194
  ```bash
183
195
  # Approve a pending request:
184
- /mastermind:approve --org <org> --action approve --approval-id <id>
196
+ /mastermind:approvev1 --org <org> --action approve --approval-id <id>
185
197
 
186
198
  # Stop a running agent:
187
199
  /mastermind:agents --org <org> --action pause --agent-id <id>
@@ -84,6 +84,7 @@ echo " Active orgs: $orgs"
84
84
 
85
85
  ### heartbeats
86
86
 
87
+ <!-- LEGACY-ORG-V1: role-level heartbeat scheduling is a v1 org concept — v2 orgs run on `schedule` via the daemon instead. -->
87
88
  List all agents across all orgs that have scheduled heartbeats:
88
89
 
89
90
  ```bash
@@ -116,11 +117,12 @@ for orgF in .monomind/orgs/*.json; do
116
117
  done
117
118
  done
118
119
 
119
- [ "$found" -eq 0 ] && echo " No scheduled heartbeat agents found. Configure via /mastermind:heartbeat."
120
+ [ "$found" -eq 0 ] && echo " No scheduled heartbeat agents found. Configure via /mastermind:heartbeatv1."
120
121
  ```
121
122
 
122
123
  ### toggle-heartbeat
123
124
 
125
+ <!-- LEGACY-ORG-V1: role-level heartbeat scheduling is a v1 org concept. -->
124
126
  Enable or disable the scheduler heartbeat for a specific agent:
125
127
 
126
128
  ```bash
@@ -9,7 +9,10 @@ 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.
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. Its primary edit flow targets v2 fields only: `name`, `goal`, `schedule`, and `run_config` (`budget_tokens`, `memory_namespace`, `max_turns_per_message`). Role edits are not yet supported by this skill's `edit` action `roles` is shown read-only via `show`.
13
+
14
+ <!-- LEGACY-ORG-V1: remove this note when v1 orgs are gone -->
15
+ 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's edit surface. Use `/mastermind:org-settings` only for v2-shaped orgs; v1 orgs must go through `monomind org migrate` first.
13
16
 
14
17
  ---
15
18
 
@@ -58,18 +58,8 @@ for f in $orgFiles; do
58
58
  schedule=$(jq -r '.schedule // empty' "$f" 2>/dev/null)
59
59
  loop_interval=$(jq -r '.loop.poll_interval_minutes // empty' "$f" 2>/dev/null)
60
60
 
61
- if [ -n "$loop_interval" ]; then
62
- # legacy v1 scheduled org — state lives in the config's status field
63
- interval="${loop_interval}m (v1)"
64
- status=$(jq -r '.status // "—"' "$f" 2>/dev/null)
65
- case "$status" in
66
- active) indicator="● active" ;;
67
- paused) indicator="⏸ paused" ;;
68
- *) indicator="○ stopped" ;;
69
- esac
70
- last_run=$(jq -r '.loop.last_run // "—"' "$f" 2>/dev/null | sed 's/T/ /;s/Z//')
71
- else
72
- # v2 org — live state is in runtime.json (crashed = running record, dead pid)
61
+ if [ -z "$loop_interval" ]; then
62
+ # v2 org (default)live state is in runtime.json (crashed = running record, dead pid)
73
63
  interval="${schedule:-manual}"
74
64
  rt=".monomind/orgs/${name}/runtime.json"
75
65
  rt_status=$(jq -r '.status // "never run"' "$rt" 2>/dev/null || echo "never run")
@@ -84,6 +74,17 @@ for f in $orgFiles; do
84
74
  indicator="○ ${rt_status}"
85
75
  fi
86
76
  last_run=$(jq -r '.updated // "—"' "$rt" 2>/dev/null | sed 's/T/ /;s/\..*Z//' || echo "—")
77
+ else
78
+ # LEGACY-ORG-V1: remove this branch when v1 orgs are gone
79
+ # legacy v1 scheduled org — state lives in the config's status field
80
+ interval="${loop_interval}m (v1)"
81
+ status=$(jq -r '.status // "—"' "$f" 2>/dev/null)
82
+ case "$status" in
83
+ active) indicator="● active" ;;
84
+ paused) indicator="⏸ paused" ;;
85
+ *) indicator="○ stopped" ;;
86
+ esac
87
+ last_run=$(jq -r '.loop.last_run // "—"' "$f" 2>/dev/null | sed 's/T/ /;s/Z//')
87
88
  fi
88
89
 
89
90
  printf "%-28s %-14s %-12s %-22s\n" "$name" "$indicator" "$interval" "$last_run"
@@ -106,7 +107,7 @@ COMMANDS
106
107
  monomind org validate [name] Check config against the runtime schema
107
108
  /mastermind:orgstatus --org <name> Detailed status, last runs, activity
108
109
  /mastermind:createorg <goal> Create a new org
109
- /mastermind:runorg --org <name> (legacy v1 orgs only deprecated)
110
+ /mastermind:runorg --org <name> v2 delegator (auto-migrates v1 configs, then runs via the daemon)
110
111
  ```
111
112
 
112
113
  ---
@@ -51,17 +51,21 @@ status=$(jq -r '.status // "no-schedule"' "$orgFile")
51
51
  role_count=$(jq '.roles | length' "$orgFile")
52
52
  created_at=$(jq -r '.created_at // "-"' "$orgFile")
53
53
 
54
- # v1 loop fields (legacy scheduled orgs only)
55
54
  has_schedule=$(jq -r 'if .loop.poll_interval_minutes then "yes" else "no" end' "$orgFile")
56
- poll_interval=$(jq -r '.loop.poll_interval_minutes // ""' "$orgFile")
57
- last_run=$(jq -r '.loop.last_run // "never"' "$orgFile")
58
- next_run=$(jq -r '.loop.next_run // "not scheduled"' "$orgFile")
59
- run_prompt_file=$(jq -r '.loop.run_prompt_file // ""' "$orgFile")
60
55
 
61
56
  # v2 fields
62
57
  is_v2=$([ "$has_schedule" = "no" ] && echo yes || echo no)
63
58
  v2_schedule=$(jq -r '.schedule // empty' "$orgFile")
64
59
  budget=$(jq -r '.run_config.budget_tokens // 1000000' "$orgFile")
60
+
61
+ # LEGACY-ORG-V1: remove this block when v1 orgs are gone
62
+ # v1 loop fields (legacy scheduled orgs only)
63
+ poll_interval=$(jq -r '.loop.poll_interval_minutes // ""' "$orgFile")
64
+ last_run=$(jq -r '.loop.last_run // "never"' "$orgFile")
65
+ next_run=$(jq -r '.loop.next_run // "not scheduled"' "$orgFile")
66
+ run_prompt_file=$(jq -r '.loop.run_prompt_file // ""' "$orgFile")
67
+ # end LEGACY-ORG-V1 loop-fields block
68
+
65
69
  rtFile=".monomind/orgs/${org_name}/runtime.json"
66
70
  rt_status=$(jq -r '.status // "never run"' "$rtFile" 2>/dev/null || echo "never run")
67
71
  rt_run=$(jq -r '.run // ""' "$rtFile" 2>/dev/null || echo "")
@@ -95,6 +99,7 @@ if [ "$is_v2" = "yes" ]; then
95
99
  echo ""
96
100
  fi
97
101
 
102
+ # LEGACY-ORG-V1: remove this block when v1 orgs are gone
98
103
  if [ "$has_schedule" = "yes" ]; then
99
104
  echo "SCHEDULED LOOP"
100
105
  echo "──────────────"
@@ -127,6 +132,7 @@ if [ "$is_v2" = "yes" ]; then
127
132
  && echo " Config: ✓ valid (monomind org validate)" \
128
133
  || echo " Config: ✗ INVALID — run: monomind org validate $name"
129
134
  else
135
+ # LEGACY-ORG-V1: remove this branch when v1 orgs are gone
130
136
  # v1 health: board / column IDs
131
137
  board_id=$(jq -r '.board_id // ""' "$orgFile")
132
138
  todo_col=$(jq -r '.todo_col_id // ""' "$orgFile")
@@ -139,12 +145,13 @@ else
139
145
  fi
140
146
  fi
141
147
 
148
+ # LEGACY-ORG-V1: remove this branch when v1 orgs are gone
142
149
  # Pending approvals
143
150
  approvalsFile=".monomind/orgs/${org_name}-approvals.json"
144
151
  if [ -f "$approvalsFile" ]; then
145
152
  pending=$(jq '(.approvals // []) | map(select(.status == "pending")) | length' "$approvalsFile")
146
153
  [ "$pending" -gt 0 ] \
147
- && echo " Approvals: ⚠ ${pending} pending — /mastermind:approve --org ${name} --action list" \
154
+ && echo " Approvals: ⚠ ${pending} pending — /mastermind:approvev1 --org ${name} --action list" \
148
155
  || echo " Approvals: ✓ none pending"
149
156
  else
150
157
  echo " Approvals: ✓ no approvals file"
@@ -152,8 +159,10 @@ fi
152
159
 
153
160
  # Stop file (pending stop signal) — v2 daemons poll <org>/stop; v1 used .stops/
154
161
  [ -f ".monomind/orgs/${org_name}/stop" ] && echo " Stop file: ⚠ PRESENT (v2) — daemon will exit within 2s of seeing it"
162
+ # LEGACY-ORG-V1: remove this check when v1 orgs are gone
155
163
  [ -f ".monomind/orgs/.stops/${org_name}.stop" ] && echo " Stop file: ⚠ PRESENT (v1 legacy path)"
156
164
 
165
+ # LEGACY-ORG-V1: remove this block when v1 orgs are gone
157
166
  # Loop prompt file (scheduled orgs)
158
167
  if [ "$has_schedule" = "yes" ]; then
159
168
  if [ -n "$run_prompt_file" ] && [ -f "$run_prompt_file" ]; then
@@ -182,6 +191,7 @@ if [ "$is_v2" = "yes" ]; then
182
191
  echo ""
183
192
  fi
184
193
  else
194
+ # LEGACY-ORG-V1: remove this branch when v1 orgs are gone
185
195
  activityFile=".monomind/orgs/${org_name}-activity.jsonl"
186
196
  if [ -f "$activityFile" ]; then
187
197
  echo "RECENT ACTIVITY (last 5)"
@@ -214,14 +224,15 @@ if [ "$is_v2" = "yes" ]; then
214
224
  echo " Report: monomind org report $name (add --all for run history)"
215
225
  echo " Validate: monomind org validate $name"
216
226
  echo " Settings: /mastermind:org-settings --org $name"
227
+ # LEGACY-ORG-V1: remove the next two branches when v1 orgs are gone
217
228
  elif [ "$has_schedule" = "yes" ]; then
218
229
  case "$status" in
219
230
  active|paused) echo " Stop loop: /mastermind:stoporg --org $name" ;;
220
- stopped) echo " Start loop: /mastermind:runorg --org $name (legacy v1)" ;;
231
+ stopped) echo " Start loop: /mastermind:runorg --org $name (v1 config — will auto-migrate)" ;;
221
232
  esac
222
233
  echo " Edit prompt: \$EDITOR $run_prompt_file"
223
234
  else
224
- echo " Run org: /mastermind:runorg --org $name (legacy v1)"
235
+ echo " Run org: /mastermind:runorg --org $name (v1 config — will auto-migrate)"
225
236
  fi
226
237
  echo " All orgs: /mastermind:orgs"
227
238
  echo ""
@@ -112,6 +112,8 @@ Show project summary with linked tasks from the board:
112
112
  project=$(jq --arg id "$project_id" '(.projects // [])[] | select(.id == $id)' "$projectsFile")
113
113
  echo "$project" | jq .
114
114
 
115
+ # LEGACY-ORG-V1: board_id/*_col_id only exist on the pre-v2 board-backed org
116
+ # shape — see runorgv1.
115
117
  # If board exists, count tasks tagged with this project
116
118
  orgFile=".monomind/orgs/${org_name}.json"
117
119
  board_id=$(jq -r '.board_id // empty' "$orgFile")
@@ -125,6 +127,7 @@ if [ -n "$board_id" ]; then
125
127
  jq -r --arg p "project:$project_id" '[.[] | select((.labels // []) | index($p))] | length' 2>/dev/null
126
128
  done
127
129
  fi
130
+ # end LEGACY-ORG-V1
128
131
  ```
129
132
 
130
133
  ---