summaryrefslogtreecommitdiff
path: root/plugins/code-modernization/scripts/render_rules.py
diff options
context:
space:
mode:
authorMorgan Lunt <morganl@anthropic.com>2026-09-23 19:20:24 -0700
committerMorgan Lunt <morganl@anthropic.com>2026-09-24 17:50:20 -0700
commit9b4e3c21f27766422e43259da71745b863684784 (patch)
treef2f31eeb685997f58fe9022f2607240a683117a6 /plugins/code-modernization/scripts/render_rules.py
parentcbba09effc7046cf649b78dc4b84e95cf1a64edd (diff)
code-modernization: preflight checks that legacy/ is protected from edits
The commands are written never to edit legacy/, but nothing checked that anything enforced it. Preflight now has a Check 7 that reads, without changing anything, the project's .claude/settings.json and .claude/settings.local.json and the user's settings file, and looks for an Edit deny rule that covers legacy/. The result is a row in PREFLIGHT.md with the same status marks as the other checks: a green row names the file and the rule, and a warning prints the settings snippet to add. The check never edits a settings file and never suggests loosening one. The check also says plainly that a permission rule covers the file tools and the shell commands the CLI recognizes, not a script that opens the files itself, so a green row is not a guarantee. A read-only mount, or a sandbox that blocks writes to legacy/, is. The README no longer says the settings file enforces the invariant: the commands keep to it by convention and the rule backs that up.
Diffstat (limited to 'plugins/code-modernization/scripts/render_rules.py')
0 files changed, 0 insertions, 0 deletions