Skip to content Aller au contenu

Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

rhythm.consecutive-long-sentences

What it flags

Streaks of long sentences within the same paragraph. An isolated long sentence is manageable; several in a row fatigue attention even when each individual sentence is under the structure.sentence-too-long ceiling. This rule catches the rhythm.

At a glance

Categoryrhythm
Default severitywarning
Default weight1
LanguagesEN · FR (identical detection)
Sourcesrc/rules/consecutive_long_sentences.rs

Detection

Walk sentences sequentially inside each paragraph. Maintain a running count of consecutive sentences above word_threshold. Fire once per streak that reaches max_consecutive.

Parameters

KeyTypedev-docpublicfalc
word_thresholdint201510
max_consecutiveint322

Relation to structure.sentence-too-long

Both rules look at sentence length but catch different problems:

RuleThreshold (dev-doc / public / falc)Fires on
structure.sentence-too-longmax_words 30 / 22 / 15a single sentence past the ceiling
rhythm.consecutive-long-sentencesword_threshold 20 / 15 / 10a streak of max_consecutive sentences each above the lower threshold

Because word_threshold sits below max_words, this rule catches the rhythm even when no individual sentence trips sentence-too-long. The invariant word_threshold < max_words (per profile) keeps the two from co-firing on the same sentence.

Examples

Five ideas, colour-matched across the rewrite — only the rhythm changes. lucid-lint reports; the rewrite is always yours.

English

Before (flagged):

The migration introduced a caching layer that sits in front of every read from the primary database. The team observed unexpected latency spikes whenever the cache invalidated under sustained write load. A subsequent investigation traced the regression to a thundering-herd pattern that fired on every cold key. The metrics dashboard misreported the issue as a generic timeout because the trace propagation was incomplete. The fix coalesced concurrent fills, added jittered TTLs, and instrumented the cache layer with a dedicated span emitter.

Five sentences, each over 20 words — the streak fatigues attention.

What lucid-lint check --profile dev-doc reports:

warning input.md:1:1 5 consecutive sentences exceed 20 words (max 3). Vary sentence length or split the streak. [rhythm.consecutive-long-sentences]

After (your rewrite):

The migration introduced a caching layer in front of the primary database. Latency spiked whenever the cache invalidated under heavy writes. The cause was a thundering-herd pattern on cold keys. Metrics misreported it as a generic timeout — trace propagation was broken. The fix coalesced concurrent fills, added jittered TTLs, and emitted a dedicated span.

French

Before (flagged):

La migration a introduit une couche de cache qui se place devant chaque lecture de la base primaire. L’équipe a observé des pics de latence inattendus chaque fois que le cache s’invalidait sous une charge d’écriture soutenue. Une enquête ultérieure a relié la régression à un motif de troupeau tonnant qui se déclenchait sur chaque clé froide. Le tableau de bord des métriques signalait à tort un délai d’attente générique parce que la propagation de la trace était incomplète. Le correctif a fusionné les remplissages concurrents, ajouté un TTL avec gigue, et instrumenté la couche de cache avec un émetteur de span dédié.

What lucid-lint check --profile dev-doc reports:

warning input.md:1:1 5 consecutive sentences exceed 20 words (max 3). Vary sentence length or split the streak. [rhythm.consecutive-long-sentences]

After (your rewrite):

La migration a introduit une couche de cache devant la base primaire. La latence montait dès que le cache s’invalidait sous écritures soutenues. Le coupable : un troupeau tonnant sur les clés froides. Les métriques signalaient un délai générique — la trace était cassée. Le correctif fusionne les remplissages, ajoute un TTL avec gigue et émet un span dédié.

Suppression

See Suppressing diagnostics for the inline and block forms.

See also

  • structure.sentence-too-long — catches individual long sentences; this rule catches the streak even when each sentence is under that ceiling.
  • Scoring modelrhythm.consecutive-long-sentences carries the default weight 1; the cognitive cost is the cumulative streak, not any single sentence.

References

See References for the full bibliography.