Set Up Standards
The setup-standards skill scaffolds CI checks, a review checklist, and Log_Level__mdt defaults so Triton instrumentation stays consistent as your org grows.
Instrumenting an org is only half the battle; the other half is keeping it instrumented. The setup-standards skill scaffolds the guardrails from Standards Enforcement into your repo so regressions get caught by a machine instead of a tired reviewer — the two hard CI rules, the higher-value checks, a short review checklist, and sensible Log_Level__mdt defaults.
It writes config, not application code, and it tailors what it generates to the CI system it detects.
Usage
/pharos:setup-standards [--ci github|gitlab|bitbucket|generic] [--pmd] [--checklist] [--log-levels]--ci
Which pipeline to target. Auto-detected from the repo (e.g. .github/workflows/) when omitted.
--pmd
Also emit PMD rules, not just grep-level checks.
--checklist
Drop the PR review checklist into the repo (e.g. a pull-request template).
--log-levels
Scaffold Log_Level__mdt records with per-environment defaults.
What it generates
The two hard CI rules
The non-negotiables that are cheap to automate — no System.debug in application code, no Triton.instance (the removed 1.x singleton). As a grep-level check for the detected pipeline:
# Fail the build on System.debug in application code (tests excepted)
if grep -rn "System.debug" force-app/main --include=*.cls | grep -v "Test.cls"; then
echo "❌ System.debug found — use Triton logging instead."
exit 1
fi
# Fail on any lingering 1.x singleton usage
if grep -rn "Triton\.instance" force-app/main --include=*.cls; then
echo "❌ Triton.instance is 1.x — migrate to the static API (Triton.log/Triton.t)."
exit 1
fiWith --pmd, the same two rules are emitted as RegexRule entries for your ruleset so they land in the same report as the rest of your static analysis.
The review checklist
With --checklist, it writes the short, actually-usable list from Standards Enforcement — template set, real taxonomy, honest levels, exceptions logged, flush coverage, context present, transactions correlated — as a PR template so a reviewer just ticks boxes.
Log_Level__mdt defaults
With --log-levels, it scaffolds per-environment log-level records so verbosity is tuned by metadata, not code — quiet in production, chatty in a scratch org.
The ratchet
Pair this with audit-logging to turn standards into a one-way ratchet:
audit-logging --fail-on error,debugruns in CI as a gate.setup-standardsinstalls the hard rules so newSystem.debug/Triton.instancecan't merge.As
instrument-orgclears each area, the gate holds it clean — gaps can't creep back in.
Where to go next
Standards Enforcement — the full rationale and the higher-value checks worth building once.
Audit Logging Coverage — the read-only report that feeds the CI gate.
Taxonomy & Standards — the vocabulary these checks defend.
Legacy Code Logging Rollout — how to enforce on new code first while retrofitting old code gradually.
Last updated