Skip to content

[No QA] Update AI Agent help docs - #100263

Merged
strepanier03 merged 1 commit into
mainfrom
melvin-ai-agent-help-docs
Sep 4, 2026
Merged

strepanier03 merged 1 commit into
mainfrom
melvin-ai-agent-help-docs

Conversation

@MelvinBot

Copy link
Copy Markdown
Contributor

Explanation of Change

These two help articles are generated from Web-Expensify, not hand-written. lib/ReportActionDescriptions.php and lib/AgentCapabilityDescriptions.php are the same source of truth that builds the prompt text the agent itself sees, so when that text changes the public reference has to change with it or admins are told to write instructions against events and actions that no longer behave that way.

This PR is the regenerated output of php script/generateCustomAgentTriggers.php and php script/generateCustomAgentCapabilities.php, run against Expensify/Web-Expensify at main (4ed6dc63503d0427da16cfc14ac8a50cf9c008de), written verbatim. No content was authored by hand.

What moved since the last regeneration:

AI-Agent-Triggers.md (121 → 123 events)

  • The SmartScan-finished trigger no longer says it only applies to submitted expenses. Following Expensify/Web-Expensify#55432 (and its Auth counterpart), a scan that completes on a draft report fires the trigger too, so the description and its example phrases now cover both cases. The old wording told admins the draft case produced no action, which is now wrong.
  • Two new approval-workflow events: an admin changing a member's over-limit approver, and an admin changing the amount that routes a member's reports to that extra approver.

AI-Agent-Capabilities.md (19 → 20 capabilities)

  • New "reject individual expenses" capability, for rejecting selected expenses out of a submitted report while the compliant ones continue through approval.
  • The existing whole-report reject goal now says "an entire Outstanding (submitted) expense report" so the two are not confused.

Fixed Issues

$
PROPOSAL:

Tests

// TODO: The human co-author must fill out the tests you ran before marking this PR as "ready for review"
// Please describe what tests you performed that validates your changed worked.

These are two generated markdown help articles under docs/articles/. No app code, no docs routing or config, and no redirects.csv entry changed, so the App code test bundle (lint, typecheck, jest, storybook) does not apply. To re-verify the content, check out Expensify/Web-Expensify at main and re-run the two generator scripts — the output should match these files byte for byte.

  • Verify that no errors appear in the JS console

Offline tests

QA Steps

No QA — this changes help-site article content only. It ships no product behavior for QA to exercise.

  • Verify that no errors appear in the JS console

PR Author Checklist

  • I linked the correct issue in the ### Fixed Issues section above
  • I wrote clear testing steps that cover the changes made in this PR
    • I added steps for local testing in the Tests section
    • I added steps for the expected offline behavior in the Offline steps section
    • I added steps for Staging and/or Production testing in the QA steps section
    • I added steps to cover failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
    • I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
    • I tested this PR with a High Traffic account against the staging or production API to ensure there are no regressions (e.g. long loading states that impact usability).
  • I included screenshots or videos for tests on all platforms
  • I ran the tests on all platforms & verified they passed on:
    • Android: Native
    • Android: mWeb Chrome
    • iOS: Native
    • iOS: mWeb Safari
    • MacOS: Chrome / Safari
  • I verified there are no console errors (if there's a console error not related to the PR, report it or open an issue for it to be fixed)
  • I followed proper code patterns (see Reviewing the code)
    • I verified that comments were added to code that is not self explanatory
    • I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
    • I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is either coming verbatim from figma or has been approved by marketing (in order to get marketing approval, ask the Bug Zero team member to add the Waiting for copy label to the issue)
  • If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
  • I followed the guidelines as stated in the Review Guidelines
  • I tested other components that can be impacted by my changes (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar are working as expected)
  • If a new CSS style is added I verified that:
    • A similar style doesn't already exist
    • The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))
  • If new assets were added or existing ones were modified, I verified that:
    • The assets are optimized and compressed (for SVG files, run npm run compress-svg)
    • The assets load correctly across all supported platforms.
  • If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
  • If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
  • If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
  • If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
  • If the PR modifies the UI (e.g. new buttons, new UI components, changing the padding/spacing/sizing, moving components, etc) or modifies the form input styles:
    • I verified that all the inputs inside a form are aligned with each other.
    • I added Design label and/or tagged @Expensify/design so the design team can review the changes.
  • I added unit tests for any new feature or bug fix in this PR to help automatically prevent regressions in this user flow.
  • If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.

Screenshots/Videos

Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari

Co-authored-by: Yuwen Memon <yuwenmemon@users.noreply.github.com>
@OSBotify

OSBotify commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

A preview of your ExpensifyHelp changes have been deployed to https://547206bf.helpdot.pages.dev ⚡️

Updated articles:

@yuwenmemon
yuwenmemon marked this pull request as ready for review September 4, 2026 04:54
@melvin-bot

melvin-bot Bot commented Sep 4, 2026 •

Copy link
Copy Markdown

Concierge reviewer checklist:

  • I have verified the accuracy of the article
    • The article is within a hub that makes sense, and the navigation is correct
    • All processes, screenshots, and examples align with current product behavior.
    • All links within the doc have been verified for correct destination and functionality.
  • I have verified the readability of the article
    • The article's language is clear, concise, and free of jargon.
    • The grammar, spelling, and punctuation are correct.
    • The article contains at least one image, or that an image is not necessary
  • I have verified the formatting of the article
    • The article has consistent formatting (headings, bullet points, etc.) with other HelpDot articles and that aligns with the HelpDot formatting standards.
    • The article has proper text spacing and breaks for readability.
  • I have verified the article has the appropriate tone and style
    • The article's tone is professional, friendly, and suitable for the target audience.
    • The article's tone, terminology, and voice are consistent throughout.
  • I have verified the overall quality of the article
    • The article is not missing any information, nor does it contain redundant information.
    • The article fully addresses user needs.
  • I have verified that all requested improvements have been addressed

For more detailed instructions on completing this checklist, see How do I review a HelpDot PR as a Concierge Team member?

cc @strepanier03

@melvin-bot
melvin-bot Bot requested review from strepanier03 and removed request for a team September 4, 2026 04:54
@melvin-bot

melvin-bot Bot commented Sep 4, 2026

Copy link
Copy Markdown

@strepanier03 Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button]

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 4, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-04T05:07:38.259266Z 2e48d1f Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

## How to write instructions that reject expense reports

**Goal:** Sends an Outstanding (submitted) expense report back to the submitter with a user-facing rejection comment explaining why.
**Goal:** Sends an entire Outstanding (submitted) expense report back to the submitter with a user-facing rejection comment explaining why.

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.

Terminology violation: Use Expensify's standard term "member" instead of "user". Consider "with a member-facing rejection comment" to match the required terminology (Member, not User) in HELP_AUTHORING_GUIDELINES.md.


To react to this event, include phrases like:
- When a member's approver for reports over a set amount is changed
- When large expense reports from a specific employee will now go to a different approver

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.

Terminology violation: Use "member" instead of "employee" to match Expensify's standard terminology (Member, not User/employee). Suggest "reports from a specific member".


To react to this event, include phrases like:
- When the approval amount for a specific member is changed
- When the amount that sends an employee's reports to an extra approver is updated

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.

Terminology violation: Use "member" instead of "employee" to match Expensify's standard terminology. Suggest "sends a member's reports to an extra approver".

@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

HelpDot Documentation Review

Overall Assessment
This PR regenerates two auto-generated AI Agent reference articles (AI-Agent-Triggers.md and AI-Agent-Capabilities.md) from their Web-Expensify source of truth. The changes are small and surgical: a corrected SmartScan trigger description, two new approval-workflow trigger events, one new reject-individual-expenses capability, a disambiguating goal edit, and updated total counts. They preserve the established structure of these documents and read as accurate, admin-facing reference content.

Scores Summary

  • Readability: 9/10 - Descriptions and example phrases are clear, scannable, and consistent with surrounding entries. The SmartScan rewrite ('It fires whether the report is still a draft or already submitted.') is a genuine clarity improvement over the old, narrower wording.
  • AI Readiness: 9/10 - Both files retain valid YAML frontmatter (title, description, keywords, internalScope), a single H1 heading, and H2-only task-based sections. The one new heading, 'How to write instructions that reject individual expenses', is task-based, searchable, and feature-specific. New trigger events reuse an existing task-based heading and follow the established bold-description + example-phrase pattern, keeping retrieval precision high.
  • Style Compliance: 9/10 - Terminology is consistent with the rest of the reference (Outstanding, Draft, submitted, approver, workspace admin, member). Product states like Outstanding/Draft are capitalized consistently with existing usage. No prohibited vague navigation language is introduced.

Key Findings

  • The SmartScan correction fixes a real accuracy bug: the old text told admins the draft case produced no action, which is now wrong. Fixing generated docs in lockstep with the prompt source is the right call.
  • The goal edit from 'an Outstanding (submitted) expense report' to 'an entire Outstanding (submitted) expense report' is a meaningful disambiguation against the new per-expense reject capability, good defensive wording.
  • New approval-workflow trigger events and the reject-individual-expenses capability are well-formed, with realistic, copy-ready phrases that match the document voice.
  • Minor: the phrase 'Reject noncompliant expenses...' introduces 'noncompliant' where surrounding copy tends to spell out 'violations'/'compliance issues.' Not blocking, as these are example prompt phrases rather than UI-exact labels.

Recommendations

  • No changes required. Since these files are generated verbatim by generateCustomAgentTriggers.php / generateCustomAgentCapabilities.php, any wording preferences (e.g., 'noncompliant') should be adjusted at the generator source in Web-Expensify, not hand-edited here.
  • Before merge, confirm the byte-for-byte regeneration claim by re-running both scripts against the referenced Web-Expensify commit, as noted in the PR description.

Files Reviewed

  • docs/articles/new-expensify/ai-agents/AI-Agent-Capabilities.md - Compliant. One new task-based capability section, one goal disambiguation edit, count updated 19 to 20.
  • docs/articles/new-expensify/ai-agents/AI-Agent-Triggers.md - Compliant. SmartScan description/phrase corrected for accuracy, two new approval-workflow events added under an existing heading, count updated 121 to 123.

Note: This is a generated-content update; feedback is scoped to the diff only.

@stephanieelliott stephanieelliott added the HelpDot Apply this label if the issue relates to ExpensifyHelp label Sep 4, 2026

@strepanier03 strepanier03 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.

Looks good!

@strepanier03
strepanier03 merged commit 531e7bc into main Sep 4, 2026
20 of 22 checks passed
@strepanier03
strepanier03 deleted the melvin-ai-agent-help-docs branch September 4, 2026 20:55
@OSBotify

OSBotify commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

🚀 Deployed to staging by https://github.com/strepanier03 in version: 9.4.73-0 🚀

platform result
🕸 web 🕸 success ✅
🤖 android 🤖 success ✅
🍎 iOS 🍎 failure ❌

@OSBotify

OSBotify commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

🚀 Deployed to production by https://github.com/mountiny in version: 9.4.73-3 🚀

platform result
🕸 web 🕸 success ✅
🤖 android 🤖 success ✅
🍎 iOS 🍎 success ✅

Bundle Size Analysis (Sentry):

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

Labels

HelpDot Apply this label if the issue relates to ExpensifyHelp

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants