Floodgate architecture: the agent proposes, a person approves
Floodgate is an Atlassian Forge app inside a Jira Service Management site, with no external hosting and no egress. Jira event triggers feed every new request into a velocity ledger in Forge SQL; a storm opens over the flood line; on review a fixed deterministic gate picks the candidates and a deterministic similarity scorer can only refuse; the stored review shows every refusal with its reason. The Rovo agent reads that review and can only store a proposal. Below the approval line, after a person presses Approve fold, an idempotent, resumable, time-budgeted executor on an Async Events queue links each request to one internal parent, replies on each customer's own request and moves it to a waiting status through Jira REST; resolving the parent proposes a close that a person approves.
JIRA SERVICE MANAGEMENT · YOUR SITE
ATLASSIAN FORGE · FLOODGATE
runtime nodejs22.x · no Forge Remote · no external hosting · no egress
WINDOW
CANDIDATES
FOLD SET
EVENTS
OPENS
ASKS
WRITES
REST WRITES
BANNER
REVIEW STORM
SNAPSHOT
APPROVE
PROGRESS
APPROVE CLOSE
PROPOSAL
FLOODGATE
ARCHITECTURE · AN ATLASSIAN FORGE APP FOR JIRA SERVICE MANAGEMENT
The agent proposes.
A person approves.
A fixed gate picks the candidates, a deterministic scorer can only take requests out, and no request is folded or closed until a person presses Approve.
Customers
raise requests on the portal
in their organizations
Requests in Jira
issues · organizations · links · comments
Jira REST v3 · JSM servicedeskapi
Support lead & agents
open Floodgate from Queues
in each service project
Rovo chat
asks the Floodgate agent
1
VELOCITY
Every arrival lands in the ledger.
storm when v(W) ≥ max(N_min, k·b)
W 15 min · k 5 · N_min 12 · b 7-day
RUNS IN
on-issue-created · core/storm.ts
2
STORM
STORM
Over the flood line, a storm row opens.
RUNS IN
flow/detect.ts
3
DETERMINISTIC GATE
FIXED
Picks the candidates. The first failing rule refuses.
SERVICE
BEFORE_STORM
CLOSED
LINKED
OPTED_OUT
NOT_CUSTOMER
RUNS IN
resolver getPreview · core/gate.ts
4
SIMILARITY SCORER
Inside the gate set only.
It can only refuse.
s = 0.75·cos(words) + 0.25·cos(4-grams)
NOT_SIMILAR
s < 0.22, or code-only
RUNS IN
core/scorer.ts · core/plan.ts
5
REVIEW
Fold set + every refusal, with reason and score.
Stored as a snapshot: Approve never rescores.
RUNS IN
preview_snapshot · flow/preview.ts
6
APPROVE FOLD
ONE PERSON · ONE PRESS · THE WHOLE FOLD SET
your Jira permissions: link, comment, transition
fold set = the one you saw (key-set hash)
gate re-run on live Jira state
each request claimed by one fold only
RUNS IN
flow/approve.ts
7
EXECUTOR
FOLDED
BUDGETED
700 s per run, then re-queues itself
IDEMPOTENT
re-reads Jira before every write
RESUMABLE
per-request state in Forge SQL
GUARDED
one writer lease; unclear write held
ORG-SAFE
reply names no other customer or org
PENDING → LINKED → REPLIED → TRANSITIONED → DONE
RUNS IN
fold-queue · 900 s · flow/executor.ts
8
CLOSE
CLOSED
Parent resolved in Jira: a close is proposed.
After a person approves the fix note, each
still-linked request gets it and is closed.
wrote back: stays open · reopened: skipped
RUNS IN
on-issue-updated · flow/cascade.ts
trigger
Jira event triggers
avi:jira:created:issue
each arrival → 1
avi:jira:updated:issue
ignoreSelf → 8
avi:forge:installed:app
schema → seeder
fold-queue
· Async Events
sql · main
Forge SQL
MySQL · no external database
1–2
request_seen
velocity_bucket
storm
3–5
preview_snapshot
refusal
AGENT
fold_job (PROPOSED)
suggested_exclusion
reply_variant
6–8
fold_job
fold_item
folded_request
SETUP
project_config
audit_event
seed_progress
seed_item
spike_probe
consumer · seed-queue
Seeder
schema migrations on install
reconcile: last 20 min by JQL
the demo storm, on request
scheduledTrigger
janitor
every 5 min
re-queues approved jobs nobody runs
hourly
every hour
quiet storms subside; old rows pruned
requestJira · as the app
Jira REST writes
POST issue
the internal parent, once
POST issueLink
“is caused by” the parent
POST request/{key}/comment
the reply, on its own request
POST issue/{key}/transitions
waiting; done only at close
PUT issue/{key}/properties
a marker on each request
Every write re-reads Jira first.
A request changed since the
review is skipped, with its reason.
Queues ›
Floodgate
jiraServiceManagement:queuePage
Floodgate queue page
Custom UI · React · @forge/bridge
ADS tokens · polls every 15 s
resolver
asks Jira for your permissions
STORM
banner + gauge
Review storm
runs 3–5 over the project’s
requests since t0 − 24 h
Rovo proposal
accept or keep each
suggested exclusion
EXCLUDED
N fold
·
M refused
each refusal stamped
with its reason
Approve fold…
one press for the whole
fold set, reply included
Keeper's log
hh:mm:ss
linked · replied
hh:mm:ss
linked · replied
hh:mm:ss
skipped, with reason
Pause · Resume · Cancel the rest
Retry N failed
Resolve incident…
Approve close
rovo:agent
Floodgate agent
reads the stored review,
drafts the reply, proposes
FOUR READS · GET
get-storm
velocity, live storms
draft-replies
facts for the reply
explain-refusal
rule, reason, score
list-weakest-folds
ten lowest scores
ASKED IN ROVO CHAT
“Why was this request
not folded?”
“Draft the reply for the
current storm and propose
the fold”
AS YOU, IN JIRA
reads need Browse projects;
a proposal needs the same
permissions as Approve
✕
never approves
✕
never writes to Jira
·
customer text is data
ONE WRITE
propose-fold
CREATE
stores a proposal only
can only take requests out
LEGEND
data flow
a person approves
proposal, progress
refusal reason code
subtract-only: takes out, never adds
flood line
Offline-proven on the seeded demo fixture: 287 tests · 0 false folds in 24 decoy-storm simulation runs. No live-site measurement yet.
Every label maps to manifest.yml and src/.
THE APPROVAL LINE
No request is folded or closed
until a person presses Approve.
ABOVE · READS, SCORES, PROPOSALS
BELOW · WRITES, EACH ONE RE-CHECKED