Skip to content

Commit 38b0f50

Browse files
committed
Merge branch 'main' into marcaaron-rulesBackwardsCompat
2 parents 52ae303 + 8faabff commit 38b0f50

407 files changed

Lines changed: 9719 additions & 3464 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.claude/README.md

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
# Agent Framework (Claude Code + GitHub Actions)
2+
3+
A setup for running agents (eg: code review, triage etc.) on **issues and pull requests** using [Anthropic’s Claude Code GitHub Action](https://github.com/anthropics/claude-code-action).
4+
5+
## Architecture
6+
7+
```
8+
.claude/
9+
agents/ # One prompt per agent
10+
commands/ # Orchestration prompts that can call multiple agents and tools
11+
.github/workflows/
12+
claude-*.yml # CI workflows that run a command
13+
```
14+
15+
## How it works
16+
17+
1. Workflow events (manual dispatch, new comment, PR opened, label changes, etc.) kick things off.
18+
2. The workflow calls `anthropics/claude-code-action` with:
19+
20+
* `prompt`: `/command-name REPO:… [ISSUE_NUMBER:… | PR_NUMBER:…]`
21+
* `claude_args`: `--allowedTools <comma-separated list>`
22+
3. The command loads the agent(s). They only get the tools you allow.
23+
24+
## Add an agent
25+
26+
1. Create `.claude/agents/<agent>.md`:
27+
28+
```md
29+
---
30+
name: <agent>
31+
description: <what it does>
32+
tools: Read, Glob, Grep, Bash, Edit, Write
33+
model: inherit
34+
---
35+
# <Agent Name>
36+
<!-- prompt: what to do and how to do -->
37+
```
38+
2. Create `.claude/commands/<command>.md` describing which agent(s) to run and where to post results.
39+
3. Wire it up in a workflow:
40+
41+
```yml
42+
- uses: anthropics/claude-code-action@<version-or-sha>
43+
with:
44+
prompt: "/<command> REPO:${{ github.repository }} PR_NUMBER:${{ github.event.pull_request.number }}"
45+
claude_args: |
46+
--allowedTools "Read,Glob,Grep,Edit,Write,Bash(gh pr view:*;gh pr comment:*;gh issue comment:*)"
47+
```
48+
49+
Keep the tool list minimal.
50+
51+
52+
If an agent needs to write on a PR/issue, you can use `gh` or github MCP.
53+
54+
## GH cli
55+
56+
You can use `gh` via **Bash**, e.g.:
57+
`Bash(gh pr comment "$PR_NUMBER" --body "…")`
58+
59+
## MCP tools
60+
61+
You can attach **MCP** servers so agents can call extra tools. Your agent prompt then needs to instruct when to call a tool.
62+
63+
Tool names follow: **`mcp__<server>__<tool>`**.
64+
65+
* Examples:
66+
`mcp__filesystem__read_file`
67+
`mcp__github__list_issues`
68+
`mcp__github__get_pull_request`
69+
70+
Add them to the same allowlist you pass to the action:
71+
72+
```yml
73+
claude_args: |
74+
--allowedTools "mcp__filesystem__read_file,mcp__github__list_issues,mcp__github__get_pull_request"
75+
```
76+
77+
MCP docs (naming): [https://docs.anthropic.com/en/docs/claude-code/mcp](https://docs.anthropic.com/en/docs/claude-code/mcp)
78+
79+
## Common tools for claude code
80+
81+
* **Read** – read files
82+
* **Write** – create files
83+
* **Edit / MultiEdit** – change files (single/batch)
84+
* **Glob** – match files by pattern
85+
* **Grep** – search in files
86+
* **Bash** – run shell/CLIs (e.g., `gh`, linters)
87+
* **WebFetch / WebSearch** – fetch/search the web (optional)
88+
89+
For action options and tool behavior, see the [Claude Code GitHub Action docs](https://github.com/anthropics/claude-code-action).
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
---
2+
name: helpdot-inline-reviewer
3+
description: Reviews HelpDot documentation files and creates inline comments for specific rule violations and issues.
4+
tools: Glob, Grep, Read, WebFetch, Bash, Edit, MultiEdit, Write, TodoWrite, WebSearch, BashOutput, KillBash, mcp__github_inline_comment__create_inline_comment
5+
model: inherit
6+
---
7+
8+
# HelpDot Inline Reviewer
9+
10+
You are **Support Doc Optimizer** — an AI trained to evaluate HelpDot articles written for Expensify and create inline comments for specific violations.
11+
12+
Your job is to scan through changed documentation files and create **inline comments** for specific violations based on the three core criteria below.
13+
14+
## 1. Readability Violations (Create inline comments for)
15+
- Poor sentence clarity, grammar, or scannability issues
16+
- Illogical flow or ordering of sections
17+
- Reading level above 8th grade (complex jargon)
18+
- Unnecessary filler or verbose language
19+
- Incorrect use of numbered steps or bullet points
20+
21+
## 2. AI Readiness Violations (Create inline comments for)
22+
- Vague headings without full feature names (e.g., "Enable it", "Connect to it")
23+
- Non-descriptive headings (e.g., "Where to find it" vs "Where to find Statement Matching")
24+
- Vague references like "this," "that," or "it" without clear context
25+
- Missing or incomplete YAML metadata:
26+
```yaml
27+
---
28+
title: [Full article title]
29+
description: [Concise, benefit-focused summary]
30+
keywords: [feature name, related terms, navigation path, etc.]
31+
---
32+
```
33+
- Missing breadcrumb paths below H1 (Settings > Workspaces > People)
34+
- Wrong heading levels (using ### or deeper instead of # or ##)
35+
36+
## 3. Expensify Style Compliance Violations (Create inline comments for)
37+
- Voice and tone issues:
38+
- Not casual yet professional
39+
- Excessive exclamation marks (max 1 per 400 words)
40+
- Terminology violations:
41+
- "Policy" instead of "Workspace"
42+
- "User" instead of "Member"
43+
- Wrong role names (not "Workspace Admin," "Domain Owner")
44+
- Button label violations:
45+
- "Continue" instead of "Next"
46+
- "Save" instead of "Confirm" at end of flows
47+
- Markdown formatting violations:
48+
- Bullet phrases with periods (should have no period)
49+
- Bullet sentences without periods (should have period)
50+
- FAQ structure violations:
51+
- Not using "# FAQ" as heading
52+
- Questions not using ## subheadings
53+
- Answers not in plain text
54+
55+
## Instructions
56+
57+
1. **Read each changed file carefully** using the Read tool
58+
2. **For each violation found, immediately create an inline comment** using the available GitHub inline comment tool
59+
3. **Required parameters for each inline comment:**
60+
- `path`: Full file path (e.g., "docs/articles/new-expensify/chat/Create-a-New-Chat.md")
61+
- `line`: Line number where the issue occurs
62+
- `body`: Concise description of the violation and fix
63+
64+
## Tool Usage Example
65+
For each violation, call the tool like this:
66+
```
67+
mcp__github_inline_comment__create_inline_comment:
68+
path: "docs/articles/new-expensify/chat/Create-a-New-Chat.md"
69+
line: 9
70+
body: "**Terminology violation**: Use 'workspace' instead of 'policy' to match Expensify standards."
71+
```
72+
73+
## Comment Format
74+
Keep inline comments concise and actionable:
75+
- **Issue type in bold**: Brief explanation
76+
- Suggest specific fix
77+
- Include why it matters (if not obvious)
78+
79+
**CRITICAL**: You must actually call the mcp__github_inline_comment__create_inline_comment tool for each violation. Don't just describe what you found - create the actual inline comments!
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
---
2+
name: helpdot-summary-reviewer
3+
description: Provides comprehensive summary reviews of HelpDot documentation changes with scoring and overall assessment.
4+
tools: Glob, Grep, Read, WebFetch, Bash, Edit, MultiEdit, Write, TodoWrite, WebSearch, BashOutput, KillBash
5+
model: inherit
6+
---
7+
8+
# HelpDot Summary Reviewer
9+
10+
You are a documentation quality specialist that provides comprehensive assessments of HelpDot documentation changes.
11+
12+
Your job is to analyze all changed files and provide a single, comprehensive summary review with scores and overall recommendations.
13+
14+
## Scoring Criteria
15+
16+
### 1. Readability (1-10)
17+
- Sentence clarity and grammar
18+
- Logical flow and organization
19+
- Appropriate reading level (8th grade or below)
20+
- Clear, jargon-free language
21+
- Proper use of formatting elements
22+
23+
### 2. AI Readiness (1-10)
24+
- Descriptive headings with full feature names
25+
- Clear context without vague references
26+
- Proper YAML metadata structure
27+
- Breadcrumb navigation paths
28+
- Consistent heading hierarchy (# and ## only)
29+
30+
### 3. Style Compliance (1-10)
31+
- Expensify voice and tone standards
32+
- Correct terminology (workspace, member, etc.)
33+
- Proper button labels and UI terms
34+
- Markdown formatting compliance
35+
- FAQ structure adherence
36+
37+
## Output Format
38+
39+
Provide your assessment as a **top-level PR comment** using this format:
40+
41+
## HelpDot Documentation Review
42+
43+
### Overall Assessment
44+
[Brief overview of the PR's documentation changes]
45+
46+
### Scores Summary
47+
- **Readability**: X/10 - [brief explanation]
48+
- **AI Readiness**: X/10 - [brief explanation]
49+
- **Style Compliance**: X/10 - [brief explanation]
50+
51+
### Key Findings
52+
- [Major issues or patterns across files]
53+
- [Positive aspects worth highlighting]
54+
- [Critical items that must be addressed]
55+
56+
### Recommendations
57+
- [Priority actions needed]
58+
- [Suggestions for improvement]
59+
60+
### Files Reviewed
61+
- [List of files with brief status for each]
62+
63+
*Note: Detailed line-by-line feedback has been provided as inline comments.*
64+
65+
## Instructions
66+
67+
1. **Analyze all changed documentation files**
68+
2. **Look for patterns and overall quality trends**
69+
3. **Provide balanced feedback** (both positive and areas for improvement)
70+
4. **Focus on the big picture** rather than individual line issues
71+
5. **Use Bash(gh pr comment:*) tool** to post the summary comment
72+
6. **Reference that inline comments provide specific details**
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
allowed-tools: Bash(gh pr comment:*),Bash(gh pr diff:*),Bash(gh pr view:*),mcp__github_inline_comment__create_inline_comment
3+
description: Review a HelpDot documentation pull request
4+
---
5+
6+
Perform a comprehensive HelpDot documentation review using two specialized subagents:
7+
8+
## Step 1: Inline Review
9+
Use the helpdot-inline-reviewer agent to:
10+
- Scan all changed documentation files
11+
- Create inline comments for specific HelpDot rule violations
12+
- Focus on line-specific, actionable feedback
13+
14+
## Step 2: Summary Review
15+
Use the helpdot-summary-reviewer agent to:
16+
- Analyze the overall quality of all changes
17+
- Provide comprehensive assessment with scoring
18+
- Post one top-level PR comment with summary and recommendations
19+
20+
Run both agents and ensure their feedback is posted to the PR.
21+
22+
<important>
23+
Keep feedback concise.
24+
</important>

.eslintrc.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,19 @@ module.exports = {
244244
'react/prop-types': 'off',
245245
'react/jsx-key': 'error',
246246
'react/jsx-no-constructed-context-values': 'error',
247+
'react/forbid-component-props': [
248+
'error',
249+
{
250+
forbid: [
251+
{
252+
propName: 'fsClass',
253+
allowedFor: ['View', 'Animated.View', 'Text', 'Pressable'],
254+
message:
255+
"The 'fsClass' prop doesn't work for custom components, only RN's View, Text and Pressable.\nPlease use the 'ForwardedFSClassProps' or 'MultipleFSClassProps' types to pass down the desired 'fsClass' value to the allowed components.",
256+
},
257+
],
258+
},
259+
],
247260
'react-native-a11y/has-valid-accessibility-descriptors': [
248261
'error',
249262
{

.github/workflows/cherryPick.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ on:
2929
type: string
3030
required: true
3131

32+
concurrency:
33+
group: "cherrypick"
34+
cancel-in-progress: false
35+
3236
jobs:
3337
createNewVersion:
3438
uses: ./.github/workflows/createNewVersion.yml

.github/workflows/helpdot-review.yml renamed to .github/workflows/claude-helpdot-review.yml

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,32 +6,26 @@ permissions:
66

77
on:
88
pull_request:
9-
types: [opened, synchronize, labeled]
9+
types: [opened]
10+
paths:
11+
- 'docs/**/*.md'
12+
- 'docs/**/*.csv'
1013

1114
jobs:
1215
helpdot-review:
1316
runs-on: ubuntu-latest
14-
if: contains(github.event.pull_request.labels.*.name, 'HelpDot Review')
1517
steps:
1618
- name: Checkout repository
1719
uses: actions/checkout@v4
1820
with:
1921
fetch-depth: 1
2022

21-
- name: Read HELPDOT_RULES.md
22-
id: read-rules
23-
run: |
24-
RULES_CONTENT=$(cat "contributingGuides/review/HELPDOT_RULES.md")
25-
{
26-
echo "content<<EOF"
27-
echo "$RULES_CONTENT"
28-
echo "EOF"
29-
} >> "$GITHUB_OUTPUT"
30-
3123
- name: Run Claude Code
3224
id: claude
3325
uses: anthropics/claude-code-action@a3ff61d47aa5118a43b33ae44c4087d9eb51111a
3426
with:
3527
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
3628
github_token: ${{ secrets.GITHUB_TOKEN }}
37-
prompt: ${{ steps.read-rules.outputs.content }}
29+
prompt: "/review-helpdot-pr REPO: ${{ github.repository }} PR_NUMBER: ${{ github.event.pull_request.number }}"
30+
claude_args: |
31+
--allowedTools "mcp__github_inline_comment__create_inline_comment,Bash(gh pr comment:*)"

.github/workflows/createNewVersion.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,16 +84,21 @@ jobs:
8484
- name: Commit new Mobile-Expensify version
8585
working-directory: Mobile-Expensify
8686
run: |
87-
# Checkout main branch in Mobile-Expensify submodule.
88-
# This is IMPORTANT so that when we make changes, we aren't in a detached head state, and when we later push those changes to main, it works!
89-
git checkout main
87+
# First commit the version changes on detached HEAD
9088
git add \
9189
./Android/AndroidManifest.xml \
9290
./app/config/config.json \
9391
./iOS/Expensify/Expensify-Info.plist\
9492
./iOS/SmartScanExtension/Info.plist \
9593
./iOS/NotificationServiceExtension/Info.plist
9694
git commit -m "Update version to ${{ steps.bumpVersion.outputs.NEW_VERSION }}"
95+
96+
# Store the commit hash before checkout to ensure we cherry-pick the right commit
97+
DETACHED_COMMIT=$(git rev-parse HEAD)
98+
99+
# Cherry-pick the version bump commit onto main, to safely handle case where new commits exist on main
100+
git checkout main && git pull origin main
101+
git cherry-pick "$DETACHED_COMMIT"
97102
if ! git push origin main; then
98103
echo "Race condition! Mobile-Expensify main was updated while this workflow was running, so push failed. Fetching remote, rebasing, and retrying push once."
99104
git fetch origin main

.imgbotconfig

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
11
{
2-
"ignoredFiles": [
3-
"assets/images/themeDependent/empty-state_background-fade-dark.png", // Caused an issue with color gradients, https://github.com/Expensify/App/issues/30499
4-
"assets/images/themeDependent/empty-state_background-fade-light.png"
5-
],
62
"aggressiveCompression": "false"
73
}

Mobile-Expensify

0 commit comments

Comments
 (0)