Searching for augment code rules examples (or “augment guidelines example”) usually means you want durable repo contracts the Augment coding agent will load—not another Import-rules console tour. This page shows illustrative layouts under a typical .augment/rules/ tree (and optional .augment-guidelines), short copy-ready snippets, a clear user vs workspace split, inclusion modes (always / manual / auto), and a practical division of labor with root AGENTS.md. Augment can already read portable files such as AGENTS.md / CLAUDE.md—use that rather than duplicating walls. Treat every path as illustrative—product builds change discovery—so re-check official docs on your installed surface. We deliberately skip console Import flows, account login, and install steps.

01

Independence note

02

What Augment rules are for (vs AGENTS.md & prompts)

Workspace and user rules encode coding standards and team contracts that should stay true across sessions. Put durable house style in rules; put this ticket’s goal in the chat brief; keep secrets out of both.

  • Workspace rules: repo-committed standards the agent should load for this codebase (language defaults, test commands, forbidden paths).
  • User rules: personal preferences that travel with you across repos (tone, preferred editors, private shortcuts)—usually not committed.
  • Guidelines file: some setups use a root .augment-guidelines (or similar) as a short always-on brief—confirm naming on your build.
  • AGENTS.md: portable root agent brief many tools also read—including Augment in common configs. See how to write AGENTS.md.
  • Session prompts: this ticket’s objective, acceptance checks, and temporary non-goals.
  • Neither: API keys, production credentials, or one-off customer data.

Prefer one clear statement of each convention. Thin Augment-specific deltas in workspace rules; shared multi-tool facts in AGENTS.md. Compare packaging with Kiro steering examples, TRAE rules examples, Cursor rules examples, and Cline rules examples. Multi-file choice notes live in AGENTS.md vs CLAUDE.md vs Cursor rules.

03

User rules vs workspace rules

Searching for augment user rules vs workspace rules is the same fork other IDEs face:

  • Workspace rules (.augment/rules/ or a committed guidelines file): commit with the repo so every teammate and CI-facing agent session sees the same contracts.
  • User rules: personal taste—verbosity, preferred languages, private non-goals. Do not commit secrets or company-wide policy into user rules if teammates need the same sentence.

04

Inclusion: always / manual / auto

  • always: short house style that should load every turn—verify commands, safety non-goals, indent.
  • manual: attach for this ticket when the contract is heavy or rare (migration playbooks, incident response).
  • auto: host may pull when relevance matches; good for domain playbooks you do not want always-on.

Exact discovery labels can differ by build. Prefer tight always-on files and progressive inclusion over one novel that is “always” by accident.

05

File layout & relationship to AGENTS.md

Community and product docs often show Markdown under .augment/rules/, plus an optional root guidelines file. Prefer one concern per file when you split.

project/
  AGENTS.md                     # portable cross-tool brief (Augment often reads this)
  .augment-guidelines           # optional short always-on brief (name may vary)
  .augment/
    rules/
      01-conventions.md         # always-on house style
      02-tests.md               # how to run and structure tests
      03-no-deploy.md           # forbid prod changes unless asked
  src/
  ...

AGENTS.md division of labor: keep facts that every coding agent should know in a short root AGENTS.md. Keep Augment-flavored deltas in workspace rules. Official Augment surfaces already document reading AGENTS.md / CLAUDE.md-style files—lean on that instead of pasting the same wall into Import. Deeper comparison: AGENTS.md vs rules.

This page does not walk through Augment console Import rules, account login, or marketplace install—those change often and are covered by official product Help.

06

Copy-ready Augment rules examples

Adapt these templates. Replace stack names, commands, and non-goals with your repo’s truth. Keep them short enough that a human will maintain them.

01-conventions.md — always-on workspace

# Workspace conventions (Augment)

- Prefer extending an existing module pattern over inventing a parallel layout.
- Run the project’s documented test / build command before claiming done.
- Do not change production deploy pipelines, DNS, or payment config unless the user explicitly asks.
- Never print or commit secrets, access keys, or session tokens.
- Indent and naming: match the nearest sibling files; do not reformat unrelated trees.

Tests

# Tests

- Prefer adding or updating tests next to the changed behavior; mirror existing fixture style.
- Name tests by behavior, not by implementation class alone.
- Do not disable or skip failing tests to make the build green unless the user asks.
- Prefer the project’s existing test framework; do not introduce a second runner without asking.

Safety / no-prod-change

# Deploy and secrets

- Do not run production deploys, mutate live cloud accounts, or edit payment / DNS config unless asked.
- Never commit .env, credentials.json, or long-lived tokens into rules or chat history.
- Prefer short-lived roles and documented secret managers over pasting keys into the session.

User rules — personal (usually not committed)

# Personal preferences (user rules)

- Prefer concise answers with a short plan before large edits.
- Default language for explanations: English unless the user writes Chinese.
- Ask before deleting files or rewriting public APIs.
- Do not put company secrets or shared team policy here—those belong in workspace rules / AGENTS.md.

When tools live outside the IDE, pair rules with a clear tool policy in the prompt. For MCP host pitfalls, see the MCP server tutorial and MCP server best practices.

07

Writing patterns that stick

  1. Imperative and testable. “Run pnpm test” beats “ensure quality.”
  2. Name artifacts. Paths, package managers, and CI jobs beat vibes.
  3. State non-goals. Forbid prod deploys, drive-by refactors, and secret echo.
  4. One concern per file when you split; keep always-on files short.
  5. Separate AGENTS.md from Augment rules. Shared facts once; IDE-specific deltas thin.
  6. Keep user rules personal—do not smuggle team policy into a private file teammates never see.
  7. Point at exemplars. “Match the existing repository layer” beats reinventing access patterns.

Rules degrade when they become a wishlist. If the agent still violates a rule after two sessions, either the rule is vague, the file is outside the discovered workspace-rules path, AGENTS.md was assumed loaded when it was not, or a stronger nearby example is missing—verify discovery on your Augment surface first.

08

Anti-patterns

  • Novel-length always-on rules: crowd context and get sampled inconsistently.
  • Mirroring console Import / install steps inside rules: import paths belong in Help docs, not committed contracts.
  • Contradictions: “always open network” next to “least privilege.”
  • Secrets in rules: rules are often committed; use secret managers instead.
  • Copying Cursor / Cline / Kiro files wholesale without remapping: wrong directory, wrong host assumptions.
  • Duplicating the same wall into AGENTS.md, workspace rules, and user rules: sync cost explodes; pick one canonical layer per concern.
  • Assuming user and workspace rules are interchangeable: commit workspace rules; keep personal prefs out of the shared tree.

Related reading: Kiro steering examples · How to write AGENTS.md · AGENTS.md vs CLAUDE.md vs Cursor rules · TRAE AI rules examples · Cursor rules examples · Cline rules examples · Windsurf rules examples · Continue rules examples · How to write CLAUDE.md · Good agent prompts · Agent engineering notes

09

FAQ

Where should I put augment code rules examples in a repo?

Most teams use a workspace rules directory under .augment/rules/, sometimes with a short root guidelines file. Exact auto-load behavior depends on your Augment version—confirm in current product docs. This site’s examples are unofficial templates, not a product catalog.

User rules vs workspace rules—how do I choose?

Commit shared contracts as workspace rules; keep personal taste in user rules. Team-wide policy that every agent must see belongs in workspace rules or AGENTS.md, not only in a private user file. See user vs workspace above.

How should Augment rules relate to AGENTS.md?

Put portable, cross-tool contracts in AGENTS.md and keep Augment-specific deltas in workspace rules. Multi-tool teams often keep a short root AGENTS.md and thinner IDE rules. See AGENTS.md vs CLAUDE.md vs Cursor rules.

Is this an Augment Import rules or install guide?

No. This page only covers copy-ready rule writing, user vs workspace scope, inclusion modes, and AGENTS.md division of labor. Console Import and install steps belong in official Augment Help—re-check those after upgrades.

Is this official Augment documentation?

No. Unofficial practice notes from 墨码 / codemo.fun—not affiliated with Augment. Treat templates as starting points and re-verify paths after upgrades.