Skip to content

t1k:unity:base:build-integration-audit

FieldValue
Modulebase
Version5.116.6
Effortmedium
ToolsBash, Glob, Grep, Read

Keywords: ADMOB, APPLOVIN, build defines, build integration audit, compiled out, define symbols, integration missing from build, jenkins define check, PARAM_UNITY_SCRIPTING_DEFINE_SYMBOLS, register symbol, release define check, scripting define, X_FLOOR_PROBING

/t1k:unity:base:build-integration-audit
compose|audit --project <unity-dir> --ref origin/<branch> [--profile production|develop] ; trigger-with-audit --base-jenkins-job <Folder/Job> [--dry-run]

A build carries the defines Jenkins sends in PARAM_UNITY_SCRIPTING_DEFINE_SYMBOLS, and that parameter replaces the project’s own list. This skill works out what the build must carry from what the game integrates (config flags, manifest packages, config blocks), composes the define string, and gates the trigger on the result. Two scripts in scripts/ do the work, and both emit facts as JSON. Judgment (what to do about a gap) stays here, in the main session.

  • build-integration-audit.cjs: compose (the defines a build should carry) and audit (what a given define list gets wrong).
  • trigger-with-audit.cjs: runs compose, shows the diff, refuses on what compose cannot fix, then triggers through t1k-jenkins-build’s jenkins-build.cjs.

The registry is references/integration-symbols.json (schema 2): every gated symbol the scanner finds, with its kind, owner evidence, detectors and per-profile policy. Module authors register symbols per references/register-a-symbol.md.

IntentPath
About to trigger a Unity Jenkins buildTrigger
Want to see what a build would carry, no triggerCompose
A define list is in hand and needs checkingAudit
A build finished; confirm what it carriedAfter a build
Verdict has gaps, forbidden or unregistered symbolsActing on the verdict
A module adds a define symbolreferences/register-a-symbol.md
  • Always read the committed branch. --ref origin/<branch> is required for production. A dirty working tree can flip an integration off (seen: a local config saved enabled: 0 while the committed config has enabled: 1). A worktree verdict is not the build’s verdict. Fetch first (git fetch origin <branch>): the ref is whatever the last fetch left.
  • Skipping the audit requires the user’s own sentence. trigger-with-audit.cjs --skip-audit "<text>" is the only bypass. Pass the user’s words verbatim, and only when the user asked for it in this conversation. Never infer a skip from silence, urgency, or a green build. A skip still audits, prints the WARNING block, and appends to .claude/session-state/build-audit-skips.jsonl.
  • Refusal is final for that build. Exit 1 means the composition cannot fix the gap. Fix the registry or the base list. Never call jenkins-build.cjs directly to get around the wrapper.
  • Never print config values. Config assets hold API keys and endpoints. The scripts emit block and flag names and their 0/1 values only. Do not Read a config asset and quote a secret-looking field.
  • Never print JENKINS_URL, JENKINS_USER or JENKINS_TOKEN, and never ask the user to paste a token.
  • Unknown is not clean. A masked, absent, or unreachable build value exits 1. A masked value cannot be verified after the build.
  • Dry-run before trigger. --dry-run prints the exact parameters and makes no POST.
  • This skill does not edit Jenkins jobs, ProjectSettings, game files, or branches. It reads committed objects only.
Terminal window
bun .claude/skills/t1k-unity-base-build-integration-audit/scripts/build-integration-audit.cjs compose \
--project <UnityDir> --ref origin/<branch> --profile production --base-jenkins-job UnityAndroid/<Game>-Release

Output keys: defines (the exact string), added, removed, reasons (per symbol: action, feature, owner, evidence), unregistered, warnings, verdict. The base is the Release job’s current default (--base-jenkins-job) or an explicit list (--base-defines). Compose removes forbidden symbols for the profile, adds required ones, and adds every integration the game detects. It never removes an integration the game does not use; that is reported as a warning.

Terminal window
bun .claude/skills/t1k-unity-base-build-integration-audit/scripts/trigger-with-audit.cjs \
--project <UnityDir> --ref origin/<branch> --base-jenkins-job UnityAndroid/<Game>-Release \
--dry-run [--param PARAM_NODE_LABEL=<label>] [--allow-class release]

Run with --dry-run first and show the parameters. Drop --dry-run only after the user confirms those parameters. Any other flag is forwarded to jenkins-build.cjs trigger. Passing PARAM_UNITY_SCRIPTING_DEFINE_SYMBOLS yourself is refused.

Release builds still pass jenkins-build.cjs’s own class guard and release preflight. A release trigger needs the user’s sentence naming Release, and --allow-class release is the only way past the class guard.

After a real trigger the script prints the build number and the re-audit command. Use --profile develop for develop or creative builds: diagnostics are then reported but do not fail.

Terminal window
bun .claude/skills/t1k-unity-base-build-integration-audit/scripts/build-integration-audit.cjs audit \
--project <UnityDir> --ref origin/<branch> --defines "<list>" --profile production [--strict]

Or --from-projectsettings (the Android define line), or --jenkins-job <Folder/Job> [--build N] (the parameter a job carries). Exit 0 means ok; exit 1 means fail (gap, forbidden, or required missing), or unknown, or, with --strict, an unregistered gated symbol.

Re-audit the commit the build compiled, taken from the Jenkins build’s SCM information, not the branch tip (the branch may have moved since the trigger):

Terminal window
bun .claude/skills/t1k-unity-base-build-integration-audit/scripts/build-integration-audit.cjs audit \
--project <UnityDir> --ref <build-commit-sha> --jenkins-job <Folder/Job> --build <N> --profile production

Exit 0 means the build carried every detected integration and no forbidden define, in the commit it compiled. If buildDefines.unknownReason is set, report the reason and do not call the build verified.

FindingMeaningAction
gapsA detected integration whose define is missing from the list.Compose adds it. If it still shows after compose, the registry is wrong; fix the entry.
diagnosticsPresentInProductionA define forbidden for the profile.Compose removes it. If it is in the Android define line of ProjectSettings, report that drift to the owner.
requiredMissingA required feature define is absent.Compose adds it. Ask the user before adding a policy-only one.
unregisteredA gated symbol with no registry entry.Warning only. Register it (see register-a-symbol.md), or ask the owning module. --strict makes it fail.
dormantIntegrationsCode gates on the symbol, but the game does not integrate it.Nothing ships compiled out. Enabling is a config change for the owner, and only when the user asks.
autoDefinedThe symbol comes from an asmdef versionDefines entry whose package is installed (manifest, packages-lock.json, or a local package dir). Unity defines it itself.Satisfied. Compose never adds it, so it must not appear in the Jenkins parameter. Reported with its package and asmdef path.
versionDefinesDormantAn asmdef versionDefines entry whose package is absent.Not a gap. The symbol is not defined and nothing needs it.
versionDefinesConditionalA versionDefines entry with a version expression.Never counted as satisfied; reported so the owner can decide.
warnings (present but not integrated)A define in the list whose integration no detector fired for.Report it. Do not remove it without the user’s decision.
workTreeDiffersFromRefAudited files in the working tree differ from the ref.List differingAuditedFiles in the report. Ask whether those edits are meant to ship. Never commit or discard them from here.
unknownBuild value masked, absent or unreachable (unknownReason).Report the reason. A masked build cannot be audited from the API.

The scripts never decide policy. A gap or forbidden symbol that the composition cannot fix stops the trigger, and the user decides what happens next.

The package defines X_LOGGING_INFO only when no X_LOGGING_* level is set, so a build with no level logs at Info. Only X_LOGGING_NONE turns all output off (ILogger.cs:3, LogLevel.cs:47, package 5.4.1+; the THEONE_LOGGING_* spellings are the pre-rename names). Production therefore requires exactly X_LOGGING_NONE, and only when com.theone.logging is installed (requiresPackage, checked against packages-lock.json and manifest.json). Compose adds it and removes every other level. Audit fails on a missing NONE or on any other level. Develop accepts any one level or none. The package is not in the game repo, so the registry records the package-owned evidence rather than a repo line.

  • source: mode and, for a ref, the resolved commit. Quote the commit in reports.
  • integrations: each kind: integration entry, with detected, via (the detectors that fired), inDefines, and gatedInTree.
  • configFlags, enabledIntegrations, disabledIntegrations: names and 0/1 values only.
  • packages.pinnedSubmodules: every submodule under Assets/ and Packages/ at its gitlink SHA, with objectFound and the checkout it was read from. A submodule whose object is missing is a blind spot, and the audit says so in the gap evidence.
  • asmdefCount and versionDefines: every *.asmdef under Assets, Packages and pinned submodules is parsed for versionDefines. A registry entry with autoDefinedBy is cross-checked against the scan; a mismatch warns.
  • parseIssues: #if lines the parser could not read; non-zero means some classification fell back.
  • Output stays under 32 KB. truncated: true means sample paths or unclassified entries were trimmed; the verdict, source and integration entries are never trimmed.
Terminal window
T1K_BUILD_AUDIT_TEST_PROJECT=<UnityDir> T1K_BUILD_AUDIT_TEST_REF=origin/<branch> T1K_BUILD_AUDIT_PROD_KEY=<key> T1K_BUILD_AUDIT_PROD_DEFINES=<path/to/prod-defines.json> bun test .claude/skills/t1k-unity-base-build-integration-audit/tests/build-audit.test.cjs

The project-checkout tests need those env vars. Without them they skip, and the asmdef test still runs. The suite never POSTs to Jenkins: the trigger’s Jenkins command is a stub, enabled only with T1K_BUILD_AUDIT_TEST_MODE=1, and the skip log goes to T1K_BUILD_AUDIT_SKIP_LOG (a scratch file), never the repo’s session-state.

Edit references/integration-symbols.json (schema 2, entries). Field semantics and the evidence rule are in references/register-a-symbol.md. Verify with bun build --no-bundle <script> --target=bun --outfile=/dev/null on the script, a JSON parse of the data file, and one compose --ref run where the new entry applies.

  • build-define-audit.md rule (.claude/rules/): makes the trigger wrapper mandatory for Unity builds.
  • t1k-unity-mobile-floor-probing-jenkins: the floor-probing define on the Jenkins job.
  • t1k-unity-mobile-floor-probing-config: the config-asset half, which enables mFloorProbing.
  • t1k-jenkins-build and jenkins-build-kinds: the trigger and verification engine this skill calls.

Running the audit is mechanical: compose, audit and trigger-with-audit --dry-run are deterministic script calls that emit JSON, and reading that JSON back is a lookup. The judgment steps stay inline: what to do about a gap, whether a refusal is a real defect, and whether a skip is allowed. The real trigger (without --dry-run) also stays in the main session, because it posts to Jenkins. Routing SSOT: rules/orchestration-rules.md § “Task-Type → Agent Routing”.

StepAgent
Run compose, audit or trigger-with-audit --dry-run and report the JSON verdictt1k-fact-fetcher
Count gaps, forbidden, unregistered and dormant entries from the verdictt1k-metrics-reporter
Decide whether a refusal is a real defect, or which symbol a module needsreasoning tier: t1k-debugger
Run the real trigger after the user confirms the parameters, and any skipmain session, inline (the user decides)

Summoned by: a Unity build trigger (the build-define rule names this skill), an explicit request to audit defines, or a registry change. No kit skill names it yet; a build flow that must run it names it in its steps.