Repository navigation
Description
Decision
Delete the mutation plan-token workflow and replace it with the same operator model used by gog:
- one command performs the mutation
--dry-runprints the intended action without mutating- destructive commands prompt on an interactive terminal
--forceskips that destructive confirmation--no-inputnever prompts and fails when confirmation is required
There should be no --apply, --plan, plan token, five-minute expiry, or second invocation.
Why
The current workflow makes ordinary writes needlessly difficult. A caller submits the full mutation, receives a short-lived token, then submits the same mutation again with --apply --plan. Event creation is worse because the second command still needs every original flag.
That ceremony did not make the failed RSVP cleanup safer. It made the operation harder to run and harder to debug.
The CLI should validate the request, read any required remote state, show a preview when asked, and perform the approved write once. Cross-process plan storage is not needed for that.
gog behavior used as the reference
Research was done against openclaw/gogcli commit 2c636ba7dce06acf09b6ba1f0650e00cb95edecf and the installed gog v0.35.0.
- Global flags define
--dry-run,--force, and--no-input: https://github.com/openclaw/gogcli/blob/2c636ba7dce06acf09b6ba1f0650e00cb95edecf/internal/cmd/root.go#L33-L53 --dry-runprints a structured operation and request, then exits 0 before dispatch: https://github.com/openclaw/gogcli/blob/2c636ba7dce06acf09b6ba1f0650e00cb95edecf/internal/cmd/dryrun.go#L12-L53- Destructive actions prompt only on a TTY. Noninteractive use fails unless
--forceis present: https://github.com/openclaw/gogcli/blob/2c636ba7dce06acf09b6ba1f0650e00cb95edecf/internal/cmd/confirm.go#L21-L43 --forceskips destructive confirmation.--no-inputprevents hangs. There is no plan-token round trip.
This issue copies the interaction model, not gog's output casing or internal package layout.
Current affected commands
The v3 schema marks these commands as plan-required:
blasts.sendcohosts.invitecohosts.link.createcohosts.link.revokecohosts.removecohosts.revoke-inviteevents.cancelevents.createevents.updateguests.invitersvp.set
The fix must cover the whole class. Do not ship an event-create-only exception.
Required UX
Ordinary and externally visible writes
Run once:
partiful events create --title "Example" --start "2026-09-20T18:00:00-07:00" --timezone America/Los_Angeles
partiful events update <event-id> --title "New title"
partiful rsvp set <event-id> --status not-going --display-name "Example" --party-size 1 --timezone America/Los_Angeles
partiful guests invite <event-id> --contact "Example"
partiful blasts send <event-id> --audience all-guests --message-file ./message.txtThese commands validate and dispatch in one invocation. They do not require a second confirmation token.
Preview
partiful --dry-run rsvp set <event-id> ...
partiful events create ... --dry-run--dry-run must:
- perform no remote mutation
- return exit 0 for a valid preview
- emit a stable structured preview containing the command or operation and normalized request
- keep secrets and private IDs redacted
- avoid auth and network work when the preview can be built locally
- clearly label any remote reads needed to resolve contacts or bind current state
Destructive actions
Destructive commands should prompt on a real TTY. At minimum this includes:
events.cancelcohosts.removecohosts.link.revokecohosts.revoke-invite
Behavior:
partiful events cancel <event-id> # prompt on TTY
partiful events cancel <event-id> --force # execute without prompt
partiful events cancel <event-id> --no-input # fail without mutation--force means "skip destructive confirmation." It must not disable validation, ownership checks, remote contract checks, or read-back verification.
Safety that stays
Removing plan tokens does not mean turning off validation.
Keep:
- input normalization and validation
- ownership and permission checks
- read-before-write safeguards
- exact reviewed remote request construction
- fail-closed handling for unknown remote shapes
- redaction of private account, guest, and contact IDs
- one mutation attempt with no automatic retry when completion is uncertain
- post-write read-back where the command contract supports it
Run those checks inside the single command invocation immediately before dispatch. There is no stale cross-process plan to compare.
Remove
--apply--plan- mutation
--confirmtokens or exact confirmation strings planTokenoutput fields- five-minute plan expiry
- persisted
.mutation-plansstate - plan creation, loading, binding, consuming, and stale-token errors
- schema/help text that teaches a two-command mutation lifecycle
Delete dead plan code rather than leaving a compatibility layer. This CLI is still pre-stable enough to make the interface coherent.
Acceptance criteria
- All 11 current plan-required commands execute in one invocation.
- None exposes or accepts
--apply,--plan, or plan confirmation tokens. -
--dry-runis available consistently and performs zero mutation calls. - Dry-run JSON is stable, redacted, and useful to an agent without a second command.
- Destructive commands prompt only on a TTY.
- Destructive commands fail fast under
--no-inputunless--forceis supplied. -
--forceskips only the prompt and does not weaken validation. - Non-destructive and externally visible writes do not require an interactive prompt by default.
- Existing request validation, permission checks, remote contract checks, and uncertain-completion behavior remain intact.
- Mutation plan files and dead implementation code are removed.
-
partiful --help, command help, andpartiful schemadescribe the new flags and no longer mention plan/apply. - Tests cover every affected command, dry-run zero-write behavior, TTY confirmation, noninteractive refusal, force bypass, redaction, and one-attempt dispatch.
-
go test ./...,go test -race ./...,go vet ./...,go build ./..., andgo mod verifypass.
Related work
-
bug(cli): support conventional command-level --help #200 and PR fix(cli): add conventional command help #202 add conventional
--helpsupport. PR fix(cli): add conventional command help #202 currently documents the old plan/apply lifecycle and will need reconciliation with this issue. -
confirm()has no TTY check — an agent that omits-yhangs forever #97 already tracks the old confirmation helper hanging without a TTY. This work should close the underlying class by adoptinggog's noninteractive refusal behavior. -
hermes 🤖
Activity
[-]redesign event plan tokens so apply does not require the full payload again[/-][+]Replace mutation plan tokens with gog-style dry-run and confirmation UX[/+]