Skip to content

feat(factorydroid): round-trip native permissionRules through the override - #3447

Merged
dyoshikawa merged 4 commits into
mainfrom
resolve-issue-3414-factorydroid-permission-rules
Oct 14, 2026
Merged

dyoshikawa merged 4 commits into
mainfrom
resolve-issue-3414-factorydroid-permission-rules

Conversation

@dyoshikawa

Copy link
Copy Markdown
Owner

Summary

Factory Droid now documents native permissionRules ({ "version": 1, "rules": [...] } with allow / ask / block decisions) as the recommended command policy, and marks commandAllowlist / commandDenylist / commandBlocklist as deprecated but still respected. This PR makes permissionRules a first-class key of the factorydroid permissions override:

  • Add permissionRules to FACTORYDROID_OVERRIDE_KEYS, so import lifts an existing block into the factorydroid override and the settings.local.json guardrail names it.
  • Type it in FactorydroidPermissionsOverrideSchema (id, decision enum, match.prefix, tests, reason, enabled; loose so newer upstream fields pass through).
  • Tests: schema accept/reject cases and a generate -> import round-trip next to commandAllowlist.
  • Docs: docs/reference/file-formats.md and the feature-research reference.

Upstream references:

Remaining (maintainer decision)

  • Whether canonical bash allow / ask / deny should also (or instead) be emitted as native permissionRules. The docs say the feature must be "enabled for your organization and supported by your Droid version", and each rule needs tests, so default emission still targets the legacy lists. This would likely need to be opt-in or written alongside them.
  • Refreshing the remaining docs.factory.ai URLs to docs.factory.com (the old host redirects).

Refs #3414

🤖 Generated with Claude Code

https://claude.ai/code/session_012y9fNo2AAJdGocxvsHtDhv

dyoshikawa and others added 4 commits October 15, 2026 01:14
…rride

Factory Droid now documents `permissionRules` (versioned allow/ask/block
rules) as the recommended command policy and deprecates the legacy command
lists. Add `permissionRules` to FACTORYDROID_OVERRIDE_KEYS so import lifts
it into the `factorydroid` override (and the settings.local.json guardrail
names it), and type it in the override schema.

Default emission still targets commandAllowlist/commandDenylist, because
permissionRules is org-gated and depends on the Droid version.

Refs #3414

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_012y9fNo2AAJdGocxvsHtDhv
Factory documents a prefix position as either a token or a non-empty list of
alternative tokens (e.g. `["git", ["status", "diff", "log"]]`). Accept that
form, require non-empty prefixes, and keep the override JSDoc attached to its
schema.

Refs #3414

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_012y9fNo2AAJdGocxvsHtDhv
…ctorydroid-permission-rules

# Conflicts:
#	src/generated/docs-content.ts
#	src/types/permissions.ts
…ctorydroid-permission-rules

# Conflicts:
#	src/generated/docs-content.ts
@dyoshikawa
dyoshikawa merged commit af4596b into main Oct 14, 2026
9 checks passed
@dyoshikawa
dyoshikawa deleted the resolve-issue-3414-factorydroid-permission-rules branch October 14, 2026 19:02
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.

1 participant