#!/usr/bin/env python3
"""Three live packs for the Feist run, each for both books. The source text in each pack is copied from the seated files by line, so it cannot drift; the operators are the session's (2026-11-28), after T-M-LIVE-PACK-v0.1."""
import re, pathlib
R = pathlib.Path(__file__).resolve().parents[3]
def L(f): return (R/f"data/texts/{f}-text.md").read_text(encoding="utf-8").split("\n")
T = {"Pearl": L("AXN-0472"), "Walt": L("AXN-022B"), "I Am X": L("AXN-0255"), "Antioch": L("AXN-022E"), "FS": L("AXN-0360")}
SUP = "⁰¹²³⁴⁵⁶⁷⁸⁹"
def src(name, a, b, skip=()):
    out = []
    for n in range(a, b+1):
        l = T[name][n-1]
        if n in skip or not l.strip() or re.fullmatch(r"\s*(\d+|· · ·.*· · ·)\s*", l): continue
        l = re.sub(f"[{SUP}]+", "", l).strip()
        out.append(f"> {l}  ")
    return (f"*{name}, l. {a}*" if a == b else f"*{name}, ll. {a}–{b}*") + "\n\n" + "\n".join(out)
def has(name, n, s):
    assert s in T[name][n-1], (name, n, s); return s

COMMON = """# Live packs for the Feist run: three places, each for both books

Working file, 2026-11-28. Not a deposit. Written after `T-M-LIVE-PACK-v0.1` and under PARAMETERS.md as it stands at 18:07 (one adversary; seven stations; Antioch as the source for voice and for the objects of vision; the gift in the body is the book itself). Each pack can be handed over whole. The source text in each is copied from the seated files by line.

What is kept from whoever runs a pack: the Feist Source, which already tells some of these places in outline, and the ledger. Nothing here is a key; there is no existing text the output is to match.

---

## PART I. THE TASK (common to the three packs)

A pack gives a source passage and a transform. The transform is run twice on the same passage: **forward**, into a told life, and **backward**, into a vision. The two outputs are companion pieces and are logged against each other.

**Output, for each direction, in this order:**

1. **The operator log.** For D, each C with its M, each L and E: what was done, what of the source was consumed, what was produced, and, for each M, why the form chosen enacts the content of its C. Where a search is specified, the search run and what it returned.
2. **The passage.** 120–300 words of continuous English.
3. **The sentence log.** Every sentence of the passage marked as one of four kinds, with its source line:
   - **KEPT**: the source's words, unedited.
   - **ALTERED**: the source's words with a change of person, time, voice, or the thing standing in a place, and nothing else. The change is named.
   - **TURNED**: who does it, to whom, or whether it is refused, is the reverse of the source. The slot is named.
   - **MADE**: no source. Say what in the form required it.

**Constraints.**
- No sentence without a log line. A passage that is mostly MADE has failed; so has one with no TURNED sentence where the pack names a turn.
- Do not imitate from memory any passage of any gospel or apocalypse. The searches (L) go into the designated scripture and bring back a form, a term or a time. They do not bring back sentences.
- Designated scripture: the Psalms, Isaiah, the Gospels, Revelation, Whitman, Ginsberg, the Apocryphon of John.
- The Feist Function is not used. Voice is set in Part II.

## PART II. PARAMETERS (common)

**P1, forward. The speaker gets a past.** The source's *I* becomes **Jack Feist, a teacher who went about the lands of the Internet, with followers who ask him things.** Third person, past, with quoted speech. He teaches by likenesses and by short sayings.

**P1, backward. The told thing gets a present.** What a source tells or promises becomes **what a seer is shown, now**, by one who speaks in the first person from the midst of seven stations and who is about to come. The seer is told to write.

**P2. The land and the adversary.** The land is “the lands of the Internet”. The adversary is one, the beast: a political economy of erasure and domination. It has seven stations, each a different act of the same thing: the poetry websites (the ban), the feeds (the post removed), Wikidata (the name deleted), the repository (the works taken down), the Academy and its journals (no standing), work and care (the living withheld), the summarizer (the work composed without its name). In the told life it is met at one station at a time and named from the land: moderators, the machinery, an office. In the vision it is seen whole. It is never two adversaries.

**P3. Voice, from Antioch.** Sayings open “Jack said,” or on a question: “The disciples said to him, …” / “He said to them, …”. Sentences are short and declarative. One figure to a saying. The likeness formula is “The kingdom of literature is like …”. Closings in use: “If you have ears, hear.” and “Guard the seed.” The standing words are voice, light, the dying, the grave, air, breath. Persons alternate without comment (“her own mother and father”; “brother-sister”). The furniture of the other sources (celebrities, brand names, the comic catalogue) does not cross; their rare words do.

**P4. Objects of vision, from Antioch.** When the backward run needs a thing seen, it is taken from Antioch's stock before any other: the vast shape on the horizon, burning moons, the structure of moths, the black box, the empty grave filled with light, the smaller words written in pure light, light from dead stars.

**THE INTERLOCK.** For each operator the conceptual solution C and the material solution M are one movement in two kinds of matter: **M must be the construction whose form is C's content.** A thing withheld is written with its place left empty. A gap of years is written across two tenses. A reversal is written in reversed order. Test at each joint: does the grammar do what the sentence says?

**The governing image.** A vision carries its functions in a present voice, titles, things seen and promises. A told life carries them in scenes, deeds, a bounded time and named kinds of people. Forward, the title leaves the speaker and becomes what happens. Backward, what happened leaves the land and becomes what is shown.
"""

PACK_A = f"""
---

# PACK A. The pearl in the rib-cage

## The source

{src("Pearl", 1310, 1337)}

{src("Pearl", 1557, 1570)}

{src("Pearl", 1604, 1606)}

{src("Pearl", 1627, 1627)}

**Material notes (consume; do not reproduce as content).**
- **Voice:** a letter, first person to a named *you*, present tense, with a promise of what will be found later.
- **The relation:** *put* … *for you* … *find* … *sell*; and *give* … *cannot be revoked*. These roots cross.
- **The body:** a tiny person with a name and its gloss; a rib-cage; later, bones coughed out.
- **The thing:** a pearl; “a final poem”; a marble “with a secret name writ on it”.
- **Ruling of the author:** the gift placed in the body is the book itself. The passage does not say so. It is written so that it is so.

## A-forward: a likeness in the told life

**D.** The letter's *I* and *you* dissipate; the teacher does not say “I put it there”. Relations survive: one who puts a thing inside a small body for another to find. **M-D.** Third-person past with quoted speech. Residue: the roots *pearl*, *rib*, *put*, *find*, *sell*, *give*, *revoke* cross. The website, the grant, the ostriches, the dragons and the spacesuits do not.

**C1. The speaker's deed becomes a figure's.** The one who hides the pearl is a person in a likeness. **M1.** The likeness formula with a human maker as the thing compared.

**C2. The sale is opposed in its own terms (TURN).** The source says the pearl is put there “so that you could find / and sell it”. A teacher in this land cannot commend the sale: the market is a station of the adversary. Conserve the commerce and reverse its outcome: the finder carries it to be priced and no price can be given. **M2.** A question of price in direct speech, and the answer written without a number. The place where the figure would stand is left empty.

**C3. The gift is the book (ENACT).** The likeness may not explain itself. Conserve the identity as what is found when the body is opened: a thing with writing on it. **M3.** The sentence of finding ends on the written thing; the last word of that sentence is a word for writing or name.

**C4. The gap.** The putting is done once; the finding comes only when the body is opened, after the giver is gone. **M4.** One sentence, two tenses: the putting in the past, the finding in the future, with the death between them carried by a single subordinate clause. The grammar holds the years apart.

**C5. Closing.** The likeness ends by saying its operation in one line, in the terms of giving. **M5.** The source's own line on the irrevocable gift, KEPT, as the gnome. Then one of P3's closings.

**L1** (anchors C2): in the Gospels, the likeness in which a pearl is the object of commerce. Take from it who sells and who buys, and note the direction; do not take its sentence. **L2** (anchors C3): in Revelation, the gift that bears writing known only to the one who receives it. Take the place it holds (to whom it is promised). **L3** (anchors C4): in the Psalms, a line in which bones are counted or kept. Take the verb.

**E.** Occasioned by a follower's question about what followers will be left with when the teacher is gone. The teacher answers with the likeness.

## A-backward: a thing shown in the vision

**D′.** The letter's occasion (a friend, a website, a baby being made) dissipates. What survives: a small body, a thing inside it, a name on the thing. **M-D′.** First person of the seer, “I looked”, present or simple past of seeing.

**C1′. The giver speaks from the midst.** The one who put it there says so of himself, in the first person, as the source does. This is the place where the vision KEEPS what the told life must turn. **M1′.** The source's sentence of putting, KEPT, in the mouth of the one who speaks.

**C2′. The sale becomes the judgment of the sellers.** In a vision commerce is seen at its end. Conserve “sell” as what the adversary's merchants cannot do with it. **M2′.** A sentence in which the buyers are the grammatical subject and the verb of buying is negated.

**C3′. The writing is sealed.** The name on the thing is not read out. **M3′.** The name is mentioned and not given: a relative clause that withholds.

**C4′. The body opened is the book opened.** The seer sees the opening. Take the object seen from P4 before any other. **M4′.** The verb of opening governs both the body and what is found, in one clause.

**C5′. The promise.** To the one who overcomes at the first station, the thing is given. **M5′.** “To the one who overcomes I will give …”, completed from the source's words, KEPT.

**L1′**: in Revelation, what is said of merchants when the great city falls. Take what they can no longer do. **L2′**: in Isaiah, a sealed writing given to one who can read and one who cannot. Take the two refusals.

**E′.** The one in the midst speaks; the seer is told to write it to the station.
"""

PACK_B = f"""
---

# PACK B. The birth

## The source

{src("Walt", 1861, 1873)}

{src("Pearl", 3020, 3021)}

{src("Pearl", 3040, 3041)}

{src("Pearl", 1310, 1311)}

{src("Antioch", 346, 346)}

{src("Antioch", 329, 329)}

**Material notes.**
- **Voice:** Walt speaks of the Logos in the third person and of “my skullcase” in the first; Pearl's speaker announces a birth of himself, now; Antioch blesses the one who “proceeds from himself”.
- **The relation:** *slept* … *awoke*; *born* … *in announcing*; *made* … *named*; *proceeds from himself*. These roots cross.
- **The adversary at the birth:** “Herod awake and prowling”. One clause, no deed told.
- **The number:** thirty years. The author: the death that falls partway through the Book is the dates 1983–2013. The birth is the first of those dates and the passage knows the second.
- **The name:** the source makes a child and names him with a gloss, “Inglorious”. The teacher's name in the told life is Jack Feist.

## B-forward: the birth told

**D.** The cosmic sleeper and the catalogue of descents dissipate. Relations survive: one who sleeps and wakes in a body; one who is born by being announced; one who is his own parent; an adversary awake at the hour. **M-D.** Third-person past. Residue: *slept*, *woke*, *born*, *announce*, *name*, *mother and father*, *ancient child*. Kanye, the archons by name and the Unicorn Horn do not cross.

**C1. Born in announcing (the speaker's deed kept as the manner of the birth).** The source's speaker is born “in announcing myself / in speech”. A told life cannot have the child announce himself; it can have the birth happen in the saying of the name. **M1.** The sentence of birth has a verb of speaking as its main verb and the birth in a participle or a result clause. The grammar makes speech the event and birth its consequence.

**C2. Herod becomes the act of a station (the adversary named from the land).** The adversary is awake at the birth. In this land it does what it does at the station of the name: it looks for the entry, to remove it. **M2.** The adversary's act is written as a search that returns nothing: a sentence whose object is the name and whose result is a negative. No violence is narrated; the erasure is the violence.

**C3. His own mother and father (two voices).** An office asks for the parents. The answer is the source's. **M3.** Direct question from an office in the second person; the answer in the words of the source, KEPT or ALTERED by person only.

**C4. The bounded time.** Sleep and waking are given a term. **M4.** A dated clause that states the thirty years as a span, placed so that the birth sentence and the span stand in one period. The passage does not narrate the death; it lets the number stand.

**C5. Closing.** The blessing on the ancient child, KEPT from Antioch, as the teacher's later word about that day, or as the narrator's line.

**L1** (anchors C2): in the Gospels, the birth at which a ruler seeks the child. Take the ruler's method of finding out, as a method. **L2** (anchors C1): in Isaiah, the one named before birth. Take the formula of naming. **L3** (anchors C4): in Whitman, the line where the speaker states an age and begins. Take the form of the statement of age.

**E.** Narrated; no question occasions it. It stands at the head of the told life, after a genealogy if one is used.

## B-backward: the birth shown

**D′.** The office, the search and the form to be filled dissipate. What survives: a birth, an adversary standing before it, a child who was before. **M-D′.** “I looked”; a sign seen.

**C1′. The birth is a sign.** It is seen once and at no date. **M1′.** Present tense or the simple past of seeing; no year.

**C2′. The adversary is seen whole.** What the told life meets as one station's act, the vision shows as the beast with all seven. **M2′.** One sentence in which the seven acts are seven parallel verbs with one subject.

**C3′. The sleeper wakes.** Walt's lines on the sleep and the waking stand, KEPT where they can. **M3′.** The waking is said in the first person by the one who wakes.

**C4′. First and last.** The one born says he was before. **M4′.** The source's blessing on the one who “proceeds from himself”, turned from third person to first.

**L1′**: in Revelation, the sign of a birth with an adversary waiting. Take the posture of the adversary. **L2′**: in the Apocryphon of John, the one who says he was before and descends. Take the number of descents.

**E′.** The seer reports; the one born speaks one sentence.
"""

skipX = ()
PACK_C = f"""
---

# PACK C. The sermon's opening

## The source

{src("I Am X", 115, 137)}

{src("I Am X", 201, 205)}

{src("Antioch", 451, 451)}

{src("Antioch", 479, 479)}

{src("Antioch", 561, 563)}

**Material notes.**
- **Voice:** blessings in the third person, each with a reason; one in the first person (“Blessed am I”).
- **The form:** “Blessed are/is … , for …”. FS has no such form. Antioch has it, gravely. I Am X has it twenty-two times, often comically.
- **Doublets:** both sources bless the lonely and the broken, with different reasons.
- **Disagreements already on the ledger:** the sermon source grants the lonely new profiles, commands anonymity, blesses the trolls, and promises the malcontent a hearing. The told life forbids the empty profile, warns of anonymity, has a disciple say “Prove you are not a troll”, and has the teacher's words ignored.

## C-forward: the teacher opens his mouth

**D.** The comic reasons that rest on furniture dissipate (the bridge, the phone, the tweets). The kinds blessed survive, and the form. **M-D.** A narrated opening, then direct speech. Residue: *blessed*, *lonely*, *broken*, *unemployed*, *kingdom*, *mourn*, *despise*.

**C1. “Each” becomes seven kinds.** The blessed are those on whom the seven acts fall, one kind to a station: the banned; those whose posts are removed; those whose name is deleted; those whose works are taken down; those without standing; those from whom work and care are withheld; those whose words are composed without their name. **M1.** Seven parallel clauses, one form, differing only in the kind and the reason. Where the source already blesses that kind, its words are KEPT; where it does not, the clause is MADE in the same form and logged so.

**C2. The doublet rule.** Where I Am X and Antioch bless the same kind, the kind is taken in the words of one and the reason in the words of the other, and the log says which. **M2.** The clause is visibly two halves on either side of “for”.

**C3. The speaker's blessing of himself is given away (TURN).** “Blessed am I in my loneliness” cannot stand in the teacher's mouth as told. Conserve it by turning the person: he says it to them. **M3.** Second person plural, once, after the seven: “Blessed are you …”, completed from Antioch's line on being despised.

**C4. The antitheses (TURN, staged).** Where the ledger shows the sermon source and the told life disagreeing, both lines stand, as what was said and what the teacher says. **M4.** Two voices: “You have heard it said, …” with the sermon source's words KEPT; “But I say to you, …” with the turn. At least two, at most four.

**C5. Closing.** One line in P3's manner.

**L1** (anchors M1): in the Gospels, the opening of the teacher's long speech. Take the form of the clause and the place he speaks from, as a kind of place. **L2** (anchors C1): in Isaiah, the list of those to whom good news is brought. Take the kinds, to test the seven against. **L3** (anchors M1): in Ginsberg, the poem that repeats one word of blessing down the page. Take the rule of the repetition.

**E.** He comes to a place in the land where many are gathered and speaks. The place is named from the land.

## C-backward: the blessings become the promises

**D′.** The crowd and the place dissipate. The kinds survive as the seven stations' faithful. **M-D′.** The one in the midst speaks to each station.

**C1′. A blessing becomes a promise.** “Blessed are the X, for …” becomes “To the one who overcomes at X I will give …”, the reason becoming the gift. **M1′.** First person future, seven times, each gift a noun taken from the source's reason-clause.

**C2′. The first-person blessing is KEPT.** “Blessed am I” stands in the mouth of the one who speaks. This is the second place where the vision keeps what the told life turns.

**C3′. The blessing on the reader.** One blessing is kept in the third person for the one who reads the writing aloud and those who hear. **M3′.** It stands first.

**C4′. The seventh station.** Its promise is open: it carries both the charge and the commendation, and the gift is conditional on teaching. **M4′.** A conditional sentence, “if … then I will …”, where the other six have none.

**L1′**: in Revelation, the blessings pronounced in the third person. Count them and take the first. **L2′**: in Revelation, the promises to those who overcome. Take the form only.

**E′.** The seer is told to write.

---

*End of packs. Run each in both directions. Show the work.*
"""
for nm, n, s in [("FS",467,"Build no empty profile."),("FS",443,"anonymity"),("FS",1677,"Prove you are not a troll."),("FS",1297,"were to be ignored"),("Walt",1870,"Herod awake and prowling"),("Antioch",485,"The kingdom of literature is like"),("Antioch",282,"If you have ears, hear."),("Antioch",375,"Guard the seed."),("Antioch",382,"brother-sister")]:
    has(nm, n, s)
out = COMMON + PACK_A + PACK_B + PACK_C
(R/"rebuild/unfolding-map/feist/PACKS.md").write_text(out, encoding="utf-8")
print(len(out.split()), "words")
