refactor: restructure auto-loaded rules by natural paths triggers#544
refactor: restructure auto-loaded rules by natural paths triggers#544JacobPEvans merged 5 commits intomainfrom
Conversation
…ations New auto-loaded rule that establishes every /skill-name invocation as a fresh, independent execution. Clarifies that the <command-name> tag means instructions are cached — not that prior work is complete. Prevents Claude from shortcutting repeat skill calls by assuming stale prior results are still valid. (claude)
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request introduces a new auto-loaded rule designed to prevent the model from incorrectly assuming that previous skill invocations imply completed work. By enforcing a fresh execution model for every skill call, this change improves the reliability of tool usage and state management. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. Footnotes
|
Deploys the skill-execution-integrity rule from ai-assistant-instructions to ~/.claude/rules/ via rules.local, ensuring it auto-loads in every session across all repos. Depends on: JacobPEvans/ai-assistant-instructions#544 (claude)
There was a problem hiding this comment.
Pull request overview
Adds a new essential rule intended to prevent “cached” skill invocations from being treated as already-executed work, and updates the central AGENTS documentation to reflect the expanded auto-loaded rule set.
Changes:
- Added new auto-loaded rule
skill-execution-integrity.mddescribing that each/skill-nameinvocation must be executed fresh. - Updated
AGENTS.mdto reflect “6 Essential” auto-loaded rules and list the new rule.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| agentsmd/rules/skill-execution-integrity.md | Introduces the new “skill execution integrity” rule content and metadata. |
| AGENTS.md | Updates the documented count/list of auto-loaded essential rules to include the new rule. |
There was a problem hiding this comment.
Code Review
This pull request introduces a new essential auto-loaded rule titled 'Skill Execution Integrity' and updates AGENTS.md to reflect the increase from five to six core rules. The new rule mandates that every skill invocation be treated as a fresh, independent execution, requiring all commands to be re-run against the current live state and forbidding assertions of state based on memory from previous invocations. I have no feedback to provide.
* feat(claude): add skill-execution-integrity to global rules Deploys the skill-execution-integrity rule from ai-assistant-instructions to ~/.claude/rules/ via rules.local, ensuring it auto-loads in every session across all repos. Depends on: JacobPEvans/ai-assistant-instructions#544 (claude) * fix: format claude-config.nix for nix fmt compliance (claude) * fix: use dynamic rule discovery instead of hardcoded rules.local Apply the same discoverMarkdownFiles + mkSourceEntries pattern used for agents and commands. All .md files in ai-assistant-instructions/agentsmd/rules/ are now auto-discovered and deployed to ~/.claude/rules/ via fromFlakeInputs. No manual nix-ai changes needed when rules are added or removed upstream. (claude)
Per Claude Code best practices, all .claude/rules/ files must include YAML frontmatter with a description field. Universal rules (not file-scoped) require description only — no paths/globs needed. Previously only skill-execution-integrity had frontmatter; now all 6 rules are consistent. (claude)
Rules that apply to specific file types now use paths: frontmatter so they load lazily (only when Claude reads matching files) instead of unconditionally every session. Universal behavioral rules (soul, skill-execution-integrity) remain unscoped. (claude)
Split monolithic rules into atomic rules organized by WHEN they apply: Universal (load every session — 174 lines): - tool-use.md: merges direct-execution + agent-dispatching (universal parts) - soul.md: personality (unchanged) - skill-execution-integrity.md: fresh skill execution (unchanged) - secrets-policy.md: reduced to universal principle only Path-scoped (lazy-load on matching files — 163 lines): - nix-tool-policy.md: expanded with Nix alternatives from direct-execution - ci-cd-policy.md: new, CI/CD rows from direct-execution - config-secrets.md: new, scrubbing details from secrets-policy Deletes direct-execution.md and agent-dispatching.md (replaced by tool-use.md). Updates all references in AGENTS.md and docs. (claude)
Counts become stale when rules are added or removed. The list itself is the source of truth. (claude)
PR #544 Update
Summary
This PR adds the 6th auto-loaded rule, establishing that every
/skill-nameinvocation is a fresh, independent execution. It clarifies the
<command-name>tag misconception: cached instructions are not completed work.
Part of a three-layer defense against Claude avoiding repeat skill invocations:
Changes
YAML frontmatter and rule content
Test Plan
descriptionfielddarwin-rebuild switch:verify
~/.claude/rules/skill-execution-integrity.mdsymlink existsGenerated with Claude Code