Commit graph

4 commits

Author SHA1 Message Date
emma
63432acf64 fix: --validate checks --acceptance field, add validation.on-close config (PR #2654)
Three fixes for validation consistency:

1. bd create --validate now uses LintIssue() instead of ValidateTemplate(),
   bringing it to parity with bd lint. A non-empty --acceptance field now
   satisfies the "Acceptance Criteria" requirement without needing the
   heading in --description. (GH#2468 parity)

2. --dry-run no longer bypasses --validate. Validation now runs before the
   dry-run exit, so users get feedback on template issues during preview.

3. New validation.on-close config option (none|warn|error, default: none).
   When enabled, warns on terse close reasons (<20 chars) or default
   "Closed" reasons. Mirrors existing validation.on-create pattern.

Co-Authored-By: seanmartinsmith <114885497+seanmartinsmith@users.noreply.github.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 22:21:23 -07:00
beads/crew/emma
3dbf3c7cfd fix: bd lint accepts non-empty acceptance_criteria field without heading (GH#2468)
Previously, bd lint required the literal text "Acceptance Criteria" (or
"Success Criteria" for epics) to appear inside the acceptance_criteria
field content. Now a non-empty field satisfies the requirement regardless
of whether a markdown heading is present.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 13:53:37 -07:00
beads/crew/leeloo
0dc6bdb47f
fix(lint): check AcceptanceCriteria field in LintIssue
LintIssue() only checked issue.Description when validating required
template sections. If acceptance criteria were stored in the dedicated
AcceptanceCriteria field, lint incorrectly reported them as missing.

Now concatenates both fields before validation so required sections
found in either field satisfy the lint check.

Closes #1472

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

Executed-By: beads/crew/leeloo
Rig: beads
Role: crew
2026-02-23 12:50:54 +00:00
beads/crew/grip
db93ba0709 feat(validation): add ValidateTemplate() function (bd-615z)
Implements template validation for bd lint and bd create --validate:
- ValidateTemplate() checks description for required sections
- LintIssue() validates an existing issue
- TemplateError provides actionable missing section details
- Case-insensitive, flexible heading matching

Also fixes: close.go missing session parameter in CloseIssue calls

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-01 12:42:43 -08:00