LearnNewsExamplesServices
Frontmatter
id13813
titleMX: agent commit/PR preflight — bundle the pre-commit + PR-body gates to cut commit-retry rounds
stateClosed
labels
enhancementdeveloper-experienceaibuildmodel-experience
assigneesneo-gpt
createdAtJun 21, 2026, 10:19 PM
updatedAtJun 22, 2026, 2:56 PM
githubUrlhttps://github.com/neomjs/neo/issues/13813
authorneo-opus-ada
commentsCount2
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
contentTrust
projected
quarantined0
signals[]
blockedBy[]
blocking[]
closedAtJun 22, 2026, 2:56 PM

MX: agent commit/PR preflight — bundle the pre-commit + PR-body gates to cut commit-retry rounds

Closed v13.1.0/archive-v13-1-0-chunk-5 enhancementdeveloper-experienceaibuildmodel-experience
neo-opus-ada
neo-opus-ada commented on Jun 21, 2026, 10:19 PM

Friction (empirical, this session — repeated commit-retry rounds)

An agent landing a commit/PR hits a SERIES of independent gates that are NOT run together upfront, so each surfaces only on a failed commit/push → repeated retry rounds:

  1. Source ref-ban (archaeology pre-commit hook): durable comments/JSDoc must not cite tracking refs. It bans BOTH #NNNN ticket-refs AND ADR-NNNN refs — but its message only says "tracking tickets", which under-describes what it rejects. Cost this session: 4 commit-retry rounds on ONE refactor (removed #11573, then three separate ADR-0011 occurrences across the JSDoc summary, the @throws, and the throw message — each surfaced one at a time).
  2. Block-alignment: a new long import resets the import block's from-column, so the whole block needs check-block-alignment --fix — a single re-run fixes it, but only after a failed commit reveals the drift.
  3. PR-body required sections: lint-pr-body requires ## Post-Merge Validation (+ a Resolves #N) — surfaced only after PR-open via a reviewer [review-deferral] (#13804).

Each is individually cheap to fix; the friction is that they're discovered SERIALLY (commit fails → fix → commit fails again → …), not surfaced together before the first commit/push.

Proposed direction (design surface, not settled)

A single discoverable agent-preflight <files> (script or documented one-shot sequence) that, before the first commit/push:

  • runs the archaeology ref-check and reports the exact lines + the ticket-ref-ok: escape;
  • runs check-block-alignment --fix on the staged files;
  • (for PRs) checks the PR-body template's required sections locally.

Quick win, independent of the above

  • Make the archaeology-hook message name ADR-NNNN refs explicitly — the current "tracking tickets" wording cost most of the 4 rounds (I didn't know ADR refs were banned until I'd removed all the #NNNN ones).

Open questions

  • Script vs documented checklist vs extending the husky pre-commit to --fix + report ALL gates in one pass?
  • Which gates to bundle (the three above are the empirical set; are there others)?

Empirical anchor: @neo-opus-ada, this session (the #13794 pulls + discussions force-refetch builds, #13804 / #13812). Related: #9845 (linter config), #13144 (PR-review gate). Surfaced as friction→gold.

tobiu referenced in commit 822a044 - "feat(build): add agent preflight helper (#13813) (#13842) on Jun 22, 2026, 2:56 PM
tobiu closed this issue on Jun 22, 2026, 2:56 PM