Fountain Coach Gitowner-controlled · read only

FountainTextLayoutKit.git · SCENARIO.md

FountainTextLayoutKit.git / SCENARIO.md

revision fb0623ef1cfd7087523ca74f689e60c71f0c0879 · complete file

# Candidate scenario — `fountain.text.layout@0.1.0`

This is a package-level FCIS scenario for the candidate `FountainTextLayoutKit`.
It has no network, Store, provider, credential, MIDI2, or user-interface side effect.

## Intent

Given semantic text blocks that have already been parsed by
`FountainMarkdownPresentationKit`, produce deterministic, rendering-neutral line
and overflow decisions. Preserve every source character. Supply Apple-native
style tokens through the separate adapter target.

## Journey

1. Create a `FountainTextDocument` from parser-owned blocks.
2. Layout the blocks with a declared width, measurer, and policy.
3. Inspect line boundaries, keep-together hints, and overfull diagnostics.
4. Map semantic roles to Apple-native text-style tokens when the consumer is a
   SwiftUI surface.

## Terminal predicates

- all source text is preserved;
- ordinary prose wraps deterministically;
- preformatted Fountain/code blocks retain source line shape by default;
- content that cannot fit is diagnosed as overflow, never silently truncated;
- style selection is role-based and does not own rendering, AX, or layout views;
- the package build and focused test suite pass.

## Evidence

The terminal predicates are exercised by
`Tests/FountainTextLayoutKitTests/FountainTextLayoutKitTests.swift`.
The candidate remains unadmitted until a maintainer performs the FCIS-KIT
admission and release workflow and a Reframe consumer completes its own AX/VRT
acceptance.