(8cc254c, 47aa0fe, a1dbd60) Fix the documented examples and the add tool schema
Three doc tickets in one commit, since two of them are the same check: run everything the docs claim and see what fails. 8cc254c: the add example in the kanban skill passed -t twice, once where -g for tags was meant, and gave -p three bare positional values instead of three flags. Clap rejected it with exit 2, reproduced verbatim. Rewritten, with a line saying why -t is not tags and why each step needs its own -p, since the example alone does not explain the trap. The "--due (or --due)" filler is gone; --due and --priority have no short form and now say so. a1dbd60: only title is required in the add schema now. The other six fields were unmarked, so the model had to invent a value for every field on every ticket. The other four tool schemas were checked and are already right: ls is fully optional, and the required arguments on show, mv and comment are genuinely required. Every add field was already guarded in execute, so an omitted field adds no flag. 47aa0fe: the README row it describes was already fixed in passing byddbd45e, which rewrote it for the priority work. "ls --status" appears nowhere. What was left was the second criterion, and running every example turned up a different problem: the 141 exit code documented for a truncated pipe only happens when the output exceeds the 64 KiB a pipe holds. A short listing lands in the buffer whole and reports 0. That was my own wording fromb28ddb9and it is now precise. Every example in both files was run against the built binary, with real ids substituted where they use placeholders, and the four documented exit codes were measured rather than assumed. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
39ee86e308
commit
6c43e62a4b
@@ -87,28 +87,37 @@ export const init = tool({
|
||||
export const add = tool({
|
||||
description:
|
||||
"Add a new ticket to the worklane backlog. Requires a title. Description, acceptance criteria, and plan each support multiple lines (one item per line). Tags are comma-separated.",
|
||||
// Title is the only required field. Every other flag is left off entirely when
|
||||
// the field is omitted, so an unmarked schema only forced the model to invent a
|
||||
// value for fields it had nothing to say about.
|
||||
args: {
|
||||
title: tool.schema
|
||||
.string()
|
||||
.describe("Ticket title (required)"),
|
||||
description: tool.schema
|
||||
.string()
|
||||
.describe("Description text. Use newlines between paragraphs."),
|
||||
.describe("Description text. Use newlines between paragraphs.")
|
||||
.optional(),
|
||||
acceptance: tool.schema
|
||||
.string()
|
||||
.describe("Acceptance criteria, one per line. Put each criterium on its own line."),
|
||||
.describe("Acceptance criteria, one per line. Put each criterium on its own line.")
|
||||
.optional(),
|
||||
plan: tool.schema
|
||||
.string()
|
||||
.describe("Implementation plan steps, one per line. Put each step on its own line."),
|
||||
.describe("Implementation plan steps, one per line. Put each step on its own line.")
|
||||
.optional(),
|
||||
tags: tool.schema
|
||||
.string()
|
||||
.describe("Comma-separated tags, e.g. 'bug,frontend,urgent'"),
|
||||
.describe("Comma-separated tags, e.g. 'bug,frontend,urgent'")
|
||||
.optional(),
|
||||
due: tool.schema
|
||||
.string()
|
||||
.describe("Due date in YYYY-MM-DD format"),
|
||||
.describe("Due date in YYYY-MM-DD format")
|
||||
.optional(),
|
||||
owner: tool.schema
|
||||
.string()
|
||||
.describe("Ticket owner name. If omitted, defaults to the git user."),
|
||||
.describe("Ticket owner name. If omitted, defaults to the git user.")
|
||||
.optional(),
|
||||
priority: tool.schema
|
||||
.string()
|
||||
.describe("Priority level, 1 (most urgent) to 5 (least). Left unset if omitted.")
|
||||
|
||||
Reference in New Issue
Block a user