Inspiration
Small and mid-sized companies lose money on deals that look profitable. A sales team closes a Rp60.000.000 order, everyone celebrates, and six days later the supplier invoice lands before the customer has paid, so the company's cash drops below what it needs to get through the month.
This happens because two things never meet:
- Deals are approved in Jira.
- Cash lives somewhere else: a finance spreadsheet, or someone's head.
Nobody checks whether cash can carry the deal before Approve is pressed. Asking a general AI assistant doesn't help either: it will happily invent a cash projection that sounds right.
What it does
Deal Guard puts finance's cash rules directly into the Jira approval workflow. It works like this:
- It reads the company's real cash data. Finance keeps two Confluence pages: "Deal Guard Cash Position" (cash on hand, the bills the company must pay and the invoices it expects to collect, in the company's currency) and "Deal Guard Cash Policy" (the minimum cash balance and the maximum customer deposit). Sales enters each deal's value, supplier cost and dates in the Jira panel.
- A deterministic cash engine does the check. The engine walks the company's cash day by day across cash on hand, existing bills and invoices, and this deal's deposit, supplier cost and customer balance. It finds the lowest point and compares it with finance's cash floor.
- The issue panel shows the result. Every deal gets a verdict (BLOCKED, NEEDS APPROVAL or OK), the full cash walk, the lowest cash and the shortfall.
- The workflow validator enforces it. The "Approve deal" transition is refused when cash would fall below the floor, and the error message contains the same numbers.
- Finance owns the numbers in Confluence. Change either page and the very next check uses it. If a page is missing, duplicated or unreadable, or the deal's own numbers are not saved yet, nothing is approved (it fails closed). A new site with no pages yet runs on clearly labelled sample data, which can never be approved, and one click on "Create cash pages" sets up both pages for finance to fill in.
- The Rovo agent finds a way to save the deal. Ask "How can this deal pass the cash check?" and the agent calls the engine. The engine searches for the smallest single change that passes, for example a 25% deposit instead of 20%, or paying the supplier on day 15. The agent saves the chosen terms only after the engine re-checks them, and terms that would still be blocked are never saved.
- The same tools are exposed as an MCP server. External AI clients (we used Claude) get the identical verdict and are refused in the same way.
- A Teamwork Graph connector publishes every verdict checked on company data as an
atlassian:dealobject. Finance can search Rovo for blocked deals across the organization without opening a single issue.
The core principle: AI proposes, the engine decides. AI never produces the numbers, and it can never talk a deal past the check.
How we built it
- One Forge app that runs on Atlassian. There are no external servers and no egress; data stays in the customer's Atlassian site. It is eligible for the Runs on Atlassian program.
- Modules used:
- Jira:
jira:issuePanel(UI Kit),jira:workflowValidator, an indexedjira:entityPropertyfor the saved terms, and an issue-updated trigger. - Rovo:
rovo:agentwith threeactions (check-deal,propose-deal-fixes,apply-deal-terms). - MCP:
rovo:mcp, which exposes those same three actions as MCP tools. - Teamwork Graph:
graph:connector, which writesatlassian:dealobjects through@forge/teamwork-graph.
- Jira:
- Deterministic core. The cash engine is pure TypeScript with integer arithmetic in whole currency units and basis-point percentages, covered by 273 unit tests. It comes from our earlier DealTwin project (disclosure below).
- Confluence as context. Both pages are found by title and read with strict table parsers (
read:page:confluence). Amounts must be written in the cash position's currency, and money is always shown exactly as the engine returns it, never converted. "Create cash pages" useswrite:page:confluenceandread:space:confluence. - Permissions. Terms are always written as the signed-in user, so Jira's own edit permissions apply to the agent and to MCP clients.
Challenges we ran into
- MCP tools were missing. The Jira and the Confluence installations each have their own "Expose tools" toggle in Atlassian Administration. The MCP tool list stayed empty until both were enabled and the client reconnected.
- Teamwork Graph associations.
atlassian:dealobjects rejectissueIdOrKeysassociations, so we link deals through their owner and the Jira URL instead. - Agents that act. Making an AI agent change data safely meant every write goes back through the engine. The agent cannot save terms that the engine has not just verified.
Accomplishments that we're proud of
- The full loop works on a real Atlassian site with the company's own cash data: cash position and policy from Confluence, deal numbers entered in the panel, blocked, refused by the validator, a fix proposed by Rovo, saved, and approved.
- External AI follows the same rules: a real MCP session from Claude received the same BLOCKED verdict and was refused when it tried to save blocked terms.
- It is submitted to the Atlassian Marketplace.
What we learned
Context makes AI useful, but in finance the numbers have to come from something you can audit. The best split we found is to let AI explain and search, and let a deterministic engine own every number and every write.
What's next for Deal Guard
- Keep the cash position page in sync with accounting tools automatically, instead of finance updating it by hand.
- Support deals in a currency other than the company's, with an explicit exchange rate set by finance.
- Show a dashboard of deals at risk, built on the Teamwork Graph objects.
Bonus prizes: proof
| Bonus | Proof |
|---|---|
| Rovo | Rovo agent "Deal Guard" with 3 actions. Demo video 1:51–2:16. |
| MCP server | rovo:mcp module. Endpoint https://mcp.atlassian.com/forge/44a473d0-07f3-459c-908f-a26941578c42. Verified from Claude (demo video 2:16–2:33). |
| Teamwork Graph | graph:connector "Deal Guard cash verdicts" writing atlassian:deal objects, found in Rovo Search (demo video 2:33–2:46). |
| Marketplace | "Deal Guard for Jira" submitted for review: https://ecosystem.atlassian.net/browse/ECOHELP-182991 (Marketplace app 2232677018). The listing uses a separate copy of the app, because Atlassian disables installation-link sharing for submitted apps; judges get the original app through the installation link. |
Disclosure
The deterministic cash engine is adapted from DealTwin, our earlier project, which was also entered in other hackathons. Everything Atlassian-specific was built for Codegeist 2026: the Forge app, the Jira panel and validator, the Confluence cash position and policy, the Rovo agent and actions, the MCP server, the Teamwork Graph connector and the Marketplace submission. All demo data is synthetic.
Try it (for judges)
- Open the installation link and install Deal Guard on your site for Jira and Confluence.
- Add the Deal Guard cash check validator to the transition that approves a deal.
- Open a deal issue. With no cash pages yet, the panel runs on labelled sample data; click Create cash pages to create "Deal Guard Cash Position" and "Deal Guard Cash Policy", then fill in your company's numbers.
- Enter the deal's value, supplier cost and dates in the Deal Guard panel, save, and pick a deposit.
Full setup guide: https://github.com/Val1-IT/Deal-Guard-Docs
Built With
- confluence
- forge
- jira
- mcp
- react
- rovo
- teamwork-graph
- typescript
- ui-kit