@malamute/ai-rules 1.0.0 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +270 -121
- package/bin/cli.js +5 -2
- package/configs/_shared/.claude/rules/conventions/documentation.md +324 -0
- package/configs/_shared/.claude/rules/conventions/git.md +265 -0
- package/configs/_shared/.claude/rules/{performance.md → conventions/performance.md} +1 -1
- package/configs/_shared/.claude/rules/conventions/principles.md +334 -0
- package/configs/_shared/.claude/rules/devops/ci-cd.md +262 -0
- package/configs/_shared/.claude/rules/devops/docker.md +275 -0
- package/configs/_shared/.claude/rules/devops/nx.md +194 -0
- package/configs/_shared/.claude/rules/domain/backend/api-design.md +203 -0
- package/configs/_shared/.claude/rules/lang/csharp/async.md +220 -0
- package/configs/_shared/.claude/rules/lang/csharp/csharp.md +314 -0
- package/configs/_shared/.claude/rules/lang/csharp/linq.md +210 -0
- package/configs/_shared/.claude/rules/lang/python/async.md +337 -0
- package/configs/_shared/.claude/rules/lang/python/celery.md +476 -0
- package/configs/_shared/.claude/rules/lang/python/config.md +339 -0
- package/configs/{python/.claude/rules → _shared/.claude/rules/lang/python}/database/sqlalchemy.md +6 -1
- package/configs/_shared/.claude/rules/lang/python/deployment.md +523 -0
- package/configs/_shared/.claude/rules/lang/python/error-handling.md +330 -0
- package/configs/_shared/.claude/rules/lang/python/migrations.md +421 -0
- package/configs/_shared/.claude/rules/lang/python/python.md +172 -0
- package/configs/_shared/.claude/rules/lang/python/repository.md +383 -0
- package/configs/{python/.claude/rules → _shared/.claude/rules/lang/python}/testing.md +2 -69
- package/configs/_shared/.claude/rules/lang/typescript/async.md +447 -0
- package/configs/_shared/.claude/rules/lang/typescript/generics.md +356 -0
- package/configs/_shared/.claude/rules/lang/typescript/typescript.md +212 -0
- package/configs/_shared/.claude/rules/quality/error-handling.md +48 -0
- package/configs/_shared/.claude/rules/quality/logging.md +45 -0
- package/configs/_shared/.claude/rules/quality/observability.md +240 -0
- package/configs/_shared/.claude/rules/quality/testing-patterns.md +65 -0
- package/configs/_shared/.claude/rules/security/secrets-management.md +222 -0
- package/configs/_shared/.claude/skills/analysis/explore/SKILL.md +257 -0
- package/configs/_shared/.claude/skills/analysis/security-audit/SKILL.md +184 -0
- package/configs/_shared/.claude/skills/dev/api-endpoint/SKILL.md +126 -0
- package/configs/_shared/.claude/{commands/generate-tests.md → skills/dev/generate-tests/SKILL.md} +6 -0
- package/configs/_shared/.claude/{commands/fix-issue.md → skills/git/fix-issue/SKILL.md} +6 -0
- package/configs/_shared/.claude/{commands/review-pr.md → skills/git/review-pr/SKILL.md} +6 -0
- package/configs/_shared/.claude/skills/infra/deploy/SKILL.md +139 -0
- package/configs/_shared/.claude/skills/infra/docker/SKILL.md +95 -0
- package/configs/_shared/.claude/skills/infra/migration/SKILL.md +158 -0
- package/configs/_shared/.claude/skills/nx/nx-affected/SKILL.md +72 -0
- package/configs/_shared/.claude/skills/nx/nx-lib/SKILL.md +375 -0
- package/configs/_shared/CLAUDE.md +52 -149
- package/configs/angular/.claude/rules/{components.md → core/components.md} +69 -15
- package/configs/angular/.claude/rules/core/resource.md +285 -0
- package/configs/angular/.claude/rules/core/signals.md +323 -0
- package/configs/angular/.claude/rules/http.md +338 -0
- package/configs/angular/.claude/rules/routing.md +291 -0
- package/configs/angular/.claude/rules/ssr.md +312 -0
- package/configs/angular/.claude/rules/state/signal-store.md +408 -0
- package/configs/angular/.claude/rules/{state.md → state/state.md} +2 -2
- package/configs/angular/.claude/rules/testing.md +7 -7
- package/configs/angular/.claude/rules/ui/aria.md +422 -0
- package/configs/angular/.claude/rules/ui/forms.md +424 -0
- package/configs/angular/.claude/rules/ui/pipes-directives.md +335 -0
- package/configs/angular/.claude/settings.json +1 -0
- package/configs/angular/.claude/skills/ngrx-slice/SKILL.md +362 -0
- package/configs/angular/.claude/skills/signal-store/SKILL.md +445 -0
- package/configs/angular/CLAUDE.md +24 -216
- package/configs/dotnet/.claude/rules/background-services.md +552 -0
- package/configs/dotnet/.claude/rules/configuration.md +426 -0
- package/configs/dotnet/.claude/rules/ddd.md +447 -0
- package/configs/dotnet/.claude/rules/dependency-injection.md +343 -0
- package/configs/dotnet/.claude/rules/mediatr.md +320 -0
- package/configs/dotnet/.claude/rules/middleware.md +489 -0
- package/configs/dotnet/.claude/rules/result-pattern.md +363 -0
- package/configs/dotnet/.claude/rules/validation.md +388 -0
- package/configs/dotnet/.claude/settings.json +21 -3
- package/configs/dotnet/CLAUDE.md +53 -286
- package/configs/fastapi/.claude/rules/background-tasks.md +254 -0
- package/configs/fastapi/.claude/rules/dependencies.md +170 -0
- package/configs/{python → fastapi}/.claude/rules/fastapi.md +61 -1
- package/configs/fastapi/.claude/rules/lifespan.md +274 -0
- package/configs/fastapi/.claude/rules/middleware.md +229 -0
- package/configs/fastapi/.claude/rules/pydantic.md +433 -0
- package/configs/fastapi/.claude/rules/responses.md +251 -0
- package/configs/fastapi/.claude/rules/routers.md +202 -0
- package/configs/fastapi/.claude/rules/security.md +222 -0
- package/configs/fastapi/.claude/rules/testing.md +251 -0
- package/configs/fastapi/.claude/rules/websockets.md +298 -0
- package/configs/fastapi/.claude/settings.json +33 -0
- package/configs/fastapi/CLAUDE.md +144 -0
- package/configs/flask/.claude/rules/blueprints.md +208 -0
- package/configs/flask/.claude/rules/cli.md +285 -0
- package/configs/flask/.claude/rules/configuration.md +281 -0
- package/configs/flask/.claude/rules/context.md +238 -0
- package/configs/flask/.claude/rules/error-handlers.md +278 -0
- package/configs/flask/.claude/rules/extensions.md +278 -0
- package/configs/flask/.claude/rules/flask.md +171 -0
- package/configs/flask/.claude/rules/marshmallow.md +206 -0
- package/configs/flask/.claude/rules/security.md +267 -0
- package/configs/flask/.claude/rules/testing.md +284 -0
- package/configs/flask/.claude/settings.json +33 -0
- package/configs/flask/CLAUDE.md +166 -0
- package/configs/nestjs/.claude/rules/common-patterns.md +300 -0
- package/configs/nestjs/.claude/rules/filters.md +376 -0
- package/configs/nestjs/.claude/rules/interceptors.md +317 -0
- package/configs/nestjs/.claude/rules/middleware.md +321 -0
- package/configs/nestjs/.claude/rules/modules.md +26 -0
- package/configs/nestjs/.claude/rules/pipes.md +351 -0
- package/configs/nestjs/.claude/rules/websockets.md +451 -0
- package/configs/nestjs/.claude/settings.json +16 -2
- package/configs/nestjs/CLAUDE.md +57 -215
- package/configs/nextjs/.claude/rules/api-routes.md +358 -0
- package/configs/nextjs/.claude/rules/authentication.md +355 -0
- package/configs/nextjs/.claude/rules/components.md +52 -0
- package/configs/nextjs/.claude/rules/data-fetching.md +249 -0
- package/configs/nextjs/.claude/rules/database.md +400 -0
- package/configs/nextjs/.claude/rules/middleware.md +303 -0
- package/configs/nextjs/.claude/rules/routing.md +324 -0
- package/configs/nextjs/.claude/rules/seo.md +350 -0
- package/configs/nextjs/.claude/rules/server-actions.md +353 -0
- package/configs/nextjs/.claude/rules/state/zustand.md +6 -6
- package/configs/nextjs/.claude/settings.json +5 -0
- package/configs/nextjs/CLAUDE.md +69 -331
- package/package.json +23 -9
- package/src/cli.js +220 -0
- package/src/config.js +29 -0
- package/src/index.js +13 -0
- package/src/installer.js +361 -0
- package/src/merge.js +116 -0
- package/src/tech-config.json +29 -0
- package/src/utils.js +96 -0
- package/configs/python/.claude/rules/flask.md +0 -332
- package/configs/python/.claude/settings.json +0 -18
- package/configs/python/CLAUDE.md +0 -273
- package/src/install.js +0 -315
- /package/configs/_shared/.claude/rules/{accessibility.md → domain/frontend/accessibility.md} +0 -0
- /package/configs/_shared/.claude/rules/{security.md → security/security.md} +0 -0
- /package/configs/_shared/.claude/skills/{debug → dev/debug}/SKILL.md +0 -0
- /package/configs/_shared/.claude/skills/{learning → dev/learning}/SKILL.md +0 -0
- /package/configs/_shared/.claude/skills/{spec → dev/spec}/SKILL.md +0 -0
- /package/configs/_shared/.claude/skills/{review → git/review}/SKILL.md +0 -0
package/README.md
CHANGED
|
@@ -1,8 +1,33 @@
|
|
|
1
1
|
# AI Rules
|
|
2
2
|
|
|
3
3
|
[](https://www.npmjs.com/package/@malamute/ai-rules)
|
|
4
|
+
[](https://opensource.org/licenses/MIT)
|
|
5
|
+
[](https://nodejs.org/)
|
|
4
6
|
|
|
5
|
-
|
|
7
|
+
**Supercharge Claude Code with framework-specific rules, skills, and best practices.**
|
|
8
|
+
|
|
9
|
+
AI Rules installs curated configuration boilerplates that teach Claude Code your stack's conventions, patterns, and guardrails. Stop explaining the same things over and over — let Claude understand your architecture from the start.
|
|
10
|
+
|
|
11
|
+
## Why Use This?
|
|
12
|
+
|
|
13
|
+
| Without AI Rules | With AI Rules |
|
|
14
|
+
|------------------|---------------|
|
|
15
|
+
| Claude uses generic patterns | Claude follows your framework's idioms |
|
|
16
|
+
| You repeat "use signals, not decorators" | Angular 21 patterns are built-in |
|
|
17
|
+
| Security issues slip through | OWASP Top 10 rules catch vulnerabilities |
|
|
18
|
+
| Inconsistent code style | Consistent conventions across the team |
|
|
19
|
+
|
|
20
|
+
## Quick Start
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
# Interactive setup (recommended)
|
|
24
|
+
npx @malamute/ai-rules init
|
|
25
|
+
|
|
26
|
+
# Or specify your stack directly
|
|
27
|
+
npx @malamute/ai-rules init angular nestjs --all
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
That's it. Claude Code now understands your stack.
|
|
6
31
|
|
|
7
32
|
## Installation
|
|
8
33
|
|
|
@@ -10,165 +35,289 @@ CLI to install Claude Code configuration boilerplates for Angular, Next.js, Nest
|
|
|
10
35
|
# Global install
|
|
11
36
|
npm install -g @malamute/ai-rules
|
|
12
37
|
|
|
13
|
-
# Or use
|
|
14
|
-
npx @malamute/ai-rules
|
|
38
|
+
# Or use with npx (no install needed)
|
|
39
|
+
npx @malamute/ai-rules <command>
|
|
15
40
|
```
|
|
16
41
|
|
|
17
|
-
##
|
|
42
|
+
## Supported Technologies
|
|
43
|
+
|
|
44
|
+
| Technology | Stack | Version |
|
|
45
|
+
|------------|-------|---------|
|
|
46
|
+
| **Angular** | Nx + NgRx + Signals + Vitest | 21+ |
|
|
47
|
+
| **Next.js** | App Router + React 19 + Server Components | 15+ |
|
|
48
|
+
| **NestJS** | Prisma/TypeORM + Passport + Vitest | 11+ |
|
|
49
|
+
| **.NET** | Clean Architecture + MediatR + EF Core | 9+ |
|
|
50
|
+
| **FastAPI** | Pydantic v2 + SQLAlchemy 2.0 + pytest | 0.115+ |
|
|
51
|
+
| **Flask** | Marshmallow + SQLAlchemy 2.0 + pytest | 3.0+ |
|
|
52
|
+
|
|
53
|
+
## Commands
|
|
18
54
|
|
|
19
55
|
```bash
|
|
20
|
-
#
|
|
21
|
-
ai-rules
|
|
22
|
-
ai-rules
|
|
23
|
-
ai-rules
|
|
24
|
-
|
|
25
|
-
# Fullstack (combines multiple configs)
|
|
26
|
-
ai-rules init angular nestjs
|
|
27
|
-
ai-rules init nextjs python
|
|
28
|
-
ai-rules init nextjs dotnet
|
|
29
|
-
|
|
30
|
-
# With extras
|
|
31
|
-
ai-rules init angular --with-skills # /learning, /review, /spec, /debug
|
|
32
|
-
ai-rules init angular nestjs --with-commands # fix-issue, review-pr, generate-tests
|
|
33
|
-
ai-rules init nextjs --with-rules # security, performance, accessibility
|
|
34
|
-
ai-rules init angular nestjs --all # Everything
|
|
35
|
-
|
|
36
|
-
# Custom target directory
|
|
37
|
-
ai-rules init dotnet --target ./my-project
|
|
38
|
-
|
|
39
|
-
# List available technologies
|
|
40
|
-
ai-rules list
|
|
56
|
+
ai-rules init [tech...] # Install configs (interactive if no tech)
|
|
57
|
+
ai-rules update # Update to latest rules
|
|
58
|
+
ai-rules status # Show installation info
|
|
59
|
+
ai-rules list # List available technologies
|
|
41
60
|
```
|
|
42
61
|
|
|
43
|
-
|
|
62
|
+
### Options
|
|
44
63
|
|
|
45
|
-
|
|
|
46
|
-
|
|
47
|
-
| `
|
|
48
|
-
| `
|
|
49
|
-
| `
|
|
50
|
-
| `
|
|
51
|
-
|
|
|
64
|
+
| Option | Description |
|
|
65
|
+
|--------|-------------|
|
|
66
|
+
| `--with-skills` | Add skills: `/learning`, `/review`, `/debug`, etc. |
|
|
67
|
+
| `--with-rules` | Add shared rules: security, performance, accessibility |
|
|
68
|
+
| `--all` | Include both skills and rules |
|
|
69
|
+
| `--dry-run` | Preview changes without writing files |
|
|
70
|
+
| `--target <dir>` | Install to a specific directory |
|
|
71
|
+
| `--force` | Overwrite without creating backups |
|
|
52
72
|
|
|
53
73
|
## What Gets Installed
|
|
54
74
|
|
|
55
75
|
```
|
|
56
76
|
your-project/
|
|
57
|
-
├── CLAUDE.md
|
|
77
|
+
├── CLAUDE.md # Architecture & conventions
|
|
58
78
|
└── .claude/
|
|
59
|
-
├── settings.json
|
|
60
|
-
├── rules/
|
|
61
|
-
├──
|
|
62
|
-
|
|
79
|
+
├── settings.json # Allowed/denied commands
|
|
80
|
+
├── rules/ # Framework-specific patterns
|
|
81
|
+
│ ├── components.md
|
|
82
|
+
│ ├── state.md
|
|
83
|
+
│ └── testing.md
|
|
84
|
+
└── skills/ # Optional workflows
|
|
85
|
+
├── learning/
|
|
86
|
+
├── review/
|
|
87
|
+
└── debug/
|
|
63
88
|
```
|
|
64
89
|
|
|
65
|
-
|
|
90
|
+
### CLAUDE.md
|
|
66
91
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
| `/debug` | `/debug TypeError...` | Systematic debugging workflow |
|
|
92
|
+
The main instruction file. Contains:
|
|
93
|
+
- Project architecture overview
|
|
94
|
+
- Technology stack and versions
|
|
95
|
+
- Coding conventions (naming, structure, patterns)
|
|
96
|
+
- Commands to run (build, test, lint)
|
|
73
97
|
|
|
74
|
-
|
|
98
|
+
### Rules
|
|
99
|
+
|
|
100
|
+
Context-aware rules that activate based on file paths:
|
|
101
|
+
|
|
102
|
+
```markdown
|
|
103
|
+
---
|
|
104
|
+
paths:
|
|
105
|
+
- "**/*.component.ts"
|
|
106
|
+
---
|
|
107
|
+
# Angular Component Rules
|
|
108
|
+
- Use `ChangeDetectionStrategy.OnPush`
|
|
109
|
+
- Use `input()`, `output()`, not decorators
|
|
110
|
+
- Template in separate `.html` file
|
|
111
|
+
```
|
|
75
112
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
|
113
|
+
### Skills
|
|
114
|
+
|
|
115
|
+
Interactive workflows invoked with `/skill-name`:
|
|
116
|
+
|
|
117
|
+
| Skill | Description |
|
|
118
|
+
|-------|-------------|
|
|
119
|
+
| `/learning` | Pedagogical mode — explains before coding |
|
|
120
|
+
| `/review` | Code review with security/perf checklist |
|
|
121
|
+
| `/debug` | Structured debugging workflow |
|
|
122
|
+
| `/spec` | Write technical spec before implementing |
|
|
123
|
+
| `/fix-issue` | Analyze GitHub issue and implement fix |
|
|
124
|
+
| `/generate-tests` | Generate comprehensive tests |
|
|
125
|
+
|
|
126
|
+
<details>
|
|
127
|
+
<summary><strong>See all 13 skills</strong></summary>
|
|
128
|
+
|
|
129
|
+
| Skill | Usage | Description |
|
|
130
|
+
|-------|-------|-------------|
|
|
131
|
+
| `/learning` | `/learning nextjs` | Explains concepts before implementing |
|
|
132
|
+
| `/review` | `/review src/users/` | Code review with checklist |
|
|
133
|
+
| `/spec` | `/spec add auth` | Technical specification |
|
|
134
|
+
| `/debug` | `/debug TypeError...` | Systematic debugging |
|
|
135
|
+
| `/fix-issue` | `/fix-issue 123` | Fix GitHub issue |
|
|
136
|
+
| `/review-pr` | `/review-pr 456` | Review pull request |
|
|
137
|
+
| `/generate-tests` | `/generate-tests src/user.ts` | Generate tests |
|
|
138
|
+
| `/api-endpoint` | `/api-endpoint POST /users` | Generate API endpoint |
|
|
139
|
+
| `/migration` | `/migration add users` | Database migration |
|
|
140
|
+
| `/security-audit` | `/security-audit` | Security analysis |
|
|
141
|
+
| `/docker` | `/docker` | Dockerfile generation |
|
|
142
|
+
| `/deploy` | `/deploy` | Deployment config |
|
|
143
|
+
| `/explore` | `/explore` | Repository analysis |
|
|
144
|
+
|
|
145
|
+
</details>
|
|
81
146
|
|
|
82
147
|
## Shared Rules
|
|
83
148
|
|
|
84
|
-
|
|
149
|
+
Cross-framework rules included with `--with-rules`:
|
|
85
150
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
151
|
+
| Rule | What It Covers |
|
|
152
|
+
|------|----------------|
|
|
153
|
+
| **security.md** | OWASP Top 10: injection, XSS, CSRF, secrets |
|
|
154
|
+
| **performance.md** | N+1 queries, caching, lazy loading |
|
|
155
|
+
| **accessibility.md** | WCAG 2.1, semantic HTML, ARIA |
|
|
156
|
+
| **testing-patterns.md** | AAA pattern, mocking, coverage |
|
|
157
|
+
| **error-handling.md** | Error categories, response formats |
|
|
158
|
+
| **git.md** | Conventional commits, branching, PRs |
|
|
159
|
+
| **observability.md** | Logging, metrics, tracing |
|
|
89
160
|
|
|
90
|
-
##
|
|
161
|
+
## Examples
|
|
91
162
|
|
|
92
|
-
###
|
|
163
|
+
### Fullstack Setup
|
|
93
164
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
| Templates | Always in separate `.html` files |
|
|
98
|
-
| Inputs/Outputs | `input()`, `output()`, `model()` functions |
|
|
99
|
-
| State | NgRx + Entity Adapter + Functional Effects |
|
|
100
|
-
| Tests | Vitest + Marble testing (no `.subscribe()`) |
|
|
165
|
+
```bash
|
|
166
|
+
# Angular frontend + NestJS backend
|
|
167
|
+
ai-rules init angular nestjs --all
|
|
101
168
|
|
|
102
|
-
|
|
169
|
+
# Next.js frontend + FastAPI backend
|
|
170
|
+
ai-rules init nextjs fastapi --all
|
|
171
|
+
```
|
|
103
172
|
|
|
104
|
-
|
|
105
|
-
| ----------------- | ------------------------------------------ |
|
|
106
|
-
| Components | Server Components by default |
|
|
107
|
-
| Client Components | Add `'use client'` directive |
|
|
108
|
-
| Data Fetching | Server Components + `fetch()` |
|
|
109
|
-
| Mutations | Server Actions |
|
|
110
|
-
| State | Zustand (simple) / Redux Toolkit (complex) |
|
|
173
|
+
### Preview Before Installing
|
|
111
174
|
|
|
112
|
-
|
|
175
|
+
```bash
|
|
176
|
+
ai-rules init angular --dry-run
|
|
177
|
+
```
|
|
113
178
|
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
| Validation | class-validator + class-transformer |
|
|
118
|
-
| Database | Prisma (modern) / TypeORM (decorators) |
|
|
119
|
-
| Auth | Passport + JWT |
|
|
120
|
-
| Tests | Jest + Supertest |
|
|
179
|
+
Output:
|
|
180
|
+
```
|
|
181
|
+
DRY RUN - No files will be modified
|
|
121
182
|
|
|
122
|
-
|
|
183
|
+
ℹ Would install to: /your/project
|
|
123
184
|
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
| CQRS | MediatR (Commands/Queries) |
|
|
129
|
-
| ORM | Entity Framework Core |
|
|
130
|
-
| Tests | xUnit + NSubstitute + FluentAssertions |
|
|
185
|
+
ℹ Would install angular...
|
|
186
|
+
○ CLAUDE.md (create)
|
|
187
|
+
○ settings.json (create)
|
|
188
|
+
○ rules/ (8 files)
|
|
131
189
|
|
|
132
|
-
|
|
190
|
+
Summary:
|
|
191
|
+
10 file(s) would be created
|
|
192
|
+
0 file(s) would be modified
|
|
193
|
+
```
|
|
133
194
|
|
|
134
|
-
|
|
135
|
-
| ---------- | ------------------------------------------- |
|
|
136
|
-
| Frameworks | FastAPI (async) / Flask (traditional) |
|
|
137
|
-
| Validation | Pydantic v2 (FastAPI) / Marshmallow (Flask) |
|
|
138
|
-
| ORM | SQLAlchemy 2.0 (async support) |
|
|
139
|
-
| Tests | pytest + httpx |
|
|
140
|
-
| Migrations | Alembic |
|
|
195
|
+
### Update Configs
|
|
141
196
|
|
|
142
|
-
|
|
197
|
+
```bash
|
|
198
|
+
# Check current version
|
|
199
|
+
ai-rules status
|
|
143
200
|
|
|
201
|
+
# Preview updates
|
|
202
|
+
ai-rules update --dry-run
|
|
203
|
+
|
|
204
|
+
# Apply updates (auto-backup enabled)
|
|
205
|
+
ai-rules update
|
|
144
206
|
```
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
207
|
+
|
|
208
|
+
## Technology Conventions
|
|
209
|
+
|
|
210
|
+
<details>
|
|
211
|
+
<summary><strong>Angular</strong></summary>
|
|
212
|
+
|
|
213
|
+
| Aspect | Convention |
|
|
214
|
+
|--------|------------|
|
|
215
|
+
| Components | Standalone, OnPush change detection |
|
|
216
|
+
| Signals | `input()`, `output()`, `model()` functions |
|
|
217
|
+
| State | NgRx with Entity Adapter + Functional Effects |
|
|
218
|
+
| Structure | Nx monorepo with feature/ui/data-access libs |
|
|
219
|
+
| Tests | Vitest + Marble testing |
|
|
220
|
+
|
|
221
|
+
</details>
|
|
222
|
+
|
|
223
|
+
<details>
|
|
224
|
+
<summary><strong>Next.js</strong></summary>
|
|
225
|
+
|
|
226
|
+
| Aspect | Convention |
|
|
227
|
+
|--------|------------|
|
|
228
|
+
| Components | Server Components by default |
|
|
229
|
+
| Client | `'use client'` directive for interactivity |
|
|
230
|
+
| Data | Server Components + fetch, Server Actions |
|
|
231
|
+
| State | Zustand (simple) / Redux Toolkit (complex) |
|
|
232
|
+
| Structure | App Router with route groups |
|
|
233
|
+
|
|
234
|
+
</details>
|
|
235
|
+
|
|
236
|
+
<details>
|
|
237
|
+
<summary><strong>NestJS</strong></summary>
|
|
238
|
+
|
|
239
|
+
| Aspect | Convention |
|
|
240
|
+
|--------|------------|
|
|
241
|
+
| Architecture | Modular Monolith |
|
|
242
|
+
| Validation | class-validator + class-transformer |
|
|
243
|
+
| Database | Prisma (modern) / TypeORM (decorators) |
|
|
244
|
+
| Auth | Passport + JWT |
|
|
245
|
+
| Tests | Vitest + Supertest |
|
|
246
|
+
|
|
247
|
+
</details>
|
|
248
|
+
|
|
249
|
+
<details>
|
|
250
|
+
<summary><strong>.NET</strong></summary>
|
|
251
|
+
|
|
252
|
+
| Aspect | Convention |
|
|
253
|
+
|--------|------------|
|
|
254
|
+
| Architecture | Clean Architecture (Domain → App → Infra) |
|
|
255
|
+
| API | Minimal APIs (preferred) or Controllers |
|
|
256
|
+
| CQRS | MediatR for Commands/Queries |
|
|
257
|
+
| ORM | Entity Framework Core |
|
|
258
|
+
| Tests | xUnit + NSubstitute + FluentAssertions |
|
|
259
|
+
|
|
260
|
+
</details>
|
|
261
|
+
|
|
262
|
+
<details>
|
|
263
|
+
<summary><strong>FastAPI</strong></summary>
|
|
264
|
+
|
|
265
|
+
| Aspect | Convention |
|
|
266
|
+
|--------|------------|
|
|
267
|
+
| Framework | FastAPI with async/await |
|
|
268
|
+
| Validation | Pydantic v2 |
|
|
269
|
+
| ORM | SQLAlchemy 2.0 with async support |
|
|
270
|
+
| Tests | pytest + httpx |
|
|
271
|
+
| Migrations | Alembic |
|
|
272
|
+
|
|
273
|
+
</details>
|
|
274
|
+
|
|
275
|
+
<details>
|
|
276
|
+
<summary><strong>Flask</strong></summary>
|
|
277
|
+
|
|
278
|
+
| Aspect | Convention |
|
|
279
|
+
|--------|------------|
|
|
280
|
+
| Framework | Flask 3.0 with Application Factory |
|
|
281
|
+
| Validation | Marshmallow schemas |
|
|
282
|
+
| ORM | SQLAlchemy 2.0 |
|
|
283
|
+
| Tests | pytest |
|
|
284
|
+
| Extensions | Flask-SQLAlchemy, Flask-Migrate, Flask-JWT-Extended |
|
|
285
|
+
|
|
286
|
+
</details>
|
|
287
|
+
|
|
288
|
+
## How It Works
|
|
289
|
+
|
|
290
|
+
1. **CLAUDE.md** is read by Claude Code at session start
|
|
291
|
+
2. **Rules** activate based on file paths you're editing
|
|
292
|
+
3. **Skills** are invoked on-demand with `/skill-name`
|
|
293
|
+
4. **Settings** define what commands Claude can run
|
|
294
|
+
|
|
295
|
+
Claude Code sees your conventions as first-class instructions, not just suggestions in the chat.
|
|
164
296
|
|
|
165
297
|
## Contributing
|
|
166
298
|
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
299
|
+
```bash
|
|
300
|
+
# Clone and install
|
|
301
|
+
git clone https://github.com/malamute/ai-rules.git
|
|
302
|
+
cd ai-rules
|
|
303
|
+
npm install
|
|
304
|
+
|
|
305
|
+
# Run tests
|
|
306
|
+
npm test
|
|
307
|
+
|
|
308
|
+
# Add a new technology
|
|
309
|
+
mkdir configs/your-tech
|
|
310
|
+
# Add CLAUDE.md and .claude/rules/
|
|
311
|
+
```
|
|
312
|
+
|
|
313
|
+
### Adding a Technology
|
|
314
|
+
|
|
315
|
+
1. Create `configs/[tech]/CLAUDE.md` — start with `@../_shared/CLAUDE.md`
|
|
316
|
+
2. Add rules in `configs/[tech]/.claude/rules/`
|
|
317
|
+
3. Add `configs/[tech]/.claude/settings.json` for permissions
|
|
318
|
+
4. Add tests
|
|
319
|
+
5. Submit a PR
|
|
171
320
|
|
|
172
321
|
## License
|
|
173
322
|
|
|
174
|
-
MIT
|
|
323
|
+
MIT © Mehdi Chaabi
|
package/bin/cli.js
CHANGED