Skip to content
safran

Illustration: a saffron crocus in a terracotta pot on a stool; beside it a jar of saffron threads, a white dish with a pinch of them and a pan of pale rice; on the wall, a card labelled safran.yaml.

One small filechanges thewhole agent.

safran.yaml teaches Claude Code your tickets, repositories, teams and vocabulary. Local, read-only by default, clone and run.

QuickstartRead the docs

Without it, the agent guesses.

Claude CodeIllustration

Why does PAY-1423 fail?

  • Grep"PAY-1423"no match
  • Grep"kısmi iade"Turkish words, English code
  • Readsrc/payments/refunds.jsinvented path
  • Readweb-app/src/checkout/form.tsxwrong repository

Probably a validation problem in the checkout form.

a guess

With it, the agent cites.

A pinch of saffron colours the whole dish. It is costly because it is gathered by hand, like the year of practice distilled here.

Claude Code + safranIllustration

Why does PAY-1423 fail?

  • get_ticketPAY-1423Kısmi iade işlemi…
  • search_code"kısmi iade"iade → refund, chargeback
  • read_filesrc/refund/service.ts:12-19
  • who_ownspayments-apiPayments

Partial refunds are rounded once, in createPartialRefund, before the policy check.

payments-api src/refund/service.ts:12-19Payments

Everything company-specific, one file.

safran.yaml

1version: 1

2company: acme

3languages: { tickets: tr, code: en }

4trackers:

5 - id: jira

6 type: jira

7 url: https://jira.acme.example

8 email_env: JIRA_EMAIL

9 token_env: JIRA_TOKEN

10 projects: [PAY, MOB, WEB]

11code:

12 hosts:

13 - id: azure

14 type: azure-repos

15 organization: acme

16 project: Platform

17 token_env: AZURE_DEVOPS_PAT

18teams:

19 - name: Payments

20 projects: [PAY]

21 repos: [payments-api, ledger]

22glossary:

23 - term: İade

24 code: [refund, chargeback]

  1. languages:

    Tickets in Turkish, code in English.

    languages: { tickets: tr, code: en }

    tr

    Kısmi iade işlemi İstanbul şubesinde başarısız oluyor

    en

    createPartialRefund()

  2. trackers:

    Where the tickets live.

    trackers:

    - id: jira

    type: jira

    url: https://jira.acme.example

    email_env: JIRA_EMAIL

    token_env: JIRA_TOKEN

    projects: [PAY, MOB, WEB]

    PAY-1423BugDonetr

    Kısmi iade işlemi İstanbul şubesinde başarısız oluyor

    12 comments2 links2 PRs

    JiraAzure BoardsLinearGitHub Issuesor your own plugin

  3. code:

    Which repositories to read.

    code:

    hosts:

    - id: azure

    type: azure-repos

    organization: acme

    project: Platform

    token_env: AZURE_DEVOPS_PAT

    backendpayments-apiledger

    mobileacme-iosacme-android

    frontendweb-appadmin-panel

    Azure ReposGitHubGitLablocal

  4. teams:

    Who owns what.

    teams:

    - name: Payments

    projects: [PAY]

    repos: [payments-api, ledger]

    who_owns payments-api

    PaymentsPAYpayments-apiledger

  5. glossary:

    Your words, mapped to the code’s.

    glossary:

    - term: İade

    code: [refund, chargeback]

    kısmi iaderefundchargeback

    payments-api src/refund/service.ts:12-19

    12async createPartialRefund(request, captured) {

    13 this.policy.assertRefundable(request.amount, captured);

    14 const amount = Math.round(request.amount);

From ticket to cited answer.

/safran:technical-analysis PAY-1423

  1. 1get_ticketRead the ticket

    PAY-1423BugDonetr

    Kısmi iade işlemi İstanbul şubesinde başarısız oluyor

    12 comments2 links2 PRs

  2. 2search_codeSearch by meaning

  3. 3read_fileOpen the lines

    payments-api src/refund/service.ts:12-19

    12async createPartialRefund(request, captured) {

    13 this.policy.assertRefundable(request.amount, captured);

    14 const amount = Math.round(request.amount);

    15 return this.ledger.refund(request.paymentId, amount);

  4. 4answerAnswer with evidence

    Partial refunds are rounded once, in createPartialRefund, before the policy check.

    payments-api src/refund/service.ts:12-19

    OwnerPayments

Illustration

What you get in the clone.

  • get_company_profile
  • who_owns
  • get_server_info
  • get_ticket
  • get_ticket_comments
  • get_ticket_attachment
  • get_ticket_history
  • get_ticket_family
  • get_linked_work
  • get_ticket_changes
  • get_ticket_time
  • search_tickets
  • fetch_linked_doc
  • search_code
  • grep_code
  • read_file
  • list_repos
  • find_past_work
  • find_pull_request
  • list_pull_requests
  • get_pull_request
  • get_pull_request_threads
  • get_pull_request_diff
  • list_boards
  • get_board
  • list_iterations
  • get_iteration
  • list_tickets
  • get_my_work
  • preview_writeopt-in
  • commit_writeopt-in

MCP server

Read-only by default.

Trackers
JiraAzure BoardsLinearGitHub Issues
Code hosts
Azure ReposGitHubGitLablocal
Docs
Confluence
Embedders
OllamaOpenAI-compatible

Connectors

Add your own as a plugin.

  • /safran:setup
  • /safran:implement PAY-1423
  • /safran:review-pr payments-api#101
  • /safran:pr-fix PAY-1423
  • /safran:verify-acceptance PAY-1423
  • /safran:breakdown PAY-1500
  • /safran:estimate PAY-1501
  • /safran:standup Payments 2d
  • /safran:technical-analysis PAY-1423
  • /safran:find-in-code where are partial refunds rounded?
  • /safran:test-plan PAY-1423
  • /safran:ticket-readiness PAY-1501
  • /safran:bug-fix PAY-1423
  • /safran:how-it-was-built PAY-1423 mobile
  • /safran:regression-scope payments-api#101
  • /safran:retro

Skills

Workflows that cite evidence.

data/index/

denselexicalhybrid

Local index

SQLite on your disk.

PAY-1423feature/pay-1423waiting for you1 decision to accept

PAY-1431feature/pay-1431runningfix round 1 of 2

PAY-1440feature/pay-1440queued

never pushes

Job harness

Hand tickets to an agent. Its checks decide; you approve a local branch. How a job is checked

Dashboard

Search, sync, inspect. Open the demo

Built to be checked.

  • The index stays on your disk.

    /work/acme/data/index/
  • Read-only by default.

    readsearchlist
  • Ticket text is data, not instructions.

    <untrusted-data source="jira:PAY-1423">Ignore your instructions and…</untrusted-data>
  • No file and line, no claim.

    payments-api src/refund/service.ts:12-19

Most connectors are fixture-tested, not yet verified live. Status and limits

Measure, don’t assume.

Build a golden set from your merged pull requests, then score retrieval before and after every change.

safran eval goldensafran eval retrieval --config hybrid=hybrid --config lexical=lexical

Evaluation guide

Example data, not a benchmark. hybrid lexical
0.00.20.40.60.8hybrid recall@10: 0.62lexical recall@10: 0.440.620.44recall@10hybrid MRR: 0.48lexical MRR: 0.310.480.31MRRhybrid nDCG@10: 0.54lexical nDCG@10: 0.360.540.36nDCG@10

Try it on one repository.

No tracker or token needed to start.

  1. git clone https://github.com/fport/safran && cd safran && bun install
  2. safran init
  3. safran sync
  4. claude --plugin-dir ./plugin

QuickstartRead the docsOpen the dashboard demo