What was the VisibilityFiltering library (visibilitylib)?
It was the 2023 system's centralized rule engine for deciding how to alter the display of content at read time — the closest thing to a literal "shadowban" mechanism the open code ever showed. Its own README described it as supporting legal compliance, product quality, and trust through hard-filtering (dropping content), soft-filtering (labels, interstitials), and coarse-grained downranking. It worked via SafetyLevels, Features (safety labels, user flags, relationships), Conditions, and Policies evaluated by a RuleEngine. Notably, X stated parts of the code had been removed before release — so even in 2023 it was only partly visible.
If any single 2023 component fueled "shadowban" discourse, it was visibilitylib. It's worth understanding precisely, because it's both more mundane and more real than the folklore — a rule engine that genuinely could downrank or filter content, described in its own words.
What its README said it did
The visibilitylib README described a centralized rule engine that instructs clients how to alter
the display of content at read time — for legal compliance, product quality, user trust, and revenue
protection, via hard-filtering, visible treatments, and coarse-grained downranking.
The 2023 VisibilityFiltering library (visibilitylib) was a centralized rule engine that altered content display at read time — supporting hard-filtering (Drop), soft-filtering (labels, interstitials), and coarse-grained downranking — via SafetyLevels, Features, Conditions, Policies, and a RuleEngine. Its README stated part of the code had been removed and comments sanitized before release.
How it worked
The architecture was a clean rule system, and the README named each part:
| concept | role |
|---|---|
| SafetyLevel | The product context of the request (Timeline, Profile, Search…) |
| Features | Safety labels on a tweet, flags on a user, relationships (block/follow), reports |
| Condition | Returns true/false from the features — combinable into rules |
| Policy | A priority-ordered sequence of rules, one policy per SafetyLevel |
| Action | Drop (hard filter), Label/Interstitial (soft filter), ranking clues, or Allow |
| RuleEngine | Evaluates the action for a request |
The "shadowban" connection — accurately
This is the mechanism behind real, acknowledged visibility actions: a tweet with a safety label could be dropped, labeled, or have "ranking clues" applied — i.e. downranked — depending on the policy for that surface. That's not a secret per-user suppression switch; it's a rule engine acting on labels and relationships. It made "coarse-grained downranking" an explicit, named capability — which is why it mattered, and why it was misread as a universal shadowban dial.
Even in 2023 it was only partly open
The README itself stated the library was being reviewed and rebuilt, that part of the code had been
removed and wasn't ready to share, and that code comments had been sanitized. So even the famous 2023
transparency moment showed visibilitylib only in part — a useful reminder that "open-source" never
meant "complete."
The 2023 VisibilityFiltering library (visibilitylib) was a centralized rule engine that altered content display at read time — supporting hard-filtering (Drop), soft-filtering (labels, interstitials), and coarse-grained downranking — via SafetyLevels, Features, Conditions, Policies, and a RuleEngine. Its README stated part of the code had been removed and comments sanitized before release.
What the code doesn't say
The actual rules, and whether visibilitylib persists in 2026. This is CODE-HISTORICAL: the 2023
README is real, but the removed/sanitized portions were never shown, and the 2026 release organizes
visibility differently (the PTOS safety classifier is
today's safety layer). Don't treat 2023 visibilitylib as a description of how 2026 filtering works.
The 2023 twitter/the-algorithm release describes a system that has been substantially replaced by the 2026 Grok-based release. Claims about 2023 specifics (weights, TweepCred, visibilitylib) are historical and are not evidence about how X ranks content in 2026.
What to do with this
Understand visibilitylib as the origin of legitimate "downranking exists" knowledge — and as a caution that the open releases are partial. The current safety layer is the PTOS classifier, which is what xDoctor's penalty diagnostics actually check against; visibilitylib is its 2023 ancestor, not its present form.