type: rule
status: active
timestamp: 2026-06-24
tags: [rule, forks, git, rebase, submodule, minimum-diff]

Fork discipline — minimum diff, rebase-friendly, upstream-aligned

Minimum-diff forks, rebase-friendly, upstream-aligned

Fork discipline

Rule

Forked repos in the family follow strict discipline so upstream updates rebase cleanly. NEVER apply this rule to non-fork repos.

Owner — which org / account holds the fork

All forks live on oriz-org by default. Reason: GitHub org-level secrets only propagate within the org. A fork on a personal account can’t inherit oriz-org’s 61 shared secrets, which means any CI in the fork must duplicate-manage credentials. Solo dev = same person, so the “brand vs personal” distinction was about recruiter signal — pinned-repo placement covers that without splitting the secrets pool.

The on-disk submodule path is repos/oriz/frk/<bucket>/<category>/<upstream-name>/. Personal experiments that never see CI can live on chirag127 if they aren’t planned as oriz-family work (the c127/ disk tree is reserved for that case; today it’s empty). Drive-by forks (one-line PR forks, personal experiments, archived exploration) → chirag127/<upstream-name>.

Layout

Exception: shipping the fork as a distinct product

If the fork is published as its own product (Chrome Web Store listing, App Store entry, separate npm package), or if we patch it materially enough to want a distinct identity, the GitHub slug + disk folder SHOULD be renamed to a convention-compliant slug (e.g. dearrow-plus-bs-ext, not DeArrow). Reasons:

When you rename, keep the on-disk folder, GitHub slug, and CWS/store name aligned to one another. The internal package.json name can match the new slug. Document the rename in the per-fork knowledge/divergence.md.

Minimum-diff principle

ALL changes must be minimum-diff with upstream:

Minimize future merge conflicts

When you DO need to edit upstream files (because an additive overlay isn’t practical — e.g. you’re adding a UI toggle that has to live in upstream’s settings UI files), write the patch to survive future upstream evolution:

Per-fork knowledge folder

Every fork has repos/oriz/frk/<name>/knowledge/:

Upstream remote pattern

Every fork’s .git/config has TWO remotes:

[remote "origin"]
    url = https://github.com/<our-org>/<upstream-name>.git
[remote "upstream"]
    url = https://github.com/<upstream-owner>/<upstream-name>.git

Weekly cron fetches upstream/main + upstream/<latest-tag> and opens a rebase PR if anything new lands.

Fork detection + audit

GH API GET /repos/<owner>/<name> returns fork: true + parent.full_name. A monthly audit job sweeps every repo in the family, flags mis-categorized forks (e.g. a repo marked fork: true but not under repos/oriz/frk/), and opens an issue.

Cross-refs


Edit on GitHub · Back to index