---
name: bworlds-guardrails
description: "Print one Build's recorded guardrails in the form a coding agent consumes, and name the instruction file the user's own agent reads so they can paste them there by hand. Every command it runs is free, and it writes nothing into your checkout: no file created, no file edited, no repository push. Use when the user says 'what must not break on [slug]', 'give me the guardrails', 'what are the rules on this Build', or 'set up my agent for this Build'. For what produces guardrails, use bworlds-audit or bworlds-check."
---

# Guardrail handout

A Build's guardrails say what must not break. They live in the Build Dossier, server-side, written by the audit and check skills. No coding agent reads that path. This skill closes the gap by hand: it prints them, and the user pastes them.

Everything here runs with your own credential through the `bworlds` CLI. Load `bworlds-cli` for the command contract, the exit codes, the safety rules and the Findings protocol. Reading is free, and this skill only reads: `bworlds dossier pull` is its single command and it costs no Workspace credits. No command here debits the Workspace, and there is no paid step to reach for later in this skill.

## What this skill does not do

Read this before running it, because the boundary is the point:

- It creates no file and edits no file in the user's checkout.
- It runs no repository command, and it changes nothing in the repository the Builder's team owns.
- It never edits the Dossier. `bworlds-audit` and `bworlds-check` write the guardrails; this skill only hands them over.
- It does not put the guardrails where the agent loads them. It puts them in front of the user, in the right form, and names the file they belong in. The paste is theirs to make.

Do not tell the user their agent now enforces these rules. Nothing was written into the checkout, so nothing is loaded, and nothing needs undoing.

## 1. Pull the Dossier

```bash
bworlds dossier pull <slug>
```

The pull prints the Operator Workspace path and downloads the Build Dossier into it. That path sits outside every checkout, so the user's repository is untouched.

For each document it retrieves, the command reports the kind, its size, when it was last updated and who updated it. Keep that `updated` date and that handle: step 3 prints them with the guardrails, and they are what tells the user how current the rules are.

Two documents exist: `context.md`, how the app works, and `guardrails.md`, what must not break. Read `guardrails.md`.

If the pull reports no Dossier, or a Dossier with no `guardrails.md` or an empty one, this Build has no recorded guardrails. Say so plainly and stop. An empty file is not a set of rules, and you must not write one from `context.md`. There is nothing to hand over. `bworlds-audit` or `bworlds-check` writes the first set; point the user at whichever fits, and name what each costs.

If the pull fails instead, the exit code says why. `3`: the session is missing or expired, so ask the user to run `bworlds auth login`. `4`: no Membership gives access to this Build. `5`: the slug is absent or outside their Workspaces; check it with the user and never try other slugs. Hand over nothing from an earlier pull you cannot date.

## 2. Turn the Dossier text into rules an agent can follow

The Dossier is written for a person. A coding agent follows an imperative rule with a reason. Reshape each guardrail into one line of that form, and keep the original meaning exactly:

- One rule per line, imperative, present tense.
- The constraint first, the reason after it. "Never drop a foreign key in a migration: the orders table loses its customer link and the app cannot recover it."
- Name the real file, table, route or policy the rule protects. A rule with no target is not checkable.
- Add nothing the Dossier does not say. You are reformatting recorded rules, not writing new ones.

Drop nothing either. A guardrail you cannot reshape goes out verbatim.

## 3. Print the guardrails

Print the whole block to the terminal, ready to copy:

```
# Guardrails for [slug]
# Recorded in the BWorlds Build Dossier, updated [date] by [handle].
# This is a copy. It does not track later changes to the Dossier.

- [rule]: [reason]
- [rule]: [reason]
```

The date and the handle belong in the block itself, not only in your prose. Once the block is pasted somewhere, that header is the only thing telling the next reader how old these rules are.

Then say it in one sentence: this is a copy, not a link. When the next audit or check updates the Dossier, the pasted copy does not change. Run this skill again after either one to hand over a fresh block.

## 4. Name the file the user's own agent reads

Print the guardrails first, then tell the user where they go. The file depends on their agent:

| Agent | File it reads |
|---|---|
| Claude Code | `CLAUDE.md` at the repository root |
| Codex | `AGENTS.md` at the repository root |
| Cursor | a file under `.cursor/rules/` |
| GitHub Copilot | `.github/copilot-instructions.md` |
| Gemini CLI | `GEMINI.md` at the repository root |

`bworlds agent status` reports the coding agents found on this machine, and it finds agents this table does not name. For one the table does not cover, ask the user which file that agent reads instead of guessing a path.

Say which one you believe applies, from the files in the user's own checkout when they are standing in one, and ask rather than assume. This skill reads no repository, so with no checkout to read, ask which agent they use. When a checkout holds the instruction files of several agents, name each and let the user pick one or several. Then hand the block over and let the user paste it.

Three things to tell them as they do:

- If the file already holds a block that starts `# Guardrails for [slug]`, the user removes that block and pastes this one in its place. Appending leaves two versions, with two dates, that an agent reads as one set of rules.
- The file is part of their repository, so the paste is a change their team reviews like any other.
- These rules are one Build's. A machine-wide agent configuration would apply them to every unrelated project they open, which is why this skill does not offer one.

## 5. Report

```
## [Slug] Guardrails — [Date]

**Source**: Build Dossier, updated [date] by [handle] / no Dossier recorded yet
**Handed over**: [N] rules
**Paste into**: [file], which [agent] reads
**Written into the checkout**: nothing
```

The last line stays in the report even though it never changes. It is the answer to the question the user asks next.
