Skip to content

Docs self-healing workflow improvements: pre-filter PRs before Claude#3062

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

Docs self-healing workflow improvements: pre-filter PRs before Claude#3062
pwizla merged 4 commits intomainfrom
repo/self-healing-docs-improved

Conversation

@pwizla
Copy link
Copy Markdown
Collaborator

@pwizla pwizla commented Apr 16, 2026

Summary

  • Pre-filter PRs by title in bash — excludes chore, test, docs, security, translations, typos before launching Claude. Based on analysis of 100+ merged strapi/strapi PR titles (~50% filtered).
  • Idempotency check in bash — searches existing auto-doc-healing PRs before Claude, not inside Claude.
  • Pre-fetch diffs and bodies in bash — stores in /tmp/pr-<NUMBER>-body.txt and .diff, Claude reads from disk instead of calling gh api.
  • Detailed summary — lists every PR by name: excluded (strikethrough), already processed, sent to Claude.
  • Removed artifact upload stepshow_full_output in logs is sufficient for debugging.

Net effect: Claude only runs when there are genuine candidates, and starts directly at Router instead of re-fetching and re-filtering.

Test plan

  • Trigger via workflow_dispatch and verify the pre-filtering summary
  • Confirm Claude receives $FILTERED_PRS and reads diffs from /tmp/
  • Verify idempotency: re-run should skip already-processed PRs

🤖 Generated with Claude Code

pwizla and others added 4 commits April 16, 2026 18:23
Prompt-level guardrail to prevent the Claude agent from making
any write API calls to strapi/strapi via the GH_TOKEN.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The workflow now handles title-based filtering (chore, test, docs,
security, translations, typos) and idempotency checks in bash before
launching Claude. This avoids spending tokens on PRs that never need
documentation. Claude receives only the pre-filtered list via
$FILTERED_PRS and starts directly at diff fetching + Router.

Based on analysis of 100+ merged strapi/strapi PR titles.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The summary now lists every PR by name: excluded by title filter
(strikethrough), already processed (idempotency), and candidates
sent to Claude (bold). Removed the artifact upload step.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
New workflow step fetches body and diff for each candidate PR
and stores them in /tmp/pr-<NUMBER>-body.txt and /tmp/pr-<NUMBER>.diff.
Claude reads from disk instead of calling gh api, saving tool calls.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@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 7:41pm

Request Review

@github-actions github-actions Bot added internal PRs created by the Strapi core team pr: updated content PRs updating existing documentation content source: repo PRs/issues not targeting a specific documentation but rather affecting the whole repo labels Apr 16, 2026
@pwizla pwizla self-assigned this Apr 16, 2026
@pwizla pwizla added pr: chore and removed pr: updated content PRs updating existing documentation content labels Apr 16, 2026
@pwizla pwizla added this to the 6.22.0 milestone Apr 16, 2026
@pwizla pwizla marked this pull request as ready for review April 16, 2026 19:43
@pwizla pwizla requested a review from derrickmehaffy as a code owner April 16, 2026 19:43
@pwizla pwizla merged commit 4369555 into main Apr 16, 2026
9 checks passed
@pwizla pwizla deleted the repo/self-healing-docs-improved branch April 16, 2026 19:43
pwizla added a commit that referenced this pull request Apr 16, 2026
The previous approach passed PR bodies via --arg which broke on
special characters and newlines. Now extracts PR numbers into a
JSON array file and uses --slurpfile for reliable filtering.

Fixes #3062

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@pwizla pwizla changed the title Optimize self-healing workflow: pre-filter PRs before Claude Docs self-healing workflow improvements: pre-filter PRs before Claude Apr 22, 2026
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