RPA generate project rules (layered + BDD, multi-agent)
Goal
Produce or update versioned instructions so the agent stays inside architecture, style, and BDD-style discipline (behavior specified in tests, tests before new behavior, full suite before calling work done).
- Layered cake - rules must tell the agent to build by layers: first units that depend on nothing inside the project, then layers that depend only on lower layers, and so on. Mirror this in
architecture and implementation-order style files.
- Cursor -
.cursor/rules/*.mdc (MDC, globs, alwaysApply, @ links).
- Claude Code -
CLAUDE.md and .claude/rules/*.md with optional YAML paths: (memory).
Read these references from this skill (progressive disclosure)
references/bdd-and-agents.md
BDD-oriented rules, Cursor vs Claude vs others, avoiding duplicate drifting copies.
references/cursor-examples/.cursor/rules/workflow.mdc
Feature and bugfix flow (red, green, all tests, linter, report). Adapt globs and @ links.
references/cursor-examples/.cursor/rules/testing.mdc
pytest naming, fixtures, commands.
Other files in references/cursor-examples/.cursor/rules/
architecture.mdc, code-style.mdc, implementation-order.mdc, api-layer.mdc, core-modules.mdc - templates from cursor-vibe-prompts. Replace placeholders with the real project.
references/claude-examples/.claude/
Example CLAUDE.md and modular rules/*.md with optional paths:.
Discover first
Without asking for hand-written specs unless the repo has none:
- Read
README, docs/, ARCHITECTURE*, OpenAPI, pyproject.toml / package.json, CI.
- Skim representative code.
- Read
tests/ and linters (ruff.toml, pre-commit-config.yaml).
- In monorepos, plan per-package
.cursor/rules/ or .claude/rules/ when layouts split.
Cursor (.cursor/rules/*.mdc)
YAML front matter example:
---
description: Short label for this rule set
globs: path/glob/**/*.py
alwaysApply: true
---
# Title
Bullets and @references
@path/to/file.py
@docs/spec.md
Use alwaysApply: true for workflow and style that must always apply. Use alwaysApply: false or narrow globs for optional topics.
Docs: Cursor Rules.
Claude Code (CLAUDE.md, .claude/rules/)
Keep CLAUDE.md short. Put layered architecture and BDD workflow in topic files under .claude/rules/. Confirm paths: behavior against your Claude Code version. CLAUDE.md overview.
Files to create or align in the target project
| Topic |
Contents |
workflow |
BDD/TDD steps for features and bugs, final checks, pre-commit when used |
testing |
pytest layout, naming, fixtures |
architecture |
Layers, modules, allowed dependencies (supports layered cake) |
code-style |
Formatter, types, comments language |
implementation-order |
Explicit layer-by-layer order |
api-layer |
If HTTP or RPC exists |
core-modules |
Domain modules |
Content rules
- Layered cake in rules: forbid jumping ahead to high-level code before lower layers exist and are tested.
- BDD in rules: new behavior starts with tests that describe observable outcomes.
- Ask questions only when blocked. Comments in generated code snippets: English.
Deliverables
- Create or update rules (Cursor and/or Claude Code as requested).
- Summarize files added or changed and how
alwaysApply / paths / globs are set.
Source: EvilFreelancer/rpa-skills — distributed by TomeVault.
1---2name: evilfreelancer-rpa-skills-rpa-gen-rules3description: RPA generate project rules (layered + BDD, multi-agent)4---56# RPA generate project rules (layered + BDD, multi-agent)78## Goal910Produce or update **versioned** instructions so the agent stays inside architecture, style, and **BDD-style** discipline (behavior specified in tests, tests before new behavior, full suite before calling work done).1112- **Layered cake** - rules must tell the agent to build **by layers**: first units that depend on nothing inside the project, then layers that depend only on lower layers, and so on. Mirror this in `architecture` and `implementation-order` style files.13- **Cursor** - `.cursor/rules/*.mdc` ([MDC](https://github.com/nuxt-content/mdc), `globs`, `alwaysApply`, `@` links).14- **Claude Code** - `CLAUDE.md` and `.claude/rules/*.md` with optional YAML `paths:` ([memory](https://code.claude.com/docs/en/memory#organize-rules-with-claude/rules/)).1516## Read these references from this skill (progressive disclosure)17181. **`references/bdd-and-agents.md`** 19 BDD-oriented rules, Cursor vs Claude vs others, avoiding duplicate drifting copies.20212. **`references/cursor-examples/.cursor/rules/workflow.mdc`** 22 Feature and bugfix flow (red, green, all tests, linter, report). Adapt globs and `@` links.23243. **`references/cursor-examples/.cursor/rules/testing.mdc`** 25 pytest naming, fixtures, commands.26274. **Other files in `references/cursor-examples/.cursor/rules/`** 28 `architecture.mdc`, `code-style.mdc`, `implementation-order.mdc`, `api-layer.mdc`, `core-modules.mdc` - templates from [cursor-vibe-prompts](https://github.com/EvilFreelancer/cursor-vibe-prompts/tree/main/cursor-rules). Replace placeholders with the real project.29305. **`references/claude-examples/.claude/`** 31 Example `CLAUDE.md` and modular `rules/*.md` with optional `paths:`.3233## Discover first3435Without asking for hand-written specs unless the repo has none:36371. Read `README`, `docs/`, `ARCHITECTURE*`, OpenAPI, `pyproject.toml` / `package.json`, CI.382. Skim representative code.393. Read `tests/` and linters (`ruff.toml`, `pre-commit-config.yaml`).404. In monorepos, plan per-package `.cursor/rules/` or `.claude/rules/` when layouts split.4142## Cursor (`.cursor/rules/*.mdc`)4344YAML front matter example:4546```markdown47---48description: Short label for this rule set49globs: path/glob/**/*.py50alwaysApply: true51---5253# Title5455Bullets and @references5657@path/to/file.py58@docs/spec.md59```6061Use `alwaysApply: true` for workflow and style that must always apply. Use `alwaysApply: false` or narrow `globs` for optional topics.6263**Docs:** [Cursor Rules](https://cursor.com/docs/context/rules).6465## Claude Code (`CLAUDE.md`, `.claude/rules/`)6667Keep `CLAUDE.md` short. Put layered architecture and BDD workflow in topic files under `.claude/rules/`. Confirm `paths:` behavior against your Claude Code version. [CLAUDE.md overview](https://docs.anthropic.com/en/docs/claude-code/claude-md).6869## Files to create or align in the target project7071| Topic | Contents |72|-------|----------|73| `workflow` | BDD/TDD steps for features and bugs, final checks, `pre-commit` when used |74| `testing` | pytest layout, naming, fixtures |75| `architecture` | Layers, modules, allowed dependencies (supports layered cake) |76| `code-style` | Formatter, types, comments language |77| `implementation-order` | Explicit layer-by-layer order |78| `api-layer` | If HTTP or RPC exists |79| `core-modules` | Domain modules |8081## Content rules8283- **Layered cake** in rules: forbid jumping ahead to high-level code before lower layers exist and are tested.84- **BDD** in rules: new behavior starts with tests that describe observable outcomes.85- Ask questions only when blocked. Comments in generated code snippets: English.8687## Deliverables88891. Create or update rules (Cursor and/or Claude Code as requested).902. Summarize files added or changed and how `alwaysApply` / `paths` / `globs` are set.9192---93> Source: [EvilFreelancer/rpa-skills](https://github.com/EvilFreelancer/rpa-skills) — distributed by [TomeVault](https://tomevault.io).94<!-- tomevault:4.0:skill_md:2026-06-16 -->