πŸ”€ Architecture Decision

Get perspectives from Claude, Gemini, and Codex on architectural decisions, synthesized into a formal ADR.

multi-agent claude-code gemini-cli codex
parallel-process:
  claude-analysis:
    input: STDIN
    model: claude-code
    action: "Analyze options and trade-offs"
    output: $CLAUDE_ANALYSIS

  gemini-analysis:
    input: STDIN
    model: gemini-cli
    action: "Industry best practices"
    output: $GEMINI_ANALYSIS
...

πŸ” Code Review

Comprehensive code review using Claude Code for bugs, security issues, and improvement suggestions.

claude-code code-quality
review:
  input: "src/*.go"
  model: claude-code
  action: |
    Review for:
    - Bugs and logic errors
    - Security vulnerabilities
    - Performance issues
    - Code style improvements
  output: review.md

πŸ”„ Creator/Checker

Two-loop pattern: creator implements features, checker validates. Auto-reruns on failure.

agentic-loop validation
loops:
  feature-creator:
    max_iterations: 3
    output_state: $CREATOR_RESULT
    steps:
      - implement:
          model: claude-code
          action: "Implement feature..."

  code-checker:
    depends_on: [feature-creator]
    input_state: $CREATOR_RESULT
    exit_pattern: "^(PASS|FAIL)"

πŸ“š RAG Workflow

Retrieval-augmented generation: search your docs with qmd, then answer questions with context.

rag qmd search
retrieve:
  type: qmd-search
  qmd_search:
    query: "${QUESTION:-STDIN}"
    collection: docs
    limit: 5
  output: CONTEXT

answer:
  input: "Context: ${CONTEXT}\nQuestion: ${QUESTION}"
  model: claude-sonnet

πŸ” Iterative Refinement

Agentic loop that iterates on code until it meets quality standards. LLM decides when complete.

agentic-loop code-generation
implement:
  agentic_loop:
    max_iterations: 3
    exit_condition: pattern_match
    exit_pattern: "SATISFIED"
  input: STDIN
  model: claude-code
  action: |
    Iteration {{ loop.iteration }}.
    Previous: {{ loop.previous_output }}
    
    Refine until production-ready.
  output: STDOUT

βœ… Quality Gate

Agentic loop with quality gates that abort or retry based on code quality checks.

agentic-loop quality-gate
generate:
  agentic_loop:
    max_iterations: 5
    exit_condition: quality_gate
    quality_command: "go test ./..."
    on_failure: retry
  input: STDIN
  model: claude-code
  action: "Implement with passing tests"
  output: STDOUT

βš–οΈ Model Comparison

Run the same prompt through multiple models in parallel and compare their outputs.

parallel comparison
parallel-process:
  gpt4:
    model: gpt-4o
    action: "Solve the problem"
    output: gpt4-result.txt
  claude:
    model: claude-3-5-sonnet-latest
    action: "Solve the problem"
    output: claude-result.txt

compare:
  input: [gpt4-result.txt, claude-result.txt]
  action: "Compare approaches"

πŸ“¦ Batch Processing

Process multiple files with wildcards. Choose individual or combined mode for safety.

data batch files
process-files:
  input: "examples/*.txt"
  model: gpt-4o
  action: "Summarize each file."
  output: STDOUT
  batch_mode: individual
  skip_errors: true

πŸ§ͺ Generate Tests

Automatically generate comprehensive test suites for your code using Claude Code.

claude-code testing
generate-tests:
  input: "src/api/*.go"
  model: claude-code
  action: |
    Generate comprehensive tests:
    - Unit tests for all functions
    - Edge cases and error handling
    - Table-driven tests where appropriate
    - Mock external dependencies
  output: src/api/*_test.go

πŸ› οΈ Tool Integration

Execute shell commands within workflows. Perfect for git operations, linting, and build pipelines.

tool-use bash
get-changes:
  tool: bash
  input: "git diff HEAD~5 --stat"
  output: $CHANGES

analyze:
  input: $CHANGES
  model: claude-code
  action: "Summarize recent changes"
  output: STDOUT

πŸ—‚οΈ Code Indexing

Index your codebase with qmd for semantic code search and retrieval.

qmd rag search
index:
  type: qmd-index
  qmd_index:
    path: ./src
    collection: my-codebase
    mask: "**/*.{go,ts,py}"
    embed: true

search:
  type: qmd-search
  qmd_search:
    query: "authentication logic"
    collection: my-codebase

πŸ•ΈοΈ Dependency Graph

Multiple loops with dependencies. Loops can depend on other loops completing first.

agentic-loop orchestration
loops:
  analyze:
    output_state: $ANALYSIS
    steps:
      - analyze: ...

  implement:
    depends_on: [analyze]
    input_state: $ANALYSIS
    output_state: $CODE

  test:
    depends_on: [implement]
    input_state: $CODE

🌐 Web Scraping

Fetch and analyze web pages. Take screenshots and extract structured data.

web scraping
fetch:
  input: "https://example.com/docs"
  output: $PAGE_CONTENT

analyze:
  input: $PAGE_CONTENT
  model: gpt-4o
  action: |
    Extract key information:
    - Main topics covered
    - API endpoints mentioned
    - Code examples
  output: summary.md

πŸ“Š Data Analysis

Analyze CSV files and structured data. Generate insights and visualizations.

data csv
analyze:
  input: quarterly_data.csv
  model: gpt-4o
  action: |
    Analyze this data:
    - Key trends and patterns
    - Notable outliers
    - Recommendations
  output: analysis.md

πŸ”Ž File Comparison

Compare two files and get an intelligent summary of differences and similarities.

data compare
compare:
  input:
    - old-config.yaml
    - new-config.yaml
  model: claude-sonnet
  action: |
    Compare these two files:
    - What changed?
    - Are changes breaking?
    - Migration recommendations
  output: STDOUT

πŸ—οΈ Architecture Review

Multi-agent review of system architecture from security, scalability, and maintainability perspectives.

multi-agent architecture
parallel-process:
  security-review:
    model: claude-code
    action: "Security analysis"
  scalability-review:
    model: gemini-cli
    action: "Scalability analysis"
  maintainability-review:
    model: codex
    action: "Maintainability analysis"

πŸ’Ύ Checkpoint & Resume

Long-running workflows with checkpoints. Resume from where you left off after interruption.

agentic-loop checkpoint
loops:
  long-task:
    stateful: true
    checkpoint_interval: 1
    max_iterations: 10
    steps:
      - process:
          action: |
            Iteration {{ loop.iteration }}
            Previous: {{ loop.previous_output }}
            Continue processing...

More Templates on GitHub

Browse the full examples directory for more workflow templates.