Skip to content

docs: align Guards docs with Model switch, Muse Code, and Go policy inputs - #981

Merged
davidmytton merged 2 commits into
mainfrom
david/cursor/guards-docs-code-mismatches-2ce3
Oct 9, 2026
Merged

davidmytton merged 2 commits into
mainfrom
david/cursor/guards-docs-code-mismatches-2ce3

Conversation

@davidmytton

Copy link
Copy Markdown
Collaborator

Fixes three places where the Guards docs disagreed with the code.

  • Model switch. A coding agent policy can execute on Tool call, Prompt, Model switch, or any combination (HOOK_MOMENTS in apps/decide-service/server/lib/agent-hook/contract.ts; the compiler's AJV2016 accepts tool-call, prompt, and/or model-switch). The "Two kinds of policy" table in guards/authoring.mdx, the AJV2016 row in guards/errors.mdx, and the executeOn paragraph in mcp-server.mdx mentioned only Tool call and Prompt.
  • Muse Code. muse-code is a supported hook product (coding-agent-products.json). Added it to the agent lists in guards/authoring.mdx, observe.mdx, and the home page Enforce card.
  • Go typed inputs. Added a Go column to the typed inputs table in guards/remote-policies.mdx with the arcjet.GuardPolicyServer* and arcjet.GuardPolicyLocalString constructors from arcjet-go's remote_policy.go, and noted that the integer and number constructors take int64 and float64.

guards/index.mdx is left alone because #980 rewrites it.

Open in Web Open in Cursor 

Co-authored-by: David Mytton <davidmytton@users.noreply.github.com>
@vercel

vercel Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
arcjet-docs Ready Ready Preview Oct 9, 2026 8:01pm UTC

Request Review

Co-authored-by: David Mytton <davidmytton@users.noreply.github.com>

@arcjet-review arcjet-review Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Arcjet Review — 🟢 Low Risk

Decision: Approved

Rationale: Pure documentation changes aligning Guards docs with existing code behavior (HOOK_MOMENTS supporting model-switch, muse-code as a supported hook product, and Go typed inputs). Also includes updated screenshot baselines for the home page copy change. No code paths changed, no security-relevant surface area touched, and the security checklist is not applicable to markdown-only edits.

Summary of Changes

Docs-only PR correcting three inconsistencies between Guards docs and code: (1) adds Model switch to the coding-agent policy executeOn description in authoring.mdx, errors.mdx (AJV2016), and mcp-server.mdx; (2) adds Muse Code to the agent lists in authoring.mdx, observe.mdx, and the home page Enforce card; (3) adds a Go column to the typed inputs table in remote-policies.mdx with the arcjet-go constructors and a note about int64/float64. Updates the two home-page screenshot baselines to match the Enforce card copy change.

Notes

Screenshot baselines are listed as changed; their contents cannot be rendered, but regenerating them is consistent with the home-page copy update.

Review: 68174f81 | Model: anthropic/claude-opus-4-7 | Powered by Arcjet Review

@arcjet-review arcjet-review Bot added ready Ready to merge and removed ai-review-in-progress needs review Awaiting human review labels Oct 9, 2026
@davidmytton
davidmytton added this pull request to the merge queue Oct 9, 2026
Merged via the queue into main with commit ec70f9a Oct 9, 2026
11 checks passed
@davidmytton
davidmytton deleted the david/cursor/guards-docs-code-mismatches-2ce3 branch October 9, 2026 23:01
@arcjet-review arcjet-review Bot removed the ready Ready to merge label Oct 9, 2026

This branch was successfully deployed

1 active deployment
Preview — b15d622c Deployed Oct 9, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants