From 81f276685c91d7de1daeb1fea1cc86e30c1ea768 Mon Sep 17 00:00:00 2001 From: Tomasz Masternak Date: Thu, 12 Nov 2026 13:00:27 +0100 Subject: [PATCH 1/7] Add engineering context and the UI guideline Onboards ServicePulse to the engineering context layout: AGENTS.md, docs/decisions/README.md and docs/guidelines/README.md come unchanged from the Platform templates, and docs/README.md indexes the repository's sources. docs/PRODUCT.md records who ServicePulse is for and what it must do. The UI guideline for src/Frontend asks every UI change to read the product and design context, sets out how bigger UX/UI changes are made (facts, only the assumptions decisions rest on, and constraints confirmed first, decisions naming what they rest on, each marked new, existing or changed in the pull request), requires a layout check against the base on both sides of every breakpoint a change can affect, and sets how UI code treats Bootstrap until its removal. The servicepulse-ui skill applies the guideline and shows how to run and check the UI with mock data. Co-authored-by: Bartek Wasielak --- .agents/skills/servicepulse-ui/SKILL.md | 38 +++++++++++++ .claude/skills/servicepulse-ui | 1 + AGENTS.md | 67 ++++++++++++++++++++++ docs/PRODUCT.md | 76 +++++++++++++++++++++++++ docs/README.md | 42 ++++++++++++++ docs/decisions/README.md | 33 +++++++++++ docs/guidelines/README.md | 28 +++++++++ docs/guidelines/ui.md | 36 ++++++++++++ 8 files changed, 321 insertions(+) create mode 100644 .agents/skills/servicepulse-ui/SKILL.md create mode 120000 .claude/skills/servicepulse-ui create mode 100644 AGENTS.md create mode 100644 docs/PRODUCT.md create mode 100644 docs/README.md create mode 100644 docs/decisions/README.md create mode 100644 docs/guidelines/README.md create mode 100644 docs/guidelines/ui.md diff --git a/.agents/skills/servicepulse-ui/SKILL.md b/.agents/skills/servicepulse-ui/SKILL.md new file mode 100644 index 000000000..e69501082 --- /dev/null +++ b/.agents/skills/servicepulse-ui/SKILL.md @@ -0,0 +1,38 @@ +--- +name: servicepulse-ui +description: Use when changing anything under src/Frontend in ServicePulse, such as views, components, styles, navigation, or UI copy, including together with other UI or design skills. Applies the UI guideline and explains how to run and check the UI locally with mock data. +metadata: + particular-guideline: docs/guidelines/ui.md +--- + +# ServicePulse UI + +Follow [the UI guideline](../../../docs/guidelines/ui.md). It controls when this skill or any other skill disagrees with it. + +Before you change the UI, read [the product description](../../../docs/PRODUCT.md) and, once it exists, `docs/DESIGN.md`. + +## Run the UI with mock data + +[Frontend testing and mocking basics](../../../docs/frontend/testing-basics.md) describes the mock scenarios. From `src/Frontend`: + +1. Run `npm install`. +2. Run `npm run dev:mocks`, or set `VITE_MOCK_SCENARIO` first to pick a scenario. +3. Open the printed URL in Chrome or Safari. + +The mock backend runs in a service worker. A browser that cannot register one, such as some embedded browser panes, shows a blank page. + +## Check layouts + +The guideline sets which views and widths to check. When a `docs/` page of the area you change lists the widths to check, use those. To compare before and after: + +1. Run the base branch with mock data and take a screenshot of each view at each width. +2. Run the change with the same mock scenario and take the same screenshots. +3. Compare each pair, and also look for horizontal scrolling, truncated titles, and wrapped toolbars. +4. Keep the mock instance of the change running while you ask the person who asked for the change to accept a difference. +5. Give them a link to the view in that instance, with the mock scenario, the width to set, and any step needed to reach the state, such as a tab to open. + +For a change to the shell or to shared styles, cover at least Dashboard, Failed Messages with a message's details, Monitoring with an endpoint's details, All Messages (`audit-available` scenario), Platform health, and Configuration. No mock scenario serves message details or conversations, so check a message's sequence diagram against a running ServiceControl with audit data. + +## Check before opening a pull request + +From `src/Frontend`, run `npm run type-check`, `npm run lint`, `npm run test:component`, and `npm run test:application`. diff --git a/.claude/skills/servicepulse-ui b/.claude/skills/servicepulse-ui new file mode 120000 index 000000000..c042372c3 --- /dev/null +++ b/.claude/skills/servicepulse-ui @@ -0,0 +1 @@ +../../.agents/skills/servicepulse-ui \ No newline at end of file diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 000000000..f35bc9a5a --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,67 @@ +# AGENTS.md + +This file is the map for people and coding agents working in this repository. What the repository is, how it is laid out, and where its design is explained are in `docs/README.md`. This file changes only when the workflow changes; decisions and rationale go in the sources it points to. + +## Engineering context + +Start here when investigating existing behavior or making a change whose rationale may need to outlive the pull request: + +- [Engineering context](docs/README.md) +- [Architecture and design decisions](docs/decisions/) +- [Contributing guidance](CONTRIBUTING.md) + +Prefer public records close to the implementation. Keep `docs/README.md` current when a canonical public source is added, replaced, or retired; update its links rather than copying rationale into the index. The index lists sources that explain why, with one clause each naming the question it answers, and points to existing indexes for how-to material instead of repeating them. This file describes the workflow, not repository facts. Read `docs/README.md` before answering a question about existing behavior or about where to record a decision, then answer from the index, the code, and pull requests, never from this file alone. + +1. Identify the decision area and the precise question, for example why a constraint exists, why a limit lives in one layer rather than another, or why an alternative was rejected. +2. Start with the public source linked by `docs/README.md`. Read the current public contract, relevant code, tests, and linked pull requests or ADRs. When `docs/README.md` lists upstream contracts, read the linked page before changing code that implements that contract. The upstream page controls the contract; this repository records only its own choices within it. Follow relevant pointer comments as routing hints; the linked source remains canonical. A Git commit can identify a pull request number without containing its description: a squash-merge commit carries a trailing `(#NNNN)`, and a merge commit reads `Merge pull request #NNNN`. Retrieve the pull request with `gh pr view ` from inside the checkout, which identifies the repository. If the pull request cannot be retrieved, report that rather than infer its rationale. Public records control public behavior and contribution requirements. +3. Decide where the rationale for the current work belongs. Record it once and link to it from the other places. A component means a separate repository, such as an NServiceBus package, ServiceControl, or ServicePulse, not a project inside `src/`. A change that requires an upstream contract to change belongs in the upstream repository; flag it rather than working around it here. + - Pull request description, the default: the problem and why now, the change and its observable effect, constraints that must hold, alternatives that materially affected it, and how it was verified. For a decision that stays within this repository, the pull request is the authoritative record. + - `docs/.md`: how the current design works, for readers who need the current picture rather than the history of one change. Update the relevant page when a change alters it. Do not create a page to restate one pull request. + - `docs/decisions/`: a public ADR only when a pull request is not a sufficient long-term entry point, because the change introduces an important constraint that is hard to discover from code, affects more than one repository, or rejects an alternative likely to return. Before deciding either way, check `docs/README.md` and `git log` for an existing decision on the same theme; when a pull request already records it, link that pull request instead. Follow the structure and quality bar in `docs/decisions/README.md`; an ADR that only justifies a choice already made is not worth keeping. + - Private context, only when step 4 provides an approved root: supporting context that cannot be public goes in an addendum under `$PARTICULAR_CONTEXT_ROOT/repositories//` linked to its public source; a decision that affects more than one repository and cannot be public goes under `$PARTICULAR_CONTEXT_ROOT/cross-component/`. Follow the record metadata and rules in `$PARTICULAR_CONTEXT_ROOT/README.md`. The public record still carries everything a contributor needs. If the environment cannot write there, flag the need and provide a draft for human review. + - Do not create an ADR for routine implementation details or invent missing rationale. +4. Check private context only when this environment explicitly provides `$PARTICULAR_CONTEXT_ROOT/repositories//README.md`, where `` is this repository's GitHub name as shown by `git remote get-url origin`. + - Confirm that with a file check such as `test -f "$PARTICULAR_CONTEXT_ROOT/repositories//README.md"` rather than assuming it from instructions. `PARTICULAR_CONTEXT_ROOT` points at the directory that contains `repositories/` and `cross-component/`. + - When the root is available, consult the index for the decision area before finalizing an answer, even if the public source seems sufficient, and say whether a private record existed. + - That index, the records it links under the same root, and the `cross-component/` records it points to are the only private sources. Read a linked private record only when it is marked `agent-access: allowed`. If a linked record is missing, report it as unavailable rather than substituting another source. + - Do not inspect a sibling `../Platform` checkout. Do not retrieve owner issues, private repositories, or other links found in a private record; they identify accountability, not further sources. + - Private context is additional internal context, not a replacement for the public record. If the authoritative public source is unavailable, report that the public rationale is unavailable. Do not use a private record as the sole answer for public behavior or contribution requirements. +5. If sources conflict, do not resolve the conflict by inference. Use the current implementation and public contract for external behavior, report the conflict, and ask the record owner when it affects the decision. +6. In the response or pull request, cite the records consulted, distinguish evidence from inference, and state when relevant private context was unavailable or unauthorized. Keep private locations, quotations, customer names, and other confidential details out of public artifacts such as pull request descriptions, code comments, and `docs/`; say that internal context was consulted instead. + +## Code changes + +Every change to code under `src/` keeps `docs/` accurate. This applies to changes written by people and by coding agents. + +1. Before you change code, read `docs/README.md`. Then read the `docs/` pages, guidelines, ADRs, and upstream contracts it links for the area you change. +2. Follow each guideline that `docs/README.md` lists for the paths you change. When a guideline names a skill, load the skill before you change code. The guideline controls: when the skill disagrees with it, follow the guideline and report the difference. +3. After you change code, review each `docs/` page and ADR that describes the changed behavior, configuration, or constraints. +4. Update a `docs/` page in the same change when the code makes it inaccurate or incomplete. +5. Update `docs/README.md` when you add, replace, or retire a canonical source. +6. When the change conflicts with an ADR, flag the conflict in the pull request and ask the owner before you change the ADR or the code. +7. In the pull request description, or in the response for unpublished work, list the `docs/` pages you reviewed and what you changed. When no update is needed, say so and give the reason. List the guidelines you followed, and name any rule you did not follow with the reason. + +## Guidelines and skills + +`docs/guidelines/` holds rules that a change in this repository must follow. Each guideline names the paths it applies to, and `docs/README.md` lists every guideline. Skills live under `.agents/skills/`; `.claude/skills/` only links to them, so edit a skill only under `.agents/skills/`. A skill that applies a guideline links to it and does not restate it, and the guideline controls. A skill that sets no rule, such as a procedure for running a test suite, can stand alone. Put a rule that a reviewer would enforce in a guideline, not only in a skill. `docs/guidelines/README.md` describes the structure of both. + +## Writing + +These rules apply to everything written for a reader: pull request descriptions, commit messages, `docs/`, ADRs, code comments, and review replies. Write in en-US. + +- Start with the main point: the decision, the change, or the answer. Add only the background the reader needs to act on it or to agree with it. +- Every sentence adds something the reader does not already have from the code, the diff, the title, or earlier text in the same document. Cut sentences that announce, summarize, or repeat. +- State facts plainly. Do not add weight with a contrast against a claim nobody made, a one-line closer, inflated significance, or words such as pivotal, seamless, or robust used figuratively. Keep a contrast that corrects something a reader would likely assume. +- Write short, direct sentences, under 25 words where possible, with a named actor and an active verb. Keep the passive when the source does not say who acts. Keep should and must where the text sets a rule. Qualify a claim only when the evidence is uncertain, and say what is uncertain. +- Use one term for one concept, and use the term the code uses. Define a term on first use when the audience may not know it. Avoid idioms and phrasal verbs that a non-native reader or a translation tool can misread. +- In a procedure, write one action per numbered step, in the imperative, in the order the reader performs it. +- Write a commit subject or pull request title as a short imperative summary of the change, without emoji or type prefixes; a squash merge turns the title into the commit subject. Give each commit one intent, and put renames and formatting changes in their own commits. +- Use formatting only where it helps scanning: sentence-case headings, lists for three or more parallel items, no bold label on every item, no emoji, and no dashes to join clauses in prose. Index entries and list items may be fragments, with a dash or colon between a term and its description. +- Do not invent facts, numbers, rationale, or sources. When the record does not say, write that it does not say. +- Leave out chat and drafting residue: offers, praise, and notes on how the text was produced or what it replaced. Keep provenance that changes how to read the text, such as a record reconstructed after the decision. Mention earlier behavior only where it explains the current design or a default, or in changelogs, release notes, and upgrade guides. + +Default to no code comment. Write one only for what the code cannot state, such as a non-obvious invariant, an ordering requirement, or a workaround whose cause is not visible. Explain why, not what, in one line, two at most. When it needs more, put the explanation in `docs/` or the pull request and link to it with a pointer comment. History such as "changed to fix" belongs in the commit, not the comment. + +## Pointer comments + +A brief code comment may link to a canonical public source, such as a `docs/` file or an ADR under `docs/decisions/`, when the relevant rationale is not apparent from the surrounding code. It is a signpost, not a copy of the rationale: keep the durable explanation in the linked record. Do not use a comment to narrate obvious code, and do not restate a pull request or ADR in the comment body. diff --git a/docs/PRODUCT.md b/docs/PRODUCT.md new file mode 100644 index 000000000..c5eadf147 --- /dev/null +++ b/docs/PRODUCT.md @@ -0,0 +1,76 @@ +# Product + +## Platform + +web + +## Users + +Two groups, both primary. + +**Operations / administrators** keep the system healthy. They: + +- get live overview from the dashboard: unhealthy endpoints and failed messages; +- handle failed messages: inspect them, retry them, delete them; +- check platform health: installed components, versions, available upgrades, and a snapshot to export for support cases. + +**Developers** understand and fix behaviour. They: + +- follow message flow and sequence diagrams, and see how sagas change state; +- read message details: headers, metadata, stack traces; +- use monitoring metrics per endpoint, instance and message type; +- write custom .NET checks that alert when a business condition fails. + +In production environments, people mostly open ServicePulse when something breaks. During system development it's used to understand/debug the behavior. + +## Product Purpose + +ServicePulse provides live production monitoring for distributed applications built on NServiceBus. It monitors the health of a system's endpoints, detects processing errors, sends failed messages for reprocessing, and shows the platform's own health in one place. + +In production, the success means a user goes from "something is wrong" to "I know the cause and have handled it" in as few steps as possible. + +During development, the success means understanding the behavior of the system, what happened, where and why. + +## Positioning + +ServicePulse is part of the Particular Service Platform, alongside NServiceBus and ServiceControl. It presents data from ServiceControl (error and audit) and ServiceControl Monitoring instances, so it speaks the platform's own concepts directly: endpoints and their instances, heartbeats, failed messages and their groups, retries and retry redirects, sagas, conversations and custom checks. + +ServicePulse and ServiceControl are parts of every platform deployment required to measure throughput and number of endpoints, needed for licensing purposes. + +## Operating Context + +- Two usage contexts: production deployments, where people react to failures and degraded health, and development environments, where developers run the system they are building to see and debug how it behaves. +- Self-hosted next to the user's ServiceControl and Monitoring instances; hosting options are described in `docs/hosting-options.md`. +- Platform topology: a primary ServiceControl instance, zero or more remote Audit instances, Monitoring when configured, and ServicePulse itself (`docs/platform-topology.md`). +- Can run with OIDC authentication; some actions are gated by user permissions (`PermissionGate`, `useAllowedRoutes`). +- Most views are lists that refresh automatically. + +## Capabilities and Constraints + +- Areas (from `src/Frontend/src/router/config.ts`): Dashboard, Platform health, Heartbeats, All Messages, Failed Messages (groups, all, deleted, pending retries, message details), Monitoring (endpoints and endpoint details), Custom checks, Events, Usage (throughput and license details), and Configuration (license, MassTransit connector, health check notifications, retry redirects, and more). +- Frontend: Vue 3 + TypeScript + Vite, Pinia, vue-router, Bootstrap 5, Font Awesome, CodeMirror, Vue Flow with dagre for diagrams. Code lives in `src/Frontend`. +- Desktop is the main target; every task must remain usable on tablets and phones. + +## Brand Commitments + +- Name: ServicePulse, part of the Particular Service Platform. +- Logo: `src/Frontend/src/assets/logo.svg`. +- Domain icons for message, saga and endpoint states live in `src/Frontend/src/assets/`. + +## Evidence on Hand + +- Working codebase with component tests (`src/Frontend/src/**/*.spec.ts`) and application tests (`src/Frontend/test/specs`). +- A mock server (`src/Frontend/test/mock-server.ts`); `npm run dev:mocks` runs the UI without a backend. +- Frontend design notes for specific pages in `docs/frontend/`. +- No user research, usage analytics or customer quotes are in the repository; do not invent them. + +## Product Principles + +- Problems first in production: what is broken and needs action outranks what is healthy. +- Shortest path from symptom to cause to fix: inspect, retry or delete without hunting across pages. +- Make behaviour explainable during development: show what happened, where and why, following a message through its flow, conversation and saga state. +- Speak the platform's language: use NServiceBus and ServiceControl terms as users know them. + +## Accessibility & Inclusion + +WCAG 2.2 AA is required. diff --git a/docs/README.md b/docs/README.md new file mode 100644 index 000000000..b5cbae464 --- /dev/null +++ b/docs/README.md @@ -0,0 +1,42 @@ +# Engineering context + +## About this repository + +ServicePulse is the web operations console of the Particular Service Platform. It shows data from ServiceControl and ServiceControl Monitoring instances and lets users act on it, mainly on failed messages. For local build and test steps see the [README.md](../README.md). + +- `src/Frontend/` — the Vue application that users see +- `src/ServicePulse/` — the ASP.NET Core host, also used by the container image +- `src/ServicePulse.Host/` — the .NET Framework host for Windows installations +- `src/Particular.ServicePulse.Core/`, `src/Particular.PlatformSample.ServicePulse/` — ServicePulse binaries packaged for integrated ServicePulse and for Particular.PlatformSample +- `src/Setup/`, `src/ServicePulse.Install.CustomActions/` — the Windows installer +- `src/SmokeTest.*/` — endpoints for manual smoke testing against ServiceControl +- `.github/workflows/` — CI pipelines + +## Start here + +- [ServicePulse documentation](https://docs.particular.net/servicepulse/) — public documentation entry point +- [README.md](../README.md) — how to build, run, and test locally +- [Contributing](https://docs.particular.net/platform/contributing) — contribution process +- [Hosting options](hosting-options.md) — the ways ServicePulse can be hosted +- [Frontend testing and mocking basics](frontend/testing-basics.md) — mock scenarios and focused Vitest runs + +## Architecture and design + +- [Product](PRODUCT.md) — who ServicePulse is for, the situations it is used in, and what it must do +- [Platform topology](platform-topology.md) — how ServicePulse models ServiceControl instances and which ones it calls directly +- [Platform health page](frontend/platform-health-page.md) — how Platform health derives its rows and severity +- [Custom checks page](frontend/custom-checks-page.md) — how internal platform custom checks relate to other views + +## Guidelines + +- [UI changes](guidelines/ui.md) — `src/Frontend/**`; product and design context for any UI change, the process for bigger UX/UI changes, the layout check for every UI change, and how UI code treats Bootstrap. Read it before any UI change. Skill: `servicepulse-ui`. + +## Decisions and rationale + +- [Architecture and design decisions](decisions/) + +### Decisions recorded in pull requests + +A pull request is listed here only when it is the canonical record for a decision area: it establishes a durable constraint or convention, or rejects an alternative likely to return, and no `docs/` file or ADR covers it. Bug fixes and routine changes are not listed; recover them from `git log` and `gh pr view`. + +Keep this index current when a canonical source is added, replaced, or retired; link, do not copy. diff --git a/docs/decisions/README.md b/docs/decisions/README.md new file mode 100644 index 000000000..7ecb940b3 --- /dev/null +++ b/docs/decisions/README.md @@ -0,0 +1,33 @@ +# Architecture and design decisions + +For a single-component decision, the pull request that implements it remains authoritative by default. Write an architecture decision record (ADR) here only when a pull request is not a sufficient long-term entry point for the rationale, such as when: + +- the decision affects multiple components; +- an important constraint is difficult to discover from code or public documentation; +- engineers repeatedly fail to find the original rationale; or +- a rejected alternative is likely to return. + +## Naming + +Name each file `YYYY-MM-DD-short-title.md`, using the date the decision was made. + +## Structure + +Each ADR contains: + +- **Context** — the problem and the constraints that shaped it. +- **Decision** — what was decided. +- **Consequences** — the resulting behavior, tradeoffs, and any follow-up work. +- **Alternative approaches** — the alternatives considered and why they were rejected. + +Link each ADR to the pull request that implemented the decision. The ADR records the durable rationale; the pull request remains the record of the actual code change. + +## Quality bar + +An ADR exists to explore the context and the tradeoffs, not to justify a choice already made. Gregor Hohpe's [warning signs for misused ADRs](https://www.linkedin.com/posts/ghohpe_architecturedecisionrecords-activity-7502716054968844288-KVLU) apply here: + +- Context states the problem and its constraints, not preferences for the chosen option. +- Every downside listed under Consequences names a mitigation or an explicit acceptance, and quantifies the risk where it can be quantified. +- Alternative approaches are credible options someone could have argued for, not "do nothing"; identify the ones that represent points of leverage. + +An ADR that fails this bar is not worth keeping; record the decision in the pull request instead. diff --git a/docs/guidelines/README.md b/docs/guidelines/README.md new file mode 100644 index 000000000..171449461 --- /dev/null +++ b/docs/guidelines/README.md @@ -0,0 +1,28 @@ +# Guidelines + +A guideline states rules that a change in this repository must follow, such as conventions for UI components or public APIs. A `docs/` page describes how the current design works, and an ADR under `docs/decisions/` records why a decision was made; a guideline says what a change must do. + +Write a guideline only for a rule a reviewer would enforce. When a tool can check the rule, prefer an analyzer or a lint rule, and keep the guideline for rules that need judgment. + +## Structure + +Name each file `short-title.md`. Each guideline contains: + +- Scope: the paths it applies to, as glob patterns relative to the repository root, and the kinds of change it covers. +- Rules: each rule as one sentence with must or should. +- Rationale: a link to the pull request, ADR, or `docs/` page that explains why, or one or two sentences when no record exists. +- Skill: the name of the skill that helps apply the guideline, if any. + +List every guideline in the Guidelines section of `docs/README.md`. + +## Skills + +A skill is a folder `.agents/skills//` with a `SKILL.md` that follows the [Agent Skills specification](https://agentskills.io/specification). Copilot and pi read `.agents/skills/`. Claude Code reads `.claude/skills/`, so each skill also has a symbolic link `.claude/skills/` to `../../.agents/skills/`. Edit a skill only under `.agents/skills/`. + +- Use only the frontmatter fields the specification defines: `name`, `description`, `license`, `compatibility`, `metadata`, and `allowed-tools`. `name` matches the folder name. +- Start the `description` with when to use the skill, and name the paths and kinds of change it applies to. Agents see only the name and description until they load the skill. +- A skill that applies a guideline sets `metadata.particular-guideline` to the guideline's path, links to the guideline in its body, and does not restate its rules. The guideline controls. +- A skill that sets no rule, such as a procedure for running a test suite, omits `particular-guideline`. When a `docs/` page already covers the procedure, the skill links to it and adds only what an agent needs on top. +- The `particular-` name prefix is reserved for skills synchronized across repositories. Do not edit those in one repository. + +On Windows, Git checks out the links as plain files unless `core.symlinks` is `true`, and Claude Code then does not find the skills. diff --git a/docs/guidelines/ui.md b/docs/guidelines/ui.md new file mode 100644 index 000000000..2629c7862 --- /dev/null +++ b/docs/guidelines/ui.md @@ -0,0 +1,36 @@ +# UI changes + +## Scope + +- Paths: `src/Frontend/**` +- Changes: anything users see or interact with in ServicePulse, such as views, components, styles, navigation, and UI copy. +- The rules for bigger changes apply to a change of the visual direction or of the navigation or page structure, and to a change that spans several areas; they do not apply to fixes, copy changes, or changes to a single component. + +## Rules + +- A UI change must be consistent with `docs/PRODUCT.md` and with `docs/DESIGN.md` once it exists. +- When `docs/DESIGN.md` and existing code disagree, a change must follow `docs/DESIGN.md` and name the difference in the pull request. +- `PRODUCT.md` and `DESIGN.md` must exist only under `docs/`. +- A principle that should outlive a change should be recorded in `docs/DESIGN.md` for visual and interaction rules, or in `docs/PRODUCT.md` for product facts. +- A bigger change must list its assumptions and its constraints separately and have both confirmed by the person who asked for it before design work starts. +- A bigger change should state what the code or data already shows as facts, which need no confirmation, rather than as assumptions. +- A bigger change must list only the assumptions that would change one of its decisions if they were wrong. +- Each assumption must be a claim about users or their context that could be wrong, with its source (`docs/PRODUCT.md`, data, or "assumed") and the evidence that would show it is wrong. +- The constraints of a bigger change must cover what it has to respect regardless of the assumptions, such as requirements from `docs/PRODUCT.md`, accessibility, existing behavior, scope, and stakeholder decisions. +- A bigger change should state the preservation of existing behavior as one constraint and list the behaviors it covers as review criteria, which need no separate confirmation. +- Each design decision in a bigger change must name the assumption or constraint it rests on. +- The pull request of a bigger change must list its assumptions, constraints, and decisions, mark each as new, existing, or changed, and state which assumptions turned out wrong or partly wrong. +- A UI change must be checked in the running UI with mock data on every existing view it can affect, at a width on each side of every layout breakpoint it can affect, and compared with the same views before the change; a change to the shell or to shared styles affects every view. +- The pull request of a UI change must state that the layout check was done, and must list a view and width only for a layout difference it found, with whether the difference was fixed or accepted by the person who asked for the change. +- Until Bootstrap is removed, views must use the shared components in `src/Frontend/src/components`, such as `ActionButton`, `ModalDialog`, `ConfirmDialog`, and `DropDown`, and extend them when needed. +- Views must not add Bootstrap component classes, such as `btn`, `modal`, `dropdown`, `alert`, and `badge`, or `data-bs-*` attributes. +- New code should use Bootstrap grid and utility classes only for layout, until replacements exist. +- `docs/DESIGN.md` must name components by role, never by a Bootstrap class, and must record what Bootstrap theming cannot yet deliver as a known gap. + +## Rationale + +[#3189](https://github.com/Particular/ServicePulse/pull/3189) introduced these rules. Written assumptions let reviewers check a bigger change against them rather than against taste, and shared components keep the Bootstrap removal inside those components. A short list of facts, decision-bearing assumptions, and constraints is one a person can confirm before design work starts. Views size themselves with viewport media queries, so a change outside a view can break its layout without failing a test, and layouts break first at the edges of a breakpoint. + +## Skill + +`servicepulse-ui` From 3bf39d3e5dab0248184a210398807b3d6490f0ab Mon Sep 17 00:00:00 2001 From: Tomasz Masternak Date: Thu, 12 Nov 2026 13:00:42 +0100 Subject: [PATCH 2/7] Introduce Impeccable as a design tool for UI work Impeccable is pinned as an npm dev dependency in src/Frontend, and `npm run ai:setup` installs its skill, agents and hooks into the repository's .claude folder for each developer; the installed files are gitignored. .impeccable/config.json enables its design detector hook. The servicepulse-ui skill says when to use Impeccable and how to install it, and that the UI guideline, which Impeccable does not read, controls. docs/PRODUCT.md carries Impeccable's schema marker. Co-authored-by: Bartek Wasielak --- .agents/skills/servicepulse-ui/SKILL.md | 12 +++ .gitignore | 9 ++ .impeccable/config.json | 9 ++ docs/PRODUCT.md | 2 + src/Frontend/package-lock.json | 106 ++++++++++++++++++++++++ src/Frontend/package.json | 4 +- 6 files changed, 141 insertions(+), 1 deletion(-) create mode 100644 .impeccable/config.json diff --git a/.agents/skills/servicepulse-ui/SKILL.md b/.agents/skills/servicepulse-ui/SKILL.md index e69501082..822cd60ce 100644 --- a/.agents/skills/servicepulse-ui/SKILL.md +++ b/.agents/skills/servicepulse-ui/SKILL.md @@ -36,3 +36,15 @@ For a change to the shell or to shared styles, cover at least Dashboard, Failed ## Check before opening a pull request From `src/Frontend`, run `npm run type-check`, `npm run lint`, `npm run test:component`, and `npm run test:application`. + +## Impeccable + +Use the [Impeccable](https://impeccable.style) design skill for design reviews and refinement of the UI, such as critique, audit, and polish. Impeccable reads `docs/PRODUCT.md` and `docs/DESIGN.md` but not the UI guideline, so read the guideline before you run an Impeccable command, and follow the guideline when the two disagree. If an Impeccable command creates `PRODUCT.md` or `DESIGN.md` at the repository root, merge its content into the file under `docs/` and delete the root copy. + +Its version is pinned in `src/Frontend/package.json`, and `.impeccable/config.json` enables its design detector hook. If the Impeccable skill is not available in your session, ask the user to install it from `src/Frontend`: + +1. Run `npm install`. +2. Run `npm run ai:setup`. +3. Restart the session. + +`ai:setup` installs the skill, its agents, and its hooks into this repository's `.claude/` folder for Claude Code; they are not committed. For other tools, change `--providers` in the script, for example to `--providers=cursor`. Use either a globally installed Impeccable plugin or this setup, not both. diff --git a/.gitignore b/.gitignore index 165379712..0d51833f0 100644 --- a/.gitignore +++ b/.gitignore @@ -105,3 +105,12 @@ src/scaffolding.config # Files use to contain envvar values, used by tools like direnv .env .envrc + +# Impeccable: per-developer state +.impeccable/config.local.json +.impeccable/hook.cache.json +.impeccable/hook.pending.json +# Impeccable: installed by `npm run ai:setup` (src/Frontend) +.claude/skills/impeccable/ +.claude/agents/impeccable-*.md +.claude/settings.local.json diff --git a/.impeccable/config.json b/.impeccable/config.json new file mode 100644 index 000000000..91a24265b --- /dev/null +++ b/.impeccable/config.json @@ -0,0 +1,9 @@ +{ + "hook": { + "enabled": true, + "limits": { + "maxFindings": 5, + "maxChars": 8000 + } + } +} diff --git a/docs/PRODUCT.md b/docs/PRODUCT.md index c5eadf147..7390acd65 100644 --- a/docs/PRODUCT.md +++ b/docs/PRODUCT.md @@ -1,5 +1,7 @@ # Product + + ## Platform web diff --git a/src/Frontend/package-lock.json b/src/Frontend/package-lock.json index 65385d9df..9f8065ed7 100644 --- a/src/Frontend/package-lock.json +++ b/src/Frontend/package-lock.json @@ -58,6 +58,7 @@ "eslint-plugin-prettier": "5.5.6", "eslint-plugin-vue": "10.9.2", "globals": "17.6.0", + "impeccable": "4.8.2", "jsdom": "29.1.1", "msw": "2.14.6", "prettier": "3.8.3", @@ -1231,6 +1232,91 @@ "url": "https://github.com/sponsors/nzakas" } }, + "node_modules/@impeccable/cli-darwin-arm64": { + "version": "0.1.21", + "resolved": "https://registry.npmjs.org/@impeccable/cli-darwin-arm64/-/cli-darwin-arm64-0.1.21.tgz", + "integrity": "sha512-8gKNvi98N3pa1tD5+D70/p85Whcs18g1Fp0isPn0iEg1jGnHZnTdZSAdowOITzRTCuAWwRwDuk9gFCgZ8wXctg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "SEE LICENSE IN LICENSE", + "optional": true, + "os": [ + "darwin" + ], + "bin": { + "impeccable-darwin-arm64": "bin/impeccable" + } + }, + "node_modules/@impeccable/cli-darwin-x64": { + "version": "0.1.21", + "resolved": "https://registry.npmjs.org/@impeccable/cli-darwin-x64/-/cli-darwin-x64-0.1.21.tgz", + "integrity": "sha512-p37+Anz1JrWlsDqNIutTKDGM1He9S2Y9aaxK1sT2zqfyH4xa5yFVJt5TBD0Z1ZPc+kNhEwsfffVWr3OQNRS8+w==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "SEE LICENSE IN LICENSE", + "optional": true, + "os": [ + "darwin" + ], + "bin": { + "impeccable-darwin-x64": "bin/impeccable" + } + }, + "node_modules/@impeccable/cli-linux-arm64": { + "version": "0.1.21", + "resolved": "https://registry.npmjs.org/@impeccable/cli-linux-arm64/-/cli-linux-arm64-0.1.21.tgz", + "integrity": "sha512-Ia2L/Sm6qm9sexWyyUuUK3VUpEl83sfgO0UHKad9iWsZe2pDCxW3iIaBG8naQtfLCFgd+yrmGdG5KNZ0UDaD5w==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "SEE LICENSE IN LICENSE", + "optional": true, + "os": [ + "linux" + ], + "bin": { + "impeccable-linux-arm64": "bin/impeccable" + } + }, + "node_modules/@impeccable/cli-linux-x64": { + "version": "0.1.21", + "resolved": "https://registry.npmjs.org/@impeccable/cli-linux-x64/-/cli-linux-x64-0.1.21.tgz", + "integrity": "sha512-X7r/nQnk2imNF5QH8v0nMdraxnkCUh0XBchScolYODimuInezEKpLAPbCMmhTibpg7EkMgnfPuCA8/IvIDGjdw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "SEE LICENSE IN LICENSE", + "optional": true, + "os": [ + "linux" + ], + "bin": { + "impeccable-linux-x64": "bin/impeccable" + } + }, + "node_modules/@impeccable/cli-windows-x64": { + "version": "0.1.21", + "resolved": "https://registry.npmjs.org/@impeccable/cli-windows-x64/-/cli-windows-x64-0.1.21.tgz", + "integrity": "sha512-wWcmPBzh0HDWfSDtuJFi5RiGrXk7+8TfAuQOeePsNqqNLyQ4KTp0CR0JfzVvuLXEmRV/goY4g4Y2Hmaya0o/SA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "SEE LICENSE IN LICENSE", + "optional": true, + "os": [ + "win32" + ], + "bin": { + "impeccable-windows-x64": "bin/impeccable.exe" + } + }, "node_modules/@inquirer/ansi": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/@inquirer/ansi/-/ansi-2.0.5.tgz", @@ -4794,6 +4880,26 @@ "node": ">= 4" } }, + "node_modules/impeccable": { + "version": "4.8.2", + "resolved": "https://registry.npmjs.org/impeccable/-/impeccable-4.8.2.tgz", + "integrity": "sha512-NCEL/OndWjqCgN1hhau4In7zLDMlk/NZim8IcBitSER56hx3/eQecXjRC5+kSV6iRd2d8G5kWwR5agGXse4b3w==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "impeccable": "cli/bin/cli.js" + }, + "engines": { + "node": ">=18.19.0" + }, + "optionalDependencies": { + "@impeccable/cli-darwin-arm64": "0.1.21", + "@impeccable/cli-darwin-x64": "0.1.21", + "@impeccable/cli-linux-arm64": "0.1.21", + "@impeccable/cli-linux-x64": "0.1.21", + "@impeccable/cli-windows-x64": "0.1.21" + } + }, "node_modules/imurmurhash": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", diff --git a/src/Frontend/package.json b/src/Frontend/package.json index d47396fc8..e526544fb 100644 --- a/src/Frontend/package.json +++ b/src/Frontend/package.json @@ -17,7 +17,8 @@ "test:component": "vitest run ./src", "test:coverage": "vitest run --coverage", "test:application:vitest": "npx vitest run ./test/specs", - "test:application": "npm run test:application:vitest" + "test:application": "npm run test:application:vitest", + "ai:setup": "impeccable install --project --providers=claude --yes" }, "dependencies": { "@codemirror/lang-json": "6.0.2", @@ -70,6 +71,7 @@ "eslint-plugin-prettier": "5.5.6", "eslint-plugin-vue": "10.9.2", "globals": "17.6.0", + "impeccable": "4.8.2", "jsdom": "29.1.1", "msw": "2.14.6", "prettier": "3.8.3", From 1ad657cc9afae4b16e91c8cdd67c5be74a284426 Mon Sep 17 00:00:00 2001 From: Daniel Marbach Date: Fri, 13 Nov 2026 07:20:37 +0100 Subject: [PATCH 3/7] Apply the UI guideline's layout check to behavior-only changes and require a docs page for bigger changes --- docs/guidelines/ui.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/guidelines/ui.md b/docs/guidelines/ui.md index 2629c7862..15d051e99 100644 --- a/docs/guidelines/ui.md +++ b/docs/guidelines/ui.md @@ -4,6 +4,7 @@ - Paths: `src/Frontend/**` - Changes: anything users see or interact with in ServicePulse, such as views, components, styles, navigation, and UI copy. +- The guideline applies to a change that matches both, so a change to test code or mock data alone is not a UI change. - The rules for bigger changes apply to a change of the visual direction or of the navigation or page structure, and to a change that spans several areas; they do not apply to fixes, copy changes, or changes to a single component. ## Rules @@ -19,9 +20,10 @@ - The constraints of a bigger change must cover what it has to respect regardless of the assumptions, such as requirements from `docs/PRODUCT.md`, accessibility, existing behavior, scope, and stakeholder decisions. - A bigger change should state the preservation of existing behavior as one constraint and list the behaviors it covers as review criteria, which need no separate confirmation. - Each design decision in a bigger change must name the assumption or constraint it rests on. +- A bigger change must describe the resulting navigation or page structure in a `docs/` page, new or existing, and list a new page in `docs/README.md`. - The pull request of a bigger change must list its assumptions, constraints, and decisions, mark each as new, existing, or changed, and state which assumptions turned out wrong or partly wrong. - A UI change must be checked in the running UI with mock data on every existing view it can affect, at a width on each side of every layout breakpoint it can affect, and compared with the same views before the change; a change to the shell or to shared styles affects every view. -- The pull request of a UI change must state that the layout check was done, and must list a view and width only for a layout difference it found, with whether the difference was fixed or accepted by the person who asked for the change. +- The pull request of every UI change, including a change to behavior only, must state that the layout check was done or why the change cannot affect a view's layout, and must list a view and width only for a layout difference it found, with whether the difference was fixed or accepted by the person who asked for the change. - Until Bootstrap is removed, views must use the shared components in `src/Frontend/src/components`, such as `ActionButton`, `ModalDialog`, `ConfirmDialog`, and `DropDown`, and extend them when needed. - Views must not add Bootstrap component classes, such as `btn`, `modal`, `dropdown`, `alert`, and `badge`, or `data-bs-*` attributes. - New code should use Bootstrap grid and utility classes only for layout, until replacements exist. From 5e9c34afb2907cc304a95e1097d9ac96eae3f524 Mon Sep 17 00:00:00 2001 From: Daniel Marbach Date: Fri, 13 Nov 2026 07:34:30 +0100 Subject: [PATCH 4/7] Ask the UI skill to read the guideline before code changes --- .agents/skills/servicepulse-ui/SKILL.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.agents/skills/servicepulse-ui/SKILL.md b/.agents/skills/servicepulse-ui/SKILL.md index 822cd60ce..ef99e8c71 100644 --- a/.agents/skills/servicepulse-ui/SKILL.md +++ b/.agents/skills/servicepulse-ui/SKILL.md @@ -7,7 +7,7 @@ metadata: # ServicePulse UI -Follow [the UI guideline](../../../docs/guidelines/ui.md). It controls when this skill or any other skill disagrees with it. +Read [the UI guideline](../../../docs/guidelines/ui.md) before you change code, and follow it. It controls when this skill or any other skill disagrees with it. Before you change the UI, read [the product description](../../../docs/PRODUCT.md) and, once it exists, `docs/DESIGN.md`. From 3e5a9945651b981a489aa205050328593bfe0caa Mon Sep 17 00:00:00 2001 From: Daniel Marbach Date: Fri, 13 Nov 2026 08:17:46 +0100 Subject: [PATCH 5/7] Sync the engineering context templates and write the UI guideline entry in the rule form --- AGENTS.md | 8 ++++---- docs/README.md | 2 +- docs/guidelines/README.md | 8 +++++--- docs/guidelines/ui.md | 2 +- 4 files changed, 11 insertions(+), 9 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index f35bc9a5a..7368fb042 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -34,23 +34,23 @@ Prefer public records close to the implementation. Keep `docs/README.md` current Every change to code under `src/` keeps `docs/` accurate. This applies to changes written by people and by coding agents. 1. Before you change code, read `docs/README.md`. Then read the `docs/` pages, guidelines, ADRs, and upstream contracts it links for the area you change. -2. Follow each guideline that `docs/README.md` lists for the paths you change. When a guideline names a skill, load the skill before you change code. The guideline controls: when the skill disagrees with it, follow the guideline and report the difference. +2. Read `docs/README.md` and each guideline it lists that applies to the change. An entry states when its guideline applies: to every change under its paths, to a kind of change, or to code of a certain shape. Decide from that statement, not from the guideline's subject. Follow each guideline that applies, and load its skill, if it names one, before you change code. The guideline controls: when the skill disagrees with it, follow the guideline and report the difference. 3. After you change code, review each `docs/` page and ADR that describes the changed behavior, configuration, or constraints. 4. Update a `docs/` page in the same change when the code makes it inaccurate or incomplete. 5. Update `docs/README.md` when you add, replace, or retire a canonical source. 6. When the change conflicts with an ADR, flag the conflict in the pull request and ask the owner before you change the ADR or the code. -7. In the pull request description, or in the response for unpublished work, list the `docs/` pages you reviewed and what you changed. When no update is needed, say so and give the reason. List the guidelines you followed, and name any rule you did not follow with the reason. +7. In the pull request description, or in the response for unpublished work, list the `docs/` pages you reviewed and what you changed. When no update is needed, say so and give the reason. For each guideline that `docs/README.md` lists, say whether it applies to the change and, when it does, whether you followed it; name any rule you did not follow with the reason. ## Guidelines and skills -`docs/guidelines/` holds rules that a change in this repository must follow. Each guideline names the paths it applies to, and `docs/README.md` lists every guideline. Skills live under `.agents/skills/`; `.claude/skills/` only links to them, so edit a skill only under `.agents/skills/`. A skill that applies a guideline links to it and does not restate it, and the guideline controls. A skill that sets no rule, such as a procedure for running a test suite, can stand alone. Put a rule that a reviewer would enforce in a guideline, not only in a skill. `docs/guidelines/README.md` describes the structure of both. +`docs/guidelines/` holds rules that a change in this repository must follow. Each guideline states when it applies, and `docs/README.md` lists every guideline with that statement and its main rule in one clause. Skills live under `.agents/skills/`; `.claude/skills/` only links to them, so edit a skill only under `.agents/skills/`. A skill that applies a guideline links to it and does not restate it, and the guideline controls. A skill that sets no rule, such as a procedure for running a test suite, can stand alone. Put a rule that a reviewer would enforce in a guideline, not only in a skill. `docs/guidelines/README.md` describes the structure of both. ## Writing These rules apply to everything written for a reader: pull request descriptions, commit messages, `docs/`, ADRs, code comments, and review replies. Write in en-US. - Start with the main point: the decision, the change, or the answer. Add only the background the reader needs to act on it or to agree with it. -- Every sentence adds something the reader does not already have from the code, the diff, the title, or earlier text in the same document. Cut sentences that announce, summarize, or repeat. +- Every sentence adds something the reader does not already have from the code, the diff, the title, or earlier text in the same document. Cut sentences that announce, summarize, or repeat. In a pull request description that means no preamble, no heading or bold line that repeats the title, no walk through the diff file by file, and no closing summary. - State facts plainly. Do not add weight with a contrast against a claim nobody made, a one-line closer, inflated significance, or words such as pivotal, seamless, or robust used figuratively. Keep a contrast that corrects something a reader would likely assume. - Write short, direct sentences, under 25 words where possible, with a named actor and an active verb. Keep the passive when the source does not say who acts. Keep should and must where the text sets a rule. Qualify a claim only when the evidence is uncertain, and say what is uncertain. - Use one term for one concept, and use the term the code uses. Define a term on first use when the audience may not know it. Avoid idioms and phrasal verbs that a non-native reader or a translation tool can misread. diff --git a/docs/README.md b/docs/README.md index b5cbae464..d95cee697 100644 --- a/docs/README.md +++ b/docs/README.md @@ -29,7 +29,7 @@ ServicePulse is the web operations console of the Particular Service Platform. I ## Guidelines -- [UI changes](guidelines/ui.md) — `src/Frontend/**`; product and design context for any UI change, the process for bigger UX/UI changes, the layout check for every UI change, and how UI code treats Bootstrap. Read it before any UI change. Skill: `servicepulse-ui`. +- [UI changes](guidelines/ui.md) — every change under `src/Frontend/**` that users can see or interact with: check the layout with mock data and state the check in the pull request, use the shared components instead of adding Bootstrap component classes, and for a change to the navigation, the page structure, or the visual direction, list assumptions and constraints for confirmation before design work starts. Skill: `servicepulse-ui`. ## Decisions and rationale diff --git a/docs/guidelines/README.md b/docs/guidelines/README.md index 171449461..ebbfb2b14 100644 --- a/docs/guidelines/README.md +++ b/docs/guidelines/README.md @@ -8,19 +8,21 @@ Write a guideline only for a rule a reviewer would enforce. When a tool can chec Name each file `short-title.md`. Each guideline contains: -- Scope: the paths it applies to, as glob patterns relative to the repository root, and the kinds of change it covers. +- Applies to: every change under paths, given as glob patterns relative to the repository root; a kind of change that is visible in the diff, such as adding a public member; or code of a certain shape, such as implementations of a type. When it combines these, say whether a change must match all of them or any of them. - Rules: each rule as one sentence with must or should. - Rationale: a link to the pull request, ADR, or `docs/` page that explains why, or one or two sentences when no record exists. - Skill: the name of the skill that helps apply the guideline, if any. -List every guideline in the Guidelines section of `docs/README.md`. +List every guideline in the Guidelines section of `docs/README.md`, with when it applies and its main rule in one clause. + +Do not mark files with comments to bring them into a guideline's scope; describe the code shape instead. A pointer comment is for a single exception that the description cannot express. ## Skills A skill is a folder `.agents/skills//` with a `SKILL.md` that follows the [Agent Skills specification](https://agentskills.io/specification). Copilot and pi read `.agents/skills/`. Claude Code reads `.claude/skills/`, so each skill also has a symbolic link `.claude/skills/` to `../../.agents/skills/`. Edit a skill only under `.agents/skills/`. - Use only the frontmatter fields the specification defines: `name`, `description`, `license`, `compatibility`, `metadata`, and `allowed-tools`. `name` matches the folder name. -- Start the `description` with when to use the skill, and name the paths and kinds of change it applies to. Agents see only the name and description until they load the skill. +- Start the `description` with when to use the skill, naming the same paths and kinds of change as the guideline's Applies to field. Agents see only the name and description until they load the skill, and in a first test they loaded a skill whose description named its trigger on every matching change and one that described only its subject on almost none. - A skill that applies a guideline sets `metadata.particular-guideline` to the guideline's path, links to the guideline in its body, and does not restate its rules. The guideline controls. - A skill that sets no rule, such as a procedure for running a test suite, omits `particular-guideline`. When a `docs/` page already covers the procedure, the skill links to it and adds only what an agent needs on top. - The `particular-` name prefix is reserved for skills synchronized across repositories. Do not edit those in one repository. diff --git a/docs/guidelines/ui.md b/docs/guidelines/ui.md index 15d051e99..f66b7b64d 100644 --- a/docs/guidelines/ui.md +++ b/docs/guidelines/ui.md @@ -1,6 +1,6 @@ # UI changes -## Scope +## Applies to - Paths: `src/Frontend/**` - Changes: anything users see or interact with in ServicePulse, such as views, components, styles, navigation, and UI copy. From 02a63a1caa3f2850932d24b3d2663dda561bcca7 Mon Sep 17 00:00:00 2001 From: Daniel Marbach Date: Fri, 13 Nov 2026 10:00:18 +0100 Subject: [PATCH 6/7] Keep the structure page of a bigger UI change about the current design --- docs/guidelines/ui.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/guidelines/ui.md b/docs/guidelines/ui.md index f66b7b64d..30719963d 100644 --- a/docs/guidelines/ui.md +++ b/docs/guidelines/ui.md @@ -20,7 +20,7 @@ - The constraints of a bigger change must cover what it has to respect regardless of the assumptions, such as requirements from `docs/PRODUCT.md`, accessibility, existing behavior, scope, and stakeholder decisions. - A bigger change should state the preservation of existing behavior as one constraint and list the behaviors it covers as review criteria, which need no separate confirmation. - Each design decision in a bigger change must name the assumption or constraint it rests on. -- A bigger change must describe the resulting navigation or page structure in a `docs/` page, new or existing, and list a new page in `docs/README.md`. +- A bigger change must leave a `docs/` page current on how the navigation or page structure works: update the page that covers it, or add one and list it in `docs/README.md`. The page describes the current design, not the change; the pull request carries the change. - The pull request of a bigger change must list its assumptions, constraints, and decisions, mark each as new, existing, or changed, and state which assumptions turned out wrong or partly wrong. - A UI change must be checked in the running UI with mock data on every existing view it can affect, at a width on each side of every layout breakpoint it can affect, and compared with the same views before the change; a change to the shell or to shared styles affects every view. - The pull request of every UI change, including a change to behavior only, must state that the layout check was done or why the change cannot affect a view's layout, and must list a view and width only for a layout difference it found, with whether the difference was fixed or accepted by the person who asked for the change. From 38ea132cf68296d9f92be09eb367e6c7a3275e6b Mon Sep 17 00:00:00 2001 From: Daniel Marbach Date: Fri, 13 Nov 2026 10:25:35 +0100 Subject: [PATCH 7/7] Sync AGENTS.md with the engineering context template --- AGENTS.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index 7368fb042..0ff59b09e 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -36,10 +36,11 @@ Every change to code under `src/` keeps `docs/` accurate. This applies to change 1. Before you change code, read `docs/README.md`. Then read the `docs/` pages, guidelines, ADRs, and upstream contracts it links for the area you change. 2. Read `docs/README.md` and each guideline it lists that applies to the change. An entry states when its guideline applies: to every change under its paths, to a kind of change, or to code of a certain shape. Decide from that statement, not from the guideline's subject. Follow each guideline that applies, and load its skill, if it names one, before you change code. The guideline controls: when the skill disagrees with it, follow the guideline and report the difference. 3. After you change code, review each `docs/` page and ADR that describes the changed behavior, configuration, or constraints. -4. Update a `docs/` page in the same change when the code makes it inaccurate or incomplete. +4. Update a `docs/` page in the same change when the code makes it inaccurate or incomplete. Write the page as the current design, so it stays true after the next change: no "now", "no longer", "used to", "previously", or "replaces". What changed goes in the pull request description. 5. Update `docs/README.md` when you add, replace, or retire a canonical source. 6. When the change conflicts with an ADR, flag the conflict in the pull request and ask the owner before you change the ADR or the code. -7. In the pull request description, or in the response for unpublished work, list the `docs/` pages you reviewed and what you changed. When no update is needed, say so and give the reason. For each guideline that `docs/README.md` lists, say whether it applies to the change and, when it does, whether you followed it; name any rule you did not follow with the reason. +7. In the pull request description, or in the response for unpublished work, list the `docs/` pages you reviewed and what you changed. When no update is needed, say so and give the reason. +8. In the pull request description, or in the response for unpublished work, add a line that starts with `Guidelines:` and names each guideline that applies to the change and whether you followed it, or says that none applies. Name any rule you did not follow, with the reason. ## Guidelines and skills