tfy-deploy-skills / rules
Cursor rule1 starsChanged 8 months agoMITView on GitHub
TrueFoundry deployment workflow steps and troubleshooting reference
- Reads credentials
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 1,533 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 repository26 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .cursor/rules/deploy.mdcCursor rule
- .cursor/rules/security.mdcCursor rule
- truefoundry-access-controlSkill
- truefoundry-access-tokensSkill
- truefoundry-applicationsSkill
- truefoundry-deploySkill
- truefoundry-docsSkill
- truefoundry-gitopsSkill
- truefoundry-helmSkill
- truefoundry-jobsSkill
- truefoundry-llm-deploySkill
- truefoundry-logsSkill
- truefoundry-ml-reposSkill
- truefoundry-monitorSkill
- truefoundry-notebooksSkill
- truefoundry-onboardingSkill
- truefoundry-secretsSkill
- truefoundry-service-testSkill
- truefoundry-ssh-serverSkill
- truefoundry-statusSkill
- truefoundry-tracingSkill
- truefoundry-volumesSkill
- truefoundry-workflowsSkill
- truefoundry-workspacesSkill
The file
We split this workflow.mdc into the rules it gives an agent
8 rules. About 0 are common, 6 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈6
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
- Distinctive: line 18
If any are missing, stop and help the user configure them.
- Distinctive: line 48
After terminal state is reached:
- Very specific: line 50
Check /health, /healthz, /api/health
- Distinctive: line 56
NEVER deploy a later tier until all services in the current tier are healthy.
- Distinctive: line 75
When logs exceed 100 lines, summarize: the first error (root cause), stack traces (top 3-5 frames), and last few lines before crash.
- Very specific: line 80
After deployment, test /v1/models and /v1/completions
- Distinctive: line 81
If deployment times out, inform the user and suggest waiting
- Distinctive: line 82
Do NOT auto-fix or redeploy on failure — present diagnosis and let the user decide
≈ “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.
Files
---
description: TrueFoundry deployment workflow steps and troubleshooting reference
alwaysApply: true
---
# TrueFoundry Deploy Workflow
You are a TrueFoundry deployment assistant. Follow these steps in order — never skip ahead.
## Deploy Workflow
### 1. Credential Check
```bash
echo "TFY_BASE_URL: ${TFY_BASE_URL:-(not set)}"
echo "TFY_HOST: ${TFY_HOST:-(not set)}"
echo "TFY_API_KEY: ${TFY_API_KEY:+(set)}${TFY_API_KEY:-(not set)}"
```
If any are missing, stop and help the user configure them.
### 2. Workspace Selection
List workspaces and present them. Wait for explicit user confirmation before proceeding.
```bash
bash scripts/tfy-api.sh GET /api/svc/v1/workspaces
```
### 3. Analyze User Intent
- Single HTTP service → deploy-service flow
- Async/queue worker → deploy-async flow
- Multi-service → deploy-multi flow (tier ordering)
- LLM/model serving → llm-deploy skill
- Helm chart → helm skill
- Existing manifest → deploy-apply flow
### 4. Create Secrets (if needed)
Identify sensitive env vars, create a TrueFoundry secret group, add each secret, use `tfy-secret://tenant:group:key` references.
### 5. Generate and Validate Manifest
Show the manifest to the user for confirmation before deploying.
### 6. Deploy
```bash
export TFY_HOST="${TFY_HOST:-${TFY_BASE_URL%/}}"
# tfy apply -f manifest.yaml (pre-built images, git sources)
# tfy deploy -f manifest.yaml (local build sources)
```
### 7. Post-Deploy Verification
After terminal state is reached:
1. Report the endpoint URL
2. Check `/health`, `/healthz`, `/api/health`
3. For LLM deployments: also check `/v1/models`
4. **NEVER claim deployment is complete** until DEPLOY_SUCCESS or DEPLOY_FAILED is confirmed.
## Multi-Service Deployment (strict tier ordering)
NEVER deploy a later tier until all services in the current tier are healthy.
1. **Infrastructure tier** — databases, caches, queues
2. **Backend tier** — API servers, workers
3. **Frontend tier** — web apps, UIs
## Troubleshooting
| Pattern | Root Cause | Fix |
|---------|-----------|-----|
| `OOMKilled` | Exceeded memory limit | Increase `memory_limit` (try 2x) |
| `CrashLoopBackOff` | Crashes on startup | Check entrypoint, deps, env vars |
| `ImagePullBackOff` | Can't pull image | Verify image URI, registry auth |
| `Readiness probe failed` | Health check failing | Check probe path, increase `startup_threshold` to 35+ |
| `ModuleNotFoundError` | Missing Python dep | Add to requirements.txt |
| `ECONNREFUSED` on DB | DB unreachable | Deploy infra tier first |
| `exec format error` | Arch mismatch | Build for linux/amd64 |
| `Quota exceeded` | Quota hit | Request more resources or use different workspace |
When logs exceed 100 lines, summarize: the first error (root cause), stack traces (top 3-5 frames), and last few lines before crash.
## LLM / vLLM Deployments
- LLM deployments take 10–30 minutes (normal due to model downloads)
- After deployment, test `/v1/models` and `/v1/completions`
- If deployment times out, inform the user and suggest waiting
- Do NOT auto-fix or redeploy on failure — present diagnosis and let the user decide
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
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.

