Skip to content

Propagate template contract to derived repos: lint config, review-loop carry, brownfield migration - #124

Merged
ptr727 merged 3 commits into
developfrom
template-propagation-defects
Jun 8, 2026
Merged

Propagate template contract to derived repos: lint config, review-loop carry, brownfield migration#124
ptr727 merged 3 commits into
developfrom
template-propagation-defects

Conversation

@ptr727

@ptr727 ptr727 commented Jun 8, 2026

Copy link
Copy Markdown
Owner

Folds three downstream-filed defects back into the template so future derived projects don't re-hit them. All three were surfaced while porting the template into KiCadLibrary (#116, #117) and Utilities (#111).

#116 - shared markdownlint config

  • Add .markdownlint-cli2.jsonc at the repo root. Both the davidanson markdownlint IDE extension and CLI/CI markdownlint-cli2 read it, so the IDE and command line stay in lock-step (previously a CLI run flagged MD013/MD033 errors the IDE showed clean).
  • Add jsonc to the .editorconfig [*.{json,jsonc}] glob so the new config is CRLF-governed.
  • Point CODESTYLE.md at the config as authoritative (kept local-only, no CI gate).

#117 - make the verbatim-copy contract explicit (template docs only, no downstream files touched)

  • Mark the AGENTS.md "PR Review Etiquette" section and the .github/copilot-instructions.md "GitHub Copilot Review Runbook" as mandatory verbatim carries for derived repos.
  • Add a canonical "Files and Sections Derived Repos Must Carry Verbatim" list and a "Staying in Sync and Reporting Drift Upstream" section to AGENTS.md; wire the README TODO list and the copilot-instructions "When in Doubt" to them.
  • Mandate carrying .editorconfig and .gitattributes to stop files drifting between LF and CRLF (a real failure seen across ports).
  • Add the upstream-defect-reporting contract: derived repos that spot a template gap file an issue in ptr727/ProjectTemplate rather than only patching locally.

#111 - brownfield required_signatures migration

  • Document the procedure (re-sign legacy history, temporarily disable ruleset enforcement to force-push since the admin bypass does not cover git push --force, re-enable).
  • Tighten Step 0 to delete all legacy protection and name the JSON export/import as the only ruleset-config method.
  • Cross-link from the AGENTS.md branching model.

Verified: markdownlint-cli2 "**/*.md" reports 0 errors across all 10 files; all touched files retain CRLF endings.

Fixes #116
Fixes #117
Fixes #111

…p carry, brownfield migration

Ship a shared .markdownlint-cli2.jsonc so the IDE extension and CLI/CI
markdownlint-cli2 stay in lock-step, and add jsonc to the .editorconfig JSON
glob so the new config is CRLF-governed. (Fixes #116)

Make the verbatim-copy contract explicit: mark the AGENTS.md PR Review
Etiquette section and the .github/copilot-instructions.md runbook as mandatory
verbatim carries for derived repos, add a canonical 'Files and Sections Derived
Repos Must Carry Verbatim' list plus a 'Staying in Sync and Reporting Drift
Upstream' section, and wire the README TODO list to it. Also mandate carrying
.editorconfig + .gitattributes to stop LF/CRLF drift. (Fixes #117)

Document the brownfield required_signatures migration (re-sign, disable
enforcement to force-push since the admin bypass does not cover git push
--force, re-enable), tighten Step 0 to delete ALL legacy protection, and name
the JSON export/import as the only ruleset-config method. (Fixes #111)
Copilot AI review requested due to automatic review settings June 8, 2026 15:06
…a Docker)

Workflow YAML and Markdown are linted locally, not in CI, so an agent must know
how to run the tools - and their non-Docker install paths (curl-pipe, global
npm) are often sandbox-blocked or fail on WSL. Add a 'Running the Linters
Locally' subsection to AGENTS.md with the known-working Docker invocations for
actionlint (bundles shellcheck) and markdownlint-cli2, plus the empty-DOCKER_CONFIG
workaround for the Docker-Desktop/WSL credential-helper error.

Quote $GITHUB_OUTPUT in build-datebadge-task.yml so the documented actionlint
command exits clean (SC2086).

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR propagates template-level cross-cutting contracts (markdown lint configuration, Copilot review-loop runbook discoverability, and brownfield required_signatures migration guidance) back into the template so derived repositories stay consistent and avoid re-solving the same setup defects.

Changes:

  • Add a shared .markdownlint-cli2.jsonc at the repo root and document it as the authoritative markdownlint configuration.
  • Make the “verbatim carry” contract explicit for derived repos (review-loop contract + runbook, lint config, and line-ending governance files), including guidance for resyncing and reporting upstream drift.
  • Document a brownfield migration procedure for adopting Require signed commits when legacy history is unsigned.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
README.md Extends derived-repo checklist and adds brownfield signed-commit migration guidance under rulesets setup.
CODESTYLE.md Declares .markdownlint-cli2.jsonc as the single source of truth for markdownlint behavior (IDE + CLI).
AGENTS.md Adds explicit “carry verbatim” requirements, resync/upstream-drift guidance, and links to brownfield migration docs.
.markdownlint-cli2.jsonc Introduces shared markdownlint-cli2/jsonc configuration to align IDE and CLI linting.
.github/copilot-instructions.md Marks the Copilot review runbook as a verbatim-carry artifact and adds upstream-issue guidance for derived repos.
.editorconfig Expands JSON EOL rules to include *.jsonc to keep the new config CRLF-governed.

Comment thread README.md Outdated
Comment thread README.md Outdated
…ner-only force-push

Prefer 'git rebase --rebase-merges --exec ...-S' to re-sign (filter-branch is
deprecated, kept as a documented fallback), and mark the force-push as a
one-time maintainer-only manual step that agents must never run - reconciling
the procedure with AGENTS.md's 'Never force push' rule.
Copilot AI review requested due to automatic review settings June 8, 2026 15:19

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated no new comments.

@ptr727
ptr727 merged commit a1741d0 into develop Jun 8, 2026
8 checks passed
ptr727 added a commit that referenced this pull request Jun 8, 2026
Promotes `develop` to `main`.

- **#124** - Propagate template contract to derived repos: shared
`.markdownlint-cli2.jsonc` (#116), explicit verbatim-copy contract +
line-ending mandate + upstream-defect-reporting contract (#117),
brownfield `required_signatures` migration (#111), and known-working
actionlint/markdownlint Docker linter guidance. Review-loop feedback
applied (modern re-sign, maintainer-only force-push).
- **#123 / #120 / #119** - Update codegen files.
@ptr727
ptr727 deleted the template-propagation-defects branch July 7, 2026 21:05
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.

2 participants