Skip to content

docs: add design for flow/permission-set-assignment cleanup - #132

Merged
ClayChipps merged 1 commit into
mainfrom
docs/flow-permission-assignment-cleanup-design
Aug 27, 2026
Merged

docs: add design for flow/permission-set-assignment cleanup#132
ClayChipps merged 1 commit into
mainfrom
docs/flow-permission-assignment-cleanup-design

Conversation

@ClayChipps

Copy link
Copy Markdown
Contributor

Summary

Design doc for replacing three bespoke, per-customer-repo Node scripts (deleteFlows.mjs,
deletePermissionSetAssignments.mjs, deleteObsoleteFlowVersions.mjs) with proper commands in this
monorepo:

  • sf simply flow delete — new simply-flow package. Deactivates and hard-deletes every version of
    the Flows named in a destructiveChanges.xml (or via explicit --flow-name flags) — required
    before a destructive metadata deploy can remove a Flow that still has an active version.
  • sf simply flow version prune — same new package. Deletes obsolete Flow versions for flows found
    under --source-dir, with a --dry-run preview the original script never had.
  • sf simply permissions assignment delete — new command in the existing simply-permissions
    package. Deletes PermissionSetAssignments for permission sets/groups named in a
    destructiveChanges.xml, so their own destructive deploy doesn't fail or orphan assignments.

Also proposes a new simply-core helper, readPackageManifestMembers, so both --file-reading
commands share one parser for the <types><name>/<members></types> shape instead of each rolling
their own — and fixes a real SOQL-injection gap in the originals (unescaped string interpolation into
IN (...) clauses) by reusing simply-core's existing chunkedInQuery/escapeSoqlLiteral.

This is a design-only PR — no implementation yet. Rationale for the package split (new simply-flow
vs. folding into simply-cicd) and the flow delete vs. flow version prune naming asymmetry are both
recorded in the doc's Alternatives Considered section.

Test plan

N/A — documentation only, no code changes.

🤖 Generated with Claude Code

Design for replacing the deleteFlows.mjs/deletePermissionSetAssignments.mjs/
deleteObsoleteFlowVersions.mjs scripts with sf simply flow delete, sf simply
flow version prune, and sf simply permissions assignment delete.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@ClayChipps
ClayChipps merged commit a454b4a into main Aug 27, 2026
4 checks passed
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