✨ feat(pariksha): required-settings refuses permission rules Claude Code does not match, 0.7.10

Merged
AT
10d ago
+242-30

Slice: #299

Work item #298, step one of athya-hq/athya_mono#3804 (W-30.12, approved there with option A). Page: https://claude.ai/artifact/7mmSSr639V8s4a1W4fe6SW. A headless claude -p at athya_mono's root prints permission-rule warnings; three come from rules in veda's baseline.

What changes

  • packages/pariksha/baselines/claude-settings.json: permissions.allow drops Write(./**) and NotebookEdit(./**) (the kept Edit(./**) covers every file-editing tool); permissions.ask replaces Bash(*git push* :*) with Bash(*git push* :**). The why texts say so.
  • required-settings refuses, in permissions.allow, deny and ask, the two forms Claude Code does not match as written: a path rule on Write, NotebookEdit or MultiEdit (a bare Write passes), and a Bash(…) rule ending in :* with another * before it. It judges both files: the requirements file (exit 2, nothing checked) and the settings, whether or not a requirement names the rule.
  • Tests for both refusals and for Bash(*git push* :**) passing, with a comment that ** relies on Claude Code 2.1.326's behaviour.
  • @veda-hq/pariksha 0.7.10, the next legal version after v0.7.9.

Why veda's own settings are not in this PR

scripts/guards.sh and CI's "Required settings" step judge veda's .claude/settings.json against the pinned pariksha 0.5.20 baseline, which requires Write(./**), NotebookEdit(./**) and Bash(*git push* :*). The new check refuses those same rules. No settings file can satisfy both, so:

  1. This PR. pariksha's smoke judges packages/pariksha/smoke/claude-settings.json, a fixture holding the new baseline, instead of veda's settings.
  2. After the v0.7.10 release, a follow-up PR pins @veda-hq/pariksha 0.7.10 at the root, makes the same three changes in veda's .claude/settings.json, and points smoke back at veda's settings.

Evidence

  • Claude Code docs, https://code.claude.com/docs/en/permissions (read 2026-11-20): "The :* form is only recognized at the end of a pattern" and "Claude Code checks file permissions against Edit(path) and Read(path) rules".
  • Headless probes on Claude Code 2.1.326:
    • With ask Bash(*git push* :**), echo git push origin :feature-x is denied (matched). echo git push origin HEAD:feature-x and echo git push -u origin feature-x run.
    • With today's Bash(*git push* :*), the :feature-x command runs (no match).
    • A deny Edit(path) rule stops the Write tool.

Checks

pnpm check passes locally: pariksha has 3763 tests, and required-settings.ts is at 100% line, branch and function coverage.

🤖 Generated with Claude Code


Summary by cubic

Makes @veda-hq/pariksha's required-settings check refuse permission rules Claude Code does not match as written, and updates the baseline to match.

  • Refuses path rules on Write, NotebookEdit, or MultiEdit (only Edit(path) is checked) and Bash(…) rules ending in :* with another * before it, in both the requirements file (exit 2) and the settings file. Judges a requirement's includes list and its value list alike.
  • Drops Write(./**) and NotebookEdit(./**) from the baseline: Edit(./**) already covers them; the push-refspec rule becomes Bash(*git push* :**), which matches :feature-x on Claude Code 2.1.326 where :* let it through.
  • Bumps the package to 0.7.10. veda's own settings keep the old rules until the root pins 0.7.10; until then smoke judges a fixture with the new baseline.

Migration

  • After this releases, pin @veda-hq/pariksha 0.7.10, apply the same three changes to veda's .claude/settings.json, and point smoke back at veda's settings.