Grill the user on raw requirements, clarify each one, then produce structured requirements in .mpx/REQUIREMENTS.md.
Input Resolution
- If
$ARGUMENTSis a file path, read it. - If
$ARGUMENTSis inline text, use directly. - If no arguments, look for
.mpx/RAW_REQUIREMENTS.mdin the project root. If not found, ask the user for requirements.
Process
Parse raw requirements into individual items, then for EACH requirement:
- Clarify ambiguity — ask about vague terms, edge cases, error handling.
- Define acceptance criteria — what does "done" look like?
- Ask about dependencies — does this depend on or block other requirements?
- Confirm scope — what's in, what's out?
Rules for grilling:
- Batch all questions for a requirement into a single numbered list. Present together in one round.
- Only split into a follow-up round when answers would materially change subsequent questions.
- Provide a recommended answer with each question.
- If a question can be answered by exploring the codebase, explore the codebase instead of asking.
- Never skip the grilling step — every requirement must be clarified.
Output
After grilling all requirements, write to .mpx/REQUIREMENTS.md:
- If
.mpx/doesn't exist, create it. - Append to existing REQUIREMENTS.md (preserve existing content).
- Group requirements by functional area.
- Each requirement gets: clear title, description, acceptance criteria.
If input came from .mpx/RAW_REQUIREMENTS.md, remove grilled items from that file after writing structured output.
Report
Summarize what was added: count of requirements, functional areas touched, any items deferred or needing follow-up.
Vocabulary Update (if applicable)
If VOCABULARY.md exists in the project root:
- Review the grilling session for new domain terms, renamed concepts, or clarified definitions.
- If new or updated terms were identified, present them to the user:
- New terms with proposed definitions
- Existing terms with updated definitions
- Ambiguities or synonym conflicts
- Only update
VOCABULARY.mdafter user confirms the changes. - If no new terms emerged, skip silently.