# 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 → Connections → Coding agents copies it too.

```text
Set up this laptop so iKanban's coding agents (Claude, Copilot and Gemini) 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), then Agent settings → Connections → This laptop → Set up. I choose this folder, my team and my project, and keep "Let Gemini (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. 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`.

3. 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.

4. Gemini (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>`.

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

6. 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.

7. 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.

8. 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.

```
