# Structure and governance rules: R10, R14, R28, R30, R31

Checked on 2026-11-01 against the Tag Manager API v2 references for triggers, workspaces, environments and version headers, the API quota page and Google's permissions and publishing help; the Workspaces help re-checked on 2026-11-06.

## R10 paused-orphaned-broken

- FAIL P2: references to variables or trigger IDs that are not in the file. Either the read is partial (Tag Manager keeps variable references when variables are left out of an export; an MCP read missed a page) or the item was deleted and the tag breaks. Without a builtInVariable list the missing-variable finding is a WARN, because built-ins cannot be told apart.
- WARN P3: paused tags when at least one is a conversion. A paused conversion kept as a rollback returns with its old triggers and none of the new consent blockers when someone resumes it in bulk.
- WARN P4: other paused tags, active tags with no firing trigger outside a sequence, unused triggers and variables, schedules that ended, placeholder text (!!!, TODO, TBD, REPLACE ME, PLACEHOLDER) left by unfinished imports or API conflict resolution.
- Agent adds: fix a partial read before reporting anything else. Ask who owns each paused tag and record why it stays.

## R14 version-hygiene

From the file:

- INFO, never scored: the file is not a published version (containerVersionId 0 or missing, as in workspace exports and assembled workspace reads). The report header says "workspace export, pending change". Audit the live version for what visitors get; a workspace audit is the pending-change check in the change list loop. Pages read with `gtm_version` live keep the live version ID through the assembler.
- WARN P4: a version with no name or description; a file more than 7 days old against `--as-of` or today. `exportTime` has no timezone; the script reads it as UTC.

From outside the file ([outside-the-file.md](outside-the-file.md)):

- FAIL P2: production pages load the container with `gtm_auth` and `gtm_preview` parameters, so visitors get an environment version, not the live one.
- WARN P3: the latest version is newer than the live one (an unpublished version is waiting); a workspace with changes tied to no named change; all three workspaces of a standard container in use; merge conflicts (versioning or publishing a workspace overwrites any synced change it ignored); more than three people with Publish; fewer than two active administrators (Google recommends at least two and organisational ownership); agency or former-staff accounts with Edit or above and no named owner.
- Why: unnamed versions make rollback guesswork, and permissions are not versioned, so a rollback does not restore them.

## R28 trigger-hygiene

- WARN P3: a timer trigger with no limit (the API reference says it then fires until the visitor leaves the page); a link click or form trigger that waits for tags with no firing filter, which delays every navigation it touches.
- WARN P4: duplicate triggers (same type and conditions); click, link click or form triggers with no filter that fire non-conversion tags on every interaction.
- INFO: single-page app signals (history change triggers), which R03 and R17 use.
- Not checked: element visibility triggers set to observe DOM changes. The export key for that box is not confirmed, so check it in the trigger's settings in the UI; a DOM observer on every page adds work for each change.
- Confirm: Preview on one long page view; timer events stop at the limit.

## R30 data-layer-contract

Needs `--plan-events`; without it the rule is reported as NOT CHECKED.

- FAIL P2: a custom event trigger listens for a case or separator variant of a plan event (`Purchase` versus `purchase`, `generate-lead` versus `generate_lead`). Custom event names match exactly, so it never fires. Names with stray whitespace are R18's job.
- WARN P3: plan events with no dedicated trigger. Wildcard triggers do not count. Fine when the event is forwarded, automatic or server-side; otherwise the plan says the site pushes it and nothing listens.
- WARN P4: triggers that listen for events the plan does not list (legacy or undocumented).
- Agent adds: the plan is the contract. When the site pushes a name the plan does not have, fix the plan or the site, not the trigger, and record the decision.
- Confirm: Preview's Data Layer tab on the real journey shows each pushed event name exactly.

## R31 naming-and-organization

- WARN P3: an active tag that fires but is named as test, testing, old, backup, temp, deprecated or do not use. Either it is live and misnamed, or it should not be live.
- WARN P4: default or copied names (Untitled, New Tag, New Trigger, New Variable, Copy of, a trailing "(1)"); duplicate names within a type; names that do not match the patterns from naming-rules.md (`--naming-tags`, `--naming-triggers`, `--naming-variables`, regular expressions); a name prefix that implies another tag type (GA4, Ads, Meta, HTML, UA); more than 25 tags and no folders.
- INFO: conversion tags without notes. A one-line note with the owner, what counts and the ticket saves the next audit a question.
- Why: misleading names are how live tags get deleted and dead tags get trusted.
- Agent adds: naming findings never block a release; batch them as hygiene in a separate release.

## Reading versions, workspaces and environments read-only

- API: `accounts.containers.version_headers.list` and `latest`, `accounts.containers.workspaces.list` and `getStatus`, `accounts.containers.environments.list`. Never print or save an environment's authorization code; keep only its name, type and version ID.
- Quotas: Google documents 10,000 requests per project per day and 0.25 queries per second per project; read once and work from saved files.
- User permissions need `tagmanager.manage.users`, which an audit must not request. Ask an administrator for each user's permission level and whether they are staff, agency or former staff, with names and email addresses replaced by roles ([../assets/evidence-request.md](../assets/evidence-request.md)). The audit needs access levels, not identities.
