agentleFS
truefoundrytruefoundry/tfy-deploy-skills/.cursor/rules/deploy.mdc

tfy-deploy-skills / rules

Cursor rule1 starsChanged 8 months agoMITView on GitHub

TrueFoundry deployment rules for YAML manifests and service configuration

  • Reads credentials

The file

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

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Before applying any manifest, verify all of the following:

    line 13
  2. Very specific:

    Exposed ports require hosts: If any port has expose: true, it MUST have a host field.

    line 15
  3. Very specific:

    No inline secrets: All sensitive values (API keys, passwords, tokens) must use tfy-secret://tenant:group:key references.

    line 17
  4. Distinctive:

    Reasonable resource limits: Verify CPU, memory, and GPU requests/limits are appropriate for the workload.

    line 18
  5. Very specific:

    Before any tfy CLI command, always set TFY_HOST:

    line 23
  6. Very specific:

    Always build for linux/amd64 architecture

    line 33
  7. Distinctive:

    When a manifest references multiple services, deploy in tier order:

    line 65
  8. Distinctive:

    Never deploy a later tier until all earlier tiers are healthy.

    line 70

≈ “Common” is an estimate: at least 1 in 5 of the 3,030 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
deploy.mdc
---
description: TrueFoundry deployment rules for YAML manifests and service configuration
globs: ["*.yaml", "*.yml", "tfy-manifest*", "truefoundry*"]
alwaysApply: false
---

# TrueFoundry Manifest Rules

These rules apply when working with TrueFoundry deployment manifests (YAML files).

## Manifest Validation Checklist

Before applying any manifest, verify all of the following:

1. **Exposed ports require hosts**: If any port has `expose: true`, it MUST have a `host` field. Deployments will fail without this.
2. **Workspace FQN is set**: The `workspace_fqn` field must reference the user-confirmed workspace. Never hardcode or guess.
3. **No inline secrets**: All sensitive values (API keys, passwords, tokens) must use `tfy-secret://tenant:group:key` references. Never put raw values in YAML.
4. **Reasonable resource limits**: Verify CPU, memory, and GPU requests/limits are appropriate for the workload.
5. **Health probes configured**: Services should have readiness and liveness probes with appropriate paths and thresholds.

## Pre-Deploy: Set TFY_HOST

Before any `tfy` CLI command, always set TFY_HOST:

```bash
export TFY_HOST="${TFY_HOST:-${TFY_BASE_URL%/}}"
```

## Build Source Rules

- `build_source.type: local` requires `tfy deploy -f`, NOT `tfy apply -f`
- `build_source.type: image` or `build_source.type: git` can use `tfy apply -f`
- Always build for `linux/amd64` architecture

## Port Configuration

```yaml
ports:
  - port: 8080
    expose: true
    host: "myapp.example.com"  # REQUIRED when expose: true
    protocol: TCP
```

## Environment Variables

```yaml
env:
  # Public values - inline is fine
  APP_ENV: "production"
  # Sensitive values - MUST use secret references
  DATABASE_URL: "tfy-secret://tenant:my-secret-group:database-url"
  API_KEY: "tfy-secret://tenant:my-secret-group:api-key"
```

## Resource Defaults

- **Small service**: 0.5 CPU, 512Mi memory
- **Medium service**: 1 CPU, 1Gi memory
- **Large service**: 2 CPU, 4Gi memory
- **LLM serving**: 4 CPU, 16Gi memory, 1 GPU (type depends on model size)

## Multi-Service Ordering

When a manifest references multiple services, deploy in tier order:
1. Infrastructure (databases, caches, queues)
2. Backend (API servers, workers)
3. Frontend (web apps, UIs)

Never deploy a later tier until all earlier tiers are healthy.

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.