Skip to content

T-PKKV-setup-planning-drop-back-compat-helpers

Status: closed/done · Impact: low · Complexity: small

Auto-generated from a /sdlc:task-work post-mortem. Review and promote to open/ready before picking up.

The implementation of T-G834-move-plugin-runtime-state-to-sdlc-dir extended plugin/skills/setup/setup_planning.ts to manage a parallel _GITIGNORE_SDLC_BLOCK (the .sdlc/* ignore + un-ignore lines). The original Claude-Code-only helpers (_find_claude_block_span, _block_contains_hooks_lines, _patch_block_with_hooks) became thin back-compat wrappers around the new generic block-management code. If no external caller imports those names, they can be deleted in a future tidy. This task does the audit and the deletion.

LocationRole today
The original _find_claude_block_span, _block_contains_hooks_lines,<migrated from v2 — no role recorded>

Either:

  • Delete the wrappers if a grep -rn '_find_claude_block_span\|_block_contains_hooks_lines\|_patch_block_with_hooks' across plugin/ and the consuming repo turns up zero external callers (i.e. only the wrapper definitions themselves match).
  • Keep but document if any caller exists, with a deprecation comment naming the generic replacement.

The internal call sites inside setup_planning.py itself should switch to the generic functions regardless — back-compat wrappers exist for consumers, not the file’s own code.

  1. grep -rn '_find_claude_block_span\|_block_contains_hooks_lines\|_patch_block_with_hooks' across plugin/, site/, and the repo’s .claude/ to enumerate callers.
  2. If only the definitions in setup_planning.ts match: delete the three wrapper functions, fix any internal references inside setup_planning.ts to call the generic functions directly, and re-run plugin/skills/setup/tests/setup.test.ts to confirm nothing regresses.
  3. If external callers exist: add a one-line # DEPRECATED: use _find_block_span(content, CLAUDE_BLOCK_HEADER) comment above each wrapper and surface the survey result in this task’s acceptance notes for human review.
LocationKindChange
plugin/skills/setup/setup_planning.tsmodifydelete the three
plugin/skills/setup/tests/setup.test.tsmodifyshould continue to
  • AC-1: A grep for the three wrapper-helper names across plugin/ returns either (a) zero hits (full deletion completed) or (b) only the definitions plus an enumerated, justified set of external callers.
  • AC-2: plugin/skills/setup/tests/setup.test.ts passes (6/6 cases as of the originating PR).
  • Refactoring the generic block-management implementation itself.
  • Renaming _GITIGNORE_SDLC_BLOCK or _GITIGNORE_CLAUDE_BLOCK.
  • none (the originating migration is a prerequisite but already shipped)

Spawned by /sdlc:task-work post-mortem of T-G834-move-plugin-runtime-state-to-sdlc-dir on 2026-05-22.

Bullet: setup_planning.py previously did not manage the .sdlc/* block at all - the writer only seeded the Claude Code block, with the repo .gitignore carrying the SDLC block by hand. AC-6 forced adding parallel _GITIGNORE_SDLC_BLOCK management. The original helpers (_find_claude_block_span, _block_contains_hooks_lines, _patch_block_with_hooks) are now thin back-compat wrappers; if no external caller imports them, they can be deleted in a future tidy. Keywords searched: block_contains_hooks_lines, find_claude_block_span, patch_block_with_hooks, gitignore_sdlc_block, setup_planning, back-compat, previously, management Excluded: 2026-05-22-move-plugin-runtime-state-to-sdlc-dir Top candidates (score / status / headline):

  • 16 / closed/done / 2026-05-19-co-locate-skill-specific-scripts — Co-locate skill-specific scripts under their skill dir; promote when shared
  • 15 / closed/done / 2026-05-20-pluralize-recognizes-backlog-as-plural — pluralize() should treat ‘backlog’ as already-plural
  • 11 / closed/done / 2026-05-20-regen-walks-skill-co-located-scripts — regen.mjs walks plugin/skills//*.py for script reference pages
  • 10 / planning/draft / 2026-05-21-promote-pluralize-to-shared-helper — Promote pluralize() + IRREGULAR_PLURALS to a shared helper
  • 7 / closed/done / 2026-05-19-add-obsidian-bases-setup-flag — Add —obsidian flag to /sdlc:setup that generates Obsidian Bases files per entity Decision: SPAWNED

← Back to Tasks