aayushus-skills 1.2.0 → 1.2.3
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 +25 -6
- package/agent-config/rules.md +49 -118
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -4,23 +4,42 @@ A zero-dependency interactive CLI to install custom AI agent configurations, des
|
|
|
4
4
|
|
|
5
5
|
## Installation / Usage
|
|
6
6
|
|
|
7
|
-
Run the following command in your target project directory:
|
|
7
|
+
Run the following command in your target project directory to open the interactive checklist menu:
|
|
8
8
|
|
|
9
9
|
```bash
|
|
10
10
|
npx aayushus-skills
|
|
11
11
|
```
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
### Options & Subcommands
|
|
14
|
+
You can bypass the interactive menu to install specific components directly:
|
|
15
|
+
|
|
16
|
+
- **All Components**: `npx aayushus-skills all`
|
|
17
|
+
- **Prism Design System**: `npx aayushus-skills design`
|
|
18
|
+
- **Development Guidelines**: `npx aayushus-skills guidelines`
|
|
19
|
+
- **Solo Developer AI SOP**: `npx aayushus-skills sop`
|
|
20
|
+
- **Cursor Rules**: `npx aayushus-skills cursor`
|
|
21
|
+
- **Antigravity Rules**: `npx aayushus-skills antigravity`
|
|
22
|
+
- **Devin Rules**: `npx aayushus-skills devin`
|
|
23
|
+
- **Claude Rules**: `npx aayushus-skills claude`
|
|
24
|
+
- **Codex/Copilot Rules**: `npx aayushus-skills codex`
|
|
25
|
+
|
|
26
|
+
### Preview changes (Dry Run)
|
|
27
|
+
Add `-d` or `--dry-run` to preview the files that would be installed without making any modifications to disk:
|
|
15
28
|
```bash
|
|
16
|
-
npx aayushus-skills
|
|
29
|
+
npx aayushus-skills --dry-run
|
|
30
|
+
npx aayushus-skills design --dry-run
|
|
17
31
|
```
|
|
18
32
|
|
|
19
33
|
## Included Components
|
|
20
34
|
|
|
21
|
-
- **AI Agent Configurations**:
|
|
35
|
+
- **AI Agent Configurations**: Custom-tailored rule files matching your selected editor:
|
|
36
|
+
- **Antigravity**: `.antigravityrules`
|
|
37
|
+
- **Devin**: `.devin/rules/rules.md` & `AGENTS.md`
|
|
38
|
+
- **Cursor**: `.cursorrules`
|
|
39
|
+
- **Claude**: `CLAUDE.md`
|
|
40
|
+
- **Codex/Copilot**: `.github/copilot-instructions.md`
|
|
22
41
|
- **Prism Design System**: Copies zero-decision B2B/SaaS design components and styling tokens (CSS/TSX) to `./src/design/` or `./design/`.
|
|
23
|
-
- **Development Guidelines**: Copies standard development docs (API Design, Architecture, Code Quality,
|
|
42
|
+
- **Development Guidelines**: Copies standard stack-agnostic development reference docs (API Design, Architecture, Code Quality, Security, Performance, etc.) to `./docs/guidelines/`.
|
|
24
43
|
- **Solo Developer AI SOP**: Installs the `Solo-Developer-AI-SOP.md` file in the project root containing guidelines for budget management and AI escalation.
|
|
25
44
|
|
|
26
45
|
---
|
package/agent-config/rules.md
CHANGED
|
@@ -1,94 +1,51 @@
|
|
|
1
1
|
# Codebase rules — read before every response
|
|
2
2
|
|
|
3
|
+
> [!IMPORTANT]
|
|
4
|
+
> **CUSTOMIZATION NOTICE**: This rules file contains guidelines for development. Update the Stack and Hard Rules sections in your local project rules file to match your project's actual stack.
|
|
5
|
+
|
|
3
6
|
## Stack
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
7
|
+
<!-- CUSTOMIZE: Replace this section with your project's actual stack -->
|
|
8
|
+
- **Frontend/Backend**: [e.g., Next.js 14 App Router, React + Vite, Express, FastAPI]
|
|
9
|
+
- **Database/ORM**: [e.g., Drizzle ORM, Prisma, SQLAlchemy]
|
|
10
|
+
- **Primary Database**: [e.g., PostgreSQL, SQLite, MySQL]
|
|
11
|
+
- **Async Queue**: [e.g., BullMQ, Celery, None/Direct Background Streaming]
|
|
12
|
+
- **Design System**: Prism (tokens.css + components.tsx)
|
|
8
13
|
|
|
9
14
|
---
|
|
10
15
|
|
|
11
16
|
## HARD RULES — never violate these
|
|
12
17
|
|
|
13
|
-
### Data &
|
|
14
|
-
-
|
|
15
|
-
-
|
|
16
|
-
-
|
|
17
|
-
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
-
|
|
25
|
-
-
|
|
26
|
-
|
|
27
|
-
###
|
|
28
|
-
-
|
|
29
|
-
-
|
|
30
|
-
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
- Every network call has a timeout: 10s (internal HTTP), 5s (fast external APIs), 30s (slow), 60s (AI — async only)
|
|
36
|
-
- Retries only on 5xx and network errors — NEVER retry 4xx
|
|
37
|
-
- Circuit breaker: open after 5 failures in 10s, stay open 30s
|
|
38
|
-
|
|
39
|
-
### Auth & security
|
|
40
|
-
- Passwords: Argon2id only (`time=3, memory=64MB, parallelism=4`) — never bcrypt, never MD5, never SHA-1
|
|
41
|
-
- API keys: Argon2id hashed before storage, displayed once only
|
|
42
|
-
- Sessions: opaque 256-bit random tokens stored in Redis — NOT JWTs for user sessions
|
|
43
|
-
- Session rotation on: login, logout, MFA completion, role change
|
|
44
|
-
- Password reset does NOT log the user in — they re-authenticate after
|
|
45
|
-
- Never reveal whether an email exists — always respond `200 RESET_EMAIL_SENT_IF_EXISTS`
|
|
46
|
-
- Failed logins: lock account after 10 failures, rate-limit 5/hour per account
|
|
47
|
-
- MFA required for `owner` and `admin` roles (TOTP, RFC 6238)
|
|
48
|
-
- Role changes require dedicated endpoint — never via generic PATCH, user cannot change own role
|
|
49
|
-
- Admin impersonation TTL: 1 hour max
|
|
50
|
-
|
|
51
|
-
### Input & output
|
|
52
|
-
- Validate every input at every boundary with Zod (TypeScript) or Pydantic `.strict()` (Python)
|
|
53
|
-
- All strings must have max length — prevents DoS
|
|
54
|
-
- File uploads: magic-number type validation, ClamAV virus scan, re-encode images (strips EXIF), store on object storage only (signed URLs)
|
|
55
|
-
- Never use `dangerouslySetInnerHTML` without DOMPurify + explicit code-review tag
|
|
56
|
-
- AI output: validate with Zod schema before use, never trust for authorisation decisions
|
|
57
|
-
- SSRF: DNS-resolve before fetching, reject private IPs
|
|
58
|
-
|
|
59
|
-
### Secrets & config
|
|
60
|
-
- All secrets in Doppler or AWS Secrets Manager — never in code, never in `.env` files committed to git
|
|
61
|
-
- One place reads `process.env`: `shared/config.ts` with Zod schema — nowhere else
|
|
62
|
-
- No secrets in logs, errors, or API responses
|
|
63
|
-
- Secrets rotated quarterly — dual-key rotation window
|
|
64
|
-
|
|
65
|
-
### Logging & observability
|
|
66
|
-
- Structured JSON logs only — required fields: `timestamp`, `level`, `service`, `correlationId`, `tenantId`, `userId`, `message`
|
|
67
|
-
- Correlation ID propagates through all logs, queue jobs, cross-service calls, and audit entries
|
|
68
|
-
- Audit log is append-only — 7-year retention, no UPDATE/DELETE at DB role level
|
|
69
|
-
- Every route emits: `http_requests_total`, `http_request_duration_seconds`
|
|
70
|
-
|
|
71
|
-
### API design
|
|
72
|
-
- REST + JSON — no GraphQL unless multiple first-party clients with wildly different data needs
|
|
73
|
-
- URL versioning: `/api/v1/`, `/api/v2/` — not header-based
|
|
74
|
-
- Standard error envelope: `{ code, message, correlationId, details }`
|
|
75
|
-
- Rate limits: 100 req/60s per user (default), 5/60s for login and password-reset
|
|
18
|
+
### Data & Tenancy (Database Rules)
|
|
19
|
+
- **Tenancy**: If the project is multi-tenant, every database query touching tenant data MUST filter by `tenantId` (typically enforced via query middleware/middleware helpers). If single-tenant, ignore tenant constraints.
|
|
20
|
+
- **ORM & Raw Queries**: Prefer parameterized query builder/ORM methods. Never use raw SQL statements unless parameterized, type-safe, and explicitly reviewed.
|
|
21
|
+
- **Deletes**: Default to soft deletes (`deletedAt` timestamp) for business-critical data; avoid hard deletion unless explicitly requested.
|
|
22
|
+
- **Primary Keys**: Align with the project database design (e.g., ULIDs for distributed/multi-tenant systems, UUIDs, or Serial Auto-Incrementing Integers for standard/monolithic tables).
|
|
23
|
+
|
|
24
|
+
### Async & Queuing
|
|
25
|
+
- **Long-Running Operations**: Any operation taking > 1 second should run asynchronously in a background worker (e.g., BullMQ, Celery, or background threads depending on the stack) so the main HTTP thread remains responsive.
|
|
26
|
+
- **Reliability**: Ensure background tasks have maximum retries (e.g., 5 retries with exponential backoff) and are designed to be idempotent.
|
|
27
|
+
|
|
28
|
+
### Network & Timeouts
|
|
29
|
+
- **Timeouts**: Every external network call must have a timeout configured (e.g., 10s for internal services, 5s for fast APIs, 30s-60s for slow/AI APIs).
|
|
30
|
+
- **Retries**: Retry only on 5xx server errors and network dropouts. Never retry client-side 4xx errors.
|
|
31
|
+
|
|
32
|
+
### Auth & Security
|
|
33
|
+
- **Passwords & Hashing**: Use secure modern hashing algorithms (e.g., Argon2id or equivalent standard platform hashing library) for passwords and API keys.
|
|
34
|
+
- **Sessions**: Prefer secure session storage (e.g., server-side session stores) over JWTs for user sessions where revocability is needed.
|
|
35
|
+
- **Input Validation**: Validate 100% of inputs at all system boundaries using schema validators (e.g., Zod, Pydantic) with strict checks.
|
|
36
|
+
|
|
37
|
+
### Observability & Logging
|
|
38
|
+
- **Structured Logs**: Use structured JSON logging output containing standard metadata (`timestamp`, `level`, `correlationId`, `message`).
|
|
39
|
+
- **Correlation**: Propagate correlation IDs across system boundaries (HTTP request, queue worker, database query).
|
|
76
40
|
|
|
77
41
|
---
|
|
78
42
|
|
|
79
43
|
## CODE QUALITY RULES
|
|
80
44
|
|
|
81
|
-
-
|
|
82
|
-
- Never
|
|
83
|
-
-
|
|
84
|
-
-
|
|
85
|
-
- No `console.log` — use the structured logger
|
|
86
|
-
- No commented-out code — delete it or put it in a ticket
|
|
87
|
-
- Boolean variables: `is/has/can/should` prefix
|
|
88
|
-
- No N+1 queries — always use Prisma `include/select` or a JOIN
|
|
89
|
-
- Error handling: throw exceptions for programming errors, return Result types for expected failures (validation, not-found, rate-limit)
|
|
90
|
-
- Async/await always — never raw `.then()` chains
|
|
91
|
-
- PR size: ≤ 400 lines unless generated code — split larger changes
|
|
45
|
+
- **Type Safety**: Enforce strict type checking in your language of choice (e.g., `strict: true` and `noUncheckedIndexedAccess` in TypeScript).
|
|
46
|
+
- **Narrowing**: Never bypass type safety with `any` — use `unknown` or union type narrowing.
|
|
47
|
+
- **Readability**: Keep functions concise (aim under 40 lines) and files focused (aim under 300 lines).
|
|
48
|
+
- **Error Handling**: Throw exceptions for programming/unexpected errors; return structured success/failure wrappers (e.g., Result/Either patterns) for expected business logic path failures.
|
|
92
49
|
|
|
93
50
|
---
|
|
94
51
|
|
|
@@ -100,56 +57,30 @@ Design system: Prism (tokens.css + components.tsx — see design/ skill folder).
|
|
|
100
57
|
| API read (cached, single) | p95 < 200ms |
|
|
101
58
|
| API read (list, paginated) | p95 < 300ms |
|
|
102
59
|
| API write | p95 < 300ms |
|
|
103
|
-
| LCP | ≤ 2.5s
|
|
104
|
-
|
|
|
105
|
-
| CLS | ≤ 0.1 (p75) |
|
|
106
|
-
| JS bundle (gzipped) | ≤ 170KB |
|
|
107
|
-
| CSS bundle (gzipped) | ≤ 30KB |
|
|
60
|
+
| LCP / INP | ≤ 2.5s / ≤ 200ms |
|
|
61
|
+
| JS / CSS bundle (gzipped) | ≤ 170KB / ≤ 30KB |
|
|
108
62
|
| DB query (indexed lookup) | ≤ 10ms |
|
|
109
|
-
| DB query (list with joins) | ≤ 200ms |
|
|
110
63
|
|
|
111
64
|
---
|
|
112
65
|
|
|
113
66
|
## PRISM DESIGN SYSTEM RULES
|
|
114
67
|
|
|
115
|
-
- Never hardcode
|
|
116
|
-
-
|
|
117
|
-
-
|
|
118
|
-
-
|
|
119
|
-
- Never import Tailwind, Radix defaults, or shadcn themes — use components.tsx from the design system
|
|
120
|
-
- Touch targets: 44×44px minimum on mobile
|
|
121
|
-
- Never use `font-size` < 16px on mobile inputs — iOS Safari zooms on focus
|
|
122
|
-
- Dark mode: use `[data-theme="dark"]` selector overrides — never `@media (prefers-color-scheme: dark)` in component CSS
|
|
123
|
-
- Every component must work in light AND dark mode
|
|
124
|
-
- Spacing: multiples of 4px only — allowed values: 4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 48, 56, 64
|
|
68
|
+
- **Tokens**: Never hardcode colors, radii, or fonts — always use CSS design tokens (`var(--token-name)`).
|
|
69
|
+
- **Themes**: Implement dark/light mode switches via data attributes (e.g. `[data-theme="dark"]`) rather than media queries where theme switching is required.
|
|
70
|
+
- **Consistency**: Keep spacing aligned to the project grid system (e.g., multiples of 4px).
|
|
71
|
+
- **AI Glyphs**: Use only the Prism Sparkle/Prism icon as the visual representation for AI-generated assets.
|
|
125
72
|
|
|
126
73
|
---
|
|
127
74
|
|
|
128
75
|
## WHEN TO CHECK FULL DOCS
|
|
129
76
|
|
|
130
|
-
|
|
77
|
+
Detailed guidelines live in the Docs/Guidelines folder. Refer to them when working on core modules:
|
|
131
78
|
|
|
132
|
-
|
|
|
79
|
+
| Topic | Reference Document |
|
|
133
80
|
|---|---|
|
|
134
|
-
| Building any UI component or screen | `design/SKILL.md`
|
|
135
|
-
| Adding auth, tenant logic, or
|
|
136
|
-
| Adding
|
|
137
|
-
| Writing tests or refactoring | `guidelines/
|
|
138
|
-
|
|
|
139
|
-
| Writing an ADR or README | `guidelines/
|
|
140
|
-
| Building a new component from scratch | `design/implementation-guide.md` |
|
|
141
|
-
|
|
142
|
-
---
|
|
143
|
-
|
|
144
|
-
## ARCHITECTURE DECISIONS ALREADY MADE (don't re-litigate)
|
|
145
|
-
|
|
146
|
-
| Decision | Choice | Reason |
|
|
147
|
-
|---|---|---|
|
|
148
|
-
| DB access | Prisma only | Parameterised by default, tenant middleware |
|
|
149
|
-
| Queue | BullMQ on Redis | Single system, battle-tested at this scale |
|
|
150
|
-
| Sessions | Opaque tokens in Redis | Revocable, no JWT signature key management |
|
|
151
|
-
| Search | PostgreSQL FTS | Sufficient to 100k users; extract to Typesense at scale |
|
|
152
|
-
| DB topology | Shared Postgres, tenant_id column | Schema-per-tenant impossible at scale for migrations |
|
|
153
|
-
| API style | REST + JSON | Debuggable, works across Node + Python |
|
|
154
|
-
| Passwords | Argon2id | bcrypt is deprecated for this use case |
|
|
155
|
-
| Deployment | Fly Machines (preferred) → ECS → K8s (only with SRE) | Operational complexity ladder |
|
|
81
|
+
| Building any UI component or screen | `design/SKILL.md` (or `src/design/SKILL.md`) |
|
|
82
|
+
| Adding auth, tenant logic, or architecture choices | `docs/guidelines/Architecture.md` |
|
|
83
|
+
| Adding security controls, file uploads, API endpoints | `docs/guidelines/Security.md` |
|
|
84
|
+
| Writing tests or performing large refactoring | `docs/guidelines/Code-Quality.md` |
|
|
85
|
+
| Performance optimizations, database indexing | `docs/guidelines/Performance.md` |
|
|
86
|
+
| Writing an ADR, design documentation, or README | `docs/guidelines/Documentation.md` |
|