Skip to content

Add docs self-healing workflow#3059

Merged
pwizla merged 9 commits intomainfrom
repo/self-healing-docs
Apr 16, 2026
Merged

Add docs self-healing workflow#3059
pwizla merged 9 commits intomainfrom
repo/self-healing-docs

Conversation

@pwizla
Copy link
Copy Markdown
Collaborator

@pwizla pwizla commented Apr 16, 2026

This PR adds a nightly GitHub Action that automatically creates draft documentation PRs when code changes are merged into strapi/strapi.

How it works

  1. Runs nightly at 1:30 UTC (also triggerable manually via workflow_dispatch)
  2. Lists PRs merged into strapi/strapi's develop branch in the last 24 hours
  3. For each PR, runs the existing Router agent to determine if docs need updating
  4. If yes, runs the full Outliner/Drafter/Self-review pipeline
  5. Creates a draft PR on strapi/documentation with label auto-doc-healing

Safeguards

  • Max 5 PRs processed per run
  • Diffs over 3000 lines are skipped (flagged for manual review)
  • Branch existence check ensures idempotency (safe to re-run)
  • Uncertain routing (Router sets ask_user) is skipped and logged
  • Uses Claude Sonnet for cost efficiency
  • All generated PRs are drafts — human review required before merge

Files

  • .github/workflows/docs-self-healing.yml — the workflow
  • .github/prompts/docs-self-healing.md — the prompt for claude-code-action

Test plan

  • Trigger manually via workflow_dispatch
  • Verify it picks up a recent strapi/strapi PR
  • Verify it creates a draft PR with correct content and label
  • Verify it skips PRs that don't need docs (tests, deps, chores)
  • Verify idempotency: re-run skips already-processed PRs

pwizla and others added 2 commits April 16, 2026 15:33
Nightly GitHub Action that scans strapi/strapi PRs merged in the last
24 hours and creates draft documentation PRs using the existing
Router/Outliner/Drafter agent system. Uses claude-code-action with Sonnet.

- .github/workflows/docs-self-healing.yml: cron at 1:30 UTC + manual dispatch
- .github/prompts/docs-self-healing.md: prompt referencing agents at runtime

Safeguards: max 5 PRs/run, 3000-line diff threshold, branch existence
check for idempotency, ask_user skip for uncertain routing.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@pwizla pwizla added the internal PRs created by the Strapi core team label Apr 16, 2026
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 16, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
documentation Ready Ready Preview, Comment Apr 16, 2026 2:37pm

Request Review

@github-actions github-actions Bot added pr: new content PRs for new product features or new documentation sections source: repo PRs/issues not targeting a specific documentation but rather affecting the whole repo labels Apr 16, 2026
@pwizla
Copy link
Copy Markdown
Collaborator Author

pwizla commented Apr 16, 2026

Merging to test in real conditions 🚀

@pwizla pwizla added this to the 6.22.0 milestone Apr 16, 2026
@pwizla pwizla added pr: chore and removed pr: new content PRs for new product features or new documentation sections labels Apr 16, 2026
@pwizla pwizla marked this pull request as ready for review April 16, 2026 13:54
@pwizla pwizla requested a review from derrickmehaffy as a code owner April 16, 2026 13:54
Comment thread .github/prompts/docs-self-healing.md Outdated
Comment thread .github/prompts/docs-self-healing.md Outdated
@pwizla pwizla merged commit cd076ae into main Apr 16, 2026
2 of 3 checks passed
@pwizla pwizla deleted the repo/self-healing-docs branch April 16, 2026 14:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

internal PRs created by the Strapi core team pr: chore source: repo PRs/issues not targeting a specific documentation but rather affecting the whole repo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant