@inizioevoke/veeva-astroclm-core 1.1.3 → 1.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  ---
2
- name: analytics-auditor
2
+ name: evoke-analytics-auditor
3
3
  description: >
4
4
  Starts the Astro dev server, visits every page, clicks configurable CSS selectors,
5
5
  captures all browser console messages, and writes a deduplication report of unique
@@ -256,6 +256,31 @@ current page.
256
256
  7. Store all messages in `pageMessages` with the page route (e.g. `/home/`) as their
257
257
  source.
258
258
 
259
+ 8. **Flag ambiguous click data.** After collecting tracking events for the page, check
260
+ each event against these criteria and mark it ambiguous if **any** apply:
261
+
262
+ - **Missing or empty field** — `slide`, `type`, or `name` is absent, `null`, `""`,
263
+ or the literal string `"undefined"`.
264
+ - **Generic name** — `name` is a value like `"button"`, `"link"`, `"click"`,
265
+ `"undefined"`, or matches the pattern `/^(button|link|click|item|element|tab)\d*$/i`
266
+ with no further specificity.
267
+ - **Name equals type** — `name` and `type` have the same value (e.g.
268
+ `{ type: "button", name: "button" }`).
269
+ - **Duplicate (slide, name) pair on the same page** — the same `(slide, name)`
270
+ combination fires more than once from distinct elements on the same page, making
271
+ it impossible to distinguish which element the user clicked.
272
+ - **Slide mismatch** — the `slide` value in the event does not match the route of
273
+ the page it was captured on (e.g. `slide: "home"` on `/about/`).
274
+
275
+ For each ambiguous event store:
276
+ ```
277
+ {
278
+ page: string, // route where it was captured
279
+ event: { slide, type, name },
280
+ reasons: string[] // one entry per applicable criterion above
281
+ }
282
+ ```
283
+
259
284
  ---
260
285
 
261
286
  ### Step 4 — Parse, deduplicate, and structure the data
@@ -314,13 +339,20 @@ Everything else is a **Slide Event**.
314
339
  For global events, drop the `slide` dimension entirely — only `type` and `name` are needed.
315
340
  For slide events, retain `slide`, `type`, and `name`.
316
341
 
342
+ #### Deduplicate ambiguous events
343
+
344
+ Apply the same timestamp-stripping deduplication to the ambiguous events list. Two
345
+ ambiguous events are duplicates if their `(page, slide, type, name)` tuples are equal —
346
+ keep one entry but merge their `reasons` arrays (union, no duplicates).
347
+
317
348
  #### Tiers
318
349
 
319
- Organize into four tiers:
350
+ Organize into five tiers:
320
351
  1. **Tracking Events** — messages matching the `DEBUG: track` pattern (split into Global and Slide sub-sections, see Step 5)
321
- 2. **Errors** — `console.error`
322
- 3. **Warnings** — `console.warn`
323
- 4. **Info / Log** — `console.log`, `console.info`, `console.debug` (excluding tracking events)
352
+ 2. **Ambiguous Events** — tracking events that matched one or more ambiguity criteria in Step 3.8
353
+ 3. **Errors** — `console.error`
354
+ 4. **Warnings** — `console.warn`
355
+ 5. **Info / Log** — `console.log`, `console.info`, `console.debug` (excluding tracking events)
324
356
 
325
357
  ---
326
358
 
@@ -337,7 +369,7 @@ structure:
337
369
 
338
370
  **Date:** <today's date>
339
371
  **Pages audited:** /home/, /about/, /about/moa/
340
- **Total unique messages:** <N> tracking events (<G> global, <S> slide-specific), <E> errors, <W> warnings, <I> info/log
372
+ **Total unique messages:** <N> tracking events (<G> global, <S> slide-specific, <A> ambiguous), <E> errors, <W> warnings, <I> info/log
341
373
 
342
374
  > **Skipped (dynamic routes):** src/pages/[slug].astro, src/pages/[...path].astro
343
375
 
@@ -365,6 +397,15 @@ feature.
365
397
  |-------|------|------|
366
398
  | `home` | `button` | `button_important_safety_information` |
367
399
 
400
+ ## Ambiguous Events (<A>)
401
+
402
+ > These tracking events could not be unambiguously attributed to a specific element or
403
+ > action. Review and correct the tracking configuration for each one.
404
+
405
+ | Page | Slide | Type | Name | Reason(s) |
406
+ |------|-------|------|------|-----------|
407
+ | `/home/` | `home` | `button` | `button` | Generic name; Name equals type |
408
+
368
409
  ## Errors (<count>)
369
410
 
370
411
  | Message | Pages |
@@ -391,12 +432,41 @@ feature.
391
432
  Omit the "Skipped" blockquote if no dynamic routes were found. If a tier has zero
392
433
  messages, write `_None_` instead of a table. If there are no slide-specific events,
393
434
  write `_None_` under that sub-section. Omit the Global Events sub-section header note
394
- if there are no global events.
435
+ if there are no global events. If there are no ambiguous events, write `_None_` under
436
+ the Ambiguous Events section.
437
+
438
+ After writing the Markdown file, write a CSV file to the project root using the same
439
+ base name with the extension changed to `.csv` (e.g. `analytics-audit-report-20260616143022.csv`).
440
+
441
+ The CSV contains one row per unique tracking event (global and slide, excluding
442
+ ambiguous). Use this header and column rules:
443
+
444
+ ```
445
+ slide,type,name
446
+ ```
447
+
448
+ - **Global events** — set `slide` to `GLOBAL`. Use the event's own `type` and `name`.
449
+ - **Slide events** — set `slide` to the event's `slide` value. Use `type` and `name` as-is.
450
+
451
+ Output global events first (sorted by `type`, then `name`), followed by slide events
452
+ (sorted by `slide`, then `type`, then `name`).
453
+
454
+ If a field value contains a comma, double-quote, or newline, wrap it in double quotes
455
+ and escape any internal double quotes by doubling them (`"` → `""`).
456
+
457
+ Example:
458
+ ```csv
459
+ slide,type,name
460
+ GLOBAL,nav-button,nav-button_about_pbc
461
+ GLOBAL,nav-button,nav-button_home
462
+ home,button,button_important_safety_information
463
+ about,button,button_request_info
464
+ ```
395
465
 
396
- After writing the file, tell the user the full filename (e.g.
397
- `analytics-audit-report-20260616143022.md`) and give a brief summary (e.g. "Found 8
398
- tracking events (5 global, 3 slide-specific), 2 errors, 1 warning, 5 info messages
399
- across 3 pages").
466
+ After writing the file, tell the user both filenames and give a brief summary (e.g.
467
+ "Found 8 tracking events (5 global, 3 slide-specific, 2 ambiguous), 2 errors, 1
468
+ warning, 5 info messages across 3 pages"). If there are any ambiguous events, call them
469
+ out explicitly in the summary so the user knows action is needed.
400
470
 
401
471
  ---
402
472
 
@@ -1,5 +1,5 @@
1
1
  ---
2
- name: page-manager
2
+ name: evoke-page-manager
3
3
  description: >
4
4
  Scaffolds a new page in this Veeva Astro CLM project. Use this skill whenever the user asks to
5
5
  create a new page, add a page, scaffold a slide, generate a new route, or set up a new CLM slide —
@@ -1,5 +1,5 @@
1
1
  ---
2
- name: veeva-config-manager
2
+ name: evoke-veeva-config-manager
3
3
  description: >
4
4
  Manages Veeva CLM configuration for this project. Use this skill whenever the user asks to
5
5
  create, generate, or set up a Veeva config, initialize a veeva-config.ts, scaffold a new
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inizioevoke/veeva-astroclm-core",
3
- "version": "1.1.3",
3
+ "version": "1.1.5",
4
4
  "description": "",
5
5
  "license": "ISC",
6
6
  "author": "",