Automatic research¶
The template's opt-in research workflow runs the Research procedure unattended: a coding
agent searches the web for pages that publish what schema.yaml describes and proposes them
as new candidates in a pull request. Nothing is set up or enabled; you mark the candidates
worth setting up, as with research you ask for by hand.
Like automatic repair, the workflow pairs the agent (Claude Code, through
anthropics/claude-code-action) with a command that decides without a model.
What happens¶
- You start the workflow from the Actions tab, optionally with a focus for this run (a
district, a kind of page) and the most candidates to propose (default 5). With the
repository variable
GLEANYARD_RESEARCHset toon, it also runs on the first of each month. - The agent follows the ground rules in
CLAUDE.mdand the Research procedure in the gleanyard skill: it readsresearch.mdandschema.yaml, searches the web, and runsgleanyard checkandgleanyard probeon what it finds. Its tools are reading files, writing files, web search and thosegleanyardcommands, with a read-only GitHub token. - A second job, with no model, applies the new files and runs
gleanyard research check. - If the check passes, the job opens a pull request labelled
researchwith the agent's summary and the check's report.
Only one research pull request is open at a time; the workflow skips while one waits.
What the check enforces¶
gleanyard research check compares the working tree with the base commit:
| Rule | Why |
|---|---|
Only new files under candidates/ named <host>.yaml. |
Research proposes; setting up and changing sources is a separate, reviewed step. |
Each file has an http(s) url on the host it is named for, and a why. |
The owner needs to see what the page is and why it fits. |
No candidate for a host that is already a source or in excluded_hosts. |
You said no to it already, or have it. |
| At most the run's limit of candidates. | A short list gets reviewed. |
Turn it on¶
- Add the repository secret
ANTHROPIC_API_KEY(orCLAUDE_CODE_OAUTH_TOKEN), the same one automatic repair uses. - Run the
researchworkflow from the Actions tab, or set the repository variableGLEANYARD_RESEARCHtoonfor the monthly run. - Optional: the repository variable
GLEANYARD_RESEARCH_MODELpicks the model, and the secretGLEANYARD_REPAIR_TOKENlets the pull request start other workflows, as for repair.
A project made before 0.7.0 gets the workflow by copying .github/workflows/research.yml from
a fresh gleanyard init.