Commit Graph
27 Commits
Author SHA1 Message Date
Ansho ReiandClaude Opus 5 54569b2c85 Require a version bump decision before every commit
Records the rule in the Git Workflow section: decide whether a change
warrants a bump, ask before making one, no bump for docs, tests or
fixups, and bump once on the final commit when work spans several.

Docs only, so no bump for this one.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-20 14:54:43 +02:00
Ansho ReiandClaude Opus 5 32a43b5201 (c28bc04) Report the version and the commit it was built from
worklane --version exited 2: the Cli derive set name and about but never
version, so clap generated no flag. Nothing could say what a given binary
was, which matters here because the opencode tools shell out to whatever
worklane is on PATH, so an agent can be driving a stale build with no way
to notice.

The crate version alone would not have answered it. Cargo.toml is pinned
at 0.1.0 and nobody bumps it per install, so a stale install and a fresh
build both claim the same thing. A build script stamps the short sha
alongside it, giving "worklane 0.1.0 (df97b06)", and falls back to
"unknown" where there is no git directory, as when installing from a
published crate.

propagate_version lets subcommands answer too. This overrides the ticket's
own plan step, which said to skip the sha if it needed a build script.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
v0.1
2026-08-20 14:48:37 +02:00
Ansho ReiandClaude Opus 5 df97b06275 (3e8b6fa) Relay worklane's own error text from the opencode tools
None of the five tools could report why a command failed. mv and comment
spawned without stderr set, and Bun defaults it to inherit, so the text
went to the plugin host and never to the model. show, ls and init used
Bun.$, whose ShellError message is only "Failed with exit code 1", and
each of them interpolated just that message. The CLI explained itself
every time and nothing carried the explanation.

Replace all four spawn and Bun.$ blocks with one run() helper that pipes
both streams and throws with stderr, and strip anyhow's "Error: " prefix
so a relayed message does not read "Error adding comment: Error: ...".

Verified against the real binary with a Bun.spawn shim over node's
child_process, since bun is not installed here: an ambiguous show, mv and
comment now each return the candidate list to the caller. The file is
twenty lines shorter than the duplication it replaces.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-20 14:10:11 +02:00
Ansho ReiandClaude Opus 5 a434f82928 (665719e) Report an ambiguous search as an error, not a print and exit
resolve_ticket printed the candidate list to stdout and called
process::exit(1) from inside a helper. That combination is the one thing
the opencode wrapper cannot relay: it throws on the non-zero exit and
keeps stderr, so the list was thrown away and the agent saw a bare exit
code with nothing to choose from.

Return an error carrying the rendered list instead. It reaches stderr the
way every other error does, the exit code stays non-zero so `show x && ...`
still fails, and no process::exit remains in util.rs.

The wrapper half, which was dropping stderr on the floor regardless,
follows in 3e8b6fa.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-20 14:10:02 +02:00
Ansho ReiandClaude Opus 5 c675da1d2a (7ac39e3) Fix byte-slice panics in id shortening and date formatting
Three places sliced strings by byte offset on values that come from a
filename or a file field, neither of which is validated.

The disambiguation list took &short_id[..7], so two tickets whose names
were shorter than that aborted the process while printing the options.
collect_ticket_items guarded on length but still cut at byte 7, so a
multibyte character straddling the cut panicked. format_created_at read
four fixed offsets after a length check that a multibyte value passes.

Add short_id, which counts characters, and use it in both display paths.
Parse the timestamp with chrono instead of slicing, dropping the column
when the value will not parse. The format string it writes and the one it
reads are now the same constant, so they cannot drift.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-20 13:56:10 +02:00
Ansho ReiandClaude Opus 5 8ff64614fc (c230d2c) Fix mv corrupting the Status metadata field
cmd_mv spliced the metadata line by byte offset and wrote the field name
as **-Status**, because the format string re-added the "- " prefix that
the preceding slice already carried. parse_ticket_field could never read
Status back, and the next move failed to find "- **Status**" so it
silently skipped the rewrite, leaving the ticket in one status directory
while its metadata claimed another.

Replace the splicing with set_status_field, a line based rewrite that
keeps every other line verbatim, inserts no stray newline, and errors
when the Metadata section has no Status field. It also accepts the
**-Status** spelling so tickets damaged by the old code are repaired as
they move.

The content is now computed before the rename, so a ticket without a
Status field is never half-moved.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-20 13:33:44 +02:00
Anshorei 12f34a3442 Fix 'add' tool command 2026-08-20 13:20:15 +02:00
Anshorei bcb24f1fa6 Attempt to fix the tool 2026-05-16 02:19:54 +02:00
Anshorei 31421ff103 Execute tool calls in worktree root 2026-05-15 22:04:58 +02:00
Anshorei 73e5aee2a2 (415e1c3) Fix worklane.ts tool when passed multi-line args 2026-05-15 20:59:29 +02:00
Anshorei 2a96abd3b0 (bdfd5f2) Apply color guidelines to codebase 2026-05-15 19:11:05 +02:00
Anshorei 75e9ea2309 (1240895) Add colour to disambiguation 2026-05-15 17:21:43 +02:00
Anshorei dd5692d0a3 (724dc03) Add -o <owner> flag to comment subcommand 2026-05-15 16:32:03 +02:00
Anshorei 443586a583 (523c9fe) Split monolithic main.rs file 2026-05-15 16:07:02 +02:00
Anshorei 01e2daca13 Update agents file 2026-05-15 13:10:38 +02:00
Anshorei cd19e4e6cf (a0dc5e3) Display comments under worklane show 2026-05-15 12:00:22 +02:00
Anshorei bc3ee0c53b (339c65a) Add comment command 2026-05-15 11:11:40 +02:00
Anshorei a1bf4df880 (dd8a0c9) Add git user as default owner 2026-05-15 02:42:50 +02:00
Anshorei aef8002d23 (101c2444) Add colours to ls command 2026-05-15 02:18:04 +02:00
Anshorei d668a24a3d (0b1a129) Add the mv command 2026-05-15 01:52:59 +02:00
Anshorei e29616d30f The ls subcommand now shows created_at before uuid 2026-05-15 00:46:15 +02:00
Anshorei 899920e875 (94a9d69) Add colours to show output 2026-05-15 00:10:21 +02:00
Anshorei 26807621ae (3a68c7) Add created at timestamp 2026-05-14 23:10:04 +02:00
Anshorei 94da69a1b2 Make ls status non-flag argument 2026-05-14 22:32:17 +02:00
Anshorei 7d40159959 (e97d55) Add show command 2026-05-14 22:28:00 +02:00
Anshorei fd216b056c (177665) Add ls command 2026-05-14 21:37:11 +02:00
Anshorei 17a02b906e Initial commit 2026-05-14 20:41:40 +02:00