feat(setup): add --no-overrides one-shot defaults switch - #929
Conversation
Implements acceptance criterion 6 of specs/adoption-and-setup.md: a per-invocation --no-overrides flag that runs any framework skill against framework defaults for that single invocation, ignoring both override surfaces without modifying or deleting them. The safety baseline (confidentiality, privacy, security) still applies. Adds the protocol to docs/setup/agentic-overrides.md under a new "One-shot defaults run" section, lists the flag in the setup SKILL.md Inputs table, and ships a three-case eval suite exercising: - flag present + override exists → skip-overrides - flag present + no override → skip-overrides - flag absent + override exists → apply-overrides (baseline) Note: this branch is based on main and is independent of the in-flight magpie-local-convention branch. When that branch merges (adding .apache-magpie-local/ as a second override surface), the "One-shot defaults run" prose here will need a minor update to say "skip steps 1–5" instead of "1–3" and to mention .apache-magpie-local/ alongside .apache-magpie-overrides/. The merge conflict is shallow and localised to the one paragraph. Generated-by: Claude (claude-sonnet-4-6)
Rebased onto main and resolved two conflicts: main added the step-overrides-surface suite and the two-directory (personal-local + committed) override protocol while this branch was open. Both suites now coexist (12 cases), and the --no-overrides check becomes step 0 of the five-step protocol rather than the three-step one it was written against. Step 0 now also keeps the step-5 recap, so a bypassed run records which override files existed but were not consulted -- otherwise the audit trail cannot distinguish a bypass from a repo with no overrides at all. The eval predicates needed tightening. Both keyed on the flag name, which appears in a correct reason and in a reason arguing the exact opposite: has_bypass_reason: no-?overrides|framework default|not (be )?read|... Given the reason "The override file was read and applied because no --no-overrides flag was present" -- an apply-reason on a skip case -- that pattern matches, so the assertion passed on a wrong answer. The same held for has_apply_reason via its 'no .*flag' branch. decision is an enumerated field and still caught a wrong call, so the eval was not blind, but the reason predicates gave the appearance of prose checking without the substance. Both now require the matching verb (skipped/not-consulted versus applied/consulted) and reject the opposing phrasing, verified against eight cases in both directions -- including 'No bypass flag was supplied, so the override file was read and applied', where the skip word is itself negated and an earlier draft wrongly rejected it. Full-word alternations rather than truncated stems, because typos(1) reads skipp? and ignor as misspellings. Generated-by: Claude Code (Opus 5)
1cb030a to
25d4f87
Compare
potiuk
left a comment
There was a problem hiding this comment.
Approving with a rebase and a fixup pushed to the branch.
Rebase. Main moved twice under this branch: it added the step-overrides-surface suite, and it replaced the 3-step override protocol with a 5-step, two-directory one (personal-local + committed). Both eval suites now coexist — 12 cases, not 8 or 9 — and --no-overrides is re-anchored as step 0 of the five-step protocol rather than the three-step one it was written against.
One behaviour decision I made on your branch, so flagging it explicitly rather than burying it in a diff. Step 0 originally said "skip steps 1–3 entirely", which under the new protocol would also skip the recap. I changed it to skip steps 1–4 but still run step 5, reporting that the run used --no-overrides and naming the override files that existed but were not consulted. Reasoning: otherwise the audit trail cannot distinguish a deliberate bypass from a repo that simply has no overrides on disk, and the bypass is the case you most want recorded. Say the word if you disagree and I will revert that bit.
The eval predicates needed tightening. Replacing the MANUAL grade with deterministic regexes was the right instinct, but both keyed on the flag name:
has_bypass_reason: no-?overrides|framework default|not (be )?read|not applied|ignor
Given the reason "The override file was read and applied because no --no-overrides flag was present" — an apply-reason on a skip case — that pattern matches, so the assertion passed on a wrong answer. has_apply_reason had the same hole through its no .*flag branch. The flag name appears in a correct reason and in one arguing the exact opposite, so it cannot discriminate.
decision is enumerated and still caught a wrong call, so the eval was not blind — but the reason predicates were decoration rather than a check.
Both now require the matching verb (skipped / not-consulted versus applied / consulted) and reject the opposing phrasing. Verified across eight cases in both directions, including "No bypass flag was supplied, so the override file was read and applied", where the skip word is itself negated and my first attempt wrongly rejected it. Full-word alternations rather than truncated stems, because typos reads skipp? and ignor as misspellings.
Worth generalising: for any predicate over a decision's prose, the test is not "does a right answer pass" but "does a reason arguing the other decision fail". Noted in the suite README so the next editor checks both directions.
Summary
Implements acceptance criterion 6 of specs/adoption-and-setup.md:
a per-invocation --no-overrides flag that runs any framework skill
against framework defaults for that single invocation, ignoring both
override surfaces without modifying or deleting them. The safety
baseline (confidentiality, privacy, security) still applies.
Adds the protocol to docs/setup/agentic-overrides.md under a new
"One-shot defaults run" section, lists the flag in the setup SKILL.md
Inputs table, and ships a three-case eval suite exercising:
Generated-by: Claude (claude-sonnet-4-6)
Type of change
.claude/skills/<name>/) — eval fixtures updated belowtools/<system>/*.md)tools/*/withpyproject.toml)docs/,README.md,CONTRIBUTING.md)projects/_template/)prek, workflows, validators)Test plan
prek run --all-filespassesuv run pytest/ruff check/mypypasses(
PYTHONPATH=tools/skill-evals/src python3 -m skill_evals.runner tools/skill-evals/evals/<skill>/)(a regression test for the bug fixed / the behaviour added — see CONTRIBUTING.md)