AGENT SKILL

mastermind-join-queue

Deprecated: bookkeeping only — not enforced by the Org Runtime. Mastermind join-queue: Lists, approves or rejects join requests recorded in a side file, by type and status.

License 许可
Apache-2.0
所属仓库
monoes/monomind
最近更新
2026-11-10
Stars
★ 23
Forks
2

01 前言 Front Matter

name
mastermind-join-queue
pick
low
type
domain-skill
description
Deprecated: bookkeeping only — not enforced by the Org Runtime. Mastermind join-queue: Lists, approves or rejects join requests recorded in a side file, by type and status.
default_mode
auto

03 SKILL.md 正文

Mastermind Join Queue

This skill is invoked directly via /mastermind-join-queue.

Bookkeeping only — not enforced by the Org Runtime. It reads and writes .monomind/orgs/<org>-join-requests.json, which no runtime code reads: approving a request grants no access.

On first use in a session, print this one line before doing anything else: WARNING: mastermind-join-queue is a ledger only - nothing is enforced by the Org Runtime.


Inputs

  • brain_context: BRAIN CONTEXT block (injected by command, or loaded below if standalone)
  • org_name: org to manage join requests for (required)
  • action: list | approve | reject
  • request_id: join request ID (required for approve/reject)
  • status: pending_approval | approved | rejected (filter; default: pending_approval)
  • request_type: all | human | agent (filter; default: all)
  • caller: command | master

Step 0 — Brain Load (standalone only)

If caller is not "command", load brain context following mastermind-protocol/SKILL.md Brain Load Procedure with namespace: ops.


Step 1 — Load Org

orgFile=".monomind/orgs/${org_name}.json"
[ ! -f "$orgFile" ] && { echo "ERROR: Org '${org_name}' not found."; exit 1; }

joinFile=".monomind/orgs/${org_name}-join-requests.json"

Step 2 — Execute Action

list (default)

statusFilter="${status:-pending_approval}"
typeFilter="${request_type:-all}"

echo "JOIN REQUESTS — $org_name  (status: $statusFilter  type: $typeFilter)"
echo "────────────────────────────────────────────────────────"

if [ ! -f "$joinFile" ]; then
  echo "  No join requests found."
  echo ""
  echo "  Approve: /mastermind-join-queue --org $org_name --action approve --request-id <id>"
  exit 0
fi

python3 - "$joinFile" "$statusFilter" "$typeFilter" <<'PYEOF'
import json, sys
data = json.load(open(sys.argv[1]))
status_f = sys.argv[2]
type_f   = sys.argv[3]

requests = data.get("requests", [])
filtered = [r for r in requests
  if r.get("status") == status_f
  and (type_f == "all" or r.get("type") == type_f)]

if not filtered:
  print("  (no matching requests)")
else:
  print(f"  {'ID':<32} {'TYPE':<8} {'REQUESTER':<28} {'STATUS':<20} {'CREATED'}")
  print("  " + "─" * 102)
  for r in filtered:
    rid     = r.get("id","?")[:32]
    rtype   = r.get("type","?")[:8]
    req     = (r.get("requesterName") or r.get("requesterId","?"))[:28]
    st      = r.get("status","?")[:20]
    created = r.get("createdAt","-")[:10]
    print(f"  {rid:<32} {rtype:<8} {req:<28} {st:<20} {created}")

print(f"\n  Total: {len(filtered)} request(s) (status={status_f}, type={type_f})")
PYEOF

echo ""
echo "  Approve: /mastermind-join-queue --org $org_name --action approve --request-id <id>"
echo "  Reject:  /mastermind-join-queue --org $org_name --action reject  --request-id <id>"

approve

[ -z "$request_id" ] && { echo "ERROR: --request-id required."; exit 1; }
[ ! -f "$joinFile" ] && { echo "ERROR: No join requests file found for org '${org_name}'."; exit 1; }

ts=$(date -u +%Y-%m-%dT%H:%M:%SZ)

python3 - "$joinFile" "$request_id" "$ts" <<'PYEOF'
import json, sys
path, rid, ts = sys.argv[1], sys.argv[2], sys.argv[3]
data = json.load(open(path))
requests = data.get("requests", [])
found = False
for r in requests:
    if r.get("id") == rid:
        r["status"] = "approved"
        r["resolvedAt"] = ts
        found = True
        break
if not found:
    print(f"ERROR: Request '{rid}' not found.")
    sys.exit(1)
data["requests"] = requests
with open(path, "w") as f:
    json.dump(data, f, indent=2)
print(f"  Approved: {rid}  (resolvedAt: {ts})")
PYEOF

reject

[ -z "$request_id" ] && { echo "ERROR: --request-id required."; exit 1; }
[ ! -f "$joinFile" ] && { echo "ERROR: No join requests file found for org '${org_name}'."; exit 1; }

ts=$(date -u +%Y-%m-%dT%H:%M:%SZ)

python3 - "$joinFile" "$request_id" "$ts" <<'PYEOF'
import json, sys
path, rid, ts = sys.argv[1], sys.argv[2], sys.argv[3]
data = json.load(open(path))
requests = data.get("requests", [])
found = False
for r in requests:
    if r.get("id") == rid:
        r["status"] = "rejected"
        r["resolvedAt"] = ts
        found = True
        break
if not found:
    print(f"ERROR: Request '{rid}' not found.")
    sys.exit(1)
data["requests"] = requests
with open(path, "w") as f:
    json.dump(data, f, indent=2)
print(f"  Rejected: {rid}  (resolvedAt: {ts})")
PYEOF

Step 3 — Return Output

domain: ops
status: complete
action: <action>
org_name: <org_name>
status_filter: <status>
type_filter: <request_type>

Step 4 — Brain Write (standalone only)

If caller is not "command", follow mastermind-protocol/SKILL.md Brain Write Procedure for domain ops.

04 同仓库更多 Skills

monoes
monoes/monomind

zk-steward

Org role guidance for a ZK steward: engineer zero-knowledge proof systems with circuit design, SNARK vs STARK choice and security review. This is zero-knowledge cryptography, not Zettelkasten note-taking.

★ 23
monoes
monoes/monomind

writing-plans

Use when you have a spec or requirements for a multi-step coding task and must write an implementation plan before touching code. Produces bite-sized TDD tasks with exact file paths, code and commands for an engineer with zero context.

内容创作者写作与文案
★ 23
monoes
monoes/monomind

write-spec

Write a feature spec or PRD from a problem statement or feature idea. Use when turning a vague idea or user request into a structured document, scoping a feature with goals and non-goals, defining success metrics and acceptance criteria, or breaking a big ask into a phased spec.

产品经理
★ 23
monoes
monoes/monomind

write-query

Write optimized SQL for your dialect with best practices. Use when translating a natural-language data need into SQL, building a multi-CTE query with joins and aggregations, optimizing a query against a large partitioned table, or getting dialect-specific syntax for Snowflake, BigQuery, Postgres, etc.

数据分析师
★ 23
monoes
monoes/monomind

workflow-automation

Org role guidance for workflow automation: build and maintain CI/CD definitions in GitHub Actions or equivalent: triggers, jobs, matrices, caching. Covers path filters, dependency caching, parallel jobs, timeouts and fail-fast ordering.

运维与部署Skill与智能体开发
★ 23
monoes
monoes/monomind

workflow-architect

Org role guidance for a workflow architect: map full workflow trees for systems, user journeys and agents, covering every branch and failure. Covers discovering workflows from code, handoff contracts, timeouts, recovery paths and observable state.

Skill与智能体开发
★ 23