/personal-plugin:define-questions <document-path> [--format json|csv] [--preview]from personal-plugin
Extracts questions, open items, and gaps from a document and saves them as structured JSON or CSV.
Ships in personal-plugin. Installing the plugin adds it to Claude Code.
Analyze the document specified by the user and extract all questions, open items, areas needing clarification, and incomplete sections into a comprehensive, downloadable JSON file.
Pipeline component: This command extracts questions to JSON. For the combined extract → answer → update workflow, use
/finish-document.
Required Arguments:
<document-path> - Path to the document to analyzeOptional Arguments:
--format [json|csv] - Output format (default: json)
json: Structured format with metadata (default, compatible with /ask-questions)csv: Flat tabular format with columns: id, text, context, topic, sections, priority--preview - Show summary and ask for confirmation before saving--force - Save output even if schema validation fails (not recommended)--no-prompt - Disable interactive prompting for missing arguments (for scripts and CI/CD)Validation: If the document path is missing:
--no-prompt is specified, display the error and exit:Error: Missing required argument
Usage: /define-questions <document-path> [--format json|csv] [--no-prompt]
Example: /define-questions PRD.md
Example: /define-questions docs/requirements.md
Example: /define-questions PRD.md --format csv
/define-questions requires a document path.
Please provide the path to the document to analyze:
> _
(or use --no-prompt to disable interactive prompting)
Wait for the user to provide the document path, then proceed with analysis.
Read the specified document - The user will provide a document path or name after the /define-questions command (e.g., /define-questions PRD.md). Read and analyze that document thoroughly.
Identify all questions and open items - Look for:
?)Create a JSON file with the following structure for each question/open item:
{
"questions": [
{
"id": 1,
"topic": "Best guess at the topic area (e.g., 'User Authentication', 'Data Model', 'Integration')",
"sections": ["Section name or header where this question is relevant"],
"question": "The actual question or open item that needs clarification",
"context": "Any relevant information, background, or details needed to understand and properly answer this question",
"priority": "high | medium | low"
}
],
"metadata": {
"source_document": "Name of the analyzed document",
"total_questions": 0,
"generated_date": "ISO date string",
"topics_summary": ["List of unique topics identified"]
}
}
Assign sequential IDs starting from 1 for each question.
Assign priority - Rate each question as high, medium, or low:
Categorize by topic - Group related questions under logical topic areas based on the content (e.g., "Technical Architecture", "User Experience", "Business Logic", "Data Management", "Integration", "Security", "Performance", etc.).
Reference relevant sections - For each question, note which section(s) of the document it relates to. Use the exact section headers/titles from the document.
Provide rich context - For each question, include enough context so that someone unfamiliar with the document could understand:
Save the output - Based on the --format flag:
Directory Creation: Before writing any output file, ensure the target directory exists:
# Ensure output directory exists before writing
mkdir -p reference/
JSON Format (default):
reference/questions-[document-name]-[timestamp].jsonYYYYMMDD-HHMMSSCSV Format:
reference/questions-[document-name]-[timestamp].csvid,question,context,topic,sections,priorityReport the results - After creating the file, provide a summary to the user including:
--preview is specified:
Preview: /define-questions
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Source: PRD.md
Questions found: 15
By topic:
Technical Architecture: 5
User Experience: 3
Data Model: 7
Schema validation: PASSED
Output file: questions-PRD-20260114-143052.json
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Save this file? (y/n):
{
"questions": [
{
"id": 1,
"topic": "Board Role Definitions",
"sections": ["3.1 AI Board Members", "4.2 Governance Sessions"],
"question": "What specific expertise and personality traits should each of the 5 AI board member roles embody?",
"context": "The PRD mentions a 5-role AI board for career governance but does not define the specific roles, their areas of expertise, how they should interact with each other, or their individual decision-making styles. This is critical for implementing the governance session logic and ensuring diverse perspectives.",
"priority": "high"
},
{
"id": 2,
"topic": "LLM Integration",
"sections": ["5.1 Technical Architecture"],
"question": "Which LLM provider(s) will be used for the AI board members and transcription services?",
"context": "The document references LLM services for voice transcription and AI board member responses but does not specify whether to use OpenAI, Anthropic, or other providers. This affects API integration, cost modeling, and capability constraints.",
"priority": "high"
}
],
"metadata": {
"source_document": "PRD.md",
"total_questions": 2,
"generated_date": "2026-01-10T14:30:00Z",
"topics_summary": ["Board Role Definitions", "LLM Integration"]
}
}
id,question,context,topic,sections,priority
1,"What specific expertise and personality traits should each of the 5 AI board member roles embody?","The PRD mentions a 5-role AI board for career governance but does not define the specific roles, their areas of expertise, how they should interact with each other, or their individual decision-making styles.",Board Role Definitions,"3.1 AI Board Members;4.2 Governance Sessions",high
2,"Which LLM provider(s) will be used for the AI board members and transcription services?","The document references LLM services for voice transcription and AI board member responses but does not specify whether to use OpenAI, Anthropic, or other providers.",LLM Integration,5.1 Technical Architecture,high
The output JSON must conform to the questions schema defined below.
Before saving the output file, validate against the inline questions schema rules:
--force provided: Save anyway with a warningRequired fields (metadata):
metadata.source_document - Source document pathmetadata.generated_date - ISO 8601 timestampmetadata.total_questions - Integer countRequired fields (per question):
id - Unique identifier (string or integer)question - The question textcontext - Background informationpriority - One of: high, medium, lowOptional fields:
topic, category, sections, locationAfter successful validation, display:
Schema validation passed. Saved to questions-PRD-20260114-143052.json
Validation: PASSED
- Required fields: All present
- Field types: All correct
- Total questions: 15
If validation fails and --force is not provided:
Schema validation failed:
Errors:
- questions[3].id: Required field missing
- questions[7].priority: Must be one of: high, medium, low
- metadata.generated_date: Invalid date-time format
Fix these issues or use --force to save anyway (not recommended).
If --force is provided, save the file with a warning:
WARNING: Schema validation failed but --force was specified.
Output saved to questions-PRD-20260114-143052.json
This file may not work correctly with /ask-questions or /finish-document.
See references/patterns/validation.md for full validation patterns.
| Error Condition | Behavior |
|---|---|
| File not found | Display: Error: Document not found at [path]. Verify the file path and try again. |
| Empty document | Display: Error: Document at [path] is empty. Nothing to analyze. |
| Binary file | Display: Error: [path] appears to be a binary file. This command only processes text/markdown documents. |
| No questions found | Display: No questions, open items, or TBDs found in [document]. The document appears complete. Suggest running /assess-document for a quality check. |
| Document too large | If the document exceeds ~60% of available context, read section headings first, then process the document in sections. Display: Note: Large document detected. Processing in sections to ensure completeness. |
| Write permission error | Display: Error: Cannot write to reference/ directory. Check file system permissions. |
/ask-questions and /finish-documentThis command validates output against the inline questions schema rules. See references/patterns/validation.md for full validation behavior.
| Flag | Behavior |
|---|---|
| (default) | Validate output, fail if invalid, show specific errors |
--force | Save output despite validation errors (with warning) |
--preview | Show validation status before save confirmation |
Validation Status in Output: All command completions include validation status:
Validation: PASSED - All required fields present, types correctValidation: FAILED - Errors listed, file not saved (unless --force)Validation: SKIPPED - Used with --force, file saved with warningTypically completes in under 30 seconds regardless of document size.
/ask-questions — Interactively walk through answering the extracted questions/finish-document — Full pipeline: extract questions, answer them, update the document/assess-document — Evaluate document quality (complementary analysis)/create-plan — Generate implementation plan from requirements (uses similar document analysis)What the command file sets; muted values are Claude Code's defaults
7-day visitors to each command page
npx claudepluginhub davistroy/claude-marketplace --plugin personal-plugin23 commands in this plugin
/analyze-transcriptMeeting Transcript AnalysisMeeting transcript to structured markdown report/arch-review-singleArchitecture Review — Single Domain AgentRun a single domain agent from the architecture review team against a target codebase/arch-synthesizeArchitecture Review — SynthesizeRe-synthesize the executive summary from existing domain findings — use after editing findings, re-running a single agent, or resolving conflicts/ask-questionsAsk Questions CommandInteractive Q&A session from questions JSON file/assess-documentDocument Assessment CommandDocument quality evaluation with scored assessment report/bump-versionBump Version CommandAutomate version bumping across plugin files with CHANGELOG placeholder