# AI Pair Programming — Quiz

## Question 1

When is AI *least* effective at helping?

A) Writing boilerplate and config files
B) Fixing a subtle race condition in WebSocket handling
C) Explaining what a regex does
D) Exploring multiple implementation options

<!-- ANSWER: B -->
<!-- EXPLANATION: Subtle debugging involves project-specific state, timing, and environment. AI lacks live context and may propose wrong fixes. Boilerplate, explanation, and option exploration are AI strengths. -->

## Question 2

What makes a prompt more effective?

A) Being short and generic
B) Including context, examples, and specific requirements
C) Using technical jargon only
D) Asking for "better" or "improved" output

<!-- ANSWER: B -->
<!-- EXPLANATION: Effective prompts provide context (where, what exists), examples (patterns to follow), and specific requirements. Vague prompts like "make it better" give the model little to work with. -->

## Question 3

The AI produced code that uses `var` and a `for` loop. You want `const` and `.map()`. What feedback works best?

A) "Use modern JS"
B) "Replace the for loop with .map() and use const instead of var"
C) "Fix this"
D) Rewriting the whole function yourself

<!-- ANSWER: B -->
<!-- EXPLANATION: Narrow, concrete feedback tells the AI exactly what to change. "Use modern JS" is ambiguous; "Fix this" gives no direction. Rewriting bypasses the iteration loop. -->

## Question 4

When reviewing AI-generated code, you should check for:

A) Only correctness
B) Correctness, safety (no secrets, validation), fit (matches patterns), maintainability
C) Only whether it runs
D) Only style consistency

<!-- ANSWER: B -->
<!-- EXPLANATION: Treat AI output like any code review. Correctness matters, but safety (hardcoded secrets, input validation), fit (conventions, architecture), and maintainability are equally important. -->

## Question 5

When should you take over from the AI manually?

A) After the first iteration
B) When the AI keeps proposing wrong fixes, or for architecture and security-critical decisions
C) Never — always iterate until it works
D) Only when the AI says it can't do something

<!-- ANSWER: B -->
<!-- EXPLANATION: Diminishing returns from repeated iteration signals time to take over. Architecture, security-critical logic, and subtle bugs you understand are better handled manually. -->

## Question 6

What does a "skill" (e.g., spec-writer, argus-integration) provide that a freeform prompt doesn't?

A) Faster response time
B) A reusable procedure the agent follows step-by-step; standardized inputs and outputs
C) Access to private APIs
D) Lower cost per request

<!-- ANSWER: B -->
<!-- EXPLANATION: Skills encode procedures. When invoked, the agent follows the skill's steps rather than interpreting a freeform request. This reduces ambiguity and ensures consistent results. -->
