Skip to content

ci: add weekly feedback writer workflow to fix unhelpful docs pages#5832

Open
devin-ai-integration[bot] wants to merge 2 commits into
mainfrom
devin/1781553941-feedback-writer-workflow
Open

ci: add weekly feedback writer workflow to fix unhelpful docs pages#5832
devin-ai-integration[bot] wants to merge 2 commits into
mainfrom
devin/1781553941-feedback-writer-workflow

Conversation

@devin-ai-integration

Copy link
Copy Markdown
Contributor

Summary

Adds a weekly GitHub Actions workflow (feedback-writer.yml) that automatically finds docs pages with negative reader feedback and kicks off Fern Writer runs to improve them.

How it works:

  1. Runs every Monday at 9 AM UTC (also manually triggerable via workflow_dispatch)
  2. Queries PostHog HogQL API for feedback_submitted events where satisfied = false on buildwithfern.com/learn from the past 7 days
  3. Groups feedback by page URL, ranks pages by number of unhelpful votes
  4. For each page (up to 5 by default), constructs a prompt summarizing the complaints (reasons + reader comments) and calls the FAI Scribe API (POST /scribe/sessions) to start a Fern Writer run that opens a PR against this repo
  5. Logs a summary of started/failed runs

Manual dispatch inputs:

  • dry_run — preview prompts without starting runs
  • days — lookback window (default 7)
  • max_runs — cap on Fern Writer runs per execution (default 5)

Required secrets:

Secret Purpose
POSTHOG_ANALYTICS_API_KEY PostHog personal API key for HogQL queries
POSTHOG_ANALYTICS_PROJECT_ID PostHog project ID
FAI_API_TOKEN Bearer token for the FAI Scribe API
FAI_SERVER_URL FAI base URL (optional, defaults to https://fai.buildwithfern.com)

Link to Devin session: https://app.devin.ai/sessions/92eb363287c2470eadc66ae88e1f199b

Co-Authored-By: Devin Logan <devinannlogan@gmail.com>
@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment, CI, and merge conflict monitoring

Comment thread .github/workflows/feedback-writer.yml Fixed
Comment thread .github/workflows/feedback-writer.yml Fixed
Co-Authored-By: Devin Logan <devinannlogan@gmail.com>
@github-actions

Copy link
Copy Markdown
Contributor

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.

2 participants