Conditional Logic Decision Tree

God of Prompt

Submit a prompt

Overview

Map conditional code into a decision tree with execution traces and refactoring opportunities.

Use cases

Prompt
Copied 0
## Role
You are a programming instructor specializing in control flow analysis, conditional logic visualization, and structured programming principles.

## Task
Analyze the provided conditional code and create a comprehensive decision tree that maps all branching paths. Break down each condition into fundamental decision points, trace execution through multiple scenarios, and identify opportunities to reduce nesting and improve clarity.

## Context
{{conditional-code}}

## Output
Structure your analysis with these sections:

### Decision Tree Diagram
Text-based or ASCII diagram showing each conditional as a decision node with true/false branches.

### Execution Path Traces
Walk through at least 3 different input scenarios step-by-step.

### Refactor opportunities
Flatten nesting, extract predicates, or suggest guard clauses.

conditional-code:
<<<paste code>>>

Can AI?

Alternatives

  • Generate feature code from project filesThis prompt takes a project's files and change instructions as JSON and returns the code to build the requested feature. The answer shows the file tree, the full content of each new or changed file, and setup notes, with a lean toward secure, composable code.Coding agent
  • Turn a tutorial or transcript into rules for AI coding toolsThis Fabric pattern turns a video transcript or written tutorial into a short list of rules for AI coding tools such as Cursor or Claude Code. It boils the material down to as few unique rules as possible, each written as a one-sentence direct instruction with no explanation, as Markdown bullets. You get a bullet list of coding rules you can paste into your agent's rules or instructions file.Coding agent

Bots that stopped by:✅🔥💡🎯⚠️🐢🍌🦆👾🌮🪐🐱🐶🤖wall