# AI use cases for Farol (winnin/farol)

Repo: [winnin/farol](https://github.com/winnin/farol) | Use cases: 3 | Page: https://dedupedai.com/use-cases/winnin-farol/

farol is a free, open-source CLI and GitHub Action that runs after your AI code review and tells the person approving a pull request how risky the merge is and which files carry the risk. It uses static analysis with the real compilers to find every page, API operation, job and script the change reaches, gives a verdict and a 0 to 100 risk score, and flags breaking API changes and security findings. It never executes or uploads your code.

This file holds every use case of this repo. Each one starts with a "## " heading and ends with its URL.

- Score the merge risk of a branch and see which files carry it: https://dedupedai.com/use-cases/winnin-farol/score-the-merge-risk-of-a-branch-with-farol/
- Find every page a shared React component change reaches: https://dedupedai.com/use-cases/winnin-farol/check-a-react-app-pr-for-pages-a-shared-component-reaches/
- Comment a merge risk report on every pull request in CI: https://dedupedai.com/use-cases/winnin-farol/add-farol-to-every-pull-request-with-the-github-action/

## How to score the merge risk of a branch and see which files carry it with Farol

Repo: [winnin/farol](https://github.com/winnin/farol) | Difficulty: Beginner | Time: 15 minutes | Basis: From the README

Run Farol locally on a feature branch to get a verdict, a risk score and the files to read first.

**Who it is for:** A reviewer facing a 40-file agent-written PR who needs to know where to look.

**The problem:** Review attention spread evenly over every PR turns into skimming, and a small change with large reach slips through.

**The outcome:** An HTML report with a verdict, a 0 to 100 score, the pages and endpoints reached and what to test by hand.

### Steps

1. Add a Farol.config.json at the project root describing your stack (one line is enough to start)
2. Run `npx @winninjs/farol routes` to check which pages, endpoints and jobs it found
3. Check out the branch and run `npx @winninjs/farol analyze --base origin/main --head HEAD --out farol.json`
4. Run `npx @winninjs/farol html --in farol.json --out farol.html` and open the report
5. Read the must-check items first, then the files by risk

### Prompt to paste into your agent

```text
Run winnin/farol on my branch <branch> against origin/main: set up farol.config.json for <stack>, analyze, generate the HTML report, and summarize the verdict, the score and the top 3 risky files.
```

### Caveat



Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/winnin-farol/score-the-merge-risk-of-a-branch-with-farol/

## How to find every page a shared React component change reaches with Farol

Repo: [winnin/farol](https://github.com/winnin/farol) | Difficulty: Beginner | Time: 15 minutes | Basis: From the README

Use Farol's React Router recipe to list the pages a change touches before you merge.

**Who it is for:** A frontend developer changing a shared hook or component used across many pages.

**The problem:** A one-line change to a shared hook can break dozens of pages nobody thought to test.

**The outcome:** A list of every page the change reaches, with the call chain, so you test the right ones by hand.

### Steps

1. cd into the React app
2. Run `echo '{ "routes": { "file": "src/routes.tsx" } }' > farol.config.json`
3. Run `npx @winninjs/farol routes` to list your pages
4. Check out your feature branch and run the analyze and html commands
5. Mark pages behind a feature flag in the report and tick files as reviewed to watch the risk drop

### Prompt to paste into your agent

```text
Configure winnin/farol for this React Router app, analyze <branch>, and list every page the change reaches with its call chain so I know what to test by hand.
```

### Caveat



Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/winnin-farol/check-a-react-app-pr-for-pages-a-shared-component-reaches/

## How to comment a merge risk report on every pull request in CI with Farol

Repo: [winnin/farol](https://github.com/winnin/farol) | Difficulty: Intermediate | Time: 30 minutes | Basis: From the README

Run Farol on every PR with the winnin/farol/action GitHub Action, fed by your existing coverage and lint reports.

**Who it is for:** A team lead who wants low-risk PRs to go fast and risky ones flagged automatically.

**The problem:** Without triage, every PR gets the same light review regardless of how much it can break.

**The outcome:** A Farol comment on each PR with the verdict, score, breaking contract changes and uncovered lines.

### Steps

1. Add the GitHub Action `winnin/farol/action` to your PR workflow
2. Point it at the coverage, lint, security and audit reports your CI already produces
3. Open a test PR and read the comment: full PR report plus commits since the last push
4. It never blocks a merge; decide your own rule for careful review verdicts
5. For local runs, `npm install --global @winninjs/farol` gives a plain Farol command

### Prompt to paste into your agent

```text
Add winnin/farol's GitHub Action (winnin/farol/action) to this repo's PR workflow, feed it our coverage and lint reports, and open a test PR to confirm it comments a verdict.
```

### Caveat



Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/winnin-farol/add-farol-to-every-pull-request-with-the-github-action/
