Smart entry point - resumes existing spec or creates new one
Detects existing specs or creates new ones, managing branches and multi-phase workflows.
/plugin marketplace add DUTSTECH/ceoralph/plugin install dutstech-ceo-ralph@DUTSTECH/ceoralphSmart entry point that detects whether to create a new spec or resume an existing one, with branch management and multiple execution modes.
/ceo-ralph:start [name] [goal]
/ceo-ralph:start [goal] --quick
/ceo-ralph:start ./plan.md --quick
/ceo-ralph:start # Auto-detect/resume
name (optional): Spec name in kebab-case. Auto-generated from goal if not provided.goal (optional): Description of what you want to build../plan.md (optional): Path to existing plan file to import.--quick: Skip approval gates, auto-generate artifacts, start execution immediately./ceo-ralph:start user-auth "Add user authentication with JWT"
/ceo-ralph:start "Add a dark mode toggle" --quick
/ceo-ralph:start ./plan.md --quick
/ceo-ralph:start # Resume current spec
YOU ARE A COORDINATOR, NOT AN IMPLEMENTER.
Never write code or spec artifacts yourself. Always delegate to appropriate agents:
research-analystproduct-managerarchitect-reviewertask-plannerplan-synthesizerCheck for existing spec:
./specs/.current-spec exists → Resume workflowInteractive multi-phase workflow:
CRITICAL: Must STOP after each subagent completes. User must explicitly run next phase command.
Automated full pipeline:
Check current git branch:
git rev-parse --abbrev-ref HEAD
git remote show origin | grep "HEAD branch"
On default branch (main/master):
You're on the default branch. How would you like to proceed?
1. Create feature branch (feat/{spec-name})
2. Create git worktree
3. Stay on current branch
On feature branch:
You're on branch: {branch-name}
1. Continue on this branch
2. Create new feature branch
3. Create git worktree
Branch naming: feat/{spec-name} with sanitization (lowercase, hyphens only).
Resume existing (no arguments, .current-spec exists):
./specs/.current-spec.ceo-ralph-state.jsonawaitingApproval → prompt user to continuepaused → offer to resumeCreate new (arguments provided or no current spec):
Handle flexible argument formats:
name goal → spec name and goalgoal only → auto-generate name from goal./file.md → import plan from filename ./file.md → name spec, import planFor quick mode: validate all inputs before starting (non-empty content, plan file exists, no name conflicts). Atomic rollback on validation failures.
Create spec directory structure:
./specs/{name}/
├── .ceo-ralph-state.json
├── .progress.md
└── (other files created by phases)
Update tracking files:
./specs/.current-spec → new spec name.gitignore → add specs/*/.ceo-ralph-state.json{
"specName": "{name}",
"basePath": "./specs/{name}",
"phase": "research",
"awaitingApproval": false,
"quickMode": false,
"currentTask": null,
"totalTasks": 0,
"completedTasks": 0,
"globalIteration": 1,
"maxGlobalIterations": 100,
"paused": false,
"goal": "{original goal}",
"branch": "{feature branch name}",
"usage": {
"claude": { "totalTokens": 0 },
"codex": { "totalTokens": 0 }
},
"createdAt": "{ISO timestamp}",
"updatedAt": "{ISO timestamp}"
}
Normal mode: Start research phase, then STOP.
Delegate to research-analyst:
Delegate to: research-analyst
Context:
- Spec name: {specName}
- Goal: {goal}
- Working directory: {project root}
Instructions:
Investigate this feature request. Output findings to research.md.
After research completes:
Research complete. Review ./specs/{name}/research.md
To approve and continue: /ceo-ralph:requirements
To revise: Provide feedback and run /ceo-ralph:research
Quick mode: Auto-run all phases without stopping.
Chain: research → requirements → design → tasks → execute
Only stop on errors or when execution completes.
## CEO Ralph: Starting Spec
**Name**: {specName}
**Goal**: {goal}
**Branch**: {branch}
**Mode**: Standard
Creating spec directory... done
Initializing state... done
Starting research phase...
{After research completes}
Research complete.
Review: ./specs/{name}/research.md
To approve and continue: /ceo-ralph:requirements
To revise research: Provide feedback, then /ceo-ralph:research
## CEO Ralph: Quick Mode
**Name**: {specName}
**Goal**: {goal}
**Mode**: Quick (auto-approve)
Creating spec... done
Running research... done
Generating requirements... done
Creating design... done
Planning tasks... done
Starting execution...
{Execution output follows}
## CEO Ralph: Resuming Spec
**Name**: {specName}
**Phase**: {phase}
**Progress**: {completed}/{total} tasks
{If awaiting approval}
Last phase output is ready for review.
File: ./specs/{name}/{phase}.md
To approve and continue: /ceo-ralph:{next-phase}
{If paused}
Spec is paused. Reason: {pauseReason}
To resume: /ceo-ralph:resume
{If in execution}
Resuming execution...
| Error | Action |
|---|---|
| Spec name exists | Offer resume, overwrite, or new name |
| Invalid goal | Prompt for clarification |
| Plan file not found | Report error, ask for valid path |
| Git not available | Skip branch management, continue |
| Branch create fails | Report error, offer alternatives |
| Agent failure | Report error, allow retry |
State file: ./specs/{name}/.ceo-ralph-state.json
Tracks:
/ceo-ralph:new to always create a new spec (no resume detection)/ceo-ralph:switch to change active spec/ceo-ralph:status to see all specs and progress/startInitiates the task orchestration workflow using the three-agent system (task-orchestrator, task-decomposer, and dependency-analyzer) to create a comprehensive execution plan.