Repository navigation
Let the Expense Review assistant read the code to explain rules - #132
Conversation
The assistant session opts in to CAES AI's read-only GitHub tools, and the instructions are rewritten for financial analysts: start with the data, treat classifications as data rather than code, open the file that holds a rule directly, and say what Data Classification can change. Does not compile until UCDavis.CaesAi.AppSdk ships McpServers and the package version is bumped. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
sprucely
left a comment
There was a problem hiding this comment.
Codex suggested some changes to assistant instructions to cover some edge cases. Everything else looks good.
Say what separates grouped rows, keep the include state when narrowing a view, limit the 531010 Hatch rule to UCPath, and stop promising that a classification change will include a row. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
sprucely
left a comment
There was a problem hiding this comment.
A couple more suggested tweaks...
| - Data Classification has six tabs. Financial Dept sets whether a department is AES, which makes its expenses eligible for the report. Natural Account, Activity, and Purpose each set whether a code is included in AD419. Fund assigns an SFN to an included fund, or Multiple when the fund does not map to a single SFN, or marks the fund Excluded. ERN sets whether an ERN code counts toward FTE. | ||
| - ERN classification affects FTE only. It never changes dollar amounts. | ||
| - Transactions on fund 13U02, or on an SFN 204 project that is on the cycle's project list, are included whatever their purpose is classified as. | ||
| - When a row is excluded or unclassified by financial department, fund, account, activity, or purpose, and the row has a code in that segment, tell the user they can change that in Data Classification and name the tab. A row with no code in a segment, such as an expense with no activity, shows as unclassified for it, and there is no code on the tab to change. Say so rather than sending the user to the tab. |
There was a problem hiding this comment.
[P2] Check that a code is editable before directing an analyst to its tab
Line 41 tells the assistant to recommend a tab whenever the expense has a code. The integration test covers fund F-DX, whose only expense belongs to an excluded department. The expense has a fund code, yet the Fund tab hides it. Qualify the recommendation by whether the code is eligible to appear, and explain the blocking department classification in this case.
| - When a row is excluded or unclassified by financial department, fund, account, activity, or purpose, and the row has a code in that segment, tell the user they can change that in Data Classification and name the tab. A row with no code in a segment, such as an expense with no activity, shows as unclassified for it, and there is no code on the tab to change. Say so rather than sending the user to the tab. | ||
| - Exclusion by date, by an account that overlaps between AE and UCPath, by a UCPath expense on account 531010 on a Hatch fund, or by an SFN 204 project that is not on the project list comes from fixed rules. It cannot be changed in Data Classification. The 531010 rule applies to UCPath only. An AE expense on account 531010 and a Hatch fund is not excluded by it. | ||
| - A row with no SFN derived can sometimes be fixed on the Fund tab. The SFN comes from the fund's classification, and when the fund is Multiple it comes from the transaction's project. If the fund is unclassified, classifying it can resolve the SFN. A single SFN resolves it. Multiple resolves it only when the project maps to one SFN. If the fund is Multiple and the project does not resolve to a single SFN, Data Classification cannot fix it. Resolving the SFN includes the row only if no other exclusion reason applies, so do not promise that a change will include a row. | ||
| - Data Classification lists only codes that can still change the report. A code whose transactions are all excluded by a fixed rule, or by another code that is classified as excluded, does not appear there. A code still appears while another code on the same transactions is unclassified, so classifying it may not be enough to include the row. When the user cannot find a code on a tab, or asks why one is listed, read the rules for which codes appear before you answer. |
There was a problem hiding this comment.
[P2] Describe visibility using the rules for the specific tab
Line 44 says another excluded code hides a candidate when it excludes all of that candidate’s transactions. For example, a department can still appear when its only expense has an excluded activity. The department’s visibility depends on the SFN, account, and purpose, and the activity classification has no effect on it. Direct the assistant to use the eligibility rules for the tab before explaining why a code appears or is missing.
Summary
The Expense Review assistant can now read the code in the public
ucdavis/AD419repository to explain the rules behind the data, such as why a row is excluded or how an SFN is derived. Its instructions are rewritten around that.Changes
McpServers: ["github"]docs/expense-review-assistant.mdhas a new Reading the code sectionUCDavis.CaesAi.AppSdkgoes from 0.2.0-beta.1 to 0.2.0-beta.2Before this ships
CAES_AI_GITHUB_MCP_TOKENset. Without it, CAES AI rejects session creation and the whole assistant reports that it is unavailable, not only the GitHub tools. The test instance was deployed with the token secret on 2026-11-18. Other instances have not been checkedThe earlier blockers are cleared: ucdavis/caes-ai#23 is merged and deployed to the test instance, and
UCDavis.CaesAi.AppSdk0.2.0-beta.2 is published withMcpServers.server/server.csprojnow references it.What the instructions now do
Notes
main, which can be slightly ahead of what is deployed. The instructions tell it soTesting
🤖 Generated with Claude Code