Repository navigation
docs(nushell): adopt project conventions - #21
Merged
Merged
Conversation
Move the general Nushell conventions that two projects documented locally into the skill: module exports and one-way imports, importing by module name or by command list, section order, the double-quote default, test placement, running an entry script through `$nu.current-exe`, whole-shape assertions, fixed-day UTC fixtures with `TZ` set for the child, and not formatting with `nufmt`. Bump hakula-languages to 1.0.6.
Split Scripts into entry and help, modules and imports, layout and order, quoting and strings, and paths. Split the two long trap groups into h4 subsections, and Testing into layout and assertions, inputs and fixtures, and the nu-test runner. Every bullet moves unchanged.
2 tasks done
hakula139
added a commit
to hakulab/agent-project-move
that referenced
this pull request
Nov 11, 2026
## Summary Trim `AGENTS.md` and the convention docs to the project rules an agent cannot discover from the code, the tools, or the shared instructions. The shared [`nushell` skill](https://github.com/hakula139/plugins/blob/main/plugins/hakula-languages/skills/nushell/SKILL.md) now owns the general Nushell rules (hakulab/plugins#21), and agents load it on their own for `.nu` changes, so `docs/conventions/nushell.md` and its routing row go. `AGENTS.md` keeps the routing table and three sections: - **Code**: the 100-column limit, and building home paths from `$env.HOME`, which overrides the skill's `$nu.home-dir` advice so tests can swap `HOME`. - **Skill directory**: installers copy only `skills/agent-project-move/`, so it stays self-contained, and `SKILL.md` leaves out `${CLAUDE_SKILL_DIR}`. - **Verification**: install the hooks with `nix develop -c true` in each new worktree, since the hook config is a gitignored link, and never bypass them. Then the three check commands. ### Removed or moved | Rule | Outcome | Reason | | --- | --- | --- | | Nushell exports, layering, and imports | Removed | The skill states them, and the `use` lines show the layering | | `edit-file` and `binary` trap | Removed | The skill's `open --raw` trap and the check in `edit-file` cover it | | `url encode` and file URIs | Removed | The skill's `url encode` trap and the comment on `file-uri` cover it | | Test coverage targets and invented test paths | Removed | Inferable, and covered by general privacy reasoning | | Banners at column 100 and whole string literals | Removed | Every banner shows the width, and code layout rules keep literals whole | | Fix the cause of failing checks | Removed | General engineering practice | | Update whatever goes stale | Removed | General practice. The one hidden coupling, the README's Tested with table, moves to the stores reference | | Store formats change with assistant releases | Moved to `docs/reference/stores.md` | Store changes already route there | | Public material only in issues and PRs | Removed | The publication rules for commits and descriptions cover it | | Documentation maintenance section | Removed | The one-home rule and the audience split restate general documentation practice, and the README's headings show its scope | | Cross-store parity in Code review | Removed | The store modules show the shared shape, and review covers consistency | ## Test plan - [x] `nix develop -c run-hooks`: markdownlint, dprint, and cspell passed - [x] A flagship reviewer checked the rewrite against the code and the shared instructions, and its findings are applied
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
Two projects documented general Nushell conventions in their own
docs/conventions/nushell.md, and the nushell skill now holds them, worded without project names, so those pages can keep only their project-specific rules:<module>.test.nu, an entry script runs through^$nu.current-exe, an assertion compares the whole shape the test owns, and fixtures use a fixed day in UTC while the test setsTZfor the child process.nufmt. It reindents to four spaces by default, and even withindent: 2it joins a pipeline split one stage per line, or a call split one option per line, onto one line, against the code-layout skill.The stream trap now names
skipbesideget <n>andlast, since it too runs and discards a skipped item's error, and links the upstream issue, nushell/nushell#19463. Its fix, nushell/nushell#19467, is in no release yet.The skill had grown long, so a second commit groups it under task headings without changing a bullet: Scripts splits into entry and help, modules and imports, layout and order, quoting and strings, and paths. The two long trap groups split into
####subsections, and Testing into layout and assertions, inputs and fixtures, and the nu-test runner. No link in this repository or in devkit points at an anchor in the skill.Project-specific items stay in their projects: module lists and dependency graphs, external tools, the config record, real
git initrepositories, theedit-fileand file-URIurl encodetraps, and the$env.HOMEoverride.Bump hakula-languages to 1.0.6, and add
nufmtto the spelling dictionary.Test plan
nix develop -c run-hooksnix flake check --all-systemsclaude plugin validate .$nu.current-exenames the dev shell'snu, the same path aswhich nuwith-env {TZ: ...} { ^$nu.current-exe entry.nu }formatsdate nowin that zone:+00:00forUTC,+09:00forAsia/Tokyo, and-05:00forAmerica/New_Yorkuse ./cache.nuanduse ./index.nu,cache readandindex readboth resolve,use ./paths.nu [path-map path-match]leaves an unlisted export undefined, anduse ./cache.nu *leaves a non-exported helper undefined'a\d' == "a\\d"and'say "hi"' == "say \"hi\""hold, and"\d+"fails to parse withunrecognized escape sequenceassert equalfails on an extra record field and on an extra table rownix shell nixpkgs#nufmt -c nufmt(0.1.0) reindents a two-space file to four spaces, and with{indent: 2}as its config it still joins a split pipeline and a split^git logcall onto one line each[1 2 3] | each {|x| if $x == 1 { error make {msg: boom} } else { $x } } | skip 1 | to nuonprints[2, 3]and exits 0main, the sorted bullet labels differ only by the six added here (Assertions, Imports, Layout, Modules, Order, and Timestamps) and the stream trap's head that now namesskip