Logo: Accounting Engine

Accounting Engine

Communautéit
peterbamuhigire
accounting-engine

Benotzt dëse Skill, wann Dir d'Richtlinne fir d'Duebelt-Buchféierung an eng integréiert Ledger-Engine fir Rechnungen, Bezuelungen, Lagerbestänn, ausgeglachen Buchungen, zougeuerdent Konten, Idempotenz, Réckgängegmaachungen, Periodespären, Audit Trails a Finanzrapporte designt oder ëmsetzt.

Add to TypingMind

Iwwersiicht

Editeurpeterbamuhigire
Repositorychwezi-dev-engine
Skill-Nummaccounting-engine
Stären
29
Forks
6
Matgeliwwert Dateien
5
LizenzMIT
Linken
  • Instruktiounen am Markdown-Format

    Eng SKILL.md-Datei, déi de Modell bei Bedarf luet, soudatt nëmmen Token ufalen, wann eng Ufro tatsächlech dozou passt.

  • Funktionéiert mat all LLM

    KI-Skills si reng Markdown, keen ubidderspezifesche Code. Dofir funktionéiert dëse Skill mat GPT, Claude, Gemini, Grok oder engem lokale Modell.

  • 5 matgeliwwert Dateien

    Skripten, Virlagen a Referenzen, déi de Modell beim Schaffe liese kann. D'Dateie kënnen nëmme gelies ginn a ginn ni ausgeféiert.

  • Open Source

    peterbamuhigire huet de Skill op GitHub verëffentlecht. Liest de Quelltext, ier Dir de Skill installéiert.

Installatioun

Installéiert de KI-Skill Accounting Engine an TypingMind, fir e mat all LLM ze benotzen, oder setzt en an en anere KI-Agent an, deen SKILL.md liest.

1

An TypingMind installéieren

TypingMind installéiert e Skill direkt aus sengem GitHub-Dossier — dobäi gëtt SKILL.md gelies, d'Ressourcedateie gi gebëndelt an d'Resultat gëtt lokal gespäichert.

  1. Maacht d'App op a gitt op Plugins → Skills.
  2. Wielt „Vu GitHub installéieren“.
  3. Pecht d'URL vum Skill-Dossier, déi hei drënner steet, an a bestätegt d'Installatioun.
    https://github.com/peterbamuhigire/chwezi-dev-engine/tree/main/skills/finance-accounting/accounting-engine
  4. Aktivéiert de Skill an all Chat, an deem Dir e benotze wëllt.
Plugins → Skills → Skill derbäisetzen → Iwwer eng GitHub-URL. Pecht dann d'URL vum Dossier an a klickt op Weider.
2

An engem anere KI-Agent installéieren

All KI-Agent, deen d'Format Agent Skills liest, kann dëse Skill benotzen — kopéiert den Dossier an d'Skill-Verzeechnes vun deem KI-Agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/peterbamuhigire/chwezi-dev-engine.git /tmp/chwezi-dev-engine
mkdir -p .claude/skills
cp -r /tmp/chwezi-dev-engine/skills/finance-accounting/accounting-engine .claude/skills/accounting-engine
Start Claude Code nom Kopéieren nei, fir datt den neie Skill erkannt gëtt.

An TypingMind benotzen

Aktivéiert Accounting Engine an engem Chat vun TypingMind, an de Modell iwwerhëlt de Rescht. Den Numm an d'Beschreiwung stinn am System-Prompt. Soubal eng Ufro dozou passt, luet de Modell déi komplett Instruktioune selwer — Dir musst de Skill ni manuell opruffen, an et fale keng Token un, bis en tatsächlech benotzt gëtt.

De Modell luet Accounting Engine automatesch, soubal eng Ufro dozou passt.

Funktionéiert mat all KI-Modell

KI-Skills si reng Markdown-Instruktiounen amplaz vun ubidderspezifeschem Code. Dofir ass Accounting Engine net un de Modell gebonnen, fir deen de Skill geschriwwe gouf. Installéiert en eemol an TypingMind a benotzt e mat GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder engem lokale Modell, deen Dir selwer bedreift — alles mat Ären eegenen API-Schlësselen.

  • Gëtt nëmme gelueden, wann et néideg ass

    De System-Prompt enthält nëmmen den Numm an d'Beschreiwung. D'Instruktioune gi bei der éischter passender Ufro gelueden, soudatt en onbenotzte Skill näischt kascht.

  • De Modell am lafende Chat wiesselen

    Well de Skill aus Instruktiounen amplaz vu Code besteet, funktionéiert en och no engem Modellwiessel — den nächste Modell liest déi selwecht SKILL.md-Datei.

Skill-Instruktiounen

Dëst ass den Inhalt vu SKILL.md, deen de Modell luet. Liest e virun der Installatioun — e Skill besteet aus Instruktiounen, déi Äre Modell befollegt.

Accounting Engine

Evidence Produced

CategoryArtifactFormatExample
CorrectnessLedger invariant test packMarkdown plus transaction fixturesbalanced posting, idempotency, reversal, period lock, subledger tie-out, and audit trail

Inputs

ArtefactRequired?Purpose
Transaction event and tenant contextyesDefine the event and isolation boundary
Account mapping and doctrine policyyesResolve balanced ledger accounts
Existing ledger and lock stateyesPrevent duplicate or closed-period posting

Outputs

ArtefactConsumerAcceptance condition
Posting contract and journal evidenceFeature services and finance reviewBalanced, idempotent, traceable, tenant-scoped

Capability contract

Read and search are required. Database writes, migrations, backfills, reversals, and period operations require explicit authority and a verified compensating path.

Degraded mode

Fallback without doctrine, mappings, or database access: return a posting design and unresolved control list; do not invent accounts or claim ledger correctness.

Decision rules

ConditionPosting actionFailure avoided
New valid economic eventAppend balanced journalMissing financial record
Duplicate idempotency keyReturn prior resultDouble posting
Error in posted journalPost linked reversal/correctionDestruction of audit history
Closed periodReject or use authorised later-period adjustmentPeriod integrity breach

Domain anti-patterns

  • Posting directly from controllers. Fix: use one posting service and contract.
  • Updating or deleting journals. Fix: reverse and repost with links.
  • Guessing accounts from feature names. Fix: require mapping-layer resolution.
  • Retrying without idempotency. Fix: persist and enforce the event key.
  • Mixing tenants in one posting context. Fix: require tenant scope on every ledger operation.

Use When

  • The product handles money, inventory value, payroll, tax, customer balances, supplier balances, assets, grants, donations, loans, refunds, wallet balances, or financial reporting.
  • A SaaS must replace routine bookkeeping in external products such as QuickBooks, Xero, Sage, Pastel, Tally, Zoho Books, or Wave.
  • You need architecture, schema, posting rules, tests, documentation, or review findings for ledger-backed business software.

Do Not Use When

  • The task is only financial analysis or projections without software architecture; use accounting-finance-controller or the business-plan finance skills.
  • The system only displays imported accounting reports and does not create business events or postings.
  • A jurisdiction requires a licensed accountant, auditor, or tax practitioner to exercise professional judgement; design the system support, but do not claim the software replaces that judgement.

Hard Rules

  • NEVER let a business module write directly to gl_entries, journal_lines, journal_entries, or any ledger table.
  • ALWAYS write ledger records through one service: LedgerPostingService::post(JournalEntry $entry) or the project-equivalent single posting service.
  • NEVER update, delete, or soft-delete posted journal lines. Corrections are reversing journals linked to the original entry.
  • NEVER store authoritative balances that cannot be rebuilt from journal lines. Materialized balances are caches with a documented rebuild command.
  • NEVER hardcode account codes in business logic. Use account mappings resolved at posting time.
  • NEVER use LIFO for IFRS or IFRS for SMEs tenants.
  • MUST reject posting when required account mappings are missing, inactive, cross-tenant, or not valid for the source document.

Canonical Architecture

Business modules emit events. A mapper turns events into balanced JournalEntry value objects. The posting service validates and writes the entry atomically. Reports, subledgers, balances, tax schedules, and dashboards are deterministic projections of the ledger.

text
Sales / Stock / Payroll / Assets / Payments / Grants
        -> business event
        -> account resolver and posting-rule mapper
        -> JournalEntry value object
        -> LedgerPostingService::post()
        -> append-only journal_entries + journal_lines
        -> reports, subledgers, tax schedules, dashboards

Required Model

Core tables:

  • chart_of_accounts
  • account_mappings
  • journal_entries
  • journal_lines
  • accounting_periods
  • posting_rule_versions
  • accounting_integrity_runs
  • accounting_audit_log

Every accounting table MUST carry tenant_id, unless the product is explicitly single-tenant. If legacy files use franchise_id, treat it as a project-specific tenant alias and document the mapping.

Posting Service Contract

php
<?php
declare(strict_types=1);

final readonly class JournalEntry
{
    public function __construct(
        public int $tenantId,
        public string $idempotencyKey,
        public DateTimeImmutable $entryDate,
        public string $sourceType,
        public string $sourceId,
        public string $description,
        /** @var list<JournalLine> */
        public array $lines,
        public ?int $reversesJournalId = null,
    ) {}
}

final readonly class JournalLine
{
    public function __construct(
        public int $accountId,
        public string $currency,
        public string $debitMinor,
        public string $creditMinor,
        public array $dimensions = [],
    ) {}
}

interface LedgerPostingService
{
    public function post(JournalEntry $entry): PostedJournal;
}

The service validates tenant scope, account status, open period, debit-credit equality, currency policy, idempotency, source document state, and mapping completeness before insert.

Integrity Checks

Run these per tenant and per accounting period from day one:

  • Debits equal credits per journal_entry_id.
  • Trial balance total debits equal total credits.
  • AR control account equals customer-tagged journal line balance.
  • AP control account equals supplier-tagged journal line balance.
  • Inventory control account equals stock-on-hand value by item/location/cost layer.
  • Fixed asset control account equals asset-register cost less disposals.
  • Payroll liability accounts equal unpaid statutory and employee deductions.
  • No journal exists in a locked period unless it is a permitted reopening workflow with approval evidence.
  • No ledger table has rows written outside the posting service.
  • Materialized balances rebuild to the same values as stored cache rows.

User Experience Principle

Non-accountants record business actions: Record Sale, Receive Payment, Buy Stock, Run Payroll, Record Asset Purchase, Receive Grant, Close Month. The system posts accounting behind the scenes. Accountant-facing roles get journals, CoA, mappings, period close, manual journal, and report exports.

Companion Skills

  • ledger-posting-engine-core (chwezi-accounting-doctrine) for IFRS-aligned industry templates.
  • inventory-costing-and-stock-accounting (chwezi-accounting-doctrine) for IAS 2 stock valuation and COGS flows.
  • payroll-and-statutory-postings-east-africa (chwezi-accounting-doctrine) for PAYE/NSSF/LST payroll journal shapes.
  • fixed-assets-and-depreciation for IAS 16 asset lifecycle.
  • multicurrency-and-fx for IAS 21 currency handling.
  • multi-tenant-saas-architecture, api-design-first, and advanced-testing-strategy for platform integration.

References

  • references/posting-engine-contract.md
  • references/integrity-invariants.md

Matgeliwwert Dateien

De Modell liest dës Dateie bei Bedarf, wärend de Skill gelueden ass. Si ginn als liesbar Dateie bereetgestallt a ginn ni ausgeféiert.

Heefeg gestallte Froen

Wat mécht de KI-Skill Accounting Engine?

Benotzt dëse Skill, wann Dir d'Richtlinne fir d'Duebelt-Buchféierung an eng integréiert Ledger-Engine fir Rechnungen, Bezuelungen, Lagerbestänn, ausgeglachen Buchungen, zougeuerdent Konten, Idempotenz, Réckgängegmaachungen, Periodespären, Audit Trails a Finanzrapporte designt oder ëmsetzt.

Firwat Accounting Engine op TypingMind benotzen?

Well Dir en eemol installéiert a mat all Modell benotze kënnt. Accounting Engine besteet aus einfachem Markdown amplaz vun ubidderspezifeschem Code. Dee selwechte Skill funktionéiert also mat GPT-5, Claude, Gemini, Grok oder engem lokale Modell – an Dir kënnt de Modell matzen am Chat wiesselen, ouni datt de Skill ophält ze funktionéieren. TypingMind benotzt Är eegen API-Schlësselen, sou datt Dir d'Ubidder direkt bezuelt, amplaz en Abonnement pro Benotzerplaz ze bezuelen. Är Skills a Chats bleiwen an Ärem eegene Späicher.

Wéi installéieren ech Accounting Engine an TypingMind?

Maacht an TypingMind Plugins → Skills → Vu GitHub installéieren op a setzt https://github.com/peterbamuhigire/chwezi-dev-engine/tree/main/skills/finance-accounting/accounting-engine an. TypingMind liest d'Datei SKILL.md, bëndelt déi zougehéiereg Dateien an installéiert dat Ganzt als Skill, deen Dir pro Chat aktivéiere kënnt.

Wéi eng KI-Modeller kënnen Accounting Engine benotzen?

All Modell, deen Dir an TypingMind verbënnt. KI-Skills sinn einfach Markdown-Instruktiounen an net ubidderspezifesche Code. Dofir kënne GPT, Claude, Gemini, Grok a lokal Modeller dëse Skill lueden, wann eng Ufro dozou passt.

Wéi vill KI-Modeller kann ech mat Accounting Engine benotzen?

Esou vill wéi Dir wëllt. Soulaang e Modell Skills ënnerstëtzt, kënnt Dir Accounting Engine domat benotzen – zum Beispill mat GPT, Claude, Gemini, Grok, DeepSeek, Mistral oder Llama – alles op TypingMind mat Ären eegenen API-Schlësselen.

Ass de KI-Skill Accounting Engine gratis?

Jo. peterbamuhigire huet de Skill ënner der Lizenz MIT op GitHub publizéiert. Dir bezuelt nëmmen Ären eegene KI-Ubidder fir d'Token, déi Dir benotzt.

Wat si KI-Skills?

E KI-Skill ass e weiderverwendbare Pak vun Instruktiounen, deen engem KI-Modell bäibréngt, wéi en eng bestëmmt Aufgab erfëllt. E follegt dem oppenen Agent Skills-Format: eng Datei SKILL.md mat engem Numm an enger Beschreiwung, plus all Scripten, Virlagen oder Referenzdateien, déi de Modell eventuell brauch. De Modell liest d'Instruktiounen eréischt, wann Är Ufro zum Skill passt. En installéierte Skill kascht also näischt, bis e benotzt gëtt.

Wéi ënnerscheede sech KI-Skills vu Plugins oder MCP-Serveren?

E Plugin oder MCP-Server gëtt engem Modell nei Tools, déi en opruffe kann – Code, deen iergendwou leeft an e Resultat zeréckgëtt. E KI-Skill gëtt dem Modell dogéint Wëssen an eng Virgoensweis: wéi en eng Aufgab ugeet, wéi eng Schrëtt e maache soll a wéi eng gutt Ausgab ausgesäit. Skills bestinn aus einfachem Markdown, brauche kee Server, keen API-Schlëssel a kee Lafzäitëmfeld a funktionéiere mat all Modell.

Alleguer weisen

Elo Ären eegene KI-Aarbechtsberäich ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇