[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M71M4ECF23X0FSASTKY80Q1B":3,"skill-same:01M71M4ECF23X0FSASTKY80Q1B":64},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":33,"linkOnly":34,"markdownContent":35,"markdownBody":36,"frontMatter":37,"refName":41,"commitSha":42,"skillDirectory":43,"forksCount":44,"repositoryHtmlUrl":45,"repositoryHomepageUrl":46,"ownerHtmlUrl":47,"ownerBlogUrl":48,"ownerDescription":6,"updatedAt":49,"install":50,"resources":63},"01M71M4ECF23X0FSASTKY80Q1B","mastermind-workspace-detail",null,"Mastermind workspace-detail — inspect and control one execution workspace: services, provision\u002Fteardown commands, linked issues and routines, logs, config.","monoes\u002Fmonomind","monoes","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F276744696?v=4","01M71KWF37AJ2NJBP3KWBVSDGT","01M71KWF4CSF8ADH0M6HA09VD2",23,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fmonoes\u002Fmonomind\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fmastermind-workspace-detail\u002FSKILL.md",[],[18,19,20,21,22,23,24,25,26,27,28,29,30,31,32],"mastermind workspace detail","detail","workspace","domain","teardown","inspect","issues","routines","execution","one","logs","services","control","config","commands","2026-11-10 10:56:23",false,"---\nname: mastermind-workspace-detail\ndescription: \"Mastermind workspace-detail — inspect and control one execution workspace: services, provision\u002Fteardown commands, linked issues and routines, logs, config.\"\ntype: domain-skill\ndefault_mode: confirm\npick: low\n---\n\n# Mastermind Workspace Detail\n\nThis skill is invoked directly via `\u002Fmastermind-workspace-detail`.\n\n---\n\n## Inputs\n\n- `brain_context`: BRAIN CONTEXT block (injected by command, or loaded below if standalone)\n- `org_name`: org the workspace belongs to (required)\n- `workspace_id`: execution workspace id (required)\n- `action`: show | services | provision | teardown | cleanup | runtime-logs | issues | routines | config\n- `provision_command`: shell command to provision the workspace (for config action)\n- `teardown_command`: shell command to tear down the workspace (for config action)\n- `cleanup_command`: shell command for workspace cleanup (for config action)\n- `cwd`: working directory override (for config action)\n- `repo_url`: repository URL (for config action)\n- `base_ref`: git base ref\u002Fbranch (for config action)\n- `branch_name`: branch name for the workspace (for config action)\n- `log_lines`: number of runtime log lines to show (default 50)\n- `caller`: command | master\n\n---\n\n## Workspace Tabs (mirrors ExecutionWorkspaceDetail.tsx)\n\n| Tab | Description |\n|-----|-------------|\n| `services` | Running service processes in this workspace |\n| `configuration` | Provision\u002Fteardown\u002Fcleanup commands, repo, branch, cwd |\n| `runtime_logs` | Live or recent runtime logs from workspace processes |\n| `issues` | Issues currently assigned to or running in this workspace |\n| `routines` | Routines with workspace-specific variable bindings |\n\n---\n\n## Step 0 — Brain Load (standalone only)\n\nIf `caller` is not \"command\", load brain context following mastermind-protocol\u002FSKILL.md Brain Load Procedure with namespace: `ops`.\n\n---\n\n## Step 1 — Load Workspace Data\n\n```bash\norgFile=\".monomind\u002Forgs\u002F${org_name}.json\"\n[ ! -f \"$orgFile\" ] && { echo \"ERROR: Org '${org_name}' not found.\"; exit 1; }\n\nwsFile=\".monomind\u002Forgs\u002F${org_name}-workspaces.json\"\n[ ! -f \"$wsFile\" ] && { echo \"ERROR: No workspaces file for org '$org_name'. Create workspaces via \u002Fmastermind-workspaces.\"; exit 1; }\n\nwsDef=$(jq -r --arg id \"$workspace_id\" '(.workspaces \u002F\u002F [])[] | select(.id == $id)' \"$wsFile\")\n[ -z \"$wsDef\" ] && { echo \"ERROR: Workspace '$workspace_id' not found in org '$org_name'.\"; exit 1; }\n\nissuesFile=\".monomind\u002Forgs\u002F${org_name}-issues.json\"\nroutinesFile=\".monomind\u002Forgs\u002F${org_name}-routines.json\"\nlogFile=\".monomind\u002Forgs\u002F${org_name}-workspace-logs\u002F${workspace_id}.log\"\n```\n\n---\n\n## Step 2 — Execute Action\n\n### show (default)\n\n```bash\necho \"EXECUTION WORKSPACE — $workspace_id @ $org_name\"\necho \"────────────────────────────────────────────────────────\"\n\necho \"$wsDef\" | jq -r '\n  \"  ID:              \\(.id)\",\n  \"  Project:         \\(.project_id \u002F\u002F \"(none)\")\",\n  \"  Agent:           \\(.agent_id \u002F\u002F \"(unassigned)\")\",\n  \"  Status:          \\(.status \u002F\u002F \"unknown\")\",\n  \"  Branch:          \\(.branch \u002F\u002F \"?\")\",\n  \"  Base ref:        \\(.base_ref \u002F\u002F \"?\")\",\n  \"  Repo URL:        \\(.repo_url \u002F\u002F \"(local)\")\",\n  \"  CWD:             \\(.cwd \u002F\u002F .worktree_path \u002F\u002F \"(none)\")\",\n  \"  Created:         \\(.createdAt \u002F\u002F \"-\")\",\n  \"  Last active:     \\(.lastActiveAt \u002F\u002F \"-\")\"\n'\n\n# Services\nsvcCount=$(echo \"$wsDef\" | jq -r '(.services \u002F\u002F []) | length')\necho \"\"\necho \"  Services running:  $svcCount\"\necho \"$wsDef\" | jq -r '(.services \u002F\u002F [])[] | \"    · \\(.)\"'\n\n# Config summary\nhasProvision=$(echo \"$wsDef\" | jq -r 'if .config.provisionCommand then \"yes\" else \"no\" end')\nhasTeardown=$(echo \"$wsDef\" | jq -r 'if .config.teardownCommand then \"yes\" else \"no\" end')\necho \"\"\necho \"  Provision cmd:     $hasProvision\"\necho \"  Teardown cmd:      $hasTeardown\"\n```\n\n### services\n\n```bash\necho \"SERVICES — $workspace_id\"\necho \"────────────────────────────────────────────────────────\"\n\nservices=$(echo \"$wsDef\" | jq -r '(.services \u002F\u002F [])[]')\nif [ -z \"$services\" ]; then\n  echo \"  No services running.\"\nelse\n  echo \"$wsDef\" | jq -r '.services \u002F\u002F [] | to_entries[] |\n    \"  [\\(.key)] \\(.value)\"' 2>\u002Fdev\u002Fnull || \\\n  echo \"$wsDef\" | jq -r '(.services \u002F\u002F [])[] | \"  · \\(.)\"'\nfi\n\necho \"\"\necho \"  Workspace path: $(echo \"$wsDef\" | jq -r '.worktree_path \u002F\u002F \"(none)\"')\"\necho \"  Status:         $(echo \"$wsDef\" | jq -r '.status \u002F\u002F \"unknown\"')\"\n```\n\n### provision\n\n```bash\necho \"PROVISION — $workspace_id\"\necho \"────────────────────────────────────────────────────────\"\n\nprovCmd=$(echo \"$wsDef\" | jq -r '.config.provisionCommand \u002F\u002F \"\"')\nwsPath=$(echo \"$wsDef\" | jq -r '.worktree_path \u002F\u002F .cwd \u002F\u002F \"\"')\n\nif [ -z \"$provCmd\" ]; then\n  echo \"  No provision command configured.\"\n  echo \"  Set one: --action config --provision-command 'npm install && npm run build'\"\nelse\n  echo \"  Command: $provCmd\"\n  echo \"  CWD:     $wsPath\"\n  echo \"\"\n  echo \"  To run: cd '$wsPath' && $provCmd\"\n  echo \"\"\n  if [ -d \"$wsPath\" ] && [ -n \"$provCmd\" ]; then\n    echo \"  Executing provision command…\"\n    (cd \"$wsPath\" && eval \"$provCmd\") && {\n      ts=$(date -u +%Y-%m-%dT%H:%M:%SZ)\n      tmp=\"${wsFile}.tmp\"\n      jq --arg id \"$workspace_id\" --arg ts \"$ts\" \\\n        '.workspaces = [(.workspaces \u002F\u002F [])[] | if .id == $id then .last_provisioned = $ts else . end]' \\\n        \"$wsFile\" > \"$tmp\" && mv \"$tmp\" \"$wsFile\"\n      echo \"  Provision complete.\"\n    } || echo \"  Provision command exited with error.\"\n  else\n    [ -z \"$wsPath\" ] && echo \"  ERROR: No worktree_path set — cannot execute provision command automatically.\"\n  fi\nfi\n```\n\n### teardown\n\n```bash\necho \"TEARDOWN — $workspace_id\"\necho \"────────────────────────────────────────────────────────\"\n\ntdCmd=$(echo \"$wsDef\" | jq -r '.config.teardownCommand \u002F\u002F \"\"')\nwsPath=$(echo \"$wsDef\" | jq -r '.worktree_path \u002F\u002F .cwd \u002F\u002F \"\"')\n\nif [ -z \"$tdCmd\" ]; then\n  echo \"  No teardown command configured.\"\nelse\n  echo \"  Command: $tdCmd\"\n  echo \"  CWD:     $wsPath\"\n  if [ -d \"$wsPath\" ]; then\n    echo \"  Executing teardown command…\"\n    (cd \"$wsPath\" && eval \"$tdCmd\") && echo \"  Teardown complete.\" || echo \"  Teardown command exited with error.\"\n  fi\nfi\n```\n\n### cleanup\n\n```bash\necho \"CLEANUP — $workspace_id\"\necho \"────────────────────────────────────────────────────────\"\n\ncleanCmd=$(echo \"$wsDef\" | jq -r '.config.cleanupCommand \u002F\u002F \"\"')\nwsPath=$(echo \"$wsDef\" | jq -r '.worktree_path \u002F\u002F .cwd \u002F\u002F \"\"')\n\nif [ -z \"$cleanCmd\" ]; then\n  echo \"  No cleanup command configured.\"\nelse\n  echo \"  Command: $cleanCmd\"\n  if [ -d \"$wsPath\" ]; then\n    (cd \"$wsPath\" && eval \"$cleanCmd\") && echo \"  Cleanup complete.\" || echo \"  Cleanup exited with error.\"\n  fi\nfi\n```\n\n### runtime-logs\n\n```bash\nlines=${log_lines:-50}\necho \"RUNTIME LOGS — $workspace_id (last $lines lines)\"\necho \"────────────────────────────────────────────────────────\"\n\nif [ -f \"$logFile\" ]; then\n  tail -${lines} \"$logFile\"\nelse\n  # Try workspace path stderr\u002Fstdout logs\n  wsPath=$(echo \"$wsDef\" | jq -r '.worktree_path \u002F\u002F \"\"')\n  found=false\n  for logPath in \"${wsPath}\u002F.monomind\u002Fruntime.log\" \"${wsPath}\u002Flogs\u002Fruntime.log\" \"${wsPath}\u002Foutput.log\"; do\n    if [ -f \"$logPath\" ]; then\n      tail -${lines} \"$logPath\"\n      found=true\n      break\n    fi\n  done\n  \"$found\" || echo \"  No runtime logs found. Logs are written to .monomind\u002Fworkspace-logs\u002F$workspace_id.log during runs.\"\nfi\n```\n\n### issues\n\n```bash\necho \"ISSUES — workspace: $workspace_id\"\necho \"────────────────────────────────────────────────────────\"\nprintf \"%-24s %-12s %-10s %s\\n\" \"ID\" \"STATUS\" \"PRIORITY\" \"TITLE\"\necho \"────────────────────────────────────────────────────────\"\n\nif [ ! -f \"$issuesFile\" ]; then\n  echo \"  No issues file found.\"\nelse\n  jq -r --arg wid \"$workspace_id\" '(.issues \u002F\u002F [])[] |\n    select(.workspace_id == $wid or (.assigned_workspace == $wid)) |\n    [.id, (.status \u002F\u002F \"open\"), (.priority \u002F\u002F \"medium\"), (.title \u002F\u002F \"(no title)\")] | @tsv' \\\n    \"$issuesFile\" | while IFS=$'\\t' read -r id st pri title; do\n    printf \"%-24s %-12s %-10s %s\\n\" \"$id\" \"$st\" \"$pri\" \"$title\"\n  done || echo \"  No issues assigned to this workspace.\"\nfi\n```\n\n### routines\n\n```bash\necho \"ROUTINES — workspace: $workspace_id\"\necho \"────────────────────────────────────────────────────────\"\n\nif [ ! -f \"$routinesFile\" ]; then\n  echo \"  No routines file found.\"\nelse\n  # Show routines that have workspace-specific variable bindings\n  jq -r --arg wid \"$workspace_id\" \\\n    '(.routines \u002F\u002F [])[] | select((.variables \u002F\u002F {}) | to_entries[] | .key | startswith(\"WS_\") or contains(\"workspace\")) |\n    \"\\(.id)  \\(.name \u002F\u002F \"(no name)\")  vars: \\((.variables \u002F\u002F {}) | keys | join(\", \"))\"' \\\n    \"$routinesFile\" 2>\u002Fdev\u002Fnull || echo \"  No routines with workspace-specific variables.\"\nfi\n\necho \"\"\necho \"To run a routine with workspace vars: \u002Fmastermind-routine-detail --org $org_name --routine-id \u003Cid> --action variables\"\n```\n\n### config\n\n```bash\necho \"WORKSPACE CONFIG — $workspace_id\"\necho \"────────────────────────────────────────────────────────\"\n\nif [ -n \"$provision_command\" ] || [ -n \"$teardown_command\" ] || [ -n \"$cleanup_command\" ] || \\\n   [ -n \"$cwd\" ] || [ -n \"$repo_url\" ] || [ -n \"$base_ref\" ] || [ -n \"$branch_name\" ]; then\n\n  ts=$(date -u +%Y-%m-%dT%H:%M:%SZ)\n  tmp=\"${wsFile}.tmp\"\n  jq --arg id \"$workspace_id\" \\\n     --arg prov \"${provision_command:-}\" \\\n     --arg td \"${teardown_command:-}\" \\\n     --arg clean \"${cleanup_command:-}\" \\\n     --arg cwd_ \"${cwd:-}\" \\\n     --arg repo \"${repo_url:-}\" \\\n     --arg base \"${base_ref:-}\" \\\n     --arg branch \"${branch_name:-}\" \\\n     --arg ts \"$ts\" \\\n    '.workspaces = [(.workspaces \u002F\u002F [])[] | if .id == $id then\n       if .config == null then .config = {} else . end |\n       (if $prov != \"\" then .config.provisionCommand = $prov else . end) |\n       (if $td != \"\" then .config.teardownCommand = $td else . end) |\n       (if $clean != \"\" then .config.cleanupCommand = $clean else . end) |\n       (if $cwd_ != \"\" then .cwd = $cwd_ else . end) |\n       (if $repo != \"\" then .repo_url = $repo else . end) |\n       (if $base != \"\" then .base_ref = $base else . end) |\n       (if $branch != \"\" then .branch = $branch else . end) |\n       .lastActiveAt = $ts\n     else . end]' \\\n    \"$wsFile\" > \"$tmp\" && mv \"$tmp\" \"$wsFile\"\n  echo \"Config updated for workspace '$workspace_id'.\"\nelse\n  echo \"$wsDef\" | jq '{id, project_id, agent_id, status, branch, base_ref, repo_url, cwd, config}'\nfi\n```\n\n---\n\n## Step 3 — Return Output\n\n```yaml\ndomain: ops\nstatus: complete\naction: \u003Caction>\norg: \u003Corg_name>\nworkspace_id: \u003Cworkspace_id>\nworkspace_status: \u003Cstatus>\n```\n\n---\n\n## Step 4 — Brain Write (standalone only)\n\nIf `caller` is not \"command\", follow mastermind-protocol\u002FSKILL.md Brain Write Procedure for domain `ops`.\n","# Mastermind Workspace Detail\n\nThis skill is invoked directly via `\u002Fmastermind-workspace-detail`.\n\n---\n\n## Inputs\n\n- `brain_context`: BRAIN CONTEXT block (injected by command, or loaded below if standalone)\n- `org_name`: org the workspace belongs to (required)\n- `workspace_id`: execution workspace id (required)\n- `action`: show | services | provision | teardown | cleanup | runtime-logs | issues | routines | config\n- `provision_command`: shell command to provision the workspace (for config action)\n- `teardown_command`: shell command to tear down the workspace (for config action)\n- `cleanup_command`: shell command for workspace cleanup (for config action)\n- `cwd`: working directory override (for config action)\n- `repo_url`: repository URL (for config action)\n- `base_ref`: git base ref\u002Fbranch (for config action)\n- `branch_name`: branch name for the workspace (for config action)\n- `log_lines`: number of runtime log lines to show (default 50)\n- `caller`: command | master\n\n---\n\n## Workspace Tabs (mirrors ExecutionWorkspaceDetail.tsx)\n\n| Tab | Description |\n|-----|-------------|\n| `services` | Running service processes in this workspace |\n| `configuration` | Provision\u002Fteardown\u002Fcleanup commands, repo, branch, cwd |\n| `runtime_logs` | Live or recent runtime logs from workspace processes |\n| `issues` | Issues currently assigned to or running in this workspace |\n| `routines` | Routines with workspace-specific variable bindings |\n\n---\n\n## Step 0 — Brain Load (standalone only)\n\nIf `caller` is not \"command\", load brain context following mastermind-protocol\u002FSKILL.md Brain Load Procedure with namespace: `ops`.\n\n---\n\n## Step 1 — Load Workspace Data\n\n```bash\norgFile=\".monomind\u002Forgs\u002F${org_name}.json\"\n[ ! -f \"$orgFile\" ] && { echo \"ERROR: Org '${org_name}' not found.\"; exit 1; }\n\nwsFile=\".monomind\u002Forgs\u002F${org_name}-workspaces.json\"\n[ ! -f \"$wsFile\" ] && { echo \"ERROR: No workspaces file for org '$org_name'. Create workspaces via \u002Fmastermind-workspaces.\"; exit 1; }\n\nwsDef=$(jq -r --arg id \"$workspace_id\" '(.workspaces \u002F\u002F [])[] | select(.id == $id)' \"$wsFile\")\n[ -z \"$wsDef\" ] && { echo \"ERROR: Workspace '$workspace_id' not found in org '$org_name'.\"; exit 1; }\n\nissuesFile=\".monomind\u002Forgs\u002F${org_name}-issues.json\"\nroutinesFile=\".monomind\u002Forgs\u002F${org_name}-routines.json\"\nlogFile=\".monomind\u002Forgs\u002F${org_name}-workspace-logs\u002F${workspace_id}.log\"\n```\n\n---\n\n## Step 2 — Execute Action\n\n### show (default)\n\n```bash\necho \"EXECUTION WORKSPACE — $workspace_id @ $org_name\"\necho \"────────────────────────────────────────────────────────\"\n\necho \"$wsDef\" | jq -r '\n  \"  ID:              \\(.id)\",\n  \"  Project:         \\(.project_id \u002F\u002F \"(none)\")\",\n  \"  Agent:           \\(.agent_id \u002F\u002F \"(unassigned)\")\",\n  \"  Status:          \\(.status \u002F\u002F \"unknown\")\",\n  \"  Branch:          \\(.branch \u002F\u002F \"?\")\",\n  \"  Base ref:        \\(.base_ref \u002F\u002F \"?\")\",\n  \"  Repo URL:        \\(.repo_url \u002F\u002F \"(local)\")\",\n  \"  CWD:             \\(.cwd \u002F\u002F .worktree_path \u002F\u002F \"(none)\")\",\n  \"  Created:         \\(.createdAt \u002F\u002F \"-\")\",\n  \"  Last active:     \\(.lastActiveAt \u002F\u002F \"-\")\"\n'\n\n# Services\nsvcCount=$(echo \"$wsDef\" | jq -r '(.services \u002F\u002F []) | length')\necho \"\"\necho \"  Services running:  $svcCount\"\necho \"$wsDef\" | jq -r '(.services \u002F\u002F [])[] | \"    · \\(.)\"'\n\n# Config summary\nhasProvision=$(echo \"$wsDef\" | jq -r 'if .config.provisionCommand then \"yes\" else \"no\" end')\nhasTeardown=$(echo \"$wsDef\" | jq -r 'if .config.teardownCommand then \"yes\" else \"no\" end')\necho \"\"\necho \"  Provision cmd:     $hasProvision\"\necho \"  Teardown cmd:      $hasTeardown\"\n```\n\n### services\n\n```bash\necho \"SERVICES — $workspace_id\"\necho \"────────────────────────────────────────────────────────\"\n\nservices=$(echo \"$wsDef\" | jq -r '(.services \u002F\u002F [])[]')\nif [ -z \"$services\" ]; then\n  echo \"  No services running.\"\nelse\n  echo \"$wsDef\" | jq -r '.services \u002F\u002F [] | to_entries[] |\n    \"  [\\(.key)] \\(.value)\"' 2>\u002Fdev\u002Fnull || \\\n  echo \"$wsDef\" | jq -r '(.services \u002F\u002F [])[] | \"  · \\(.)\"'\nfi\n\necho \"\"\necho \"  Workspace path: $(echo \"$wsDef\" | jq -r '.worktree_path \u002F\u002F \"(none)\"')\"\necho \"  Status:         $(echo \"$wsDef\" | jq -r '.status \u002F\u002F \"unknown\"')\"\n```\n\n### provision\n\n```bash\necho \"PROVISION — $workspace_id\"\necho \"────────────────────────────────────────────────────────\"\n\nprovCmd=$(echo \"$wsDef\" | jq -r '.config.provisionCommand \u002F\u002F \"\"')\nwsPath=$(echo \"$wsDef\" | jq -r '.worktree_path \u002F\u002F .cwd \u002F\u002F \"\"')\n\nif [ -z \"$provCmd\" ]; then\n  echo \"  No provision command configured.\"\n  echo \"  Set one: --action config --provision-command 'npm install && npm run build'\"\nelse\n  echo \"  Command: $provCmd\"\n  echo \"  CWD:     $wsPath\"\n  echo \"\"\n  echo \"  To run: cd '$wsPath' && $provCmd\"\n  echo \"\"\n  if [ -d \"$wsPath\" ] && [ -n \"$provCmd\" ]; then\n    echo \"  Executing provision command…\"\n    (cd \"$wsPath\" && eval \"$provCmd\") && {\n      ts=$(date -u +%Y-%m-%dT%H:%M:%SZ)\n      tmp=\"${wsFile}.tmp\"\n      jq --arg id \"$workspace_id\" --arg ts \"$ts\" \\\n        '.workspaces = [(.workspaces \u002F\u002F [])[] | if .id == $id then .last_provisioned = $ts else . end]' \\\n        \"$wsFile\" > \"$tmp\" && mv \"$tmp\" \"$wsFile\"\n      echo \"  Provision complete.\"\n    } || echo \"  Provision command exited with error.\"\n  else\n    [ -z \"$wsPath\" ] && echo \"  ERROR: No worktree_path set — cannot execute provision command automatically.\"\n  fi\nfi\n```\n\n### teardown\n\n```bash\necho \"TEARDOWN — $workspace_id\"\necho \"────────────────────────────────────────────────────────\"\n\ntdCmd=$(echo \"$wsDef\" | jq -r '.config.teardownCommand \u002F\u002F \"\"')\nwsPath=$(echo \"$wsDef\" | jq -r '.worktree_path \u002F\u002F .cwd \u002F\u002F \"\"')\n\nif [ -z \"$tdCmd\" ]; then\n  echo \"  No teardown command configured.\"\nelse\n  echo \"  Command: $tdCmd\"\n  echo \"  CWD:     $wsPath\"\n  if [ -d \"$wsPath\" ]; then\n    echo \"  Executing teardown command…\"\n    (cd \"$wsPath\" && eval \"$tdCmd\") && echo \"  Teardown complete.\" || echo \"  Teardown command exited with error.\"\n  fi\nfi\n```\n\n### cleanup\n\n```bash\necho \"CLEANUP — $workspace_id\"\necho \"────────────────────────────────────────────────────────\"\n\ncleanCmd=$(echo \"$wsDef\" | jq -r '.config.cleanupCommand \u002F\u002F \"\"')\nwsPath=$(echo \"$wsDef\" | jq -r '.worktree_path \u002F\u002F .cwd \u002F\u002F \"\"')\n\nif [ -z \"$cleanCmd\" ]; then\n  echo \"  No cleanup command configured.\"\nelse\n  echo \"  Command: $cleanCmd\"\n  if [ -d \"$wsPath\" ]; then\n    (cd \"$wsPath\" && eval \"$cleanCmd\") && echo \"  Cleanup complete.\" || echo \"  Cleanup exited with error.\"\n  fi\nfi\n```\n\n### runtime-logs\n\n```bash\nlines=${log_lines:-50}\necho \"RUNTIME LOGS — $workspace_id (last $lines lines)\"\necho \"────────────────────────────────────────────────────────\"\n\nif [ -f \"$logFile\" ]; then\n  tail -${lines} \"$logFile\"\nelse\n  # Try workspace path stderr\u002Fstdout logs\n  wsPath=$(echo \"$wsDef\" | jq -r '.worktree_path \u002F\u002F \"\"')\n  found=false\n  for logPath in \"${wsPath}\u002F.monomind\u002Fruntime.log\" \"${wsPath}\u002Flogs\u002Fruntime.log\" \"${wsPath}\u002Foutput.log\"; do\n    if [ -f \"$logPath\" ]; then\n      tail -${lines} \"$logPath\"\n      found=true\n      break\n    fi\n  done\n  \"$found\" || echo \"  No runtime logs found. Logs are written to .monomind\u002Fworkspace-logs\u002F$workspace_id.log during runs.\"\nfi\n```\n\n### issues\n\n```bash\necho \"ISSUES — workspace: $workspace_id\"\necho \"────────────────────────────────────────────────────────\"\nprintf \"%-24s %-12s %-10s %s\\n\" \"ID\" \"STATUS\" \"PRIORITY\" \"TITLE\"\necho \"────────────────────────────────────────────────────────\"\n\nif [ ! -f \"$issuesFile\" ]; then\n  echo \"  No issues file found.\"\nelse\n  jq -r --arg wid \"$workspace_id\" '(.issues \u002F\u002F [])[] |\n    select(.workspace_id == $wid or (.assigned_workspace == $wid)) |\n    [.id, (.status \u002F\u002F \"open\"), (.priority \u002F\u002F \"medium\"), (.title \u002F\u002F \"(no title)\")] | @tsv' \\\n    \"$issuesFile\" | while IFS=$'\\t' read -r id st pri title; do\n    printf \"%-24s %-12s %-10s %s\\n\" \"$id\" \"$st\" \"$pri\" \"$title\"\n  done || echo \"  No issues assigned to this workspace.\"\nfi\n```\n\n### routines\n\n```bash\necho \"ROUTINES — workspace: $workspace_id\"\necho \"────────────────────────────────────────────────────────\"\n\nif [ ! -f \"$routinesFile\" ]; then\n  echo \"  No routines file found.\"\nelse\n  # Show routines that have workspace-specific variable bindings\n  jq -r --arg wid \"$workspace_id\" \\\n    '(.routines \u002F\u002F [])[] | select((.variables \u002F\u002F {}) | to_entries[] | .key | startswith(\"WS_\") or contains(\"workspace\")) |\n    \"\\(.id)  \\(.name \u002F\u002F \"(no name)\")  vars: \\((.variables \u002F\u002F {}) | keys | join(\", \"))\"' \\\n    \"$routinesFile\" 2>\u002Fdev\u002Fnull || echo \"  No routines with workspace-specific variables.\"\nfi\n\necho \"\"\necho \"To run a routine with workspace vars: \u002Fmastermind-routine-detail --org $org_name --routine-id \u003Cid> --action variables\"\n```\n\n### config\n\n```bash\necho \"WORKSPACE CONFIG — $workspace_id\"\necho \"────────────────────────────────────────────────────────\"\n\nif [ -n \"$provision_command\" ] || [ -n \"$teardown_command\" ] || [ -n \"$cleanup_command\" ] || \\\n   [ -n \"$cwd\" ] || [ -n \"$repo_url\" ] || [ -n \"$base_ref\" ] || [ -n \"$branch_name\" ]; then\n\n  ts=$(date -u +%Y-%m-%dT%H:%M:%SZ)\n  tmp=\"${wsFile}.tmp\"\n  jq --arg id \"$workspace_id\" \\\n     --arg prov \"${provision_command:-}\" \\\n     --arg td \"${teardown_command:-}\" \\\n     --arg clean \"${cleanup_command:-}\" \\\n     --arg cwd_ \"${cwd:-}\" \\\n     --arg repo \"${repo_url:-}\" \\\n     --arg base \"${base_ref:-}\" \\\n     --arg branch \"${branch_name:-}\" \\\n     --arg ts \"$ts\" \\\n    '.workspaces = [(.workspaces \u002F\u002F [])[] | if .id == $id then\n       if .config == null then .config = {} else . end |\n       (if $prov != \"\" then .config.provisionCommand = $prov else . end) |\n       (if $td != \"\" then .config.teardownCommand = $td else . end) |\n       (if $clean != \"\" then .config.cleanupCommand = $clean else . end) |\n       (if $cwd_ != \"\" then .cwd = $cwd_ else . end) |\n       (if $repo != \"\" then .repo_url = $repo else . end) |\n       (if $base != \"\" then .base_ref = $base else . end) |\n       (if $branch != \"\" then .branch = $branch else . end) |\n       .lastActiveAt = $ts\n     else . end]' \\\n    \"$wsFile\" > \"$tmp\" && mv \"$tmp\" \"$wsFile\"\n  echo \"Config updated for workspace '$workspace_id'.\"\nelse\n  echo \"$wsDef\" | jq '{id, project_id, agent_id, status, branch, base_ref, repo_url, cwd, config}'\nfi\n```\n\n---\n\n## Step 3 — Return Output\n\n```yaml\ndomain: ops\nstatus: complete\naction: \u003Caction>\norg: \u003Corg_name>\nworkspace_id: \u003Cworkspace_id>\nworkspace_status: \u003Cstatus>\n```\n\n---\n\n## Step 4 — Brain Write (standalone only)\n\nIf `caller` is not \"command\", follow mastermind-protocol\u002FSKILL.md Brain Write Procedure for domain `ops`.\n",{"name":5,"pick":38,"type":39,"description":7,"default_mode":40},"low","domain-skill","confirm","main","f7cd4595d0f8959822163e14f9787117765c931a",".claude\u002Fskills\u002Fmastermind-workspace-detail",2,"https:\u002F\u002Fgithub.com\u002Fmonoes\u002Fmonomind","https:\u002F\u002Fmonoes.github.io\u002Fmonomind\u002F","https:\u002F\u002Fgithub.com\u002Fmonoes","https:\u002F\u002Fmonoes.me","2026-11-10 01:53:48",{"source":8,"skillName":5,"commands":51,"prompt":61,"zipAvailable":62},[52,55,58],{"tool":53,"command":54},"npx","npx skills add monoes\u002Fmonomind --skill mastermind-workspace-detail",{"tool":56,"command":57},"bunx","bunx skills add monoes\u002Fmonomind --skill mastermind-workspace-detail",{"tool":59,"command":60},"pnpm","pnpm dlx skills add monoes\u002Fmonomind --skill mastermind-workspace-detail","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fmonoes\u002Fmonomind\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fmastermind-workspace-detail\u002FSKILL.md",true,[],[65,93,129,156,181,208],{"skillNo":66,"name":67,"nameZh":6,"description":68,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":69,"categories":70,"keywords":71,"publishedAt":92},"01M71PB3SHWKMNJM6MD65VX8D6","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.","https:\u002F\u002Fgithub.com\u002Fmonoes\u002Fmonomind\u002Fblob\u002Fmain\u002Fpackages\u002F@monomind\u002Fcli\u002Forg-skills\u002Fzk-steward\u002FSKILL.md",[],[72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91],"zk","zk steward","steward","zero-knowledge","engineer","choice","design","knowledge","impact","query","snark","review","monomind","security review","stark","zettelkasten","cryptography","security","org","blockchain","2026-11-10 13:02:02",{"skillNo":94,"name":95,"nameZh":6,"description":96,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":97,"licenseFileUrl":98,"sourceHtmlUrl":99,"categories":100,"keywords":111,"publishedAt":92},"01M71PB18SDG28WBKPKJNB814K","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.","MIT","https:\u002F\u002Fgithub.com\u002Fmonoes\u002Fmonomind\u002Fblob\u002Fmain\u002Fpackages\u002F@monomind\u002Fcli\u002Forg-skills\u002Fwriting-plans\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fmonoes\u002Fmonomind\u002Fblob\u002Fmain\u002Fpackages\u002F@monomind\u002Fcli\u002Forg-skills\u002Fwriting-plans\u002FSKILL.md",[101,106],{"categoryNo":102,"categoryName":103,"taxonomyType":104,"taxonomyTypeDesc":105},"01JBSEEDCAT000000000000018","写作与文案","SCENARIO","使用场景",{"categoryNo":107,"categoryName":108,"taxonomyType":109,"taxonomyTypeDesc":110},"01JBSEEDCAT000000000000036","内容创作者","PROFESSION","适用职业",[112,113,114,76,115,116,117,118,81,119,120,121,122,123,32,124,125,126,127,128],"writing","writing plans","plans","superpowers","implementation plan","when","you","code","tasks","plan","product","write","paths","suggest","coding","context","ZeRO",{"skillNo":130,"name":131,"nameZh":6,"description":132,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":133,"sourceHtmlUrl":134,"categories":135,"keywords":139,"publishedAt":92},"01M71PAXFM488X9ARXK0T04TF5","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.","https:\u002F\u002Fgithub.com\u002Fmonoes\u002Fmonomind\u002Fblob\u002Fmain\u002Fpackages\u002F@monomind\u002Fcli\u002Forg-skills\u002Fwrite-spec\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fmonoes\u002Fmonomind\u002Fblob\u002Fmain\u002Fpackages\u002F@monomind\u002Fcli\u002Forg-skills\u002Fwrite-spec\u002FSKILL.md",[136],{"categoryNo":137,"categoryName":138,"taxonomyType":109,"taxonomyTypeDesc":110},"01JBSEEDCAT000000000000031","产品经理",[123,140,141,142,143,79,144,117,145,146,147,122,148,149,150,151,152,153,154,155],"write spec","spec","user request","problem","acceptance","ask","vague","work","request","scoping","idea","metrics","feature","problem statement","use","document",{"skillNo":157,"name":158,"nameZh":6,"description":159,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":160,"sourceHtmlUrl":161,"categories":162,"keywords":166,"publishedAt":92},"01M71PASSZY800C0RPEARBS918","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.","https:\u002F\u002Fgithub.com\u002Fmonoes\u002Fmonomind\u002Fblob\u002Fmain\u002Fpackages\u002F@monomind\u002Fcli\u002Forg-skills\u002Fwrite-query\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fmonoes\u002Fmonomind\u002Fblob\u002Fmain\u002Fpackages\u002F@monomind\u002Fcli\u002Forg-skills\u002Fwrite-query\u002FSKILL.md",[163],{"categoryNo":164,"categoryName":165,"taxonomyType":109,"taxonomyTypeDesc":110},"01JBSEEDCAT000000000000033","数据分析师",[81,123,167,168,169,170,79,154,117,171,172,173,174,147,175,176,177,178,179,180],"write query","postgres","for","snowflake","best practices","natural-language","with","multi","github","sql","https","syntax","plugins","data",{"skillNo":182,"name":183,"nameZh":6,"description":184,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":185,"categories":186,"keywords":193,"publishedAt":92},"01M71PAPTX0T3PF6ETFVR96SJJ","workflow-automation","Org role guidance for workflow automation: build and maintain CI\u002FCD definitions in GitHub Actions or equivalent: triggers, jobs, matrices, caching. Covers path filters, dependency caching, parallel jobs, timeouts and fail-fast ordering.","https:\u002F\u002Fgithub.com\u002Fmonoes\u002Fmonomind\u002Fblob\u002Fmain\u002Fpackages\u002F@monomind\u002Fcli\u002Forg-skills\u002Fworkflow-automation\u002FSKILL.md",[187,190],{"categoryNo":188,"categoryName":189,"taxonomyType":104,"taxonomyTypeDesc":105},"01JBSEEDCAT000000000000011","运维与部署",{"categoryNo":191,"categoryName":192,"taxonomyType":104,"taxonomyTypeDesc":105},"01JBSEEDCAT000000000000023","Skill与智能体开发",[194,195,196,197,169,198,199,200,201,80,202,203,204,81,84,175,205,206,207,177],"Workflow Automation","automation","workflow","parallel","actions","ci","triggers","github actions","maintain","filters","caching","build","dependency","devops",{"skillNo":209,"name":210,"nameZh":6,"description":211,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":212,"categories":213,"keywords":215,"publishedAt":92},"01M71PAM19Z1XTV9NPCFSE2MY8","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.","https:\u002F\u002Fgithub.com\u002Fmonoes\u002Fmonomind\u002Fblob\u002Fmain\u002Fpackages\u002F@monomind\u002Fcli\u002Forg-skills\u002Fworkflow-architect\u002FSKILL.md",[214],{"categoryNo":191,"categoryName":192,"taxonomyType":104,"taxonomyTypeDesc":105},[196,216,217,218,219,220,221,169,222,223,119,224,225,226,84,175,227,228,177,229],"workflow architect","architect","trees","user journeys","branch","planning","map","workflows","architecture","state","leadership","recovery","operations","systems"]