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:
@@ -415,6 +415,9 @@ var listCmd = &cobra.Command{
|
||||
// Template filtering
|
||||
includeTemplates, _ := cmd.Flags().GetBool("include-templates")
|
||||
|
||||
// Gate filtering (bd-7zka.2)
|
||||
includeGates, _ := cmd.Flags().GetBool("include-gates")
|
||||
|
||||
// Parent filtering
|
||||
parentID, _ := cmd.Flags().GetString("parent")
|
||||
|
||||
@@ -620,6 +623,12 @@ var listCmd = &cobra.Command{
|
||||
filter.IsTemplate = &isTemplate
|
||||
}
|
||||
|
||||
// Gate filtering: exclude gate issues by default (bd-7zka.2)
|
||||
// Use --include-gates or --type gate to show gate issues
|
||||
if !includeGates && issueType != "gate" {
|
||||
filter.ExcludeTypes = append(filter.ExcludeTypes, types.TypeGate)
|
||||
}
|
||||
|
||||
// Parent filtering: filter children by parent issue
|
||||
if parentID != "" {
|
||||
filter.ParentID = &parentID
|
||||
@@ -721,6 +730,13 @@ var listCmd = &cobra.Command{
|
||||
}
|
||||
}
|
||||
|
||||
// Type exclusion (bd-7zka.2)
|
||||
if len(filter.ExcludeTypes) > 0 {
|
||||
for _, t := range filter.ExcludeTypes {
|
||||
listArgs.ExcludeTypes = append(listArgs.ExcludeTypes, string(t))
|
||||
}
|
||||
}
|
||||
|
||||
resp, err := daemonClient.List(listArgs)
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, "Error: %v\n", err)
|
||||
@@ -961,6 +977,9 @@ func init() {
|
||||
// Template filtering: exclude templates by default
|
||||
listCmd.Flags().Bool("include-templates", false, "Include template molecules in output")
|
||||
|
||||
// Gate filtering: exclude gate issues by default (bd-7zka.2)
|
||||
listCmd.Flags().Bool("include-gates", false, "Include gate issues in output (normally hidden)")
|
||||
|
||||
// Parent filtering: filter children by parent issue
|
||||
listCmd.Flags().String("parent", "", "Filter by parent issue ID (shows children of specified issue)")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user