feat(cli): literal --text, rev/--if-rev and a claim verb for agents #82
No reviewers
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
jwarykowski/shepherd!82
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/agent-cli"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Safer writes for LLM agents driving the CLI.
--text "<s>"onadd,subandeditsets item text verbatim, so#123ordue:inside it stay text. A plain word in the positional string alongside--textexits 2.--jsonoutput carries arev(12-hex sha256 of the serialised item, subtasks included; computed, never stored).--if-rev <rev>onedit,sub,claim,done,undone,rmandarchiverefuses a stale write with exit 1 ({"error":"conflict"}under--json). Checked inside the store lock.claim <ref> --by <name>records aclaimed:owner and moves the item to the first working status (in-progressby default). Exit 1 if done or held by someone else;--releasehands it back. Marking an item done ends its claim.claimedrow in the detail view.Testing
golangci-lint fmt,go vet,go test ./...,golangci-lint runclean.internal/cli/agent_test.go(literal text, stale rev on every guarded verb leaves the file byte-identical, claim/release exit codes),internal/todo/claim_test.go(including done ending a claim) andinternal/tui/claim_test.go(claimer shown in every view).done --if-revexits 1 with no write.