Skip to content

DaCameraGirl/gatekeeper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

9 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

GateKeeper

πŸ€– GateKeeper

Your Autonomous AI DevOps Engineer β€” Always On Call

Every release passes through me. I block the bad ones. I clear the good ones. I tell you exactly why.

GitHub Actions Claude Sonnet DeepSeek Node.js Tavily Firecrawl


✨ What is GateKeeper?

GateKeeper is a fully autonomous AI DevOps agent β€” not a linter, not a checklist, not a chatbot that tells you what it would do. He's a senior DevOps engineer with real tools who reviews every release before it ships.

He fires automatically on every PR, runs 9 deterministic policy gates, calls Claude Sonnet for a qualitative risk assessment, and posts an official Release Readiness Certificate directly on the PR β€” with a commit status that can block the merge if the release isn't ready.

But he's more than a CI bot. Run him as a local chat agent and he'll:

  • πŸ” Read, write, and search your files
  • πŸ’» Run terminal commands and report back
  • 🌐 Search the web and scrape docs in real time
  • πŸ™ Manage GitHub issues, PRs, and workflows
  • 🎫 Create and update Jira tickets
  • πŸ“£ Send Slack notifications
  • 🧠 Remember everything about you and your projects β€” across all sessions
  • πŸ’¬ Talk to you like a brilliant friend, not a corporate bot

πŸ”„ How It Works (CI Mode)

PR Opened / Updated
        β”‚
        β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                      πŸ€– GateKeeper                        β”‚
β”‚                                                           β”‚
β”‚  1️⃣  Read flags.json from the PR branch                   β”‚
β”‚  2️⃣  Validate schema              β†’  DeepSeek             β”‚
β”‚  3️⃣  Run 9 deterministic gates    β†’  Policy engine        β”‚
β”‚  4️⃣  Pre-process gate context     β†’  DeepSeek             β”‚
β”‚  5️⃣  Full qualitative assessment  β†’  Claude Sonnet        β”‚
β”‚  6️⃣  Generate Release Certificate β†’  certificate.js       β”‚
β”‚  7️⃣  Post PR comment + set status β†’  GitHub API           β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
        β”‚
        β–Ό
  πŸ“‹ PR Comment: Release Readiness Certificate
  🚦 Commit Status: βœ… CLEARED Β· ⚠️ WITH-CAUTION Β· ❌ BLOCKED

πŸ›‘οΈ The 9 Policy Gates

# Gate Weight What It Checks
1 πŸ”“ Kill Switch BLOCKER Emergency override β€” stops all releases instantly
2 πŸ“Š Rollout % 10 pts Safe rollout bounds, canary cross-check
3 🌍 Environment 22 pts Staging must be validated before production
4 πŸ§ͺ Test Coverage 20 pts Meets your minimum coverage threshold
5 πŸ“‰ Error Rate 18 pts Production error rate within SLO bounds
6 🐀 Canary Health 10 pts Canary deployment health and score
7 ⏳ Flag Age 8 pts Feature flags can't exceed 90 days stale
8 πŸ’₯ Blast Radius 6 pts User impact + rollback plan validation
9 πŸ”’ Dependencies 6 pts No critical CVEs, fresh npm audit

Score = weighted sum of gates 2–9 (0–100)

Score Status Exit Code
Kill switch active πŸ”΄ BLOCKED 1
< 50 πŸ”΄ BLOCKED 1
50–79 or any FAILED 🟑 WITH-CAUTION 0 (or 1 in strict mode)
β‰₯ 80, no failures 🟒 CLEARED 0

πŸ“œ The Release Certificate

Every PR gets a certificate posted automatically:

╔══════════════════════════════════════════════════════════════════════╗
β•‘  πŸ€–  G A T E K E E P E R   R E L E A S E   C E R T I F I C A T E  β•‘
╠══════════════════════════════════════════════════════════════════════╣
β•‘  Feature:  payment-v2              Version: 2.1.0                   β•‘
β•‘  Owner:    payments-team           PR:      #42                     β•‘
β•‘  Branch:   feat/payment-v2                                          β•‘
β•‘  Assessed: 2024-03-15T12:00:00.000Z                                 β•‘
╠══════════════════════════════════════════════════════════════════════╣
β•‘  Score: β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‘β–‘β–‘β–‘  82/100                                β•‘
β•‘  Status: CLEARED         AI Risk: LOW                               β•‘
β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•

Includes: status banner Β· blockers table Β· warnings Β· Claude's full risk assessment Β· exact remediation steps Β· full gate summary Β· signed timestamp


πŸ’¬ Chat Mode β€” GateKeeper as Your Personal DevOps Engineer

GateKeeper isn't just a CI bot. Run him locally and talk to him like a real engineer.

npm start
# β†’ Open http://localhost:3000

He has real tools and actually uses them:

Tool What He Does
πŸ“ read_file / write_file Read and edit any file in your project
πŸ’» run_terminal_command Execute shell commands, show real output
πŸ” search_files Grep across your codebase
🌐 web_search Live web search via Tavily
πŸ”₯ firecrawl_search Deep page scraping and doc extraction
πŸ™ GitHub tools Create issues, check PRs, list workflows
🎫 Jira tools Create, search, and update tickets
πŸ“£ Slack tools Send messages to channels
🧠 Memory tools Remember and recall across all sessions
🚦 run_release_gate Full 9-gate policy check on any flags.json

He narrates what he's doing as he works β€” no silent spinning, no black box.


πŸš€ Setup

1. Clone & install

git clone https://github.com/DaCameraGirl/gatekeeper.git
cd gatekeeper
npm install

2. Configure your environment

cp .env.example .env
# Fill in your API keys β€” see table below

⚠️ Never commit your .env file. It's already in .gitignore β€” keep it that way. Your API keys are private and should never be pushed to GitHub.

3. Run the chat agent

npm start
# β†’ http://localhost:3000

4. (CI mode) Add GitHub secrets

Go to Settings β†’ Secrets and variables β†’ Actions and add:

Secret Description
ANTHROPIC_API_KEY Claude API key β€” required
DEEPSEEK_API_KEY DeepSeek API key β€” required

GITHUB_TOKEN is provided automatically by GitHub Actions.

5. (CI mode) Protect your branch

In Settings β†’ Branches β†’ Branch protection rules, add:

πŸ€– GateKeeper / Release Gate

as a required status check to block merges on BLOCKED releases.


πŸ”‘ Environment Variables

Variable Description
ANTHROPIC_API_KEY Claude API key (required)
DEEPSEEK_API_KEY DeepSeek API key (required for schema validation)
GITHUB_TOKEN GitHub token (auto in Actions, set in .env for local)
TAVILY_API_KEY Web search β€” get free key at tavily.com
FIRECRAWL_API_KEY Deep web scraping β€” firecrawl.dev
SLACK_BOT_TOKEN Slack bot token for notifications
GITHUB_REPOSITORY owner/repo format
FLAGS_JSON_PATH Path to flags.json (default: ./flags.json)
GATEKEEPER_STRICT true = WITH-CAUTION also exits 1
GATEKEEPER_DRY_RUN true = skip GitHub API, print to console

πŸ—‚οΈ Architecture

GateKeeper/
β”œβ”€β”€ server.js                   β€” Chat server + streaming agent loop
β”œβ”€β”€ public/
β”‚   └── index.html              β€” Chat UI
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ index.js                β€” CI orchestrator (9-step pipeline)
β”‚   β”œβ”€β”€ utils.js                β€” Scoring + formatting utilities
β”‚   β”œβ”€β”€ certificate.js          β€” Release certificate generator
β”‚   β”œβ”€β”€ github.js               β€” GitHub API (comments, commit status)
β”‚   β”œβ”€β”€ brain/
β”‚   β”‚   β”œβ”€β”€ claude.js           β€” Claude Sonnet risk assessment
β”‚   β”‚   └── deepseek.js         β€” DeepSeek schema validation + context prep
β”‚   β”œβ”€β”€ tools/
β”‚   β”‚   β”œβ”€β”€ definitions.js      β€” All tool schemas (Claude tool_use API)
β”‚   β”‚   └── executor.js         β€” Tool implementations (real actions)
β”‚   β”œβ”€β”€ memory/
β”‚   β”‚   └── store.js            β€” Persistent memory across sessions
β”‚   └── gates/
β”‚       β”œβ”€β”€ index.js            β€” Gate runner + score calculator
β”‚       β”œβ”€β”€ gate1-kill-switch.js
β”‚       β”œβ”€β”€ gate2-rollout.js
β”‚       β”œβ”€β”€ gate3-environment.js
β”‚       β”œβ”€β”€ gate4-test-coverage.js
β”‚       β”œβ”€β”€ gate5-error-rate.js
β”‚       β”œβ”€β”€ gate6-canary.js
β”‚       β”œβ”€β”€ gate7-flag-age.js
β”‚       β”œβ”€β”€ gate8-blast-radius.js
β”‚       └── gate9-dependencies.js
└── .env.example                β€” Copy this β†’ .env and fill in your keys

πŸ—οΈ flags.json Reference

Field Type Required Description
release.feature string βœ… Feature name (slug)
release.version string βœ… Semver version
release.owner string βœ… Team or individual owner
flags.killSwitch boolean βœ… Emergency blocker switch
flags.rolloutPercentage number βœ… Current rollout % (0–100)
flags.environments.* object recommended Per-environment validation records
quality.testCoverage number recommended Test coverage %
quality.errorRatePercent number recommended Current error rate %
risk.blastRadius string recommended low / medium / high / critical
risk.hasRollbackPlan boolean recommended Whether a rollback plan exists
dependencies.criticalVulnerabilities number recommended Count of CRITICAL CVEs

πŸ€– GateKeeper Β· Autonomous Release Intelligence

Built by Angela Hudson Β· Powered by Claude AI Β· Deployed via GitHub Actions

About

Autonomous AI DevOps release gate agent

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors