From be-experts
Multi-stage stateful orchestration pattern with checkpoints, handoff artifacts, and per-stage retry policies
npx claudepluginhub justn-hyeok/harness-for-yall --plugin be-expertsThis skill uses the workspace's default tool permissions.
Guides Next.js Cache Components and Partial Prerendering (PPR) with cacheComponents enabled. Implements 'use cache', cacheLife(), cacheTag(), revalidateTag(), static/dynamic optimization, and cache debugging.
Migrates code, prompts, and API calls from Claude Sonnet 4.0/4.5 or Opus 4.1 to Opus 4.5, updating model strings on Anthropic, AWS, GCP, Azure platforms.
Proposes cuts, reorganization, and simplification to improve document structure, clarity, and flow while preserving comprehension. Use for structural or editorial reviews.
Build a stateful orchestration pipeline with checkpoints, handoff artifacts, and per-stage retry policies. Inspired by CodeAgora's 6-stage architecture.
Stage 1 → Checkpoint → Stage 2 → Checkpoint → ... → Stage N → Final Output
↓ ↓ ↓
Retry Retry Retry
Policy Policy Policy
↓ ↓ ↓
Fallback Fallback Fallback
Architecture (be-architect): Design pipeline structure
.claude/specs/be-pipeline-{name}.mdImplementation (be-implementer): Build pipeline engine
Validation (be-validator): Schema enforcement
Resilience (be-resilience): Fault tolerance
Testing (be-tester): Pipeline tests
interface PipelineStage<TInput, TOutput> {
name: string;
execute(input: TInput, ctx: PipelineContext): Promise<TOutput>;
retryPolicy?: RetryPolicy;
circuitBreaker?: boolean;
timeout?: number;
}
interface PipelineContext {
pipelineId: string;
runId: string;
logger: Logger;
checkpoint: CheckpointStore;
metadata: Record<string, unknown>;
}
interface CheckpointStore {
save(stageIndex: number, data: unknown): Promise<void>;
load(stageIndex: number): Promise<unknown | null>;
getLastCompletedStage(): Promise<number>;
}
$ARGUMENTS.name — Pipeline name$ARGUMENTS.stages — Stage names (default: "ingest,process,validate,transform,review,output")$ARGUMENTS.stateful — Persistent state (default: true)Start by spawning be-architect with:
Design a multi-stage pipeline: $ARGUMENTS.name
Stages: ${ARGUMENTS.stages || "ingest,process,validate,transform,review,output"}
Stateful: ${ARGUMENTS.stateful || "true"}
Requirements:
- TypeScript strict, Zod schemas per stage
- Checkpoint persistence between stages
- Per-stage retry policies with exponential backoff
- Circuit breakers for external service stages
- Resume from last checkpoint on failure
- pino structured logging per stage
Provide the pipeline spec, then delegate:
1. be-implementer for pipeline engine and stages
2. be-validator for stage input/output schemas (parallel)
3. be-resilience for retry policies and circuit breakers
4. be-tester for stage and integration tests