Expand description
The uniform references field: an ID->title map linking a feature or work
item to other features and work items.
Both document families share one references mapping (keys are
FEAT-NNNN / <TYPE>-NNNN, values are the referenced doc’s title). Prefixes
are self-describing, so a single field captures links in either direction.
Entries are always serialized sorted by item number. A closed work item
leaves a tombstone: its title value is struck through (~~title~~), which
both marks it done and reserves its ID against reuse.
Constants§
- BLOCKED_
BY - The directional blocker-relation map fields:
blocked_bylists the items blocking this one,blockslists the items this one blocks. Maintained as inverses of each other bycrate::links::reconcile_blockers. - BLOCKS
- FIELD
- The reserved frontmatter key holding the ID->title reference map.
- RELATION_
FIELDS - Every ID->title relation map field, in serialization order. Each behaves
identically for resolution, tombstones, and ID reservation; only
reconciliation differs (
referencesis symmetric,blocked_by/blocksare inverses).
Functions§
- add_
to_ map - Insert or update
id’s entry in a relation map. Returns whether the map changed. - all_
relation_ ids - Every id appearing in any relation map (
references,blocked_by,blocks), regardless of prefix — used to compute the global ID sequence so a closed item appearing in any map keeps its number reserved against reuse. - id_
number - Numeric part of a
PREFIX-NNNNid, for deterministic ordering. Ids that do not parse sort last. - ids_
with_ prefix - Ids in the
referencesmap carrying the given prefix (e.g.FEATorBUG). - is_
struck - Whether a reference value is a struck-through (closed) tombstone.
- parse
- Read the
referencesmap as(id, raw_value)pairs sorted by item number.raw_valueretains any strikethrough so callers can distinguish a closed tombstone from a live link. - parse_
in - Read an arbitrary ID->title relation map (
references,blocked_by,blocks) as(id, raw_value)pairs sorted by item number. - remove_
from_ map - Remove
id’s entry from a relation map. Returns whether anything was removed. - set
- Replace the
referencesmap, sorted by item number. An empty list removes the field entirely (keeping frontmatter minimal). - set_in
- Replace an arbitrary relation map, sorted by item number. An empty list removes the field entirely (keeping frontmatter minimal).
- strike
- Wrap a title as a struck-through tombstone value.
- unstrike
- The underlying title of a reference value, with any strikethrough removed.