Make ls status non-flag argument

This commit is contained in:
2026-05-14 22:32:17 +02:00
parent 7d40159959
commit 94da69a1b2
3 changed files with 9 additions and 13 deletions
+3 -4
View File
@@ -60,7 +60,6 @@ parameters:
type: string
required: false
description: "Filter by status (backlog, committed, reviewing, done)"
cli_flag: "--status"
```
Example adding a ticket:
@@ -93,7 +92,7 @@ Example listing tickets:
input:
status: "backlog"
output: >
worklane ls --status backlog
worklane ls backlog
```
Example listing all tickets (no filter):
@@ -168,7 +167,7 @@ When creating a Worklane ticket, the agent MUST:
The `worklane ls` command lists tickets. Use it to check the state of tickets:
* `worklane ls` — lists all tickets grouped by status without filtering
* `worklane ls --status <STATUS>` — filters tickets by status
* `worklane ls <STATUS>` — filters tickets by status
Valid statuses: `backlog`, `committed`, `reviewing`, `done`
@@ -177,5 +176,5 @@ Valid statuses: `backlog`, `committed`, `reviewing`, `done`
When checking ticket status or filtering work, use `worklane ls` rather than reading from file paths directly. This ensures consistent access to ticket data.
Example patterns:
* Check backlog items: `worklane ls --status backlog`
* Check backlog items: `worklane ls backlog`
* View all tickets: `worklane ls`
-1
View File
@@ -47,7 +47,6 @@ pub enum Command {
/// List tickets, optionally filtered by status
Ls {
/// Filter by status (backlog, committed, reviewing, done)
#[arg(long)]
status: Option<String>,
},
+6 -8
View File
@@ -94,9 +94,7 @@ fn ls_with_status_filters_tickets() {
create_ticket(&worklane, "reviewing", "Feature C", "charlie", "2026-08-01");
let mut cmd = Command::cargo_bin(BIN_NAME).unwrap();
cmd.current_dir(&temp.path())
.arg("ls")
.args(["--status", "committed"]);
cmd.current_dir(&temp.path()).arg("ls").args(["committed"]);
cmd.assert().success();
@@ -111,7 +109,7 @@ fn ls_with_invalid_status_fails() {
let mut cmd = Command::cargo_bin(BIN_NAME).unwrap();
cmd.current_dir(&temp.path())
.arg("ls")
.args(["--status", "nonexistent"])
.args(["nonexistent"])
.assert()
.failure();
}
@@ -128,7 +126,7 @@ fn ls_listed_tickets_sorted_alphabetically() {
let mut cmd = Command::cargo_bin(BIN_NAME).unwrap();
cmd.current_dir(&temp.path())
.arg("ls")
.args(["--status", "backlog"])
.args(["backlog"])
.assert()
.success();
@@ -144,13 +142,13 @@ fn ls_listed_tickets_sorted_alphabetically() {
#[test]
fn ls_empty_status_shows_message() {
let temp = TempDir::new().unwrap();
let worklane = setup_worklane(&temp);
let _worklane = setup_worklane(&temp);
// Intentionally leave "done" empty
let mut cmd = Command::cargo_bin(BIN_NAME).unwrap();
cmd.current_dir(&temp.path())
.arg("ls")
.args(["--status", "done"])
.args(["done"])
.assert()
.success();
@@ -168,7 +166,7 @@ fn ls_displays_owner_and_due() {
let mut cmd = Command::cargo_bin(BIN_NAME).unwrap();
cmd.current_dir(&temp.path())
.arg("ls")
.args(["--status", "backlog"])
.args(["backlog"])
.assert()
.success();