SmartPolicyTranslator
Translate natural-language regulation into REAL, schema-conformant IAIso policy files — and wire them straight into your architecture.
Regulation is prose. IAIso deployments run on policy files. SmartPolicyTranslator closes that gap: it ingests regulatory text, parses each clause's deontic force (MUST / SHOULD / MAY), and emits a valid IAIso v1 policy document — with full provenance from every policy choice back to its source clause.
ingest ─▶ parse (deontic) ─▶ translate ─▶ validate ─▶ audit
text/PDF/URL MUST/SHOULD/MAY → IAIso policy vs real schema provenance
This is not an invented format. The IAIso policy schema, normative spec, and
official test vectors are vendored under spec/iaiso/ directly from
github.com/SmartTasksOrg/IAISO
(IAIso-v5.0). Every emitted policy is validated against them, and the loader
passes all of IAIso's own policy test vectors.
Install
SmartPolicyTranslator is not published on PyPI or any other package registry yet. Until
this section says otherwise, a package called sf-smartpolicytranslator on any registry
is not ours, and neither is smartpolicytranslator.
Install from a clone (Python 3.10 or later):
git clone https://github.com/SmartTasksOrg/sf-smartpolicytranslator
cd sf-smartpolicytranslator
python -m venv .venv
. .venv/bin/activate # Windows PowerShell: .\.venv\Scripts\Activate.ps1
python -m pip install .
python -m sf_smartpolicytranslator.cli examples/sample_regulation.txt
Status
- Version 1.0.0, experimental. Translates regulation text into IAIso v1 policy files that are validated against the IAIso schema and test vectors vendored in
spec/iaiso/; 4 tests. - Published: nowhere yet; install from a clone (above).
- Tested: the 4 tests in
tests/on Python 3.12, Linux, on every push to main and every pull request (.github/workflows/ci.yml). - Not tested: Windows and macOS; the LLM-assisted parsing path; Python versions other than 3.12.
- Ports: The client ports in
ports/have no automated check; none is published on a registry. - Security review: none independent. Report vulnerabilities as described in SECURITY.md.
Ready to run
The core needs zero third-party packages (stdlib only):
export PYTHONPATH=src
python3 -m sf_smartpolicytranslator.cli examples/sample_regulation.txt
# → a valid IAIso policy: version "1", enforcement_mode, consent scopes, pressure…
# LLM-assisted parsing (LM Studio / Ollama / llama.cpp):
python3 -m sf_smartpolicytranslator.cli --llm --provider lmstudio examples/sample_regulation.txt
# REST service:
bash scripts/run.sh # → http://localhost:8000/docs (or: docker build/run)
What the translation produces
A regulation with MUST/high-risk obligations yields a strict, fail-closed IAIso
policy: enforcement_mode: "strict", consent.required_scopes derived from the
data/access obligations (in IAIso's scope grammar, e.g. data.pii.read,
model.invoke, decision.override), a tightened pressure posture
(escalation_threshold lowered, post_release_lock on), a shorter consent TTL,
and a metadata.provenance[] trail mapping each choice to its clause. A permissive
regulation yields a permissive policy.
Integrations & ports
SmartPolicyTranslator produces IAIso policy; IAIso enforces it.
- LangChain (+ real IAIso SDK) —
integrations/langchain/:bounded_execution_from_regulation()translates regulation and loads the policy into IAIso's realBoundedExecution+IAIsoCallbackHandler, so a LangChain LLM is governed by the translated policy (pip install iaiso[langchain]). - n8n / Flowise —
integrations/n8n/,integrations/flowise/. - Language ports —
ports/{node,react,java,go,php,ruby,rust,csharp,swift,c,cpp}, mirroring every language IAIso itself ships (plus React and C/C++) so a policy can be generated and enforced in the language of your IAIso deployment. Seeports/README.mdfor the port↔iaiso-*map. - Local LLMs —
src/sf_smartpolicytranslator/llm.py: one OpenAI-compatible client for LM Studio, Ollama, and llama.cpp.
Tests
python3 -m pytest tests/ -q # translation + REAL IAIso schema/vector conformance
These run on the standard library alone — no iaiso package or network required.
Who's behind this
- Roen Branham — CEO & AI Strategy Architect · CISSP-certified AI, security & governance architect; author of IAIso and sole inventor of the Z4 Semantic Fabric patent application. LinkedIn
- Le Vu Tanh — CTO & Core Engineering Lead · Chief architect of the Cortex engine; large-scale system reliability and low-latency infrastructure — the engineer who ships what gets architected. LinkedIn
The team behind IAIso & SmartTasks: a CISSP-certified security & governance architect and a large-scale systems engineer — 20+ years shipping secure, AI-driven platforms for regulated, blue-chip environments (Allianz, BMW, Rolls-Royce, Heidenhain).
Runs on governed local models
Structured, machine-readable scorecards make model choice precise instead of guesswork.
This tool is local-first, so pair it with models you can actually vet. SmartTasks publishes 21+ governance-validated GGUF builds on Hugging Face — each with a machine-readable scorecard (capability tiers L1 Layman → L5 Agentic, IAIso conformance invariants (pass/warn/fail), OWASP-mapped garak red-team, transparency probes (viewpoint-alignment / over-refusal), and per-file SHA-256). Gate model selection on evidence, not vibes — and every finding, including warnings, is published in full.
→ SmartTasks on Hugging Face · Qwen3.6-27B (L5 agentic) · react-agent-coder-llama-3.1-8b (agentic coder) · gpt-oss-20b (open reasoning)
Get in touch
- Companies & enterprises: enterprise@smarttasks.cloud — we help teams integrate SmartPrompt + IAIso into their architecture so governance and audit-readiness become a byproduct of how they already work.
- The standard: IAIso · iaiso.org
- The product: SmartTasks.cloud
Built by SmartTasks Lab. Apache-2.0. Contributions welcome.
Metadata
Release files for sf-smartpolicytranslator 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| sf_smartpolicytranslator-1.0.0.tar.gz | 21.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| sf_smartpolicytranslator-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 43.8 kB
Release files / sf_smartpolicytranslator-1.0.0.tar.gz
| Download URL | sf_smartpolicytranslator-1.0.0.tar.gz |
|---|---|
| Size | 21.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c05f752e027144bed1285d854d2ba1874af427e8972b49ddd1b5febb86255e89
|
|
BLAKE2b-256 checksum How to use checksums |
aaf2b9aa345063425c510ef72fda66d5480582199f80e116da0e798ae4b8c49e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 9, 2026.
Transparency logRelease files / sf_smartpolicytranslator-1.0.0-py3-none-any.whl
| Download URL | sf_smartpolicytranslator-1.0.0-py3-none-any.whl |
|---|---|
| Size | 22.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6b2003e62bc6181a55b7cdf687efcd59c95f4d0906605b4ffab07d7652aeca21
|
|
BLAKE2b-256 checksum How to use checksums |
3c0c0155253a40aaec63c3cc6b550c1c6752c625a80e44fda6f563e600ff6ebe
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 9, 2026.
Transparency log