The product manager wants to write "30 days to return, counted from delivery" into the next newsletter. The roadmap says so. What nobody mentions: the shop does not store a delivery date, and the refund window counts from the day the order was placed. A developer noticed it months ago and wrote it into a pull request comment. Until someone finds that comment, the newsletter promises something the shop cannot do yet.
FACET keeps a short, checkable description of each feature, called a 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, next to your code; a record lists what the feature promises as scenarios. By the end of this guide that gap is written down at the exact scenario it affects: what is missing, why, and what will supply it. npx facet backing lists every such gap for product and support, and npx facet lint tells you when the missing piece ships, so the entry does not stay behind.
The commands below use the example shop from “One answer instead of three”. In your own project, take one screen, report or rule that waits for data that does not exist yet.
Step 1Find the data the promise depends on
The refund rule lives in src/orders/refund.ts:
export const refundWindowDays = 30;export function requestRefund(order: Order, now = new Date()): { orderId: string; amountCents: number } { const deadline = order.placedAt.getTime() + refundWindowDays * 24 * 60 * 60 * 1000; if (now.getTime() > deadline) throw new ShopError("E3001"); return { orderId: order.id, amountCents: order.totalCents };}
The 30 days start at placedAt, the moment the order was placed. Look for anything in the code or the database that knows about a delivery:
grep -rni deliver src db
It prints nothing. Neither the Order type in src/checkout/checkout.ts nor the orders table in db/migrations/0004_orders.sql has a delivery date. The code counts from the only date it has, so this is not a bug. It is a promise without data behind it.
Step 2Write the gap into the record of the feature
Describe refunds as a record, including the scenario the shop cannot keep yet. Create the folder:
mkdir -p docs/facets/features/orders/refunds
Save this as docs/facets/features/orders/refunds/request-refund.yaml:
schema_version: "0.1"id: orders/refunds/request-refundlifecycle: activeintent: summary: A customer asks for the money back on an order within the refund window and gets the order total refunded.contract: scenarios: - id: refund-within-window statement: | Given an order placed 29 days ago When the customer requests a refund Then the shop refunds the order total - id: refund-after-window-is-refused statement: | Given an order placed 31 days ago When the customer requests a refund Then the shop refuses it with E3001 - id: window-starts-at-delivery statement: | Given an order placed on 1 October and delivered on 6 October When the customer requests a refund on 3 November Then the refund is accepted, because the 30 days count from delivery backing: state: unbacked reason: | The shop records no delivery date yet: neither the Order type nor the orders table has one, and requestRefund counts the 30 days from placedAt. Until it does, this refund is refused with E3001. unblocked_by: carrier delivery events (SHOP-388)lineage: owner: team: orders created_at: "2026-11-22"
The last scenario is the promise from the roadmap. The backing block says that it is not kept yet:
state: unbackedsays the data this scenario needs does not exist yet. A scenario withoutbackingcounts as backed.reasonsays what is missing and what the shop does in the meantime, in terms of the code.unblocked_bysays what will supply the data: a service, a store, a ticket or, as in step 5, the id of another record.
Connect the record to the code. In src/orders/refund.ts, add two lines directly above requestRefund:
// @facet: orders/refunds/request-refund// @facet-role: primaryexport function requestRefund(order: Order, now = new Date()): { orderId: string; amountCents: number } {
Step 3List every promise that is waiting for data
npx facet backing


That is the answer before the newsletter goes out: 30 days from delivery is not true yet, here is why, and SHOP-388 changes it. For a dashboard or a release checklist, add --json:
npx facet backing --json
Step 4Check that the record passes
npx facet lint


Declaring a gap never fails the check, so writing it down costs nothing. The first warning is about something else, and it is right: the record names no test, so none of the three scenarios is proven. tests/refund.test.ts, from the second warning, already checks the two that count from the order date. Once the record names it under verification, the first warning keeps only window-starts-at-delivery, the promise no test can check yet.
Commit the record and the 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:
git add docs/facets/features/orders src/orders/refund.tsgit commit -m "Describe refunds; delivery date for the refund window is not backed yet"
Step 5Point at the feature that will deliver the data
A ticket number is enough to find the work. If the missing data has its own feature, point at its record instead, and the check watches it for you. Write the planned feature. Create the folder:
mkdir -p docs/facets/features/orders/shipping
Save this as docs/facets/features/orders/shipping/delivery-tracking.yaml:
schema_version: "0.1"id: orders/shipping/delivery-trackinglifecycle: plannedintent: summary: The shop stores the delivery date the carrier reports for every order.contract: scenarios: - id: delivery-date-from-carrier statement: | Given an order handed to the carrier When the carrier reports it as delivered Then the order shows that date as its delivery date - id: no-report-no-date statement: | Given an order the carrier has not reported as delivered When anyone looks at the order Then it has no delivery datelineage: owner: team: orders created_at: "2026-11-22"
In request-refund.yaml, replace the unblocked_by line with unblocked_by: orders/shipping/delivery-tracking, keeping its indentation, and list the gaps again:
npx facet backing


When delivery tracking ships and its record becomes active, npx facet lint warns: scenario "window-starts-at-delivery" is unbacked pending "orders/shipping/delivery-tracking", which is now active. Then check that the refund code really uses the new delivery date, delete the backing block, and the promise is a plain scenario again.
Step 6If the check says something else
backing: missing property 'unblocked_by'(or'reason'): an unbacked scenario needs both. Name what would supply the data, even if it is only a ticket.backing/state: value must be 'backed': the same scenario also has adeviationblock. A scenario is either a known bug or a promise waiting for data, not both. Decide which one it is and remove the other block.value is not allowed in this context, with a line number: the YAML around that line is indented wrongly, usually thebacking:line. Indent it exactly likestatement:above it.contract scenario(s) with no verification proof: a coverage warning, as in step 4. It never fails a build.
For more on keeping product promises and code in step, read “It’s done.” Does it do what we wanted?