double-entry-reconciliation
Double-entry bookkeeping integrity verification
- License 许可
- AGPL-3.0
- 最近更新
- 2026-11-14
- Stars
- ★ 25
- Forks
- 9
01 前言 Front Matter
- name
- double-entry-reconciliation
- owner
- cpa-auditor
- scope
- co-price
- status
- active
- version
- 2.0.0
- relates_to
- [ { "type": "follows", "skill": "i18n-audit" }, { "type": "composes_with", "skill": "harness-verification" }, { "type": "composes_with", "skill": "financial-statement-prep" }, { "type": "composes_with", "skill": "pricing-playbook" } ]
- description
- Double-entry bookkeeping integrity verification
- last_reviewed
- 1787616000000
- prerequisites
- simulation output with MonthlyData series available
03 SKILL.md 正文
Skill: Double-Entry Reconciliation
Role: CPA Auditor (cpa-auditor)
Frequency: Mandatory on every pull request that modifies src/lib/simulation.ts
1. Description
This skill enforces strict double-entry bookkeeping rules across the AIG Simulation Engine. Any changes to the simulation math must adhere to the fundamental accounting equation:
Assets = Liabilities + Equity
2. Trigger Condition
The CPA Auditor must run this skill if the Core Engine Developer modifies any variable or calculation in src/lib/simulation.ts that affects:
MonthlyDataoutputsimulate()loops- Income Statement (IS) calculations
- Balance Sheet (BS) calculations
- Cash Flow Statement (CF) calculations
3. Verification Protocol
The CPA Auditor will perform the following algorithmic checks on the resulting output of simulation.ts:
3.1. The Fundamental Equation
For every simulated month (m):
const isBalanced = (m.totalAssets === m.totalLiabilities + m.totalEquity);
if (!isBalanced) throw new Error("Balance sheet does not balance");
3.2. Retained Earnings Roll-Forward
const expectedRE = m_prior.retainedEarnings + m_current.netIncome;
if (m_current.retainedEarnings !== expectedRE) throw new Error("Retained Earnings roll-forward failed");
3.3. Cash Flow to Cash Balance Articulation
const netChangeInCash = m_current.cfo + m_current.cfi + m_current.cff;
const expectedCash = m_prior.cash + netChangeInCash;
if (m_current.cash !== expectedCash) throw new Error("Cash flow does not articulate to Balance Sheet");
4. Execution
If the CPA Auditor detects a violation of these rules, they MUST REJECT the code and instruct the Core Engine Developer to fix the math to ensure zero leakage in the financial model.
Context
See docs/co-price.context.md for project context and the consulting engagement lifecycle.
When to Use
- When a co-price task requires Double-entry bookkeeping integrity verification within the engagement lifecycle.
Execution Steps
- Receive dispatch from PM with task parameters and document anchors.
- Execute the skill procedure against the artifacts named in the task scope.
- Report results to the dispatching agent with evidence links.
Output Format
Structured markdown report delivered to the dispatching agent, citing document anchors (for example [Ref: biz_logic.*]) where applicable.
Related Skills
- Owner agent:
cpa-auditor. Seevariant.jsonskills registry for the full co-price skill set.
04 同仓库更多 Skills
i18n-layout
Text layout and encoding guidance: character encoding (UTF-8, legacy Korean code pages, BOM hazards), line endings, RTL/bidi handling, and script-specific font selection (Hangul focus). Use when: encoding is corrupted or mojibake appears, an RTL locale must render correctly, fonts must be chosen for a script, or CRLF/BOM issues surface.
i18n-layout
Text layout and encoding guidance: character encoding (UTF-8, legacy Korean code pages, BOM hazards), line endings, RTL/bidi handling, and script-specific font selection (Hangul focus). Use when: encoding is corrupted or mojibake appears, an RTL locale must render correctly, fonts must be chosen for a script, or CRLF/BOM issues surface.
i18n-layout
Text layout and encoding guidance: character encoding (UTF-8, legacy Korean code pages, BOM hazards), line endings, RTL/bidi handling, and script-specific font selection (Hangul focus). Use when: encoding is corrupted or mojibake appears, an RTL locale must render correctly, fonts must be chosen for a script, or CRLF/BOM issues surface.
i18n-layout
Text layout and encoding guidance: character encoding (UTF-8, legacy Korean code pages, BOM hazards), line endings, RTL/bidi handling, and script-specific font selection (Hangul focus). Use when: encoding is corrupted or mojibake appears, an RTL locale must render correctly, fonts must be chosen for a script, or CRLF/BOM issues surface.
i18n-layout
Text layout and encoding guidance: character encoding (UTF-8, legacy Korean code pages, BOM hazards), line endings, RTL/bidi handling, and script-specific font selection (Hangul focus). Use when: encoding is corrupted or mojibake appears, an RTL locale must render correctly, fonts must be chosen for a script, or CRLF/BOM issues surface.
i18n-layout
Text layout and encoding guidance: character encoding (UTF-8, legacy Korean code pages, BOM hazards), line endings, RTL/bidi handling, and script-specific font selection (Hangul focus). Use when: encoding is corrupted or mojibake appears, an RTL locale must render correctly, fonts must be chosen for a script, or CRLF/BOM issues surface.