agentleFS
colinhackscolinhacks/zshy/.cursor/rules/snapshot-updates.mdc

zshy / rules

Cursor rule1.1k starsChanged 15 months agoMITView on GitHub

When tests fail due to snapshot mismatches, update the snapshots using: or the short form: Snapshots are stored in test/snapshots/zshy.test.ts.snap and contain expected output from the zshy build tool tests.

We split this snapshot-updates.mdc into the rules it gives an agent

7 rules. About 0 are common, 7 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈7

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    When tests fail due to snapshot mismatches, update the snapshots using:

    line 8
  2. Distinctive:

    After making intentional changes to test behavior

    line 22
  3. Distinctive:

    When fixing bugs that affect test output

    line 23
  4. Distinctive:

    When adding new features that change build output

    line 24
  5. Distinctive:

    After refactoring code that impacts test results

    line 25
  6. Distinctive:

    Only update snapshots when the new behavior is correct

    line 34
  7. Distinctive:

    Commit snapshot updates separately from code changes for easier review

    line 35

≈ “Common” is an estimate: at least 1 in 5 of the 6,350 Cursor rule 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
snapshot-updates.mdc
---
---

# Snapshot Testing Guide

## Updating Snapshots

When tests fail due to snapshot mismatches, update the snapshots using:

```bash
pnpm vitest run --update
```

or the short form:

```bash
pnpm vitest run -u
```

## When to Update Snapshots

- After making intentional changes to test behavior
- When fixing bugs that affect test output
- When adding new features that change build output
- After refactoring code that impacts test results

## Snapshot Files

Snapshots are stored in [test/**snapshots**/zshy.test.ts.snap](mdc:test/__snapshots__/zshy.test.ts.snap) and contain expected output from the zshy build tool tests.

## Best Practices

- Review the diff before updating snapshots to ensure changes are expected
- Only update snapshots when the new behavior is correct
- Commit snapshot updates separately from code changes for easier review

Download now (ZIP)

Trending

Less talk lately.about the whole repository

Dec 2025: 0 mentionsJan 2026: 7 mentionsFeb 2026: 2 mentionsMar 2026: 0 mentionsApr 2026: 0 mentionsMay 2026: 3 mentionsJun 2026: 1 mentionJul 2026: 7 mentionsAug 2026: 1 mentionSep 2026: 0 mentionsOct 2026: 8 mentionsNov 2026: 0 mentions
Dec 2025Jun 2026Nov 2026
Mentions a month of the colinhacks/zshy repository that our weekly crawl found. There is no adoption data for this file yet.

Who's talking about colinhacks/zshy

The biggest 5 of 31 mentions linking to the repository that our crawl found. Each line is their own headline.

See all 31

Talked about on GitHub and Bluesky (31 times).

On GitHub · 30

25 more on GitHub
  • Where files are headingNew Cursor rule files have more rules about planning and tracking tasks, and fewer about code style.

    Of the Cursor rule files we read, the 3,978 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.

  • In this repository2 other files it gives its agents.

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.