feat(rules): pre-commit architecture rule#661
Open
JacobPEvans-personal wants to merge 1 commit into
Open
Conversation
Document the shared pre-commit architecture as an auto-loaded rule.
Single canonical home per artifact:
dryvist/nix-devenv - hook definitions (Nix path)
dryvist/.github precommit - hook definitions (non-Nix path) + shared
lint configs
Covers:
- The six profiles (base, nix, markdown, terraform, ansible, python)
and what each layers on top of the base hygiene set
- Consumer patterns for Nix and non-Nix paths, with code snippets
- Rules for AI agents adopting the architecture in new repos
- Known limitations: cachix/git-hooks.nix tflint wrapper drops args
beyond $1; terraform-validate needs network; gitleaks not in
git-hooks.nix yet
Pairs with dryvist/nix-devenv#34, #35 and dryvist/.github#12.
Assisted-by: Claude <noreply@anthropic.com>
4 tasks
JacobPEvans-personal
added a commit
to dryvist/docs
that referenced
this pull request
May 31, 2026
* docs(conventions): pre-commit architecture page
Document the shared pre-commit architecture as a public-facing
convention page mirroring the auto-loaded agentsmd rule.
Adds conventions/pre-commit.mdx and the corresponding entry to
docs.json's Conventions group nav.
Covers:
- Canonical homes table (Nix-path nix-devenv, non-Nix-path
dryvist/.github precommit/, lint configs in dryvist/.github)
- Six profiles (base, nix, markdown, terraform, ansible, python)
- Consumer patterns for Nix and non-Nix paths with full snippets
- The `nix flake init -t #with-hooks` scaffold
- Why one canonical home per artifact (single update propagates,
drift dies, one-line onboarding)
- What stays per-repo (checkov, bandit, detect-secrets, AWS/GCP/
Azure tflint plugins) and why
- Known limitations matching the agentsmd rule
Mirrors:
https://github.com/dryvist/ai-assistant-instructions/blob/main/agentsmd/rules/pre-commit.md
Refs: dryvist/nix-devenv#34, #35, dryvist/.github#12, dryvist/terraform-runs-on#80, dryvist/ai-assistant-instructions#661
Assisted-by: Claude <noreply@anthropic.com>
* docs(nav): wire conventions/pre-commit into docs.json sidebar
Forgot to stage the nav update in the previous commit; the page
exists but wasn't discoverable through the sidebar.
Assisted-by: Claude <noreply@anthropic.com>
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
New auto-loaded rule at
agentsmd/rules/pre-commit.mddocumenting the shared pre-commit architecture rolled out acrossdryvist/nix-devenvPRs #34, #35 anddryvist/.githubPR #12.Captures the single-canonical-home-per-artifact principle so future agents working on consumer repos pull from the canonical sources instead of duplicating hook definitions or lint configs.
What it documents
base/nix/markdown/terraform/ansible/python, what each layers on top of base hygiene, and which inventory repos matchflake.nixfor the Nix path +gh apifetch commands for the non-Nix pathflake.lockTest plan
Refs: dryvist/nix-devenv#34, #35, dryvist/.github#12, dryvist/terraform-runs-on#80
Assisted-by: Claude noreply@anthropic.com