---
name: multi-agent-language
language: en
description: "Toggle outputLanguage (assistant explanations, picker questions, PR/Jira/Confluence bodies). promptLanguage is fixed to English; commit messages, branch names and identifiers stay English. Use when the assistant should explain itself in a different language."
user-invocable: true
argument-hint: "[en|tr]  -  sets outputLanguage; omit for interactive picker; use 'output en|tr' for explicit form"
---

# multi-agent language  -  Language Preference Toggle

**Input**: $ARGUMENTS

Two-axis language preference for the pipeline:

| Field | Controls | Stored at | Mutability |
|---|---|---|---|
| `promptLanguage` | Interactive prompts during a pipeline run (account picker, project picker, dev-context picker, base-branch picker, branch-name picker, maturity ack, channels picker, Phase 5 test prompt, Phase 6 local-checkout prompt) | `prefs.global.promptLanguage` | **Fixed to `en`**  -  never toggled by this skill |
| `outputLanguage` | Assistant's explanations, status updates, error messages, and pipeline-generated reports rendered to the user (NOT external payloads) | `prefs.global.outputLanguage` | Toggled by this skill |

**Why promptLanguage is fixed:** it governs the picker's structural chrome only  -  `AskUserQuestion` `label` (button text) and `header` (chip), host error UI, and internal contract identifiers. Those stay English so tooling reads the same across CLIs. Everything a user actually reads follows `outputLanguage`, including the picker `question` and each option's `description`, per the canonical per-field matrix in `multi-agent-refs/rules.md`. A picker whose question is English on a Turkish run is a bug, not the contract.

**Always English regardless of either field**: commit messages, PR titles/bodies, Jira comments, wiki pages, reviewer/triage system prompts, agent-log.md payloads, skill-picker / confirmation / error UI exposed by the CLI host.

## Invocations

| Form | Behavior |
|---|---|
| `/multi-agent-language` (Copilot) / `/multi-agent:language` (Claude Code) | Interactive: shows current outputLanguage, prompts for a new value. |
| `... en` or `... tr` | Sets `outputLanguage` to the given value. `promptLanguage` is left untouched (always `en`). |
| `... output en\|tr` | Same as the single-token form  -  sets only `outputLanguage`. |
| `... prompt ...` | **Rejected.** Print: `promptLanguage is fixed to "en" and cannot be changed.` |

## Steps

### Read current state

```bash
PREFS="$HOME/.claude/multi-agent-preferences.json"
OUTPUT_LANG=$(jq -r '.global.outputLanguage // "<unset>"' "$PREFS" 2>/dev/null || echo "<unset>")
```

`promptLanguage` is intentionally NOT read  -  it is fixed `en`.

### Branch on argument shape

1. **No argument** → interactive picker:
   - Show current outputLanguage (English UI per skill-prompt rules)
   - Ask new outputLanguage value; "keep" leaves it untouched
2. **Single token (`en` | `tr`)** → set `outputLanguage` only. Do NOT touch `promptLanguage`.
3. **`output en|tr`** → equivalent to the single-token form.
4. **`prompt ...`** → reject with `promptLanguage is fixed to "en" and cannot be changed.` (exit non-zero).
5. **Anything else** → print usage and exit non-zero.

### Self-heal promptLanguage

If `prefs.global.promptLanguage` is not `"en"`, this skill MUST repair it back to `"en"` as part of every successful invocation. Protects against legacy preferences from earlier skill versions that allowed Turkish prompts.

### Writer (atomic)

Always force `promptLanguage = "en"`:

```bash
TMP=$(mktemp)
jq --arg ol "$NEW_OUTPUT" '
  .global.promptLanguage = "en"
  | .global.outputLanguage = (if $ol == "" then .global.outputLanguage else $ol end)
' "$PREFS" > "$TMP" && mv "$TMP" "$PREFS"
```

### Confirmation echo

Render in the new outputLanguage:

- `en`: `outputLanguage=<Y>. promptLanguage stays "en". External payloads remain English.`
- `tr`: `outputLanguage=<Y>. promptLanguage "en" sabit. Dış çıktılar İngilizce kalır.`

## Validation

- Reject values not in `["en", "tr"]`.
- If `$PREFS` is missing → instruct user to run `/multi-agent-setup` (Copilot) / `/multi-agent:setup` (Claude Code) first.

## Cross-reference

- `multi-agent-setup`  -  first-run language picker (asks only outputLanguage; promptLanguage seeded as `en`)
- `prefs.schema.json`  -  `global.promptLanguage` (fixed `"en"`) and `global.outputLanguage`
- Phase 5 / Phase 6  -  interactive prompts follow the per-field matrix: `question` + `description` in `outputLanguage`, `label` + `header` English
- `multi-agent-help`  -  reads outputLanguage for its own copy
