Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 2 additions & 12 deletions src/AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,23 +71,13 @@ This is a high-performance library. Optimize aggressively.
All must pass without warnings:

```bash
# Test async mode (default)
cargo build -p llm-coding-tools-core && cargo build -p llm-coding-tools-rig --quiet
cargo test -p llm-coding-tools-core && cargo test -p llm-coding-tools-rig --quiet
cargo clippy -p llm-coding-tools-core && cargo clippy -p llm-coding-tools-rig --quiet -- -D warnings

# Test blocking mode (llm-coding-tools-core only, rig is inherently async)
cargo test -p llm-coding-tools-core --no-default-features --features blocking --quiet

cargo doc --workspace --no-deps --quiet
cargo fmt --all --quiet
cargo build -p llm-coding-tools-core && cargo build -p llm-coding-tools-rig --quiet && cargo test -p llm-coding-tools-core && cargo test -p llm-coding-tools-rig --quiet && cargo clippy -p llm-coding-tools-core && cargo clippy -p llm-coding-tools-rig --quiet -- -D warnings && cargo test -p llm-coding-tools-core --no-default-features --features blocking --quiet && cargo doc --workspace --no-deps --quiet && cargo fmt --all --quiet
```
Comment on lines +74 to 75
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash

echo "=== Checking cargo fmt --help ==="
cargo fmt --help 2>&1 | head -50

echo ""
echo "=== Checking for --quiet and --check flags in cargo fmt ==="
cargo fmt --help 2>&1 | grep -E '^\s+(--quiet|--check)' || echo "Not found in flag list"

echo ""
echo "=== Checking cargo publish --help for --quiet ==="
cargo publish --help 2>&1 | grep -E '^\s+(-q|--quiet)' || echo "No --quiet flag found"

echo ""
echo "=== Checking what cargo fmt --all does by default ==="
cargo fmt --help 2>&1 | grep -A 3 "Formats"

Repository: Sewer56/llm-coding-tools

Length of output: 423


🌐 Web query:

cargo fmt --quiet flag support rust

💡 Result:

Yes — cargo fmt accepts the common Cargo quiet flag -q / --quiet (it suppresses Cargo log messages). [1][2]

Sources:

  • Cargo documentation (common display options including -q / --quiet). [1]
  • cargo-fmt manpage (lists --quiet / -q). [2]

🌐 Web query:

cargo fmt --check flag rust formatting verification

💡 Result:

Short answer

  • cargo fmt --check runs rustfmt in "check" mode and does not rewrite files; it exits 0 if everything is already formatted and non‑zero if any file needs formatting (so it's suitable for CI). [1][2]

Notes and examples

  • You can pass the check flag either directly (cargo fmt --check) or to rustfmt after -- (cargo fmt -- --check); both are used in practice. [2][1]
  • Typical CI usage: cargo fmt --all -- --check (or cargo fmt --all --check). If rustfmt is missing, install with rustup component add rustfmt. [1][3]

References

  • rustfmt (rust-lang/rustfmt) — verifying code is formatted (exit codes, --check). [1]
  • StackOverflow discussion on cargo fmt --check vs cargo fmt -- --check. [2]
  • Quick usage / CI examples (rustfmt / cargo fmt instructions). [3]

🌐 Web query:

cargo publish --dry-run --quiet flag support

💡 Result:

Yes — cargo publish accepts the common --quiet / -q flag (including when used with --dry-run). See the Cargo docs for cargo-publish which list -q / --quiet and --dry-run. [1][2]

Sources:

  • Cargo Book: cargo publish command (lists -q / --quiet and --dry-run). [1]
  • Alternate Cargo docs page (also documents --dry-run and common options). [2]

Inconsistent clippy configuration and missing --check for fmt verification.

  1. Missing -D warnings for core crate clippy: cargo clippy -p llm-coding-tools-core lacks the -D warnings flag, while cargo clippy -p llm-coding-tools-rig --quiet -- -D warnings includes it. Both crates must fail the build on clippy warnings.

  2. Use --check for cargo fmt in verification context: cargo fmt --all modifies files in-place. Since this is a verification command chain, use cargo fmt --all -- --check to verify formatting without making changes.

🔧 Proposed fix
-cargo build -p llm-coding-tools-core && cargo build -p llm-coding-tools-rig --quiet && cargo test -p llm-coding-tools-core && cargo test -p llm-coding-tools-rig --quiet && cargo clippy -p llm-coding-tools-core && cargo clippy -p llm-coding-tools-rig --quiet -- -D warnings && cargo test -p llm-coding-tools-core --no-default-features --features blocking --quiet && cargo doc --workspace --no-deps --quiet && cargo fmt --all --quiet
+cargo build -p llm-coding-tools-core && cargo build -p llm-coding-tools-rig --quiet && cargo test -p llm-coding-tools-core && cargo test -p llm-coding-tools-rig --quiet && cargo clippy -p llm-coding-tools-core -- -D warnings && cargo clippy -p llm-coding-tools-rig --quiet -- -D warnings && cargo test -p llm-coding-tools-core --no-default-features --features blocking --quiet && cargo doc --workspace --no-deps --quiet && cargo fmt --all -- --check --quiet
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
cargo build -p llm-coding-tools-core && cargo build -p llm-coding-tools-rig --quiet && cargo test -p llm-coding-tools-core && cargo test -p llm-coding-tools-rig --quiet && cargo clippy -p llm-coding-tools-core && cargo clippy -p llm-coding-tools-rig --quiet -- -D warnings && cargo test -p llm-coding-tools-core --no-default-features --features blocking --quiet && cargo doc --workspace --no-deps --quiet && cargo fmt --all --quiet
```
cargo build -p llm-coding-tools-core && cargo build -p llm-coding-tools-rig --quiet && cargo test -p llm-coding-tools-core && cargo test -p llm-coding-tools-rig --quiet && cargo clippy -p llm-coding-tools-core -- -D warnings && cargo clippy -p llm-coding-tools-rig --quiet -- -D warnings && cargo test -p llm-coding-tools-core --no-default-features --features blocking --quiet && cargo doc --workspace --no-deps --quiet && cargo fmt --all --check --quiet
🤖 Prompt for AI Agents
In `@src/AGENTS.md` around lines 74 - 75, Update the verification command chain so
both crates run clippy with warnings treated as errors and formatting is checked
rather than applied: add the `-D warnings` argument to `cargo clippy -p
llm-coding-tools-core` (to match `cargo clippy -p llm-coding-tools-rig --quiet
-- -D warnings`) and replace `cargo fmt --all --quiet` with `cargo fmt --all --
--check` so `cargo fmt` only verifies formatting; adjust the single-line
sequence accordingly to use these flags.


Note: `llm-coding-tools-rig` is async-only (implements rig's async `Tool` trait).
The `blocking` feature only applies to `llm-coding-tools-core`.

For individual crates:
```bash
cargo publish --dry-run -p llm-coding-tools-core --quiet
cargo publish --dry-run -p llm-coding-tools-rig --quiet
cargo publish --dry-run -p llm-coding-tools-core --quiet && cargo publish --dry-run -p llm-coding-tools-rig --quiet
```