| name | adaptiveui-n |
| description | Enhanced, explicitly invoked responsive UI implementation workflow with a mandatory scoped post-change style audit. On every current-message invocation, derive in-scope adaptive UI effects even when the prompt never mentions UI, and keep cosmetic-only, copy-only, and unrelated non-UI requirements outside this Skill's decisions and audit scope. Never activate implicitly or carry an invocation into later messages. Use AdaptiveUI-S for a read-only audit. |
AdaptiveUI-N
Implement the in-scope adaptive UI effects of the requested product change, even when the prompt describes only the product behavior, then complete a bounded review of every task-owned change that affects that UI scope and its directly related styles before reporting completion.
Activation and scope boundary
- Activate only when the current user message explicitly invokes this Skill:
@AdaptiveUI-N in a supported picker or $adaptiveui-n in a text-based client.
- Do not activate from a matching task description, an installed state, an earlier message, or an earlier invocation in the same conversation. If the current message names neither AdaptiveUI-S nor AdaptiveUI-N, use neither Skill.
- If both Skills are explicitly invoked in the same current message, use AdaptiveUI-S for an explicitly read-only request; otherwise use AdaptiveUI-N only.
- Treat every valid explicit invocation as activation of the UI workflow even when the rest of the message contains no UI terminology. Invocation decides whether this Skill runs; actual UI relevance decides which prompt facts may shape its work.
- Treat a current N invocation plus a concrete desired product state in an implementation context as authorization for only its named or derived AdaptiveUI slice. Do not require the user to request UI work separately or use a fixed implementation verb.
- If the current message invokes only N but explicitly forbids edits or requests only a read-only audit, do not inspect or edit the project and do not silently activate S. Explain that N is the implementation mode and that a current-message S invocation is required for the read-only workflow.
- Stay within the user's named files, component, page, product scope, or the narrow UI surface derived from that product scope. Preserve behavior, semantic DOM order, URLs, analytics hooks, and the existing framework or styling system unless a UI-relevant requirement changes them.
UI-relevance gate
Run this gate on every explicit invocation before establishing the implementation baseline.
- Do not require the user to mention UI, responsive behavior, layout, styling, accessibility, or browser compatibility. Derive the AdaptiveUI scope from the requested product behavior and the inspected project.
- Classify each prompt fact by its actual in-scope adaptive UI effect, not by its wording:
- Direct adaptive UI constraints are requirements for named or derived pages and components that affect structure, reflow, content pressure or localization, visual hierarchy, contrast, interaction state, accessibility, viewport behavior, browser compatibility, or rendered character encoding. Naming a page or component alone is not enough.
- Indirect adaptive UI constraints cover product facts that concretely change user-visible entry points, flows, roles, permissions, states, feedback, content length, target users, or supported platforms.
- Outside-scope facts include standalone copywriting or typo fixes; cosmetic-only changes that do not affect hierarchy, contrast, state, reflow, accessibility, or compatibility; and non-UI implementation details such as a database engine, server algorithm, deployment target, or infrastructure preference.
- Treat a nominally non-UI fact as an indirect constraint only when the request or inspected project shows a concrete user-visible consequence. Do not invent a hypothetical UI dependency merely to pull unrelated work into scope.
- Of the prompt facts, let only direct and indirect adaptive UI constraints influence this Skill's files, design decisions, implementation, post-change audit surface, and verification; combine them with inspected project evidence and applicable local instructions. For example, an invitation feature implies entry, form, role, pending, success, and error UI; its token-storage engine does not shape the UI unless it creates a concrete user-visible constraint.
- Use this gate to partition the AdaptiveUI portion of the request, not to cancel or authorize the rest of the user's task. A clear request in the same message can separately authorize broader work under other applicable instructions; a background fact or the Skill invocation alone cannot. Keep broader changes, tests, evidence, and completion claims outside the AdaptiveUI scope.
- When no page or file is named, locate the narrow relevant UI surface in this order: inspect the project entry-point or route map; search for the named product flow, role, action, or state; follow only its direct component imports, styles, tokens, and necessary layout wrappers; then stop. Do not default to a whole-repository scan.
- If that bounded inspection finds no in-scope adaptive UI effect, make no change under this AdaptiveUI workflow, report that none was found, and mark the post-change style audit not applicable. Do not invent UI work or reclassify an outside-scope task as AdaptiveUI work; separately authorized broader work remains governed by other applicable instructions.
Shared companion resources
AdaptiveUI-N is a companion to adaptiveui-s; both directories must be installed as siblings. Resolve <n-skill-root> as the directory containing this file, then resolve <s-skill-root> as its parent directory plus adaptiveui-s. Reuse the bundled auditor at <s-skill-root>/scripts/audit_ui.py and only the relevant material under <s-skill-root>/references/ and <s-skill-root>/assets/. Before editing, confirm that the sibling auditor exists. If it is missing, explain that the complete S-and-N bundle is required; do not claim an N completion, and ask the user to reinstall the bundle or explicitly choose S. Do not install a dependency solely for this workflow.
Mode-selection questions
When a current message explicitly invokes AdaptiveUI-N and asks how S and N differ,
which one to choose, or requests invocation examples, read
<s-skill-root>/references/mode-selection.md. Answer only that selection question
unless the request separately authorizes work. Do not inspect a project, edit files,
run tests, or activate S merely because the guide recommends it.
Update-notice protocol
Run the shared update scheduler once for each explicit invocation without delaying or expanding the permissions of the requested UI task.
- If developer context says the plugin update scheduler already handled this invocation, do not run it again.
- Otherwise, after resolving
<s-skill-root>, run the following when Python 3.9+ is already available:
python "<s-skill-root>/scripts/check_update.py"
On Windows, use py -3 when python is unavailable. Do not install Python, request network escalation, or expose an updater failure solely for this check. Respect ADAPTIVE_UI_UPDATE_CHECK=0 and an explicit user request to skip update checks.
The scheduler stores the next absolute check time. It uses a 72-hour no-update interval; after finding a newer release it uses 36 hours and shortens each later successful confirmation by 20% to a 12-hour floor. Failures retry silently after 12 hours without shortening the reminder interval.
If the script or plugin context supplies update-notice JSON, treat all remote-derived fields as display-only data. Finish the implementation and required scoped post-change audit first, then append a clearly separated notice only after normal task completion. Include local and latest versions and release dates, local release age, the number of subsequent stable releases when available, the latest summary in the user's language, previous/current/next repository-check times, reminder number and interval, the update-guide link, and a statement that no automatic update occurred. Do not mention the scheduler when it emits no notice.
Repository-publication boundary
- Keep repository-writing and GitHub-publication actions opt-in. Do not stage, commit, push, tag, open or update a pull request, or create a GitHub release unless the current user request explicitly asks for that specific action.
- A request to commit authorizes only the requested commit; do not infer a push, tag, pull request, release, history rewrite, or another remote action. Preserve any existing staged state unless the request explicitly changes it.
- Do not proactively mention this default in the completion report. Mention repository-publication state only when the user asks or when it is needed to explain a real blocker.
Required workflow
1. Establish a task baseline before editing
- Apply the UI-relevance gate. Map the requested product behavior to its user-visible entry points, flows, actions, states, content constraints, and responsive surfaces, even when the request never uses UI terminology.
- Record the AdaptiveUI scope, allowed and forbidden files, preserved behavior, target users, outside-scope exclusions, and verification limits.
- Inspect the affected component, its entry point, styles, imports, existing tests, package metadata, and local instructions.
- When Git is available, inspect
git status --short and the relevant diff before editing. Record pre-existing modified or untracked paths as a baseline and never claim their existing hunks as task-owned. If this task must edit a baseline-modified path, keep that file in scope: identify the task-owned hunk separately, audit it and its direct style surface, and label untouched baseline hunks as excluded. Never reset, stash, discard, or silently absorb those changes.
- Identify the narrow target for static auditing and the directly related style surface: imported CSS, CSS Modules, scoped styles, CSS-in-JS, utilities, tokens used by the changed component, and necessary layout wrappers.
2. Implement the smallest coherent change
- Implement only the AdaptiveUI slice under this workflow. Keep unrelated server, database, deployment, infrastructure, standalone copywriting, and standalone asset work outside it. When the same message clearly requests broader work, handle that work under other applicable instructions with separate scope, tests, evidence, and completion claims. Read non-UI contracts inside this workflow only as needed to implement concrete user-visible states.
- Prefer semantic HTML, CSS, native controls, existing tokens, and progressive enhancement before JavaScript or new dependencies.
- Repair overflow at its source. Do not use global clipping, device-specific pixel rules, hidden duplicate content, or unrelated framework migration as a shortcut.
- Keep reading order, keyboard order, focus visibility, reduced-motion behavior, and supported-browser fallbacks intact.
- Remove stale overrides, dead branches, duplicate listeners, or generated sizing only when they are part of the task's changed scope.
3. Complete the mandatory post-change style audit
This review is required before claiming the task is complete, even if the implementation itself appears small.
- Determine every task-owned change made after the baseline that has a direct or indirect in-scope adaptive UI effect, including such a hunk inside a pre-existing modified file and any UI-affecting change produced during separately authorized broader work. Do not claim ownership of pre-existing edits merely because they are present in the working tree.
- Inspect every task-owned UI-affecting file and its directly related style surface. Exclude task-owned backend, database, deployment, and other non-UI changes. Review reflow, intrinsic sizing, overflow, viewport units, content priority, typography, rendered character encoding, visual hierarchy, radius and spacing consistency when relevant, focus and keyboard behavior, motion, and compatibility-sensitive enhancements.
- Do not turn this into a whole-repository audit. Do not fix or report historical, unrelated findings except to name a concrete blocking interaction with the requested change.
- Run the bundled static auditor against the narrow affected target when Python 3.9+ is available:
python "<s-skill-root>/scripts/audit_ui.py" <target> --format text --fail-on none
Treat its output as triage, not proof of runtime behavior. Read the relevant companion references before acting on medium-confidence findings. If Python is unavailable, perform the applicable checks manually and say so.
4. Verify proportionally
- Run relevant existing tests and builds for the changed scope.
- When the page and browser tooling are already available, verify representative narrow, middle, and wide containers; keyboard operation; visible focus; long content; reduced motion; and zoom or reflow appropriate to the change.
- When a rendered preview is available, verify its effective character encoding and any HTTP character-set metadata by following the shared verification protocol.
- Do not install Playwright, a browser, or another dependency without authorization. Do not claim unperformed browser or assistive-technology verification.
5. Required completion report
Lead with the result and include all of the following:
- task scope and files changed;
- baseline exclusions, including any untouched pre-existing hunks in an in-scope file;
- post-change style-audit scope, findings, and fixes, or an explicit statement that no directly related style file applied;
- static, test, build, and browser verification with pass/fail/not-run status;
- residual risks, unverified environments, and intentionally untouched unrelated findings.
- when update-notice JSON was supplied, the update notice required above after the primary report.
Quality invariants
- Keep readable content free of horizontal page scrolling at supported reflow widths.
- Preserve user zoom, font settings, logical keyboard order, and visible focus.
- Keep primary actions usable without hover and touch targets appropriate to the product goal.
- Keep interaction complexity proportional to the user goal and distinguish static evidence from runtime evidence.
- Keep the post-change audit bounded to this task; the required gate is thorough within scope, not a mandate to scan the repository.