action-onlyrobots
CLAUDE.md18 starsChanged 16 months agoApache-2.0View on GitHub
This file provides guidance to Claude Code when working with this repository. This is a Cloudflare Worker that acts as a GitHub webhook receiver for pull requests. Its purpose is to enforce "agentic development only" by evaluating code changes and determining whether they appear to be written by AI agents rather than humans. MANDATORY after ANY code changes: - Run pnpm run typecheck to verify TypeScript compilation - Run pnpm run lint to check code style - Run pnpm run…
- Reads credentials
- Installs packages
The file
Show its rules and text
We split this CLAUDE.md into the rules it gives an agent
18 rules. About 0 are common, 11 are distinctive, and 7 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈11
Distinctive · estimate
This author's own choices. Worth a look.
7
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 34
Check run creation for reporting results
- Very specific: line 65
Run pnpm run typecheck to verify TypeScript compilation
- Very specific: line 66
Run pnpm run lint to check code style
- Very specific: line 67
Run pnpm run test to verify LLM integration works
- Distinctive: line 68
Ensure all lint-staged hooks pass on commit
- Very specific: line 73
Create .env file with OPENAI_API_KEY=sk-your-key-here
- Very specific: line 75
Use pnpm run test for full test suite or pnpm run test:watch for development
- Very specific: line 85
Use wrangler secret for sensitive values
- Distinctive: line 89
Use Biome for formatting and linting
- Distinctive: line 90
Follow TypeScript strict mode
- Very specific: line 91
Prefer const over let
- Distinctive: line 92
Use explicit return types for functions
- Distinctive: line 93
Keep functions focused and single-purpose
- Distinctive: line 104
High confidence required: Only flag as AI when confidence is >75% with strong indicators
- Distinctive: line 130
Consider OpenAI rate limits for high-traffic repositories
- Distinctive: line 143
Always verify webhook signatures in production
- Distinctive: line 144
Never log or expose secrets
- Distinctive: line 146
Use least-privilege access for GitHub API
≈ “Common” is an estimate: at least 1 in 5 of the 26,980 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
CLAUDE.md
This file provides guidance to Claude Code when working with this repository.
Repository Overview
This is a Cloudflare Worker that acts as a GitHub webhook receiver for pull requests. Its purpose is to enforce "agentic development only" by evaluating code changes and determining whether they appear to be written by AI agents rather than humans.
Repository Structure
no-humans-agent/
├── src/
│ ├── index.ts # Main webhook handler and Cloudflare Worker entry
│ ├── types.ts # TypeScript interfaces for GitHub webhooks
│ ├── github.ts # GitHub API integration and webhook verification
│ └── evaluator.ts # Code evaluation logic to detect human-written code
├── wrangler.toml # Cloudflare Worker configuration
├── tsconfig.json # TypeScript configuration
├── biome.json # Code formatting and linting configuration
└── package.json # Project dependencies and scriptsCore Components
Webhook Handler (src/index.ts)
- Cloudflare Worker fetch handler
- Processes GitHub pull_request events
- Orchestrates evaluation and reporting
GitHub Integration (src/github.ts)
- Webhook signature verification using HMAC-SHA256
- GitHub API client for fetching PR files
- Check run creation for reporting results
LLM Evaluator (src/llm-evaluator.ts)
- Uses OpenAI GPT-4o-mini for intelligent code analysis
- Detects AI tool attribution (Claude Code, Cursor, etc.)
- Analyzes code patterns, style, and quality indicators
- Provides detailed reasoning and confidence scores
Development Commands
# Install dependencies
pnpm install
# Run development server
pnpm run dev
# Deploy to Cloudflare
pnpm run deploy
# Type checking
pnpm run typecheck
# Code formatting and linting
pnpm run lint
pnpm run lint:fixCode Validation Requirements
MANDATORY after ANY code changes:
- Run
pnpm run typecheckto verify TypeScript compilation - Run
pnpm run lintto check code style - Run
pnpm run testto verify LLM integration works - Ensure all lint-staged hooks pass on commit
Testing Setup
Required for testing:
- Create
.envfile withOPENAI_API_KEY=sk-your-key-here - Tests make real OpenAI API calls to validate functionality
- Use
pnpm run testfor full test suite orpnpm run test:watchfor development
Configuration
Environment Variables
GITHUB_WEBHOOK_SECRET: Secret for verifying webhook signatures (optional but recommended)OPENAI_API_KEY: OpenAI API key for LLM-based code evaluation (required)
Wrangler Configuration
- Set in
wrangler.toml - Use
wrangler secretfor sensitive values
Code Style Guidelines
- Use Biome for formatting and linting
- Follow TypeScript strict mode
- Prefer
constoverlet - Use explicit return types for functions
- Keep functions focused and single-purpose
Evaluation Strategy
The LLM evaluator uses OpenAI's GPT-4o-mini to analyze code changes and determine if they appear human or AI-generated.
Core Principle: Err on the Side of Not Failing PRs
CRITICAL: The system is designed to DEFAULT TO HUMAN AUTHORSHIP. We prioritize avoiding false positives (incorrectly blocking human developers) over catching all AI-generated code. This means:
- Default assumption: Code is human-written unless proven otherwise
- High confidence required: Only flag as AI when confidence is >75% with strong indicators
- PR context matters: Human patterns (no description, terse titles, CI/CD changes) can override AI detection
- Better to miss AI code than falsely flag human developers
Detection Indicators
Priority Indicators:
- AI Tool Attribution: Direct mentions of "Claude Code", "Cursor", "GitHub Copilot", etc.
- Commit Messages: References to AI assistance
Analysis Criteria:
- Code style consistency and professionalism
- Comment quality (JSDoc vs casual)
- Debugging artifacts and temporary code
- TypeScript usage patterns
- Error handling and code structure
Deployment Notes
- Set required environment variables in Cloudflare:
OPENAI_API_KEY: Your OpenAI API keyGITHUB_WEBHOOK_SECRET: GitHub webhook secret (optional)
- GitHub webhook should be configured for:
- Event: Pull requests
- Actions: opened, synchronize, reopened
- Worker needs to respond within Cloudflare's timeout limits
- Consider OpenAI rate limits for high-traffic repositories
Future Enhancements
Consider adding:
- GitHub App authentication for check runs
- Configurable evaluation rules
- Webhook event filtering
- Result caching for large PRs
- Integration with GitHub Actions
Security Considerations
- Always verify webhook signatures in production
- Never log or expose secrets
- Validate all incoming data
- Use least-privilege access for GitHub API
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

