Commit Graph
40 Commits
Author SHA1 Message Date
Ansho Rei 60b43a682e (a136d13) Draw the discarded column behind a three-state visibility rotation, and bump to 0.31.1 2026-08-25 03:33:38 +02:00
Ansho ReiandClaude Fable 5 5bf0fd1bfe (451fb83) Add a discarded status for work that will not be done, and bump to 0.31.0
The flow ended at done, so a ticket that turned out to be a duplicate or
obsolete had nowhere to go: it sat in the backlog or was deleted by hand,
which destroyed the record and left every relation to it dangling. Discarded
is a fifth status with its own directory, keeping the invariant that the
filename, the Status field and the directory agree, and keeping done meaning
the work landed.

Entering it is allowed from any status without -f, because discarding is not
a stage of work. Discarded sits last in Status::ALL, which is what makes the
rest fall out rather than needing cases: nothing follows it, so a discard
clears no stamp and a ticket abandoned from reviewing keeps the journey it
made, and every move out is a backward move, so un-discarding needs -f.

The two dependency guards now look opposite ways. check_blockers asks what a
ticket waits on and gates work moves; check_dependents asks who waits on it
and gates the discard, because those plans depended on work about to be
declared never-happening. Both skip targets that are themselves terminal.

Status::FLOW is the four stages the board draws, so a discarded column on
screen stays a136d13's ticket and done stays the last drawn column. Every
tree walker keeps using Status::ALL, or a discarded ticket would be
unaddressable.

util::is_open replaces three spellings of "not done and not discarded",
across mv, ls and the campaign standing. The board's blocked mark goes
through it as well: that path was only accidentally correct, since a
discarded blocker is absent from the FLOW columns, and drawing the column
later would have diverged it from what mv allows.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-24 19:44:14 +02:00
Ansho ReiandClaude Opus 5 f454d212a4 (d4ce964) Record status, owner and tag changes in a history log, and bump to 0.29.0
The comments directory was already an append-only log with one event
kind. It is now .worklane/history/<uuid>/, with the kind in the entry
and in the filename after the stamp, so a ticket says how it got where
it is and not only what was said about it.

mv, chown and set --tags each write an entry after their own save and
behind their own no-change return, so a refused or no-op edit records
nothing. --actor is on all four writers now. An old comments directory
is adopted on first access and a file with no marker reads as the
comment it is, so nothing is migrated or rewritten.

The log moves to src/history.rs, out of util.rs and handlers.rs, and
the card's counter counts comments only: a ticket that has moved three
times has not been talked about.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-24 13:19:09 +02:00
Ansho ReiandClaude Opus 5 a1bdb5df49 (87862df) Attribute an entry to WORKLANE_ACTOR, not to the git user, and bump to 0.28.0
Every comment the CLI wrote was attributed to the git user, so a board
several agents write to read as a list of things one human had done.
resolve_actor is now the single source: flag, then WORKLANE_ACTOR, then
get_git_user(), then unknown.

comment --owner is renamed to --actor with no alias, since it names the
writer of the entry and not the ticket's assignee, which is chown's.
add --owner and campaign add --owner still default to the git user.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-24 12:34:51 +02:00
Ansho Rei 407cb14fe6 (e6e3a1b) Guard the README command table against a missing row
The campaign and assign rows landed with 528566d. What was left was the
checking, done here against the built binary rather than against the
ticket that added them.

The campaign ls row was incomplete: the listing also prints the derived
state, [open] until every member is done and [done] after, and reads
"no members" with no state for a campaign nothing has been filed
against, which is neither. Corrected.

every_subcommand_has_a_row_in_the_readme_command_table walks clap's own
subcommands, one level of nesting included, against the table's rows.
Two commands hid behind an otherwise complete table for two minor
versions because the only thing walking it was somebody remembering to.
The tag subcommands are named in a PENDING list rather than skipped,
since f7dd1a1 rewrites that row.
2026-08-24 11:28:32 +02:00
Ansho Rei 26b93f8f53 Add Makefile 2026-08-24 11:03:28 +02:00
Ansho ReiandClaude Opus 5 3592584747 Edit a campaign's description, and bump to 0.27.0
`campaign set` reached the title and the codename, so the description a
campaign was filed with was the description it kept: fixing a typo in the
one field nothing could edit meant a hand edit of the file, or refiling the
campaign and reassigning every member.

Both halves arrive together, which is why d637288 left this out rather than
adding the flag. `campaign set --description` replaces the section and
`campaign append --description` adds a paragraph to it, because a `set` with
no `append` is the half that is easy to reach for and wrong: replacing a
description to add a sentence is how the rest of it gets lost.

`append` is a campaign's own subcommand rather than the top-level one, which
resolves a ticket. `resolve_in`'s tiers are the same over both directories,
so one positional naming either object could resolve in each with nothing
but a flag to say which was meant, and it would make a liar of the
explanation `resolve_ticket` gives a ticket search that names a campaign.

The section is the `DESCRIPTION` entry and the surgery is
`set_section_body`, `append_section_body` and `Section::normalise`, not a
copy scoped to campaigns. `SECTION_ORDER` needs no campaign variant: a
campaign holds one section where a ticket holds four, and the followers a
campaign does not have are simply not in the file, so its description
anchors against `## Metadata`, where `campaign_body` writes it.

Still no `--clear`, and that is now a decision rather than a deferral: a
campaign's description has no cleared form, so an empty `--description ""`
is a paragraph break here as it is everywhere else, and the refusal for an
all-blank value says there is nowhere to go back to instead of naming a flag
that does not exist. `replaced_items` and `appended_items` hold that check
once for both objects, with the way out as the caller's argument.

The section refusal no longer says "Ticket", since a campaign reaches it
too.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-24 04:53:49 +02:00
Ansho ReiandClaude Opus 5 dd2b457bff (9b7fa7d) Expand the campaign frame with enter
Three rows of prose was the right default and the wrong ceiling. enter
while the frame holds the selection gives it half the board, enter again
gives the rows back, and pgup and pgdn go on doing what they do against
whichever height it is at.

Half of what the frame and the columns divide, which is the screen less
the tab row and the footer. Half rather than most of it for the same
reason the frame is not an overlay: the columns below are the campaign's
members, and a reader inspecting the campaign has to go on seeing what
it is made of. So `Chrome::campaign` is an `Option<FrameSize>` rather
than a bool and `campaign_rows` takes a height, resolved in `frame_rows`
because that is the one place that already has an area to take a share
of, which keeps `Chrome` itself pure.

Bounded at both ends, and the upper bound is the one that matters:
`Constraint::Min(COLUMN_MIN_ROWS)` would take rows back from a frame
that asked for too many, silently, and the frame's own measurement would
then disagree with what is drawn. Floored at the collapsed height, since
expanding must never shrink the frame, so a board too short to divide
gives the collapsed height back rather than one nothing measured. Swept
over every height from 4 to 60, tabbed and not.

q does not gain a layer and the arrow keys do not take the height back.
The expanded frame is the frame at its other height, not a thing laid
over the board, so q goes on taking the campaign filter off from either
and enter is the only key that undoes what enter did. The height
outlives the selection for the same reason: it is a view of the campaign
the reader chose, so the columns stay short with the selection on a
card. `dismiss` and `select_card` are untouched, and two tests pin that.

`enter` routes through `Board::toggle_focused` rather than in the
`main.rs` arm, the rule `dismiss` and `scroll_page` follow. It was inert
on the frame for free before, because `Tab::selected` hands back nothing
there and `toggle_detail` had nothing to open; that answer is now the
thing in the way, and AGENTS.md and `Tab::selected`'s doc are amended
rather than left describing the key by what it used to do.

The toggle re-clamps the frame offset through `scroll_frame(0, screen)`.
A taller viewport has a smaller last offset, so where the reader was can
end up past the end of the frame they just asked for, and the next pgup
would count down from a number the frame never showed.

Criterion 13 is not done: 2a83bd4 has not landed, so there is no tag
frame to give a second height to. What it inherits is on the ticket, and
all of it is generic rather than campaign-specific.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-24 03:08:39 +02:00
Ansho ReiandClaude Opus 5 af1ef1f97f (ebad2fa) Scroll the campaign description in the frame above the board
The frame showed the opening line of a description and the rest was only
readable through `campaign show`, which means leaving the board. It now
holds three rows of prose and pages through the remainder on `pgup` and
`pgdn`, reached by going up past the top card of a column.

Four decisions rather than four edits:

`section_prose` replaces `section_opening`. The campaign file is only in
hand while the campaigns directory is being read, so that read carries
the whole description and `CampaignRow::summary` takes the picker's one
line back off it. Two fields, one cut from the other, would be two
strings free to come from different reads of the same file.

`CAMPAIGN_PROSE_ROWS` is a constant. Fitting the frame to the
description would resize every column whenever the filter changed, so
the height is fixed at three rows and scrolling covers the rest. Two
more rows of cards spent than the one row cost.

`Focus` is the third place the selection can be, held on `Tab` beside
the filter and the new `frame_offset`. Every key that acts on a card
answers for it: `enter` is inert because `Tab::selected` hands back
nothing there, `left` and `right` are inert because the frame spans the
board, and `y` copies the campaign's short id, so `y copy id` means the
id of the selected thing in every state. No card is drawn reversed while
the frame holds the selection, since that highlight is what says which
ticket a key is about. The frame is out of reach from under an open
ticket, where up and down step through tickets and the overlay follows.

`Board::scroll_page` holds the precedence, not the `main.rs` arm: an
open ticket keeps both keys whatever holds the selection behind it, the
rule `dismiss` follows for the same reason. The page indicator, the
step and the clamp are the overlay's `page_indicator`, `scroll_step` and
`last_offset`, so the two places a reader presses these keys behave the
same. The indicator sits beside `q board` rather than up beside the
title, which would shorten a long campaign name whenever its
description grew.

Criterion 11 is not done: 2a83bd4 has not landed, so there is no tag
frame to give the same treatment. The model it inherits is in place and
named on the ticket.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-23 17:47:09 +02:00
Ansho ReiandClaude Opus 5 8e2ab6332c (8c8a520) Ship a board administration skill, and bump to 0.26.1
Three skills taught the CLI, the review and the grooming sweep. Nothing taught
the board itself, and two jobs fell in the gap: deciding what the tags are, now
that `tags add` and `tags set` exist to declare them, and putting a board back
together when its files and fields disagree.

`worklane-admin` is the fourth. It is the one asset written to hold for a board
that tracks no software, since a vocabulary skill built around `bug` and `cli`
teaches nothing to a board tracking a household, so its worked examples span a
tool, a product strategy and a house. Tags as axes rather than as a pile of
words, what an annotation has to say to stop drift, which is the boundary
against the neighbouring tag and not the definition, and the fact that renaming
a tag means rewriting the Tags field of every ticket carrying it.

The repairs are by symptom and every one was run against a scratch board
rather than reasoned from the source, which is what the ticket demanded and
what turned up the one that matters: a ticket whose file sits in `done` while
its Status field says `backlog` cannot be repaired by one `mv`, because `mv`
reads the current status from the directory and refuses the target it is
already in. Two moves fix it. That is 7f772a7. Verifying also turned up that
nothing removes a relation, 8556048.

The line against `worklane-plan` is drawn in both documents: this one decides
the vocabulary, that one applies it across tickets.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-23 16:24:38 +02:00
Ansho ReiandClaude Opus 5 154ffbdeb3 (001b639) Show the comment count on a board card, and bump to 0.24.1
A card had four corners and none of them said whether anybody had written
anything on the ticket. Finding out meant opening the detail view or running
`show`, which is the question the board exists to answer before you commit
to a card rather than after.

The count goes in the bottom right, left of the criteria count. Both are
about the ticket rather than about the reader, and the criteria count is what
that corner has always been: this is what has been added beside it, so it is
what sits further from the edge and what goes first when the column is
narrow. How far along a ticket is outranks whether somebody has said
something about it.

`corner_line` takes the whole right-hand group now instead of one span, and
the group gives up its items from the front until what is left fits. With one
item that is exactly the old behaviour, which is what the top row still
wants, so `due_span` returns a `Span` rather than the `Option<Span>` it only
ever had to satisfy the signature. The single space between items lives in
`corner_line` beside the gap arithmetic, not in the caller: the same reason
`column_areas` is shared between the draw and `follow_selection`, that
geometry reproduced by hand drifts from the draw.

`comments` is a field on `TicketItem`, filled where `criteria` and `tags`
already are, and it is the one entry on that pass that costs a directory
listing rather than coming off content in hand. So it is counted, never read:
`.md` only, the filter `read_comments` applies, and no body is opened,
because a count needs none of them. The alternative was a `read_dir` per
ticket per frame.

`collect_ticket_items` derives the board from `status_path.parent()` rather
than taking it as a second argument. Every caller joins a status onto a board
it already holds, and two arguments would let a status directory from one
board arrive with the comments of another. `comments_dir` now spells that
path once for the writer, the reader and the counter, the way `campaigns_dir`
does for its directory.

Zero draws nothing, not a `0` and not a blank cell held open. An uncommented
card is the row it has always been, down to the spacing, which is pinned
exactly rather than by a `contains`.

The mark is U+275E, a Dingbat, and the choice is about arithmetic as much as
reading. U+1F4AC SPEECH BALLOON is emoji presentation and East Asian Width
Wide, so it draws two cells where `spans_width` counts one character and
every corner on the card lands a cell out. U+1F5E8 LEFT SPEECH BUBBLE is
text presentation and Neutral but sits in a pictograph block most terminal
fonts leave as tofu. This one has the coverage the priority meter's Geometric
Shapes have. Cyan, and the only coloured thing on a row whose owner and
criteria count are grey: two counts side by side otherwise read as one number
in brackets and another that lost its brackets.

The no-per-draw test takes the comments directory away after the board is
built, and is paired with one that adds a comment and reloads, because a
count that never asked the filesystem again would pass the first by never
changing at all. The digest already moved on a new comment, so the reload is
what recounts.

Patch rather than minor: the corner was already two numbers and a mark, and
this settles what it says rather than adding a view.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-23 14:45:02 +02:00
Ansho ReiandClaude Opus 5 11145b228e (c092ea7) Ship the opencode tool definitions with the binary, behind install-tool
`.opencode/tools/worklane.ts` was the second agent asset and the only one
that existed nowhere but a checkout. `cargo install` places binaries and
nothing else, so anyone who installed worklane got the skills and never the
tools, and the copy that did exist was reachable only from this repo. It is
now `assets/TOOL.ts`, embedded with `include_str!` like every other asset,
and `install-tool` writes it where opencode looks.

Its own command rather than a flag on `install-skill`, because the two
artifacts are not alike. A skill is inert markdown and one path serves both
agents. The tool is executable TypeScript and serves one: Claude Code has no
directory it scans for a tool definition, `claude mcp add` is the only way a
tool enters its list, and its plugin system adopts agents, hooks, monitors,
workflows, output-styles and themes and nothing named tools. Reaching it
would mean an MCP server, which is a different artifact and not this file.
So somebody on Claude Code takes the documents and never the wrapper, which
is the choice this command exists to give them.

The path was measured rather than guessed, as the ticket asked. 1.15.10
loads `~/.config/opencode/tool/` and `~/.config/opencode/tools/` both: each
was served in turn from a directory outside any project and
`/experimental/tool/ids` came back with all eleven worklane tools. Singular
is the target, the spelling opencode's own documentation puts first the way
it writes `agent(s)` and `skill(s)`. `tools_root()` follows
`XDG_CONFIG_HOME` where `skills_root()` does not, because opencode's config
root is an XDG path and `~/.claude` is not; `opencode debug paths` reports
`$XDG_CONFIG_HOME/opencode` with it set. An empty value counts as unset, the
convention `colors_wanted` already follows.

`opencode_tool_dir` takes both variables as arguments for the reason
`colors_wanted` does: a threaded test binary cannot mutate the process
environment to reach one branch at a time.

The file name is load bearing and now pinned by a test. opencode builds each
tool id as the file name then the export, so `worklane.ts` plus eleven
`export const` lines is what makes them `worklane_add` through
`worklane_uncheck`. Renaming the file renames every tool and every
permission rule naming one.

The closing line is not the skills' "on their next session". opencode reads
its config once at startup and never reloads it, so a running one keeps the
tools it began with and the honest instruction is to restart it.

Nothing else has to be installed, which is worth saying because the file is
executable and reads as though it wants a toolchain. Criterion 6 asked the
command to name the plugin package and Bun as runtime requirements and both
are wrong: a copy in a project with no `node_modules` above it registered
all eleven tools on a machine with no `bun` on `PATH`. opencode is a Bun
binary and the import resolves inside it. The message says the opposite, and
the reasoning is on the ticket.

`install_each` is the outcome loop both commands now share, with the
compare-and-refuse invocation passed in: that line is the only part of an
outcome that has to name the command it came from. What each command says
after the loop stays with the command.

`every_tool_the_wrapper_exports_is_a_real_subcommand` guards the direction
that breaks at call time, a tool wrapping a command that has been renamed or
dropped. Deliberately not the reverse: the wrapper has no tool for `relate`,
`campaign`, `assign` or `tags`, so an agent holding the tools cannot reach
campaigns or relations at all, and a test asserting that gap would fail on a
decision nobody has taken rather than on a mistake. Its own ticket.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-23 14:14:14 +02:00
Ansho ReiandClaude Opus 5 95426e87be (d637288) Guard an existing codename behind --force, and bump to 0.21.1
`campaign set --codename` replaced whatever was there. Once a campaign has
a codename it is referred to by it -- on every card in the campaign, at the
command line, and in somebody's shell history -- so changing it silently is
the mistake `install-skill --force` exists to prevent.

So it is refused, and the refusal names both words and the flag rather than
leaving it to be found. Checked before any edit is applied, like
`SetArgs::contested`, so a call also carrying `--title` writes neither
field rather than half of what was asked for.

Setting the codename a campaign already carries stays a no-op rather than
becoming a refusal: `--force` is about overwriting a *different* word, and
there is nothing to overwrite. That is the division `install::Outcome`
already draws between `Unchanged` and `Refused`.

`--force` guards the codename alone. A campaign always has a title, so
guarding that would mean the flag was always required, which is a tax
rather than a guard.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-23 12:28:40 +02:00
Ansho ReiandClaude Opus 5 72dbdec2ec (d637288) Add campaign set, and bump to 0.21.0
`campaign add --codename` was the only writer of the field, so a campaign
already on the board could not be given one without editing the file by
hand -- which is every campaign filed before 0.20.0.

A `campaign set`, not a flag on something narrower: the file has more than
one editable thing, and the moment somebody wants to fix a typo in a title
there would be a second command to design. It carries `--title`, which
renames the file the way `set --title` does, and `--codename`, through the
same parser `campaign add` takes. Built out of `set`'s own parts --
`set_title`, `apply`, `report`, and the whole-file no-op comparison -- so
nothing about writing a field lives twice.

The codename goes through `set_or_insert_metadata_field` rather than
`set_metadata_field`: a campaign filed before the field existed has no such
line, and those are exactly the campaigns this is for. That exposed a
second thing -- `Codename` was not in `METADATA_ORDER`, so an inserted line
landed at the end of the block while `campaign_body` writes it under the
ID, two shapes of one file. It is in the list now, directly after ID.

`save_ticket` split into `save_entry` with `save_ticket` and
`save_campaign` as named wrappers, so a campaign gets the same write-then-
rename a ticket has rather than a second copy of it. `write_then_replace`
and `find_entry_file` take the noun, so a failure says "campaign" where it
is one.

No `--description`, filed as 32e98ab: `set` and `append` are a pair for a
prose section, and replacing a description with no way to add a paragraph
is the half that loses the rest of it. No `--owner` and no `--clear`, each
for a reason recorded on the ticket.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-23 12:22:59 +02:00
Ansho ReiandClaude Opus 5 528566d103 (61879a4) Surface campaigns on the board, and bump to 0.20.0
A card label and a frame, not a campaign tab. A tab had to say what its
columns are, and a campaign groups across the flow rather than within one
status, so the answer is the four columns filtered: a filter on the board
it already has, not a fifth tab.

So a card names its campaign on the label row, before the tags, marked ~
and bold, and the row drops the tags whole before it drops the campaign.
`c` opens a picker; taking a campaign filters every column to its members
and draws a frame above them carrying the id, the codename, the name, the
opening line of the description and the standing. The standing comes from
the columns, since while a campaign is selected the columns are its
members. `q` takes off one layer at a time: the overlay, the filter, the
board.

The label needs something to say, which the stored uuid is not, so
campaigns gained `Codename`: one word, `v1` or `beaver`, written by
`campaign add --codename` and validated at parse time. `campaign ls`
prints it and `resolve_in` gained an exact-codename tier above the uuid
prefix, or it would be a field you can read and cannot type. Only
campaigns carry the field, so the tier is empty for a ticket and ticket
resolution is unchanged.

The campaigns index is read once per project in `columns_of`, on the pass
that already builds the cards, and `digest` now watches the campaigns
directory: without it a campaign filed elsewhere never reached the picker.
`frame_rows` grew a row, so the two bools deciding the geometry became one
`Chrome` and the row indices are named.

Left out and filed as d637288: nothing can give a codename to a campaign
that is already on the board.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-23 12:09:07 +02:00
Ansho ReiandClaude Opus 5 c65e1b4ed7 (55ee6e3) Complete campaigns and tags, and bump to 0.19.0
Every argument naming a campaign or a tag fell through to nothing: `campaign
show <TAB>`, `assign <TAB>`, `ls --campaign <TAB>` and `ls --tag <TAB>`. Neither
value had a listing a completion could parse.

`campaign ls --ids` is the same flag and the same two fields as `ls --ids`,
since it answers the same question about a different object. It skips the member
counting the decorated listing does, because `members()` reads every ticket on
the board and the caller is a shell on a keypress, and it prints nothing on an
empty board where the decorated listing prints a sentence.

Tags get a command rather than a mode on `ls`. `ls --tag <tag>` answers what
carries a tag and cannot answer what tags exist, which is the question a
grooming sweep starts from, and a `--tags` beside a `--tag` is one letter from a
filter that means something else. `worklane tags` prints the tag, a tab and the
count, alphabetical and case sensitive like the filter, so `bug` and `Bug` list
separately and land next to each other. assets/PLAN.md used to tell the agent to
count the vocabulary with a `show` per ticket; it now points here.

The fish half gains `__worklane_nested_arg_of`, which matches a parent and a
child, because `campaign show <TAB>` and `chown alice <TAB>` sit at the same
token count and the two counting helpers cannot tell them apart.

It also gains `__worklane_command_is`, which fixes a leak the campaign and tag
rules would have joined. A bare `complete -c worklane -l tag` does not only
complete that option's values, it tells fish the whole tool accepts `--tag`:
`worklane init --<TAB>` offered `--blocked-by`, `--regression-of`,
`--relates-to` and three others. `relate`'s three were already leaking that way,
so all of them are scoped now rather than leaving a correctly scoped twin beside
a wrong one. `__fish_seen_subcommand_from ls` is not the scope to use, since
`campaign ls` is an `ls` fish has seen.

The honesty tests grow to five lists and one walker, `every_argument`, since
they differ only in the id they look for. Each asserts how many arguments it
found, so a walker that stopped finding them fails rather than passing every
assertion by never running it.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-23 01:16:51 +02:00
Ansho ReiandClaude Opus 5 cc5f9b8a46 (74904dc) Let a ticket field be cleared back to unset, and bump to 0.18.0
`set --clear <field>` is the one way to take a value away, repeatable, with
the field as a `ValueEnum` value: an unknown one is a usage error listing the
six that are not, and the shells complete them for free. Not a per-field
`--clear-due`, which is a flag per field to keep in step with the one it
undoes, and not an empty value, which is already a paragraph break for a
section and would make an accidentally empty variable a silent delete.

What goes back is what `add` writes for a field it was never given, through
the new `NOT_SET` and `NONE` constants and each section's placeholder, so a
cleared ticket and one filed without the field read the same. Sections are in
scope and go back through `clear_section_body` rather than
`set_section_body`: the latter runs its items through `Section::render`, which
would have written `- [ ] _No acceptance criteria provided._`.

Owner is `chown --clear <ticket>`, so the field keeps its one writer. The flag
carries the ticket because the ticket is chown's second positional and a bare
flag would land it in the user's slot for the handler to read back out, which
is hand-parsing what clap can state. It writes `_Not set_` rather than the git
user: `add` falls back to the git user because it is filing something new, and
an owner taken away says nobody owns this.

The empty-value error split in two rather than being reworded. `non_empty`
says only that the value cannot be empty, for the arguments with no empty
form; `clearable` names `--clear`, for the arguments whose field has one. One
message for both would have lied about `ls --tag`.

Replacing and clearing one field in a single call is refused rather than
resolved by whichever was applied last, and cleared fields are reported as
`Cleared due on '...'` beside `Updated priority on '...'`, since one list
would say `Updated` of a field that was emptied.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-23 00:04:28 +02:00
Ansho ReiandClaude Opus 5 373ba519b3 Add a worklane completions command, and bump to 0.17.0
Every argument worklane takes names a ticket, a status, a shell or a skill, and
the shell offered a directory listing for all of them. `completions <shell>`
prints a script for fish, bash, zsh, elvish and powershell, following what frig
does, which is where the shape of this comes from.

Two halves, because neither alone is enough. `clap_complete` generates the
structure from the clap definition, so a flag added to `command.rs` is completed
without anyone touching `completions.rs`, and fish gets a hand-written block
appended for what only the board knows. That block runs `worklane ls --ids` in a
command substitution, one run per keypress, 2.5ms in release on a board of
seventy-five tickets.

A status is a `util::Status` value enum now rather than a string, which was the
plan's third step and pays for itself three ways. clap refuses an unknown one at
parse time naming the four, so `cmd_mv`'s `valid_statuses` and the status half of
`cmd_ls`'s error are gone and exit 2 is what an unreal status gets, the bargain
`--due` and `--priority` already take. `status_dirs()` and `DONE` are derived
from `Status::ALL`, so the flow is written once. And clap emits the four for `mv
--status` itself. Only half free: the fish generator emits nothing for the
possible values of a *positional*, so `ls <status>` and `completions <shell>` are
listed in the appended half after all, read off the enums with `possible_values`
rather than by hand.

`ls --ids` is the machine-readable listing, and prints the short id, a tab and
the title rather than the id alone. Both readers want both fields: fish takes
what follows a tab as the description, which is what makes `worklane show <TAB>`
a list of titles instead of hex, and a script takes the id back with `cut -f1`.
It includes done, where the decorated listing leaves done out, because a
completion has to be able to name a finished ticket and `show` is most often
pointed at one. It skips a missing status directory rather than refusing, since
an error printed over a shell prompt is worse than no candidates, and the
listing still refuses one so a person can act on it. The filters all still
apply, and an unknown `--campaign` is still refused ahead of everything.

Adding the mode tipped `cmd_ls` over the boundary AGENTS.md names, so it takes an
`LsArgs`, the way `add` took `AddArgs`.

More than the criteria asked, since the cost of each was a name in a list:
tickets are completed for `set`, `append`, `relate`, `check`, `uncheck`, the
second argument of `chown` and `assign`, and `relate`'s three target flags, plus
the skill names read off `install::SKILLS`. The three lists are kept honest by
tests that walk the clap definition and fail on a ticket-taking subcommand
missing from them, or listed at the wrong position. Nested subcommands are not
walked: `campaign` is the only one, none of its three takes a ticket, and the
token counting could not tell them apart if one did.

Position is counted rather than inferred. `__worklane_first_arg_of` reads
`$tokens[2]` and the token count instead of `__fish_seen_subcommand_from`,
because `campaign ls` and `campaign show` are also an `ls` and a `show` that fish
has seen, and matching against the ticket list to find the position would run
worklane again inside the condition.

Files are turned off for the command and back on for `tui`, which is the one
argument that really is a path. The ticket said worklane takes no file arguments;
it takes those.

Campaigns and tags are completed nowhere, which needs a listing they do not have:
55ee6e3. And since fish runs whatever is on PATH, the completions are only as
current as the installed binary, an older one without `--ids` completing
nothing. That is in the README beside the install line.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-22 20:02:37 +02:00
Ansho ReiandClaude Opus 5 88918b2f8a (c628759) Show a page indicator on the detail overlay's border, and bump to 0.16.1
The overlay has scrolled since 1b78a24 and nothing said where you were: a long
ticket opened looking exactly like a short one, so the only way to learn there
was more below was to press pgdn and watch whether anything moved.

`pg 2/8` now sits on the bottom right of the border, through
`Block::title_bottom` with a right-aligned line, which spends no text row. That
is the trade the title already makes on the top border, and the two cannot
crowd each other because they are on opposite borders.

Both of the things this had to get right are arithmetic. `wrapped_height` is
now the one measurement: `last_offset` is it less the viewport and
`page_indicator` takes the same two numbers, so the clamp and the indicator
cannot disagree. A second `line_count` call would be a number free to drift,
and an indicator claiming there is more to read where the scroll refuses to
move is worse than none.

The furthest offset is the last page by definition rather than by division. The
clamp stops at the wrapped height less the viewport, which is not a page
boundary, so the final screenful is partial and dividing reads `pg 2/3` at the
bottom of the ticket. The pages are counted in `scroll_step`, a screenful less
the overlap line, because that is the step the keys take: counting whole
screenfuls names a page pgdn cannot land on, and puts a 30 row ticket in a 10
row viewport at `pg 3/3` two rows short of its end.

Grey, the colour the footer keys and a rendered checkbox take, since this says
where you are in the ticket rather than anything about the ticket. Dropped
whole on an overlay too narrow for it and absent entirely when nothing scrolls,
the rules a corner and the tags row already follow.

`page_indicator` is four numbers in and an `Option<String>` out, so the
arithmetic is pinned without a terminal. The drawn tests answer the two things
it cannot: which border it landed on and what colour it reached the screen in.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-22 17:22:41 +02:00
Ansho ReiandClaude Opus 5 6784d80324 Let check and uncheck take several criteria, and bump to 0.16.0
Finishing a ticket means ticking every box, and that was one invocation per
box: each one resolved the ticket, spliced one line and rewrote the file.

The criterion positional is now variadic, so numbers and substrings mix in a
single call, and `all` stands for every criterion on the ticket. `all` is a
keyword checked before the text, the way the index already is, so a criterion
whose own words include "all" is reached by its number or by a longer
substring. `is_all_criteria` sits beside `is_index` for that reason.

`resolve_criteria` resolves every term before a byte is written and refuses the
whole batch on the first term it cannot place, naming it. A call that ticked
what it understood and then failed would leave the ticket half-marked with
nothing in the file to say which half was meant. The offsets are sorted and
deduped, so the report reads in `show`'s order and a criterion named twice, or
by both `all` and its number, is marked once. `set_criterion` becomes
`set_criteria` and takes every line in one pass.

Each named criterion gets a line, printed after the write. One already in the
target state reads `Already checked 2: text` and does not count towards the
write, so a batch where every box is already ticked writes nothing.

The opencode wrapper takes the terms one per line, like the other list
arguments. REVIEW.md gains the one thing a reviewer must not do with this:
reach for `all`, which would erase the implementer's claim on the criteria the
review agreed with.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-22 16:30:40 +02:00
Ansho ReiandClaude Opus 5 c437d87e9e (2f3796e) Add a --tag filter to worklane ls, and bump to 0.14.0
Tickets carry a Tags field, but ls could not select on it: finding what is
tagged bug meant reading the board. Step 1 of the plan was already done by
e41802b, which put tags: Vec<String> on TicketItem through parse_tags, so this
is the flag, the filter and the tests.

Whole values, not the field. parse_tags has already split and trimmed the
comma-separated field, so filter_by_tag compares against those values: --tag
bug is not answered by a ticket tagged bugfix, --tag "cli, filter" matches
nothing because the field as written is not itself a tag, and a ticket with no
tags matches none, however it spells it.

Case sensitive, which is the opinion the field already takes everywhere else.
tag_color draws Bug and bug in two colours because they are two tags to the
field, and a filter that folded them would list tickets carrying a tag nobody
asked for while hiding exactly the split a grooming sweep is looking for.

One tag per invocation. Several would have to decide between and and or, and
that decision is its own ticket, along with substring or regex matching and a
tag filter on the board.

A tag nothing carries lists nothing rather than being refused, deliberately
the opposite of --campaign. A campaign is an object that exists or does not,
so it is resolved before anything is read; a tag is free text with no
registry, and refusing an unknown one would mean maintaining a vocabulary the
format does not have. An emptied status keeps the message ls already gives
rather than one per filter naming what excluded them, which is what --priority
and --campaign already do.

The filter goes through filtered, the one call the three collect sites share,
so the counts are filtered by the same set as the rows. Every filter is an
Option and none asked for keeps everything, which is what makes them compose
in any combination. cmd_ls is now at four filters and the directory, two of
them adjacent &Option<String> parameters a caller can swap silently: left as
positionals rather than refactored mid-feature, with AGENTS.md recording that
the next filter takes an LsArgs struct the way add took AddArgs.

assets/PLAN.md said in as many words that there was no tag filter yet, so it
would have been actively wrong. It now says what --tag can and cannot answer:
it finds what is tagged bug, it does not enumerate the vocabulary, which is
the question a grooming sweep starts from. The README's ls row also gained
--campaign, which had never been documented there.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-22 14:54:50 +02:00
Ansho ReiandClaude Opus 5 0ce3fdb246 (0546fc5) Copy the selected id with y in the tui, and bump to 0.13.7
The board is where a ticket is found and the CLI is where it is acted on, and
the only thing joining them was seven characters retyped off the screen. y
reads as yank to the readers a keyboard board is for, and was the letter left
after q, esc, enter, space, hjkl, the arrows, pgup, pgdn, tab, backtab, d and
/ took theirs.

The mechanism was chosen against ssh, which is where a board is often read.
OSC 52 crosses the connection, because it is the terminal at the reader's own
end that owns the clipboard. A crate wants X11 and Wayland libraries at build
time and, on X11, hands the selection to the process that set it: copy an id,
quit, and the paste buffer is empty, which is precisely the flow this key
exists for. Shelling out to wl-copy, xclip or pbcopy is platform sniffing plus
a spawn, and does nothing where none of them is installed. crossterm 0.28 is
what ratatui 0.29 pins and ships no clipboard command, so the sequence and its
base64 are twenty lines in src/clipboard.rs, pinned on the RFC 4648 vectors.

The cost is recorded rather than hidden, in AGENTS.md under The Copy Key: a
terminal that ignores OSC 52 ignores it silently, and tmux needs set-clipboard
on. What clipboard::copy reports is whether the sequence was written, and the
footer says no more than that. There is no reply to read either, since the
query form is refused by most emulators.

What is copied is ticket.id, the seven characters the card already prints and
every command already resolves, decided by Board::copy_text so the string is a
question the suite can ask without a clipboard. None on an empty column: an
empty string would take away whatever the reader had there and give nothing
back. The project is left off even on the merge tab, since a second word would
have to be deleted out of every paste.

Board::copy_selected_id takes the clipboard as an argument, clipboard::copy
from the dispatch and a closure from a test, which is what makes the hit and
the refusal both drivable. A failure is said in the footer rather than
returned: there is nobody above it to handle one, and an error swallowed there
would look exactly like a copy that worked until the paste came out wrong.

Notice is the board's first channel for saying something in words, and it has
to be, because a copy leaves nothing on screen to look at. failed means
nothing reached the clipboard, so an empty column and a refused write are one
answer to the reader, both in brightred like the search's no match. It takes
the whole footer row, since a message squeezed in beside the keys would move
every key in it. Cleared by the next keypress rather than on a timer: no clock
on the board, no wakeup in the loop, and never in tick, which runs four times
a second. clear_notice goes ahead of search_key as well as the arms, because a
key typed into a query is still a key.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-22 14:36:09 +02:00
Ansho ReiandClaude Opus 5 3d6a74bc53 (daa0e79) Validate the due date at parse time, and bump to 0.13.3
A clap value_parser beside priority_level rather than a check inside cmd_add,
so a bad date is a usage error with nothing written at all rather than
written and then rejected.

On set --due as well as add --due, from one definition. The planning skill
sets dates through set and never through add, so validating only the command
that files a ticket would have left the path the validation exists to
protect still accepting "next friday".

The shape is checked before chrono sees it. %Y-%m-%d accepts an unpadded
2026-8-9, which would be stored as typed and sort before 2026-10-01. Strict
on the way in, tolerant on the way out: util::due_date still cuts a datetime
down to its date, since a file written earlier can hold one.

PLAN.md told the planner the value was not validated. That is corrected, and
the guard test that failed on the edit now pins the half of the warning that
is still true: a date cannot be cleared, only replaced.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-22 03:22:04 +02:00
Ansho ReiandClaude Opus 5 8d8ae8abfe (822e8a1) Add a worklane-plan skill, and bump to 0.13.1
A third asset on the machinery 16c2bed settled, so the wiring is one entry in
install::SKILLS.

Four jobs, priorities, due dates, tags and campaigns, with propose-then-apply
stated once at the top rather than per section. Every job writes to many
tickets at once and no field can be cleared back to unset, so the document
leans on the two traps that make a sweep destructive rather than merely
wrong: set --tags replaces the whole field, and a due date is neither
validated nor clearable.

feature-planner-agent.md is deliberately not folded in. It decomposes a
request into new tickets, which is intake; this orders the tickets that
already exist, and one document holding both would fit neither.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-22 02:58:50 +02:00
Ansho ReiandClaude Opus 5 d5fb22cfd8 (16c2bed) Add a worklane-review skill, and bump to 0.13.0
install-skill now writes every document the binary carries, with an optional
name to narrow it. Requiring a name per document would mean a skill added
later never reaches anyone who already knows the invocation, which is the
drift the command exists to prevent. --print is the exception and requires
the name: a diff is against one document.

The review skill is its own document rather than a section of SKILL.md,
because the frontmatter description is the whole of what decides loading and
one description cannot name both "anything touching a ticket" and "only when
a review is asked for".

The reviewer never ticks a criterion and never moves the ticket. A tick is
the implementer's claim and unticking is the review disagreeing; one mark for
both loses the disagreement. mv belongs to whoever does the work.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-22 02:40:37 +02:00
Ansho ReiandClaude Opus 5 3085b0226f (4179958) Add a Relations section for blocked by, regression of and relates to, and bump to 0.11.0
`relate` is the only writer of the section, the way `chown` is the only writer of
Owner: a relation names a target that has to be resolved to a uuid first, so `set`
and `append` are deliberately kept out of it. One flag per kind, so an unknown kind
is a usage error rather than a line refused on the way back out.

One direction is stored and the inverse is derived by a scan. `blocked by` goes on
the gated ticket, whose move `mv` now refuses while the target is not done, naming
every open blocker; `-f` bypasses it beside the backward and skipping moves. A
target that is not on the board warns and allows the move.

The rendered block is built outside `content_trim` and passed in, since half of it
comes from other tickets. The section is created on demand rather than by `add`, so
a ticket written before it existed gains it without being regenerated.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-21 22:33:12 +02:00
Ansho ReiandClaude Opus 5 b56b31d2d9 (f39b651) Add chown for the ticket owner, and bump to 0.10.0
The Owner field had no writer after `add`. It was folded into `set` in da03690
and comes out here as its own command, so no field is writable from two places,
the same reasoning that keeps status in `mv` alone.

`worklane chown alice 641e3d5`, user first, after Unix `chown`. That reverses
the ticket-first order `mv`, `comment` and `show` use, deliberately: the name
borrows the Unix association, so the argument order borrows it too.

The swap is left to resolution rather than checked for. Given `chown 641e3d5
alice` the second argument has to resolve as a ticket, and a bare username does
not, so the call fails on its own; a check on the first argument would only fire
where resolution already refuses and would stay silent on the one case it cannot
catch, a ticket whose title is the username. `cmd_chown` is therefore
`set_metadata_field` plus `save_ticket`, with the whole-file no-op comparison
`set` uses and the same `report()` line, so an owner set to the value it already
holds is reported unchanged and nothing is written.

Nothing new writes a file: the update goes through `write_then_replace`, scoped
to the lines under `## Metadata`, so a description quoting `**Owner**:` is left
as prose and a failure leaves the ticket whole. Tested for the change, the
no-op, all three resolution tiers, a swapped call, an empty user, a ticket with
no Owner field, and that the tick, the handwritten section and the filename all
survive.

The skill and the opencode tool carry it too, the tool with the argument order
in its description, since that is the one place a model can get it wrong
without failing.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-21 18:35:26 +02:00
Ansho ReiandClaude Opus 5 e6fe51e31e (996afd7) Monitor several boards in the tui as tabs, and bump to 0.9.0
`worklane tui` takes any number of paths, each resolved to the first `.worklane`
at or above it the way the working directory always was. With more than one board
there is a tab per project plus an `all` tab merging them, and `tab`/`shift+tab`
between them.

The selection moves onto `Tab`: sharing one column and card index across projects
would point it at whatever unrelated ticket sat in the same place. The merge is
sorted through `by_priority_then_title`, now exported, rather than concatenated,
so its order does not depend on the order of the arguments. On the merge a card
and the overlay border name the project after the id, since across boards seven
characters of uuid are not an address.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-21 17:25:21 +02:00
Ansho ReiandClaude Opus 5 2298d3373a (8528c50) Hide the done column in the tui until d asks for it, and bump to 0.8.2
Done only grows. It already holds more tickets than the other three columns
together, so a quarter of the width was going to the column least often read
while the ones being worked got squeezed for it.

Not a new opinion: `ls` already counts done in its summary and leaves it out of
the listing below. The board now does the same, and the footer carries the
count while the column is hidden, which is the board's version of that summary
line. It reads `d show done (17)` while hidden and `d hide done` while shown,
so the count only appears where a column heading is not already carrying it.
The modal footer names the key too, since it works with a ticket open.

Hiding is a change to what is drawn, never to what is read. `reload` still
scans the done directory and `digest` still watches it, so the count is right
and revealing the column needs no rescan.

`visible()` returns a prefix of the columns rather than a filter, which is what
keeps `column` and `offsets` valid as indices into either. It is derived from
where DONE actually sits rather than assuming the last slot, and a test pins
done as last: a status inserted after it would otherwise hide two columns in
silence. DONE is now a constant, since `ls` and the board are two readers of
the same rule.

Hiding the column under the selection moves the selection to the last drawn
column and closes an open detail view. Refreshing the modal onto whichever
ticket the selection landed on was the alternative, and it swaps what someone
is reading without saying so, which is how a person acts on the wrong ticket.
Showing done again is a no-op for the selection, since a column is appended
rather than inserted.

Three existing tests asserted a column heading with `screen.contains("done
(0)")` over the whole render, and the new footer holds that string whether the
column is drawn or not, so all three passed for the wrong reason the moment
done was hidden. They now assert against the top border row through a
`headings()` helper, with `footer()` beside it.

The choice is not remembered between runs: worklane has no config file, and one
flag is not a reason to start one.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-21 16:30:06 +02:00
Ansho ReiandClaude Opus 5 6178d7bd3d (dd36e97) Add install-skill, shipping the agent skill in the binary, and bump to 0.8.0
worklane's agent instructions only existed for someone with the repo checked
out. Anyone who installed the binary with cargo install got no document at
all, because cargo install places binaries and nothing else.

The skill now lives at assets/SKILL.md and is embedded with include_str, so an
installed copy can never be a different version from the binary that describes
it. `worklane install-skill` writes it, `--print` sends it to stdout so a
modified copy can be diffed, and a copy that was edited is reported and left
alone unless --force: it may have been changed on purpose, and silently
discarding that is worse than stopping.

One path serves both agents, ~/.claude/skills/worklane/SKILL.md. That was
settled empirically rather than from documentation: opencode 1.15.10 loads
~/.claude/skills as an external skill source alongside its own
~/.config/opencode/skill, and with HOME pointed at a temp directory holding
only what install-skill wrote, `opencode debug skill` lists the document under
the name worklane. Writing opencode's own path as well would be two copies of
one document, free to drift, for no gain.

The document is new rather than the one under .opencode, which is the user's
and not this repo's to ship. The ticket-workflow prose moved out of AGENTS.md
into it, so how to use worklane has one writer, and AGENTS.md points there.

The mechanism is in install.rs rather than skill.rs, and install() takes its
root as an argument: install-tool is coming, it needs a different root and the
same compare-and-refuse logic, and passing the root is what lets the tests
install into a temp directory instead of the home of whoever runs the suite.

Three tests guard the document itself, which is the part that goes stale
quietly: the frontmatter has to parse, every `worklane <x>` it shows has to be
a real subcommand, and every subcommand outside NOT_FOR_AGENTS has to appear in
it, so a new command cannot ship invisible to an agent.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-21 15:25:31 +02:00
Ansho ReiandClaude Opus 5 c1137f29cf (1b78a24) Scroll the tui detail view on pgup and pgdn, and bump to 0.7.1
The detail view had no scrolling at all: no offset on Board, nothing passed
to Paragraph::scroll, so anything past the height of the overlay was
unreachable. Every ticket in this repo is longer than that. The footer read
"↑↓ scroll" while up and down moved the selection, so it named a key that did
nothing and sent the reader looking for their own mistake.

The scroll goes on pgup and pgdn rather than taking up and down. Up and down
stay on the selection with the modal open, so a whole column can be read
without closing it and the modal follows the selection. That is worth more
than the two keys.

The offset is clamped against the wrapped line count from
Paragraph::line_count, which is why ratatui now carries the
unstable-rendered-line-info feature. The paragraph wraps on words, so a clamp
on the raw lines would stop short of the end or run past it into blank space,
and counting the wrapping by hand would only agree with the widget until one
of the two changed. The clamp runs on the keypress and again in the draw,
since the terminal can be resized between them and a tick can shorten the
ticket under a reader who is already at the end.

The offset resets when the selection moves and when the modal is closed, so a
ticket opens at its top. It deliberately does not reset on a tick: an edit
elsewhere in the tree must not throw the reader back to the top of what they
are reading.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-21 12:38:54 +02:00
Ansho ReiandClaude Opus 5 78831f1a39 (f6af387) Add the board view, and bump to 0.7.0
worklane was one-shot commands only, so reading the board meant running ls again
and again and nothing ever showed the four statuses side by side, which is the
one view a kanban flow is for.

Four columns, a card per ticket carrying the priority mark, short id, title,
owner and due. Arrows or hjkl to move, enter for the detail view, q to quit.
Read only: moving a card by keypress is a follow-up, kept out until the watch
and render loop were solid.

Modelled on frig throughout, same crates and same shape: event poll on a 250ms
timeout so the tick runs when nobody is typing, a panic hook that leaves the
alternate screen before the backtrace, and the terminal restored on the error
path as well as on quit. A bare worklane opens it, as a bare frig does, so
Cli::command is now an Option.

The watch looks at files, not directories. A directory's mtime only moves on
create and rename, so a ticket edited in place would be missed; the digest
hashes every ticket and comment file's path, length and mtime. Comment files
are in it because a comment added elsewhere has to reach the detail view. It
guards the rescan rather than the draw, since ratatui diffs its buffer but
reading the tree every frame would not be free. notify is deliberately not a
dependency, and the reason is on the ticket.

Two orderings are deliberate. The worklane directory is looked for before the
terminal, so running outside one gives the usual message rather than a complaint
about the tty, and both errors stay testable without a pty. And a missing tty is
refused by name, since raw mode on a pipe fails with a bare "No such device or
address" that explains nothing.

The palette is now a Color enum rather than a string, so the escape the CLI
writes and the ratatui colour the board draws come from one definition and a
colour missing from either is a compile error. That retires the test which
existed only to catch a name with no entry, the failure that once left magenta
undefined.

Cards come from collect_ticket_items, so there is no second parser;
TicketItem gained the path the detail view opens. content_trim and
format_comments_with take the colour decision, because ratatui draws spans and
would print an escape as literal bytes.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-21 11:44:37 +02:00
Ansho ReiandClaude Opus 5 bbb1568a0f (eadaca9) Add check and uncheck for one acceptance criterion, and bump to 0.6.0
Criteria are stored as - [ ] lines and nothing could tick one, so marking
progress meant replacing the whole list through set, losing the state of every
other item.

check and uncheck are separate commands rather than one verb with a flag,
sharing CheckArgs and cmd_check. The criterion is an index first and a substring
second, so a criterion whose text is literally "2" is reachable only by
substring. A number out of range is reported as a bad index rather than as a
substring that missed.

Only the character between the brackets is spliced, so the text keeps whatever
indentation and spacing it had. Criteria are counted inside the Acceptance
Criteria section only, so a checkbox written into a description is not a
criterion and a handwritten line in the section takes no number.

With the criterion omitted, the criteria are listed and the number asked for
when stdin is a terminal. Where it is not, the same list comes back as an error
instead. Prompting regardless would leave the opencode wrapper blocked on a
stdin that never closes, and that is the choice resolve_ticket already makes for
an ambiguous match, for the same reason: the wrapper keeps stderr and throws on
the code, so a list printed to stdout would be discarded.

Any listing of a subset keeps the real numbers. Renumbering the matches from one
would contradict the advice to use the number and point at the wrong criterion.

show now numbers the criteria as "1. [x] text", so the index is visible where
the ticket is read. That also drops a manual prefix strip, so clippy is one
warning below where it started.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-21 10:46:07 +02:00
Ansho ReiandClaude Opus 5 3810e442c6 (da03690) Add set and append for editing a ticket, and bump to 0.5.0
Nothing could change a ticket after it was created. mv wrote status, comment
appended a file, and that was the whole set of mutations, so correcting a typo
or adding a criterion meant hand editing the markdown.

Two commands rather than the one vague "edit" the ticket described. set replaces
a field, append adds to a section, so the verb carries the meaning instead of a
prefix on seven flag names, and append only offers the three sections that hold
multiple lines. Owner is absent from both, it belongs to the chown command filed
alongside this, and status stays mv's. One field, one writer.

Sections are a table, DESCRIPTION, ACCEPTANCE and PLAN, each carrying a heading,
a label, the placeholder add writes when empty, and a kind. Both commands walk
it, so a section added later is one entry rather than edits in two places.

Everything is targeted line surgery and never a regenerated file, which is what
keeps a ticked criterion ticked and a handwritten section intact when an
unrelated field changes. Appending to a numbered section continues from the
count already there rather than renumbering above it, so a handwritten line
survives exactly as written. Appending to an empty section replaces the
placeholder instead of following it.

An empty value is a paragraph break for a section and a usage error for a
scalar, since it looks like a way to clear a field and clearing is not supported
yet. No-op detection compares the whole file before and after each edit, so a
field set to the value it already holds is reported unchanged and nothing is
written.

Two things came out of building it. move_ticket_file's staged write is extracted
as write_then_replace, now the only way any ticket file is written. And the file
is located by uuid rather than by title: titles are not unique, add allows
duplicates on purpose, and the old title scan meant mv <uuid-of-second> moved
the first ticket sharing its title. Reproduced, fixed, and pinned by a test.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-21 02:36:20 +02:00
Ansho ReiandClaude Opus 5 6c43e62a4b (8cc254c, 47aa0fe, a1dbd60) Fix the documented examples and the add tool schema
Three doc tickets in one commit, since two of them are the same check: run
everything the docs claim and see what fails.

8cc254c: the add example in the kanban skill passed -t twice, once where -g for
tags was meant, and gave -p three bare positional values instead of three flags.
Clap rejected it with exit 2, reproduced verbatim. Rewritten, with a line saying
why -t is not tags and why each step needs its own -p, since the example alone
does not explain the trap. The "--due (or --due)" filler is gone; --due and
--priority have no short form and now say so.

a1dbd60: only title is required in the add schema now. The other six fields were
unmarked, so the model had to invent a value for every field on every ticket.
The other four tool schemas were checked and are already right: ls is fully
optional, and the required arguments on show, mv and comment are genuinely
required. Every add field was already guarded in execute, so an omitted field
adds no flag.

47aa0fe: the README row it describes was already fixed in passing by ddbd45e,
which rewrote it for the priority work. "ls --status" appears nowhere. What was
left was the second criterion, and running every example turned up a different
problem: the 141 exit code documented for a truncated pipe only happens when the
output exceeds the 64 KiB a pipe holds. A short listing lands in the buffer
whole and reports 0. That was my own wording from b28ddb9 and it is now precise.

Every example in both files was run against the built binary, with real ids
substituted where they use placeholders, and the four documented exit codes were
measured rather than assumed.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-21 01:18:36 +02:00
Ansho ReiandClaude Opus 5 5a7cfeb849 (b8aa66b) Evaluate ticket resolution in tiers, from four characters up, and bump to 0.4.0
resolve_ticket ORed the uuid prefix, title and filename predicates into one flat
list, so an exact prefix match was reported as ambiguous against any title that
merely mentioned that id. Reproduced: `show 641e3d5` on a board where another
ticket's title quoted it failed with "Multiple tickets found", and told the user
to use the displayed id, which was the id they had just used.

The three tiers are now evaluated in order and the first non-empty one wins
outright, which is what AGENTS.md always claimed.

The ticket also asked for prefix matching to require eight characters, and that
is not implemented. The guard it replaced read short_id.len() >= 8 where
short_id was always the full uuid, so it was always true and any length already
worked. Eight would have regressed that: ls prints seven characters, so the id
the tool displays would drop out of the uuid tier and lose to any title quoting
it, which is the very bug above. MIN_ID_SEARCH is four, so a short search is
still text and `show 641` remains a title search.

Docs corrected in four places that all stated the eight character rule: README,
AGENTS.md, the opencode tool descriptions and the kanban skill.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-20 23:38:29 +02:00
Ansho ReiandClaude Opus 5 b28ddb9210 (eed7309) Die quietly on a truncated pipe, and bump to 0.3.1
Rust sets SIGPIPE to SIG_IGN at startup, so a write to a closed pipe returned
EPIPE and println panicked on it. `worklane ls | head -3` printed a panic and a
backtrace on stderr instead of three lines, which reads as a real fault and is
not what any other tool in a pipeline does.

main now restores the default disposition before any output, the same six lines
frig carries for the same reason. The cost is that a truncated pipe kills the
process with signal 13, so a shell reports 141 rather than 101. That is what
head and sort do, and it is now in the README next to the other exit codes.

The tests drop the read end rather than racing head for it, over a listing large
enough to exceed the 64 KiB a pipe holds, since a smaller one lands entirely in
the buffer and proves nothing. A shell pipeline into head is covered too, and
the exit codes for a real error and a usage mistake are pinned so the reset
cannot quietly change them.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-20 17:34:45 +02:00
Ansho ReiandClaude Opus 5 ddbd45e332 (dca0b61) Add priority as a ticket field
Priority lived in tags, as p1 to p3, which ls could neither sort nor
filter on, nothing validated, and a typo like P1 passed silently. ls
sorted by title only, so a backlog of any size gave no ordering signal.

Levels are 1 to 5 with 1 most urgent, matching what the tags meant.
Omitting the flag leaves the field _Not set_, like Due and Owner: there is
no implicit middle level, because a priority nobody chose is worse than
none. clap rejects anything outside the range before a ticket is written.

Priority parses to three states rather than two. A stored value outside
the range is Invalid, kept distinct from Unset, so a typo cannot read as
"no priority": it shows as ? and sorts just ahead of the unset tail.

ls sorts on priority and falls back to the old title sort, and --priority
filters, composing with the status filter in both the grouped and the
filtered listing. TicketItem becomes a struct, since a sixth tuple field
was past reading.

Migrated the 31 tickets already carrying p1 to p3 tags: the level moves to
the field and the tag is dropped.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-20 15:36:19 +02:00
Anshorei 01e2daca13 Update agents file 2026-05-15 13:10:38 +02:00
Anshorei 17a02b906e Initial commit 2026-05-14 20:41:40 +02:00