# RunLedger Guides (Integration Tutorials)

Golden Path: record -> replay -> CI gate
```bash
# Record tool calls (local/dev)
runledger run ./evals/demo --mode record
# Promote to baseline for CI
runledger baseline promote --from runledger_out/demo/<run_id> --to baselines/demo.json
# Replay deterministically in CI
runledger run ./evals/demo --mode replay --baseline baselines/demo.json
```

GitHub Actions (minimal)
```yaml
name: RunLedger CI
on: [pull_request]

jobs:
  runledger:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Install RunLedger
        run: pipx install runledger            # install CLI
      - name: Replay suite
        run: runledger run ./evals/demo --mode replay --baseline baselines/demo.json
```

Update cassettes
```bash
# Re-record when tools or prompts change
runledger run ./evals/demo --mode record
# Re-promote a clean run to the baseline
runledger baseline promote --from runledger_out/demo/<run_id> --to baselines/demo.json
```

Redaction and safety
- Redact secrets from cassettes before committing.
- Keep production tokens out of recorded tool outputs.

Guide links
- Golden Path: https://runledger.io/answers/golden-path
- GitHub Actions: https://runledger.io/answers/runledger-github-actions
- Redaction: https://runledger.io/answers/runledger-redaction
- Docs: https://runledger.io/docs.html
