Skip to main content

Authoring Framework — domain schemas and orchestration base for AI-assisted creative writing

Project description

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.6.1 LLM completion integration
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, essay, serie, scientific

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

iil_authoringfw-0.11.1.tar.gz (62.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

iil_authoringfw-0.11.1-py3-none-any.whl (53.2 kB view details)

Uploaded Python 3

File details

Details for the file iil_authoringfw-0.11.1.tar.gz.

File metadata

  • Download URL: iil_authoringfw-0.11.1.tar.gz
  • Upload date:
  • Size: 62.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for iil_authoringfw-0.11.1.tar.gz
Algorithm Hash digest
SHA256 b96b9bb09c2f7a12fbfbdc82184ee8f3e4a451bdcc09e4091cef37012dfdb30e
MD5 dee2b19985fe37c7df03cdac186ddf6a
BLAKE2b-256 07acfd7a042184537053514fdb6a8157cdb6a53e7ff317ed13c03f7a1061c0ae

See more details on using hashes here.

Provenance

The following attestation bundles were made for iil_authoringfw-0.11.1.tar.gz:

Publisher: publish.yml on achimdehnert/authoringfw

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file iil_authoringfw-0.11.1-py3-none-any.whl.

File metadata

File hashes

Hashes for iil_authoringfw-0.11.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e2a222beb59b03b2cb0407e82bc4bd32830712cef41bbe1bff792d24cd28a215
MD5 e17b7d55e82db7ccc23500c756c93d30
BLAKE2b-256 94b328d7cd693a23dab2556a8fc461d0d4510954889cbb20d5e241863bdf2324

See more details on using hashes here.

Provenance

The following attestation bundles were made for iil_authoringfw-0.11.1-py3-none-any.whl:

Publisher: publish.yml on achimdehnert/authoringfw

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page