feat(output)!: spell the to-do type value task, not todo - #223
Merged
Merged
Conversation
BREAKING CHANGE: type on a to-do row in JSON output is now "task" instead of "todo". Supersedes the unreleased "todo" spelling from
ryanlewis
force-pushed
the
fix/issue-218-type-task
branch
from
September 10, 2026 11:15
524b634 to
312504f
Compare
This was referenced Sep 10, 2026
ryanlewis
added a commit
that referenced
this pull request
Sep 10, 2026
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #218
What changed
typeon a to-do row in JSON output is now"task"instead of"todo".model.typeNamesis the single source of truth (internal/model/model.go), so every JSON surface picks this up without its own change.Mechanical rename, nothing else touched:
internal/model/model.go,internal/model/model_test.go— codec map and its round-trip/marshal/unmarshal/string testscmd/things/run_test.go— raw-JSON assertions from feat(output)!: render type as a string in JSON #214internal/skill/SKILL.md,docs/content/commands.md,docs/content/agents.md— every"todo"value in prose andjqexamplesThe legacy integer
0still decodes on input; no compatibility shim for the stringtodois needed since #214 is unreleased. Plain text output,model.Status, and the codec's structure are unchanged.Why
#214 introduced the string values
todo/project/heading. Review on that PR flaggedtodoas a fourth spelling of one concept — the codebase already saystask/to-doelsewhere — and the issue calls fortaskas the word the CLI should use generally, before 0.8.0 ships the contract.How tested
make testandmake lintpass/code-review --fixrun against the diff; its two suggested fixes (adb.go/tasks.gocleanup) were out of scope for this issue and were not applied