๐Ÿš€ Everything is free โ€” help us improve! Submit feedback and shape the platform.
๐ŸงชTDD Challengeยทintermediateยทโฑ๏ธ 25โ€“40mยทโญ 175 XP

M-084Build a SCOPE Prompt Optimizer

Description

Nebula Corp's developers are writing vague prompts for their agentic coding tools, leading to poor results. Build a prompt optimizer that takes a vague prompt and enhances it using the SCOPE framework: Specific (what exactly?), Context (which files/systems?), Outcome (what should the result look like?), Patterns (what conventions?), Edge cases (what to handle?). The optimizer should analyze the input prompt and return an enhanced version with all SCOPE elements.

Test Cases (3)

Scores vague prompt low
Vague prompts should score low
Input:testScore()
Expected:0
Adds improvements
Should identify and add missing SCOPE elements
Input:testOptimize()
Expected:CONTAINS:improvements
Enhanced prompt is longer
Enhanced prompt should be more detailed than original
Input:testEnhanced()
Expected:true

Related Lessons

Click Run / Check to validate your solution