Metadata-Version: 2.4
Name: prism-corpus
Version: 0.1.0a1
Summary: PRISM (Procedural Research Inventory for Synthetic Messaging): Deterministic, defanged synthetic message and benign-twin corpus generator for security ML and HCI research.
Author-email: Terry Brett <trrybrett@yahoo.co.uk>
License-Expression: MIT
Project-URL: Homepage, https://github.com/terry-brett/prism-corpus
Project-URL: Repository, https://github.com/terry-brett/prism-corpus
Project-URL: Issues, https://github.com/terry-brett/prism-corpus/issues
Keywords: cybersecurity,phishing-research,synthetic-data,usable-security,corpus-generation
Classifier: Development Status :: 2 - Pre-Alpha
Classifier: Intended Audience :: Science/Research
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: Security
Classifier: Typing :: Typed
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: pydantic>=2.7
Requires-Dist: pyyaml>=6.0
Provides-Extra: llm
Requires-Dist: httpx>=0.27; extra == "llm"
Provides-Extra: dev
Requires-Dist: mypy>=1.11; extra == "dev"
Requires-Dist: pytest>=8.0; extra == "dev"
Requires-Dist: ruff>=0.6; extra == "dev"
Requires-Dist: types-PyYAML>=6.0; extra == "dev"
Dynamic: license-file

# prism-corpus

**PRISM** (*Procedural Research Inventory for Synthetic Messaging*) is an offline-first Python library and CLI for generating reproducible, defanged synthetic messaging corpora and matched benign twins across SMS, email, and social direct messages.

> **Status:** Early development (`v0.1.0a1` skeleton).

## Architecture

PRISM separates message structure, procedural slot synthesis, and optional surface paraphrasing into three layers:

1. **Layer 1 — Structural Blueprints (`prism_corpus.schemas`, `prism_corpus.blueprints`):** Typed YAML/JSON schemas defining message slots, multi-turn conversation state machines, and ground-truth manipulation indicator labels.
2. **Layer 2 — Procedural Slot & Metadata Synthesiser (`prism_corpus.synth`, `prism_corpus.locales`, `prism_corpus.mutators`):** Seeded, 100% deterministic offline synthesis of locale-aware metadata, email authentication headers (`SPF`/`DKIM`/`DMARC`), controlled perturbation mutators, and 1:1 matched benign twins (`pair_id`).
3. **Layer 3 — Optional BYOM Surface Realiser (`prism_corpus.realiser`):** Optional OpenAI-compatible / local LLM paraphrasing constrained by Pydantic validation, artefact preservation, and corpus diversity checks.

## Research Safety & Defanging Policy

PRISM is strictly designed for defensive machine-learning evaluation and human-factors security research:

- All generated URLs and email domains are restricted to IANA-reserved non-routable namespaces under [RFC 2606](https://datatracker.ietf.org/doc/html/rfc2606) (`.test`, `.example`, `.invalid`, `example.com`, `example.org`, `example.net`).
- PRISM includes **no** network delivery, message transport, or live-site cloning functionality.

## Development Setup

```bash
pip install -e ".[dev]"
pytest
prism --help
```

## Licence

Released under the [MIT License](LICENSE).
