pipelines / site-care.yaml

Fix a site's copy, with your approval

The agent never edits the site. It only reads and writes a proposal. You review it in the inbox; a plain script applies exactly what you approved, then the smoke test runs again.

// the steps

What runs, in order.

  1. 01-gate
    free

    Nothing new since the last run: stop.

  2. 02-smoke-before
    script

    Record how the site answers before anything changes.

  3. 03-propose
    agent · cheap

    Reads the pages with a copy-style skill and writes at most 5 proposed edits. It can't edit a file.

  4. verify
    check

    caffeine check actions validates the proposal; the scope proves only .agent/ changed.

  5. 04-links
    script

    Reports broken links without failing the run.

  6. inbox → apply
    you, then a script

    caffeine approve, then a script applies the approved edits and the smoke test runs again.

// the file

The whole pipeline.

Shipped with caffeine as an example. Copy it to ~/.caffeine/pipelines/, list it on a target in workspace.yaml, then caffeine run site-care.

pipelines/site-care.yaml
description: "Propose copy fixes for a site; apply only what is approved"
actions: { allowed: [edit_copy], max: 5 }

steps:
  - name: 01-gate                 # nothing new since the last run: stop, free
    run: caffeine gate changed --cmd "git log -1 --format=%H" --key head

  - name: 02-smoke-before         # record how the site answers before anything changes
    run: caffeine check smoke --save --start "{{smoke_start}}" --url {{smoke_url}} --wait 30 {{smoke_routes}}

  - name: 03-propose              # the agent only reads, and writes a proposal
    prompt: prompts/site-care/propose.md
    model: cheap
    max_turns: 12
    timeout: 300
    allowed_tools: [Read, Glob, Write]
    skills: [copy-style]          # skills/copy-style/SKILL.md, shipped with this pack
    verify: caffeine check actions && caffeine scope '.agent/**'

  - name: 04-links                # report broken links, without failing the run
    run: caffeine check urls README.md || true

apply:
  - name: apply                   # a script applies exactly what was approved
    run: python3 {{pack}}/checks/apply_edits.py
    verify: caffeine scope '*.html' && caffeine check smoke --save --status-only --start "{{smoke_start}}" --url {{smoke_url}} --wait 30 {{smoke_routes}}