For the complete documentation index, see llms.txt. This page is also available as Markdown.

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.

Invocation is agent-specific. In agents that support slash commands (Claude Code, Cursor) you invoke it as /pharos:setup-standards; in others you point the agent at this skill. See Running these in your agent.

Usage

/pharos:setup-standards [--ci github|gitlab|bitbucket|generic] [--pmd] [--checklist] [--log-levels]
Argument
Required
Meaning

--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
fi

With --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:

  1. audit-logging --fail-on error,debug runs in CI as a gate.

  2. setup-standards installs the hard rules so new System.debug / Triton.instance can't merge.

  3. As instrument-org clears each area, the gate holds it clean — gaps can't creep back in.

Where to go next

Last updated