agentleFS
sergeyklaysergeyklay/cityhive/.cursor/rules/dependency-management.mdc

cityhive / rules

Cursor rule2 starsChanged 18 months agoMITArchived repositoryView on GitHub

Dependency Management

  • Installs packages

The file

We split this dependency-management.mdc 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. Distinctive:

    Explicit versions: - avoid loose version constraints in production

    line 14
  2. Very specific:

    Commit uv.lock: - always version control lock file

    line 51

≈ “Common” is an estimate: at least 1 in 5 of the 7,324 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
dependency-management.mdc
---
description: Dependency Management
globs: pyproject.toml
alwaysApply: false
---
# Dependency Management

**For dependency files:** Strict rules for managing project dependencies with uv.

## Core Principles

- **ONLY use `uv`** - `pip` is forbidden in this project
- **Lock file committed** - `uv.lock` must be in version control
- **Explicit versions** - avoid loose version constraints in production

## Essential Commands

```bash
# ✅ DO: Correct uv usage
uv add package-name                    # Add new dependency
uv add --group dev ruff                # Add development dependency
uv add package-name --upgrade-package  # Upgrade specific package
uv run tool-name                       # Run tools via uv
uv sync                                # Install from lock file

# ❌ DON'T: Forbidden commands
pip install package-name              # Never use pip
uv pip install package-name           # Don't use uv pip
uv add package-name@latest            # Don't use @latest syntax
```

## Quick Reference

```bash
# Add dependency
uv add package-name

# Add testing dependency
uv add --group tesing pytest

# Install from lock file
uv sync

# Update dependencies
uv sync --upgrade
```

## Critical Rules

- **NEVER use pip** - uv only in this project
- **Commit uv.lock** - always version control lock file
- **Review before adding** - evaluate necessity of new dependencies

---

**See also:**
- [Development Guide](mdc:docs/development.md) for package management workflows
- [Technology Stack](mdc:docs/technology-stack.md) for uv rationale and benefits
- [CONTRIBUTING.md](mdc:CONTRIBUTING.md) for dependency guidelines in contributions

**Key Points:**
- uv provides faster, more reliable dependency management than pip
- Lock files ensure reproducible environments across all systems
- Development and production dependencies should be clearly separated

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.