Skip to content

chore(output): say task, not to-do, in the --json error kind - #231

Merged
ryanlewis merged 1 commit into
mainfrom
chore/issue-219-kind-vocabulary
Sep 10, 2026
Merged

ryanlewis merged 1 commit into
mainfrom
chore/issue-219-kind-vocabulary

Conversation

@ryanlewis

Copy link
Copy Markdown
Owner

Closes #219

The --json error payload spelled one concept two ways. kind was "task" everywhere except the not a project failure, where it was "to-do", while type on a task row has said "task" since #214. One word wins, and that word is task.

What changed

ProjectEditCmd.Run now builds its wrongKindError with Kind: "task". That field feeds both the JSON kind and the rendered message, so the message moves with it: "Post letter" is a task; use things edit. Every other producer already said task, project, area or tag.

The docs that print or explain the payload follow: the error-payload example in the bundled skill, the token paragraph on the agents page, and the README paragraph explaining what kind carries. The skill gains a one-line note in its --json section saying a to-do is a task in every JSON value the CLI emits, naming import payloads as the one exception.

commands.md and configuration.md are untouched. Neither documents the error payload, and no command or flag changed.

Not a breaking change

kind: "to-do" was introduced in #193, which is not an ancestor of v0.7.0. The value has never appeared in a release, so no published contract moves and there is nothing for the 0.8.0 notes to warn about. That is the same reasoning #223 applied to the type rename. The error token is untouched either way: it stays not a project.

Out of scope, deliberately

import payloads still spell a to-do "to-do". That is Things' own JSON URL scheme format and it stays documented as the exception.

Three other kind variables hold "to-do" and were left alone, because none of them reaches JSON. They only compose English prose: the repeating-item refusal in verify.go, the per-item refusal line in importcheck.go, and the agent brief's opening sentence in internal/output/agent.go. The issue scopes itself to JSON values, and renaming these would rewrite prose and its tests well outside that. The new comment on the Kind field says so explicitly, so the next reader does not take the rule as wider than it is.

How tested

make test and make lint both green. TestRunProjectEditRefusesTodoReference asserts the new kind and message and carries a comment saying why. The built binary was run against the live Things database to confirm the payload it prints.

The kind field spelled one concept two ways: task everywhere except the
not a project failure, which said to-do, while type on a task row has
said task since #214. Settle on task, the word the CLI uses elsewhere.

kind feeds the rendered message as well as the JSON, so the plain-text
error moves with it. The value has never shipped: it arrived in #193,
after v0.7.0, so no published contract changes.

Import payloads keep to-do. That is Things' own URL scheme format, and
it stays documented as the exception, now with a line in the skill's
--json section saying so.

Closes #219
@ryanlewis
ryanlewis merged commit 977faeb into main Sep 10, 2026
10 checks passed
@ryanlewis
ryanlewis deleted the chore/issue-219-kind-vocabulary branch September 10, 2026 12:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

chore(output): unify the kind vocabulary in the --json error payload on "task"

1 participant