Skip to content

fix(factorydroid): move docs links to docs.factory.com and pass preserveRiskLevel - #3977

Merged
dyoshikawa merged 1 commit into
mainfrom
resolve-issue-3414-factorydroid-followups
Nov 26, 2026
Merged

dyoshikawa merged 1 commit into
mainfrom
resolve-issue-3414-factorydroid-followups

Conversation

@dyoshikawa

Copy link
Copy Markdown
Owner

Summary

Closes out the remaining Factory Droid follow-ups from #3414: the stale docs.factory.ai links and the per-hook preserveRiskLevel field. The other items in the issue already landed in #3447 (permissionRules), #3644 (enabledTools) and 983e792 (failClosed -> onFailure).

Changes

  • Replace every docs.factory.ai URL in src/, docs/ and .rulesync/skills/rulesync-feature-research/references/factorydroid.md with the final docs.factory.com page each one redirects to (checked with curl). Moved paths follow the redirect target, not just the new host:
    • cli/configuration/agents-md -> harness/agents-md
    • cli/configuration/custom-droids -> harness/subagents
    • cli/configuration/custom-slash-commands -> harness/custom-slash-commands
    • cli/configuration/settings -> droid-cli/settings
    • cli/configuration/skills -> harness/skills
    • reference/hooks-reference -> harness/hooks
    • software-factory/* -> automations/*
    • Regenerated src/generated/docs-content.ts.
  • Hooks: add a canonical preserveRiskLevel boolean to HookDefinitionSchema. Factory Droid's converter passes it through to .factory/hooks.json / ~/.factory/hooks.json and reads it back on import. Droid documents it as "PreToolUse only" (hooks reference), so it is restricted to preToolUse: a true on another event is dropped with a warning in both directions.
  • Docs: add preserveRiskLevel to the hook field list in docs/reference/file-formats.md.
  • Tests: export and import cases in factorydroid-hooks.test.ts.

Design decisions

  • preserveRiskLevel reuses the existing booleanPassthroughFields mechanism with an events filter, like other tool-specific booleans (continueOnBlock, enabled). The triage plan said to emit only true. That mechanism also writes an authored false, which equals Droid's default, so it changes nothing; I kept the shared behavior instead of adding a special case. Non-boolean values are dropped on import.
  • The field name matches Droid's spelling exactly, since no other tool has an equivalent.

Skipped items

  • Emitting canonical allow/ask/deny as native permissionRules by default: declined. Droid's docs say the feature must be "enabled for your organization and supported by your Droid version". Each rule needs passing tests: a failing rule is skipped, and duplicate ids skip the whole source. The legacy allow/deny lists "remain respected". Generating rules and tests automatically from glob patterns would be guesswork, and on orgs without the feature it could silently drop policy. Users can already author factorydroid.permissionRules directly (feat(factorydroid): round-trip native permissionRules through the override #3447).

Verification

  • pnpm run check and pnpm run cicheck:content pass. The factorydroid hooks tests and src/types/hooks.test.ts pass.
  • Locally, a few time-budget tests fail by timing out. They are in code this PR does not touch: opencode-hooks (real Bun runtime), glob, shell-command-categories, antigravity-command-skill-name and mcp/docs. They still failed when run on their own, because the host was overloaded (load average about 110). CI is the reference for these.

Closes #3414

🤖 Generated with Claude Code

https://claude.ai/code/session_01JdNNKCxxrKAMDANMGDEGP4

…rveRiskLevel

Point every Factory Droid citation at the docs.factory.com page the old
docs.factory.ai URL redirects to, and carry Droid's per-hook
preserveRiskLevel (PreToolUse only) through generate and import.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01JdNNKCxxrKAMDANMGDEGP4
@dyoshikawa
dyoshikawa merged commit c7d5fb3 into main Nov 26, 2026
11 checks passed
@dyoshikawa
dyoshikawa deleted the resolve-issue-3414-factorydroid-followups branch November 26, 2026 07:38
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.

Follow up Factory Droid upstream updates: native permissionRules (allow/ask/block) replace the deprecated command lists

1 participant