pub struct Issue {Show 39 fields
pub id: String,
pub content_hash: Option<String>,
pub title: String,
pub description: Option<String>,
pub design: Option<String>,
pub acceptance_criteria: Option<String>,
pub notes: Option<String>,
pub status: Status,
pub priority: i32,
pub issue_type: IssueType,
pub assignee: Option<String>,
pub owner: Option<String>,
pub estimated_minutes: Option<i32>,
pub created_at: DateTime<Utc>,
pub created_by: String,
pub updated_at: DateTime<Utc>,
pub closed_at: Option<DateTime<Utc>>,
pub close_reason: Option<String>,
pub due_at: Option<DateTime<Utc>>,
pub defer_until: Option<DateTime<Utc>>,
pub external_ref: Option<String>,
pub source_system: Option<String>,
pub labels: Vec<String>,
pub deleted_at: Option<DateTime<Utc>>,
pub deleted_by: Option<String>,
pub delete_reason: Option<String>,
pub compaction_level: Option<i32>,
pub compacted_at: Option<DateTime<Utc>>,
pub compacted_at_commit: Option<String>,
pub original_size: Option<i32>,
pub agent_state: Option<AgentState>,
pub mol_type: Option<MolType>,
pub hook_bead: Option<String>,
pub role_bead: Option<String>,
pub rig: Option<String>,
pub last_activity: Option<DateTime<Utc>>,
pub pinned: bool,
pub is_template: bool,
pub ephemeral: bool,
}Expand description
The central entity representing a trackable work item.
Fields§
§id: StringUnique identifier (format: bd-xxxx or bd-xxxx.n for children).
content_hash: Option<String>SHA256 hash of canonical content for deduplication.
title: StringWork item name (max 500 chars).
description: Option<String>Detailed explanation.
design: Option<String>Design specifications.
acceptance_criteria: Option<String>Definition of done.
notes: Option<String>Additional notes.
status: StatusCurrent workflow state.
priority: i32Numeric priority (0-4, lower is higher priority).
issue_type: IssueTypeType of work.
assignee: Option<String>Primary worker.
owner: Option<String>Responsible party.
estimated_minutes: Option<i32>Time estimate in minutes.
created_at: DateTime<Utc>When the issue was created.
created_by: StringWho created the issue.
updated_at: DateTime<Utc>When the issue was last modified.
closed_at: Option<DateTime<Utc>>When the issue was closed.
close_reason: Option<String>Why the issue was closed.
due_at: Option<DateTime<Utc>>Deadline.
defer_until: Option<DateTime<Utc>>Postpone until date.
external_ref: Option<String>Reference to external system (Linear, Jira, etc.).
source_system: Option<String>Origin system identifier.
labels: Vec<String>Associated tags.
deleted_at: Option<DateTime<Utc>>When the issue was soft-deleted.
deleted_by: Option<String>Who deleted the issue.
delete_reason: Option<String>Why the issue was deleted.
compaction_level: Option<i32>Level of compaction applied (0 = none).
compacted_at: Option<DateTime<Utc>>When the issue was compacted.
compacted_at_commit: Option<String>Git commit at time of compaction.
original_size: Option<i32>Original size before compaction.
agent_state: Option<AgentState>Self-reported agent state.
mol_type: Option<MolType>Type of molecule.
hook_bead: Option<String>Hook bead reference.
role_bead: Option<String>Role bead reference.
rig: Option<String>Rig reference.
last_activity: Option<DateTime<Utc>>Last activity timestamp.
pinned: boolWhether this issue is pinned.
is_template: boolWhether this issue is a template.
ephemeral: boolWhether this is ephemeral (not persisted).
Implementations§
Source§impl Issue
impl Issue
Sourcepub fn new(
id: impl Into<String>,
title: impl Into<String>,
created_by: impl Into<String>,
) -> Self
pub fn new( id: impl Into<String>, title: impl Into<String>, created_by: impl Into<String>, ) -> Self
Create a new issue with minimal required fields.
Sourcepub fn compute_content_hash(&self) -> String
pub fn compute_content_hash(&self) -> String
Compute the content hash for this issue.
Sourcepub fn update_content_hash(&mut self)
pub fn update_content_hash(&mut self)
Update the content hash.
Sourcepub fn tombstone(&mut self, actor: &str, reason: Option<String>)
pub fn tombstone(&mut self, actor: &str, reason: Option<String>)
Soft-delete this issue (tombstone).
Sourcepub fn is_deleted(&self) -> bool
pub fn is_deleted(&self) -> bool
Returns true if this issue is soft-deleted.
Sourcepub fn is_potentially_ready(&self) -> bool
pub fn is_potentially_ready(&self) -> bool
Returns true if this issue is ready for work (no blocking dependencies). Note: This only checks the issue’s own status; dependency checking is done in storage.
Sourcepub fn parent_id(&self) -> Option<&str>
pub fn parent_id(&self) -> Option<&str>
Returns the parent ID if this is a child issue (bd-xxxx.n format).
Sourcepub fn has_parent(&self) -> bool
pub fn has_parent(&self) -> bool
Returns true if this issue has a parent.
Sourcepub fn with_description(self, desc: impl Into<String>) -> Self
pub fn with_description(self, desc: impl Into<String>) -> Self
Builder method to set description.
Sourcepub fn with_priority(self, priority: i32) -> Self
pub fn with_priority(self, priority: i32) -> Self
Builder method to set priority.
Sourcepub fn with_assignee(self, assignee: impl Into<String>) -> Self
pub fn with_assignee(self, assignee: impl Into<String>) -> Self
Builder method to set assignee.
Sourcepub fn with_label(self, label: impl Into<String>) -> Self
pub fn with_label(self, label: impl Into<String>) -> Self
Builder method to add a label.