@caddis/cli 0.4.20 → 0.4.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "caddis-extras",
3
- "version": "1.3.31",
3
+ "version": "1.3.33",
4
4
  "description": "caddis-extras — the long-tail skills for the Antigravity (agy) caddis plugin; install alongside caddis for the full set."
5
5
  }
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  type: design
3
3
  status: current
4
- feature: invoice-composition-replacement
4
+ feature: britebill-replacement
5
5
  creation-agent: caddis
6
6
  Original Author: Antigravity
7
7
  Creation Date: 2026-09-19T13:35:00Z
@@ -12,31 +12,31 @@ Last Model Used: gemini-3.8-flash
12
12
  ---
13
13
 
14
14
  <!--
15
- GOLD STANDARD REFERENCE for the hld skill.
16
- This is a real HLD whose organisation-specific facts (company, vendors, hosts, paths, customer
17
- volumes) were replaced with neutral ones so it can ship publicly. Everything the skill copies
18
- from it is unchanged: the 8-section structure, heading numbering, the diagram types and their
19
- styling, the ID schemes (SYS_nn, INT_nn, REQ-nn), and every table's columns. Match THAT, not
20
- the domain.
15
+ GOLD STANDARD for the hld skill. Match its structure, heading numbering, diagram types and
16
+ styling, ID schemes (SYS_nn, INT_nn, REQ-nn) and table columns exactly.
17
+ ACCOUNTS_PER_RUN, BATCH_HOST, PDF_TOTAL and SECONDARY_SCHEDULES stand in for real, measured
18
+ figures and names in the source HLD; they are withheld here only. A generated HLD must state
19
+ the REAL number or name in every such place - never a placeholder, never a vague 'many'.
20
+ Exact figures are what make the SLA and parity claims checkable.
21
21
  -->
22
22
 
23
- # High-Level Architecture (HLA): Invoice Composition Replacement Platform
23
+ # High-Level Architecture (HLA): BriteBill Replacement Platform
24
24
 
25
25
  ## 1. Executive Summary
26
26
 
27
27
  ### 1.1 Initiative Goal
28
- The Invoice Composition Replacement Platform replaces the proprietary third-party invoice composition system that a telecommunications operator uses for fixed-line billing.
28
+ The BriteBill Replacement Platform replaces the proprietary third-party BriteBill invoice composition system used for fixed-line customer billing.
29
29
 
30
30
  This platform achieves the following primary business goals:
31
31
  - It eliminates third-party licensing costs, proprietary dependencies, and vendor software lock-in.
32
32
  - It provides a locally controlled, deterministic, and auditable composition engine.
33
33
  - It delivers high-throughput batch generation for four recurring monthly billing cycles: `BR-07`, `BR-14`, `BR-21`, and `BR-28`.
34
- - It processes approximately 100,000 customer accounts per billing run within a four-hour service level agreement (SLA) window.
34
+ - It processes approximately `<ACCOUNTS_PER_RUN>` customer accounts per billing run within a four-hour service level agreement (SLA) window.
35
35
  - It simultaneously produces four synchronized output channels from a single canonical document model: Customer PDF, Print Spool AFP, Mailroom Index JRN, and Digital Portal XML.
36
36
  - It guarantees full financial integrity through mandatory, fail-closed automated reconciliation gates.
37
37
 
38
38
  ### 1.2 Solution Architecture Summary
39
- The solution operates as a standalone Python-based batch processing engine deployed on host `batch-host-01`. It processes raw billing stream files (`.EN`) from the upstream billing engine, executes financial reconciliation, and renders customer-facing outputs. The engine isolates every run in an immutable staging directory, verifies cryptographic checksums, and publishes outputs atomically only after all financial and population gates pass.
39
+ The solution operates as a standalone Python-based batch processing engine deployed on the dedicated batch host `<BATCH_HOST>`. It processes raw Kenan billing stream files (`.EN`), executes financial reconciliation, and renders customer-facing outputs. The engine isolates every run in an immutable staging directory, verifies cryptographic checksums, and publishes outputs atomically only after all financial and population gates pass.
40
40
 
41
41
  ### 1.3 Business Value & Operational Outcomes
42
42
  - **Cost Reduction**: Complete decommissioning of third-party composition licenses.
@@ -49,12 +49,12 @@ The solution operates as a standalone Python-based batch processing engine deplo
49
49
  ## 2. Project Context and Scope
50
50
 
51
51
  ### 2.1 Background
52
- The operator's fixed customer billing produces monthly invoices across four staggered billing cycles. The legacy composition workflow relied on an external vendor system. This introduced high annual licensing costs and operational delays whenever regulatory or template changes occurred. The replacement platform moves invoice composition entirely onto internal infrastructure using high-performance open standards.
52
+ Fixed-line customer billing produces monthly invoices across four staggered billing cycles. The legacy composition workflow relied on an external vendor system (BriteBill). This introduced high annual licensing costs and operational delays whenever regulatory or template changes occurred. The BriteBill Replacement Platform moves invoice composition entirely onto internal infrastructure using high-performance open standards.
53
53
 
54
54
  ### 2.2 Scope
55
55
 
56
56
  #### 2.2.1 In Scope
57
- - Ingestion of raw `.EN` tagged-record stream files generated by the upstream billing engine.
57
+ - Ingestion of raw `.EN` tagged-record stream files generated by the upstream Kenan billing engine.
58
58
  - Syntactic and structural validation of incoming batch streams with marker-file arrival detection.
59
59
  - Transformation of raw stream records into an immutable, strongly typed canonical domain model.
60
60
  - Full-population financial reconciliation covering invoice totals, line item aggregates, tax breakdowns, and balance brought forward.
@@ -67,14 +67,14 @@ The operator's fixed customer billing produces monthly invoices across four stag
67
67
  - Atomic publication to destination endpoints with isolated staging and late-arriving release markers.
68
68
 
69
69
  #### 2.2.2 Out of Scope
70
- - Upstream rating, charging, or billing account balance calculation performed by the billing engine.
70
+ - Upstream rating, charging, or billing account balance calculation performed by Kenan.
71
71
  - Direct management or control of physical print-house insertion machinery and postal sorters.
72
72
  - Real-time customer web serving; online portals ingest published outputs asynchronously.
73
73
  - Probabilistic, generative, or Large Language Model (LLM) components in the financial generation path.
74
74
 
75
75
  ### 2.3 Architecture Boundaries and Key Assumptions
76
76
  - **Deterministic Processing**: All calculations and document renderings produce identical, byte-reproducible outputs for identical inputs.
77
- - **Local Filesystem Isolation**: Network-isolated execution on `batch-host-01` with zero runtime external API or HTTP dependencies.
77
+ - **Local Filesystem Isolation**: Network-isolated execution on `<BATCH_HOST>` with zero runtime external API or HTTP dependencies.
78
78
  - **Fail-Closed Operations**: Any financial discrepancy, unmapped record, or population count mismatch immediately halts the run and prevents output release.
79
79
 
80
80
  ---
@@ -177,7 +177,7 @@ sequenceDiagram
177
177
  Render->>Storage: Write outputs into staging directories
178
178
 
179
179
  Note over Orch,Targets: Stage 5: Population Audit & Atomic Release
180
- Orch->>Audit: Verify population counts (PDF == XML == AFP == 100,000)
180
+ Orch->>Audit: Verify population counts (PDF == XML == AFP == ACCOUNTS_PER_RUN)
181
181
  Orch->>Audit: Seal freeze-manifest.json and compute final SHA-256 digests
182
182
  Orch->>Audit: Transition to RunLifecycle::READY_FOR_RELEASE
183
183
  Orch->>Targets: Copy verified artifacts to delivery endpoints
@@ -201,12 +201,12 @@ flowchart TD
201
201
 
202
202
  subgraph Upstream["Upstream Billing Systems"]
203
203
  direction LR
204
- SYS_01["SYS_01: Billing & Rating Engine<br/>Rating & Billing Lifecycle"]:::existingStyle
204
+ SYS_01["SYS_01: Kenan Billing Engine<br/>Rating & Billing Lifecycle"]:::existingStyle
205
205
  end
206
206
 
207
- subgraph CorePlatform["Invoice Composition Replacement Platform (batch-host-01)"]
207
+ subgraph CorePlatform["BriteBill Replacement Platform (BATCH_HOST)"]
208
208
  direction LR
209
- SYS_02["SYS_02: Composition Replacement Engine<br/>Ingestion, Mapping, Reconcile & Render"]:::newStyle
209
+ SYS_02["SYS_02: BriteBill Replacement Engine<br/>Ingestion, Mapping, Reconcile & Render"]:::newStyle
210
210
  SYS_06["SYS_06: Operations Control Centre<br/>Audit Journal, Sealed Manifest & CLI"]:::newStyle
211
211
  end
212
212
 
@@ -231,23 +231,23 @@ The table below catalogs all systems and platforms within the solution boundary:
231
231
 
232
232
  | ID | Application / Component | Application Type | Description | Impacted |
233
233
  |---|---|---|---|---|
234
- | `SYS_01` | Billing & Rating Engine | Billing / Rating | Upstream rating engine producing periodic `.EN` billing stream files. | No |
235
- | `SYS_02` | Composition Replacement Engine | Batch Engine | Core batch orchestration, mapping, financial reconciliation, and multi-channel rendering engine. | Yes |
234
+ | `SYS_01` | Kenan Billing Engine (Amdocs) | Billing / Rating | Upstream rating engine producing periodic `.EN` billing stream files. | No |
235
+ | `SYS_02` | BriteBill Replacement Composition Engine | Batch Engine | Core batch orchestration, mapping, financial reconciliation, and multi-channel rendering engine. | Yes |
236
236
  | `SYS_03` | External Print House & Mailroom Spool | Print Production | Commercial printing facility ingesting MO:DCA AFP spools and JRN insertion records. | No |
237
- | `SYS_04` | Customer Self-Service Portal | Web Portal | Customer billing portal ingesting structured eBilling XML for web presentation. | No |
237
+ | `SYS_04` | Customer Digital Self-Service Portal | Web Portal | Customer billing portal ingesting structured eBilling XML for web presentation. | No |
238
238
  | `SYS_05` | Enterprise Document Archive & Dispatcher | Document Repository | Long-term customer communications repository and email dispatcher ingesting certified PDF invoices. | No |
239
239
  | `SYS_06` | Operations Control Centre & Audit Journal | Ops & Governance | Operational monitoring CLI, telemetry aggregator, and sealed run manifest validator. | Yes |
240
240
 
241
- #### 4.2.1 SYS_01: Billing & Rating Engine
242
- The billing engine calculates customer monthly billing totals, rating, and payment adjustments. At cycle close, it exports raw `.EN` tagged-record stream files to the staging transfer area.
241
+ #### 4.2.1 SYS_01: Kenan Billing Engine (Amdocs)
242
+ The Kenan engine calculates customer monthly billing totals, rating, and payment adjustments. At cycle close, Kenan exports raw `.EN` tagged-record stream files to the staging transfer area.
243
243
 
244
- #### 4.2.2 SYS_02: Composition Replacement Engine
244
+ #### 4.2.2 SYS_02: BriteBill Replacement Composition Engine
245
245
  The core processing component implemented in Python. It executes local staging, canonical data mapping, strict financial reconciliation, and parallel document rendering.
246
246
 
247
247
  #### 4.2.3 SYS_03: External Print House & Mailroom Spool
248
248
  Receives binary MO:DCA AFP print spools and JRN insertion index files for postal sorting, physical paper printing, envelope inserting, and mail dispatch.
249
249
 
250
- #### 4.2.4 SYS_04: Customer Self-Service Portal
250
+ #### 4.2.4 SYS_04: Customer Digital Self-Service Portal
251
251
  The customer-facing digital web application that parses structured XML invoice streams to present interactive online bill breakdowns.
252
252
 
253
253
  #### 4.2.5 SYS_05: Enterprise Document Archive & Dispatcher
@@ -262,14 +262,14 @@ The table below details all communication interfaces across the platform boundar
262
262
 
263
263
  | ID | Type / Protocol | From | To | Description | Connectivity |
264
264
  |---|---|---|---|---|---|
265
- | `INT_01` | SFTP / SMB File Feed | `SYS_01` | `SYS_02` | Tagged-record billing stream (`.EN`) and cycle marker file. | Existing Connectivity |
265
+ | `INT_01` | SFTP / SMB File Feed | `SYS_01` | `SYS_02` | Kenan tagged-record billing stream (`.EN`) and cycle marker file. | Existing Connectivity |
266
266
  | `INT_02` | Secure File Transfer | `SYS_02` | `SYS_03` | MO:DCA AFP binary print stream partitioned at source-EN granularity. | New Connectivity |
267
267
  | `INT_03` | Secure File Transfer | `SYS_02` | `SYS_03` | Tabular ASCII index files (`.JRN`) containing mailroom insertion records. | New Connectivity |
268
268
  | `INT_04` | Secure File Transfer | `SYS_02` | `SYS_04` | Lossless structured XML documents matching customer portal schema. | New Connectivity |
269
269
  | `INT_05` | Secure File Transfer | `SYS_02` | `SYS_05` | Certified, byte-deterministic PDF customer invoices. | New Connectivity |
270
270
  | `INT_06` | Local File / JSONL | `SYS_02` | `SYS_06` | Append-only execution journal, telemetry events, and sealed manifest. | New Connectivity |
271
271
 
272
- #### 4.3.1 INT_01: Billing Stream & Completion Marker
272
+ #### 4.3.1 INT_01: Kenan Billing Stream & Completion Marker
273
273
  Transfers raw `.EN` data files containing account records, billing headers, charge breakdowns, and payment histories. A completion marker file signals batch completeness.
274
274
 
275
275
  #### 4.3.2 INT_02: MO:DCA AFP Print Spools
@@ -282,7 +282,7 @@ Delivers ASCII index files specifying sheet counts, account identifiers, envelop
282
282
  Transfers schema-validated XML documents containing invoice data for online customer self-service viewing.
283
283
 
284
284
  #### 4.3.5 INT_05: Deterministic PDF Invoices
285
- Transfers byte-deterministic PDF documents containing vector brand artwork, billing transaction tables, and payment slips.
285
+ Transfers byte-deterministic PDF documents containing vector brand artwork, billing transaction tables, and Giro payment slips.
286
286
 
287
287
  #### 4.3.6 INT_06: Telemetry & Sealed Manifest
288
288
  Emits structured JSONL telemetry and a cryptographic `release_manifest.json` sealing file counts, execution parameters, and SHA-256 hashes.
@@ -304,7 +304,7 @@ The platform provides administrative command-line surfaces for operations and sc
304
304
  ## 5. High-Level Data and Storage Architecture
305
305
 
306
306
  ### 5.1 Host & Working Storage Topology
307
- The engine executes entirely within a dedicated local filesystem hierarchy on host `batch-host-01`. Every batch run is isolated by unique run and attempt identifiers:
307
+ The engine executes entirely within a dedicated local filesystem hierarchy on the dedicated batch host `<BATCH_HOST>`. Every batch run is isolated by unique run and attempt identifiers:
308
308
 
309
309
  ```
310
310
  <working_root>/<run_id>/<attempt_id>/
@@ -365,9 +365,9 @@ classDiagram
365
365
 
366
366
  ### 5.3 Multi-Channel Output Volume & Specifications
367
367
  Production metrics established during candidate certification (ATT-006 baseline):
368
- - **PDF Documents**: 100,750 total PDF files (100,000 primary invoices + 750 secondary itemized schedules).
369
- - **XML Documents**: 100,000 structured customer eBilling files.
370
- - **AFP Spools**: 32 consolidated MO:DCA print files matching the 32 upstream input batches.
368
+ - **PDF Documents**: `<PDF_TOTAL>` total PDF files (`<ACCOUNTS_PER_RUN>` primary invoices + `<SECONDARY_SCHEDULES>` secondary itemized schedules).
369
+ - **XML Documents**: `<ACCOUNTS_PER_RUN>` structured customer eBilling files.
370
+ - **AFP Spools**: 32 consolidated MO:DCA print files matching the 32 upstream Kenan input batches.
371
371
  - **JRN Journals**: 32 postal index files containing 100% field parity with postal insertion machinery.
372
372
 
373
373
  ---
@@ -382,7 +382,7 @@ The platform security architecture adheres to strict controls defined in `docs/S
382
382
 
383
383
  ### 6.2 Zero Runtime Network Access
384
384
  - No module within `ingestion/`, `mapping/`, `templating/`, or `rendering/` initiates external HTTP or network requests during generation.
385
- - All fonts, styling assets, and configuration templates reside locally on disk on `batch-host-01`.
385
+ - All fonts, styling assets, and configuration templates reside locally on disk on `<BATCH_HOST>`.
386
386
 
387
387
  ### 6.3 Working Storage Path Isolation & Traversal Defense
388
388
  - File discovery resolves candidate paths and rejects any file whose resolved parent directory escapes the staging root.
@@ -390,7 +390,7 @@ The platform security architecture adheres to strict controls defined in `docs/S
390
390
 
391
391
  ### 6.4 Privacy and Audit Redaction
392
392
  - Domain models override string representations to redact personal customer names and street addresses from log outputs.
393
- - Upstream customer metadata categories (`FIRSTNAME`, `EMAIL`, `OFFNETID`, `POSTCODE`) are dropped during ingestion mapping.
393
+ - Upstream customer metadata categories (`FIRSTNAME`, `EMAIL`, `OFFNETID`, `EIRCODE`) are dropped during ingestion mapping.
394
394
  - Audit manifests record only source file basenames, billing reference numbers, and one-way SHA-256 correlation identifiers.
395
395
 
396
396
  ---
@@ -401,10 +401,10 @@ The platform security architecture adheres to strict controls defined in `docs/S
401
401
 
402
402
  | Requirement | Description | Component Implementation | Verification Control |
403
403
  |---|---|---|---|
404
- | `REQ-01` | Ingest `.EN` tagged-record streams | `SYS_02` (`ingestion/en_reader.py`) | Automated parser unit tests and zero-failure batch validation. |
404
+ | `REQ-01` | Ingest Kenan `.EN` tagged-record streams | `SYS_02` (`ingestion/en_reader.py`) | Automated parser unit tests and zero-failure batch validation. |
405
405
  | `REQ-02` | Strong financial reconciliation | `SYS_02` (`reconciliation/checks.py`) | Full-population balance reconciliation gate (`reconcile()`). |
406
406
  | `REQ-03` | Byte-deterministic PDF rendering | `SYS_02` (`rendering/mupdf_renderer.py`) | SHA-256 byte-identity verification against certified baseline. |
407
- | `REQ-04` | Multi-channel parity (PDF/XML/AFP/JRN) | `SYS_02` (`mapping/*`, `rendering/*`) | Cross-output population count verification (`100,000` exact). |
407
+ | `REQ-04` | Multi-channel parity (PDF/XML/AFP/JRN) | `SYS_02` (`mapping/*`, `rendering/*`) | Cross-output population count verification (`<ACCOUNTS_PER_RUN>` exact). |
408
408
  | `REQ-05` | Atomic release & staging isolation | `SYS_02` (`batch/orchestrator.py`) | Zero output visibility before `READY_FOR_RELEASE` and marker written last. |
409
409
  | `REQ-06` | Auditability & run sealing | `SYS_06` (`audit/manifest.py`) | Cryptographic `release_manifest.json` generation. |
410
410
 
@@ -416,13 +416,13 @@ The platform security architecture adheres to strict controls defined in `docs/S
416
416
 
417
417
  | Term | Definition |
418
418
  |---|---|
419
- | `.EN` | Proprietary tagged-record flat file format emitted by the upstream billing engine. |
419
+ | `.EN` | Proprietary tagged-record flat file format emitted by the Kenan billing engine. |
420
420
  | AFP | Advanced Function Presentation / MO:DCA binary print architecture used in industrial mailrooms. |
421
421
  | JRN | Journal insertion index file coordinating automated paper folding and envelope stuffing. |
422
422
  | Byte Determinism | The guarantee that identical inputs rendered with identical parameters yield identical binary SHA-256 hashes. |
423
423
  | Fail-Closed | An architectural principle where any detected inconsistency aborts processing before releasing outputs. |
424
424
 
425
425
  ### 8.2 Reference Documents
426
- - `<repo>/README.md`: System operational runbook and architecture overview.
427
- - `<repo>/docs/SECURITY_AND_PRIVACY.md`: Security controls and privacy safeguards.
428
- - `<repo>/docs/PRODUCTION_CANDIDATE_ATT006.md`: Candidate certification report and benchmark results.
426
+ - `britebill-replacement/README.md`: System operational runbook and architecture overview.
427
+ - `britebill-replacement/docs/SECURITY_AND_PRIVACY.md`: Security controls and privacy safeguards.
428
+ - `britebill-replacement/docs/PRODUCTION_CANDIDATE_ATT006.md`: Candidate certification report and benchmark results.
@@ -2,7 +2,7 @@
2
2
  "poolVersion": "1.3.112",
3
3
  "bundles": {
4
4
  "antigravity-plugin": "1.3.112",
5
- "antigravity-plugin-extras": "1.3.31",
5
+ "antigravity-plugin-extras": "1.3.33",
6
6
  "codex": "unknown"
7
7
  }
8
8
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@caddis/cli",
3
- "version": "0.4.20",
3
+ "version": "0.4.22",
4
4
  "description": "Install, update and diagnose the caddis dev harness across every coding agent you use (Claude Code, agy/Antigravity, and more).",
5
5
  "keywords": [
6
6
  "caddis",