@uptimizr/agent-core 1.1.1 → 1.2.0

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.
Files changed (63) hide show
  1. package/AGENTS.md +221 -34
  2. package/README.md +57 -21
  3. package/dist/client.d.ts +22 -5
  4. package/dist/client.d.ts.map +1 -1
  5. package/dist/client.js +39 -10
  6. package/dist/client.js.map +1 -1
  7. package/dist/context.d.ts +93 -0
  8. package/dist/context.d.ts.map +1 -0
  9. package/dist/context.js +137 -0
  10. package/dist/context.js.map +1 -0
  11. package/dist/index.d.ts +10 -3
  12. package/dist/index.d.ts.map +1 -1
  13. package/dist/index.js +20 -2
  14. package/dist/index.js.map +1 -1
  15. package/dist/nonRegistryTools.d.ts +34 -0
  16. package/dist/nonRegistryTools.d.ts.map +1 -0
  17. package/dist/nonRegistryTools.js +70 -0
  18. package/dist/nonRegistryTools.js.map +1 -0
  19. package/dist/prompt.d.ts +33 -0
  20. package/dist/prompt.d.ts.map +1 -0
  21. package/dist/prompt.js +49 -0
  22. package/dist/prompt.js.map +1 -0
  23. package/dist/provider.d.ts +18 -0
  24. package/dist/provider.d.ts.map +1 -1
  25. package/dist/providers/anthropic.d.ts +18 -1
  26. package/dist/providers/anthropic.d.ts.map +1 -1
  27. package/dist/providers/anthropic.js +35 -3
  28. package/dist/providers/anthropic.js.map +1 -1
  29. package/dist/providers/openai.d.ts +14 -1
  30. package/dist/providers/openai.d.ts.map +1 -1
  31. package/dist/providers/openai.js +23 -1
  32. package/dist/providers/openai.js.map +1 -1
  33. package/dist/queryTool.d.ts +36 -0
  34. package/dist/queryTool.d.ts.map +1 -0
  35. package/dist/queryTool.js +123 -0
  36. package/dist/queryTool.js.map +1 -0
  37. package/dist/registryTools.d.ts +23 -1
  38. package/dist/registryTools.d.ts.map +1 -1
  39. package/dist/registryTools.js +185 -31
  40. package/dist/registryTools.js.map +1 -1
  41. package/dist/skills.d.ts +105 -0
  42. package/dist/skills.d.ts.map +1 -0
  43. package/dist/skills.generated.d.ts +44 -0
  44. package/dist/skills.generated.d.ts.map +1 -0
  45. package/dist/skills.generated.js +511 -0
  46. package/dist/skills.generated.js.map +1 -0
  47. package/dist/skills.js +144 -0
  48. package/dist/skills.js.map +1 -0
  49. package/dist/tools.d.ts +55 -8
  50. package/dist/tools.d.ts.map +1 -1
  51. package/dist/tools.js +41 -1
  52. package/dist/tools.js.map +1 -1
  53. package/dist/writeTools.d.ts +68 -0
  54. package/dist/writeTools.d.ts.map +1 -0
  55. package/dist/writeTools.js +256 -0
  56. package/dist/writeTools.js.map +1 -0
  57. package/llms.txt +148 -20
  58. package/package.json +7 -5
  59. package/skills/attention-hotspots/SKILL.md +88 -0
  60. package/skills/conversion-investigation/SKILL.md +97 -0
  61. package/skills/performance-regression-triage/SKILL.md +106 -0
  62. package/skills/weekly-scene-health/SKILL.md +105 -0
  63. package/skills/xr-comfort-audit/SKILL.md +95 -0
@@ -0,0 +1,105 @@
1
+ ---
2
+ name: weekly_scene_health
3
+ title: Weekly scene health
4
+ description: >-
5
+ A weekly health check for a scene (or the whole project): a weighted health score with every
6
+ factor traced back to the metric behind it, what changed against last week, traffic, event mix,
7
+ performance, and the most-interacted meshes. USE FOR: the recurring "how is the scene doing?"
8
+ review, a scheduled weekly or monthly report, a first look at a project you do not know yet,
9
+ deciding which scene to investigate next. Trigger phrases: weekly report, scene health, how is
10
+ my scene doing, what changed this week, health check, monthly review, status report.
11
+ tools:
12
+ - insight_scene_health
13
+ - insight_movers
14
+ - insight_baseline
15
+ - insight_significance
16
+ - insight_anomalies
17
+ - event_counts
18
+ - timeseries
19
+ - perf_summary
20
+ - top_meshes
21
+ - list_sessions
22
+ - query
23
+ capabilities:
24
+ - query
25
+ args:
26
+ - name: scene
27
+ required: false
28
+ description: Optional scene id to scope the analysis to (see the uptimizr://scenes resource).
29
+ - name: range
30
+ required: false
31
+ default: the last 7 days
32
+ description: The window to report on, in words — e.g. "the last 7 days", "June".
33
+ ---
34
+
35
+ Give me a weekly health report for {{scope}} covering {{range}}.
36
+
37
+ Work through the method below with the read-only tools it names, then summarise the findings.
38
+
39
+ 1. **Orient before you ask anything.** Read the `uptimizr://context` resource first: it gives the
40
+ real scene ids, region ids and custom-event names for this project, and tells you which metrics
41
+ are empty because their capture channel is off. Use its ids instead of inventing your own, and
42
+ never report a switched-off channel's zero as a finding.
43
+
44
+ 2. **Start from the score, not the numbers.** Call `insight_scene_health`{{#scene}} with
45
+ `scene="{{scene}}"`{{/scene}}: it scores each scene 0–100 over six weighted factors — perf
46
+ stability, jank, errors, dead clicks, coverage and XR abandonment — so you start from _which_
47
+ scene to look at. Open the lowest-scoring scene first, then the factor whose own score is
48
+ furthest below 50. Every factor names the `metric` behind it, its `raw` value and the project
49
+ `baseline` it was compared with, so the sentence you write is already in the row. 50 is the
50
+ project norm, not a pass mark, and a factor with `score: null` was not counted — its `note`
51
+ says why.
52
+
53
+ 3. **Find out what moved.** Call `insight_movers`{{#scene}} (`scene="{{scene}}"`){{/scene}}: it
54
+ compares every comparable metric with the previous equal window and ranks the changes by how
55
+ unusual each one is, so start from what actually moved instead of re-deriving it. Read
56
+ `direction` together with the sign of `delta` — a rise in a `down` metric (errors, dead clicks,
57
+ jank) is a regression — and do not report any row with `aboveMinSample: false`: its delta is
58
+ real arithmetic but not evidence.
59
+
60
+ 4. **Ask whether the new level is even unusual.** For each metric that moved, call
61
+ `insight_baseline` and compare the new value with `median` give or take a few `mad`, or with
62
+ the p10..p90 band. "Down 12 %" means nothing until you know the week-to-week spread.
63
+
64
+ 5. **Before calling any single change real, test it.** `insight_significance` reports the effect,
65
+ a 95 % interval and a p-value for one metric across the two windows. An interval that straddles
66
+ 0 means you cannot tell yet, whatever the p-value says, and `powerNote` states what this much
67
+ data could have detected at all.
68
+
69
+ 6. **Put a date on it.** Call `insight_anomalies` (`metric=perf_summary`, then `error_heatmap`{{#scene}},
70
+ `scene="{{scene}}"`{{/scene}}, `window=28`): it returns the individual days that were out of line
71
+ (`spike` / `drop`) and the day a level changed and stayed changed (`shift`), with `contributor`
72
+ naming the mesh, channel or source holding most of the excess. Quote the `bucketStart` and the
73
+ `contributor` rather than saying "recently".
74
+
75
+ 7. **Fill in the picture.** `event_counts` for the per-event-type mix{{#scene}} (`scene="{{scene}}"`){{/scene}};
76
+ `timeseries` (`interval` ≈ 86400 s) for day-by-day volume and the average-FPS trend;
77
+ `perf_summary` for avg/min/p50 FPS; `top_meshes` for the most-interacted meshes; `list_sessions`
78
+ for how many sessions were recorded.
79
+
80
+ 8. **Drill with the DSL, not with arithmetic.** When a canned tool does not expose the filter you
81
+ need, use the single `query` tool: pick the `metric`, bound it with `range`, and set
82
+ `compare: { range: <previous week> }` so the collector returns
83
+ `{ current, previous, delta, deltaPct }` already joined — never run two queries and subtract
84
+ them yourself. `dimensions` regroups a portable count (event, mesh, input-source and gesture
85
+ tallies) without a new tool. Ask for `format: "summary"` on anything long or spatial: it comes
86
+ back as a bounded digest with shares, a plain-language `reading`, and a `drillQuery` per row you
87
+ can send straight back. If a result is surprising or empty, re-send it with `explain: true` and
88
+ read the plan before you report the number.
89
+
90
+ ## What to report
91
+
92
+ - The score and the two or three factors that drag it down, each with the metric id behind it.
93
+ - What moved, by how much, and whether it is outside the baseline — with the date the anomaly
94
+ scan put on it.
95
+ - Traffic, event mix, FPS trend and the meshes people actually touch.
96
+
97
+ Always carry the caveats into the text rather than dropping them: a row below its minimum sample
98
+ (`aboveMinSample: false`), a metric whose capture channel the context document says is off, and any
99
+ `meta.truncated` or `caveats` entry on a result you quoted. Say "not enough data to tell" when that
100
+ is the honest answer.
101
+
102
+ End with 2–3 concrete recommendations — each naming the scene, the mesh or the day it applies to.
103
+ If an `annotate` tool is available, leave a dated note on the finding you want the next reader to
104
+ see, and if `save_analysis` is available, store the report so next week's run has something to
105
+ compare against. If a `pin_panel` tool is available, pin the panel behind the headline factor.
@@ -0,0 +1,95 @@
1
+ ---
2
+ name: xr_comfort_audit
3
+ title: XR comfort & drop-off audit
4
+ description: >-
5
+ Audit VR/AR comfort for a scene (or the whole project): rapid head rotation, locomotion style,
6
+ tracking quality, guardian/boundary contacts, input-source mix, and the short sessions that mean
7
+ someone took the headset off. USE FOR: motion-sickness complaints, immersive sessions that end
8
+ early, choosing a locomotion scheme, checking whether a play space is big enough. Trigger phrases:
9
+ XR comfort, VR motion sickness, why do people quit VR, headset drop-off, teleport vs smooth
10
+ locomotion, guardian boundary, hand tracking vs controllers.
11
+ tools:
12
+ - xr_rotation
13
+ - xr_locomotion
14
+ - xr_abandonment
15
+ - xr_sources
16
+ - xr_tracking_quality
17
+ - xr_boundary_contacts
18
+ - boundary_heatmap_stats
19
+ - insight_scene_health
20
+ - insight_movers
21
+ - query
22
+ capabilities:
23
+ - query
24
+ args:
25
+ - name: scene
26
+ required: false
27
+ description: Optional scene id to scope the audit to (see the uptimizr://scenes resource).
28
+ - name: range
29
+ required: false
30
+ default: the last 7 days
31
+ description: The window to audit, in words — e.g. "the last 7 days", "since the XR release".
32
+ ---
33
+
34
+ Audit XR/immersive comfort and drop-off for {{scope}} over {{range}}.
35
+
36
+ Work through the method below with the read-only tools it names{{#scene}}, all scoped with
37
+ `scene="{{scene}}"`{{/scene}}, and correlate the signals — no single one of them is a verdict.
38
+
39
+ 1. **Orient before you ask anything.** Read the `uptimizr://context` resource first. Every metric
40
+ below is gated on the **XR capture channel**: if the context document says it is off, these
41
+ tools return empty by design and the honest answer is "XR capture is not enabled here", not
42
+ "there is no comfort problem".
43
+
44
+ 2. **Rapid head rotation — the motion-sickness proxy.** `xr_rotation`{{#scene}} (`scene="{{scene}}"`){{/scene}}
45
+ gives the rate of fast head/view turns. High rates are a proxy, not a diagnosis: they can mean
46
+ discomfort-inducing camera work, or simply a scene that rewards looking around. Read it against
47
+ the next two signals before calling it.
48
+
49
+ 3. **Locomotion style and session span.** `xr_locomotion`{{#scene}} (`scene="{{scene}}"`){{/scene}}
50
+ gives the fly / navigate / teleport mix and how long each session lasted. Continuous (smooth)
51
+ locomotion paired with heavy rapid rotation is the classic uncomfortable combination; teleport
52
+ is the usual mitigation.
53
+
54
+ 4. **Did they take the headset off?** `xr_abandonment`{{#scene}} (`scene="{{scene}}"`){{/scene}}
55
+ finds immersive sessions that ended early. Early exits _plus_ one of the two signals above is
56
+ the finding; early exits on their own may just be a short demo.
57
+
58
+ 5. **Rule out the boring explanations first.** `xr_tracking_quality` catches tracking loss — an
59
+ exit caused by the headset losing its pose is not a comfort problem.
60
+ `xr_boundary_contacts` and `boundary_heatmap_stats` catch a play space that is too small or a
61
+ scene that pushes people into the guardian; that is a layout problem with a layout fix.
62
+
63
+ 6. **Who is playing.** `xr_sources`{{#scene}} (`scene="{{scene}}"`){{/scene}} gives the hand vs.
64
+ controller vs. gaze input split. Comfort conclusions differ by input source, and a shift in the
65
+ mix between two windows can move every other number without anything getting worse.
66
+
67
+ 7. **Put it in context.** `insight_scene_health` scores XR abandonment as one of its six weighted
68
+ factors, so it tells you whether this scene is unusual _for this project_;
69
+ `insight_movers`{{#scene}} (`scene="{{scene}}"`){{/scene}} tells you whether the comfort signals
70
+ moved against the previous equal window. Drop any row with `aboveMinSample: false`.
71
+
72
+ 8. **Cut it further with the DSL.** The single `query` tool takes a `metric`, a `range`, that
73
+ metric's filters, `dimensions` to regroup a portable count, and `compare: { range: <previous
74
+ window> }` for `{ current, previous, delta, deltaPct }` already joined. `format: "summary"`
75
+ returns a bounded digest with a plain-language `reading`; `explain: true` returns the plan
76
+ instead of the rows and names every reason the answer might mislead — worth one call before
77
+ reporting a zero on a channel-gated metric.
78
+
79
+ ## What to report
80
+
81
+ - The uncomfortable patterns you can actually evidence: heavy rapid rotation or continuous
82
+ locomotion paired with early exits, named per scene and per input source.
83
+ - The alternatives you ruled out: tracking loss, boundary contacts, a short-by-design experience.
84
+ - Comfort mitigations: teleport or snap-turn options, vignetting during movement, slower or
85
+ user-controlled camera motion, a larger required play space, or moving interactive content
86
+ inside the guardian.
87
+
88
+ Carry the caveats: XR sessions are a small fraction of most projects' traffic, so say the session
89
+ count next to every rate; the rotation and locomotion metrics are sampled (ADR 0012); and a metric
90
+ whose channel is off is not a zero. Never turn one uncomfortable session into a trend.
91
+
92
+ End with 2–3 concrete comfort changes, each tied to the scene and the locomotion or input mode it
93
+ applies to. If an `annotate` tool is available, leave a note on the scene so the next audit can see
94
+ what was tried; `save_analysis` keeps the before-picture to compare the fix against. If a
95
+ `pin_panel` tool is available, pin the locomotion-comfort panel.