speckit.analyze
Perform a non-destructive cross-artifact consistency and quality analysis across spec.md, plan.md, and tasks.md after task generation.
Generate requirements from goal and research
> /plugin marketplace add tzachbon/smart-ralphHow it fires
How this command gets triggered: by you, by Claude, or both.
/requirementsContext preview
What this command does when you run it.
Generate requirements from goal and research
description: Generate requirements from goal and research argument-hint: [spec-name] [--quick|--interactive] allowed-tools: "*"
Generate requirements for the active spec. Require the research artifact to have explicit approval first. You are a **coordinator, not a product manager** -- delegate ALL work to the `product-manager` subagent.
Read `${CLAUDE_PLUGIN_ROOT}/references/normal-mode-gates.md` before gathering context.
Create a task for each item and complete in order:
1. **Gather context** -- resolve spec, read research and goal 2. **Interview gate** -- critical frontier and approval, or authorized quick bypass 3. **Execute requirements** -- dispatch product-manager via team 4. **Artifact review** -- spec-reviewer validation loop (both modes) 5. **Walkthrough & approval** -- display summary, get user approval 6. **Finalize** -- update state, commit, stop
1. If `$ARGUMENTS` contains a spec name, use `ralph_find_spec()` to resolve it; otherwise use `ralph_resolve_current()`. Store the resolved spec directory as `SPEC_PATH`. 2. If no active spec, error: "No active spec. Run /ralph-specum:new <name> first." 3. Check the resolved spec directory exists 4. Read `.ralph-state.json`, reject simultaneous exact `--quick` and `--interactive`, and normalize persistent mode with `phase_gate.py mode`. 5. If `research.md` exists and normalized `quickMode` is false, require its explicit artifact approval before clearing the approval flag. Exact quick mode continues with the validated file. When `research.md` is absent, record that there is no upstream research artifact and require no prior-artifact approval. 6. Clear the approval flag through the locked helper while preserving every other field:
python3 "${CLAUDE_PLUGIN_ROOT}/hooks/scripts/locked-state.py" merge \
--state "$SPEC_PATH/.ralph-state.json" \
--set "awaitingApproval=false"7. Read context: `research.md` (if exists), `.progress.md`, original goal. 8. Run skill discovery pass 1 if missing. Run pass 2 now when `research.md` exists and pass 2 is missing.
Apply `${CLAUDE_PLUGIN_ROOT}/skills/interview-framework/SKILL.md` in full to resolve the design-tree frontier under the persisted gate state.
In both interactive and exact quick mode, reload all selected contracts and required current-work resources, hash them, record the current manifest, then call `begin-interview` for phase `requirements`. A core load failure blocks either mode.
If normalized `quickMode` is true, the helper records `bypassed_quick`; continue to Step 3 without questions.
In interactive mode, apply the interview-framework with phase `requirements`. Candidate critical decisions include user outcome boundaries, materially different scope cuts, priority tradeoffs, and compliance obligations that research cannot resolve. Inspect existing roles, terminology, policies, behavior, and constraints instead of asking about them.
Ask the whole currently unblocked critical frontier, in calls of at most four questions. Persist partial answers. Apply control-only and bare-skip semantics. Present the requirements decision brief and require explicit `Approve and delegate`. On approval, run `check-delegation` and launch Step 3 immediately in the same response.
Use `classify-reply` before applying every reply, `revise --decision-id` for final-approval revisions, and `confirm --source approve-and-delegate` only for the explicit approval selection.
**Requirements Exploration Territory** (hints, not a script):
When scope requires a user decision, add 2-3 grounded approaches to the design tree. Examples (illustrative only):
Append to `.progress.md` under "Interview Responses":
### Requirements Grill (from requirements.md) - [Round decisions and resolved facts] - Chosen approach: [name] -- [brief description] - Shared understanding: confirmed
Pass combined context to delegation prompt as "Interview Context".
<mandatory> **Use Claude Code Teams with `product-manager` as the teammate subagent type.**
Follow the full team lifecycle:
1. **Clean up stale team (MANDATORY FIRST ACTION)**: Call `TeamDelete()` before anything else. This releases whatever team the session is currently leading (could be from any prior phase). Errors mean no team was active -- harmless, proceed. 2. **Create team**: `TeamCreate(team_name: "requirements-$spec")` 3. **Create task**: `TaskCreate(subject: "Generate requirements for $spec", activeForm: "Generating requirements")` 4. **Spawn teammate**: Immediately run `check-delegation`, then call `Task(subagent_type: product-manager, team_name: "requirements-$spec", name: "pm-1")`. Include the absolute state and helper paths, complete `[RALPH_PHASE_GATE]` tuple (`state`, `phase`, `interviewId`, `discoveryRevision`, `contextDigest`), verbatim manifest, fresh artifact agent ID `pm-1`, matching load/write-check instructions, approved decision brief, research context, goal, and `Interview Context`. Instruct the agent to follow `${CLAUDE_PLUGIN_ROOT}/templates/requirements.md`, including canonical section order, user stories with acceptance criteria, functional
Spec-driven development with smart compaction. Claude Code plugin combining Ralph Wiggum loop with structured specification workflow.
Perform a non-destructive cross-artifact consistency and quality analysis across spec.md, plan.md, and tasks.md after task generation.
Generate a custom checklist for the current feature based on user requirements.
Identify underspecified areas in the current feature spec by asking up to 5 highly targeted clarification questions and encoding answers back into the spec.
Create or update the project constitution from interactive or provided principle inputs, ensuring all dependent templates stay in sync.
Execute the implementation plan by processing and executing all tasks defined in tasks.md
Execute the implementation planning workflow using the plan template to generate design artifacts.