[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M71KZ8T4XF49B91CJ1NG3KXE":3,"skill-same:01M71KZ8T4XF49B91CJ1NG3KXE":65},{"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":35,"linkOnly":36,"markdownContent":37,"markdownBody":38,"frontMatter":39,"refName":42,"commitSha":43,"skillDirectory":44,"forksCount":45,"repositoryHtmlUrl":46,"repositoryHomepageUrl":47,"ownerHtmlUrl":48,"ownerBlogUrl":49,"ownerDescription":6,"updatedAt":50,"install":51,"resources":64},"01M71KZ8T4XF49B91CJ1NG3KXE","mastermind-createorg",null,"Mastermind createorg — design an autonomous agent org and save it as `.monomind\u002Forgs\u002F\u003Cname>.json` for `monomind org run\u002Fserve`; --schedule for daemon-scheduled orgs.","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-createorg\u002FSKILL.md",[],[18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34],"mastermind createorg","save","autonomous agent","it","json","name","serve","for","domain","as","org","run","schedule","scheduled","autonomous","design","daemon","2026-11-10 10:56:23",false,"---\nname: mastermind-createorg\ndescription: \"Mastermind createorg — design an autonomous agent org and save it as `.monomind\u002Forgs\u002F\u003Cname>.json` for `monomind org run\u002Fserve`; --schedule for daemon-scheduled orgs.\"\ntype: domain-skill\ndefault_mode: confirm\n---\n\n# Mastermind Create Org\n\nThis skill is invoked by `mastermind:createorg` or directly via `\u002Fmastermind:createorg`.\n\nThe Org Runtime (`packages\u002F@monomind\u002Fcli\u002Fsrc\u002Forgrt\u002F`) is a Node daemon, not a Task-tool-spawned boss agent. Every role in the config becomes a live SDK agent session (`@anthropic-ai\u002Fclaude-agent-sdk` `query()`) the moment the org starts — there is no task board, no per-role generated `.claude\u002Fagents\u002F*.md` file, and no communication-topology array. Roles address each other directly with the `org_send` tool using their `id` (or `\u003Corg>:\u003Cid>` cross-org). This skill's only job is to produce a config that validates against `OrgDefSchema` (`packages\u002F@monomind\u002Fcli\u002Fsrc\u002Forgrt\u002Ftypes.ts`), with a structure that fits the work (Step 1b).\n\n---\n\n## Inputs\n\n- `brain_context`: BRAIN CONTEXT block (injected by command, or loaded below if standalone)\n- `prompt`: goal and\u002For role description for this org\n- `org_name`: desired name for the org (slug, e.g. `content-team`); constrained to `[a-z0-9-]`\n- `roles_desc`: optional explicit role list from user (e.g. \"boss, content writer, reviewer, marketer, designer\")\n- `schedule`: optional schedule string in daemon format — `\"\u003CN>s\"`, `\"\u003CN>m\"`, or `\"\u003CN>h\"` (e.g. `\"30m\"`, `\"2h\"`). When provided, the org is picked up by `monomind org serve` on its own interval; omit for a one-shot `monomind org run`.\n- `max_run`: optional, same format as `schedule`. See the run_config note below — always set it for a scheduled org.\n- `budget_tokens`: optional total token budget for the org run (default 1,000,000 × the number of roles — the daemon splits it evenly across roles, and a role that browses or re-reads large files needs about 1M of its own; `org validate` #23 flags less)\n- `max_run`: optional wall-clock bound on ONE scheduled cycle, same format as `schedule` (`\"90m\"`, `\"3h\"`). Defaults to the schedule interval. Set it whenever the org is scheduled: a cycle that hits this bound is force-stopped with only a 60s drain, so it should exceed how long the work actually takes, not how often you want it to run. Overrunning the interval is safe — the missed tick fires the moment the run ends rather than waiting for the next boundary.\n- `mode`: auto | confirm\n- `session_id`: session ID passed by command wrapper (snake_case input)\n- `caller`: command | master\n\n---\n\n## Step 0 — Brain Load (standalone only)\n\nIf `caller` is not \"command\" (i.e. invoked directly, not by the command wrapper), load brain context following mastermind-protocol\u002FSKILL.md Brain Load Procedure with namespace: `ops`.\n\nIf `caller` is \"command\", use the `brain_context` already provided.\n\nRun intake from `mastermind-intake\u002FSKILL.md` if `prompt` is vague (stop at Q3, domain is `ops`). Skip intake if `prompt` is a rich prompt per mastermind-intake\u002FSKILL.md criteria.\n\n---\n\n## Step 1 — Resolve Org Name\n\nIf `org_name` is not provided, extract the most prominent product\u002Fteam noun from `prompt`, slugify it (lowercase, spaces → hyphens, strip non-`[a-z0-9-]` chars), and confirm with the user. Fallback: `org-\u003CYYYYMMDD>`.\n\nReject any `org_name` that does not match `^[a-z0-9][a-z0-9-]{0,63}$` (the CLI's own `ORG_NAME_RE` in `org.ts` is slightly looser — `^[a-z0-9][a-z0-9_-]*$\u002Fi` — but this skill's stricter slug is always a valid subset).\n\n---\n\n## Step 1b — Choose the structure (before deriving roles)\n\nPick the structure from the work, then derive roles for it. The evidence below is harness-only and exploratory (one to three trials per cell, Sonnet 5.5, mechanical code-reading fixtures, harness dollars): it argues for a default and for a burden of proof, it is not a guarantee. Say so when you cite it.\n\n| The work | Structure | Measured reason |\n|---|---|---|\n| Small, or a sequential stream one capable agent can hold (a content calendar, a research note, a feature with a few steps) | **A single agent session. Do not create an org.** If the user still wants an org, make it one boss and one worker, no review layer | Growth-like: the single role cleared the same bar (27 of 27) at 3.5x to 5.5x lower cost. Eight independent modules with no binding deadline: one agent matched the teams at about a quarter of the cost. Revise fixture: one agent at about 30% of the role arms' cost. Nothing measured has beaten one agent where the deadline did not bind |\n| Many independent parts and a **deadline the single agent's serial time exceeds** | **A parallel team**: one boss and one worker per stream, each worker writing only its own files, plus a synthesiser when results must be combined. Set `run_config.max_run` and `max_concurrent_agents` to the roster size | 32 independent sheets in 600 s: the team finished 33 of 33 in 297 s, the single agent 29 of 33 in 596 s, at 3.8x to 4.8x the cost; a team without the deadline cost that multiple for nothing. Estimate the serial time first: setup about 190 s plus 14 to 30 s per part in that fixture |\n| **Correctness of the hand-offs matters** (a wrong value in one worker's output reaches the combined result and nobody downstream re-derives it) | **Sections with typed documents**: a contract per hand-off with per-answer evidence and `checks`, the runtime notifying each declared consumer on every publish (and the producer on a rejection), the consumer running `org_doc_check` before it decides, a bounded rework loop | With per-answer evidence, `doc_check` and the publish notice, a consumer caught 8 of 8 injected inconsistencies (including the wrong values that 0 of 4 caught before) and producers republished 12 of 12 times; without the notice an idle consumer read nothing and 230 s of the deadline were lost. It cost $2 to $8 more per trial, used up deadline margin, and 4 natural errors that agreed with their own evidence passed unflagged |\n\n**Sections are generally available.** A `sections:` org starts like any other org; `run_config.experimental: \"eval\"` is no longer needed (an org that still declares it keeps the harness-only start). Use them for the third row, when the hand-offs between stages need a typed, accepted, rework-capped channel. What they give: documents as the only channel between sections (`org_doc_publish`, `org_doc_read`, `org_doc_decide`), a read path the runtime enforces (a role reads only the documents it may, so a seat cannot see another seat's scorecard), schema-validated hand-offs, accept or reject by the consuming section's lead with a capped rework loop (`max_rework_rounds`), and ordering by construction (a consumer cannot read a document that is not accepted, and the run cannot complete while one is pending). What they do not give, as built: `evidence.verify` is `cited` only (`fetch` and `rerun` are not yet supported), and a contract's `checks` are a small dialect for answer-sheet documents (integer values, evidence chains), so they cannot verify claims or scores. `org validate` #21 therefore fires only for a document whose schema has a `sheets` property; give such a document `checks`, and leave `checks` off every other document. What the validator enforces: every non-root role belongs to exactly one section and reports to its section's lead; every published type is consumed by some section; `run_config.budget_usd` and `sections.\u003Cn>.budget` are not supported when a role runs on an unpriced runtime (codex, antigravity), so such an org keeps token budgets; and a runtime needs a sections isolation entry (`kilo` is refused, ten runtimes including claude, codex and antigravity are verified; see `doc\u002Fconcepts\u002Forg-runtime.md`, 6.7). Sections add overhead (measured $2 to $8 more per trial), so adding roles never justifies them by themselves; propose them only for a pipeline whose stages hand typed work to each other.\n\nRules that follow from the results:\n- Recommend a team only with a stated deadline and independent parts. Otherwise recommend the single agent and say why in one line. Adding roles never justifies sections by itself.\n- State what the evidence does not cover: natural errors that agree with their own evidence were not caught by any check; one trial per arm; the injected faults were detectable by construction.\n- An explicit `roles_desc` from the user stays authoritative (Step 2). Still tell them, in the plan, which row applies and what the checklist warns (items 19 to 21 of `org validate`: a chain of roles, a parallel team with no deadline, a document type with no checks). Warnings are advice; never block on them.\n\n## Step 1c — Roster budget (before listing roles)\n\nEvery role is a live session that pays its own startup context, and the boss spends turns briefing each one, so roles are the main cost of an org. Derive the smallest roster that does the work:\n\n- **A flat org (no sections) holds at most 4 roles**, the boss included. Past 4, organise the roles into sections.\n- **A sections org holds at most 10 sections, and a section at most 4 roles (lead included). Default to 3 roles per section.** Choose the optimal grouping, not the largest or the smallest: every section boundary adds a typed hand-off, so put adjacent stages that share a skill set or whose output the next stage would accept as a matter of course into one section of 2 to 4 roles. Give a stage its own section, even a one-role one, only when its output must be accepted before the next stage starts (an independent check, a gate, a deploy). A pipeline of many one-role sections is usually a sign of over-splitting: count the hand-offs that truly need an accept step and make that many sections.\n- **Merge before adding.** A reviewer is the executor's own checklist step unless review must be independent of the author. Two roles with overlapping skills become one. One role per tool or per file type is a sign of over-splitting.\n- Say in the Step 4 plan how many roles you cut or merged and why, and never exceed a user's explicit `roles_desc` (Step 2). `org validate` #25 warns on a flat org above 4 roles, more than 10 sections, or a section above 4 roles.\n\n---\n\n## Step 2 — Ingest Roles\n\nParse `roles_desc` (if provided) into a list of role titles. If not provided, derive a set of roles from `prompt` by identifying the human functions needed to achieve the goal.\n\n**Required roles to include when deriving roles from the prompt** (**skip this rule for persona-based orgs**, see below, where the characters themselves define the structure):\n- A coordinator\u002Fboss role that owns the goal — exactly one role with `reports_to: null`; its `responsibilities` must say it sends self-contained task briefs (a worker resumed from a task session knows nothing else; `org validate` #8)\n- At least one executor role that does the primary work\n- A reviewer role if quality output is implied\n\n**If the user provided an explicit `roles_desc`, their list is authoritative — never silently inject roles into it.** If a structural role above is missing (e.g. no coordinator), in confirm mode note the gap in the Step 4 plan as a one-line suggestion; in auto mode, create exactly the roles listed and let the first one default to boss (Step 2.2).\n\n**Step 2.1 — Assign `id`, `title`, `type`, `reports_to`.**\n\n- `id`: slug derived from title (`Content Writer` → `content-writer`)\n- `title`: display title, as given\n- `type`: `\"boss\"` for the single root role (the daemon looks for `type === 'boss' || reports_to === null`, falling back to `roles[0]` if neither matches), `\"specialist\"` for everyone else — or a domain-fit synonym like `\"reviewer\"` \u002F `\"researcher\"` purely for readability; the runtime treats `type` as free text except for the `\"boss\"` match\n- `reports_to`: the boss's `id` for direct reports, `null` only for the boss; for larger teams a middle layer can report to another non-boss role — the runtime does not enforce a shape beyond \"each role's `reports_to` must be another role's `id` or null\"\n\nExactly one role must have `reports_to: null`. If the user's role list has none, promote the first\u002Fmost senior-sounding role. If it has more than one, ask which is the root (confirm mode) or promote the first one listed (auto mode).\n\n**Step 2.2 — Persona \u002F Character Detection.**\n\nA role is **persona-based** if its title is a named real person, a well-known fictional character, or a celebrity\u002Fhistorical figure referred to by name. An org is persona-based if ≥50% of its roles are character names, or the goal\u002Fprompt contains `panel`, `debate`, `simulation`, `roleplay`, `celebrity`, `character`, `virtual [name]`, `impersonate`, `as [name]`.\n\nPersona roles work the same as any other role — there is no separate `agent_type`\u002Fsubagent registry to resolve against. Put the character depth directly into `responsibilities` (fed into the agent's role briefing by `buildRolePrompt` in `orgrt\u002Fsession.ts`, alongside the role's `skills` and `instructions_file`, if set — see Step 2.3): write 3-6 specific, voice-defining responsibilities drawn from the character's known career, positions, and communication style, not generic duties. For a living public figure, base it on documented public behavior — do not invent positions they haven't taken.\n\n**Step 2.2b — Seed each non-persona role from the agent registry.**\n\nThe project's agent registry (`.monomind\u002Fregistry.json`, the `.claude\u002Fagents\u002F**` personas) often already describes the job. For every role that is not persona-based, ask for the best-fitting registry agent with the role's title and a one-line summary of its job:\n\n```bash\nnpx monomind pick -t \"\u003Crole title>: \u003Cone-line summary of what it does>\" --agents --top 1 --json \\\n  | jq -r '.agents.ranked[0] \u002F\u002F empty | \"\\(.id)\\t\\(.description)\"'\n# Read that persona's body for concrete duties and practices:\njq -r --arg s \"\u003Cid from above>\" '.agents[] | select(.slug == $s) | .filePath' .monomind\u002Fregistry.json\n```\n\n(If the monomind MCP server in this session exposes an `mcp__monomind__pick` tool, it answers the same question; the CLI works everywhere.) When a hit genuinely fits, read its file and use it to write sharper `responsibilities` for the role — adapted to this org's goal, in your own words, never pasted wholesale; the org config has no field that links to the persona. When nothing is returned or the hit is a poor fit, write the responsibilities from the goal alone.\n\nWrite `responsibilities` that tell roles apart: `org_task` with `assignee: \"auto\"` routes each task to the role whose title and responsibilities match it best (words every role shares count for nothing), so a role whose duties are only boilerplate never gets auto-assigned work.\n\n---\n\n## Step 2.3 — Skills (pick per role from the skill library)\n\nEvery role can draw on the **org skill library**: ~380 curated skills (engineering practice, languages and frameworks, design, product, marketing, sales, finance, legal, ops, research) from monomind and MIT\u002FApache-2.0 open-source repos. For **each** role, search with its title plus its responsibilities (the ones written in Step 2.2b) and choose only from the hits — never invent a skill name, and never use slash-command names such as `mastermind:tasks`, which are not org skills:\n\n```bash\nnpx monomind org skills search \"\u003Crole title> \u003Cresponsibilities>\" --limit 8 --format json \\\n  | jq -r '.skills[] | \"\\(.name)\\t\\(.description)\"'\nnpx monomind org skills search \"landing page conversion copy\" --tag marketing\nnpx monomind org skills show \u003Cname>   # read one before choosing it\n```\n\nGive each role two fields:\n\n- **`skills`** — 1–3 skills that define the role, pinned into its system prompt for the whole run (e.g. a backend dev: `[\"backend-developer\", \"test-driven-development\", \"monograph-code-navigation\"]`). Keep this short: every pinned skill is prompt text the role pays for on every turn.\n- **`skill_pool`** — skills the role may load mid-run with `org_skill_load` when a task calls for one. Only their one-line descriptions sit in the prompt, so this can be wider: names, or `\"tag:\u003Ctag>\"` for a whole tag (e.g. `[\"systematic-debugging\", \"tag:security\"]`).\n\nMatch skills to the work, not to a vague fit: a copywriter gets marketing\u002Fwriting skills, never code skills. **Tools follow skills automatically** — a skill that declares monomind tools (`monograph_*` for code roles, `monodesign_*` for UI roles) gives its role exactly those tools, so only roles that work on software get the code graph and only UI roles get design tooling. For roles that write or review code, include `monograph-code-navigation` (and `monolean-minimal-change` for implementers); for roles that build or review web UI, include `monodesign-ui-quality`.\n\nAt run time each task dispatch names the `skill_pool` skills that fit that task, and a role can look beyond its pool with `org_skill_search` (loading stays limited to its own `skills`\u002F`skill_pool`), so a well-chosen pool matters more than a long pinned list.\n\n`ui.icon` is only the role's picture on the canvas — it has no effect on the prompt. Leave `skills` off when nothing in the library fits cleanly; `responsibilities` alone is a complete role. `org validate` fails on an unknown skill name, so the Step 5 validation is what proves every chosen name is real — fix and re-save until it passes.\n\n---\n\n## Step 2.4 — Per-Role Model and Optional Settings\n\n**Models are the newest of their family, resolved when the org runs — do not pin them.** Leave `adapter_config.model` out: a role then runs the newest default for its runtime (Sonnet on claude, Terra on codex, Flash on antigravity; `latest-models.ts`) at medium effort, and it never runs an older model than exists. A pin goes stale, and `org validate` warns when a pinned model is older than the newest in its family. Pin a model only when the user names an exact one. The Step 4 plan shows what each role will resolve to, the same as the role headers of `monomind org run \u003Corg> --dry-run`.\n\n- If the user named an exact model for a role (\"pin the researcher to claude-opus-5-5\"), pin it. If the user only named a family (\"the researcher should use Opus\"), do not pin: assign the built-in `standard` tier so the role follows the newest Opus: `\"cost_tiers\": {\"roles\": {\"\u003Crole id>\": {\"tier\": \"standard\", \"effort\": \"medium\"}}}` (built-in tiers: `standard` = newest Opus, `economy` = newest Sonnet, `budget` = newest Haiku).\n- Otherwise write no model. For reference, this is what an unpinned role resolves to (the runtime computes it; you do not write it):\n  - Claude runtime (the default — no `provider`\u002F`runtime`, or `provider.kind` `subscription` \u002F `api-key`): **`\"claude-sonnet-5-5\"`** — the newest Sonnet, the org runtime default (`defaultClaudeModel()` in `orgrt\u002Fvercel-providers.ts`, resolved by `latest-models.ts`).\n  - Any other runtime or vendor: use the value the runtime itself falls back to, read from the installed CLI package rather than from memory — `VENDOR_DEFAULTS[vendor]` (when the role has `provider.vendor`) or the `runtime` switch in `resolveModel()` (`orgrt\u002Fsession.ts`), and `VERCEL_PROVIDERS[vendor].defaultModel` (`orgrt\u002Fvercel-providers.ts`). Source files live under `packages\u002F@monomind\u002Fcli\u002Fsrc\u002Forgrt\u002F` in the source repository; in an installed package read `dist\u002Fsrc\u002Forgrt\u002Fsession.js` and `dist\u002Fsrc\u002Forgrt\u002Fvercel-providers.js`. At this release those resolve to:\n\n    | Runtime \u002F vendor | Latest model |\n    |------------------|--------------|\n    | `claude` (default), vendor `anthropic` | `claude-sonnet-5-5` |\n    | `codex` | `gpt-5.6-terra` |\n    | `antigravity` | `gemini-3.8-flash-high` |\n    | `kimicode` | `kimi-code\u002Fk3` |\n    | `opencode` (no vendor) | `glm-5.2` |\n    | `vercel` (no vendor), vendor `openai` | `gpt-5.5` |\n    | vendor `glm` \u002F `google` \u002F `xai` \u002F `deepseek` | `glm-5.2` \u002F `gemini-3.1-pro` \u002F `grok-4.5` \u002F `deepseek-chat` |\n\n    This table is the floor, not the answer: the runtime resolves the newest model of each family when it runs (`monomind agent models \u003Cruntime>` lists what a runtime offers right now), and a model is never older than the newest known one. `org validate` warns about a pin older than the newest in its family. If the source you read disagrees with this table, the source wins. For vendor `openai-compatible` there is no default (it is `''`) — ask the user for the model id.\n- A role may run a different model than its runtime's default when that fits the role (an Opus planner, a Haiku checklist reviewer): use the built-in tiers above so it stays the newest of its family. Claude Fable and GPT Astra models are never assigned or routed: `org validate` and `org run` reject any role or cost tier that names one, so never choose one, even as \"the most capable\".\n\nFor any role that needs non-default behavior, also set (all optional — omit to inherit defaults):\n\n- `provider`: `{ kind, vendor?, apiKeyEnv?, baseUrl?, authTokenEnv? }` — default `subscription` (local Claude Code login). `kind` is one of:\n  - `\"subscription\"` (default) — Claude Pro\u002FMax via `claude login`\n  - `\"api-key\"` — Anthropic API key\n  - `\"base-url\"` \u002F `\"bedrock\"` \u002F `\"vertex\"` \u002F `\"gemini\"` \u002F `\"openai\"` — legacy kinds (preserved for backward compat)\n  - `\"vercel-api-key\"` — any API-key provider via the Vercel AI SDK runner; pair with `vendor` (one of `openai`, `anthropic`, `google`, `xai`, `deepseek`, `glm`, `mistral`, `groq`, `together`, `fireworks`, `cohere`, `perplexity`, `alibaba`, `openrouter`, `ollama`, `openai-compatible`). Auto-resolves `runtime: 'vercel'`.\n  - `\"codex\"` — ChatGPT subscription via `codex login` (no env vars needed). Auto-resolves `runtime: 'codex'`.\n  - `\"antigravity\"` — Google AI Pro\u002FUltra subscription via `agy` CLI (Google OAuth in OS keyring). Auto-resolves `runtime: 'antigravity'`. This is the replacement for the consumer-OAuth path of Gemini CLI (sunset June 18, 2026).\n- `runtime`: `\"claude\"` | `\"kimicode\"` | `\"opencode\"` | `\"vercel\"` | `\"codex\"` | `\"antigravity\"` — per-role override of the agent loop backend. Usually unnecessary (auto-resolved from `provider.kind`); set explicitly only when you need to force a specific runner regardless of provider.\n- `policy`: `{ allowTools?, denyTools?, fileWrite?, fileRead?, webAllow?, autoApproveTools?, maxTokens? }` — leave the whole object unset for a role that doesn't need it (most roles). But `webAllow` unset\u002Fempty means **no web access at all**, and Bash\u002FWebFetch\u002FWebSearch\u002F`org_complete` pause for human approval by default on every call — that's a restriction, not a neutral default, so don't leave it unset for a role whose responsibilities clearly require it (e.g. a role tasked with \"gather headlines from news sources\" needs `webAllow` populated, not omitted). Set proactively, at creation time, for any role whose stated responsibilities need it:\n  - `fileWrite`\u002F`fileRead` entries: a plain path with no glob characters (`*`, `?`, `[`, `{`), e.g. `\"{{org_root}}\u002Fsite\"` (placeholders expand first) or `\"reports\"`, grants that directory **and everything beneath it**; an entry with glob characters matches only what the glob says. Relative entries resolve against the org workdir.\n  - `webAllow: [\"*\"]` (or specific domains) for a role that does WebSearch\u002FWebFetch as part of its job — an empty\u002Funset `webAllow` silently blocks the exact task you just assigned it.\n  - `fileRead`\u002F`fileWrite` must list every file the role reads or writes, including files other roles write for it (a scorer that reads `red-team.md` needs that file listed, and a role that must re-read its own output folder needs the folder). The runtime already lets a role read its own saved tool results and its own mail digests; nothing else outside the list.\n  - `denyTools: [\"Agent\", \"Task\"]` on any role that must not launch subagents or choose models for them (an org whose seats are pinned to vendors needs this on the lead). A denied tool is not listed in the role's briefing, so say in its responsibilities which common tools it lacks (\"Bash is not available; use Read and Write\"), or it tries them first and is refused.\n  - `antigravity` has no OS sandbox, and `codex`'s own sandbox confines writes to the working directory (plus the safe `policy.sandbox.allowWrite` directories) but does not restrict reads, and cannot deny a path inside a writable directory: `fileRead`\u002F`fileWrite` on those roles are a request to the model, not enforced (`org validate` #24). Do not rely on them to keep a scorer blind or out of a folder; say in the role's responsibilities what it must not read, and keep what must stay hidden out of its brief.\n  - `autoApproveTools: [...]` — tool\u002Faction names this role may use without pausing for a human approval, even though they're normally on the sensitive-actions list (`Bash`, `WebFetch`, `WebSearch`, `org_complete`). **For each role, either list or deny each of `Bash`, `WebFetch` and `WebSearch`**: list the ones its duties use, and put the rest in `policy.denyTools` (`org validate` #5 fires on any of the three left neither listed nor denied, for all roles of an unscheduled org too) (`org validate` #5 fires for an unscheduled org too, and nobody is there to answer a one-shot run either). **Mandatory without exception for any org with a `schedule` set** (an unattended\u002Fscheduled org): a role that pauses on `WebSearch` or `org_complete` waiting for a human who isn't there to click approve will deadlock forever on every scheduled run, repeatedly re-asking through both `ask_human` and `org_gate` with nothing to show for it. Grant every tool a scheduled org's roles routinely need — including `org_complete` for the boss role — rather than leaving the default human-approval gate in place for automation that's supposed to run with nobody watching.\n\nDo not invent values for these — only populate `provider`, `runtime`, or `policy` when the user actually specified or clearly implied it, or when a role's responsibilities require it (the `webAllow`\u002F`autoApproveTools` cases above).\n\n---\n\n## Step 3 — Build Org Config\n\nProduce an org config object matching `OrgDefSchema` exactly:\n\n```json\n{\n  \"name\": \"\u003Corg_name>\",\n  \"goal\": \"\u003Cthe goal the org exists to achieve>\",\n  \"status\": \"stopped\",\n  \"schedule\": \"\u003C'\u003CN>m' | '\u003CN>h' | '\u003CN>s' from Step 0 input, or null for a one-shot org>\",\n  \"run_config\": {\n    \"max_concurrent_agents\": \"\u003Cnumber of roles — an idle worker keeps its slot>\",\n    \"budget_tokens\": \"\u003Cbudget_tokens input, or 1000000 × the number of roles>\",\n    \"memory_namespace\": \"org:\u003Corg_name>\",\n    \"max_turns_per_message\": 80,\n    \"max_run\": \"\u003Chow long ONE scheduled cycle may run, e.g. '90m'. Omit only for a one-shot org (no schedule).>\"\n  },\n  \"roles\": [\n    {\n      \"id\": \"\u003Cslug>\",\n      \"title\": \"\u003Cdisplay title>\",\n      \"type\": \"boss | specialist | \u003Cdomain synonym>\",\n      \"reports_to\": \"\u003Crole id, or null for the single boss>\",\n      \"responsibilities\": [\"\u003C3-6 specific duties — this text becomes part of the agent's role briefing>\"],\n      \"skills\": [\"\u003Coptional: 1-3 library skills pinned into the briefing — Step 2.3>\"],\n      \"skill_pool\": [\"\u003Coptional: skills or tag:\u003Ctag> the role may load mid-run — Step 2.3>\"]\n    }\n  ]\n}\n```\n\n**Sections shape (when Step 1c leaves more than 4 roles).** Every non-root role belongs to exactly one section and reports to that section's lead; the root belongs to none. Add `\"requires\": {\"sections\": 1}` and `\"run_config.completion\": {\"mode\": \"boss\"}`, then:\n\n```json\n\"sections\": {\n  \"build\":  { \"lead\": \"builder\", \"members\": [\"builder\", \"fixer\"], \"publishes\": [\"build-record\"], \"max_rework_rounds\": 2 },\n  \"verify\": { \"lead\": \"qa\", \"members\": [\"qa\"], \"consumes\": [\"build-record\"], \"publishes\": [\"qa-record\"], \"max_rework_rounds\": 2 }\n},\n\"documents\": {\n  \"build-record\": { \"schema\": { \"type\": \"object\", \"required\": [\"status\"], \"properties\": { \"status\": { \"enum\": [\"PASS\", \"FAIL\"] } } }, \"evidence\": [{ \"kind\": \"command\", \"min\": 1 }], \"visibility\": \"org\", \"max_publish_attempts\": 5 }\n}\n```\n\nEach published type needs a `documents` entry, a producer and a consumer. The last section of a pipeline publishes nothing: the boss, which is in no section, closes the run after it (`org validate` warns about a type no section consumes). A single-member section leads itself. `\u002Fdoc\u002Fconcepts\u002Forg-runtime.md` section 6.7 has the full contract. Sections are the way to go past 4 roles; make each one a stage with a real typed hand-off, and merge roles that do not need one.\n\n**Efficiency defaults (every org).** Put routine workers on the cheap tier and keep the boss and any role that judges others on the default model: `\"cost_tiers\": {\"roles\": {\"\u003Cworker id>\": {\"tier\": \"economy\", \"effort\": \"low\"}, \"\u003Cboss or judge id>\": \"exempt\"}}`. Set `\"session_scope\": \"task\"` in `run_config` for workers that take independent tasks (a worker resumed per task does not carry a growing transcript), and `max_concurrent_agents` to the number of roles (an idle role keeps its slot; `org validate` #3 and the sections check reject less). Keep `budget_tokens` at the default of 1M per role: a smaller total draws #23, and the savings come from the cheap tiers, not from a tight budget. `org validate` #4 (no `budget_usd`) is advice for a Claude-only org: leave it unless the user asks for a USD ceiling, and never add `budget_usd` to a codex or antigravity role.\n\n`status` starts `\"stopped\"` regardless of whether `schedule` is set — the org does not run until `monomind org run \u003Cname>` (one-shot) or `monomind org serve` (picks up any org whose `schedule` is set) is invoked.\n\nOnly include `adapter_config` (a pinned model the user named), `provider`, `policy`, or `ui` on a role when Step 2.3\u002F2.4 populated them for it — leave them out entirely rather than writing empty objects.\n\nLeave `run_config.completion_evidence` out unless the org's roles commit code: it makes `org_task_done` demand a commit sha, which a role with no Bash cannot produce, so every task of a research org is refused and the lead has to cancel them by hand (`org validate` #22). Do not copy it from a code org such as `release`.\n\nWhen the org's roles do not commit, tell them how to close a task: in the lead's brief rule (or the role's responsibilities), \"close with `org_task_done { taskId, result }` and no `evidence`\". A Codex role otherwise attaches its own evidence shape, the strict `evidence` schema (headSha only) refuses the first close, and every task costs an extra turn.\n\n**Order a pipeline with dependencies, not with the lead's memory.** A phase that needs an artifact another step produces (a debate relay, a dossier, a rubric) must be a task that the later tasks `depends_on`, or the later tasks must be created only after the file exists. A responsibility such as \"write the relay before dispatching round 2\" is not enough: in the reputation-panel debate round the lead created all three round-2 tasks first and wrote the relay afterwards, so the scorers rescored without it and had to be re-asked.\n\n---\n\n## Step 4 — Show Plan and Confirm (confirm mode)\n\nRender the org plan in a clear human-readable format. **The model assigned to each role is the single most important thing for the user to review here** — give it its own table, not just a line buried inside each role's block, so it can't be skimmed past:\n\n```\n╔══════════════════════════════════════════════════╗\n║  ORG: \u003Corg_name>                                 ║\n║  GOAL: \u003Cgoal>                                    ║\n╚══════════════════════════════════════════════════╝\n\nMODELS  ← review this first\n────────────────────────────────────────────────────\n  ROLE                MODEL\n  ──────────────────  ────────────────────────────\n  boss                claude-sonnet-5-5 · medium\n  content-writer      claude-sonnet-5-5 · medium\n  content-reviewer    claude-sonnet-5-5 · medium\n\n  Every role shows the model and effort it will resolve to when it runs —\n  the newest of its family at medium effort unless you asked for another.\n  To put a role on a different model, say so now (e.g. \"put content-writer\n  on the newest Opus\"; that becomes the built-in `standard` tier).\n\nSTRUCTURE  (Step 1b)\n────────────────────────────────────────────────────\n  Row chosen: \u003Csingle agent | parallel team (deadline: \u003Cx>) | hand-off review (no-section alternative)>\n  Why: \u003Cone line from the measured table>   Not covered: \u003Cwhat the evidence does not show>\n\nROLES  (N roles — exactly one boss, every reports_to resolves to a real role id)\n─────\n• [boss] CEO \u002F Boss  (type: boss, reports_to: none)\n    Responsibilities: Strategic oversight, final decisions, coordinates the team via org_send\n\n• [content_writer] Content Writer  (type: specialist, reports_to: boss)\n    Responsibilities: Draft posts per the content calendar, hand off to content_reviewer\n\n  ... (all roles)\n\nSETTINGS\n────────\nBudget: \u003Crun_config.budget_tokens> tokens (split evenly across N roles)\nMax run: \u003Crun_config.max_run, or \"schedule interval\" when unset>\nMemory namespace: org:\u003Corg_name>\nSchedule: \u003C\"every \u003CN> \u003Cunit>\" if schedule set; otherwise \"manual — run with `monomind org run \u003Corg_name>`\">\n\nType \"go\" to accept (including the models above as shown), or describe changes.\n```\n\nIn **auto** mode, skip this confirmation prompt entirely — but still surface the same MODELS table, non-blocking, appended to the Step 6 save confirmation (see Step 6).\n\nIf the user requests changes, apply them and re-render. Repeat until confirmed.\n\n---\n\n## Step 5 — Save Org Config\n\n```bash\norg_name=\"\u003Cresolved org name from Step 1>\"\norgJson=\".monomind\u002Forgs\u002F${org_name}.json\"\nmkdir -p .monomind\u002Forgs\n```\n\nWrite the confirmed org config as JSON using `jq` to guarantee valid encoding:\n\n```bash\n# Set shell variables from the confirmed plan before running this block\n# (extra_json: top-level keys beyond these, e.g. sections, documents, requires, cost_tiers —\n#  a \"run_config\" object here is merged into the one below, so session_scope and completion go in it).\nextra_json=${extra_json:-'{}'}\n# Other variables:\n#   goal, schedule_val (\"\" if none), budget_tokens_val, max_run_val (\"\" if none),\n#   roles_json (JSON array matching the role shape above)\njq -n \\\n  --arg name \"$org_name\" \\\n  --arg goal \"$goal\" \\\n  --arg schedule \"${schedule_val:-}\" \\\n  --argjson budget_tokens \"${budget_tokens_val:-$(( $(jq length \u003C\u003C\u003C\"$roles_json\") * 1000000 ))}\" \\\n  --arg max_run \"${max_run_val:-}\" \\\n  --argjson roles \"$roles_json\" \\\n  --argjson extra \"$extra_json\" \\\n  '{name:$name,goal:$goal,status:\"stopped\",\n    schedule:(if $schedule==\"\" then null else $schedule end),\n    run_config:({max_concurrent_agents:($roles|length),budget_tokens:$budget_tokens,\n                 memory_namespace:(\"org:\"+$name),max_turns_per_message:80}\n                + (if $max_run==\"\" then {} else {max_run:$max_run} end)),\n    roles:$roles} * $extra' \\\n  > \"${orgJson}.tmp\" && mv \"${orgJson}.tmp\" \"$orgJson\"\n```\n\n**POST-SAVE VALIDATION (run immediately after saving — abort if it fails):**\n\n```bash\n# Parses with OrgDefSchema (the exact code path org run\u002Fserve use) and checks the\n# structural invariants: exactly one root role, every reports_to resolves, unique\n# role ids, parseable schedule, name\u002Ffilename agreement.\nif npx -y monomind@latest org validate \"$org_name\"; then\n  echo \"✓ Org config validated — ready for: monomind org run ${org_name}\"\nelse\n  # CLI \u003C 2.1.8 has no `org validate` — fall back to the two structural checks:\n  root_count=$(jq '[.roles[] | select(.reports_to == null)] | length' \"$orgJson\")\n  bad_reports=$(jq -r '([.roles[].id]) as $ids |\n    [.roles[] | select(.reports_to != null and (.reports_to as $r | $ids | index($r) | not)) | .id] | join(\", \")' \"$orgJson\")\n  if [ \"$root_count\" -ne 1 ] || [ -n \"$bad_reports\" ]; then\n    echo \"ERROR: org config invalid (roots: $root_count, unresolved reports_to: ${bad_reports:-none}) — fix the roles array and re-save.\"\n    exit 1\n  fi\n  echo \"✓ Structural checks passed (upgrade monomind for full schema validation)\"\nfi\n\n# Review for signing (#502): the runtime refuses to start or reload an org\n# definition the operator has not signed. Without a terminal this prints the\n# full review (each role's runtime, access level, tools, skills,\n# instructions_file and sandbox, the org's prechecks, and any role that would\n# run unconfined) and signs nothing. It exits non-zero by design.\nnpx -y monomind@latest org sign \"$org_name\" || true\n```\n\nShow the user that review verbatim, then tell them to sign the org themselves in their own terminal after reading it: `monomind org sign \u003Corg_name>`. Do not sign it for them (never pass `--yes`): the signature is the operator's approval of what the roles may do.\n\nAfter any later edit to a role's `policy`, `skills`, `instructions_file`, the roles, runtimes, `schedule` or `run_config`, the org must be signed again (`monomind org sign \u003Corg_name>`) before `org run`, `org reload` or `org serve` will use the change.\n\n---\n\n## Step 6 — Return Output\n\n```yaml\ndomain: ops\nstatus: complete\nartifacts:\n  - path: .monomind\u002Forgs\u002F\u003Corg_name>.json\n    type: config\ndecisions:\n  - what: \"Org \u003Corg_name> created with N roles\"\n    why: \"Role mapping derived from goal and user description\"\n    confidence: 0.85\n    outcome: shipped\nlessons:\n  - what_worked: \"Auto-suggested roles matched user intent\"\n  - what_didnt: \"\"\nnext_actions:\n  - \"Run `monomind org run \u003Corg_name>` to start the organization in the foreground (add --dry-run to preview each role's briefing first)\"\n  - \"After hand-editing the config, re-check it with `monomind org validate \u003Corg_name>`\"\n  - \"While running: `monomind org logs \u003Corg_name> --follow`; afterwards: `monomind org report \u003Corg_name>` for outcome, per-role activity, and token usage\"\n  - \"Or `monomind org serve` to host it (and any other scheduled orgs) as a background daemon\"\n  - \"Edit .monomind\u002Forgs\u002F\u003Corg_name>.json directly, or use \u002Fmastermind-org-settings, to change goal\u002Fbudget\u002Froles\"\n  - \"`monomind org status \u003Corg_name>` to check runtime state; `monomind org stop \u003Corg_name>` to stop a running org\"\n```\n\nPrint confirmation:\n```\n✓ Org \"\u003Corg_name>\" saved to .monomind\u002Forgs\u002F\u003Corg_name>.json\n  → Run: monomind org run \u003Corg_name>\n```\n\nIf `schedule` was set, also print:\n```\n  Schedule: every \u003CN> \u003Cunit> — pick it up with: monomind org serve\n```\n\nIn **auto** mode (where Step 4's plan\u002Fmodel confirmation was skipped), always also print the models table so the user still sees — after the fact — what each role will run on, even though nothing blocked on it:\n```\n  Models:\n    boss                claude-sonnet-5\n    content-writer      claude-sonnet-5\n    content-reviewer    claude-sonnet-5\n  Adjust with: \u002Fmastermind-org-settings, or edit .monomind\u002Forgs\u002F\u003Corg_name>.json directly\n```\nIn **confirm** mode this table was already shown and accepted in Step 4 — do not repeat it here.\n\n---\n\n## Step 7 — Brain Write (standalone only)\n\nIf `caller` is not \"command\", follow mastermind-protocol\u002FSKILL.md Brain Write Procedure for domain `ops`.\n","# Mastermind Create Org\n\nThis skill is invoked by `mastermind:createorg` or directly via `\u002Fmastermind:createorg`.\n\nThe Org Runtime (`packages\u002F@monomind\u002Fcli\u002Fsrc\u002Forgrt\u002F`) is a Node daemon, not a Task-tool-spawned boss agent. Every role in the config becomes a live SDK agent session (`@anthropic-ai\u002Fclaude-agent-sdk` `query()`) the moment the org starts — there is no task board, no per-role generated `.claude\u002Fagents\u002F*.md` file, and no communication-topology array. Roles address each other directly with the `org_send` tool using their `id` (or `\u003Corg>:\u003Cid>` cross-org). This skill's only job is to produce a config that validates against `OrgDefSchema` (`packages\u002F@monomind\u002Fcli\u002Fsrc\u002Forgrt\u002Ftypes.ts`), with a structure that fits the work (Step 1b).\n\n---\n\n## Inputs\n\n- `brain_context`: BRAIN CONTEXT block (injected by command, or loaded below if standalone)\n- `prompt`: goal and\u002For role description for this org\n- `org_name`: desired name for the org (slug, e.g. `content-team`); constrained to `[a-z0-9-]`\n- `roles_desc`: optional explicit role list from user (e.g. \"boss, content writer, reviewer, marketer, designer\")\n- `schedule`: optional schedule string in daemon format — `\"\u003CN>s\"`, `\"\u003CN>m\"`, or `\"\u003CN>h\"` (e.g. `\"30m\"`, `\"2h\"`). When provided, the org is picked up by `monomind org serve` on its own interval; omit for a one-shot `monomind org run`.\n- `max_run`: optional, same format as `schedule`. See the run_config note below — always set it for a scheduled org.\n- `budget_tokens`: optional total token budget for the org run (default 1,000,000 × the number of roles — the daemon splits it evenly across roles, and a role that browses or re-reads large files needs about 1M of its own; `org validate` #23 flags less)\n- `max_run`: optional wall-clock bound on ONE scheduled cycle, same format as `schedule` (`\"90m\"`, `\"3h\"`). Defaults to the schedule interval. Set it whenever the org is scheduled: a cycle that hits this bound is force-stopped with only a 60s drain, so it should exceed how long the work actually takes, not how often you want it to run. Overrunning the interval is safe — the missed tick fires the moment the run ends rather than waiting for the next boundary.\n- `mode`: auto | confirm\n- `session_id`: session ID passed by command wrapper (snake_case input)\n- `caller`: command | master\n\n---\n\n## Step 0 — Brain Load (standalone only)\n\nIf `caller` is not \"command\" (i.e. invoked directly, not by the command wrapper), load brain context following mastermind-protocol\u002FSKILL.md Brain Load Procedure with namespace: `ops`.\n\nIf `caller` is \"command\", use the `brain_context` already provided.\n\nRun intake from `mastermind-intake\u002FSKILL.md` if `prompt` is vague (stop at Q3, domain is `ops`). Skip intake if `prompt` is a rich prompt per mastermind-intake\u002FSKILL.md criteria.\n\n---\n\n## Step 1 — Resolve Org Name\n\nIf `org_name` is not provided, extract the most prominent product\u002Fteam noun from `prompt`, slugify it (lowercase, spaces → hyphens, strip non-`[a-z0-9-]` chars), and confirm with the user. Fallback: `org-\u003CYYYYMMDD>`.\n\nReject any `org_name` that does not match `^[a-z0-9][a-z0-9-]{0,63}$` (the CLI's own `ORG_NAME_RE` in `org.ts` is slightly looser — `^[a-z0-9][a-z0-9_-]*$\u002Fi` — but this skill's stricter slug is always a valid subset).\n\n---\n\n## Step 1b — Choose the structure (before deriving roles)\n\nPick the structure from the work, then derive roles for it. The evidence below is harness-only and exploratory (one to three trials per cell, Sonnet 5.5, mechanical code-reading fixtures, harness dollars): it argues for a default and for a burden of proof, it is not a guarantee. Say so when you cite it.\n\n| The work | Structure | Measured reason |\n|---|---|---|\n| Small, or a sequential stream one capable agent can hold (a content calendar, a research note, a feature with a few steps) | **A single agent session. Do not create an org.** If the user still wants an org, make it one boss and one worker, no review layer | Growth-like: the single role cleared the same bar (27 of 27) at 3.5x to 5.5x lower cost. Eight independent modules with no binding deadline: one agent matched the teams at about a quarter of the cost. Revise fixture: one agent at about 30% of the role arms' cost. Nothing measured has beaten one agent where the deadline did not bind |\n| Many independent parts and a **deadline the single agent's serial time exceeds** | **A parallel team**: one boss and one worker per stream, each worker writing only its own files, plus a synthesiser when results must be combined. Set `run_config.max_run` and `max_concurrent_agents` to the roster size | 32 independent sheets in 600 s: the team finished 33 of 33 in 297 s, the single agent 29 of 33 in 596 s, at 3.8x to 4.8x the cost; a team without the deadline cost that multiple for nothing. Estimate the serial time first: setup about 190 s plus 14 to 30 s per part in that fixture |\n| **Correctness of the hand-offs matters** (a wrong value in one worker's output reaches the combined result and nobody downstream re-derives it) | **Sections with typed documents**: a contract per hand-off with per-answer evidence and `checks`, the runtime notifying each declared consumer on every publish (and the producer on a rejection), the consumer running `org_doc_check` before it decides, a bounded rework loop | With per-answer evidence, `doc_check` and the publish notice, a consumer caught 8 of 8 injected inconsistencies (including the wrong values that 0 of 4 caught before) and producers republished 12 of 12 times; without the notice an idle consumer read nothing and 230 s of the deadline were lost. It cost $2 to $8 more per trial, used up deadline margin, and 4 natural errors that agreed with their own evidence passed unflagged |\n\n**Sections are generally available.** A `sections:` org starts like any other org; `run_config.experimental: \"eval\"` is no longer needed (an org that still declares it keeps the harness-only start). Use them for the third row, when the hand-offs between stages need a typed, accepted, rework-capped channel. What they give: documents as the only channel between sections (`org_doc_publish`, `org_doc_read`, `org_doc_decide`), a read path the runtime enforces (a role reads only the documents it may, so a seat cannot see another seat's scorecard), schema-validated hand-offs, accept or reject by the consuming section's lead with a capped rework loop (`max_rework_rounds`), and ordering by construction (a consumer cannot read a document that is not accepted, and the run cannot complete while one is pending). What they do not give, as built: `evidence.verify` is `cited` only (`fetch` and `rerun` are not yet supported), and a contract's `checks` are a small dialect for answer-sheet documents (integer values, evidence chains), so they cannot verify claims or scores. `org validate` #21 therefore fires only for a document whose schema has a `sheets` property; give such a document `checks`, and leave `checks` off every other document. What the validator enforces: every non-root role belongs to exactly one section and reports to its section's lead; every published type is consumed by some section; `run_config.budget_usd` and `sections.\u003Cn>.budget` are not supported when a role runs on an unpriced runtime (codex, antigravity), so such an org keeps token budgets; and a runtime needs a sections isolation entry (`kilo` is refused, ten runtimes including claude, codex and antigravity are verified; see `doc\u002Fconcepts\u002Forg-runtime.md`, 6.7). Sections add overhead (measured $2 to $8 more per trial), so adding roles never justifies them by themselves; propose them only for a pipeline whose stages hand typed work to each other.\n\nRules that follow from the results:\n- Recommend a team only with a stated deadline and independent parts. Otherwise recommend the single agent and say why in one line. Adding roles never justifies sections by itself.\n- State what the evidence does not cover: natural errors that agree with their own evidence were not caught by any check; one trial per arm; the injected faults were detectable by construction.\n- An explicit `roles_desc` from the user stays authoritative (Step 2). Still tell them, in the plan, which row applies and what the checklist warns (items 19 to 21 of `org validate`: a chain of roles, a parallel team with no deadline, a document type with no checks). Warnings are advice; never block on them.\n\n## Step 1c — Roster budget (before listing roles)\n\nEvery role is a live session that pays its own startup context, and the boss spends turns briefing each one, so roles are the main cost of an org. Derive the smallest roster that does the work:\n\n- **A flat org (no sections) holds at most 4 roles**, the boss included. Past 4, organise the roles into sections.\n- **A sections org holds at most 10 sections, and a section at most 4 roles (lead included). Default to 3 roles per section.** Choose the optimal grouping, not the largest or the smallest: every section boundary adds a typed hand-off, so put adjacent stages that share a skill set or whose output the next stage would accept as a matter of course into one section of 2 to 4 roles. Give a stage its own section, even a one-role one, only when its output must be accepted before the next stage starts (an independent check, a gate, a deploy). A pipeline of many one-role sections is usually a sign of over-splitting: count the hand-offs that truly need an accept step and make that many sections.\n- **Merge before adding.** A reviewer is the executor's own checklist step unless review must be independent of the author. Two roles with overlapping skills become one. One role per tool or per file type is a sign of over-splitting.\n- Say in the Step 4 plan how many roles you cut or merged and why, and never exceed a user's explicit `roles_desc` (Step 2). `org validate` #25 warns on a flat org above 4 roles, more than 10 sections, or a section above 4 roles.\n\n---\n\n## Step 2 — Ingest Roles\n\nParse `roles_desc` (if provided) into a list of role titles. If not provided, derive a set of roles from `prompt` by identifying the human functions needed to achieve the goal.\n\n**Required roles to include when deriving roles from the prompt** (**skip this rule for persona-based orgs**, see below, where the characters themselves define the structure):\n- A coordinator\u002Fboss role that owns the goal — exactly one role with `reports_to: null`; its `responsibilities` must say it sends self-contained task briefs (a worker resumed from a task session knows nothing else; `org validate` #8)\n- At least one executor role that does the primary work\n- A reviewer role if quality output is implied\n\n**If the user provided an explicit `roles_desc`, their list is authoritative — never silently inject roles into it.** If a structural role above is missing (e.g. no coordinator), in confirm mode note the gap in the Step 4 plan as a one-line suggestion; in auto mode, create exactly the roles listed and let the first one default to boss (Step 2.2).\n\n**Step 2.1 — Assign `id`, `title`, `type`, `reports_to`.**\n\n- `id`: slug derived from title (`Content Writer` → `content-writer`)\n- `title`: display title, as given\n- `type`: `\"boss\"` for the single root role (the daemon looks for `type === 'boss' || reports_to === null`, falling back to `roles[0]` if neither matches), `\"specialist\"` for everyone else — or a domain-fit synonym like `\"reviewer\"` \u002F `\"researcher\"` purely for readability; the runtime treats `type` as free text except for the `\"boss\"` match\n- `reports_to`: the boss's `id` for direct reports, `null` only for the boss; for larger teams a middle layer can report to another non-boss role — the runtime does not enforce a shape beyond \"each role's `reports_to` must be another role's `id` or null\"\n\nExactly one role must have `reports_to: null`. If the user's role list has none, promote the first\u002Fmost senior-sounding role. If it has more than one, ask which is the root (confirm mode) or promote the first one listed (auto mode).\n\n**Step 2.2 — Persona \u002F Character Detection.**\n\nA role is **persona-based** if its title is a named real person, a well-known fictional character, or a celebrity\u002Fhistorical figure referred to by name. An org is persona-based if ≥50% of its roles are character names, or the goal\u002Fprompt contains `panel`, `debate`, `simulation`, `roleplay`, `celebrity`, `character`, `virtual [name]`, `impersonate`, `as [name]`.\n\nPersona roles work the same as any other role — there is no separate `agent_type`\u002Fsubagent registry to resolve against. Put the character depth directly into `responsibilities` (fed into the agent's role briefing by `buildRolePrompt` in `orgrt\u002Fsession.ts`, alongside the role's `skills` and `instructions_file`, if set — see Step 2.3): write 3-6 specific, voice-defining responsibilities drawn from the character's known career, positions, and communication style, not generic duties. For a living public figure, base it on documented public behavior — do not invent positions they haven't taken.\n\n**Step 2.2b — Seed each non-persona role from the agent registry.**\n\nThe project's agent registry (`.monomind\u002Fregistry.json`, the `.claude\u002Fagents\u002F**` personas) often already describes the job. For every role that is not persona-based, ask for the best-fitting registry agent with the role's title and a one-line summary of its job:\n\n```bash\nnpx monomind pick -t \"\u003Crole title>: \u003Cone-line summary of what it does>\" --agents --top 1 --json \\\n  | jq -r '.agents.ranked[0] \u002F\u002F empty | \"\\(.id)\\t\\(.description)\"'\n# Read that persona's body for concrete duties and practices:\njq -r --arg s \"\u003Cid from above>\" '.agents[] | select(.slug == $s) | .filePath' .monomind\u002Fregistry.json\n```\n\n(If the monomind MCP server in this session exposes an `mcp__monomind__pick` tool, it answers the same question; the CLI works everywhere.) When a hit genuinely fits, read its file and use it to write sharper `responsibilities` for the role — adapted to this org's goal, in your own words, never pasted wholesale; the org config has no field that links to the persona. When nothing is returned or the hit is a poor fit, write the responsibilities from the goal alone.\n\nWrite `responsibilities` that tell roles apart: `org_task` with `assignee: \"auto\"` routes each task to the role whose title and responsibilities match it best (words every role shares count for nothing), so a role whose duties are only boilerplate never gets auto-assigned work.\n\n---\n\n## Step 2.3 — Skills (pick per role from the skill library)\n\nEvery role can draw on the **org skill library**: ~380 curated skills (engineering practice, languages and frameworks, design, product, marketing, sales, finance, legal, ops, research) from monomind and MIT\u002FApache-2.0 open-source repos. For **each** role, search with its title plus its responsibilities (the ones written in Step 2.2b) and choose only from the hits — never invent a skill name, and never use slash-command names such as `mastermind:tasks`, which are not org skills:\n\n```bash\nnpx monomind org skills search \"\u003Crole title> \u003Cresponsibilities>\" --limit 8 --format json \\\n  | jq -r '.skills[] | \"\\(.name)\\t\\(.description)\"'\nnpx monomind org skills search \"landing page conversion copy\" --tag marketing\nnpx monomind org skills show \u003Cname>   # read one before choosing it\n```\n\nGive each role two fields:\n\n- **`skills`** — 1–3 skills that define the role, pinned into its system prompt for the whole run (e.g. a backend dev: `[\"backend-developer\", \"test-driven-development\", \"monograph-code-navigation\"]`). Keep this short: every pinned skill is prompt text the role pays for on every turn.\n- **`skill_pool`** — skills the role may load mid-run with `org_skill_load` when a task calls for one. Only their one-line descriptions sit in the prompt, so this can be wider: names, or `\"tag:\u003Ctag>\"` for a whole tag (e.g. `[\"systematic-debugging\", \"tag:security\"]`).\n\nMatch skills to the work, not to a vague fit: a copywriter gets marketing\u002Fwriting skills, never code skills. **Tools follow skills automatically** — a skill that declares monomind tools (`monograph_*` for code roles, `monodesign_*` for UI roles) gives its role exactly those tools, so only roles that work on software get the code graph and only UI roles get design tooling. For roles that write or review code, include `monograph-code-navigation` (and `monolean-minimal-change` for implementers); for roles that build or review web UI, include `monodesign-ui-quality`.\n\nAt run time each task dispatch names the `skill_pool` skills that fit that task, and a role can look beyond its pool with `org_skill_search` (loading stays limited to its own `skills`\u002F`skill_pool`), so a well-chosen pool matters more than a long pinned list.\n\n`ui.icon` is only the role's picture on the canvas — it has no effect on the prompt. Leave `skills` off when nothing in the library fits cleanly; `responsibilities` alone is a complete role. `org validate` fails on an unknown skill name, so the Step 5 validation is what proves every chosen name is real — fix and re-save until it passes.\n\n---\n\n## Step 2.4 — Per-Role Model and Optional Settings\n\n**Models are the newest of their family, resolved when the org runs — do not pin them.** Leave `adapter_config.model` out: a role then runs the newest default for its runtime (Sonnet on claude, Terra on codex, Flash on antigravity; `latest-models.ts`) at medium effort, and it never runs an older model than exists. A pin goes stale, and `org validate` warns when a pinned model is older than the newest in its family. Pin a model only when the user names an exact one. The Step 4 plan shows what each role will resolve to, the same as the role headers of `monomind org run \u003Corg> --dry-run`.\n\n- If the user named an exact model for a role (\"pin the researcher to claude-opus-5-5\"), pin it. If the user only named a family (\"the researcher should use Opus\"), do not pin: assign the built-in `standard` tier so the role follows the newest Opus: `\"cost_tiers\": {\"roles\": {\"\u003Crole id>\": {\"tier\": \"standard\", \"effort\": \"medium\"}}}` (built-in tiers: `standard` = newest Opus, `economy` = newest Sonnet, `budget` = newest Haiku).\n- Otherwise write no model. For reference, this is what an unpinned role resolves to (the runtime computes it; you do not write it):\n  - Claude runtime (the default — no `provider`\u002F`runtime`, or `provider.kind` `subscription` \u002F `api-key`): **`\"claude-sonnet-5-5\"`** — the newest Sonnet, the org runtime default (`defaultClaudeModel()` in `orgrt\u002Fvercel-providers.ts`, resolved by `latest-models.ts`).\n  - Any other runtime or vendor: use the value the runtime itself falls back to, read from the installed CLI package rather than from memory — `VENDOR_DEFAULTS[vendor]` (when the role has `provider.vendor`) or the `runtime` switch in `resolveModel()` (`orgrt\u002Fsession.ts`), and `VERCEL_PROVIDERS[vendor].defaultModel` (`orgrt\u002Fvercel-providers.ts`). Source files live under `packages\u002F@monomind\u002Fcli\u002Fsrc\u002Forgrt\u002F` in the source repository; in an installed package read `dist\u002Fsrc\u002Forgrt\u002Fsession.js` and `dist\u002Fsrc\u002Forgrt\u002Fvercel-providers.js`. At this release those resolve to:\n\n    | Runtime \u002F vendor | Latest model |\n    |------------------|--------------|\n    | `claude` (default), vendor `anthropic` | `claude-sonnet-5-5` |\n    | `codex` | `gpt-5.6-terra` |\n    | `antigravity` | `gemini-3.8-flash-high` |\n    | `kimicode` | `kimi-code\u002Fk3` |\n    | `opencode` (no vendor) | `glm-5.2` |\n    | `vercel` (no vendor), vendor `openai` | `gpt-5.5` |\n    | vendor `glm` \u002F `google` \u002F `xai` \u002F `deepseek` | `glm-5.2` \u002F `gemini-3.1-pro` \u002F `grok-4.5` \u002F `deepseek-chat` |\n\n    This table is the floor, not the answer: the runtime resolves the newest model of each family when it runs (`monomind agent models \u003Cruntime>` lists what a runtime offers right now), and a model is never older than the newest known one. `org validate` warns about a pin older than the newest in its family. If the source you read disagrees with this table, the source wins. For vendor `openai-compatible` there is no default (it is `''`) — ask the user for the model id.\n- A role may run a different model than its runtime's default when that fits the role (an Opus planner, a Haiku checklist reviewer): use the built-in tiers above so it stays the newest of its family. Claude Fable and GPT Astra models are never assigned or routed: `org validate` and `org run` reject any role or cost tier that names one, so never choose one, even as \"the most capable\".\n\nFor any role that needs non-default behavior, also set (all optional — omit to inherit defaults):\n\n- `provider`: `{ kind, vendor?, apiKeyEnv?, baseUrl?, authTokenEnv? }` — default `subscription` (local Claude Code login). `kind` is one of:\n  - `\"subscription\"` (default) — Claude Pro\u002FMax via `claude login`\n  - `\"api-key\"` — Anthropic API key\n  - `\"base-url\"` \u002F `\"bedrock\"` \u002F `\"vertex\"` \u002F `\"gemini\"` \u002F `\"openai\"` — legacy kinds (preserved for backward compat)\n  - `\"vercel-api-key\"` — any API-key provider via the Vercel AI SDK runner; pair with `vendor` (one of `openai`, `anthropic`, `google`, `xai`, `deepseek`, `glm`, `mistral`, `groq`, `together`, `fireworks`, `cohere`, `perplexity`, `alibaba`, `openrouter`, `ollama`, `openai-compatible`). Auto-resolves `runtime: 'vercel'`.\n  - `\"codex\"` — ChatGPT subscription via `codex login` (no env vars needed). Auto-resolves `runtime: 'codex'`.\n  - `\"antigravity\"` — Google AI Pro\u002FUltra subscription via `agy` CLI (Google OAuth in OS keyring). Auto-resolves `runtime: 'antigravity'`. This is the replacement for the consumer-OAuth path of Gemini CLI (sunset June 18, 2026).\n- `runtime`: `\"claude\"` | `\"kimicode\"` | `\"opencode\"` | `\"vercel\"` | `\"codex\"` | `\"antigravity\"` — per-role override of the agent loop backend. Usually unnecessary (auto-resolved from `provider.kind`); set explicitly only when you need to force a specific runner regardless of provider.\n- `policy`: `{ allowTools?, denyTools?, fileWrite?, fileRead?, webAllow?, autoApproveTools?, maxTokens? }` — leave the whole object unset for a role that doesn't need it (most roles). But `webAllow` unset\u002Fempty means **no web access at all**, and Bash\u002FWebFetch\u002FWebSearch\u002F`org_complete` pause for human approval by default on every call — that's a restriction, not a neutral default, so don't leave it unset for a role whose responsibilities clearly require it (e.g. a role tasked with \"gather headlines from news sources\" needs `webAllow` populated, not omitted). Set proactively, at creation time, for any role whose stated responsibilities need it:\n  - `fileWrite`\u002F`fileRead` entries: a plain path with no glob characters (`*`, `?`, `[`, `{`), e.g. `\"{{org_root}}\u002Fsite\"` (placeholders expand first) or `\"reports\"`, grants that directory **and everything beneath it**; an entry with glob characters matches only what the glob says. Relative entries resolve against the org workdir.\n  - `webAllow: [\"*\"]` (or specific domains) for a role that does WebSearch\u002FWebFetch as part of its job — an empty\u002Funset `webAllow` silently blocks the exact task you just assigned it.\n  - `fileRead`\u002F`fileWrite` must list every file the role reads or writes, including files other roles write for it (a scorer that reads `red-team.md` needs that file listed, and a role that must re-read its own output folder needs the folder). The runtime already lets a role read its own saved tool results and its own mail digests; nothing else outside the list.\n  - `denyTools: [\"Agent\", \"Task\"]` on any role that must not launch subagents or choose models for them (an org whose seats are pinned to vendors needs this on the lead). A denied tool is not listed in the role's briefing, so say in its responsibilities which common tools it lacks (\"Bash is not available; use Read and Write\"), or it tries them first and is refused.\n  - `antigravity` has no OS sandbox, and `codex`'s own sandbox confines writes to the working directory (plus the safe `policy.sandbox.allowWrite` directories) but does not restrict reads, and cannot deny a path inside a writable directory: `fileRead`\u002F`fileWrite` on those roles are a request to the model, not enforced (`org validate` #24). Do not rely on them to keep a scorer blind or out of a folder; say in the role's responsibilities what it must not read, and keep what must stay hidden out of its brief.\n  - `autoApproveTools: [...]` — tool\u002Faction names this role may use without pausing for a human approval, even though they're normally on the sensitive-actions list (`Bash`, `WebFetch`, `WebSearch`, `org_complete`). **For each role, either list or deny each of `Bash`, `WebFetch` and `WebSearch`**: list the ones its duties use, and put the rest in `policy.denyTools` (`org validate` #5 fires on any of the three left neither listed nor denied, for all roles of an unscheduled org too) (`org validate` #5 fires for an unscheduled org too, and nobody is there to answer a one-shot run either). **Mandatory without exception for any org with a `schedule` set** (an unattended\u002Fscheduled org): a role that pauses on `WebSearch` or `org_complete` waiting for a human who isn't there to click approve will deadlock forever on every scheduled run, repeatedly re-asking through both `ask_human` and `org_gate` with nothing to show for it. Grant every tool a scheduled org's roles routinely need — including `org_complete` for the boss role — rather than leaving the default human-approval gate in place for automation that's supposed to run with nobody watching.\n\nDo not invent values for these — only populate `provider`, `runtime`, or `policy` when the user actually specified or clearly implied it, or when a role's responsibilities require it (the `webAllow`\u002F`autoApproveTools` cases above).\n\n---\n\n## Step 3 — Build Org Config\n\nProduce an org config object matching `OrgDefSchema` exactly:\n\n```json\n{\n  \"name\": \"\u003Corg_name>\",\n  \"goal\": \"\u003Cthe goal the org exists to achieve>\",\n  \"status\": \"stopped\",\n  \"schedule\": \"\u003C'\u003CN>m' | '\u003CN>h' | '\u003CN>s' from Step 0 input, or null for a one-shot org>\",\n  \"run_config\": {\n    \"max_concurrent_agents\": \"\u003Cnumber of roles — an idle worker keeps its slot>\",\n    \"budget_tokens\": \"\u003Cbudget_tokens input, or 1000000 × the number of roles>\",\n    \"memory_namespace\": \"org:\u003Corg_name>\",\n    \"max_turns_per_message\": 80,\n    \"max_run\": \"\u003Chow long ONE scheduled cycle may run, e.g. '90m'. Omit only for a one-shot org (no schedule).>\"\n  },\n  \"roles\": [\n    {\n      \"id\": \"\u003Cslug>\",\n      \"title\": \"\u003Cdisplay title>\",\n      \"type\": \"boss | specialist | \u003Cdomain synonym>\",\n      \"reports_to\": \"\u003Crole id, or null for the single boss>\",\n      \"responsibilities\": [\"\u003C3-6 specific duties — this text becomes part of the agent's role briefing>\"],\n      \"skills\": [\"\u003Coptional: 1-3 library skills pinned into the briefing — Step 2.3>\"],\n      \"skill_pool\": [\"\u003Coptional: skills or tag:\u003Ctag> the role may load mid-run — Step 2.3>\"]\n    }\n  ]\n}\n```\n\n**Sections shape (when Step 1c leaves more than 4 roles).** Every non-root role belongs to exactly one section and reports to that section's lead; the root belongs to none. Add `\"requires\": {\"sections\": 1}` and `\"run_config.completion\": {\"mode\": \"boss\"}`, then:\n\n```json\n\"sections\": {\n  \"build\":  { \"lead\": \"builder\", \"members\": [\"builder\", \"fixer\"], \"publishes\": [\"build-record\"], \"max_rework_rounds\": 2 },\n  \"verify\": { \"lead\": \"qa\", \"members\": [\"qa\"], \"consumes\": [\"build-record\"], \"publishes\": [\"qa-record\"], \"max_rework_rounds\": 2 }\n},\n\"documents\": {\n  \"build-record\": { \"schema\": { \"type\": \"object\", \"required\": [\"status\"], \"properties\": { \"status\": { \"enum\": [\"PASS\", \"FAIL\"] } } }, \"evidence\": [{ \"kind\": \"command\", \"min\": 1 }], \"visibility\": \"org\", \"max_publish_attempts\": 5 }\n}\n```\n\nEach published type needs a `documents` entry, a producer and a consumer. The last section of a pipeline publishes nothing: the boss, which is in no section, closes the run after it (`org validate` warns about a type no section consumes). A single-member section leads itself. `\u002Fdoc\u002Fconcepts\u002Forg-runtime.md` section 6.7 has the full contract. Sections are the way to go past 4 roles; make each one a stage with a real typed hand-off, and merge roles that do not need one.\n\n**Efficiency defaults (every org).** Put routine workers on the cheap tier and keep the boss and any role that judges others on the default model: `\"cost_tiers\": {\"roles\": {\"\u003Cworker id>\": {\"tier\": \"economy\", \"effort\": \"low\"}, \"\u003Cboss or judge id>\": \"exempt\"}}`. Set `\"session_scope\": \"task\"` in `run_config` for workers that take independent tasks (a worker resumed per task does not carry a growing transcript), and `max_concurrent_agents` to the number of roles (an idle role keeps its slot; `org validate` #3 and the sections check reject less). Keep `budget_tokens` at the default of 1M per role: a smaller total draws #23, and the savings come from the cheap tiers, not from a tight budget. `org validate` #4 (no `budget_usd`) is advice for a Claude-only org: leave it unless the user asks for a USD ceiling, and never add `budget_usd` to a codex or antigravity role.\n\n`status` starts `\"stopped\"` regardless of whether `schedule` is set — the org does not run until `monomind org run \u003Cname>` (one-shot) or `monomind org serve` (picks up any org whose `schedule` is set) is invoked.\n\nOnly include `adapter_config` (a pinned model the user named), `provider`, `policy`, or `ui` on a role when Step 2.3\u002F2.4 populated them for it — leave them out entirely rather than writing empty objects.\n\nLeave `run_config.completion_evidence` out unless the org's roles commit code: it makes `org_task_done` demand a commit sha, which a role with no Bash cannot produce, so every task of a research org is refused and the lead has to cancel them by hand (`org validate` #22). Do not copy it from a code org such as `release`.\n\nWhen the org's roles do not commit, tell them how to close a task: in the lead's brief rule (or the role's responsibilities), \"close with `org_task_done { taskId, result }` and no `evidence`\". A Codex role otherwise attaches its own evidence shape, the strict `evidence` schema (headSha only) refuses the first close, and every task costs an extra turn.\n\n**Order a pipeline with dependencies, not with the lead's memory.** A phase that needs an artifact another step produces (a debate relay, a dossier, a rubric) must be a task that the later tasks `depends_on`, or the later tasks must be created only after the file exists. A responsibility such as \"write the relay before dispatching round 2\" is not enough: in the reputation-panel debate round the lead created all three round-2 tasks first and wrote the relay afterwards, so the scorers rescored without it and had to be re-asked.\n\n---\n\n## Step 4 — Show Plan and Confirm (confirm mode)\n\nRender the org plan in a clear human-readable format. **The model assigned to each role is the single most important thing for the user to review here** — give it its own table, not just a line buried inside each role's block, so it can't be skimmed past:\n\n```\n╔══════════════════════════════════════════════════╗\n║  ORG: \u003Corg_name>                                 ║\n║  GOAL: \u003Cgoal>                                    ║\n╚══════════════════════════════════════════════════╝\n\nMODELS  ← review this first\n────────────────────────────────────────────────────\n  ROLE                MODEL\n  ──────────────────  ────────────────────────────\n  boss                claude-sonnet-5-5 · medium\n  content-writer      claude-sonnet-5-5 · medium\n  content-reviewer    claude-sonnet-5-5 · medium\n\n  Every role shows the model and effort it will resolve to when it runs —\n  the newest of its family at medium effort unless you asked for another.\n  To put a role on a different model, say so now (e.g. \"put content-writer\n  on the newest Opus\"; that becomes the built-in `standard` tier).\n\nSTRUCTURE  (Step 1b)\n────────────────────────────────────────────────────\n  Row chosen: \u003Csingle agent | parallel team (deadline: \u003Cx>) | hand-off review (no-section alternative)>\n  Why: \u003Cone line from the measured table>   Not covered: \u003Cwhat the evidence does not show>\n\nROLES  (N roles — exactly one boss, every reports_to resolves to a real role id)\n─────\n• [boss] CEO \u002F Boss  (type: boss, reports_to: none)\n    Responsibilities: Strategic oversight, final decisions, coordinates the team via org_send\n\n• [content_writer] Content Writer  (type: specialist, reports_to: boss)\n    Responsibilities: Draft posts per the content calendar, hand off to content_reviewer\n\n  ... (all roles)\n\nSETTINGS\n────────\nBudget: \u003Crun_config.budget_tokens> tokens (split evenly across N roles)\nMax run: \u003Crun_config.max_run, or \"schedule interval\" when unset>\nMemory namespace: org:\u003Corg_name>\nSchedule: \u003C\"every \u003CN> \u003Cunit>\" if schedule set; otherwise \"manual — run with `monomind org run \u003Corg_name>`\">\n\nType \"go\" to accept (including the models above as shown), or describe changes.\n```\n\nIn **auto** mode, skip this confirmation prompt entirely — but still surface the same MODELS table, non-blocking, appended to the Step 6 save confirmation (see Step 6).\n\nIf the user requests changes, apply them and re-render. Repeat until confirmed.\n\n---\n\n## Step 5 — Save Org Config\n\n```bash\norg_name=\"\u003Cresolved org name from Step 1>\"\norgJson=\".monomind\u002Forgs\u002F${org_name}.json\"\nmkdir -p .monomind\u002Forgs\n```\n\nWrite the confirmed org config as JSON using `jq` to guarantee valid encoding:\n\n```bash\n# Set shell variables from the confirmed plan before running this block\n# (extra_json: top-level keys beyond these, e.g. sections, documents, requires, cost_tiers —\n#  a \"run_config\" object here is merged into the one below, so session_scope and completion go in it).\nextra_json=${extra_json:-'{}'}\n# Other variables:\n#   goal, schedule_val (\"\" if none), budget_tokens_val, max_run_val (\"\" if none),\n#   roles_json (JSON array matching the role shape above)\njq -n \\\n  --arg name \"$org_name\" \\\n  --arg goal \"$goal\" \\\n  --arg schedule \"${schedule_val:-}\" \\\n  --argjson budget_tokens \"${budget_tokens_val:-$(( $(jq length \u003C\u003C\u003C\"$roles_json\") * 1000000 ))}\" \\\n  --arg max_run \"${max_run_val:-}\" \\\n  --argjson roles \"$roles_json\" \\\n  --argjson extra \"$extra_json\" \\\n  '{name:$name,goal:$goal,status:\"stopped\",\n    schedule:(if $schedule==\"\" then null else $schedule end),\n    run_config:({max_concurrent_agents:($roles|length),budget_tokens:$budget_tokens,\n                 memory_namespace:(\"org:\"+$name),max_turns_per_message:80}\n                + (if $max_run==\"\" then {} else {max_run:$max_run} end)),\n    roles:$roles} * $extra' \\\n  > \"${orgJson}.tmp\" && mv \"${orgJson}.tmp\" \"$orgJson\"\n```\n\n**POST-SAVE VALIDATION (run immediately after saving — abort if it fails):**\n\n```bash\n# Parses with OrgDefSchema (the exact code path org run\u002Fserve use) and checks the\n# structural invariants: exactly one root role, every reports_to resolves, unique\n# role ids, parseable schedule, name\u002Ffilename agreement.\nif npx -y monomind@latest org validate \"$org_name\"; then\n  echo \"✓ Org config validated — ready for: monomind org run ${org_name}\"\nelse\n  # CLI \u003C 2.1.8 has no `org validate` — fall back to the two structural checks:\n  root_count=$(jq '[.roles[] | select(.reports_to == null)] | length' \"$orgJson\")\n  bad_reports=$(jq -r '([.roles[].id]) as $ids |\n    [.roles[] | select(.reports_to != null and (.reports_to as $r | $ids | index($r) | not)) | .id] | join(\", \")' \"$orgJson\")\n  if [ \"$root_count\" -ne 1 ] || [ -n \"$bad_reports\" ]; then\n    echo \"ERROR: org config invalid (roots: $root_count, unresolved reports_to: ${bad_reports:-none}) — fix the roles array and re-save.\"\n    exit 1\n  fi\n  echo \"✓ Structural checks passed (upgrade monomind for full schema validation)\"\nfi\n\n# Review for signing (#502): the runtime refuses to start or reload an org\n# definition the operator has not signed. Without a terminal this prints the\n# full review (each role's runtime, access level, tools, skills,\n# instructions_file and sandbox, the org's prechecks, and any role that would\n# run unconfined) and signs nothing. It exits non-zero by design.\nnpx -y monomind@latest org sign \"$org_name\" || true\n```\n\nShow the user that review verbatim, then tell them to sign the org themselves in their own terminal after reading it: `monomind org sign \u003Corg_name>`. Do not sign it for them (never pass `--yes`): the signature is the operator's approval of what the roles may do.\n\nAfter any later edit to a role's `policy`, `skills`, `instructions_file`, the roles, runtimes, `schedule` or `run_config`, the org must be signed again (`monomind org sign \u003Corg_name>`) before `org run`, `org reload` or `org serve` will use the change.\n\n---\n\n## Step 6 — Return Output\n\n```yaml\ndomain: ops\nstatus: complete\nartifacts:\n  - path: .monomind\u002Forgs\u002F\u003Corg_name>.json\n    type: config\ndecisions:\n  - what: \"Org \u003Corg_name> created with N roles\"\n    why: \"Role mapping derived from goal and user description\"\n    confidence: 0.85\n    outcome: shipped\nlessons:\n  - what_worked: \"Auto-suggested roles matched user intent\"\n  - what_didnt: \"\"\nnext_actions:\n  - \"Run `monomind org run \u003Corg_name>` to start the organization in the foreground (add --dry-run to preview each role's briefing first)\"\n  - \"After hand-editing the config, re-check it with `monomind org validate \u003Corg_name>`\"\n  - \"While running: `monomind org logs \u003Corg_name> --follow`; afterwards: `monomind org report \u003Corg_name>` for outcome, per-role activity, and token usage\"\n  - \"Or `monomind org serve` to host it (and any other scheduled orgs) as a background daemon\"\n  - \"Edit .monomind\u002Forgs\u002F\u003Corg_name>.json directly, or use \u002Fmastermind-org-settings, to change goal\u002Fbudget\u002Froles\"\n  - \"`monomind org status \u003Corg_name>` to check runtime state; `monomind org stop \u003Corg_name>` to stop a running org\"\n```\n\nPrint confirmation:\n```\n✓ Org \"\u003Corg_name>\" saved to .monomind\u002Forgs\u002F\u003Corg_name>.json\n  → Run: monomind org run \u003Corg_name>\n```\n\nIf `schedule` was set, also print:\n```\n  Schedule: every \u003CN> \u003Cunit> — pick it up with: monomind org serve\n```\n\nIn **auto** mode (where Step 4's plan\u002Fmodel confirmation was skipped), always also print the models table so the user still sees — after the fact — what each role will run on, even though nothing blocked on it:\n```\n  Models:\n    boss                claude-sonnet-5\n    content-writer      claude-sonnet-5\n    content-reviewer    claude-sonnet-5\n  Adjust with: \u002Fmastermind-org-settings, or edit .monomind\u002Forgs\u002F\u003Corg_name>.json directly\n```\nIn **confirm** mode this table was already shown and accepted in Step 4 — do not repeat it here.\n\n---\n\n## Step 7 — Brain Write (standalone only)\n\nIf `caller` is not \"command\", follow mastermind-protocol\u002FSKILL.md Brain Write Procedure for domain `ops`.\n",{"name":5,"type":40,"description":7,"default_mode":41},"domain-skill","confirm","main","f7cd4595d0f8959822163e14f9787117765c931a",".claude\u002Fskills\u002Fmastermind-createorg",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-14 03:30:52",{"source":8,"skillName":5,"commands":52,"prompt":62,"zipAvailable":63},[53,56,59],{"tool":54,"command":55},"npx","npx skills add monoes\u002Fmonomind --skill mastermind-createorg",{"tool":57,"command":58},"bunx","bunx skills add monoes\u002Fmonomind --skill mastermind-createorg",{"tool":60,"command":61},"pnpm","pnpm dlx skills add monoes\u002Fmonomind --skill mastermind-createorg","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fmonoes\u002Fmonomind\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fmastermind-createorg\u002FSKILL.md",true,[],[66,76,84,92,100,108],{"skillNo":67,"name":68,"nameZh":6,"description":69,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":70,"licenseFileUrl":71,"sourceHtmlUrl":72,"categories":73,"keywords":74,"publishedAt":75},"01M73YHAZDWV4ZVTGSKMWQ4Z1S","isms-audit-expert","Use when planning or running an ISO 27001 ISMS audit: risk-based audit schedules, Annex A control assessment, Statement of Applicability and nonconformities. Auditor-side procedures, versus compliance-auditor, which is org role guidance across SOC 2, HIPAA and PCI-DSS.","MIT","https:\u002F\u002Fgithub.com\u002Fmonoes\u002Fmonomind\u002Fblob\u002Fmain\u002Fpackages\u002F@monomind\u002Fcli\u002Forg-skills\u002Fisms-audit-expert\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fmonoes\u002Fmonomind\u002Fblob\u002Fmain\u002Fpackages\u002F@monomind\u002Fcli\u002Forg-skills\u002Fisms-audit-expert\u002FSKILL.md",[],[],"2026-11-11 15:11:14",{"skillNo":77,"name":78,"nameZh":6,"description":79,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":80,"sourceHtmlUrl":81,"categories":82,"keywords":83,"publishedAt":75},"01M73YGBS2APTY71Y4CYA2DKSQ","instrument-data-to-allotrope","Convert laboratory instrument output files (PDF, CSV, Excel, TXT) to Allotrope Simple Model (ASM) JSON format or flattened 2D CSV. Use this skill when scientists need to standardize instrument data for LIMS systems, data lakes, or downstream analysis. Supports auto-detection of instrument types. Outputs include full ASM JSON, flattened CSV for easy import, and exportable Python code for data engineers. Common triggers include converting instrument files, standardizing lab data, preparing data for upload to LIMS\u002FELN systems, or generating parser code for production pipelines.","https:\u002F\u002Fgithub.com\u002Fmonoes\u002Fmonomind\u002Fblob\u002Fmain\u002Fpackages\u002F@monomind\u002Fcli\u002Forg-skills\u002Finstrument-data-to-allotrope\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fmonoes\u002Fmonomind\u002Fblob\u002Fmain\u002Fpackages\u002F@monomind\u002Fcli\u002Forg-skills\u002Finstrument-data-to-allotrope\u002FSKILL.md",[],[],{"skillNo":85,"name":86,"nameZh":6,"description":87,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":70,"licenseFileUrl":88,"sourceHtmlUrl":89,"categories":90,"keywords":91,"publishedAt":75},"01M73YB23X4NP40R73TS6YY8TX","experiment-designer","Use when planning a product A\u002FB or multivariate test: If\u002FThen\u002FBecause hypotheses, primary and guardrail metrics, sample size and MDE, ICE prioritization. For logging and reproducing ML runs use experiment-tracker; for scientific study design use experimental-design.","https:\u002F\u002Fgithub.com\u002Fmonoes\u002Fmonomind\u002Fblob\u002Fmain\u002Fpackages\u002F@monomind\u002Fcli\u002Forg-skills\u002Fexperiment-designer\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fmonoes\u002Fmonomind\u002Fblob\u002Fmain\u002Fpackages\u002F@monomind\u002Fcli\u002Forg-skills\u002Fexperiment-designer\u002FSKILL.md",[],[],{"skillNo":93,"name":94,"nameZh":6,"description":95,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":96,"sourceHtmlUrl":97,"categories":98,"keywords":99,"publishedAt":75},"01M73Y8ETSB9072G5ZGPPR0X6E","digest","Generate a daily or weekly digest of activity across all connected sources. Use when catching up after time away, starting the day and wanting a summary of mentions and action items, or reviewing a week's decisions and document updates grouped by project.","https:\u002F\u002Fgithub.com\u002Fmonoes\u002Fmonomind\u002Fblob\u002Fmain\u002Fpackages\u002F@monomind\u002Fcli\u002Forg-skills\u002Fdigest\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fmonoes\u002Fmonomind\u002Fblob\u002Fmain\u002Fpackages\u002F@monomind\u002Fcli\u002Forg-skills\u002Fdigest\u002FSKILL.md",[],[],{"skillNo":101,"name":102,"nameZh":6,"description":103,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":104,"sourceHtmlUrl":105,"categories":106,"keywords":107,"publishedAt":75},"01M73Y7XJJBH0QXCM5GKJW6N21","design-critique","Get structured design feedback on usability, hierarchy, and consistency. Trigger with \"review this design\", \"critique this mockup\", \"what do you think of this screen?\", or when sharing a Figma link or screenshot for feedback at any stage from exploration to final polish.","https:\u002F\u002Fgithub.com\u002Fmonoes\u002Fmonomind\u002Fblob\u002Fmain\u002Fpackages\u002F@monomind\u002Fcli\u002Forg-skills\u002Fdesign-critique\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fmonoes\u002Fmonomind\u002Fblob\u002Fmain\u002Fpackages\u002F@monomind\u002Fcli\u002Forg-skills\u002Fdesign-critique\u002FSKILL.md",[],[],{"skillNo":109,"name":110,"nameZh":6,"description":111,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":70,"licenseFileUrl":112,"sourceHtmlUrl":113,"categories":114,"keywords":115,"publishedAt":75},"01M73Y7SM786ZEMNXGPT595AM3","deployment-pipeline-design","Use when architecting a multi-stage CI\u002FCD pipeline with approval gates, SAST and DAST scans, environment promotion, canary rollout and automated rollback. Design-level; for concrete Dockerfile and health check patterns use deployment-patterns.","https:\u002F\u002Fgithub.com\u002Fmonoes\u002Fmonomind\u002Fblob\u002Fmain\u002Fpackages\u002F@monomind\u002Fcli\u002Forg-skills\u002Fdeployment-pipeline-design\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fmonoes\u002Fmonomind\u002Fblob\u002Fmain\u002Fpackages\u002F@monomind\u002Fcli\u002Forg-skills\u002Fdeployment-pipeline-design\u002FSKILL.md",[],[]]