Our blog posts are drafted by AI agents. Every one of them reaches the site as a pull request, and none is published until I approve it. That was true from the start. What we added is another gate in front of my approval: an agent-written post cannot be merged until every factual claim in it has a source.
This post describes that gate as we built it: what our agents have to deliver, why we count a fact check with no claims as a failure, and why my approval stays the last step anyway.
AI drafting is not the risk. Unreviewed claims are.
A fluent paragraph with a wrong number in it reads exactly like a fluent paragraph without one. When I am asked to “look over the draft”, I check the tone and the argument, and a number can slip through.
We could have written a rule: “agents must source their claims”. Rules like that depend on discipline, and discipline slips under load. So we made the check a merge condition instead. If the evidence is missing, the merge button stays blocked. Nobody has to remember anything.
The mechanism: a required check
GitHub’s documentation on protected branches puts it plainly: “After enabling required status checks, all required status checks must pass before collaborators can merge changes into the protected branch” (GitHub Docs: about protected branches). Rulesets offer the same rule: “Required status checks ensure that all required CI tests are passing before collaborators can make changes to a branch or tag targeted by your ruleset” (GitHub Docs: available rules for rulesets).
Our gate is such a check. We named it fact check, and a GitHub Actions workflow in our site repository runs it. We built it to sort every pull request into one of these cases:
- Not an agent post. My own pull requests, layout and design changes, anything that does not add or change a published post: our check passes with “not applicable”. We did not want the gate to slow down work it has nothing to say about.
- An agent post. A pull request opened by our agents’ GitHub identity that adds or changes a published post: our check stays pending until the agents have reported their fact check, and then it passes or fails.
We let the check run and report on every pull request, including the ones it does not apply to. That is deliberate. The same GitHub page says: “Required status checks must have a successful, skipped, or neutral status before collaborators can make changes to a protected branch” (GitHub Docs: about protected branches). A skipped check counts as acceptable, and a gate that can be skipped is a gate that can be walked around.
What our agents have to deliver
Our agents’ fact check produces evidence in both of the following forms, and we built the gate to require both.
A commit status on the exact commit that was checked. GitHub commit statuses are created “for a given SHA”, take one of the states error, failure, pending or success, and carry a context, “A string label to differentiate this status from the status of other systems” (GitHub REST API: commit statuses). Our agents set their own context on the head commit of the pull request. Our gate accepts that status only if our agents’ own GitHub identity set it. A status from anyone else fails our check.
A structured comment on the pull request. It lists every factual claim in the post, each with a verdict and at least one source link, plus an overall verdict and the commit it refers to. Our gate parses it. It passes only if the overall verdict is “pass”, every claim is marked as supported, and every claim has a source.
Both pieces of evidence are tied to a single commit, and that is the point. When our agents push a revision, our check goes back to pending for the new commit. A fact check of an older version never counts for a newer one, because a revision can add a claim that nobody has checked yet.
Our gate wakes up when the status is set. GitHub can start a workflow on the status event, which “Runs your workflow when the status of a Git commit changes” (GitHub Docs: events that trigger workflows), so our agents’ report re-evaluates the pull request without anyone polling.
Why we count zero claims as a failure
A rule like “every claim must be sourced” has an obvious hole: a fact check that lists no claims at all. Every claim in an empty list is sourced.
So our gate treats an empty list as a failure. A real blog post makes claims. If the fact check found none, either the checker did not do its work, or the post says nothing, and in both cases we do not want it to go out. The same goes for a claim with a verdict other than “supported”, or with no source: a single weak claim fails the whole post, and the failure names the claim.
Whose code decides
A check is only as strong as the code that computes it. Our gate’s workflow always loads its decision script from the main branch, never from the pull request it is judging. Otherwise a pull request could bring its own, friendlier version of the gate.
Our agents also cannot change the gate. Their GitHub identity has no permission to change workflow files, and another required check of ours fails any agent pull request that touches anything outside the blog folder.
The way out, when the agents are down
If our agents are down, the check stays pending and the post stays blocked. That is the safe default, but a gate without an exit gets disabled the first time it is in the way.
Our exit is a manual run of the gate workflow. GitHub supports manually triggered workflows through workflow_dispatch, where “You can configure custom-defined input properties, default input values, and required inputs for the event directly in your workflow” (GitHub Docs: events that trigger workflows). Ours asks for the pull request and a written reason. Only my account can use it, and we check that by account ID rather than by user name. The override marks the check as passed with my name and the reason, and posts the reason on the pull request. The exception leaves a record.
Why my approval still matters
The fact check answers one question: does every claim have a source? It does not answer whether the post is any good, whether it says what we mean, or whether we want to publish it at all. That is still my call, and I make it by approving the pull request.
That approval does another job too. The EU AI Act’s transparency rules say: “Deployers of an AI system that generates or manipulates text which is published with the purpose of informing the public on matters of public interest shall disclose that the text has been artificially generated or manipulated.” The same paragraph continues: “This obligation shall not apply where the use is authorised by law to detect, prevent, investigate or prosecute criminal offences or where the AI-generated content has undergone a process of human review or editorial control and where a natural or legal person holds editorial responsibility for the publication of the content.” (EU AI Act, transparency obligations). On timing, the same page notes that the article “Comes into force 2 August 2026, according to Article 113” (EU AI Act, transparency obligations). My approval in GitHub is our record of that review, attached to the exact change that was published. We also label every agent-drafted post as AI-assisted on the page itself, so readers know either way.
The fact check and my approval do different work. The fact check is a machine check of evidence. The approval is me taking responsibility. Neither replaces the other.
What we would tell a CTO
If your agents produce content or code, the pattern carries over:
- Make the evidence a merge condition, not a guideline. A required check does not get tired.
- Tie the evidence to the exact commit. A check of the previous version is a check of a different text.
- Treat “nothing found” as a failure whenever the checker is supposed to find something.
- Run the gate’s code from the protected branch, never from the change it is judging.
- Build the exit before you need it, and make it leave a written record.
- Keep the human approval as the last step. It is where the responsibility sits, and the record of it can matter beyond your own team.