t1k:unity:base:build-integration-audit
| Field | Value |
|---|---|
| Module | base |
| Version | 5.116.6 |
| Effort | medium |
| Tools | Bash, 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
How to invoke
Section titled “How to invoke”/t1k:unity:base:build-integration-auditcompose|audit --project <unity-dir> --ref origin/<branch> [--profile production|develop] ; trigger-with-audit --base-jenkins-job <Folder/Job> [--dry-run]Build integration audit
Section titled “Build integration audit”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) andaudit(what a given define list gets wrong).trigger-with-audit.cjs: runs compose, shows the diff, refuses on what compose cannot fix, then triggers throught1k-jenkins-build’sjenkins-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.
Decision tree
Section titled “Decision tree”| Intent | Path |
|---|---|
| About to trigger a Unity Jenkins build | Trigger |
| Want to see what a build would carry, no trigger | Compose |
| A define list is in hand and needs checking | Audit |
| A build finished; confirm what it carried | After a build |
| Verdict has gaps, forbidden or unregistered symbols | Acting on the verdict |
| A module adds a define symbol | references/register-a-symbol.md |
Hard rules
Section titled “Hard rules”- 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 savedenabled: 0while the committed config hasenabled: 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.cjsdirectly 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_USERorJENKINS_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-runprints the exact parameters and makes no POST. - This skill does not edit Jenkins jobs, ProjectSettings, game files, or branches. It reads committed objects only.
Compose
Section titled “Compose”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>-ReleaseOutput 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.
Trigger
Section titled “Trigger”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.
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.
After a build
Section titled “After a build”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):
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 productionExit 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.
Acting on the verdict
Section titled “Acting on the verdict”| Finding | Meaning | Action |
|---|---|---|
gaps | A 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. |
diagnosticsPresentInProduction | A define forbidden for the profile. | Compose removes it. If it is in the Android define line of ProjectSettings, report that drift to the owner. |
requiredMissing | A required feature define is absent. | Compose adds it. Ask the user before adding a policy-only one. |
unregistered | A gated symbol with no registry entry. | Warning only. Register it (see register-a-symbol.md), or ask the owning module. --strict makes it fail. |
dormantIntegrations | Code 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. |
autoDefined | The 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. |
versionDefinesDormant | An asmdef versionDefines entry whose package is absent. | Not a gap. The symbol is not defined and nothing needs it. |
versionDefinesConditional | A 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. |
workTreeDiffersFromRef | Audited 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. |
unknown | Build 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.
Logging level (com.theone.logging)
Section titled “Logging level (com.theone.logging)”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.
Facts the scripts emit
Section titled “Facts the scripts emit”source: mode and, for a ref, the resolved commit. Quote the commit in reports.integrations: eachkind: integrationentry, withdetected,via(the detectors that fired),inDefines, andgatedInTree.configFlags,enabledIntegrations,disabledIntegrations: names and 0/1 values only.packages.pinnedSubmodules: every submodule underAssets/andPackages/at its gitlink SHA, withobjectFoundand 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.asmdefCountandversionDefines: every*.asmdefunder Assets, Packages and pinned submodules is parsed forversionDefines. A registry entry withautoDefinedByis cross-checked against the scan; a mismatch warns.parseIssues:#iflines the parser could not read; non-zero means some classification fell back.- Output stays under 32 KB.
truncated: truemeans sample paths or unclassified entries were trimmed; the verdict, source and integration entries are never trimmed.
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.cjsThe 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.
Extending the registry
Section titled “Extending the registry”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.
Related
Section titled “Related”build-define-audit.mdrule (.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 enablesmFloorProbing.t1k-jenkins-buildandjenkins-build-kinds: the trigger and verification engine this skill calls.
Executed by
Section titled “Executed by”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”.
| Step | Agent |
|---|---|
Run compose, audit or trigger-with-audit --dry-run and report the JSON verdict | t1k-fact-fetcher |
| Count gaps, forbidden, unregistered and dormant entries from the verdict | t1k-metrics-reporter |
| Decide whether a refusal is a real defect, or which symbol a module needs | reasoning tier: t1k-debugger |
| Run the real trigger after the user confirms the parameters, and any skip | main session, inline (the user decides) |
Summoning
Section titled “Summoning”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.