Smart Ralph — Prompt Excerpts
Excerpt 1: start.md — Delegation Mandate (Iron Law pattern)
Source: plugins/ralph-specum/commands/start.md
## CRITICAL: Delegation Requirement
**YOU ARE A COORDINATOR, NOT AN IMPLEMENTER.**
You MUST delegate ALL substantive work to subagents. This is NON-NEGOTIABLE regardless of mode.
**NEVER do any of these yourself:**
- Write code or modify source files
- Perform research or analysis
- Generate spec artifacts (research.md, requirements.md, design.md, tasks.md)
- Execute task steps
- Run verification commands as part of task execution
**ALWAYS delegate to the appropriate subagent:**
| Work Type | Subagent |
|-----------|----------|
| Research | Research Team (multiple parallel teammates) |
| Requirements | `product-manager` |
| Design | `architect-reviewer` |
| Task Planning | `task-planner` |
| Artifact Review | `spec-reviewer` |
| Task Execution | `spec-executor` |
Prompting technique: Iron Law with explicit ban list and role table. Similar to superpowers' "Iron Law + rationalization table" pattern but applied to coordination roles rather than development behavior.
Excerpt 2: start.md — Ralph Loop Stop Enforcement
Source: plugins/ralph-specum/commands/start.md
## CRITICAL: Stop After Each Subagent (Normal Mode)
After ANY subagent returns in normal mode (no `--quick` flag):
1. Wait for subagent to return
2. Read `$basePath/.ralph-state.json`
3. If `awaitingApproval: true`: STOP IMMEDIATELY
4. Output a brief status message
5. **END YOUR RESPONSE**
**DO NOT:**
- Invoke another subagent in the same response
- Continue to the next phase automatically
- Ask if the user wants to continue
**The user must explicitly run the next command.** This gives them time to review artifacts.
Exception: `--quick` mode runs all phases without stopping.
Prompting technique: Explicit negative constraints (banned behaviors list) with machine-readable exception condition.
Excerpt 3: new.md — Goal Capture Mandate
Source: plugins/ralph-specum/commands/new.md
## Capture Goal
<mandatory>
The goal MUST be captured before proceeding:
1. If goal text was provided in arguments, use it
2. If NO goal text provided, use AskUserQuestion to ask:
"What is the goal for this spec? Describe what you want to build or achieve."
3. Store the goal verbatim in .progress.md under "Original Goal"
</mandatory>
Prompting technique: <mandatory> XML tag wrapping a numbered conditional — makes the mandatory/optional distinction machine-parseable.
Excerpt 4: skills/spec-workflow/SKILL.md — Decision Tree Trigger
Source: plugins/ralph-specum/skills/spec-workflow/SKILL.md
---
name: spec-workflow
description: This skill should be used when the user asks to "build a feature", "create a spec",
"start spec-driven development", "run research phase", "generate requirements", "create design",
"plan tasks", "implement spec", "check spec status", "triage a feature", "create an epic",
"decompose a large feature", or needs guidance on spec-driven development workflow...
---
## Decision Tree: Where to Start
| Situation | Command |
|-----------|---------|
| New feature, want guidance | `/ralph-specum:start <name> <goal>` |
| New feature, skip interviews | `/ralph-specum:start <name> <goal> --quick` |
| Large feature needing decomposition | `/ralph-specum:triage <goal>` |
| Resume existing spec | `/ralph-specum:start` (auto-detects) |
| Jump to specific phase | `/ralph-specum:<phase>` |
Prompting technique: YAML frontmatter with trigger phrases list + decision table for routing. The frontmatter description is the skill's autonomous-activation trigger.