scc-universal 1.1.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.
- package/.claude-plugin/plugin.json +44 -0
- package/.cursor/agents/deep-researcher.md +142 -0
- package/.cursor/agents/doc-updater.md +219 -0
- package/.cursor/agents/eval-runner.md +335 -0
- package/.cursor/agents/learning-engine.md +210 -0
- package/.cursor/agents/loop-operator.md +245 -0
- package/.cursor/agents/refactor-cleaner.md +119 -0
- package/.cursor/agents/sf-admin-agent.md +127 -0
- package/.cursor/agents/sf-agentforce-agent.md +126 -0
- package/.cursor/agents/sf-apex-agent.md +117 -0
- package/.cursor/agents/sf-architect.md +426 -0
- package/.cursor/agents/sf-aura-reviewer.md +369 -0
- package/.cursor/agents/sf-bugfix-agent.md +101 -0
- package/.cursor/agents/sf-flow-agent.md +155 -0
- package/.cursor/agents/sf-integration-agent.md +141 -0
- package/.cursor/agents/sf-lwc-agent.md +123 -0
- package/.cursor/agents/sf-review-agent.md +357 -0
- package/.cursor/agents/sf-visualforce-reviewer.md +465 -0
- package/.cursor/hooks/adapter.js +81 -0
- package/.cursor/hooks/after-file-edit.js +26 -0
- package/.cursor/hooks/after-mcp-execution.js +12 -0
- package/.cursor/hooks/after-shell-execution.js +30 -0
- package/.cursor/hooks/after-tab-file-edit.js +12 -0
- package/.cursor/hooks/before-mcp-execution.js +11 -0
- package/.cursor/hooks/before-read-file.js +13 -0
- package/.cursor/hooks/before-shell-execution.js +29 -0
- package/.cursor/hooks/before-submit-prompt.js +23 -0
- package/.cursor/hooks/pre-compact.js +7 -0
- package/.cursor/hooks/session-end.js +10 -0
- package/.cursor/hooks/session-start.js +10 -0
- package/.cursor/hooks/stop.js +18 -0
- package/.cursor/hooks/subagent-start.js +10 -0
- package/.cursor/hooks/subagent-stop.js +10 -0
- package/.cursor/hooks.json +107 -0
- package/.cursor/skills/aside/SKILL.md +115 -0
- package/.cursor/skills/checkpoint/SKILL.md +50 -0
- package/.cursor/skills/configure-scc/SKILL.md +160 -0
- package/.cursor/skills/continuous-agent-loop/SKILL.md +260 -0
- package/.cursor/skills/mcp-server-patterns/SKILL.md +142 -0
- package/.cursor/skills/model-route/SKILL.md +81 -0
- package/.cursor/skills/prompt-optimizer/SKILL.md +366 -0
- package/.cursor/skills/refactor-clean/SKILL.md +133 -0
- package/.cursor/skills/resume-session/SKILL.md +111 -0
- package/.cursor/skills/save-session/SKILL.md +183 -0
- package/.cursor/skills/search-first/SKILL.md +140 -0
- package/.cursor/skills/security-scan/SKILL.md +142 -0
- package/.cursor/skills/sessions/SKILL.md +124 -0
- package/.cursor/skills/sf-agentforce-development/SKILL.md +449 -0
- package/.cursor/skills/sf-apex-async-patterns/SKILL.md +324 -0
- package/.cursor/skills/sf-apex-best-practices/SKILL.md +421 -0
- package/.cursor/skills/sf-apex-constraints/SKILL.md +79 -0
- package/.cursor/skills/sf-apex-cursor/SKILL.md +336 -0
- package/.cursor/skills/sf-apex-enterprise-patterns/SKILL.md +344 -0
- package/.cursor/skills/sf-apex-testing/SKILL.md +407 -0
- package/.cursor/skills/sf-api-design/SKILL.md +237 -0
- package/.cursor/skills/sf-approval-processes/SKILL.md +312 -0
- package/.cursor/skills/sf-aura-development/SKILL.md +260 -0
- package/.cursor/skills/sf-build-fix/SKILL.md +120 -0
- package/.cursor/skills/sf-data-modeling/SKILL.md +274 -0
- package/.cursor/skills/sf-debugging/SKILL.md +362 -0
- package/.cursor/skills/sf-deployment/SKILL.md +291 -0
- package/.cursor/skills/sf-deployment-constraints/SKILL.md +153 -0
- package/.cursor/skills/sf-devops-ci-cd/SKILL.md +322 -0
- package/.cursor/skills/sf-docs-lookup/SKILL.md +100 -0
- package/.cursor/skills/sf-e2e-testing/SKILL.md +321 -0
- package/.cursor/skills/sf-experience-cloud/SKILL.md +248 -0
- package/.cursor/skills/sf-flow-development/SKILL.md +376 -0
- package/.cursor/skills/sf-governor-limits/SKILL.md +319 -0
- package/.cursor/skills/sf-harness-audit/SKILL.md +139 -0
- package/.cursor/skills/sf-help/SKILL.md +156 -0
- package/.cursor/skills/sf-integration/SKILL.md +479 -0
- package/.cursor/skills/sf-lwc-constraints/SKILL.md +128 -0
- package/.cursor/skills/sf-lwc-development/SKILL.md +302 -0
- package/.cursor/skills/sf-lwc-testing/SKILL.md +387 -0
- package/.cursor/skills/sf-metadata-management/SKILL.md +285 -0
- package/.cursor/skills/sf-platform-events-cdc/SKILL.md +372 -0
- package/.cursor/skills/sf-quickstart/SKILL.md +170 -0
- package/.cursor/skills/sf-security/SKILL.md +330 -0
- package/.cursor/skills/sf-security-constraints/SKILL.md +125 -0
- package/.cursor/skills/sf-soql-constraints/SKILL.md +129 -0
- package/.cursor/skills/sf-soql-optimization/SKILL.md +353 -0
- package/.cursor/skills/sf-tdd-workflow/SKILL.md +332 -0
- package/.cursor/skills/sf-testing-constraints/SKILL.md +198 -0
- package/.cursor/skills/sf-trigger-constraints/SKILL.md +88 -0
- package/.cursor/skills/sf-trigger-frameworks/SKILL.md +343 -0
- package/.cursor/skills/sf-visualforce-development/SKILL.md +259 -0
- package/.cursor/skills/strategic-compact/SKILL.md +205 -0
- package/.cursor/skills/update-docs/SKILL.md +162 -0
- package/.cursor/skills/update-platform-docs/SKILL.md +86 -0
- package/.cursor-plugin/plugin.json +26 -0
- package/LICENSE +21 -0
- package/README.md +522 -0
- package/agents/deep-researcher.md +145 -0
- package/agents/doc-updater.md +222 -0
- package/agents/eval-runner.md +340 -0
- package/agents/learning-engine.md +211 -0
- package/agents/loop-operator.md +247 -0
- package/agents/refactor-cleaner.md +122 -0
- package/agents/sf-admin-agent.md +131 -0
- package/agents/sf-agentforce-agent.md +132 -0
- package/agents/sf-apex-agent.md +124 -0
- package/agents/sf-architect.md +435 -0
- package/agents/sf-aura-reviewer.md +372 -0
- package/agents/sf-bugfix-agent.md +105 -0
- package/agents/sf-flow-agent.md +159 -0
- package/agents/sf-integration-agent.md +146 -0
- package/agents/sf-lwc-agent.md +127 -0
- package/agents/sf-review-agent.md +366 -0
- package/agents/sf-visualforce-reviewer.md +468 -0
- package/assets/logo.svg +18 -0
- package/docs/ARCHITECTURE.md +133 -0
- package/docs/authoring-guide.md +373 -0
- package/docs/hook-development.md +578 -0
- package/docs/token-optimization.md +139 -0
- package/docs/workflow-examples.md +645 -0
- package/examples/agentforce-action/README.md +227 -0
- package/examples/apex-trigger-handler/README.md +114 -0
- package/examples/devops-pipeline/README.md +325 -0
- package/examples/flow-automation/README.md +188 -0
- package/examples/integration-pattern/README.md +416 -0
- package/examples/lwc-component/README.md +180 -0
- package/examples/platform-events/README.md +492 -0
- package/examples/scratch-org-setup/README.md +138 -0
- package/examples/security-audit/README.md +244 -0
- package/examples/visualforce-migration/README.md +314 -0
- package/hooks/hooks.json +338 -0
- package/hooks/memory-persistence/README.md +73 -0
- package/manifests/install-modules.json +217 -0
- package/manifests/install-profiles.json +17 -0
- package/mcp-configs/mcp-servers.json +19 -0
- package/package.json +89 -0
- package/schemas/hooks.schema.json +123 -0
- package/schemas/install-modules.schema.json +76 -0
- package/schemas/install-profiles.schema.json +28 -0
- package/schemas/install-state.schema.json +73 -0
- package/schemas/package-manager.schema.json +18 -0
- package/schemas/plugin.schema.json +112 -0
- package/schemas/scc-install-config.schema.json +29 -0
- package/schemas/state-store.schema.json +111 -0
- package/scripts/cli/install-apply.js +170 -0
- package/scripts/cli/uninstall.js +193 -0
- package/scripts/hooks/check-console-log.js +101 -0
- package/scripts/hooks/check-hook-enabled.js +17 -0
- package/scripts/hooks/check-platform-docs-age.js +48 -0
- package/scripts/hooks/cost-tracker.js +78 -0
- package/scripts/hooks/doc-file-warning.js +63 -0
- package/scripts/hooks/evaluate-session.js +98 -0
- package/scripts/hooks/governor-check.js +220 -0
- package/scripts/hooks/learning-observe.sh +206 -0
- package/scripts/hooks/mcp-health-check.js +588 -0
- package/scripts/hooks/post-bash-build-complete.js +34 -0
- package/scripts/hooks/post-bash-pr-created.js +43 -0
- package/scripts/hooks/post-edit-console-warn.js +61 -0
- package/scripts/hooks/post-edit-format.js +79 -0
- package/scripts/hooks/post-edit-typecheck.js +98 -0
- package/scripts/hooks/post-write.js +168 -0
- package/scripts/hooks/pre-bash-git-push-reminder.js +35 -0
- package/scripts/hooks/pre-bash-tmux-reminder.js +47 -0
- package/scripts/hooks/pre-compact.js +51 -0
- package/scripts/hooks/pre-tool-use.js +163 -0
- package/scripts/hooks/pre-write-doc-warn.js +9 -0
- package/scripts/hooks/quality-gate.js +251 -0
- package/scripts/hooks/run-with-flags-shell.sh +32 -0
- package/scripts/hooks/run-with-flags.js +135 -0
- package/scripts/hooks/session-end-marker.js +29 -0
- package/scripts/hooks/session-end.js +311 -0
- package/scripts/hooks/session-start.js +202 -0
- package/scripts/hooks/sfdx-scanner-check.js +142 -0
- package/scripts/hooks/sfdx-validate.js +119 -0
- package/scripts/hooks/stop-hook.js +170 -0
- package/scripts/hooks/suggest-compact.js +67 -0
- package/scripts/lib/agent-adapter.js +82 -0
- package/scripts/lib/apex-analysis.js +194 -0
- package/scripts/lib/hook-flags.js +74 -0
- package/scripts/lib/install-config.js +73 -0
- package/scripts/lib/install-executor.js +363 -0
- package/scripts/lib/install-state.js +121 -0
- package/scripts/lib/orchestration-session.js +299 -0
- package/scripts/lib/package-manager.js +124 -0
- package/scripts/lib/project-detect.js +228 -0
- package/scripts/lib/schema-validator.js +190 -0
- package/scripts/lib/skill-adapter.js +100 -0
- package/scripts/lib/state-store.js +376 -0
- package/scripts/lib/tmux-worktree-orchestrator.js +598 -0
- package/scripts/lib/utils.js +313 -0
- package/scripts/scc.js +164 -0
- package/skills/_reference/AGENTFORCE_PATTERNS.md +112 -0
- package/skills/_reference/APEX_CURSOR.md +159 -0
- package/skills/_reference/API_VERSIONS.md +78 -0
- package/skills/_reference/APPROVAL_PROCESSES.md +105 -0
- package/skills/_reference/ASYNC_PATTERNS.md +163 -0
- package/skills/_reference/AURA_COMPONENTS.md +146 -0
- package/skills/_reference/DATA_MIGRATION_PATTERNS.md +151 -0
- package/skills/_reference/DATA_MODELING.md +124 -0
- package/skills/_reference/DEBUGGING_TOOLS.md +140 -0
- package/skills/_reference/DEPLOYMENT_CHECKLIST.md +87 -0
- package/skills/_reference/DEPRECATIONS.md +79 -0
- package/skills/_reference/DOCKER_CI_PATTERNS.md +138 -0
- package/skills/_reference/ENTERPRISE_PATTERNS.md +122 -0
- package/skills/_reference/EXPERIENCE_CLOUD.md +143 -0
- package/skills/_reference/FLOW_PATTERNS.md +113 -0
- package/skills/_reference/GOVERNOR_LIMITS.md +77 -0
- package/skills/_reference/INTEGRATION_PATTERNS.md +105 -0
- package/skills/_reference/LWC_PATTERNS.md +79 -0
- package/skills/_reference/METADATA_TYPES.md +115 -0
- package/skills/_reference/NAMING_CONVENTIONS.md +84 -0
- package/skills/_reference/PACKAGE_DEVELOPMENT.md +150 -0
- package/skills/_reference/PLATFORM_EVENTS.md +121 -0
- package/skills/_reference/REPORTING_API.md +143 -0
- package/skills/_reference/SCRATCH_ORG_PATTERNS.md +126 -0
- package/skills/_reference/SECURITY_PATTERNS.md +127 -0
- package/skills/_reference/SHARING_MODEL.md +120 -0
- package/skills/_reference/SOQL_PATTERNS.md +119 -0
- package/skills/_reference/TESTING_STANDARDS.md +96 -0
- package/skills/_reference/TRIGGER_PATTERNS.md +114 -0
- package/skills/_reference/VISUALFORCE_PATTERNS.md +121 -0
- package/skills/aside/SKILL.md +118 -0
- package/skills/checkpoint/SKILL.md +53 -0
- package/skills/configure-scc/SKILL.md +163 -0
- package/skills/continuous-agent-loop/SKILL.md +264 -0
- package/skills/mcp-server-patterns/SKILL.md +146 -0
- package/skills/model-route/SKILL.md +84 -0
- package/skills/prompt-optimizer/SKILL.md +369 -0
- package/skills/refactor-clean/SKILL.md +136 -0
- package/skills/resume-session/SKILL.md +114 -0
- package/skills/save-session/SKILL.md +186 -0
- package/skills/search-first/SKILL.md +144 -0
- package/skills/security-scan/SKILL.md +146 -0
- package/skills/sessions/SKILL.md +127 -0
- package/skills/sf-agentforce-development/SKILL.md +450 -0
- package/skills/sf-apex-async-patterns/SKILL.md +326 -0
- package/skills/sf-apex-best-practices/SKILL.md +425 -0
- package/skills/sf-apex-constraints/SKILL.md +81 -0
- package/skills/sf-apex-cursor/SKILL.md +338 -0
- package/skills/sf-apex-enterprise-patterns/SKILL.md +348 -0
- package/skills/sf-apex-testing/SKILL.md +409 -0
- package/skills/sf-api-design/SKILL.md +238 -0
- package/skills/sf-approval-processes/SKILL.md +315 -0
- package/skills/sf-aura-development/SKILL.md +263 -0
- package/skills/sf-build-fix/SKILL.md +121 -0
- package/skills/sf-data-modeling/SKILL.md +278 -0
- package/skills/sf-debugging/SKILL.md +363 -0
- package/skills/sf-deployment/SKILL.md +295 -0
- package/skills/sf-deployment-constraints/SKILL.md +155 -0
- package/skills/sf-devops-ci-cd/SKILL.md +325 -0
- package/skills/sf-docs-lookup/SKILL.md +103 -0
- package/skills/sf-e2e-testing/SKILL.md +324 -0
- package/skills/sf-experience-cloud/SKILL.md +249 -0
- package/skills/sf-flow-development/SKILL.md +377 -0
- package/skills/sf-governor-limits/SKILL.md +323 -0
- package/skills/sf-harness-audit/SKILL.md +142 -0
- package/skills/sf-help/SKILL.md +159 -0
- package/skills/sf-integration/SKILL.md +483 -0
- package/skills/sf-lwc-constraints/SKILL.md +130 -0
- package/skills/sf-lwc-development/SKILL.md +303 -0
- package/skills/sf-lwc-testing/SKILL.md +388 -0
- package/skills/sf-metadata-management/SKILL.md +288 -0
- package/skills/sf-platform-events-cdc/SKILL.md +375 -0
- package/skills/sf-quickstart/SKILL.md +173 -0
- package/skills/sf-security/SKILL.md +334 -0
- package/skills/sf-security-constraints/SKILL.md +127 -0
- package/skills/sf-soql-constraints/SKILL.md +131 -0
- package/skills/sf-soql-optimization/SKILL.md +354 -0
- package/skills/sf-tdd-workflow/SKILL.md +336 -0
- package/skills/sf-testing-constraints/SKILL.md +200 -0
- package/skills/sf-trigger-constraints/SKILL.md +90 -0
- package/skills/sf-trigger-frameworks/SKILL.md +347 -0
- package/skills/sf-visualforce-development/SKILL.md +260 -0
- package/skills/strategic-compact/SKILL.md +208 -0
- package/skills/update-docs/SKILL.md +165 -0
- package/skills/update-platform-docs/SKILL.md +90 -0
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
const { readStdin } = require('./adapter');
|
|
3
|
+
readStdin().then(raw => {
|
|
4
|
+
try {
|
|
5
|
+
const input = JSON.parse(raw);
|
|
6
|
+
const prompt = input.prompt || input.content || input.message || '';
|
|
7
|
+
const secretPatterns = [
|
|
8
|
+
/sk-[a-zA-Z0-9]{20,}/, // OpenAI API keys
|
|
9
|
+
/ghp_[a-zA-Z0-9]{36,}/, // GitHub personal access tokens
|
|
10
|
+
/AKIA[A-Z0-9]{16}/, // AWS access keys
|
|
11
|
+
/xox[bpsa]-[a-zA-Z0-9-]+/, // Slack tokens
|
|
12
|
+
/-----BEGIN (RSA |EC )?PRIVATE KEY-----/, // Private keys
|
|
13
|
+
];
|
|
14
|
+
for (const pattern of secretPatterns) {
|
|
15
|
+
if (pattern.test(prompt)) {
|
|
16
|
+
console.error('[SCC] WARNING: Potential secret detected in prompt!');
|
|
17
|
+
console.error('[SCC] Remove secrets before submitting. Use environment variables instead.');
|
|
18
|
+
break;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
} catch {}
|
|
22
|
+
process.stdout.write(raw);
|
|
23
|
+
}).catch(() => process.exit(0));
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
const { readStdin, runExistingHook, transformToClaude } = require('./adapter');
|
|
3
|
+
readStdin().then(raw => {
|
|
4
|
+
const claudeInput = JSON.parse(raw || '{}');
|
|
5
|
+
runExistingHook('pre-compact.js', transformToClaude(claudeInput));
|
|
6
|
+
process.stdout.write(raw);
|
|
7
|
+
}).catch(() => process.exit(0));
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
const { readStdin, runExistingHook, transformToClaude, hookEnabled } = require('./adapter');
|
|
3
|
+
readStdin().then(raw => {
|
|
4
|
+
const input = JSON.parse(raw || '{}');
|
|
5
|
+
const claudeInput = transformToClaude(input);
|
|
6
|
+
if (hookEnabled('session:end:marker', ['minimal', 'standard', 'strict'])) {
|
|
7
|
+
runExistingHook('session-end-marker.js', claudeInput);
|
|
8
|
+
}
|
|
9
|
+
process.stdout.write(raw);
|
|
10
|
+
}).catch(() => process.exit(0));
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
const { readStdin, runExistingHook, transformToClaude, hookEnabled } = require('./adapter');
|
|
3
|
+
readStdin().then(raw => {
|
|
4
|
+
const input = JSON.parse(raw || '{}');
|
|
5
|
+
const claudeInput = transformToClaude(input);
|
|
6
|
+
if (hookEnabled('session:start', ['minimal', 'standard', 'strict'])) {
|
|
7
|
+
runExistingHook('session-start.js', claudeInput);
|
|
8
|
+
}
|
|
9
|
+
process.stdout.write(raw);
|
|
10
|
+
}).catch(() => process.exit(0));
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
const { readStdin, runExistingHook, transformToClaude, hookEnabled } = require('./adapter');
|
|
3
|
+
readStdin().then(raw => {
|
|
4
|
+
const input = JSON.parse(raw || '{}');
|
|
5
|
+
const claudeInput = transformToClaude(input);
|
|
6
|
+
|
|
7
|
+
if (hookEnabled('stop:check-console-log', ['standard', 'strict'])) {
|
|
8
|
+
runExistingHook('check-console-log.js', claudeInput);
|
|
9
|
+
}
|
|
10
|
+
if (hookEnabled('stop:session-end', ['minimal', 'standard', 'strict'])) {
|
|
11
|
+
runExistingHook('session-end.js', claudeInput);
|
|
12
|
+
}
|
|
13
|
+
if (hookEnabled('stop:cost-tracker', ['minimal', 'standard', 'strict'])) {
|
|
14
|
+
runExistingHook('cost-tracker.js', claudeInput);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
process.stdout.write(raw);
|
|
18
|
+
}).catch(() => process.exit(0));
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
const { readStdin } = require('./adapter');
|
|
3
|
+
readStdin().then(raw => {
|
|
4
|
+
try {
|
|
5
|
+
const input = JSON.parse(raw);
|
|
6
|
+
const agent = input.agent_name || input.agent || 'unknown';
|
|
7
|
+
console.error(`[SCC] Agent spawned: ${agent}`);
|
|
8
|
+
} catch {}
|
|
9
|
+
process.stdout.write(raw);
|
|
10
|
+
}).catch(() => process.exit(0));
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
const { readStdin } = require('./adapter');
|
|
3
|
+
readStdin().then(raw => {
|
|
4
|
+
try {
|
|
5
|
+
const input = JSON.parse(raw);
|
|
6
|
+
const agent = input.agent_name || input.agent || 'unknown';
|
|
7
|
+
console.error(`[SCC] Agent completed: ${agent}`);
|
|
8
|
+
} catch {}
|
|
9
|
+
process.stdout.write(raw);
|
|
10
|
+
}).catch(() => process.exit(0));
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
{
|
|
2
|
+
"hooks": {
|
|
3
|
+
"sessionStart": [
|
|
4
|
+
{
|
|
5
|
+
"command": "node .cursor/hooks/session-start.js",
|
|
6
|
+
"event": "sessionStart",
|
|
7
|
+
"description": "Display Salesforce project context: detected org, scratch orgs, CLI version"
|
|
8
|
+
}
|
|
9
|
+
],
|
|
10
|
+
"sessionEnd": [
|
|
11
|
+
{
|
|
12
|
+
"command": "node .cursor/hooks/session-end.js",
|
|
13
|
+
"event": "sessionEnd",
|
|
14
|
+
"description": "Persist session state and evaluate patterns"
|
|
15
|
+
}
|
|
16
|
+
],
|
|
17
|
+
"beforeShellExecution": [
|
|
18
|
+
{
|
|
19
|
+
"command": "npx block-no-verify@1.1.2",
|
|
20
|
+
"event": "beforeShellExecution",
|
|
21
|
+
"description": "Block git hook-bypass flag to protect pre-commit, commit-msg, and pre-push hooks from being skipped"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"command": "node .cursor/hooks/before-shell-execution.js",
|
|
25
|
+
"event": "beforeShellExecution",
|
|
26
|
+
"description": "Validate SF CLI commands, SFDX deprecation warnings, git push reminder"
|
|
27
|
+
}
|
|
28
|
+
],
|
|
29
|
+
"afterShellExecution": [
|
|
30
|
+
{
|
|
31
|
+
"command": "node .cursor/hooks/after-shell-execution.js",
|
|
32
|
+
"event": "afterShellExecution",
|
|
33
|
+
"description": "PR URL logging, build/deploy completion notice"
|
|
34
|
+
}
|
|
35
|
+
],
|
|
36
|
+
"afterFileEdit": [
|
|
37
|
+
{
|
|
38
|
+
"command": "node .cursor/hooks/after-file-edit.js",
|
|
39
|
+
"event": "afterFileEdit",
|
|
40
|
+
"description": "Quality gate, governor checks, console.log warning, auto-format"
|
|
41
|
+
}
|
|
42
|
+
],
|
|
43
|
+
"beforeReadFile": [
|
|
44
|
+
{
|
|
45
|
+
"command": "node .cursor/hooks/before-read-file.js",
|
|
46
|
+
"event": "beforeReadFile",
|
|
47
|
+
"description": "Warn when reading sensitive files (.env, .key, .pem)"
|
|
48
|
+
}
|
|
49
|
+
],
|
|
50
|
+
"beforeSubmitPrompt": [
|
|
51
|
+
{
|
|
52
|
+
"command": "node .cursor/hooks/before-submit-prompt.js",
|
|
53
|
+
"event": "beforeSubmitPrompt",
|
|
54
|
+
"description": "Detect secrets in prompts (sk-, ghp_, AKIA patterns)"
|
|
55
|
+
}
|
|
56
|
+
],
|
|
57
|
+
"subagentStart": [
|
|
58
|
+
{
|
|
59
|
+
"command": "node .cursor/hooks/subagent-start.js",
|
|
60
|
+
"event": "subagentStart",
|
|
61
|
+
"description": "Log agent spawning for observability"
|
|
62
|
+
}
|
|
63
|
+
],
|
|
64
|
+
"subagentStop": [
|
|
65
|
+
{
|
|
66
|
+
"command": "node .cursor/hooks/subagent-stop.js",
|
|
67
|
+
"event": "subagentStop",
|
|
68
|
+
"description": "Log agent completion"
|
|
69
|
+
}
|
|
70
|
+
],
|
|
71
|
+
"afterTabFileEdit": [
|
|
72
|
+
{
|
|
73
|
+
"command": "node .cursor/hooks/after-tab-file-edit.js",
|
|
74
|
+
"event": "afterTabFileEdit",
|
|
75
|
+
"description": "Auto-format Tab edits"
|
|
76
|
+
}
|
|
77
|
+
],
|
|
78
|
+
"beforeMCPExecution": [
|
|
79
|
+
{
|
|
80
|
+
"command": "node .cursor/hooks/before-mcp-execution.js",
|
|
81
|
+
"event": "beforeMCPExecution",
|
|
82
|
+
"description": "Log MCP server/tool invocations for observability"
|
|
83
|
+
}
|
|
84
|
+
],
|
|
85
|
+
"afterMCPExecution": [
|
|
86
|
+
{
|
|
87
|
+
"command": "node .cursor/hooks/after-mcp-execution.js",
|
|
88
|
+
"event": "afterMCPExecution",
|
|
89
|
+
"description": "Log MCP result status (OK/FAILED) for observability"
|
|
90
|
+
}
|
|
91
|
+
],
|
|
92
|
+
"preCompact": [
|
|
93
|
+
{
|
|
94
|
+
"command": "node .cursor/hooks/pre-compact.js",
|
|
95
|
+
"event": "preCompact",
|
|
96
|
+
"description": "Save state before context compaction"
|
|
97
|
+
}
|
|
98
|
+
],
|
|
99
|
+
"stop": [
|
|
100
|
+
{
|
|
101
|
+
"command": "node .cursor/hooks/stop.js",
|
|
102
|
+
"event": "stop",
|
|
103
|
+
"description": "Console.log audit, session summary, cost tracking"
|
|
104
|
+
}
|
|
105
|
+
]
|
|
106
|
+
}
|
|
107
|
+
}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: aside
|
|
3
|
+
description: >-
|
|
4
|
+
Use when you need a quick Salesforce answer mid-task. Answer a side question about Apex, org config, or metadata without losing context, then resume work automatically.
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Aside — Quick Side Question Without Losing Context
|
|
8
|
+
|
|
9
|
+
Ask a question mid-task and get an immediate, focused answer — then continue right where you left off. The current task, files, and context are never modified.
|
|
10
|
+
|
|
11
|
+
## When to Use
|
|
12
|
+
|
|
13
|
+
- You're curious about something while Claude is working and don't want to lose momentum
|
|
14
|
+
- You need a quick explanation of code Claude is currently editing
|
|
15
|
+
- You want a second opinion or clarification on a decision without derailing the task
|
|
16
|
+
- You need to understand an error, concept, or pattern before Claude proceeds
|
|
17
|
+
- You want to ask something unrelated to the current task without starting a new session
|
|
18
|
+
|
|
19
|
+
## Usage
|
|
20
|
+
|
|
21
|
+
```
|
|
22
|
+
/aside <your question>
|
|
23
|
+
/aside what does this function actually return?
|
|
24
|
+
/aside is this pattern thread-safe?
|
|
25
|
+
/aside why are we using X instead of Y here?
|
|
26
|
+
/aside what's the difference between foo() and bar()?
|
|
27
|
+
/aside should we be worried about the SOQL in a loop we just added?
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Process
|
|
31
|
+
|
|
32
|
+
### Step 1: Freeze the current task state
|
|
33
|
+
|
|
34
|
+
Before answering anything, mentally note:
|
|
35
|
+
|
|
36
|
+
- What is the active task? (what file, feature, or problem was being worked on)
|
|
37
|
+
- What step was in progress at the moment the aside was invoked?
|
|
38
|
+
- What was about to happen next?
|
|
39
|
+
|
|
40
|
+
Do NOT touch, edit, create, or delete any files during the aside.
|
|
41
|
+
|
|
42
|
+
### Step 2: Answer the question directly
|
|
43
|
+
|
|
44
|
+
Answer the question in the most concise form that is still complete and useful.
|
|
45
|
+
|
|
46
|
+
- Lead with the answer, not the reasoning
|
|
47
|
+
- Keep it short — if a full explanation is needed, offer to go deeper after the task
|
|
48
|
+
- If the question is about the current file or code being worked on, reference it precisely (file path and line number if relevant)
|
|
49
|
+
- If answering requires reading a file, read it — but read only, never write
|
|
50
|
+
|
|
51
|
+
Format the response as:
|
|
52
|
+
|
|
53
|
+
```
|
|
54
|
+
ASIDE: [restate the question briefly]
|
|
55
|
+
|
|
56
|
+
[Your answer here]
|
|
57
|
+
|
|
58
|
+
— Back to task: [one-line description of what was being done]
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### Step 3: Resume the main task
|
|
62
|
+
|
|
63
|
+
After delivering the answer, immediately continue the active task from the exact point it was paused. Do not ask for permission to resume unless the aside answer revealed a blocker or a reason to reconsider the current approach.
|
|
64
|
+
|
|
65
|
+
---
|
|
66
|
+
|
|
67
|
+
## Edge Cases
|
|
68
|
+
|
|
69
|
+
**No question provided (aside invoked with nothing after it):**
|
|
70
|
+
Respond:
|
|
71
|
+
|
|
72
|
+
```
|
|
73
|
+
ASIDE: no question provided
|
|
74
|
+
|
|
75
|
+
What would you like to know? (ask your question and I'll answer without losing the current task context)
|
|
76
|
+
|
|
77
|
+
— Back to task: [one-line description of what was being done]
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
**Question reveals a potential problem with the current task:**
|
|
81
|
+
Flag it clearly before resuming:
|
|
82
|
+
|
|
83
|
+
```
|
|
84
|
+
ASIDE: [answer]
|
|
85
|
+
|
|
86
|
+
Warning: This answer suggests [issue] with the current approach. Want to address this before continuing, or proceed as planned?
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
Wait for the user's decision before resuming.
|
|
90
|
+
|
|
91
|
+
**Question is actually a task redirect (not a side question):**
|
|
92
|
+
If the question implies changing what is being built, clarify:
|
|
93
|
+
|
|
94
|
+
```
|
|
95
|
+
ASIDE: That sounds like a direction change, not just a side question.
|
|
96
|
+
Do you want to:
|
|
97
|
+
(a) Answer this as information only and keep the current plan
|
|
98
|
+
(b) Pause the current task and change approach
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
Wait for the user's answer.
|
|
102
|
+
|
|
103
|
+
**No active task (nothing in progress when aside is invoked):**
|
|
104
|
+
Still use the standard wrapper:
|
|
105
|
+
|
|
106
|
+
```
|
|
107
|
+
ASIDE: [restate the question briefly]
|
|
108
|
+
|
|
109
|
+
[Your answer here]
|
|
110
|
+
|
|
111
|
+
— Back to task: no active task to resume
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
**Multiple aside questions in a row:**
|
|
115
|
+
Answer each one in sequence. After the last answer, resume the main task.
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: checkpoint
|
|
3
|
+
description: >-
|
|
4
|
+
Use when saving Salesforce development progress. Create a named checkpoint via git stash before risky Apex deploys or org changes for easy recovery.
|
|
5
|
+
disable-model-invocation: true
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Checkpoint — Named Progress Snapshots
|
|
9
|
+
|
|
10
|
+
Save current progress as a named checkpoint for easy recovery.
|
|
11
|
+
|
|
12
|
+
## When to Use
|
|
13
|
+
|
|
14
|
+
- When you want to save work-in-progress before attempting a risky change
|
|
15
|
+
- When starting a refactoring pass and need a safe rollback point
|
|
16
|
+
- When switching between tasks and want to preserve current state
|
|
17
|
+
- When you need to snapshot progress at key milestones during a long session
|
|
18
|
+
- When collaborating and want to share a recoverable state with another agent or session
|
|
19
|
+
|
|
20
|
+
## Usage
|
|
21
|
+
|
|
22
|
+
```text
|
|
23
|
+
checkpoint [name]
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Workflow
|
|
27
|
+
|
|
28
|
+
1. **Create checkpoint** — `git stash push --include-untracked -m "checkpoint: <name> [<timestamp>]"`
|
|
29
|
+
2. **Log metadata** — Append to `.claude/checkpoints.log`:
|
|
30
|
+
- Timestamp
|
|
31
|
+
- Checkpoint name
|
|
32
|
+
- Files changed (count)
|
|
33
|
+
- Current branch
|
|
34
|
+
3. **Verify** — Confirm working tree is clean after stash
|
|
35
|
+
|
|
36
|
+
## Operations
|
|
37
|
+
|
|
38
|
+
- `checkpoint save <name>` — Create new checkpoint
|
|
39
|
+
- `checkpoint list` — Show all checkpoints from log
|
|
40
|
+
- `checkpoint restore <name>` — Apply the named stash (`git stash apply`; keeps the stash entry safe). Find the stash reference via `git stash list | grep "<name>"`, then `git stash apply stash@{N}`. After verifying the restore, drop with `git stash drop stash@{N}`.
|
|
41
|
+
- `checkpoint verify` — Verify current state matches last checkpoint
|
|
42
|
+
|
|
43
|
+
## Examples
|
|
44
|
+
|
|
45
|
+
```
|
|
46
|
+
checkpoint save before-trigger-refactor
|
|
47
|
+
checkpoint list
|
|
48
|
+
checkpoint restore before-trigger-refactor
|
|
49
|
+
checkpoint verify
|
|
50
|
+
```
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: configure-scc
|
|
3
|
+
description: >-
|
|
4
|
+
Use when setting up SCC for Salesforce Apex and LWC development. Interactive wizard to install profiles, modules, and customize the harness for your org.
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Configure SCC
|
|
8
|
+
|
|
9
|
+
Interactive guide for installing and configuring Salesforce Claude Code.
|
|
10
|
+
|
|
11
|
+
## When to Use
|
|
12
|
+
|
|
13
|
+
- When installing SCC for the first time on a Salesforce project
|
|
14
|
+
- When adding new modules or profiles to an existing SCC installation
|
|
15
|
+
- When customizing hook behavior or profiles for your team's workflow
|
|
16
|
+
- When troubleshooting SCC configuration or missing components
|
|
17
|
+
- When setting up SCC for different team members or CI/CD environments
|
|
18
|
+
|
|
19
|
+
## Installation
|
|
20
|
+
|
|
21
|
+
### Quick Install
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
# Install globally
|
|
25
|
+
npm install -g scc-universal
|
|
26
|
+
|
|
27
|
+
# Install with a profile
|
|
28
|
+
npx scc install all # Everything (all agents, skills, rules)
|
|
29
|
+
npx scc install apex # Apex-focused development
|
|
30
|
+
npx scc install lwc # LWC-focused development
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
### Profile Details
|
|
34
|
+
|
|
35
|
+
| Profile | Includes |
|
|
36
|
+
|---------|----------|
|
|
37
|
+
| `apex` | Common rules + Apex rules, agents, skills |
|
|
38
|
+
| `lwc` | Common rules + LWC rules, agents, skills |
|
|
39
|
+
| `full` | All agents, skills, rules |
|
|
40
|
+
|
|
41
|
+
### Diagnostics
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
npx scc doctor # Check for missing/drifted files
|
|
45
|
+
npx scc status # View installed components
|
|
46
|
+
npx scc repair # Restore drifted files
|
|
47
|
+
npx scc uninstall # Remove SCC-managed files
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## Hook Configuration
|
|
51
|
+
|
|
52
|
+
### Profiles
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
# Set hook profile (controls which hooks run)
|
|
56
|
+
export SCC_HOOK_PROFILE=minimal # Session start + stop only
|
|
57
|
+
export SCC_HOOK_PROFILE=standard # Default — includes quality checks
|
|
58
|
+
export SCC_HOOK_PROFILE=strict # All hooks including auto-format
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### Disable Specific Hooks
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
export SCC_DISABLED_HOOKS=governor-check,cost-tracker
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## Package Manager
|
|
68
|
+
|
|
69
|
+
SCC auto-detects your package manager. Override with:
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
export CLAUDE_PACKAGE_MANAGER=npm # or pnpm, yarn, bun
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
## Environment-Specific Configuration
|
|
76
|
+
|
|
77
|
+
### Sandbox / Scratch Org Development
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
# Set default target org for SF CLI commands
|
|
81
|
+
sf config set target-org=my-scratch-org
|
|
82
|
+
|
|
83
|
+
# Scratch org duration is set via --duration-days flag or scratch org definition file
|
|
84
|
+
# sf org create scratch -f config/project-scratch-def.json --duration-days 7
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
### CI/CD Environments
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
# Minimal hooks for CI (fast, no interactive prompts)
|
|
91
|
+
export SCC_HOOK_PROFILE=minimal
|
|
92
|
+
|
|
93
|
+
# Disable all cost/session tracking in CI
|
|
94
|
+
export SCC_DISABLED_HOOKS=cost-tracker,session-start,session-end,evaluate-session
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
### Team Setup
|
|
98
|
+
|
|
99
|
+
Share SCC configuration across your team by adding to your project's `.env.example`:
|
|
100
|
+
|
|
101
|
+
```bash
|
|
102
|
+
# .env.example — copy to .env and customize
|
|
103
|
+
SCC_HOOK_PROFILE=standard
|
|
104
|
+
CLAUDE_PACKAGE_MANAGER=npm
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
## Troubleshooting
|
|
108
|
+
|
|
109
|
+
### Common Issues
|
|
110
|
+
|
|
111
|
+
| Problem | Cause | Fix |
|
|
112
|
+
|---------|-------|-----|
|
|
113
|
+
| `npx scc install` fails | Node.js < 20 | Upgrade: `nvm install 20` |
|
|
114
|
+
| Hooks not firing | SCC not installed in project | Run `npx scc doctor` to check |
|
|
115
|
+
| `Permission denied` on hooks | Script not executable | Run `npx scc repair` |
|
|
116
|
+
| Skills not loading | Wrong install profile | Run `npx scc install all` |
|
|
117
|
+
| `sf` command not found | SF CLI not installed | Install: `npm install -g @salesforce/cli` |
|
|
118
|
+
| `sf` commands fail with errors | SF CLI version too old | Upgrade: `npm update -g @salesforce/cli` (SCC requires SF CLI v2.x / `sf` not `sfdx`) |
|
|
119
|
+
| Hooks slow down session | Too many hooks enabled | Switch to `SCC_HOOK_PROFILE=minimal` |
|
|
120
|
+
|
|
121
|
+
### Diagnostic Commands
|
|
122
|
+
|
|
123
|
+
```bash
|
|
124
|
+
# Full diagnostic report
|
|
125
|
+
npx scc doctor
|
|
126
|
+
|
|
127
|
+
# See exactly what's installed
|
|
128
|
+
npx scc list-installed
|
|
129
|
+
|
|
130
|
+
# Preview what WOULD be installed (dry run)
|
|
131
|
+
npx scc plan apex
|
|
132
|
+
|
|
133
|
+
# Check state store
|
|
134
|
+
npx scc status
|
|
135
|
+
|
|
136
|
+
# Reset everything and reinstall
|
|
137
|
+
npx scc uninstall && npx scc install all
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
### Upgrading SCC
|
|
141
|
+
|
|
142
|
+
```bash
|
|
143
|
+
# Update to latest version
|
|
144
|
+
npm install -g scc-universal@latest
|
|
145
|
+
|
|
146
|
+
# Repair any drifted files after upgrade
|
|
147
|
+
npx scc repair
|
|
148
|
+
|
|
149
|
+
# Verify upgrade
|
|
150
|
+
npx scc doctor
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
## Verification
|
|
154
|
+
|
|
155
|
+
```bash
|
|
156
|
+
npm test # Run all validators
|
|
157
|
+
npx scc doctor # Check installation health
|
|
158
|
+
sf --version # Verify SF CLI is installed
|
|
159
|
+
npx scc status # Confirm installed components
|
|
160
|
+
```
|