fix(ready): exclude molecule steps from bd ready by default (#1246)
* fix(ready): exclude molecule steps from bd ready by default (GH#1239) Add ID prefix constants (IDPrefixMol, IDPrefixWisp) to types.go as single source of truth. Update pour.go and wisp.go to use these constants. GetReadyWork now excludes issues with -mol- in their ID when no explicit type filter is specified. Users can still see mol steps with --type=task. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * feat(ready): config-driven ID pattern exclusion (GH#1239) Add ready.exclude_id_patterns config for excluding IDs from bd ready. Default patterns: -mol-, -wisp- (molecule steps and wisps). Changes: - Add IncludeMolSteps to WorkFilter for internal callers - Update findGateReadyMolecules and getMoleculeCurrentStep to use it - Make exclusion patterns config-driven via ready.exclude_id_patterns - Remove hardcoded MolStepIDPattern() in favor of config - Add test for custom patterns (e.g., gastown's -role-) Usage: bd config set ready.exclude_id_patterns "-mol-,-wisp-,-role-" Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * docs: remove -role- example from ready.go comments Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * docs: remove GH#1239 references from code comments Issue references belong in commit messages, not code. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1007,6 +1007,11 @@ type WorkFilter struct {
|
||||
|
||||
// Time-based deferral filtering (GH#820)
|
||||
IncludeDeferred bool // If true, include issues with future defer_until timestamps
|
||||
|
||||
// Molecule step filtering
|
||||
// By default, GetReadyWork excludes mol/wisp steps (IDs containing -mol- or -wisp-)
|
||||
// Set to true for internal callers that need to see mol steps (e.g., findGateReadyMolecules)
|
||||
IncludeMolSteps bool
|
||||
}
|
||||
|
||||
// StaleFilter is used to filter stale issue queries
|
||||
@@ -1041,6 +1046,15 @@ const (
|
||||
BondTypeRoot = "root" // Marks the primary/root component
|
||||
)
|
||||
|
||||
// ID prefix constants for molecule/wisp instantiation.
|
||||
// These prefixes are inserted into issue IDs: <project>-<prefix>-<id>
|
||||
// Used by: cmd/bd/pour.go, cmd/bd/wisp.go (ID generation)
|
||||
// Exclusion from bd ready is config-driven via ready.exclude_id_patterns (default: -mol-,-wisp-)
|
||||
const (
|
||||
IDPrefixMol = "mol" // Persistent molecules (bd-mol-xxx)
|
||||
IDPrefixWisp = "wisp" // Ephemeral wisps (bd-wisp-xxx)
|
||||
)
|
||||
|
||||
// IsCompound returns true if this issue is a compound (bonded from multiple sources).
|
||||
func (i *Issue) IsCompound() bool {
|
||||
return len(i.BondedFrom) > 0
|
||||
|
||||
Reference in New Issue
Block a user