diff --git a/plugins/hakula-languages/.claude-plugin/plugin.json b/plugins/hakula-languages/.claude-plugin/plugin.json index da93098..084c14b 100644 --- a/plugins/hakula-languages/.claude-plugin/plugin.json +++ b/plugins/hakula-languages/.claude-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "hakula-languages", - "version": "1.1.7", + "version": "1.1.8", "description": "Nix, Nushell, and Rust conventions for coding agents", "author": { "name": "Hakula", "url": "https://hakula.xyz" }, "repository": "https://github.com/hakulab/plugins", diff --git a/plugins/hakula-languages/skills/rust/SKILL.md b/plugins/hakula-languages/skills/rust/SKILL.md index cfe89a2..8cdba26 100644 --- a/plugins/hakula-languages/skills/rust/SKILL.md +++ b/plugins/hakula-languages/skills/rust/SKILL.md @@ -26,18 +26,19 @@ Choose the narrowest visibility that serves supported callers. Use scoped visibi ## Modules and imports - **Module files**: put a module with children in `foo.rs` beside its `foo/` directory. -- **Import groups**: group `use` statements as std, external crates, workspace crates when present, then internal paths, with a blank line between groups. +- **Import groups**: follow nightly rustfmt's `group_imports = "StdExternalCrate"`. Put `std`, `core`, and `alloc` in the first group, external and workspace crates together in alphabetical order in the second, and `self::`, `super::`, and `crate::` paths in the third. Leave a blank line between groups. - **Traits**: import a trait as `Trait as _` when only its methods are used, and by name when code names the trait, such as in a bound. ## Data - **Optional fields**: omit `#[serde(default)]` on an ordinary `Option` field, since derived `Deserialize` reads a missing key as `None`. A field using `with` or `deserialize_with` may need an explicit default. +- **Boolean flags**: for `bool` fields that default to `false`, use `#[serde(skip_serializing_if = "std::ops::Not::not")]` to omit `false` values when serializing. ## Strings - **Raw literals**: use a raw string when its content would otherwise need escaping, with the fewest `#` delimiters that work. - **Multiline text**: when the project uses `indoc`, use `indoc!` for literals, `formatdoc!` for formatted text, and `writedoc!` with a writer to keep the content indented with its code. -- **Output lines**: in these macros, keep each output line on one source line, since reindenting a source continuation can change the de-indented text. Always place the closing quote on its own line. When no final newline is wanted, trim it with `.trim_end()` (or `.strip_suffix('\n')` when trailing whitespace is significant). +- **Output lines**: keep each output line on one source line and the macro's closing `}` on a new line. Put the closing quote at the end of the last content line to omit the trailing newline, or on its own line to include it. - **Captures**: capture format values inline by name, as in `{name}`. Bind an expression to a local named for its placeholder when it is not a plain identifier, so the template reads on its own. ## Dependencies diff --git a/plugins/hakula-workflow/.claude-plugin/plugin.json b/plugins/hakula-workflow/.claude-plugin/plugin.json index 7ad5fd9..ec535bc 100644 --- a/plugins/hakula-workflow/.claude-plugin/plugin.json +++ b/plugins/hakula-workflow/.claude-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "hakula-workflow", - "version": "2.1.18", + "version": "2.1.19", "description": "Git, release, review, and code-layout conventions for coding agents", "author": { "name": "Hakula", "url": "https://hakula.xyz" }, "repository": "https://github.com/hakulab/plugins", diff --git a/plugins/hakula-workflow/skills/code-layout/SKILL.md b/plugins/hakula-workflow/skills/code-layout/SKILL.md index c39fc6b..025b873 100644 --- a/plugins/hakula-workflow/skills/code-layout/SKILL.md +++ b/plugins/hakula-workflow/skills/code-layout/SKILL.md @@ -16,7 +16,7 @@ A code move preserves behavior while making any needed layout and ordering fixes ## Line breaks -- Wrap code and comments at the project's line limit for the language, counting the indent. Hand-wrap comments because formatters rarely reflow them, and rewrap moved comments toward that limit at their new indent depth. Keep a one-line string literal and any table row holding one unbroken at any length. +- Wrap code and comments at the project's line limit for the language, counting the indent. Hand-wrap comments because formatters rarely reflow them, and rewrap moved comments toward that limit at their new indent depth. Keep existing breaks between complete sentences when the lines fit and reflowing would save no lines. Keep a one-line string literal and any table row holding one unbroken at any length. - Keep each table row on one line. - When an external call or argument list has two or more options (bare flags included), keep the command, subcommands, and positionals on the first line, and put each option with its value on its own line one level deeper in the order its parser requires. A mode-selecting flag like `install -d` stays with the command like a subcommand, and a clustered bundle such as `tar -czf` stays whole. Options that the parser requires before a subcommand nest under the command, followed by the subcommand line. Keep a call with at most one option, and a builtin's switches, on one line. - A wrapped command starts a deeper line, with its own options nested under it. @@ -32,6 +32,7 @@ A code move preserves behavior while making any needed layout and ordering fixes - An entry added to an existing sequence follows the spacing and grouping its siblings use. - Before adding code to a file with section banners, read the banners around the insertion point and place the code under the section that owns its concern, not after whatever code it happens to follow. Give a concern no section owns its own section. - Order parameters and fields for readability: group related items, put dependencies before dependents, fall back to alphabetical order, and let API and project conventions win. +- Place callers before their helpers and order sibling helpers by first call. Arrange sibling handlers in dispatch order, following the match arms when present. Keep their tests and those of sibling helpers in the same sequence as the functions they cover. - Group tests by behavior in the order the code runs, and within each behavior put the normal case first, even where a guard checks an error case before it. ## Embedded code and text diff --git a/plugins/hakula-workflow/skills/git-workflow/SKILL.md b/plugins/hakula-workflow/skills/git-workflow/SKILL.md index 8c9f243..e9f16d9 100644 --- a/plugins/hakula-workflow/skills/git-workflow/SKILL.md +++ b/plugins/hakula-workflow/skills/git-workflow/SKILL.md @@ -129,6 +129,7 @@ When no repository template overrides the structure, use this layout (omitting ` 4. If `mergeStateStatus` reads `BEHIND`, refresh the target branch and rebase the request branch onto it, following the ownership and push safeguards in [Publication](#publication). Repeat steps 2 and 3 on the new head. 5. Merge with the repository's merge method at that head, such as `gh pr merge --squash --match-head-commit `. Never pass `--auto`, and pass `--admin` only where the repository documents it. 6. After the merge, verify the remote state and confirm CI passes on the target branch, using `gh run watch --interval 60 --exit-status` on GitHub. For GitHub squash merges, keep GitHub's default commit message. Report a merge queued by GitLab's default auto-merge as pending until it lands. +7. For each issue linked by `Closes #N` or `Refs #N`, verify which acceptance criteria the merged change satisfies. Mark newly satisfied items `- [x]` in the issue body and leave unmet items unchecked. ## Conflict resolution