@monoes/monomindcli 2.9.7 → 2.9.9
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/agents/design/design-monodesign.md +1 -2
- package/.claude/agents/engineering/engineering-ai-data-remediation-engineer.md +1 -2
- package/.claude/agents/engineering/engineering-ai-engineer.md +1 -2
- package/.claude/agents/engineering/engineering-autonomous-optimization-architect.md +0 -1
- package/.claude/agents/engineering/engineering-backend-architect.md +1 -2
- package/.claude/agents/engineering/engineering-code-reviewer.md +1 -2
- package/.claude/agents/engineering/engineering-data-engineer.md +1 -2
- package/.claude/agents/engineering/engineering-database-optimizer.md +1 -2
- package/.claude/agents/engineering/engineering-devops-automator.md +1 -2
- package/.claude/agents/engineering/engineering-embedded-firmware-engineer.md +1 -2
- package/.claude/agents/engineering/engineering-feishu-integration-developer.md +1 -2
- package/.claude/agents/engineering/engineering-frontend-developer.md +1 -2
- package/.claude/agents/engineering/engineering-git-workflow-master.md +1 -2
- package/.claude/agents/engineering/engineering-incident-response-commander.md +0 -1
- package/.claude/agents/engineering/engineering-mobile-app-builder.md +1 -2
- package/.claude/agents/engineering/engineering-rapid-prototyper.md +1 -2
- package/.claude/agents/engineering/engineering-security-engineer.md +1 -2
- package/.claude/agents/engineering/engineering-senior-developer.md +1 -2
- package/.claude/agents/engineering/engineering-software-architect.md +1 -2
- package/.claude/agents/engineering/engineering-solidity-smart-contract-engineer.md +1 -2
- package/.claude/agents/engineering/engineering-sre.md +0 -1
- package/.claude/agents/engineering/engineering-technical-writer.md +1 -2
- package/.claude/agents/engineering/engineering-threat-detection-engineer.md +0 -1
- package/.claude/agents/engineering/engineering-wechat-mini-program-developer.md +1 -2
- package/.claude/agents/github/code-review-swarm.md +0 -1
- package/.claude/agents/github/github-modes.md +0 -1
- package/.claude/agents/github/issue-tracker.md +0 -1
- package/.claude/agents/github/multi-repo-swarm.md +0 -1
- package/.claude/agents/github/pr-manager.md +0 -1
- package/.claude/agents/github/project-board-sync.md +0 -1
- package/.claude/agents/github/release-manager.md +0 -1
- package/.claude/agents/github/repo-architect.md +0 -1
- package/.claude/agents/github/swarm-issue.md +0 -1
- package/.claude/agents/github/swarm-pr.md +0 -1
- package/.claude/agents/github/sync-coordinator.md +0 -1
- package/.claude/agents/github/workflow-automation.md +0 -1
- package/.claude/agents/marketing/marketing-competitive-content.md +1 -2
- package/.claude/agents/marketing/marketing-cro-specialist.md +1 -2
- package/.claude/agents/marketing/marketing-email-specialist.md +1 -2
- package/.claude/agents/marketing/marketing-launch-strategist.md +1 -2
- package/.claude/agents/marketing/marketing-pricing-strategist.md +1 -2
- package/.claude/agents/specialized/agentic-identity-trust.md +0 -1
- package/.claude/agents/specialized/agents-orchestrator.md +1 -2
- package/.claude/agents/specialized/automation-governance-architect.md +1 -2
- package/.claude/agents/specialized/blockchain-security-auditor.md +1 -2
- package/.claude/agents/specialized/compliance-auditor.md +1 -2
- package/.claude/agents/specialized/identity-graph-operator.md +0 -1
- package/.claude/agents/specialized/lsp-index-engineer.md +1 -2
- package/.claude/agents/specialized/mobile/spec-mobile-react-native.md +0 -1
- package/.claude/agents/specialized/specialized-cultural-intelligence-strategist.md +0 -1
- package/.claude/agents/specialized/specialized-developer-advocate.md +1 -2
- package/.claude/agents/specialized/specialized-document-generator.md +1 -2
- package/.claude/agents/specialized/specialized-mcp-builder.md +1 -2
- package/.claude/agents/specialized/specialized-model-qa.md +0 -1
- package/.claude/agents/specialized/specialized-workflow-architect.md +1 -2
- package/.claude/agents/specialized/zk-steward.md +1 -2
- package/.claude/agents/testing/production-validator.md +0 -1
- package/.claude/agents/testing/tdd-london-swarm.md +0 -1
- package/.claude/agents/testing/testing-accessibility-auditor.md +0 -1
- package/.claude/agents/testing/testing-api-tester.md +1 -2
- package/.claude/agents/testing/testing-evidence-collector.md +1 -2
- package/.claude/agents/testing/testing-performance-benchmarker.md +1 -2
- package/.claude/agents/testing/testing-test-results-analyzer.md +1 -2
- package/.claude/agents/testing/testing-tool-evaluator.md +1 -2
- package/.claude/agents/testing/testing-workflow-optimizer.md +1 -2
- package/.claude/commands/hooks/README.md +1 -1
- package/.claude/commands/memory/README.md +6 -7
- package/.claude/commands/monitoring/README.md +1 -1
- package/.claude/helpers/control-start.cjs +37 -8
- package/.claude/helpers/handlers/route-handler.cjs +22 -3
- package/.claude/helpers/handlers/session-handler.cjs +43 -0
- package/.claude/helpers/intelligence.cjs +27 -6
- package/.claude/helpers/statusline.cjs +45 -11
- 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-adapters/SKILL.md +0 -11
- package/.claude/skills/mastermind-agents/SKILL.md +0 -11
- package/.claude/skills/mastermind-backup/SKILL.md +0 -11
- package/.claude/skills/mastermind-bootstrap/SKILL.md +0 -11
- package/.claude/skills/mastermind-delegation/SKILL.md +14 -12
- package/.claude/skills/mastermind-idea/SKILL.md +0 -5
- package/.claude/skills/mastermind-monitor/SKILL.md +0 -15
- package/.claude/skills/mastermind-org-settings/SKILL.md +0 -11
- package/.claude/skills/mastermind-plugins/SKILL.md +0 -11
- package/.claude/skills/mastermind-protocol/SKILL.md +6 -124
- package/.claude/skills/mastermind-repeat/SKILL.md +0 -25
- package/.claude/skills/mastermind-review/SKILL.md +1 -1
- package/.claude/skills/mastermind-stoporg/SKILL.md +0 -19
- package/.claude/skills/memory-toolkit/SKILL.md +12 -11
- package/.claude/skills/monodesign/scripts/detector/engines/browser/drivers.mjs +8 -1
- package/.claude/skills/pair-programming/SKILL.md +1 -1
- package/.claude/skills/performance-analysis/SKILL.md +228 -484
- package/.claude/skills/specialagent/SKILL.md +31 -133
- 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 +3 -3
- 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 +7 -1
- 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-project-checks.d.ts.map +1 -1
- package/dist/src/commands/doctor-project-checks.js +3 -37
- package/dist/src/commands/doctor-project-checks.js.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-coverage-commands.d.ts.map +1 -1
- package/dist/src/commands/hooks-coverage-commands.js +75 -67
- package/dist/src/commands/hooks-coverage-commands.js.map +1 -1
- package/dist/src/commands/hooks-workers.d.ts.map +1 -1
- package/dist/src/commands/hooks-workers.js +41 -10
- package/dist/src/commands/hooks-workers.js.map +1 -1
- package/dist/src/commands/hooks.js +1 -1
- package/dist/src/commands/index.d.ts +1 -1
- package/dist/src/commands/index.d.ts.map +1 -1
- package/dist/src/commands/index.js +20 -4
- package/dist/src/commands/index.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/neural-optimize.d.ts.map +1 -1
- package/dist/src/commands/neural-optimize.js +27 -5
- package/dist/src/commands/neural-optimize.js.map +1 -1
- package/dist/src/commands/org-observe.d.ts.map +1 -1
- package/dist/src/commands/org-observe.js +37 -30
- package/dist/src/commands/org-observe.js.map +1 -1
- package/dist/src/commands/org.d.ts.map +1 -1
- package/dist/src/commands/org.js +129 -2
- 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/security-cve.d.ts.map +1 -1
- package/dist/src/commands/security-cve.js +1 -11
- package/dist/src/commands/security-cve.js.map +1 -1
- package/dist/src/commands/security-misc.d.ts +0 -9
- package/dist/src/commands/security-misc.d.ts.map +1 -1
- package/dist/src/commands/security-misc.js +33 -54
- package/dist/src/commands/security-misc.js.map +1 -1
- package/dist/src/commands/security-scan.d.ts.map +1 -1
- package/dist/src/commands/security-scan.js +3 -11
- package/dist/src/commands/security-scan.js.map +1 -1
- package/dist/src/commands/swarm.d.ts.map +1 -1
- package/dist/src/commands/swarm.js +7 -2
- package/dist/src/commands/swarm.js.map +1 -1
- package/dist/src/commands/ui.d.ts +8 -0
- package/dist/src/commands/ui.d.ts.map +1 -0
- package/dist/src/commands/ui.js +94 -0
- package/dist/src/commands/ui.js.map +1 -0
- package/dist/src/init/claudemd-generator.d.ts.map +1 -1
- package/dist/src/init/claudemd-generator.js +7 -9
- package/dist/src/init/claudemd-generator.js.map +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.js +1 -1
- package/dist/src/init/write-capabilities.js +7 -7
- package/dist/src/init/write-capabilities.js.map +1 -1
- package/dist/src/knowledge/document-pipeline.d.ts.map +1 -1
- package/dist/src/knowledge/document-pipeline.js +1 -0
- package/dist/src/knowledge/document-pipeline.js.map +1 -1
- package/dist/src/knowledge/eval/golden-set.d.ts.map +1 -1
- package/dist/src/knowledge/eval/golden-set.js +21 -32
- package/dist/src/knowledge/eval/golden-set.js.map +1 -1
- package/dist/src/mcp-tools/embeddings-tools.js +2 -2
- package/dist/src/mcp-tools/embeddings-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 +29 -3
- 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 +32 -19
- package/dist/src/mcp-tools/hooks-routing.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/performance-tools.d.ts.map +1 -1
- package/dist/src/mcp-tools/performance-tools.js +15 -10
- package/dist/src/mcp-tools/performance-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 +8 -0
- package/dist/src/memory/memory-bridge.d.ts.map +1 -1
- package/dist/src/memory/memory-bridge.js +37 -8
- 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/antigravity-runner.d.ts.map +1 -1
- package/dist/src/orgrt/antigravity-runner.js +6 -6
- package/dist/src/orgrt/antigravity-runner.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 +18 -86
- package/dist/src/orgrt/checkpoint-ops.js.map +1 -1
- package/dist/src/orgrt/checkpoint.d.ts +1 -1
- package/dist/src/orgrt/checkpoint.d.ts.map +1 -1
- package/dist/src/orgrt/checkpoint.js +3 -3
- package/dist/src/orgrt/checkpoint.js.map +1 -1
- package/dist/src/orgrt/daemon.d.ts +9 -1
- package/dist/src/orgrt/daemon.d.ts.map +1 -1
- package/dist/src/orgrt/daemon.js +267 -139
- 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/forwarder.d.ts.map +1 -1
- package/dist/src/orgrt/forwarder.js +148 -15
- package/dist/src/orgrt/forwarder.js.map +1 -1
- package/dist/src/orgrt/kimicode-runner.js +1 -1
- package/dist/src/orgrt/kimicode-runner.js.map +1 -1
- package/dist/src/orgrt/opencode-runner.js +1 -1
- package/dist/src/orgrt/opencode-runner.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 +67 -6
- 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 +26 -2
- package/dist/src/orgrt/templates.js.map +1 -1
- package/dist/src/orgrt/types.d.ts +77 -1
- package/dist/src/orgrt/types.d.ts.map +1 -1
- package/dist/src/orgrt/types.js +28 -2
- 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 +38 -7
- package/dist/src/orgrt/vercel-runner.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +3 -3
- 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`.
|