feat: Implement Step.Gate evaluation (Phase 1: Human Gates)

This implements Phase 1 of the Step.Gate feature (bd-7zka.2):

- bd cook now creates gate issues for steps with gate fields
- Gate issues have type=gate and block the gated step via dependency
- bd list filters out gate issues by default (use --include-gates to show)
- New bd gate command with list and resolve subcommands

Gate types supported in Phase 1:
- human: Manual closure via bd close or bd gate resolve

Implementation details:
- createGateIssue() in cook.go creates gate issues with proper metadata
- collectSteps() creates gate dependencies when processing gated steps
- IssueFilter.ExcludeTypes added to storage layer for type-based filtering
- Gate command provides dedicated UX for gate management

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
jasper
2026-01-01 16:24:32 -08:00
committed by Steve Yegge
parent 09d38de6df
commit b73085962c
9 changed files with 297 additions and 968 deletions

View File

@@ -233,6 +233,9 @@ type ListArgs struct {
// Status exclusion (for default non-closed behavior, GH#788)
ExcludeStatus []string `json:"exclude_status,omitempty"`
// Type exclusion (for hiding internal types like gates, bd-7zka.2)
ExcludeTypes []string `json:"exclude_types,omitempty"`
}
// CountArgs represents arguments for the count operation

View File

@@ -1117,6 +1117,13 @@ func (s *Server) handleList(req *Request) Response {
}
}
// Type exclusion (for hiding internal types like gates, bd-7zka.2)
if len(listArgs.ExcludeTypes) > 0 {
for _, t := range listArgs.ExcludeTypes {
filter.ExcludeTypes = append(filter.ExcludeTypes, types.IssueType(t))
}
}
// Guard against excessive ID lists to avoid SQLite parameter limits
const maxIDs = 1000
if len(filter.IDs) > maxIDs {