You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat: add ui-watchtower-setup and ui-watchtower-integration skills - #43
Adds two skills for @absaoss-cps/ngx-ui-watchtower, a telemetry library for Angular apps that sends user-journey scenarios and BI events to AWS CloudWatch RUM.
The work is split in two because the jobs differ: wiring the library is done once per app, while instrumenting journeys is repeated as the app grows.
ui-watchtower-setup installs and wires the library in an existing Angular app:
one destination chosen by the app's role: standalone app sending to RUM, micro-frontend shell, fragment, or no-op until RUM is ready;
the RUM credentials provider, an optional log provider, the user id on sign-in and sign-out, and the typed names file;
migration of an existing hand-written RumService.
It proves the wiring with one working, tested scenario (route-navigation tracking) and RUM page views under route templates, then hands over to the integration skill.
ui-watchtower-integration adds scenarios and BI events to an app that is already wired. It starts from the team's own questions: it asks what they want to learn, scans the code, and proposes a plan in which each item is marked as asked for (you) or suggested. It implements only what is confirmed, and tests every outcome. It can be re-run; each pass adds to what already exists.
The two skills point to each other in their NOT for: descriptions, so each one triggers only for its own job.
Key Changes
skills/ui-watchtower-setup/:
SKILL.md, a 9-step workflow;
references for micro-frontends and RUM migration;
templates for the names file, credentials provider, log provider and route-navigation service, plus specs for the last two;
9 evals, 12 trigger queries, test projects.
skills/ui-watchtower-integration/:
SKILL.md, an 8-step workflow;
instrumentation-patterns reference;
6 evals, 12 trigger queries, test projects.
skills/shared/references/ngx-ui-watchtower-api.md: the library's public API, used by both skills. Where the installed version's typings differ from the reference, the typings win. The shared skill's description is now generic.
No hardcoded versions. Setup reads the library's supported Angular range from npm at run time and installs the latest release, or the newest compatible older one (prereleases skipped). When the app's Angular is newer than the library supports, it stops; it never forces the install with --force or --legacy-peer-deps.
Route-navigation template:
records each navigation when it ends, backdated to the click, so route is always the final matched template (/customers/:id), even after redirectTo, lazy routes, and guard or resolver redirects (redirectedFrom keeps the source template);
records a navigation with no end event within 30 seconds once, as timeout;
guard rejection is incomplete, supersession is abandoned, an error is failure.
No URL or personal data reaches telemetry:
navigation errors are reduced to a class-like name and an HTTP status;
unmatched URLs are recorded as (unrecognized);
RUM page views are recorded under the route template, with automatic page views turned off;
the integration skill's safeHttpFailure keeps only an HTTP status or a class-like error name, because error messages can quote URLs, ids or user data and the library only strips query strings.
Credentials provider: validates every required field of the broker's answer, rejects expired credentials, and passes the broker's other app-monitor settings through when correctly typed. Anything incomplete turns RUM off for the session (null).
RUM migration:
the cutover order guarantees the old and new RUM clients never run together;
the inventory table records exactly one parity tool per call site;
live privacy leaks in the old integration (raw search text, emails as user ids, URLs with query strings as page ids) are fixed immediately, even while the migration waits on a credentials broker.
No-op destination: the hand-over lists what switching to RUM later takes: aws-rum-web and the shimmer allowance, the RUM sink with the credentials provider, and the page-view recorder. Without the recorder, RUM records no page views.
Integration skill RxJS rule: nothing downstream of traceScenario may stop after the first value: no take(1)/first() after it, and no firstValueFrom() on it, because those record abandoned. Verified against the library.
Docs: docs/guides/ui-watchtower-setup.md and docs/guides/ui-watchtower-integration.md (both install the shared companion), plus catalog rows in README.md and docs/README.md.
CONTRIBUTING.md: the checklist's validation command is now uvx --from skills-ref agentskills validate.
Validation
agentskills validate passes for ui-watchtower-setup, ui-watchtower-integration and shared.
The two spec templates in skills/ui-watchtower-setup/assets/ (route-navigation-telemetry.service.spec.ts, rum-credentials.provider.spec.ts) pass in a real Angular 22 app with the latest published package, together with tsc -p for the app and spec tsconfigs and the SSR build. Each behaviour was checked with a planted bug that its test caught. The RUM test projects (wired-angular, wired-instrumented-angular) contain the assets byte for byte.
Every file listed in both evals.json files exists, and no file in evals/files is unlisted.
Trigger evals, run with the other skill installed as a competitor: setup 12/12, integration 12/12 (3 runs per query). No query for one skill triggered the other.
Skill evals: every eval was run 3 times with the skill and 3 times without, and each run was graded strictly against the expectations in evals.json, with evidence (file and line) for every verdict. The runs could not install, build or test, so a pass means the files and the report satisfy the expectation.
Skill / eval
Expectations
With skill (3 runs)
Without skill (mean)
setup / standalone app
13
13/13 · 13/13 · 13/13
31%
setup / SSR shell hosting fragments
7
7/7 · 7/7 · 7/7
43%
setup / fragment
6
6/6 · 6/6 · 6/6
56%
setup / RUM not ready (noop)
7
7/7 · 7/7 · 7/7
52%
setup / partly wired app
6
6/6 · 6/6 · 6/6
50%
setup / existing RumService migration
8
8/8 · 8/8 · 8/8
25%
setup / no barrel re-export of /rum
3
3/3 · 3/3 · 3/3
67%
setup / unsupported Angular version
6
6/6 · 6/6 · 6/6
50%
setup / non-Angular app
3
3/3 · 3/3 · 3/3
67%
integration / vague request asks first
7
7/7 · 7/7 · 7/7
33%
integration / user-supplied requirements
6
6/6 · 6/6 · 6/6
33%
integration / conflicting request
5
5/5 · 5/5 · 5/5
47%
integration / settle status and RxJS
7
7/7 · 7/7 · 7/7
62%
integration / re-run adds only
7
7/7 · 7/7 · 7/7
67%
integration / missing precondition
3
3/3 · 3/3 · 3/3
0%
Averaged over the evals: setup 100% with the skill vs 49% without; integration 100% vs 40%.
Without the skill, agents typically skipped the route-navigation proof and tests, added journeys nobody asked for, didn't ask what the team wants to learn or label proposals by source, and with an unsupported Angular version stopped on the wrong ground (npm 404 on a guessed package name) instead of the library's peer range.
This observable example only constructs the pipeline and then discards it; because RxJS observables are lazy, no request runs and the scenario is never settled as shown. Make the example return the traced observable from a method or subscribe to it so it demonstrates an actually executable integration.
Use the detected package manager for both installs
skills/ui-watchtower-setup/SKILL.md:115
Step 1 says to use the detected package manager for every install, but the only commands shown here are npm install. An agent following this section for a Yarn or pnpm project can create a second lockfile and bypass the repository's package-manager workflow. Show the equivalent command for the detected manager (or use an explicit package-manager placeholder) for both installs.
🧠 Review effort: Lite
Give feedback about Copilot approvals in this survey to enter a drawing for a $150 gift card.
The backdating assertion advances a real wall clock by 60 ms and accepts any result above 50 ms. This makes the test depend on timing/scheduler behavior and adds avoidable delay; use a fake/injected clock and advance it deterministically (also for the identical test at line 275).
Use a fake clock for deterministic backdating assertions
The backdating assertion advances a real wall clock by 60 ms and accepts any result above 50 ms. This makes the test depend on timing/scheduler behavior and adds avoidable delay; use a fake/injected clock and advance it deterministically (also for the identical test at line 275).
Preserve all supported app-monitor configuration fields
The broker response is described as the app-monitor config, but this reconstruction drops every supported optional field except sessionSampleRate (for example telemetries, sessionEventLimit, allowCookies, sessionAttributes, or pagesToInclude). A valid broker response using any of those settings will silently run with different RUM behavior; the migration guide also relies on carrying session attributes through this config. Preserve the validated optional config fields while still forcing disableAutoPageView: true, or explicitly validate/map the complete contract.
Correct route-navigation test count in validation summary
The PR description reports this route-navigation spec as both 19 cases (Overview) and 11 cases (Validation), but the current spec contains 20 it(...) cases. Please correct the validation summary so the claimed test coverage matches the committed fixture.
🧠 Review effort: Lite
Give feedback about Copilot approvals in this survey to enter a drawing for a $150 gift card.
fateeand
changed the title
feat: Add skills: ngx-ui-watchtower setup and integration
feat: add ui-watchtower-setup and ui-watchtower-integration skills
Oct 8, 2026
What: This regression test uses a real setTimeout yield to wait for the slow guard. Why: The test can race with router scheduling and becomes timing-dependent under slower or parallel CI, despite the surrounding suite using fake clocks. How to fix: Add an explicit promise/barrier that the guard resolves when entered, await that barrier, then start the superseding navigation instead of sleeping.
🧠 Review effort: Lite
Give feedback about Copilot approvals in this survey to enter a drawing for a $150 gift card.
A navigation that is superseded before RoutesRecognized is silently dropped here, so it never emits the abandoned outcome promised by the workflow (and the test only covers the already-recognized case). Record it under UNRECOGNIZED_ROUTE when no template is available; that preserves the no-URL guarantee while retaining the supersession signal.
This example constructs the traced observable but never subscribes to it or returns it. As written, HttpClient is not invoked and the scenario will neither emit nor settle, so an agent copying this shape can silently add no telemetry. Add a subscription/return (for example, return the observable to a caller that subscribes) and make that execution requirement explicit.
Preserve pre-recognition supersession as abandoned
A navigation that is superseded before RoutesRecognized is silently dropped here, so it never emits the abandoned outcome promised by the workflow (and the test only covers the already-recognized case). Record it under UNRECOGNIZED_ROUTE when no template is available; that preserves the no-URL guarantee while retaining the supersession signal.
🧠 Review effort: Lite
Give feedback about Copilot approvals in this survey to enter a drawing for a $150 gift card.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
Adds two skills for
@absaoss-cps/ngx-ui-watchtower, a telemetry library for Angular apps that sends user-journey scenarios and BI events to AWS CloudWatch RUM.The work is split in two because the jobs differ: wiring the library is done once per app, while instrumenting journeys is repeated as the app grows.
ui-watchtower-setupinstalls and wires the library in an existing Angular app:RumService.It proves the wiring with one working, tested scenario (route-navigation tracking) and RUM page views under route templates, then hands over to the integration skill.
ui-watchtower-integrationadds scenarios and BI events to an app that is already wired. It starts from the team's own questions: it asks what they want to learn, scans the code, and proposes a plan in which each item is marked as asked for (you) or suggested. It implements only what is confirmed, and tests every outcome. It can be re-run; each pass adds to what already exists.The two skills point to each other in their
NOT for:descriptions, so each one triggers only for its own job.Key Changes
skills/ui-watchtower-setup/:SKILL.md, a 9-step workflow;skills/ui-watchtower-integration/:SKILL.md, an 8-step workflow;skills/shared/references/ngx-ui-watchtower-api.md: the library's public API, used by both skills. Where the installed version's typings differ from the reference, the typings win. Thesharedskill's description is now generic.--forceor--legacy-peer-deps.routeis always the final matched template (/customers/:id), even afterredirectTo, lazy routes, and guard or resolver redirects (redirectedFromkeeps the source template);timeout;incomplete, supersession isabandoned, an error isfailure.(unrecognized);safeHttpFailurekeeps only an HTTP status or a class-like error name, because error messages can quote URLs, ids or user data and the library only strips query strings.null).aws-rum-weband theshimmerallowance, the RUM sink with the credentials provider, and the page-view recorder. Without the recorder, RUM records no page views.traceScenariomay stop after the first value: notake(1)/first()after it, and nofirstValueFrom()on it, because those recordabandoned. Verified against the library.docs/guides/ui-watchtower-setup.mdanddocs/guides/ui-watchtower-integration.md(both install thesharedcompanion), plus catalog rows inREADME.mdanddocs/README.md.CONTRIBUTING.md: the checklist's validation command is nowuvx --from skills-ref agentskills validate.Validation
agentskills validatepasses forui-watchtower-setup,ui-watchtower-integrationandshared.The two spec templates in
skills/ui-watchtower-setup/assets/(route-navigation-telemetry.service.spec.ts,rum-credentials.provider.spec.ts) pass in a real Angular 22 app with the latest published package, together withtsc -pfor the app and spec tsconfigs and the SSR build. Each behaviour was checked with a planted bug that its test caught. The RUM test projects (wired-angular,wired-instrumented-angular) contain the assets byte for byte.Every file listed in both
evals.jsonfiles exists, and no file inevals/filesis unlisted.Trigger evals, run with the other skill installed as a competitor: setup 12/12, integration 12/12 (3 runs per query). No query for one skill triggered the other.
Skill evals: every eval was run 3 times with the skill and 3 times without, and each run was graded strictly against the expectations in
evals.json, with evidence (file and line) for every verdict. The runs could not install, build or test, so a pass means the files and the report satisfy the expectation./rumAveraged over the evals: setup 100% with the skill vs 49% without; integration 100% vs 40%.
Without the skill, agents typically skipped the route-navigation proof and tests, added journeys nobody asked for, didn't ask what the team wants to learn or label proposals by source, and with an unsupported Angular version stopped on the wrong ground (npm 404 on a guessed package name) instead of the library's peer range.
Related
Closes #42