audit-money
/octopus:audit-money scans the current branch (or any ref) for money-logic
correctness issues before merge. It produces a severity-tiered report across
seven inspection families, designed to paste directly into a PR comment.
What it solves
Money bugs have a particular property: they are often invisible in code review
because reviewers focus on logic, not on the subtle correctness requirements of
financial computation. A float for a monetary field, a Math.Round without
an explicit rounding mode, a new webhook endpoint without signature
verification, or a fee-change that never got a disclosure spec β none of these
look wrong at a glance. They look wrong in production, at 2 AM, after the
accounting reconciliation fails. audit-money makes these patterns explicit and
reviewable before the merge.
How it works
The skill resolves the diff, identifies money-relevant files via keyword heuristics, and runs seven inspection families:
- T1 types β flags
float/doublefor monetary fields in C#; flags barenumberfor currency values in TypeScript without a cents comment. Severity: warn. - T2 rounding β flags
Math.Roundwithout an explicitMidpointRoundingargument in C#; flags.toFixed()on money values in TypeScript. Also catches inconsistent rounding modes across files in the same diff. Severity: warn. - T3 tests β requires that modified money files have accompanying test changes, and that those tests exercise non-round cent values. Severity: warn / info.
- T4 env β blocks when a new
*_PERCENT/*_FEE/*_RATEenv var exists in one environment file but not another (sandbox vs production). Severity: block. - T5 idempotency β warns when an outbound POST to a payment provider URL carries no idempotency key or external reference. Severity: warn.
- T6 webhook β blocks when a new webhook endpoint lands without a signature verification call before payload processing. Severity: block.
- T7 disclosure β warns when a fee or rate change in the diff has no corresponding mention of disclosure, consent, or disclaimer in the touched specs or research documents. Severity: warn.
Usage & parameters
/octopus:audit-money [ref] [--base=main] [--write-report] [--only=<families>]refβ PR number (#123), URL, branch name, or commit SHA. Default: currentHEADvs its upstream.--base=<branch>β base branch for the diff. Default:main.--write-reportβ persists the report todocs/reviews/YYYY-MM-DD-money-<slug>.md.--only=<list>β comma-separated subset oftypes,rounding,tests,env,idempotency,webhook,disclosure. Runs only the listed families.