Documentation

Tapestry

Connect GitHub and Jira, backfill your history, and read the map of your own codebase. Everything below happens inside your workspace at Settings and the pages beside it.

How ingestion works, in one paragraph

Tapestry is webhook-driven and app-based. There are no personal access tokens anywhere in it: GitHub is a GitHub App you install, Jira is an OAuth 2.0 (3LO) consent your site admin grants. That means access is visible where your organisation already looks for it, and revoking it is one click on your side rather than a support ticket on ours.

Connect GitHub

  1. We bind your GitHub account or organisation to your workspace. On the hosted service this is our side of the setup, tell us the account name and we do it once.
  2. You install the Butterflat GitHub App on that account and select the repositories to ingest. Settings → Integrations carries a link straight to the install page, built from the App's own identity, so it always points at the right App.
  3. From then on, installing is the only GitHub step there is. Repositories you add to or remove from the installation later bind and unbind themselves as the installation webhooks arrive.

The App asks for the narrowest set of permissions that lets it do the job, and every write permission corresponds to something you can see it doing.

Contents
Read, file paths and blobs, for the structural graph.
Pull requests
Read and write, reading PRs, and posting the Incinerator comment when you ask for it.
Issues
Read and write, reading issues, and planning writeback when you use it.
Checks
Read and write, the Incinerator check run on a PR.
Deployments
Read, deployment and deployment status events, for incident correlation.
Metadata
Read, mandatory for every GitHub App.
Organization → Members
Read, seeding the roster, so commit authors resolve to people and teams.

It subscribes to pull_request, push, issues, release, deployment and deployment_status. Anything else GitHub sends is ignored.

Binding is not installing, and doing only one of them is the most common way onboarding fails silently. A binding is a routing rule, deliveries naming this repository belong to that workspace, and it does nothing to make GitHub send any. Settings → Integrations reports the install state per repository so you never have to find out by waiting.

That report is deliberately a tri-state, not a tick box. "App not installed" means GitHub told us it is not. "Install state unknown" means we could not ask, GitHub unreachable, rate-limited, or our credential refused, and the row says which. Do not read unknown as not installed; you would be redoing an install that is already correct.

A repository, an organisation account or a Jira project belongs to exactly one workspace. Binding a name somebody else already holds is refused, and the refusal deliberately does not say who holds it, that would tell one customer who else uses the product.

Connect Jira

Jira Cloud connects once, through OAuth 2.0 (3LO), from a link in Settings → Integrations. Only an Atlassian site admin can grant it; it cannot be scripted or delegated. On success we register the webhooks ourselves and keep them alive, Jira expires webhook subscriptions every thirty days, and a background maintainer re-registers before then.

The consent asks for five scopes, and Atlassian aborts the whole flow if any of them is missing: read:jira-work, write:jira-work (planning writeback), read:jira-user, manage:jira-webhook (registering and refreshing those subscriptions) and offline_access.

  • Bind each Jira project key to your workspace. Binding and consenting work in either order, and binding a second project widens the subscription to cover every bound key.
  • Atlassian never adds a scope to a grant that already exists. If your connection predates planning writeback it is read-only, and writeback pushes will fail with a 403 until you use the Reconnect link on the connected banner. Reconnecting retires the old subscription rather than adding a second one.

The first backfill

Ingestion is webhook-driven, so a freshly connected workspace only knows about activity from the moment it was bound. Backfill imports what came before. Bind first, a backfill for a target this workspace does not hold is refused.

404 {"error":"repository not bound to tenant"}

Start one per repository (targeting owner/name) or per Jira project (targeting the project key), and watch it from Settings → Backfills. A GitHub backfill runs through six phases; a Jira backfill has one.

GitHub  REPOSITORY → PULLS → COMMITS → FILES → ATTRIBUTION → DOCS
Jira    ISSUES

A job ends COMPLETED or FAILED, with the error recorded on the job when it failed. Two honest caveats worth knowing before you compare counts with anyone:

  • The Jira backfill is a current-state catch-up, not a changelog replay. Issues that arrive through it have no "entered in progress" timestamp, because we did not observe one, the field stays empty rather than being fabricated from the issue's current status.
  • A backfill that resumes re-reads a boundary window. That means no gap, but not exactly once, which is safe only because every write in the graph is an idempotent merge. Counts do not double.

Once the backfill lands, seed the roster. That is what makes commit authors resolve to people and teams, every member is registered under their login and every email form we can establish exactly, because without those, commits that GitHub itself cannot attribute resolve to no team at all. Zero GitHub teams is normal and not a failure: many organisations never create any, and their members fall back to one team named after the organisation. A commit whose email belongs to no profile is deliberately not guessed, it surfaces as a merge candidate for a human to confirm.

Reading the HD Map

The HD Map is the page that answers "what does this codebase actually look like". Pick a repository and you get six panels. Each one is a measurement with a stated definition, not a score we invented.

Blast radius
Betweenness centrality over the co-change graph, which files sit between other files. A fully connected cluster scores 0: no file bridges the others.
Co-change clusters
Louvain communities over the co-change graph. Cross-team clusters flag ownership crossings, when there is team data to cross them against.
Bus factor
Files where one author owns 70% or more of the touches, a single point of knowledge failure.
Change propagation
The probability that a file changes given that another one did, from historical co-change, above a support threshold.
Incident correlation
Files touched by deployments that co-occurred with incidents. Observed overlap, explicitly not causation.
Boundary decay
The trend of cross-cluster co-change. A rising share means your boundaries are eroding.

The map is built from history, from what changed together, so a repository with a thin history has little to say until the backfill lands, and a brand new one has nothing. Where there is not enough data, the page says so rather than reporting a zero. That distinction runs through the whole product: zero is a claim that we looked and found nothing, and it is not the same claim as "we could not look". The trailing window for anything described as recent is ninety days.

Alongside history there is a structural graph: functions and classes, and imports resolved within the repository. It covers Rust, Python, TypeScript, TSX and JavaScript; a file in any other language gets no structure and is marked as unparsed rather than being indistinguishable from a file with no dependencies. An import of an external package is counted as unresolved and never guessed into an edge.

The Incinerator on a pull request

The Incinerator asks six questions about a pull request, where its files sit in the map, what else historically changes with them, whether it crosses an ownership boundary, whether those files have an incident history, whether a reviewer with context exists, and what produced the code, plus a seventh about declared architecture boundaries. Each is answered from graph facts, each carries its own evidence, and together they produce an advisory risk score.

It never blocks a merge. The check run conclusion is always neutral, on purpose: blocking a merge on a number this soft would be dishonest about how much the graph actually knows.

LOW
0 to 25
MODERATE
25 to 50
ELEVATED
50 to 75
HIGH
75 to 100
INSUFFICIENT_DATA
No question could be scored, no number is emitted at all.
  • A question with no data reports INSUFFICIENT_DATA and is excluded from the score. It never scores 0. Collapsing "we looked, it is safe" into "we could not look" is the exact failure this feature exists to avoid.
  • The score is renormalised over the questions that could be answered, and the coverage, how many of them that was, is reported in the check run title. A verdict built on two of seven questions says so.
  • Every question carries the same weight. Differentiated weights would encode a confidence about relative predictive power that nobody has measured. The band cut points are round numbers on an ordinal scale and are labelled as uncalibrated.
  • Automatic publishing is opt-in per workspace and off by default, and when it is on it writes only the check run. The PR comment stays behind an explicit publish, because a comment is a thing your team reads and we would rather you chose to invite it.

A published comment can only ever name a resolved GitHub login or a count. Raw author identifiers, which are often email addresses, are structurally unreachable from the code that renders the narrative, so a public comment cannot leak one.

Running an epic with agents

On the Intelligence plan, with a Terracotta cluster and at least one repository bound, an epic has a Run with agents button. Tapestry sends Terracotta the epic’s tickets, their dependencies and their acceptance criteria. Each ticket whose dependencies are met is worked by its own agent, which opens a pull request. The pull request waits for CI, a review by a second agent and, by default, an approving review from a person in GitHub, and then merges. A merge unblocks the tickets that depended on it.

The Delivery page shows each run as a board, and Waiting on you lists what needs a person. Owners and admins can start, pause, resume and cancel a run. A run can carry a dollar cap: it warns as it approaches the cap and then starts nothing new until an admin raises it. Pull requests that are already approved still merge.

QA is a separate, optional stage, described next. Until a workspace turns it on, a merged ticket is treated as done, as before.

QA: testing a ticket after it is released

With QA on, a merged ticket moves to QA instead of done. When its change is live in your environment, a Terracotta agent opens a browser there, verifies the ticket’s scenarios, and smoke tests the features around it. Which features those are comes from the graph: the ones that own the files the ticket changed, and the ones that depend on those files. Screenshots and a step trail are kept on the ticket.

Set it up under Settings, QA, as an owner or admin. An environment has a name, a base URL, the hosts the browser may visit (your app and its identity provider), the repositories deployed there, and whether QA may write: submit forms and create records. Saving checks that the address can be reached, and QA cannot be turned on for an environment that cannot.

GitHub
A deployment or release event from GitHub, matched to the environment by name. Nothing to set up if you already deploy through GitHub.
Webhook
Your pipeline calls Tapestry with the environment, repository and commit, signed with a secret for that environment. For Jenkins, GitLab, Argo CD or a script.
Version URL
The environment names an address that returns the deployed commit or version.
On merge
The ticket is due a set delay after it merges. For continuous deployment.
Manual
A person records the release, or starts QA from the ticket.

Accounts are how the agent signs in. You give each one an alias, such as admin, and its username and password. The values are write-only: nobody can read them back, only rotate or delete them. The agent asks to sign in by alias and the browser fills the credential in, so the password is never shown to the model, and each use is recorded.

A run ends passed, failed or blocked. Blocked means it could not test: it could not sign in, could not reach the environment, or ran nothing. Blocked is never reported as passed and never signs a ticket off. If the ticket fails its own scenarios, or breaks a feature that passed on the previous release, it goes back to in progress with the evidence. A defect outside the ticket’s scope opens a bug and the ticket still passes; seeing the same defect again updates that bug.

Sign-off is a workspace setting. By default the agent signs off a passing run, naming the run and its evidence. Set it to a person and the run produces a report for an owner, an admin or a named approver to accept or reject. Either way a person can reject a ticket from its QA panel. A run that finds nothing is not proof the change is correct, and the run page says so.

Inviting people

Settings → Members → Invite people. An OWNER or an ADMIN issues the invite; the person who opens it sets their own password. If they already have a Butterflat account, the invite grants them the membership and touches nothing else, it can never change an existing user's password, which is what stops an invite mailed to somebody's address from being an account takeover.

  • Roles are OWNER, ADMIN and MEMBER. You may only confer a role strictly below your own, so the invite form offers ADMIN and MEMBER and never OWNER.
  • The product does not send invite email itself. Copy the link and send it however your team already communicates. Only the owner invite at provisioning is emailed, by the fulfilment agent.
  • Seats count members plus open invites whose address is not already a member. Without counting open invites, a five-seat workspace could send fifty links and the failure would land on the fiftieth colleague, who can do nothing about it.
  • You may only revoke members strictly below your own role, and the last OWNER of a workspace cannot be revoked by anybody, including us. Grant a replacement OWNER first.

Plans, seats and tokens

COMMUNITY
Free, hosted, five seats, no LLM features. It is on the price list, and it is also where a workspace lands when a subscription ends. The way in is id.butterflat.io/signup: create it yourself, and upgrade it in place later.
CORE
Paid. No LLM features. Seats are your subscription quantity.
INTELLIGENCE
Paid. The LLM surface is on. Seats are your subscription quantity.

Your plan and your effective seat cap are on the Settings page for any member to read. A workspace cannot change its own plan: entitlement comes from the subscription, through the fulfilment agent, and a workspace that could entitle itself would not be much of an entitlement. Every plan change is written to the audit trail.

On the hosted service the model bill for the Intelligence surface is ours, so its usage is metered per workspace and per calendar month, in tokens, not dollars, because every provider reports tokens and not every model has a price we can look up. Each plan includes a monthly allowance and bills overage above it. The figures live on the pricing page, which reads them from the same catalog Stripe was given, so what you are quoted and what you are charged cannot drift apart. On a Dedicated deployment the provider account is yours and the product does not ration it.

What a 402 means

There is exactly one status code for "authenticated, authorized, well-formed, and still no , because of money", and it is 402. Not 403, which would tell the app to hide the feature as a permission problem. The body always carries a fixed machine-readable code, never prose, and there are four of them.

plan_required
This workspace is on a plan without the LLM surface. Upgrade to Intelligence. The body names the plan required and the plan you are on.
seat_limit
Adding this member would exceed the seat cap. Only a new member takes a seat, changing an existing member's role does not.
token_cap
The monthly token allowance is used up. The body names the tokens used, the cap and the month. It resets with the calendar month.
suspended
Payment failed and dunning is exhausted. Mutations are refused and reads keep working , see the billing page.

Downgrading never revokes anybody. The seat cap only refuses adding, so a workspace that drops to COMMUNITY with eight members keeps all eight, it simply cannot add a ninth.