From 4b6b5e1efb743d15f04ef723d73a5130a0d6aed3 Mon Sep 17 00:00:00 2001 From: Andrea Frigido Date: Wed, 6 May 2026 21:09:16 +0100 Subject: [PATCH 1/5] chore: add pi skills and extensions, update dependencies --- .agents/skills/checker/SKILL.md | 33 ++++++ .agents/skills/pusher/SKILL.md | 77 +++++++++++++ .pi/extensions/cargo-clippy.ts | 136 ++++++++++++++++++++++ Cargo.lock | 192 ++++++++++++-------------------- Cargo.toml | 8 ++ flake.lock | 6 +- flake.nix | 1 + 7 files changed, 331 insertions(+), 122 deletions(-) create mode 100644 .agents/skills/checker/SKILL.md create mode 100644 .agents/skills/pusher/SKILL.md create mode 100644 .pi/extensions/cargo-clippy.ts diff --git a/.agents/skills/checker/SKILL.md b/.agents/skills/checker/SKILL.md new file mode 100644 index 0000000..4b37f08 --- /dev/null +++ b/.agents/skills/checker/SKILL.md @@ -0,0 +1,33 @@ +--- +name: checker +description: Runs the same CI checks as the GitHub CI workflow locally. Use this skill before pushing commits to verify the code passes all CI checks. +--- + +# Checker Skill + +This skill runs the same checks as the GitHub CI workflow. + +## Description + +Reads the GitHub CI workflow file and executes exactly the same checks locally. + +## When to use + +Use this skill before pushing commits to verify the code passes all CI checks locally. + +## Implementation + +When this skill is invoked, perform the following steps: + +### Step 1: Read the CI workflow +Read `.github/workflows/ci.yaml` to identify the checks to run. + +### Step 2: Execute the CI checks +Run exactly the same commands defined in the workflow file. + +If any check fails, fix the issues and rerun until all checks pass. + +## Output + +- Print results of each check +- If any check fails, print the failure details diff --git a/.agents/skills/pusher/SKILL.md b/.agents/skills/pusher/SKILL.md new file mode 100644 index 0000000..2d5e5cd --- /dev/null +++ b/.agents/skills/pusher/SKILL.md @@ -0,0 +1,77 @@ +--- +name: pusher +description: Stages, commits, and pushes changes to git. Runs cargo fmt before staging to ensure code is properly formatted. Creates a branch if on main and creates a PR if none exists. +--- + +# Pusher Skill + +This skill stages, commits, and pushes changes to git. + +## Essential Rule + +**NEVER commit or push directly to the main branch.** Always create a feature branch first. + +## Description + +Format the source code with cargo fmt, then stage changes with git add, create a commit with git commit, and push to the remote with git push. Ensures changes are never pushed directly to main branch - creates a branch if on main, and creates a PR if none exists for the branch. + +## When to use + +Use this skill when you want to commit and push changes to the repository. + + +## Implementation + +When this skill is invoked, perform the following steps: + +### Step 1: Check current branch +Run `git branch --show-current` to determine the current branch. + +### Step 2: Handle main branch (REQUIRED) +If on main branch: +- Changes to main brnach are **NOT allowed** +- Create a feature brach but do not ask the user for a new branch name +- Generate a branch name automatically based on the changes: + - Check git status or diff to understand what changed + - Use format: `/` where type is: feature/, fix/, refactor/, docs/, test/ + - Example: if adding tests, use `test/add-phase5-integration-tests` +- Create and checkout the new branch with `git checkout -b ` +- Set upstream with `git push -u origin ` + +### Step 3: Format the source code +Run `cargo fmt -- --check` to check if the code is formatted correctly. + +If the code is not formatted correctly, run `cargo fmt` to format it automatically. + +### Step 4: Stage the changes +Run `git add -A` to stage all changes. + +### Step 5: Check the status +Run `git status` to see what will be committed. + +### Step 6: Create a commit +Run `git commit` with an auto-generated commit message: +- Derive the message from the changes: summarize what files were changed and what was done +- Use conventional commit format: `: ` where type is: feat, fix, refactor, docs, test, chore +- Examples: + - "test: add phase5 integration tests for admin auth and blog multilingual" + - "refactor: centralize validation code in admin_auth middleware" + - "feat: add lang Tera function for view context" + +### Step 7: Push to the remote +Run `git push` to push the commit to the remote repository. + +### Step 8: Create a PR if none exists +Check if a PR already exists for the branch: +- Run `gh pr list --head ` to check for existing PR +- If no PR exists, create one automatically: + - Generate a title from the branch name (convert to title case, e.g., `test/add-phase5-integration-tests` → "Add phase5 integration tests") + - Generate a body summarizing the changes: list the files changed and summarize the commit message + - Use `gh pr create --title "" --body "<body>"` + +## Output + +- Print the result of each step +- If any step fails, print the error and stop +- Print the commit SHA after a successful push +- Print the PR URL after creating a PR diff --git a/.pi/extensions/cargo-clippy.ts b/.pi/extensions/cargo-clippy.ts new file mode 100644 index 0000000..f31225f --- /dev/null +++ b/.pi/extensions/cargo-clippy.ts @@ -0,0 +1,136 @@ +import type { ExtensionAPI } from "@mariozechner/pi-coding-agent"; +import { isToolCallEventType } from "@mariozechner/pi-coding-agent"; + +export default function (pi: ExtensionAPI) { + // Track edited files per session (all turns) - use Set to deduplicate + const editedRustFiles = new Set<string>(); + // Track if clippy has already run for current changes + let clippyRan = false; + + // Track file edits throughout the session + pi.on("tool_call", async (event, ctx) => { + // Check for edit tool + if (isToolCallEventType("edit", event)) { + const path = event.input.path; + if (path.endsWith(".rs")) { + editedRustFiles.add(path); + // ctx.ui.notify(`Tracked rust file: ${path}`, "info"); + // New edits mean we need to run clippy again + clippyRan = false; + } + } + + // Check for write tool + if (isToolCallEventType("write", event)) { + const path = event.input.path; + if (path.endsWith(".rs")) { + editedRustFiles.add(path); + // ctx.ui.notify(`Tracked rust file: ${path}`, "info"); + // New edits mean we need to run clippy again + clippyRan = false; + } + } + }); + + // Run check and clippy only at the end of the agent processing (agent_end) + // This fires once per user prompt, after all turns are complete + pi.on("agent_end", async (event, ctx) => { + // Skip if no Rust files were edited + if (editedRustFiles.size === 0) { + return; + } + + // Skip if clippy already ran for current changes + if (clippyRan) { + return; + } + + // Mark that we've run clippy - will reset if new edits happen in next prompt + clippyRan = true; + + const uniqueFiles = [...editedRustFiles]; + ctx.ui.notify(`🔍 Running cargo check on ${uniqueFiles.length} edited file(s): ${uniqueFiles.join(", ")}`, "info"); + + // First, run cargo check to catch compilation errors + ctx.ui.notify(`🔨 Running cargo check...`, "info"); + + const checkResult = await pi.exec("cargo", ["check", "-q"], { + cwd: ctx.cwd, + timeout: 120000, // 2 minutes + }); + + // If there are compilation errors, force agent to fix them + if (checkResult.code !== 0) { + const output = checkResult.stderr || checkResult.stdout; + + ctx.ui.notify(`❌ Compilation errors found!`, "error"); + ctx.ui.notify(output, "error"); + + // Pass raw output to the LLM asking to fix + await pi.sendUserMessage([ + { + type: "text", + text: `Fix the following Rust compilation errors:\n\n${output}\n\nRun \`cargo check\` to verify after fixing.` + } + ], { deliverAs: "followUp" }); + + // Keep tracking - agent needs to fix + clippyRan = false; + return; + } + + ctx.ui.notify(`✅ Cargo check passed!`, "success"); + + ctx.ui.notify(`🔧 Running cargo clippy...`, "info"); + + // Try to auto-fix issues with cargo clippy --fix + const fixResult = await pi.exec("cargo", [ + "clippy", + "--fix", + "--allow-dirty", + "--allow-staged", + ], { + cwd: ctx.cwd, + timeout: 180000, // 3 minutes + }); + + // Check if any fixes were applied + if (fixResult.stdout.includes("Fixed") || fixResult.stderr.includes("Fixed")) { + ctx.ui.notify("✅ Applied clippy fixes automatically", "success"); + } + + // Now run clippy to check for issues + const clippyResult = await pi.exec("cargo", [ + "clippy", + "-q", // no compilation messages + "--all-features" + ], { + cwd: ctx.cwd, + timeout: 120000, // 2 minutes + }); + + // If clippy found issues, force agent to fix them + if (clippyResult.code !== 0) { + const output = clippyResult.stderr || clippyResult.stdout; + + ctx.ui.notify(`⚠️ Clippy found issues!`, "warning"); + ctx.ui.notify(output, "warning"); + + // Pass raw output to the LLM asking to fix + await pi.sendUserMessage([ + { + type: "text", + text: `Fix the following clippy warnings/errors:\n\n${output}\n\nRun \`cargo clippy --all-features\` to verify after fixing.` + } + ], { deliverAs: "followUp" }); + + // Keep tracking - agent needs to fix + clippyRan = false; + } else { + ctx.ui.notify(`✅ Cargo clippy passed!`, "success"); + + // Clear tracking now that we're done + editedRustFiles.clear(); + } + }); +} \ No newline at end of file diff --git a/Cargo.lock b/Cargo.lock index b483a78..366f28f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -168,12 +168,6 @@ dependencies = [ "shlex", ] -[[package]] -name = "cesu8" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d43a04d8753f35258c91f8ec639f792891f748a1edbd759cf1dcea3382ad83c" - [[package]] name = "cfg-if" version = "1.0.4" @@ -808,9 +802,9 @@ dependencies = [ [[package]] name = "idna_adapter" -version = "1.2.1" +version = "1.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3acae9609540aa318d1bc588455225fb2085b9ed0c4f6bd0d9d5bcd86f1a0344" +checksum = "cb68373c0d6620ef8105e855e7745e18b0d00d3bdb07fb532e434244cdb9a714" dependencies = [ "icu_normalizer", "icu_properties", @@ -822,16 +816,6 @@ version = "2.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d98f6fed1fde3f8c21bc40a1abb88dd75e67924f9cffc3ef95607bad8017f8e2" -[[package]] -name = "iri-string" -version = "0.7.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25e659a4bb38e810ebc252e53b5814ff908a8c58c2a9ce2fae1bbec24cbf4e20" -dependencies = [ - "memchr", - "serde", -] - [[package]] name = "is_terminal_polyfill" version = "1.70.2" @@ -879,27 +863,32 @@ dependencies = [ [[package]] name = "jni" -version = "0.21.1" +version = "0.22.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a87aa2bb7d2af34197c04845522473242e1aa17c12f4935d5856491a7fb8c97" +checksum = "5efd9a482cf3a427f00d6b35f14332adc7902ce91efb778580e180ff90fa3498" dependencies = [ - "cesu8", "cfg-if", "combine", - "jni-sys 0.3.1", + "jni-macros", + "jni-sys", "log", - "thiserror 1.0.69", + "simd_cesu8", + "thiserror 2.0.18", "walkdir", - "windows-sys 0.45.0", + "windows-link", ] [[package]] -name = "jni-sys" -version = "0.3.1" +name = "jni-macros" +version = "0.22.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41a652e1f9b6e0275df1f15b32661cf0d4b78d4d87ddec5e0c3c20f097433258" +checksum = "a00109accc170f0bdb141fed3e393c565b6f5e072365c3bd58f5b062591560a3" dependencies = [ - "jni-sys 0.4.1", + "proc-macro2", + "quote", + "rustc_version", + "simd_cesu8", + "syn", ] [[package]] @@ -933,9 +922,9 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.95" +version = "0.3.97" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2964e92d1d9dc3364cae4d718d93f227e3abb088e747d92e0395bfdedf1c12ca" +checksum = "a1840c94c045fbcf8ba2812c95db44499f7c64910a912551aaaa541decebcacf" dependencies = [ "cfg-if", "futures-util", @@ -1249,9 +1238,9 @@ checksum = "dc897dd8d9e8bd1ed8cdad82b5966c3e0ecae09fb1907d58efaa013543185d0a" [[package]] name = "reqwest" -version = "0.13.2" +version = "0.13.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab3f43e3283ab1488b624b44b0e988d0acea0b3214e694730a055cb6b2efa801" +checksum = "62e0021ea2c22aed41653bc7e1419abb2c97e038ff2c33d0e1309e49a97deec0" dependencies = [ "base64", "bytes", @@ -1304,6 +1293,15 @@ version = "2.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "94300abf3f1ae2e2b8ffb7b58043de3d399c73fa6f4b73826402a5c457614dbe" +[[package]] +name = "rustc_version" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" +dependencies = [ + "semver", +] + [[package]] name = "rustix" version = "1.1.4" @@ -1319,9 +1317,9 @@ dependencies = [ [[package]] name = "rustls" -version = "0.23.39" +version = "0.23.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c2c118cb077cca2822033836dfb1b975355dfb784b5e8da48f7b6c5db74e60e" +checksum = "ef86cd5876211988985292b91c96a8f2d298df24e75989a43a3c73f2d4d8168b" dependencies = [ "aws-lc-rs", "once_cell", @@ -1355,9 +1353,9 @@ dependencies = [ [[package]] name = "rustls-platform-verifier" -version = "0.6.2" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d99feebc72bae7ab76ba994bb5e121b8d83d910ca40b36e0921f53becc41784" +checksum = "26d1e2536ce4f35f4846aa13bff16bd0ff40157cdb14cc056c7b14ba41233ba0" dependencies = [ "core-foundation", "core-foundation-sys", @@ -1445,6 +1443,12 @@ dependencies = [ "libc", ] +[[package]] +name = "semver" +version = "1.0.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a7852d02fc848982e0c167ef163aaff9cd91dc640ba85e263cb1ce46fae51cd" + [[package]] name = "serde" version = "1.0.228" @@ -1494,6 +1498,22 @@ version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" +[[package]] +name = "simd_cesu8" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94f90157bb87cddf702797c5dadfa0be7d266cdf49e22da2fcaa32eff75b2c33" +dependencies = [ + "rustc_version", + "simdutf8", +] + +[[package]] +name = "simdutf8" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3a9fe34e3e7a50316060351f37187a3f546bce95496156754b601a5fa71b76e" + [[package]] name = "slab" version = "0.4.12" @@ -1642,9 +1662,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.52.1" +version = "1.52.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b67dee974fe86fd92cc45b7a95fdd2f99a36a6d7b0d431a231178d3d670bbcc6" +checksum = "110a78583f19d5cdb2c5ccf321d1290344e71313c6c37d43520d386027d18386" dependencies = [ "bytes", "libc", @@ -1693,20 +1713,20 @@ dependencies = [ [[package]] name = "tower-http" -version = "0.6.8" +version = "0.6.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4e6559d53cc268e5031cd8429d05415bc4cb4aefc4aa5d6cc35fbf5b924a1f8" +checksum = "68d6fdd9f81c2819c9a8b0e0cd91660e7746a8e6ea2ba7c6b2b057985f6bcb51" dependencies = [ "bitflags", "bytes", "futures-util", "http", "http-body", - "iri-string", "pin-project-lite", "tower", "tower-layer", "tower-service", + "url", ] [[package]] @@ -1830,9 +1850,9 @@ dependencies = [ [[package]] name = "wasm-bindgen" -version = "0.2.118" +version = "0.2.120" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bf938a0bacb0469e83c1e148908bd7d5a6010354cf4fb73279b7447422e3a89" +checksum = "df52b6d9b87e0c74c9edfa1eb2d9bf85e5d63515474513aa50fa181b3c4f5db1" dependencies = [ "cfg-if", "once_cell", @@ -1843,9 +1863,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-futures" -version = "0.4.68" +version = "0.4.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f371d383f2fb139252e0bfac3b81b265689bf45b6874af544ffa4c975ac1ebf8" +checksum = "af934872acec734c2d80e6617bbb5ff4f12b052dd8e6332b0817bce889516084" dependencies = [ "js-sys", "wasm-bindgen", @@ -1853,9 +1873,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.118" +version = "0.2.120" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eeff24f84126c0ec2db7a449f0c2ec963c6a49efe0698c4242929da037ca28ed" +checksum = "78b1041f495fb322e64aca85f5756b2172e35cd459376e67f2a6c9dffcedb103" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -1863,9 +1883,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.118" +version = "0.2.120" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d08065faf983b2b80a79fd87d8254c409281cf7de75fc4b773019824196c904" +checksum = "9dcd0ff20416988a18ac686d4d4d0f6aae9ebf08a389ff5d29012b05af2a1b41" dependencies = [ "bumpalo", "proc-macro2", @@ -1876,18 +1896,18 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.118" +version = "0.2.120" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fd04d9e306f1907bd13c6361b5c6bfc7b3b3c095ed3f8a9246390f8dbdee129" +checksum = "49757b3c82ebf16c57d69365a142940b384176c24df52a087fb748e2085359ea" dependencies = [ "unicode-ident", ] [[package]] name = "web-sys" -version = "0.3.95" +version = "0.3.97" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f2dfbb17949fa2088e5d39408c48368947b86f7834484e87b73de55bc14d97d" +checksum = "2eadbac71025cd7b0834f20d1fe8472e8495821b4e9801eb0a60bd1f19827602" dependencies = [ "js-sys", "wasm-bindgen", @@ -2002,15 +2022,6 @@ dependencies = [ "windows-link", ] -[[package]] -name = "windows-sys" -version = "0.45.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" -dependencies = [ - "windows-targets 0.42.2", -] - [[package]] name = "windows-sys" version = "0.52.0" @@ -2038,21 +2049,6 @@ dependencies = [ "windows-link", ] -[[package]] -name = "windows-targets" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" -dependencies = [ - "windows_aarch64_gnullvm 0.42.2", - "windows_aarch64_msvc 0.42.2", - "windows_i686_gnu 0.42.2", - "windows_i686_msvc 0.42.2", - "windows_x86_64_gnu 0.42.2", - "windows_x86_64_gnullvm 0.42.2", - "windows_x86_64_msvc 0.42.2", -] - [[package]] name = "windows-targets" version = "0.52.6" @@ -2086,12 +2082,6 @@ dependencies = [ "windows_x86_64_msvc 0.53.1", ] -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" - [[package]] name = "windows_aarch64_gnullvm" version = "0.52.6" @@ -2104,12 +2094,6 @@ version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a9d8416fa8b42f5c947f8482c43e7d89e73a173cead56d044f6a56104a6d1b53" -[[package]] -name = "windows_aarch64_msvc" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" - [[package]] name = "windows_aarch64_msvc" version = "0.52.6" @@ -2122,12 +2106,6 @@ version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b9d782e804c2f632e395708e99a94275910eb9100b2114651e04744e9b125006" -[[package]] -name = "windows_i686_gnu" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" - [[package]] name = "windows_i686_gnu" version = "0.52.6" @@ -2152,12 +2130,6 @@ version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fa7359d10048f68ab8b09fa71c3daccfb0e9b559aed648a8f95469c27057180c" -[[package]] -name = "windows_i686_msvc" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" - [[package]] name = "windows_i686_msvc" version = "0.52.6" @@ -2170,12 +2142,6 @@ version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e7ac75179f18232fe9c285163565a57ef8d3c89254a30685b57d83a38d326c2" -[[package]] -name = "windows_x86_64_gnu" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" - [[package]] name = "windows_x86_64_gnu" version = "0.52.6" @@ -2188,12 +2154,6 @@ version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c3842cdd74a865a8066ab39c8a7a473c0778a3f29370b5fd6b4b9aa7df4a499" -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" - [[package]] name = "windows_x86_64_gnullvm" version = "0.52.6" @@ -2206,12 +2166,6 @@ version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0ffa179e2d07eee8ad8f57493436566c7cc30ac536a3379fdf008f47f6bb7ae1" -[[package]] -name = "windows_x86_64_msvc" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" - [[package]] name = "windows_x86_64_msvc" version = "0.52.6" diff --git a/Cargo.toml b/Cargo.toml index 9d9f77b..b9af8a5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,6 +10,14 @@ readme = "README.md" edition = "2021" keywords = ["cli", "github", "code-review", "pull-request", "command-line"] +[lints.clippy] +pedantic = "allow" +nursery = "allow" + +[lints.rust] +warnings = "deny" + + [lib] name = "ateam" path = "src/lib.rs" diff --git a/flake.lock b/flake.lock index 20db77f..ae76b78 100644 --- a/flake.lock +++ b/flake.lock @@ -20,11 +20,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1776877367, - "narHash": "sha256-EHq1/OX139R1RvBzOJ0aMRT3xnWyqtHBRUBuO1gFzjI=", + "lastModified": 1777954456, + "narHash": "sha256-hGdgeU2Nk87RAuZyYjyDjFL6LK7dAZN5RE9+hrDTkDU=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "0726a0ecb6d4e08f6adced58726b95db924cef57", + "rev": "549bd84d6279f9852cae6225e372cc67fb91a4c1", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index edcf725..d3780e5 100644 --- a/flake.nix +++ b/flake.nix @@ -38,6 +38,7 @@ clippy rustfmt rust-analyzer + pi-coding-agent ] ++ ateam.buildInputs; }; }); From 92edff3cb706b4882c5e82de2883e24841e97208 Mon Sep 17 00:00:00 2001 From: Andrea Frigido <frisoft@users.noreply.github.com> Date: Wed, 6 May 2026 21:18:10 +0100 Subject: [PATCH 2/5] chore: relocate maintenance-pr skill to agents directory --- {.opencode => .agents}/skills/maintenance-pr/SKILL.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {.opencode => .agents}/skills/maintenance-pr/SKILL.md (100%) diff --git a/.opencode/skills/maintenance-pr/SKILL.md b/.agents/skills/maintenance-pr/SKILL.md similarity index 100% rename from .opencode/skills/maintenance-pr/SKILL.md rename to .agents/skills/maintenance-pr/SKILL.md From b3e310d794989626919f6bbcb87cc5d245b3b91f Mon Sep 17 00:00:00 2001 From: Andrea Frigido <frisoft@users.noreply.github.com> Date: Wed, 6 May 2026 21:29:06 +0100 Subject: [PATCH 3/5] fix: correct typo in CHANGELOG.md, bump version to v1.0.14 --- CHANGELOG.md | 6 +++++- Cargo.toml | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cb54ffd..db302c9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## v1.0.14 + +- Upgrade crates and system dependencies. + ## v1.0.13 - Upgrade crates. @@ -106,5 +110,5 @@ - Add --user option. - Add --batch-size option. - Add --include-drafts flag. -- Fix calculation of number of review and exclude author. +- Fix calculation of number of reviews and exclude author. - Fix calculation of number of approvals diff --git a/Cargo.toml b/Cargo.toml index b9af8a5..666a850 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ateam" -version = "1.0.13" +version = "1.0.14" authors = ["Andrea Frigido"] license = "MIT" description = "The tool that helps optimize the code review process." From 890ed9468f36e87772c2dd45185f4556ff0c4158 Mon Sep 17 00:00:00 2001 From: Andrea Frigido <frisoft@users.noreply.github.com> Date: Wed, 6 May 2026 21:39:46 +0100 Subject: [PATCH 4/5] feat: add release skill --- .agents/skills/release/SKILL.md | 43 +++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 .agents/skills/release/SKILL.md diff --git a/.agents/skills/release/SKILL.md b/.agents/skills/release/SKILL.md new file mode 100644 index 0000000..82ee4b8 --- /dev/null +++ b/.agents/skills/release/SKILL.md @@ -0,0 +1,43 @@ +--- +name: release +description: Creates a git tag to trigger the release workflow. The release workflow builds binaries, creates a GitHub Release, and publishes to crates.io. +--- + +# Release Skill + +This skill creates a git tag to trigger the release workflow. + +## Prerequisites + +Before using this skill, you must: +1. Bump the version in `Cargo.toml` +2. Update `CHANGELOG.md` with the new version and release notes +3. Commit and push those changes to the main branch + +## When to use + +Use this skill when you want to release a new version to crates.io. + +## Implementation + +When this skill is invoked, perform the following steps: + +### Step 1: Get the version +Run `grep -m1 '^version' Cargo.toml` to get the current version from Cargo.toml. + +### Step 2: Create the version tag +Create a git tag with the version from Step 4: +- Format: `v<version>` (e.g., `v1.0.14`) +- Run `git tag v<version>` + +### Step 3: Push the tag to remote +Push the tag to the remote repository: +- Run `git push origin v<version>` +- This triggers the release workflow in `.github/workflows/release.yml` + +## Output + +- Print the version found in Cargo.toml +- Print the tag created +- Print confirmation of the push +- Explain that the release workflow will automatically build, create GitHub Release, and publish to crates.io \ No newline at end of file From c2024b13274c117757fd82a9ef8082d1ee453807 Mon Sep 17 00:00:00 2001 From: Andrea Frigido <frisoft@users.noreply.github.com> Date: Wed, 6 May 2026 21:44:25 +0100 Subject: [PATCH 5/5] feat: add Step 4 to publish to crates.io in release skill --- .agents/skills/release/SKILL.md | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/.agents/skills/release/SKILL.md b/.agents/skills/release/SKILL.md index 82ee4b8..8f7c8f8 100644 --- a/.agents/skills/release/SKILL.md +++ b/.agents/skills/release/SKILL.md @@ -1,6 +1,6 @@ --- name: release -description: Creates a git tag to trigger the release workflow. The release workflow builds binaries, creates a GitHub Release, and publishes to crates.io. +description: Creates a git tag to trigger the release workflow. The release workflow builds binaries and creates a GitHub Release. This skill also publishes to crates.io. --- # Release Skill @@ -16,7 +16,7 @@ Before using this skill, you must: ## When to use -Use this skill when you want to release a new version to crates.io. +Use this skill when you want to release a new version to GitHub and crates.io. ## Implementation @@ -26,7 +26,7 @@ When this skill is invoked, perform the following steps: Run `grep -m1 '^version' Cargo.toml` to get the current version from Cargo.toml. ### Step 2: Create the version tag -Create a git tag with the version from Step 4: +Create a git tag with the version from Step 1: - Format: `v<version>` (e.g., `v1.0.14`) - Run `git tag v<version>` @@ -35,9 +35,14 @@ Push the tag to the remote repository: - Run `git push origin v<version>` - This triggers the release workflow in `.github/workflows/release.yml` +### Step 4: Publish to crates.io +Publish the package to crates.io: +- Run `cargo publish` + ## Output - Print the version found in Cargo.toml - Print the tag created -- Print confirmation of the push -- Explain that the release workflow will automatically build, create GitHub Release, and publish to crates.io \ No newline at end of file +- Print confirmation of the tag push +- Print the output of cargo publish +- Explain that the release workflow will automatically build and create GitHub Release