Documentation
¶
Overview ¶
Package slug provides shared slug-derivation helpers used across the SpecScore CLI. It is deliberately small and dependency-free so any artifact package (issue, idea, feature, …) can import it without cycling back through pkg/lint.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IssueSlug ¶
IssueSlug derives the canonical slug for an `issue` artifact from a free-form one-liner. The algorithm:
- Lowercase the input (Unicode-aware via strings.ToLower).
- Replace every non-alphanumeric rune with `-`.
- Collapse consecutive `-` runs into a single `-`.
- Trim leading and trailing `-`.
- If the result exceeds 60 chars, truncate at the last `-` boundary at or before index 60 (exclusive of the `-`). If no `-` exists within the first 60 chars, hard-truncate at 60.
The truncation rule pins to the AC `cli/spec/lint/issue-rules#ac:slug-helper-truncation`.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.