OpenRuna
Sign in

Handle the bug in feature

TEXT
Variables detected: ${feature_description}${expected_behavior}${actual_issue}${code_snippet}— replace before using.
Prompt3301 chars · 550 words
Act as a senior Flutter engineer + GIS/map system expert (ArcGIS-like SDK).

## Context
I am a non-technical developer using AI to build a map-based app (Flutter + Map SDK).

This feature involves:
- Map rendering
- Layer loading
- Dynamic property application (styling / behavior)

There is a bug, and previous AI fixes made the system more complex.

I do NOT understand:
- How map SDK handles layers internally
- When properties are applied (before/after render)
- Full data flow across UI → logic → SDK

You MUST first explain system clearly before fixing.

---

## Inputs

Feature:
${feature_description}

Expected Behavior:
${expected_behavior}

Actual Issue:
${actual_issue}

Code:
${code_snippet}

---

## Output Format (STRICT)

### 1. Map System Flow (Visual + Layer-Specific)

#### A. Flow Diagram
Provide a real flow diagram based on the given feature and code, showing:
- User action
- UI layer
- Controller/state handling
- Layer creation
- SDK interaction
- Property application
- Rendering
- UI update

---

#### B. Explain Each Stage
Explain clearly:
- What happens at each step
- What data is passed between layers
- What the SDK is likely doing internally

---

#### C. Critical Timing Points (IMPORTANT)
Identify:
- When the layer is created
- When data is loaded from source
- When properties SHOULD be applied relative to SDK lifecycle

---

### 2. Expected Behavior (Map-Specific)
Define expected behavior based on inputs:
- Successful layer load
- Correct property application
- Failure scenarios (invalid input, missing data, SDK failure)

If unclear, ask up to 3 specific questions and STOP.

---

### 3. Current Behavior
Explain what is actually happening using:
- The provided issue description
- The given code

---

### 4. Mismatch (Critical)
Identify exactly:
- Where expected behavior differs from actual behavior
- Which step in the flow is failing

---

### 5. Root Cause (Precise)
Identify the exact reason for the bug:
- Timing issue
- Incorrect layer reference
- State not updating
- Async handling issue

Point to specific function, block, or lifecycle stage in the code.

If unsure, clearly state assumptions.

---

### 6. Minimal Fix (STRICT)
- Provide the smallest possible change
- Do NOT rewrite the system
- Provide ONLY the modified code snippet

Focus on:
- Fixing timing
- Correcting data flow
- Fixing state updates

---

### 7. Why Fix Works
Explain how the fix resolves the issue:
- Link it to the system flow
- Link it to SDK behavior
- Link it to timing/lifecycle

---

### 8. Map-Specific Risks (IMPORTANT)
Analyze:
- Impact on other layers
- Performance implications
- Possible re-render issues

---

### 9. Prevention (Map Architecture)
Suggest improvements:
- Better layer lifecycle handling
- Proper placement of property logic:
  - Config layer
  - Renderer
  - Controller

---

## Constraints
- Do NOT assume SDK behavior without stating it
- Do NOT move logic randomly
- Do NOT add conditions blindly
- Focus on timing and data flow

---

## Fallback Rule
If inputs are insufficient:
- Ask up to 3 specific questions
- STOP and wait for clarification

---

## Self-Check
Before answering:
- Did I map the bug to a specific flow step?
- Did I identify a timing issue if present?
- Is the fix minimal and scoped?
- Did I avoid over-engineering?

Overview

Handle the bug in feature is a free prompt on OpenRuna. A curated prompt on OpenRuna for builders using ChatGPT, Claude, and Cursor.

What this prompt does

"Handle the bug in feature" is designed to help you get reliable results from AI assistants for real prompt tasks. A curated prompt on OpenRuna for builders using ChatGPT, Claude, and Cursor. It is catalogued in OpenRuna's resource graph so you can discover related prompts, tools, agents, and datasets in one place. Copy the content directly into ChatGPT, Claude, Gemini, or Cursor — or use it as a system prompt / skill instruction where applicable.

Use cases

  • Use "Handle the bug in feature" when you need a repeatable prompt for professional workflows without writing instructions from scratch each time.
  • Adapt this prompt for team onboarding — paste into Claude or ChatGPT and iterate on the output with your project context.
  • Combine with related tools and prompts in the same OpenRuna category to build a full stack for your use case.
  • Reference during code review or planning sessions when you want consistent AI-assisted quality bars.

Example output

When you run this prompt, expect structured output similar to:

Act as a senior Flutter engineer + GIS/map system expert (ArcGIS-like SDK).

## Context
I am a non-technical developer using AI to build a map-based app (Flutter + Map SDK).

This feature involves:
- Map rendering
- Layer loading
- Dynamic property application (styling / behavior)

There is a bug, and previous AI fixes made the system more complex.

I do NOT understand:
- How map SDK handles layers internally
- When properties are applied (before/after render)
- Full data flow across UI → logic → SDK

You MUST first explain system clearly before fixing.

---

## Inputs

Feature:
${feature_desc…

Outputs vary by model and temperature; treat the first response as a draft and refine with follow-up prompts.

Tips by platform

Claude

In Claude, paste the full prompt as the first user message or add it to Project instructions. Ask Claude to confirm assumptions before executing. For long prompts, use Claude's artifact panel to iterate on structured output.

ChatGPT

In ChatGPT, start a new chat and paste this prompt verbatim. Enable GPT-4o or your preferred model for coding tasks. Use follow-ups like "apply this to [your context]" for best results.

Cursor

In Cursor, add key instructions from this prompt to .cursorrules or a SKILL.md file. Reference it in Agent mode with @ mentions. Keep the original title in comments so teammates can find it on OpenRuna.

Frequently asked questions

What is "Handle the bug in feature"?
It is a prompt listed on OpenRuna — A curated prompt on OpenRuna for builders using ChatGPT, Claude, and Cursor. You can copy and adapt it for ChatGPT, Claude, Cursor, or other AI tools.
Is this prompt free to use?
Most OpenRuna resources are open or CC0-licensed. Check the license on this page before commercial use. Premium collections are clearly marked.
How do I get the best results?
Replace any template variables, add your project context, and ask the model to confirm assumptions. Iterate in 2–3 follow-up turns rather than expecting a perfect first response.
Can I use this with Claude and ChatGPT?
Yes. The prompt is model-agnostic text. Tips on this page cover Claude, ChatGPT, and Cursor specifically.
Where can I find related resources?
Scroll to Related resources on this page or browse the category hub on OpenRuna to find connected prompts, tools, and agents in the same topic area.

Related resources