fabro/.fabro/skills/rust-style-guide/guidelines.md
Scott Werner 9af0296469
Add rust-style-guide skill for workflow agents (#558)
## Summary

Adds the `rust-style-guide` Agent Skill under
`.fabro/skills/rust-style-guide/` so Fabro workflow agent stages can
apply the project's Rust conventions when writing or reviewing Rust
code.

Skills are discovered by convention from
`{git_root}/.fabro/skills/*/SKILL.md` at agent-session startup — there's
no manifest wiring or per-workflow declaration. Once present, every
agent stage lists the skill in its system prompt and registers the
`use_skill` tool, so an agent can load it (or a node prompt can
reference `/rust-style-guide`). Committing it here (rather than relying
on a local `~/.fabro/skills` copy) is what makes it available to
**remote, clone-based runs** (Docker/Daytona), which only see committed
+ pushed files.

## Contents (44 files)

- `SKILL.md` — entry point (with a short note pointing the agent at the
in-repo location of the supporting files, since Fabro hands the agent
the `SKILL.md` body and it reads the rest itself)
- `guidelines.md` + `guidelines/` — 38 Rust style policy pages
- `workflows/` — 4 procedure pages (new project, library release,
performance investigation, code review/refactor)

## Source / attribution

Vendored from https://github.com/brynary/rust-style-guide (commit
`8fd2a4f`), trimmed to the runtime skill payload; the upstream repo's
mdBook site and authoring scaffolding are omitted. Note: the upstream
repo has **no LICENSE file** — flagging for a call on
attribution/licensing before merge.

## Notes

- No behavior/code change — this is skill content only; nothing is
compiled or bundled.
- No `{{user_input}}` placeholder was added; agents reference the skill
in prose or via `use_skill`. (If we later want deterministic
`/rust-style-guide <task>` slash expansion in node prompts, add the
placeholder to `SKILL.md` then.)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-07 21:12:04 -04:00

7.8 KiB

Guidelines

Load this file for Rust style policy, then load only the guideline pages needed for the task.

Guideline pages are policy. Do not load every guideline page by default.

Foundations

Tooling and Project Shape

Type and API Design

Ownership and Data Flow

Errors, Safety, and Diagnostics

Async and Concurrency

Everyday Implementation

  • Control flow - load when choosing match, if let, let else, guards, early returns, combinators, mutable locals, or in-place updates.
  • Option and Result idioms - load when transforming Option/Result, using ok_or_else, transpose, map, or explicit branching.
  • Iterators, closures, and loops - load when choosing iterator chains, loops, closure capture, collect, fold, or try_fold.

Testing and Release

Routing Notes

  • For new Rust project setup, load workflows/new-rust-project.md before individual setup guidelines.
  • For reusable library release verification, load workflows/reusable-library-release.md before individual release guidelines.
  • For performance investigation, load workflows/performance-investigation.md before individual performance-related guidelines.
  • For code review or refactor work, load workflows/code-review-refactor.md before individual review guidelines.
  • For public API work, always include public API evolution.
  • For async service work, include logging and observability.
  • For error-handling work, distinguish library errors from application errors before choosing crates.
  • For advanced topics like typestate, unsafe, macros, or specialized collections, load the page only when the task directly needs it.