Autonomous Pipeline

/camel-ship — End-to-end pipeline with configurable oversight

Overview

/camel-ship is the autonomous pipeline orchestrator that chains all four phases (brainstorm, plan, execute, verify) in a single command with configurable human oversight. Instead of manually invoking each phase and approving transitions, you set an oversight level and let the pipeline run.

The result is a fully generated, verified integration — from requirements to working code — with exactly the level of human involvement you choose.

When to Use

Invoke /camel-ship when you:

  • Have requirements and want everything generated end-to-end
  • Want autonomous execution with configurable checkpoints
  • Need to resume an interrupted pipeline run
  • Want to skip phases whose artifacts already exist

Manual alternative: If you prefer step-by-step control, use /camel-brainstorm directly. The three-phase pipeline with explicit approval gates gives you full control at every transition.

Arguments

/camel-ship [input-file] [--ask always|smart|never] [--resume] [--start-from <stage>] [--create-pr]
ArgumentDefaultDescription
[input-file]noneRequirements document, design spec, or brainstorm notes
--asksmartOversight level (see below)
--resumefalseContinue from last saved state
--start-fromnoneSkip to: brainstorm, plan, execute, or verify
--create-prfalseAuto-create a GitHub PR on successful completion

The Pipeline

/camel-ship executes five stages in sequence, with oversight decisions at each transition:

Three Oversight Levels

The --ask flag controls how much the pipeline pauses for human input:

Best for: First-time users, critical integrations, learning how the pipeline works.

The pipeline pauses at the design gate and after each execution task for explicit approval. The plan stage auto-proceeds once complete. You see every artifact before the next stage begins.

Stage 0: Brainstorm → "Here's the design spec. Approve?"
  (You approve)
Stage 1: Plan → Plan complete → auto-proceed
Stage 2: Execute → "Task 1 complete. Continue?"
  (You approve each task)
Stage 3: Verify → "Here's the verification report."
  (You approve)
Stamp → Done!

Total approvals: 3+ (depends on task count)

When to use: When you want the same control as the manual pipeline but with automatic skill invocation between phases.

Best for: Experienced users, standard integrations, day-to-day use.

The pipeline auto-proceeds when outcomes are clear (design spec is complete, tests pass) but pauses when something needs human judgment (open questions, test failures, ambiguous findings).

Stage 0: Brainstorm → Design complete, no open questions → auto-proceed
Stage 1: Plan → Plan complete and consistent → auto-proceed
Stage 2: Execute → Task 1 tests pass → auto-proceed
                   Task 3 tests fail → "Tests failing. Auto-fix / Manual fix / Skip?"
Stage 3: Verify → "Here's the verification report."
  (You review)
Stamp → Done!

Total approvals: 1-3 (depends on issues found)

When to use: Most of the time. You stay in control of decisions that matter while the pipeline handles the routine transitions.

Best for: Batch generation, CI/CD integration, well-understood integration patterns.

The pipeline runs end-to-end without pausing. When issues arise, it auto-fixes up to 3 rounds. Only blocker-level failures (3 failed auto-fix rounds, stamp gate failure) cause a pause.

Stage 0: Brainstorm → auto-proceed (pick defaults for open questions)
Stage 1: Plan → auto-proceed (fill gaps)
Stage 2: Execute → Task 3 tests fail → auto-fix round 1 → still failing
                   → auto-fix round 2 → tests pass → auto-proceed
Stage 3: Verify → all checks pass → auto-proceed
Stamp → auto-create PR

Total approvals: 0 (unless blocker)

When to use: When you trust the pipeline and want hands-off generation. Combine with --create-pr to get a reviewable PR at the end.

Auto-Fix Loop

When a stage fails and the oversight level allows autonomous fixing, the pipeline enters an auto-fix loop:

State Persistence & Resume

Pipeline state is saved to .camel-kit/ship-state.json after each stage:

{
  "started": "2026-04-30T14:32:00Z",
  "ask": "smart",
  "currentStage": 2,
  "stageResults": {
    "0": { "status": "completed", "artifact": "docs/design-spec.md" },
    "1": { "status": "completed", "artifact": "docs/implementation-plan.md" },
    "2": { "status": "in_progress", "tasksCompleted": 3, "totalTasks": 5 }
  }
}

Resume an interrupted pipeline

If the pipeline is interrupted (session closes, network failure), resume from where it stopped:

/camel-ship --resume

The pipeline reads the state file and continues from currentStage.

Skip to a specific stage

If you already have artifacts from earlier stages:

# I already have a design spec, start from planning
/camel-ship --start-from plan

# I have design + plan, start execution
/camel-ship --start-from execute

--start-from verifies that prerequisite artifacts exist before proceeding.

Agent-Specific Optimization

/camel-ship runs differently on each AI agent, thanks to agent traits. The pipeline goals are identical — the execution strategy adapts to each agent’s strengths:

  • Worktree isolation: EnterWorktree at pipeline start isolates all generated artifacts
  • Parallel dispatch: Independent tasks run as background agents via run_in_background
  • Build monitoring: CronCreate schedules periodic mvn compile during execution
  • Smart pacing: ScheduleWakeup avoids busy-polling between stages
  • Structured oversight: AskUserQuestion with multiple-choice options at pause points
  • Named agent chain: Delegates to pre-registered camel-implementer and camel-validator agents
  • Execution limits: max_turns and timeout_mins per subagent prevent runaway execution
  • Batch loading: read_many_files loads all artifacts from previous stages in one call
  • State persistence: save_memory provides backup state alongside the JSON file
  • Mode-based pipeline: switch_mode transitions between brainstorm, plan, implement, and validate custom modes
  • Gate-based oversight: Existing gate files (.bob/gates/) map directly to oversight levels — gates ARE the oversight mechanism
  • Precise insertion: insert_content for additive code changes that preserve existing content
  • Serial execution: Acknowledges Qwen’s serial task dispatch — all tasks run sequentially
  • Visual progress: todo_write maintains a visible checklist of pipeline stages
  • Explicit checkpoints: State saved between every stage for reliable resume
  • Step-limited stages: steps limits per stage prevent runaway execution (200 for brainstorm, 500 for execute)
  • Agent type mapping: Plan agent for brainstorm, Build agent for execute, General for verify

Usage Examples

# Default: smart oversight, full pipeline
/camel-ship requirements.md

→ Stage 0: Brainstorm (auto-proceeds — design complete)
→ Stage 1: Plan (auto-proceeds — plan consistent)
→ Stage 2: Execute (pauses on test failure in task 3)
  You: "Auto-fix"
→ Stage 2: Execute (auto-fix succeeds, continues)
→ Stage 3: Verify (presents report)
  You: "Looks good"
→ Stamp: All gates pass

Pipeline complete. All checks passed.
# Fully autonomous, create PR at the end
/camel-ship requirements.md --ask never --create-pr

→ Runs all 4 stages autonomously
→ Auto-fixes any issues (up to 3 rounds each)
→ Creates GitHub PR with summary

Created PR #42: "Add order processing integration"
# Session interrupted during execution

/camel-ship --resume

Reading pipeline state from .camel-kit/ship-state.json...
  Stage 0 (Brainstorm): completed
  Stage 1 (Plan): completed
  Stage 2 (Execute): in_progress (3/5 tasks done)

Resuming from Stage 2, task 4...
# Already have a design spec
/camel-ship --start-from plan --ask always

Verifying prerequisites...
  docs/design-spec.md: found

Starting from Stage 1 (Plan)...

Comparison: /camel-ship vs Manual Pipeline

AspectManual Pipeline/camel-ship --ask smart/camel-ship --ask never
Entry point/camel-brainstorm/camel-ship/camel-ship
Phase transitionsManual invocationAutomaticAutomatic
Approval gatesEvery phaseOnly on ambiguityOnly on blockers
Auto-fixNoOn failuresOn everything
ResumeNoYes (--resume)Yes (--resume)
PR creationManualOptional (--create-pr)Optional (--create-pr)
Best forLearning, explorationDay-to-day useBatch generation, CI/CD

What’s Next