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>
This commit is contained in:
beads/crew/grip
2026-01-01 12:42:43 -08:00
committed by Steve Yegge
parent e6ee7a6912
commit db93ba0709
3 changed files with 339 additions and 2 deletions

View File

@@ -191,7 +191,7 @@ create, update, show, or close operation).`,
continue
}
if err := result.Store.CloseIssue(ctx, result.ResolvedID, reason, actor); err != nil {
if err := result.Store.CloseIssue(ctx, result.ResolvedID, reason, actor, session); err != nil {
result.Close()
fmt.Fprintf(os.Stderr, "Error closing %s: %v\n", id, err)
continue
@@ -283,7 +283,7 @@ create, update, show, or close operation).`,
continue
}
if err := result.Store.CloseIssue(ctx, result.ResolvedID, reason, actor); err != nil {
if err := result.Store.CloseIssue(ctx, result.ResolvedID, reason, actor, session); err != nil {
result.Close()
fmt.Fprintf(os.Stderr, "Error closing %s: %v\n", id, err)
continue