ibda
ibda · verb · “to begin, to start”
The setup skill a pasted prompt points to: it installs, repairs or upgrades mexxi.
Installing one workflow into three different agents by hand is fiddly and easy to get wrong.
Install, set up, repair or upgrade mexxi, the coding-agent workflow in github.com/alexportelli12/mexxi, on this machine. Use when asked to install or set up mexxi, to fix a broken mexxi install, to upgrade or update it, or when a pasted prompt points at this file. Do not use to prepare a repository for mexxi (that is /lesti) or to change the workflow's own rules (that is /sewwi).
Skill instructions
The agent loads the instructions below when a task needs this skill, from skills/ibda/SKILL.md.
Full skill instructions
ibda (Maltese for "begin") takes a machine to a working mexxi install and proves it with install --check. It is safe to rerun: on an existing install it upgrades and repairs instead of starting over.
This file is self-contained, because it may be fetched raw from https://raw.githubusercontent.com/alexportelli12/mexxi/main/skills/ibda/SKILL.md by an agent with nothing installed yet. Docs: https://alexportelli12.github.io/mexxi/docs/
Rules that hold throughout:
- Install nothing, and run no command that changes the machine outside the clone and
~/.config/mexxi, without asking first. Say what a command does before running it. - Never hand-edit a host's existing configuration (
~/.claude,~/.codex,~/.config/opencode). Only the installer changes it, in the ways "What the installer changes" lists, and only after the user's explicit yes to that list. It refuses on a conflict. When it reports one, show the user the paths, explain what differs, and ask; do not delete, move or force anything. - Ask only what cannot be detected. Everything else takes the defaults in
config.schema.json. - Never write an API key into any file. Jev's key stays in
OPENROUTER_API_KEY.
1. Check prerequisites
Check each and report the results in one table before going on:
| Need | Check | If missing |
|---|---|---|
| Node 22.13 or newer, with npm | node --version | Install from https://nodejs.org or the system package manager |
| git | git --version | Install with the system package manager |
gh for GitHub or glab for GitLab, signed in | gh auth status or glab auth status | Install from https://cli.github.com or https://gitlab.com/gitlab-org/cli, then gh auth login or glab auth login; a self-hosted forge also needs forge.hosts in config.json |
ocr (OpenCodeReview), unless review.tool is none | ocr --version | The independent review's default selection needs it; install per https://github.com/alibaba/open-code-review, or set review.tool to none so the reviewer reads the diff itself |
ffmpeg (optional) | ffmpeg -version | Only for turning rendered-QA recordings into GIFs; skip if unwanted |
~/.local/bin on PATH | echo $PATH | The installer links ibni there; offer to add it to the shell profile and wait for a yes |
Also detect which hosts are installed: claude, codex and opencode on PATH. Stop and ask when a required tool is missing; do not continue past it.
2. Find out whether this is a first install
Look for ~/.config/mexxi/config.json (or the file MEXXI_CONFIG names).
- It exists: this is a rerun. Read
paths.checkoutfrom it and go to "Upgrade and repair". - It does not exist, but
~/.config/opencodeis a Git clone ofcoding-agent-config(git -C ~/.config/opencode remote -v): this is the pre-move layout. The new clone goes elsewhere, and the old clone has to be moved aside first, because OpenCode's links go where its files are now. The installer then takes over the old links with--migrate-from. Explain the sequence in step 4 and get a yes before moving anything; the moved clone stays at~/.config/opencode.pre-moveuntil the user deletes it. - Otherwise: a first install.
3. Ask only what cannot be detected
For a first install, ask these together, in one message, offering the answer you would pick:
- Clone location. Default
~/workspace/mexxi. If a non-mexxi directory already exists there, ask for another path. - Hosts. Offer the detected ones; each undetected host is set to
false. - Models per role, for each chosen host: the
revieweranduiDesigneragents, and optionally acrossFamilyReviewer(a model from a different family to the implementer's, which makes the independent review stronger). OpenCode also hasgeneralandexplore. "Host default" (null) is a fine answer, and for OpenCode the schema defaults apply unless told otherwise. - Jev on or off. Default off. If on, ask for the GitHub owners that are theirs (
jev.owners) and the repositories it may run in (jev.repositories, asowner/name), and tell them to exportOPENROUTER_API_KEY. Jev only records answers beside the agent's own decisions; it changes nothing.
What the installer changes
Show the user this list before the installer first runs, on a first install and on an upgrade alike:
Links for each chosen host into
~/.claude,~/.codex,~/.agents/skillsand~/.config/opencode(instructions, commands, skills, agents), andibniinto~/.local/bin. Rendered files go to~/.local/share/mexxi/generated.Claude Code's
~/.claude/settings.json, merged rather than replaced; everything else in it stays the user's:- a
permissions.denyrule,Bash(<prefix>:*), for eachguard.denyprefix (by defaultnpm publish,gh pr merge,gh release createand force pushes, plus any production deploys the user adds); env.BASH_MAX_TIMEOUT_MSfromclaude.bashMaxTimeoutMs(default 15 minutes), the longest a foreground Bash command may run;cleanupPeriodDays: 90fromretro.transcriptRetentionDays. Claude Code then keeps session transcripts on disk for 90 days instead of deleting them after its default 30, so a retro can read them. Transcripts hold everything a session saw, so this is longer retention of that data;- the guard and loop-breaker hooks, as
PreToolUse,PostToolUseandPostToolUseFailuregroups.
A key the user set to a different value is a conflict: the installer stops and changes nothing.
- a
Claude Code mods (
mods):claude pluginadds themexximarketplace and installs each mod, which writesextraKnownMarketplacesandenabledPluginsinto the samesettings.json.Codex's
~/.codex/hooks.json: the guard and loop-breaker groups, merged in beside the user's own hooks.A
post-mergeGit hook in the clone, so everygit pullthere reruns the installer.Ownership records in
~/.local/share/mexxi/state/, so a later change toconfig.jsonremoves only what mexxi added.
4. Install
Show "What the installer changes" and wait for an explicit yes before step 4. First install, in order:
Clone:
git clone https://github.com/alexportelli12/mexxi.git <clone>(parent directory created if needed). Stay onmain.Install dependencies from the clone:
npm ci.Write the config to a scratch file outside
~/.config, with only the keys that differ from the defaults. It must setpaths.checkoutto the clone, and may sethosts,modelsandjev. Example:json{ "paths": { "checkout": "~/workspace/mexxi" }, "hosts": { "opencode": false }, "models": { "claude": { "reviewer": "opus" } }, "jev": { "enabled": true, "owners": ["me"], "repositories": ["me/app"] } }config.schema.jsonin the clone documents every key.Run the installer from the clone. It validates the file against the schema before writing anything, copies it to
~/.config/mexxi/config.json, links the hosts and installs the Claude Code mods:bashnode scripts/install.mjs --config <scratch-file> --yes--yesconfirms that write. If~/.config/mexxi/config.jsonalready exists and differs, the installer stops and changes nothing; show the user both files and let them decide.For the pre-move layout, with the user's yes, run this sequence instead of the command above. Only it works:
--migrate-fromtakes over links that point inside the path it names, so it must name~/.config/opencodeitself, and that directory must no longer hold the old clone.bashnode scripts/install.mjs --dry-run --config <scratch-file> --migrate-from ~/.config/opencode && mv ~/.config/opencode ~/.config/opencode.pre-move && mkdir ~/.config/opencodeThen copy back the runtime-only files from
~/.config/opencode.pre-move(tui.jsonc, herdr files, personal plugins; nothing mexxi installs), and install, carrying over the old clone's gitignored skill state; drop acpwhose source does not exist:bashcp -R ~/.config/opencode.pre-move/skills/synced skills/ && cp ~/.config/opencode.pre-move/skills-lock.json . && node scripts/install.mjs --config <scratch-file> --yes --migrate-from ~/.config/opencodeRun the installer from the new clone. If the dry run lists conflicts, the chain stops before the
mv: show them to the user and resolve them first. If the install stops saying~/.config/opencodeis still the old clone, the move did not happen. If it stops after the move, runreadlink ~/.claude/CLAUDE.md, the first link the installer moves. If it already points into~/.local/share/mexxi/generated, the links have moved: don't restore anything; fix the cause the installer printed and rerun the install command above. Otherwise put the old clone back first:rmdir ~/.config/opencode && mv ~/.config/opencode.pre-move ~/.config/opencode.Delete the scratch file once it is installed.
5. Add Playwright, then prove it
The installer prints, for each chosen host, the Playwright MCP command to run (claude mcp add ..., codex mcp add ...); OpenCode needs none. It never runs them. Show each line, and run it only when the user agrees.
Then run node scripts/install.mjs --check. It must exit 0 with no output about drift or missing registrations; it fails, listing every gap, until each host's Playwright registration matches. Fix what it names (most are one-line commands it prints) and rerun until it is green. Do not report success on any other evidence.
Codex needs one more step the installer cannot do: start codex once and trust the mexxi guard and loop breaker hooks in /hooks. Codex skips untrusted hooks. Say so whenever Codex is a chosen host.
Upgrade and repair
On a rerun, in the clone from paths.checkout:
git status: if it has uncommitted changes or is not onmain, stop and tell the user; do not stash or discard anything.- Show "What the installer changes" and wait for an explicit yes. Get it before pulling: the clone's
post-mergehook reruns the installer as soon asgit pullbrings anything in. git pull --ff-only, thennpm ci.node scripts/install.mjs, thennode scripts/install.mjs --check. This re-renders the host files fromconfig.json, so it also repairs a broken link or a stale render. Edits toconfig.json(new models, Jev on) take effect the same way.- Work through anything
--checklists, as in section 5.
Never run the installer from a feature worktree or another clone; it refuses.
6. Hand over
- Tell the user what was installed (hosts, clone path, config path) and that
~/.config/mexxi/config.jsonis the only file they ever edit. - Prepare a repository: offer to run
/lestiin one of their repositories. It opens a single PR that adds whatever the repository lacks (averifyscript, agent docs, review coverage) and fixes its failing checks. The copyable prompt is: "Make this repository ready for mexxi: run /lesti here." - Suggest a first small
/wettaqin a prepared repository (a copy tweak or a one-line fix), to see the worktree, verify, review and PR flow end to end. - Link the docs: https://alexportelli12.github.io/mexxi/docs/