Do you have any suggestions on how to improve this prompt for cursor? Reason about any…
- User
Do you have any suggestions on how to improve this prompt for cursor? Reason about any changes and at the end output the full prompt again. Heres my prompt: Create a comprehensive action plan on how to build this exact ui with react.js and FASTAPI for the backend that will be able to control camera variables through a python program in the future, now just keep it in mind that the buttons will be able to send the api request to python. First contact the figma MCP server and get to know all parts of the design in detail, so you can plan ahead and start thinking about how to execute this. Do not code anything before you are sure that you can replicate the figma design 1:1 pixel perfect, with all the button variables being brought from the original figma design also. The UI should use the exact buttons and SVGs[they are in the icons folder] as the original design, it should look exactly the same. Currently the buttons wont do anything just react to the user. The width of this side bar should be 171px and its height should be 1600px. the background should be pitch black. The rest e.g. 2389x1600 pixels should be now just white space without any text added, in the future this is where the camera feed will be shown. Button States[all names are the same as in the figma design]: cooling_button: 4 states (State = 0 → State = 1 → State = 2 → State = 3 → cycle) heating_button: 4 states (State = 0 → State = 1 → State = 2 → State = 3 → cycle) gain_switch: 2 states (State = LCG ↔ State = HCG toggle) denoising_button: 4 states (0 → 25 → 50 → 75 → cycle) high_ful_well_button: 2 states (0 ↔ 1 toggle) low_noise_mode_button: 2 states (0 ↔ 1 toggle) zoom_bar_switch from a default of 1x to any of the other zoom values like 3x, 5x and 10x. All smoothly with an animation they should all have a nice modern IOS like animation. The record_button should be switched to its pressed position[State = 1] after the user presses it, stay there until it's pressed again then it goes into its default not_pressed position[State = 0]. The shutter_button should be in its not pressed position[State = 0], when clicked on it should create an ios camera shutter button like animation when switching to its pressed position[State = 1], but only for a short time before it returns to its not pressed position. Think the plan through well so that it can be flawlessly executed, if you are more than 95% sure that you can copy the figma design perfectly, start working now, but think again before every step and action and think once again after it and reflect back if it is exactly like in the figma design, contacting the figma MCP server to doublecheck.
Assistant
Okay, this is a good starting point, but we can refine this prompt to get a more structured and actionable response from Cursor. Here's a breakdown of improvements and the final prompt:
Reasoning for Changes:
-
Clarity and Structure: The original prompt is a bit dense. Breaking it into smaller, more focused instructions will help Cursor understand the requirements better.
-
Prioritization of Design Replication: Emphasize the importance of perfect design replication right at the start. This avoids spending time on backend or functionality before the UI is nailed down. Also, mentioning the Figma MCP server repeatedly can be streamlined. We can instruct the bot to confirm aspects of the design with the MCP server as necessary rather than at every step.
-
Specifics on Figma Connection: Explicitly ask about using Figma's API, and specify getting design tokens to aid in exact replication. This encourages leveraging Figma's capabilities for precision.
-
Backend Specification: Clarify the backend requirements. State the data format for API requests.
-
Animations: Elaborate on the animations, specifying
react-springas it's designed for animations and transitions like the mentioned IOS animations. -
Focus on Action Plan: Explicitly ask for the action plan before any code generation. This helps the response be well-structured.
-
De-emphasize Constant Double-Checking: The repeated emphasis on double-checking the Figma design feels redundant. We can trust the bot to refer back as needed if we highlight the priority early on.
Improved Prompt:
You are tasked with creating a React.js frontend and a FastAPI backend to control camera variables through a Python program in the future. This action plan must prioritize 1:1 pixel-perfect replication of the provided Figma design. **Phase 1: Figma Design Analysis and Action Plan** 1. **Connect to Figma:** Use the Figma API to access the design. Specifically, retrieve all relevant design tokens (colors, fonts, sizes, spacing) and component specifications from the Figma design to ensure pixel-perfect replication. Use the Figma MCP server to confirm aspects of the design as needed. 2. **UI Structure Breakdown:** Analyze the Figma design and create a detailed action plan for structuring the React.js UI. This plan should include: * Component hierarchy (e.g., sidebar, buttons, etc.) * How to handle the responsive layout for the main view (2389x1600 whitespace), considering future camera feed integration. * A list of React libraries and UI frameworks you plan to use (e.g., CSS-in-JS libraries like styled-components, or Tailwind CSS). * Outline the approach to handle the SVG icons from the "icons" folder, ensuring correct rendering and styling. 3. **Button State Management:** Detail the approach to manage button states, with consideration for the following: * `cooling_button`: 4 states (State = 0 -> State = 1 -> State = 2 -> State = 3 -> cycle) * `heating_button`: 4 states (State = 0 -> State = 1 -> State = 2 -> State = 3 -> cycle) * `gain_switch`: 2 states (State = LCG <-> State = HCG toggle) * `denoising_button`: 4 states (0 -> 25 -> 50 -> 75 -> cycle) * `high_ful_well_button`: 2 states (0 <-> 1 toggle) * `low_noise_mode_button`: 2 states (0 <-> 1 toggle) * `zoom_bar_switch`: Smoothly animate between zoom values (1x, 3x, 5x, 10x) with an iOS-like animation using `react-spring`. * `record_button`: Toggle between State = 0 (not_pressed) and State = 1 (pressed). * `shutter_button`: Animate briefly to State = 1 (pressed) with an iOS camera shutter-like animation using `react-spring`, then return to State = 0 (not_pressed). 4. **Animation Plan:** Provide a detailed plan for implementing the animations, focusing on achieving the iOS-like smooth transitions. Mention specifically using `react-spring` for smooth and performant animations. **Phase 2: Implementation (Begin *after* Action Plan is Approved)** * **React Frontend:** Build the UI with the specified dimensions (sidebar: 171px width, 1600px height, pitch black background; main view: 2389x1600 white space). The UI should use the exact buttons and SVGs from the original design. Currently, the buttons will only react to user interaction; they will not yet trigger API requests. * **FastAPI Backend:** Create the FastAPI backend to receive requests from the React frontend. The backend should be structured to allow for future integration with a Python program controlling camera variables. * Specify the data format for requests to the API (e.g. JSON). * Assume that the python program will be able to be triggered using system calls e.g. subprocess.run(). **Deliverables:** 1. The detailed action plan, including component breakdown, library selections, animation plan, and data format. 2. React.js frontend code (initially with UI and button states only). 3. FastAPI backend code with API endpoints prepared for future integration with the Python camera control program. Do *not* begin coding until the action plan is clearly laid out and you have confirmed you understand the design specifications and requirements. Prioritize creating the action plan first.-
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.