AI Agents Agent Setup Prompt

Agent setup prompt

Paste this into your coding agent (Claude Code, Codex, Copilot CLI, Antigravity CLI…) from your repository’s folder. It checks and sets up everything iKanban’s agents need on this laptop, step by step, and asks before installing anything. In Claude Code, once This laptop is set up, /ikanban-agent-setup does the same. The Copy setup prompt button on Agent settings → Git connections → Coding agents copies it too.

Set up this laptop so iKanban's coding agents (Claude, Copilot, Antigravity, Codex, OpenCode and Grok) can run here, in this repository, with my own sign-in to each agent. No API keys and no repository secrets. Run the checks yourself, ask me before installing anything or opening a browser sign-in, and don't change files in this repository.

Rules
- Never print a key, token, password or email. Report names and yes/no only.
- If `.iKanban/settings-local.json` exists, read `api_url` into `U` and `api_key` into `K` without echoing the key.
- Go step by step. After each step, tell me what's ready and what I need to do, then continue.

1. iKanban desktop app and This laptop
   - Check: `.iKanban/settings-local.json` exists with `api_url` and `api_key`, and `.gitignore` covers it.
   - If not: ask me to open the iKanban desktop app (Mac, Windows or Linux), then Agent settings → Git connections → This laptop → Set up. I choose this folder, my team and my project, and keep "Let Antigravity run safe commands" ticked.
   - Runner online: `curl -s -H "Authorization: Bearer $K" "$U/api/runner/presence"` shows `"runner_online": true`. If not, ask me to open the desktop app (it starts the runner). If it's still offline, show the last lines of `~/Library/Logs/com.verbodh.ikanban/runner.log`.

2. Roadmap: the first step of every piece of work
   - Only when this kit has the Roadmap (`.iKanban/skills/ikanban-roadmap/` exists). Otherwise skip it and say so.
   - Any change with more than one step starts by publishing its plan to iKAgent → Roadmap (`.iKanban/prompts/roadmap.md`). This step proves this laptop can do that.
   - Hooks: ask me, then run `npx -y ikanban hooks install` once in this repository. It prints the server it will use; that must be my `api_url`. If I want "What agent did" (Pro and up), add `--trace`, with `ikanban@0.5.3` or later for the session restart wiring: it also wires `.iKanban/hooks/trace.js`, which stays off until `node .iKanban/hooks/trace.js --on`.
   - Check: `npx -y ikanban roadmap sync --check` answers ("in sync", differences, or no plan file yet) without an error.
   - If `VIBE_API_TOKEN` is set in my shell, it must be the key for that same server. ikanban 0.4.8 and older send it instead of `api_key`, so a key for another server (for example prod) goes to the wrong one. Ask me to unset it, or run the sync as `env -u VIBE_API_TOKEN npx -y ikanban roadmap sync`.

3. Claude (Claude Code, needs a Claude subscription)
   - Check: `claude auth status --json` shows `"loggedIn": true` (report only that field).
   - If not: `claude auth login`. If `claude` isn't installed: `npx -y @anthropic-ai/claude-code auth login`.
   - Optional, for the iKanban runner only: a one-year token. I run `claude setup-token` myself and paste it in the iKanban desktop app (Agent settings → Git connections → Coding agents → Claude one-year token). Never ask me for the token or put it in a file.

4. Copilot (GitHub Copilot CLI, needs a GitHub Copilot plan)
   - Check: `copilot --version` runs. There's no sign-in status command, so ask me whether `copilot login` was completed on this laptop.
   - If not: `copilot login`, then I approve the device on GitHub.
   - Copilot runs this repository's hooks (.claude/settings.json, .github/hooks/*.json); a hook that errors blocks every edit. If Copilot says "blocked by an erroring preToolUse hook" or its PR changes 0 files, show me the hooks whose scripts are missing.

5. Antigravity (runs through Google's Antigravity CLI, `agy`)
   - Gemini CLI's "Login with Google" no longer works for personal accounts, so iKanban uses Antigravity CLI.
   - Check installed: `command -v agy`, or `~/.local/bin/agy`.
   - If not installed, ask me first, then run `curl -fsSL https://antigravity.google/cli/install.sh | bash`.
   - Sign in: I run `agy` once and sign in with a personal Google account. A company (Google Workspace) account needs extra Google Cloud setup, so recommend a personal one.
   - Check signed in: `agy models` lists models.
   - If every Antigravity tool fails with "failed to unmarshal result from hook", a plugin's hook is broken. Run `agy plugin list`, and with my OK, `agy plugin disable <that plugin>`.

5a. Codex (OpenAI Codex CLI, needs a ChatGPT plan and the desktop app 0.1.28 or later)
   - Check installed: `codex --version`. If not, ask me first, then `npm install -g @openai/codex` (or `brew install --cask codex`).
   - Check signed in: `codex login status` exits 0. If not: `codex login`, or `codex login --device-auth` without a browser.
   - Tell me: `codex exec` can't ask mid-run. Codex edits in its sandbox (no network, `.git` read-only), then the runner commits on a task branch and asks Risky actions before `git push` and `gh pr create`. A Wiki run or a scan needs Allow everything with Codex.

5b. OpenCode (needs the desktop app 0.1.28 or later)
   - Check installed: `opencode --version`, or `~/.opencode/bin/opencode`. If not, ask me first, then `curl -fsSL https://opencode.ai/install | bash`.
   - Its free `opencode/*` models need no sign-in. For my own provider: `opencode auth login`, then `opencode auth list` names it.
   - Tell me: OpenCode asks iKanban before each edit, shell and web call, so Risky actions decides. Customize items and iKanban's MCP tools don't reach OpenCode runs yet.

5c. Grok
   - Check installed: `grok agent --help` must offer `stdio`. Homebrew's `grok` is a different program, a regex tool that prints "Usage: grok [-d] <-f config_file>": it does not count. If it isn't xAI's, ask me first, then `curl -fsSL https://x.ai/cli/install.sh | bash`, and put it first on PATH.
   - Sign in: `grok login`, or `grok login --device-auth` without a browser. Grok has no documented status command, so a first run proves it.
   - Tell me: Grok starts only when Risky actions is Allow everything, because it doesn't ask before a risky tool runs. Customize items and iKanban's MCP tools don't reach Grok runs yet.

6. Repository linked in iKanban
   - Ask me to confirm: Agent settings → Git connections → GitHub → Configure shows this repository next to my project. If not, I click Link there.

7. Approvals: tell me the choice, don't change it
   - In Agent settings → Runners → Risky actions I choose what happens to a push or a network call: Ask me (default; I press Approve or Deny on the session page), Allow pull requests (recommended; the agent pushes its branch and opens the PR, nothing else), Allow everything (Yolo; fully hands-off), or Deny.
   - Check the runner's commit identity: in a clone under the runner's folder, `git var GIT_COMMITTER_IDENT` should show the identity I want on commits.

8. Sleep: tell me, don't change it
   - While a job runs, the runner blocks idle sleep by itself. On a Mac during a job, `pmset -g assertions | grep "iKanban runner"` shows "iKanban runner: a job is running"; after the job it is gone.
   - Closing the lid still sleeps the laptop, and it sleeps between jobs. To keep it awake with the lid closed, I turn on Agent settings → Runners → This laptop → Keep this laptop awake. It asks once for admin rights and stays on, even when iKanban is closed, until I turn it off; Turn off restores my earlier setting. Warn me that a closed laptop in a bag gets hot.
   - Never run `sudo pmset` or `powercfg` for me. If the app is gone, I undo it with `sudo pmset -a disablesleep 0` on a Mac.

9. Runs at once: tell me, don't change it
   - The desktop app's Agent settings → Runners → This laptop shows "This laptop can run N at once". N is an estimate from my laptop's memory, cores and free disk; I pick 1 to N, and it starts at 1.
   - To keep the laptop free for my own work, I lower the number. The runner reads it before its next task, with no restart, and a lower number never stops a running task. It is per laptop and does not change automation limits.

10. Dev API check key: tell me, don't set it
   - Only when my team's Agent settings → Pipelines → Deploy check card has a Dev API address. After a deploy that contains the task's merge commit passes (the iKanban GitHub App on the repository records it), this laptop's runner calls the plan's GET and HEAD api checks there.
   - `IKANBAN_DEV_CHECK_TOKEN` is my own dev API key; the runner sends it only as a Bearer header, never to iKanban. `IKANBAN_DEV_CHECK_ORIGIN` is the exact origin it may go to (for example `https://dev-api.example.com`) and must equal the card's Dev API address; otherwise the runner calls without the key and says so.
   - The desktop app starts the runner through my login shell on a Mac and Linux: I add both `export` lines to `~/.zprofile` (zsh) or `~/.bash_profile` / `~/.profile` (bash), then quit and reopen the app. On Windows: user environment variables, then reopen the app.
   - Check without printing the key: `zsh -l -c '[ -n "$IKANBAN_DEV_CHECK_TOKEN" ] && echo token set; echo "origin: $IKANBAN_DEV_CHECK_ORIGIN"'` (or `bash -l -c`).

11. Prove it
   - Ask me to start one small read-only session per agent, from iKanban or with `@iKanban` in Slack: "reply with a one-line summary of this repository; don't change files".
   - Each session page should show the steps and then the answer.

Finish with one line per step (ready / needs action / couldn't check) and what you couldn't prove.