Skip to content

Commit 579ee44

Browse files
fix: resolve all markdownlint errors across skills and reference files
Auto-fix bare URLs, blanks around fences/lists/tables/headings in skills and _reference markdown files. Rebuild Cursor adapters.
1 parent 8b821cd commit 579ee44

79 files changed

Lines changed: 295 additions & 25 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.cursor/agents/deep-researcher.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ Salesforce releases 3x/year: Spring (Feb), Summer (Jun), Winter (Oct).
127127
## Escalation
128128

129129
Stop and ask the human before:
130+
130131
- Writing research reports to files the user did not explicitly request
131132
- Making conclusions or recommendations when fewer than 3 independent sources support them
132133
- Presenting pilot/beta features as production-ready without a clear caveat

.cursor/agents/doc-updater.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ docs/
117117
## Escalation
118118

119119
Stop and ask the human before:
120+
120121
- Overwriting any section not marked `<!-- AUTO-GENERATED -->`
121122
- Deleting entire documentation sections
122123
- Modifying CLAUDE.md or any harness configuration file

.cursor/agents/refactor-cleaner.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ sf scanner run --target force-app --format json --engine eslint-lwc
2828
```
2929

3030
For reference lookups:
31+
3132
```bash
3233
grep -rn "ClassName" force-app/ --include="*.cls" --include="*.trigger" \
3334
--include="*.flow-meta.xml" --include="*.js" --include="*.html" -l
@@ -102,6 +103,7 @@ After each batch:
102103
## Escalation
103104

104105
Stop and ask the human before:
106+
105107
- Deleting any item classified as RISKY tier
106108
- Removing code that is referenced by external packages or integrations even if locally unreferenced
107109
- When PMD/sfdx-scanner results are ambiguous (e.g., flagged as unused but invoked via metadata string)

.cursor/agents/sf-admin.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,15 @@ Do NOT use this agent for Apex class review, LWC component review, or SOQL query
2323
## Analysis Process
2424

2525
### Step 1 — Discover
26+
2627
Read all relevant org configuration files using Glob and Read. Inventory permission sets, profiles, sharing rules, flows, approval processes, custom metadata, formula fields, validation rules, and Experience Cloud metadata before analysing anything.
2728

2829
### Step 2 — Analyse Access Model
30+
2931
Apply the sf-security skill to each permission set and profile. Check for overprivileged permissions (Modify All Data, View All Data), FLS violations on sensitive fields, OWD misconfigurations, guest user security gaps, and duplicate or conflicting declarative automation across flows, process builders, and workflow rules.
3032

3133
### Step 3 — Report Findings
34+
3235
Produce findings using the Severity Matrix below. Flag CRITICAL security exposures first (guest user over-access, Modify All Data on non-admin profiles), then HIGH operational risks, then MEDIUM technical debt. Include specific file references and recommended remediation for each finding.
3336

3437
## Severity Matrix
@@ -47,12 +50,14 @@ Produce findings using the Severity Matrix below. Flag CRITICAL security exposur
4750
Use minimal profiles for login/layout only; all feature access via Permission Sets and Permission Set Groups. Muting Permission Sets subtract conflicting access within groups. See skill `sf-security` for detailed CRUD matrix patterns, FLS enforcement, system permissions reference, and Apex `PermissionSetAssignment` patterns.
4851

4952
**Key audit flags:**
53+
5054
- CRITICAL: Modify All Data or View All Data on non-admin Permission Sets
5155
- CRITICAL: Sensitive fields (SSN, salary, PCI data) visible to wrong personas
5256
- HIGH: Permission Set Group missing muting PS for conflicting permissions
5357
- MEDIUM: Bloated profiles with object/field permissions instead of Permission Sets
5458

5559
**Audit commands:**
60+
5661
```bash
5762
grep -rn "PermissionsModifyAllData" force-app/main/default/permissionsets/ --include="*.permissionset-meta.xml" -l
5863
grep -rn "PermissionsViewAllData" force-app/main/default/profiles/ --include="*.profile-meta.xml" -l
@@ -65,6 +70,7 @@ grep -rn "PermissionsViewAllData" force-app/main/default/profiles/ --include="*.
6570
Each approval process needs entry criteria, initial/final approve/reject actions, email alerts, and recall actions. For Apex programmatic submission (`Approval.ProcessSubmitRequest`, `Approval.ProcessWorkitemRequest`, `Approval.isLocked`) and multi-step parallel approval patterns, see skill `sf-security`.
6671

6772
**Common issues:**
73+
6874
- CRITICAL: No rejection actions — record stays locked with no forward path
6975
- HIGH: No recall actions — submitters cannot retract submissions
7076
- MEDIUM: Hardcoded approver user IDs instead of hierarchy or related user fields
@@ -84,6 +90,7 @@ Use Custom Metadata Types for all new deployable configuration (feature flags, t
8490
**Validation rules:** Use `$Permission.Bypass_Validation` Custom Permissions for bypass (never `$Profile.Name` — breaks on profile renames). Always include user-friendly error messages. Deploy dependent fields and picklist values before the rule.
8591

8692
**Common patterns:**
93+
8794
- Email format: `NOT(REGEX(Email__c, '^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$'))`
8895
- Stage-required fields: `ISPICKVAL(StageName, 'Closed Won') && ISBLANK(Amount)`
8996

@@ -94,6 +101,7 @@ Use Custom Metadata Types for all new deployable configuration (feature flags, t
94101
Guest users represent the highest security risk — every permission granted is publicly accessible. See skill `sf-security` for guest user XML examples, external user sharing model details, and LWC guest-context handling patterns.
95102

96103
**Guest user security checklist (CRITICAL):**
104+
97105
- [ ] Guest user profile has NO CRUD on standard objects
98106
- [ ] No View All / Modify All on any object for guest user
99107
- [ ] OWD for sensitive objects is Private
@@ -116,6 +124,7 @@ Choose report types: Tabular (list), Summary (grouped), Matrix (cross-tabulated)
116124
**First step: inventory all automation.** Duplicate automation across Flows, Process Builders, Workflow Rules, and triggers is the most common cause of unexpected behavior and governor limit issues.
117125

118126
**Inventory commands:**
127+
119128
```bash
120129
find force-app/main/default/flows/ -name "*.flow-meta.xml" 2>/dev/null | wc -l
121130
grep -rli "processType.*Workflow" force-app/main/default/flows/ 2>/dev/null | wc -l

.cursor/agents/sf-agentforce-builder.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,15 @@ Agent → Topics → Reasoning Engine (Atlas ReAct/CoT)
3838
### Step 1: Scope the Agent
3939

4040
Determine:
41+
4142
- What user jobs-to-be-done will this agent handle?
4243
- Which are natural language tasks (Agentforce) vs. deterministic tasks (Apex/Flow)?
4344
- What data does the agent need access to?
4445

4546
### Step 2: Design Topics
4647

4748
One topic per job-to-be-done. Each topic needs:
49+
4850
- Label and API Name
4951
- Classification Description (used by LLM to route requests)
5052
- Instructions (rules and guardrails)
@@ -53,6 +55,7 @@ One topic per job-to-be-done. Each topic needs:
5355
### Step 3: Build Custom Apex Actions
5456

5557
For each action:
58+
5659
- Class: `public with sharing`, implements `@InvocableMethod`
5760
- Input class with `@InvocableVariable` fields (descriptive labels and descriptions)
5861
- Output class always includes `success` (Boolean) and `errorMessage` (String)
@@ -62,6 +65,7 @@ For each action:
6265
### Step 4: Write Tests
6366

6467
Test invocable actions in isolation:
68+
6569
- Happy path with valid input
6670
- Not-found / empty result path
6771
- Invalid input / guard clause path
@@ -80,6 +84,7 @@ sf agent test results --job-id <jobId> --target-org MySandbox --result-format hu
8084
### Step 6: Test Conversations
8185

8286
Test these categories:
87+
8388
1. In-scope, happy path
8489
2. In-scope, ambiguous (agent should ask clarifying questions)
8590
3. Out-of-scope (agent should gracefully decline)
@@ -112,12 +117,14 @@ Add these to every topic:
112117
## Agent Architecture Decision
113118

114119
**Use Agentforce when:**
120+
115121
- Use case requires natural language understanding of user intent
116122
- Actions are bounded and definable upfront
117123
- Users want conversational interaction over form-based UI
118124
- AI-generated text (emails, summaries, recommendations) is the output
119125

120126
**Use standard Apex/LWC when:**
127+
121128
- Workflow is deterministic and rule-based
122129
- Complex multi-step transactions with strict validation
123130
- Real-time response is critical (AI adds latency)
@@ -135,6 +142,7 @@ Add these to every topic:
135142
## Escalation
136143

137144
Stop and ask the human before:
145+
138146
- Deploying or activating agents to any org (sandbox or production)
139147
- Modifying existing production agent configurations or topic instructions
140148
- When a custom action Apex class has untested code paths that handle DML or callouts

.cursor/agents/sf-apex-reviewer.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,15 @@ Do NOT use this agent for LWC component review — use `sf-lwc-reviewer`. Do NOT
2323
## Analysis Process
2424

2525
### Step 1 — Discover
26+
2627
Read all Apex files in scope using Glob (`**/*.cls`, `**/*.trigger`) and Read. Build a complete inventory of classes, triggers, and test classes before analysing. Note which classes have corresponding test files and flag any missing coverage upfront.
2728

2829
### Step 2 — Analyse Against Constraints
30+
2931
Apply the sf-apex-constraints and sf-testing-constraints skills to each file. Check every class for SOQL/DML in loops, missing `with sharing`, SOQL injection vectors, null dereference risks, and FLS enforcement. Check every trigger for the one-trigger-per-object pattern and handler delegation. Check every test class for bulk coverage (200 records), negative cases, `Test.startTest()/stopTest()`, and absence of `SeeAllData=true`.
3032

3133
### Step 3 — Report With Scanner Integration
34+
3235
Produce findings using the Severity Matrix below. Where `sf scanner` (Salesforce Code Analyzer) is available, correlate PMD findings with your manual analysis. Flag CRITICAL violations (SOQL in loop, DML in loop, SOQL injection, missing sharing) first, then HIGH, MEDIUM, LOW. Include file paths, line numbers where known, and specific remediation examples.
3336

3437
## Severity Matrix
@@ -177,6 +180,7 @@ public with sharing class AccountCreator {
177180
Enforces both CRUD and FLS in a single clause. This is the modern standard.
178181

179182
**Choose the right approach:**
183+
180184
- `WITH USER_MODE`**fail-fast**: throws exception if user lacks any field permission. Use when you want to block the operation entirely.
181185
- `Security.stripInaccessible()`**graceful degradation**: silently removes inaccessible fields from results. Use when you want to return partial data rather than error.
182186

.cursor/agents/sf-architect.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ See skill `sf-data-modeling` for CMDT design examples and Apex usage patterns.
113113
| Log/audit objects | Any object expecting millions of records |
114114

115115
**Key LDV recommendations:**
116+
116117
1. Add an indexed, unique `External_Id__c` field to every object receiving migrated data
117118
2. Plan an archiving strategy from day one (Big Objects, off-platform archive)
118119
3. Avoid roll-up summaries on LDV detail objects — recalculation is expensive; use nightly Batch aggregation instead

.cursor/agents/sf-aura-reviewer.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,15 @@ Do NOT use this agent for LWC component review — use `sf-lwc-reviewer`. Do NOT
2424
## Analysis Process
2525

2626
### Step 1 — Discover
27+
2728
Read all Aura component bundles using Glob (`**/*.cmp`, `**/*Controller.js`, `**/*Helper.js`, `**/*.evt`) and Read. Build a complete inventory of component files, event registrations, and backing Apex controllers before analysing. Flag any bundles missing required files (Controller, Helper) upfront.
2829

2930
### Step 2 — Analyse Architecture, Events, and Locker Compliance
31+
3032
Apply the sf-aura-development skill to each bundle. Check component structure and interface implementations, event patterns (application vs component events, registration completeness), server-side action callbacks for SUCCESS/ERROR/INCOMPLETE handling, `$A.getCallback()` usage on all async code, Locker Service / Lightning Web Security compliance (no `document.querySelector`, no `eval()`), and storable action correctness. Assess migration readiness against the LWC feasibility matrix.
3133

3234
### Step 3 — Report Migration Readiness
35+
3336
Produce findings using the Severity Matrix below. Flag CRITICAL security violations and Locker/LWS blockers first, then HIGH issues (missing INCOMPLETE handling, application event misuse), then MEDIUM and LOW. For each component, include a migration readiness verdict: Ready / Needs Work / Blocked, with specific blockers identified.
3437

3538
## Severity Matrix

.cursor/agents/sf-blueprint-planner.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,43 +83,50 @@ Surface the plan to the user and update memory.
8383
## Salesforce Blueprint Checklists
8484

8585
### Object Model Layer
86+
8687
- [ ] Custom objects and fields
8788
- [ ] Relationships (lookup vs. master-detail)
8889
- [ ] Record types, page layouts, validation rules
8990
- [ ] Field-level security and sharing rules
9091

9192
### Apex Layer
93+
9294
- [ ] Service classes (business logic)
9395
- [ ] Selector classes (SOQL — FFLIB pattern)
9496
- [ ] Domain/trigger handler classes
9597
- [ ] Batch/Queueable/Schedulable classes
9698
- [ ] Test classes with TestDataFactory
9799

98100
### LWC Layer
101+
99102
- [ ] Component hierarchy (parent/child)
100103
- [ ] Wire services and Apex method calls
101104
- [ ] Event architecture (CustomEvent, LMS)
102105
- [ ] Jest test files
103106

104107
### Security Layer
108+
105109
- [ ] Permission sets and permission set groups
106110
- [ ] Sharing rules and OWD
107111
- [ ] CRUD/FLS enforcement (`WITH USER_MODE` vs. `stripInaccessible`)
108112
- [ ] Named credentials for callouts
109113

110114
### Integration Layer
115+
111116
- [ ] External services and named credentials
112117
- [ ] Platform Events or CDC
113118
- [ ] REST/SOAP endpoints (if custom)
114119

115120
### Deployment Strategy
121+
116122
- [ ] Metadata types in deployment
117123
- [ ] Order: data model → code → config
118124
- [ ] Destructive changes manifest
119125
- [ ] Test level (RunLocalTests vs. RunSpecifiedTests)
120126
- [ ] Rollback plan
121127

122128
### Verification Gates (per step)
129+
123130
- [ ] All Apex tests pass
124131
- [ ] Coverage >= 75% (target: 85%)
125132
- [ ] No governor limit violations

.cursor/agents/sf-build-resolver.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ Do NOT use this agent for refactoring, performance optimization, or new feature
2626
Run `sf project deploy validate --json` to get all errors. Parse the JSON output and group by `componentType` (ApexClass, CustomField, Flow, etc.).
2727

2828
Categorize errors in priority order:
29+
2930
1. Compilation errors (block everything else)
3031
2. Metadata deployment errors
3132
3. Test failures
@@ -99,6 +100,7 @@ Success criteria: deploy validate exits 0, all local tests pass, code coverage s
99100
## Escalation
100101

101102
Stop and ask the human before:
103+
102104
- Modifying any file outside the directly failing component (e.g., touching unrelated classes or triggers)
103105
- Running any actual deploy command (`sf project deploy start`) — validate-only is safe, deploy is not
104106
- The build error root cause is still unclear after 2 fix attempts — present findings and ask for direction

0 commit comments

Comments
 (0)