agentleFS
HackingDaveHackingDave/nightwire/.cursor/rules/post-change-verification.mdc

nightwire / rules

Cursor rule193 starsChanged 7 months agoMITView on GitHub

Run verification after code edits; before prod deploy only when deploy is part of the same agent task

We split this post-change-verification.mdc into the rules it gives an agent

5 rules. About 0 are common, 3 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    When you change application code in this repository, treat the task as incomplete until verification passes:

    line 9
  2. Very specific:

    Run bash scripts/cursor-agent-verify.sh from the repo root (activates .venv or venv if present, then python3 -m pytest).

    line 11
  3. Distinctive:

    If your instructions include deploying to production:

    line 18
  4. Very specific:

    Run bash scripts/cursor-agent-verify.sh immediately before the first production deploy command in that same task.

    line 20
  5. Distinctive:

    Do not wire this into deploy scripts so that human-only standalone deploys stay unchanged.

    line 21

≈ “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
post-change-verification.mdc
---
description: Run verification after code edits; before prod deploy only when deploy is part of the same agent task
alwaysApply: true
---

# Verification after changes and before production deploy

## After coding changes
When you change application code in this repository, treat the task as incomplete until verification passes:

1. Run `bash scripts/cursor-agent-verify.sh` from the repo root (activates `.venv` or `venv` if present, then `python3 -m pytest`).
2. Fix failures and re-run until clean.
3. Briefly review touched areas for logic and security issues relevant to the change.

The Cursor `stop` hook runs `scripts/cursor-agent-verify.sh` when this generation included agent file edits; if it fails, fix the issues in a follow-up.

## Production deploy in the same task
If **your instructions include deploying to production**:

- Run `bash scripts/cursor-agent-verify.sh` **immediately before** the first production deploy command in that same task.
- Do **not** wire this into deploy scripts so that human-only standalone deploys stay unchanged.

## Standalone deploy
Human-only production deploys outside an agent session do not require this rule.

Download now (ZIP)

  • 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 repositoryOne other file 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.

Reviews can't be read right now.

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.