Groundkeeper is a deterministic, YAML-driven repository maintenance agent that runs primarily in GitHub Actions. It is designed to be safe, reviewable, and boring: every output is structured, validated, and generated under strict budgets and scope rules.
- YAML is the source of truth —
.github/agent.ymldefines scope, budgets, and runtime settings. - Report-only by default — publishing is opt-in and gated by config.
- Deterministic stages — fixed stages with schema-validated I/O.
- No hidden automation — no auto-merge, no background services.
- Scoped execution — out-of-scope changes are rejected before LLM calls.
- Schema-validated configuration via
packages/schemas/agent.schema.json - Strict stage boundaries: Preflight → Analysis → Plan → Patch → Verify → Publish
- Prompt templates per stage in
prompts/ - CLI + GitHub Action wrapper for consistent automation
packages/cli— CLI entrypoint and command handlingpackages/core— stage runner, config validation, scope, and budgetspackages/runtimes— LLM runtime adapters (OpenAI, Copilot)packages/schemas— agent config schema and stage I/O schemasprompts/— stage prompt templates (analysis, plan, patch, verify, publish)
npm install -g groundkeeperAdd to your workflow file (e.g., .github/workflows/groundkeeper.yml):
name: Repository Maintenance
on:
schedule:
- cron: '0 0 * * 0' # Weekly on Sunday
workflow_dispatch:
jobs:
maintenance:
runs-on: ubuntu-latest
steps:
- name: Run Groundkeeper
uses: efremidze/groundkeeper@v1
with:
config: .github/agent.yml
github-token: ${{ secrets.GITHUB_TOKEN }}- Create
.github/agent.yml:
$schema: ../packages/schemas/agent.schema.json
version: '1.0'
mode: report-only
scope:
include:
- src/**
- docs/**
- README.md
exclude:
- node_modules/**
- dist/**
budgets:
maxFiles: 100
maxDiffLines: 800
maxTokens: 10000
rules:
allow:
- documentation
- formatting
deny:
- dependency-upgrades
runtime:
provider: openai
publish:
enabled: false- Run Groundkeeper:
groundkeeper run --config .github/agent.ymlRun the deterministic stage pipeline:
groundkeeper run [options]
Options:
-c, --config <path> Path to configuration file (default: ".github/agent.yml")
-d, --directory <path> Working directory (default: current directory)The configuration file is validated against packages/schemas/agent.schema.json. Groundkeeper reads .github/agent.yml as the source of truth by default.
version: string # Configuration version (required)
mode: report-only # Safety mode
scope: # Allowed repo paths
include: [string]
exclude: [string]
budgets: # Hard limits before LLM calls
maxFiles: number
maxDiffLines: number
maxTokens: number
rules: # Allowed/denied rule categories
allow: [string]
deny: [string]
runtime: # LLM runtime selection
provider: openai | copilot
publish: # Publishing behavior (opt-in)
enabled: boolean
target: pr | issueGroundkeeper executes fixed stages with schema-validated inputs/outputs:
- Preflight — deterministic repo metadata and validation (no LLM)
- Analysis — read-only analysis (LLM)
- Plan — plan only (LLM)
- Patch — diff-only output (LLM)
- Verify — runner executes checks; LLM interprets results
- Publish — report content for PR/issue (LLM), published by CLI if enabled
All behavior is defined in .github/agent.yml. This makes the agent's behavior explicit and version-controlled.
Groundkeeper will not publish changes unless publish.enabled is explicitly set to true.
Given the same repository state and configuration, Groundkeeper produces the same structured outputs.
Groundkeeper does not commit changes directly. Publishing is handled by the CLI and Action with explicit configuration.
Even when publishing, Groundkeeper never auto-merges.
groundkeeper run --config .github/agent.yml
cat .groundkeeper/report.md# .github/workflows/groundkeeper.yml
name: Weekly Maintenance
on:
schedule:
- cron: '0 0 * * 0'
jobs:
groundkeeper:
runs-on: ubuntu-latest
steps:
- uses: efremidze/groundkeeper@v1
with:
config: .github/agent.ymlgit clone https://github.com/efremidze/Groundkeeper.git
cd Groundkeeper
npm installnpm run buildnpm startnpm testContributions are welcome! Please feel free to submit a Pull Request.
MIT License - see LICENSE file for details.
Lasha Efremidze
Note: Groundkeeper is designed to be safe and non-intrusive. It won't make changes to your repository without explicit permission.