Skip to content

UserStory

A UserStory captures a high-level requirement from the perspective of a role. It maps to the classic As a / I want / so that format via the who, what, and why fields.

Stories are classified as functional or technical using UserStoryType.

The optional dod field holds a free-form definition of done. The tags field is an unordered set of short label strings for categorisation; tags from parent and child stories are merged as a union.

UserStory carries both the Historized mixin (with history: frozenset[UserStoryHistoryEntry]) and the Commentable mixin (with comments: frozenset[Comment]). Both fields accumulate across scope merges. See HistoryEntry and Comment.

UserStoryType

UserStoryType

Bases: str, Enum

Classifies a UserStory as functional or technical.

UserStoryHistoryEntry

UserStoryHistoryEntry

Bases: HistoryEntry

A HistoryEntry specialised for UserStory changes.

Extends the base entry with sets of AC ids that were added or deactivated as part of the recorded change event.

Attributes:

Name Type Description
added_acs frozenset[int]

Integer ids of AcceptanceCriteria newly attached in this change.

deactivated_acs frozenset[int]

Integer ids of AcceptanceCriteria deactivated in this change.

UserStory

UserStory

Bases: MergeableModel, Historized, Commentable

A high-level requirement scoped to an organizational unit.

Attributes:

Name Type Description
id int

Integer identifier, unique within the enclosing Scope.

who str

The role or persona that wants the feature.

what str

The capability or behaviour desired.

why str

The business or technical justification.

type UserStoryType

Whether the story is functional or technical.

active bool

Whether this story is an active requirement. Set to False when a story is retired without removing it. An inactive story implicitly deactivates all its acceptance criteria for validation purposes.

dod str | None

Optional free-form prose describing the definition of done. Defaults to None if unset.

tags frozenset[str]

An unordered set of short label strings for categorisation. Defaults to an empty set.

acceptance_criteria frozenset[AcceptanceCriterion]

The testable conditions defining completion. Each criterion's id must be unique within this story.

is_validated property

Return True when the story is active, has active criteria, and all are validated.