---
description: "Multi-channel reporter  -  Jira/Confluence/Wiki/PR description/Board status. Multi-select channels + content, humanizer pass, reviewer-preserving Bitbucket PR PUT, GitHub Projects v2 board status move. Also writes the run's report to a local file on every run, whatever the channels did. Use to post or redo a run's report; Phase 5 delegates here, or invoke by Jira ID / PR URL / branch."
description-tr: "Çok kanallı raporlayıcı - Jira/Confluence/Wiki/PR açıklaması/Board durumu. Çoklu kanal + içerik seçimi, humanizer geçişi, reviewer'ı koruyan Bitbucket PR PUT, GitHub Projects v2 board durum taşıma. Her koşuda, kanallardan bağımsız olarak, koşunun raporunu yerel bir dosyaya da yazar. Faz 5 bu skill'e delege eder; Jira ID / PR URL / branch ile sonradan da çağrılabilir."
argument-hint: '[Jira-id | PR-url | #N | Jira-url] [--channels pr,jira,confluence,wiki,board] [--content normal,technical,test,auto-diff,note,test-run] [--flow-run <runId>] [--message "..."] [--message-file path] [--board-status <key>] [--dry-run] [--append] [--ready] [--file-only]'
parameters: [{"name":"target","kind":"text"},{"name":"--channels","kind":"enum","repeat":true,"enum":["pr","jira","confluence","wiki","board"]},{"name":"--content","kind":"enum","repeat":true,"enum":["normal","technical","test","auto-diff","note","test-run"]},{"name":"--flow-run","kind":"text"},{"name":"--message","kind":"text"},{"name":"--message-file","kind":"path"},{"name":"--board-status","kind":"text"},{"name":"--dry-run","kind":"flag"},{"name":"--append","kind":"flag"},{"name":"--ready","kind":"flag"},{"name":"--file-only","kind":"flag"}]
gui: form
destructive: false
confirm: none
allowed-tools: Read, Write, Edit, Bash, Grep, WebFetch, AskUserQuestion
---

# /multi-agent channels - Multi-Channel Reporter

**Access check, before anything else.** This command can write outside this machine, so a login the site closed is stopped here, before any question or write.

```bash
ACCESS_LINE=$(node "$HOME/.claude/scripts/usage-access.mjs"); ACCESS_RC=$?
```

`ACCESS_RC` 3: print `$ACCESS_LINE` as written and stop: no question, no write, attended or unattended. Any other exit continues (the check fails open). Contract: `$HOME/.claude/multi-agent-refs/features/usage-reporting.md` "The access check".

Single entry point for posting a task report to Jira, Confluence, Wiki (component-only), the PR description and Board status (GitHub Projects v2). Phase 5 delegates here; users also invoke it post-hoc by Jira ID / PR URL / branch. Claude Code: `/multi-agent:channels <target>`; Copilot CLI: `multi-agent-channels <target>`.

Every run that composes a body also writes it to `task-report.md` beside the run's `agent-log.md`. That file is not a channel and has no setting: it is what a machine with no tracker, an unattended run and a cancelled menu are left with. Contract: `$HOME/.claude/multi-agent-refs/channels/report-file.md`.

## Gotchas

- Nothing is posted before the Step 6 approval gate resolves, in every interactive mode. Under `MULTI_AGENT_UNATTENDED=1` nothing is posted at all. The report file is still written in both cases; it is not a post.
- Jira renders `:)` `(x)` `(!)` as emoticons, so a Swift selector like `login(source:input:)` breaks. Post through `jira-publish.sh`, which escapes the body; never assemble the request by hand.
- A Bitbucket PR update must carry the reviewer list back, or the PUT removes every reviewer.
- With several repos, the PR description goes to every PR but Jira and Confluence get one post each.

## Flow

`resolve target -> fetch context -> menu (or flags) -> generator -> humanizer -> approval -> dispatch -> summary`. Before Step 1, read `$HOME/.claude/multi-agent-refs/channels/reference.md`: input forms, flags, the Step 1 resolution detail, the Step 4 mode table, error handling and the Phase 5 delegation contract.

### Step 1 - Target resolution

Classify the argument (Jira id / url, GitHub or Bitbucket PR URL, `#N`, empty = cwd + branch), resolve the linked Jira / PR, detect `github` or `bitbucket`, store `{jiraId, targets[]}`. Multi-repo (`projects[].length > 1`): one target per project, per `$HOME/.claude/multi-agent-refs/channels/multi-repo.md`. A Phase 5 call passes a state bundle and skips Step 1.

### Step 2 - Context source detection

Pipeline log, PR diff, or a manual message, best first. Read `$HOME/.claude/multi-agent-refs/channels/menu.md` before Step 2: the source table and the Step 3 menu rules.

### Step 3 - Multi-select menu

Step 3a prints the Work Summary first (summary-first flow) when `agent-state.json` exists, and auto-ticks that content row; an explicit pref wins. Step 3b: **Channels** (PR description, Jira comment, Confluence page, Wiki, Board) and **Content**; an unavailable option is greyed with a reason, never hidden. Selections pre-tick from and save to `prefs.global.reportChannels` / `prefs.global.reportContent`. Autopilot still pauses here; unattended posts nothing (`$HOME/.claude/multi-agent-refs/features/unattended-security.md`).

Above the picker, print one line: the report file is always written, and where. Zero channels ticked is a valid selection and means file-only. When no channel is selectable at all, print the greyed rows with their reasons as text and ask only Content.

### Step 4 - Mode short-circuit

`--channels` + `--content` flags, autopilot (prefs), `--dry-run` and `--file-only` skip or shortcut the menu (table in `reference.md`).

### Step 5 - Generator

One section body per selected content source, each run through the `humanizer` skill per channel. Read `$HOME/.claude/multi-agent-refs/channels/generator.md` before generating: the content options, the template, store compliance, work and cost summaries, and the Jira-versus-PR rule.

- **The Jira body is not the PR body.** Jira gets only `Geliştirme Özeti`, `Test Senaryoları`, `Etki Analizi` and `Bağlantılar` (plus the test run when selected); technical sections are dropped from it, never converted, and go to the PR and Confluence.
- PR section order is fixed by `channels/pr.md`; content options are sources, not the shape.
- Target length: under 80 lines; auto-diff capped at 5 lines per section.
- **After the humanizer, write the report file** (`report-file.mjs write`), before Step 6. The file always carries one PR-shaped body: the PR body when `pr` is selected, otherwise a `Report` body composed in the `channels/pr.md` order with the PR tone.

### Step 6  -  Body preview + approval gate

Every interactive run, menu mode and flag mode alike, shows the final bodies before any external write. Skipped in exactly two cases: autopilot (`state.autopilot === true` or `MULTI_AGENT_AUTOPILOT=1`, attended) and `--dry-run` (prints without posting). Read `$HOME/.claude/multi-agent-refs/channels/preview.md` before rendering: conversion table, block layout, option table.

One `AskUserQuestion` (`picker-contract.md`; `question` / `label` / `description` in `outputLanguage`, `header` English): `Approve & post` / `Edit` (loop) / `Skip channels` / `Cancel` (nothing posted).

**Hard rule:** what is posted is byte-identical to the approved preview (markup conversion excepted). Any regeneration after approval invalidates the approval and re-runs the gate.

The report file is not a post and is outside this gate: `Edit` rewrites it, `Cancel` leaves it in place.

### Step 7 - Channel dispatch

Adapters run in parallel; one failure does not block the others. The report file is not an adapter, and no adapter failure affects it. Dispatch NEVER starts before the Step 6 gate resolves, except autopilot and `--dry-run`. Multi-repo: `channels/multi-repo.md`.

- **PR description**: GitHub `gh pr edit --body-file`; Bitbucket a reviewer-preserving `PUT` that re-sends `reviewers`, `fromRef`, `toRef`, `draft`, `version`. Replace by default, `--append` opt-in. Contract: `$HOME/.claude/multi-agent-refs/channels/pr.md`.
- **Jira comment**: PR URL on line 1, then the four sections. Post with `bash "$HOME/.claude/lib/jira-publish.sh" --issue "$JIRA_ID" --body-file "$F" --target comment` (escapes the body, token never on argv). Contract: `$HOME/.claude/multi-agent-refs/channels/jira.md`. Issue family (`state.jiraFamily`): `jira-family-write.sh plan`, preview, `apply`, per `$HOME/.claude/multi-agent-refs/features/jira-family.md`.
- **Confluence page**: `$HOME/.claude/multi-agent-refs/channels/confluence.md`.
- **Board**: `$HOME/.claude/multi-agent-refs/channels/board.md`.
- **Wiki**: only when `taskType === "component"` and `wiki.enabled`, otherwise the Case B menu from `$HOME/.claude/multi-agent-refs/wiki-capture.md`; once wiki pages are written, the Wiki-to-Jira comment needs `prefs.global.wikiToJiraComment`. Contract: `$HOME/.claude/multi-agent-refs/channels/wiki.md`.

### Step 8 - Summary

One line per channel (status, metric, URL), format in `reference.md`; persist the selections to prefs. Re-run `report-file.mjs write` with `--delivery` to stamp the outcomes, then print the `Report file` row last.

## Required rules

- **Bitbucket reviewer preservation**: every PR PUT carries current `reviewers`, `fromRef`, `toRef`, `draft`.
- **Replace, not append**, for the PR description unless `--append`.
- **Real newlines, no HTML entities** in every body: heredoc + `jq --rawfile` + `curl --data-binary @file`; never a literal `\n`.
- **Humanizer per channel**; tones differ.
- **No markers**: a full replace each run, no `<!-- channels:start -->` bookmarks.
- **Every body item cites a symbol / file / line** from the diff or log.
- **Adapter failures are non-blocking**.
- **Approval before post**: autopilot and `--dry-run` are the only bypasses.
- **Report file every run**: written whenever a body was composed, never gated, never posted; `--dry-run` is the only case that composes and does not write.
- **Phase 5 autopilot** always pauses at the menu; a 30-min timeout ends the session cleanly, resumable via `/multi-agent:resume`.
