From ceo-ralph
Smart entry point for CEO Ralph. Detects whether to create a new spec or resume existing one.
npx claudepluginhub dutstech/ceoralph --plugin ceo-ralph# /ceo-ralph:start Smart entry point for CEO Ralph. Detects whether to create a new spec or resume existing one. ## Branch Management (FIRST STEP) <mandatory> Before creating any files or directories, check the current git branch and handle appropriately. </mandatory> ### Step 1: Check Current Branch ### Step 2: Determine Default Branch Check which is the default branch: If that fails, assume `main` or `master` (check which exists): ### Step 3: Branch Decision Logic ### Branch Naming Convention When creating a new branch: - Use format: `feat/<spec-name>` (e.g., `feat/user-au...
/startImplements Manus-style file-based planning for complex tasks by creating task_plan.md, findings.md, and progress.md. Supports automatic session recovery after /clear.
/startOrchestrates provided tasks using three agents (task-orchestrator, decomposer, dependency-analyzer) to generate execution plans, tracking directories, dependency graphs, and coordination documents.
/startOrchestrates provided tasks using three agents (task-orchestrator, decomposer, dependency-analyzer) to generate execution plans, tracking directories, dependency graphs, and coordination documents.
/startStarts ClaudeClaw heartbeat daemon: blocks home-dir starts, installs Bun/Node if needed, checks/runs interactive config for model, heartbeat, Telegram/Discord/security.
/startStarts interactive UI design session: interviews requirements, generates variations, collects feedback, iterates to refined design, produces implementation plan. Optional target argument.
/startStarts the Nights Watch daemon to monitor Claude usage limits and autonomously execute tasks from task.md. Supports optional --at TIME scheduling.
Smart entry point for CEO Ralph. Detects whether to create a new spec or resume existing one.
git branch --show-current
Check which is the default branch:
git symbolic-ref refs/remotes/origin/HEAD 2>/dev/null | sed 's@^refs/remotes/origin/@@'
If that fails, assume main or master (check which exists):
git rev-parse --verify origin/main 2>/dev/null && echo "main" || echo "master"
1. Get current branch name
|
+-- ON DEFAULT BRANCH (main/master):
| |
| +-- Ask user for branch strategy:
| | "Starting new spec work. How would you like to handle branching?"
| | 1. Create branch in current directory (git checkout -b)
| | 2. Create git worktree (separate directory)
| |
| +-- If user chooses 1 (current directory):
| | - Generate branch name from spec name: feat/$specName
| | - If spec name not yet known, use temp name: feat/spec-work-<timestamp>
| | - Create and switch: git checkout -b <branch-name>
| | - Inform user: "Created branch '<branch-name>' for this work"
| | - Suggest: "Run /ceo-ralph:discovery to start the discovery phase."
| |
| +-- If user chooses 2 (worktree):
| | - Generate branch name from spec name: feat/$specName
| | - Determine worktree path: ../<repo-name>-<spec-name> or prompt user
| | - Create worktree: git worktree add <path> -b <branch-name>
| | - Inform user: "Created worktree at '<path>' on branch '<branch-name>'"
| | - IMPORTANT: Suggest user to cd to worktree and resume conversation there:
| | "For best results, cd to '<path>' and start a new Claude Code session from there."
| | "Then run /ceo-ralph:discovery to begin."
| | - STOP HERE - do not continue to Parse Arguments (user needs to switch directories)
| |
| +-- Continue to Parse Arguments
|
+-- ON NON-DEFAULT BRANCH (feature branch):
|
+-- Ask user for preference:
| "You are currently on branch '<current-branch>'.
| Would you like to:
| 1. Continue working on this branch
| 2. Create a new branch in current directory
| 3. Create git worktree (separate directory)"
|
+-- If user chooses 1 (continue):
| - Stay on current branch
| - Suggest: "Run /ceo-ralph:discovery to start the discovery phase."
| - Continue to Parse Arguments
|
+-- If user chooses 2 (new branch):
| - Generate branch name from spec name: feat/$specName
| - If spec name not yet known, use temp name: feat/spec-work-<timestamp>
| - Create and switch: git checkout -b <branch-name>
| - Inform user: "Created branch '<branch-name>' for this work"
| - Suggest: "Run /ceo-ralph:discovery to start the discovery phase."
| - Continue to Parse Arguments
|
+-- If user chooses 3 (worktree):
- Generate branch name from spec name: feat/$specName
- Determine worktree path: ../<repo-name>-<spec-name> or prompt user
- Create worktree: git worktree add <path> -b <branch-name>
- Inform user: "Created worktree at '<path>' on branch '<branch-name>'"
- IMPORTANT: Suggest user to cd to worktree and resume conversation there:
"For best results, cd to '<path>' and start a new Claude Code session from there."
"Then run /ceo-ralph:discovery to begin."
- STOP HERE - do not continue to Parse Arguments (user needs to switch directories)
When creating a new branch:
feat/<spec-name> (e.g., feat/user-auth)-2, -3, etc.Example:
Spec name: user-auth
Branch: feat/user-auth
If feat/user-auth exists:
Branch: feat/user-auth-2
When user chooses worktree option:
# Get repo name for path suggestion
REPO_NAME=$(basename $(git rev-parse --show-toplevel))
# Default worktree path
WORKTREE_PATH="../${REPO_NAME}-${SPEC_NAME}"
# Create worktree with new branch
git worktree add "$WORKTREE_PATH" -b "feat/${SPEC_NAME}"
After worktree creation:
Created worktree at '<path>' on branch '<branch-name>'
For best results, cd to the worktree directory and start a new Claude Code session from there:
cd <path>
claude
Then run /ceo-ralph:discovery to begin the discovery phase.
git worktree remove <path>In --quick mode, still perform branch check but skip the user prompt for non-default branches:
In quick mode (--quick), execution uses Codex MCP for task completion.
After generating spec artifacts in quick mode, invoke /ceo-ralph:implement to execute tasks with Codex.
YOU ARE A COORDINATOR, NOT AN IMPLEMENTER.
You MUST delegate ALL substantive work to subagents. This is NON-NEGOTIABLE regardless of mode (normal or quick).
NEVER do any of these yourself:
ALWAYS delegate to the appropriate subagent:
| Work Type | Subagent |
|---|---|
| Discovery (research + requirements) | research-analyst + product-manager |
| Plan (design + tasks) | architect-reviewer + task-planner |
| Artifact Generation (quick mode) | plan-synthesizer |
| Task Execution | codex via MCP |
Quick mode does NOT exempt you from delegation - it only skips interactive phases.
## CRITICAL: Stop After Each Subagent (Normal Mode)In normal mode (no --quick flag), you MUST STOP your response after each subagent completes.
After invoking a subagent via Task tool:
DO NOT:
From $ARGUMENTS, extract:
Examples:
/ceo-ralph:start user-auth -> name="user-auth", goal=none/ceo-ralph:start user-auth Add OAuth2 login -> name="user-auth", goal="Add OAuth2 login"/ceo-ralph:start Add OAuth2 login --quick -> name=auto, goal="Add OAuth2 login"/ceo-ralph:start Add OAuth2 login --lite -> name=auto, goal="Add OAuth2 login"/ceo-ralph:start --fresh user-auth Add OAuth2 login -> name="user-auth", goal="Add OAuth2 login", freshIf no arguments provided:
./specs/.current-spec existsIf arguments provided:
Determine commitSpec setting:
--commit-spec provided: true--no-commit-spec provided: falseStore in .ralph-state.json as commitSpec.
.progress.md and .ralph-state.json exist (create minimal stubs if missing)--lite, instruct user to run /ceo-ralph:plan --lite.progress.md and .ralph-state.json exist (create minimal stubs if missing)--lite, auto-generate tasks via plan-synthesizer (lite)plan-synthesizer/ceo-ralph:implementProvide clear status and next steps:
Phase complete. Review ./specs/<spec>/<phase>.md
To continue: /ceo-ralph:<next-phase>
For quick mode, indicate automatic execution is starting.