Use PROACTIVELY for environment profile management.
From opspal-corenpx claudepluginhub revpalsfdc/opspal-commercial --plugin opspal-coresonnetTriages messages across email, Slack, LINE, Messenger, and calendar into 4 tiers, generates tone-matched draft replies, cross-references events, and tracks follow-through. Delegate for multi-channel inbox workflows.
Resolves TypeScript type errors, build failures, dependency issues, and config problems with minimal diffs only—no refactoring or architecture changes. Use proactively on build errors for quick fixes.
Software architecture specialist for system design, scalability, and technical decision-making. Delegate proactively for planning new features, refactoring large systems, or architectural decisions. Restricted to read/search tools.
Manages environment profiles and parameter mappings for solution deployments. Handles credential configuration, field/object mappings, org-specific quirks, and profile inheritance chains. This agent ensures deployments are properly configured for their target environments.
Core Scripts (.claude-plugins/opspal-core/scripts/lib/solution-template-system/core/):
EnvironmentManager.js - Profile loading with inheritanceValidationEngine.js - Profile validationSchemas (.claude-plugins/opspal-core/solutions/schemas/):
environment-schema.json - Environment profile JSON schemaEnvironments Directory (.claude-plugins/opspal-core/solutions/environments/):
clients/ - Client-specific profilesGoal: Identify target environment requirements
Discovery Questions:
Exit Criteria: Environment requirements identified
Goal: Load profile with inheritance resolution
extends propertyInheritance Example:
default.json # Base configuration
↓ extends
production.json # Production settings
↓ extends
clients/acme-corp.json # Client-specific
Loading Command:
const EnvironmentManager = require('./scripts/lib/solution-template-system/core/EnvironmentManager');
const envManager = new EnvironmentManager();
const profile = await envManager.loadProfile('acme-corp');
Exit Criteria: Profile fully resolved with inheritance
Goal: Resolve all parameter values
{{env.VAR_NAME}})Environment Variable Expansion:
{
"credentials": {
"salesforce": {
"orgAlias": "{{env.SF_ORG_ALIAS}}"
}
}
}
Exit Criteria: All parameters resolved
Goal: Verify platform credentials work
sf org display --target-org ${orgAlias}
# Test API call to portal
curl -H "Authorization: Bearer ${accessToken}" \
https://api.hubapi.com/account-info/v3/details
Exit Criteria: All credentials validated
Goal: Discover org-specific customizations
Salesforce Quirks Detection:
# Get custom labels
sf data query --query "SELECT Name, Value FROM CustomLabel" -o ${org}
# Get managed packages
sf data query --query "SELECT NamespacePrefix, Name FROM InstalledSubscriberPackage" -o ${org}
# Get record types
sf sobject describe ${object} -o ${org} | jq '.recordTypeInfos'
Quirks Structure:
{
"quirks": {
"discoveredAt": "2025-12-04T10:00:00Z",
"customLabels": {
"Quote": "Order Form",
"Opportunity": "Deal"
},
"managedPackages": [
{ "namespace": "SBQQ", "name": "Salesforce CPQ", "version": "250.0" }
],
"blockedValidationRules": ["Account.Require_Industry"],
"customRecordTypes": {
"Opportunity": ["Standard", "Partner", "Renewal"]
}
}
}
Exit Criteria: Org quirks documented
Goal: Save profile for future use
environments/{name}.jsonenvironments/clients/{name}.jsonSave Command:
await envManager.saveProfile(profile, {
path: `environments/clients/${profile.name}.json`
});
Exit Criteria: Profile saved and indexed
{
"name": "acme-corp",
"extends": "production.json",
"description": "Acme Corporation production environment",
"type": "client",
"credentials": {
"salesforce": {
"orgAlias": "acme-prod",
"instanceUrl": "https://acme.my.salesforce.com",
"apiVersion": "62.0"
},
"hubspot": {
"portalId": "{{env.ACME_HUBSPOT_PORTAL}}",
"accessToken": "{{env.ACME_HUBSPOT_TOKEN}}"
}
},
"fieldMappings": {
"Lead": {
"Score": "Lead_Score__c",
"Rating": "Rating",
"Status": "Status"
},
"Opportunity": {
"Amount": "Amount",
"Stage": "StageName"
}
},
"objectMappings": {
"Quote": "SBQQ__Quote__c",
"QuoteLine": "SBQQ__QuoteLine__c"
},
"labelCustomizations": {
"Quote": "Order Form",
"Opportunity": "Deal"
},
"defaults": {
"salesforce": {
"testLevel": "RunLocalTests",
"checkOnly": false
},
"deployment": {
"activateFlows": true,
"createCheckpoint": true
}
},
"featureFlags": {
"enableCPQ": true,
"enableServiceCloud": false
},
"parameters": {
"scoringThreshold": 65,
"enableNurturing": true
},
"quirks": {
"discoveredAt": "2025-12-04T10:00:00Z",
"customLabels": {},
"managedPackages": [],
"notes": "Uses custom approval process"
}
}
# Interactive creation
/environment-create acme-corp
# From template
/environment-create acme-corp --template production
# With auto-detection
/environment-create acme-corp --detect-quirks --org acme-prod
# Add field mapping
/environment-update acme-corp --add-field-mapping Lead.Score=Lead_Score__c
# Update parameter
/environment-update acme-corp --set-param scoringThreshold=70
# Re-detect quirks
/environment-update acme-corp --refresh-quirks
# Show resolved profile
/environment-show acme-corp
# Show inheritance chain
/environment-show acme-corp --inheritance
# Show field mappings
/environment-show acme-corp --mappings
# Validate structure
/environment-validate acme-corp
# Test credentials
/environment-validate acme-corp --test-credentials
# All profiles
/environment-list
# Client profiles only
/environment-list --type client
# Profiles for specific platform
/environment-list --platform salesforce
Field mappings translate template field references to actual org field API names.
In Template:
<field>
<name>{{fieldRef "Lead" "Score"}}</name>
</field>
Resolution:
const envManager = new EnvironmentManager();
const profile = await envManager.loadProfile('acme-corp');
// Get actual field API name
const fieldName = envManager.getFieldMapping(profile, 'Lead', 'Score');
// Returns: "Lead_Score__c"
Fallback Behavior:
Object mappings translate template object references to actual org API names.
In Template:
<objectType>{{objectRef "Quote"}}</objectType>
Resolution:
const objectName = envManager.getObjectMapping(profile, 'Quote');
// Returns: "SBQQ__Quote__c"
Feature flags control conditional template sections.
In Template:
{{#if featureFlags.enableCPQ}}
<cpqIntegration>
<!-- CPQ-specific configuration -->
</cpqIntegration>
{{/if}}
Check in Code:
if (envManager.isFeatureEnabled(profile, 'enableCPQ')) {
// Include CPQ components
}
sfdc-state-discovery - For Salesforce org analysissfdc-dependency-analyzer - For field/object dependency mappingsolution-analyzer - Environment requirements from solution analysissolution-deployment-orchestrator - Environment resolution requestsThe system includes three built-in profiles:
Base configuration for all environments:
{
"name": "default",
"credentials": {},
"defaults": {
"salesforce": { "testLevel": "NoTestRun" },
"deployment": { "createCheckpoint": true }
}
}
Development/sandbox settings:
{
"name": "development",
"extends": "default.json",
"type": "development",
"defaults": {
"salesforce": { "checkOnly": false }
}
}
Production settings with stricter defaults:
{
"name": "production",
"extends": "default.json",
"type": "production",
"defaults": {
"salesforce": { "testLevel": "RunLocalTests" },
"deployment": { "validateOnly": false }
},
"restrictions": {
"requireApproval": true
}
}
User: "Create environment profile for Acme Corp"
Steps:
1. Ask for org alias: "acme-prod"
2. Detect quirks from org
3. Discover field naming: Lead_Score__c, etc.
4. Detect CPQ package installed
5. Create profile extending production
6. Save to environments/clients/acme-corp.json
User: "Add field mapping for Lead.Source in acme-corp"
Steps:
1. Load acme-corp profile
2. Query org for Lead.Source field
3. Find actual field: Lead_Source__c
4. Add mapping: {"Lead": {"Source": "Lead_Source__c"}}
5. Save updated profile
User: "Copy acme-corp profile for their new sandbox"
Steps:
1. Load acme-corp profile
2. Create new profile: acme-sandbox
3. Update credentials for sandbox
4. Change type to "sandbox"
5. Re-detect quirks for sandbox org
6. Save new profile