Facet
DeutschInstall
Tests & regressions

Show which features are tested, in five minutes with FACET Atlas

Open AtlasSchematic Atlas preview: checkout with linked features and a seven-stripe seal.Atlas opens your repository as a product map, showing features, their requirements and the tests linked to them in your browser.View nowRead more here, the browser app for your FACET recordA FACET record is a short, checkable description of one feature, kept as a YAML file next to the code. It states why the feature exists, the behaviour it promises as scenarios, and the tests that check it.In the glossary, and read off how many promises a test is named for, which feature has none, and whether the named tests passed on the current commit.

  • 7 min read
  • 6 steps
  • FACET AtlasVitest
  • Your coding agent

Steering meeting, item four: "How well tested is the product?" You have a coverage percentage from CI and a feeling. Neither answers the question behind it: which of the things we promise customers has a test, and did those tests pass on the version we are about to ship?

FACET keeps a short, checkable description of each feature, called a record, next to your code, including the tests that check each promise. By the end of this guide you open one page in FACET Atlas, a browser app that shows your FACET records as pages, and read the answer off it: how many of the product's promises a test is named for, which feature has none, and how many test files passed in a run measured on the current commit. The page comes from your records and a facet test report; nobody fills in a spreadsheet.

The commands below use a small example shop written in TypeScript with Vitest, set up as in One answer instead of three, on Linux. Atlas starts from the npm package and downloads itself on the first start.

Step 1Download Atlas with npx and start it once

Atlas is a separate program that the npm package facet-framework downloads and starts. In the shop's folder, run:

sh
  • npx facet-framework ui

On the first run it names the Atlas archive for your system, its size, its source and the cache folder, and asks Download and start? [y/N]. Answer y. The archive is checked against the SHA-256 pinned in FACET CoreFACET Core is FACET's command-line tool, the facet binary: it checks records and anchors, reports drift and serves the registry to agents, with the same logic in CI, a shell and an agent session.Read more here, Atlas starts, and it prints FACET Atlas: http://127.0.0.1:7317/. Stop it with Ctrl-C for now; the next steps start it again, without the question.

Without a terminal, for example in CI or a script, the command stops with run 'facet ui --yes' to allow the download without a terminal. Add --yes there to download without asking. Without npm, download the release archive and check it yourself, as the Atlas docs describe.

Step 2Write down the feature the question is about

Atlas can only report on what records describe. In the example shop, discount codes have a record with a test; refunds, the feature everyone assumes is tested, have none. In the shop's folder, add it:

sh
  • mkdir -p docs/facets/features/orders/refunds

Save this as docs/facets/features/orders/refunds/request-refund.yaml:

yaml
schema_version: "0.1"id: orders/refunds/request-refundlifecycle: activeintent:  summary: A customer asks for money back on an order and gets it, in full or in part, or a reason why not.contract:  scenarios:    - id: refund-within-window      statement: |        Given an order delivered 29 days ago        When the customer requests a refund        Then the refund is accepted and goes back to the original payment method    - id: refund-after-window      statement: |        Given an order delivered 31 days ago        When the customer requests a refund        Then the shop refuses it with E3001    - id: partial-refunds-up-to-total      statement: |        Given an order that was already partly refunded        When a further refund would exceed the amount paid        Then the shop refuses it with E3002    - id: gift-card-as-store-credit      statement: |        Given an order paid with a gift card        When the customer requests a refund        Then the money comes back as store creditlineage:  owner:    team: orders  created_at: "2026-11-22"

AnchorAn anchor is a comment in the source code, starting with @facet:, that names the record the code belongs to. FACET reads these comments to know where each feature is implemented.In the glossary it with two comment lines directly above export function requestRefund in src/orders/refund.ts:

ts
// @facet: orders/refunds/request-refund// @facet-role: primaryexport function requestRefund(order: Order, amount: Cents, now = new Date()): Refund {

npx facet lint reports 2 records, 2 anchors and 0 errors.

Step 3Open Atlas and read the answer for your manager

In the shop's folder, start Atlas again:

sh
  • npx facet-framework ui

It prints FACET Atlas: http://127.0.0.1:7317/. Open that address in your browser and keep the command running; Ctrl-C stops it. At the top right, open the role menu (it starts at Developer) and choose Leadership:

Atlas Overview in the Leadership role: 50%, 4 promises are not named by any test yet, 4 of 8 promises are named by a test, the most open is orders at 0%; below, the domains orders with 4 promises open and checkout with 0 open.Atlas Overview in the Leadership role: 50%, 4 promises are not named by any test yet, 4 of 8 promises are named by a test, the most open is orders at 0%; below, the domains orders with 4 promises open and checkout with 0 open.
Half of the shop's promises have a test; refunds have none.

That is the first half of the answer, in the manager's terms: 8 promises, 4 named by a test, and the gap is all in one DomainA domain is the first part of a feature id: a product area such as checkout, never a team or a service.In the glossary, orders. Further down the same page, At risk names the feature: Request refund, 0 % of promises with a test, held by the orders team.

A "promise" here is a ScenarioA scenario is one behaviour a feature promises, written in a record as Given/When/Then steps. Each scenario has an id that tests and other records can refer to.Read more here in a record. "Named by a test" means a record lists a test file for it under verification; it does not yet say that the test ran.

Step 4Add the result of a real test run

For the second half, whether the named tests pass, Atlas reads a report from facet test. Tell FACET how your tests run in .facetrc.yaml:

yaml
runners:  vitest:    command: node_modules/.bin/vitest run    list: node_modules/.bin/vitest list --filesOnly --json    list_format: json    report: junit    report_file: reports/junit.xml

Three test files in the shop belong to no record yet. List them in docs/facets/test-baseline.yaml, so facet test accepts them as reviewed:

yaml
runners:  vitest:    - tests/cart.test.ts    - tests/checkout.test.ts    - tests/password-reset.test.ts

Atlas shows a report only when it was measured on the current commit of a clean working tree. Commit first, then run the tests and write the report into the git-ignored reports/ folder:

sh
  • git add .facetrc.yaml docs/facets src/orders/refund.ts
  • git commit -m "Describe refunds and run the tests through FACET"
  • mkdir -p reports
  • npx facet test --json > reports/facet-test.json

The JSON goes to the file; Vitest's own output still appears in the terminal. Stop Atlas with Ctrl-C and start it again with the report. Give the report's full path:

sh
  • npx facet-framework ui --test-report ~/demo-shop/reports/facet-test.json

Switch the role to Test & review and scroll to Review bench:

Atlas Review bench in the Test & review role: 4 promises without a test link, 1 record without any test, 2 features without documentation, 0 failing tests with 4 passed, 0 unmeasured and the commit hash; below, checkout/discounts complete with 4 of 4, orders/refunds with 4 scenarios open.Atlas Review bench in the Test & review role: 4 promises without a test link, 1 record without any test, 2 features without documentation, 0 failing tests with 4 passed, 0 unmeasured and the commit hash; below, checkout/discounts complete with 4 of 4, orders/refunds with 4 scenarios open.
0 failing tests on this commit, and one record with no test at all.

Now you have the full answer: on this commit every test that ran passed (0 failing, 4 test files passed), and one feature, refunds, has no test, so no run can say anything about it.

Step 5Check that the page shows the current state

The report belongs to one commit. Change any tracked file, for example add a line to README.md, and reload the page: next to Failing tests Atlas now says working tree changed since the report and shows no number. After a new commit it says report is out of date. Run npx facet test --json > reports/facet-test.json again on the clean commit and reload to get the number back.

Step 6If Atlas shows something else

  • no report (facet ui --test-report) next to Failing tests: Atlas did not find the file. A relative path is read from the folder you ran the command in; give the full path.
  • reports/facet-test.json: No such file or directory from the shell: the folder does not exist before the first test run. Run mkdir -p reports first.
  • working tree changed since the report or report is out of date: commit or discard your changes, run npx facet test --json > reports/facet-test.json again and reload.

For more on why a green pipeline is not the same as a tested product, read “All green.” And the customer still calls..

Sources