Documentation
¶
Overview ¶
Package discovery provides functions for finding active changes and specs in a spectr intialized project.
Package discovery provides test helpers for change and spec discovery.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetActiveChangeIDs ¶
GetActiveChangeIDs returns a list of active change IDs (directory names under spectr/changes/, excluding archive/) Returns empty slice (not error) if the directory doesn't exist Results are sorted alphabetically for consistency
func GetActiveChanges ¶
GetActiveChanges finds all active changes in spectr/changes/, excluding archive directory
func GetSpecIDs ¶
GetSpecIDs returns a list of spec IDs (directory names under spectr/specs/) Returns empty slice (not error) if the directory doesn't exist Results are sorted alphabetically for consistency
Types ¶
type ResolveResult ¶
ResolveResult contains the resolved change ID and whether it was a partial match.
func ResolveChangeID ¶
func ResolveChangeID(partialID, projectRoot string) (ResolveResult, error)
ResolveChangeID resolves a partial change ID to a full change ID. The resolution algorithm:
- Exact match: returns immediately if partialID exactly matches a change ID
- Prefix match: finds all change IDs that start with partialID (case-insensitive)
- Substring match: if no prefix matches, finds all change IDs containing partialID (case-insensitive)
Returns an error if: - No changes match the partial ID - Multiple changes match the partial ID (ambiguous)