Design and Development Plan#
Document ID |
DHF-002 |
|---|---|
Version |
1.0 |
Date |
2026-03-22 |
Author |
pacs008 Engineering |
Status |
Released |
ISO 13485 Clauses |
7.3.1 (Design and Development Planning), 7.3.2 (Design and Development Inputs) |
1. Scope#
The pacs008 library generates ISO 20022 pacs.008 FI-to-FI Customer Credit Transfer XML messages. It ingests payment data from multiple sources (CSV, JSON, JSONL, SQLite, Parquet, Python objects), generates standards-compliant XML, and validates output against official XSD schemas.
The library supports all 13 published versions of the pacs.008 message type (pacs.008.001.01 through pacs.008.001.13).
2. Applicable Standards#
Standard |
Application |
|---|---|
ISO 20022 |
Financial message schema (pacs.008 message type) |
ISO 15022 |
SWIFT message standard (predecessor, charset reference) |
ISO 9362 |
BIC (Business Identifier Code) format and validation |
ISO 7064 |
IBAN check-digit algorithm (mod-97-10) |
ISO 4217 |
Currency code set |
ISO 13485:2016 |
Quality management system (DHF structure) |
ISO 14971:2019 |
Risk management (applied to software risks) |
IEC 62304:2006+A1 |
Medical device software lifecycle (process framework) |
3. Development Methodology#
The project follows an iterative, test-driven, CI-gated methodology:
Test-Driven Development (TDD): Tests are written alongside or before implementation. No code merges without passing tests.
Continuous Integration: Every commit triggers automated lint, type-check, security scan, and full test suite execution.
Quality Gates: All gates must pass before any change is accepted into the main branch.
Signed Commits: All commits are cryptographically signed for traceability.
4. Development Phases#
Phase |
Name |
Deliverables |
|---|---|---|
1 |
Core XML Generation |
Jinja2 template engine, version dispatch, XSD validation, namespace
registration, |
2 |
Multi-Format Data Ingestion |
CSV, JSON, JSONL, SQLite, Parquet loaders with streaming support,
universal |
3 |
Validation Framework |
BIC validator (ISO 9362), IBAN validator (ISO 7064 mod-97-10), JSON
schema validation for all 13 versions, |
4 |
SWIFT Compliance |
Charset validation (Z/z character set), field length enforcement, transliteration, compliance report generation |
5 |
Interface Layer |
Python public API ( |
6 |
Security Hardening |
defusedxml for XXE prevention, path traversal jail, SQL input validation, log sanitization, Jinja2 autoescape |
7 |
Verification & Release |
1,417 tests, 100% branch coverage, gold master fixtures for all 13 versions, Bandit SAST scan, cross-platform CI (3 OS x 4 Python versions) |
5. Tools and Environment#
Category |
Tool |
Purpose |
|---|---|---|
Language |
Python 3.9+ |
Runtime (3.9, 3.10, 3.11, 3.12 supported) |
Package Manager |
Poetry |
Dependency management and build |
Testing |
pytest |
Test runner with markers, fixtures, parametrize |
Coverage |
pytest-cov |
Branch coverage reporting (99% minimum gate) |
Type Checking |
mypy (strict) |
Static type analysis, |
Linting |
ruff, black |
Code style enforcement (line-length=79) |
Security |
Bandit |
Static application security testing (SAST) |
CI |
GitHub Actions |
Automated pipeline (test, lint, security, smoke) |
Documentation |
Sphinx + RTD theme |
ReStructuredText documentation |
Containers |
Docker |
|
Pre-commit |
pre-commit |
13 hooks (trailing whitespace, YAML/JSON/TOML check, ruff, black, mypy, detect-private-key, etc.) |
6. Quality Gates#
Every commit must pass all of the following before merge:
Lint & Format:
ruff checkandblack --checkpass with zero findingsType Check:
mypy --strictpasses with zero errorsSecurity Scan:
bandit -r pacs008/reports zero issuesUnit Tests: All 1,417 tests pass
Branch Coverage: >= 99% (enforced via
--cov-fail-under=99)Smoke Tests: Quick sanity checks pass
Pre-commit Hooks: All 13 hooks pass
7. Deliverables#
Deliverable |
Description |
|---|---|
Source Code |
|
Test Suite |
|
Documentation |
Sphinx docs including this DHF document set |
CI Pipeline |
|
Docker Image |
|
PyPI Package |
Distributable package via |
Templates |
13 Jinja2 templates + 13 XSD schemas + 13 sample XML files |