d1a0f0ee276f3a8d078ace52aae49aa52cd5cc8d
64
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
ab337ca7f8 | (1f1b321) Record a move's reason in its history entry, and bump to 0.31.2 | ||
|
|
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> |
||
|
|
c03f47c52d |
(f774a33) Record a campaign move in the history log, and bump to 0.30.0
assign was the only field writer without an entry: a ticket could leave one campaign for another with nothing recording it. Kind gains Campaign, assign gains the --actor flag the other four writers carry, and the entry is written after the save and behind the no-change return, the rule every writer follows. The entry records Campaign::name, the codename or failing that the title, settled when the entry is written so a rename cannot change what an old entry means. The uuid the field holds says nothing in a log line, and a before-uuid the board no longer has reads _missing_, the way the Campaign field itself renders a dangling one. campaign is the longest mechanical label, so LABEL_WIDTH widens from 6 to 8 and every mechanical row moves two columns right, a deliberate output change that makes this a minor alongside the new flag. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> |
||
|
|
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> |
||
|
|
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> |
||
|
|
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> |
||
|
|
5dc087d49e |
(9564ac9) Show the annotation in tags ls, and bump to 0.26.4
Since tags.md there are two vocabularies, the one the file declares and the one the tickets carry, and the listing reported only the second. A tag declared and never applied was invisible, and a word somebody invented in a hurry read exactly like one the board had agreed on. Those two cases are the whole reason to declare tags at all. The listing is now the union: still alphabetical, still case sensitive, with the annotation's opening line as a third tab-separated field and a count of zero for a tag nothing carries. **The absence of the third field is what marks a carried but undeclared tag.** Nothing could be appended to the first field without a completion offering a tag that does not exist, and nothing could be added to the second without it stopping being a number. Absence costs neither, and it buys the property a marker could not have: a board with no tags.md has every tag undeclared, so it prints two fields a line, which is byte for byte what this printed before the file existed. An older completion script on a newer binary keeps working, which is the same compatibility 1db02e5 kept for the bare form. A declared tag with nothing said about it answers the placeholder rather than an empty string. An empty third field is a trailing tab and nothing else, so the one difference between declared and not would have been invisible in a terminal and in a completion alike. It is also what the file itself holds under that heading, so the field is the section's opening line either way. `TagIndex::summary` does the cut to one line, the way `CampaignRow::summary` takes one line off a description the read carries whole: the annotation is prose with paragraphs in it, and how much of it a view wants is the view's business. The two fish rules pipe through `cut -f1,3`, since fish takes everything after the *first* tab as one description and the count would otherwise land in the middle of the prose. What is left is the annotation, and a tag the board has never declared is offered with no description at all, which says what the count used to say more weakly. `cut` rather than `string replace` because columns are what is being picked, and `cut -f1` is how a script reads this listing anyway. A test pins both rules rather than the script as a whole, so a rule added later that reads `worklane tags` raw is caught. `assets/ADMIN.md` claimed a declared and unapplied tag does not appear in the listing, which is now the opposite of the truth; it lists at zero. Fixed here rather than left to f7dd1a1, which does not list that file. The same stale sentence in SKILL.md and PLAN.md is recorded on that ticket. Filed on the way past: an annotation carrying a tab splits the listing into a fourth field, 8f650fc, and the `tags set` completion offers the undeclared tags it refuses, which only became filterable now that the listing tells them apart, 193f9be. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> |
||
|
|
239d951b8c |
(9688d34) Add tags set, and bump to 0.26.0
A tag declared with the wrong annotation was stuck with it, which is 32e98ab's hole arriving before the writer rather than after. The campaigns entry on this board was already in that state: it reserved the singular for the campaign command, and stopped being true the moment that tag was rolled in. `worklane tags set <tag> --annotation` replaces the whole annotation. `--annotation` is required, so a bare call is a usage error rather than a silent no-op, and an empty one writes the placeholder, which is why there is no `--clear`. `add` and `set` refuse what the other is for, each naming the other, so which one wrote a line is never a question of which was typed. No `--force`: a codename is guarded because a campaign is addressed by it, where an annotation is prose written to be revised. No rename: the tag is the key, so changing it means rewriting the Tags field of every ticket carrying it. `report` grew `report_in`, which takes the colour. `report` paints its subject green and green means title, so a tag could not reuse it: a tag is drawn in a `TAG_COLORS` slot or it is drawn wrong. Same wording, decision passed in, which is the trade `paint` makes with `color_text`. The no-op compares the rendered file rather than the annotation, the way `apply` compares content for a ticket field. `tags set` takes a tag the board already has, so it joins the new `TAG_NESTED_COMMANDS` and gets a fish rule offering `worklane tags`; `tags add` stays ruleless in `TAG_NEW_COMMANDS`. The guard now names both lists, so the next tag positional has to pick one. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> |
||
|
|
f515d69930 |
(1db02e5) Give the board a tags file, and bump to 0.25.0
The board carried twenty-four tags and defined none of them. `campaign` and `campaigns` were both on it, one ticket each side, and nothing on disk could have caught that. `.worklane/tags.md` is the vocabulary: one level-two heading per tag, its annotation as the prose under it, alphabetical by byte so a near-duplicate lands next to what it duplicates. `worklane tags add <tag> --annotation` writes it, `init` creates it empty, and `tags add` creates it on demand for a board that predates it. Declaring a tag tags no ticket, and tagging a ticket declares nothing. The counts stay derived from the status directories, so the file and the board can disagree; reporting that disagreement is 9564ac9. `tags` becomes a group with an optional subcommand. The bare form is still the listing, byte for byte, because the shipped fish completion calls it that way to fill in `ls --tag`; `tags ls` is the same arm. Every write re-renders the whole file from the parsed vocabulary rather than splicing one section, which is why an unreadable file is an error in `TagIndex::load` where an unreadable campaigns directory is an empty index: empty here would mean erased. `no_tag_taking_option_is_missing` used to panic on any tag positional. It now allows what `TAG_NEW_COMMANDS` records, which is `tags add` alone: the tag it takes does not exist yet, so completing it from `worklane tags` would offer exactly the values it refuses. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> |
||
|
|
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> |
||
|
|
2ddd0addf6 |
(59b23b7) Stop the board walk on a link that does not resolve, and bump to 0.23.1
`find_worklane_dir` asked `exists()`, which follows a symlink. A `.worklane` that was a dangling link therefore answered exactly as no `.worklane` at all: the walk carried on up the tree, the first board above the project became the board, and every write landed in it. Silently, and in the board belonging to someone else's project. Latent while a board is a real directory inside the project it belongs to. Once boards live in one shared directory and `.worklane` is a link into it, a dangling link stops being a corrupted tree and becomes an ordinary state: it is what you have before the boards repo is cloned, and after a board directory is renamed. So this is reachable on an ordinary day rather than only with a hand-made link. `classify` reads `symlink_metadata` first, so the answer is about the entry rather than about its target, and it is one of four: `Absent`, `Board`, `Dangling` or `NotADirectory`. `Absent` is the only one the walk carries on from. A `.worklane` that is there but unusable is this project's board and is reported here, not handed to whatever sits above it. Anything other than `NotFound` out of `symlink_metadata` is an error too, since reading a filesystem that could not answer as nothing-there is how the walk-past worked in the first place. The failure names the target and says the boards repo may not be cloned. The old message, no board found and run `worklane init`, was wrong twice over even with no board above: it describes an empty tree, and it points at creating a board when the cause is an unsynced machine, which is the one action that produces two boards with one name. A regular file at that path is an error as well. It is a plausible future pointer form and reading it as one is that change's decision to make; stepping over it and writing above is the answer that is wrong today. A link that resolves is still indistinguishable from a real directory, and what comes back is the link rather than its target, so `.worklane/backlog/*.md` reads the same either way and nothing downstream learns whether the board is local. Every writing command resolves the board before it writes, so the refusal costs nothing halfway. `add` is where that is pinned end to end, against an empty board above the project that stays empty. `init` is untouched: it does not go through this walk, it writes nothing on a dangling link today, and its symlink cases belong to the layout change. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> |
||
|
|
cbc20848f6 |
(1845355) Order each status column by its entry stamp, and bump to 0.23.0
Every view read its rows out of `collect_ticket_items`, which sorts by `by_priority_then_title` because it sees one directory and no status. That is the right order for the backlog, where priority is the clock. Past the backlog the question changes: committed asks what has waited longest, reviewing what was handed over first, done what just landed. All four columns answering the first question is why a finished p5 sat above the p1 nobody had read yet. So each column takes its own order, through one `by_status_order` keyed on the `Status` rather than four comparators at four call sites. Backlog delegates to the comparator it already used. Committed sorts by `Committed On` ascending and reviewing by `Submitted On` ascending, so the longest wait is at the head where the reader picks next from; done sorts by `Completed On` descending, newest first, the way a changelog reads. Ascending twice and once descending is one rule said three ways: the head of every column is what the reader acts on next. A ticket carrying no stamp sinks below every stamped one in its column and falls back to priority then title among its own kind, as do equal stamps -- `mv` writes whole seconds, so a tie is real. A missing time is unknown, not ancient, and unknown must not claim the head of a queue ahead of a wait somebody can point at. Reading absence as the epoch would have come free from the comparison and put every ticket filed before f460853 first. The comparison is a string comparison. `%Y-%m-%d %H:%M:%S` is lexicographic in chronological order, the property `Due` already relies on, so nothing parses a date at sort time. The stamps are read on the pass `collect_ticket_items` already makes over each file, the rule `criteria` and `tags` already hold, and never per comparison. Both `cmd_ls` branches, `list_ids`, `columns_of` and `campaign::members` take it, which is why those loops walk `Status::ALL` rather than `status_dirs()`: the directory name does not say which stamp governs it. The merge tab keeps priority then title outright and is pinned there -- it spans statuses, so no single stamp governs it. `cmd_tags` is left alone; it counts into a `BTreeMap` and never reads an order. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> |
||
|
|
eae411ab50 |
(f460853) Let the flow timestamps accumulate, and bump to 0.22.0
a6023e2 made the three stamps mutually exclusive: entering a status wrote its field and leaving removed it, so a finished ticket carried exactly one of the three and the journey behind it was invisible. A reader asking when this was filed, when it was picked up, when it went out for review and when it finished got one answer and three absences, and nothing could tell that committed had ever happened. So the removal rule is replaced by an accumulation rule. `mv` stamps the target's field on entry, re-entering restamps, and arriving anywhere removes the fields of every status *after* the target. That is one arrival rule off the flow order `Status::ALL` already holds, not a case per move, and it is also what a forward skip under `-f` wants: backlog straight to done stamps `Completed On` alone and leaves the stages it jumped unwritten rather than fabricated. A backward move truncates the journey at the target, so done back to reviewing drops `Completed On` and keeps the two before it, and anything back to backlog drops all three. Presence therefore changes meaning. A field no longer says the ticket sits in that status now, it says the ticket got that far and has not been sent back past it. `Status` is what says where it is. This is still not d4ce964's history log. These answer how far and when, once per stage; every status change, every owner and every tag along the way is the log's job. The placement a6023e2 chose already holds: the three sit directly after `Created At` in `METADATA_ORDER`, so a ticket that has walked the whole flow reads as one block of four timestamps in flow order ahead of Campaign and Status. Nothing but `mv` writes them, pinned by a test over `add`, `set`, `append` and `chown`. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> |
||
|
|
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> |
||
|
|
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> |
||
|
|
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> |
||
|
|
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> |
||
|
|
73ffcad733 |
Reformat with cargo fmt, and nothing else
Layout only, no behaviour and no wording. 161 hunks across 22 files, 98 of them rustfmt joining a call or a message onto the one line it fits on. The config it formats to, and how its four numbers were arrived at, is the commit before this one. Separate so that it is reviewable by not being read: nothing here is a decision, and every decision is next door. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> |
||
|
|
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> |
||
|
|
175c1d016d |
(6f44d16) Drop the unreachable duplicate-title check in add, and bump to 0.17.2
The branch tested a path built from a uuid generated three lines above it, so it could not fire, and its message claimed a ticket with the title already existed. Duplicate titles are supported on purpose. What replaces it is the write's own failure, named with the ticket and the path the way the other writes in the tree name them, and a test that pins the message against an unwritable backlog directory. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> |
||
|
|
139c9b012f |
(a6023e2) Stamp the time a ticket entered its status, and bump to 0.17.1
mv writes Committed On, Submitted On or Completed On for the status it enters, so the board answers how long a ticket has been where it is without guessing from file mtimes. The three are mutually exclusive: entering stamps, leaving removes and re-entering restamps, so a backward move under -f leaves no stale Completed On behind. These fields are current state, like Status itself; the trail of how the ticket got there belongs to the history log. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> |
||
|
|
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> |
||
|
|
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> |
||
|
|
ae3ee1bb9e |
Show the target's status beside the relation kind, and bump to 0.15.2
A row now carries two marks, kind then status: what sort of edge this is, then
how far the ticket at the other end has got. `blocked by × ◐ (6ce2c47) Title`.
Two questions are asked of this block, which rows hold this ticket up and
whether the ones that do are finished, and one glyph could not answer both.
○ not started, ◐ under way, ● finished, in grey, orange, cyan and green: the
shape says how far the target has got and the colour tells the two middle
stages apart, since committed and reviewing are both half circles. Green is the
colour the priority ramp deliberately leaves out because it means a title; on a
one-cell mark with no title behind it nothing else wants it, and it is the
obvious colour for done. Orange keeps the meaning it already has, Status.
These are the priority meter's own circles, and what keeps a status from
reading as a level is width: the meter is always two cells, a status mark is
one. the_status_mark_is_one_cell_where_the_meter_is_two pins both halves, and a
card carries the meter and never a status mark while the block carries the
status mark and never a meter.
The kind mark survives a target the board cannot find and the status mark
cannot, since a kind is read from the ticket's own file and a status from the
board. ? holds the column so the id does not move when one target has gone, and
_missing_ is what says it is gone.
Committed and reviewing are told apart by colour alone, so a pipe cannot tell
them apart: both read as under way. Accepted, since ● and ○ are the two answers
usually wanted and show on the target settles the rest, and assets/SKILL.md now
says so outright rather than leaving an agent to work it out from a colourless
half circle.
RelationTarget is back, carrying the title and the status in one Option because
they come from the same lookup. It went out in
|
||
|
|
5ae9c7fe00 |
Mark a relation by its kind rather than its target's status, and bump to 0.15.1
A column of ▁▄▆█ read as undifferentiated blocks. What is worth seeing at a glance is which kind of edge a row is: × for blocked by and blocks, → for relates to, ← for regression of and regressed by. The labels are five long words that blur when one ticket carries several, and the rows holding it up are now the crosses. Both directions of a kind carry one mark, since blocked by and blocks are the same edge read from two ends and the label is what says which end you are on. × is BLOCKED_MARK, the constant a held-up card already draws, in the same brightred. On a card it says this ticket is held up, in the block that this edge is what holds one, which is one word, so one glyph and one definition: the constant moved to util.rs, where both renderers can reach it. Brightred rather than the red asked for, because the id one cell to the right is red and the two would have blended. The arrows are the ones the footer already draws, so they render wherever it does, and no_relation_mark_is_a_priority_glyph pins all three against every level of the meter: the circles belong to priority. The mark now survives a target the board cannot find, because a kind is read from the ticket's own file rather than from the board. Only the name is gone, and `_missing_` in grey is what says so. That is one case fewer than the status mark had, which needed a `?` for a target with no status to show. What this gives up is the status: 6ce2c47's motivation was reading whether a blocker is finished without leaving the overlay, and nothing in the block shows that now. Its criteria 1 and 3 describe the commit before this one, and the ticket says so. RelationTarget went with it. Nothing read the status field once the mark stopped keying on it, and a field written but never shown is a field that goes stale unnoticed, so RelationRow carries the kind and the title and the status is one lookup away on the index if a later ticket wants it. A patch, not a second minor: 0.15.0 was the arrival of a mark and settling which glyph it is belongs to that, where a second minor would read as two features. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> |
||
|
|
ece201e3ab |
(6ce2c47) Mark each relation with the status of the ticket it names
The Relations block named each target and said nothing about where it was, so the question actually asked of it, whether a blocker is finished, meant closing the overlay and going to find the other ticket. Each row now carries a mark for its target's status, ahead of the id, where it describes the target rather than the row. A rising bar, U+2581 through U+2588 for backlog to done, and ? for a target the board no longer holds. Not a circle: the cards spend those on the priority meter two cells from nothing at all, and another circle would be read as a level. The ramp is also the meaning, so the shape says which status it is. The colour could not. Every colour in the guideline already means one thing and the eight tag slots are reserved, so four status colours could only have come out of something else's meaning. So the shape carries the status and the colour says only that it is one: orange, which is what Status already means, and grey on the missing mark, beside the _missing_ that grey already spells. An unrecognised status reads as missing rather than as a fifth stage, and every_status_has_a_mark pins the pairing against status_dirs so a status added later fails a test instead of quietly reading as ?. The plain text was the real cost. Detail.text was one String drawn by a Paragraph, deliberately uncoloured because an escape sequence there is drawn as literal bytes, which is 6d327df. So the block cannot arrive pre-painted. Resolved.relations is now rows, content_parts returns the body as BodyPart::Text and BodyPart::Relations with the text painted and the rows untouched, and the two renderers take it from there: content_trim paints the rows into escapes, and the board styles the same cells as spans. One builder, two painters. relation_rows decides which edges there are, what they are called and which direction leads; relation_cells decides the layout, the mark and the colours; paint_cells and span_of are the only things that differ. Cell is the unit both take, the same shape the palette uses to stop a colour existing for one renderer and not the other. reference_cells is now the one spelling of a cross reference, shared with the Campaign field. Detail.body is a ratatui Text and is the only thing measured, so last_offset and the Paragraph cannot wrap the body two ways. Detail::plain() flattens it for the suite and is cfg(test): a second representation carried beside the spans is a second thing to disagree. show carries the same mark, decided here rather than discovered later. The rows are one builder so it was free, and two views disagreeing about what a relation shows is a difference nobody can explain afterwards. That is a change to what the CLI prints, so the minor goes on the last commit of this pair. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> |
||
|
|
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> |
||
|
|
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> |
||
|
|
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> |
||
|
|
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> |
||
|
|
5b0bac9c2d |
(7bfb9fc) Add campaigns, a ticket container assigned through worklane assign, and bump to 0.12.0
There was no way to group the tickets that have to be finished together. A goal such as a v1 release was either one ticket that could not describe its parts, or a set of tickets with the goal restated in every description and nothing tying them together. A campaign is a file of its own under `.worklane/campaigns/`, with a title, a description and metadata, and it sits in no status directory. Its state is derived instead: open until every member is done. Deriving it means there is no such thing as a done campaign holding an open ticket, and no second forward-only ruleset beside `mv`'s. An empty campaign is neither open nor done, since calling it done would make a container nothing has been filed against the most complete thing on the board. Membership is one field on the *member*, Campaign in the ticket Metadata, written only by `assign`. The member list is deliberately not on the campaign: that would put membership in two places and make one file that every assignment edits, contended the moment two agents share a board. So `add` gains no `--campaign` and neither does `set`. `add` does not write the field either. Every ticket written before campaigns existed has none, so the insertion path has to exist regardless, and leaving it out of `add` means one path that is always exercised rather than two. That is the Relations argument from 4179958, applied to a field instead of a section. `set_or_insert_metadata_field` is the upsert and `METADATA_ORDER` is its anchor list, the way `SECTION_ORDER` is `ensure_section`'s, so Campaign lands beside Status rather than at the end and Status stays last. A file with no Metadata heading is an error rather than an insertion, per 641e3d5. The three tiers came out of `resolve_ticket` into `resolve_in`, shared by both kinds. A campaign is addressed exactly the way a ticket is, and a second resolver would be a second copy of the precedence rules to keep in step. Two things fell out of that. `Found.dir` is the status for a ticket and empty for a campaign, which is what drops the bracket from the ambiguity listing for one. And `resolve_ticket` can now explain a search that names a campaign, so `mv`, `show`, `chown` and everything else that takes a ticket give the same reason instead of a bare "no ticket found" — one place rather than a check per command. Only on the zero-match path, so an ambiguous ticket error is never replaced by a complaint about a directory the caller never mentioned. The stored value is the full uuid, per the same rule the Relations section follows, and the title is resolved for display. `reference_cell` is now shared between the two, so a dangling campaign and a dangling relation target are both `_missing_` rather than each inventing a spelling. `Resolved` carries what `content_trim` cannot render from the file alone: a struct rather than two more parameters, so the next such field is one entry instead of an edit at every call site. `campaign show` lists done members, unlike `ls`, which leaves the done column out of its listing. What is finished against what is left is the whole question a campaign asks. `ls --campaign` is the other way round and keeps every rule `ls` already has. Deliberately out of scope. The derived progress figure is 1cb999f, now recorded as blocked by this, since nothing here can compute it yet. Unassigning needs a field cleared back to unset, which is 74904dc. And the board gets neither a campaign tab nor a card marker: the detail view resolves the field because it renders the body, and that is all. A marker would want a read per reload and the four corners are already spent, which is the b8ce18c reasoning; filed as 61879a4. Twenty-four integration tests and eleven unit tests, covering assign, reassign, the no-op, a dangling campaign, the ls filter, `mv` refusing a campaign, insertion placement, and a handwritten section and unknown metadata field surviving an assignment verbatim. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> |
||
|
|
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> |
||
|
|
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> |
||
|
|
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> |
||
|
|
8013c2b74d |
(d8e78cd) Clear the clippy warnings, and bump to 0.8.1
`cargo clippy --all-targets` was reporting 96 warnings, 14 of them in the binary. It is now clean from a cold cache, and the 211 tests still pass. `clippy --fix` took the mechanical ones: needless borrows, `map_or` that is `is_some_and`, `push_str` of a single character, manual `split_once`, and `&PathBuf` parameters in the test fixtures. It also moved the `handlers.rs` test module to the end of the file, which is what `items_after_test_module` was pointing at. Three by hand. `cmd_add` took nine parameters threaded from `main`, and now takes `AddArgs`, which is how `set`, `append` and `check` already pass theirs; the handler destructures it so the body reads as before, and `add --help` is unchanged. The collapsed `if` in `content_trim` needed reindenting, since `--fix` left its body at the old depth. And the two `split_once` rewrites read as `.split_once(..).map(|(_, value)| value)` rather than clippy's `.map(|x| x.1)`. The two eight-argument `create_ticket` test fixtures keep an `allow(too_many_arguments)` carrying the reason: the lint is right that twenty-five positional call sites read as a wall of strings, but replacing them with a named-field struct is a refactor and not a warning sweep. a34a316 tracks it. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> |
||
|
|
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> |
||
|
|
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> |
||
|
|
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> |
||
|
|
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> |
||
|
|
39ee86e308 |
(4c516e6) Preserve paragraph breaks in ticket descriptions, and bump to 0.4.1
The opencode add tool split the description on newlines and then dropped the empty ones with filter(Boolean), so every multi paragraph description arrived as a single paragraph, against the tool's own instruction to separate paragraphs with newlines. cmd_add needed no change for this. Joining the values with a single newline is what makes an empty value a paragraph break, so the capability was already there and only the wrapper was throwing it away. Verified by hand before touching anything. The wrapper now keeps interior blanks and trims only the ends, and only trims trailing whitespace within a line, since leading whitespace is what makes a nested list or an indented block survive. --acceptance and --plan keep dropping blanks: each value there is one criterium or step, so an empty line is spacing. trim_blank_ends in cmd_add makes the second criterion hold whoever calls it, not just the wrapper: blank values at either end are dropped so a break never lands against a section heading, and an all-blank description reads as none. Interior runs are kept verbatim rather than collapsed. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> |
||
|
|
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> |
||
|
|
e20396ce6b |
(322150c) Make mv crash-safe by writing before renaming, and bump to 0.3.3
cmd_mv renamed the ticket into its new directory and only then wrote the updated content, so a write that failed left the ticket in the target directory still claiming the old status. Reproduced with a read-only ticket file: the move reported a bare "Permission denied" and left the file in committed/ carrying "Status: backlog". move_ticket_file now stages the content in a temp file, renames it over the source, and only then renames the file into the target directory. Two atomic steps, so a partial write is discarded and the original is untouched. The other obvious order, writing to the target and deleting the source afterwards, was rejected because it has the ticket in two directories at once. The worst case left is a ticket still in its old directory with a Status one move ahead, which the next mv corrects since the directory is what decides the current status. Tested, including the retry. The temp file is staged under .worklane/ rather than beside the ticket, so a leftover from a hard kill is invisible to ticket lookup and to the listing instead of appearing as a stray untitled ticket. IO errors now name the ticket and the path rather than propagating bare. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> |
||
|
|
f5204f6d8b |
(866a4eb) Accept prose values that begin with a hyphen, and bump to 0.3.2
clap read any value starting with a hyphen as a flag, so a criterion quoting --print was refused with "unexpected argument found" and no ticket was written at all. Ticket text quotes flag names constantly, and the space form is what both a person and the opencode wrapper produce, so the failure was routine. allow_hyphen_values on the five arguments that carry prose: add --title, --description, --acceptance, --plan, and the comment body. The trade is that a genuinely mistyped flag there now lands as content instead of raising a usage error, which is the right way round for prose and the wrong way round for anything else, so due, priority, tags, owner and status are left alone and still fail with exit 2. Written down in AGENTS.md. The bare double hyphen is the one shape this does not reach: as an option value it is stored as text, but in a positional it is clap's end-of-options marker and is consumed before assignment. A comment body of exactly -- therefore needs its own separator. Without it the body is reported missing and nothing is written, so it is a clear failure rather than a silent drop. Tested, along with the ordering that lets mv reach a hyphen-leading title. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> |
||
|
|
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> |
||
|
|
f557437f62 |
(277a527) Render the metadata section as an aligned table, and bump to 0.3.0
show printed the Metadata block as the markdown list the file stores, so with seven fields the values did not line up and the block read as file contents rather than as a summary. It now renders as two aligned columns: field names left, values right. The file is untouched, this is display only. content_trim_colored streamed one line at a time, so nothing ever saw the whole section. The Metadata lines are now taken as a block, since the field column cannot be sized until every name has been seen. Column width is measured on the raw names, in characters, and padding is applied before anything is styled. Measuring a coloured name counts its escape sequences towards its width, which tilts the table with colour on and not with it off. paint() is color_text() with the decision passed in, which is what lets a test render both ways in one process and compare. colorize_metadata is folded into the renderer, its only caller. A line in the section that is not a field is carried through rather than dropped, so a hand written note survives, and an unrecognised field still gets a row. Plain columns, no border characters: nothing to degrade on a font that lacks them, and the section rules already carry the only box drawing here. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> |
||
|
|
75fb2b3a6d |
(4b1e7e8) Print the ticket title once in show
cmd_show printed the resolved title with its rule, then content_trim_colored printed the "# " heading again out of the file content, so every show output carried the title twice. The body now skips the heading, along with the blank line the template puts under it so nothing is left where it was. cmd_show keeps the surviving copy and colours it green, which is where the colour guideline puts a title. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> |
||
|
|
2503f9aee9 |
(3b7edd7) Show priority as a glyph, and bump to 0.2.0
A bare digit in a listing is easy to skip over. Levels render as a two-segment meter that empties as the level rises: ●● 1, ●◐ 2, ●○ 3, ◐○ 4, ○○ 5, with ·· for unset and ?? for a value outside the range. Only ●, ◐, ○ and · are used, because they are what frig draws for its status indicators and so are known to be in the terminal font. The first cut of this used the quadrant circles ◕ and ◔, which are in a quarter as many fonts, so terminals substituted them from a fallback that drew them oversized and the column came out ragged. Two cells of a three-level ramp gives five steps of ink, 2, 1.5, 1, 0.5, 0, without leaving that safe set. Tests pin the safe set, the equal width and the monotonic emptying. The mark carries the level on its own, because colour cannot. Output is colourless whenever it is piped, which is how the opencode tools and every script read it, and NO_COLOR turns it off in a terminal too. Colour only accentuates: brightred, red, orange, cyan, grey, skipping green because green means title. The number counts up while the meter empties, since 1 is the most urgent. That is the convention, but it reads as a bug unless written down, so it is in AGENTS.md and in the legend. Both the ramp and the legend come from priority_mark, and `ls --help` prints the legend, since nothing in a listing explains a mark. brightred is indexed like grey, for the same reason: it is the spelling that renders. Minor bump: two new flags, a new metadata field and a changed ls row, covering dca0b61 and this ticket. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> |
||
|
|
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> |
||
|
|
8563218ab5 |
(06f15bf) Stop comments overwriting each other, and bump to 0.1.1
Comment filenames were stamped to the second, so two comments added in the same second produced the same name and fs::write truncated the first. Agents post in bursts, so this was routine data loss: five comments added back to back left one file. Stamp microseconds instead, and create the file with create_new rather than fs::write, so a name that already exists is taken as a collision and the next zero-padded suffix is used instead of overwriting. The suffix sorts after the bare stem, so read_comments still orders comments the way they were written. The collision branch cannot be reached from the CLI, since two processes will not share a microsecond, so it has a unit test of its own. Patch bump: existing second-resolution comment files still read and still sort ahead of new ones written in the same second, so no migration. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> |
||
|
|
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 (
|