From d9f2d36e1f9f2fbb68b35c89f0143cb8fe2b6845 Mon Sep 17 00:00:00 2001 From: Bradley Hilton Date: Wed, 15 Jul 2026 20:15:22 -0500 Subject: [PATCH 1/3] feat(intent): add --reason for rejection and accept 'rejected' status - intent update: new --reason flag; when set, persists rejection_reason and stamps rejected_at (RFC 3339) onto the intent frontmatter (additive). - IntentUpdateOptions: carry the reason through the repository write path. - vocab: add 'rejected' to INTENT_STATUS so a reviewed-and-declined intent is a valid canonical/terminal state (gate, validate, and attest pre-check accept it). - vault intent update: pass reason: None on the legacy verb for compatibility. --- atomic-canonical/src/vocab.rs | 4 +++- atomic-cli/src/commands/intent/update.rs | 11 +++++++++-- atomic-cli/src/commands/vault/intent.rs | 1 + atomic-repository/src/repository/vault_intent.rs | 13 +++++++++++++ 4 files changed, 26 insertions(+), 3 deletions(-) diff --git a/atomic-canonical/src/vocab.rs b/atomic-canonical/src/vocab.rs index 228d6650..1154f658 100644 --- a/atomic-canonical/src/vocab.rs +++ b/atomic-canonical/src/vocab.rs @@ -38,7 +38,9 @@ impl NodeType { } /// Intent status value set (mirrors the doc's `IntentShape` `sh:in`). -pub const INTENT_STATUS: &[&str] = &["backlog", "todo", "in_progress", "done"]; +/// `rejected` is a terminal state (an intent that was reviewed and turned down). +pub const INTENT_STATUS: &[&str] = + &["backlog", "todo", "in_progress", "done", "rejected"]; /// Acceptance-criterion status value set. pub const AC_STATUS: &[&str] = &["open", "met"]; diff --git a/atomic-cli/src/commands/intent/update.rs b/atomic-cli/src/commands/intent/update.rs index 58adb409..83fad28a 100644 --- a/atomic-cli/src/commands/intent/update.rs +++ b/atomic-cli/src/commands/intent/update.rs @@ -40,6 +40,11 @@ pub struct IntentUpdate { #[arg(long)] pub title: Option, + /// Rejection reason. Persisted as `rejection_reason` + `rejected_at` + /// (normally passed alongside `--status rejected`). + #[arg(long)] + pub reason: Option, + /// New Markdown body content, provided inline. #[arg(long, conflicts_with = "body_stdin")] pub body: Option, @@ -80,12 +85,13 @@ impl Command for IntentUpdate { && self.assignee.is_none() && self.priority.is_none() && self.title.is_none() + && self.reason.is_none() && content.is_none() { return Err(CliError::InvalidArgument { message: "Nothing to update. Provide at least one of \ - --status, --assignee, --priority, --title, --body, \ - or --body-stdin." + --status, --assignee, --priority, --title, --reason, \ + --body, or --body-stdin." .to_string(), }); } @@ -100,6 +106,7 @@ impl Command for IntentUpdate { priority: self.priority.clone(), title: self.title.clone(), content, + reason: self.reason.clone(), force: self.force, }, ) diff --git a/atomic-cli/src/commands/vault/intent.rs b/atomic-cli/src/commands/vault/intent.rs index 70542f8c..e874f62f 100644 --- a/atomic-cli/src/commands/vault/intent.rs +++ b/atomic-cli/src/commands/vault/intent.rs @@ -482,6 +482,7 @@ impl Command for IntentUpdate { priority: self.priority.clone(), title: self.title.clone(), content, + reason: None, force: self.force, }, ) diff --git a/atomic-repository/src/repository/vault_intent.rs b/atomic-repository/src/repository/vault_intent.rs index 563e7cfc..496d01f5 100644 --- a/atomic-repository/src/repository/vault_intent.rs +++ b/atomic-repository/src/repository/vault_intent.rs @@ -75,6 +75,9 @@ pub struct IntentUpdateOptions { pub title: Option, /// New Markdown body content. When `None`, the existing body is kept. pub content: Option, + /// Rejection reason. When set, persists `rejection_reason` and stamps + /// `rejected_at` (normally accompanies `status = rejected`). + pub reason: Option, /// Allow rewriting the body after the intent has started or been linked. pub force: bool, } @@ -495,6 +498,16 @@ impl Repository { serde_json::Value::String(title.clone()), ); } + if let Some(ref reason) = options.reason { + fm.insert( + "rejection_reason".to_string(), + serde_json::Value::String(reason.clone()), + ); + fm.insert( + "rejected_at".to_string(), + serde_json::Value::String(chrono::Utc::now().to_rfc3339()), + ); + } let new_fm = serde_json::to_string(&fm).unwrap_or_else(|_| "{}".to_string()); let new_content = match options.content { From 8d1000c913c37a3e8ece756b3453562d278048bb Mon Sep 17 00:00:00 2001 From: Bradley Hilton Date: Wed, 15 Jul 2026 22:14:52 -0500 Subject: [PATCH 2/3] feat(intent): make unmet/met the official acceptance-criterion status Rename the acceptance-criterion status vocabulary from open/met to unmet/met so the value reads unambiguously against a met criterion. is_known_ac_status still accepts the legacy 'open' (== unmet) so pre-existing intents keep conforming, and the intent-new scaffold now seeds status=unmet for criteria and tasks. --- atomic-canonical/src/vocab.rs | 14 ++++++++------ atomic-cli/src/commands/intent/new.rs | 4 ++-- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/atomic-canonical/src/vocab.rs b/atomic-canonical/src/vocab.rs index 1154f658..16ced11d 100644 --- a/atomic-canonical/src/vocab.rs +++ b/atomic-canonical/src/vocab.rs @@ -39,11 +39,12 @@ impl NodeType { /// Intent status value set (mirrors the doc's `IntentShape` `sh:in`). /// `rejected` is a terminal state (an intent that was reviewed and turned down). -pub const INTENT_STATUS: &[&str] = - &["backlog", "todo", "in_progress", "done", "rejected"]; +pub const INTENT_STATUS: &[&str] = &["backlog", "todo", "in_progress", "done", "rejected"]; -/// Acceptance-criterion status value set. -pub const AC_STATUS: &[&str] = &["open", "met"]; +/// Acceptance-criterion status value set. `unmet`/`met` are the official values +/// (an acceptance criterion is either met or not); the legacy `open` is still +/// accepted by [`is_known_ac_status`] so pre-existing intents keep conforming. +pub const AC_STATUS: &[&str] = &["unmet", "met"]; /// Directive names recognized by the parser + lift (closed set). /// Container directives wrap prose; leaf directives carry only edges. @@ -127,9 +128,10 @@ pub fn is_known_intent_status(value: &str) -> bool { INTENT_STATUS.contains(&value) } -/// Is this a valid acceptance-criterion status value? +/// Is this a valid acceptance-criterion status value? Accepts the official +/// `unmet`/`met` plus the deprecated legacy `open` (== `unmet`) for back-compat. pub fn is_known_ac_status(value: &str) -> bool { - AC_STATUS.contains(&value) + AC_STATUS.contains(&value) || value == "open" } /// Is this a valid memory kind? Unknown ⇒ gate error (closed vocabulary). diff --git a/atomic-cli/src/commands/intent/new.rs b/atomic-cli/src/commands/intent/new.rs index 8d9c5bad..f18a051e 100644 --- a/atomic-cli/src/commands/intent/new.rs +++ b/atomic-cli/src/commands/intent/new.rs @@ -29,11 +29,11 @@ const FEATURE_SCAFFOLD: &str = "\ content is never graded — but it must be present. Replace this stub. --> ::: -:::acceptance-criterion{#{id}-ac-1 status=open} +:::acceptance-criterion{#{id}-ac-1 status=unmet} ::: -:::task{#{id}-1 status=open criteria={id}-ac-1} +:::task{#{id}-1 status=unmet criteria={id}-ac-1} ::file-ref{path=path/to/file} From 5556d3654815a38d292265fa6047b33c5b2ddedb Mon Sep 17 00:00:00 2001 From: Bradley Hilton Date: Fri, 17 Jul 2026 11:27:25 -0500 Subject: [PATCH 3/3] refactor(intent): rename the 'rejected' status to 'icebox' MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Softer terminal state for a reviewed-but-not-built intent. INTENT_STATUS rejected→icebox; the --reason handler now persists icebox_reason + iceboxed_at (was rejection_reason/rejected_at). --- atomic-canonical/src/vocab.rs | 4 ++-- atomic-cli/src/commands/intent/update.rs | 4 ++-- atomic-repository/src/repository/vault_intent.rs | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/atomic-canonical/src/vocab.rs b/atomic-canonical/src/vocab.rs index 16ced11d..cc25e1bc 100644 --- a/atomic-canonical/src/vocab.rs +++ b/atomic-canonical/src/vocab.rs @@ -38,8 +38,8 @@ impl NodeType { } /// Intent status value set (mirrors the doc's `IntentShape` `sh:in`). -/// `rejected` is a terminal state (an intent that was reviewed and turned down). -pub const INTENT_STATUS: &[&str] = &["backlog", "todo", "in_progress", "done", "rejected"]; +/// `icebox` is a terminal state (an intent reviewed and set aside — not built). +pub const INTENT_STATUS: &[&str] = &["backlog", "todo", "in_progress", "done", "icebox"]; /// Acceptance-criterion status value set. `unmet`/`met` are the official values /// (an acceptance criterion is either met or not); the legacy `open` is still diff --git a/atomic-cli/src/commands/intent/update.rs b/atomic-cli/src/commands/intent/update.rs index 83fad28a..2900be30 100644 --- a/atomic-cli/src/commands/intent/update.rs +++ b/atomic-cli/src/commands/intent/update.rs @@ -40,8 +40,8 @@ pub struct IntentUpdate { #[arg(long)] pub title: Option, - /// Rejection reason. Persisted as `rejection_reason` + `rejected_at` - /// (normally passed alongside `--status rejected`). + /// Reason the intent is being iceboxed. Persisted as `icebox_reason` + + /// `iceboxed_at` (normally passed alongside `--status icebox`). #[arg(long)] pub reason: Option, diff --git a/atomic-repository/src/repository/vault_intent.rs b/atomic-repository/src/repository/vault_intent.rs index 496d01f5..813cd72c 100644 --- a/atomic-repository/src/repository/vault_intent.rs +++ b/atomic-repository/src/repository/vault_intent.rs @@ -75,8 +75,8 @@ pub struct IntentUpdateOptions { pub title: Option, /// New Markdown body content. When `None`, the existing body is kept. pub content: Option, - /// Rejection reason. When set, persists `rejection_reason` and stamps - /// `rejected_at` (normally accompanies `status = rejected`). + /// Icebox reason. When set, persists `icebox_reason` and stamps + /// `iceboxed_at` (normally accompanies `status = icebox`). pub reason: Option, /// Allow rewriting the body after the intent has started or been linked. pub force: bool, @@ -500,11 +500,11 @@ impl Repository { } if let Some(ref reason) = options.reason { fm.insert( - "rejection_reason".to_string(), + "icebox_reason".to_string(), serde_json::Value::String(reason.clone()), ); fm.insert( - "rejected_at".to_string(), + "iceboxed_at".to_string(), serde_json::Value::String(chrono::Utc::now().to_rfc3339()), ); }