(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>
This commit is contained in:
co-authored by
Claude Opus 5
parent
a1bdb5df49
commit
f454d212a4
+38
-7
@@ -6,10 +6,10 @@ description: Manage tickets on a local worklane kanban board with the `worklane`
|
||||
# worklane
|
||||
|
||||
A kanban board as files. Every ticket is one markdown file in `.worklane/<status>/`,
|
||||
named `<uuid>_<slug>.md`, and comments live in `.worklane/comments/<uuid>/`. The CLI is
|
||||
the only thing that writes there: do not hand-edit or hand-place a file, because the
|
||||
filename, the `Status` field and the directory have to agree and the commands are what
|
||||
keep them agreeing.
|
||||
named `<uuid>_<slug>.md`, and its history lives in `.worklane/history/<uuid>/`, one file
|
||||
per entry. The CLI is the only thing that writes there: do not hand-edit or hand-place a
|
||||
file, because the filename, the `Status` field and the directory have to agree and the
|
||||
commands are what keep them agreeing.
|
||||
|
||||
Commands walk up from the working directory to find the nearest `.worklane`, so **run
|
||||
`worklane` inside the repo the ticket belongs to**. Which directory you run it in is
|
||||
@@ -48,7 +48,7 @@ worklane ls # every status, counts then tickets
|
||||
worklane ls backlog # one status
|
||||
worklane ls --priority 1 # only the most urgent
|
||||
worklane ls --tag bug # only the tickets carrying that tag
|
||||
worklane show 1b78a24 # one ticket, body and comments
|
||||
worklane show 1b78a24 # one ticket, body and history
|
||||
```
|
||||
|
||||
`ls` prints a seven-character id per ticket. That is what you address it by.
|
||||
@@ -270,6 +270,33 @@ existing ticket will have been written from a different angle.
|
||||
- Related but not the same: file it, and record it with `relate <new> --relates-to <old>`
|
||||
rather than only mentioning the id in prose.
|
||||
|
||||
## What the board records about your work
|
||||
|
||||
`show` ends with a HISTORY block: every comment on the ticket and every change to its
|
||||
status, owner or tags, oldest first, each naming who made it. You do not write these by
|
||||
hand. `mv`, `chown` and `set --tags` record themselves, and a call that changes nothing
|
||||
records nothing.
|
||||
|
||||
```
|
||||
HISTORY
|
||||
────────────────────
|
||||
|
||||
status backlog → committed claude (2026-08-24 12:45:00)
|
||||
|
||||
From claude (2026-08-24 13:10:22)
|
||||
The offset was never passed to the widget.
|
||||
|
||||
owner _Not set_ → Ansho Rei claude (2026-08-24 13:11:04)
|
||||
```
|
||||
|
||||
Nothing else is logged: ticking a criterion, and editing the title, description, plan,
|
||||
priority or due date, leave no entry. **When one of those matters, say so in a comment.**
|
||||
An implementation plan rewritten because the first one was wrong is worth a sentence; the
|
||||
edit itself is not recorded and nobody can reconstruct why from the file.
|
||||
|
||||
Read the block before picking a ticket up: it says whether somebody has already had it in
|
||||
`committed` and sent it back, which the current status alone does not.
|
||||
|
||||
## Who your entries are attributed to
|
||||
|
||||
Every comment carries an author, and by default that is the git user of the machine you
|
||||
@@ -283,11 +310,15 @@ WORKLANE_ACTOR=claude worklane comment 1b78a24 "The offset was never passed to t
|
||||
|
||||
Set it once where your session's environment is configured, not on each call: `env` in
|
||||
`~/.claude/settings.json` for Claude Code, and the environment opencode is started with
|
||||
for opencode, since it passes its own environment to the tools it runs. `--actor` on
|
||||
`comment` overrides it for one call, an empty value counts as unset and falls back to the
|
||||
for opencode, since it passes its own environment to the tools it runs. `--actor`
|
||||
overrides it for one call and is spelled the same on every command that writes an entry,
|
||||
`comment`, `mv`, `chown` and `set`. An empty value counts as unset and falls back to the
|
||||
git user, and with nothing at all the author is `unknown`. It is free text, checked
|
||||
against nothing: name yourself something a person reading the board will recognise.
|
||||
|
||||
On `chown`, `--actor` is not the user argument: `worklane chown alice 1b78a24` makes alice
|
||||
the ticket's owner, and `--actor` says who made that change.
|
||||
|
||||
If the variable is not set and you cannot set it, pass `--actor` rather than letting the
|
||||
comment claim to be the user's.
|
||||
|
||||
|
||||
+24
-4
@@ -187,7 +187,7 @@ export const ls = tool({
|
||||
|
||||
export const show = tool({
|
||||
description:
|
||||
"Show a complete ticket by UUID or title. Displays title, description, acceptance criteria, implementation plan, metadata, and comments.",
|
||||
"Show a complete ticket by UUID or title. Displays title, description, acceptance criteria, implementation plan, metadata, and the history: every comment on it and every change to its status, owner or tags.",
|
||||
args: {
|
||||
id: tool.schema
|
||||
.string()
|
||||
@@ -219,6 +219,10 @@ export const mv = tool({
|
||||
.boolean()
|
||||
.describe("Force move (allows non-sequential moves like done -> backlog). Use with caution.")
|
||||
.optional(),
|
||||
actor: tool.schema
|
||||
.string()
|
||||
.describe("Who the entry is attributed to. If omitted, WORKLANE_ACTOR is used, then the git user, then \"unknown\". Set WORKLANE_ACTOR in the environment opencode is started with rather than passing this on every call.")
|
||||
.optional(),
|
||||
},
|
||||
async execute(args: Record<string, any>, context: ToolContext) {
|
||||
if (!args.ticket) {
|
||||
@@ -229,6 +233,7 @@ export const mv = tool({
|
||||
}
|
||||
const cmd: string[] = ["mv", args.ticket, "--status", args.status];
|
||||
if (args.force) cmd.push("--force");
|
||||
if (args.actor) cmd.push("--actor", args.actor);
|
||||
|
||||
try {
|
||||
return await run(cmd, context);
|
||||
@@ -249,7 +254,7 @@ export const comment = tool({
|
||||
.describe("Comment body text (required). Supports markdown formatting and multiple paragraphs separated by newlines."),
|
||||
actor: tool.schema
|
||||
.string()
|
||||
.describe("Who the comment is attributed to. If omitted, WORKLANE_ACTOR is used, then the git user, then \"unknown\". Set WORKLANE_ACTOR in the environment opencode is started with rather than passing this on every call.")
|
||||
.describe("Who the entry is attributed to. If omitted, WORKLANE_ACTOR is used, then the git user, then \"unknown\". Set WORKLANE_ACTOR in the environment opencode is started with rather than passing this on every call.")
|
||||
.optional(),
|
||||
},
|
||||
async execute(args: Record<string, any>, context: ToolContext) {
|
||||
@@ -306,6 +311,10 @@ export const set = tool({
|
||||
.string()
|
||||
.describe("New priority level, 1 (most urgent) to 5 (least)")
|
||||
.optional(),
|
||||
actor: tool.schema
|
||||
.string()
|
||||
.describe("Who the entry is attributed to. Only reaches the entry tags writes, since that is the one field of this command's that is logged. If omitted, WORKLANE_ACTOR is used, then the git user.")
|
||||
.optional(),
|
||||
},
|
||||
async execute(args: Record<string, any>, context: ToolContext) {
|
||||
if (!args.ticket) {
|
||||
@@ -330,8 +339,12 @@ export const set = tool({
|
||||
if (args.tags) cmd.push("--tags", args.tags);
|
||||
if (args.due) cmd.push("--due", args.due);
|
||||
if (args.priority) cmd.push("--priority", String(args.priority));
|
||||
// Last, and not counted as a field: the length check below is what refuses a call
|
||||
// that names nothing to change, and an actor alone changes nothing.
|
||||
const fields = cmd.length;
|
||||
if (args.actor) cmd.push("--actor", args.actor);
|
||||
|
||||
if (cmd.length === 2) {
|
||||
if (fields === 2) {
|
||||
return "Error setting fields: give at least one field to change";
|
||||
}
|
||||
|
||||
@@ -405,6 +418,10 @@ export const chown = tool({
|
||||
ticket: tool.schema
|
||||
.string()
|
||||
.describe("Ticket UUID prefix (4+ chars) or title substring (required)"),
|
||||
actor: tool.schema
|
||||
.string()
|
||||
.describe("Who the entry is attributed to, which on this command is not the same as user: user becomes the ticket's owner, actor is who made the change. If omitted, WORKLANE_ACTOR is used, then the git user, then \"unknown\".")
|
||||
.optional(),
|
||||
},
|
||||
async execute(args: Record<string, any>, context: ToolContext) {
|
||||
if (!args.user) {
|
||||
@@ -414,8 +431,11 @@ export const chown = tool({
|
||||
return "Error changing owner: ticket is required";
|
||||
}
|
||||
|
||||
const cmd: string[] = ["chown", args.user, args.ticket];
|
||||
if (args.actor) cmd.push("--actor", args.actor);
|
||||
|
||||
try {
|
||||
return await run(["chown", args.user, args.ticket], context);
|
||||
return await run(cmd, context);
|
||||
} catch (err: any) {
|
||||
return `Error changing owner: ${err.message}`;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user