Skip to content

Conversation

@TabishB
Copy link
Contributor

@TabishB TabishB commented Oct 16, 2025

Summary

  • Delta section headers are now parsed case-insensitively (e.g., "Added Requirements", "ADDED Requirements", and "added requirements" all work)
  • Empty delta sections now produce clear error messages guiding users to add requirement entries
  • Specs with no delta headers at all now receive specific error messages explaining that delta sections are required
  • Added test coverage for case-insensitive delta header parsing

Implementation Details

Modified src/core/parsers/requirement-blocks.ts:

  • Added sectionPresence tracking to DeltaPlan interface to track whether each delta section was found
  • Implemented getSectionCaseInsensitive() helper for case-insensitive section lookup
  • Updated parseDeltaSpec() to use case-insensitive lookup and track section presence

Modified src/core/validation/validator.ts:

  • Enhanced validateChangeDeltaSpecs() to detect empty delta sections and missing headers
  • Added clear error messages for both scenarios to guide users
  • Implemented formatSectionList() helper for user-friendly section name formatting

Added test in test/core/validation.test.ts:

  • Test case verifying mixed-case delta headers are properly recognized

Test Plan

  • Existing tests pass
  • New test for case-insensitive headers added
  • Manual testing with empty sections produces clear error messages
  • Manual testing with missing headers produces appropriate guidance

🤖 Generated with Claude Code

TabishB and others added 2 commits October 16, 2025 18:07
…empty section detection

This commit enhances the validation logic for delta specs:
- Delta section headers are now parsed case-insensitively (e.g., "Added Requirements" and "ADDED Requirements" both work)
- Empty delta sections now produce clear error messages guiding users to add requirement entries
- Specs with no delta headers at all now receive specific error messages
- Added test coverage for case-insensitive delta header parsing
@TabishB TabishB merged commit ecddffc into main Oct 19, 2025
6 checks passed
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.

2 participants