scc-universal 1.1.0 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/.claude-plugin/plugin.json +2 -2
  2. package/.cursor/hooks.json +105 -64
  3. package/.cursor/skills/configure-scc/SKILL.md +20 -20
  4. package/.cursor/skills/mcp-server-patterns/SKILL.md +1 -1
  5. package/.cursor/skills/sf-harness-audit/SKILL.md +6 -6
  6. package/.cursor/skills/sf-quickstart/SKILL.md +7 -7
  7. package/.cursor-plugin/plugin.json +2 -2
  8. package/README.md +51 -37
  9. package/docs/ARCHITECTURE.md +4 -4
  10. package/docs/authoring-guide.md +2 -2
  11. package/docs/workflow-examples.md +38 -38
  12. package/hooks/hooks.json +56 -71
  13. package/manifests/install-modules.json +5 -3
  14. package/package.json +4 -3
  15. package/schemas/hooks.schema.json +83 -72
  16. package/schemas/plugin.schema.json +59 -21
  17. package/scripts/cli/install-apply.js +9 -9
  18. package/scripts/hooks/doc-file-warning.js +3 -1
  19. package/scripts/hooks/governor-check.js +3 -2
  20. package/scripts/hooks/post-bash-build-complete.js +3 -2
  21. package/scripts/hooks/post-bash-pr-created.js +4 -2
  22. package/scripts/hooks/post-edit-console-warn.js +3 -1
  23. package/scripts/hooks/post-edit-format.js +3 -2
  24. package/scripts/hooks/post-edit-typecheck.js +3 -2
  25. package/scripts/hooks/post-write.js +3 -1
  26. package/scripts/hooks/pre-bash-git-push-reminder.js +3 -2
  27. package/scripts/hooks/pre-bash-tmux-reminder.js +3 -1
  28. package/scripts/hooks/pre-tool-use.js +3 -1
  29. package/scripts/hooks/quality-gate.js +3 -2
  30. package/scripts/hooks/sfdx-scanner-check.js +3 -1
  31. package/scripts/hooks/sfdx-validate.js +3 -1
  32. package/scripts/lib/hook-input.js +105 -0
  33. package/scripts/lib/hooks-adapter.js +265 -0
  34. package/scripts/lib/install-executor.js +153 -1
  35. package/scripts/scc.js +14 -14
  36. package/skills/configure-scc/SKILL.md +20 -20
  37. package/skills/mcp-server-patterns/SKILL.md +1 -1
  38. package/skills/sf-harness-audit/SKILL.md +6 -6
  39. package/skills/sf-quickstart/SKILL.md +7 -7
@@ -27,10 +27,10 @@ Plan an AccountRatingService that rates accounts as Hot (>= $1M revenue), Warm (
27
27
  ### Step 2 -- Write Tests First (Red Phase)
28
28
 
29
29
  ```
30
- /sf-tdd-workflow Create an AccountRatingService that rates accounts based on AnnualRevenue
30
+ Create an AccountRatingService that rates accounts based on AnnualRevenue. Use TDD — write tests first.
31
31
  ```
32
32
 
33
- **Agent invoked**: `sf-apex-agent`
33
+ **Agent invoked**: `sf-apex-agent` (consults `sf-tdd-workflow` pattern skill)
34
34
 
35
35
  **What happens**:
36
36
 
@@ -67,10 +67,10 @@ sf apex run test --class-names AccountRatingServiceTest --target-org MyScratchOr
67
67
  ### Step 4 -- Review the Code
68
68
 
69
69
  ```
70
- /sf-apex-best-practices Review AccountRatingService.cls
70
+ Review AccountRatingService.cls for best practices
71
71
  ```
72
72
 
73
- **Agent invoked**: `sf-review-agent`
73
+ **Agent invoked**: `sf-review-agent` (consults `sf-apex-best-practices` pattern skill)
74
74
 
75
75
  **What happens**: The reviewer checks the implementation against its checklist:
76
76
 
@@ -92,10 +92,10 @@ With green tests as a safety net, refactor:
92
92
  - Run tests after each change to confirm they still pass
93
93
 
94
94
  ```
95
- /sf-governor-limits Check AccountRatingService for governor limit risks
95
+ Check AccountRatingService for governor limit risks
96
96
  ```
97
97
 
98
- **Agent invoked**: `sf-apex-agent`
98
+ **Agent invoked**: `sf-apex-agent` (consults `sf-governor-limits` pattern skill)
99
99
 
100
100
  **Expected outcome**: Clean audit -- no governor limit risks in pure in-memory logic.
101
101
 
@@ -112,10 +112,10 @@ You need to create an `accountRatingCard` LWC that displays an account's rating
112
112
  ### Step 1 -- Scaffold the Component
113
113
 
114
114
  ```
115
- /sf-lwc-development Create an accountRatingCard component that shows account name, rating badge (Hot=red, Warm=orange, Cold=blue), and annual revenue
115
+ Create an accountRatingCard LWC component that shows account name, rating badge (Hot=red, Warm=orange, Cold=blue), and annual revenue
116
116
  ```
117
117
 
118
- **Agent invoked**: `sf-lwc-agent`
118
+ **Agent invoked**: `sf-lwc-agent` (consults `sf-lwc-development` pattern skill)
119
119
 
120
120
  **What happens**: Reviews the plan for the component and provides guidance on:
121
121
 
@@ -144,7 +144,7 @@ The agent creates four files:
144
144
  ### Step 3 -- Write Jest Tests
145
145
 
146
146
  ```
147
- /sf-tdd-workflow Write Jest tests for the accountRatingCard LWC component
147
+ Write Jest tests for the accountRatingCard LWC component. Tests first.
148
148
  ```
149
149
 
150
150
  **What happens**: Creates `__tests__/accountRatingCard.test.js` with:
@@ -182,10 +182,10 @@ npx lwc-jest --coverage
182
182
  ### Step 5 -- Accessibility Review
183
183
 
184
184
  ```
185
- /sf-lwc-development Review accountRatingCard for accessibility compliance
185
+ Review accountRatingCard for accessibility compliance
186
186
  ```
187
187
 
188
- **Agent invoked**: `sf-lwc-agent`
188
+ **Agent invoked**: `sf-lwc-agent` (consults `sf-lwc-development` pattern skill)
189
189
 
190
190
  **What it checks**:
191
191
 
@@ -200,10 +200,10 @@ npx lwc-jest --coverage
200
200
  ### Step 6 -- Deploy to Scratch Org
201
201
 
202
202
  ```
203
- /sf-deployment Deploy accountRatingCard and AccountRatingService to scratch org
203
+ Deploy accountRatingCard and AccountRatingService to scratch org
204
204
  ```
205
205
 
206
- **Agent invoked**: `sf-architect`
206
+ **Agent invoked**: `sf-architect` (consults `sf-deployment` pattern skill)
207
207
 
208
208
  **Hook activity**:
209
209
 
@@ -219,10 +219,10 @@ Full development lifecycle from scratch org creation through production deployme
219
219
  ### Step 1 -- Create a Scratch Org
220
220
 
221
221
  ```
222
- /sf-deployment Create a new scratch org for feature/account-rating
222
+ Create a new scratch org for feature/account-rating
223
223
  ```
224
224
 
225
- **Agent invoked**: `sf-architect`
225
+ **Agent invoked**: `sf-architect` (consults `sf-deployment` pattern skill)
226
226
 
227
227
  **What happens**:
228
228
 
@@ -262,7 +262,7 @@ Use the Apex TDD workflow (Workflow 1) and LWC development workflow (Workflow 2)
262
262
  ### Step 3 -- Run All Tests
263
263
 
264
264
  ```
265
- /sf-apex-testing Run all local tests in the scratch org
265
+ Run all local tests in the scratch org
266
266
  ```
267
267
 
268
268
  **What happens**:
@@ -276,10 +276,10 @@ sf apex run test --target-org account-rating --test-level RunLocalTests --code-c
276
276
  ### Step 4 -- Validate Against Staging
277
277
 
278
278
  ```
279
- /sf-deployment Validate deployment to staging (dry run)
279
+ Validate deployment to staging (dry run)
280
280
  ```
281
281
 
282
- **Agent invoked**: `sf-architect`
282
+ **Agent invoked**: `sf-architect` (consults `sf-deployment` pattern skill)
283
283
 
284
284
  ```bash
285
285
  sf project deploy validate --source-dir force-app/ --target-org Staging --test-level RunLocalTests --wait 30
@@ -327,10 +327,10 @@ Run a comprehensive security audit on the codebase, fix findings, and verify the
327
327
  ### Step 1 -- Run the Security Scan
328
328
 
329
329
  ```
330
- /sf-security Run a full security audit on force-app/
330
+ Run a full security audit on force-app/
331
331
  ```
332
332
 
333
- **Agent invoked**: `sf-review-agent`
333
+ **Agent invoked**: `sf-review-agent` (consults `sf-security` pattern skill)
334
334
 
335
335
  **What happens**: The security reviewer performs a multi-pass analysis:
336
336
 
@@ -386,7 +386,7 @@ Address each finding by severity, starting with CRITICAL:
386
386
  **Fix SOQL injection:**
387
387
 
388
388
  ```
389
- /sf-apex-best-practices Fix the SOQL injection in AccountQueryController.cls
389
+ Fix the SOQL injection in AccountQueryController.cls
390
390
  ```
391
391
 
392
392
  The agent replaces string concatenation with bind variables:
@@ -428,7 +428,7 @@ List<Contact> contacts = [SELECT Id, Name, Email FROM Contact WHERE AccountId =
428
428
  ### Step 3 -- Re-Scan
429
429
 
430
430
  ```
431
- /sf-security Re-scan force-app/ to verify all security findings are resolved
431
+ Re-scan force-app/ to verify all security findings are resolved
432
432
  ```
433
433
 
434
434
  **Expected output**:
@@ -466,10 +466,10 @@ Identify and fix performance bottlenecks in an existing Salesforce codebase.
466
466
  ### Step 1 -- Run the Governor Audit
467
467
 
468
468
  ```
469
- /sf-governor-limits Scan force-app/main/default/classes/ for governor limit risks
469
+ Scan force-app/main/default/classes/ for governor limit risks
470
470
  ```
471
471
 
472
- **Agent invoked**: `sf-apex-agent`
472
+ **Agent invoked**: `sf-apex-agent` (consults `sf-governor-limits` pattern skill)
473
473
 
474
474
  **What happens**: The agent scans all Apex classes and triggers for:
475
475
 
@@ -512,10 +512,10 @@ MEDIUM (1):
512
512
  ### Step 2 -- Optimize SOQL Queries
513
513
 
514
514
  ```
515
- /sf-soql-optimization Optimize the SOQL queries in OrderProcessor.cls
515
+ Optimize the SOQL queries in OrderProcessor.cls
516
516
  ```
517
517
 
518
- **Agent invoked**: `sf-apex-agent`
518
+ **Agent invoked**: `sf-apex-agent` (consults `sf-soql-optimization` pattern skill)
519
519
 
520
520
  **What happens**: The agent refactors the code to move queries outside loops:
521
521
 
@@ -555,10 +555,10 @@ for (Order__c order : orders) {
555
555
  ### Step 3 -- Fix the Trigger Bulkification
556
556
 
557
557
  ```
558
- /sf-trigger-frameworks Refactor AccountTrigger to use a handler pattern with proper bulkification
558
+ Refactor AccountTrigger to use a handler pattern with proper bulkification
559
559
  ```
560
560
 
561
- **Agent invoked**: `sf-architect`
561
+ **Agent invoked**: `sf-architect` (consults `sf-trigger-frameworks` pattern skill)
562
562
 
563
563
  **What happens**: Converts the non-bulkified trigger into the thin-trigger-fat-handler pattern:
564
564
 
@@ -580,7 +580,7 @@ trigger AccountTrigger on Account (
580
580
  Run tests that exercise the refactored code with 200 records (the standard trigger batch size):
581
581
 
582
582
  ```
583
- /sf-apex-testing Run tests for OrderProcessor and AccountTriggerHandler with bulk data verification
583
+ Run tests for OrderProcessor and AccountTriggerHandler with bulk data verification
584
584
  ```
585
585
 
586
586
  ```bash
@@ -595,7 +595,7 @@ sf apex run test --class-names OrderProcessorTest,AccountTriggerHandlerTest --ta
595
595
  ### Step 5 -- Re-Audit
596
596
 
597
597
  ```
598
- /sf-governor-limits Re-scan force-app/ to verify all governor limit risks are resolved
598
+ Re-scan force-app/ to verify all governor limit risks are resolved
599
599
  ```
600
600
 
601
601
  **Expected output**:
@@ -617,10 +617,10 @@ All critical and high severity findings resolved.
617
617
  ### Step 6 -- Performance Validation
618
618
 
619
619
  ```
620
- /sf-governor-limits Run a comprehensive performance audit including SOQL query analysis
620
+ Run a comprehensive performance audit including SOQL query analysis
621
621
  ```
622
622
 
623
- **Agent invoked**: `sf-apex-agent`
623
+ **Agent invoked**: `sf-apex-agent` (consults `sf-governor-limits` pattern skill)
624
624
 
625
625
  **What it checks beyond governor limits**:
626
626
 
@@ -636,10 +636,10 @@ All critical and high severity findings resolved.
636
636
 
637
637
  ## Summary: Commands, Agents, and Hooks by Workflow
638
638
 
639
- | Workflow | Primary Commands | Agents Invoked | Key Hooks |
639
+ | Workflow | Pattern Skills Consulted | Agents Invoked | Key Hooks |
640
640
  |---|---|---|---|
641
- | Apex TDD | `/sf-tdd-workflow`, `/sf-apex-best-practices`, `/sf-governor-limits` | sf-apex-agent, sf-review-agent, sf-apex-agent | governor-check, quality-gate, post-write |
642
- | LWC Development | `/sf-lwc-development`, `/sf-deployment` | sf-lwc-agent, sf-architect | post-write, post-edit-console-warn, sfdx-validate |
643
- | Deployment Pipeline | `/sf-deployment`, `/sf-apex-testing`, `/sf-deployment` | sf-architect, sf-architect, sf-review-agent | session-start, sfdx-validate, post-bash-build-complete |
644
- | Security Audit | `/sf-security`, `/sf-apex-best-practices` | sf-review-agent, sf-review-agent | governor-check, quality-gate, sfdx-scanner-check |
645
- | Performance Optimization | `/sf-governor-limits`, `/sf-soql-optimization`, `/sf-trigger-frameworks`, `/sf-governor-limits` | sf-apex-agent, sf-apex-agent, sf-architect | governor-check, quality-gate, sfdx-validate |
641
+ | Apex TDD | `sf-tdd-workflow`, `sf-apex-best-practices`, `sf-governor-limits` | sf-apex-agent, sf-review-agent | governor-check, quality-gate, post-write |
642
+ | LWC Development | `sf-lwc-development`, `sf-deployment` | sf-lwc-agent, sf-architect | post-write, post-edit-console-warn, sfdx-validate |
643
+ | Deployment Pipeline | `sf-deployment`, `sf-apex-testing` | sf-architect, sf-review-agent | session-start, sfdx-validate, post-bash-build-complete |
644
+ | Security Audit | `sf-security`, `sf-apex-best-practices` | sf-review-agent | governor-check, quality-gate, sfdx-scanner-check |
645
+ | Performance Optimization | `sf-governor-limits`, `sf-soql-optimization`, `sf-trigger-frameworks` | sf-apex-agent, sf-architect | governor-check, quality-gate, sfdx-validate |
package/hooks/hooks.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "$schema": "../schemas/hooks.schema.json",
2
+ "description": "Salesforce Claude Code (SCC) lifecycle hooks — automated quality gates for Apex, LWC, and Salesforce CLI",
3
3
  "hooks": {
4
4
  "SessionStart": [
5
5
  {
@@ -10,8 +10,7 @@
10
10
  "async": true,
11
11
  "timeout": 15
12
12
  }
13
- ],
14
- "description": "Display Salesforce project context: detected org, scratch orgs, CLI version"
13
+ ]
15
14
  },
16
15
  {
17
16
  "hooks": [
@@ -21,8 +20,7 @@
21
20
  "async": true,
22
21
  "timeout": 5
23
22
  }
24
- ],
25
- "description": "Warn if platform reference docs (deprecations, API versions) are outdated"
23
+ ]
26
24
  }
27
25
  ],
28
26
  "PreToolUse": [
@@ -33,23 +31,27 @@
33
31
  "type": "command",
34
32
  "command": "npx block-no-verify@1.1.2"
35
33
  }
36
- ],
37
- "description": "Block git hook-bypass flag to protect pre-commit, commit-msg, and pre-push hooks from being skipped"
34
+ ]
38
35
  },
39
36
  {
40
- "matcher": "*",
37
+ "matcher": "",
41
38
  "hooks": [
42
39
  {
43
40
  "type": "command",
44
41
  "command": "node \"${CLAUDE_PLUGIN_ROOT}/scripts/hooks/run-with-flags.js\" \"pre:mcp-health-check\" standard \"${CLAUDE_PLUGIN_ROOT}/scripts/hooks/mcp-health-check.js\""
45
42
  }
46
- ],
47
- "description": "Check MCP server health before MCP tool execution and block unhealthy MCP calls"
43
+ ]
48
44
  },
49
45
  {
50
- "matcher": "*",
51
- "hooks": [{ "type": "command", "command": "bash \"${CLAUDE_PLUGIN_ROOT}/scripts/hooks/run-with-flags-shell.sh\" \"pre:observe\" \"scripts/hooks/learning-observe.sh\" \"standard,strict\"", "async": true, "timeout": 10 }],
52
- "description": "Capture tool use observations for continuous learning"
46
+ "matcher": "",
47
+ "hooks": [
48
+ {
49
+ "type": "command",
50
+ "command": "bash \"${CLAUDE_PLUGIN_ROOT}/scripts/hooks/run-with-flags-shell.sh\" \"pre:observe\" \"scripts/hooks/learning-observe.sh\" \"standard,strict\"",
51
+ "async": true,
52
+ "timeout": 10
53
+ }
54
+ ]
53
55
  },
54
56
  {
55
57
  "matcher": "Bash",
@@ -60,8 +62,7 @@
60
62
  "async": true,
61
63
  "timeout": 10
62
64
  }
63
- ],
64
- "description": "Validate Salesforce CLI commands before execution (deprecation + danger warnings)"
65
+ ]
65
66
  },
66
67
  {
67
68
  "matcher": "Write",
@@ -72,8 +73,7 @@
72
73
  "async": true,
73
74
  "timeout": 5
74
75
  }
75
- ],
76
- "description": "Warn about non-standard documentation files"
76
+ ]
77
77
  },
78
78
  {
79
79
  "matcher": "Bash",
@@ -84,8 +84,7 @@
84
84
  "async": true,
85
85
  "timeout": 10
86
86
  }
87
- ],
88
- "description": "Validate SFDX commands for best practices (deploy flags, dry-run suggestions)"
87
+ ]
89
88
  },
90
89
  {
91
90
  "matcher": "Bash",
@@ -96,32 +95,30 @@
96
95
  "async": true,
97
96
  "timeout": 5
98
97
  }
99
- ],
100
- "description": "Remind to review changes before git push"
98
+ ]
101
99
  },
102
100
  {
103
101
  "matcher": "Bash",
104
102
  "hooks": [
105
103
  {
106
104
  "type": "command",
105
+ "if": "Bash(git push*|sf project deploy*)",
107
106
  "command": "node \"${CLAUDE_PLUGIN_ROOT}/scripts/hooks/run-with-flags.js\" sfdx-scanner-check standard,strict \"${CLAUDE_PLUGIN_ROOT}/scripts/hooks/sfdx-scanner-check.js\"",
108
- "async": true,
109
107
  "timeout": 45
110
108
  }
111
- ],
112
- "description": "Run sfdx-scanner PMD analysis before git push/sf deploy (standard and strict profiles)"
109
+ ]
113
110
  },
114
111
  {
115
112
  "matcher": "Bash",
116
113
  "hooks": [
117
114
  {
118
115
  "type": "command",
116
+ "if": "Bash(sf project deploy*|sf org create*|sf apex run test*|npm test*)",
119
117
  "command": "node \"${CLAUDE_PLUGIN_ROOT}/scripts/hooks/run-with-flags.js\" pre-bash-tmux-reminder strict \"${CLAUDE_PLUGIN_ROOT}/scripts/hooks/pre-bash-tmux-reminder.js\"",
120
118
  "async": true,
121
119
  "timeout": 5
122
120
  }
123
- ],
124
- "description": "Remind to use tmux for long-running Salesforce CLI commands (deploy, test, scratch org)"
121
+ ]
125
122
  },
126
123
  {
127
124
  "matcher": "Edit|Write",
@@ -132,15 +129,20 @@
132
129
  "async": true,
133
130
  "timeout": 5
134
131
  }
135
- ],
136
- "description": "Track tool call count and suggest strategic compaction"
132
+ ]
137
133
  }
138
134
  ],
139
135
  "PostToolUse": [
140
136
  {
141
- "matcher": "*",
142
- "hooks": [{ "type": "command", "command": "bash \"${CLAUDE_PLUGIN_ROOT}/scripts/hooks/run-with-flags-shell.sh\" \"post:observe\" \"scripts/hooks/learning-observe.sh\" \"standard,strict\"", "async": true, "timeout": 10 }],
143
- "description": "Capture tool use results for continuous learning"
137
+ "matcher": "",
138
+ "hooks": [
139
+ {
140
+ "type": "command",
141
+ "command": "bash \"${CLAUDE_PLUGIN_ROOT}/scripts/hooks/run-with-flags-shell.sh\" \"post:observe\" \"scripts/hooks/learning-observe.sh\" \"standard,strict\"",
142
+ "async": true,
143
+ "timeout": 10
144
+ }
145
+ ]
144
146
  },
145
147
  {
146
148
  "matcher": "Write",
@@ -151,8 +153,7 @@
151
153
  "async": true,
152
154
  "timeout": 10
153
155
  }
154
- ],
155
- "description": "Detect Apex/LWC file writes and remind about test coverage"
156
+ ]
156
157
  },
157
158
  {
158
159
  "matcher": "Edit",
@@ -163,32 +164,32 @@
163
164
  "async": true,
164
165
  "timeout": 15
165
166
  }
166
- ],
167
- "description": "Run quality checks on edited Apex/LWC files (anti-patterns, common issues)"
167
+ ]
168
168
  },
169
169
  {
170
170
  "matcher": "Edit",
171
171
  "hooks": [
172
172
  {
173
173
  "type": "command",
174
+ "if": "Edit(*.cls|*.trigger)",
174
175
  "command": "node \"${CLAUDE_PLUGIN_ROOT}/scripts/hooks/run-with-flags.js\" governor-check standard \"${CLAUDE_PLUGIN_ROOT}/scripts/hooks/governor-check.js\"",
175
176
  "async": true,
176
- "timeout": 10
177
+ "timeout": 10,
178
+ "statusMessage": "Checking governor limits..."
177
179
  }
178
- ],
179
- "description": "Check edited Apex files for governor limit violations (SOQL/DML in loops)"
180
+ ]
180
181
  },
181
182
  {
182
183
  "matcher": "Edit",
183
184
  "hooks": [
184
185
  {
185
186
  "type": "command",
187
+ "if": "Edit(*.js|*.ts|*.jsx|*.tsx)",
186
188
  "command": "node \"${CLAUDE_PLUGIN_ROOT}/scripts/hooks/run-with-flags.js\" post-edit-console-warn standard \"${CLAUDE_PLUGIN_ROOT}/scripts/hooks/post-edit-console-warn.js\"",
187
189
  "async": true,
188
190
  "timeout": 10
189
191
  }
190
- ],
191
- "description": "Warn about console.log statements in edited JS/LWC files"
192
+ ]
192
193
  },
193
194
  {
194
195
  "matcher": "Edit",
@@ -199,20 +200,19 @@
199
200
  "async": true,
200
201
  "timeout": 15
201
202
  }
202
- ],
203
- "description": "Auto-format edited files with Prettier (strict profile only)"
203
+ ]
204
204
  },
205
205
  {
206
206
  "matcher": "Edit",
207
207
  "hooks": [
208
208
  {
209
209
  "type": "command",
210
+ "if": "Edit(*.ts|*.tsx)",
210
211
  "command": "node \"${CLAUDE_PLUGIN_ROOT}/scripts/hooks/run-with-flags.js\" post-edit-typecheck strict \"${CLAUDE_PLUGIN_ROOT}/scripts/hooks/post-edit-typecheck.js\"",
211
212
  "async": true,
212
213
  "timeout": 30
213
214
  }
214
- ],
215
- "description": "Type-check edited TypeScript/LWC files (strict profile only)"
215
+ ]
216
216
  },
217
217
  {
218
218
  "matcher": "Bash",
@@ -223,32 +223,30 @@
223
223
  "async": true,
224
224
  "timeout": 10
225
225
  }
226
- ],
227
- "description": "Detect build/deploy completion and log notice"
226
+ ]
228
227
  },
229
228
  {
230
229
  "matcher": "Bash",
231
230
  "hooks": [
232
231
  {
233
232
  "type": "command",
233
+ "if": "Bash(gh pr create*)",
234
234
  "command": "node \"${CLAUDE_PLUGIN_ROOT}/scripts/hooks/run-with-flags.js\" post-bash-pr-created standard \"${CLAUDE_PLUGIN_ROOT}/scripts/hooks/post-bash-pr-created.js\"",
235
235
  "async": true,
236
236
  "timeout": 10
237
237
  }
238
- ],
239
- "description": "Detect PR creation and log review command"
238
+ ]
240
239
  }
241
240
  ],
242
241
  "PostToolUseFailure": [
243
242
  {
244
- "matcher": "*",
243
+ "matcher": "",
245
244
  "hooks": [
246
245
  {
247
246
  "type": "command",
248
247
  "command": "node \"${CLAUDE_PLUGIN_ROOT}/scripts/hooks/run-with-flags.js\" \"post:mcp-health-check\" standard \"${CLAUDE_PLUGIN_ROOT}/scripts/hooks/mcp-health-check.js\""
249
248
  }
250
- ],
251
- "description": "Track failed MCP tool calls, mark unhealthy servers, and attempt reconnect"
249
+ ]
252
250
  }
253
251
  ],
254
252
  "PreCompact": [
@@ -257,11 +255,9 @@
257
255
  {
258
256
  "type": "command",
259
257
  "command": "node \"${CLAUDE_PLUGIN_ROOT}/scripts/hooks/run-with-flags.js\" pre-compact minimal \"${CLAUDE_PLUGIN_ROOT}/scripts/hooks/pre-compact.js\"",
260
- "async": true,
261
258
  "timeout": 10
262
259
  }
263
- ],
264
- "description": "Save session state before context compaction"
260
+ ]
265
261
  }
266
262
  ],
267
263
  "Stop": [
@@ -270,44 +266,36 @@
270
266
  {
271
267
  "type": "command",
272
268
  "command": "node \"${CLAUDE_PLUGIN_ROOT}/scripts/hooks/stop-hook.js\"",
273
- "async": true,
274
269
  "timeout": 10
275
270
  }
276
- ],
277
- "description": "Summarize Salesforce changes and suggest next steps"
271
+ ]
278
272
  },
279
273
  {
280
274
  "hooks": [
281
275
  {
282
276
  "type": "command",
283
277
  "command": "node \"${CLAUDE_PLUGIN_ROOT}/scripts/hooks/run-with-flags.js\" check-console-log standard \"${CLAUDE_PLUGIN_ROOT}/scripts/hooks/check-console-log.js\"",
284
- "async": true,
285
278
  "timeout": 10
286
279
  }
287
- ],
288
- "description": "Check for console.log statements in modified LWC/JS files"
280
+ ]
289
281
  },
290
282
  {
291
283
  "hooks": [
292
284
  {
293
285
  "type": "command",
294
286
  "command": "node \"${CLAUDE_PLUGIN_ROOT}/scripts/hooks/run-with-flags.js\" session-end standard \"${CLAUDE_PLUGIN_ROOT}/scripts/hooks/session-end.js\"",
295
- "async": true,
296
287
  "timeout": 15
297
288
  }
298
- ],
299
- "description": "Persist session summary for cross-session continuity"
289
+ ]
300
290
  },
301
291
  {
302
292
  "hooks": [
303
293
  {
304
294
  "type": "command",
305
295
  "command": "node \"${CLAUDE_PLUGIN_ROOT}/scripts/hooks/run-with-flags.js\" cost-tracker minimal \"${CLAUDE_PLUGIN_ROOT}/scripts/hooks/cost-tracker.js\"",
306
- "async": true,
307
296
  "timeout": 10
308
297
  }
309
- ],
310
- "description": "Track token usage and estimated costs per session"
298
+ ]
311
299
  },
312
300
  {
313
301
  "hooks": [
@@ -317,8 +305,7 @@
317
305
  "async": true,
318
306
  "timeout": 10
319
307
  }
320
- ],
321
- "description": "Evaluate session for extractable patterns and learned skills"
308
+ ]
322
309
  }
323
310
  ],
324
311
  "SessionEnd": [
@@ -327,11 +314,9 @@
327
314
  {
328
315
  "type": "command",
329
316
  "command": "node \"${CLAUDE_PLUGIN_ROOT}/scripts/hooks/run-with-flags.js\" session-end-marker minimal \"${CLAUDE_PLUGIN_ROOT}/scripts/hooks/session-end-marker.js\"",
330
- "async": true,
331
317
  "timeout": 10
332
318
  }
333
- ],
334
- "description": "Session end lifecycle marker (non-blocking)"
319
+ ]
335
320
  }
336
321
  ]
337
322
  }
@@ -4,7 +4,7 @@
4
4
  {
5
5
  "id": "core",
6
6
  "kind": "bundle",
7
- "description": "Core baseline — architect, review agent, core skills, lifecycle hooks",
7
+ "description": "Core baseline — architect, review agent, core skills, quality gates",
8
8
  "pathGroups": [
9
9
  {
10
10
  "paths": [
@@ -24,8 +24,10 @@
24
24
  "targets": { "claude": ".claude/skills/", "cursor": ".cursor/skills/" }
25
25
  },
26
26
  {
27
- "paths": ["hooks/hooks.json", "scripts/hooks/"],
28
- "targets": { "claude": ".claude/hooks/", "cursor": null }
27
+ "paths": ["scripts/hooks/"],
28
+ "targets": { "claude": ".claude/", "cursor": null },
29
+ "installType": "hooks",
30
+ "hooksSource": "hooks/hooks.json"
29
31
  }
30
32
  ],
31
33
  "dependencies": [],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "scc-universal",
3
- "version": "1.1.0",
3
+ "version": "1.2.0",
4
4
  "description": "Complete collection of production-ready Salesforce agents, skills, hooks, and MCP configurations for Claude Code and other AI harnesses. Salesforce Claude Code (SCC) — your AI-powered Salesforce development partner.",
5
5
  "keywords": [
6
6
  "salesforce",
@@ -57,7 +57,7 @@
57
57
  ".cursor-plugin/plugin.json"
58
58
  ],
59
59
  "bin": {
60
- "scc": "scripts/scc.js",
60
+ "scc-universal": "scripts/scc.js",
61
61
  "scc-install": "scripts/cli/install-apply.js"
62
62
  },
63
63
  "scripts": {
@@ -65,6 +65,7 @@
65
65
  "build:cursor-skills": "node scripts/dev/build-cursor-skills.js",
66
66
  "build:cursor-agents": "node scripts/dev/build-cursor-agents.js",
67
67
  "test": "npm run build && node scripts/ci/validate-agents.js && node scripts/ci/validate-commands.js && node scripts/ci/validate-skills.js && node scripts/ci/validate-hooks.js && node scripts/ci/validate-install-manifests.js && node scripts/ci/validate-no-personal-paths.js && node tests/run-all.js",
68
+ "smoke": "bash scripts/ci/smoke-test.sh",
68
69
  "lint": "eslint . && markdownlint '**/*.md' --ignore node_modules",
69
70
  "coverage": "c8 --all --include=\"scripts/**/*.js\" --exclude=\"scripts/scc.js\" --reporter=text --reporter=lcov --check-coverage --lines 80 --functions 80 --branches 80 --statements 80 node tests/run-all.js",
70
71
  "harness:audit": "node scripts/dev/harness-audit.js",
@@ -72,7 +73,7 @@
72
73
  "orchestrate:tmux": "node scripts/dev/orchestrate-worktrees.js",
73
74
  "version:bump": "node scripts/dev/bump-version.js",
74
75
  "version:sync": "node scripts/dev/bump-version.js --set",
75
- "postinstall": "node -e \"console.log('\\n\\x1b[36m╔══════════════════════════════════════════╗\\x1b[0m'); console.log('\\x1b[36m║ Salesforce Claude Code (SCC) installed ║\\x1b[0m'); console.log('\\x1b[36m╚══════════════════════════════════════════╝\\x1b[0m'); console.log('\\nRun: npx scc install apex (or lwc, all)\\n');\""
76
+ "postinstall": "node -e \"console.log('\\n\\x1b[36m╔══════════════════════════════════════════╗\\x1b[0m'); console.log('\\x1b[36m║ Salesforce Claude Code (SCC) installed ║\\x1b[0m'); console.log('\\x1b[36m╚══════════════════════════════════════════╝\\x1b[0m'); console.log('\\nRun: npx scc-universal install (or: install apex, install lwc)\\n');\""
76
77
  },
77
78
  "dependencies": {},
78
79
  "devDependencies": {