Skip to content

Add shared CONTRIBUTING.md surfaced across all PolicyEngine repos#3

Merged
MaxGhenis merged 1 commit intomainfrom
add-shared-contributing
Apr 17, 2026
Merged

Add shared CONTRIBUTING.md surfaced across all PolicyEngine repos#3
MaxGhenis merged 1 commit intomainfrom
add-shared-contributing

Conversation

@MaxGhenis
Copy link
Copy Markdown
Contributor

Summary

Adds a shared CONTRIBUTING.md to PolicyEngine/.github that GitHub automatically surfaces on any repo without its own. Per-repo CONTRIBUTING.md (which all active repos still have) takes precedence, so this file is the fallback and the authoritative source for the cross-repo conventions that were previously duplicated (and drifting) in each repo:

  • towncrier changelog.d/<branch>.<type>.md fragments + fragment-type table
  • uv run requirement for Python commands
  • branch-naming conventions, default-branch resolution
  • anti-patterns (no changelog_entry.yaml, no _v2 suffixes, no fork PRs when secrets are required, no hardcoded test-passing values)
  • peer-review rules, PR-description structure, test-plan expectations

Per-repo CONTRIBUTING.md will be rewritten in companion PRs to focus on install commands, country-specific conventions, and repo-level anti-patterns, with a pointer back to this shared file.

Motivation

Currently the same changelog / formatting / PR-etiquette guidance is repeated (inconsistently) across policyengine-core, policyengine-uk, policyengine-us, policyengine-uk-data, policyengine-us-data, policyengine.py, and several app repos. When the changelog format migrated from changelog_entry.yaml to towncrier, most per-repo CONTRIBUTING files kept pointing at the old format, breaking both human contributors and AI coding agents. A single shared guide removes that drift for the cross-repo bits while leaving country-specific guidance where it belongs.

Written for agents too

AI coding agents (Claude, Copilot, Codex, etc.) contribute a substantial share of PolicyEngine PRs. This file is deliberately structured with copy-pasteable commands and an explicit "don't do this" list so agents can read it cold and produce PRs that pass CI on the first try.

Test plan

  • File renders in GitHub's markdown preview
  • Confirm it surfaces automatically on a repo without its own CONTRIBUTING.md (e.g. a small calculator repo)

GitHub automatically surfaces `CONTRIBUTING.md` from the org's
`.github` repo to any repo that doesn't have its own. Per-repo
`CONTRIBUTING.md` (which all active repos still have) takes
precedence, so this file is the fallback + source of truth for the
common bits that were previously duplicated in each repo:

- towncrier `changelog.d/<branch>.<type>.md` fragments + fragment-type
  table
- `uv run` requirement for Python commands
- branch-naming conventions, default-branch resolution
- anti-patterns (no `changelog_entry.yaml`, no `_v2` suffixes, no fork
  PRs when secrets are required, no hardcoded test-passing values)
- peer-review rules, PR-description structure, test-plan expectations

Individual repos can reference this file and focus their per-repo
CONTRIBUTING.md on install commands, country-specific conventions, and
repo-level anti-patterns.

Written with AI coding agents in mind as well as human contributors:
copy-pasteable commands, explicit "don't do this" list, and a single
unambiguous changelog-fragment procedure.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
MaxGhenis added a commit to PolicyEngine/policyengine-us-data that referenced this pull request Apr 17, 2026
….md at shared guide

This repo was partway through the yaml-changelog → towncrier migration
already: `pr.yaml` ran `towncrier check`, `.github/bump_version.py`
inferred version bumps from `changelog.d/` fragment types, and
`pyproject.toml` carried `[tool.towncrier]` config. The stale bits
that remained:

- Unused dep `yaml-changelog>=0.1.7` in `pyproject.toml`
- Unused `.github/workflows/reusable_changelog_check.yaml` (not
  wired into any call-graph)
- Zero-byte `changelog_entry.yaml` at the repo root
- 601-line `changelog.yaml` whose entire contents are already
  compiled into `CHANGELOG.md`
- A CONTRIBUTING.md that described the old yaml-changelog flow and
  told contributors to edit `changelog_entry.yaml`

This PR drops all of the above and rewrites CONTRIBUTING.md to point
at the new shared PolicyEngine guide
(https://github.com/PolicyEngine/.github/blob/main/CONTRIBUTING.md,
proposed in PolicyEngine/.github#3) plus a repo-specific section on
commands, test placement, dataset-versioning rules, and anti-patterns.

After this lands the repo matches the rest of the org (uk-data, core,
uk, us, microdf, policyengine.py) on a single towncrier flow.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@MaxGhenis MaxGhenis merged commit de75f7b into main Apr 17, 2026
@MaxGhenis MaxGhenis deleted the add-shared-contributing branch April 17, 2026 23:04
MaxGhenis added a commit to PolicyEngine/policyengine-us-data that referenced this pull request Apr 17, 2026
….md at shared guide

This repo was partway through the yaml-changelog → towncrier migration
already: `pr.yaml` ran `towncrier check`, `.github/bump_version.py`
inferred version bumps from `changelog.d/` fragment types, and
`pyproject.toml` carried `[tool.towncrier]` config. The stale bits
that remained:

- Unused dep `yaml-changelog>=0.1.7` in `pyproject.toml`
- Unused `.github/workflows/reusable_changelog_check.yaml` (not
  wired into any call-graph)
- Zero-byte `changelog_entry.yaml` at the repo root
- 601-line `changelog.yaml` whose entire contents are already
  compiled into `CHANGELOG.md`
- A CONTRIBUTING.md that described the old yaml-changelog flow and
  told contributors to edit `changelog_entry.yaml`

This PR drops all of the above and rewrites CONTRIBUTING.md to point
at the new shared PolicyEngine guide
(https://github.com/PolicyEngine/.github/blob/main/CONTRIBUTING.md,
proposed in PolicyEngine/.github#3) plus a repo-specific section on
commands, test placement, dataset-versioning rules, and anti-patterns.

After this lands the repo matches the rest of the org (uk-data, core,
uk, us, microdf, policyengine.py) on a single towncrier flow.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
MaxGhenis added a commit to PolicyEngine/policyengine-us-data that referenced this pull request Apr 17, 2026
* Finish migration from yaml-changelog to towncrier; point CONTRIBUTING.md at shared guide

This repo was partway through the yaml-changelog → towncrier migration
already: `pr.yaml` ran `towncrier check`, `.github/bump_version.py`
inferred version bumps from `changelog.d/` fragment types, and
`pyproject.toml` carried `[tool.towncrier]` config. The stale bits
that remained:

- Unused dep `yaml-changelog>=0.1.7` in `pyproject.toml`
- Unused `.github/workflows/reusable_changelog_check.yaml` (not
  wired into any call-graph)
- Zero-byte `changelog_entry.yaml` at the repo root
- 601-line `changelog.yaml` whose entire contents are already
  compiled into `CHANGELOG.md`
- A CONTRIBUTING.md that described the old yaml-changelog flow and
  told contributors to edit `changelog_entry.yaml`

This PR drops all of the above and rewrites CONTRIBUTING.md to point
at the new shared PolicyEngine guide
(https://github.com/PolicyEngine/.github/blob/main/CONTRIBUTING.md,
proposed in PolicyEngine/.github#3) plus a repo-specific section on
commands, test placement, dataset-versioning rules, and anti-patterns.

After this lands the repo matches the rest of the org (uk-data, core,
uk, us, microdf, policyengine.py) on a single towncrier flow.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* Update uv.lock after removing yaml-changelog

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant