Skip to content

ci(docs): open documentation PRs when public API changes - #202

Merged
markbackman merged 1 commit into
mainfrom
mb/update-docs-workflow
Aug 28, 2026
Merged

ci(docs): open documentation PRs when public API changes#202
markbackman merged 1 commit into
mainfrom
mb/update-docs-workflow

Conversation

@markbackman

@markbackman markbackman commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Installs the docs automation this repo has never had. Builds on the profile merged in #201.

Why

Five docs PRs swept this package against v1.2.0 and found twelve commands that fail when run, six false statements, and an entire undocumented command group. That wasn't neglect — it accumulated because nothing here opens a docs PR when public API changes. The correlation across the org is exact: repos with this workflow stayed in sync, repos without it drifted.

Not a rewrite

This is pipecat's workflow with four adaptations, so everything it has accumulated carries over intact:

  • the 90-turn cap that fixed a ~40% silent-drop rate (the version in pipecat-flows is still at 30)
  • formatting before llms.txt generation — the reverse order leaves both files stale and fails the docs repo's lint
  • outcome recording to the run summary, so a run that documented nothing is distinguishable from one that produced a PR
  • failure reporting back onto the source PR, with a label and a re-run command

The four adaptations:

Scope src/pipecatcloud/**, excluding tests
Branch names docs/cloud-pr-N, not docs/pr-N
Token scope App token minted for owner: pipecat-ai, scoped to docs alone
Source repo refs every gh call targets daily-co/pipecat-cloud

Two things that aren't obvious

Branch namespacing. pipecat already uses docs/pr-N. Two repos each numbering from one will eventually both want docs/pr-412 in the docs repo, and the second would push onto the first's branch. Prefixing here avoids it. pipecat-flows has the same latent collision with pipecat today, though it's about to be archived so it will resolve itself.

Cross-org token. This repo is in daily-co; the docs repo is in pipecat-ai. The app-token step can only mint for one owner, so it's scoped to pipecat-ai / docs — used for checking out docs and opening the PR there. Reading this repo's PRs uses the default GITHUB_TOKEN, which needs no extra grant.

Prerequisite — this needs three secrets before it works

None of these exist in this repo today:

Secret What it is
DOCS_BOT_APP_ID The GitHub App pipecat already uses
DOCS_BOT_PRIVATE_KEY Its private key
ANTHROPIC_API_KEY For the agent that writes the docs

The App needs no new installation. The token is minted for owner: pipecat-ai scoped to docs, and the App is already installed there — only the credentials have to be present in this repo.

(I could not check for org-level secrets, which need admin access to list. If any of these are set org-wide and inherited, fewer are needed here.)

Until they are, the workflow fails at its first step rather than running and silently doing nothing — which is the failure mode you want, since a red run is visible and a quiet no-op isn't. There's a header comment in the file saying so.

Honest caveat

The shared skill this follows has been verified statically — the profile's nine contract sections are present, all 78 cloud doc pages are reachable by a rule, the YAML parses with 12 steps — but it has not been run end to end since being refactored. The first real merged PR here will be its first live exercise.

That's a deliberate tradeoff: this repo ships every ~3 weeks, so feedback comes soon, and the blast radius of a failure is a missing docs PR (visible via the failure label) rather than a wrong one. If you'd rather see it green first, a workflow_dispatch run on pipecat against a known-good merged PR is the test.

🤖 Generated with Claude Code

Installs the automation this repo has never had. The five docs PRs that
swept this package against v1.2.0 found twelve commands that fail when
run, six false statements, and an undocumented command group — all of it
accumulated because nothing here opens a docs PR when public API changes.

The workflow is pipecat's, with four adaptations rather than a rewrite,
so the hardening it accumulated carries over intact: the 90-turn cap that
fixed the ~40% silent-drop rate, the formatting-then-llms.txt ordering
the docs repo's lint requires, outcome recording, and failure reporting
back onto the source PR.

The adaptations:

- Scope is src/pipecatcloud/**, excluding tests.

- Branches are docs/cloud-pr-N rather than docs/pr-N. pipecat already
  uses the unprefixed form, and two repos numbering from one would
  eventually collide on a shared branch name in the docs repo.

- This repo is in daily-co while the docs repo is in pipecat-ai, so the
  App token is minted for owner pipecat-ai scoped to `docs` alone.
  Reading this repo's own PRs uses the default GITHUB_TOKEN.

- Every gh invocation that targets the source repo points at
  daily-co/pipecat-cloud, including the failure label, the comment, and
  the re-run hint in it.

Requires DOCS_BOT_APP_ID and DOCS_BOT_PRIVATE_KEY as repository secrets,
which do not exist here yet. A header comment says so; until they are
set the workflow fails at its first step rather than running and quietly
doing nothing.
@markbackman
markbackman force-pushed the mb/update-docs-workflow branch from 5a909d3 to e8e8843 Compare August 28, 2026 00:27
@markbackman
markbackman merged commit 9d1b9a1 into main Aug 28, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant