@monoes/monomindcli 2.9.3 → 2.9.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/.claude/helpers/intelligence.cjs +27 -6
- package/.claude/skills/agentic-jujutsu/SKILL.md +17 -15
- package/.claude/skills/hive-mind-advanced/SKILL.md +212 -559
- package/.claude/skills/hooks-automation/SKILL.md +1 -1
- package/.claude/skills/mastermind-createorg/SKILL.md +2 -1
- package/.claude/skills/pair-programming/SKILL.md +1 -1
- package/.claude/skills/performance-analysis/SKILL.md +228 -484
- package/.claude/skills/swarm-advanced/SKILL.md +2 -2
- package/.claude/skills/swarm-orchestration/SKILL.md +220 -150
- package/.claude/skills/verification-quality/SKILL.md +247 -571
- package/README.md +6 -2
- package/dist/src/autopilot-state.d.ts +16 -4
- package/dist/src/autopilot-state.d.ts.map +1 -1
- package/dist/src/autopilot-state.js +42 -19
- package/dist/src/autopilot-state.js.map +1 -1
- package/dist/src/commands/agent-lifecycle.js +3 -3
- package/dist/src/commands/agent-lifecycle.js.map +1 -1
- package/dist/src/commands/autopilot.d.ts.map +1 -1
- package/dist/src/commands/autopilot.js +113 -26
- package/dist/src/commands/autopilot.js.map +1 -1
- package/dist/src/commands/doc.d.ts.map +1 -1
- package/dist/src/commands/doc.js +14 -3
- package/dist/src/commands/doc.js.map +1 -1
- package/dist/src/commands/doctor-env-checks.d.ts +1 -1
- package/dist/src/commands/doctor-env-checks.d.ts.map +1 -1
- package/dist/src/commands/doctor.d.ts.map +1 -1
- package/dist/src/commands/doctor.js +30 -1
- package/dist/src/commands/doctor.js.map +1 -1
- package/dist/src/commands/hooks-routing-commands.d.ts.map +1 -1
- package/dist/src/commands/hooks-routing-commands.js +12 -26
- package/dist/src/commands/hooks-routing-commands.js.map +1 -1
- package/dist/src/commands/hooks-workers.js +8 -8
- package/dist/src/commands/hooks-workers.js.map +1 -1
- package/dist/src/commands/hooks.d.ts.map +1 -1
- package/dist/src/commands/hooks.js +96 -54
- package/dist/src/commands/hooks.js.map +1 -1
- package/dist/src/commands/init.d.ts.map +1 -1
- package/dist/src/commands/init.js +80 -7
- package/dist/src/commands/init.js.map +1 -1
- package/dist/src/commands/mcp.d.ts.map +1 -1
- package/dist/src/commands/mcp.js +78 -2
- package/dist/src/commands/mcp.js.map +1 -1
- package/dist/src/commands/memory-list.d.ts.map +1 -1
- package/dist/src/commands/memory-list.js +79 -36
- package/dist/src/commands/memory-list.js.map +1 -1
- package/dist/src/commands/org.d.ts.map +1 -1
- package/dist/src/commands/org.js +114 -1
- package/dist/src/commands/org.js.map +1 -1
- package/dist/src/commands/performance.js +1 -1
- package/dist/src/commands/performance.js.map +1 -1
- package/dist/src/commands/swarm.d.ts.map +1 -1
- package/dist/src/commands/swarm.js +144 -98
- package/dist/src/commands/swarm.js.map +1 -1
- package/dist/src/init/claudemd-generator.js +1 -1
- package/dist/src/init/executor.d.ts.map +1 -1
- package/dist/src/init/executor.js +13 -3
- package/dist/src/init/executor.js.map +1 -1
- package/dist/src/init/kimi-generator.d.ts +3 -2
- package/dist/src/init/kimi-generator.d.ts.map +1 -1
- package/dist/src/init/kimi-generator.js +45 -13
- package/dist/src/init/kimi-generator.js.map +1 -1
- package/dist/src/init/statusline-generator.d.ts +1 -1
- package/dist/src/init/statusline-generator.d.ts.map +1 -1
- package/dist/src/init/statusline-generator.js +48 -46
- package/dist/src/init/statusline-generator.js.map +1 -1
- package/dist/src/init/types.d.ts +1 -1
- package/dist/src/init/types.d.ts.map +1 -1
- package/dist/src/init/types.js +5 -1
- package/dist/src/init/types.js.map +1 -1
- package/dist/src/mcp-server.d.ts +6 -0
- package/dist/src/mcp-server.d.ts.map +1 -1
- package/dist/src/mcp-server.js +47 -22
- package/dist/src/mcp-server.js.map +1 -1
- package/dist/src/mcp-tools/hive-mind-tools.d.ts.map +1 -1
- package/dist/src/mcp-tools/hive-mind-tools.js +13 -11
- package/dist/src/mcp-tools/hive-mind-tools.js.map +1 -1
- package/dist/src/mcp-tools/hooks-intelligence.d.ts.map +1 -1
- package/dist/src/mcp-tools/hooks-intelligence.js +97 -40
- package/dist/src/mcp-tools/hooks-intelligence.js.map +1 -1
- package/dist/src/mcp-tools/hooks-routing.d.ts.map +1 -1
- package/dist/src/mcp-tools/hooks-routing.js +406 -205
- package/dist/src/mcp-tools/hooks-routing.js.map +1 -1
- package/dist/src/mcp-tools/monograph/impact-tools.d.ts.map +1 -1
- package/dist/src/mcp-tools/monograph/impact-tools.js +109 -44
- package/dist/src/mcp-tools/monograph/impact-tools.js.map +1 -1
- package/dist/src/mcp-tools/monograph/query-tools.d.ts.map +1 -1
- package/dist/src/mcp-tools/monograph/query-tools.js +48 -18
- package/dist/src/mcp-tools/monograph/query-tools.js.map +1 -1
- package/dist/src/mcp-tools/system-tools.d.ts.map +1 -1
- package/dist/src/mcp-tools/system-tools.js +100 -38
- package/dist/src/mcp-tools/system-tools.js.map +1 -1
- package/dist/src/memory/embedding-operations.d.ts +4 -0
- package/dist/src/memory/embedding-operations.d.ts.map +1 -1
- package/dist/src/memory/embedding-operations.js +125 -32
- package/dist/src/memory/embedding-operations.js.map +1 -1
- package/dist/src/memory/hnsw-operations.d.ts +1 -1
- package/dist/src/memory/hnsw-operations.js +1 -1
- package/dist/src/memory/memory-bridge.d.ts.map +1 -1
- package/dist/src/memory/memory-bridge.js +172 -69
- package/dist/src/memory/memory-bridge.js.map +1 -1
- package/dist/src/memory/memory-read.d.ts +1 -1
- package/dist/src/memory/memory-read.js +2 -2
- package/dist/src/memory/memory-read.js.map +1 -1
- package/dist/src/orgrt/checkpoint-ops.d.ts +11 -1
- package/dist/src/orgrt/checkpoint-ops.d.ts.map +1 -1
- package/dist/src/orgrt/checkpoint-ops.js +15 -1
- package/dist/src/orgrt/checkpoint-ops.js.map +1 -1
- package/dist/src/orgrt/checkpoint.js +1 -1
- package/dist/src/orgrt/checkpoint.js.map +1 -1
- package/dist/src/orgrt/daemon.d.ts +11 -3
- package/dist/src/orgrt/daemon.d.ts.map +1 -1
- package/dist/src/orgrt/daemon.js +317 -93
- package/dist/src/orgrt/daemon.js.map +1 -1
- package/dist/src/orgrt/decisions.d.ts +13 -0
- package/dist/src/orgrt/decisions.d.ts.map +1 -1
- package/dist/src/orgrt/decisions.js +95 -0
- package/dist/src/orgrt/decisions.js.map +1 -1
- package/dist/src/orgrt/remote.d.ts.map +1 -1
- package/dist/src/orgrt/remote.js +12 -6
- package/dist/src/orgrt/remote.js.map +1 -1
- package/dist/src/orgrt/server.d.ts.map +1 -1
- package/dist/src/orgrt/server.js +71 -14
- package/dist/src/orgrt/server.js.map +1 -1
- package/dist/src/orgrt/session.d.ts +27 -1
- package/dist/src/orgrt/session.d.ts.map +1 -1
- package/dist/src/orgrt/session.js +42 -3
- package/dist/src/orgrt/session.js.map +1 -1
- package/dist/src/orgrt/task-dag.d.ts +11 -1
- package/dist/src/orgrt/task-dag.d.ts.map +1 -1
- package/dist/src/orgrt/task-dag.js +93 -2
- package/dist/src/orgrt/task-dag.js.map +1 -1
- package/dist/src/orgrt/templates.d.ts.map +1 -1
- package/dist/src/orgrt/templates.js +24 -0
- package/dist/src/orgrt/templates.js.map +1 -1
- package/dist/src/orgrt/types.d.ts +70 -1
- package/dist/src/orgrt/types.d.ts.map +1 -1
- package/dist/src/orgrt/types.js +19 -0
- package/dist/src/orgrt/types.js.map +1 -1
- package/dist/src/orgrt/vercel-providers.d.ts.map +1 -1
- package/dist/src/orgrt/vercel-providers.js +9 -4
- package/dist/src/orgrt/vercel-providers.js.map +1 -1
- package/dist/src/orgrt/vercel-runner.d.ts +0 -23
- package/dist/src/orgrt/vercel-runner.d.ts.map +1 -1
- package/dist/src/orgrt/vercel-runner.js +26 -1
- package/dist/src/orgrt/vercel-runner.js.map +1 -1
- package/dist/src/types.d.ts +1 -1
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/ui/server.mjs +2647 -838
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +7 -7
- package/.claude/commands/mastermind/approvev1.md +0 -94
- package/.claude/commands/mastermind/architect.md +0 -52
- package/.claude/commands/mastermind/autodev.md +0 -28
- package/.claude/commands/mastermind/build.md +0 -23
- package/.claude/commands/mastermind/finish.md +0 -17
- package/.claude/commands/mastermind/runorgv1.md +0 -159
- package/.claude/commands/mastermind/taskdev.md +0 -23
- package/.claude/commands/mastermind/tdd.md +0 -19
- package/.claude/commands/mastermind/verify.md +0 -19
- package/.claude/skills/mastermind-approvev1/SKILL.md +0 -191
- package/.claude/skills/mastermind-architect/SKILL.md +0 -862
- package/.claude/skills/mastermind-autodev/SKILL.md +0 -360
- package/.claude/skills/mastermind-build/SKILL.md +0 -169
- package/.claude/skills/mastermind-companies/SKILL.md +0 -256
- package/.claude/skills/mastermind-content/SKILL.md +0 -197
- package/.claude/skills/mastermind-costs/SKILL.md +0 -151
- package/.claude/skills/mastermind-finance/SKILL.md +0 -166
- package/.claude/skills/mastermind-finish/SKILL.md +0 -251
- package/.claude/skills/mastermind-heartbeatv1/SKILL.md +0 -167
- package/.claude/skills/mastermind-instance-settings/SKILL.md +0 -315
- package/.claude/skills/mastermind-marketing/SKILL.md +0 -228
- package/.claude/skills/mastermind-marketing/references/copywriting-frameworks.md +0 -181
- package/.claude/skills/mastermind-marketing/references/persuasion-psychology.md +0 -158
- package/.claude/skills/mastermind-ops/SKILL.md +0 -168
- package/.claude/skills/mastermind-org-chart/SKILL.md +0 -209
- package/.claude/skills/mastermind-project-detail/SKILL.md +0 -249
- package/.claude/skills/mastermind-project-workspace/SKILL.md +0 -244
- package/.claude/skills/mastermind-projects/SKILL.md +0 -167
- package/.claude/skills/mastermind-runorgv1/SKILL.md +0 -731
- package/.claude/skills/mastermind-sales/SKILL.md +0 -170
- package/.claude/skills/mastermind-taskdev/SKILL.md +0 -377
- package/.claude/skills/mastermind-taskdev/code-quality-reviewer-prompt.md +0 -60
- package/.claude/skills/mastermind-taskdev/final-reviewer-prompt.md +0 -144
- package/.claude/skills/mastermind-taskdev/implementer-prompt.md +0 -114
- package/.claude/skills/mastermind-taskdev/spec-reviewer-prompt.md +0 -80
- package/.claude/skills/mastermind-tdd/SKILL.md +0 -424
- package/.claude/skills/mastermind-verify/SKILL.md +0 -196
- package/.claude/skills/mastermind-wiki/SKILL.md +0 -314
- package/.claude/skills/monolean-review/SKILL.md +0 -57
|
@@ -1,209 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: mastermind-org-chart
|
|
3
|
-
description: Mastermind org-chart — generates a text-based ASCII org chart for an org showing the agent hierarchy, adapter types, heartbeat status, and reports-to relationships. Supports tree view, flat list, and JSON export. Mirrors OrgChart.tsx canvas view as a CLI-friendly format.
|
|
4
|
-
type: domain-skill
|
|
5
|
-
default_mode: auto
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
# Mastermind Org Chart
|
|
9
|
-
|
|
10
|
-
This skill is invoked by `mastermind:org-chart` or directly via `/mastermind:org-chart`.
|
|
11
|
-
|
|
12
|
-
---
|
|
13
|
-
|
|
14
|
-
## Inputs
|
|
15
|
-
|
|
16
|
-
- `brain_context`: BRAIN CONTEXT block (injected by command, or loaded below if standalone)
|
|
17
|
-
- `org_name`: org to chart (required)
|
|
18
|
-
- `action`: show | flat | export | search
|
|
19
|
-
- `query`: search term to filter agents in the chart (for search)
|
|
20
|
-
- `output_file`: file path for JSON export (for export; default: stdout)
|
|
21
|
-
- `depth`: max depth to render (default: unlimited)
|
|
22
|
-
- `caller`: command | master
|
|
23
|
-
|
|
24
|
-
---
|
|
25
|
-
|
|
26
|
-
## Step 0 — Brain Load (standalone only)
|
|
27
|
-
|
|
28
|
-
If `caller` is not "command", load brain context following mastermind-protocol/SKILL.md Brain Load Procedure with namespace: `ops`.
|
|
29
|
-
|
|
30
|
-
---
|
|
31
|
-
|
|
32
|
-
## Step 1 — Load Org Roles
|
|
33
|
-
|
|
34
|
-
```bash
|
|
35
|
-
orgFile=".monomind/orgs/${org_name}.json"
|
|
36
|
-
[ ! -f "$orgFile" ] && { echo "ERROR: Org '${org_name}' not found."; exit 1; }
|
|
37
|
-
|
|
38
|
-
roles=$(jq -r '.roles // []' "$orgFile")
|
|
39
|
-
roleCount=$(echo "$roles" | jq 'length')
|
|
40
|
-
|
|
41
|
-
# Load heartbeat state if available
|
|
42
|
-
stateFile=".monomind/orgs/${org_name}-state.json"
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
---
|
|
46
|
-
|
|
47
|
-
## Step 2 — Execute Action
|
|
48
|
-
|
|
49
|
-
### show (default)
|
|
50
|
-
|
|
51
|
-
```bash
|
|
52
|
-
echo "ORG CHART — $org_name"
|
|
53
|
-
echo "════════════════════════════════════════════════════════"
|
|
54
|
-
|
|
55
|
-
[ "$roleCount" -eq 0 ] && {
|
|
56
|
-
echo " No agents in org '$org_name'."
|
|
57
|
-
echo " Add one: /mastermind:new-agent --org $org_name --title 'My Agent'"
|
|
58
|
-
exit 0
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
# Build parent→children map using Python for recursive ASCII tree
|
|
62
|
-
python3 - "$orgFile" "$stateFile" "${depth:-99}" <<'PYEOF'
|
|
63
|
-
import json, sys, os
|
|
64
|
-
|
|
65
|
-
orgFile = sys.argv[1]
|
|
66
|
-
stateFile = sys.argv[2] if len(sys.argv) > 2 else None
|
|
67
|
-
maxDepth = int(sys.argv[3]) if len(sys.argv) > 3 else 99
|
|
68
|
-
|
|
69
|
-
with open(orgFile) as f:
|
|
70
|
-
org = json.load(f)
|
|
71
|
-
|
|
72
|
-
roles = org.get("roles", [])
|
|
73
|
-
|
|
74
|
-
# Load heartbeat state
|
|
75
|
-
hb = {}
|
|
76
|
-
if stateFile and os.path.exists(stateFile):
|
|
77
|
-
try:
|
|
78
|
-
with open(stateFile) as f:
|
|
79
|
-
state = json.load(f)
|
|
80
|
-
for r in state.get("roles", []):
|
|
81
|
-
hb[r.get("id", "")] = r.get("last_heartbeat")
|
|
82
|
-
except Exception:
|
|
83
|
-
pass
|
|
84
|
-
|
|
85
|
-
# Build child map
|
|
86
|
-
children = {}
|
|
87
|
-
for r in roles:
|
|
88
|
-
pid = r.get("reports_to") or "__root__"
|
|
89
|
-
children.setdefault(pid, []).append(r)
|
|
90
|
-
|
|
91
|
-
def render(nodes, prefix="", depth=0):
|
|
92
|
-
if depth > maxDepth:
|
|
93
|
-
return
|
|
94
|
-
for i, r in enumerate(nodes):
|
|
95
|
-
is_last = (i == len(nodes) - 1)
|
|
96
|
-
connector = "└── " if is_last else "├── "
|
|
97
|
-
child_prefix = prefix + (" " if is_last else "│ ")
|
|
98
|
-
rid = r.get("id", "?")
|
|
99
|
-
title = r.get("title", rid)
|
|
100
|
-
adapter = r.get("adapter_config", r.get("adapter", {}))
|
|
101
|
-
model = adapter.get("model", "") if isinstance(adapter, dict) else ""
|
|
102
|
-
atype = model.split("-")[0] if model else "?"
|
|
103
|
-
hb_status = "♡" if rid not in hb or not hb[rid] else "♥"
|
|
104
|
-
gov = r.get("governance") or ""
|
|
105
|
-
gov_str = f" [{gov}]" if gov else ""
|
|
106
|
-
model_str = f"/{model}" if model else ""
|
|
107
|
-
print(f"{prefix}{connector}{title} ({atype}{model_str}){gov_str} {hb_status}")
|
|
108
|
-
kids = children.get(rid, [])
|
|
109
|
-
if kids:
|
|
110
|
-
render(kids, child_prefix, depth + 1)
|
|
111
|
-
|
|
112
|
-
roots = children.get("__root__", [])
|
|
113
|
-
# Include agents whose reports_to points to a non-existent id
|
|
114
|
-
all_ids = {r.get("id") for r in roles}
|
|
115
|
-
for r in roles:
|
|
116
|
-
pid = r.get("reports_to")
|
|
117
|
-
if pid and pid not in all_ids and r not in roots:
|
|
118
|
-
roots.append(r)
|
|
119
|
-
|
|
120
|
-
render(roots)
|
|
121
|
-
PYEOF
|
|
122
|
-
|
|
123
|
-
echo ""
|
|
124
|
-
echo " $roleCount agent(s) · ♥ heartbeat active ♡ no heartbeat"
|
|
125
|
-
echo " Add agent: /mastermind:new-agent --org $org_name --title 'Role Name'"
|
|
126
|
-
echo " Agent detail: /mastermind:agent-detail --org $org_name --agent-id <id>"
|
|
127
|
-
```
|
|
128
|
-
|
|
129
|
-
### flat
|
|
130
|
-
|
|
131
|
-
```bash
|
|
132
|
-
echo "AGENTS — $org_name (flat list)"
|
|
133
|
-
echo "────────────────────────────────────────────────────────"
|
|
134
|
-
printf "%-24s %-20s %-16s %-20s %s\n" "ID" "TITLE" "ADAPTER" "MODEL" "REPORTS TO"
|
|
135
|
-
echo "────────────────────────────────────────────────────────"
|
|
136
|
-
|
|
137
|
-
echo "$roles" | jq -r '.[] |
|
|
138
|
-
(((.adapter_config.model // .adapter.model) // "") | split("-") | .[0] | if . == "" then "?" else . end) as $atype |
|
|
139
|
-
[.id, (.title // "-"), $atype, ((.adapter_config.model // .adapter.model) // "-"),
|
|
140
|
-
(.reports_to // "(root)")] | @tsv' | \
|
|
141
|
-
while IFS=$'\t' read -r id title adapter model rt; do
|
|
142
|
-
printf "%-24s %-20s %-16s %-20s %s\n" "$id" "$title" "$adapter" "$model" "$rt"
|
|
143
|
-
done
|
|
144
|
-
|
|
145
|
-
echo ""
|
|
146
|
-
echo "Total: $roleCount"
|
|
147
|
-
```
|
|
148
|
-
|
|
149
|
-
### search
|
|
150
|
-
|
|
151
|
-
```bash
|
|
152
|
-
[ -z "$query" ] && { echo "ERROR: --query required."; exit 1; }
|
|
153
|
-
|
|
154
|
-
echo "AGENT SEARCH — $org_name query: '$query'"
|
|
155
|
-
echo "────────────────────────────────────────────────────────"
|
|
156
|
-
printf "%-24s %-20s %-16s %s\n" "ID" "TITLE" "ADAPTER" "REPORTS TO"
|
|
157
|
-
echo "────────────────────────────────────────────────────────"
|
|
158
|
-
|
|
159
|
-
ql=$(echo "$query" | tr '[:upper:]' '[:lower:]')
|
|
160
|
-
echo "$roles" | jq -r --arg q "$ql" '.[] |
|
|
161
|
-
(((.adapter_config.model // .adapter.model) // "") | split("-") | .[0] | if . == "" then "?" else . end) as $atype |
|
|
162
|
-
select(
|
|
163
|
-
(.id | ascii_downcase | contains($q)) or
|
|
164
|
-
(.title // "" | ascii_downcase | contains($q)) or
|
|
165
|
-
((.adapter_config.model // .adapter.model) // "" | ascii_downcase | contains($q)) or
|
|
166
|
-
(.agent_type // "" | ascii_downcase | contains($q))
|
|
167
|
-
) |
|
|
168
|
-
[.id, (.title // "-"), $atype, (.reports_to // "(root)")] | @tsv' | \
|
|
169
|
-
while IFS=$'\t' read -r id title adapter rt; do
|
|
170
|
-
printf "%-24s %-20s %-16s %s\n" "$id" "$title" "$adapter" "$rt"
|
|
171
|
-
done
|
|
172
|
-
```
|
|
173
|
-
|
|
174
|
-
### export
|
|
175
|
-
|
|
176
|
-
```bash
|
|
177
|
-
outFile="${output_file:-}"
|
|
178
|
-
ts=$(date -u +%Y-%m-%dT%H:%M:%SZ)
|
|
179
|
-
|
|
180
|
-
payload=$(jq --arg org "$org_name" --arg ts "$ts" \
|
|
181
|
-
'{org: $org, exportedAt: $ts, roles: (.roles // [])}' \
|
|
182
|
-
"$orgFile")
|
|
183
|
-
|
|
184
|
-
if [ -n "$outFile" ]; then
|
|
185
|
-
mkdir -p "$(dirname "$outFile")"
|
|
186
|
-
echo "$payload" > "$outFile"
|
|
187
|
-
echo "Org chart exported: $outFile ($roleCount agents)"
|
|
188
|
-
else
|
|
189
|
-
echo "$payload" | jq .
|
|
190
|
-
fi
|
|
191
|
-
```
|
|
192
|
-
|
|
193
|
-
---
|
|
194
|
-
|
|
195
|
-
## Step 3 — Return Output
|
|
196
|
-
|
|
197
|
-
```yaml
|
|
198
|
-
domain: ops
|
|
199
|
-
status: complete
|
|
200
|
-
action: <action>
|
|
201
|
-
org: <org_name>
|
|
202
|
-
agent_count: <N>
|
|
203
|
-
```
|
|
204
|
-
|
|
205
|
-
---
|
|
206
|
-
|
|
207
|
-
## Step 4 — Brain Write (standalone only)
|
|
208
|
-
|
|
209
|
-
If `caller` is not "command", follow mastermind-protocol/SKILL.md Brain Write Procedure for domain `ops`.
|
|
@@ -1,249 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: mastermind-project-detail
|
|
3
|
-
description: Mastermind project-detail — deep per-project inspection and management. Tabs mirror Paperclip's ProjectDetail page: overview (metrics/issues), configuration (color/visibility/description), budget policy, workspaces, and linked issues list.
|
|
4
|
-
type: domain-skill
|
|
5
|
-
default_mode: auto
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
# Mastermind Project Detail
|
|
9
|
-
|
|
10
|
-
This skill is invoked by `mastermind:project-detail` or directly via `/mastermind:project-detail`.
|
|
11
|
-
|
|
12
|
-
---
|
|
13
|
-
|
|
14
|
-
## Inputs
|
|
15
|
-
|
|
16
|
-
- `brain_context`: BRAIN CONTEXT block (injected by command, or loaded below if standalone)
|
|
17
|
-
- `org_name`: org the project belongs to (required)
|
|
18
|
-
- `project_id`: project id/slug (required)
|
|
19
|
-
- `action`: show | overview | issues | config | budget | workspaces
|
|
20
|
-
- `field`: config field to edit (name|description|color|visibility)
|
|
21
|
-
- `value`: new field value (for config --field)
|
|
22
|
-
- `budget_policy`: none | soft_limit | hard_limit (for budget action)
|
|
23
|
-
- `budget_limit`: token limit (integer, required if policy != none)
|
|
24
|
-
- `budget_period`: daily | weekly | monthly (default: daily)
|
|
25
|
-
- `caller`: command | master
|
|
26
|
-
|
|
27
|
-
---
|
|
28
|
-
|
|
29
|
-
## Project Colors
|
|
30
|
-
|
|
31
|
-
`red` | `orange` | `yellow` | `green` | `teal` | `blue` | `purple` | `pink` | `gray`
|
|
32
|
-
|
|
33
|
-
## Visibility
|
|
34
|
-
|
|
35
|
-
`private` — visible only to org members with access
|
|
36
|
-
`internal` — visible to all org members
|
|
37
|
-
`public` — visible to anyone with the link
|
|
38
|
-
|
|
39
|
-
---
|
|
40
|
-
|
|
41
|
-
## Step 0 — Brain Load (standalone only)
|
|
42
|
-
|
|
43
|
-
If `caller` is not "command", load brain context following mastermind-protocol/SKILL.md Brain Load Procedure with namespace: `ops`.
|
|
44
|
-
|
|
45
|
-
---
|
|
46
|
-
|
|
47
|
-
## Step 1 — Load Project Data
|
|
48
|
-
|
|
49
|
-
```bash
|
|
50
|
-
orgFile=".monomind/orgs/${org_name}.json"
|
|
51
|
-
[ ! -f "$orgFile" ] && { echo "ERROR: Org '${org_name}' not found."; exit 1; }
|
|
52
|
-
|
|
53
|
-
projectsFile=".monomind/orgs/${org_name}-projects.json"
|
|
54
|
-
[ ! -f "$projectsFile" ] && { echo "ERROR: No projects file for org '$org_name'. Create via /mastermind:projects."; exit 1; }
|
|
55
|
-
|
|
56
|
-
projectDef=$(jq -r --arg id "$project_id" '(.projects // [])[] | select(.id == $id or .slug == $id)' "$projectsFile")
|
|
57
|
-
[ -z "$projectDef" ] && { echo "ERROR: Project '$project_id' not found in org '$org_name'."; exit 1; }
|
|
58
|
-
|
|
59
|
-
resolvedId=$(echo "$projectDef" | jq -r '.id')
|
|
60
|
-
issuesFile=".monomind/orgs/${org_name}-issues.json"
|
|
61
|
-
wsFile=".monomind/orgs/${org_name}-workspaces.json"
|
|
62
|
-
budgetFile=".monomind/orgs/${org_name}-budgets.json"
|
|
63
|
-
```
|
|
64
|
-
|
|
65
|
-
---
|
|
66
|
-
|
|
67
|
-
## Step 2 — Execute Action
|
|
68
|
-
|
|
69
|
-
### show (default) — same as overview
|
|
70
|
-
|
|
71
|
-
```bash
|
|
72
|
-
echo "PROJECT — $project_id @ $org_name"
|
|
73
|
-
echo "────────────────────────────────────────────────────────"
|
|
74
|
-
|
|
75
|
-
echo "$projectDef" | jq -r '
|
|
76
|
-
" ID: \(.id)",
|
|
77
|
-
" Name: \(.name // "(unnamed)")",
|
|
78
|
-
" Status: \(.status // "active")",
|
|
79
|
-
" Color: \(.color // "gray")",
|
|
80
|
-
" Visibility: \(.visibility // "internal")",
|
|
81
|
-
" Description: \(.description // "(none)")",
|
|
82
|
-
" Created: \(.created_at // "-")"
|
|
83
|
-
'
|
|
84
|
-
|
|
85
|
-
# Issues summary
|
|
86
|
-
if [ -f "$issuesFile" ]; then
|
|
87
|
-
totalIssues=$(jq --arg pid "$resolvedId" '[(.issues // [])[] | select(.project_id == $pid)] | length' "$issuesFile")
|
|
88
|
-
openIssues=$(jq --arg pid "$resolvedId" '[(.issues // [])[] | select(.project_id == $pid and .status == "open")] | length' "$issuesFile")
|
|
89
|
-
inProgIssues=$(jq --arg pid "$resolvedId" '[(.issues // [])[] | select(.project_id == $pid and .status == "in_progress")] | length' "$issuesFile")
|
|
90
|
-
doneIssues=$(jq --arg pid "$resolvedId" '[(.issues // [])[] | select(.project_id == $pid and .status == "done")] | length' "$issuesFile")
|
|
91
|
-
echo ""
|
|
92
|
-
echo "ISSUES"
|
|
93
|
-
echo " Total: $totalIssues"
|
|
94
|
-
echo " Open: $openIssues"
|
|
95
|
-
echo " In progress: $inProgIssues"
|
|
96
|
-
echo " Done: $doneIssues"
|
|
97
|
-
fi
|
|
98
|
-
|
|
99
|
-
# Workspaces summary
|
|
100
|
-
if [ -f "$wsFile" ]; then
|
|
101
|
-
wsCount=$(jq --arg pid "$resolvedId" '[(.workspaces // [])[] | select(.project_id == $pid)] | length' "$wsFile")
|
|
102
|
-
activeWs=$(jq --arg pid "$resolvedId" '[(.workspaces // [])[] | select(.project_id == $pid and .status == "active")] | length' "$wsFile")
|
|
103
|
-
echo ""
|
|
104
|
-
echo "WORKSPACES"
|
|
105
|
-
echo " Total: $wsCount | Active: $activeWs"
|
|
106
|
-
fi
|
|
107
|
-
```
|
|
108
|
-
|
|
109
|
-
### overview
|
|
110
|
-
|
|
111
|
-
Alias for `show` — print the overview section above.
|
|
112
|
-
|
|
113
|
-
### issues
|
|
114
|
-
|
|
115
|
-
```bash
|
|
116
|
-
echo "ISSUES — project: $project_id"
|
|
117
|
-
echo "────────────────────────────────────────────────────────"
|
|
118
|
-
printf "%-24s %-12s %-10s %s\n" "ID" "STATUS" "PRIORITY" "TITLE"
|
|
119
|
-
echo "────────────────────────────────────────────────────────"
|
|
120
|
-
|
|
121
|
-
if [ ! -f "$issuesFile" ]; then
|
|
122
|
-
echo " No issues file found."
|
|
123
|
-
else
|
|
124
|
-
count=0
|
|
125
|
-
jq -r --arg pid "$resolvedId" '(.issues // [])[] | select(.project_id == $pid) |
|
|
126
|
-
[.id, (.status // "open"), (.priority // "medium"), (.title // "(no title)")] | @tsv' \
|
|
127
|
-
"$issuesFile" | while IFS=$'\t' read -r id st pri title; do
|
|
128
|
-
printf "%-24s %-12s %-10s %s\n" "$id" "$st" "$pri" "$title"
|
|
129
|
-
count=$((count + 1))
|
|
130
|
-
done
|
|
131
|
-
fi
|
|
132
|
-
```
|
|
133
|
-
|
|
134
|
-
### config
|
|
135
|
-
|
|
136
|
-
```bash
|
|
137
|
-
echo "PROJECT CONFIG — $project_id"
|
|
138
|
-
echo "────────────────────────────────────────────────────────"
|
|
139
|
-
|
|
140
|
-
if [ -n "$field" ]; then
|
|
141
|
-
[ -z "$value" ] && { echo "ERROR: --value required when --field is set."; exit 1; }
|
|
142
|
-
validFields="name description color visibility status"
|
|
143
|
-
echo "$validFields" | tr ' ' '\n' | grep -qx "$field" || {
|
|
144
|
-
echo "ERROR: Unknown field '$field'. Valid: $validFields"; exit 1
|
|
145
|
-
}
|
|
146
|
-
if [ "$field" = "color" ]; then
|
|
147
|
-
case "$value" in red|orange|yellow|green|teal|blue|purple|pink|gray) : ;; *)
|
|
148
|
-
echo "ERROR: color must be one of: red orange yellow green teal blue purple pink gray"; exit 1 ;;
|
|
149
|
-
esac
|
|
150
|
-
fi
|
|
151
|
-
if [ "$field" = "visibility" ]; then
|
|
152
|
-
case "$value" in private|internal|public) : ;; *)
|
|
153
|
-
echo "ERROR: visibility must be one of: private, internal, public"; exit 1 ;;
|
|
154
|
-
esac
|
|
155
|
-
fi
|
|
156
|
-
ts=$(date -u +%Y-%m-%dT%H:%M:%SZ)
|
|
157
|
-
tmp="${projectsFile}.tmp"
|
|
158
|
-
jq --arg id "$resolvedId" --arg f "$field" --arg v "$value" --arg ts "$ts" \
|
|
159
|
-
'.projects = [(.projects // [])[] | if .id == $id then .[$f] = $v | .updated_at = $ts else . end]' \
|
|
160
|
-
"$projectsFile" > "$tmp" && mv "$tmp" "$projectsFile"
|
|
161
|
-
echo "Updated: $field = $value"
|
|
162
|
-
else
|
|
163
|
-
echo "$projectDef" | jq '{name, description, color, visibility, status}'
|
|
164
|
-
fi
|
|
165
|
-
```
|
|
166
|
-
|
|
167
|
-
### budget
|
|
168
|
-
|
|
169
|
-
```bash
|
|
170
|
-
echo "BUDGET POLICY — $project_id"
|
|
171
|
-
echo "────────────────────────────────────────────────────────"
|
|
172
|
-
|
|
173
|
-
[ ! -f "$budgetFile" ] && echo '{"budgets":[]}' > "$budgetFile"
|
|
174
|
-
|
|
175
|
-
existing=$(jq -r --arg pid "$resolvedId" '(.budgets // [])[] | select(.project_id == $pid)' "$budgetFile")
|
|
176
|
-
if [ -z "$existing" ]; then
|
|
177
|
-
echo " No budget policy set."
|
|
178
|
-
else
|
|
179
|
-
echo "$existing" | jq -r '
|
|
180
|
-
" Policy: \(.policy // "none")",
|
|
181
|
-
" Limit: \(.limit_tokens // "unlimited") tokens",
|
|
182
|
-
" Period: \(.period // "daily")"
|
|
183
|
-
'
|
|
184
|
-
fi
|
|
185
|
-
|
|
186
|
-
if [ -n "$budget_policy" ]; then
|
|
187
|
-
case "$budget_policy" in none|soft_limit|hard_limit) : ;; *)
|
|
188
|
-
echo "ERROR: --budget-policy must be none, soft_limit, or hard_limit"; exit 1 ;;
|
|
189
|
-
esac
|
|
190
|
-
[ "$budget_policy" != "none" ] && [ -z "$budget_limit" ] && {
|
|
191
|
-
echo "ERROR: --budget-limit required for '$budget_policy' policy."; exit 1
|
|
192
|
-
}
|
|
193
|
-
ts=$(date -u +%Y-%m-%dT%H:%M:%SZ)
|
|
194
|
-
tmp="${budgetFile}.tmp"
|
|
195
|
-
jq --arg pid "$resolvedId" \
|
|
196
|
-
--arg policy "$budget_policy" \
|
|
197
|
-
--argjson limit "${budget_limit:-0}" \
|
|
198
|
-
--arg period "${budget_period:-daily}" \
|
|
199
|
-
--arg ts "$ts" \
|
|
200
|
-
'.budgets = [(.budgets // [])[] | select(.project_id != $pid)] +
|
|
201
|
-
[{"project_id":$pid,"policy":$policy,
|
|
202
|
-
"limit_tokens":(if $policy != "none" then $limit else null end),
|
|
203
|
-
"period":$period,"updatedAt":$ts}]' \
|
|
204
|
-
"$budgetFile" > "$tmp" && mv "$tmp" "$budgetFile"
|
|
205
|
-
echo ""
|
|
206
|
-
echo "Budget policy updated: $budget_policy"
|
|
207
|
-
[ "$budget_policy" != "none" ] && echo " Limit: $budget_limit tokens / ${budget_period:-daily}"
|
|
208
|
-
fi
|
|
209
|
-
```
|
|
210
|
-
|
|
211
|
-
### workspaces
|
|
212
|
-
|
|
213
|
-
```bash
|
|
214
|
-
echo "WORKSPACES — project: $project_id"
|
|
215
|
-
echo "────────────────────────────────────────────────────────"
|
|
216
|
-
|
|
217
|
-
if [ ! -f "$wsFile" ]; then
|
|
218
|
-
echo " No workspaces file."
|
|
219
|
-
else
|
|
220
|
-
printf "%-20s %-12s %-18s %-8s %s\n" "ID" "STATUS" "AGENT" "BRANCH" "PATH"
|
|
221
|
-
echo "────────────────────────────────────────────────────────"
|
|
222
|
-
count=0
|
|
223
|
-
jq -r --arg pid "$resolvedId" '(.workspaces // [])[] | select(.project_id == $pid) |
|
|
224
|
-
[.id, (.status // "unknown"), (.agent_id // "(none)"), (.branch // "?"), (.worktree_path // "-")] | @tsv' \
|
|
225
|
-
"$wsFile" | while IFS=$'\t' read -r id st ag br path; do
|
|
226
|
-
printf "%-20s %-12s %-18s %-8s %s\n" "$id" "$st" "$ag" "$br" "$path"
|
|
227
|
-
count=$((count + 1))
|
|
228
|
-
done
|
|
229
|
-
fi
|
|
230
|
-
```
|
|
231
|
-
|
|
232
|
-
---
|
|
233
|
-
|
|
234
|
-
## Step 3 — Return Output
|
|
235
|
-
|
|
236
|
-
```yaml
|
|
237
|
-
domain: ops
|
|
238
|
-
status: complete
|
|
239
|
-
action: <action>
|
|
240
|
-
org: <org_name>
|
|
241
|
-
project_id: <project_id>
|
|
242
|
-
project_status: <status>
|
|
243
|
-
```
|
|
244
|
-
|
|
245
|
-
---
|
|
246
|
-
|
|
247
|
-
## Step 4 — Brain Write (standalone only)
|
|
248
|
-
|
|
249
|
-
If `caller` is not "command", follow mastermind-protocol/SKILL.md Brain Write Procedure for domain `ops`.
|