Imported from YamabikoLab/logcut (
AGENTS.md). Install upstream withnpx skills add YamabikoLab/logcut. Copyright stays with the author.
Repository Guidance
These instructions apply to the entire repository.
More specific AGENTS.md files add only directory-specific guidance.
Scope
- Keep
logcuta small command-line tool. - Preserve existing CLI behavior unless the task explicitly changes it.
- Treat the README and implemented behavior as the current source of truth.
- Do not add speculative features, frameworks, or abstractions.
- Keep changes focused and easy to review.
Toolchain
- Maintain compatibility with Rust 1.70 or later.
- Use Rust 2021 Edition.
- Prefer the standard library over new dependencies.
- Add a dependency only when it clearly reduces risk or complexity.
- Keep
Cargo.lockcommitted and use locked builds.
Repository Files
- Follow existing style in Rust, TOML, YAML, Shell, and Markdown files.
- Keep Cargo and workflow configuration direct and explicit.
- In workflow Shell, fail on errors and avoid masking command failures.
- Do not print secrets, tokens, credentials, or sensitive environment values.
- Do not commit generated artifacts, retained logs, or local credentials.
- Update documentation only when user-facing behavior or commands change.
Release Versioning
- For each Issue implementation, increment the patch version unless another version is explicitly specified.
- Keep version references aligned in
Cargo.toml,Cargo.lock,README.md, and.github/workflows/release.yml. - Add
.github/release-notes/vX.Y.Z.mdfor the new version. - Briefly describe the changes and compatibility impact in the release notes.
Change Discipline
- Avoid unrelated cleanup while implementing a focused task.
- Do not rename public commands, profiles, or environment variables casually.
- Preserve supported exit codes and documented defaults.
- Prefer a small direct implementation over a reusable system without a current need.
- Add or update tests when observable behavior changes.
Validation
Run the applicable checks before completing a change:
cargo fmt --check
cargo test --locked
cargo clippy --all-targets --all-features --locked -- -D warnings
cargo build --release --locked
Report any check that could not be run and the reason.
