Verification and gates
Tier 4 Quality has two verifications planted in it: the per-chapter AI-smell gate and continuity verification. Both have to pass for a chapter to be marked finished. This section covers what each verification looks at, and the security baseline underneath.
The per-chapter AI-smell gate
Section titled “The per-chapter AI-smell gate”ai-pattern-check is applied to every chapter. It scores each chapter 0–100, where lower is better. Pass is 0–29, warning is 30–60, and fail is 61 or higher. On a fail it blocks the chapter and sends a concrete rewrite request back to writing-agent. It’s the gate proven in blog-studio, adapted to the book context, so it looks at longer paragraphs and scene continuity together.
What the 14 categories catch:
| Category | What it catches |
|---|---|
| 1 Template phrases | ”to summarize,” “the key is,” “dear reader” |
| 2 List patterns | ”First, Second, Third” boilerplate |
| 3 Overuse of “AI” as the subject | ”I asked the AI” repeated |
| 4 English filler patterns | ”Firstly,” “In summary,” “It’s important to” |
| 5 Ending / next-chapter teasers | meta-text like “continued in the next chapter” |
| 6 Structural uniformity | all sections and paragraphs nearly the same length |
| 7 Deterministic connectives | ”moreover,” “thus,” “in other words” overused |
| 8 AI conclusion formulas | ”it amounts to ~,” “lies in ~“ |
| 9 Abstract-adjective overuse | ”various,” “powerful,” “flexible” |
| 10 Translationese / AI translation tone | ”through this,” “the said ~,” em-dash joins |
| 11 Noun-ending overuse | sentences ending in bare nouns like ”~ required,” ”~ possible” |
| 12 Thin “stuck” narration | ”it was hard,” “overwhelming” with no concrete situation |
| 13 Missing opening rhythm | the first paragraph opens with a result or conclusion |
| 14 Missing experience signature | no concrete numbers, no failure anecdote, no emotion |
Category 13 (opening rhythm) and category 14 (experience signature) carry the biggest penalties. When there are no concrete numbers or failure stories that only this person could have written, the score climbs sharply. Category 6 (structural uniformity) fires when every section length lands within ±20% or paragraphs are all 3–5 lines. The scoring intensity differs by book type: strict for practical and essay, medium for technical, and looser for fiction, where it follows the narrator or character voice. The exact penalty rules live in the ai-pattern-check skill.
Continuity verification
Section titled “Continuity verification”continuity-check uses consistency_index.json. Character appearance, world rules, and timeline events are extracted into this index and cross-checked at each new chapter. It’s the spot that verifies against facts planted in a file rather than the AI’s memory.
“A character with blue eyes in Chapter 3 can’t turn brown in Chapter 12” is the promise. When a chapter contradicts the index, it’s recorded in the per-chapter chapters/ch{NN}_continuity.md, and quality-agent folds it into ch{NN}_review.md for writing-agent to fix. Even when the context grows long and the AI forgets earlier chapters, the index holds the setup, so the contradiction gets caught. It’s the heaviest verification in fiction, and practical and technical books use the same index for fact or terminology consistency.
No auto-publishing
Section titled “No auto-publishing”Chapters that pass verification stay as per-chapter chapters/ch{NN}_draft.md files. Combining them into a single file is not an automated step in the pipeline; the user gathers them by hand. It does not upload to an external platform automatically either (S8). Publishing is done by the user. This spot is covered in manuscript.
Security baseline S1–S8
Section titled “Security baseline S1–S8”Eight lines planted in AI_AUTOMATION.md.
| Code | Rule | Enforced at |
|---|---|---|
| S1 | Secrets (API keys) only in .env. .env.* not git-tracked | .gitignore |
| S2 | No modifying or deleting files outside _workspace/. No cross-modification between book folders | agent definitions |
| S3 | Back up to .bak or .v1 before overwriting an output | writing-agent |
| S4 | External search (research) and illustration (illustration) only on user approval or when the type requires it | research, illustration |
| S5 | Per-chapter commit. One chapter is one commit (or a chapter + AI-check bundle) | user convention |
| S6 | Auto-detect real names, phone numbers, real addresses and recommend masking. No automatic masking | quality-agent |
| S7 | API keys and tokens are never planted in plaintext in bodies, logs, or outputs | all agents |
| S8 | No auto-publishing. Assembly and submission are done by the user | all agents |
S5 is the spot that plants per-chapter commit as a convention. A version is kept per chapter, so rollback is clean at the chapter level. S8 is the heaviest spot in the book domain: the AI doesn’t put a finished manuscript out to an external platform on its own.
The next section is manuscript. It covers how the per-chapter review reports pile up, why assembly isn’t automated, and what to check when you gather the chapters yourself.