Examples
Review & auto-fix loop
Section titled “Review & auto-fix loop”Reviews uncommitted changes and auto-fixes in a loop.
id: review-uncommittedsteps: - id: remediation type: loop max: 5 until: ${{ len(steps.review.result.findings) == 0 }} steps: - id: review type: codex with: kind: review target: type: uncommitted
- id: fix if: ${{ len(steps.review.result.findings) > 0 }} retry: max: 3 delay: 1s type: codex with: kind: turn prompt: | Address the accepted findings from this review. Review: ${{ toJSON(steps.review.result) }}Plan, review, and refine
Section titled “Plan, review, and refine”Drafts a plan, critiques it, refines it, then saves.
id: planinputs: requirements: type: string output_path: type: stringsteps: - id: draft type: codex with: kind: turn collaboration_mode: plan prompt: | Clarify anything missing, then draft an implementation plan: ${{ inputs.requirements }}
- id: critique type: codex with: kind: turn prompt: | Review for gaps: ${{ steps.draft.result }}
- id: refine type: codex with: kind: turn prompt: | Improve this plan using the critique. Draft: ${{ steps.draft.result }} Critique: ${{ steps.critique.result }}
- id: save type: write_file with: path: ${{ inputs.output_path }} content: ${{ steps.refine.result }}Implement with Claude
Section titled “Implement with Claude”id: implementinputs: requirements: type: stringsteps: - id: build type: claude with: prompt: | Implement the following change in the current repository.
Requirements: ${{ inputs.requirements }}Parallel checks
Section titled “Parallel checks”Runs multiple shell checks concurrently, then summarizes them with OpenCode.
id: parallel-checkssteps: - id: all type: parallel branches: - id: unit steps: - id: run_unit type: shell with: command: npm test stdout: mode: text - id: lint steps: - id: run_lint type: shell with: command: npm run lint stdout: mode: text exports: unit: ${{ steps.run_unit.result }} lint: ${{ steps.run_lint.result }}
- id: report type: opencode with: prompt: | Summarize: Unit: ${{ steps.all.result.unit }} Lint: ${{ steps.all.result.lint }}Commit review
Section titled “Commit review”id: review-commitinputs: commit_sha: type: stringsteps: - id: review type: codex with: kind: review target: type: commit sha: ${{ inputs.commit_sha }}Patterns
Section titled “Patterns”Review-driven loop
Section titled “Review-driven loop”Use review findings as the loop condition:
until: ${{ len(steps.review.result.findings) == 0 }}When until is omitted, the loop still succeeds and returns reason: max_reached.
Branch passthrough
Section titled “Branch passthrough”- else: steps: [] exports: value: ${{ steps.earlier.result }}