Skip to content

Latest commit

 

History

History
98 lines (83 loc) · 3.09 KB

File metadata and controls

98 lines (83 loc) · 3.09 KB
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
name required annotations
file_system
true
read_only destructive idempotent open_world
modules
id file nodes critical idempotent side_effects
invoice_processor.main
main.aisop.json
6
true
true
id file nodes critical idempotent side_effects
invoice_processor.extract
extract.aisop.json
6
true
true
id file nodes critical idempotent side_effects
invoice_processor.book
book.aisop.json
7
true
false
file_write
id file nodes critical idempotent side_effects
invoice_processor.tax_logic
tax_logic.aisop.json
6
true
true
trust_level
level justification constraints
3
Writes booked invoices to disk; shared tax logic is idempotent and read-only.
file_system write scope limited to ./ledger/
permissions
file_system
scope operations
./ledger/
read
write
status active
license Apache-2.0
copyright Copyright 2026 AIXP Labs AIXP.dev | AIAP.dev

Governance Declaration

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: When To Use

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 Responsibilities

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)

Dependency Flow

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.

Usage

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