docs(skills): define nix rule format

This commit is contained in:
2026-09-16 11:06:26 -04:00
parent fda9016c65
commit e460aa2b57
2 changed files with 23 additions and 1 deletions

View File

@@ -18,10 +18,28 @@ find src/skills/nix-style/rules -maxdepth 1 -type f -name '*.md' -print | sort
Finish when all discovered rule files have been read.
## Write rules
Use this structure for each rule:
```md
## Rule title
### Rule
State enforceable instructions.
### Rationale
Explain why the rule exists.
```
Add `### Examples` only when examples clarify the rule.
## Apply rules
Apply the loaded rules when editing or reviewing Nix files.
Prefer the most specific rule when two rules cover the same code.
When loaded rules conflict, follow the most specific rule.
After editing Nix files, run:

View File

@@ -2,8 +2,12 @@
## Keep `flake.nix` as flake wiring
### Rule
Add flake inputs in `flake.nix`.
Put new flake output implementation in `src/dotfiles/default.nix`.
Use `flake.nix` to pass inputs into that implementation.
### Rationale
This keeps dependency declarations separate from output logic.