Graphical Apps Development
Cursor-Regel mit allgemeinen Konventionen für die Entwicklung grafischer Desktop-Anwendungen.
Cursor-Regel mit allgemeinen Konventionen für die Entwicklung grafischer Desktop-Anwendungen.
Original-Beschreibung der Autoren: Cursor rules for graphical apps development with integration.
Die Regel
---
description: "Cursor rules for graphical apps development with integration."
globs: **/*
alwaysApply: false
---
# Project Synopsis
Pyllments is a Python library for building graphical and API-based LLM applications through chaining together Elements in a potentially cyclic graph. Elements and Payloads are a type of Components. A Component is composed of a Model and Views. The Model handles the underlying data and logic, while the Views are the UI components that are used to display display the interactive UI used to interact with the Model.
An Element is a type of Component that is responsible for a specific function. For instance, an Element can handle the LLM selection and generation by making calls to LLM providers. Another Element may handle the chat interface, whose Model would store the chat message history, and the Views would be the text boxes and buttons used to interact with the chat interface. Elements are meant to connect to other Elements through Ports. All that is necessary to link Elements together is to link the output port of one Element to the input port of Another. Each output port may have unlimited input ports it connects to, and each input port may have unlimited output ports it connects to. The ports follow an observer pattern where the output port is the subject and the input port is the observer. The subject notifies the observers when a certain event that we set within the Element is triggered.
In order to connect an input and and output port, they need to be setup in a manner that sends and receives the same type of Payload. A Payload is also a Component with a Model as well as views responsible for the display logic. Elements may receive payloads and use methods of the Payload to generate the views for the UI. The sending Element is responsible for packing data into the Payload.
I am currently working on making this a fully-fledged framework.
# Project Organization
Here is an example of the file structure of an individual element:
chat_interface:
- __init__.py
- chat_interface_element.py
- chat_interface_model.py
- css:
- buttons.css
- column.css
- input.css
# Primary Libraries Used
- Panel is used to create the visualization layer and run the GUI. Views tend to consist of Panel objects which can be styled with Python and CSS.
- Param is used to create parameterized classes which help create parameters that handle type validation, default values, constraints, and most importantly, reactivity(setting event handlers to catch changes).
- Langchain is responsible for the specific functions pertaining to incorporating LLM workflows.
# Development Priorities
Pyllments code is prioritized on being developer-friendly, where extensibility and modularity are first-class citizens. Elements should be customizeable with clean and intuitive interfaces. It should also be easy to create new elements depending on the needs of the developer.
# Documentation
Docstrings should use a NumPy/SciPy style.
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
Eine allgemeine Regel für die Entwicklung grafischer Desktop-Anwendungen (GUI-Apps), losgelöst von einem bestimmten mobilen oder Web-Stack. Sie soll Cursor dazu anleiten, bei UI-Code auf saubere Trennung von Logik und Darstellung sowie plattformübliche Konventionen zu achten. Da der konkrete GUI-Toolkit (z. B. Qt, Electron, native Frameworks) aus den vorliegenden Angaben nicht hervorgeht, sollte man vor dem Einsatz prüfen, ob die Regel zum gewählten Framework passt — sonst kann die generierte Struktur am tatsächlichen Stack vorbeigehen.
Praxis-Tipp
Regel-Inhalt vor dem Einsatz kurz sichten, um zu sehen, für welches GUI-Toolkit sie konkret gedacht ist, bevor man sie ins Projekt kopiert.
Lizenz & Quelle
- Lizenz: CC0 1.0
- Quelle: PatrickJS/awesome-cursorrules (GitHub)
Inhalt ansehen (graphical-apps-development.mdc)
Lade …
Erfahrungen & Kommentare.
Funktioniert der Regel bei Ihnen? Tipps, Stolperfallen, Varianten — teilen Sie es mit der Community.
Lade Kommentare …
Passt dazu.
AI Agent Specialist
Cursor-Regel, die den KI-Editor auf diszipliniertes, spezialisiertes Agenten-Verhalten trimmt.
Alpha Skills Quant Factor Research
Cursor-Regel für quantitative Faktor-Recherche im Trading/Finance-Bereich — leitet die KI zu methodisch sauberer Analyse an.
Android Jetpack Compose
Cursor-Regel für Android-Entwicklung mit Jetpack Compose — sorgt für idiomatischen, deklarativen Kotlin-UI-Code.
