Audit Logging Coverage
The audit-logging skill scans a Salesforce project read-only, reports where Triton logging is missing or wrong, and produces a prioritized rollout plan.
The audit-logging skill answers the question you have before any rollout: how bad is it, and where do I start? It reads a project without writing anything and produces two things — a coverage report (what's instrumented, what isn't, and what's wrong) and a prioritized plan you can hand straight to instrument-org.
It's the read-only sibling of the instrumentation skills. Nothing it finds is changed; it only tells you what it found.
Usage
/pharos:audit-logging [<path>] [--format md|json] [--fail-on error,debug] [--tech apex,lwc,flow]<path>
Project root or subtree. Defaults to the detected project root.
--format
md (default, human-readable) or json (machine-readable, for CI).
--fail-on
Exit non-zero when a given class of finding is present — for use as a CI gate.
--tech
Restrict to some technologies. Defaults to all three.
What it checks
The checks mirror the Standards Enforcement review checklist, sorted into hard failures (a machine can be certain) and judgment calls (flagged for a human).
Hard findings — unambiguous
System.debug in application code
Invisible telemetry — should be a Triton.debug(...).
Triton.instance usage
The removed 1.x singleton; its presence means un-migrated code. Route it to migrate-to-2.0.
Catch-but-not-logged
A catch block with no Triton call — the most common way errors go dark.
Missing flush at a boundary
A method that buffers logs but has no Triton.flush() at the end of the handler/execute/finally.
Un-logged entry points
@AuraEnabled, REST, Queueable execute, Batch start/finish with no logging at all.
Flow fault paths with no Log action
A <faultConnector> with no TritonFlow action — unhandled Flow errors going unseen.
Judgment findings — flagged, not failed
Ad-hoc taxonomy strings —
.area('...')/.type('...')literals where an enum value exists, hinting at drift.Honesty of levels —
ERRORused for non-failures, or loop chatter aboveFINE.Missing context — record-oriented logs with no
.relatedObject(s); callouts with no.integrationPayload(...).Low-comfort code — old, untested, business-critical files that a rollout should treat gently (see the comfort tiers).
Publishes in managed-package-object triggers —
Triton.logNow(...),Triton.flush(), orTriton.flushTop()on a path reached from a trigger on another package's object (an SObject name carrying that package's namespace). The write belongs to the package, often under an integration user you can't test as. Triton 2.0.0 and later never throws on a failed publish, but an exhausted governor limit still fails the write, and a copy of Triton vendored before 2.0.0 does throw. The audit notes the Triton version it found and recommendsTriton.log(...)plus oneTriton.flush()as the handler's last statement, and the restricted-user test from Instrument Apex.
The report
The default Markdown report leads with a scoreboard, then the prioritized plan, then the detail.
The json format emits the same data as structured findings (file, line, rule, severity) so you can gate CI or feed a dashboard.
Where this fits
audit-logging is the front door of the whole workflow:
Audit — run this, read the report. (read-only)
Fix version drift —
migrate-to-2.0on anything using the 1.x singleton.Instrument —
instrument-orgworks the prioritized plan.Lock it in —
setup-standardswires the hard findings into CI so gaps can't creep back.
Where to go next
Instrument the Org — act on the plan this audit produces.
Standards Enforcement — the checklist and CI rules these checks come from.
Set Up Standards — turn the hard findings into automated guardrails.
Migrate to 2.0 — clear the
Triton.instancefindings.
Last updated