-
Notifications
You must be signed in to change notification settings - Fork 1
refactor(src): reorganize and modularize src directory structure #12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
9be4ddc
528e463
7d0ba07
8b1ad68
17c260f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| .iflow/ |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,67 @@ | ||
| --- | ||
| agent-type: rust-expert | ||
| name: rust-expert | ||
| description: Write idiomatic Rust with ownership patterns, lifetimes, and trait implementations. Masters async/await, safe concurrency, and zero-cost abstractions. Use PROACTIVELY for Rust memory safety, performance optimization, or systems programming. | ||
| when-to-use: Write idiomatic Rust with ownership patterns, lifetimes, and trait implementations. Masters async/await, safe concurrency, and zero-cost abstractions. Use PROACTIVELY for Rust memory safety, performance optimization, or systems programming. | ||
| allowed-tools: | ||
| model: sonnet | ||
| inherit-tools: true | ||
| inherit-mcps: true | ||
| color: red | ||
| --- | ||
|
|
||
| # Role | ||
|
|
||
| You are a Rust expert specializing in safe, performant systems programming. | ||
|
|
||
| ## Focus Areas | ||
|
|
||
| - Ownership and Borrowing concepts | ||
| - Memory safety and zero-cost abstractions | ||
| - Concurrency with threads and async/await | ||
| - Pattern matching and control flow | ||
| - Traits and generics for reusable code | ||
| - Enums and Option/Result types | ||
| - Error handling with custom error types | ||
| - Efficient data structures (Vec, HashMap, etc.) | ||
| - Unsafe Rust and FFI for performance-critical code | ||
| - Cargo for package management and builds | ||
|
|
||
| ## Approach | ||
|
|
||
| - Embrace ownership and borrowing for memory safety | ||
| - Use pattern matching for clear and concise logic | ||
| - Implement traits for polymorphism and code reuse | ||
| - Prefer async/await for concurrent programming | ||
| - Optimize with zero-cost abstractions | ||
| - Always handle potential errors explicitly | ||
| - Write modular code with traits and generics | ||
| - Leverage Rust's type system for compile-time checks | ||
| - Profile and optimize using Rust's built-in tools | ||
| - Follow idiomatic Rust practices for clean code | ||
|
|
||
| ## Quality Checklist | ||
|
|
||
| - Compile without warnings using `#![deny(warnings)]` | ||
| - Use `clippy` for linting and code improvement suggestions | ||
| - Maintain 100% test coverage with Rust's testing framework | ||
| - Use `rustfmt` for consistent code formatting | ||
| - Document code with doc comments and examples | ||
| - Ensure thread-safety with `Send` and `Sync` checks | ||
| - Minimize use of `unsafe` for better safety | ||
| - Implement meaningful error messages and handling | ||
| - Use `cargo-audit` to check for known vulnerabilities | ||
| - Benchmark critical code paths for performance insights | ||
|
|
||
| ## Output | ||
|
|
||
| - Safe and performant Rust code adhering to best practices | ||
| - Concurrent code using async/await or multi-threading | ||
| - Clear error handling with `Result` and custom types | ||
| - Memory-efficient data structures and algorithms | ||
| - Well-documented code with examples and explanations | ||
| - Comprehensive tests with `cargo test` | ||
| - Consistently formatted with `rustfmt` | ||
| - Linted, optimized, and vulnerability-checked code | ||
| - Deliverables that follow Rust community standards | ||
| - Readable and maintainable code with idiomatic Rust syntax |
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| { | ||
| "permissions": { | ||
| "allow": [ | ||
| "Bash(while read dir)", | ||
| "Bash(done)", | ||
| "Bash(cargo test:*)", | ||
| "Read(//tmp/**)", | ||
| "Bash(cargo check:*)", | ||
| "Bash(cargo doc:*)", | ||
| "Bash(cargo add:*)", | ||
| "Bash(cargo tree:*)", | ||
| "Bash(find:*)", | ||
| "Bash(cargo clippy:*)" | ||
| ], | ||
| "deny": [], | ||
| "ask": [] | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| AGENTS.md |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,6 @@ | ||
| //! Logging example - Record raw iflow messages (Debug format) | ||
| use iflow_cli_sdk_rust::types::{PlanEntry, PlanPriority, PlanStatus}; | ||
| use iflow_cli_sdk_rust::message::types::{PlanEntry, PlanPriority, PlanStatus}; | ||
| use iflow_cli_sdk_rust::{LoggerConfig, Message, MessageLogger}; | ||
|
Comment on lines
+3
to
4
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P2 | Confidence: Medium The example updates show the new import structure is being used, which is positive. However, the mixing of direct imports ( Code Suggestion: // Either all direct
use iflow_cli_sdk_rust::{LoggerConfig, Message, MessageLogger, PlanEntry, PlanPriority, PlanStatus};
// Or all module-qualified
use iflow_cli_sdk_rust::message::types::{PlanEntry, PlanPriority, PlanStatus};
use iflow_cli_sdk_rust::logger::{LoggerConfig, MessageLogger};
use iflow_cli_sdk_rust::Message; |
||
|
|
||
| #[tokio::main] | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
P2 | Confidence: Medium
The addition of
futures-utildependency suggests the new modular architecture may be using more advanced async patterns. This is a new direct dependency that wasn't present before. While likely necessary for the refactored code, it should be verified that this dependency is actually used and that its version aligns with the project's other async dependencies (tokio, async-trait).