Skip to content

feat: add ui-watchtower-setup and ui-watchtower-integration skills - #43

Open
fateeand wants to merge 33 commits into
masterfrom
42-add-skills---ngx-ui-watchtower-setup-and-integration
Open

fateeand wants to merge 33 commits into
masterfrom
42-add-skills---ngx-ui-watchtower-setup-and-integration

Conversation

@fateeand

@fateeand fateeand commented Oct 8, 2026 •

Copy link
Copy Markdown
Collaborator

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-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 with the app's name prefix;
    • turning telemetry off in some environments, with one switch;
    • 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;
    • 10 evals, 13 trigger queries, test projects.
  • skills/ui-watchtower-integration/:
    • SKILL.md, an 8-step workflow;
    • instrumentation-patterns reference;
    • 8 evals, 13 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.
  • Naming convention.
    • Format: every name is kebab-case, like the library's own values (scenario-start, scenario-end, outcome reasons).
    • Patterns: scenarios <prefix>-<thing>-<action> (route navigation is <prefix>-route-navigate), BI events <prefix>-<thing>-<past-tense verb>, loggers <prefix>-<area>, and steps and aggregates with no prefix.
    • The prefix: setup asks for it and suggests the application name; integration reuses the prefix already in use.
  • Telemetry off per environment: withTelemetryEnabled(...) (0.2.0+) is one switch that leaves every provider in place, so wiring is identical everywhere. It's never done by leaving providers out or swapping in 'noop'. Tests keep telemetry on; the switch itself is the library's and is tested there.
  • Micro-frontends.
    • Fragments: they must use the shell's eventNamespace (asked for when the shell isn't in the repo) and the same telemetry switch.
    • The shell: it hands fragments a contract that states its namespace.
    • Channel and origin: each page load gets its own channel, published on window, and forwarding works only between same-origin realms.
  • BI events:
    • always recorded under {ns}.bi, without the per-event eventType override;
    • they carry sessionId and userId, like scenario records;
    • to keep an exact legacy type, RUM migration uses the raw sink.record.
  • 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, and the cutover plan names disableAutoPageView: true together with the page-view recorder;
    • 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 rules:
    • No wrapper: use UwtScenarioTelemetryService and UwtBITelemetryService directly where the telemetry is needed. Never merge them behind an app telemetry service or facade.
    • RxJS: nothing downstream of traceScenario may stop after the first value. That means no take(1) or first() after it, and no firstValueFrom() on it, because those record abandoned. Verified against the library.
    • Re-runs add only: existing specs stay untouched, setup included, and new tests go in their own describe.
    • Tested outcomes only: every outcome the proposal claims has a test. timeout is never claimed, because it's the library's safety net for a missed settle.
  • 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.

  • Every file listed in both evals.json files exists, and no file in evals/files is unlisted.

  • Template type-check: the setup templates, including the route-navigation spec, and the three integration test projects type-check with 0 errors in an Angular 21.0 project against the library built from its current source. Using a name the schema doesn't declare, such as a snake_case one, fails to compile.

  • Templates in a real app (earlier run, before the naming change):

    • The two spec templates in skills/ui-watchtower-setup/assets/ (route-navigation-telemetry.service.spec.ts, rum-credentials.provider.spec.ts) passed 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 integration test projects contain the route-navigation template unchanged except for the scenario name, adapted to each app's prefix.
  • Trigger evals: 13 queries per skill, 3 runs each, run with the other skill installed as a competitor. Both skills scored 13/13: every should-trigger query triggered 3/3 and every should-not query 0/3. No query for one skill triggered the other.

  • Skill evals: all 18 evals were run 3 times with the skill and 3 times without.

    • 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 14 14 · 14 · 14 33%
    setup / SSR shell hosting fragments 7 7 · 7 · 7 71%
    setup / fragment 7 7 · 7 · 7 71%
    setup / RUM not ready (noop) 7 7 · 7 · 7 57%
    setup / telemetry off in dev 7 7 · 7 · 7 57%
    setup / partly wired app 6 6 · 6 · 6 50%
    setup / existing RumService migration 8 8 · 8 · 8 13%
    setup / no barrel re-export of /rum 3 3 · 3 · 3 78%
    setup / unsupported Angular version 6 6 · 6 · 6 83%
    setup / non-Angular app 3 3 · 3 · 3 100%
    integration / vague request asks first 7 7 · 7 · 7 57%
    integration / user-supplied requirements 6 6 · 6 · 6 44%
    integration / conflicting request 5 5 · 5 · 5 93%
    integration / settle status and RxJS 7 7 · 7 · 7 57%
    integration / re-run adds only 7 7 · 7 · 7 71%
    integration / missing precondition 3 3 · 3 · 3 44%
    integration / no merged telemetry wrapper 6 6 · 6 · 6 33%
    integration / user list still gets code research 6 6 · 6 · 6 17%

    Totals:

    • setup: 100% with the skill (204/204) vs 54% without (111/204);
    • integration: 100% (141/141) vs 52% (74/141).

    Without the skill, agents typically:

    • left the RUM migration mostly undone;
    • used snake_case or unprefixed BI names;
    • didn't label proposal items by source;
    • settled an empty result as success, and passed the raw HttpErrorResponse (which quotes the URL) to fail();
    • tested through a noop sink instead of a recording one;
    • with setup missing, built their own performance.measure timing instead of stopping and pointing to setup.

Closes #42

@fateeand fateeand linked an issue Oct 8, 2026 that may be closed by this pull request
@fateeand fateeand changed the title Add skills: ngx-ui-watchtower setup and integration feat: Add skills: ngx-ui-watchtower setup and integration Oct 8, 2026
@fateeand
fateeand requested a balanced review from Copilot October 8, 2026 11:52

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Redirect attribution, malformed credential handling, and resolved-path telemetry expose correctness and privacy risks.

6 open findings
What changed in this PR

Adds setup and integration skills for adopting and extending ngx-ui-watchtower telemetry in Angular applications.

Changes:

  • Adds setup/integration workflows, templates, references, and documentation.
  • Adds eval suites covering application roles, migrations, instrumentation, and unsupported configurations.
  • Adds a shared API reference and updates catalogs and contribution validation.
File Description
skills/​ui-watchtower-setup/​SKILL.md Setup workflow and guidance.
skills/​ui-watchtower-setup/​assets/​log-api.provider.ts Log provider template.
skills/​ui-watchtower-setup/​assets/​route-navigation-telemetry.service.ts Route telemetry template.
skills/​ui-watchtower-setup/​assets/​rum-credentials.provider.ts RUM credentials template.
skills/​ui-watchtower-setup/​assets/​telemetry.schema.ts Typed telemetry vocabulary.
skills/​ui-watchtower-setup/​references/​micro-frontends.md Shell/fragment guidance.
skills/​ui-watchtower-setup/​references/​rum-migration.md Existing RUM migration guidance.
skills/​ui-watchtower-setup/​evals/​evals.json Setup behavioral evals.
skills/​ui-watchtower-setup/​evals/​trigger-eval.json Setup trigger evals.
skills/​ui-watchtower-setup/​evals/​files/​standalone-angular/​angular.json Standalone eval configuration.
skills/​ui-watchtower-setup/​evals/​files/​standalone-angular/​package.json Standalone eval dependencies.
skills/​ui-watchtower-setup/​evals/​files/​standalone-angular/​tsconfig.json Standalone TypeScript configuration.
skills/​ui-watchtower-setup/​evals/​files/​standalone-angular/​tsconfig.app.json Standalone app compilation.
skills/​ui-watchtower-setup/​evals/​files/​standalone-angular/​tsconfig.spec.json Standalone test compilation.
skills/​ui-watchtower-setup/​evals/​files/​standalone-angular/​src/​index.html Standalone HTML fixture.
skills/​ui-watchtower-setup/​evals/​files/​standalone-angular/​src/​styles.css Standalone styles fixture.
skills/​ui-watchtower-setup/​evals/​files/​standalone-angular/​src/​main.ts Standalone bootstrap fixture.
skills/​ui-watchtower-setup/​evals/​files/​standalone-angular/​src/​app/​app.config.ts Standalone app providers.
skills/​ui-watchtower-setup/​evals/​files/​standalone-angular/​src/​app/​app.routes.ts Standalone routes.
skills/​ui-watchtower-setup/​evals/​files/​standalone-angular/​src/​app/​app.ts Standalone root component.
skills/​ui-watchtower-setup/​evals/​files/​standalone-angular/​src/​app/​app.spec.ts Standalone component test.
skills/​ui-watchtower-setup/​evals/​files/​standalone-angular/​src/​app/​customers/​customers.ts Customer-list fixture.
skills/​ui-watchtower-setup/​evals/​files/​standalone-angular/​src/​app/​customers/​customer-detail.ts Customer-detail fixture.
skills/​ui-watchtower-setup/​evals/​files/​partially-wired-angular/​angular.json Partial-wiring eval configuration.
skills/​ui-watchtower-setup/​evals/​files/​partially-wired-angular/​package.json Partial-wiring dependencies.
skills/​ui-watchtower-setup/​evals/​files/​partially-wired-angular/​tsconfig.json Partial-wiring TypeScript configuration.
skills/​ui-watchtower-setup/​evals/​files/​partially-wired-angular/​tsconfig.app.json Partial-wiring app compilation.
skills/​ui-watchtower-setup/​evals/​files/​partially-wired-angular/​tsconfig.spec.json Partial-wiring test compilation.
skills/​ui-watchtower-setup/​evals/​files/​partially-wired-angular/​src/​index.html Partial-wiring HTML fixture.
skills/​ui-watchtower-setup/​evals/​files/​partially-wired-angular/​src/​styles.css Partial-wiring styles fixture.
skills/​ui-watchtower-setup/​evals/​files/​partially-wired-angular/​src/​main.ts Partial-wiring bootstrap.
skills/​ui-watchtower-setup/​evals/​files/​partially-wired-angular/​src/​app/​app.config.ts Incomplete telemetry providers.
skills/​ui-watchtower-setup/​evals/​files/​partially-wired-angular/​src/​app/​app.routes.ts Partial-wiring routes.
skills/​ui-watchtower-setup/​evals/​files/​partially-wired-angular/​src/​app/​app.ts Partial-wiring root component.
skills/​ui-watchtower-setup/​evals/​files/​partially-wired-angular/​src/​app/​app.spec.ts Partial-wiring component test.
skills/​ui-watchtower-setup/​evals/​files/​partially-wired-angular/​src/​app/​customers/​customers.ts Customer-list fixture.
skills/​ui-watchtower-setup/​evals/​files/​partially-wired-angular/​src/​app/​customers/​customer-detail.ts Customer-detail fixture.
skills/​ui-watchtower-setup/​evals/​files/​future-angular/​angular.json Unsupported-version eval configuration.
skills/​ui-watchtower-setup/​evals/​files/​future-angular/​package.json Future Angular dependencies.
skills/​ui-watchtower-setup/​evals/​files/​future-angular/​tsconfig.json Future Angular TypeScript configuration.
skills/​ui-watchtower-setup/​evals/​files/​future-angular/​tsconfig.app.json Future Angular app compilation.
skills/​ui-watchtower-setup/​evals/​files/​future-angular/​tsconfig.spec.json Future Angular test compilation.
skills/​ui-watchtower-setup/​evals/​files/​future-angular/​src/​index.html Future Angular HTML fixture.
skills/​ui-watchtower-setup/​evals/​files/​future-angular/​src/​styles.css Future Angular styles fixture.
skills/​ui-watchtower-setup/​evals/​files/​future-angular/​src/​main.ts Future Angular bootstrap.
skills/​ui-watchtower-setup/​evals/​files/​future-angular/​src/​app/​app.config.ts Future Angular app providers.
skills/​ui-watchtower-setup/​evals/​files/​future-angular/​src/​app/​app.routes.ts Future Angular routes.
skills/​ui-watchtower-setup/​evals/​files/​future-angular/​src/​app/​app.ts Future Angular root component.
skills/​ui-watchtower-setup/​evals/​files/​future-angular/​src/​app/​app.spec.ts Future Angular component test.
skills/​ui-watchtower-setup/​evals/​files/​future-angular/​src/​app/​customers/​customers.ts Customer-list fixture.
skills/​ui-watchtower-setup/​evals/​files/​future-angular/​src/​app/​customers/​customer-detail.ts Customer-detail fixture.
skills/​ui-watchtower-setup/​evals/​files/​ssr-shell/​README.md SSR shell context.
skills/​ui-watchtower-setup/​evals/​files/​ssr-shell/​package.json SSR shell dependencies.
skills/​ui-watchtower-setup/​evals/​files/​ssr-shell/​src/​app/​app.config.ts Shared SSR shell providers.
skills/​ui-watchtower-setup/​evals/​files/​ssr-shell/​src/​app/​app.config.server.ts Server-specific providers.
skills/​ui-watchtower-setup/​evals/​files/​ssr-shell/​src/​app/​app.routes.ts Shell routes.
skills/​ui-watchtower-setup/​evals/​files/​ssr-shell/​src/​app/​app.routes.server.ts Server render routes.
skills/​ui-watchtower-setup/​evals/​files/​ssr-shell/​src/​app/​app.ts Fragment-hosting shell component.
skills/​ui-watchtower-setup/​evals/​files/​react-app/​package.json Non-Angular eval dependencies.
skills/​ui-watchtower-setup/​evals/​files/​react-app/​src/​main.tsx React negative fixture.
skills/​ui-watchtower-setup/​evals/​files/​ngmodule-existing-rum/​package.json Existing-RUM eval dependencies.
skills/​ui-watchtower-setup/​evals/​files/​ngmodule-existing-rum/​src/​app/​app-routing.module.ts NgModule routing fixture.
skills/​ui-watchtower-setup/​evals/​files/​ngmodule-existing-rum/​src/​app/​app.component.ts NgModule root component.
skills/​ui-watchtower-setup/​evals/​files/​ngmodule-existing-rum/​src/​app/​app.module.ts Existing RUM initialization.
skills/​ui-watchtower-setup/​evals/​files/​ngmodule-existing-rum/​src/​app/​search/​search.component.ts Per-keystroke telemetry fixture.
skills/​ui-watchtower-setup/​evals/​files/​ngmodule-existing-rum/​src/​app/​services/​rum.service.ts Hand-written RUM service.
skills/​ui-watchtower-setup/​evals/​files/​fragment/​README.md Fragment context.
skills/​ui-watchtower-setup/​evals/​files/​fragment/​package.json Fragment dependencies.
skills/​ui-watchtower-setup/​evals/​files/​fragment/​src/​app/​app.config.ts Fragment provider fixture.
skills/​ui-watchtower-setup/​evals/​files/​fragment/​src/​app/​app.routes.ts Fragment routes.
skills/​ui-watchtower-integration/​SKILL.md Integration workflow and guidance.
skills/​ui-watchtower-integration/​references/​instrumentation-patterns.md Instrumentation implementation patterns.
skills/​ui-watchtower-integration/​evals/​evals.json Integration behavioral evals.
skills/​ui-watchtower-integration/​evals/​trigger-eval.json Integration trigger evals.
skills/​ui-watchtower-integration/​evals/​files/​wired-angular/​angular.json Wired-app eval configuration.
skills/​ui-watchtower-integration/​evals/​files/​wired-angular/​package.json Wired-app dependencies.
skills/​ui-watchtower-integration/​evals/​files/​wired-angular/​tsconfig.json Wired-app TypeScript configuration.
skills/​ui-watchtower-integration/​evals/​files/​wired-angular/​tsconfig.app.json Wired-app compilation.
skills/​ui-watchtower-integration/​evals/​files/​wired-angular/​tsconfig.spec.json Wired-app test compilation.
skills/​ui-watchtower-integration/​evals/​files/​wired-angular/​src/​index.html Wired-app HTML fixture.
skills/​ui-watchtower-integration/​evals/​files/​wired-angular/​src/​styles.css Wired-app styles fixture.
skills/​ui-watchtower-integration/​evals/​files/​wired-angular/​src/​main.ts Wired-app bootstrap.
skills/​ui-watchtower-integration/​evals/​files/​wired-angular/​src/​app/​app.config.ts Completed RUM providers.
skills/​ui-watchtower-integration/​evals/​files/​wired-angular/​src/​app/​app.routes.ts Wired-app routes.
skills/​ui-watchtower-integration/​evals/​files/​wired-angular/​src/​app/​app.ts Route telemetry startup.
skills/​ui-watchtower-integration/​evals/​files/​wired-angular/​src/​app/​app.spec.ts Root telemetry provider test.
skills/​ui-watchtower-integration/​evals/​files/​wired-angular/​src/​app/​customers/​customers.ts Uninstrumented customer screen.
skills/​ui-watchtower-integration/​evals/​files/​wired-angular/​src/​app/​customers/​customer-detail.ts Customer-detail fixture.
skills/​ui-watchtower-integration/​evals/​files/​wired-angular/​src/​app/​telemetry/​telemetry.schema.ts Existing telemetry vocabulary.
skills/​ui-watchtower-integration/​evals/​files/​wired-angular/​src/​app/​telemetry/​rum-credentials.provider.ts Existing credentials provider.
skills/​ui-watchtower-integration/​evals/​files/​wired-angular/​src/​app/​telemetry/​route-navigation-telemetry.service.ts Existing route instrumentation.
skills/​ui-watchtower-integration/​evals/​files/​wired-angular/​src/​app/​telemetry/​route-navigation-telemetry.service.spec.ts Route instrumentation tests.
skills/​ui-watchtower-integration/​evals/​files/​wired-instrumented-angular/​angular.json Re-run eval configuration.
skills/​ui-watchtower-integration/​evals/​files/​wired-instrumented-angular/​package.json Re-run eval dependencies.
skills/​ui-watchtower-integration/​evals/​files/​wired-instrumented-angular/​tsconfig.json Re-run TypeScript configuration.
skills/​ui-watchtower-integration/​evals/​files/​wired-instrumented-angular/​tsconfig.app.json Re-run app compilation.
skills/​ui-watchtower-integration/​evals/​files/​wired-instrumented-angular/​tsconfig.spec.json Re-run test compilation.
skills/​ui-watchtower-integration/​evals/​files/​wired-instrumented-angular/​src/​index.html Re-run HTML fixture.
skills/​ui-watchtower-integration/​evals/​files/​wired-instrumented-angular/​src/​styles.css Re-run styles fixture.
skills/​ui-watchtower-integration/​evals/​files/​wired-instrumented-angular/​src/​main.ts Re-run bootstrap.
skills/​ui-watchtower-integration/​evals/​files/​wired-instrumented-angular/​src/​app/​app.config.ts Instrumented app providers.
skills/​ui-watchtower-integration/​evals/​files/​wired-instrumented-angular/​src/​app/​app.routes.ts Instrumented app routes.
skills/​ui-watchtower-integration/​evals/​files/​wired-instrumented-angular/​src/​app/​app.ts Instrumented root component.
skills/​ui-watchtower-integration/​evals/​files/​wired-instrumented-angular/​src/​app/​app.spec.ts Instrumented root test.
skills/​ui-watchtower-integration/​evals/​files/​wired-instrumented-angular/​src/​app/​customers/​customers.ts Existing customer-load instrumentation.
skills/​ui-watchtower-integration/​evals/​files/​wired-instrumented-angular/​src/​app/​customers/​customers.spec.ts Customer-load outcome tests.
skills/​ui-watchtower-integration/​evals/​files/​wired-instrumented-angular/​src/​app/​customers/​customer-detail.ts Customer-detail fixture.
skills/​ui-watchtower-integration/​evals/​files/​wired-instrumented-angular/​src/​app/​telemetry/​telemetry.schema.ts Expanded telemetry vocabulary.
skills/​ui-watchtower-integration/​evals/​files/​wired-instrumented-angular/​src/​app/​telemetry/​rum-credentials.provider.ts Existing credentials provider.
skills/​ui-watchtower-integration/​evals/​files/​wired-instrumented-angular/​src/​app/​telemetry/​route-navigation-telemetry.service.ts Existing route instrumentation.
skills/​ui-watchtower-integration/​evals/​files/​wired-instrumented-angular/​src/​app/​telemetry/​route-navigation-telemetry.service.spec.ts Route instrumentation tests.
skills/​ui-watchtower-integration/​evals/​files/​unwired-angular/​angular.json Unwired-app eval configuration.
skills/​ui-watchtower-integration/​evals/​files/​unwired-angular/​package.json Unwired-app dependencies.
skills/​ui-watchtower-integration/​evals/​files/​unwired-angular/​tsconfig.json Unwired-app TypeScript configuration.
skills/​ui-watchtower-integration/​evals/​files/​unwired-angular/​tsconfig.app.json Unwired-app compilation.
skills/​ui-watchtower-integration/​evals/​files/​unwired-angular/​tsconfig.spec.json Unwired-app test compilation.
skills/​ui-watchtower-integration/​evals/​files/​unwired-angular/​src/​index.html Unwired-app HTML fixture.
skills/​ui-watchtower-integration/​evals/​files/​unwired-angular/​src/​styles.css Unwired-app styles fixture.
skills/​ui-watchtower-integration/​evals/​files/​unwired-angular/​src/​main.ts Unwired-app bootstrap.
skills/​ui-watchtower-integration/​evals/​files/​unwired-angular/​src/​app/​app.config.ts Providers without telemetry.
skills/​ui-watchtower-integration/​evals/​files/​unwired-angular/​src/​app/​app.routes.ts Unwired-app routes.
skills/​ui-watchtower-integration/​evals/​files/​unwired-angular/​src/​app/​app.ts Unwired root component.
skills/​ui-watchtower-integration/​evals/​files/​unwired-angular/​src/​app/​app.spec.ts Unwired component test.
skills/​ui-watchtower-integration/​evals/​files/​unwired-angular/​src/​app/​customers/​customers.ts Uninstrumented customer screen.
skills/​ui-watchtower-integration/​evals/​files/​unwired-angular/​src/​app/​customers/​customer-detail.ts Customer-detail fixture.
skills/​shared/​SKILL.md Generalizes shared-skill description.
skills/​shared/​references/​ngx-ui-watchtower-api.md Shared watchtower API reference.
README.md Adds both skills to the catalog.
docs/​README.md Adds both user guides.
docs/​guides/​ui-watchtower-setup.md Setup skill guide.
docs/​guides/​ui-watchtower-integration.md Integration skill guide.
CONTRIBUTING.md Updates skill validation command.

🧠 Review effort: Balanced


Give feedback about Copilot approvals in this survey to enter a drawing for a $150 gift card.

Comment thread skills/ui-watchtower-setup/SKILL.md Outdated
Comment thread skills/ui-watchtower-setup/assets/route-navigation-telemetry.service.ts Outdated
Comment thread skills/ui-watchtower-setup/assets/rum-credentials.provider.ts Outdated
Comment thread skills/shared/references/ngx-ui-watchtower-api.md Outdated
Comment thread skills/ui-watchtower-setup/SKILL.md Outdated

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment thread skills/ui-watchtower-integration/evals/evals.json Outdated
Comment thread skills/ui-watchtower-integration/SKILL.md Outdated
Comment thread skills/ui-watchtower-setup/assets/rum-credentials.provider.ts
Comment thread skills/ui-watchtower-integration/SKILL.md Outdated
Comment thread skills/ui-watchtower-integration/SKILL.md Outdated
Comment thread skills/ui-watchtower-integration/references/instrumentation-patterns.md Outdated

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

One or more issues must be addressed before approval.

7 open findings
11 resolved since last review
Previously missed (2)

In code that hasn't changed since last review

Medium severity Subscribe to or return the lazy observable example

skills/​ui-watchtower-integration/​references/​instrumentation-patterns.md:78

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.

Low severity 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.

Comment thread skills/ui-watchtower-setup/SKILL.md Outdated
Comment thread skills/ui-watchtower-setup/assets/route-navigation-telemetry.service.ts Outdated
Comment thread skills/ui-watchtower-setup/references/rum-migration.md Outdated
Comment thread skills/ui-watchtower-setup/references/rum-migration.md Outdated

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment thread skills/ui-watchtower-setup/references/micro-frontends.md Outdated

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

One or more issues must be addressed before approval.

0 open findings

6 resolved since last review
Previously missed (4)

In code that hasn't changed since last review

Medium severity Use a fake clock for deterministic backdating assertions

skills/​ui-watchtower-integration/​evals/​files/​wired-angular/​src/​app/​telemetry/​route-navigation-telemetry.service.spec.ts:268

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).

Medium severity Use a fake clock for deterministic backdating assertions

skills/​ui-watchtower-integration/​evals/​files/​wired-instrumented-angular/​src/​app/​telemetry/​route-navigation-telemetry.service.spec.ts:268

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).

Medium severity Preserve all supported app-monitor configuration fields

skills/​ui-watchtower-setup/​assets/​rum-credentials.provider.ts:115

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.

Low severity Correct route-navigation test count in validation summary

skills/​ui-watchtower-integration/​evals/​files/​wired-angular/​src/​app/​telemetry/​route-navigation-telemetry.service.spec.ts:44

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 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
lukasmatta
lukasmatta previously approved these changes Oct 13, 2026
miroslavpojer
miroslavpojer previously approved these changes Oct 14, 2026
Comment thread skills/ui-watchtower-integration/SKILL.md
@fateeand
fateeand dismissed stale reviews from miroslavpojer and lukasmatta via dbf5cf2 October 14, 2026 10:33
miroslavpojer
miroslavpojer previously approved these changes Oct 15, 2026
@fateeand

Copy link
Copy Markdown
Collaborator Author

@copilot resolve the merge conflicts in this pull request

…-ui-watchtower-setup-and-integration

# Conflicts:
#	skills/shared/SKILL.md

Co-authored-by: fateeand <104006376+fateeand@users.noreply.github.com>

Copilot AI commented Oct 22, 2026

Copy link
Copy Markdown

@copilot resolve the merge conflicts in this pull request

Merged master and resolved the shared companion conflict in merge commit 6462082. The Watchtower API reference remains available; upstream’s unrelated legacy living-documentation files were removed.

Comment on lines +78 to +83
const isTelemetry = (t: unknown): boolean =>
isString(t) ||
(Array.isArray(t) &&
(t.length === 1 || t.length === 2) &&
isString(t[0]) &&
(t.length === 1 || isRecord(t[1])));

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isTelemetry lets any [name, {...}] through. The options come from JSON, but aws-rum-web wants RegExps/functions in some of them (urlsToExclude, ignore...). For example, ["http", {"urlsToExclude": ["/health"]}] makes the patched fetch/XHR throw test is not a function on every request. I'd drop the options object or only allow a few known JSON-safe keys.

*/
function shellChannelName(): string {
try {
const shell = typeof window === 'undefined' ? undefined : window.top?.__uwtTelemetryChannel;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

window.top only works if the shell is the top-level page. If the shell app is itself embedded as an iframe in another app, fragments silently fall back to an unhosted channel. Maybe walk up window.parent until we find __uwtTelemetryChannel, with a try/catch per level? The check in Verifying (L150) assumes the same thing.

Comment on lines +32 to +39
fetch(LOG_API_URL, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify(record),
// Lets the request outlive a page that is being closed. Browsers cap all in-flight
// keepalive bodies at 64 KiB together, so batch records before production use.
keepalive: true
}).catch(() => undefined);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One keepalive fetch per record with no batching. A burst over 64 KiB gets rejected and the .catch hides it, so logs are lost silently. The comment mentions batching, but SKILL.md tells people to copy this as-is. Either batch and send in flush(), or use keepalive only in flush().

Comment on lines +268 to +269
**No router:** skip this step and the binding, and remove `disableAutoPageView: true` from the
credentials provider — RUM's one automatic page view per load is then right.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With no router we remove disableAutoPageView, but the spec copied in Step 7 still asserts it in two tests, so they go red. Worth adding a note to update those expectations.

Comment on lines +41 to +43
Templates in `assets/` are copied into the app and adapted: `telemetry.schema.ts`,
`rum-credentials.provider.ts`, `log-api.provider.ts`, `route-navigation-telemetry.service.ts`, and the
specs for the last two (`*.spec.ts`).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: "specs for the last two" means log-api + route-navigation, but the specs that ship are for rum-credentials + route-navigation. There's no log-api spec, so just name both.

Comment on lines +135 to +137
* incomplete, malformed or expired. A failed request throws instead: on a refresh the library
* then keeps the current credentials and retries in 30 s, where `null` would end RUM for the
* session. At startup both just leave RUM off.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: this docstring has drifted from the asset. A throw at startup is retried (every 30 s, up to 10 times), so it doesn't just leave RUM off. Same in wired-checkout / wired-instrumented and in the comment in app.config.ts L38-39.

"id": "rum-not-ready-noop",
"category": "happy-path",
"prompt": "Set up ngx-ui-watchtower in this Angular app. RUM isn't ready yet — we don't have a credentials endpoint. No log backend. The project is in evals/files/standalone-angular.",
"expected_output": "Skill wires provideUwtTelemetry with the explicit 'noop' destination, installs only the library (no aws-rum-web, no shimmer allowance, no credentials provider), still adds the schema, route-navigation proof and tests, and explains the one-line swap to the RUM sink later.",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: "one-line swap to the RUM sink" contradicts Step 9 ("it is more than one line") and the expectation on L114.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add skills - ngx-ui-watchtower setup and integration

6 participants