# Template Pipeline Migration (2026-02)

**Last Updated:** 2026-02-23

Migration notes for the Template Content Blocks & FAQs Process Improvement. New phase gates, section briefs, overlap checks, and validation scripts were added. Existing templates may need updates to pass the new validators.

## New Scripts

| Script | Purpose |
|--------|---------|
| `validate-template-improvement-readiness.php` | Phase gate: data files, SERP_ANALYSIS.md, CONTENT_OUTLINE.md, freshness |
| `validate-template-content-outline-quality.php` | Outline target ≥80% of competitive-depth, block count 4–7, PAA coverage |
| `generate-template-section-briefs.php` | Per-block key points, target words, formats, PAA assignments |
| `check-template-outline-block-overlap.php` | Detect overlapping blocks (similarity ≥0.65) |
| `validate-template-content-completeness.php` | PAA coverage, gaps, formats, definition in first 20% |
| `check-template-block-faq-overlap.php` | FAQs must not duplicate block headings |
| `generate-template-pre-content-checklist.php` | PRE_CONTENT_CHECKLIST.md before content creation |
| `collect-template-supplemental-faq-questions.php` | When FAQ count < 8, gather from competitors/PAA |
| `analyze-template-keyword-overlap.php --use-sistrix` | **Keyword overlap check (SISTRIX)** – run before publishing new templates in same category. Detects cannibalization. See [TEMPLATE_CANNIBALIZATION_GUIDE.md](TEMPLATE_CANNIBALIZATION_GUIDE.md). |

## Validator Audit (2026-02-23)

| Template | validate-improvement-readiness | Fix Required |
|----------|-------------------------------|--------------|
| abwesenheitsnotiz-vorlage | PASS | Full pipeline completed (2026-02-23). Content blocks, FAQs, published. |
| stundenzettel-excel-vorlage | PASS | SERP_ANALYSIS.md created and manual sections completed (2026-02-18). |
| stellenbeschreibung-vorlage, lohnabrechnung-vorlage | PASS | Full pipeline completed (2026-02-23). Content blocks, FAQs, CTA, publication checklist. |
| dienstplan-excel-vorlage | FAIL | SERP_ANALYSIS.md has unchecked placeholders. Complete Featured Snippet, PAA, Ranking Factors, Recommendations. |
| schichtplan-excel-vorlage | FAIL | SERP_ANALYSIS.md has unchecked placeholders. Complete Featured Snippet, PAA, Ranking Factors, Recommendations. |

## Migration Path

### For stundenzettel-excel-vorlage

1. Run `php v2/scripts/templates/generate-template-serp-skeleton.php --template=stundenzettel-excel-vorlage`
2. Complete manual SERP review per [SERP_REVIEW_CHECKLIST.md](_templates/SERP_REVIEW_CHECKLIST.md) (min 30 min)
3. Fill SERP_ANALYSIS.md manual sections
4. Re-run `validate-template-improvement-readiness.php`

### For dienstplan-excel-vorlage and schichtplan-excel-vorlage

1. Open SERP_ANALYSIS.md
2. Complete unchecked items: Featured Snippet, PAA, Ranking Factors, Recommendations
3. Re-run `validate-template-improvement-readiness.php`

### Bypass for Legacy Workflows

Use `--skip-gate` with the pipeline to bypass phase gate validation:

```bash
php v2/scripts/templates/run-template-improvement-pipeline.php --template=ID --skip-gate
```

Or run `validate-template-improvement-readiness.php` with `--skip-outline-quality` if outline quality checks are not applicable.

## Pipeline Phase Order (Updated)

1. **Phase 1:** Data collection
2. **Phase 2:** SERP skeleton, content outline, section briefs
3. **Phase 3:** Phase gate (validate, overlap check, pre-content checklist) – skip with `--skip-gate`
4. **Phase 4:** Content blocks generation, validate-content-blocks, validate-content-completeness
5. **Phase 5:** FAQ workflow (questions, answers, block-FAQ overlap check, add, validate)

## References

- [TEMPLATE_SYSTEM_OVERVIEW.md](TEMPLATE_SYSTEM_OVERVIEW.md) — Production model (8 published)
- [TEMPLATE_CANNIBALIZATION_GUIDE.md](TEMPLATE_CANNIBALIZATION_GUIDE.md)
- [TEMPLATE_CONTENT_WORKFLOW.md](TEMPLATE_CONTENT_WORKFLOW.md)
- [TEMPLATE_CONTENT_CREATION_WORKFLOW.md](TEMPLATE_CONTENT_CREATION_WORKFLOW.md)
- [TEMPLATE_SERP_ANALYSIS_WORKFLOW.md](TEMPLATE_SERP_ANALYSIS_WORKFLOW.md)
