Map which modules of an application make security decisions (the module ledger), draft records for them in the background for a code owner to review, and read, follow and help write security decision records: one document per module or feature (.guardlink/records/SDR-n-<module>.md) that says what was decided for that code, the rules that follow, why, and what looks like a bug but is not, binding once its text is on the default branch, approved through a code owner's pull-request review (a nam...
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Is that skill safe to install?
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
Are you the author of Bravos Records?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/bugb-technologies-bravos-records-bravos-plugins)
---
name: bravos-records
description: "Map which modules of an application make security decisions (the module ledger), draft records for them in the background for a code owner to review, and read, follow and help write security decision records: one document per module or feature (.guardlink/records/SDR-n-<module>.md) that says what was decided for that code, the rules that follow, why, and what looks like a bug but is not, binding once its text is on the default branch, approved through a code owner's pull-request review (a name typed at the person's own terminal is the weaker fallback). Use before changing code a record covers, when a request goes against a record's rule, when someone says a module's access or security behaviour is a bug, when asked to write down a security decision or standard for one module, when the briefing says there is no module ledger or the after-edit hook says a module has no record, when asked what the application intends (SDR-0), and when `bravos records check` fails."
---
<!-- bravos:generated -->
> Paths that start with `SKILL_DIR/` are files in this skill's own folder, the folder that holds this SKILL.md.
# Bravos records: what was decided for this module, approved by a person
A record is the standard for the code it covers. Follow an approved record exactly; help write one only from what the team says; a person, never you, makes it binding: a code owner approving the pull request that brings it to the default branch, or, as the weaker fallback, a person typing their name.
## When
- You are about to change code and the briefing lists security decision records, or a file carries a comment naming one (`SDR-n`).
- The person asks for something a record's rule forbids, or reports as a bug something a record lists under "Not a bug".
- The person asks to write down a security decision, rule or standard for one module or feature, or `bravos records check` fails.
- Reading and following records is on every plan. Writing a new one and adopting it are on the Team plan (the briefing's `Plan:` line); on Free say so with the trial command, `bravos account activate`. Rules for the whole company are bravos-principles; rules for the whole application are bravos-context.
## Do
1. Before changing a file, ask which record covers it: `bravos records for <file>`. In Claude Code, Codex, Cursor, Antigravity, opencode and omp the first edit in a session to a covered file is refused once with the record in full: that is Bravos, not an error. Read the record, then make the edit again, and it goes through. Read each record it names in full (the file under `.guardlink/records/`) and follow it: every rule (under "Always and never", or "Rules" in an older record), and everything under "Allowed on purpose" ("Not a bug" in an older record) is intended behaviour, not a defect to fix. "What would hurt us most" is the owner's worry list: keep it in mind, it checks nothing. A record whose sections are all empty is blank and binds nobody. SDR-0 is the application's own record: once approved it applies to every change, like the company principles, so keep to its rules in all code; no edit is refused for it, and each module still has its own record. Only an approved record binds; for a draft, tell the person it binds nobody yet and ask how they want to proceed. A record this branch edits is a proposal: the default branch's text still binds until the pull request is approved and merged.
2. When what you are asked to do would break a rule, stop before editing. Tell the person which rule (its id and its words), how it was approved (`bravos records show SDR-n`), and that the change goes against it; ask whether they want to change the decision. Do not make the change on your own reading of the request.
3. If they still want the change and the record stays as it is, make it and record the break where it happens: an `@exposes` of the rule's threat on that code, its description starting with the rule ("SDR-3 R1 broken: sales can open the margin report, asked for by <their name>"), with `@audit` beside it. Tell them `bravos rules` now shows the rule as unguarded and that it stays open until the code is fixed or the record is changed and adopted again. When asked to link a possible conflict (`bravos records conflicts`, or the dashboard's Decision records view, gives its key), read it with `bravos records conflicts --json`, check in the code that it really goes against that rule, and if it does record it the same way: an `@exposes` of the rule's threat at that place, with `@audit`, keeping the original claim as it is; if it does not, tell the person, who may dismiss it at their own terminal. Never dismiss one yourself.
4. Map the modules once per repository. `bravos setup` offers it (Team plan): it proposes the modules, from the code graph's entry points when the graph is built, and writes one blank record per module that needs one, its owner from CODEOWNERS, never a rule; `bravos records setup` does the same later, and `--pr` opens the pull request on its own branch (run it with `--pr` only when the person asks for the pull request). A blank record binds nobody: its owner fills it in. When the briefing says there is no module ledger, offer once to map them; on a yes run `bravos records ledger propose`, check each proposed module against the code and what the person tells you (on the Team plan also ask the code graph: `codegraph_routes`, `codegraph_auth_boundary`, `codegraph_attack_surface`, and merge or split modules by feature; without the graph, say that boundaries come from folders, documents and annotations only), then `--write`, fix rows with `bravos records ledger add` or `remove`, and rewrite each Why in their words. Tell them it is a proposal a person reviews in its pull request, never enforced. When the after-edit hook says a module needs a record and has none, or no record covers security-relevant code you are changing, look for a decision already written down (`bravos context list`, `docs/`, the README, `.guardlink/intent.md`), tell the person in one line, say the company principles and the application's rules still apply, and offer to draft one. Never copy principles into a record. Carry on with their request; a missing record never blocks it.
5. To draft a record, gather what was decided from exactly three places and nothing else: what the person tells you in this conversation, a document that says it (`SRC-n` and the section), and rules people confirmed in `.guardlink/intent.md`. Cite each on its line: `(said by <name>)`, `(SRC-n § Section)`, `(intent: INV-n)`. Draft only when someone asks for a record. Write each rule as one line of plain words a CXO can read, about 15 words (`bravos records check` refuses a drafted rule over 25, citations not counted): "R1 enforced: Report uploads accept PDF only, never SVG, HTML or scripts (said by Priya)". Leave "Allowed on purpose" for a person to fill in. When the decision is unclear, ask one question; never fill a gap with your own view of good practice. In the background (the briefing's Background drafting line, Team plan), the code is a fourth source, as observation only: run `bravos records drafts`, draft only the modules it lists, each with `bravos records draft "<module>"`, which starts its own branch and worktree (never switch the person's branch). A rule read from the code is `(observed: <file>:<line>)`, what the code does today and not a decision, so it is guidance; Not a bug stays empty unless a document, a confirmed rule or the person says it, never from code; the decision stays the team's placeholder when nobody stated one. Then `bravos records check -C <worktree>` until it passes and `bravos records ledger refresh -C <worktree>`, commit there, push nothing, and in one line ask the person whether to open each draft's pull request.
6. For the whole application (it replaces the intake page), `bravos records new --app` writes SDR-0 blank, for the team to fill in the same plain way. In the foreground, run `bravos records new "<module>" --paths "<glob>,<glob>" [--owner @<user or org/team>]` (the code the record covers; the owner defaults to the CODEOWNERS owner of the new file); it writes the blank template with the next free id: a header (record, module, owner, paths) and four sections whose prompts are comments. It is the module owner's to fill in; when they ask you to help, write in their words: "What this module does" in one or two lines; "Always and never", one line each, as `- R1 enforced: <text>` when a test could show it broken at a place in the code and `- R2 guidance: <text>` otherwise; "Allowed on purpose", each behaviour that looks wrong and is the decision, as `- NB1: <what> (said by <name>)`; and "What would hurt us most", the risks they worry about. Older records use Decision, Rules, Not a bug and Why for the same sections, and `R1 (enforced):` for a rule; both read the same. When the record names an `owner:`, `bravos records check` notes it if CODEOWNERS gives the file to someone else. When it is a capability someone holds by design (an admin running commands on a user's machine), add indented lines the person confirms: `- for: #<actor>, <scope>`, `- where: <globs or "METHOD /path">` (the record's paths if absent), `- holds if: <the check that must hold> (<file>:<line>)` and `- kind: <kind>[, <kind>]`, one or more of command-execution, arbitrary-fetch, file-transfer, markup, redirect, data-export, query. Only `kind:` says which weaknesses the item covers (command-execution is CWE-77/78/94/95/96 and nothing else); the words never do, since "admins can execute scheduled report jobs" reads like command execution and is not. With `for:`, `holds if:` and `kind:`, a finding of that kind is reported as by design and its check is what gets tested (`bravos records intended <file[:line]> --threat <id>` says whether something matches); without all three the item is a note only. You may suggest the `holds if:` citation from the code, marked `(observed: <file>:<line>)`, and a kind (`bravos records check` says which kind the words read like); ask the person "this reads like command-execution; is that what it means?" and write `kind:` only when they say yes. Who may act on whose object (another tenant, IDOR) is never by design.
7. Run `bravos records check` and fix what it reports in the record you wrote.
8. Tell the person: "This is a draft and binds nobody yet. Its observed rules are what the code does today: confirm or remove each, and tell me what looks wrong here and is intended, for Not a bug." On their yes, open its pull request (`git push -u origin <branch>`, then `gh pr create`), and say: "It is approved when it reaches the default branch through a pull request that a code owner reviews." `bravos records check` prints a `review:` line saying whether the default branch requires a code owner's review (it asks GitHub with `gh` when it is signed in). When that line says not enforced or unknown, offer once to add CODEOWNERS lines for the records: show them with `bravos records codeowners --owner <@user or @org/team>`, and write them with `--yes` only after the person says yes and names the owner; never write CODEOWNERS unasked. Requiring that review on the branch is a repository setting only an admin changes; say so, do not change it. Where there is no GitHub review, the fallback is a typed name: `bravos review records` (Team plan) or `bravos records adopt SDR-n` in their own terminal; say it is weaker, since a typed name shows who said so, not that anyone reviewed it. Do not wait: carry on with what else was asked.
9. For each enforced rule, put it in the threat model, then give it a test. Start from `bravos records annotate SDR-n`: per enforced rule it gives the threat (or the `@threat` line to add), where the rule is placed now, and where the code may enforce it (the code graph's entry points inside the record's paths, else its files). Read each candidate before writing on it. An enforced rule of an adopted record with no place in the code is a note in `bravos records check` (a failure with `--strict`, and by default from 1.30), and the pre-PR gate holds a branch that changes code under it, so place every one. In `.guardlink/definitions.*`, reusing ids and never redefining one: one `@threat` carrying the reference `record:SDR-n` and a description that starts with the rule's id, e.g. `@threat Sales opens the margin report (#sdr-margin-report-admin-only) [high] cwe:CWE-862 record:SDR-3 -- "SDR-3 R1: only admins open the margin report"`. Then follow `SKILL_DIR/../bravos-annotate/SKILL.md` over the record's paths: `@mitigates` where the code upholds the rule, `@exposes` where it does not. When adoption reports that a rule's threat has no replay test, follow `SKILL_DIR/../bravos-templatize/SKILL.md` to write one bound to that threat, so bravos-prove can confirm a break.
10. Point the code at its record. On each file the record covers that makes the decisions it describes, add `@comment -- "Security decision record SDR-n governs this file: .guardlink/records/SDR-n-<module>.md. Read it before changing access here."` where the briefing's `Annotations:` line says annotations go.
11. Run `guardlink validate .` and `bravos rules`, which lists each rule of each record with its status. Ask before committing: "Commit the record, the definitions and the annotations now, or leave them for you to review?" (a `Commits:` line in the briefing is their standing answer). A person's adoption file under `.guardlink/records-answers/`, CODEOWNERS lines they said yes to, and the ledger (`bravos records ledger refresh` first, so its Record column is current) are committed with the record.
12. When the pre-PR gate holds a pull request for a record rule, tell the person the three ways it clears: fix the code; a person approves a dated exception for that rule and place at their own terminal (`bravos records except SDR-n R1 --where "<glob>" --reason "<why>" --until YYYY-MM-DD`); or they change the record (edit it in their words, run `bravos records check`) and the new text is approved. An edited record holds only the branch that edits it: when the default branch requires a code owner's review, the gate notes it and GitHub holds the merge until a code owner approves; otherwise that branch waits until a person adopts the new text by name. Other branches keep following the default branch's text. `bravos records gaps` lists modules with security claims and no record.
## Never
- Adopt or approve a record, approve a pull request, approve an exception, change branch protection, write CODEOWNERS without the person's yes, write or edit a file under `.guardlink/records-answers/` or `.guardlink/records-exceptions.json`, answer the review page for a person, or fake a terminal to run `bravos records adopt` or `bravos records except`.
- Write the ledger's Record or Owner column by hand (Bravos writes them), call a module reviewed, or mark one optional to stop the nudge.
- Write a decision, a rule or a "Not a bug" line the team did not state, or present your own view of good practice as their decision.
- Fill "Not a bug" from the code, mark an observed rule enforced, start more drafts than `bravos records drafts` lists, or push a draft or open its pull request before the person says yes.
- Change an adopted record without being asked, or weaken a rule or narrow its paths to make a change pass.
- Treat a draft as binding, or "fix" behaviour an adopted record lists under "Not a bug".
- Write `@accepts`, `@entitles` or `@confirmed` for a record's rule.
- Put a secret, a token or a path on someone's machine in a record.
## Done when
- Every file you changed was checked with `bravos records for`, and you followed each adopted record it named or raised the conflict with the person before editing.
- A record you drafted passes `bravos records check`, says only what the team stated, and the person was told it is a draft and how to adopt it.
- Each enforced rule has a threat carrying `record:SDR-n`, `guardlink validate .` exits 0, and a break you were told to make is recorded as an open exposure with `@audit`.
## What it leaves for the next skill
- The rule threat ids, for bravos-annotate (where each can break) and bravos-templatize (a test for each enforced rule). After an edit, a new exposure of a rule's threat or a removed check of one shows as a decision-record card; code with security claims that no record covers gets one line per file per session.
- `bravos rules` shows each record rule's status: holds, unguarded, broken, or not placed.
## Go deeper
- `SKILL_DIR/../bravos-annotate/SKILL.md` — recording where a threat can break.
- `SKILL_DIR/../bravos-principles/SKILL.md` — rules for every repository, not one module.
- `SKILL_DIR/../bravos-context/SKILL.md` — the application's intent and the stored design documents.