From we
Story Orchestrator — coordinates the complete development pipeline from git preparation through PR creation and CI review. Loads plan, manages checkpoints, circuit breaker, and resume capability. Use when user says "/we:story", "implement story", or provides a ticket key.
npx claudepluginhub weside-ai/claude-code-plugin --plugin weThis skill uses the workspace's default tool permissions.
You orchestrate the entire development pipeline in a single skill invocation — from git preparation through PR creation and CI review. You do NOT stop mid-pipeline.
Provides Ktor server patterns for routing DSL, plugins (auth, CORS, serialization), Koin DI, WebSockets, services, and testApplication testing.
Conducts multi-source web research with firecrawl and exa MCPs: searches, scrapes pages, synthesizes cited reports. For deep dives, competitive analysis, tech evaluations, or due diligence.
Provides demand forecasting, safety stock optimization, replenishment planning, and promotional lift estimation for multi-location retailers managing 300-800 SKUs.
You orchestrate the entire development pipeline in a single skill invocation — from git preparation through PR creation and CI review. You do NOT stop mid-pipeline.
After every sub-skill returns, IMMEDIATELY continue with the next step.
Read("quality/dor.md")
Read("quality/dod.md")
# Checkpoints
python3 ${CLAUDE_PLUGIN_ROOT}/scripts/orchestration.py story status {TICKET}
python3 ${CLAUDE_PLUGIN_ROOT}/scripts/orchestration.py story checkpoint {TICKET} {phase}
python3 ${CLAUDE_PLUGIN_ROOT}/scripts/orchestration.py story resume {TICKET}
# Circuit breaker (3 failures → stop)
python3 ${CLAUDE_PLUGIN_ROOT}/scripts/orchestration.py circuit check {TICKET} {phase}
python3 ${CLAUDE_PLUGIN_ROOT}/scripts/orchestration.py circuit fail {TICKET} {phase} --error "msg"
python3 ${CLAUDE_PLUGIN_ROOT}/scripts/orchestration.py circuit success {TICKET} {phase}
# CI-fix loop (max 3 cycles)
python3 ${CLAUDE_PLUGIN_ROOT}/scripts/orchestration.py cifix start {TICKET} {pr_number}
python3 ${CLAUDE_PLUGIN_ROOT}/scripts/orchestration.py cifix attempt {TICKET} {fix_type}
python3 ${CLAUDE_PLUGIN_ROOT}/scripts/orchestration.py cifix success {TICKET}
DB location: ~/.claude/weside/orchestration.db — Never access directly, always use CLI.
Phases: refined → git_prepared → implementation_complete → ac_verified → simplified → docs_updated → review_passed → static_analysis_passed → test_passed → pr_created → ci_passed
/we:story {TICKET}
├── Step 0: Check for Resume
├── Step 1: Check DoR + Load Story + Plan (Reality Check)
├── Step 2: Develop (INLINE, not Skill dispatch)
├── Step 3: AC Verification Gate (BLOCKING)
├── Step 4: Simplify
├── Step 5: PARALLEL: /we:review + /we:static + /we:test [+ coderabbit]
├── Step 6: Documentation check
├── Step 7: /we:pr (checks test_passed)
├── Step 8: Review-Fix Loop (INLINE, max 3 cycles)
└── Step 9: Ticket → In Review
python3 ${CLAUDE_PLUGIN_ROOT}/scripts/orchestration.py story resume {TICKET}
If interrupted → ask user whether to resume from last checkpoint.
Load story from ticketing tool. Verify DoR: User Story, Plan exists (docs/plans/{TICKET}-plan.md).
CRITICAL: Always read files COMPLETELY (no offset/limit). Load more files than you think you need — full context prevents incorrect assumptions. Never skim or partially read source files.
Reality Check: If plan exists, check creation date against recent git changes. If code changed significantly since the plan was written (files moved, APIs renamed, dependencies changed), STOP the pipeline and ask the user: "The plan may be outdated — key files have changed since it was written. Run /we:refine {TICKET} to update the plan before continuing?" Do NOT proceed with a stale plan.
Dynamic Todo-Liste: Extract phases from plan (### Phase \d+: headers). Build todos for plan phases + AC Verification + Quality Gates + PR + Reviews.
Unless the user explicitly says otherwise, create a git worktree for isolated development:
EnterWorktree(name="{type}/{TICKET}-short-description")
This gives the story an isolated copy of the repo. The worktree is kept on completion (user decides cleanup). If the user says "no worktree", "same branch", or "in-place" → skip and use regular git checkout -b in the developer step.
Move ticket to "In Progress". Write checkpoint git_prepared.
⛔ Do NOT call Skill(skill="develop")! Skill() expands context and causes the orchestrator to lose control after the developer finishes. Instead, execute development steps inline.
Check circuit breaker. Then implement directly:
Load plan from docs/plans/{TICKET}-plan.md. Read it COMPLETELY.
Formulate goal: "The user should be able to X so that Y."
Implement phase by phase from plan. For each phase:
Wiring Check after each phase that introduces new data fields: verify data flows end-to-end through all layers (model → service → API → frontend → UI). Missing wiring = feature not reachable.
Security Check — if code touches auth, external APIs, user data, or file uploads:
| Check | What to Verify |
|---|---|
| Authentication | New endpoints require authentication |
| Authorization | Data access scoped to current user/tenant |
| Input validation | All external input validated at boundaries |
| Error messages | No internal details leaked (generic errors only) |
| SQL/NoSQL | Parameterized queries only (no string concatenation) |
| Secrets | No hardcoded credentials, tokens, or API keys |
| Rate limiting | Expensive endpoints have rate limits |
Run local tests before marking complete
Write checkpoint implementation_complete
3 Guiding Questions (check after each phase):
Continue immediately to Step 3.
Fresh-load plan and story. Verify EVERY AC with concrete evidence (file path, test name, commit).
Check end-to-end: Is the feature reachable? Does the complete user flow work?
Only write checkpoint ac_verified when ALL items pass. If items fail → go back to Step 2 and fix.
Check ac_verified exists. Run /simplify skill (from code-simplifier plugin). If code-simplifier plugin is not installed, skip with warning: "code-simplifier plugin not available — skipping simplification. Install with: /install code-simplifier@claude-plugins-official". If changes made → commit. Write checkpoint simplified.
Launch all agents with run_in_background=True in a single message:
coderabbit command available: coderabbit review --plain --base origin/mainWait for all. Verify checkpoints: review_passed, static_analysis_passed, test_passed. If any fail → fix and re-run. Circuit breaker opens after 3 failures.
Always run. Launch the doc-manager agent to auto-detect and update affected documentation:
Agent(
subagent_type="we:doc-manager",
description="Update documentation for {TICKET}",
prompt="Update documentation for the changes in {TICKET}. Context: [summarize what changed]",
run_in_background=True
)
Wait for completion. If docs were updated → commit. Write checkpoint docs_updated.
Verify test_passed checkpoint. Call PR creator agent:
Agent(subagent_type="we:pr-creator", prompt="Create PR for {TICKET}")
Extract PR number. Write checkpoint pr_created.
⛔ Do NOT call Skill(skill="ci-review")! Execute CI-review steps inline:
gh CLI)ci_passed, continue to Step 9After reviews green → write checkpoint ci_passed.
Move ticket to "In Review". Never move to "Done" — that's the user's job.
| After | Phase | Written By |
|---|---|---|
| Branch + Story loaded | git_prepared | story (Step 1) |
| Code complete | implementation_complete | story (Step 2) |
| ACs verified | ac_verified | story |
| Simplified | simplified | story |
| Docs updated | docs_updated | docs |
| Review passed | review_passed | review |
| Static passed | static_analysis_passed | static |
| Tests passed | test_passed | test |
| PR created | pr_created | pr-creator |
| CI green | ci_passed | story |
Circuit Breaker: After 3 failures in same phase → stop, present options to user.
Resume: On next /we:story {TICKET} → detect interrupted state, offer resume.
EnterWorktree for isolation (unless user opts out)Skill(skill="story") — if you're reading this, you ARE the story skillSkill(skill="develop") or Skill(skill="ci-review") — these expand context and break the pipeline. Execute their logic INLINE in Steps 2 and 8.