--- name: init description: Make THIS directory a project that tracks issues — run `kettle init`, which creates the `.kettle/` marker every other command resolves the store from, migrates an older store in, and gitignores it. Operator-invoked only; carries the rules the binary cannot enforce — never inside a linked worktree, never an `--at` nobody named, never a migration clash resolved for them. argument-hint: "[--at DIR] [--login NAME] [--repo owner/name] [--dry-run]" disable-model-invocation: true allowed-tools: Bash(kettle init:*), Bash(kettle config:*), Bash(git rev-parse:*) --- # /kettle:init — make this directory a project Initializing is a statement, and the operator makes it: *this* directory is the project whose issues live in it. Nothing infers it — `.git` is in every clone, and a tool that inferred its root from one wrote other projects' issues into its own versioned cache. It is answered once, by a person, and every command downstream reads the answer instead of guessing. The binary does the work and is idempotent. What this skill carries is the three things it cannot decide for itself. ## Steps 1. **Refuse inside a linked worktree.** Two different paths mean one: ```bash git rev-parse --path-format=absolute --git-dir --git-common-dir ``` Stop and say so. `.kettle/` is gitignored, so a worktree has no marker by design and reaches the main checkout's store on its own — the walk crosses to it through the `gitdir:` in the `.git` *file*. A marker here gives one project two stores, and the second is deleted with the branch. If anything needs initializing it is the main checkout, which is the second path's parent. 2. Run it, passing the operator's arguments through unchanged: ```bash kettle init $ARGUMENTS ``` With no `--at` it initializes the current directory. **Never supply an `--at` the operator did not name.** Which directory is the project is the one question this command exists to have a person answer; picking a plausible one is the failure the marker replaces. 3. Report what it printed, verbatim. `already initialized — nothing to do` is a success, not something to work around. `--login` pins a login by name and `--repo` names the tracker repository; both are optional and both can be added later by running `init` again — it writes the config without disturbing settings it was not given. Neither is a credential: the tokens live in one file per machine, `/kettle:auth`. ## When it stops - **A name clash on the migration** — the same file name on both sides. It exits having changed nothing and names the files. Report that. Do **not** move, delete, or merge either side: one of them may be an `origin: local` issue, which *is* the issue and the only copy of that work. The operator decides which survives. - **A marker already exists above this directory.** A second one gives that project a second store and the nearer one wins. Confirm with the operator before going ahead; usually they are standing in a subdirectory and there is nothing to do. **No `kettle` on PATH?** `command not found: kettle` is the whole story. Stop and tell the operator to install it: `cd cli && go build -o ~/.local/bin/kettle ./cmd/kettle` in the marketplace repository (go.mod requires **go 1.26**), or `go install git.noodles.cam/claude-skills/marketplace/cli/cmd/kettle@latest`. ## After - `/kettle:issue` works now — offline, no login, no network. - `/kettle:auth` puts a token on this machine and pins the login this project runs under; needed only for the tracker side, `/kettle:sync`. - `kettle config` prints every path and setting this directory resolved to, and is the first thing to run when something looks like it landed in the wrong place. The full flag table for `init` is the generated block in `/kettle:project`.