bookkeeper
Read one batch of transactions plus a chart_of_accounts and prior_period, categorize every transaction to an existing GL account with confidence and reason, flag anomalies (duplicates, out-of-period, unknown payee, amount outliers, missing memo), and emit a read-only reconciliation artifact {matched, unmatched}. Refuses to invent a GL account the chart does not expose, refuses to book anything to a live ledger, and never mutates state.
You’re reading version sha-1b7351c71479. Go to the current version
Overview
Bookkeeper turns a batch of messy transaction lines into clean books without
guessing. It reads transactions[], chart_of_accounts, and an optional
prior_period and emits a typed categorization, anomaly flags, and a
read-only reconciliation.
The skill is read-only end to end. It writes nothing to a live ledger,
issues no rail run, and consumes no effect. Every categorized line binds to
an account that already exists in chart_of_accounts, and the skill refuses
to invent a GL account that is not in the chart.
In the manual
Runners
evaluatereview-handoff
Declared by its execution profile. Read the profile
SKILL.md
Bookkeeper
Bookkeeper turns a batch of messy transaction lines into clean books without
guessing. It reads transactions[], chart_of_accounts, and an optional
prior_period and emits a typed categorization, anomaly flags, and a
read-only reconciliation.
The skill is read-only end to end. It writes nothing to a live ledger,
issues no rail run, and consumes no effect. Every categorized line binds to
an account that already exists in chart_of_accounts, and the skill refuses
to invent a GL account that is not in the chart.
When to use this skill
- A batch of transactions needs to be categorized to a known chart of accounts, the chart is supplied as input, and the operator wants a clean categorized[]/anomalies[]/reconciliation artifact for review.
- The reviewer needs to know how many lines were matched, how many were flagged, what the unmatched totals are, and which lines need human review.
- The pipeline ahead needs a typed packet to feed a downstream skill (for example a journal-poster, a controller-review, or a period-close skill), and the upstream skill must not mutate state.
When not to use this skill
- Anything that would write to a live ledger, post a journal entry, or trigger a payout. The reconciliation is a read-only artifact; the downstream poster skill owns the mutation.
- Inventing a GL account, renaming a chart line, or merging accounts. The skill refuses to categorize a transaction against an account the chart does not expose.
- Free-form natural-language expense reports that have not yet been split into typed transaction lines.
Procedure
- Read the
chart_of_accounts. Every account used incategorized[]must appear in the chart with the samecode. The skill refuses to emit a category code that is not in the chart. - Read
prior_periodwhen supplied. The skill uses it to (a) carry forward vendor/category memory for matching, (b) detect duplicate invoices (same vendor + same amount + same memo fingerprint already booked in the prior period), and (c) compute an opening balance for the reconciliation. - For each transaction in
transactions[]:- Determine the account code by deterministic rule application: explicit
suggested_accountif the chart exposes it; else vendor memory fromprior_period.vendor_map; else keyword match against the memo + payee against the chart'skeywords[]. If none match, route toneeds_reviewand incrementunmatchedtotals. - Compute a
confidencein [0.0, 1.0]. Explicit match = 1.0; vendor memory match = 0.85; keyword match = 0.6; ambiguous (multiple keyword candidates) = needs_review and never gets a category emitted. - Detect anomalies: duplicate (same vendor+amount+memo-fingerprint in
prior_period), out-of-period (date outside the suppliedperiod), unknown payee (no vendor memory and no keyword match), amount outlier (amount > 5x the vendor's median amount inprior_periodwhen prior_period is present), missing memo.
- Determine the account code by deterministic rule application: explicit
- Emit
reconciliation{matched, unmatched, opening_balance, closing_balance}. The closing balance equals opening balance plus sum of categorized lines minus sum of refunds (negative amounts) only when the chart exposes a single cash-equivalent account. When the chart has multiple cash accounts, the skill emits per-account totals and the overallclosing_balanceis null with a refusal ofwhen: ambiguous_cash_set. - Seal the verdict. The skill never invents an account code, never invents a date, and never invents a prior-period record.
Inputs
transactions(required array): typed transaction lines. Each line has:id(required string): stable id within the batch.date(required ISO date): transaction date.amount(required number): signed (negative = refund/credit).currency(required string): ISO 4217 currency code.payee(required string): free-text payee/vendor.memo(optional string): free-text memo.suggested_account(optional string): explicit chart code the operator suggests.
chart_of_accounts(required array): the chart. Each entry has:code(required string): stable code used incategorized[].name(required string): human-readable name.type(required string): one ofasset,liability,equity,revenue,expense,cash_equivalent.keywords(optional array of strings): memo/payee keywords that map to this account.
prior_period(optional object):vendor_map(optional object):{ "<payee>": "<chart_code>" }memory.vendor_median_amount(optional object):{ "<payee>": <number> }.period(optional object):{ since, until }ISO dates bounding the prior period.booked_fingerprints(optional array of strings): memo-fingerprints already booked in the prior period; used for duplicate detection.opening_balances(optional object):{ "<chart_code>": <number> }.
period(optional object):{ since, until }ISO dates bounding the current period. Defaults to spanning the earliest to latest transaction date when omitted.
Output schema
bookkeeping:
schema: runx.bookkeeping.v1
decision: ready | needs_review | needs_more_evidence | needs_human
categorized:
- transaction_id: string
account_code: string
confidence: number
reason: explicit | vendor_memory | keyword_match | needs_review
amount: number
currency: string
anomalies:
- transaction_id: string
kind: duplicate | out_of_period | unknown_payee | amount_outlier | missing_memo
detail: string
reconciliation:
matched: number
unmatched: number
opening_balance: number | null
closing_balance: number | null
per_account:
- account_code: string
net: number
refusals:
- when: ambiguous_cash_set | chart_missing_account | invalid_currency
reason: string
transaction_id: string | null
observations:
categorized_count: number
anomaly_count: number
unmatched_count: number
needs_review_count: number
period: { since: string, until: string }
chart_size: numberRefusals
- The skill refuses to categorize a transaction against an account code the
chart does not expose. The transaction is recorded in
refusalswithwhen: chart_missing_account. - The skill refuses to emit a
closing_balancewhen the chart has zero or more than onecash_equivalentaccount. It emits per-account totals and setsclosing_balance: nullwithwhen: ambiguous_cash_set. - The skill refuses to mix currencies within a single reconciliation. A
single
currencyoutside the supplied chart'sbase_currencytriggerswhen: invalid_currencyand that transaction is parked inneeds_review. - When no transactions are supplied, the verdict is
needs_more_evidence,categorized[]andanomalies[]are empty, and the reconciliation is all zeros.
Quality bar
- Every categorized line binds to an account in the supplied chart; never invent a GL code.
- Never write to a live ledger; the reconciliation is a read-only artifact.
- Be deterministic: the same inputs must produce the same categorized[], anomalies[], reconciliation, and observation counts.
- Never reorder transactions; preserve the input
idorder incategorized[]. - Stop cleanly with
needs_review,needs_more_evidence, orneeds_human; never fake areadydecision.
Worked example
Open the chart for an indie SaaS with one cash-equivalent (1010 Checking)
and three expense accounts (6010 Hosting, 6020 SaaS Subscriptions,
6030 Contractors). Read six transactions: two hosting charges, one SaaS
subscription, two contractor invoices (one already booked in the prior
period → duplicate anomaly), and one unknown payee. Categorize four, flag
the duplicate, route the unknown payee to needs_review. Reconciliation:
matched=4, unmatched=2 (1 duplicate, 1 needs_review),
closing_balance=null because the chart exposes one cash account but the
duplicate and unknown payee are not booked; per-account net is emitted for
each categorized line.
Published execution profile
The execution profile published with sha-1b7351c71479, shown as its exact bytes.
| Runners |
|
|---|---|
| Profile digest | sha256:471e91d5a5cef6c3edefaf656d6a2adfa8c803414926b4d274b8a2807edf0976 |
skill: bookkeeper
version: 0.1.0
catalog:
kind: skill
audience: operator
visibility: public
role: context
category: ops
runners:
review-handoff:
inputs:
review_case_ref:
type: string
required: true
description: Reference to the ambiguous transaction batch requiring operator review.
steps:
- id: review-handoff
agent:
role: operator
task: bookkeeper-review-handoff
inputs:
review_case_ref: $input.review_case_ref
outputs:
review_resolution:
required: false
evaluate:
default: true
inputs:
transactions:
type: array
required: true
description: "Typed transaction lines: id, date, amount, currency, payee, memo?, suggested_account?"
chart_of_accounts:
type: array
required: true
description: Chart of accounts with code, name, type, keywords?
prior_period:
type: object
required: false
description: Vendor memory, prior booked fingerprints, opening balances.
period:
type: object
required: false
description: "{ since, until } ISO dates bounding the current period."
steps:
- id: evaluate
tool:
command: node
args:
- run.mjs
input_mode: stdin
inputs:
transactions: $input.transactions
chart_of_accounts: $input.chart_of_accounts
prior_period: $input.prior_period
period: $input.period
artifacts:
wrap_as: bookkeeping_packet
harness:
cases:
- name: clean-monthly-batch-sealed
inputs:
transactions:
- id: tx-001
date: 2026-07-01
amount: -120
currency: USD
payee: AWS
memo: monthly hosting
suggested_account: "6010"
- id: tx-002
date: 2026-07-02
amount: -49
currency: USD
payee: GitHub
memo: team plan
suggested_account: "6020"
- id: tx-003
date: 2026-07-03
amount: -2500
currency: USD
payee: Stripe
memo: "contractor invoice #1042"
- id: tx-004
date: 2026-07-04
amount: 5000
currency: USD
payee: Customer Co
memo: july retainer
suggested_account: "4010"
chart_of_accounts:
- code: "1010"
name: Checking
type: asset
sub: cash_equivalent
keywords:
- deposit
- retainer
- wire
- code: "4010"
name: Service Revenue
type: revenue
keywords:
- retainer
- invoice paid
- subscription
- code: "6010"
name: Hosting
type: expense
keywords:
- hosting
- aws
- gcp
- azure
- compute
- code: "6020"
name: SaaS Subscriptions
type: expense
keywords:
- github
- gitlab
- saas
- subscription
- plan
- code: "6030"
name: Contractor Fees
type: expense
keywords:
- contractor
- freelance
- "1099"
prior_period:
vendor_map:
Stripe: "6030"
GitHub: "6020"
AWS: "6010"
Customer Co: "4010"
vendor_median_amount:
Stripe: 2400
GitHub: 49
AWS: 120
Customer Co: 5000
period:
since: 2026-06-01
until: 2026-06-30
booked_fingerprints:
- github|2026-06-02|49.00
- aws|2026-06-01|120.00
opening_balances:
"1010": 12000
period:
since: 2026-07-01
until: 2026-07-31
expect:
status: sealed
receipt:
schema: runx.receipt.v1
operator_journeys:
- mode: standalone
confusors:
- purchase-approval
- refund
request: Categorize this transaction batch against our chart of accounts.
expected_outcome: Return a sealed read-only reconciliation with GL mapping and anomaly flags, mutating no ledger.
- mode: composed
request: Continue this bookkeeper work from evidence already gathered upstream.
expected_outcome: Return a sealed read-only reconciliation with GL mapping and anomaly flags, mutating no ledger.
prior_evidence:
- The transaction batch and chart of accounts already supplied.
must_not_repeat:
- Do not invent accounts or re-post transactions.
- name: ambiguous-batch-needs-review
inputs:
transactions:
- id: tx-101
date: 2026-07-05
amount: -200
currency: USD
payee: Vendor Co
memo: team plan upgrade
- id: tx-102
date: 2026-07-06
amount: -150
currency: USD
payee: BetaWeb LLC
memo: monthly hosting
chart_of_accounts:
- code: "1010"
name: Checking
type: asset
sub: cash_equivalent
keywords:
- deposit
- retainer
- code: "6010"
name: Hosting
type: expense
keywords:
- hosting
- compute
- code: "6020"
name: SaaS Subscriptions
type: expense
keywords:
- plan
- saas
- code: "6030"
name: Contractor Fees
type: expense
keywords:
- plan
- contractor
period:
since: 2026-07-05
until: 2026-07-06
expect:
status: sealed
- name: missing-review-binding-needs-agent
runner: review-handoff
inputs: {}
expect:
status: failure
receipt:
schema: runx.receipt.v1
Published package and test evidence.
The latest recorded test covers an earlier version, sha-415a44c82514. It does not establish a result for this version.
Test result
| Harness result | An earlier version was tested |
|---|---|
| Tested version | sha-415a44c82514Not this page’s version, sha-1b7351c71479 |
| Recorded result | 3 checks passed · 0 failed |
| Result source | Reported by the publisher (runx_registry_publish) |
| Suite | runx-harness |
| Test recorded | |
| Declared cases | 3 |
Package identity
| Published revision | sha-1b7351c71479 |
|---|---|
| Content digest | sha256:1b7351c7147957279376aef88efc71b4db2ec74259b1ecb223759ffa59fa8861 |
| SKILL.md digest | sha256:af6cec2f318483670a1616ace3a7f9e7be46c3a17833a07582a4bb02fad844ab |
| Execution profile digest | sha256:471e91d5a5cef6c3edefaf656d6a2adfa8c803414926b4d274b8a2807edf0976 |
| Publisher identity | Unverified publisher · guoyunfeng |
| Trust tier | CommunityPublished through the registry without publisher verification. This tier is not a code assessment. |
| Attestations |
|
| Source provenance | Not published with this version |
Version history
sha-415a44c82514Content digest sha256:415a44c82514da2f968122bbc1a2d7d98c04617c7e94b07768f83dbcafbc3b6dsha-46073706cd24Content digest sha256:46073706cd244e95fd315962e4286e85eb2d7c1869c17648b19f57bb16f42f65sha-7eb9807dae0eContent digest sha256:7eb9807dae0e9423d9b6bb364fdcda8cb3b92632de696b8fa7b821393b0acfe4sha-1b7351c71479ViewingContent digest sha256:1b7351c7147957279376aef88efc71b4db2ec74259b1ecb223759ffa59fa8861