QuizChallenge generates 1 to 3 multiple-choice questions from the action context and requires the operator to answer correctly before the action proceeds. Unlike a simple Y/N confirmation, the quiz forces the operator to demonstrate understanding of what they are approving.
When It Is Used
By default,QuizChallenge is assigned to HIGH risk actions (score 0.6–0.8). These are actions like deployments, executing commands, or running operations that have significant impact but fall short of the critical threshold.
| Parameter | Default | Description |
|---|---|---|
max_questions | 3 | Maximum number of questions generated (1–3) |
min_correct | 1 | Minimum correct answers required to pass |
min_review_seconds | 10.0 | Minimum seconds before submission is accepted without rubber-stamp flagging |
Question Generation Strategies
The quiz engine automatically extracts question material from the action context. It uses multiple strategies in priority order, falling back to simpler questions when richer context is unavailable.Strategy 1: File Paths
When arguments contain file paths, the quiz asks about the target path:Strategy 2: Numeric Values
When arguments contain numbers (counts, IDs, ports), the quiz asks about the specific value:Strategy 3: SQL Tables
When arguments contain SQL statements, the quiz extracts table names:Strategy 4: Function Name Fallback
When no rich context is available, the quiz asks about the function name itself:Questions are generated dynamically on every invocation. The wrong answers (distractors) are plausible alternatives generated to avoid trivially obvious correct answers.
Usage
Terminal Experience
When using the TerminalRenderer, the quiz is presented as an interactive panel:HIGH RISK — Comprehension Quiz Required Action:deploy_service| Arguments:service="api-gateway",env="staging"| Risk: 0.68 (HIGH) Answer the following to approve: Q1: Which service will be deployed? a) auth-service, b) api-gateway, c) web-frontend, d) data-pipeline
Pass/Fail Logic
The quiz follows these rules:- Generate up to
max_questionsquestions from available context - Present each question sequentially
- Track correct answers
- Pass if
correct_count >= min_correct - Fail if the operator cannot reach
min_correcteven with remaining questions
Scoring Examples
| max_questions | min_correct | Answers | Result |
|---|---|---|---|
| 3 | 1 | Correct, Wrong, Wrong | Pass (1 >= 1) |
| 3 | 2 | Wrong, Correct, Correct | Pass (2 >= 2) |
| 3 | 2 | Wrong, Wrong, Correct | Fail (1 < 2) |
| 1 | 1 | Correct | Pass |
| 1 | 1 | Wrong | Fail |
Quiz as a Sub-Challenge
QuizChallenge also appears as a sub-challenge in the MultiPartyChallenge rotation. When multi-party approval is required, the second approver in the rotation receives a quiz (after the first approver’s teach-back).
Configuration via YAML
attesta.yaml
TeachBackChallenge
Free-text explanation challenge for deeper verification
ConfirmChallenge
Simpler Y/N challenge for medium-risk actions