promptdojo_

Prompting for real output — composition, control, and the eight knobs that matter — step 7 of 8

Write score_image_prompt(prompt) that takes a prompt string and returns a dict:

{"score": int (0-8), "missing": list[str]}

Use this exact KNOB_KEYWORDS table (provided in the starter). Lowercase the prompt and check if ANY keyword for a knob appears as a substring. If yes, that knob is hit. If no, add the knob's name to missing. score is the number of knobs hit (0-8). missing keeps the original knob-table order.

Three prompts run: good, mid, bad. Expected output:

good: {'score': 8, 'missing': []}
mid:  {'score': 5, 'missing': ['lighting', 'lens', 'negatives']}
bad:  {'score': 0, 'missing': ['subject', 'composition', 'lighting', 'style', 'camera', 'lens', 'palette', 'negatives']}

full-screen editor opens — close anytime to keep reading.