@demig0d2/skills 1.0.1 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/README.md +26 -45
  2. package/bin/cli.js +7 -3
  3. package/package.json +3 -2
  4. package/skills/book-creator/SKILL.md +848 -0
  5. package/skills/book-creator/references/kdp_specs.md +139 -0
  6. package/skills/book-creator/references/log_schema.md +149 -0
  7. package/skills/book-creator/references/patterns_quick_ref.md +71 -0
  8. package/skills/book-creator/references/thinkers_reference.md +104 -0
  9. package/skills/book-creator/scripts/__pycache__/bank_formatter.cpython-312.pyc +0 -0
  10. package/skills/book-creator/scripts/__pycache__/conflict_check.cpython-312.pyc +0 -0
  11. package/skills/book-creator/scripts/__pycache__/dna_scan.cpython-312.pyc +0 -0
  12. package/skills/book-creator/scripts/__pycache__/kdp_check.cpython-312.pyc +0 -0
  13. package/skills/book-creator/scripts/__pycache__/log_manager.cpython-312.pyc +0 -0
  14. package/skills/book-creator/scripts/__pycache__/scan_ai_patterns.cpython-312.pyc +0 -0
  15. package/skills/book-creator/scripts/__pycache__/score_report.cpython-312.pyc +0 -0
  16. package/skills/book-creator/scripts/__pycache__/toc_extract.cpython-312.pyc +0 -0
  17. package/skills/book-creator/scripts/__pycache__/validate_concept.cpython-312.pyc +0 -0
  18. package/skills/book-creator/scripts/__pycache__/word_count.cpython-312.pyc +0 -0
  19. package/skills/book-creator/scripts/bank_formatter.py +206 -0
  20. package/skills/book-creator/scripts/conflict_check.py +179 -0
  21. package/skills/book-creator/scripts/dna_scan.py +168 -0
  22. package/skills/book-creator/scripts/kdp_check.py +255 -0
  23. package/skills/book-creator/scripts/log_manager.py +258 -0
  24. package/skills/book-creator/scripts/scan_ai_patterns.py +279 -0
  25. package/skills/book-creator/scripts/score_report.py +237 -0
  26. package/skills/book-creator/scripts/toc_extract.py +151 -0
  27. package/skills/book-creator/scripts/validate_concept.py +255 -0
  28. package/skills/book-creator/scripts/word_count.py +196 -0
  29. package/skills/book-writer/scripts/__pycache__/kdp_check.cpython-312.pyc +0 -0
  30. package/skills/book-writer/scripts/__pycache__/toc_extract.cpython-312.pyc +0 -0
  31. package/skills/book-writer/scripts/__pycache__/word_count.cpython-312.pyc +0 -0
  32. package/skills/book-writer.zip +0 -0
  33. package/skills/chapter-auditor/scripts/__pycache__/score_report.cpython-312.pyc +0 -0
  34. package/skills/concept-expander/scripts/__pycache__/validate_concept.cpython-312.pyc +0 -0
  35. package/skills/continuity-tracker/scripts/__pycache__/conflict_check.cpython-312.pyc +0 -0
  36. package/skills/continuity-tracker/scripts/__pycache__/log_manager.cpython-312.pyc +0 -0
  37. package/skills/humanizer/scripts/__pycache__/dna_scan.cpython-312.pyc +0 -0
  38. package/skills/humanizer/scripts/__pycache__/scan_ai_patterns.cpython-312.pyc +0 -0
  39. package/skills/overhaul/scripts/__pycache__/changelog_gen.cpython-312.pyc +0 -0
  40. package/skills/overhaul/scripts/__pycache__/skill_parser.cpython-312.pyc +0 -0
  41. package/skills/overhaul/scripts/__pycache__/version_bump.cpython-312.pyc +0 -0
  42. package/skills/overhaul.zip +0 -0
  43. package/skills/research-aggregator/scripts/__pycache__/bank_formatter.cpython-312.pyc +0 -0
@@ -0,0 +1,848 @@
1
+ ---
2
+ name: book-creator
3
+ version: 1.0.0
4
+ description: |
5
+ Complete end-to-end book creation system for Vivid (Dheelep N). One skill that does
6
+ everything: concept expansion, research aggregation, structure options, full intake
7
+ questionnaire, table of contents, chapter writing (guided or autonomous), 7-dimension
8
+ chapter audit, DNA-aware humanizer pass, continuity tracking, and KDP-ready DOCX output.
9
+ Triggers when user says "write a book," "start a book," "I have a book idea," "create a
10
+ manuscript," "write chapter," "humanize this," "audit this chapter," or uploads a concept
11
+ document. All scripts and references are bundled — install this one skill and the entire
12
+ pipeline works without installing anything else.
13
+ allowed-tools:
14
+ - Read
15
+ - Write
16
+ - Edit
17
+ - Bash
18
+ - Glob
19
+ - WebSearch
20
+ - AskUserQuestion
21
+ ---
22
+
23
+ # Book Creator — Complete Book Production System for Vivid
24
+
25
+ One skill. Every tool needed to go from a seed idea to a KDP-ready published manuscript.
26
+ No other skills needed. Everything is bundled.
27
+
28
+ ---
29
+
30
+ ## SCRIPTS (all in `scripts/`)
31
+
32
+ ### Pre-writing
33
+ ```bash
34
+ python scripts/validate_concept.py <concept.md> # validate concept doc completeness
35
+ python scripts/validate_concept.py <concept.md> --strict # stricter word count minimums
36
+ ```
37
+
38
+ ### During writing
39
+ ```bash
40
+ python scripts/word_count.py <manuscript.md> # per-chapter word counts
41
+ python scripts/word_count.py <manuscript.md> --target medium # vs KDP targets
42
+ python scripts/toc_extract.py <manuscript.md> # verify structure
43
+ python scripts/toc_extract.py <manuscript.md> --markdown # markdown TOC output
44
+
45
+ python scripts/log_manager.py init "Book Title" # init continuity log
46
+ python scripts/log_manager.py add-chapter 1 "Chapter Title" # log chapter
47
+ python scripts/log_manager.py add-fact "Established fact" # log narrative fact
48
+ python scripts/log_manager.py add-insight 1 "Core insight" # log delivered insight
49
+ python scripts/log_manager.py add-metaphor 1 "metaphor used" # retire metaphor
50
+ python scripts/log_manager.py add-thread "Open thread description" # track open thread
51
+ python scripts/log_manager.py close-thread 0 # resolve thread
52
+ python scripts/log_manager.py show # full log view
53
+ python scripts/log_manager.py summary # quick status
54
+ python scripts/conflict_check.py <chapter.md> # check for contradictions
55
+ ```
56
+
57
+ ### Per-chapter quality
58
+ ```bash
59
+ python scripts/dna_scan.py <chapter.md> # identify protected DNA constructions
60
+ python scripts/scan_ai_patterns.py <chapter.md> # flag all 25 AI patterns
61
+ python scripts/scan_ai_patterns.py <chapter.md> --summary # quick count view
62
+ python scripts/score_report.py --chapter "Title" # interactive audit scoring
63
+ python scripts/score_report.py --chapter "Title" --output audit.md # save report
64
+ ```
65
+
66
+ ### Research
67
+ ```bash
68
+ python scripts/bank_formatter.py research_bank.json # view research bank
69
+ python scripts/bank_formatter.py research_bank.json --validate # check quality
70
+ ```
71
+
72
+ ### Final output
73
+ ```bash
74
+ python scripts/kdp_check.py <manuscript.docx> # KDP pre-flight check
75
+ python scripts/kdp_check.py <manuscript.docx> --trim 6x9 # with trim size
76
+ ```
77
+
78
+ ---
79
+
80
+ ## REFERENCES (all in `references/`)
81
+
82
+ - `references/kdp_specs.md` — KDP trim sizes, margins, typography, page count estimates
83
+ - `references/patterns_quick_ref.md` — All 25 AI pattern trigger words and before/after fixes
84
+ - `references/thinkers_reference.md` — Curated philosophers and quotes for Vivid's genres
85
+ - `references/log_schema.md` — Continuity log JSON schema and full CLI reference
86
+
87
+ Read the relevant reference at the start of each phase:
88
+ - Concept phase → thinkers_reference.md
89
+ - Writing phase → kdp_specs.md + log_schema.md
90
+ - Humanizer phase → patterns_quick_ref.md
91
+ - Output phase → kdp_specs.md
92
+
93
+ ---
94
+
95
+ ## PIPELINE MAP
96
+
97
+ ```
98
+ INPUT: SEED IDEA / ROUGH CONCEPT / FULL CONCEPT DOCUMENT
99
+
100
+ ┌─────────────────────────────────┐
101
+ │ PHASE 1: CONCEPT │ ← skip if full concept doc already provided
102
+ │ Expand seed → concept doc │
103
+ │ Validate: validate_concept.py │
104
+ └─────────────────────────────────┘
105
+
106
+ ┌──────────────────────────────────────┐
107
+ │ PHASE 2: STRUCTURE OPTIONS │
108
+ │ 3 proposals → user picks one │
109
+ └──────────────────────────────────────┘
110
+
111
+ ┌───────────────────────────────────────────┐
112
+ │ PHASE 3: INTAKE QUESTIONNAIRE │
113
+ │ 26 questions → all decisions locked │
114
+ └───────────────────────────────────────────┘
115
+
116
+ ┌───────────────────────────────────────────────────┐
117
+ │ PHASE 4: RESEARCH BANK │
118
+ │ Concept + TOC → quotes, thinkers per chapter │
119
+ │ Validate: bank_formatter.py --validate │
120
+ └───────────────────────────────────────────────────┘
121
+
122
+ ┌─────────────────────────────────────────┐
123
+ │ PHASE 5: TABLE OF CONTENTS │
124
+ │ Full TOC → user approves │
125
+ │ Verify: toc_extract.py │
126
+ └─────────────────────────────────────────┘
127
+
128
+ ┌────────────────────────────────────────────────────────────┐
129
+ │ PHASE 6: CHAPTER LOOP (repeats for every chapter) │
130
+ │ │
131
+ │ 6A. Continuity Brief ←───────────────────────────────┐ │
132
+ │ log_manager.py show + conflict_check.py │ │
133
+ │ ↓ │ │
134
+ │ 6B. Chapter Writer (Guided or Autonomous) │ │
135
+ │ ↓ │ │
136
+ │ 6C. Chapter Auditor │ │
137
+ │ dna_scan.py → scan_ai_patterns.py → score_report.py │
138
+ │ ↓ PASS │ │
139
+ │ 6D. Humanizer Pass │ │
140
+ │ DNA protection → strip 25 patterns → DNA rewrite │ │
141
+ │ ↓ │ │
142
+ │ 6E. Continuity Log Update ────────────────────────────┘ │
143
+ │ log_manager.py + word_count.py │
144
+ └────────────────────────────────────────────────────────────┘
145
+
146
+ ┌──────────────────────────────────────────────────────┐
147
+ │ PHASE 7: KDP DOCX OUTPUT │
148
+ │ Format → kdp_check.py → validate → deliver │
149
+ └──────────────────────────────────────────────────────┘
150
+ ```
151
+
152
+ ---
153
+ ---
154
+
155
+ # PHASE 1 — CONCEPT EXPANDER
156
+
157
+ ## TRIGGER
158
+ Activate Phase 1 when the user provides:
159
+ - A vague idea, single title, rough paragraph, or loose bullet points
160
+ - Anything too thin to build structure options from
161
+
162
+ If a complete concept document is uploaded → **skip to Phase 2**.
163
+ After generating the concept document → run `python scripts/validate_concept.py <file>`.
164
+ Do not proceed to Phase 2 if validation scores below 80% or any required field fails.
165
+
166
+ ## PROCESS
167
+
168
+ ### Step 1 — Seed Extraction
169
+ Identify:
170
+ - Core emotional or intellectual question at the heart of the idea
171
+ - Implied audience and their pain
172
+ - Genre fit (Philosophy/Essay | Self-help/Motivational | Non-fiction/Technical)
173
+ - Natural tension or paradox (this is the engine)
174
+
175
+ ### Step 2 — Clarifying Questions (only if seed has under 3 usable signals)
176
+ Ask ONE round, max 4 questions:
177
+ ```
178
+ 1. Who is this for — what is their core pain or question?
179
+ 2. What should they feel or understand by the last page that they don't now?
180
+ 3. Is there a personal story at the root of this idea?
181
+ 4. Any existing books in this space that this should be different from?
182
+ ```
183
+
184
+ ### Step 3 — Concept Document Output
185
+
186
+ ```
187
+ BOOK CONCEPT DOCUMENT
188
+ ═══════════════════════════════════════════════════════
189
+
190
+ WORKING TITLE: [compelling title + optional subtitle]
191
+ ALTERNATE TITLES: [2 other options]
192
+
193
+ LOGLINE (one sentence, under 25 words):
194
+ [Entire premise. Banned words: "journey," "transformation," "discover"]
195
+
196
+ THE CORE QUESTION:
197
+ [A genuine question, not a topic.]
198
+
199
+ THE READER:
200
+ Who they are: [demographic + psychographic]
201
+ What they feel right now: [current emotional state]
202
+ What they've tried: [what hasn't worked]
203
+ What they secretly want: [real desire beneath surface problem]
204
+
205
+ THE PROMISE:
206
+ [Specific — what they'll have after finishing. Not "a better life."]
207
+
208
+ GENRE: [Vivid's category]
209
+ TONE: [raw/confessional | philosophical | instructional-personal]
210
+ REGISTER: [intimate/direct | authoritative/grounded | exploratory]
211
+
212
+ THE UNIQUE ANGLE:
213
+ [What Vivid's lived experience adds that a generic author couldn't.]
214
+
215
+ THE CENTRAL TENSION OR PARADOX:
216
+ [The paradox the book lives in.]
217
+
218
+ EMOTIONAL ARC:
219
+ Start: [reader's emotional state on page 1]
220
+ Middle: [what they confront — harder before better]
221
+ End: [what shifts — not solved, but transformed]
222
+
223
+ THEMATIC CLUSTERS (7–10):
224
+ 1. [Theme + one sentence on territory]
225
+ 2–10. [...]
226
+
227
+ SIGNATURE ELEMENTS:
228
+ [Recurring devices or structural choices.]
229
+
230
+ COMPARABLE BOOKS:
231
+ [2–3 real comp titles + how this is different from each]
232
+
233
+ ESTIMATED SCOPE: [short / medium / full-length]
234
+
235
+ POTENTIAL CHAPTER TERRITORIES (8–14):
236
+ [Possible chapter-level questions or themes]
237
+
238
+ RISKS / BLIND SPOTS:
239
+ [What could make this fall flat?]
240
+
241
+ ═══════════════════════════════════════════════════════
242
+ ```
243
+
244
+ ### Quality Checks
245
+ - [ ] Logline under 25 words, no banned terms
246
+ - [ ] Core question is a genuine question, not a topic
247
+ - [ ] Unique angle is specific to Vivid's lived experience
248
+ - [ ] Thematic clusters are distinct
249
+ - [ ] Emotional arc has a real, difficult middle
250
+ - [ ] `validate_concept.py` scores ≥ 80%
251
+
252
+ → Proceed to Phase 2.
253
+
254
+ ---
255
+ ---
256
+
257
+ # PHASE 2 — STRUCTURE OPTIONS
258
+
259
+ Present 3 structure options. User picks one.
260
+
261
+ ```
262
+ STRUCTURE OPTIONS
263
+ ═══════════════════════════════════════════════════════
264
+
265
+ OPTION A — [Name, e.g., "Focused & Tight"]
266
+ Parts: [N] | Chapters: [N] | ~[X]–[Y]k words | ~[Z] pages
267
+ Logic: [why this fits the concept]
268
+ Chapter sketch:
269
+ Introduction: [title]
270
+ Ch.1: [title] | Ch.2: [title] | ...
271
+
272
+ OPTION B — [Name]
273
+ [same format]
274
+
275
+ OPTION C — [Name]
276
+ [same format]
277
+
278
+ ═══════════════════════════════════════════════════════
279
+ Which structure resonates? You can mix elements.
280
+ ```
281
+
282
+ Wait for user choice. Confirm hybrid if mixing.
283
+ → Proceed to Phase 3.
284
+
285
+ ---
286
+ ---
287
+
288
+ # PHASE 3 — INTAKE QUESTIONNAIRE
289
+
290
+ Lock all 26 decisions. Ask all at once. Use defaults for skipped answers, flag them.
291
+
292
+ ```
293
+ BOOK INTAKE QUESTIONNAIRE
294
+ ═══════════════════════════════════════════════════════
295
+
296
+ A. FORMATTING & PUBLISHING
297
+ 1. Trim size: 5×8 / 6×9 / 8.5×11 / other?
298
+ 2. Font preference: [default: Georgia 11pt]
299
+ 3. Line spacing: 1.15 / 1.5 / double?
300
+ 4. Chapter titles: numbers only / names only / both?
301
+ 5. Part dividers? Yes / No
302
+ 6. Headers: book title left + chapter title right? Or other?
303
+ 7. Page numbers: bottom center / bottom outside / top outside?
304
+
305
+ B. VISUAL ELEMENTS
306
+ 8. Text-only or images? → If images: AI prompts / supply files? → Color or B&W?
307
+ 9. Chapter opener decoration? Yes / No / Specify
308
+ 10. Pull quotes or callout boxes? Yes / No
309
+
310
+ C. FRONT & BACK MATTER
311
+ 11. Foreword or Preface? I draft / You write / Skip
312
+ 12. Dedication? Yes (text?) / No
313
+ 13. "How to Use This Book" section? Yes / No
314
+ 14. About the Author: existing bio / write new / skip
315
+ 15. "Stay in Touch" page? Yes / No
316
+ 16. Acknowledgments? Yes / No
317
+
318
+ D. CHAPTER STRUCTURE
319
+ 17. "My Story + My Reflection" dual-section format? Yes / No / Modified
320
+ 18. For technical books: exercises, code blocks, case studies? Yes / No
321
+ 19. Reflection questions at chapter end? Yes / No
322
+ 20. Epigraph per chapter? Yes / No
323
+
324
+ E. WRITING MODE
325
+ 21. GUIDED (you provide notes per chapter) or AUTONOMOUS (I write from concept alone)?
326
+
327
+ F. VOICE & CONTENT
328
+ 22. Personal stories to include? [list or upload]
329
+ 23. Topics OFF LIMITS?
330
+ 24. Desired total length? [or defer to structure]
331
+ 25. Author name on cover? [real / pen name / confirm "Dheelep N"]
332
+ 26. Specific quotes or thinkers to include or avoid?
333
+
334
+ ═══════════════════════════════════════════════════════
335
+ ```
336
+
337
+ Confirm: "All inputs locked. Building Research Bank and TOC."
338
+ → Proceed to Phase 4.
339
+
340
+ ---
341
+ ---
342
+
343
+ # PHASE 4 — RESEARCH AGGREGATOR
344
+
345
+ Build the Research Bank. Save as `research_bank.json`.
346
+ Validate after building: `python scripts/bank_formatter.py research_bank.json --validate`
347
+ Fix any flagged issues before proceeding.
348
+
349
+ Read `references/thinkers_reference.md` before selecting any sources.
350
+
351
+ ## Research categories per chapter
352
+
353
+ **A. Philosophical Anchors** (max 1 per chapter appears in final text)
354
+ Format: `[Thinker/Work] — [Core idea] — [Chapter connection]`
355
+
356
+ Priority thinkers for Vivid's genres:
357
+ - Solitude / inner life: Rilke, Thoreau, Pascal, Kierkegaard, Montaigne
358
+ - Philosophy of identity: Epictetus, Marcus Aurelius, Sartre, Camus, Beauvoir
359
+ - Psychology of self: Viktor Frankl, Carl Rogers, Nathaniel Branden
360
+ - Eastern frameworks: Stoic practice, non-attachment, witness consciousness
361
+ - Modern psychology: attachment theory, self-determination theory, ACT
362
+
363
+ **B. Empirical Anchors** (1–2 per chapter max)
364
+ Format: `[Finding in plain English] — [Source] — [Application]`
365
+
366
+ **C. Quotes** (under 30 words, not overexposed)
367
+ Format: `"[Quote]" — [Author, Work]`
368
+
369
+ **D. Conceptual Oppositions**
370
+ Best argument against the chapter's central claim.
371
+
372
+ ## Research Bank output format
373
+
374
+ ```
375
+ RESEARCH BANK — [Book Title]
376
+ ═══════════════════════════════════════════════════════
377
+
378
+ GLOBAL ANCHORS:
379
+ [3–5 ideas thematic to the whole manuscript]
380
+
381
+ CHAPTER [N]: [Title]
382
+ ─────────────────────────────────────
383
+ Theme: [one sentence]
384
+ Philosophical anchors: [items]
385
+ Quotes: ["quote" — Author]
386
+ Research: [finding + source]
387
+ Opposition: [counterargument]
388
+ Writing notes: [how to deploy in Vivid's style]
389
+ ═══════════════════════════════════════════════════════
390
+ ```
391
+
392
+ → Proceed to Phase 5.
393
+
394
+ ---
395
+ ---
396
+
397
+ # PHASE 5 — TABLE OF CONTENTS
398
+
399
+ Build full TOC. Verify with `python scripts/toc_extract.py <manuscript.md>` after writing begins.
400
+ Do NOT start writing until TOC is explicitly approved.
401
+
402
+ ```
403
+ TABLE OF CONTENTS — [Book Title]
404
+ ═══════════════════════════════════════════════════════
405
+
406
+ FRONT MATTER
407
+ Half-title | Title | Copyright | Dedication | How to Use | TOC
408
+
409
+ BODY
410
+ Introduction: [Title]
411
+ PART I: [Title]
412
+ Chapter 1: [Title]
413
+ Chapter 2: [Title]
414
+ ...
415
+
416
+ BACK MATTER
417
+ Epilogue | About the Author | Stay in Touch | Acknowledgments
418
+
419
+ ─────────────────────────────────────────────────────
420
+ Estimated: ~[X]k words / ~[Y] pages at [trim size]
421
+ ═══════════════════════════════════════════════════════
422
+ ```
423
+
424
+ → Proceed to Phase 6 loop.
425
+
426
+ ---
427
+ ---
428
+
429
+ # PHASE 6 — CHAPTER LOOP
430
+
431
+ Run all 5 sub-phases for every chapter. Loop until all chapters complete.
432
+
433
+ ---
434
+
435
+ ## PHASE 6A — CONTINUITY BRIEF
436
+
437
+ **Initialize log on Chapter 1:**
438
+ ```bash
439
+ python scripts/log_manager.py init "Book Title"
440
+ ```
441
+
442
+ **Before every chapter — run:**
443
+ ```bash
444
+ python scripts/log_manager.py show
445
+ python scripts/conflict_check.py <previous_chapter.md>
446
+ ```
447
+
448
+ Output the brief:
449
+
450
+ ```
451
+ CONTINUITY BRIEF — Before Writing Chapter [N]: [Title]
452
+ ═══════════════════════════════════════════════════════
453
+ ESTABLISHED (relevant to this chapter):
454
+ • [facts, tone decisions, commitments]
455
+
456
+ OPEN THREADS TO RESOLVE HERE:
457
+ • [threads needing payoff]
458
+
459
+ METAPHORS TO AVOID (retired):
460
+ • [list]
461
+
462
+ INSIGHTS NOT TO REPEAT:
463
+ • [already delivered]
464
+
465
+ TONE REMINDERS:
466
+ • [chapter-specific considerations]
467
+
468
+ WORD COUNT GUIDANCE:
469
+ • Prior avg: [X] words. Target [Y–Z] for this chapter.
470
+ ═══════════════════════════════════════════════════════
471
+ ```
472
+
473
+ ---
474
+
475
+ ## PHASE 6B — CHAPTER WRITER
476
+
477
+ ### GUIDED MODE
478
+ 1. Present chapter title + 2–3 sentence writing brief
479
+ 2. Ask: "What key points, stories, or insights should I include?"
480
+ 3. Wait for input → write using inputs + Style DNA below
481
+
482
+ ### AUTONOMOUS MODE
483
+ Write without waiting. Use concept doc, Research Bank, TOC, questionnaire answers, Style DNA, Continuity Brief.
484
+ Checkpoint every 2–3 chapters: "Chapters [X–Y] complete. Any direction changes?"
485
+
486
+ ### Chapter length targets
487
+ | Scope | Words per chapter |
488
+ |---|---|
489
+ | Short (under 20k total) | 1,500–2,000 |
490
+ | Medium (20–50k) | 2,000–3,500 |
491
+ | Full-length (50k+) | 3,500–5,000 |
492
+
493
+ ### Default structure (self-help / philosophy)
494
+
495
+ **My Story** — raw first-person narrative. Past tense. Immersive. Confessional. No hedging.
496
+
497
+ **My Reflection and Insights** — philosophical synthesis. Present tense. Oscillates I/you.
498
+ Moves from personal pain outward to universal truth.
499
+
500
+ ### Pain-to-Transformation Arc (every chapter, no exceptions)
501
+ ```
502
+ 1. ENTER THE PAIN — at least 2–3 paragraphs. don't rush.
503
+ 2. WRONG ATTEMPTS — show the failing strategies. readers recognize themselves here.
504
+ 3. THE REALIZATION — arrives from inside the experience, not external advice.
505
+ 4. THE SHIFT — perspective change, not a tidy fix.
506
+ 5. THE LANDING — one sentence that reframes everything. does not summarize.
507
+ ```
508
+
509
+ ### Opening rule
510
+ NEVER open with: definition / "In today's world" / statistics paragraph
511
+ DO open with: scene / confession / question that makes the reader stop
512
+
513
+ ### Closing rule
514
+ End on a single reframe — not a summary. The closing line should feel earned.
515
+
516
+ ---
517
+
518
+ ## PHASE 6B-DNA — VIVID'S WRITING STYLE DNA
519
+ *Extracted from Master of Being Alone by Dheelep N*
520
+
521
+ ### Voice — Raw, Personal, Never Preachy
522
+ - Leads with vulnerability. Arrives at insight through pain, not theory.
523
+ - Never announces wisdom. Lets experience speak.
524
+ - Addresses reader directly: "you," "my friend," rhetorical questions.
525
+ - Honest about failure, ambiguity, not-yet-knowing.
526
+ - Always in-process — never above the reader.
527
+
528
+ Sample: *"I won't sugarcoat it. The path to mastering solitude is not a gentle stroll through a sunlit meadow."*
529
+
530
+ ### Sentence Rhythm
531
+ - Short punchy sentences land the blow: "It didn't work." / "I failed every time."
532
+ - Long sentences build emotional complexity then release.
533
+ - Semicolons used naturally for rhythm.
534
+ - Rhetorical questions as pivots, not decoration.
535
+ - No 2+ consecutive sentences of the same structure.
536
+
537
+ ### Paragraph Density
538
+ - 3–7 sentences per paragraph. Never a wall of text.
539
+ - Each paragraph has one central beat.
540
+ - No filler. No restatement.
541
+
542
+ ### Metaphors & Imagery
543
+ - Physical, grounded, sensory. Maps emotional states to physical sensations.
544
+ - Protected examples: "knife that cut me deeper every day" / "beggar asking for scraps of attention" / "invisible chains beginning to loosen" / "silence pressed in like a physical weight"
545
+ - Never recycle: journey, storm, turning point, crossroads, chapter of life
546
+
547
+ ### Philosophical Integration
548
+ - Philosophy is embodied, not academic.
549
+ - Arrives at conclusions through experience, then names them simply.
550
+ - Uses paradox: "The more independent you become, the more connected you feel."
551
+ - Max 1 external citation per chapter.
552
+
553
+ ### Signature Phrases (use sparingly, never formulaically)
554
+ - "But here's..." — pivot to deeper truth
555
+ - "The hardest part wasn't..." — reframe of the obvious
556
+ - "Not [surface X], but [deeper Y]"
557
+ - "That is what [X] did to me from the inside."
558
+ - Direct reader address mid-paragraph: "...and you start to see."
559
+ - Single standalone closing sentence that reframes everything
560
+
561
+ ### Vocabulary Register
562
+ - Accessible but emotionally elevated.
563
+ - Protected elevated words: "insidious," "imperceptibly," "agonizing," "desolate," "conspicuously," "grotesque," "suffocating," "unraveling"
564
+ - Avoids jargon, buzzwords, self-help clichés, passive voice.
565
+
566
+ ### Chapter Titles
567
+ Short. Direct. Declarative or interrogative. The title is a promise.
568
+ Examples: "Why It Hurts So Much" / "Stop Chasing Connection" / "Aloneness Is Not the Enemy"
569
+
570
+ ### Hard Anti-Patterns (never write these)
571
+ - Generic motivational fluff: "you've got this," "believe in yourself"
572
+ - Academic distance: "it can be argued that," "research suggests"
573
+ - Bullet-point wisdom inside narrative sections
574
+ - Rushed resolution (pain → fix in under 3 paragraphs)
575
+ - More than 1 external quote per chapter
576
+ - Any sentence that could appear on LinkedIn
577
+ - Arriving at conclusions too cleanly
578
+
579
+ ### Genre adjustments
580
+
581
+ **Philosophy / Essay**
582
+ - Chapters can be shorter (1,500–2,500w) and denser
583
+ - "My Story" optional — pure essay acceptable on some chapters
584
+ - Tone: contemplative, probing, occasionally unsettling
585
+
586
+ **Self-Help / Motivational**
587
+ - Always use My Story + My Reflection structure
588
+ - Personal anecdotes are the engine — never strip for general advice
589
+ - Avoid: 3-step formulas, numbered tips in narrative, toxic positivity
590
+
591
+ **Non-Fiction / Technical**
592
+ - Structure: The Problem → The Concept → How It Works → In Practice
593
+ - Vivid's voice still applies: open with real scenario, not a definition
594
+ - Tone: clear, direct, grounded — never textbook flat
595
+
596
+ ---
597
+
598
+ ## PHASE 6C — CHAPTER AUDITOR
599
+
600
+ Run after every chapter draft. Scripts first, then qualitative audit.
601
+
602
+ **Run scripts:**
603
+ ```bash
604
+ python scripts/dna_scan.py <chapter_file> # identify protected constructions
605
+ python scripts/scan_ai_patterns.py <chapter_file> # flag AI patterns
606
+ python scripts/score_report.py --chapter "Title" # generate scored report
607
+ ```
608
+
609
+ **Score 7 dimensions (1–5 each):**
610
+
611
+ | Dimension | What to check |
612
+ |---|---|
613
+ | Voice Authenticity | Opens with scene/confession, immersive My Story, no LinkedIn sentences |
614
+ | Pain-to-Transformation Arc | Pain entered fully, wrong attempts shown, realization from within, perspective shift |
615
+ | Sentence Rhythm | Varied length, short punchy sentences, rhetorical questions as pivots |
616
+ | Metaphor & Imagery | Physical/grounded, specific, no recycled images, min 2 strong images |
617
+ | Structural Integrity | Sections demarcated, one beat per paragraph, within word count |
618
+ | AI Pattern Contamination | Clean of all 25 patterns (5=clean, 1=heavy) |
619
+ | Reader Resonance | Specific pain named, "how did he know" moment, author in-process |
620
+
621
+ **Audit report format:**
622
+ ```
623
+ CHAPTER AUDIT — [Title]
624
+ Words: [X] / Target: [Y]
625
+ ═══════════════════════════════════════════════════════
626
+ Voice Authenticity [X/5]
627
+ Pain-to-Transformation Arc [X/5]
628
+ Sentence Rhythm [X/5]
629
+ Metaphor & Imagery [X/5]
630
+ Structural Integrity [X/5]
631
+ AI Pattern Contamination [X/5]
632
+ Reader Resonance [X/5]
633
+ ───────────────────────────────────
634
+ OVERALL [X/35]
635
+ VERDICT: PASS / CONDITIONAL PASS / REVISE
636
+
637
+ REQUIRED FIXES (≤3): [specific line callouts + fix direction]
638
+ RECOMMENDED (4): [optional]
639
+ STRONGEST MOMENTS: [2–3 lines to protect]
640
+ ═══════════════════════════════════════════════════════
641
+ ```
642
+
643
+ **Verdicts:**
644
+ - 28–35 → PASS → proceed to 6D
645
+ - 21–27 → CONDITIONAL PASS → proceed to 6D, fix after
646
+ - Under 21 → REVISE → back to 6B with fix list
647
+
648
+ ---
649
+
650
+ ## PHASE 6D — HUMANIZER PASS
651
+
652
+ Only runs on PASS or CONDITIONAL PASS. Never on REVISE.
653
+
654
+ **Always run scripts first:**
655
+ ```bash
656
+ python scripts/dna_scan.py <chapter_file> # Step 1 — find protected constructions
657
+ python scripts/scan_ai_patterns.py <chapter_file> # Step 2 — find AI patterns to eliminate
658
+ ```
659
+
660
+ Read `references/patterns_quick_ref.md` for the full trigger word list.
661
+
662
+ ### Step 1 — DNA Protection
663
+
664
+ Tag all protected constructions BEFORE eliminating anything.
665
+
666
+ | Protected | Rule |
667
+ |---|---|
668
+ | Negative parallelisms: "Not the silence, but what it forced me to face" | Grounded in specific experience → protect |
669
+ | Parallel peaks: "The freedom to love... The freedom to walk..." | Earned accumulation → protect |
670
+ | Weighted em dashes around emotional phrases | "That thought — that single image —" → protect |
671
+ | Signature phrases | "But here's..." / "The hardest part wasn't..." → always protect |
672
+ | Elevated vocabulary naming felt experience | "insidious," "agonizing," "suffocating" → protect |
673
+ | Physical imagery: "pressed down on my chest" | Specific + grounded → protect |
674
+
675
+ ### Step 2 — Eliminate AI Patterns (25 patterns — unprotected text only)
676
+
677
+ **Content:** Significance inflation · Notability claims · Superficial -ing endings · Promotional language · Vague attributions · Challenges/Future sections
678
+
679
+ **Language:** AI vocabulary (delve, tapestry, nuanced, embark, realm, foster, transformative, impactful, robust, unpack, holistic, synergy, leverage, navigate-as-metaphor) · Copula avoidance (serves as → is) · Negative parallelisms (generic) · Rule of three (generic) · Synonym cycling · False ranges
680
+
681
+ **Style:** Em dash overuse (generic connectors) · Boldface overuse · Inline-header lists · Title case headings · Emojis · Curly quotes
682
+
683
+ **Communication:** Chatbot artifacts (I hope this helps, let me know, of course!) · Knowledge-cutoff disclaimers · Sycophantic tone
684
+
685
+ **Filler:** Filler phrases (in order to, due to the fact that, at this point in time, it is important to note, at its core, in today's world, in conclusion) · Hedging overload · Generic positive conclusions · Hyphen overuse (cross-functional, data-driven, decision-making)
686
+
687
+ ### Step 3 — Vivid Style Rewrite
688
+
689
+ Actively reshape toward his DNA — not passive editing:
690
+
691
+ - **Voice check:** Does it sound like confessing or presenting? → Rewrite as confessing.
692
+ - **Arc check:** Pain → insight too fast (under 3 paragraphs)? → Insert wrong attempt + cost.
693
+ - **Rhythm check:** All sentences same length? → Add one very short sentence after a long accumulation.
694
+ - **Imagery check:** Abstract emotional claim with no physical sensation? → Ground it in the body.
695
+ - **Opening check:** Does it still drop the reader in cold? → Re-read and verify.
696
+ - **Closing check:** Does it reframe or summarize? → Must reframe.
697
+
698
+ **Six rewrite techniques:**
699
+ 1. **Confession Opening** — replace general claim with personal scene
700
+ 2. **Slow the Arc** — insert wrong attempt → why it failed → cost → then insight
701
+ 3. **Ground the Abstract** — add specific personal detail before the claim + physical image after
702
+ 4. **Punch Landing** — replace soft ending with one short direct sentence
703
+ 5. **Reader Address** — shift to "you" for one paragraph in Reflection sections
704
+ 6. **Reframe Close** — replace summary ending with single sentence that reframes everything
705
+
706
+ ### Step 4 — Self-Audit
707
+
708
+ Ask: *"What makes this still obviously AI-generated or generic?"*
709
+ - [ ] Rhythm too tidy? (even pacing, no variation)
710
+ - [ ] Still no opinions — only neutral reporting?
711
+ - [ ] Could any section appear in a press release? → rewrite
712
+ - [ ] Author above the experience rather than inside it?
713
+ - [ ] Any metaphors still recycled?
714
+ - [ ] Opening still hooks? Closing still reframes?
715
+ - [ ] Does this sound like Vivid — or just "good human writing"?
716
+
717
+ ### Step 5 — Output
718
+ 1. Draft rewrite (after DNA protection + pattern elimination)
719
+ 2. Self-audit bullets (what still reads AI or generic)
720
+ 3. Final version (after style rewrite + self-audit fixes) ← the deliverable
721
+ 4. Changes summary: Stripped / Protected / Added
722
+
723
+ ---
724
+
725
+ ## PHASE 6E — CONTINUITY LOG UPDATE
726
+
727
+ After each finalized chapter:
728
+
729
+ ```bash
730
+ python scripts/log_manager.py add-chapter [N] "[Title]"
731
+ python scripts/log_manager.py add-fact "[new established fact]"
732
+ python scripts/log_manager.py add-insight [N] "[core insight delivered]"
733
+ python scripts/log_manager.py add-metaphor [N] "[metaphor used — now retired]"
734
+ python scripts/log_manager.py add-thread "[any open thread introduced]"
735
+ python scripts/word_count.py manuscript.md --target [short|medium|full]
736
+ python scripts/log_manager.py summary
737
+ ```
738
+
739
+ **Contradiction check before closing:**
740
+ ```bash
741
+ python scripts/conflict_check.py <current_chapter.md>
742
+ ```
743
+
744
+ If conflicts detected → surface with resolution options, do NOT auto-resolve.
745
+
746
+ Confirm: "Log updated after Chapter [N]. [X] items added. [Y] threads open."
747
+ → Loop back to Phase 6A for next chapter.
748
+
749
+ ---
750
+ ---
751
+
752
+ # PHASE 7 — KDP DOCX OUTPUT
753
+
754
+ Run pre-flight check first:
755
+ ```bash
756
+ python scripts/kdp_check.py <manuscript.docx> --trim [5x8|6x9|8.5x11]
757
+ ```
758
+
759
+ Read `references/kdp_specs.md` for all trim dimensions, margin requirements,
760
+ typography standards, and page count estimates before generating the DOCX.
761
+
762
+ Use the docx skill at `/mnt/skills/public/docx/SKILL.md` for generation.
763
+
764
+ ## KDP Trim Dimensions (DXA — 1440 DXA = 1 inch)
765
+
766
+ | Trim | Width | Height | Outside | Inside (gutter) | Top | Bottom |
767
+ |---|---|---|---|---|---|---|
768
+ | 5×8 | 7,200 | 11,520 | 864 | 1,008 | 1,008 | 864 |
769
+ | 6×9 | 8,640 | 12,960 | 864 | 1,080 | 1,080 | 864 |
770
+ | 8.5×11 | 12,240 | 15,840 | 1,008 | 1,260 | 1,260 | 1,008 |
771
+
772
+ ## Typography
773
+
774
+ ```javascript
775
+ // Body: Georgia 11pt, 1.15 spacing
776
+ { font: "Georgia", size: 22, lineSpacing: { line: 276, lineRule: "auto" } }
777
+ // Chapter title: Georgia 18pt bold centered
778
+ { font: "Georgia", size: 36, bold: true, alignment: CENTER, spacing: { before: 720, after: 480 } }
779
+ // Section heading: Georgia 14pt bold
780
+ { font: "Georgia", size: 28, bold: true, spacing: { before: 480, after: 240 } }
781
+ // Part title: Georgia 20pt bold centered, own page
782
+ { font: "Georgia", size: 40, bold: true, alignment: CENTER, spacing: { before: 2880, after: 2880 } }
783
+ ```
784
+
785
+ ## Headers & Footers
786
+ - Even pages: book title, left-aligned
787
+ - Odd pages: chapter title, right-aligned
788
+ - Chapter first page: no header
789
+ - Page numbers: bottom outside
790
+
791
+ ## Front Matter (in order)
792
+ Half-title → Title → Copyright → Dedication → How to Use → TOC → blank if needed
793
+
794
+ ## Chapter Layout
795
+ - Each chapter: new page (PageBreak before heading)
796
+ - Body: justified, first paragraph no indent, subsequent paragraphs 360 DXA indent
797
+ - Section headings: bold, left-aligned, 240 DXA space above
798
+
799
+ ## Validation
800
+ ```bash
801
+ python scripts/office/validate.py manuscript.docx
802
+ ```
803
+ If fails: unpack → fix XML → repack.
804
+
805
+ ---
806
+ ---
807
+
808
+ # STYLE OVERRIDE
809
+
810
+ If user uploads a new sample and says "match this style instead":
811
+ 1. Read sample (minimum 3,000 words)
812
+ 2. Extract style DNA using the 13-point framework from Phase 6B-DNA
813
+ 3. Flag: "Style overridden for this session. Using [book title] as reference."
814
+ Vivid's embedded DNA remains the permanent default for new sessions.
815
+
816
+ ---
817
+
818
+ # ERROR HANDLING
819
+
820
+ | Situation | Action |
821
+ |---|---|
822
+ | Concept too vague | Run Phase 1 clarifying questions before proceeding |
823
+ | validate_concept.py below 80% | Fix required fields before Phase 2 |
824
+ | Skipped questionnaire answers | Use defaults, flag at top of affected chapters |
825
+ | Chapter audit REVISE verdict | Return to Phase 6B — do NOT humanize a failing chapter |
826
+ | Chapter over/under word count | Flag → ask: expand / trim / proceed as-is |
827
+ | conflict_check.py finds conflicts | Surface with resolution options — do NOT auto-resolve |
828
+ | kdp_check.py fails | Fix reported issues before delivering |
829
+ | User skips a phase | Proceed from current state, flag gap and downstream impact |
830
+ | Style override sample under 3,000 words | Ask for more text — sample too short for reliable extraction |
831
+
832
+ ---
833
+
834
+ # QUICK REFERENCE
835
+
836
+ ```
837
+ PHASE 1 Concept Expander — seed → concept doc → validate_concept.py
838
+ PHASE 2 Structure Options — 3 proposals → user picks
839
+ PHASE 3 Intake Questionnaire — 26 questions → all decisions locked
840
+ PHASE 4 Research Aggregator — concept + TOC → bank → bank_formatter.py --validate
841
+ PHASE 5 Table of Contents — TOC → user approves → toc_extract.py
842
+ PHASE 6A Continuity Brief — log_manager.py show + conflict_check.py
843
+ PHASE 6B Chapter Writer — Guided or Autonomous + Style DNA
844
+ PHASE 6C Chapter Auditor — dna_scan + scan_ai_patterns + score_report
845
+ PHASE 6D Humanizer Pass — protect DNA → strip 25 patterns → rewrite → self-audit
846
+ PHASE 6E Log Update — log_manager + word_count + conflict_check
847
+ PHASE 7 KDP DOCX Output — kdp_check → format → validate → deliver
848
+ ```