feat(claude): auto-discover global rules from flake inputs#413
Merged
JacobPEvans merged 3 commits intomainfrom Apr 7, 2026
Merged
feat(claude): auto-discover global rules from flake inputs#413JacobPEvans merged 3 commits intomainfrom
JacobPEvans merged 3 commits intomainfrom
Conversation
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.
Code Review
This pull request updates the modules/claude-config.nix file to include a new local rule, skill-execution-integrity, which points to a markdown file within the ai-assistant-instructions directory. I have no feedback to provide as there are no review comments and the change is straightforward.
There was a problem hiding this comment.
Pull request overview
This PR extends the Home Manager Claude configuration to globally deploy the skill-execution-integrity rule from the ai-assistant-instructions flake input, ensuring it auto-loads in every Claude session across repositories.
Changes:
- Adds
skill-execution-integritytorules.localso it gets symlinked into~/.claude/rules/via the Claude module.
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)
4 tasks
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
Implements dynamic global rule discovery in nix-ai, auto-loading all
.mdfiles fromai-assistant-instructions/agentsmd/rules/instead of manually hardcoding each rule. This matches the pattern already used for agents and commands viadiscoverMarkdownFiles+mkSourceEntries→rules.fromFlakeInputs.No manual nix-ai changes are needed when rules are added or removed upstream—they auto-discover and deploy to
~/.claude/rules/via home-manager.This addresses the skill-execution-integrity rule requirement from the three-tier defense against Claude skipping repeat skill invocations:
Changes
aiRules = discoverMarkdownFiles "${ai-assistant-instructions}/agentsmd/rules"to the discovery sectionrules.fromFlakeInputs = mkSourceEntries "${ai-assistant-instructions}/agentsmd/rules" aiRulesto auto-discover all upstream rulesskill-execution-integrityentry fromrules.local(now auto-discovered)pal-mcp-policy,retrospective-report-location) inrules.localfor nix-ai-only customizationsTest Plan
nix flake checkpassesnix flake update ai-assistant-instructionsin nix-aidarwin-rebuild switch~/.claude/rules/skill-execution-integrity.mdsymlink exists~/.claude/rules/Blocked By
Related