From d49f062fa9523f24bf0cb27e334987a556a8b5b1 Mon Sep 17 00:00:00 2001 From: Alexander Tesfamichael Date: Mon, 29 Dec 2025 00:16:54 +0100 Subject: [PATCH 1/5] fix: prefix PR branches with pr/ to avoid git ref conflicts Agent worktrees use branches like `agent-one`, which conflicts with feature branches `agent-one/brd-xyz` in git's ref namespace. Now feature branches use `pr/agent-one/brd-xyz` format instead. --- docs/agent-workflow.md | 4 ++-- src/commands/agent.rs | 17 ++++++++++++----- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/docs/agent-workflow.md b/docs/agent-workflow.md index ac46b8d..4656fca 100644 --- a/docs/agent-workflow.md +++ b/docs/agent-workflow.md @@ -151,14 +151,14 @@ for teams that want CI gates and human review before merging, braid supports a P ### new commands ```bash -brd agent branch # create feature branch / from main +brd agent branch # create feature branch pr// from main brd agent pr # create PR from current branch to main ``` ### simple PR workflow (no sync branch) ```bash -brd agent branch brd-xyz # create branch agent-one/brd-xyz from main +brd agent branch brd-xyz # create branch pr/agent-one/brd-xyz from main brd start brd-xyz # claim issue (committed in branch) # ... do work, commit as usual ... brd done brd-xyz # mark done (committed in branch) diff --git a/src/commands/agent.rs b/src/commands/agent.rs index 75de2ce..a72313b 100644 --- a/src/commands/agent.rs +++ b/src/commands/agent.rs @@ -162,8 +162,8 @@ pub fn cmd_agent_branch(cli: &Cli, paths: &RepoPaths, issue_id: &str) -> Result< let mut issues = load_all_issues(paths, &config)?; let full_id = resolve_issue_id(issue_id, &issues)?; - // Create branch name: feature/ - let branch_name = format!("feature/{}", full_id); + // create branch name: pr// + let branch_name = format!("pr/{}/{}", agent_id, full_id); // Check if branch already exists if git( @@ -317,9 +317,16 @@ fn get_current_branch(cwd: &std::path::Path) -> Result { } } -/// extract issue ID from branch name (format: /). +/// extract issue ID from branch name. +/// supports both formats: +/// - "pr//" (new format) +/// - "/" (legacy format for backwards compatibility) fn extract_issue_id_from_branch(branch: &str) -> Option<&str> { - branch.split('/').nth(1) + if branch.starts_with("pr/") { + branch.split('/').nth(2) + } else { + branch.split('/').nth(1) + } } /// create a PR from the current branch using gh cli. @@ -332,7 +339,7 @@ pub fn cmd_agent_pr(cli: &Cli, paths: &RepoPaths) -> Result<()> { // extract issue ID from branch name let issue_id = extract_issue_id_from_branch(&branch).ok_or_else(|| { BrdError::Other(format!( - "branch '{}' doesn't match expected format '/'", + "branch '{}' doesn't match expected format 'pr//'", branch )) })?; From 179fa59faefb283560f9c0d982e6e91d39633ca0 Mon Sep 17 00:00:00 2001 From: Alexander Tesfamichael Date: Mon, 29 Dec 2025 00:17:06 +0100 Subject: [PATCH 2/5] chore: release brd-pdno --- .braid/issues/brd-pdno.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.braid/issues/brd-pdno.md b/.braid/issues/brd-pdno.md index 183fa2e..6d07b9c 100644 --- a/.braid/issues/brd-pdno.md +++ b/.braid/issues/brd-pdno.md @@ -3,11 +3,10 @@ schema_version: 4 id: brd-pdno title: visually distinguish meta and design issues in TUI priority: P2 -status: doing +status: todo deps: [] tags: - tui -owner: agent-three created_at: 2025-12-28T08:44:05.329879Z updated_at: 2025-12-28T18:11:33.492273Z acceptance: From 56bab1efd6ada0a405d13a736f4ac4ed7f003408 Mon Sep 17 00:00:00 2001 From: Alexander Tesfamichael Date: Mon, 29 Dec 2025 00:17:23 +0100 Subject: [PATCH 3/5] start: brd-pdno --- .braid/issues/brd-pdno.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.braid/issues/brd-pdno.md b/.braid/issues/brd-pdno.md index 6d07b9c..c1605c4 100644 --- a/.braid/issues/brd-pdno.md +++ b/.braid/issues/brd-pdno.md @@ -3,12 +3,13 @@ schema_version: 4 id: brd-pdno title: visually distinguish meta and design issues in TUI priority: P2 -status: todo +status: doing deps: [] tags: - tui +owner: agent-three created_at: 2025-12-28T08:44:05.329879Z -updated_at: 2025-12-28T18:11:33.492273Z +updated_at: 2025-12-28T23:17:23.704119Z acceptance: - style meta issues like brd ls does - style design issues like brd ls does From f20625bf007b11de70c666c802be23aec6db7d35 Mon Sep 17 00:00:00 2001 From: Alexander Tesfamichael Date: Mon, 29 Dec 2025 00:21:05 +0100 Subject: [PATCH 4/5] feat(tui): style meta and design issues like brd ls - Meta issues: bold text - Design issues: italic text Applied to both ready list and all issues list. --- src/tui/ui.rs | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/src/tui/ui.rs b/src/tui/ui.rs index e9298f8..8abd51d 100644 --- a/src/tui/ui.rs +++ b/src/tui/ui.rs @@ -240,7 +240,7 @@ fn draw_ready_list(f: &mut Frame, area: Rect, app: &mut App) { issue.priority(), truncate(issue.title(), title_width) ); - let style = if is_active && i == app.ready_selected { + let mut style = if is_active && i == app.ready_selected { Style::default() .bg(Color::Yellow) .fg(Color::Black) @@ -248,6 +248,16 @@ fn draw_ready_list(f: &mut Frame, area: Rect, app: &mut App) { } else { Style::default() }; + // add type-based styling (italic for design, bold for meta) + match issue.issue_type() { + Some(crate::issue::IssueType::Design) => { + style = style.add_modifier(Modifier::ITALIC); + } + Some(crate::issue::IssueType::Meta) => { + style = style.add_modifier(Modifier::BOLD); + } + None => {} + } ListItem::new(text).style(style) }) .collect(); @@ -310,7 +320,7 @@ fn draw_all_list(f: &mut Frame, area: Rect, app: &mut App) { issue.priority(), truncate(issue.title(), title_width) ); - let style = if is_active && i == app.all_selected { + let mut style = if is_active && i == app.all_selected { Style::default() .bg(Color::Yellow) .fg(Color::Black) @@ -324,6 +334,16 @@ fn draw_all_list(f: &mut Frame, area: Rect, app: &mut App) { crate::issue::Status::Todo => Style::default(), } }; + // add type-based styling (italic for design, bold for meta) + match issue.issue_type() { + Some(crate::issue::IssueType::Design) => { + style = style.add_modifier(Modifier::ITALIC); + } + Some(crate::issue::IssueType::Meta) => { + style = style.add_modifier(Modifier::BOLD); + } + None => {} + } ListItem::new(text).style(style) }) .collect(); From dfe028e051abe097bfe019e051d5839f36c1330d Mon Sep 17 00:00:00 2001 From: Alexander Tesfamichael Date: Mon, 29 Dec 2025 00:22:45 +0100 Subject: [PATCH 5/5] done: brd-pdno --- .braid/issues/brd-pdno.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.braid/issues/brd-pdno.md b/.braid/issues/brd-pdno.md index c1605c4..c82ef19 100644 --- a/.braid/issues/brd-pdno.md +++ b/.braid/issues/brd-pdno.md @@ -3,13 +3,13 @@ schema_version: 4 id: brd-pdno title: visually distinguish meta and design issues in TUI priority: P2 -status: doing +status: done deps: [] tags: - tui -owner: agent-three +owner: null created_at: 2025-12-28T08:44:05.329879Z -updated_at: 2025-12-28T23:17:23.704119Z +updated_at: 2025-12-28T23:20:14.053918Z acceptance: - style meta issues like brd ls does - style design issues like brd ls does