Skip to content

[$175] [Rules Revamp] Release 5: AI-assisted rule creation and unsupported-request capture #92743

Open

Description

@JmillsExpensify

Background

R1–R3 built a consistent, centralized, contextual deterministic rules foundation. This release makes supported rules easier to author with AI and gives us a direct signal on rules customers want that we do not yet support.

An admin describes the rule they want in natural language; we parse it into the structured criteria/action of the existing creation UI and present it for confirmation, so the saved rule stays deterministic and understandable. The AI translates intent into a draft rule; it does not enforce anything itself.

Scope

  • Add an AI-driven entry to the New rule flow: a prompt where the admin describes the desired rule.
  • Parse the prompt into the corresponding rule in the existing rules configuration UI for review and save.
  • Support creating one rule at a time.
  • Handle three non-happy paths via inline form errors under the prompt: unsupported rule, unintelligible input, and multiple rules in one prompt

Product and design details

Happy path: supported rule

Image

The New rule entry offers "Create a new rule — describe your rule and Concierge will build it." The admin types a prompt (e.g. "Ask for a description for all meals expenses above 1000 USD") and taps Next. A Build rule manually affordance remains for the deterministic flow.

We map the prompt to the right rule type and pre-fill the existing configuration UI — for the example above, the Require fields branch with Category = Meals and Entertainment, Amount above $1,000, and Description checked. The admin sees this populated, deterministic rule and confirms via Save rule. The final saved object is identical to one built manually.

One rule at a time: we support exactly one rule per prompt. If a prompt implies multiple rules, we do not build any of them for now; we surface the inline error described below and ask the admin to split them. This will be resolved in a future release.

Error handling (inline, under the prompt)

All three non-happy paths render as an inline error beneath the prompt field (red-dot indicator + message), consistent with the mocks. The prompt text is preserved, and Build rule manually and Next remain available so the admin can edit and retry or switch to the manual flow. These are not separate full pages.

  • Unsupported rule: the request is understood but the deterministic engine can't express it. Error copy names the unsupported area and notes it's on our radar, e.g. "Travel booking rules aren't supported yet — we're working on it. Please try a different rule for now." We capture the requested criteria/action and forward the request and use case to the product team for prioritization. Where relevant, we can also encourage the admin to create a custom agent that can enforce it.
Image
  • Unintelligible input: we can't parse the input into a legible rule. Error copy invites a clearer phrasing with an example, e.g. "Try phrasing your rule like: if expenses have a value over $100, then require a receipt."
Image
  • Multiple rules in one prompt: the prompt describes more than one rule. We build none and show, e.g. "One rule at a time, please — try describing a single rule, like: block gift card purchases." The admin edits the prompt down to a single rule and retries; they can create the rest after saving this one.
Image

Determinism and confirmation

AI only drafts; the admin always sees and confirms the structured rule before save. No rule is saved without an explicit confirmation step.

Examples

  • "Ask for a description for all meals expenses above 1000 USD" → pre-filled Require fields rule (Meals and Entertainment, above $1,000, Description checked) shown for confirmation, then saved.
  • "Block retail on all cards" → pre-filled Restrict card spend rule for confirmation.
  • "Block travel bookings if it's over $2,000" → inline unsupported-rule error ("Travel booking rules aren't supported yet…"); request captured and forwarded to product.
  • "dsadadsadafa" → inline unintelligible-input error with a phrasing example.
  • "Block gift cards and require receipts over $50" → inline multiple-rules error ("One rule at a time, please…"); nothing is built until the admin narrows to a single rule.
Issue OwnerCurrent Issue Owner: @Krishna2323
Upwork Automation - Do Not Edit

Activity

  1. added
    InternalRequires API changes or must be handled by Expensify staff
    NewFeatureSomething to build that is a new item.
    on Jun 4, 2026
  2. melvin-bot commented on Jun 4, 2026

    @melvin-bot

    Current assignee @dubielzyk-expensify is eligible for the NewFeature assigner, not assigning anyone new.

  3. 61 remaining items

  4. MelvinBot commented on Oct 25, 2026

    @MelvinBot
    Contributor

    I updated Remove the describeRule beta to keep Describe agent rule on New rule.

    • It now appears after the four rule types and above the describe section (RulesNewPage.tsx:121-129).
    • It stays hidden when New rule opens for a category, as before.
    • Its translations and Sentry label are back.

    Typecheck passes, and RulesNewPageDescribeRuleTest passes 17/17, including new checks for this option.

    ⚠️ No screenshots yet. My web test session showed a blank page again after onboarding stalled.

  5. changed the title [-][Rules Revamp] Release 5: AI-assisted rule creation and unsupported-request capture[/-] [+][$175] [Rules Revamp] Release 5: AI-assisted rule creation and unsupported-request capture[/+] on Oct 26, 2026
  6. melvin-bot commented on Oct 26, 2026

    @melvin-bot
  7. melvin-bot commented on Oct 26, 2026

    @melvin-bot

    @Krishna2323 / @situchan

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.5.20-5 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

    Contributor+ Checklist: The following checklist (instructions) needs to be completed before this issue can be closed:

    • [@Krishna2323 / @situchan] Please propose regression test steps to ensure the new feature will work correctly on production in further releases.
    • [] Link the GH issue for creating/updating the regression test once above steps have been agreed upon.

    If no checklist is needed for this issue, use the K2 [no checklist button].

  8. JmillsExpensify commented on Oct 27, 2026

    @JmillsExpensify
    ContributorAuthor

    Regression period.

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

Metadata

Metadata

Labels

InternalRequires API changes or must be handled by Expensify staffNewFeatureSomething to build that is a new item.ReviewingHas a PR in reviewSkip PaymentSkips all the payment process steps for an issue. Use it for fixed-price projects.WeeklyKSv2

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions