Skip to main content

iil-authoringfw — Authoring Framework

Domain schemas for AI-assisted creative writing applications.

PyPI Python License: MIT

Installation

pip install iil-authoringfw
# With aifw LLM integration:
pip install "iil-authoringfw[aifw]"
# All optional dependencies:
pip install "iil-authoringfw[all]"

Extras / Optional Dependencies

Extra Dependencies Purpose
aifw iil-aifw>=0.11.4 LLM completion integration (quality_level/priority routing needs >=0.11.2)
yaml pyyaml>=6.0 YAML template loading
promptfw iil-promptfw>=0.5.5 Prompt template rendering
all all above Full feature set

Quick Start

from authoringfw import StyleProfile, CharacterProfile, WorldContext, get_format

# Style constraints for prompt injection
style = StyleProfile(tone="melancholic", pov="third_limited", tense="past")
constraints = style.to_constraints()

# Character context
alice = CharacterProfile(
    name="Alice",
    role="protagonist",
    personality_traits=["brave", "curious"],
    arc="From fear to courage",
)
print(alice.to_context_string())

# World context
world = WorldContext(
    title="The Shattered Realms",
    genre="fantasy",
    world_rules=["Magic costs life force", "Dragons are extinct"],
)
print(world.to_context_string())

# Format profiles (novel, essay, series, scientific)
roman = get_format("roman")
print(roman.style_constraints)

Schemas

  • StyleProfile — tone, POV, tense, vocabulary, sentence rhythm
  • CharacterProfile — name, role, traits, backstory, arc, relationships
  • WorldContext — title, genre, setting, world rules, locations, lore
  • VersionMetadata — immutable content snapshot with hash, semver, LLM metadata
  • PhaseSnapshot — project state at a workflow phase boundary

Format Profiles

Built-in formats: roman (alias novel), essay, serie, scientific, nonfiction, academic, screenplay, short_story, blog_post, podcast_script. The registry (authoringfw.formats.base.FORMAT_REGISTRY) is the source of truth.

from authoringfw.formats.base import get_format, WorkflowPhase

novel = get_format("roman")
outline_steps = novel.steps_for_phase(WorkflowPhase.OUTLINE)

Adapter Interfaces

Protocol-based adapters — no inheritance required:

from authoringfw.adapters.interfaces import IStyleAdapter

class MyStyleAdapter:
    async def get_profile(self, style_id): ...
    async def analyze_text(self, text): ...
    def generate_style_constraints(self, profile): ...
    async def score_conformity(self, text, profile): ...

adapter = MyStyleAdapter()
assert isinstance(adapter, IStyleAdapter)  # True via @runtime_checkable

Changelog

See CHANGELOG.md.

Metadata

Release files for iil-authoringfw 0.11.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for iil-authoringfw 0.11.6
File Size Uploaded Provenance
iil_authoringfw-0.11.6.tar.gz 69.8 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for iil-authoringfw 0.11.6
File Interpreter ABI Platform
iil_authoringfw-0.11.6-py3-none-any.whl Python 3 none any Details

Total release size: 124.8 kB

Release files / iil_authoringfw-0.11.6.tar.gz

Download URL iil_authoringfw-0.11.6.tar.gz
Size 69.8 kB
Tags Source
SHA-256 checksum
How to use checksums
6258abae9dc27c63ba1d625d65859b467e5ef8596fb5e61f20a3bc57d724224c
BLAKE2b-256 checksum
How to use checksums
f5d2c0f86f703f3c0cf353c7db5983b59a26798c1c436e728a9cae66cc0dd8d2
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 Jul 31, 2026.

Transparency log

Release files / iil_authoringfw-0.11.6-py3-none-any.whl

Download URL iil_authoringfw-0.11.6-py3-none-any.whl
Size 55.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
577bb0989d7a62fa10aa0785c7c1a79afdd2e0085eae785fc94d741d9bf4d530
BLAKE2b-256 checksum
How to use checksums
c75ea2696522a28427cdc4bea811280cbfe59c09b26c29ee4873da18ced2c16c
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 Jul 31, 2026.

Transparency log

Security for iil-authoringfw 0.11.6

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.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for iil_authoringfw-0.11.6.tar.gz

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 Jul 31, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page