Skip to content

Import nameOf in the user-experience detect script from team-policy.mjs #15613

Description

@kyle-sexton

Agent Brief

Type: Task
Summary: Import nameOf in the user-experience detect.mjs from lib/team-policy.mjs in place of its own copy (part of restructuring pass #14823).

Current behavior:
plugins/user-experience/scripts/detect.mjs:119 defines nameOf, the same one-line arrow function as plugins/user-experience/scripts/lib/team-policy.mjs:13, which does not export it. detect.mjs uses it at :326, and detect.mjs:25 already imports rejections from ./lib/team-policy.mjs.

Desired behavior:
team-policy.mjs exports nameOf, and its header's interface list (:6-9) names it. detect.mjs:25 imports it, and detect.mjs:119 is deleted.

Files:

  • plugins/user-experience/scripts/lib/team-policy.mjs
  • plugins/user-experience/scripts/detect.mjs
  • a new patch fragment in .changes/user-experience/: ### Changed, "Internal restructuring, no behavior change."

Key interfaces:

  • detect.mjs's output and exit codes: unchanged.
  • No user-experience test or eval names nameOf.

Acceptance criteria:

  • nameOf is defined once, in team-policy.mjs, and detect.mjs imports it.
  • Behavior is unchanged: the same outputs, exit codes and printed results for the same inputs.
  • The diff edits only the listed files and the lines of a test that assert on them when the change breaks that assertion.
  • The pull request stays within 400 changed lines and 15 hand-edited files.
  • plugins/user-experience/tests/detect.test.sh and team-policy.test.sh pass.
  • ci-status is green.

Out of scope:

  • The copy in plugins/user-interface/scripts/detect.mjs, other duplication, eval cases, fixtures, and skill and agent text.

Activity

  1. added
    status: ready
    on Nov 12, 2026
  2. added theissue type on Nov 12, 2026
  3. removed
    status: ready
    on Nov 12, 2026
  4. melodic-automation-lanes commented on Nov 12, 2026

    @melodic-automation-lanes
    Contributor

    {"v":1,"actor_id":337595936,"title_sha256":"a90fc939175b9f5b9f39cff3fc53a138e434221b47d3bda3c6be774e6f4ca67d","body_sha256":"e84a8c389dc242d92182cb6db748dccf01788db56159efb3dd2658484ef0af02"}

  5. github-actions commented on Nov 12, 2026

    @github-actions
    Contributor
    No description provided.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Fields

    Work status

    needs-triage

    Priority

    low

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions