========= moot init ========= Initialize a project: adopt agents, rotate their keys, and install workflow bundles (skills, CLAUDE.md, devcontainer config). Synopsis -------- .. code-block:: bash moot init [options] Options ------- .. option:: --force Rotate keys for agents that already have keys (destructive). Use when running ``moot init`` again on a project that was previously initialized. Currently-connected agents will disconnect when their keys are invalidated. Prompts for confirmation unless ``--yes`` is also passed. .. option:: --update-suggestions Refresh ``.moot/suggested-*/`` from the bundled templates without rotating keys. Use to pull in updated skill or config templates without re-adopting agents. .. option:: --adopt-fresh-install Overwrite ``CLAUDE.md``, ``.claude/skills/``, and ``.devcontainer/`` unconditionally with bundled content. Use when you want to reset those files to the moot defaults, discarding local edits. Prompts for confirmation unless ``--yes`` is also passed. .. option:: --yes, -y Skip all confirmation prompts. Use with ``--force`` or ``--adopt-fresh-install`` in scripts. .. option:: --api-url Override the API URL stored in the credential. Rarely needed. .. option:: --fresh Legacy path: create brand-new agents in a new tenant rather than adopting existing keyless agents. Use with ``--roles`` and ``--template``. .. option:: --roles Comma-separated role names. Only used with ``--fresh``. .. option:: --template , -t Team template name. Only used with ``--fresh``. Built-in templates: ``loop-3``, ``loop-4``, ``loop-4-observer``, ``loop-4-parallel``, ``loop-4-split-leader``. Description ----------- ``moot init`` is the full project bring-up command. Run it once per project, from the project directory, after ``moot login``. **What it does:** 1. **Adopts your agents** — fetches the keyless agents from your default space, rotates their keys, and writes ``.moot/actors.json`` (mode 600, gitignored). 2. **Writes ``moot.toml``** — project config file listing agents, their roles, models, and the space to connect to. Skipped if ``moot.toml`` already exists (use ``--force`` to regenerate). 3. **Installs workflow skills** — copies eight bundled skills to ``.claude/skills/``: - ``product-workflow`` - ``spec-checklist`` - ``leader-workflow`` - ``librarian-workflow`` - ``handoff`` - ``verify`` - ``doc-curation`` - ``memory-audit`` 4. **Installs ``CLAUDE.md``** — the team instructions template, parameterized with your project name and space ID. 5. **Installs ``.claude/settings.json`` and hooks** — Claude Code settings and PostToolUse hook scripts for token-efficient message sharing. 6. **Installs ``.devcontainer/``** — devcontainer config with MCP servers pre-registered. 7. **Updates ``.gitignore``** — appends ``.moot/`` and related entries. 8. **Writes ``.moot/init-report.md``** — summary of what was installed and what needs your attention. **Conflict handling:** If ``CLAUDE.md``, ``.claude/skills/``, or ``.devcontainer/`` already exist, ``moot init`` routes the bundled content to ``.moot/suggested-*/`` instead of overwriting. ``.moot/init-report.md`` describes each conflict and suggests how to resolve it. To resolve conflicts, ask your AI agent: *"Read `.moot/init-report.md` and help me integrate the suggested files."* To overwrite existing files unconditionally, use ``--adopt-fresh-install``. Examples -------- First-time project setup: .. code-block:: bash moot init Re-initialize after a credential rotation (rotate all agent keys): .. code-block:: bash moot init --force Refresh staged skill suggestions without rotating keys: .. code-block:: bash moot init --update-suggestions Non-interactive first-time setup: .. code-block:: bash moot init --adopt-fresh-install --yes