Repository navigation
fix(cli): say patch, not draft, in user-facing copy - #110
Conversation
Draft is retired; the CLI's word for the thing it publishes is patch. Output labels, the update-only flag (--patch), error text, the skill, the README and the cache's identifiers now say so. The cache file moves to patches.json; a leftover drafts.json is refused with a rename hint rather than silently forgotten. Closes #92 Co-Authored-By: Claude Fable 5.1 <[email protected]>
Code review — PR 110 vs #92Two-axis review of StandardsHard violations: none. Hit-every-surface for this rename: Effect: No Effect service findings. Judgement (baseline smells):
const draftId = result.stdout.match(/^Patch ID: ([a-z0-9]{12})$/m)?.[1];
assert.ok(draftId, `missing draft ID in CLI output:\n${result.stdout}`);(
if (!(yield* fs.exists(file).pipe(Effect.orElseSucceed(() => true)))) {
const exists = (file: string) => fs.exists(file).pipe(Effect.orElseSucceed(() => false));
if (!(yield* exists(patchesPath)) && (yield* exists(retiredPatchesPath))) {An Spec(a) Missing or partial Spec: “Rename in every user-facing string.” Listed CLI surfaces are done: messages ( Spec / Allison: “the cache's identifiers” vs “the code renames when the port touches it.” Stored (b) Scope creep
Not in the issue: leftover Not in the issue: skill Good-fits “stakeholder-facing drafts” → “stakeholder-facing updates”. (c) Implemented but wrong Spec: “the CLI's word for the thing it publishes is patch.” “Stakeholder-facing drafts” is ordinary English for preliminary docs, not that noun. “Updates” changes the skill’s advertised fit rather than replacing the product word. Intent vs #92After #16/#91, draft is no longer the unit. Agents drive the CLI, so they must see one word — patch — in messages, flags, skill, README, and cache names. The wire already says That is what landed. Verdict: this closes #92 honestly. MethodVerdict: acceptable. Rename-in-place was the right scope. No redesign. Dual-file reads or a migrator would have been extra machinery for a same-shape rename.
The weaker choices:
Tests are focused, not slop: YAGNI / beautiful codeVerdict: mostly simple, with three blemishes. The port is a straight substitution: Blemishes:
Summary
Does not fail the PR. The vocabulary rename is the right size and closes #92. The three things worth a pass if you touch it again: restore “stakeholder-facing drafts” (or say “pages”), rename |
Review follow-ups: the old cache file is refused on sight rather than only when patches.json is absent, and a faulting exists() fails closed. The packed e2e script's parsed id is a patchId, the skill's plain-English "stakeholder-facing drafts" is restored, and the example page's copy about the CLI says patch. Co-Authored-By: Claude Fable 5.1 <[email protected]>
|
Review follow-up, verified against the source, in the second commit. Fixed
Kept as is
Lint, typecheck, the CLI suite and the packed end-to-end script pass locally on the new commit. Written by Claude Fable 5.1 in Claude Code. |
- delete speaks patch: `--patch <patch-id>`, "Deleted patch", patches.json - neither-target and both-target are separate local errors - keyless message says publishing key, per the CLI glossary - vitest proves forgetPatch drops every file pointing at the patch - packed e2e delete step does its own upload instead of relying on script order - skill and README examples name delete where they listed whoami/upload Co-Authored-By: Claude Fable 5.1 <[email protected]>
The CLI still called the thing it publishes a draft in its output, its
--draftflag, its errors, the README, the agent skill and the cache's code names, while the wire and the Patches glossary say patch. Anyone reading the CLI next to the API saw two words for one thing.Now the CLI says patch everywhere a user or agent reads it:
Uploaded patch/Patch ID:, the update-only flag is--patch <patch-id>, and the skill, README andCONTEXT.mdfollow. The cache file moves fromdrafts.jsontopatches.json, and the identifiers around it are renamed. A leftoverdrafts.jsonis refused with a rename hint instead of being silently ignored, because ignoring it would make the next upload create a new patch at a new URL rather than update the old one. The stored pre-renamedraftIdkey is still read, since that is wire history rather than vocabulary. Thepatchyskill's lock hash is refreshed by hand.The wire contract is unchanged. The packed end-to-end script is updated only where it reads the CLI's output and cache file; its internal variable names rename when a port touches them.
Closes #92
Written by Claude Fable 5.1 in Claude Code.