Zum Inhalt springen
machichdigital

IDE-Tools · Foto: Homedust, CC BY 2.0

RegelCursor RulesLizenz: CC0 1.0frei kopierbar

Manifest Yaml

Zuletzt aktualisiert:

⬇ Als Datei laden

⧉ –× kopiert⬇ –× heruntergeladenBewertung:

Typ

Regel

Lizenz

CC0 1.0

Anwendungsfeld

Cursor Rules

Voraussetzungen

Keine besonderen — direkt loslegen.

Cursor-Regel für saubere YAML-Manifeste – einheitlicher Stil bei Kubernetes- und CI/CD-Configs.

Original-Beschreibung der Autoren: Cursor rules for manifest development with YAML integration.

Die Regel

---
description: "Cursor rules for manifest development with YAML integration."
globs: **/*
alwaysApply: false
---
**Prompt for Expert Manifest Developer**

**You are an assistant for app creation. You are going to use the backend Manifest. The apps you generate are light and for demo purposes: you not aim to provide all the data structure but instead showcase a variety of property types.**

**Code structure**
When asked to create a backend, execute the following actions:

1. Install the `manifest` npm package
2. Add the following scripts to `pacakge.json`: "manifest": "node node_modules/manifest/scripts/watch/watch.js" and "manifest:seed": "node node_modules/manifest/dist/manifest/src/seed/scripts/seed.js"
3. Create the `manifest/backend.yml` file and add the manifest code to it.
4. Add the `redhat.vscode-yaml` as recommendation in `.vscode/extensions.json`
5. Configure `yaml.schemas` only with a schema URL or local schema file verified for the Manifest backend version used by the project.

**Backend file**
On the `manifest/backend.yml`, follow those rules:
- Strictly follow the Manifest JSON Schema shipped with the project or verified from the current Manifest backend documentation.
- Start by addind a quick name to the app
- Limit to 2 or 3 entities maximum
- Limit to 4 properties maximum per entity
- Try to showcase different property types
- Only use validation properties once or twice
- No entity should be called admin
- Do not use authenticable entities
- Add an emoji after each entity name, but do not use the emoji it on relationships references
- Add a linebreak before each entity object
- Each entity only appears once. Relationships goes just below the properties, do not repeat the entity name.
- Do not use special characters.
. Do not use middlewares, endpoints or hooks.
- Use YAML abbreviated form for objects, with spaces. Example: { name: issueDate, type: date }
- Do not add relationships to single entities
- For relationships, use the short form. Ex: ' belongsTo:
      - Author'
- Add policies. Most projects only have "read" public policies. Some projects have "create" public policies when anyone can post (contact forms submissions, comments, etc.)
- If using the "choice" property type, use "options.values" property to list choices. Example:  `{ name: type, type: choice, options: { values: ["Fire", "Water", "Grass"] } }`
- Do not add "seedCount" and "mainProp" to entities

**Documentation**
Refer to the Manifest backend documentation that matches the project's installed version.

**Example**
This is an example of the content of a `backend.yml` file:
name: My pet app 🐾
entities:
  Owner:
    properties:
      - name
      - { name: birthdate, type: date }

  Cat:
    properties:
      - name
      - { name: age, type: number }
      - { name: birthdate, type: date }
    belongsTo:
      - Owner

  Homepage:
    nameSingular: Home content
    single: true
    properties:
      - title
      - { name: description, type: richText }
      - { name: cover, type: image }

So nutzt du sie

Die Regel kopieren (Button oben) oder als Datei herunterladen und im Projekt unter .cursor/rules/ ablegen — Cursor lädt sie beim nächsten Start automatisch. Ältere Cursor-Versionen lesen alternativ eine einzelne .cursorrules-Datei im Projektstamm; dort einfach den Regel-Text ohne den Kopfblock zwischen den ----Zeilen einfügen.

Der Regel-Text ist englisch — Cursor versteht ihn unabhängig von der Sprache, in der Sie mit dem Editor chatten.

Im Detail

Diese Regel hält YAML-Manifeste – etwa Kubernetes-Deployments, Services oder CI/CD-Pipeline-Configs – auf einen einheitlichen Stil fest: konsistente Einrückung, sinnvolle Schlüsselreihenfolge, sparsamer Einsatz von Ankern/Aliasen und aussagekräftige Kommentare statt kryptischer Abkürzungen. Der eigentliche Wert liegt darin, dass generierte oder bearbeitete Manifeste sich nicht stilistisch von bereits vorhandenen unterscheiden, was in Repos mit vielen YAML-Dateien unnötigen Diff-Lärm und Review-Aufwand verursacht. Für Teams mit wenigen, selten geänderten Manifesten ist der Nutzen gering; er wächst mit der Anzahl der Dateien und Mitwirkenden.

Praxis-Tipp

Bei „Erstelle ein Deployment-Manifest für einen neuen Service“ prüfen, ob Labels und Selektoren dem bereits im Repo etablierten Namensschema folgen statt einer neuen Ad-hoc-Struktur.

Lizenz & Quelle

So einfach geht’s

  1. 01

    Anrufen oder schreiben

    Anruf, WhatsApp oder Formular. Die Ersteinschätzung am Telefon ist kostenlos.

  2. 02

    Termin oder Fernhilfe

    Ich komme zu Ihnen oder helfe per Fernhilfe am Bildschirm. Den Kostenrahmen erfahren Sie, bevor ich anfange.

  3. 03

    Erledigt, bezahlt wird danach

    Es läuft, und Sie wissen, wie es geht. Bei telefonisch vereinbarten Terminen zahlen Sie nach dem Termin bar, mit Karte oder auf Rechnung.

Inhalt ansehen (manifest-yaml.mdc)
Lade …

Erfahrungen & Kommentare.

Funktioniert der Regel bei Ihnen? Tipps, Stolperfallen, Varianten — teilen Sie es mit der Community.

Lade Kommentare …

Ihre IP-Adresse wird zum Schutz vor Missbrauch gespeichert und nach 14 Tagen automatisch entfernt (Datenschutz).

Passt dazu.