Use this skill when auditing a Salesforce org to identify and document technical debt across automation, code, data model, security configuration, and integrations. This skill produces a structured findings report with severity ratings and a prioritized remediation backlog. It does not implement fixes — use domain-specific skills (apex/, flow/, security/, integration/) for remediation work.
Before Starting
Gather this context before conducting the assessment:
- How old is this org, and when was it last audited? Older orgs accumulate more automation strata and legacy patterns.
- What features are actively in use? Apex, Flow, Process Builder, Workflow Rules, Aura components, integrations — each area is a debt category.
- Are there known pain points? "Automation keeps firing twice on Case" or "deployments break tests" are symptoms that guide where to look first.
- What is the managed package footprint? Managed package components create debt you cannot modify. Note them separately — they are vendor debt, not org debt.
- What is the scope? A full org audit, a targeted automation review, or a pre-release health check each require different depth.
Core Concepts
What Technical Debt Means in Salesforce
Technical debt in a Salesforce org falls into six categories:
- Dead code — Apex classes with no test coverage, classes never referenced in metadata or by other code, triggers on objects with no active DML paths.
- Unused and redundant automation — Inactive Flow versions that were never cleaned up, Process Builder flows left over from pre-Summer '22, Workflow Rules that were never migrated when the retirement deadline passed.
- Automation overlap — The same object triggering both a Record-Triggered Flow and an Apex trigger for similar operations, creating double-execution risk, ordering surprises, or governor limit contention.
- Deprecated features in active use — Workflow Rules and Process Builder executing live logic despite official deprecation; Aura components owned by the org team rather than migrated to LWC.
- Configuration complexity — Formula fields referencing deleted fields, validation rules that are tautologies (always-true or always-false), duplicate objects or fields serving the same purpose.
- Integration and security debt — Hardcoded endpoint URLs, deprecated API versions below v50.0, Named Credential gaps, and overly broad permission grants.
Severity Model
Use a consistent four-tier model for all findings:
| Severity |
Definition |
| Critical |
Poses immediate system stability, compliance, or data integrity risk. Requires urgent attention. |
| High |
Actively degrades maintainability, causes intermittent failures, or will block future work. Fix within the next sprint cycle. |
| Medium |
Technical hygiene: increases noise, slows developers, or creates future risk if left unaddressed. Fix within the next quarter. |
| Low |
Cosmetic or minor: undescriptive names, minor duplication, low-impact patterns. Fix as a housekeeping exercise. |
Remediation Ownership
Pair each finding with the recommended owner role:
- Admin — Configuration-level changes (deactivating flows, cleaning up permission sets, removing unused fields).
- Developer — Code changes (deleting dead Apex, refactoring complex triggers, resolving automation overlap).
- Architect — Structural decisions (consolidating duplicate objects, redesigning automation strategy, planning migration from Workflow Rules to Flow).
- Release Manager — Deployment-related debt (hardcoded IDs, broken metadata dependencies, stale package versions).
Mode 1: Full Technical Debt Assessment (Fresh Org Audit)
Use this mode for a comprehensive review of an org with no recent audit history.
Step 1 — Dead Code Detection
Apex classes with 0% test coverage:
- Run
sfdx force:apex:test:run --resultformat json and examine per-class coverage in the results.
- Any Apex class with 0 covered lines and 0 uncovered lines is a candidate — it is either untested or unreferenced.
- Any class with coverage lines but 0 covered lines has tests that never exercise it — either the tests are bypassing the class or the class is dead.
Apex classes never referenced in metadata:
- Download the full metadata set (SFDX retrieve or Metadata API retrieve).
- Search Flow metadata XML files, custom object metadata, and other .cls files for references to each class name.
- Classes with no inbound references from other Apex, Flows, or LWC
@wire calls are deletion candidates.
- Exception: scheduled Apex jobs reference class names dynamically — check the Scheduled Jobs list in Setup.
Apex triggers on objects with no active DML:
- An Apex trigger on an object that receives no writes in production (no insert, update, or delete) adds overhead without benefit.
- Use the Apex Trigger Manager in Setup to see the last execution timestamp if available.
- Cross-reference with the object's record count and last-modified-date statistics.
Step 2 — Unused Automation Inventory
Inactive Flow versions:
- Each time a Flow is saved, Salesforce creates a new version. Inactive versions consume the org's 2,000 Flow version limit.
- Go to Setup → Flows → filter by Inactive status. Large counts of inactive versions for the same flow are a housekeeping finding.
- Document the count of inactive versions per flow and flag any flow with more than 5 inactive versions.
Process Builder flows (legacy):
- No new Process Builder flows have been activatable since Summer '22. Any active Process Builder flow is executing legacy automation.
- Go to Setup → Process Builder. Any active flow is a migration candidate.
- Active Process Builder flows that overlap with existing Record-Triggered Flows on the same object are Critical findings.
Workflow Rules (legacy):
- Workflow Rules were formally deprecated with a migration deadline. Any Workflow Rule still active is a migration risk — Salesforce can enforce retirement at any release.
- Go to Setup → Workflow Rules. Export the full list. Flag all active rules.
- Workflow Rule field updates can conflict silently with after-save Flow updates on the same field.
Step 3 — Automation Overlap Analysis
For each object with more than one active automation type, assess overlap risk:
- List all active automations per object: Record-Triggered Flows, Apex triggers, Process Builder, Workflow Rules.
- For each pair of automations on the same object, answer:
- Do they both respond to the same trigger event (before insert, after update, etc.)?
- Do they write to any of the same fields?
- Do they both send emails, create tasks, or create records of the same type?
- Any "yes" to the above is an overlap finding. Rate severity by consequence:
- Both write the same field → Critical (last writer wins; result is non-deterministic depending on execution order)
- Both create the same related record type → High (duplicate records in production)
- Both send email alerts for the same event → Medium (user experience degradation)
Known automation execution order (simplified):
- Before-save Record-Triggered Flows
- Before Apex triggers
- Record committed (in memory)
- After Apex triggers
- Workflow Rules (legacy)
- After-save Record-Triggered Flows
A before-save Flow writing a field and an Apex after trigger reading that same field will see the Flow-written value. This is intentional — but it must be documented, because it is not obvious to a developer reading only the Apex code.
Step 4 — Deprecated Features Inventory
| Feature |
Status |
Finding |
| Workflow Rules |
Deprecated — no new activations; existing rules still execute |
Migration to Record-Triggered Flow is required |
| Process Builder |
Deprecated — no new flows since Summer '22; existing flows still execute |
Migration to Record-Triggered Flow is required |
| Aura components (org-owned) |
Legacy — supported but not receiving new features; LWC is the current standard |
Migration to LWC for any component that will receive future enhancements |
| Legacy API versions (below v50.0) |
Approaching end-of-life patterns; Salesforce periodically retires old API versions |
Upgrade integration endpoints to current API version |
Step 5 — Complexity Indicators
Flag the following as complexity hotspots:
- Apex classes with cyclomatic complexity > 20 — Use a static analysis tool (PMD, CodeScan) or review manually for method-level branching density. High complexity = high maintenance cost and high bug introduction risk.
- Flows with more than 50 elements — The 2,000-element interview limit is rarely approached, but 50+ element Flows are difficult to read, debug, and test. Candidates for subflow decomposition.
- Nested subflows more than 3 levels deep — Subflow chains that go 4+ levels deep become effectively unreadable in the Flow Builder canvas. Refactor using Invocable Actions backed by Apex, or flatten the logic.
- Apex trigger files that contain business logic directly — Logic embedded directly in trigger files (not delegated to handler classes) cannot be unit tested in isolation. This is both a debt and a test coverage risk.
- Formula fields referencing fields that no longer exist — These produce runtime errors or display
#Error! in the UI. Identifiable via Setup → Schema Builder or a metadata scan for broken references.
Step 6 — Security Debt Indicators
These are not full security findings (use security-architecture-review for that) but are indicators of accumulated access debt:
- Profiles with "View All Data" or "Modify All Data" granted to more users than strictly necessary.
- Permission sets with no assigned users — these are either unused (clutter) or documentation gaps (someone should be assigned).
- Apex classes running
without sharing without inline documentation explaining why elevated access is needed.
- Validation rules with hard-coded user IDs, profile names, or role names — these are fragile and break on org changes.
Step 7 — Integration Debt Indicators
- Hardcoded endpoint URLs in Named Credentials, Apex classes, or Custom Settings — any URL that is not parameterized will break when the endpoint changes.
- API version references below v50.0 in integration code — Salesforce API v50.0 corresponds to Winter '21. Anything older is approaching or past official retirement windows.
- HTTP callouts using hardcoded credentials (username/password in Apex string literals) — a security and integration debt item.
- Named Credential records with no associated authentication provider — may be using legacy password auth instead of OAuth.
Step 8 — Compile the Findings Report
Structure every finding as:
Area: [Dead Code | Automation | Deprecated Feature | Complexity | Security Config | Integration]
Finding: [One-sentence description of what was found]
Location: [Class name, Flow API name, object name, or Setup path]
Severity: [Critical | High | Medium | Low]
Remediation Effort: [Hours estimate or T-shirt size: XS/S/M/L/XL]
Recommended Owner: [Admin | Developer | Architect | Release Manager]
Mode 2: Targeted Review of a Specific Area
Use this mode when the scope is narrowed to one category — automations, code, or data model.
Targeted Automation Review
Focus: identify overlap and legacy automation on a specific object or business process.
- Pull all automation for the target object from Setup.
- Map each automation to its trigger event, field writes, and record creates/updates.
- Draw (or tabulate) the execution sequence using the order of execution reference.
- Flag any two automations that share a trigger event and share a write target.
Targeted Code Review
Focus: identify dead, over-complex, or untested Apex in a specific domain.
- Pull test coverage report filtered to the relevant namespace or class prefix.
- Flag classes below 75% coverage (minimum for deployment) and classes at 0%.
- Run PMD or equivalent static analysis for cyclomatic complexity on the class set.
- Review trigger files for direct DML/SOQL (no handler delegation).
Targeted Data Model Review
Focus: identify formula field errors, tautological validation rules, and duplicate objects.
- Export all custom fields on the target object(s). Check formula fields for references to deleted or renamed fields.
- Review validation rules: test each rule against a representative record to confirm it actually fires. Rules that never fire are either dead or incorrectly written.
- Check for duplicate objects: objects with the same purpose introduced at different points in the org's history (e.g.,
Custom_Order__c and Sales_Order__c both storing order records).
Mode 3: Pre-Release Health Check Before a Major Project
Use this mode before starting a significant feature build to understand the debt landscape that will affect the project.
Pre-Release Checklist
Findings Report Format
The output of this skill is a structured findings report. Use the template in templates/technical-debt-assessment-template.md.
Key sections:
- Org Profile — Age, size, team composition, last audit date.
- Automation Audit Summary — Active vs. inactive counts per automation type; overlap risk matrix.
- Dead Code Summary — Apex classes with low/zero coverage; unreferenced classes; stale triggers.
- Deprecated Features Inventory — Active Process Builder flows, Workflow Rules, Aura components to migrate.
- Complexity Hotspots — High-complexity Apex, oversized Flows, deep subflow chains.
- Security Config Indicators — Broad permission grants, unused permission sets,
without sharing classes.
- Integration Debt — Hardcoded URLs, old API versions, credential gaps.
- Prioritized Remediation Backlog — All findings sorted by Severity then Effort, with recommended owner.
Related Skills
architect/solution-design-patterns — for redesigning automation after debt is identified
apex/trigger-framework — for remediating Apex trigger debt
flow/ skills — for rebuilding migrated Process Builder and Workflow Rule logic
security/security-architecture-review — for deep security posture review beyond indicators
devops/ skills — for setting up deployment pipelines that prevent future debt accumulation
Recommended Workflow
Step-by-step instructions for an AI agent or practitioner activating this skill:
- Gather context — confirm the org edition, relevant objects, and current configuration state
- Review official sources — check the references in this skill's well-architected.md before making changes
- Implement or advise — apply the patterns from Core Concepts and Common Patterns sections above
- Validate — run the skill's checker script and verify against the Review Checklist below
- Document — record any deviations from standard patterns and update the template if needed
1---2name: technical-debt-assessment3description: Use when auditing a Salesforce org for technical debt: dead code, unused automations, overlapping Flow and Apex triggers, deprecated features, configuration complexity, and legacy patterns. Triggers: technical debt review, org health check, dead code analysis, automation overlap, deprecated features, complexity audit. NOT for implementing the fixes identified (use role-specific skills) or for security-specific reviews (use security-architecture-review).4---5
6Use this skill when auditing a Salesforce org to identify and document technical debt across automation, code, data model, security configuration, and integrations. This skill produces a structured findings report with severity ratings and a prioritized remediation backlog. It does not implement fixes — use domain-specific skills (apex/, flow/, security/, integration/) for remediation work.
7
8---
9
10## Before Starting
11
12Gather this context before conducting the assessment:
13
14- **How old is this org, and when was it last audited?** Older orgs accumulate more automation strata and legacy patterns.
15- **What features are actively in use?** Apex, Flow, Process Builder, Workflow Rules, Aura components, integrations — each area is a debt category.
16- **Are there known pain points?** "Automation keeps firing twice on Case" or "deployments break tests" are symptoms that guide where to look first.
17- **What is the managed package footprint?** Managed package components create debt you cannot modify. Note them separately — they are vendor debt, not org debt.
18- **What is the scope?** A full org audit, a targeted automation review, or a pre-release health check each require different depth.
19
20---
21
22## Core Concepts
23
24### What Technical Debt Means in Salesforce
25
26Technical debt in a Salesforce org falls into six categories:
27
281. **Dead code** — Apex classes with no test coverage, classes never referenced in metadata or by other code, triggers on objects with no active DML paths.
292. **Unused and redundant automation** — Inactive Flow versions that were never cleaned up, Process Builder flows left over from pre-Summer '22, Workflow Rules that were never migrated when the retirement deadline passed.
303. **Automation overlap** — The same object triggering both a Record-Triggered Flow and an Apex trigger for similar operations, creating double-execution risk, ordering surprises, or governor limit contention.
314. **Deprecated features in active use** — Workflow Rules and Process Builder executing live logic despite official deprecation; Aura components owned by the org team rather than migrated to LWC.
325. **Configuration complexity** — Formula fields referencing deleted fields, validation rules that are tautologies (always-true or always-false), duplicate objects or fields serving the same purpose.
336. **Integration and security debt** — Hardcoded endpoint URLs, deprecated API versions below v50.0, Named Credential gaps, and overly broad permission grants.
34
35### Severity Model
36
37Use a consistent four-tier model for all findings:
38
39| Severity | Definition |
40|---|---|
41| Critical | Poses immediate system stability, compliance, or data integrity risk. Requires urgent attention. |
42| High | Actively degrades maintainability, causes intermittent failures, or will block future work. Fix within the next sprint cycle. |
43| Medium | Technical hygiene: increases noise, slows developers, or creates future risk if left unaddressed. Fix within the next quarter. |
44| Low | Cosmetic or minor: undescriptive names, minor duplication, low-impact patterns. Fix as a housekeeping exercise. |
45
46### Remediation Ownership
47
48Pair each finding with the recommended owner role:
49
50- **Admin** — Configuration-level changes (deactivating flows, cleaning up permission sets, removing unused fields).
51- **Developer** — Code changes (deleting dead Apex, refactoring complex triggers, resolving automation overlap).
52- **Architect** — Structural decisions (consolidating duplicate objects, redesigning automation strategy, planning migration from Workflow Rules to Flow).
53- **Release Manager** — Deployment-related debt (hardcoded IDs, broken metadata dependencies, stale package versions).
54
55---
56
57## Mode 1: Full Technical Debt Assessment (Fresh Org Audit)
58
59Use this mode for a comprehensive review of an org with no recent audit history.
60
61### Step 1 — Dead Code Detection
62
63**Apex classes with 0% test coverage:**
64- Run `sfdx force:apex:test:run --resultformat json` and examine per-class coverage in the results.
65- Any Apex class with 0 covered lines and 0 uncovered lines is a candidate — it is either untested or unreferenced.
66- Any class with coverage lines but 0 covered lines has tests that never exercise it — either the tests are bypassing the class or the class is dead.
67
68**Apex classes never referenced in metadata:**
69- Download the full metadata set (SFDX retrieve or Metadata API retrieve).
70- Search Flow metadata XML files, custom object metadata, and other .cls files for references to each class name.
71- Classes with no inbound references from other Apex, Flows, or LWC `@wire` calls are deletion candidates.
72- Exception: scheduled Apex jobs reference class names dynamically — check the Scheduled Jobs list in Setup.
73
74**Apex triggers on objects with no active DML:**
75- An Apex trigger on an object that receives no writes in production (no insert, update, or delete) adds overhead without benefit.
76- Use the Apex Trigger Manager in Setup to see the last execution timestamp if available.
77- Cross-reference with the object's record count and last-modified-date statistics.
78
79### Step 2 — Unused Automation Inventory
80
81**Inactive Flow versions:**
82- Each time a Flow is saved, Salesforce creates a new version. Inactive versions consume the org's 2,000 Flow version limit.
83- Go to Setup → Flows → filter by Inactive status. Large counts of inactive versions for the same flow are a housekeeping finding.
84- Document the count of inactive versions per flow and flag any flow with more than 5 inactive versions.
85
86**Process Builder flows (legacy):**
87- No new Process Builder flows have been activatable since Summer '22. Any active Process Builder flow is executing legacy automation.
88- Go to Setup → Process Builder. Any active flow is a migration candidate.
89- Active Process Builder flows that overlap with existing Record-Triggered Flows on the same object are Critical findings.
90
91**Workflow Rules (legacy):**
92- Workflow Rules were formally deprecated with a migration deadline. Any Workflow Rule still active is a migration risk — Salesforce can enforce retirement at any release.
93- Go to Setup → Workflow Rules. Export the full list. Flag all active rules.
94- Workflow Rule field updates can conflict silently with after-save Flow updates on the same field.
95
96### Step 3 — Automation Overlap Analysis
97
98For each object with more than one active automation type, assess overlap risk:
99
1001. List all active automations per object: Record-Triggered Flows, Apex triggers, Process Builder, Workflow Rules.
1012. For each pair of automations on the same object, answer:
102 - Do they both respond to the same trigger event (before insert, after update, etc.)?
103 - Do they write to any of the same fields?
104 - Do they both send emails, create tasks, or create records of the same type?
1053. Any "yes" to the above is an overlap finding. Rate severity by consequence:
106 - Both write the same field → **Critical** (last writer wins; result is non-deterministic depending on execution order)
107 - Both create the same related record type → **High** (duplicate records in production)
108 - Both send email alerts for the same event → **Medium** (user experience degradation)
109
110**Known automation execution order (simplified):**
1111. Before-save Record-Triggered Flows
1122. Before Apex triggers
1133. Record committed (in memory)
1144. After Apex triggers
1155. Workflow Rules (legacy)
1166. After-save Record-Triggered Flows
117
118A before-save Flow writing a field and an Apex after trigger reading that same field will see the Flow-written value. This is intentional — but it must be documented, because it is not obvious to a developer reading only the Apex code.
119
120### Step 4 — Deprecated Features Inventory
121
122| Feature | Status | Finding |
123|---|---|---|
124| Workflow Rules | Deprecated — no new activations; existing rules still execute | Migration to Record-Triggered Flow is required |
125| Process Builder | Deprecated — no new flows since Summer '22; existing flows still execute | Migration to Record-Triggered Flow is required |
126| Aura components (org-owned) | Legacy — supported but not receiving new features; LWC is the current standard | Migration to LWC for any component that will receive future enhancements |
127| Legacy API versions (below v50.0) | Approaching end-of-life patterns; Salesforce periodically retires old API versions | Upgrade integration endpoints to current API version |
128
129### Step 5 — Complexity Indicators
130
131Flag the following as complexity hotspots:
132
133- **Apex classes with cyclomatic complexity > 20** — Use a static analysis tool (PMD, CodeScan) or review manually for method-level branching density. High complexity = high maintenance cost and high bug introduction risk.
134- **Flows with more than 50 elements** — The 2,000-element interview limit is rarely approached, but 50+ element Flows are difficult to read, debug, and test. Candidates for subflow decomposition.
135- **Nested subflows more than 3 levels deep** — Subflow chains that go 4+ levels deep become effectively unreadable in the Flow Builder canvas. Refactor using Invocable Actions backed by Apex, or flatten the logic.
136- **Apex trigger files that contain business logic directly** — Logic embedded directly in trigger files (not delegated to handler classes) cannot be unit tested in isolation. This is both a debt and a test coverage risk.
137- **Formula fields referencing fields that no longer exist** — These produce runtime errors or display `#Error!` in the UI. Identifiable via Setup → Schema Builder or a metadata scan for broken references.
138
139### Step 6 — Security Debt Indicators
140
141These are not full security findings (use `security-architecture-review` for that) but are indicators of accumulated access debt:
142
143- Profiles with "View All Data" or "Modify All Data" granted to more users than strictly necessary.
144- Permission sets with no assigned users — these are either unused (clutter) or documentation gaps (someone should be assigned).
145- Apex classes running `without sharing` without inline documentation explaining why elevated access is needed.
146- Validation rules with hard-coded user IDs, profile names, or role names — these are fragile and break on org changes.
147
148### Step 7 — Integration Debt Indicators
149
150- Hardcoded endpoint URLs in Named Credentials, Apex classes, or Custom Settings — any URL that is not parameterized will break when the endpoint changes.
151- API version references below v50.0 in integration code — Salesforce API v50.0 corresponds to Winter '21. Anything older is approaching or past official retirement windows.
152- HTTP callouts using hardcoded credentials (username/password in Apex string literals) — a security and integration debt item.
153- Named Credential records with no associated authentication provider — may be using legacy password auth instead of OAuth.
154
155### Step 8 — Compile the Findings Report
156
157Structure every finding as:
158
159```
160Area: [Dead Code | Automation | Deprecated Feature | Complexity | Security Config | Integration]
161Finding: [One-sentence description of what was found]
162Location: [Class name, Flow API name, object name, or Setup path]
163Severity: [Critical | High | Medium | Low]
164Remediation Effort: [Hours estimate or T-shirt size: XS/S/M/L/XL]
165Recommended Owner: [Admin | Developer | Architect | Release Manager]
166```
167
168---
169
170## Mode 2: Targeted Review of a Specific Area
171
172Use this mode when the scope is narrowed to one category — automations, code, or data model.
173
174### Targeted Automation Review
175
176Focus: identify overlap and legacy automation on a specific object or business process.
177
1781. Pull all automation for the target object from Setup.
1792. Map each automation to its trigger event, field writes, and record creates/updates.
1803. Draw (or tabulate) the execution sequence using the order of execution reference.
1814. Flag any two automations that share a trigger event and share a write target.
182
183### Targeted Code Review
184
185Focus: identify dead, over-complex, or untested Apex in a specific domain.
186
1871. Pull test coverage report filtered to the relevant namespace or class prefix.
1882. Flag classes below 75% coverage (minimum for deployment) and classes at 0%.
1893. Run PMD or equivalent static analysis for cyclomatic complexity on the class set.
1904. Review trigger files for direct DML/SOQL (no handler delegation).
191
192### Targeted Data Model Review
193
194Focus: identify formula field errors, tautological validation rules, and duplicate objects.
195
1961. Export all custom fields on the target object(s). Check formula fields for references to deleted or renamed fields.
1972. Review validation rules: test each rule against a representative record to confirm it actually fires. Rules that never fire are either dead or incorrectly written.
1983. Check for duplicate objects: objects with the same purpose introduced at different points in the org's history (e.g., `Custom_Order__c` and `Sales_Order__c` both storing order records).
199
200---
201
202## Mode 3: Pre-Release Health Check Before a Major Project
203
204Use this mode before starting a significant feature build to understand the debt landscape that will affect the project.
205
206### Pre-Release Checklist
207
208- [ ] **Test coverage baseline:** Is the org at or above 75% overall Apex coverage? Deployments will fail if coverage drops below this. Identify the lowest-coverage classes in the project's domain.
209- [ ] **Automation overlap on affected objects:** Are there active Process Builder flows or Workflow Rules on the objects the project will touch? These must be accounted for in the automation design.
210- [ ] **Flow version headroom:** Is the org below 1,800 active Flow versions (leaving 200 of the 2,000 limit as buffer)? If not, clean inactive versions before adding new Flows.
211- [ ] **API version currency:** Are the integration endpoints the project will use on API v56.0 or higher? If not, plan an upgrade alongside the build.
212- [ ] **Hardcoded IDs on affected objects:** Are there hardcoded record IDs in Flows or Apex that reference records on the objects the project will touch? These may break during sandbox refresh or deployment.
213- [ ] **Complexity budget:** Are the Apex classes and Flows the project will extend already at high complexity? If so, refactor before adding to them.
214
215---
216
217## Findings Report Format
218
219The output of this skill is a structured findings report. Use the template in `templates/technical-debt-assessment-template.md`.
220
221Key sections:
222
2231. **Org Profile** — Age, size, team composition, last audit date.
2242. **Automation Audit Summary** — Active vs. inactive counts per automation type; overlap risk matrix.
2253. **Dead Code Summary** — Apex classes with low/zero coverage; unreferenced classes; stale triggers.
2264. **Deprecated Features Inventory** — Active Process Builder flows, Workflow Rules, Aura components to migrate.
2275. **Complexity Hotspots** — High-complexity Apex, oversized Flows, deep subflow chains.
2286. **Security Config Indicators** — Broad permission grants, unused permission sets, `without sharing` classes.
2297. **Integration Debt** — Hardcoded URLs, old API versions, credential gaps.
2308. **Prioritized Remediation Backlog** — All findings sorted by Severity then Effort, with recommended owner.
231
232---
233
234## Related Skills
235
236- `architect/solution-design-patterns` — for redesigning automation after debt is identified
237- `apex/trigger-framework` — for remediating Apex trigger debt
238- `flow/` skills — for rebuilding migrated Process Builder and Workflow Rule logic
239- `security/security-architecture-review` — for deep security posture review beyond indicators
240- `devops/` skills — for setting up deployment pipelines that prevent future debt accumulation
241
242## Recommended Workflow
243
244Step-by-step instructions for an AI agent or practitioner activating this skill:
245
2461. Gather context — confirm the org edition, relevant objects, and current configuration state
2472. Review official sources — check the references in this skill's well-architected.md before making changes
2483. Implement or advise — apply the patterns from Core Concepts and Common Patterns sections above
2494. Validate — run the skill's checker script and verify against the Review Checklist below
2505. Document — record any deviations from standard patterns and update the template if needed
251
252---
253