Skip to content

Commit 5a48026

Browse files
DylanMerigaudclaude
andcommitted
Scale the manager floor with the org (derive it from the director threshold)
The manager floor was a fixed $1,000 while the director threshold scales with the org, so a big company that escalates to a director at $50k still made the manager sign off from $1k. Derive the floor as an order of magnitude below the director threshold (the one number the model proposes), with a small absolute minimum. So a bigger org lets the manager handle more before a human is needed, and the relation stays sound by construction (floor < director, never inverted). Deterministic — the model isn't asked for a second, correlated number to clamp. Demo mix unchanged in spirit (verified): small clean → straight-through, the Product invoice → department gate, material clean / exceptions → manager. Gate green, 189 tests, both e2e pass. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 9e9663b commit 5a48026

1 file changed

Lines changed: 14 additions & 8 deletions

File tree

lib/onboarding.ts

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -82,18 +82,24 @@ export const assembleWorkflow = (
8282
// The manager sees an invoice when it's NOT trivial: any exception, or any clean
8383
// bill over a floor. So a small clean invoice posts straight through (the
8484
// automation win), while anything material or flagged gets a human — the standard
85-
// AP control, not "a manager clicks approve on every $50 bill". The floor is the
86-
// policy default; the director threshold (scaled to the org) gates the second gate.
85+
// AP control, not "a manager clicks approve on every $50 bill".
86+
//
87+
// The floor SCALES with the org: it's an order of magnitude below the director
88+
// threshold (the one number the model proposes), so a bigger company that escalates
89+
// to a director at $50k lets the manager handle more before a human is needed,
90+
// while a small one keeps a low bar. Deriving it (vs a second model number) keeps
91+
// the model off a corrected, redundant decision and the relation always sound
92+
// (manager floor < director threshold by construction). A small absolute minimum
93+
// guards against an unusually low proposed threshold.
94+
const managerFloor = Math.max(
95+
DEFAULT_APPROVAL_POLICY.manager.amount / 2,
96+
Math.round(proposal.directorThreshold / 10),
97+
);
8798
const managerReview: Condition = {
8899
kind: "any",
89100
conditions: [
90101
{ kind: "leaf", field: "verdict", op: "==", value: "exception" },
91-
{
92-
kind: "leaf",
93-
field: "amount",
94-
op: ">",
95-
value: DEFAULT_APPROVAL_POLICY.manager.amount,
96-
},
102+
{ kind: "leaf", field: "amount", op: ">", value: managerFloor },
97103
],
98104
};
99105

0 commit comments

Comments
 (0)