# Tamer skills — catalogue and role mapping

Skills provisioned into every supervised worker's workspace at orchestrator
boot by `installRoleSkills` (`src/sync-rules.ts`). Every shipped skill carries
a `[tamer]` prefix in its `description`, so a worker listing its skills can
tell which came from tamer and which came from elsewhere.

## What a worker receives

The `common` tier is always installed. On top of it, the tier matching each
resolved role is installed. Tiers are **flattened** on install — the tier level
does not survive into the target, because Vibe scans only the immediate
subdirectories of each skill path.

| `--role` value | canonical role | tier installed | skills | total with common |
|---|---|---|---|---|
| `dev` (default) | `dev` | `dev/` | debug, implement, protocol, security | **11** |
| `reviewer` | `review` | `review/` | review, revue | **9** |
| `tester` | `test` | `test/` | testing | **8** |
| `architect` | `architect` | `architect/` | adr, design-review | **9** |
| `doc-writer` | `doc-writer` | `doc-writer/` | changelog, release-notes | **9** |
| `security` | `security` | `security/` | secret-scan, threat-model | **9** |

`common/` (7, every role): bug, commit, cross-repo, fix, track, usecase,
user-doc.

Roles are additive and comma-separated: `--role dev,security` installs
`common` + `dev` + `security` (13 skills). Aliases resolve to the same
canonical role — `developer`→`dev`, `tester`→`test`, `reviewer`→`review` — see
`ROLE_LABEL_MAP` in `src/role-resolver.ts`.

## Where they land

Both skill-discovery conventions receive the same flattened set
(`ROLE_SKILL_TARGET_DIRS`):

| directory | read by |
|---|---|
| `.agents/skills/` | Vibe (auto-discovered), Codex, Copilot |
| `.claude/skills/` | Claude Code |

`.gemini/skills/` is provisioned as a directory by `templates/agents.yaml` but
is **not** populated: Gemini's skill-discovery format is unverified, and
writing files there on the assumption it matches the others would be a guess.

## Layout contract

```
templates/skills/<tier>/<skill-name>/SKILL.md
                 └─ README.md          (tier doc — never installed as a skill)
```

- One directory per skill, containing `SKILL.md`. Tier-level files such as
  `README.md` are documentation and are deliberately not copied.
- The frontmatter `name` **must equal the directory name**. They diverged once
  (`test/testing/` carried `name: test`), which meant the skill was invoked
  under a name that matched nothing on disk.
- `description` starts with `[tamer] ` and must be a quoted YAML string — an
  unquoted value beginning with `[` parses as a sequence, and the skill is then
  silently undiscoverable.
- `user-invocable: true` for anything a worker should be able to call directly.

## Adding a skill or a tier

1. Create `templates/skills/<tier>/<name>/SKILL.md` with the frontmatter above.
2. If the tier is new, add a `README.md` beside it, and make sure the role is a
   key in `ROLE_LABEL_MAP` — a `--role` value absent from that map is accepted
   by the flag and then silently discarded, yielding neither skills nor role
   rules.
3. Update the table above.

`tests/role-based-skills.test.ts` ratchets points 1 and 2: every
`VALID_WORKER_ROLES` value must be a `ROLE_LABEL_MAP` key, and every canonical
role reachable from `--role` must have a tier on disk.
