ENGINEERING

Agent that fixes drifted README examples and opens a PR

On a schedule, detects README code examples that no longer run, uses an agent to rewrite each broken snippet against the current API, verifies the fix runs clean.

CategoryEngineering
EngineSim + Paperclip
Difficultyadvanced
Triggerschedule
Steps6
Setup~25 min

How it runs

The automated pipeline, trigger to output.

  • TriggerSchedule fires
  • ActionInstall latest version, run examples to find failuresShell
  • ActionAgent rewrites failing snippets against current APIOpenAI
  • ActionRe-run rewritten snippets to verify they passShell
  • LogicKeep only verified fixes, discard unrepairable ones
  • OutputOpen GitHub PR with corrected READMEGitHubGitHub

What it does

This workflow does not just flag drift, it repairs it. A scheduled run finds README code examples that fail against the current API, then an agent reads the failing snippet, the error output, and the current API signatures to rewrite the example. It re-runs the rewritten snippet to confirm it passes, then opens a GitHub pull request containing only verified fixes for a human to review.

When to use it

Use it when documentation drift is frequent enough that manual fixing is a chore and you trust an agent to draft corrections behind a review gate. Best for well-typed SDKs where the API surface is discoverable.

How it works

  1. 1A schedule triggers the run.
  2. 2A shell step installs the latest version and runs the README examples to find failures.
  3. 3An agent step rewrites each failing snippet using the error output and current API signatures.
  4. 4A shell step re-runs every rewritten snippet to verify it now passes.
  5. 5A logic step keeps only verified fixes and discards any the agent could not repair.
  6. 6A GitHub step opens a pull request with the corrected README and a summary of each change.

Set it up

What you configure once, before turning it on.

  1. 1
    Connect ShellRun sandboxed commands inside the workspace.
  2. 2
    Connect OpenAIModels, embeddings, files.
  3. 3
    Connect GitHubRepos, issues, pull requests, actions.
  4. 4
    Set each agent's modelWe leave models unset so you pick the tier — fast + cheap, or top-quality.
  5. 5
    Tune it to your dataEdit the prompts, filters, and field mappings so it matches how your team works.
  6. 6
    Test, then turn it onRun once against a sample, confirm the output, then enable the trigger.

Run this workflow in your colony.

14-day trial. No DevOps. No Sales call. Provisioned in under a minute.