docs: add feature flag contributor guide for gating new features#1149
docs: add feature flag contributor guide for gating new features#1149
Conversation
Contributors had no clear path from "all features must be flag-gated" (ADR-0007) to the concrete steps needed. This adds a step-by-step walkthrough and surfaces it where contributors actually look. Made-with: Cursor
📝 WalkthroughWalkthroughPR adds comprehensive feature flag documentation and establishes requirements for gating new user-facing features behind flags. Includes a detailed step-by-step guide for developers, architecture references, and updates contributing guidelines to mandate feature flag usage. Changes
🚥 Pre-merge checks | ✅ 6✅ Passed checks (6 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
✨ Simplify code
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@docs/internal/developer/adding-a-feature.md`:
- Line 32: The docs reference a non-existent Make target deploy-unleash-kind;
either add a Makefile target named deploy-unleash-kind that runs the appropriate
Kind deployment steps to apply the manifests under
components/manifests/base/core (including flags.json and models.json), or update
the documentation to point to the actual existing Make target that performs the
same Kind deployment. Modify the Makefile to include a deploy-unleash-kind
recipe that executes the cluster creation/apply sequence for the Unleash
manifests, or change the doc line referencing deploy-unleash-kind to the correct
target name and include any required flags/notes to deploy to a Kind cluster.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 5730ce82-eb0d-4598-b73a-bc8f5eed5c16
📒 Files selected for processing (4)
BOOKMARKS.mdCONTRIBUTING.mddocs/internal/developer/README.mddocs/internal/developer/adding-a-feature.md
|
|
||
| ### General / runner flags | ||
|
|
||
| Add an entry to `components/manifests/base/core/flags.json`: |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Verify manifest files and Make targets exist
# Check flags.json
if [[ -f "components/manifests/base/core/flags.json" ]]; then
echo "✓ components/manifests/base/core/flags.json exists"
else
echo "✗ components/manifests/base/core/flags.json NOT FOUND"
fi
# Check models.json
if [[ -f "components/manifests/base/core/models.json" ]]; then
echo "✓ components/manifests/base/core/models.json exists"
else
echo "✗ components/manifests/base/core/models.json NOT FOUND"
fi
# Check Make targets
if grep -q "^deploy-unleash-kind:" Makefile; then
echo "✓ Make target 'deploy-unleash-kind' found"
else
echo "✗ Make target 'deploy-unleash-kind' NOT FOUND"
fi
if grep -q "^unleash-port-forward:" Makefile; then
echo "✓ Make target 'unleash-port-forward' found"
else
echo "✗ Make target 'unleash-port-forward' NOT FOUND"
fiRepository: ambient-code/platform
Length of output: 256
🏁 Script executed:
cat -n docs/internal/developer/adding-a-feature.md | sed -n '25,65p'Repository: ambient-code/platform
Length of output: 1663
🏁 Script executed:
grep -n "deploy-unleash-kind\|unleash-port-forward" docs/internal/developer/adding-a-feature.mdRepository: ambient-code/platform
Length of output: 195
🏁 Script executed:
cat -n docs/internal/developer/adding-a-feature.md | sed -n '150,165p'Repository: ambient-code/platform
Length of output: 671
make deploy-unleash-kind target missing.
The guide references make deploy-unleash-kind at line 158 to deploy Unleash to a Kind cluster, but this Make target does not exist. The manifest files referenced (components/manifests/base/core/flags.json and models.json) are correct and present. Add the missing Make target or update the documentation with the correct deployment command.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@docs/internal/developer/adding-a-feature.md` at line 32, The docs reference a
non-existent Make target deploy-unleash-kind; either add a Makefile target named
deploy-unleash-kind that runs the appropriate Kind deployment steps to apply the
manifests under components/manifests/base/core (including flags.json and
models.json), or update the documentation to point to the actual existing Make
target that performs the same Kind deployment. Modify the Makefile to include a
deploy-unleash-kind recipe that executes the cluster creation/apply sequence for
the Unleash manifests, or change the doc line referencing deploy-unleash-kind to
the correct target name and include any required flags/notes to deploy to a Kind
cluster.
Summary
docs/internal/developer/adding-a-feature.md— a step-by-step walkthrough for contributors to gate new features behind feature flags (naming, registration inflags.json, backend/frontend gating, visibility choice, and testing)CONTRIBUTING.mdin both the "Make Your Changes" workflow and the "Before Submitting" PR checklistdocs/internal/developer/README.mdalongside the existing feature-flags docs and ADR-0007BOOKMARKS.mdfor discoverabilityCloses the gap between ADR-0007's mandate ("all new features must be flag-gated") and the contributor-facing docs, which previously never mentioned feature flags.
Test plan
flags.jsonpath referenced in the guide matches the actual file locationhandlers/featureflags.goand@/lib/feature-flagsAPIsMade with Cursor
Summary by CodeRabbit