Rectify: Note/With Block Consistency — Semantic Rule Immunity - #4460
Merged
Trecek merged 7 commits intoAug 4, 2026
Conversation
Add a new semantic rule that detects note/with_args shape contradictions at recipe validation time. When a run_skill step has structured skill_inputs in its with: block but its note: instructs inline-arg concatenation into skill_command, the rule flags this as an ERROR — preventing wasted run_skill round-trips that would be rejected by the runtime binder. Includes: - rules_note_shape_contradiction.py: six detection patterns covering append/embed/concatenate/replace verbs and inline-arg examples - Rule registration in recipe/__init__.py - Unit tests with synthetic steps (6 cases) - Bundled recipe integrity test parametrized over all validated recipes Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Fix note/with_args shape contradictions in: - remediation.yaml investigate step: note said "append to skill_command" but issue URL is passed via skill_inputs.topic - implementation-groups.yaml plan step: note said "append to skill_command" for issue_url and adversarial_review_level, both are skill_inputs keys - merge-prs.yaml merge_pr step: note said "Appends to skill_command" for pr_number and complexity, both are skill_inputs keys - research.yaml plan_phase step: note said "Replace in skill_command" for group_files, which is passed via skill_inputs.task All notes now correctly describe the structured skill_inputs shape and explicitly instruct not to modify skill_command. Includes regenerated compiled JSON for all four recipes. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The test_no_skills_extended_skill_uses_autoskillit_prefix contract test requires source files to use /merge-pr (not /autoskillit:merge-pr) for skills_extended skills. Updated the comment in the rule module. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Trecek
force-pushed
the
impl-rectify-note-with-consistency-20260804-113118
branch
from
August 4, 2026 21:04
18412ef to
76c63df
Compare
Trecek
enabled auto-merge
August 4, 2026 21:07
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Recipe
note:fields (LLM prompts consumed by the orchestrator) can silently contradict their step'swith:block after a migration rewrites the structured invocation shape but leaves the prose stale. The contradiction causes a wastedrun_skillround-trip: the orchestrator follows the note's stale instruction, the runtime binder rejects the shape mismatch (recipe_execution_static_tool_mismatch), and recovery depends on the orchestrator improvising from a free-text error message.This PR delivers architectural immunity: a semantic rule that catches note/with contradictions at recipe validation time, plus fixes for all four existing stale-note defects.
Changes
New semantic rule —
note-shape-contradictionsrc/autoskillit/recipe/rules/rules_note_shape_contradiction.py: Six detection patterns covering append/embed/concatenate/replace verbs and inline-arg examples (both quoted and unquoted). Fires atSeverity.ERROR— blocks recipe validation.skill_inputsinwith_args) ANDskill_commandis static (excludes dynamic command-name templates like/autoskillit:arch-lens-{slug}).recipe/__init__.pyalphabetically among existing rule imports.Fixed stale notes (4 bundled recipes)
remediation.yamlinvestigateskill_inputs.topicimplementation-groups.yamlplanissue_urlandadversarial_review_level— both areskill_inputskeysmerge-prs.yamlmerge_prpr_numberandcomplexity— both areskill_inputskeysresearch.yamlplan_phasegroup_files— passed viaskill_inputs.taskAll notes now correctly describe the structured
skill_inputsshape and explicitly instruct not to modifyskill_command. Compiled JSON regenerated for all four recipes.Tests
tests/recipe/test_rules_note_shape_contradiction.py: 6 synthetic test cases covering detection and false-positive exclusion.tests/recipe/test_note_with_consistency.py: Bundled recipe integrity test parametrized overall_validated_recipe_paths()(all 15+ recipes).Investigation Reference
.autoskillit/temp/rectify/rectify_note_with_consistency_2026-08-04_174500.md🤖 Generated with Claude Code
Closes #4456