# Install Baton with an AI Agent This is an approval-gated runbook. Inspect first, plan second, write only after the user approves. ## Installation contract - Install exactly one directory named `baton-dispatch`. - Do not modify model settings, global agent definitions, CLAUDE.md, AGENTS.md, hooks, MCP configuration, or project source files. - Do not run Baton, spawn agents, initialize CodeGraph, or launch workflows during installation. - Preserve unrelated files and local changes. - Refuse to overwrite a non-Baton directory with the same name. - Prefer a tag or full commit SHA over a moving `main` reference. ## 1. Inspect Determine: 1. the requested source tag or commit; 2. the current agent product and its documented personal or project skill directory; 3. whether `baton-dispatch` already exists there; 4. whether the existing directory is a Git checkout of `https://github.com/cablate/baton.git`; 5. whether it contains local modifications. If the product's skill discovery path is unknown, stop and ask. Do not guess a global destination. Common destinations may include a product-specific personal skills directory or a project-local skills directory. Treat these only as candidates and verify them against the active environment. ## 2. Show the plan Before writing, report: ```markdown ## Baton installation plan - Source: - Destination: /baton-dispatch - Operation: create | fast-forward update | replace reviewed clean checkout - Files created or updated: see install/MANIFEST.md - Existing local changes: none | list - Verification: frontmatter, required references, smoke-test instructions - Explicit non-changes: model settings, global agents, project instructions, hooks, MCP, source files ``` Wait for explicit approval. ## 3. Install or update ### New installation Clone the reviewed release into the verified destination using the folder name `baton-dispatch`: ```text git clone --branch --depth 1 https://github.com/cablate/baton.git /baton-dispatch ``` If Git is unavailable, download the same tag or commit and copy only the files listed in `install/MANIFEST.md` while preserving their relative paths. ### Existing clean Baton checkout Confirm the remote first. Fetch tags, check out the requested tag, and fast-forward only. Do not discard local commits or modifications. ### Existing modified installation Stop and show the diff. Offer to preserve it, create a backup, or let the user resolve it. Never reset or overwrite it automatically. ## 4. Verify Verify all of the following: - destination folder is named `baton-dispatch`; - `SKILL.md` frontmatter contains `name: baton-dispatch`; - every reference linked directly from `SKILL.md` exists; - `agents/openai.yaml` references `$baton-dispatch`; - installed `VERSION` matches the requested release; - no files outside the destination changed. If the environment provides a skill validator, run it. Otherwise report that structural verification was used. ## 5. Hand off the smoke test Tell the user to start a fresh session if their product discovers skills only at startup, then run the prompts in `install/SMOKE-TESTS.md`. Report the final installed path, version, verification evidence, and any manual restart required. ## Updating Repeat this runbook with a newer tag. Show the changelog between the installed and requested versions before approval. An unchanged, clean installation should result in no file changes.