Skip to content

docs(skill): reorder the bundled skill around what an agent needs first - #176

Merged
ryanlewis merged 1 commit into
mainfrom
docs/skill-refresh
Sep 5, 2026
Merged

ryanlewis merged 1 commit into
mainfrom
docs/skill-refresh

Conversation

@ryanlewis

Copy link
Copy Markdown
Owner

Tidy of the bundled agent skill before v0.7.0. Six PRs edited internal/skill/SKILL.md piecemeal since v0.6.0 (#150, #151/#166, #157/#168, #160, #169, #170/#173, #172) and it had drifted into a pile of overlapping notes.

Audited against the CLI

Built the binary and checked every command and flag the skill mentions against ./things --help and each subcommand's --help, in both directions. Both now come back clean: no flag in the help is missing from the skill, and no flag named in the skill is absent from the CLI.

What moved

Reordered so the first screen is what an agent needs before it acts:

Before After
Safety → Output → Config → Commands → Repeating → Confirming → Tags → --agent → Refs → Values → Flows → Completions → Tips Safety → Referring to an item → Output and --json → Writes: what Things refuses or drops (4 numbered rules) → Config → Command reference → --agent → Values → Flows → Completions

"Referring to an item" moved up from near the bottom — how refs and UUIDs work is prerequisite to almost everything else, and the index-cache trap (any list or search overwrites it, including one the agent runs itself) was buried. The four scattered write-refusal topics are now one section of numbered rules that the rest of the document cross-references by number instead of restating.

What was cut

  • Tips — every bullet restated an earlier section. Kept its one unique line, about when to reach for open.
  • --yes and the project confirmation were stated in four places, --json in three, repeating behaviour in four. Each is now in one place.
  • Comments in the command block that only restated --help.

Net 14% shorter (19,107 → ~16,500 chars) while covering more surface.

What was stale or missing

  • open was listed as a write that "modifies the user's real data". It reveals an item in the app and pulls focus; it writes nothing.
  • Absent entirely: the skill subcommands (list/show/install/uninstall), version, --db, --config, $THINGS_CLI_CONFIG, --no-hints.
  • --when "" / --deadline "" clear a value on edit/project edit (and only there) — undocumented.
  • tag add prints its result on success, so the blanket "write commands print nothing" was wrong for it; it is also covered by the --no-verify read-back, which rule 1 did not mention.
  • "Things3 must be running" applied only to --create-tags, but tag add uses the same AppleScript path.

One code change

internal/output/agent.go — a self-contradiction in the --agent brief for a repeating project, from my #172: closingOut guarded the to-do branch on !t.Repeating but not the project branch, so the brief offered things complete <uuid> --yes / cancel --yes directly above a note saying there were none — commands checkRepeating refuses anyway. Guarded both branches, with a regression test (TestPrintAgentBriefRepeatingProject; there was no test for a repeating project brief).

This is outside a docs-only brief, and I flagged it rather than slipping it in: it is here because the skill now documents the corrected behaviour, so doc and code had to move together. The alternative was to document the bug as if it were intended. Happy to split it out if preferred.

How tested

make test (go test -race ./...) and make lint (0 issues) pass; gofmt clean. internal/skill/skill_test.go asserts the frontmatter and a set of command references, all still present. Verified the rendered install output via things skill show claude.

README's Agent skill section was checked and needs no change — its subcommand table, flag table and the three default install paths all match internal/skill/{claude,codex,pi}.go.

Six PRs edited SKILL.md piecemeal since v0.6.0 and it had drifted into a
pile of overlapping notes. Audited every command and flag in it against
`./things --help` and each subcommand's, in both directions: nothing in
the help is now missing from the skill, and nothing in the skill names a
flag the CLI does not have.

Reordered so the first screen is what an agent needs before it acts:
safety, how to refer to an item, `--json` and its error shape, then the
four rules that decide whether a write is refused, dropped or confirmed
(tags, repeating items, the status read-back, the project confirmation).
The command reference, `--agent`, values and flows follow.

Merged the duplication. `--yes` and the project confirmation were stated
in four places, `--json` in three, repeating in four; each is now in one
place and cross-referenced by rule number. Dropped the Tips section,
which only restated earlier sections, keeping its one unique line about
`open`.

Corrections: `open` was listed as a write that "modifies the user's real
data" — it reveals an item and pulls focus, and writes nothing. The
`skill` subcommands, `version`, `--db`, `--config`, `$THINGS_CLI_CONFIG`
and `--no-hints` were absent entirely, and `--when ""` / `--deadline ""`
clearing a value on `edit`/`project edit` was undocumented. `tag add`
prints its result on success and is covered by the `--no-verify`
read-back; both were missing.

Net 14% shorter despite covering more surface.

Also fixes a self-contradiction in the `--agent` brief for a repeating
project, from #172: `closingOut` guarded the to-do branch on `!Repeating`
but not the project branch, so the brief offered `complete --yes` and
`cancel --yes` above a note saying there were none — commands Things
refuses anyway. The skill documents the fixed behaviour, so the two had
to move together.
@ryanlewis
ryanlewis merged commit 640e2db into main Sep 5, 2026
7 checks passed
@ryanlewis
ryanlewis deleted the docs/skill-refresh branch September 5, 2026 11:41
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.

1 participant