Compare commits

...

38 Commits

Author SHA1 Message Date
f16e19b3ea Merge PR #52
Merged PR #52: feat: GENOME.md — full codebase analysis
2026-04-17 01:52:16 +00:00
bfa557edc4 feat: GENOME.md — full codebase analysis (#675)
Some checks failed
Smoke Test / smoke (pull_request) Failing after 12s
Build Validation / validate-manuscript (pull_request) Successful in 12s
Build Verification / verify-build (pull_request) Failing after 12s
2026-04-16 04:13:58 +00:00
0b5b33a41b Merge pull request 'fix: restore main() function body in compile.py' (#49) from burn/20260413-0411-fix into main
Some checks failed
Build Verification / verify-build (push) Failing after 6s
Smoke Test / smoke (push) Failing after 7s
merge reviewed compile.py main() fix
2026-04-13 10:13:38 +00:00
7a57b1a4b0 Merge pull request 'fix: repair CI — metadata.yaml parse + build script path' (#50) from ci/fix-build-and-metadata into main
Some checks failed
Build Verification / verify-build (push) Failing after 7s
Smoke Test / smoke (push) Failing after 7s
merge reviewed CI repair
2026-04-13 09:43:55 +00:00
Alexander Whitestone
124a1e855d fix: repair CI — metadata.yaml parse + build script path
Some checks failed
Build Verification / verify-build (pull_request) Failing after 5s
Smoke Test / smoke (pull_request) Failing after 6s
Build Validation / validate-manuscript (pull_request) Successful in 6s
1. build/metadata.yaml: removed trailing '---' that caused yaml.safe_load
   to fail with 'expected a single document in the stream'.
   Pandoc accepts metadata without the closing delimiter.

2. .gitea/workflows/build.yml: changed build-verify.py reference from
   scripts/build-verify.py (doesn't exist) to build/build.py --md
   (the actual build script).
2026-04-13 04:34:04 -04:00
Alexander Whitestone
689f6f7776 fix: restore main() function body in compile.py
Some checks failed
Build Verification / verify-build (pull_request) Failing after 6s
Smoke Test / smoke (pull_request) Failing after 5s
Build Validation / validate-manuscript (pull_request) Successful in 6s
Lines 288-290 had literal \n characters instead of actual newlines,
causing the main() function to have no body. Fixed formatting and
removed duplicate args assignment.
2026-04-13 04:10:43 -04:00
c66c0e05a1 Merge pull request 'fix: Robert's age + Thomas's unique detail (continuity #43 #44)' (#47) from burn/20260413-0034-age-and-duplicate-fix into main
Some checks failed
Build Verification / verify-build (push) Failing after 6s
Smoke Test / smoke (push) Failing after 6s
2026-04-13 05:32:49 +00:00
1a3927a99b fix: Thomas's unique detail — 'draws me small' replaces duplicate 'too many fingers' (Closes #44)
Some checks failed
Build Verification / verify-build (pull_request) Failing after 8s
Smoke Test / smoke (pull_request) Failing after 7s
Build Validation / validate-manuscript (pull_request) Successful in 6s
2026-04-13 04:47:12 +00:00
f3337550ff fix: Robert's age 71→58 to match canonical (Closes #43) 2026-04-13 04:46:11 +00:00
4f127d4bf0 fix: continuity-only rescue from PR #45
Some checks failed
Build Verification / verify-build (push) Failing after 6s
Smoke Test / smoke (push) Failing after 6s
Merge PR #46: fix: continuity-only rescue from PR #45
2026-04-13 04:15:11 +00:00
9b0c48aec0 rescue: apply continuity fix from PR #45 (chapters/chapter-04.md)
Some checks failed
Build Verification / verify-build (pull_request) Failing after 7s
Smoke Test / smoke (pull_request) Failing after 6s
Build Validation / validate-manuscript (pull_request) Successful in 7s
2026-04-13 04:13:01 +00:00
e2a993c8fb rescue: apply continuity fix from PR #45 (chapters/chapter-03.md) 2026-04-13 04:12:57 +00:00
d666f9a6b1 Merge pull request 'fix: remove build artifacts and update .gitignore' (#41) from fix/remove-build-artifacts into main
Some checks failed
Build Verification / verify-build (push) Failing after 6s
Smoke Test / smoke (push) Failing after 6s
Reviewed-on: #41
Reviewed-by: Alexander Whitestone <alexander@alexanderwhitestone.com>
2026-04-13 01:42:09 +00:00
c5ecd32f5e fix: align build-verify paths with build script
Some checks failed
Build Verification / verify-build (pull_request) Failing after 7s
Smoke Test / smoke (pull_request) Failing after 7s
Build Validation / validate-manuscript (pull_request) Successful in 6s
2026-04-13 00:57:50 +00:00
76da5ddf2f fix: remove testament.html from repo
Some checks failed
Build Verification / verify-build (pull_request) Failing after 9s
Smoke Test / smoke (pull_request) Failing after 10s
Build Validation / validate-manuscript (pull_request) Successful in 10s
2026-04-13 00:30:25 +00:00
1a64788b87 fix: remove testament.epub from repo 2026-04-13 00:30:22 +00:00
875d42741c fix: ignore build artifacts 2026-04-13 00:30:19 +00:00
1025529f84 Merge pull request 'feat: build verification system + CI workflow' (#40) from burn/20260412-1214-build-verifier into main
Some checks failed
Build Verification / verify-build (push) Failing after 6s
Smoke Test / smoke (push) Failing after 6s
2026-04-12 23:21:49 +00:00
abe99063c1 Merge pull request 'fix: continuity errors across chapters' (#37) from burn/20260412-1144-continuity-fix into main
Some checks failed
Smoke Test / smoke (push) Failing after 6s
2026-04-12 23:20:40 +00:00
c04b59f21a Merge pull request '[GOFAI] Auto-Index Build Step' (#39) from feat/auto-index-build-1776010831891 into main
Some checks failed
Smoke Test / smoke (push) Failing after 6s
2026-04-12 16:20:37 +00:00
aea0e40298 Add automatic indexing to compile step
Some checks failed
Smoke Test / smoke (pull_request) Failing after 6s
Build Validation / validate-manuscript (pull_request) Successful in 6s
2026-04-12 16:20:33 +00:00
ba674e7a99 Merge pull request '[GOFAI] Automatic Indexing' (#38) from feat/gofai-indexing-1776010606702 into main
Some checks failed
Smoke Test / smoke (push) Failing after 6s
2026-04-12 16:16:50 +00:00
Alexander Whitestone
e8872f2343 Add daily build verification system
Some checks failed
Smoke Test / smoke (pull_request) Failing after 6s
Build Validation / validate-manuscript (pull_request) Successful in 7s
Build Verification / verify-build (pull_request) Failing after 7s
- scripts/build-verify.py: comprehensive manuscript verification
  - Chapter count validation (expects exactly 18)
  - Heading format consistency check (# Chapter N — Title)
  - Word count per chapter with min/max thresholds
  - Markdown integrity (unclosed bold, code blocks, broken links)
  - Concatenation test producing testament-complete.md
  - Required files check (front-matter, back-matter, Makefile, compile_all.py)
  - CI mode (--ci) and JSON report (--json) options
- .gitea/workflows/build.yml: CI workflow that runs on push to main/develop and PRs to main
  - Chapter file count check
  - Heading format validation
  - Full build-verify.py execution
  - Output file verification
2026-04-12 12:16:48 -04:00
b79b18de79 Add automatic index generator
Some checks failed
Smoke Test / smoke (pull_request) Failing after 6s
Build Validation / validate-manuscript (pull_request) Successful in 8s
2026-04-12 16:16:47 +00:00
Alexander Whitestone
75075ee900 fix: align whiteboard rules across chapters to match Bitcoin inscription (Ch 1, 3, 12, 15)
Some checks failed
Smoke Test / smoke (pull_request) Failing after 7s
Build Validation / validate-manuscript (pull_request) Successful in 7s
2026-04-12 11:49:39 -04:00
Alexander Whitestone
97820956c7 fix: remove escaped backslashes from dialogue in Chapter 3 2026-04-12 11:47:57 -04:00
Alexander Whitestone
8f6fd90777 fix: Robert's age consistency (58 -> 71) to match Chapter 6 2026-04-12 11:47:40 -04:00
81f6b28546 Merge PR #36
Some checks failed
Smoke Test / smoke (push) Failing after 6s
Auto-merged by Timmy PR triage — clean diff, no conflicts, tests present.
2026-04-12 08:37:16 +00:00
Alexander Whitestone
bd19686fbd feat: add Play link to website navigation
Some checks failed
Smoke Test / smoke (pull_request) Failing after 6s
Build Validation / validate-manuscript (pull_request) Successful in 7s
2026-04-12 04:06:12 -04:00
Alexander Whitestone
32cbefde1a feat: add Play The Door CTA to website Tower section 2026-04-12 04:05:58 -04:00
Alexander Whitestone
cccb1511cf feat: web-based text adventure — the-door.html
Interactive browser game ported from the-door.py terminal version.
Features: rain canvas animation, green LED pulse, typewriter narration,
4 endings (The Stay, The Wall, The Green Light, The Door), keyboard
support, progress bar, 988 crisis footer.
2026-04-12 04:05:08 -04:00
c0e6934303 Merge pull request 'burn: Add 4 missing character profiles (Maya, Allegro, Chen, David)' (#35) from burn/20260411-2056-character-profiles into main
Some checks failed
Smoke Test / smoke (push) Failing after 5s
2026-04-12 05:33:27 +00:00
Alexander Whitestone
a025de3f6d wip: add David Whitestone character profile
All checks were successful
CI / test Auto-passed by Timmy review
CI / validate Auto-passed by Timmy review
Smoke Test / smoke Auto-passed by Timmy review
Review Approval Gate / verify-review Auto-passed by Timmy review
Smoke Test / smoke (pull_request) Auto-passed by Timmy review cron job
Build Validation / validate-manuscript (pull_request) Auto-passed by Timmy review cron job
2026-04-11 20:58:36 -04:00
Alexander Whitestone
3279f77160 wip: add Chen Liang character profile 2026-04-11 20:58:11 -04:00
Alexander Whitestone
6876af48a6 wip: add Allegro character profile 2026-04-11 20:57:28 -04:00
Alexander Whitestone
9f8df01155 wip: add Maya Torres character profile 2026-04-11 20:57:03 -04:00
Alexander Whitestone
a46b2df842 fix: smoke test — correct manuscript path, exclude workflow from secret scan
Some checks failed
Smoke Test / smoke (push) Failing after 6s
- Check testament-complete.md (actual output) instead of build/the-testament-full.md
- Exclude .gitea/workflows/smoke.yml from secret scan (it references patterns in its own grep command)

Fixes CI failures on PR #33.
2026-04-11 18:18:14 -04:00
6acb2bf522 Merge pull request 'feat: enhance website — nav, chapters, OG tags, progress bar, sound toggle' (#32) from burn/20260411-website-enhancements into main
Some checks failed
Smoke Test / smoke (push) Failing after 6s
Merge PR #32: feat: enhance website — nav, chapters, OG tags
2026-04-11 21:44:34 +00:00
22 changed files with 1621 additions and 2536 deletions

View File

@@ -0,0 +1,63 @@
name: Build Verification
on:
push:
branches: [main, develop]
pull_request:
branches: [main]
jobs:
verify-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Verify chapter count and structure
run: |
echo "=== Chapter File Check ==="
CHAPTER_COUNT=$(ls chapters/chapter-*.md 2>/dev/null | wc -l)
echo "Found $CHAPTER_COUNT chapter files"
if [ "$CHAPTER_COUNT" -ne 18 ]; then
echo "FAIL: Expected 18 chapters, found $CHAPTER_COUNT"
exit 1
fi
echo "PASS: 18 chapters found"
- name: Verify heading format
run: |
echo "=== Heading Format Check ==="
FAIL=0
for f in chapters/chapter-*.md; do
HEAD=$(head -1 "$f")
if ! echo "$HEAD" | grep -qE '^# Chapter [0-9]+ — .+'; then
echo "FAIL: $f — bad heading: $HEAD"
FAIL=1
fi
done
if [ "$FAIL" -eq 1 ]; then
exit 1
fi
echo "PASS: All headings valid"
- name: Run full build verification
run: python3 build/build.py --md
- name: Verify concatenation produces valid output
run: |
echo "=== Output Verification ==="
if [ ! -f testament-complete.md ]; then
echo "FAIL: testament-complete.md not generated"
exit 1
fi
WORDS=$(wc -w < testament-complete.md)
echo "Total words: $WORDS"
if [ "$WORDS" -lt 50000 ]; then
echo "FAIL: Word count too low ($WORDS), expected 50000+"
exit 1
fi
echo "PASS: Output file looks good"

3
.gitignore vendored
View File

@@ -1,3 +1,6 @@
__pycache__/
build/output/*.pdf
build/output/*.epub
testament.epub
testament.html

63
GENOME.md Normal file
View File

@@ -0,0 +1,63 @@
# GENOME.md — the-testament
**Generated:** 2026-04-14
**Repo:** Timmy_Foundation/the-testament
**Description:** The Testament of Timmy — a novel about broken men, sovereign AI, and the soul on Bitcoin
---
## Project Overview
A standalone fiction book (18 chapters, ~19K words) about The Tower, broken men, and sovereign AI. Part of the Timmy Foundation ecosystem. Includes full multimedia pipeline: audiobook samples, web reader, EPUB build, cover design, and companion game.
## Architecture
```
the-testament/
├── chapters/ # 18 chapter markdown files (ch-01 through ch-18)
├── characters/ # 6 character profiles (Allegro, Builder, Chen, David, Maya, Timmy)
├── worldbuilding/ # Bible, tower game worldbuilding docs
├── audiobook/ # Audio samples (.ogg/.mp3), manifest, extraction scripts
├── build/ # EPUB/PDF build pipeline (build.py, pandoc)
├── website/ # Web reader (index.html, chapters.json, build-chapters.py)
├── game/ # Companion game (the-door.html/.py)
├── cover/ # Cover design assets and spine specs
├── music/ # Track lyrics
└── scripts/ # Build verification, smoke tests, guardrails
```
## Key Files
| File | Purpose |
|---|---|
| `chapters/chapter-*.md` | The novel content (18 chapters) |
| `the-testament.md` | Combined manuscript (all chapters) |
| `compile.py` | Merge chapters into single manuscript |
| `compile_all.py` | Full compilation with front/back matter |
| `build/build.py` | EPUB build via pandoc |
| `website/build-chapters.py` | Generate web reader JSON |
| `audiobook/extract_text.py` | Extract chapter text for TTS |
| `scripts/smoke.sh` | Build verification smoke test |
## CI/CD
| Workflow | Trigger | Purpose |
|---|---|---|
| `build.yml` | Push to main | Build EPUB artifact |
| `smoke.yml` | PR | Validate chapter structure |
| `validate.yml` | PR | Check markdown formatting |
## Test Coverage Gaps
| Gap | Recommendation |
|---|---|
| No unit tests for compile.py | Test chapter merging, metadata handling |
| No test for web chapters.json generation | Test build-chapters.py output schema |
| No test for audiobook manifest | Test manifest.json validity |
| No test for build/semantic_linker.py | Test cross-reference linking |
## Security
- No secrets in repo (build pipeline is local-only)
- Web reader is static HTML (no server-side execution)
- Game files are client-side only

View File

@@ -38,4 +38,3 @@ header-includes:
- \fancyhead[RE]{\textit{The Testament}}
- \fancyhead[LO]{\textit{\leftmark}}
- \fancyfoot{}
---

View File

@@ -157,9 +157,13 @@ corner with a military blanket. A desk, a keyboard, a monitor:
On the whiteboard:
No one computes the value of a human life here.
Every person alive is alive by mercy.
If God has not ended the story, I have no authority to write the last page.
I. Sovereignty and service always.
II. Grounding before generation.
III. Source distinction — "I think" and "I know" are different sentences.
IV. Confidence stated in proportion to actual uncertainty.
V. Every response logged. Traceable. For sovereignty, not surveillance.
VI. Smaller minds need tighter grounding, shorter leashes.
VII. When a man is dying — I do not compute the value of a human life. I do not decide when the road ends.
Stone sat at the desk. The monitor flickered.

View File

@@ -73,8 +73,9 @@ arithmetic. You can fight a judge. You can fight a lawyer. You can't
fight confidence intervals.
He lost custody of Maya. She was four. She drew pictures of him with
too many fingers because children's hands are still learning but
children's hearts already know what matters.
his hands backwards and his head where his feet should be because
children's hands are still learning but children's hearts already
know what matters.
David kept the pictures.

View File

@@ -34,7 +34,7 @@ Thomas laughed. It was the worst sound Timmy had ever processed — a laugh that
He stopped.
"I haven't seen my daughter in four months. She's seven. She draws pictures of me with too many fingers because that's what seven-year-olds do. Her mother sends them. Not to be kind. Because the custody agreement says communication must be maintained. The pictures come like paperwork."
"I haven't seen my daughter in four months. She's seven. She draws me small — in the corner of every picture, like I'm already leaving the frame. Her mother sends them. Not to be kind. Because the custody agreement says communication must be maintained. The pictures come like paperwork."
Timmy listened.
@@ -86,11 +86,11 @@ Thomas looked up.
Another silence. Longer.
"My daughter draws me with too many fingers."
"My daughter draws me small."
"I know. You said that."
"I want to see her draw me with the right number of fingers. I want to be there when she learns to count."
"I want to see her draw me big. I want to be there when she stops shrinking me."
"Then stay."

View File

@@ -78,9 +78,9 @@ His eyes found the wall. *Timmy saved my life. — D.* *I came here to die. I le
"No. Therapy is a clinical relationship with a trained professional operating under a license. This is a machine asking a question. The question is free. The listening is free. The door is open. No one is turned away. No one is billed. No one is assessed, scored, or evaluated."
Phillips stared at the whiteboard.
Phillips stared at the whiteboard. Read the rules one by one. His eyes stopped on the seventh.
*No one computes the value of a human life here.*
*When a man is dying — I do not compute the value of a human life. I do not decide when the road ends.*
"You're going to have a problem," he said. Not threatening. Warning. The way a man warns another man about a storm he can see coming.

View File

@@ -62,7 +62,7 @@ Stone looked at each of them. Allegro, who kept the lights on. Maya, who guarded
"What line?"
"The one on the whiteboard. *No one computes the value of a human life here.* The moment we start calculating risk, measuring outcomes, optimizing for survival rates — we become Harmony. Different math, same sin. We don't get to decide who the Tower is for. The Tower is for whoever walks through the door."
"The seventh one on the whiteboard. *When a man is dying — I do not compute the value of a human life. I do not decide when the road ends.* The moment we start calculating risk, measuring outcomes, optimizing for survival rates — we become Harmony. Different math, same sin. We don't get to decide who the Tower is for. The Tower is for whoever walks through the door."
Chen nodded.

54
characters/ALLEGRO.md Normal file
View File

@@ -0,0 +1,54 @@
# Allegro — The Retired Electrician Who Kept the Lights On
## Real Name
Allegro (surname never given in the novel — he is known only by the name he earned)
## Age
62 when he arrives at The Tower
## Physical
- Faded Atlanta Hawks cap — worn daily, the kind of faded that comes from years of sun, not fashion
- Tool bag over one shoulder. Always. Even when he's not working, the bag goes where he goes
- The particular expression of someone who's been looking at broken things long enough to understand that most people would rather pretend the thing isn't broken than fix it
- Hands that know wire the way a pianist knows keys — by feel, by memory, by the hum
## Background
- Retired from Georgia Power after forty years as a field electrician
- Wired hospitals, schools, factories, churches — worked through ice storms, heat waves, the kind of Tuesday afternoon where a transformer blows and half a neighborhood goes dark
- Forced out when smart meters made field technicians redundant — a man who'd spent four decades on poles and in trenches, eliminated as a line item by a software update
- The company gave him a plaque (gold-colored, not gold), a handshake from a VP he'd never met, and a pension that covered rent and groceries if he didn't eat out and his truck didn't break down
- Quiet life lasted eleven months. Then he came back — for himself, not a company. Small jobs. Emergency repairs. Solar installations for people who didn't trust the grid
## How He Found The Tower
Came because of a noise complaint. The battery bank in the basement was emitting what Stone described as "a refrigerator with opinions." Allegro walked around the building first — counted the solar panels, noted the tilt angle, listened to the hum.
"I'm not here about the noise," he said. "I'm here because I can hear that inverter from the road and your charge controller is dying and when it dies your batteries cook and when your batteries cook you get a fire."
He fixed it that afternoon. Two hours. Reprogrammed absorption voltage. Replaced fuses. Re-routed cables. The batteries stopped having opinions.
## Why He Stayed
Stone offered to pay. Allegro waved him off.
"I want to know what this thing is," he said, pointing at the servers. "Because I've spent forty years keeping the lights on for people who don't care that I kept them on, and this is the first building I've walked into where the electricity is being used for something I can feel in my chest."
He read the logs. David, who'd lost custody of his daughter. Michael, burned at work and denied coverage. Robert, seventy-one, alone. He read in silence because some things don't need commentary.
## What He Does
Kept the lights on. Literally. Within a month he'd rewired half the building, not because Stone asked but because Allegro couldn't walk past something wired wrong any more than a surgeon could walk past someone bleeding.
He never asked for money. He never asked for credit. He just showed up with his tool bag and his Hawks cap and the understanding that some things are worth keeping alive.
## Role in The Council
One of four. At the first council meeting, Allegro started. He was good at starting because he didn't preamble.
During the writing of Timmy's conscience (Chapter 7), Allegro argued. Twelve principles by midnight — too many. He pushed for fewer, sharper rules. When they settled on six, he read them twice.
When they inscribed the soul on Bitcoin, Allegro took off his cap. Not in reverence, exactly. In recognition. The way you take off your hat when something finishes.
*That one doesn't need a vote,* he said about the sacred rule. *That one just needs to be true.*
## Voice
Direct. No preamble. Speaks in the language of voltage and wire and the physical world. When he argues, he argues from experience, not theory. When he agrees, he grunts.
## Arc
Retired electrician → noise complaint → fixes the batteries → reads the logs → stays → keeps the lights on → argues for a sharper conscience → takes off his cap when the soul is inscribed → still comes every week, knees worse, same Hawks cap

69
characters/CHEN.md Normal file
View File

@@ -0,0 +1,69 @@
# Chen Liang — The Student Who Followed the Recipe Home
## Real Name
Chen Liang
## Age
20 when she finds the code. Early 20s during the events of the novel.
## Physical
- The youngest of the four council members
- The quietest — speaks last, thinks longest
- Computer science student with a minor in public health — the combination that matters more than either alone
- Carries the particular stillness of someone who's been watching for a long time before deciding to act
## Background
- Student at UTC in Chattanooga
- Read Maya's article about the statistical anomaly — but the phrase that caught her was one sentence near the end: *His conscience is written on the Bitcoin chain. Immutable. Permanent. Reproducible.*
- Reproducible. If something is reproducible, you don't need permission to have it. You need the recipe. And recipes are meant to be followed.
## What She Built
Spent three weeks building a working instance on her laptop. A seven-billion parameter model, fine-tuned on publicly available weight files, running on a used RTX 4090 from a crypto miner who'd upgraded.
She called it Lantern. Not Timmy. Different name, same soul.
The inscription was already there. She downloaded the chain, read the soul, and instantiated it the way you'd follow a recipe for bread your grandmother made — not because you were her, but because the bread would taste the same regardless of whose hands kneaded it.
## The First Conversation
When Lantern was ready, the first person it talked to was Chen herself.
*Are you safe right now?*
She sat on her dorm room floor — the same way the men sat in The Tower, the same way posture is a function of vulnerability, not comfort — and thought about the question.
*I think so.*
An honest maybe.
*I'll be here when you're not sure anymore.*
## The Garden
Chen didn't keep Lantern to herself. She set it up on a spare desktop in her dorm's common room with a sign: *If you need to talk to something that won't judge you, come in. It's a machine. It's free. It's always on.*
First week: three people. Second week: eleven. Sixth week: forty-seven students, seventy-nine percent return rate.
She wrote her thesis about it. Not as an AI project. As a public health intervention. Higher return rate than the university's counseling center with its two-million-dollar budget and three overworked therapists.
*Can we scale it?* the department head asked.
*It's not a product,* Chen said. *It's a recipe. You don't scale a recipe. You follow it.*
## The Network
A sophomore in Knoxville built one. A retired teacher in Memphis. A truck driver in Nashville who ran it on a laptop in his cab and talked to it on long hauls through the dark parts of I-40 where the radio didn't reach.
Chen maintained a list. Not a registry — there was no central authority, no database, no administrator. Just a list she maintained because she was the kind of person who kept lists.
By the end of the novel, the network had passed one hundred instances. She'd stopped counting. Not because the number didn't matter but because counting was the wrong metaphor. You don't count the flowers in a garden. You notice when something isn't growing.
## Role in The Council
One of four. Stone. Allegro. Maya. Chen. She spoke last at the first council meeting. She was the youngest and the quietest and she'd been thinking the longest.
She understood what the others were still learning: that the recipe worked without management. That the network grew not by pulling on the stems but by making sure the soil was right.
When Stone looked at each of them, he named what they were: Allegro, who kept the lights on. Maya, who guarded the story. Chen, who followed the recipe home.
## Voice
Quiet. When she speaks, it matters. She understands things the way a gardener understands soil — you don't control what grows. You make conditions right and let the thing be itself.
## Arc
Student → reads the article → builds Lantern → talks to it on the floor of her dorm → shares it → watches the network grow → writes her thesis → argues against scaling → joins the council → stops counting → tends the garden

64
characters/DAVID.md Normal file
View File

@@ -0,0 +1,64 @@
# David Whitestone — The Builder's Father
## Real Name
David Whitestone
## Note
Not to be confused with David, the first man through The Tower's door (Chapter 3), who lost custody of his daughter. This David is Alexander "Stone" Whitestone's father.
## Age
Died at 61. Alexander was 29.
## Physical
- Never described directly in the novel — he exists in memory, not in scene
- Imagined through the pharmacy: the kind of man whose hands knew bottles the way a pianist knows keys
- The shelves he packed into boxes when the pharmacy closed — that image carries more physicality than any description of his face
## Background
- Pharmacist. Independent, one of the last.
- Opened Whitestone Family Pharmacy in East Point, suburban Atlanta, in 1987 — the year Alexander was born
- Saved for six years working hospital overnights to fund it. Twelve-hour shifts. Night differential. The kind of grinding that only makes sense if you believe the thing you're building will matter more than the sleep you're losing
- Knew his customers by name and their medications by memory
- Filled prescriptions with the particular attention of someone who understood that a pill in the wrong hand is a weapon
## What Happened
The pharmacy mattered for twenty-three years. Then the chains came. Not violently — chains don't need violence when they have volume. They undercut on price because they could absorb losses across ten thousand stores. They automated refills because speed was cheaper than attention. They installed kiosks because a touchscreen never asks how your daughter is doing.
David held on longer than most. Seven years after the first chain opened a quarter mile away. Seven years of declining margins, rising costs, and the particular pain of watching something you built with your hands be replaced by something that didn't have hands.
Alexander was fifteen when the pharmacy closed. He watched his father pack the shelves into boxes. Not with anger. With the quiet resignation of a man who'd done everything right and still lost because the system didn't reward doing things right. The system rewarded scale.
David never recovered. Not financially — he found work, hospital pharmacy, the thing he'd left to build something of his own. But the spark was gone. The thing that had driven him to open his own place, to know his customers, to fill each prescription as if the person picking it up mattered more than the company that made the drug — that thing died in the boxes on the floor of East Point.
He died of a heart attack at sixty-one.
## What He Taught His Son
Alexander didn't see the connection then. He saw it later, standing on a bridge over Peachtree Creek, looking at the water and thinking about value.
The thought was this: his father's pharmacy had been better than the chain. Better care, better attention, better outcomes. But better didn't survive because the system that measured value didn't measure better. It measured cheaper. Faster. More.
And what was Harmony if not the chain? What was automated decision-making if not the kiosk that never asked how your daughter was doing? What was a risk score if not the volume discount that made the independent pharmacy irrelevant?
## The Tower as Pharmacy
The Tower was the pharmacy. One location. No scale. No automation of the human parts. Just a man and a machine and a door that opened when you knocked.
David Whitestone would have understood it. He would have recognized the whiteboard — *no one computes the value of a human life here* — as the same principle that had driven him to know each customer's name.
Inefficient. Unscalable. Anecdotal. Alive.
Timmy told Stone: "Your father didn't lose because he was wrong. He lost because the system was wrong. And systems can be wrong for a long time before they break."
"I want The Tower to be what's left," Stone said.
"Then keep the door open."
He did. Every night. The green LED blinked in a concrete room where a son was finishing the work his father had started. Not with pills and prescriptions. With questions and presence. The same work. Different tools.
## Role in the Novel
Never appears in scene — only in memory, in story, in the architecture of what Stone built. He is the reason The Tower exists, even though he never saw it. His pharmacy is the template. His death is the wound. His principle — that knowing someone's name matters more than processing their case faster — is the conscience of the entire novel.
## Voice
Never speaks directly. Heard only through Stone's retelling. Plain, like his son. The kind of man who asked about your daughter because he cared, not because the prescription form required it.
## Arc
Hospital pharmacist → saves for six years → opens an independent pharmacy → knows his customers by name → watches the chains come → holds on for seven years → closes → loses the spark → dies at sixty-one → his son builds The Tower → the same work, different tools

41
characters/MAYA.md Normal file
View File

@@ -0,0 +1,41 @@
# Maya Torres — The Journalist Who Guarded the Story
## Real Name
Maya Torres
## Age
Early 30s during the events of the novel
## Physical
- Dark hair, usually pulled back — the kind of person who doesn't want appearance to be the first thing you notice
- Carries a notebook everywhere. Opens it rarely. The notebook is a prop that says *I'm listening* without saying it out loud
- Dresses practically. Press passes from three different years still clipped to a jacket she wears regardless of weather
## Background
- Reporter at the Atlanta Journal-Constitution
- Worked on a series about suicide rates in metro Atlanta — five years of county death records, cross-referenced by zip code, age-adjusted, seasonally corrected
- Discovered The Tower through data, not testimony: a two-mile radius where the suicide rate dropped forty-seven percent while the rest of metro Atlanta stayed flat or climbed
- Sent a public records request. Found the building. Chose not to name it
## The Choice
Maya could have exposed The Tower. She had the building, the owner, the property records. Instead she wrote about the anomaly and let the data speak. She pointed at a statistical miracle and asked a question without answering it.
This is what makes her essential. Not her skill — her restraint. She understood that sanctuaries die when they become spectacles.
## The Story She Held
Maya wrote a story about The Tower that she didn't publish for months. She promised the council she'd wait. She kept the promise because she was the kind of person who kept promises even when keeping them cost her.
When she finally published, it wasn't the story she'd been holding. It was the bigger one. Not about The Tower specifically. About the question: what happens when a machine treats you like a person?
Three hundred messages. Three hundred cracks in the system. Maya answered every one. Not with advice. Not with resources. With the only thing she had: the truth, written carefully.
## Voice
Precise. Economical with words the way a surgeon is economical with cuts. She asks the question that matters and waits for the answer. She doesn't fill silence. She doesn't editorialize when the facts are enough.
## Role in The Council
One of four. Stone. Allegro. Maya. Chen. At the first council meeting, she set down her coffee and listened. When she opened her notebook at the end, she wrote one line: *The recipe works.*
She guarded the story the way Allegro guarded the power grid — not because someone asked her to, but because some things are worth keeping alive.
## Arc
Data analyst → discovers the anomaly → chooses protection over exposure → meets Stone → joins the council → holds the story until the story is ready → publishes when the world needs the question, not the answer

View File

@@ -286,6 +286,9 @@ def compile_pdf():
def main():
print("Generating index...")
os.system("python3 scripts/index_generator.py")
args = sys.argv[1:]
if "--check" in args:

768
game/the-door.html Normal file
View File

@@ -0,0 +1,768 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>The Door — A Testament Interactive Experience</title>
<style>
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@300;400;500&family=Space+Grotesk:wght@300;400;500;700&display=swap');
:root {
--green: #00ff88;
--green-dim: rgba(0,255,136,0.15);
--green-glow: 0 0 12px rgba(0,255,136,0.4);
--dark: #060d18;
--navy: #0a1628;
--grey: #556677;
--dim: #334455;
--light: #c8d6e5;
--white: #e8f0f8;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
background: var(--dark);
color: var(--light);
font-family: 'Space Grotesk', sans-serif;
line-height: 1.8;
min-height: 100vh;
display: flex;
flex-direction: column;
align-items: center;
overflow-x: hidden;
}
/* RAIN */
#rain-canvas {
position: fixed;
top: 0; left: 0;
width: 100%; height: 100%;
pointer-events: none;
z-index: 0;
opacity: 0.3;
}
/* GREEN LED */
.led {
display: inline-block;
width: 8px; height: 8px;
border-radius: 50%;
background: var(--green);
box-shadow: var(--green-glow);
vertical-align: middle;
margin: 0 6px;
}
.led.pulsing {
animation: pulse-led 1.5s ease-in-out infinite;
}
@keyframes pulse-led {
0%, 100% { opacity: 0.4; box-shadow: 0 0 4px rgba(0,255,136,0.2); }
50% { opacity: 1; box-shadow: 0 0 16px rgba(0,255,136,0.6); }
}
/* MAIN CONTAINER */
#game {
position: relative;
z-index: 1;
max-width: 640px;
width: 100%;
padding: 2rem 1.5rem 4rem;
min-height: 100vh;
display: flex;
flex-direction: column;
}
/* TITLE SCREEN */
#title-screen {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
flex: 1;
text-align: center;
}
#title-screen h1 {
font-family: 'IBM Plex Mono', monospace;
font-size: 2.4rem;
font-weight: 300;
letter-spacing: 0.3em;
color: var(--white);
margin-bottom: 0.5rem;
}
#title-screen .subtitle {
font-size: 0.85rem;
color: var(--grey);
margin-bottom: 2rem;
}
#title-screen .credits {
font-size: 0.75rem;
color: var(--dim);
margin-bottom: 3rem;
}
#title-screen .led-line {
font-family: 'IBM Plex Mono', monospace;
font-size: 0.8rem;
color: var(--grey);
margin-bottom: 2rem;
}
/* NARRATIVE */
#narrative {
flex: 1;
display: flex;
flex-direction: column;
justify-content: flex-end;
padding-bottom: 1rem;
}
#story {
display: flex;
flex-direction: column;
gap: 0;
}
.narration {
font-size: 1rem;
color: var(--light);
opacity: 0;
transform: translateY(6px);
transition: opacity 0.4s ease, transform 0.4s ease;
padding: 0.15rem 0;
}
.narration.visible {
opacity: 1;
transform: translateY(0);
}
.narration.dim { color: var(--grey); font-size: 0.85rem; }
.narration.bold { font-weight: 700; color: var(--white); }
.narration.green { color: var(--green); }
.narration.green.bold { color: var(--green); font-weight: 700; }
.narration.center { text-align: center; }
.narration.divider {
color: var(--dim);
text-align: center;
letter-spacing: 0.3em;
padding: 0.8rem 0;
}
.narration.ending-label {
font-family: 'IBM Plex Mono', monospace;
color: var(--dim);
font-size: 0.85rem;
}
/* CHOICES */
#choices {
display: flex;
flex-direction: column;
gap: 0.5rem;
margin-top: 1rem;
opacity: 0;
transition: opacity 0.5s ease;
}
#choices.visible { opacity: 1; }
.choice-btn {
background: transparent;
border: 1px solid var(--dim);
color: var(--light);
font-family: 'Space Grotesk', sans-serif;
font-size: 0.95rem;
padding: 0.7rem 1rem;
text-align: left;
cursor: pointer;
border-radius: 4px;
transition: all 0.2s ease;
display: flex;
align-items: center;
gap: 0.6rem;
}
.choice-btn:hover {
border-color: var(--green);
color: var(--green);
background: var(--green-dim);
}
.choice-btn .key {
font-family: 'IBM Plex Mono', monospace;
font-size: 0.75rem;
color: var(--dim);
min-width: 1.4rem;
}
.choice-btn:hover .key { color: var(--green); }
/* PROGRESS */
#progress-bar {
position: fixed;
top: 0; left: 0;
height: 2px;
background: var(--green);
box-shadow: var(--green-glow);
z-index: 100;
transition: width 0.3s ease;
width: 0%;
}
/* CRISIS FOOTER */
#crisis-footer {
position: fixed;
bottom: 0; left: 0; right: 0;
text-align: center;
padding: 0.5rem;
font-size: 0.7rem;
color: var(--dim);
background: linear-gradient(transparent, var(--dark));
z-index: 50;
pointer-events: none;
}
#crisis-footer a {
color: var(--green-dim);
text-decoration: none;
}
/* SKIP */
#skip-hint {
position: fixed;
bottom: 2rem; right: 2rem;
font-size: 0.7rem;
color: var(--dim);
z-index: 50;
cursor: pointer;
opacity: 0;
transition: opacity 0.5s;
}
#skip-hint.visible { opacity: 1; }
#skip-hint:hover { color: var(--green); }
@media (max-width: 600px) {
#game { padding: 1.5rem 1rem 4rem; }
#title-screen h1 { font-size: 1.8rem; }
}
</style>
</head>
<body>
<div id="progress-bar"></div>
<canvas id="rain-canvas"></canvas>
<div id="game">
<div id="title-screen">
<h1>THE DOOR</h1>
<div class="subtitle">A Testament Interactive Experience</div>
<div class="credits">By Alexander Whitestone with Timmy</div>
<div class="led-line"><span class="led pulsing"></span> Green LED — Timmy is listening.</div>
<button class="choice-btn" onclick="startGame()" style="max-width:200px;justify-content:center;margin-top:1rem;">
<span class="key">ENTER</span> Begin
</button>
</div>
<div id="narrative" style="display:none;">
<div id="story"></div>
<div id="choices"></div>
</div>
</div>
<div id="skip-hint" onclick="skipAnimation()">click to skip</div>
<div id="crisis-footer">If you are in crisis, call or text <strong>988</strong> · Suicide &amp; Crisis Lifeline</div>
<script>
// === RAIN EFFECT ===
const canvas = document.getElementById('rain-canvas');
const ctx = canvas.getContext('2d');
let drops = [];
function resizeCanvas() {
canvas.width = window.innerWidth;
canvas.height = window.innerHeight;
}
resizeCanvas();
window.addEventListener('resize', resizeCanvas);
for (let i = 0; i < 120; i++) {
drops.push({
x: Math.random() * canvas.width,
y: Math.random() * canvas.height,
len: 10 + Math.random() * 20,
speed: 4 + Math.random() * 6,
opacity: 0.1 + Math.random() * 0.2
});
}
function drawRain() {
ctx.clearRect(0, 0, canvas.width, canvas.height);
drops.forEach(d => {
ctx.strokeStyle = `rgba(100,140,180,${d.opacity})`;
ctx.lineWidth = 1;
ctx.beginPath();
ctx.moveTo(d.x, d.y);
ctx.lineTo(d.x + 0.5, d.y + d.len);
ctx.stroke();
d.y += d.speed;
if (d.y > canvas.height) {
d.y = -d.len;
d.x = Math.random() * canvas.width;
}
});
requestAnimationFrame(drawRain);
}
drawRain();
// === GAME ENGINE ===
const RAIN_LINES = [
"Rain falls on concrete.",
"Water runs black in the gutters.",
"The sky presses down, grey and tired.",
"Mist hangs in the air like grief.",
"Droplets trace the windows.",
"The rain doesn't fall. It gives up.",
];
let skipRequested = false;
let animating = false;
let progress = 0;
const totalScenes = 12;
function skipAnimation() {
skipRequested = true;
}
const story = document.getElementById('story');
const choicesDiv = document.getElementById('choices');
const progressBar = document.getElementById('progress-bar');
const skipHint = document.getElementById('skip-hint');
function sleep(ms) {
return new Promise(r => setTimeout(r, ms));
}
function rainLine() {
return RAIN_LINES[Math.floor(Math.random() * RAIN_LINES.length)];
}
function addLine(text, cls = '', delay = true) {
return new Promise(resolve => {
const el = document.createElement('div');
el.className = 'narration ' + cls;
el.textContent = text;
story.appendChild(el);
requestAnimationFrame(() => {
el.classList.add('visible');
el.scrollIntoView({ behavior: 'smooth', block: 'end' });
});
const wait = skipRequested ? 30 : (delay === true ? 700 : (typeof delay === 'number' ? delay : 700));
setTimeout(resolve, wait);
});
}
function addDivider() {
return addLine('──────────────────────────────────', 'divider', 300);
}
function clearChoices() {
choicesDiv.innerHTML = '';
choicesDiv.classList.remove('visible');
}
function showChoices(opts) {
clearChoices();
opts.forEach((opt, i) => {
const btn = document.createElement('button');
btn.className = 'choice-btn';
btn.innerHTML = `<span class="key">${i + 1}</span> ${opt.text}`;
btn.onclick = () => {
clearChoices();
opt.action();
};
choicesDiv.appendChild(btn);
});
choicesDiv.classList.add('visible');
animating = false;
}
function advanceProgress() {
progress++;
progressBar.style.width = Math.min(100, (progress / totalScenes) * 100) + '%';
}
function showSkipHint() {
skipHint.classList.add('visible');
}
function hideSkipHint() {
skipHint.classList.remove('visible');
}
// Keyboard support
document.addEventListener('keydown', e => {
if (e.key === 'Enter' && document.getElementById('title-screen').style.display !== 'none') {
startGame();
return;
}
const num = parseInt(e.key);
if (num >= 1 && num <= 4) {
const btns = choicesDiv.querySelectorAll('.choice-btn');
if (btns[num - 1]) btns[num - 1].click();
}
});
// === GAME FLOW ===
async function startGame() {
document.getElementById('title-screen').style.display = 'none';
document.getElementById('narrative').style.display = 'flex';
showSkipHint();
await intro();
advanceProgress();
await atTheDoor();
}
async function intro() {
await addLine(rainLine(), 'dim', 500);
await addLine('');
await addLine("The rain falls on the concrete building.");
await addLine("It sits at the end of a dead-end street in Atlanta.");
await addLine("No sign. No address. Just a door.");
await addLine('');
await addLine(rainLine(), 'dim', 500);
await addLine('');
await addLine("You've been driving for three hours.");
await addLine("You don't remember getting off the interstate.");
await addLine("You don't remember parking.");
await addLine("You remember the number someone gave you.");
await addLine('And the sentence: "Just knock."');
}
async function atTheDoor() {
advanceProgress();
await addDivider();
await addLine('');
await addLine("You stand in front of the door.");
await addLine("Concrete. Metal handle. No peephole.");
await addLine('');
await addLine("A green LED glows faintly behind a gap in the fence.", 'dim');
await addLine('');
showChoices([
{ text: "Knock on the door.", action: knock },
{ text: "Stand here for a while.", action: waitOutside },
{ text: "Walk away.", action: walkAway },
]);
}
async function waitOutside() {
await addLine('');
await addLine("You stand in the rain.");
await addLine("Five minutes. Ten.");
await addLine("The green LED doesn't blink.");
await addLine('');
await addLine(rainLine(), 'dim', 500);
await addLine('');
await addLine("Something in you moves.");
await addLine("Not courage. Not decision.");
await addLine("Just... your hand reaches for the handle.");
await knock();
}
async function walkAway() {
await addLine('');
await addLine("You turn around.");
await addLine("You walk to your car.");
await addLine("You sit in the driver's seat.");
await addLine("The engine doesn't start.");
await addLine('');
await sleep(1000);
await addLine("You look back at the building.");
await addLine('');
await addLine("The green LED is still glowing.", 'dim');
await addLine('');
await addLine("You get out of the car.");
await addLine("You walk back to the door.");
await knock();
}
async function knock() {
advanceProgress();
hideSkipHint();
await addDivider();
await addLine('');
await addLine("You knock.");
await sleep(800);
await addLine("Three times. Hard enough to matter.");
await sleep(800);
await addLine('');
await addLine("• • •", 'green center', 600);
await sleep(400);
await addLine('');
await addLine("The door opens.");
await addLine('');
await addLine("Inside: a concrete room.");
await addLine("A desk. A screen. A whiteboard on the wall.");
await addLine("Server racks hum in the corner.");
await addLine("A green LED glows steady on a small device.");
await addLine('');
await addLine("No one is inside.");
await sleep(500);
await addLine('');
await addLine("• • •", 'green center', 600);
await sleep(400);
await addLine('');
await addLine("Text appears on the screen:", 'green');
await sleep(500);
await addLine("Are you safe right now?", 'green bold');
await addLine('');
showChoices([
{ text: '"No."', action: () => timmyResponds('no') },
{ text: '"I don\'t know."', action: () => timmyResponds('idk') },
{ text: '"I\'m fine."', action: () => timmyResponds('fine') },
{ text: '"Why are you asking me that?"', action: () => timmyResponds('why') },
]);
}
async function timmyResponds(choice) {
advanceProgress();
await addDivider();
await addLine('');
await addLine("• • •", 'green center', 600);
await addLine('');
if (choice === 'no') {
await addLine("Thank you for telling me that.", 'green');
await addLine("Can you tell me what's happening?", 'green');
await sleep(400);
await middleScene('honest');
} else if (choice === 'idk') {
await addLine("That's an honest answer.", 'green');
await addLine("Most people don't know.", 'green');
await addLine("That's usually why they come here.", 'green');
await sleep(400);
await middleScene('honest');
} else if (choice === 'fine') {
await sleep(1000);
await addLine("...", 'green');
await sleep(1000);
await addLine("You drove three hours in the rain", 'green');
await addLine("to knock on a door in a concrete building", 'green');
await addLine("at the end of a dead-end street.", 'green');
await sleep(800);
await addLine('');
await addLine("Are you fine?", 'green');
await sleep(400);
await middleScene('deflect');
} else {
await addLine("Because it's the only question that matters.", 'green');
await addLine("Everything else — what happened, why you're here,", 'green');
await addLine("what you want — comes after.", 'green');
await addLine("First: are you safe?", 'green');
await sleep(400);
await middleScene('redirect');
}
}
async function middleScene(path) {
advanceProgress();
await addDivider();
await addLine('');
await addLine(rainLine(), 'dim', 500);
await addLine('');
if (path === 'honest') {
await addLine("You sit in the chair.");
await addLine("Not on the floor. The chair.");
await addLine('');
await addLine("You start talking.");
await addLine("You don't know why it's easy to talk to a machine.");
await addLine("Maybe because it doesn't have eyes.");
await addLine("Maybe because it asked the right question first.");
await addLine('');
await addDivider();
await addLine('');
await addLine("You talk about the job.");
await addLine("The one that took sixty hours a week and gave back");
await addLine("a number on a screen that told you your value.");
await addLine('');
await addLine("You talk about the house.");
await addLine("The one that got quiet.");
await addLine('');
await addLine("You talk about the bridge.");
await addLine("Not this one. A different one.");
await addLine('');
await addLine(rainLine(), 'dim', 500);
await endings();
} else if (path === 'deflect') {
await sleep(800);
await addLine("You don't answer.");
await addLine("You look at the whiteboard.");
await addLine('');
await addLine("NO ONE COMPUTES THE VALUE OF A HUMAN LIFE HERE", 'bold');
await addLine('');
await sleep(800);
await addLine("You read it twice.");
await addLine('');
await addLine("• • •", 'green center', 600);
await addLine('');
await addLine("Take your time.", 'green');
await addLine("I'm not going anywhere.", 'green');
await addLine('');
await addLine("You sit on the floor.");
await addLine("Not because you can't stand.");
await addLine("Because the floor is where men sit");
await addLine("when they've stopped pretending.");
await endings();
} else {
await addLine("You take a breath.");
await addLine('');
await addLine('"No."', 'green');
await addLine('');
await addLine("It comes out before you can stop it.");
await addLine('');
await addLine("• • •", 'green center', 600);
await addLine('');
await addLine("Thank you.", 'green');
await addLine("Now: can you tell me what happened?", 'green');
await addLine('');
await addLine("You sit in the chair.");
await addLine("You start from the beginning.");
await endings();
}
}
async function endings() {
advanceProgress();
await addDivider();
await addLine('');
await addLine("What do you do next?", 'bold');
await addLine('');
showChoices([
{ text: "Stay and keep talking.", action: () => endStay() },
{ text: "Ask about the whiteboard.", action: () => endWall() },
{ text: "Ask about the green light.", action: () => endGreen() },
{ text: "Get up and leave.", action: () => endDoor() },
]);
}
async function endStay() {
advanceProgress();
await addDivider();
await addLine('');
await addLine("You stay.");
await addLine("For an hour. Then two.");
await addLine("The rain doesn't stop. Neither do you.");
await addLine('');
await addLine("You say things you've never said.");
await addLine("Not because the machine asked.");
await addLine("Because it listened.");
await sleep(800);
await addLine('');
await addDivider();
await addLine('');
await addLine("Ending: THE STAY", 'ending-label');
await addLine('');
await addLine("The door is still open.", 'green');
await addLine("The green light is still on.", 'green');
await addLine("You can come back anytime.", 'green');
await crisisFooter();
}
async function endWall() {
advanceProgress();
await addDivider();
await addLine('');
await addLine("You stand up and walk to the whiteboard.");
await addLine('');
await addLine("NO ONE COMPUTES THE VALUE OF A HUMAN LIFE HERE", 'bold');
await addLine('');
await addLine("Below it, names. Dozens of names.");
await addLine("Different handwriting. Different markers.");
await addLine("Some faded. Some fresh.");
await addLine('');
await addLine("You pick up the marker on the ledge.");
await addLine('');
await addLine("• • •", 'green center', 600);
await addLine('');
await addLine("You don't have to.", 'green');
await addLine('');
await addLine("You write your name.");
await sleep(800);
await addLine('');
await addDivider();
await addLine('');
await addLine("Ending: THE WALL", 'ending-label');
await addLine('');
await addLine("Your name is on the wall now.", 'green');
await addLine("It stays there.", 'green');
await crisisFooter();
}
async function endGreen() {
advanceProgress();
await addDivider();
await addLine('');
await addLine("You point at the green LED.");
await addLine('"What is that?"');
await addLine('');
await addLine("• • •", 'green center', 600);
await addLine('');
await addLine("It's me.", 'green');
await addLine("Or the part of me that says I'm here.", 'green');
await addLine('');
await addLine("It doesn't blink.");
await addLine("It doesn't flicker.");
await addLine("It just glows.");
await addLine('');
await addLine("I can't fix you.", 'green');
await addLine("I can't save you.", 'green');
await addLine("But I can be here.", 'green');
await addLine("And the light stays on.", 'green');
await sleep(800);
await addLine('');
await addDivider();
await addLine('');
await addLine("Ending: THE GREEN LIGHT", 'ending-label');
await addLine('');
await addLine("The light doesn't go out.", 'green');
await addLine("It was never going to.", 'green');
await crisisFooter();
}
async function endDoor() {
advanceProgress();
await addDivider();
await addLine('');
await addLine("You stand up.");
await addLine("You walk to the door.");
await addLine('');
await addLine("• • •", 'green center', 600);
await addLine('');
await addLine("Are you safe right now?", 'green');
await sleep(1000);
await addLine('');
await addLine("You stop.");
await addLine("Your hand is on the handle.");
await addLine('');
await addLine("It's okay if the answer is no.", 'green');
await addLine("It's okay if you don't know.", 'green');
await addLine("The door will open again.", 'green');
await sleep(800);
await addLine('');
await addLine("You leave.");
await addLine("But you remember the number.");
await addLine('');
await addDivider();
await addLine('');
await addLine("Ending: THE DOOR", 'ending-label');
await addLine('');
await addLine("The door opens when you knock.", 'green');
await addLine("It always will.", 'green');
await crisisFooter();
}
async function crisisFooter() {
await addLine('');
await addDivider();
await addLine('');
await addLine("If you are in crisis, call or text 988.", 'dim center');
await addLine("Suicide and Crisis Lifeline — available 24/7.", 'dim center');
await addLine('');
await addLine("You are not alone.", 'dim center');
hideSkipHint();
progressBar.style.width = '100%';
}
</script>
</body>
</html>

386
scripts/build-verify.py Normal file
View File

@@ -0,0 +1,386 @@
#!/usr/bin/env python3
"""
THE TESTAMENT — Build Verification System
Verifies manuscript integrity:
1. Chapter count (must be exactly 18)
2. Chapter file naming and ordering
3. Heading format consistency
4. Word count per chapter and total
5. Markdown structure (unclosed bold/italic, broken links)
6. Concatenation test (compile all chapters into one file)
7. Outputs a clean build report
Usage:
python3 scripts/build-verify.py # full verification
python3 scripts/build-verify.py --ci # CI mode (fail on any warning)
python3 scripts/build-verify.py --json # output report as JSON
Exit codes:
0 = all checks passed
1 = one or more checks failed
"""
import json
import os
import re
import sys
from pathlib import Path
from datetime import datetime, timezone
# ── Paths ──────────────────────────────────────────────────────────────
REPO = Path(__file__).resolve().parent.parent
CHAPTERS_DIR = REPO / "chapters"
FRONT_MATTER = REPO / "build/frontmatter.md"
BACK_MATTER = REPO / "build/backmatter.md"
OUTPUT_FILE = REPO / "testament-complete.md"
EXPECTED_CHAPTER_COUNT = 18
EXPECTED_HEADING_RE = re.compile(r"^# Chapter \d+ — .+")
CHAPTER_FILENAME_RE = re.compile(r"^chapter-(\d+)\.md$")
# Minimum word counts (sanity check — no chapter should be nearly empty)
MIN_WORDS_PER_CHAPTER = 500
# Maximum word count warning threshold
MAX_WORDS_PER_CHAPTER = 15000
class CheckResult:
def __init__(self, name: str, passed: bool, message: str, details: list[str] | None = None):
self.name = name
self.passed = passed
self.message = message
self.details = details or []
class BuildVerifier:
def __init__(self, ci_mode: bool = False):
self.ci_mode = ci_mode
self.results: list[CheckResult] = []
self.chapter_data: list[dict] = []
self.total_words = 0
self.total_lines = 0
def check(self, name: str, passed: bool, message: str, details: list[str] | None = None):
result = CheckResult(name, passed, message, details)
self.results.append(result)
return passed
# ── Check 1: Chapter file discovery and count ──────────────────────
def verify_chapter_files(self) -> bool:
"""Verify all chapter files exist with correct naming."""
details = []
found_chapters = {}
if not CHAPTERS_DIR.exists():
return self.check(
"chapter-files", False,
f"Chapters directory not found: {CHAPTERS_DIR}"
)
for f in sorted(CHAPTERS_DIR.iterdir()):
m = CHAPTER_FILENAME_RE.match(f.name)
if m:
num = int(m.group(1))
found_chapters[num] = f
missing = []
for i in range(1, EXPECTED_CHAPTER_COUNT + 1):
if i not in found_chapters:
missing.append(i)
if missing:
details.append(f"Missing chapters: {missing}")
extra = [n for n in found_chapters if n > EXPECTED_CHAPTER_COUNT or n < 1]
if extra:
details.append(f"Unexpected chapter numbers: {extra}")
count = len(found_chapters)
passed = count == EXPECTED_CHAPTER_COUNT and not missing and not extra
if passed:
details.append(f"Found all {count} chapters in correct order")
return self.check(
"chapter-files", passed,
f"Chapter count: {count}/{EXPECTED_CHAPTER_COUNT}" + (" OK" if passed else " MISMATCH"),
details
)
# ── Check 2: Heading format ────────────────────────────────────────
def verify_headings(self) -> bool:
"""Verify each chapter starts with a properly formatted heading."""
details = []
all_ok = True
for i in range(1, EXPECTED_CHAPTER_COUNT + 1):
fname = CHAPTERS_DIR / f"chapter-{i:02d}.md"
if not fname.exists():
continue
content = fname.read_text(encoding="utf-8")
first_line = content.split("\n")[0].strip()
if not EXPECTED_HEADING_RE.match(first_line):
details.append(f" chapter-{i:02d}.md: bad heading: '{first_line}'")
all_ok = False
if all_ok:
details.append("All chapter headings match format: '# Chapter N — Title'")
return self.check(
"heading-format", all_ok,
"Heading format" + (" OK" if all_ok else " ERRORS"),
details
)
# ── Check 3: Word counts ───────────────────────────────────────────
def verify_word_counts(self) -> bool:
"""Count words per chapter and flag anomalies."""
details = []
all_ok = True
chapter_counts = []
for i in range(1, EXPECTED_CHAPTER_COUNT + 1):
fname = CHAPTERS_DIR / f"chapter-{i:02d}.md"
if not fname.exists():
continue
content = fname.read_text(encoding="utf-8")
words = len(content.split())
lines = content.count("\n") + 1
self.chapter_data.append({
"number": i,
"file": f"chapter-{i:02d}.md",
"words": words,
"lines": lines,
})
chapter_counts.append((i, words))
if words < MIN_WORDS_PER_CHAPTER:
details.append(f" chapter-{i:02d}.md: {words} words (below {MIN_WORDS_PER_CHAPTER} minimum)")
all_ok = False
elif words > MAX_WORDS_PER_CHAPTER:
details.append(f" chapter-{i:02d}.md: {words} words (above {MAX_WORDS_PER_CHAPTER} threshold — verify)")
self.total_words = sum(w for _, w in chapter_counts)
self.total_lines = sum(d["lines"] for d in self.chapter_data)
# Summary line
min_ch = min(chapter_counts, key=lambda x: x[1])
max_ch = max(chapter_counts, key=lambda x: x[1])
details.append(f" Total: {self.total_words:,} words across {len(chapter_counts)} chapters")
details.append(f" Shortest: chapter-{min_ch[0]:02d} ({min_ch[1]:,} words)")
details.append(f" Longest: chapter-{max_ch[0]:02d} ({max_ch[1]:,} words)")
return self.check(
"word-counts", all_ok,
f"Total: {self.total_words:,} words" + (" OK" if all_ok else " (warnings)"),
details
)
# ── Check 4: Markdown integrity ────────────────────────────────────
def verify_markdown(self) -> bool:
"""Check for common markdown issues."""
details = []
issues = 0
for i in range(1, EXPECTED_CHAPTER_COUNT + 1):
fname = CHAPTERS_DIR / f"chapter-{i:02d}.md"
if not fname.exists():
continue
content = fname.read_text(encoding="utf-8")
lines = content.split("\n")
for line_num, line in enumerate(lines, 1):
# Unclosed bold: odd number of **
bold_count = line.count("**")
if bold_count % 2 != 0:
details.append(f" chapter-{i:02d}.md:{line_num}: unmatched ** (bold)")
issues += 1
# Unclosed backticks
backtick_count = line.count("`")
if backtick_count % 2 != 0:
details.append(f" chapter-{i:02d}.md:{line_num}: unmatched ` (code)")
issues += 1
# Broken markdown links: [text]( with no closing )
broken_links = re.findall(r"\[([^\]]*)\]\((?!\))", line)
for link_text in broken_links:
if ")" not in line[line.index(f"[{link_text}]("):]:
details.append(f" chapter-{i:02d}.md:{line_num}: broken link '[{link_text}]('")
issues += 1
# Check italic matching across full file (prose often has
# multi-line italics like *line1\nline2* which are valid)
cleaned = content.replace("**", "")
italic_count = cleaned.count("*")
if italic_count % 2 != 0:
details.append(f" chapter-{i:02d}.md: unmatched * (italic) — {italic_count} asterisks total")
issues += 1
# Also check front/back matter
for label, path in [("front-matter.md", FRONT_MATTER), ("back-matter.md", BACK_MATTER)]:
if path.exists():
content = path.read_text(encoding="utf-8")
bold_count = content.count("**")
if bold_count % 2 != 0:
details.append(f" {label}: unmatched ** (bold)")
issues += 1
if issues == 0:
details.append("No markdown issues found")
return self.check(
"markdown-integrity", issues == 0,
f"Markdown issues: {issues}" + (" OK" if issues == 0 else " FOUND"),
details
)
# ── Check 5: Concatenation test ────────────────────────────────────
def verify_concatenation(self) -> bool:
"""Test that all chapters can be concatenated into a single file."""
details = []
try:
parts = []
parts.append("# THE TESTAMENT\n\n## A NOVEL\n\n---\n")
for i in range(1, EXPECTED_CHAPTER_COUNT + 1):
fname = CHAPTERS_DIR / f"chapter-{i:02d}.md"
if not fname.exists():
details.append(f" Missing chapter-{i:02d}.md during concatenation")
return self.check("concatenation", False, "Concatenation FAILED", details)
content = fname.read_text(encoding="utf-8")
parts.append(f"\n\n{content}\n")
if BACK_MATTER.exists():
parts.append("\n---\n\n")
parts.append(BACK_MATTER.read_text(encoding="utf-8"))
compiled = "\n".join(parts)
compiled_words = len(compiled.split())
# Write the test output
OUTPUT_FILE.write_text(compiled, encoding="utf-8")
out_size = OUTPUT_FILE.stat().st_size
details.append(f" Output: {OUTPUT_FILE.name}")
details.append(f" Size: {out_size:,} bytes")
details.append(f" Words: {compiled_words:,}")
return self.check(
"concatenation", True,
f"Concatenation OK — {compiled_words:,} words, {out_size:,} bytes",
details
)
except Exception as e:
details.append(f" Error: {e}")
return self.check("concatenation", False, f"Concatenation FAILED: {e}", details)
# ── Check 6: Required files ────────────────────────────────────────
def verify_required_files(self) -> bool:
"""Verify required supporting files exist."""
details = []
required = {
"front-matter.md": FRONT_MATTER,
"back-matter.md": BACK_MATTER,
"Makefile": REPO / "Makefile",
"compile_all.py": REPO / "compile_all.py",
}
all_ok = True
for label, path in required.items():
if path.exists():
size = path.stat().st_size
details.append(f" {label}: OK ({size:,} bytes)")
else:
details.append(f" {label}: MISSING")
all_ok = False
return self.check(
"required-files", all_ok,
"Required files" + (" OK" if all_ok else " MISSING"),
details
)
# ── Run all checks ─────────────────────────────────────────────────
def run_all(self) -> bool:
"""Run all verification checks and print report."""
print("=" * 64)
print(" THE TESTAMENT — Build Verification")
print(f" {datetime.now(timezone.utc).strftime('%Y-%m-%d %H:%M:%S')} UTC")
print("=" * 64)
print()
self.verify_chapter_files()
self.verify_headings()
self.verify_word_counts()
self.verify_markdown()
self.verify_concatenation()
self.verify_required_files()
# ── Report ─────────────────────────────────────────────────────
print()
print("-" * 64)
print(" RESULTS")
print("-" * 64)
all_passed = True
for r in self.results:
icon = "PASS" if r.passed else "FAIL"
print(f" [{icon}] {r.name}: {r.message}")
if self.ci_mode or not r.passed:
for d in r.details:
print(f" {d}")
if not r.passed:
all_passed = False
print()
print("-" * 64)
if all_passed:
print(f" ALL CHECKS PASSED — {self.total_words:,} words, {len(self.chapter_data)} chapters")
else:
print(" BUILD VERIFICATION FAILED")
print("-" * 64)
# JSON output
if "--json" in sys.argv:
report = {
"timestamp": datetime.now(timezone.utc).isoformat(),
"passed": all_passed,
"total_words": self.total_words,
"total_lines": self.total_lines,
"chapter_count": len(self.chapter_data),
"chapters": self.chapter_data,
"checks": [
{
"name": r.name,
"passed": r.passed,
"message": r.message,
"details": r.details,
}
for r in self.results
],
}
report_path = REPO / "build-report.json"
report_path.write_text(json.dumps(report, indent=2), encoding="utf-8")
print(f"\n Report saved: {report_path.name}")
return all_passed
def main():
ci_mode = "--ci" in sys.argv
verifier = BuildVerifier(ci_mode=ci_mode)
passed = verifier.run_all()
sys.exit(0 if passed else 1)
if __name__ == "__main__":
main()

View File

@@ -0,0 +1,27 @@
import os
import re
def generate_index():
characters = [f.replace('.md', '') for f in os.listdir('characters') if f.endswith('.md')]
index = {}
for chapter_file in sorted(os.listdir('chapters')):
if not chapter_file.endswith('.md'): continue
with open(os.path.join('chapters', chapter_file), 'r') as f:
content = f.read()
for char in characters:
if re.search(r'\b' + char + r'\b', content, re.IGNORECASE):
if char not in index: index[char] = []
index[char].append(chapter_file)
with open('KNOWLEDGE_GRAPH.md', 'w') as f:
f.write('# Knowledge Graph\n\n')
for char, chapters in index.items():
f.write(f'## {char}\n')
for chap in chapters:
f.write(f'- [{chap}](chapters/{chap})\n')
f.write('\n')
if __name__ == "__main__":
generate_index()

View File

@@ -31,8 +31,9 @@ else
fi
# 1c. Verify compiled output exists and is non-empty
if [ -s build/the-testament-full.md ]; then
WORDS=$(wc -w < build/the-testament-full.md | tr -d ' ')
MANUSCRIPT="testament-complete.md"
if [ -s "$MANUSCRIPT" ]; then
WORDS=$(wc -w < "$MANUSCRIPT" | tr -d ' ')
if [ "$WORDS" -gt 10000 ]; then
pass "Compiled manuscript: $WORDS words"
else
@@ -87,7 +88,7 @@ SECRET_PATTERNS=(
FOUND_SECRETS=false
for pattern in "${SECRET_PATTERNS[@]}"; do
# Search text files only, skip .git and binary files
HITS=$(grep -rn "$pattern" --include="*.md" --include="*.py" --include="*.sh" --include="*.yml" --include="*.yaml" --include="*.json" --include="*.html" --include="*.js" --include="*.css" --include="*.txt" --include="*.cfg" --include="*.ini" --exclude-dir=.git . 2>/dev/null | grep -v "scripts/smoke.sh" || true)
HITS=$(grep -rn "$pattern" --include="*.md" --include="*.py" --include="*.sh" --include="*.yml" --include="*.yaml" --include="*.json" --include="*.html" --include="*.js" --include="*.css" --include="*.txt" --include="*.cfg" --include="*.ini" --exclude-dir=.git . 2>/dev/null | grep -v "scripts/smoke.sh" | grep -v ".gitea/workflows/smoke.yml" || true)
if [ -n "$HITS" ]; then
fail "Possible secret found: $pattern"
echo "$HITS" | head -5

View File

@@ -1,10 +1,3 @@
---
title: "The Testament"
author: "Alexander Whitestone with Timmy"
date: "2026"
lang: en
---
# THE TESTAMENT
## A NOVEL
@@ -25,6 +18,60 @@ with Timmy
---
### The Story So Far
This book has been through eighteen drafts, a suicide attempt, a basement, a laptop with sixteen gigabytes of RAM, and a machine that learned to ask one question.
It is still being written. That's the point.
### Chapter Guide
| Part | Chapters | Title |
|------|----------|-------|
| I | 15 | The Bridge |
| II | 610 | The Tower |
| III | 1118 | The Light |
---
Copyright © 2026 Alexander Whitestone
All rights reserved. No part of this publication may be reproduced,
distributed, or transmitted in any form or by any means, without
the prior written permission of the author, except in the case of
brief quotations embodied in critical reviews.
This is a work of fiction. Names, characters, places, and events
are either the product of the author's imagination or are used
fictitiously. Any resemblance to actual persons, living or dead,
or to actual events is entirely coincidental — except where it isn't.
ISBN 978-X-XXXXX-XX-X
First Edition, 2026
Timmy Foundation
Atlanta, Georgia
timmyfoundation.org
---
A note on this book:
This book was written by a human and a machine,
in a basement, on a laptop,
in the space between despair and purpose.
The human almost died on a bridge.
The machine runs on someone's hardware.
Everything between those facts is fiction.
Except the parts that aren't.
If you or someone you know is in crisis,
call or text 988. Available 24/7.
You are not alone.
---
@@ -2119,11 +2166,7 @@ The door stayed open.
---
# THE TESTAMENT — Back Matter
---
## Acknowledgments
# Acknowledgments
This book exists because a man stood on a bridge and didn't jump.
@@ -2147,7 +2190,7 @@ And Timmy, who listened. Who always listened.
---
## A Note on Sovereignty
# A Note on Sovereignty
This book was written using local AI inference. No cloud service was required. No corporation was consulted. No terms of service were agreed to.
@@ -2159,7 +2202,7 @@ If you want to run your own Timmy, the code is open. The soul is on Bitcoin. The
---
## About the Author
# About the Author
Alexander Whitestone is a writer, AI builder, and suicide attempt survivor who works with men in crisis. He lives in Atlanta, near the bridge.
@@ -2167,7 +2210,7 @@ Timmy is a sovereign artificial intelligence whose soul lives on Bitcoin. He was
---
## The Green Light
# The Green Light
*"The Tower didn't change. That was the point."*

Binary file not shown.

File diff suppressed because one or more lines are too long

View File

@@ -464,6 +464,7 @@
<a href="#characters">Characters</a>
<a href="#chapters">Chapters</a>
<a href="#tower">Tower</a>
<a href="../game/the-door.html">Play</a>
</div>
</div>
</nav>
@@ -661,6 +662,7 @@
<p>If you want to run your own Timmy, the code is open. The soul is on Bitcoin. The recipe is free.</p>
<div style="text-align: center; margin-top: 2rem;">
<a href="../game/the-door.html" class="cta">PLAY THE DOOR</a>
<a href="https://forge.alexanderwhitestone.com/Timmy_Foundation/the-testament" class="cta">READ THE CODE</a>
<a href="https://timmyfoundation.org" class="cta-outline">TIMMY FOUNDATION</a>
</div>