Skip to content

Latest commit

 

History

History
72 lines (46 loc) · 2.87 KB

File metadata and controls

72 lines (46 loc) · 2.87 KB

AGENTS.md: fork-sync

Instructions for AI coding agents (Grok, Cursor, Claude Code, Codex, Copilot and others) working in this repo or using it as a building block. Humans: see README.md.

What this is

Keeps the curated Blockchains forks in line with their upstreams: forks.json lists each fork, upstream, branch and mode (merge via the merge-upstream API, or tracking for forks whose GitHub parent differs from the real upstream); nightly workflow + box-side script.

Setup

gh auth status

Build and test

python3 scripts/sync.py --dry-run

Tests hit live public networks/APIs (the org rule is no mocks). A failure can be an upstream outage: re-run before changing code.

Environment

Variable Required Purpose
FORK_SYNC_TOKEN no repo secret; PAT with repo + workflow on Blockchains

Structure

Path What
forks.json fork list
scripts/sync.py sync logic (merge-upstream / tracking force-move)
.github/workflows/sync.yml nightly workflow

Conventions

  • mode: tracking only for forks whose GitHub parent is not the real upstream (e.g. go-ethereum, chainlink, buidler→hardhat).
  • No licence file yet: default copyright applies.

Extension points

  • Add a fork: append an entry with slug/fork/upstream/branches/mode/category/license.

Do

  • Run with --dry-run first.

Don't

  • List archived repos.
  • Invent data, mock network responses in shipped code, or hard-code values that should come from the live source; every repo here is 'no mocks, real data'.
  • Commit secrets, keys or .env files. Run gitleaks before pushing; CI and the org policy reject leaks.

Using it from another project

  • forks.json (file): slug, fork, upstream, upstream_branch, branch, mode, tracking_branch, category, license, wave
  • scripts/sync.py (cli): python3 scripts/sync.py [--dry-run] [--only a,b] [--pace SECONDS]
  • Nightly fork sync (github-action): 02:17 UTC + workflow_dispatch (input: only)

See the README section Use as a building block for a copy-paste example.

Related blocks