Skip to content

docs(best-practices): add anti-patterns reference - #9096

Open
MghongoDev wants to merge 1 commit into
Flagsmith:mainfrom
MghongoDev:docs/common-anti-patterns
Open

MghongoDev wants to merge 1 commit into
Flagsmith:mainfrom
MghongoDev:docs/common-anti-patterns

Conversation

@MghongoDev

Copy link
Copy Markdown

Fixes #7509

Adds a reference page for the eight anti-patterns listed in the issue. Each entry names the problem and gives an alternative, with links to existing Flagsmith documentation.

Checks: Prettier passes on the new page. All seven internal links resolve to files in docs/docs. The full Docusaurus build was not run locally.

@MghongoDev
MghongoDev requested a review from a team as a code owner November 24, 2026 20:45
@MghongoDev
MghongoDev requested review from bakirFS and removed request for a team November 24, 2026 20:45
@vercel

vercel Bot commented Nov 24, 2026

Copy link
Copy Markdown

@MghongoDev is attempting to deploy a commit to the Flagsmith Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions github-actions Bot added the docs Documentation updates label Nov 24, 2026

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

3 issues found across 1 file

Confidence score: 4/5

  • In common-anti-patterns.md, the real-time flag update recommendation omits that this requires an Enterprise subscription. State the plan requirement so readers can assess availability.
  • In common-anti-patterns.md, the Change Requests recommendation omits that this feature is available only on Scale-Up and Enterprise plans. Name the eligible plans.
  • In common-anti-patterns.md, long dependency chains are described as an anti-pattern without noting that dependency nesting is limited to one level. State the actual limit.
Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="docs/docs/best-practices/common-anti-patterns.md">

<violation number="1" location="docs/docs/best-practices/common-anti-patterns.md:19">
P2: Real-time flag updates require an Enterprise subscription, but this recommendation omits that restriction. State the plan requirement so readers do not plan around an unavailable feature.</violation>

<violation number="2" location="docs/docs/best-practices/common-anti-patterns.md:24">
P2: This describes long dependency chains as a Flagsmith anti-pattern, but Flagsmith limits dependency nesting to one level. State the actual limit so readers do not look for unsupported configurations.</violation>

<violation number="3" location="docs/docs/best-practices/common-anti-patterns.md:77">
P2: Change Requests are available only on Scale-Up and Enterprise plans, but this recommendation omits that restriction. Name the required plans so readers know whether they can enable this workflow.</violation>
</file>

Reply to a comment to ask cubic a question or push back. It learns from your replies.

Re-trigger cubic

Teams often add real-time updates first and write that code later.

Fetch flags when the session starts. That is enough for most applications. If a feature needs updates during a session,
use [real-time flags](/performance/real-time-flags) and plan for the refetch logic. Internal dashboards, kiosks,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: Real-time flag updates require an Enterprise subscription, but this recommendation omits that restriction. State the plan requirement so readers do not plan around an unavailable feature.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At docs/docs/best-practices/common-anti-patterns.md, line 19:

<comment>Real-time flag updates require an Enterprise subscription, but this recommendation omits that restriction. State the plan requirement so readers do not plan around an unavailable feature.</comment>

<file context>
@@ -0,0 +1,78 @@
+Teams often add real-time updates first and write that code later.
+
+Fetch flags when the session starts. That is enough for most applications. If a feature needs updates during a session,
+use [real-time flags](/performance/real-time-flags) and plan for the refetch logic. Internal dashboards, kiosks,
+monitoring screens, and emergency kill switches justify the extra code.
+
</file context>
Suggested change
use [real-time flags](/performance/real-time-flags) and plan for the refetch logic. Internal dashboards, kiosks,
+use [real-time flags](/performance/real-time-flags), available with an Enterprise subscription, and plan for the refetch logic. Internal dashboards, kiosks,

Comment on lines +77 to +78
Enable [Change Requests](/administration-and-security/governance-and-compliance/change-requests) for production
environments. Reviewers see the exact change before it goes live. Keep direct edits for development environments.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: Change Requests are available only on Scale-Up and Enterprise plans, but this recommendation omits that restriction. Name the required plans so readers know whether they can enable this workflow.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At docs/docs/best-practices/common-anti-patterns.md, line 77:

<comment>Change Requests are available only on Scale-Up and Enterprise plans, but this recommendation omits that restriction. Name the required plans so readers know whether they can enable this workflow.</comment>

<file context>
@@ -0,0 +1,78 @@
+One person can turn on a flag in production and change what every user sees. No second check stands between the click
+and the release.
+
+Enable [Change Requests](/administration-and-security/governance-and-compliance/change-requests) for production
+environments. Reviewers see the exact change before it goes live. Keep direct edits for development environments.
</file context>
Suggested change
Enable [Change Requests](/administration-and-security/governance-and-compliance/change-requests) for production
environments. Reviewers see the exact change before it goes live. Keep direct edits for development environments.
+Enable [Change Requests](/administration-and-security/governance-and-compliance/change-requests) (available on Scale-Up and Enterprise plans) for production
environments. Reviewers see the exact change before it goes live. Keep direct edits for development environments.

Comment on lines +24 to +25
Flagsmith supports [flag dependencies](/managing-flags/flag-dependencies), so one flag can depend on another. A long
chain is hard to reason about. Each extra link adds a state you have to simulate before you know what a user will see. A

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: This describes long dependency chains as a Flagsmith anti-pattern, but Flagsmith limits dependency nesting to one level. State the actual limit so readers do not look for unsupported configurations.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At docs/docs/best-practices/common-anti-patterns.md, line 24:

<comment>This describes long dependency chains as a Flagsmith anti-pattern, but Flagsmith limits dependency nesting to one level. State the actual limit so readers do not look for unsupported configurations.</comment>

<file context>
@@ -0,0 +1,78 @@
+
+## Chaining flags
+
+Flagsmith supports [flag dependencies](/managing-flags/flag-dependencies), so one flag can depend on another. A long
+chain is hard to reason about. Each extra link adds a state you have to simulate before you know what a user will see. A
+broken prerequisite can also turn off a feature that looks unrelated.
</file context>
Suggested change
Flagsmith supports [flag dependencies](/managing-flags/flag-dependencies), so one flag can depend on another. A long
chain is hard to reason about. Each extra link adds a state you have to simulate before you know what a user will see. A
Flagsmith supports [flag dependencies](/managing-flags/flag-dependencies), but nesting is limited to one level. Even
one prerequisite adds a state you must simulate before you know what a user will see. A

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Documentation updates

Projects

None yet

Development

Successfully merging this pull request may close these issues.

docs: Common anti-patterns page

1 participant