Skip to content

feat(group_td): optional SOURCE column with feature-flag detection#28

Merged
samestrin merged 2 commits into
mainfrom
feat/unified-td-capture
Apr 22, 2026
Merged

feat(group_td): optional SOURCE column with feature-flag detection#28
samestrin merged 2 commits into
mainfrom
feat/unified-td-capture

Conversation

@samestrin
Copy link
Copy Markdown
Owner

Summary

  • writeGroupedMarkdown gains an optional Source column, emitted only when at least one input row has a non-empty SOURCE value.
  • Feature-flagged to preserve 7-column output byte-for-byte for legacy callers (no SOURCE in --headers).
  • Enables the upstream unified tech-debt capture pipeline in claude-prompts (separate PR).

Why

/execute-sprint now surfaces tech-debt items mid-TDD, and /code-review pre-seeds its adversarial stream from them. To distinguish the two sources in the final README.md backlog, we need a provenance column. Appended-at-end preserves positional compatibility with resolve-td and promote-tech-debt parsers.

Test plan

  • 5 new tests in group_td_test.go drive the feature (RED -> GREEN)
  • All 34 existing tests still pass (backward compat)
  • Full repo suite green (go test ./...)
  • writeGroupedMarkdown coverage: 95.5%; package: 80.3%
  • make build succeeds
  • Smoke-tested the binary end-to-end with a mixed-source input

Compatibility notes

  • Empty SOURCE values render as | | to preserve column alignment (verified by TestGroupTDPipeFormatMixedSource).
  • Legacy 7-column sections and new 8-column sections coexist in the same README.md (verified by TestGroupTDPipeFormatAppendWithSource).
  • No MCP schema changes required - headers is already a free-form string.

Five new tests drive the SOURCE-column feature flag:
- TestGroupTDPipeFormatWithSource: 8-column output when SOURCE provided
- TestGroupTDPipeFormatWithoutSource: 7-column preserved when absent (baseline)
- TestGroupTDPipeFormatMixedSource: empty SOURCE cells render as "|  |"
- TestGroupTDPipeFormatSourceWithCheckbox: checkbox + Source both last
- TestGroupTDPipeFormatAppendWithSource: legacy 7-col sections coexist with new 8-col

Four currently fail (RED); the without-source test passes as backward-compat baseline.
writeGroupedMarkdown now emits an 8th "Source" column after "Est Minutes"
when any input row carries a non-empty SOURCE value. Absent SOURCE preserves
the existing 7-column output byte-for-byte, keeping resolve-td and
promote-tech-debt positional parsers compatible.

Append-mode correctness: legacy 7-column sections coexist with newer 8-column
sections in the same README.md. Row-count verification unchanged.

Enables the unified tech-debt capture pipeline where /execute-sprint and
/code-review both contribute rows tagged by source.
@samestrin samestrin merged commit e664336 into main Apr 22, 2026
8 checks passed
@samestrin samestrin deleted the feat/unified-td-capture branch April 22, 2026 19:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant