Loading...
Loading...
Analyze a Salesforce project against the Salesforce Well-Architected framework (Trusted / Easy / Adaptable). Use when the developer asks to "review the architecture", "run a Well-Architected check", "audit this project", "is this project well-architected?", "assess security/governor-limit/packageability risk across the project", or wants a holistic code-and-metadata health report. Grades the criteria that are observable from code and metadata (sharing/FLS, bulkification, selective SOQL, trigger-handler separation, legacy tech, packageability) with file:line evidence, and emits a human checklist for governance/process pillars it cannot see (security matrix, BCP, roadmaps, AI governance). Distinct from `dx-code-analyzer-run` (single-tool Code Analyzer scan of Apex) — this skill is a multi-pillar architectural review that orchestrates several analysis skills and maps findings to Well-Architected. Read-only: it grades and advises, never edits.
npx skill4agent add forcedotcom/sf-skills platform-architecture-analyzearchitecture-reviewreferences/well-architected-rubric.md[observable][manual]references/observable-checks.md[observable]references/manual-review-checklist.md[manual]# Package directories + API version
cat sfdx-project.jsonpackageDirectories[].pathfind <pkgdir> -name '*.cls' | wc -l
find <pkgdir> -name '*.trigger' | wc -l
find <pkgdir> -name '*.js-meta.xml' | wc -l # LWC bundles*Test.cls__tests__/.github/workflows/.eslintrc*.prettierrc*package.xmlsf org display --jsonreferences/observable-checks.mddx-code-analyzer-runsf code-analyzerApexSOQLInjectionApexCRUDViolationApexInsecureEndpointApexBadCryptoApexSharingViolationsOperationWithLimitsInLoopOperationWithHighCostInLoopAvoidDebugStatementsplatform-lsp-integrateapex_diagnosticslwc_diagnosticscheck_soql_selectivitylsp_healthplatform-metadata-retrievesf orgreferences/observable-checks.md# Secure — classes missing a sharing keyword
grep -rLE 'with(out)? sharing|inherited sharing' --include='*.cls' <pkgdir>
# Intentional — legacy tech still present
find <pkgdir> -name '*.workflow-meta.xml' -o -name '*.flowDefinition-meta.xml'
grep -rl '@future' --include='*.cls' <pkgdir>
# Composable — deploy strategy
ls manifest/package.xml 2>/dev/null # package.xml-driven (anti-pattern past PoC)
grep -l '"path"' sfdx-project.json # source/package strategy
# Composable — runtime config in custom settings vs CMT
find <pkgdir> -path '*objects*' -name '*.object-meta.xml' | xargs grep -l 'CustomSetting' 2>/dev/nullfile:linereferences/observable-checks.md[manual]references/manual-review-checklist.mdWell-Architected Review — <project name>
Scope: <pkg dirs>, <N classes / M triggers / K LWC>, tests: <y/n>, CI: <y/n>, org: <connected alias / none>
PILLAR VERDICTS
🛡️ Trusted <✅|⚠️|❌> (Secure …, Compliant …, Reliable …)
⚡ Easy <✅|⚠️|❌> (Intentional …, Automated …, Engaging …)
🔁 Adaptable <✅|⚠️|❌> (Resilient …, Composable …)
OBSERVABLE FINDINGS (graded from code + metadata)
Sub-pillar | Verdict | Finding | Evidence (file:line / tool)
MANUAL REVIEW (not auto-graded — assess with your team)
[ ] <item> …
RECOMMENDED NEXT STEPS
- <highest-signal fix> → via `<skill>`dx-code-analyzer-rundx-code-analyzer-runplatform-lsp-integratecheck_soql_selectivityLATESTpackage.xml| Symptom | Cause | Recovery |
|---|---|---|
| Code Analyzer v5 missing | Note it in the report; fall back to grep-based structural checks for Apex and mark PMD-only criteria "not observable". |
| No org connected | Mark OWD / permission-set / org-metadata criteria as manual; grade only file-based criteria. |
LSP tools return | LSP off or no workspace | Skip the LSP-grounded checks; rely on |
No | Not an SFDX project | Stop — this skill reviews SFDX projects. Tell the developer. |
| Huge repo, scan is slow | Project-wide PMD + graph build | Scope |
references/*.mdfile:line[manual]platform-apex-generate