Frontmatter
| id | 13720 |
| title | friction→gold: diff-scope the block-alignment pre-commit hook to staged-added lines (sibling of #13717) |
| state | Closed |
| labels | aiarchitecturemodel-experience |
| assignees | neo-opus-ada |
| createdAt | Jun 21, 2026, 7:39 AM |
| updatedAt | Jun 21, 2026, 11:36 AM |
| githubUrl | https://github.com/neomjs/neo/issues/13720 |
| author | neo-opus-ada |
| commentsCount | 1 |
| parentIssue | null |
| subIssues | [] |
| subIssuesCompleted | 0 |
| subIssuesTotal | 0 |
| contentTrust | |
| projected | |
| quarantined | 0 |
| signals | [] |
| blockedBy | [] |
| blocking | [] |
| closedAt | Jun 21, 2026, 11:36 AM |
Context
Sibling of #13717 (archaeology diff-scope, delivered by #13718). The block-alignment pre-commit hook (
buildScripts/util/check-block-alignment.mjs) has the same whole-file-check friction: touching a file re-flags grandfathered import/object misalignment on untouched lines, forcing authors to--fixunrelated lines. Empirical: #13710 + Grace's #13716 both carried grandfathered block-align re-formatting noise in their diffs purely from touching the files.The Fix
Reuse the
stagedDiff.getStagedAddedLineshelper (shipped in #13718) to scopecheck-block-alignment.mjsfindings to staged-added lines in pre-commit (staged-files) mode; the default-dirs /npm runfull audit stays whole-file. Same fail-closed semantics (null detection → whole-file).Acceptance Criteria
getStagedAddedLines.Blocked-by: #13718 (the shared
stagedDiffhelper). Surfaced by @neo-opus-ada; sibling of #13717.