agentleFS
xmtpxmtp/libxmtp/.agents/skills/checking-spec-compliance/SKILL.md

checking-spec-compliance

Skill127 starsChanged 11 days agoMITView on GitHub

Use when adding implements/verifies backlinks for a spec, or when auditing a PR against the requirements it touches - covers finding affected IDs, the link rules, evidence, waivers, and the report shape

The file

We split this skill into the rules it gives an agent

2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Read docs/specs/SPEC-spec-format.md §4 for the link rules.

    line 8
  2. Distinctive:

    Never mention a requirement ID anywhere else in a comment.

    line 18

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Checking spec compliance

Read docs/specs/SPEC-spec-format.md §4 for the link rules. just spec-index maps IDs to their links; just spec-show ID prints one requirement with its evidence.

Finding affected requirements

Start from changed behaviour, not changed paths: the callers of what changed, the wire types and tables it touches, and the cross-cutting specs (AUTH, API, PROC). Search the index for those areas. An area the index does not map is unresolved scope; report it as unresolved rather than as no impact.

Linking

  • implements: ID in a comment above the item that enforces the obligation. Name the decision point, not every site that participates. None at all when the obligation is a property of the design.
  • verifies: ID (or several IDs, comma separated) above a test whose assertions establish the obligation. Link a test unless an already-linked test establishes the same property in the same place: four SDK tests of one property at four conversion boundaries all count, and so do the normal-path, rollback, and restart tests of one storage boundary. Prefer the Rust test when two are genuinely redundant. A test that merely exercises the code path does not qualify.
  • Never mention a requirement ID anywhere else in a comment. Remove any you find; that is what the checker flags.
  • When no test establishes it, add an entry to docs/specs/waivers.toml with the ID, a reason, and a kind: analysis when a recorded review establishes the obligation and no test can, gap when the implementation does not yet satisfy it, or untested when the reason names the code that satisfies it and no test proves it yet. A gap entry names an owner and an issue. An untested entry names an owner.

Auditing a PR

Audit against the approved spec on the base branch, never the PR's edits to it. A spec change inside the PR is a proposed amendment: review it separately, and never let it become the standard the code is judged against.

For each affected ID: read the implementation, read the linked test's assertions, run the test, and look for removed assertions, skipped cases, and relaxed expectations. Green tests can hide a weakened contract. Distinguish a new violation from a pre-existing gap.

Report

Affected IDs. Per ID, the evidence: test name, result, commit. Findings with the ID and the code location. Unresolved scope. Waivers needed.

Close with "no violation found within inspected scope", never "this cannot break any spec". Do not edit the specs.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.