# Setup Step 6  -  Remember as Multi-Repo Group (full contract)

> Loaded by `setup/SKILL.md` Step 6. The SKILL keeps the trigger and the skip condition; this file carries the prompt, the auto-name heuristic, the saved shape, the LRU + dedup rules and the skip rules. Read it before Step 6.

After Step 5, if the user picked **2 or more** repos, offer to remember the combination as a named group. Phase 0's project picker surfaces saved groups at the top, so a multi-repo task ("update token resolver in `common` + `uicomponents`") becomes a single keypress next time.

Auto-skipped if Step 5 was skipped or fewer than 2 repos were selected.

**Prompt:**
```
Step 6  -  Remember as a multi-repo group (optional)
You picked 2 repos: Checkout, UIComponents.

Save this combo for one-tap selection in Phase 0?
  Group name (Enter for auto): [Checkout + UIComponents]
  Skip with 'n'.
```

**Auto-name heuristic** (suggested but editable):
- 2 repos    → `"<repoA> + <repoB>"`
- 3-4 repos  → `"<repoA>, <repoB>, <repoC>(+1)"`
- 5+ repos   → `"<repoA> + <count-1> more"`

Repo identifiers in the label are the human label from `recentProjects` (basename of the path, not the full path), so groups stay readable.

**Save** (matches schema `global.recentGroups[]` shape  -  `repos` required, `label` / `count` / `lastUsed` optional):

```json
{
  "global": {
    "recentGroups": [
      {
        "label": "Checkout + UIComponents",
        "repos": ["~/dev/Checkout", "~/dev/UIComponents"],
        "count": 1,
        "lastUsed": "2026-04-15T21:08:00Z"
      }
    ]
  }
}
```

**LRU + dedup rules:**
- New group → unshift to front of `recentGroups`.
- Same set of `repos` already exists (order-independent compare) → bump existing entry to front, increment its `count`, update `lastUsed`. Do NOT create a duplicate.
- Schema cap is 10 entries; oldest LRU entries past the cap are dropped.

**Skip rules:**
- Single-repo selection → step is a no-op (no group needed for one repo).
- User answers `n` → not saved; the picker still works for one-time use, and a future Phase 0 selection of the same combo will re-prompt.
- Step 5 skipped → Step 6 is also skipped (no selection to remember).
