Skip to content

Release 0.6.1 — short run refs, list command, flexible --story#5

Merged
pbean merged 4 commits into
mainfrom
feature/0.6.1
Jun 21, 2026
Merged

Release 0.6.1 — short run refs, list command, flexible --story#5
pbean merged 4 commits into
mainfrom
feature/0.6.1

Conversation

@pbean

@pbean pbean commented Jun 21, 2026

Copy link
Copy Markdown
Collaborator

Release 0.6.1

Added

  • Short run refs (Docker-style). Every command that takes a run id (status, attach, resume, resolve, stop, delete, archive) now accepts a partial — the tail after the last - (e.g. a1b2, shortened to any unique prefix). Full ids still work; an ambiguous ref fails listing the candidates. New bmad-auto list (alias ls) prints each run/sweep with its short ref, type, and status.
  • Flexible --story selection. bmad-auto run --story now takes an epic+number (--epic 3 --story 1, --story 3-1, --story 3.1) or a slug fragment (--story user-auth), not just the full key. Mismatches are caught before launch with a targeted error (no match / ambiguous slug / matched-but-not-actionable).

Release mechanics

  • Version stamped to 0.6.1 across all manifests + uv.lock; CHANGELOG curated; TUI screenshots + demo regenerated (StartRunModal placeholder changed).
  • RELEASING.md untracked (maintainer-local) and its dead links dropped from CONTRIBUTING.md.

Once merged, the Release workflow auto-creates the v0.6.1 tag and GitHub release from the CHANGELOG.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Added list (alias ls) command to display runs/sweeps with short references, type, and status.
    • Enabled partial/shortened run-id references for multiple commands, with automatic resolution and error handling.
    • Expanded --story argument to accept short references (e.g., 3-1), epic+number formats, and slug fragments.
  • Bug Fixes

    • Improved error messaging for story selection and run reference resolution with targeted mismatch feedback.
  • Documentation

    • Updated README and feature guides with new command documentation and run-id reference guidance.
  • Tests

    • Added comprehensive test coverage for run reference resolution and story selector parsing.

pbean and others added 4 commits June 20, 2026 22:23
`--story` now accepts more than the exact full key:
- `--epic 3 --story 1` / `--story 3-1` / `--story 3.1` -> epic 3, story 1
- `--story user-auth` / `auth` -> slug fragment (errors if not unique)
- `--story 3-1-user-auth` -> exact key (unchanged)

Adds StorySelector + parse_selector/select_actionable in sprintstatus,
routes engine._pick_next and cli run/dry-run through it, and surfaces
targeted errors (no match / ambiguous slug / matched-but-not-actionable)
before a run is launched.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Every command that takes a run id (status, attach, resume, resolve, stop,
delete, archive) now accepts a partial — the tail after the last `-`,
shortened to any unique prefix. Full ids still resolve exactly; an ambiguous
ref fails listing the candidates. Resolution funnels through a single
runs.resolve_run_dir helper, replacing the duplicated lookup at each site.

New `bmad-auto list` (alias `ls`) prints each run/sweep with its short ref,
type, and status, reusing the TUI's import-safe discover_runs.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Make RELEASING.md a local-only doc: remove it from version control and
gitignore it. Drop the two dead links to it from CONTRIBUTING.md so the
public contributing guide stays coherent.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jun 21, 2026

Copy link
Copy Markdown

Review Change Stack

Walkthrough

Version 0.6.1 adds two features: (1) partial run-id resolution via new short_ref/resolve_run_dir utilities in runs.py applied across all run-targeting CLI subcommands, plus a new list/ls command; (2) a StorySelector abstraction in sprintstatus.py supporting short-ref, slug-fragment, and epic+number --story formats in the CLI and engine. RELEASING.md is removed and version artifacts are bumped.

Changes

Run-ref resolution and story selector features

Layer / File(s) Summary
StorySelector and RunRefError contracts
src/automator/sprintstatus.py, src/automator/runs.py, src/automator/tui/screens/modals.py
Adds SHORT_REF_RE/BARE_NUM_RE regex constants, StorySelector dataclass with is_targeted/matches, parse_selector(), RunRefError, short_ref(), and resolve_run_dir(). TUI modal placeholder updated to list accepted story key formats.
select_actionable and Engine integration
src/automator/sprintstatus.py, src/automator/engine.py
Adds select_actionable() applying StorySelector with targeted-mismatch error raising. Engine.__init__ builds self._selector via parse_selector; _pick_next gates candidates through self._selector.matches(story).
CLI run-ref resolution, dry-run, and list command
src/automator/cli.py
Replaces direct run_dir construction with runs.resolve_run_dir + RunRefError handling across seven subcommands (resume, resolve, status, attach, stop, delete, archive). Dry-run paths use select_actionable. Adds cmd_list and registers list/ls alias via extended add() helper.
Tests for selector, run-ref, and CLI
tests/test_sprintstatus.py, tests/test_runs.py, tests/test_cli.py
Covers parse_selector edge cases (short ref, bare num, slug, conflict, missing-epic), select_actionable error paths, runs.short_ref/resolve_run_dir resolution including ambiguity and exact-wins cases, and CLI dry-run/status/list commands.

Version bump and release doc cleanup

Layer / File(s) Summary
Version bumps, RELEASING.md removal, and docs
pyproject.toml, src/automator/__init__.py, module.yaml, src/automator/data/skills/bmad-auto-setup/assets/module.yaml, .claude-plugin/marketplace.json, .gitignore, CONTRIBUTING.md, CHANGELOG.md, README.md, docs/FEATURES.md
Bumps version to 0.6.1 in all artifacts, adds RELEASING.md to .gitignore and removes its references from CONTRIBUTING.md, and adds changelog entry plus list/partial-run-id docs.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

🐇 Hop hop, the refs grow short and neat,
A slug or number, hard to beat.
bmad-auto list shows each run's name,
Partial ids? We play that game!
Version bumped, the changelog bright—
0.6.1 ships tonight!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 15.09% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely summarizes the three main features introduced in this release: short run refs, the list command, and flexible --story selection.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/0.6.1

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@augmentcode

augmentcode Bot commented Jun 21, 2026

Copy link
Copy Markdown
🤖 Augment PR Summary

Summary: This PR prepares the 0.6.1 release and expands the CLI’s run/story selectors for a smoother UX.

Changes:

  • Bumps version references to 0.6.1 across manifests and curates the CHANGELOG.
  • Adds “short run refs” so commands that take a run id can accept a unique suffix/prefix instead of the full id.
  • Introduces bmad-auto list (alias ls) to display runs/sweeps with short refs, type, and status.
  • Makes --story selection more flexible (E-S / E.S, bare number with --epic, or slug fragment) with targeted error messages.
  • Centralizes story selection logic in sprintstatus via StorySelector/parse_selector/select_actionable.
  • Adds run-ref resolution helpers in runs.py and updates affected CLI commands to use them.
  • Updates TUI placeholders/docs and adds tests covering the new selection/ref behaviors.

Technical Notes: The CLI now validates story selection before launching a run, and run-id handling is normalized to full ids once resolved.

🤖 Was this summary useful? React with 👍 or 👎

@augmentcode augmentcode Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review completed. 1 suggestion posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

Comment thread src/automator/cli.py


def cmd_list(args: argparse.Namespace) -> int:
from .tui.data import discover_runs # import-safe: data.py has no textual imports

@augmentcode augmentcode Bot Jun 21, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

src/automator/cli.py:640 — cmd_list imports automator.tui.data, but tui/data.py imports pyte and rich (and pyte is declared under the [tui] extra), so bmad-auto list will crash on minimal installs without TUI deps. Consider keeping list in the core dependency surface (or handling missing optional deps similarly to cmd_tui).

Severity: medium

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🧹 Nitpick comments (1)
tests/test_cli.py (1)

221-229: ⚡ Quick win

Strengthen list assertions to verify the short-ref column.

Line 227 can pass even if REF output regresses, since aaaa/bbbb are also present in full run IDs. Assert the row prefix (or first token) so the test validates the short-ref column itself.

Suggested test tightening
 def test_list_shows_short_refs(project, capsys):
     _make_run_with_decision(project, run_id="20260101-000000-aaaa")
     _make_run_with_decision(project, run_id="20260102-000000-bbbb")
     assert cli.main(["list", "--project", str(project.project)]) == 0
     out = capsys.readouterr().out
     assert "REF" in out
-    assert "aaaa" in out and "bbbb" in out
+    lines = [line for line in out.splitlines() if line.strip()]
+    data_lines = [line for line in lines[1:]]  # skip header
+    assert any(line.startswith("aaaa ") for line in data_lines)
+    assert any(line.startswith("bbbb ") for line in data_lines)
     assert "20260101-000000-aaaa" in out
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@tests/test_cli.py` around lines 221 - 229, The assertions in
test_list_shows_short_refs checking for "aaaa" and "bbbb" are too weak because
these strings also appear in the full run IDs, so the test would pass even if
the REF column regresses. Strengthen the assertions by checking for the short
refs as they would appear at the row prefix or first token level in the output
(for example, by verifying the presence of patterns like row headers or
column-aligned formats that would demonstrate the short-ref column is actually
functioning), rather than just checking if the substrings exist anywhere in the
output.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/automator/cli.py`:
- Around line 909-910: The add() function uses help as a parameter name which
shadows the Python builtin, triggering the Ruff A002 lint error. Rename the help
parameter to a non-builtin name such as help_text or description throughout the
add() function, and update all references to this parameter (including where it
is passed to sub.add_parser as the help argument) to use the new parameter name
consistently.

In `@src/automator/runs.py`:
- Around line 95-102: The run-ref resolution is vulnerable to path traversal
attacks because `ref` is passed directly to `run_dir_for(project, ref)` without
validation, allowing inputs like `../...` to escape the `.automator/runs`
directory. Validate or sanitize the `ref` parameter before using it in the
`run_dir_for` call to ensure it does not contain path traversal sequences (such
as `../` or leading slashes) and only contains safe characters that represent
valid run identifiers.

---

Nitpick comments:
In `@tests/test_cli.py`:
- Around line 221-229: The assertions in test_list_shows_short_refs checking for
"aaaa" and "bbbb" are too weak because these strings also appear in the full run
IDs, so the test would pass even if the REF column regresses. Strengthen the
assertions by checking for the short refs as they would appear at the row prefix
or first token level in the output (for example, by verifying the presence of
patterns like row headers or column-aligned formats that would demonstrate the
short-ref column is actually functioning), rather than just checking if the
substrings exist anywhere in the output.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 29fb9b59-30fc-40ee-92bd-9ff0ea39fb42

📥 Commits

Reviewing files that changed from the base of the PR and between fb7036f and 871636a.

⛔ Files ignored due to path filters (12)
  • docs/images/dashboard.png is excluded by !**/*.png
  • docs/images/dashboard.svg is excluded by !**/*.svg
  • docs/images/demo.gif is excluded by !**/*.gif
  • docs/images/settings-scm.png is excluded by !**/*.png
  • docs/images/settings-scm.svg is excluded by !**/*.svg
  • docs/images/settings.png is excluded by !**/*.png
  • docs/images/settings.svg is excluded by !**/*.svg
  • docs/images/start-run-modal.png is excluded by !**/*.png
  • docs/images/start-run-modal.svg is excluded by !**/*.svg
  • docs/images/sweep-decision.png is excluded by !**/*.png
  • docs/images/sweep-decision.svg is excluded by !**/*.svg
  • uv.lock is excluded by !**/*.lock
📒 Files selected for processing (19)
  • .claude-plugin/marketplace.json
  • .gitignore
  • CHANGELOG.md
  • CONTRIBUTING.md
  • README.md
  • RELEASING.md
  • docs/FEATURES.md
  • module.yaml
  • pyproject.toml
  • src/automator/__init__.py
  • src/automator/cli.py
  • src/automator/data/skills/bmad-auto-setup/assets/module.yaml
  • src/automator/engine.py
  • src/automator/runs.py
  • src/automator/sprintstatus.py
  • src/automator/tui/screens/modals.py
  • tests/test_cli.py
  • tests/test_runs.py
  • tests/test_sprintstatus.py
💤 Files with no reviewable changes (1)
  • RELEASING.md

Comment thread src/automator/cli.py
Comment on lines +909 to +910
def add(name: str, func, help: str, *, aliases=()) -> argparse.ArgumentParser:
p = sub.add_parser(name, help=help, aliases=aliases)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Rename help parameter in add() to fix Ruff A002.

Line 909 uses help as a parameter name, which shadows the Python builtin and triggers the reported lint error.

Suggested fix
-def add(name: str, func, help: str, *, aliases=()) -> argparse.ArgumentParser:
-    p = sub.add_parser(name, help=help, aliases=aliases)
+def add(name: str, func, help_text: str, *, aliases=()) -> argparse.ArgumentParser:
+    p = sub.add_parser(name, help=help_text, aliases=aliases)
🧰 Tools
🪛 Ruff (0.15.17)

[error] 909-909: Function argument help is shadowing a Python builtin

(A002)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/automator/cli.py` around lines 909 - 910, The add() function uses help as
a parameter name which shadows the Python builtin, triggering the Ruff A002 lint
error. Rename the help parameter to a non-builtin name such as help_text or
description throughout the add() function, and update all references to this
parameter (including where it is passed to sub.add_parser as the help argument)
to use the new parameter name consistently.

Source: Linters/SAST tools

Comment thread src/automator/runs.py
Comment on lines +95 to +102
exact = run_dir_for(project, ref)
if is_run(exact):
return exact
matches = [
d
for d in list_run_dirs(project)
if short_ref(d.name).startswith(ref) or d.name.endswith(ref)
]

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Prevent path traversal in exact run-ref resolution.

Line 95 trusts ref as a path segment (run_dir_for(project, ref)), so inputs like ../... can escape .automator/runs. If that escaped directory contains a state.json, this resolver will accept it, and downstream commands (e.g., delete/archive/stop) can act on the wrong location.

Suggested fix
 def resolve_run_dir(project: Path, ref: str) -> Path:
@@
-    exact = run_dir_for(project, ref)
-    if is_run(exact):
-        return exact
+    if not ref or Path(ref).name != ref or ref in {".", ".."}:
+        raise RunRefError(f"invalid run ref: {ref!r}")
+
+    run_dirs = list_run_dirs(project)
+    exact = next((d for d in run_dirs if d.name == ref), None)
+    if exact is not None:
+        return exact
     matches = [
         d
-        for d in list_run_dirs(project)
+        for d in run_dirs
         if short_ref(d.name).startswith(ref) or d.name.endswith(ref)
     ]
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/automator/runs.py` around lines 95 - 102, The run-ref resolution is
vulnerable to path traversal attacks because `ref` is passed directly to
`run_dir_for(project, ref)` without validation, allowing inputs like `../...` to
escape the `.automator/runs` directory. Validate or sanitize the `ref` parameter
before using it in the `run_dir_for` call to ensure it does not contain path
traversal sequences (such as `../` or leading slashes) and only contains safe
characters that represent valid run identifiers.

@pbean pbean merged commit c1b4edd into main Jun 21, 2026
7 checks passed
@pbean pbean deleted the feature/0.6.1 branch June 21, 2026 06:36
dracic added a commit to dracic/bmad-auto that referenced this pull request Jun 24, 2026
cmd_validate fell back to "on PATH" when the Windows multiplexer version probe (tmux -V) errored, falsely implying tmux was present. Report version-unavailable instead; a genuinely missing tmux is still surfaced by the existing PATH check.

Refs: _bmad-output/implementation-artifacts/deferred-work.md (deferred-work.md, Adversarial-review deferrals bmad-code-org#5)

Claude-Session: https://claude.ai/code/session_019ohWeC44Mto4upsYNNaVh8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant