forge-ruleslisted
Install: claude install-skill tonmoy007/forge-plugins
# forge-rules — author & manage project rules
User rules are Markdown files under `.forge/rules/*.md` with YAML frontmatter
(`description`, `scope`, `stages?`, `globs?`, `priority?`) + a body (the rule text). They
steer Forge's agents without changing code: Forge injects them into context at the right
moments. They are **advisory** — they never block a write (REQ-RULES-010).
## Scope model (mirrors Cursor project rules)
- `always` — injected every session (within the ≤2000-token context budget).
- `stage` — injected only when the pipeline is on a listed `stages:` number.
- `glob` — surfaced when writing a file matching `globs:` (advisory feedback).
- `manual` — never auto-injected; referenced explicitly by name.
## When to Use
- User runs `/forge:rules [init|list|add|validate]`.
- User wants Forge to "always"/"never" do something, or to enforce a convention
scoped to a stage or a set of files.
## Subcommands
Scaffold the rules directory (idempotent — never clobbers existing files):
```bash
python3 ${CLAUDE_PLUGIN_ROOT}/scripts/rules.py init --cwd .
```
Add a new rule (refuses to overwrite an existing file):
```bash
python3 ${CLAUDE_PLUGIN_ROOT}/scripts/rules.py add <name> --scope <always|stage|glob|manual> --description "..." --cwd .
```
List the active rules / validate them:
```bash
python3 ${CLAUDE_PLUGIN_ROOT}/scripts/rules.py list --cwd .
python3 ${CLAUDE_PLUGIN_ROOT}/scripts/rules.py validate --cwd .
```
## How to run
1. If the user is setting up rules fo