feat(dashboard,adrs): enrich dashboard tabs with domain model parity and resolve consequence schema handling

This commit is contained in:
Riz Ashraf committed 2026-10-07 14:38:02 +01:00
1 parent 73c3d41c87
commit f546579596
5 files changed
+798 -143

No files matched your search

+14 -4
View File
@@ -792,7 +792,7 @@ pub struct SnippetsTool {
pub line_range: Option<String>,
}
#[derive(Debug, Deserialize, Serialize, JsonSchema, PartialEq)]
#[derive(Debug, Deserialize, Serialize, JsonSchema, PartialEq, Clone)]
#[serde(rename_all = "snake_case")]
pub enum DecisionAction {
#[serde(alias = "log", alias = "LOG", alias = "Log")]
@@ -801,15 +801,18 @@ pub enum DecisionAction {
Query,
#[serde(alias = "delete", alias = "DELETE", alias = "Delete")]
Delete,
#[serde(alias = "update", alias = "UPDATE", alias = "Update")]
Update,
}
/// Architectural Decision Records (ADRs) log (log, query, delete).
/// Architectural Decision Records (ADRs) log (log, query, update, delete).
/// Actions:
/// - 'log': Record ADR. Required: title. Optional: status, context, decision, consequences, namespace.
/// - 'query': Search ADRs. Optional: query, namespace.
/// - 'update': Update ADR status or implementation info. Required: id. Optional: status, git_commit, git_branch, task_id, context, decision, consequences, title.
/// - 'delete': Remove ADR. Required: id.
/// Next steps on error: Provide title for 'log' or id for 'delete'.
#[derive(Debug, Deserialize, Serialize, JsonSchema)]
/// Next steps on error: Provide title for 'log' or id for 'update'/'delete'.
#[derive(Deserialize, Serialize, JsonSchema, Debug, Clone)]
pub struct DecisionsTool {
/// Action to perform: 'log', 'query', or 'delete'.
pub action: DecisionAction,
@@ -824,6 +827,7 @@ pub struct DecisionsTool {
/// Decision made (for 'log').
pub decision: Option<String>,
/// Consequences & tradeoffs (for 'log').
#[serde(alias = "consequence")]
pub consequences: Option<String>,
/// Search query string (for 'query').
pub query: Option<String>,
@@ -843,6 +847,12 @@ pub struct DecisionsTool {
pub limit: Option<usize>,
/// Include the full body of the matched decisions. Defaults to true.
pub include_body: Option<bool>,
/// Optional Git commit where decision was implemented.
pub git_commit: Option<String>,
/// Optional Git branch where decision was implemented.
pub git_branch: Option<String>,
/// Optional task ID linked to this decision.
pub task_id: Option<String>,
}
#[derive(Debug, Deserialize, Serialize, JsonSchema, PartialEq)]