diff --git a/skills/bad/references/coordinator/setup-statusline-hook.md b/skills/bad/references/coordinator/setup-statusline-hook.md index 96f5d5e..1bf408e 100644 --- a/skills/bad/references/coordinator/setup-statusline-hook.md +++ b/skills/bad/references/coordinator/setup-statusline-hook.md @@ -8,9 +8,7 @@ loses no existing functionality. ## Step 1: Find the Effective Existing Command -Claude Code applies `statusLine` using this precedence (highest to lowest). Scan in order and -stop at the first file that has a `statusLine.command`. Skip any command already equal to -`.claude/bad-statusline.sh` (re-run guard). +Claude Code applies `statusLine` using this precedence (highest to lowest): | Priority | File | Writable by setup | |----------|------|-------------------| @@ -19,11 +17,13 @@ stop at the first file that has a `statusLine.command`. Skip any command already | 3 | `{project-root}/.claude/settings.json` | No — local.json takes precedence | | 4 (lowest) | `~/.claude/settings.json` | No — outside project scope | -- If found at priority 1 (managed): set `MANAGED_CONFLICT=true` — go directly to the managed - warning below and stop. Writing to `settings.local.json` would have no effect since managed - settings override all user-writable files. -- If found at priority 2–4: save the value as `CHAIN_COMMAND`. -- If not found anywhere: `CHAIN_COMMAND` is empty. +Scan priorities 1 → 4 in order. For each file that has a `statusLine.command`: + +- **If the command equals `.claude/bad-statusline.sh`**: this is a re-run — skip this entry and **continue to the next lower-priority file**. Do not stop here. +- **If the command is anything else at priority 1 (managed)**: set `MANAGED_CONFLICT=true`, go directly to the managed warning below, and stop. +- **If the command is anything else at priority 2–4**: set `CHAIN_COMMAND` to that value and stop. + +If no non-BAD `statusLine.command` is found anywhere: `CHAIN_COMMAND` is empty. ---