Summary
Add a reusable workflow (and supporting composites) that runs a small / self-hosted-model agent against a pull request, using the repo's existing gate composites as the agent's verification checks. This is the runs-it-in-CI half of the small-local-models story — a sibling to the existing claude.yml / gemini.yml AI workflows, but pointed at a small or self-hosted model.
Companion to: d-morrison/wai — "Add guidance on small/local models for (autonomous) agentic coding" (rationale and guardrail reasoning live there); pairs with the ai-config launch-skill issue.
Motivation
gha already centralizes CI for R-package and Quarto repos and already has AI-assisted workflows. The autonomy story in wai depends on environment-run verification gates, and this repo already ships exactly those composites (lint-qmd, lint-markdown, check-links, check-phi, plus R testthat checks). Wiring them as a small-model agent's green/red signal turns the guardrail concept into enforced CI, reusable across consumer repos via stub files.
Proposed content
- A reusable workflow (e.g.
.github/workflows/small-model-agent.yml) that:
- Runs an agent backed by a small or self-hosted model (OpenAI-compatible endpoint / self-hosted runner) against a PR or issue.
- Operates on a branch/worktree, commits per green step, and posts a summary — never force-merges.
- Is bounded (max iterations / consecutive failures → stop and report), mirroring the
wai guardrails.
- Gate wiring — call the existing composites as the agent's per-step verification:
lint-yaml, lint-markdown, lint-qmd, check-links, check-phi, check-secrets, and R testthat / R CMD check; add a Quarto quarto render gate and (optionally) act for workflow-file changes.
- A minimal consumer stub so R/Quarto repos can adopt it with a few lines, consistent with the repo's stub pattern.
- Docs + cross-link back to the
wai page and the ai-config launch skill.
Tasks
Notes
Reuse the same gate commands the ai-config skill calls locally, so local and CI runs verify identically. Keep permissions least-privilege (the repo already wraps composites in permission-managed workflows).
Summary
Add a reusable workflow (and supporting composites) that runs a small / self-hosted-model agent against a pull request, using the repo's existing gate composites as the agent's verification checks. This is the runs-it-in-CI half of the small-local-models story — a sibling to the existing
claude.yml/gemini.ymlAI workflows, but pointed at a small or self-hosted model.Companion to:
d-morrison/wai— "Add guidance on small/local models for (autonomous) agentic coding" (rationale and guardrail reasoning live there); pairs with theai-configlaunch-skill issue.Motivation
ghaalready centralizes CI for R-package and Quarto repos and already has AI-assisted workflows. The autonomy story inwaidepends on environment-run verification gates, and this repo already ships exactly those composites (lint-qmd,lint-markdown,check-links,check-phi, plus Rtestthatchecks). Wiring them as a small-model agent's green/red signal turns the guardrail concept into enforced CI, reusable across consumer repos via stub files.Proposed content
.github/workflows/small-model-agent.yml) that:waiguardrails.lint-yaml,lint-markdown,lint-qmd,check-links,check-phi,check-secrets, and Rtestthat/R CMD check; add a Quartoquarto rendergate and (optionally)actfor workflow-file changes.waipage and theai-configlaunch skill.Tasks
quarto rendergatewai+ai-configNotes
Reuse the same gate commands the
ai-configskill calls locally, so local and CI runs verify identically. Keep permissions least-privilege (the repo already wraps composites in permission-managed workflows).