# Setup  -  Per-account hosts and auto-learned fields

> Loaded by `setup/SKILL.md` Step 3.6 and its auto-learned-fields note. The SKILL keeps when Step 3.6 runs and the autopilot skip; this file carries the prompt, the saved shape and the resolver precedence, plus the fields the pipeline learns from use instead of asking.

## Per-account host overrides (Step 3.6)

Use case: a single user with two corporate identities (e.g. agency + client). Each account points at its own Jira host  -  `prefs.global.hosts.jira` can hold only one default, so per-account overrides win for the rest.

For each non-default account, ask once:

```
Account {label} has Jira/Bitbucket tokens but no host override yet.
Use the global default ({hosts.jira}) or set a per-account host?

  1) Use global default
  2) Set per-account host
```

If `2`, prompt for `jiraHost` / `bitbucketHost` / `confluenceHost` (each optional). Save to `prefs.global.accounts[]` as `{ \"id\": \"client-x\", \"jiraHost\": \"client-x.atlassian.net\", \"bitbucketHost\": \"bitbucket.client-x.com\" }`.

`account-resolver.sh` reads this on every invocation; per-account override wins over `global.hosts.*`. Skip this step on autopilot  -  `accounts[]` stays empty until the user opts in via `/multi-agent:setup accounts`.

## Auto-learned fields

**Jira Project Key**: auto-learned from pipeline usage. User runs `/multi-agent ABC-123` → `ABC` is extracted and saved to `prefs.global.defaultJiraKey` (first ever) and `prefs.projects[{project}].jiraProjectKeys` (per-project). Multiple keys accumulate over time  -  most recent first, deduped. Phase 0 Step 1 (Parse Input) handles extraction.

**Git Identity**: auto-learned from token onboarding. Each token saved in Step 3 triggers an identity prompt (see Token Save Flow Step C). No separate identity setup step.
