feat(factory): manage Droid settings from dotfiles
Merged
SH
3mo ago+259+259+012345678901234567890123456789-6-6-0123456789
Summary
- manage Factory Droid model selection through
models.jsonhydration - install shared security, push, GitHub-settings, secret, and git-ai hooks
- remove legacy Droid hook entries during activation while preserving unrelated Factory settings
Validation
jqJSON validation- Bash syntax and ShellCheck
- fresh and legacy Factory activation merge tests
git diff --checkmake build
Summary by cubic
Manage Factory Droid model and guardrail hooks from dotfiles, merging them into Factory settings without overwriting user preferences. Adds a local Gemma preset, sets it as default, and makes activation idempotent while cleaning legacy entries and writing atomically.
- New Features
- Merge managed model and hooks into
~/.factory/settings.jsonwithjq, preserving other settings and removing legacy Droid hooks, duplicate managed hooks, and staleimportedClaudeHooksrefs. - Add a local Gemma model preset and set it as default; values sourced from
models.jsonviaconfig/factory/settings.tpl.jsonand hydrated byscripts/llm-update.sh. - Install shared guardrails: security, block git push, block GitHub settings, secret scan, and
git-aicheckpoints on PreToolUse/PostToolUse for write/edit with correct Execute/Edit matchers. - Run the merge during Home Manager activation via
config/factory/default.nixusingactivate-settings.sh; idempotent, uses a temp file, and setschmod 600for safer writes.
- Merge managed model and hooks into