agentleFS
markmhendricksonmarkmhendrickson/neotoma/.cursor/rules/cursor_rules_sync_requirement.mdc

neotoma / rules

Cursor rule38 starsChanged 2 months agoMITView on GitHub

Load after editing any rule or command source: run setup_cursor_copies immediately in same conversation; do not defer; verify sync succeeded before marking rule update complete.

The file

We split this cursor_rules_sync_requirement.mdc into the rules it gives an agent

12 rules. About 0 are common, 9 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈9

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    When this requirement applies

    line 27
  2. Distinctive:

    MANDATORY: After editing ANY rule or command source file, agents MUST:

    line 48
  3. Distinctive:

    Check script output for "✅ Cursor rules setup complete!"

    line 81
  4. Distinctive:

    Verify no errors in script output

    line 82
  5. Very specific:

    Check that .cursor/rules/ or .cursor/commands/ contains updated files

    line 87
  6. Distinctive:

    Verify header comments in copied files reference correct source

    line 88
  7. Very specific:

    MUST ALWAYS run /setup_cursor_copies: after editing any rule or command source file

    line 93
  8. Distinctive:

    MUST verify sync succeeded: before completing the workflow

    line 97
  9. Distinctive:

    Before marking rule/command updates complete:

    line 109
  10. Very specific:

    MANDATORY: Always run /setup_cursor_copies immediately after editing any rule or command

    line 137
  11. Distinctive:

    MANDATORY: Run sync in the same conversation/workflow as the edit

    line 138
  12. Distinctive:

    MANDATORY: Verify sync succeeded before marking updates complete

    line 139

≈ “Common” is an estimate: at least 1 in 5 of the 6,668 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
cursor_rules_sync_requirement.mdc
---
description: "Load after editing any rule or command source: run setup_cursor_copies immediately in same conversation; do not defer; verify sync succeeded before marking rule update complete."
alwaysApply: false
---

# ⚠️  DO NOT EDIT THIS FILE DIRECTLY
#
# This is a copy of: foundation/agent_instructions/cursor_rules/cursor_rules_sync_requirement.mdc
# Source of truth: foundation/agent_instructions/cursor_rules/cursor_rules_sync_requirement.mdc
#
# To edit this rule:
# 1. Edit the source file: foundation/agent_instructions/cursor_rules/cursor_rules_sync_requirement.mdc
# 2. Run '/setup_cursor_copies' to sync changes
#
# This file will be overwritten when running setup_cursor_copies.

# Cursor Rules Sync Requirement Rule

## Purpose

Ensures agents ALWAYS run `/setup_cursor_copies` immediately after updating any rule or command file, ensuring changes are synced to `.cursor/` directory in the same conversation/workflow.

## Scope

This document covers:
- Mandatory requirement to run `/setup_cursor_copies` after rule/command updates
- When this requirement applies
- Validation requirements

This document does NOT cover:
- How to edit rules (see `cursor_rules_editing.mdc`)
- Foundation vs repository rule locations (see `cursor_rules_editing.mdc`)

## Trigger Patterns

Agents MUST run `/setup_cursor_copies` immediately after:

- Editing any file in `docs/` that is a rule source (files matching `*_rules.mdc` or `*_rules.md`)
- Editing any file in `docs/` that is a command source (files matching `*_command.md`)
- Editing any file in `foundation/agent_instructions/cursor_rules/`
- Editing any file in `foundation/agent_instructions/cursor_commands/`
- Updating rule documentation
- Creating new rule files
- Modifying existing rule files

## Mandatory Requirement

**MANDATORY:** After editing ANY rule or command source file, agents MUST:

1. **Immediately run `/setup_cursor_copies`** in the same conversation/workflow
2. **Do NOT defer this step** to a later conversation
3. **Do NOT mark rule updates complete** without running `/setup_cursor_copies`
4. **Verify the sync succeeded** by checking script output

## Agent Actions

### Step 1: Edit Source File

1. Identify the source file location:
   - Repository rules: `docs/{subdirectory}/{name}_rules.mdc` or `docs/{subdirectory}/{name}_rules.md`
   - Foundation rules: `foundation/agent_instructions/cursor_rules/{name}.mdc`
   - Commands: `docs/{subdirectory}/{name}_command.md` or `foundation/agent_instructions/cursor_commands/{name}.md`

2. Edit the source file directly (never edit `.cursor/` copies)

### Step 2: Run Setup Script (MANDATORY)

**MUST run immediately after editing:**

```bash
./foundation/scripts/setup_cursor_copies.sh
```

Or if foundation is in parent directory:

```bash
../foundation/scripts/setup_cursor_copies.sh
```

**Verify success:**
- Check script output for "✅ Cursor rules setup complete!"
- Verify no errors in script output
- Confirm files were copied/updated

### Step 3: Verify Sync

1. Check that `.cursor/rules/` or `.cursor/commands/` contains updated files
2. Verify header comments in copied files reference correct source
3. Confirm changes are reflected in copied files

## Constraints

- **MUST ALWAYS run `/setup_cursor_copies`** after editing any rule or command source file
- **MUST run in the same conversation/workflow** as the rule update
- **MUST NOT defer** this step to a later conversation
- **MUST NOT mark rule updates complete** without running `/setup_cursor_copies`
- **MUST verify sync succeeded** before completing the workflow

## Forbidden Patterns

- Editing rule/command source files without running `/setup_cursor_copies`
- Deferring `/setup_cursor_copies` to a later conversation
- Marking rule updates complete without running `/setup_cursor_copies`
- Assuming changes will sync automatically (they won't)
- Skipping sync verification

## Validation Checklist

Before marking rule/command updates complete:
- [ ] Source file edited (in `docs/` or `foundation/agent_instructions/`)
- [ ] **`/setup_cursor_copies` run immediately after editing** (MANDATORY)
- [ ] Script output shows "✅ Cursor rules setup complete!"
- [ ] No errors in script output
- [ ] Changes verified in `.cursor/rules/` or `.cursor/commands/` copies
- [ ] Rule update workflow complete (edit → sync → verify)

## Related Documents

- `cursor_rules_editing.mdc` - How to edit rules and commands
- Repository setup_cursor_copies command documentation

## Agent Instructions

### When to Load This Document

Load this document when:
- Editing any rule or command file
- Creating new rule or command files
- Updating rule documentation

### Required Co-Loaded Documents

- `cursor_rules_editing.mdc` - Rule editing guidelines

### Constraints Agents Must Enforce

1. **MANDATORY:** Always run `/setup_cursor_copies` immediately after editing any rule or command
2. **MANDATORY:** Run sync in the same conversation/workflow as the edit
3. **MANDATORY:** Verify sync succeeded before marking updates complete
4. **FORBIDDEN:** Deferring sync to a later conversation
5. **FORBIDDEN:** Marking rule updates complete without running sync

### Forbidden Patterns

- Editing rules without running `/setup_cursor_copies`
- Deferring sync to later conversations
- Marking updates complete without sync
- Assuming automatic sync (doesn't exist)

### Validation Checklist

- [ ] Source file edited
- [ ] `/setup_cursor_copies` run immediately (same conversation)
- [ ] Sync verified successful
- [ ] Changes confirmed in `.cursor/` copies
- [ ] Workflow complete

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.