๐งช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