Skip to content

Add a Rust-focused Vigilante issue-implementation skill with cargo, clippy, fmt, and security guidance #358

@nicobistolfi

Description

@nicobistolfi

Summary

Vigilante should support Rust repositories with a dedicated Rust-focused issue-implementation skill that teaches coding agents to work idiomatically in Rust, use Cargo and standard Rust tooling correctly, and account for current Rust security and supply-chain practices during normal implementation work.

Problem

  • Vigilante currently has no Rust-specific implementation skill, so coding agents can miss important Rust-specific validation and safety workflows.
  • Without explicit Rust guidance, agents are more likely to skip or misuse cargo fmt, cargo clippy, targeted cargo test, dependency auditing, feature-flag hygiene, and careful handling of unsafe code.
  • Rust repos usually have a strong standard toolchain, so the lack of a dedicated skill is an avoidable gap.

Context

  • The Cargo and Clippy documentation reflect the standard Rust workflow around formatting, linting, testing, and package management.
  • Rust best practices are unusually toolable: cargo fmt, cargo clippy, cargo test, and dependency review tools fit naturally into an implementation skill.
  • The Rust skill should remain implementation-focused and avoid broad rewrites that are not needed to complete the issue.

Reference Material

Desired Outcome

  • Vigilante can detect Rust repositories and attach a Rust-specific implementation skill or equivalent prompt layer.
  • The guidance tells the coding agent to use idiomatic Cargo workflows for formatting, linting, testing, and dependency/security checks.
  • The guidance is concise and actionable and does not broaden unrelated scope.
  • Existing operational policies, including vigilante commit, remain intact.

Implementation Notes

  • Detect Rust repositories using signals such as Cargo.toml, Cargo.lock, rust-toolchain.toml, or standard workspace layout.
  • Distill Rust-specific execution rules for coding agents. Required areas to cover include:
    • formatting with cargo fmt
    • linting with cargo clippy when available and relevant
    • testing with targeted cargo test first, then broader scope when needed
    • security and supply-chain checks such as cargo-audit or cargo-deny when available and relevant
    • careful handling of unsafe, feature flags, error handling, panics, and dependency additions
    • respecting repo-specific MSRV, workspace configuration, and lint settings where defined
  • Preserve repo-specific instructions as authoritative over generic Rust guidance.
  • Preserve commit-path constraints: use vigilante commit only.

Acceptance Criteria

  • Vigilante can recognize Rust repositories and attach Rust-specific implementation guidance.
  • A dedicated Rust-focused implementation skill or equivalent prompt layer exists.
  • The Rust guidance covers cargo fmt, cargo test, cargo clippy, and dependency/security checks where relevant.
  • The Rust guidance includes safety expectations for unsafe, error handling, and dependency hygiene.
  • Existing issue-comment, validation-reporting, push/PR, and vigilante commit policies continue to apply.

Testing Expectations

  • Add or update tests for Rust repository detection and skill or prompt selection.
  • Add or update tests for prompt content so Rust repositories receive expected Cargo/tooling guidance and unrelated repositories do not.
  • Cover regressions where the Rust guidance is missing or incorrectly injected.

Operational / UX Considerations

  • Prefer the repository's existing Cargo workspace and lint configuration over generic defaults.
  • Do not assume optional tools such as cargo-audit or cargo-deny are installed unless the repo already uses them.

Metadata

Metadata

Assignees

Labels

codexRoutes the issue to the Codex provider for execution.vigilante:doneVigilante completed its work on the issue and no further automation is expected.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions