Uh oh!
There was an error while loading. Please reload this page.
[luv-61] docs: rename custom-hooks to custom-policies, update Dockerfile for hot reload - #61
Conversation
The docs URL /custom-hooks now serves as /custom-policies to match the product terminology. Updates all cross-references, navigation, page title, and user-facing text. Source code filenames unchanged. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sets up .luv/ configuration so `luv <repo>` starts two services: - dev-environment: Node 22 + Bun + git + gh + Docker CLI + Claude Code - docs: Mintlify dev server with hot reload on port 3000 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 3 minutes and 26 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📝 WalkthroughWalkthroughThe PR renames the user-extensibility concept from "custom hooks" to "custom policies" across all documentation files, including architecture guides, CLI references, configuration docs, and navigation structures. A Dockerfile working directory change redirects from Changes
Possibly related PRs
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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
🧹 Nitpick comments (3)
docs/architecture.mdx (1)
223-223: Consider clarifying the global scope of deny short-circuits.The statement "A custom policy
denystill short-circuits further custom policies" is technically correct (since builtins have already run, only custom policies remain), but it could mislead readers about the short-circuit mechanism. The phrase "further custom policies" might be read as "only custom policies," when in fact anydenyglobally short-circuits all remaining policies in the evaluation loop.The wording in
docs/custom-policies.mdxline 127 is clearer: "The firstdenyshort-circuits all subsequent policies."📝 Suggested rewording for clarity
-Custom policies are evaluated after all built-in policies. A custom policy `deny` still short-circuits further custom policies (but all built-ins have already run by that point).+Custom policies are evaluated after all built-in policies. A `deny` from a custom policy short-circuits all remaining policies (though by that point, all built-ins have already run).This makes it clear that the short-circuit is global, while preserving the important detail that builtins have already executed.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/architecture.mdx` at line 223, Rephrase the sentence about deny short-circuits to make the global effect explicit: replace "A custom policy `deny` still short-circuits further custom policies (but all built-ins have already run by that point)" with a clearer line such as "The first `deny` short-circuits all subsequent policies; built-in policies run before custom policies, so a `deny` emitted by a custom policy will stop any remaining policy evaluations." Reference the existing phrasing "custom policy `deny`" and the clearer wording in docs/custom-policies.mdx around the phrase "The first `deny` short-circuits all subsequent policies" when applying this change..luv/Dockerfile.dev (1)
13-20: Add--no-install-recommendsto theghanddocker-ce-cliinstalls.This keeps the dev image leaner and reduces unnecessary package surface.
Suggested patch
RUN install -m 0755 -d /etc/apt/keyrings && \ @@ - apt-get update -qq && apt-get install -y -qq gh && \+ apt-get update -qq && apt-get install -y -qq --no-install-recommends gh && \ rm -rf /var/lib/apt/* @@ RUN curl -fsSL https://download.docker.com/linux/debian/gpg \ @@ - apt-get update -qq && apt-get install -y -qq docker-ce-cli && \+ apt-get update -qq && apt-get install -y -qq --no-install-recommends docker-ce-cli && \ rm -rf /var/lib/apt/lists/*🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.luv/Dockerfile.dev around lines 13 - 20, The RUN step that installs system packages currently calls "apt-get install -y -qq gh" (and elsewhere installs "docker-ce-cli") without using --no-install-recommends; update the apt-get install commands in the RUN block that contains the curl/echo/apt-get sequence to add --no-install-recommends (e.g., change apt-get install -y -qq gh and apt-get install -y -qq docker-ce-cli to include --no-install-recommends) so the dev image excludes recommended packages and stays lean..luv/docker-compose.yml (1)
8-12: Make privileged runtime settings opt-in using Docker Compose profiles.The
dev-environmentservice currently hasdocker.sockaccess andhostnetwork mode enabled by default, which increases host exposure and reduces portability for users who don't need Docker-in-Docker capabilities. Move these into a separate profile (e.g.,profiles: ["dind"]) so they're only enabled when explicitly requested, keeping the default development experience safer and more portable.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.luv/docker-compose.yml around lines 8 - 12, Update the dev-environment service to make privileged settings opt-in by moving the docker socket volume mount ("/var/run/docker.sock:/var/run/docker.sock") and network_mode: host into a Docker Compose profile; add profiles: ["dind"] to the dev-environment service and indent the volume and network_mode entries under that profile so they are only applied when the "dind" profile is enabled, leaving the default service configuration unchanged for safer, more portable development.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.luv/Dockerfile.docs:
- Around line 1-8: The Dockerfile runs the docs server as root; create and
switch to a non-root user and ensure /app/docs is owned by that user before
switching. Add steps after WORKDIR to create a user (e.g., "docs" or
"mintlify"), chown the WORKDIR so bind mounts and generated files aren’t
root-owned, and then use USER to run the remaining commands (so CMD ["mintlify",
"dev", "--host", "0.0.0.0"] executes as the non-root user).
---
Nitpick comments:
In @.luv/docker-compose.yml:
- Around line 8-12: Update the dev-environment service to make privileged
settings opt-in by moving the docker socket volume mount
("/var/run/docker.sock:/var/run/docker.sock") and network_mode: host into a
Docker Compose profile; add profiles: ["dind"] to the dev-environment service
and indent the volume and network_mode entries under that profile so they are
only applied when the "dind" profile is enabled, leaving the default service
configuration unchanged for safer, more portable development.
In @.luv/Dockerfile.dev:
- Around line 13-20: The RUN step that installs system packages currently calls
"apt-get install -y -qq gh" (and elsewhere installs "docker-ce-cli") without
using --no-install-recommends; update the apt-get install commands in the RUN
block that contains the curl/echo/apt-get sequence to add
--no-install-recommends (e.g., change apt-get install -y -qq gh and apt-get
install -y -qq docker-ce-cli to include --no-install-recommends) so the dev
image excludes recommended packages and stays lean.
In `@docs/architecture.mdx`:
- Line 223: Rephrase the sentence about deny short-circuits to make the global
effect explicit: replace "A custom policy `deny` still short-circuits further
custom policies (but all built-ins have already run by that point)" with a
clearer line such as "The first `deny` short-circuits all subsequent policies;
built-in policies run before custom policies, so a `deny` emitted by a custom
policy will stop any remaining policy evaluations." Reference the existing
phrasing "custom policy `deny`" and the clearer wording in
docs/custom-policies.mdx around the phrase "The first `deny` short-circuits all
subsequent policies" when applying this change.
🪄 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: defaults
Review profile: CHILL
Plan: Pro
Run ID: d40771ed-7c54-4f95-94d0-38823ead7f82
📒 Files selected for processing (15)
.luv/Dockerfile.dev.luv/Dockerfile.docs.luv/docker-compose.yml.luv/settings.jsondocs/architecture.mdxdocs/cli/install-policies.mdxdocs/cli/list-policies.mdxdocs/cli/remove-policies.mdxdocs/configuration.mdxdocs/custom-policies.mdxdocs/dashboard.mdxdocs/docs.jsondocs/for-agents.mdxdocs/getting-started.mdxdocs/introduction.mdx
Uh oh!
There was an error while loading. Please reload this page.
Removes .luv/ configuration (will be added later). Updates the root Dockerfile to support volume-mounted docs with hot reload instead of baking content in at build time. Usage: docker run -v ./docs:/app/docs -p 3000:3000 <image> Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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 `@Dockerfile`:
- Around line 5-8: The Dockerfile currently sets WORKDIR /app/docs and starts
the dev server (CMD ["mintlify", "dev", "--host", "0.0.0.0"]) but omits copying
the repository docs into the image, so non-mounted runs have an empty /app/docs;
add a COPY step that copies the local docs directory into /app/docs (e.g., COPY
docs/ /app/docs) before or immediately after setting WORKDIR so the image is
self-contained for standalone runs while keeping the existing CMD and EXPOSE
intact.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
Uh oh!
There was an error while loading. Please reload this page.
Clearer naming for the docs dev server image. Removes the duplicate Dockerfile inside docs/ since the root one is the canonical version. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Addresses CodeRabbit review: - Run as non-root user (docsuser, UID 10001) for security - COPY docs/ into image so it works without a bind mount - Bind mount (-v ./docs:/app/docs) still overrides for hot reload Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Summary
/custom-hooks→/custom-policiesto match product terminology. Updates all cross-references, navigation, page title, and user-facing text across 11 doc files. Source code filenames are unchanged.Dockerfile→Dockerfile.docsfor clarity, removes duplicatedocs/Dockerfile. Supports volume-mounted hot reload.docker build -f Dockerfile.docs -t failproofai-docs . docker run -v ./docs:/app/docs -p 3000:3000 failproofai-docsTest plan
custom-hooksuser-facing references updated tocustom-policiescustom-hooks-registry.ts, etc.) left unchanged🤖 Generated with Claude Code