Skip to content

feat(sync): union-merge .gitignore from upstream with fenced managed block #117

Description

@MarkMichaelis

Summary

Refined plan to make upstream IntelliSDLC.ai .gitignore the canonical source of consumer ignore patterns via union-merge with a fenced managed block in the consumer's .gitignore. Also pins down line-ending detection, the no-local-file case, and a consumer-override rule.

See the full plan attached below. This issue is the prerequisite for the follow-up self-refresh abort-path restore work (filed separately, depends on this one).

Scope

  • New Merge-GitignoreFromUpstream helper with fenced-block semantics (# --- begin/end sdlc.ai-managed entries ---).
  • New merge_paths array in sync-manifest.json; add .gitignore.
  • Upstream .gitignore curation (Option B): move dogfood-internal entries (Samples/HAR-Original/, .dogfood-output/, testResults.xml) into .gitignore.dogfood, not propagated.
  • Consumer override rule: entries outside the fence win; in-fence duplicates dropped on next write.
  • Re-appearance policy: deleted in-fence entries are re-appended next run; override via negation pattern outside the fence or upstream PR.
  • CRLF/LF detection; LF default when creating.
  • Pester tests (a)-(j) covering create/insert/idempotent/preserve-outside/override/CRLF/LF/cleanup branches.
  • README docs update on consumer-owned files section.

Full plan

See attached plan-gitignore-merge.md (uploaded as a comment after issue creation).

Implementation order

This is Step 1 -- implement and merge before the dependent self-refresh restore issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions