From superpowers-plus
Detects duplicated sections, structural defects, and topic drift in a single wiki page using Jaccard similarity and heading-integrity checks. Runs as advisory gate in wiki-orchestrator pipeline; HIGH severity findings block publish until reviewed.
How this skill is triggered — by the user, by Claude, or both
Slash command
/superpowers-plus:wiki-content-coherenceThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Detect duplication and structural drift in a single wiki page. Stage 2.5 in
Detect duplication and structural drift in a single wiki page. Stage 2.5 in
wiki-orchestrator (between content generation and link verification).
Advisory gate; HIGH severity → user review before publish.
check wiki page coherence, refactor wiki page, deduplicate wiki content, audit wiki page structure, wiki:coherence-checkwiki-orchestrator; HIGH severity findings block publish until reviewedwiki-refactor · Fact accuracy → wiki-verifySingle page only. Skip pages <500 words. Abort >10,000 words.
tools/wiki-read.sh get "$PAGE_ID" | jq -r '.text' > page.md
# Split on H2/H3; keep sections ≥50 words
Tokenize each section → drop stop-words → drop tokens <4 chars → take top 8 by
frequency → compare all pairs: J = |A ∩ B| / |A ∪ B|.
| Jaccard | Severity | Action |
|---|---|---|
| ≥ 0.80 | HIGH | Consolidate into a single section |
| 0.60–0.79 | MEDIUM | Merge unique details or differentiate |
| 0.40–0.59 | LOW | Log only |
| Check | Flag when |
|---|---|
| Heading nesting | H2 → H4 jump (H3 skipped) |
| Orphaned section | H3 appears before any H2 |
| Length anomaly | Section >5× median or <20 words |
| Topic drift | Heading-fingerprint vs body Jaccard <0.15 |
## Coherence Report — <title>
| # | Section A | Section B | Jaccard | Severity |
|---|-----------|-----------|---------|----------|
| 1 | Overview | Summary | 0.85 | HIGH |
Structural: 1 heading skip (H2→H4), 1 length anomaly
Gate: HIGH finding → user review required
HIGH → halt pipeline, present report, wait for user. Otherwise log and continue.
| Failure | Fix |
|---|---|
| Threshold too low, misses near-duplicates | Tune: 0.40 LOW · 0.60 MEDIUM · 0.80 HIGH |
| False positive on intentional repetition | Whitelist repeat-by-design sections (warnings, license blocks) |
| Structural defects missed by Jaccard | Pair with manual review for layout/flow |
| "All duplicates are intentional" | If two sections say the same, readers are confused |
wiki-orchestrator (Stage 2.5) · link-verification (Stage 3) · wiki-debunker
npx claudepluginhub bordenet/superpowers-plus --plugin superpowers-plusGuides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.