Tracking Plan Audit
Produce a deletion-focused, evidence-backed cleanup inventory. This skill
specializes in deletion audits across telemetry, source code, ownership,
dependencies, and tracking-plan branches. Use taxonomy for broad taxonomy
design, naming, metadata, and governance guidance.
Do not add or restore taxonomy objects, make metadata-only changes, or create,
mutate, merge, or delete an Amplitude branch unless the user explicitly asks.
At the start, establish:
- the Amplitude project and environment;
- whether the goal is lower ingestion volume, fewer taxonomy types, or both;
- every repository or directory that may emit the project's data;
- the requested audit mode and lookback window.
Source-code gate
Source code is required. If the user has not identified every repository or
directory that can emit into the project, ask for those locations before
recommending deletion candidates. You may inventory taxonomy objects while
waiting, but label the result incomplete and do not recommend or execute any
deletion. Before lifting this gate, ask the user to confirm that the supplied
source inventory covers every known emitter.
Never report "no code reference" unless every user-identified source root was
searched.
Do not assume repository names, services, languages, project IDs, event names,
observability systems, or filesystem layouts. Inspect each source root's local
instructions before searching it.
Route the audit
Choose a primary mode and state it before discovery. Run additional requested
modes sequentially so each keeps its own criteria. Read
references/modes.md for each mode's criteria.
- General stale events/properties
- Cross-app overlap
- Planned but never ingested
- Global orphan properties
- Dead generated-client definitions
- Duplicate events/properties
- Retired features, routes, flags, or experiments
- High-volume, low-query instrumentation
- Code still emitting deleted or blocked events
If the user requests taxonomy changes, also read
references/mutations.md before any mutation.
Non-negotiable evidence rules
- Keep telemetry, query/dependency usage, code references, source ownership,
and taxonomy state as separate signals. No single signal proves deletion is
safe.
- Audit every identified source root. Include generated clients, direct SDK
use, wrappers, dynamic dispatch, frontend, backend, mobile, jobs, and
integrations where present.
- A generated definition is potential usage, not a production call site. Trace
its method or class through imports, wrappers, registries, aliases, tests,
and production callers.
- A literal-search miss is insufficient. Check generic trackers, constructed
names or keys, dictionary spreads, serializers, constants, and
service-specific clients.
- Determine whether each enclosing code path is reachable through imports,
route wiring, flags, experiments, jobs, tests, and callers. Distinguish dead
code from a live feature whose analytics call alone should be removed.
- Recent ingestion with no owner in the known roots indicates an external or
unidentified source. Report it and ask for another likely source root before
recommending deletion.
- Check charts, dashboards, cohorts, metrics, experiments, transformations,
derived properties, lookups, alerts, exports, and other relationships where
available. A zero saved-query count does not prove there is no dependency.
If a required dependency surface is unavailable, mark it unresolved and do
not recommend deletion.
- When retirement or production activity matters, ask which monitoring,
feature-flag, experimentation, and deployment systems the user has connected.
Prefer their read-only MCP or app capabilities over assumptions or manual
screenshots.
- Treat default/system objects and experiment, session-replay, or agent fields
cautiously unless the selected mode explicitly investigates them.
- Do not expose credentials, property values, PII, customer payloads, or other
customer-sensitive data. Report aggregates, names only when necessary, and
access-controlled evidence links.
Public Amplitude MCP capabilities
Inspect the connected public Amplitude MCP catalog at runtime and use only the
capabilities, action values, parameters, and limits it advertises. Do not
hard-code or invent tool names: public tools can be consolidated, renamed, or
exposed differently during a rollout.
Use the available capabilities to:
- discover accessible projects and ask the user to select one when its ID is
missing; never infer an ID from a name;
- read raw events and event properties, preferring the consolidated taxonomy
reader when the catalog exposes one;
- include deleted objects when comparing states or historical ownership;
- select exactly one branch identifier when auditing a tracking-plan branch;
- distinguish project-wide/global properties from properties attached to one
event using the response's documented scope fields.
For mutation capability selection and exact confirmation behavior, read
references/mutations.md.
Complete taxonomy reads
For every exhaustive paginated read:
- Request the largest supported page size, up to 500.
- Follow every returned cursor until the response says there are no more
rows.
- Track unique rows using the response's stable identity plus property/event
scope, then compare the accumulated count with the API's reported total.
- Retry transient timeouts and gateway/server failures from the last known
cursor using bounded retries and backoff appropriate to the connected host.
Never treat an error payload or failed empty page as completion.
- If retries are exhausted or counts disagree, report incomplete coverage and
do not recommend deletions from the partial result.
Use a complete tracking-plan export when available to reconstruct
event-to-property ownership and compare main with a branch. A project-wide
property listing exposes global definitions but may not enumerate every event
attachment. Do not infer ownership from it alone, the export Action column,
or branch UI counters; compare taxonomy states explicitly.
Shared audit workflow
- Snapshot the relevant main or branch taxonomy and telemetry window.
- Fully paginate required reads and record coverage against reported totals.
- Build ownership from complete exports, including active and deleted scopes.
- Search every identified source root; classify production, dynamic,
generated-only, test-only, dead, and unknown-external references.
- Check dependencies and resolve every code, ownership, and source signal.
- Classify candidates by confidence, evidence, uncertainty, and recommended
deletion transition.
- After any event deletion, always perform a global orphan-property sweep.
Present global property candidates separately and ask for separate explicit
confirmation; event deletion never authorizes or implies global deletion.
Strong candidates normally have no reachable emitter, no recent ingestion,
little or no query usage, no active owner or dependency, and no unresolved
dynamic or external source. Existing telemetry, dependencies, generic names,
required schemas, or unknown ownership require investigation, not deletion.
For properties, report at least:
property | scope/owners | code references by source | volume/query window | last seen | required | dependencies | confidence | recommendation
Also report source coverage, exclusions, unresolved paths, sensitive-data
redactions, and a reviewable batch. Keep mutation batches within the user's
requested limit; otherwise prefer a small first batch.
1---2name: tracking-plan-audit3description: Use when auditing Amplitude tracking plans for safe deletion candidates among stale, duplicate, orphaned, cross-app, retired, high-volume, generated-client, never-ingested, or deleted-but-still-emitted events and event properties.4---5
6# Tracking Plan Audit
7
8Produce a deletion-focused, evidence-backed cleanup inventory. This skill
9specializes in deletion audits across telemetry, source code, ownership,
10dependencies, and tracking-plan branches. Use `taxonomy` for broad taxonomy
11design, naming, metadata, and governance guidance.
12
13Do not add or restore taxonomy objects, make metadata-only changes, or create,
14mutate, merge, or delete an Amplitude branch unless the user explicitly asks.
15
16At the start, establish:
17
18- the Amplitude project and environment;
19- whether the goal is lower ingestion volume, fewer taxonomy types, or both;
20- every repository or directory that may emit the project's data;
21- the requested audit mode and lookback window.
22
23## Source-code gate
24
25Source code is required. If the user has not identified every repository or
26directory that can emit into the project, ask for those locations before
27recommending deletion candidates. You may inventory taxonomy objects while
28waiting, but label the result incomplete and do not recommend or execute any
29deletion. Before lifting this gate, ask the user to confirm that the supplied
30source inventory covers every known emitter.
31Never report "no code reference" unless every user-identified source root was
32searched.
33
34Do not assume repository names, services, languages, project IDs, event names,
35observability systems, or filesystem layouts. Inspect each source root's local
36instructions before searching it.
37
38## Route the audit
39
40Choose a primary mode and state it before discovery. Run additional requested
41modes sequentially so each keeps its own criteria. Read
42[references/modes.md](references/modes.md) for each mode's criteria.
43
441. General stale events/properties
452. Cross-app overlap
463. Planned but never ingested
474. Global orphan properties
485. Dead generated-client definitions
496. Duplicate events/properties
507. Retired features, routes, flags, or experiments
518. High-volume, low-query instrumentation
529. Code still emitting deleted or blocked events
53
54If the user requests taxonomy changes, also read
55[references/mutations.md](references/mutations.md) before any mutation.
56
57## Non-negotiable evidence rules
58
59- Keep telemetry, query/dependency usage, code references, source ownership,
60 and taxonomy state as separate signals. No single signal proves deletion is
61 safe.
62- Audit every identified source root. Include generated clients, direct SDK
63 use, wrappers, dynamic dispatch, frontend, backend, mobile, jobs, and
64 integrations where present.
65- A generated definition is potential usage, not a production call site. Trace
66 its method or class through imports, wrappers, registries, aliases, tests,
67 and production callers.
68- A literal-search miss is insufficient. Check generic trackers, constructed
69 names or keys, dictionary spreads, serializers, constants, and
70 service-specific clients.
71- Determine whether each enclosing code path is reachable through imports,
72 route wiring, flags, experiments, jobs, tests, and callers. Distinguish dead
73 code from a live feature whose analytics call alone should be removed.
74- Recent ingestion with no owner in the known roots indicates an external or
75 unidentified source. Report it and ask for another likely source root before
76 recommending deletion.
77- Check charts, dashboards, cohorts, metrics, experiments, transformations,
78 derived properties, lookups, alerts, exports, and other relationships where
79 available. A zero saved-query count does not prove there is no dependency.
80 If a required dependency surface is unavailable, mark it unresolved and do
81 not recommend deletion.
82- When retirement or production activity matters, ask which monitoring,
83 feature-flag, experimentation, and deployment systems the user has connected.
84 Prefer their read-only MCP or app capabilities over assumptions or manual
85 screenshots.
86- Treat default/system objects and experiment, session-replay, or agent fields
87 cautiously unless the selected mode explicitly investigates them.
88- Do not expose credentials, property values, PII, customer payloads, or other
89 customer-sensitive data. Report aggregates, names only when necessary, and
90 access-controlled evidence links.
91
92## Public Amplitude MCP capabilities
93
94Inspect the connected public Amplitude MCP catalog at runtime and use only the
95capabilities, action values, parameters, and limits it advertises. Do not
96hard-code or invent tool names: public tools can be consolidated, renamed, or
97exposed differently during a rollout.
98
99Use the available capabilities to:
100
101- discover accessible projects and ask the user to select one when its ID is
102 missing; never infer an ID from a name;
103- read raw events and event properties, preferring the consolidated taxonomy
104 reader when the catalog exposes one;
105- include deleted objects when comparing states or historical ownership;
106- select exactly one branch identifier when auditing a tracking-plan branch;
107- distinguish project-wide/global properties from properties attached to one
108 event using the response's documented scope fields.
109
110For mutation capability selection and exact confirmation behavior, read
111[references/mutations.md](references/mutations.md).
112
113## Complete taxonomy reads
114
115For every exhaustive paginated read:
116
1171. Request the largest supported page size, up to 500.
1182. Follow every returned cursor until the response says there are no more
119 rows.
1203. Track unique rows using the response's stable identity plus property/event
121 scope, then compare the accumulated count with the API's reported total.
1224. Retry transient timeouts and gateway/server failures from the last known
123 cursor using bounded retries and backoff appropriate to the connected host.
124 Never treat an error payload or failed empty page as completion.
1255. If retries are exhausted or counts disagree, report incomplete coverage and
126 do not recommend deletions from the partial result.
127
128Use a complete tracking-plan export when available to reconstruct
129event-to-property ownership and compare main with a branch. A project-wide
130property listing exposes global definitions but may not enumerate every event
131attachment. Do not infer ownership from it alone, the export `Action` column,
132or branch UI counters; compare taxonomy states explicitly.
133
134## Shared audit workflow
135
1361. Snapshot the relevant main or branch taxonomy and telemetry window.
1372. Fully paginate required reads and record coverage against reported totals.
1383. Build ownership from complete exports, including active and deleted scopes.
1394. Search every identified source root; classify production, dynamic,
140 generated-only, test-only, dead, and unknown-external references.
1415. Check dependencies and resolve every code, ownership, and source signal.
1426. Classify candidates by confidence, evidence, uncertainty, and recommended
143 deletion transition.
1447. After any event deletion, always perform a global orphan-property sweep.
145 Present global property candidates separately and ask for separate explicit
146 confirmation; event deletion never authorizes or implies global deletion.
147
148Strong candidates normally have no reachable emitter, no recent ingestion,
149little or no query usage, no active owner or dependency, and no unresolved
150dynamic or external source. Existing telemetry, dependencies, generic names,
151required schemas, or unknown ownership require investigation, not deletion.
152
153For properties, report at least:
154
155```text
156property | scope/owners | code references by source | volume/query window | last seen | required | dependencies | confidence | recommendation
157```
158
159Also report source coverage, exclusions, unresolved paths, sensitive-data
160redactions, and a reviewable batch. Keep mutation batches within the user's
161requested limit; otherwise prefer a small first batch.