forcedotcom/sf-skills / skills/platform-policy-rule-generate
platform-policy-rule-generate
VerifiedTHE skill for creating a Data Cloud / Data Governance access policy — authors and deploys a PolicyRuleDefinitionSet + PolicyRuleDefinition pair (CRUD) covering OLS, FLS, RLS, masking/transform, and tag/classification-based access for the DATACLOUD or ALL consumer. TRIGGER when the user wants to create/write/author a Data Cloud or Data Governance policy, access policy, or policy rule, or to grant access to a Data Cloud object THROUGH A POLICY — a Data Cloud policy-create request routes here, not to the tag/classification surface. Resolves every reference via Data 360 MCP. SCOPE: Data Cloud policies only (not Security Center, DSAR, or User Access Policies). DO NOT TRIGGER to create tags/classifications, or to grant object/dataspace access via a PERMISSION SET / RBAC grant (use platform-dataspace-access-configure). For a vague object-access ask, surface both skills and ASK the permission-set way vs the policy way; if unsure the object is Data Cloud, ask which first.
references/conjunction-compiler.md
View on GitHub# Conjunction Compiler
Construct conjunctions from a typed intermediate plan, not by hand-editing an expression string.
1. Build and validate all conditions.
2. Classify each condition into `DATA_SPACE`, `TAG_CLASSIFICATION`, `PERMISSION`, `ENTITY_TYPE`, or `RECORD_FIELD`; never mix classifications, permissions, entity types, and RLS criteria in one local group.
3. Reject conditions that cannot belong to a selected consumer/profile.
4. Assign stable condition IDs after final ordering.
5. Build each non-empty local group with its requested operator.
6. In normal author mode for `DATACLOUD`, build a typed custom-conjunction plan for UI validation, then serialize it to the ordinary MDAPI `conjunctionExpression`. There is no literal `CUSTOM` XML element. For example, two alternative classifications plus one required permission become `(AND (OR 1 2) (AND 3))`.
7. For `ALL`, use the general conjunction contract.
8. Validate that every condition is referenced exactly once, no unknown ID is referenced, no group is empty, and nested RLS join conditions use independent numbering.
In explicit evidence-recreation mode, do not compile or normalize the named API 69.0 example's conjunction. Its exact condition order and conjunction take precedence; validate their internal index consistency and reproduce them verbatim.
For `DATACLOUD`, a typical OLS tree is:
```text
CUSTOM(AND,
ENTITY_TYPE(OR, 1, 2),
TAG_CLASSIFICATION(OR, 3, 4),
PERMISSION(AND, 5))
```
The XML has no literal section elements; section identity is represented by the custom-conjunction tree consumed by the UI.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| rea-analysis-optimizationmorluto/reaOptimize REA providers and shared analysis workflows for agent context, latency, CPU, and memory while preserving correctness and Evidence. Use for analysis bottlenecks and cache or query design; CI/test-suite optimization belongs to rea-ci-tests-audit. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| rea-ci-tests-auditmorluto/reaAudit REA CI and test suites for correctness, fixture drift, false passes, and measured performance; use for suite or workflow investigations and efficiency changes, rather than ordinary feature testing or a single test failure. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |