Skip to content

Commit 9f4c008

Browse files
jdiegosierraclaude
andcommitted
docs: improve documentation and add AI slop terminology for SEO
- Complete AGENTS.md with comprehensive development guide - Add "AI slop" and "slop code" terminology to README for better SEO - Update action.yml description to include slop code reference - Add development workflow, testing guide, and troubleshooting sections Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
1 parent 4fcaa76 commit 9f4c008

3 files changed

Lines changed: 61 additions & 11 deletions

File tree

AGENTS.md

Lines changed: 55 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
1-
# AGENTS.md
2-
3-
TODO
1+
# Development Guide
42

53
## Project Overview
64

7-
GitHub Action that evaluates PR contributor quality using objective GitHub metrics to combat AI-generated spam. Analyzes
8-
user's contribution history and calculates a score (0-1000) based on PR merge rate, contributions to quality repos,
9-
community engagement, and more.
5+
**Contributor Report** is a GitHub Action that evaluates PR contributor quality using objective GitHub metrics to combat
6+
AI-generated spam PRs (also known as "AI slop" or "slop code"). It analyzes a contributor's GitHub activity history and
7+
calculates scores based on PR merge rate, contributions to quality repositories, community engagement, and behavioral
8+
patterns.
9+
10+
The goal is to help open source maintainers identify low-quality, spam, or AI-generated contributions that waste
11+
maintainer time and resources, while being fair to legitimate contributors, especially newcomers.
1012

1113
## Common Commands
1214

@@ -92,3 +94,50 @@ const { myFunction } = await import('../src/module.js')
9294
- Use `.js` extensions in imports (ESM requirement)
9395
- Document functions with JSDoc comments
9496
- Weights must sum to 1.0 for proper normalization
97+
- Always run tests before committing: `pnpm test`
98+
- Keep test coverage above 80%
99+
100+
## Development Workflow
101+
102+
1. Create a feature branch: `git checkout -b feature/your-feature`
103+
2. Make your changes in `src/`
104+
3. Add/update tests in `__tests__/`
105+
4. Run the full test suite: `pnpm run all`
106+
5. Bundle for distribution: `pnpm bundle`
107+
6. Commit changes (including `dist/` updates)
108+
7. Open a PR against `main`
109+
110+
## Testing Locally
111+
112+
To test the action locally with real GitHub data:
113+
114+
1. Copy `.env.example` to `.env`
115+
2. Add your GitHub token and test repository details
116+
3. Run: `pnpm local-action`
117+
118+
## Adding New Metrics
119+
120+
1. Create new file in `src/metrics/your-metric.ts`
121+
2. Export a function that returns a `MetricResult`
122+
3. Add it to `src/metrics/index.ts`
123+
4. Add corresponding tests in `__tests__/metrics/`
124+
5. Update the scoring engine in `src/scoring/engine.ts`
125+
6. Document the metric in README.md
126+
127+
## Troubleshooting
128+
129+
**Tests failing with ESM errors?**
130+
131+
- Ensure imports use `.js` extensions
132+
- Use `jest.unstable_mockModule()` for mocking
133+
- Import modules after mocking is set up
134+
135+
**dist/ out of sync?**
136+
137+
- Run `pnpm bundle` after any `src/` changes
138+
- The CI will fail if `dist/` is not up to date
139+
140+
**Rate limits?**
141+
142+
- Use a personal access token with higher limits
143+
- The action includes automatic rate limit handling

README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,14 @@
55
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
66

77
A GitHub Action that evaluates contributor quality using objective GitHub metrics to help combat AI-generated spam PRs
8-
in open source projects.
8+
(AI slop) in open source projects.
99

1010
## The Problem
1111

12-
Open source maintainers are increasingly facing a flood of low-quality, AI-generated pull requests. These spam PRs waste
13-
maintainer time and resources. This action helps by analyzing the PR author's contribution history using objective
14-
metrics.
12+
Open source maintainers are increasingly facing a flood of low-quality, AI-generated pull requests (commonly known as
13+
"AI slop" or "slop code"). These spam PRs waste maintainer time and resources, cluttering repositories with
14+
minimal-value contributions. This action helps by analyzing the PR author's contribution history using objective metrics
15+
to identify potential spam or low-effort AI-generated contributions.
1516

1617
## How It Works
1718

action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: 'Contributor Report'
2-
description: 'Evaluate PR contributor quality using objective GitHub metrics to combat AI-generated spam'
2+
description: 'Evaluate PR contributor quality using objective GitHub metrics to combat AI-generated spam and slop code'
33
author: 'jdiegosierra'
44

55
branding:

0 commit comments

Comments
 (0)