Repository navigation
docs(skill): reorder the bundled skill around what an agent needs first - #176
Merged
Merged
Conversation
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.
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.
Tidy of the bundled agent skill before v0.7.0. Six PRs edited
internal/skill/SKILL.mdpiecemeal 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 --helpand 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:
--agent→ Refs → Values → Flows → Completions → Tips--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
listorsearchoverwrites 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
open.--yesand the project confirmation were stated in four places,--jsonin three, repeating behaviour in four. Each is now in one place.--help.Net 14% shorter (19,107 → ~16,500 chars) while covering more surface.
What was stale or missing
openwas listed as a write that "modifies the user's real data". It reveals an item in the app and pulls focus; it writes nothing.skillsubcommands (list/show/install/uninstall),version,--db,--config,$THINGS_CLI_CONFIG,--no-hints.--when ""/--deadline ""clear a value onedit/project edit(and only there) — undocumented.tag addprints its result on success, so the blanket "write commands print nothing" was wrong for it; it is also covered by the--no-verifyread-back, which rule 1 did not mention.--create-tags, buttag adduses the same AppleScript path.One code change
internal/output/agent.go— a self-contradiction in the--agentbrief for a repeating project, from my #172:closingOutguarded the to-do branch on!t.Repeatingbut not the project branch, so the brief offeredthings complete <uuid> --yes/cancel --yesdirectly above a note saying there were none — commandscheckRepeatingrefuses 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 ./...) andmake lint(0 issues) pass;gofmtclean.internal/skill/skill_test.goasserts the frontmatter and a set of command references, all still present. Verified the rendered install output viathings 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.