docs: reframe as Policy as Code (PaC); add Cedar scoping memo#28
Conversation
Rename user-facing "Rego for OPA" copy to "Policy as Code (PaC)" across README, CLAUDE.md, DESIGN.md, the Cargo.toml description, and the scan footer string. zift still only generates Rego/OPA today — implementation, module names, MCP tool names, schema fields, and rule templates are unchanged. The framing now signals that Rego is the current backend, not the only one we plan to support. Add docs/CEDAR_SUPPORT.md, a scoping memo for the additive Phase A work to make Cedar a peer backend: parallel cedar_template TOML keys, a cedar_stub field on Finding, a new src/cedar/ module, an --engine flag on extract, and new suggest_policy/validate_policy MCP tools with the existing Rego-named tools kept as aliases. Tracked in #27.
Update --about, subcommand descriptions, and arg help in the CLI to match the broader PaC reframe: "Rego policies for OPA" becomes "Policy as Code", "Generate Rego files" becomes "Generate Policy-as-Code files", and the MCP blurb references "policies" rather than "Rego". Keeps user-facing copy aligned with the README and Cedar scoping memo.
The two prior commits reframed user-facing copy from "Rego for OPA" to "Policy as Code (PaC)" but missed a few spots that surfaced in review: the README quickstart comment and MCP blurb still said "Rego" only, DESIGN.md's ASCII architecture diagram and CLI design block still labeled the output as Rego-specific, and the Cedar memo referenced its companion issue vaguely instead of linking #27 directly. No code or behavior changes — purely doc consistency.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThis PR updates user-facing and design documentation to reframe the project as generating "Policy as Code (PaC)" (Rego/OPA today) and adds a scoped design memo for optional Cedar support; minor CLI/help and output text strings were changed to match the PaC wording. No public APIs or runtime logic were modified. ChangesPolicy as Code Positioning & Cedar Planning
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~5 minutes Possibly related issues
Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. Review rate limit: 4/5 reviews remaining, refill in 12 minutes. Comment |
There was a problem hiding this comment.
Summary
This PR successfully reframes zift's user-facing messaging from "Rego for OPA" to "Policy as Code (PaC)" and adds a comprehensive Cedar support scoping memo. The changes are documentation-only with no code or behavior modifications.
Key Changes:
- Updated README.md, CLAUDE.md, Cargo.toml, docs/DESIGN.md to reflect PaC framing
- Modified CLI help strings in src/cli.rs to use policy-agnostic language
- Updated output text in src/output/text.rs to remove OPA-specific reference
- Added docs/CEDAR_SUPPORT.md - 135-line design memo for future Cedar backend support
Review Findings:
No blocking issues identified. All changes are consistent with the stated goal, maintain backward compatibility, and correctly update documentation and user-facing strings. The Cedar design memo is well-structured and thoroughly documents the path for multi-engine support.
The PR is ready to merge.
You can now have the agent implement changes and create commits directly on your pull request's source branch. Simply comment with /q followed by your request in natural language to ask the agent to make changes.
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 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/CEDAR_SUPPORT.md`:
- Line 72: The two untyped fenced code blocks in docs/CEDAR_SUPPORT.md (the
block listing the src/cedar files starting with "src/cedar/" and the shell
example containing "zift extract findings.json --engine cedar --output-dir
./policies/cedar") should include language identifiers to satisfy markdownlint
MD040 and improve rendering; change the file-list fence to use a language hint
such as "text" (e.g., ```text) and the command fence to "bash" (e.g., ```bash)
so the blocks with "src/cedar/" and the zift extract command are properly typed.
In `@docs/DESIGN.md`:
- Line 245: Update the CLI docs so the "extract" option consistently references
Policy-as-Code (PaC) instead of implying Rego is mandatory: edit the "extract"
description and the nearby CLI block (the entry labeled extract and the text
around lines 268-271) to replace "Generate Policy-as-Code files from findings"
and any phrase like ".rego files" with a single consistent phrase such as
"Generate Policy-as-Code files from findings (e.g., Rego or other PaC formats)"
so readers aren't led to believe Rego is required.
🪄 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: 0cccf1fe-7499-480e-b510-74fc0317cdb3
📒 Files selected for processing (7)
CLAUDE.mdCargo.tomlREADME.mddocs/CEDAR_SUPPORT.mddocs/DESIGN.mdsrc/cli.rssrc/output/text.rs
- Add language identifiers (text, bash) to two unfenced code blocks in docs/CEDAR_SUPPORT.md to satisfy markdownlint MD040 - Align DESIGN.md EXTRACT OPTIONS block: --output-dir help no longer says ".rego files"; matches the PaC framing already applied to the block's other entries
Summary
Reframes zift's user-facing copy from "Rego for OPA" to "Policy as Code (PaC)" — Rego/OPA today, with Cedar planned — and adds
docs/CEDAR_SUPPORT.md, a scoping memo for the additive Phase A work that would let Cedar coexist with Rego as peer backends.No code or behavior changes. Implementation, module names, MCP tool names, schema fields, and rule templates are all unchanged. The framing now signals that Rego is the current backend, not the only one we plan to support.
Tracks #27.
Changes
README.md,CLAUDE.md,docs/DESIGN.md,Cargo.tomldescription, the scan footer string insrc/output/text.rs, and CLI help insrc/cli.rsfrom "Rego for OPA" to "Policy as Code (PaC) — Rego/OPA today"docs/CEDAR_SUPPORT.md— 135-line scoping memo covering: current Rego coupling, additive Phase A plan (parallelcedar_templateTOML keys,cedar_stubfield, newsrc/cedar/module,--engineflag onextract, newsuggest_policy/validate_policyMCP tools with Rego-named aliases retained), Phase BPolicyGeneratortrait extraction, risk register, and open questionsTest plan
cargo checkcleancargo fmt --checkcleancargo clippy -- -D warningscleancargo test— all 12 tests pass (deep_subprocess + mcp_stdio integration)docs:/docs(cli):commits — won't trigger release-plz version bump (correct: no behavior change)docs/CEDAR_SUPPORT.mdon GitHub to confirm formatting + the Cedar support / pluggable policy backends #27 link resolvesSummary by CodeRabbit
Documentation
Chores