# Team template format

> The alaskan.team JSON format. Dogs with jobs, personas, rules, routines and apps; the dashboard's views; the workflows a team installs; and sample work.

Canonical: https://alaskanlabs.com/docs/team-templates

A team template is one JSON file, `teams/<slug>.json`, with `kind: "alaskan.team"`. Slugs are lower-case letters, digits and dashes, and the file is named after its slug.

```json
{
  "kind": "alaskan.team", "version": 1, "slug": "dental-clinic", "name": "Dental clinic front desk",
  "for": "Dental and medical clinics with a front desk", "summary": "…",
  "author": { "name": "Alaskan Labs" }, "license": "MIT",
  "dogs": [{
    "key": "homer", "name": "Homer", "job": "Booking: appointments and reschedules",
    "breed": "husky", "coat": "ember", "lead": false, "tagline": "…", "persona": "…",
    "rules": { "justDo": ["Send appointment confirmations"], "ask": ["Book or move an appointment"], "never": ["Book over a blocked slot"] },
    "routines": [{ "title": "Confirm tomorrow's appointments", "when": "weekdays 16:00" }],
    "connectors": ["googlecalendar", "twilio", "gmail"]
  }],
  "dashboard": { "views": [{ "type": "metrics", "title": "This week", "items": [
    { "label": "Appointments booked", "source": "ledger", "match": { "dog": "homer", "kind": "book", "status": ["approved", "auto"], "since": "week" } }
  ] }] },
  "workflows": ["appointment-recall-reminders"],
  "sample": { "decisions": [], "sessions": [], "messages": [] }
}
```

## The shape

```
TeamTemplate { kind: "alaskan.team", version: 1, slug, name, for, summary, author: {name},
               license, dogs: [Dog], dashboard: {views: [View]}, workflows: [slug],
               sample: {decisions, sessions, messages} }
Dog          { key, name, job, breed, coat, lead?, tagline, persona,
               rules: {justDo, ask, never}, routines: [{title, when}], connectors: [app] }
View         { type: "decide" | "metrics" | "board" | "ledger" | "computer" | "schedule",
               title?, items?: [{label, source: "ledger" | "sessions", match: {dog?, kind?,
               status?, since?: "today" | "week"}}], columns?: [string] }
```

## Dogs

- **1 to 12 dogs**, exactly one with `lead: true`.
- `breed` is `malamute`, `husky` or `kleekai`; `coat` is `aurora`, `ember`, `glacier` or `twilight`. Together they pick the dog's picture.
- `job` is "Area: what it does" ("Booking: appointments and reschedules"). The part before the colon is the dog's role tag in the sidebar.
- `persona` is what the dog is told about how it works.
- `rules` are plain sentences: `justDo` happens at once with a 10-second undo, `ask` comes to Decide, `never` is refused. See [Rules](/docs/rules).
- `connectors` are app slugs: `gmail`, `googlecalendar`, `slack`, `hubspot`, `attio`, `stripe`, `quickbooks` and so on.

## When

Routines and scheduled workflows use one small format: `hourly`, or days and a 24-hour time.

```
daily 07:30    weekdays 08:00    weekends 10:00    mon 09:00    mon,thu 16:00
```

Times are in the workspace's time zone.

## The dashboard

`dashboard.views` is the list of views the workspace opens on, in order: `decide`, `metrics`, `board`, `ledger`, `computer` or `schedule`.

A `metrics` item counts decisions (`source: "ledger"`) or sessions (`source: "sessions"`) that match a dog (by key), a kind, a status (one or a list) and `since` (`today` or `week`). The workspace returns each item with its value. A `board` has `columns`, which are session statuses (`queued`, `running`, `needs_you`, `done`).

## Workflows

`workflows` lists workflow template slugs. They're installed with the team. See [Workflow template format](/docs/workflow-templates).

## Sample work

`sample` is work that makes a new workspace look real until real work replaces it. Every row it makes is marked `sample: true`, and sample chat lines are never sent to a model. Times count back from when the workspace is made (`agoMinutes`, `decidedAgoMinutes`); `expiresInMinutes` and an outcome's `checkInMinutes` count forward. `{{owner}}` becomes the person who made the workspace and `{{company}}` its name.

- `decisions`: `dog`, `kind`, `title`, `summary`, `source`, `items` (`{label, field, from?, to, flagged?}`), 1 to 4 `options` (`{key, label, detail?, effect?: "approve" | "decline"}`), `reasoning`, `evidence` (`{label, url?}`), `thread` (`{from, text, agoMinutes?}`) and `status`. A decided one adds `decidedBy` (`{kind: "person" | "rule", name}`), `chosen` or `typed`, and optionally `outcome` (`{status, note}`).
- `sessions`: `dog`, `title`, `status` (`running`, `needs_you`, `queued`, `done`), `minutes`, `costCents` and `steps` (`{kind: "look" | "think" | "act" | "result", text}`).
- `messages`: `dog`, `role` (`user` or `dog`), `text`.

## Validation

The server reads every template when it starts and refuses to start if one doesn't validate, naming each problem. Start from [the Starter team's JSON](/teams/starter.json).
