Skip to main content

Module ids

Module ids 

Source

Enums§

IdError

Constants§

DEFAULT_PROJECT_PREFIX
DEFAULT_TICKET_PREFIX
NOTE_ID_PREFIX
Note ids are N<ordinal>.
TRIGGER_ID_PREFIX
Trigger ids are TR<ordinal>, with no separator: TR91. Two letters, not one — a bare T91 reads as a ticket id beside TICK-91, which is exactly the confusion an id prefix exists to prevent.

Functions§

default_worktree
Chooses the worktree branch for a ticket whose frontmatter does not name one. stem is the ticket file’s stem; exec-sourced tickets have none and always fall back to sloop/<ticket_id>. Err refuses the ticket with the given reason: reindex holds it, sloop post rejects it.
next_id
Allocates one greater than the greatest positive numeric suffix for the active prefix. IDs for other prefixes and malformed suffixes do not count.
ordinal
The numeric ordinal an id ends in, whatever its prefix: TICK-38 is 38. Allocation makes this a monotonic proxy for registration order, so it is what recency ordering falls back to when timestamps tie. Ids that do not end in -<digits> have none.
valid_prefix
Prefixes stay safe as unquoted frontmatter scalars while still allowing readable multi-part names such as MY-WORK.
valid_slug
Worktree slugs are what a ticket file stem must look like to name a branch: lowercase alphanumeric segments separated by single hyphens, abc-def.