Guide

Workflow

How Gem Team turns AI coding into a structured, reliable engineering process.

Gem Team turns AI coding into a structured process. The Orchestrator runs a 4-phase pipeline: Init → Route → Plan → Execute → Output, with Learn & Persist between waves. Each phase adapts to task complexity: simple fixes get a quick checklist, complex features get full planning and review.

Phase 0: Init & Clarify

The Orchestrator assesses every incoming request:

  1. Read context: external references, errors, user config (.gem-team.yaml), relevant memory.
  2. Detect intent: feature, bug-fix, refactor, docs, research, or debug.
  3. Resolve Plan ID: continue existing plan or start new one.
  4. Classify complexity: intent-based defaults (bug-fix → LOW, research → LOW), with explicit user overrides. Full classification kicks in only when intent is ambiguous.
  5. Document gray areas: assumptions logged; only blocking ambiguities prompt the user.

Outcome: A clear complexity classification and plan state that drives everything downstream.

Phase 1: Route

Routes based on plan state:

StateAction
continue_plan + no feedbackLoad plan → jump to Phase 3 Execution
continue_plan + feedbackLoad plan → Phase 2 Planning (revision)
new_task→ Phase 2 Planning

Phase 2: Planning

Planning depth matches complexity:

  • TRIVIAL/LOW: Orchestrator creates a minimal ephemeral plan (direct task checklist). Bug-fix tasks route to gem-debugger first, then gem-implementer.
  • MEDIUM: Delegates to gem-planner for DAG-based task decomposition, wave scheduling, and risk analysis. gem-reviewer validates the plan.
  • HIGH: Same as MEDIUM, plus gem-critic reviews architecture, contracts, breaking changes, and API/schema/data-flow impact.

Validation failure: Replan with findings, or escalate to user if not replanable.

Phase 3: Execution

Work runs in waves: groups of parallel tasks respecting dependency ordering:

  1. Wave collection: tasks with status=pending, wave=current, all deps met.
  2. Conflict prevention: tasks listed in conflicts_with never run in parallel.
  3. Delegation: each task goes to its assigned specialist agent with a filtered context snapshot (only relevant envelope sections).
  4. Integration gates: gem-reviewer verifies wave output:
    • HIGH: every wave gated.
    • MEDIUM: only risk waves and the final wave.
  5. Learn & Persist: after each wave, high-confidence learnings (≥0.95) are batch-delegated: product decisions → PRD, technical conventions → AGENTS.md, patterns → memory, workflows → skills.

Plans are resumable: pause, inspect, continue from any completed wave.

Wave Example

Wave 1: [Researcher] explore codebase ───→ [Debugger] diagnose error
                                                   ↓
Wave 2:                              [Implementer] fix + [Tester] verify
                                                   ↓
Wave 3:                              [Reviewer] security + a11y audit

Phase 4: Output

Structured status report with:

  • Plan ID and objective · Task progress (completed/total, %)
  • Wave status · Blocked tasks with reasons · Next steps

Next

Core Concepts → · Features → · Agents →