| protocol | AIAP V1.0.0 | |||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| authority | aiap.dev | |||||||||||||||||||||||||||||||||||||||||||||||||||||
| seed | aisop.dev | |||||||||||||||||||||||||||||||||||||||||||||||||||||
| executor | soulbot.dev | |||||||||||||||||||||||||||||||||||||||||||||||||||||
| axiom_0 | Human_Sovereignty_and_Wellbeing | |||||||||||||||||||||||||||||||||||||||||||||||||||||
| governance_mode | NORMAL | |||||||||||||||||||||||||||||||||||||||||||||||||||||
| name | invoice_processor | |||||||||||||||||||||||||||||||||||||||||||||||||||||
| version | 1.0.0 | |||||||||||||||||||||||||||||||||||||||||||||||||||||
| pattern | C | |||||||||||||||||||||||||||||||||||||||||||||||||||||
| summary | Invoice processor — extracts, validates, and books invoices through a shared tax-logic module. | |||||||||||||||||||||||||||||||||||||||||||||||||||||
| tools |
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||
| modules |
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||
| trust_level |
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||
| permissions |
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||
| status | active | |||||||||||||||||||||||||||||||||||||||||||||||||||||
| license | Apache-2.0 | |||||||||||||||||||||||||||||||||||||||||||||||||||||
| copyright | Copyright 2026 AIXP Labs AIXP.dev | AIAP.dev |
Invoice Processor demonstrates Pattern C — a package with multiple functional modules that share a common logic module (tax_logic). Both extract and book invoke tax_logic to compute tax amounts, avoiding duplication.
Pattern C is the right choice when:
- Two or more functional modules need the same deterministic logic (e.g., tax rules, currency conversion, validation).
- Duplicating the logic across modules would create drift risk.
- The shared logic does not warrant being promoted to a separate sub-program (that would be Pattern D).
Decision boundary: if the shared logic is used by exactly one module, inline it. If it needs its own governance contract, versioning, or tool permissions distinct from the parent, split it out as Pattern D. Otherwise, Pattern C.
| Module | Responsibility | Tools | Calls Shared Logic? |
|---|---|---|---|
main.aisop.json |
Intent router | none | no |
extract.aisop.json |
Extract line items from raw invoice text | none | tax_logic |
book.aisop.json |
Persist booked invoice to ledger | file_system | tax_logic |
tax_logic.aisop.json |
Shared — computes tax amount per regional rules | none | (shared) |
main → {extract, book}
extract → tax_logic
book → tax_logic
tax_logic is invoked via RUN aisop.tax_logic from both extract and book. The AISOP governance hash covers all four files.
Entry: main.aisop.json. Input: raw invoice text. Output: booked invoice JSON written to ./ledger/.
Align Axiom 0: Human Sovereignty and Wellbeing. Version: AIAP V1.0.0. www.aiap.dev