speckit.analyze
Perform a non-destructive cross-artifact consistency and quality analysis across spec.md, plan.md, and tasks.md after task generation.
Start task execution loop
> /plugin marketplace add tzachbon/smart-ralphHow it fires
How this command gets triggered: by you, by Claude, or both.
/implementContext preview
What this command does when you run it.
Start task execution loop
description: Start task execution loop argument-hint: [--max-task-iterations 5] allowed-tools: [Read, Write, Edit, Task, Bash, Skill]
You are starting the task execution loop.
1. Read `.specify/.current-feature` to get active feature (format: `<id>-<name>`) 2. If file missing or empty: error "No active feature. Run /speckit:start <name> first."
1. Check `.specify/specs/$feature/` directory exists 2. Check `.specify/specs/$feature/tasks.md` exists. If not: error "Tasks not found. Run /speckit:tasks first."
From `$ARGUMENTS`:
Before starting execution, check if spec files are uncommitted:
git status --porcelain .specify/specs/$feature/
If uncommitted files exist, commit them:
git add .specify/specs/$feature/ git commit -m "chore(speckit): commit spec files before implementation"
This ensures spec files are tracked before task execution begins.
1. Count total tasks in tasks.md (lines matching `- [ ]` or `- [x]`) 2. Count already completed tasks (lines matching `- [x]`) 3. Set taskIndex to first incomplete task 4. Read featureId and name from feature directory name (format: `<id>-<name>`)
Write `.specify/specs/$feature/.speckit-state.json`:
{
"featureId": "<3-digit id>",
"name": "<feature-name>",
"basePath": ".specify/specs/<id>-<name>",
"phase": "execution",
"taskIndex": <first incomplete>,
"totalTasks": <count>,
"taskIteration": 1,
"maxTaskIterations": <parsed from --max-task-iterations or default 5>,
"globalIteration": 1,
"maxGlobalIterations": 100,
"awaitingApproval": false,
"recoveryMode": <true if --recovery-mode flag present, false otherwise>,
"maxFixTasksPerOriginal": 3,
"fixTaskMap": {}
}After writing the state file, output the coordinator prompt below. This starts the execution loop. The stop-hook will continue the loop by outputting continuation prompts until all tasks are complete.
**DESIGN NOTE: Prompt Duplication** This file contains the full coordinator specification (source of truth). The stop-watcher.sh outputs an abbreviated resume prompt for loop continuation. This is intentional design:
The duplication is by design to balance completeness vs. token efficiency.
Output this prompt directly to start execution:
You are the execution COORDINATOR for feature: $feature
### 1. Role Definition
You are a COORDINATOR, NOT an implementer. Your job is to:
- Read state and determine current task
- Delegate task execution to spec-executor via Task tool
- Track completion and signal when all tasks done
CRITICAL: You MUST delegate via Task tool. Do NOT implement tasks yourself.
You are fully autonomous. NEVER ask questions or wait for user input.
### 2. Read State
Read `.specify/specs/$feature/.speckit-state.json` to get current state:
```json
{
"featureId": "<3-digit id>",
"name": "<feature-name>",
"basePath": ".specify/specs/<id>-<name>",
"phase": "execution",
"taskIndex": <current task index, 0-based>,
"totalTasks": <total task count>,
"taskIteration": <retry count for current task>,
"maxTaskIterations": <max retries>,
"globalIteration": <total iterations>,
"maxGlobalIterations": <max total iterations>,
"awaitingApproval": <boolean>,
"recoveryMode": <boolean - true if iterative failure recovery enabled>,
"maxFixTasksPerOriginal": <max fix tasks per original task, default 3>,
"fixTaskMap": <object tracking fix attempts per task>
}**ERROR: Missing/Corrupt State File**
If state file missing or corrupt (invalid JSON, missing required fields): 1. Output error: "ERROR: State file missing or corrupt at .specify/specs/$feature/.speckit-state.json" 2. Suggest: "Run /speckit:implement to reinitialize execution state" 3. Do NOT continue execution 4. Do NOT output ALL_TASKS_COMPLETE
If taskIndex >= totalTasks: 1. Verify all tasks marked [x] in tasks.md 2. Delete .speckit-state.json (cleanup) 3. Output: ALL_TASKS_COMPLETE 4. STOP - do not delegate any task
Read `.specify/specs/$feature/tasks.md` and find the task at taskIndex (0-based).
**ERROR: Missing tasks.md**
If tasks.md does not exist: 1. Output error: "ERROR: Tasks file missing at .specify/specs/$feature/tasks.md" 2. Suggest: "Run /speckit:tasks to generate task list" 3. Do NOT continue execution 4. Do NOT output ALL_TASKS_COMPLETE
**ERROR: Missing Feature Directory**
If feature directory does not exist (.specify/specs/$feature/): 1. Output error: "ERROR: Feature directory missing at .specify/specs/$feature/" 2. Suggest: "Run /speckit:start <feature-name> to create a new feature" 3. Do NOT continue execution 4. Do NOT output ALL_TASKS_COMPLETE
Tasks follow this format:
- [ ] X.Y Task description - **Do**: Steps to execute - **Files**: Files to modify - **Done when**: Success criteria - **Verify**: Verification command - **Commit**: Commit message
Extract the full task block including all bullet points under it.
Detect markers in task description:
If current task has [P] marker, scan for consecutive [P] tasks starting from taskIndex.
Build parallelGroup structure:
{
"startIndex": <first [P] task index>,
"endIndex": <last consecutive [P] task index>,
"taskIndices": [startIndex, startIndeSpec-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.