Profile reference
Every key a profile can have, in the order they usually appear. For a complete example and how the file is found and validated, read The profile first.
Top-level keys
The top level is strict: a key that is not in this table is an error.
| Key | Type | Required | Default | What it is |
|---|---|---|---|---|
version | the number 1 | yes | — | Schema version of the file. |
company | slug | yes | — | A short name for the company. |
languages | object | no | { tickets: en, code: en } | Language of tickets and of code. |
trackers | list of entries | no | [] | Where tickets are read from. |
code | object | no | { hosts: [], groups: {} } | Code hosts and repository groups. |
docs | list of entries | no | [] | Doc sources tickets link to. |
teams | list | no | [] | Who owns which projects and repositories. |
glossary | list | no | [] | Ticket words and their code-side words. |
conventions | list of strings | no | [] | Rules the skills quote to the agent. |
embeddings | one entry | no | { type: ollama, model: bge-m3 } | The embedder for code search. |
plugins | list of strings | no | [] | Extra plugin modules to load. |
A slug matches ^[a-z0-9][a-z0-9-]*$: lowercase letters, digits and dashes, not starting
with a dash.
version
Always 1. Any other value fails with version: Invalid input: expected 1.
company
A slug. It is shown by safran status and safran profile check, returned by the
get_company_profile tool, and handed to every plugin as context.
company: acmelanguages
| Field | Type | What it is |
|---|---|---|
tickets | 2-character string | ISO 639-1 code of the language tickets are written in. Skills write their output in it. |
code | 2-character string | ISO 639-1 code of the language of identifiers and comments. |
The schema checks the length only. When you write languages, write both fields: the default
applies to the whole object, not to each field.
languages:
tickets: tr
code: entrackers
A list of tracker entries. Every entry has these fields; the rest depend on type.
| Field | Type | Required | Default | What it is |
|---|---|---|---|---|
id | slug | yes | — | Your name for this tracker. Unique among trackers. Shown in output and used to say which tracker a reference belongs to. |
type | string | yes | — | The plugin that handles the entry: jira, azure-boards, linear, github-issues, or a type of your own plugin. |
projects | list of strings | no | [] | Project or team keys this tracker owns. |
projects does three jobs. It routes a ticket key to its tracker (PAY-1423 goes to the
tracker that lists PAY), it is the set of keys recognised in pull request titles, branch names
and descriptions when work history is built, and it is what teams[].projects is checked
against. Keys are compared without regard to case.
id: jira
type: jira
url: https://acme.atlassian.net
email_env: JIRA_EMAIL
token_env: JIRA_TOKEN
projects: [PAY, MOB, WEB]Type-specific fields: Jira, Azure Boards, Linear, GitHub Issues.
code.hosts
A list of code host entries. code itself is strict and has exactly two keys, hosts and
groups.
| Field | Type | Required | Default | What it is |
|---|---|---|---|---|
id | slug | yes | — | Your name for this host. Unique among code hosts. Also the directory name of its clones under the data directory. |
type | string | yes | — | azure-repos, github, gitlab, local, or a type of your own plugin. |
include | list of globs | no | [] | Keep only repositories whose name matches one of these. Empty means all. |
exclude | list of globs | no | [] | Drop repositories whose name matches one of these. Wins over include. |
id: azure
type: azure-repos
organization: acme
project: Platform
token_env: AZURE_DEVOPS_PAT
include: ["payments-*", "ledger", "web-app"]
exclude: ["*-archive"]How include and exclude match
*stands for any run of characters (including none),?for exactly one character. Everything else is literal. There are no character classes, no**, no negation.- A pattern must cover the whole name:
paymentsdoes not matchpayments-api;payments*does. - Matching ignores case.
- Each pattern is tried against the repository's short name (
payments-api) and against its host-qualified name (for exampleacme/Platform/payments-api); matching either is enough. excludeis applied first. A repository that matches anexcludepattern is dropped even if anincludepattern names it.
The filter is applied by Safran after the host lists its repositories, so it works the same
for every code host type, including your own plugins. safran repos shows what is left.
When two hosts list a repository with the same short name, the host that comes first in the
profile keeps the short name and the later one is named <hostId>/<name>.
Type-specific fields: Azure Repos, GitHub, GitLab, Local directories.
code.groups
A map from a group name to a list of repository names. A repository may sit in several groups.
Group names are free text; repository names are the short names safran repos prints.
code:
groups:
backend: [payments-api, ledger]
mobile: [acme-ios, acme-android]
frontend: [web-app, admin-panel]Groups scope a search: safran search "kısmi iade" --group backend, groups in the SDK, the
groups parameter of search_code. Several groups widen the scope; a group together with an
explicit repository list narrows it to the repositories in both. Naming a group the profile does
not define is an INVALID_INPUT error that lists the known groups.
The profile schema does not check that a repository named in a group exists on a code host: the hosts are not called during validation. A misspelled name simply never matches.
docs
A list of doc source entries: places tickets link to. Pages are fetched only when a ticket references them.
| Field | Type | Required | What it is |
|---|---|---|---|
id | slug | yes | Your name for this source. Unique among doc sources. |
type | string | yes | confluence, or a type of your own plugin. |
id: wiki
type: confluence
url: https://acme.atlassian.net
email_env: JIRA_EMAIL
token_env: CONFLUENCE_TOKEN
spaces: [PAY]Type-specific fields: Confluence.
teams
A list of teams. Entries are strict: only the fields below.
| Field | Type | Required | Default | What it is |
|---|---|---|---|---|
name | string | yes | — | The team's name. Unique among teams. |
projects | list of strings | no | [] | Tracker project keys the team owns. |
repos | list of strings | no | [] | Repository names the team owns. |
confidence | low, medium or high | no | — | Set by discovery when the mapping was inferred. low must be confirmed by a person. |
source | string | no | — | Where the mapping came from, for example 9 ticket-PR links. |
teams:
- name: Payments
projects: [PAY]
repos: [payments-api, ledger]
- name: Mobile
projects: [MOB]
repos: [acme-ios, acme-android]
confidence: low
source: 9 ticket-PR linksconfidence and source are written by safran discover. safran profile check and
safran owns flag every team with confidence: low until you check the entry and delete the
line. How teams answer ownership questions is on
Glossary, teams and conventions.
glossary
A list of entries. Entries are strict.
| Field | Type | Required | What it is |
|---|---|---|---|
term | string | yes | The word as people write it in tickets. |
code | list of strings, at least one | yes | Identifiers and words the code uses for it. |
note | string | no | A remark for people and for the agent. |
glossary:
- term: İade
code: [refund, chargeback]
note: Partial refunds are "kısmi iade".Two terms that are equal after case folding (İade and IADE) count as the same term and are
rejected as a duplicate. Matching and expansion are described on
Glossary, teams and conventions.
conventions
A list of non-empty strings. Safran does not interpret them: the get_company_profile tool
returns them, and the skills apply them to what they write.
conventions:
- Task titles are written in English.
- Branch names follow feature/<TICKET-KEY>-short-description.embeddings
One entry (not a list) with a type; the other fields depend on the type.
type: ollama
model: bge-m3When the key is missing, this exact entry is used. Type-specific fields: Ollama, OpenAI-compatible.
plugins
A list of module specifiers: package names, or paths relative to the profile file. Each module is imported, and every export that is a Safran plugin (or an exported list of them) is registered next to the built-in ones. A module that exports no plugin, or a type that is already registered, is an error.
plugins:
- ./plugins/acme-tracker.tsImporting a module runs its code. The CLI therefore loads plugins: only from a profile you
named (--profile, SAFRAN_PROFILE) or when you pass --allow-plugins; see
Validation errors.
Writing plugins shows how to write one.
Rules that span entries
These are checked by the profile schema after the individual fields. The messages are the real ones.
| Rule | Message |
|---|---|
| Tracker ids are unique | trackers: duplicate tracker id "jira" |
| Code host ids are unique | code.hosts: duplicate code host id "azure" |
| Doc source ids are unique | docs: duplicate doc source id "wiki" |
| Team names are unique | teams: duplicate team name "Payments" |
| Glossary terms are unique after case folding | glossary: duplicate glossary term "IADE" |
| A project key is listed under one tracker only (case ignored) | trackers.1.projects: project "pay" is also listed under tracker "jira"; a ticket key must map to one tracker |
| A team's project is listed under some tracker | teams.0.projects: project "WEB" is not listed under any tracker |
The last rule is only applied when at least one tracker lists a project. A profile with teams and no tracker projects yet is accepted.
Ids are unique per kind, not across kinds: a tracker and a doc source may both be called
atlassian.
The schema as written
This is the schema from the source. TrackerEntry, CodeHostEntry, DocSourceEntry, Team
and GlossaryEntry in @safran/profile are the types of its parts; Profile is its output
and ProfileInput what you may write.
export const profileSchema; // defined in packages/profile/src/schema.ts
export const DEFAULT_EMBEDDINGS = { type: "ollama", model: "bge-m3" } as const;defined in packages/profile/src/schema.ts
/** A validated profile: defaults applied, connector entries still carrying their type-specific fields. */
export type Profile = z.output<typeof profileSchema>;
/** What a user may write: every defaulted field optional. */
export type ProfileInput = z.input<typeof profileSchema>;defined in packages/profile/src/schema.ts
Common mistakes
- Writing
project:on a tracker. Trackers takeprojects, a list. (Theazure-reposcode host acceptsprojectas shorthand for a single entry of its ownprojects; that is a field of that connector, not of the profile.) - Listing only one of
languages.ticketsandlanguages.code. Both are required once the key is present. - Expecting
include: [payments]to matchpayments-api. Patterns cover the whole name. - Putting a token in the file.
_envfields hold a variable name; see Secrets.