Skip to content

fix(pull-sdlc): bootstrap on Windows emits ~60 LF->CRLF warnings (regression from #168 ahead of #161) #173

Description

@MarkMichaelis

Symptom

Running ./Pull-SDLC.ai.ps1 on a fresh Windows consumer (core.autocrlf=true)
emits ~60 warning: in the working copy of '...', LF will be replaced by CRLF the next time Git touches it
warnings during the bootstrap commit, and the consumer is left with no line-ending normalization.

Sample (truncated) from a real run on commit f7d1f13:

Files to update: 87 (syncing (empty tree) -> f7d1f13)
  A: 87
...
Applied 87 ops.
Merged upstream entries into .gitignore
warning: in the working copy of '.github/agents/plan.agent.md', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of '.github/instructions/copilot-coding-agent.instructions.md', LF will be replaced by CRLF the next time Git touches it
...
warning: in the working copy of '.sdlc-ai-sync.json', LF will be replaced by CRLF the next time Git touches it
Created sync commit: d1dc143

Root cause

PR #168 (refactor(Pull-SDLC): remove .gitattributes scaffolding, merged
2026-05-30) removed the .gitattributes.template -> .gitattributes
scaffold from Pull-SDLC.ai.ps1 on the premise that the replacement,
Initialize-GitDefaults.ps1 (PR #161), would own that file going forward.

But PR #161 is still open and unmerged. Net effect on main today:

So a fresh consumer bootstraps with zero normalization tooling and is
greeted by a wall of LF/CRLF warnings the first time the sync commit lands.

Impact

Fix options

  1. Land PR feat: Initialize-GitDefaults.ps1 -- compose .gitattributes/.gitignore from upstream templates #161 (preferred) -- that PR is the intended owner of
    .gitattributes and adds the Write-GitDefaultsHint next-steps line
    that closes the gap.
  2. Temporary scaffold restore -- if feat: Initialize-GitDefaults.ps1 -- compose .gitattributes/.gitignore from upstream templates #161 needs more review time, restore
    a minimal .gitattributes.template (just * text=auto eol=lf and a
    *.ps1 text eol=lf line) and put it back in \ /
    \. Revert when feat: Initialize-GitDefaults.ps1 -- compose .gitattributes/.gitignore from upstream templates #161 lands.

Related improvements spotted during triage

These are smaller polish items observed while investigating; happy to split
into separate issues if preferred.

  • Next-steps banner is missing the pre-commit hook activation step.
    CLAUDE.md mandates git config core.hooksPath .githooks "Before ANY
    commit", but Write-NextStepsBanner never mentions it. New consumers
    trip the very rule the hook is meant to enforce.
  • Suggested bootstrap commit message has no Conventional-Commits scope.
    Current text is chore: scaffold IntelliSDLC.ai consumer files;
    project convention is type(scope): description. Suggest
    chore(sdlc-ai): bootstrap consumer files.
  • "Existing upstream-managed files were detected" wording is misleading
    when the op list is 100% A: (adds). Showing which file(s) triggered
    the detection (typically a stray Pull-SDLC.ai.ps1 from a manual
    download) would let the user confirm nothing valuable will be clobbered.
  • Yellow bootstrap-prompt banner reads like an error. "No
    .sdlc-ai-sync.json and no prior sync commit found." has caused at
    least one reader to ask "wasn't this file removed?". Recommend rephrasing
    to [Bootstrap] No prior sync anchor found.

Repro

  1. On Windows with git config --global core.autocrlf true (default),
    create an empty directory and git init it.
  2. Drop Pull-SDLC.ai.ps1 from upstream main and run it.
  3. Observe the LF->CRLF warning wall during git commit.

Co-authored-by: Copilot 223556219+Copilot@users.noreply.github.com

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions