docs: add LOCAL_DEV and CONTRIBUTING guides, explain Delta7d

Two new short docs unblock new contributors who currently have to read
the Go source to figure out the GITHUB_TOKEN requirement and the
agents.yml schema:

- docs/LOCAL_DEV.md walks through the PAT setup, the local run command,
  what files the run modifies, and how to revert before opening a PR.
- docs/CONTRIBUTING.md documents the agents.yml fields, enumerates the
  six valid category values, and explains the rename and deprecation
  policy now that history is keyed canonically.

Also add a one-sentence caption under the table in readme.tmpl so the
Delta7d column has a definition in the rendered README.
This commit is contained in:
2026-05-14 15:46:24 +07:00
parent f0e10d6d26
commit 4ccee1420a
3 changed files with 102 additions and 0 deletions
+50
View File
@@ -0,0 +1,50 @@
# Contributing
## Adding an Agent
Edit [`data/agents.yml`](../data/agents.yml) and add an entry:
```yaml
agents:
- owner: github-username-or-org
repo: repository-name
category: cli
```
Required fields: `owner`, `repo`, `category`
Optional fields: `notes` (for clarifications or caveats)
## Field Reference
| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `owner` | string | Yes | GitHub user or organization that owns the repo |
| `repo` | string | Yes | Repository name on GitHub |
| `category` | string | Yes | One of the values listed below |
| `notes` | string | No | Additional context or disclaimers |
## Valid Categories
- **cli** — Command-line tools and CLI wrappers
- **ide** — Standalone editors and IDEs
- **extension** — Editor extensions (VS Code, Neovim, etc.)
- **library** — Libraries and SDKs
- **research** — Research papers and proof-of-concept projects
- **web** — Web-based tools and online IDEs
## Handling Duplicates and Changes
**Duplicate repos:** If a repo appears twice (same owner/repo), the second entry is ignored in the next daily run.
**Renamed repos:** If a GitHub repo is renamed after being tracked, update the `repo` field in `data/agents.yml`. The updater will fetch fresh metadata under the new name. Historical data in `data/history.jsonl` remains under the old key and is not migrated.
**Deprecation:** To remove an agent, delete its entry from `data/agents.yml`. The next run will drop it from the README; historical data is preserved.
## PR Review
- Keep PRs to changes in `data/agents.yml` only (do not edit `README.md` or `data/history.jsonl`)
- The daily GitHub Actions workflow (runs at 00:00 UTC) picks up merged PRs automatically
- No manual review required; the updater regenerates the README after your PR merges
For local testing before opening a PR, see [LOCAL_DEV.md](./LOCAL_DEV.md).
+50
View File
@@ -0,0 +1,50 @@
# Local Development
## Prerequisites
- Go 1.23 or later
- A GitHub personal access token (PAT)
## Getting a GitHub Token
1. Go to [https://github.com/settings/tokens](https://github.com/settings/tokens)
2. Click "Generate new token" → "Generate new token (classic)"
3. Give it a name (e.g., "awesome-coding-agents")
4. Select scope: **`public_repo`** (needed to read public repo metadata)
5. Click "Generate token" and copy the value
The updater reads public repos only; `public_repo` scope is sufficient and safe.
## Running Locally
```bash
export GITHUB_TOKEN=ghp_your_token_here
go run .
```
The tool will:
- Read `data/agents.yml`
- Fetch live metadata from GitHub GraphQL API
- Append star counts to `data/history.jsonl`
- Regenerate `README.md` from `templates/readme.tmpl`
## Reverting Local Changes
Before opening a PR, undo local modifications:
```bash
git restore data/history.jsonl README.md
```
This removes the snapshot files generated by your local run, leaving only your edits to `data/agents.yml`.
## Rate Limits
- **With GITHUB_TOKEN:** 5,000 requests/hour
- **Without token:** 60 requests/hour
Always set `GITHUB_TOKEN` when testing locally to avoid hitting the unauthenticated limit.
## Next Steps
To add agents, see [CONTRIBUTING.md](./CONTRIBUTING.md).
+2
View File
@@ -21,6 +21,8 @@
4. Star counts are appended to `data/history.jsonl` for 7-day delta computation.
5. This `README.md` is regenerated from `templates/readme.tmpl` and committed back to the repo.
**Δ7d:** Change in stars over the past 7 days; `—` means fewer than 7 days of history.
## Contributing
Add an agent to [`data/agents.yml`](data/agents.yml):