← ALL PLUGINS
COREv2.0.0·MIT · FORKABLE

Cost Allocation.

artifi-core-cost-allocation

Multi-method cost allocation engine

A flexible cost allocation engine supporting two modes: standalone allocations from GL account balances and document-linked allocations traced back to specific bills or invoices. Four allocation methods are available — fixed percentage, by headcount, by revenue, and custom formula. Every allocation enforces balanced debits and credits, prevents double-allocation of the same costs, and creates a full audit trail. Allocations can be voided with automatic reversing entries.

Fixed %, headcount, revenue, or custom formula methodsDouble-allocation preventionBalanced submission validation (DR = CR)Full audit trail with source document linking
COMMANDS · 2

Slash commands, shipped.

Each command is a guided procedure Claude follows step by step — with your review at every decision point.

/allocate-costs
Run cost allocation with chosen method

Create and execute a cost allocation from start to finish. Supports standalone (from GL balances) and document-linked (from a specific bill/invoice). Guides through: entity/period selection, mode choice, source identification, allocation method, preview, and submission.

/allocation-preview
Preview allocation before posting

Calculate and preview an allocation without submitting. Shows preview table with source and target lines, total debits/credits, and source line account verification. Supports both standalone and document-linked modes.

HOW IT BEHAVES

One run, step by step.

The plugin prepares, validates, and previews. You confirm. Only then does anything reach the ledger — through the same governed gateway everything else uses.

Standalone Allocation
Identify source costs — fetch balance of source account(s) for the allocation period
Determine allocation method: fixed percentage, by headcount, by revenue, or custom formula
Calculate target splits and show preview table with source and target lines
User reviews and confirms the allocation preview
Create allocation run and submit balanced debit/credit lines
Optionally approve and post the GL journal entry immediately
Document-Linked Allocation
Identify source transaction — find the source bill/invoice/JE and show GL lines
Check existing allocations — verify account is not already fully allocated
Select which line(s) to allocate: all expense lines or specific accounts
Determine allocation method and calculate target splits
User confirms preview including source document reference
Create allocation run with source_transaction_id for full traceability
Voiding and Correcting
Void an existing allocation run
System creates reversing GL entry automatically
Source account freed up for re-allocation
VALIDATION GATE · 8 CHECKS

Every run
must pass.

If any checkpoint fails, the workflow stops and reports the issue. Nothing posts to the ledger until every check passes — the same dry-run-first discipline as the rest of the platform.

Source data exists (account has balance or transaction has allocatable lines)
Target accounts exist and are active
Total debits equal total credits (balanced)
At least one source line and one target line
For document-linked: source line accounts match source transaction GL lines
For document-linked: account not already fully allocated
User has reviewed and confirmed the preview
Submission succeeds without errors
REFERENCE DATA · 2 FILES

Knowledge you can read and edit.

Formulas, templates, and regulatory rules live in plain files — not hardcoded values. Swap them for your firm’s policies when you fork.

allocation-methods.md

Fixed percentage, by headcount, by revenue, and custom formula calculation methods with examples

submission-format.md

JSON structure for allocation_run submission with source/target line format

MIT · BUILT FOR ARTIFI · OPEN FOR EVERYONE

Run it here.
Or take it with you.

Out of the box it works with the Artifi ledger: Claude fetches your data, runs the procedure, validates the result, and submits through the governed gateway via MCP.

Or fork it. Skills, commands, validation logic, and reference data are all MIT-licensed. Swap the MCP tool calls for your own backend, or use the reference files as standalone Claude project resources.

MORE CORE PLUGINS