user-input-protocol
Pattern for subagents to request user input when AskUserQuestion is unavailable
What this skill does
# User Input Protocol
**Version:** 1.0.0
**Portability:** High
---
## Objective
Defines a pattern for subagents (background tasks, delegated agents) to request user input when they cannot directly call AskUserQuestion.
**Purpose:** Enable long-running or background agents to ask clarifying questions without failing or making assumptions.
**Scope:**
- **Included:** Pause pattern, state preservation, question format, resumption workflow
- **Excluded:** Specific checkpoint implementations (framework-dependent)
---
## Core Principles
### Principle 1: Subagents Cannot Directly Ask Questions
**The Problem:** In most agent frameworks, only the main conversation can call AskUserQuestion. Subagents (background tasks, delegated agents) attempting to call it will fail.
**Why this matters:** Long-running agents often hit decision points requiring user input. Without a pattern, they must either guess (bad) or fail (wasteful).
**How to apply:**
- Accept that subagents have limited tools
- Design a pause-and-resume pattern instead of direct calls
- Use the main conversation as an intermediary
**Example:**
```
# Agent framework limitation
Main Conversation: CAN call AskUserQuestion ✓
Subagent (background): CANNOT call AskUserQuestion ✗
# Solution
Subagent pauses → Main conversation asks → Subagent resumes
```
### Principle 2: Save State Before Pausing
**The Principle:** Before requesting input, save all necessary context so work can resume seamlessly.
**Why this matters:** Session restarts lose conversation history. State preservation ensures no wasted work redoing analysis.
**How to apply:**
1. Document what you've done so far
2. Save references to files created/read
3. Store the specific decision pending
4. Preserve enough context to continue without re-analyzing
**Example (Framework-Agnostic):**
```
State to preserve:
- Task description and progress
- Files created: [auth_test.rs, auth.rs]
- Files analyzed: [user.rs, session.rs]
- Decision needed: "Should Email validation be strict or lenient?"
- Context: "Found 3 different email patterns in existing code"
```
### Principle 3: Structured Question Format
**The Principle:** Use a consistent, structured format for questions that includes context, options, and constraints.
**Why this matters:** Ad-hoc question formats lead to confusion. Structured formats ensure users have enough context to make informed decisions.
**How to apply:**
- Provide context explaining why you're asking
- Offer specific options (2-4 choices)
- Include descriptions explaining each option's implications
- Indicate whether multiple selections are allowed
**Example Format:**
```json
{
"context": "Why you're asking this question",
"question": "The actual question text?",
"options": [
{
"label": "Option A",
"description": "What this means and its implications"
},
{
"label": "Option B",
"description": "What this means and its implications"
}
],
"multiSelect": false
}
```
### Principle 4: Clean Resumption
**The Principle:** When resuming with the user's answer, retrieve saved state and continue seamlessly without redoing work.
**Why this matters:** Users expect agents to remember what they were doing. Redoing analysis wastes time and creates frustration.
**How to apply:**
1. Retrieve saved state (checkpoint, task metadata, etc.)
2. Load files you were working on
3. Read the user's answer
4. Continue immediately from where you paused
**Example:**
```
# Bad: Restart from scratch
"Let me re-analyze all the code to understand the problem again..."
# Good: Resume cleanly
"You chose Option A (strict email validation). Continuing implementation..."
```
---
## Constraints and Boundaries
### DO:
- Save comprehensive state before pausing (all context needed to resume)
- Provide clear context explaining why you need input
- Offer specific options with clear descriptions
- Indicate you're pausing and waiting for input
- Resume cleanly using saved state
### DON'T:
- Assume you can call AskUserQuestion from a subagent (you can't)
- Pause without saving state (context will be lost)
- Ask vague questions without options ("What should I do?")
- Make assumptions when user input is actually needed
- Redo analysis when resuming (use saved state)
**Rationale:** This pattern bridges the gap between subagent limitations and user interaction needs while preserving work and context.
---
## Usage Patterns
### Pattern 1: Background Agent Needs Clarification
**Scenario:** Long-running mutation testing agent finds surviving mutants and needs to know whether to create individual tasks.
**Approach:**
1. Pause current work
2. Save state (mutant details, progress so far)
3. Format question with specific options
4. Signal pause to main conversation
5. Main conversation asks user via AskUserQuestion
6. Main conversation resumes agent with answer
7. Agent retrieves state and continues
**Example (Conceptual):**
```
# Step 1: Agent pauses
Save state:
- Feature: user-authentication
- Progress: Mutation testing complete, 97% score
- Pending decision: 3 surviving mutants found
- Mutant details: [file:line details for each]
# Step 2: Agent signals
Output: PAUSED_FOR_INPUT
Question: "Found 3 surviving mutants. Create individual fix tasks?"
Options: ["Yes - create tasks", "No - just report"]
# Step 3: Main conversation intermediates
(Main conversation detects pause, calls AskUserQuestion)
User answer: "Yes - create tasks"
# Step 4: Agent resumes
Retrieve state → Read mutant details → Create 3 tasks → Complete
```
### Pattern 2: Domain Agent Encounters Ambiguous Business Rule
**Scenario:** Domain modeling agent finds conflicting patterns in existing code and needs business rule clarification.
**Approach:**
1. Document the conflict found
2. Save analysis of both patterns
3. Ask user which is correct
4. Resume and apply the chosen rule
**Example:**
```
State:
- Analyzing: Email validation logic
- Found: Two patterns
- Pattern A: Strict RFC 5322 compliance (auth module)
- Pattern B: Lenient validation (signup module)
- Decision: Which pattern should be standard?
Question: "Found two email validation approaches. Which should be canonical?"
Options:
- "Strict RFC 5322 (more secure, may reject valid emails)"
- "Lenient (more permissive, may accept invalid emails)"
- "Keep both (context-dependent)"
```
### Pattern 3: Code Reviewer Needs Architectural Decision
**Scenario:** Code review agent finds architectural inconsistency and needs to know preferred approach.
**Approach:**
1. Document the inconsistency
2. Present the tradeoffs
3. Ask for preferred direction
4. Resume and apply feedback
---
## Integration with Other Skills
**Works well with:**
- **debugging-protocol:** When debugging reveals ambiguous root cause, pause and ask user
- **tdd-constraints:** When test requirements are unclear, pause and clarify acceptance criteria
- **orchestration-protocol:** Main orchestrator detects pauses and manages user interaction
**Prerequisites:**
- Framework must support agent resumption (continuing with full context)
- State preservation mechanism (checkpoints, task metadata, or similar)
- Main conversation can spawn and resume subagents
---
## Common Pitfalls
### Pitfall 1: Trying to Call AskUserQuestion from Subagent
**Problem:** Subagent attempts direct tool call and fails
**Solution:** Accept the limitation. Use pause-and-resume pattern instead.
### Pitfall 2: Pausing Without State Preservation
**Problem:** Agent pauses but doesn't save context. On resumption, starts over.
**Solution:** Always save comprehensive state before signaling pause. Test resumption to verify no work is lost.
### Pitfall 3: Vague Questions Without Options
**Problem:** "What should I do about this?" with no context or choices
**Solution:** Provide specific context, clear options with descriptions, and enough information for user to decide.
### Pitfall 4: Assuming Answer Format
**Problem:** Agent assumeRelated in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.