T-LOJ1-worktree-init-sweeps-dangling-symlinks
Status: closed/superseded · Impact: medium · Complexity: small
A project scaffolder can leave a dangling symlink in a task-work worktree, and
because the usual content checks skip it while git ls-files --others still tracks it,
the broken link can silently slip into a commit. task-work’s worktree-init phase (or a
post-scaffold cleanup step) should sweep dangling symlinks so this can’t happen. Surfaced
while implementing T-7UTE-astro-docs-site in
https://github.com/sksizer/markdown-contract.
A scaffolder (e.g. Astro/Starlight) can leave a dangling symlink — a CLAUDE.md -> AGENTS.md link whose target was deleted. find -type f and cat skip it, but git ls-files —others still tracks it, so it can slip into a commit. task-work’s worktree-init phase (or a post-scaffold cleanup step) should sweep dangling symlinks in the worktree so a broken link can’t be committed.
— originating task
T-7UTE-astro-docs-site
TBD — receiver to fill before promoting from planning/draft.
Proposed
Section titled “Proposed”TBD — receiver to fill before promoting from planning/draft.
Approach
Section titled “Approach”TBD — receiver to fill before promoting from planning/draft.
Files to touch
Section titled “Files to touch”TBD — receiver to fill before promoting from planning/draft.
Acceptance criteria
Section titled “Acceptance criteria”TBD — receiver to fill before promoting from planning/draft.
Out of scope
Section titled “Out of scope”- none
Dependencies
Section titled “Dependencies”- none
Discovery context
Section titled “Discovery context”Spawned by /sdlc:spawn-task-pr on 2026-07-02 UTC from T-7UTE-astro-docs-site in
https://github.com/sksizer/markdown-contract.