Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 30 additions & 16 deletions HANDOFF.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Payment Intelligence Modules — handoff

_Last updated: 2026-05-07 20:40 +08_
_Last updated: 2026-05-27 20:13 +08_

This is the next-session entry point for `Raafet57/payment-intelligence-modules`.
Read this file first, then check live `git` / GitHub state before acting.
Expand All @@ -9,15 +9,21 @@ Read this file first, then check live `git` / GitHub state before acting.

- Repository: `https://github.com/Raafet57/payment-intelligence-modules`
- Local path on Hermes: `/Users/Shared/AgentWork/repos/payment-intelligence-modules`
- Product baseline before the current branch: `3e71236` — merge commit for PR #12, which added the static root `/ssi` suite entry point.
- Active feature branch: `feat/ssi-public-evidence-control-tower`
- Product baseline before the current branch: `4eaf07d` — merge commit for PR #13, which added the SSI public evidence control tower foundation.
- Active feature branch: `feat/ssi-validation-catalogue`
- Local status: SSI validation catalogue and SSI shell cutover changes are committed locally; branch has not been pushed, and no PR, deploy, release, or publication has been done.
- Deployment/release/tag/public announcement: **not done**

## Current branch scope

This branch improves the folded SSI Control Tower backend module under `apps/ssi-control-tower/` using public bank SSI / wire / settlement-instruction evidence while preserving the synthetic-only privacy boundary.
Current feature branch contains two committed slices:

Implemented shape:
1. SSI validation catalogue under `apps/ssi-control-tower/`.
2. SSI shell cutover in the root suite, which removes SSI from the Payment Intelligence nav/home launcher and keeps `/ssi` only as an unlinked static boundary pointer.

The standalone SSI Control Tower adjacent app remains under `apps/ssi-control-tower/` using public bank SSI / wire / settlement-instruction evidence while preserving the synthetic-only privacy boundary. SSI Control Tower is a standalone adjacent app, not a Payment Intelligence module.

Implemented shape from the public-evidence/control-tower slice:

- Sanitized public evidence sidecar: `apps/ssi-control-tower/docs/public_ssi_field_evidence_sources.json`.
- Evidence note: `apps/ssi-control-tower/docs/public_ssi_field_evidence.md`.
Expand All @@ -40,29 +46,37 @@ Implemented shape:
| BIC Validator | `/bic` | Demo/snapshot-bound only; not current-production BIC Directory validation. |
| CBPR+ Readiness Checker | `/cbpr` | Local readiness/structure checks only; not certified/full XSD/MyStandards validation. |
| Payment Insights Lite | `/insights` | Local lifecycle insight over files the user provides; not live payment tracking. |
| SSI Control Tower | `/ssi` | Static root entry page for the folded backend module under `apps/ssi-control-tower/`. |

## Verification evidence for this branch
## Adjacent standalone app pointer

`/ssi` is retained only as an unlinked static boundary pointer to the standalone
SSI Control Tower app under `apps/ssi-control-tower/`. SSI Control Tower is not a
Payment Intelligence module/workflow, is absent from the suite nav and home
launcher, and still requires a separate repo-extraction/product-boundary
decision.

## Verification evidence for current local work

Local gates run before handoff:
Latest local gates run for the SSI shell cutover on 2026-05-26:

```bash
pnpm test -- src/App.test.tsx src/pages/SsiPage.test.tsx
pnpm test:e2e -- e2e/smoke.spec.ts e2e/ssi.spec.ts
pnpm audit:privacy
cd apps/ssi-control-tower && make test
python3 -m ruff check apps/ssi-control-tower
pnpm verify
pnpm test:e2e
git diff --check
```

Results:

- `cd apps/ssi-control-tower && make test` passed: **106 passed**.
- `python3 -m ruff check apps/ssi-control-tower` passed: all checks passed.
- Focused root Vitest command passed; Vitest ran **30 files / 230 tests passed**.
- Targeted Playwright smoke passed: **4 tests passed**.
- `pnpm audit:privacy` passed: `privacy-audit: clean (src/)`.
- `cd apps/ssi-control-tower && .venv/bin/python -m pytest -q` passed: **125 passed**.
- `pnpm verify` passed: lint, format check, typecheck, Vitest, privacy audit, deterministic IBAN/BIC/CBPR data checks, and build.
- Root Vitest inside `pnpm verify`: 30 files passed / 230 tests passed.
- `pnpm test:e2e` passed: 21 Playwright tests passed.
- `git diff --check` passed.
- Claude Code frontend/design review: final verdict `APPROVE`.
- Codex cold diff review for SSI-CUTOVER-1 returned `APPROVED` for implementation readiness; push/PR/deploy remain closed gates.

## Boundaries to preserve

Expand All @@ -76,7 +90,7 @@ Root suite privacy/product boundaries:

- The root Vite/React app remains static and browser-only.
- Root `src/` must not add backend coupling, telemetry, analytics, remote logging, browser persistence, external fetches, or payment-data upload paths.
- `/ssi` is a static entry page only. It must remain fetch-free and iframe-free unless a separate architecture/security review explicitly changes the posture.
- `/ssi` is an unlinked static boundary pointer only. It must remain fetch-free, iframe-free, storage-free, telemetry-free, and free of clickable localhost links unless a separate architecture/security review explicitly changes the posture.

SSI backend module boundaries:

Expand Down
52 changes: 35 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,42 @@ data.

For the latest repo/session handoff, start with [`HANDOFF.md`](./HANDOFF.md).

The root suite remains static and browser-only. Backend/product-control modules live under `apps/**` as separate, explicitly scoped applications and are not part of the root browser runtime.
The root suite remains static and browser-only. Standalone adjacent applications live under `apps/**` as separate, explicitly scoped apps; they are not Payment Intelligence modules and are not part of the root browser runtime.

## Modules

| Module | Route | Status | What it does |
| --------------------------- | -------------- | ---------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Scrubber** | `/scrubber` | Available | Strip personally identifying fields from `pacs.*` / `camt.*` XML before sharing with peers or vendors. Produces a privacy-safe mapping summary. |
| **Storyteller** | `/storyteller` | Available | Turn a `pacs.002 / 004 / 008 / 009` or `camt.052 / 053 / 054` message into a plain-language narrative plus a structured field projection and quick insights. |
| **IBAN Workbench** | `/iban` | Available | Validate, build, catalogue, and trace provenance for IBANs from bundled SWIFT IBAN Registry-derived data. Builder computes MOD-97 check digits from exact-length BBAN fields; no live BIC, VOP, account existence, or reachability checks. |
| **BIC Validator\*** | `/bic` | Demo | ISO 9362 syntax checks plus a tiny bundled snapshot lookup. **Demonstration only:** bundled BIC data is not accurate/current enough for production, routing, compliance, reachability, or payment decisions. |
| **CBPR+ Readiness Checker** | `/cbpr` | Available | Browser-only AppHdr / Document namespace / CBPR+ schema-profile coverage checks, plus UETR, BIC syntax, and IBAN syntax/checksum hints. Not a certified validator or MyStandards usage-rule engine. |
| **Payment Insights Lite** | `/insights` | Available | Local lifecycle insight over ACK/NACK, `pacs.*`, and `camt.*` files you provide. Groups files by identifiers in memory; not live payment tracking, VOP, reachability, or settlement monitoring. |
| **SSI Control Tower** | `/ssi` | Backend (folded) | Static root entry point for the separate FastAPI/Jinja SSI readiness and governance cockpit under `apps/ssi-control-tower/`. The backend module now includes public-evidence sourcing, command-centre panels, exception detail, and guided demo routes; run locally when needed. |
| Vault | — | Planned | Planned encrypted local export bundle: user-controlled download/import, no cloud vault, no server storage, and no persistent browser storage by default. Not built yet. |
| Module | Route | Status | What it does |
| --------------------------- | -------------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **Scrubber** | `/scrubber` | Available | Strip personally identifying fields from `pacs.*` / `camt.*` XML before sharing with peers or vendors. Produces a privacy-safe mapping summary. |
| **Storyteller** | `/storyteller` | Available | Turn a `pacs.002 / 004 / 008 / 009` or `camt.052 / 053 / 054` message into a plain-language narrative plus a structured field projection and quick insights. |
| **IBAN Workbench** | `/iban` | Available | Validate, build, catalogue, and trace provenance for IBANs from bundled SWIFT IBAN Registry-derived data. Builder computes MOD-97 check digits from exact-length BBAN fields; no live BIC, VOP, account existence, or reachability checks. |
| **BIC Validator\*** | `/bic` | Demo | ISO 9362 syntax checks plus a tiny bundled snapshot lookup. **Demonstration only:** bundled BIC data is not accurate/current enough for production, routing, compliance, reachability, or payment decisions. |
| **CBPR+ Readiness Checker** | `/cbpr` | Available | Browser-only AppHdr / Document namespace / CBPR+ schema-profile coverage checks, plus UETR, BIC syntax, and IBAN syntax/checksum hints. Not a certified validator or MyStandards usage-rule engine. |
| **Payment Insights Lite** | `/insights` | Available | Local lifecycle insight over ACK/NACK, `pacs.*`, and `camt.*` files you provide. Groups files by identifiers in memory; not live payment tracking, VOP, reachability, or settlement monitoring. |
| Vault | — | Planned | Planned encrypted local export bundle: user-controlled download/import, no cloud vault, no server storage, and no persistent browser storage by default. Not built yet. |

\*The BIC module intentionally does **not** perform live BIC Directory lookup,
current bank-directory enrichment, current SEPA reachability checks, SWIFT FIN
reachability checks, Verification of Payee, or account-owner/name matching.

## SSI Control Tower (standalone adjacent app)

SSI Control Tower is **not** a Payment Intelligence module or workflow. It is a
standalone adjacent app under `apps/ssi-control-tower/`, with its own
FastAPI/Jinja runtime, Python dependencies, tests, and synthetic fixtures. It is
intentionally absent from the suite navigation and the home launcher.

The root browser suite keeps `/ssi` only as an unlinked static boundary pointer:
it documents the boundary, stays fetch-free, iframe-free, storage-free, and
telemetry-free, and does not link to localhost. Repo extraction and the
product-boundary decision for the standalone app are still pending.

The standalone app runs separately:

```bash
cd apps/ssi-control-tower && make run # serves http://localhost:8000
```

## Privacy boundary

This is the load-bearing property of the suite, not a footer line:
Expand Down Expand Up @@ -62,7 +79,8 @@ banned APIs or absolute-URL `fetch` calls appear under `src/`.
`pacs.*`, and `camt.*` files the user provides in the browser. It is not live
payment tracking, settlement monitoring, VOP, SEPA reachability, or live bank
lookup.
- **SSI Control Tower:** the folded backend module uses synthetic fixtures plus a
- **SSI Control Tower:** the standalone adjacent app under `apps/ssi-control-tower/`
uses synthetic fixtures plus a
sanitized public-evidence sidecar from official bank SSI/wire/settlement pages.
The sidecar stores only bank name, URL, title, and abstract field categories;
no account numbers, IBANs, BICs, routing codes, correspondent chains, excerpts,
Expand All @@ -77,10 +95,10 @@ banned APIs or absolute-URL `fetch` calls appear under `src/`.
- Node.js >= 20
- pnpm >= 9

For the folded SSI Control Tower backend module only:
For the standalone SSI Control Tower adjacent app only:

- Python 3.11
- Run commands from `apps/ssi-control-tower/`; the module owns its own `pyproject.toml`, `Makefile`, tests, and SQLite development data.
- Run commands from `apps/ssi-control-tower/`; the standalone app owns its own `pyproject.toml`, `Makefile`, tests, and SQLite development data.

## Scripts

Expand Down Expand Up @@ -144,7 +162,7 @@ src/
CbprPage.tsx
IbanPage.tsx
ScrubberPage.tsx
SsiPage.tsx # static entry point for the folded SSI backend module
SsiPage.tsx # unlinked static boundary pointer to the standalone SSI app
StorytellerPage.tsx
NotFoundPage.tsx
lib/
Expand All @@ -169,11 +187,11 @@ scripts/
build-iban-registry.ts
privacy-audit.sh
apps/
ssi-control-tower/ # Separate FastAPI/Jinja backend module; not part of root browser runtime
ssi-control-tower/ # Standalone adjacent FastAPI/Jinja SSI app; not a Payment Intelligence module
app/ # Python app, routers, services, web templates
data/ # Synthetic fixtures/reference YAML only; local DBs ignored
docs/ # SSI docs including sanitized public-source evidence methodology
tests/ # pytest suite for the SSI backend module
tests/ # pytest suite for the standalone SSI app
pyproject.toml # Python dependencies owned by the nested module
Makefile # module-local test/install commands
```
Expand Down
8 changes: 4 additions & 4 deletions ROADMAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ the suite is browser-only, static-host friendly, and privacy-first.

## Recommended next steps

### 0. SSI Control Tower folded backend module
### 0. SSI Control Tower standalone adjacent app boundary

SSI Control Tower now lives under `apps/ssi-control-tower/` as a separate FastAPI/Jinja backend module inside this repository. It is not part of the root static browser suite runtime, and it must not weaken the browser-only privacy boundary for `src/`. The root suite now includes `/ssi` as a static, fetch-free entry page that explains the backend module posture and local run path without coupling the browser app to the FastAPI runtime.
SSI Control Tower now lives under `apps/ssi-control-tower/` as a standalone adjacent FastAPI/Jinja app inside this repository. It is not a Payment Intelligence module or workflow, is not part of the root static browser suite runtime, and must not weaken the browser-only privacy boundary for `src/`. The root suite retains `/ssi` only as an unlinked static, fetch-free boundary pointer that records the app boundary and local run path without coupling the browser app to the SSI runtime. Repo extraction and the product-boundary decision remain pending.

Merged SSI foundation includes:

Expand All @@ -30,7 +30,7 @@ Merged SSI foundation includes:
- instruction-level validation, instruction exceptions, and a unified control queue API;
- approval, export, and account-privacy hardening for the synthetic public prototype.

Follow-up scope now includes a public-evidence command-centre slice inside the FastAPI app: sanitized public bank SSI/wire/settlement-instruction source pointers, `/public-evidence`, `/api/v1/dashboard/operator-summary`, five operator dashboard panels, rule-filtered exceptions, exception detail pages, and a read-only guided `/demo`. Deployment/publication decisions and real-data/private-lab workflows remain separate approval gates.
Follow-up scope remains inside the standalone FastAPI app: sanitized public bank SSI/wire/settlement-instruction source pointers, `/public-evidence`, `/api/v1/dashboard/operator-summary`, five operator dashboard panels, rule-filtered exceptions, exception detail pages, and a read-only guided `/demo`. Deployment/publication decisions, repo extraction, and real-data/private-lab workflows remain separate approval gates.

### 1. Deployment target decision

Expand All @@ -48,7 +48,7 @@ Acceptance criteria:

- Static build only; no backend or API.
- SPA fallback works for `/scrubber`, `/storyteller`, `/iban`, `/bic`, `/cbpr`,
`/insights`, and `/ssi`.
`/insights`, and the unlinked `/ssi` boundary pointer.
- No analytics injection, remote logging, third-party scripts, cookies, or browser
persistence introduced by the host configuration.
- README hosting notes are updated with the chosen target.
Expand Down
Loading
Loading