Skip to content

Design Audit Downscoping - #318

Open
OliviaKnestaut wants to merge 3 commits into
mainfrom
design-audit-agent
Open

Design Audit Downscoping#318
OliviaKnestaut wants to merge 3 commits into
mainfrom
design-audit-agent

Conversation

@OliviaKnestaut

@OliviaKnestaut OliviaKnestaut commented Aug 11, 2026

Copy link
Copy Markdown

Summary by Sourcery

Establish the Owner Community design system and auditing workflow while updating dependency security exceptions and overrides.

New Features:

  • Add a comprehensive Owner Community design system specification covering tokens, themes, layout, components, Ant Design mappings, and audit rules.
  • Add a design-audit agent configuration for source-level and rendered UI compliance reviews.

Enhancements:

  • Downscope design audit dependency exceptions and refresh vulnerable transitive package overrides.

Documentation:

  • Document the Owner Community CXA visual language and detailed audit guidance in apps/ui-community/DESIGN.md.

@OliviaKnestaut
OliviaKnestaut requested a review from a team August 11, 2026 18:43
@sourcery-ai

sourcery-ai Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Reviewer's Guide

Introduces a formal, token-driven Owner Community design system reference (DESIGN.md) plus a non-invocable design-audit agent configuration, and tightens dependency overrides for security/compliance, enabling automated visual audits of the UI against the new design tokens and guidelines.

Sequence diagram for the new design-audit agent workflow

sequenceDiagram
  participant Orchestrator
  participant DesignAuditAgent
  participant AppServer as pnpm_dev_server
  participant Browser as agent-browser_ownercommunity-desktop
  participant DESIGN as DESIGN_md

  Orchestrator->>DesignAuditAgent: invoke_design_audit
  DesignAuditAgent->>AppServer: check_ownercommunity_localhost
  alt [server_unavailable]
    DesignAuditAgent->>AppServer: nohup_pnpm_dev_detached
    DesignAuditAgent->>AppServer: wait_until_ready_60s
  end
  DesignAuditAgent->>Browser: open_headed_https_ownercommunity_localhost
  DesignAuditAgent->>DESIGN: read_DESIGN_md
  DesignAuditAgent->>Browser: inspect_UI_against_tokens
  DesignAuditAgent-->>Orchestrator: audit_report
  DesignAuditAgent->>DesignAuditAgent: echo_done_to_agents_work_file
Loading

File-Level Changes

Change Details Files
Update workspace dependency overrides to newer, presumably patched versions and add overrides for additional packages.
  • Bump fast-uri override from 4.1.1 to 4.1.2.
  • Bump js-yaml override from 4.3.0 to 4.3.1 while retaining a specific 3.x mapping.
  • Update brace-expansion@2 override from 2.0.3 to 5.0.9.
  • Introduce overrides for image-size@2.0.3 and nanoid@3.3.17.
pnpm-workspace.yaml
Add a comprehensive, read-only Owner Community design system specification with machine-readable tokens and human-readable guidelines to drive audits and implementation.
  • Define color palettes, light/dark theme tokens, typography scale, spacing, radius, layout primitives, and component-level tokens for core UI elements.
  • Provide Ant Design seed, alias, and component token mappings for both light and dark themes to align AntD theming with the design system.
  • Document do/don’t guidance, audit criteria, and example findings for design deviations.
  • Include quick-start examples for CSS custom properties and TypeScript Ant Design theme objects driven by the defined tokens.
  • Configure an audit section disallowing inline styles, !important, hardcoded visual values, and enabling detailed reporting of token and CSS inconsistencies.
apps/ui-community/DESIGN.md
Introduce a GitHub design-audit agent configuration to automate auditing the UI against DESIGN.md and OwnerCommunity styling standards.
  • Define the design-audit agent metadata, model, tools, and high-level mission within GitHub agents configuration.
  • Specify strict runtime instructions for managing the app server lifecycle, using agent-browser with a headed session, and authenticating via mock OIDC users.
  • Mandate DESIGN.md as the single source of truth, forbid edits to it, and require audits to report token and style violations with structured severity and recommendations.
  • Outline required pre-audit readings, architectural principles (tokens-first, semantic styling, molecular design), and detailed rules for findings and severity levels.
  • Define an explicit audit process, including delegation rules, output format, and a completion signal file for orchestrators.
.github/agents/design-audit.md

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@sourcery-ai sourcery-ai Bot left a comment

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.

Hey - I've found 4 issues, and left some high level feedback:

  • The pnpm-workspace.yaml override for brace-expansion@2 now points to 5.0.9, which no longer matches the @2 selector in the key name; consider updating the key or the target version so the override semantics are clear and intentional.
  • In apps/ui-community/DESIGN.md, there are discrepancies between the front-matter component tokens and the markdown narrative (e.g. table striped/sorted row backgrounds), so it would be good to reconcile those so the machine-readable tokens and human guidance don’t conflict during audits.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- The `pnpm-workspace.yaml` override for `brace-expansion@2` now points to `5.0.9`, which no longer matches the `@2` selector in the key name; consider updating the key or the target version so the override semantics are clear and intentional.
- In `apps/ui-community/DESIGN.md`, there are discrepancies between the front-matter component tokens and the markdown narrative (e.g. table striped/sorted row backgrounds), so it would be good to reconcile those so the machine-readable tokens and human guidance don’t conflict during audits.

## Individual Comments

### Comment 1
<location path="apps/ui-community/DESIGN.md" line_range="882" />
<code_context>
+- **Weight:** 400
+- **Line height:** 1.5
+- **Letter spacing:** 0em
+- **Role:** Default text style used for paragraphs, form fields, menus, tables, and most component
+
+### Body Bold
</code_context>
<issue_to_address>
**issue (typo):** Fix grammar in the Body typography role description.

Change "and most component" to "and most components," and add a final period for consistency with other role descriptions.

```suggestion
- **Role:** Default text style used for paragraphs, form fields, menus, tables, and most components.
```
</issue_to_address>

### Comment 2
<location path="apps/ui-community/DESIGN.md" line_range="956" />
<code_context>
+
+## Elevation
+
+**Overlay Treatment:** used behind modals, drawers, and popovers
+- **Light mode:** '(rgba(26,26,26,0.2)'
+- **Dark mode:** rgba(249,246,246,0.2)
+
</code_context>
<issue_to_address>
**issue (typo):** Correct the overlay light-mode value formatting.

The light-mode overlay value includes an extra quote and unmatched parenthesis: `'(rgba(26,26,26,0.2)'`. Please update it to `rgba(26,26,26,0.2)` to match the token definition and keep the docs accurate.

```suggestion
- **Light mode:** rgba(26,26,26,0.2)
```
</issue_to_address>

### Comment 3
<location path="apps/ui-community/DESIGN.md" line_range="985-988" />
<code_context>
+### Secondary Button
+**Role:** Secondary action paired with the primary button
+
+Background `transparent`
+Text `colors.primary.text-secondary`
+Border Radius `rounded.md`
+Padding `padding.sm padding.md`
+Height `spacing.2xl`
+Typography `typography.body`
</code_context>
<issue_to_address>
**issue:** Align token names for Secondary Button with the defined token conventions.

This section should reference the same token namespaces used elsewhere: `colors.theme.*` for colors and `spacing.*` for spacing. Please update `Text` to `colors.theme.text-secondary` and `Padding` to `spacing.sm spacing.md` to match the token definitions above.
</issue_to_address>

### Comment 4
<location path=".github/agents/design-audit.md" line_range="3-4" />
<code_context>
+---
+name: design-audit
+description: >
+  A design agent made for the purpose of auditing existing codebases compliance towards OwnerCommunity styling. Not meant for creating new designs, but rather auditing existing codebases for compliance with OwnerCommunity styling. The agent will read the codebase and report any issues found, along with suggestions for fixes.
+
+model: kimi-k2.7-code
</code_context>
<issue_to_address>
**issue (typo):** Improve grammar in the agent description around "codebases compliance towards".

The phrase "auditing existing codebases compliance towards OwnerCommunity styling" is ungrammatical. Please update it to use a possessive and a more natural preposition, e.g. "auditing existing codebases' compliance with OwnerCommunity styling."

```suggestion
description: >
  A design agent made for the purpose of auditing existing codebases' compliance with OwnerCommunity styling. Not meant for creating new designs, but rather auditing existing codebases for compliance with OwnerCommunity styling. The agent will read the codebase and report any issues found, along with suggestions for fixes.
```
</issue_to_address>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Comment thread apps/ui-community/DESIGN.md Outdated
Comment thread apps/ui-community/DESIGN.md Outdated
Comment thread apps/ui-community/DESIGN.md
Comment thread .github/agents/design-audit.md
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.

2 participants