## Render when `LANG == "en"`  -  English guide

```
+----------------------------------+
|             Multi-Agent Task Orchestrator                |
+----------------------------------+

5 different input types supported  -  all enter the same flow:

  /multi-agent "{JIRA_KEY}-XXXXX"                 -> Jira ID
  /multi-agent "https://{JIRA_HOST}/browse/..."   -> Jira URL
  /multi-agent "https://github.com/.../issues/N"  -> GitHub Issue URL
  /multi-agent "#316"                              -> GitHub Issue #
  /multi-agent "bug/feature description"           -> Free-text

------------------------------

How It Works (Phase 0  -  Interactive Flow):

  1. PARSE       Classify input, fetch info from Jira/GitHub
  2. PROJECT     $HOME scanned, projects listed -> select by number
  3. BRANCH      Remote branches fetched (develop* first) -> select
  4. DESIGN?     Any Figma URL or screenshot? (optional)
  5. BRANCH NAME bugfix/{jiraId} or feature/{jiraId} -> confirm
  6. GIT ID      Select identity from preferences (multiple supported)
  7. INSTRUCTION Auto-detect if .instructions/ exists (figma etc.)
  8. WORKSPACE   Ask where the branch lives: worktree (default) or project root

------------------------------

Pipeline (after Phase 0)  -  shown as visual cards in terminal:

  Phase 0:   Init       -> The 8 steps above
  Phase 1:   Plan       -> Stack detection + codebase scan, task breakdown, architecture
                          review, Plan Approval Gate (Opus; max 2 clarification rounds,
                          interactive only  -  autopilot has nobody to ask)
  Phase 2:   Dev        -> TDD: test -> code -> build (Sonnet) + build queue, then the
                          Verify exit gate: build, lint, tests, secrets. The build runs
                          ONCE per run and its log carries into Review
  Phase 3:   Review     -> Parallel AI review + Fable triage, then the optional user test
                          (Claude Code: Fable + Opus + Sonnet · Copilot: GPT-5.4 + Opus + Sonnet;
                          the user test is the interactive half: branch, test in Xcode)
  Phase 4:   Commit     -> Commit -> push -> PR + issue body update (never auto-closes)
  Phase 5:   Report     -> Channels dispatcher (PR · Jira · Confluence · Wiki, multi-select)
                          + internal capture (agent-log · knowledge · memory)

  Autopilot always pauses at the Phase 5 channels menu (30-min timeout → session ends cleanly).

  One pipeline. Every mode runs its whole phase set:
    Plan -> Dev(Sonnet) -> Review -> Commit -> Report
  What a run costs follows the evidence the task carries, not an answer taken
  before the evidence exists.

  Every step is logged. Error in any phase -> pause -> resume to continue.

------------------------------

Modes:

Pipeline entries:

  /multi-agent "task"                  Worktree
  /multi-agent:autopilot "task"        Worktree, no questions

  Phase 0 Step 5b asks where the branch lives; there is no flag for it.
  autopilot skips every confirmation INCLUDING the plan gate and the workspace
  question, and auto commit/PR  -  EXCEPT the Phase 5 channels menu, which
  always pauses.

  /multi-agent:resume [#id|jira-id] [autopilot]       Pick up unfinished work: a stopped run, or a branch with no run behind it (Review → Commit/PR → Report)

------------------------------

Status & Resume:

  /multi-agent:status         List tasks across all projects (id, phase, branch, state)
  /multi-agent:log [#id]      Show task log (defaults to most recent)
  /multi-agent:resume [#id]   Resume a paused or failed task from where it stopped
  /multi-agent:kill [#id]     Stop task + delete worktree (logs preserved)
  /multi-agent:steer #id "..."  Correct a running task without stopping it (applied at the next phase)
  /multi-agent:prune-logs     Delete per-task project logs (audit + metrics kept; age/project/task filters, dry-run first)
  /multi-agent:prune-prompts  Zero-base prompt review: measure always-on instruction footprint, propose keep/trial/delete per rule (report first, apply on approval)
  /multi-agent:garbage-collect  Sweep run residue; --abandoned reaps stopped runs
  /multi-agent:purge          Worktree + logs  -  full reset (double confirm)
  /multi-agent:autopilot-on   Continuous mode on this machine: pick repos, labelled items run to a PR
  /multi-agent:autopilot-status  Running, queued, awaiting an answer, today's PRs
  /multi-agent:autopilot-off  Stop picking work up (running work finishes; --now stops it)
  /multi-agent:serve          Contract server for a client: 127.0.0.1, token, stops when idle

Post-Hoc & Side-Channel:

  /multi-agent:channels       Post multi-channel report (Jira / Confluence / Wiki / PR description)
  /multi-agent:feedback "msg"  Tell the maintainer something broke; only your text is sent
  /multi-agent:review         Parallel review of a PR or branch diff; no URL -> pick open GitHub/Bitbucket PRs
  /multi-agent:review-jira    Grade a Jira issue's pipeline-readiness -> comment the gaps on it
  /multi-agent:review-issue   Grade a GitHub issue's pipeline-readiness -> comment the gaps on it
  /multi-agent:analysis ["name"]  Feature-spec analysis (Figma + Swagger + Confluence + repos). Asks the standard first: global (23-section dev handoff) or corporate (IG→UC→FG requirements doc). Stack optional; References built from the evidence record
  /multi-agent:analysis-resolve [doc]      Resolve Section 20 open questions of an analysis doc, one at a time with source-labeled candidates
  /multi-agent:research <id>  Research an item's gaps in tracker, docs and repo before asking; a gate decides what closed
  /multi-agent:review-analysis [doc]  Review a written analysis; findings cite the rule they break
  /multi-agent:analysis-jira [doc]    A final analysis -> a Jira story tree; coverage two-way, existing nodes skipped
  /multi-agent:complaint-analysis ["run-name"]  Customer-complaint triage: Graylog evidence per trx/conv id + read-only repo correlation → root cause + fix plan, or core routing
  /multi-agent:build-optimize iOS-only Xcode build perf wrapper → benchmark + analyze + recommend-first .build-benchmark/optimization-plan.md
  /multi-agent:create-jira ["desc"] [figma-url] [swagger-url]  Create a Jira Task/Bug/Story matching team conventions (type, sprint, preview + approval)
  /multi-agent:diff-explain   Map a Phase 3 triage finding back to specific diff lines
  /multi-agent:estimate <doc|text>  Effort range from similar closed work: P25-P75 per role, with the tickets behind it
  /multi-agent:scenario-audit <csv>  Test scenarios vs the code: PRESENT / PARTIAL / ABSENT / UNCLEAR, each PRESENT on a resolving file:line
  /multi-agent:graph         Build and query the repo code graph (symbols, imports, references), LLM-free
  /multi-agent:search         Cross-task log search with smart ranking; --semantic queries triage corpus
  /multi-agent:scan           Skill security scan against tiered pattern catalog
  /multi-agent:security-review  Standalone defensive static security review: threat model, OWASP + CWE + CVSS findings, dep inventory. No live target.
  /multi-agent:doctor         Would a run work here? Layout, prefs, credentials, hooks; exit code is the verdict
  /multi-agent:refactor       Best practices + bug hunt + upstream drift + toolkit MCP research -> one plan, approval, dev + sync
  /multi-agent:refactor backlog  Decide the friction already recorded about the pipeline itself, nothing re-derived
  /multi-agent:store-ready [repo] [flags]  Pre-submission store readiness, iOS + Android, local-only; a skipped gate is never a pass; never ships a build.
  /multi-agent:testflight-validation [repo] [--ipa=|--archive=]  iOS-pinned alias of :store-ready. Same three gates, one implementation.
  /multi-agent:ios-coding-standard [module]  Audit an iOS module against the 99-rule coding-standard registry -> remediation
                              plan + one-page onboarding summary -> hand off to /multi-agent. Read-only, never edits source.

Setup & Maintenance:

  /multi-agent:setup          First-run wizard  -  Keychain tokens + Git identity + language
  /multi-agent:language [en|tr]   Show or set outputLanguage (promptLanguage stays English)
  /multi-agent:model [on|off] Turn the top model rung (fable) on or off; keeps costBudget.pricingModel in step
  /multi-agent:route-on       Arm policy-driven model routing: strategy, scope, rules. Ships off
  /multi-agent:route-off      Disarm routing and KEEP the rules, so route-on does not re-ask
  /multi-agent:route-status   What is armed, which rule applies where, and the limit: subagents stay on Anthropic
  /multi-agent:stack [ids...]  Enable stack plugin(s); multi-select: ids together (ios backend) or no arg -> native picker (common always on)
  /multi-agent:scaffold <stack> <name>  New project from the toolkit's scaffold skill; green before the first commit, no remote
  /multi-agent:sync           Sync ecosystem (Claude Code + Copilot CLI + pipeline + website + toolkit MCP)
  /multi-agent:update         Pull latest pipeline + reinstall + run migrations
  /multi-agent:uninstall      Uninstall pipeline from every CLI (--all-data also clears settings, logs, memory + knowledge; tokens always intact)

------------------------------

Plugins & tools (called directly, no wrappers):

  Stack plugins    ai-<stack>-toolkit:<skill>, e.g. ai-ios-toolkit:create-component
                   Catalog: ai-<stack>-toolkit:help   Enable per repo: /multi-agent:stack (common + analyst always on)
  Toolkit MCP      multi-agent-toolkit  -  80+ tools for a RUNNING app, no pipeline run needed:
                   ios_* / android_* (launch, tap, screenshot, ui tree, logs, crashes,
                   locale, dark mode), web_*, design_* (Design Check above), and the
                   audits (ios_app_store_audit, ios_testflight_validate, android_apk_audit,
                   *_accessibility_audit). Use them instead of guessing about on-screen
                   state. Its registration survives uninstall. Not registered = silent no-op.

------------------------------

Routines (your own reusable jobs):

  /multi-agent:save [name]    Save a recurring job as a reusable /multi-agent:<name> command
  /multi-agent:routines       List your saved routines and what each does
  /multi-agent:forget [name]  Remove a saved routine
<!-- ROUTINES_DYNAMIC: after printing the static lines above, read prefs.global.routines; if non-empty, append one indented line per routine "  /multi-agent:<name>   <description>" under a "Your saved routines:" subheading, in outputLanguage. If empty, print "  (none yet - use /multi-agent:save)". -->

------------------------------

Interactive Launchers:

  /multi-agent:jira           List MY open Jira issues → pick → branch → mode → go
  /multi-agent:issue          List UNASSIGNED GitHub issues → pick → auto-assign → go

  Both follow the same flow after selection:
    1. Branch selection (develop/release/main)
    2. Autopilot: yes/no
    3. Pipeline starts with the selected issue

------------------------------

UI Testing (standalone  -  not part of pipeline phases):

  /multi-agent:test                  Full simulator test (screenshot all screens)

  Fixed-scenario commands  -  no quoting, and they autocomplete off `test-`:

  /multi-agent:test-dark-mode        Dark mode bug test
  /multi-agent:test-accessibility    Accessibility audit (labels, tap targets, contrast)
  /multi-agent:test-dynamic-type     Large text size test
  /multi-agent:test-screenshots [tr] App Store screenshot set in a locale (default tr)

  The scenario-tag form still works; each command above is its alias.

  /multi-agent:test "dark mode" | "accessibility" | "dynamic type" | "screenshot <lang>"

  `store-ready` is NOT a UI test: it validates a built package, on iOS and Android,
  through three gates per platform, and lives at /multi-agent:store-ready. The old
  /multi-agent:test "store-ready" [path] tag still works and hands off there.

  /multi-agent:bug-bash [scope]      Parallel exploratory sessions by charter and persona, each with a budget; a finding is reported only when a repro test fails for its reason

  Uses xcrun simctl / adb (native, no external app needed).
  Booted simulator/emulator required. Auto-detects bundle ID from project.

Manual Test (Phase 3 user-test step, standalone  -  Xcode hint flow):

  /multi-agent:manual-test           Checkout task branch, print Xcode/SourceTree hints,
  /multi-agent:manual-test #N        wait for your "ok" / "fix: ..." verdict.

Design Check (mock-mode vs Figma, local-only):

  /multi-agent:design-check                Whole-module audit: enumerate every state driver into a countable
                                           target set, build Debug in a worktree, drive each in mock mode,
                                           diff against its Figma frame, export HTML+PDF to ~/DesignChecks.
  /multi-agent:design-check <screen>       Scope to one screen (e.g. order-status).
  /multi-agent:design-check <screen@var>   Scope to one variant (e.g. order-status@expired).
  /multi-agent:design-check <figma-url...> Scope to the frame(s) those URLs name.
  /multi-agent:design-check --resume       Audit what the last run for this repo+module left unaudited.
  # COVERAGE GATE: every target is audited or skipped WITH a concrete reason; anything else reports
  # INCOMPLETE with the missing ids. "Needs a scenario/launch-arg" is not a reason, reaching it is the job.

------------------------------

Setup:

  /multi-agent:setup

  Interactive onboarding:
  1. Dynamic Keychain Discovery  -  finds existing tokens by keyword
  2. Token Mapping  -  maps found keys to services (preferences)
  3. Jira Project Key  -  your team's key (MOBILE, APP, ENG, etc.)
  4. Git Identity  -  corporate + personal (saved to preferences)
  5. Missing Tokens  -  standard key names + ready-to-paste commands
  6. Verify  -  re-scan, confirm ready

------------------------------

Key Features:

  Multi-Platform   iOS, Android, Backend, Web  -  auto-detected
  Build Queue      xcodebuild/Gradle serialized with lock file  -  parallel safe
  Stack Aware      Auto-detects iOS/Android/Python/Node/Go/Docker, uses the enabled stack plugin's skills
  Det. Gates       Build + lint + test + secret scan before AI review
  Multi-Repo       Per-repo worktrees + identity, integration build before commit
  Identity Routing Git identity picked from the repo origin URL (corporate vs personal)
  Issue Safety     Never auto-closes issues (4 approvals, GitHub + Jira)
  Store Compliance /multi-agent:test "store-ready"  -  18-rule iOS audit (ITMS, Privacy Manifest, signing, debug leaks, IPv6, SDK) + 21-rule Android audit
  Bilingual        EN + TR  -  outputLanguage toggles assistant explanations; promptLanguage is locked en

Quality & Telemetry (advisory, on by default  -  flip prefs.global.* to disable):

  Diff Risk Score  Phase 3 Step 1.75 ranks files before reviewer dispatch  -  heuristic, sub-second: security paths, migrations, no-test-change, complexity
  Test Gap Report  Phase 3 surfaces public symbols added in this branch with no paired test
  Visual Evidence  before/after stills + flow video on UI changes; Step 7.7 asks the depth
  Cost Breakdown   Phase 5 appends per-phase tokens + estimated USD to agent-log.md
  Triage Memory    Phase 5 ingests accepted/deferred/rejected findings into a repo corpus
  Prior-Art Lookup Phase 1 + Phase 3 query the corpus for similar findings, inject as context
  Per-Persona      Dispatch reads `preferredModel` from the persona file; PHASE_MODEL_OVERRIDE overrides per call; ladder fable -> opus -> sonnet -> haiku

------------------------------

Examples:

  # Full pipeline with Jira (key configured during setup)
  /multi-agent "MOBILE-12345"

  # Interactive launchers  -  browse and pick
  /multi-agent:jira                    # Pick from my Jira issues
  /multi-agent:issue                   # Pick from unassigned GitHub issues

  # Free-text  -  any platform
  /multi-agent:autopilot "LoginView dark mode fix"               # iOS
  /multi-agent "Add pagination to /api/users endpoint"           # Backend
  /multi-agent "Fix bottom nav recomposition in HomeScreen"      # Android
  /multi-agent "Responsive layout broken on tablet"              # Web

  # Review current diff only
  /multi-agent:review

  # Create a Jira issue that matches team conventions (preview + approval before create)
  /multi-agent:create-jira "Profile screen empty state" https://figma.com/design/abc?node-id=1-2

------------------------------

Logs: $HOME/.claude/logs/multi-agent/{project}/{task-id}/
```
