aayushus-skills 1.0.1 → 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/cli.js CHANGED
@@ -18,7 +18,11 @@ const styles = {
18
18
  };
19
19
 
20
20
  const options = [
21
- { name: 'AI Agent Configurations (CLAUDE.md, .windsurfrules, etc.)', value: 'agent-config', checked: true },
21
+ { name: 'Antigravity Rules (.antigravityrules)', value: 'antigravity', checked: true },
22
+ { name: 'Devin Rules (.devin/rules/rules.md & AGENTS.md)', value: 'devin', checked: true },
23
+ { name: 'Cursor Rules (.cursorrules)', value: 'cursor', checked: true },
24
+ { name: 'Claude Rules (CLAUDE.md)', value: 'claude', checked: true },
25
+ { name: 'Codex/Copilot Rules (.github/copilot-instructions.md)', value: 'codex', checked: true },
22
26
  { name: 'Prism Design System (tokens, components CSS/TSX)', value: 'design', checked: true },
23
27
  { name: 'Development Guidelines (Architecture, Quality, Security)', value: 'guidelines', checked: true },
24
28
  { name: 'Solo Developer AI SOP (Standard Operating Procedure)', value: 'sop', checked: true }
@@ -26,15 +30,22 @@ const options = [
26
30
 
27
31
  let cursorIndex = 0;
28
32
 
33
+ const args = process.argv.slice(2);
34
+ const isDryRun = args.includes('--dry-run') || args.includes('-d');
35
+
29
36
  function printMenu() {
30
- // Clear screen or reposition cursor
31
37
  readline.cursorTo(process.stdout, 0, 0);
32
38
  readline.clearScreenDown(process.stdout);
33
39
 
34
40
  console.log(`\n${styles.cyan}${styles.bold}=========================================${styles.reset}`);
35
41
  console.log(`${styles.cyan}${styles.bold} aayushus-skills CLI Installer ${styles.reset}`);
42
+ if (isDryRun) {
43
+ console.log(`${styles.yellow}${styles.bold} [ DRY RUN MODE ] ${styles.reset}`);
44
+ }
36
45
  console.log(`${styles.cyan}${styles.bold}=========================================${styles.reset}\n`);
37
- console.log(`${styles.dim}Use ${styles.bold}↑/↓${styles.reset}${styles.dim} to navigate, ${styles.bold}space${styles.reset}${styles.dim} to select/deselect, and ${styles.bold}enter${styles.reset}${styles.dim} to confirm.\n${styles.reset}`);
46
+
47
+ console.log(`${styles.dim}Select components and tools to install/configure:${styles.reset}`);
48
+ console.log(`${styles.dim}Use ${styles.bold}↑/↓${styles.reset}${styles.dim} to navigate, ${styles.bold}space${styles.reset}${styles.dim} to toggle, and ${styles.bold}enter${styles.reset}${styles.dim} to install.\n${styles.reset}`);
38
49
 
39
50
  options.forEach((opt, idx) => {
40
51
  const isCursor = idx === cursorIndex;
@@ -48,6 +59,10 @@ function printMenu() {
48
59
  }
49
60
 
50
61
  function copyFileSync(src, dest) {
62
+ if (isDryRun) {
63
+ console.log(`${styles.yellow}[Dry Run] Would copy: ${path.basename(src)} -> ${path.relative(process.cwd(), dest)}${styles.reset}`);
64
+ return;
65
+ }
51
66
  const destDir = path.dirname(dest);
52
67
  if (!fs.existsSync(destDir)) {
53
68
  fs.mkdirSync(destDir, { recursive: true });
@@ -56,6 +71,10 @@ function copyFileSync(src, dest) {
56
71
  }
57
72
 
58
73
  function copyFolderSync(src, dest) {
74
+ if (isDryRun) {
75
+ console.log(`${styles.yellow}[Dry Run] Would copy folder: ${path.basename(src)}/ -> ${path.relative(process.cwd(), dest)}/${styles.reset}`);
76
+ return;
77
+ }
59
78
  if (!fs.existsSync(dest)) {
60
79
  fs.mkdirSync(dest, { recursive: true });
61
80
  }
@@ -74,7 +93,8 @@ function copyFolderSync(src, dest) {
74
93
  }
75
94
 
76
95
  function runInstallation() {
77
- console.log(`\n${styles.yellow}Starting installation...${styles.reset}\n`);
96
+ const modeText = isDryRun ? 'Dry run simulation' : 'Installation';
97
+ console.log(`\n${styles.yellow}Starting ${modeText}...${styles.reset}\n`);
78
98
 
79
99
  const packageRoot = __dirname;
80
100
  const targetRoot = process.cwd();
@@ -86,27 +106,50 @@ function runInstallation() {
86
106
  process.exit(0);
87
107
  }
88
108
 
89
- // 1. Agent Configs
90
- if (selected.includes('agent-config')) {
91
- console.log(`${styles.blue} Installing AI Agent Configurations...${styles.reset}`);
92
- const srcAgentDir = path.join(packageRoot, 'agent-config');
93
-
94
- if (fs.existsSync(srcAgentDir)) {
95
- copyFileSync(path.join(srcAgentDir, 'windsurfrules.md'), path.join(targetRoot, '.windsurfrules'));
96
- copyFileSync(path.join(srcAgentDir, 'windsurfrules-global.md'), path.join(targetRoot, '.windsurfrules-global'));
97
- copyFileSync(path.join(srcAgentDir, 'CLAUDE.md'), path.join(targetRoot, 'CLAUDE.md'));
98
- copyFileSync(path.join(srcAgentDir, 'copilot-instructions.md'), path.join(targetRoot, '.github', 'copilot-instructions.md'));
99
- console.log(`${styles.green} Copied .windsurfrules, .windsurfrules-global, CLAUDE.md, and .github/copilot-instructions.md${styles.reset}`);
100
- } else {
101
- console.log(`${styles.red} ✗ Source agent-config directory not found.${styles.reset}`);
109
+ const srcAgentDir = path.join(packageRoot, 'agent-config');
110
+ const hasAgentConfigs = fs.existsSync(srcAgentDir);
111
+
112
+ if (hasAgentConfigs) {
113
+ const genericRulesFile = path.join(srcAgentDir, 'rules.md');
114
+ const claudeFile = path.join(srcAgentDir, 'CLAUDE.md');
115
+ const copilotFile = path.join(srcAgentDir, 'copilot-instructions.md');
116
+
117
+ // 1. Antigravity
118
+ if (selected.includes('antigravity')) {
119
+ console.log(`${styles.blue} Configuring Antigravity rules...${styles.reset}`);
120
+ copyFileSync(genericRulesFile, path.join(targetRoot, '.antigravityrules'));
121
+ }
122
+
123
+ // 2. Devin
124
+ if (selected.includes('devin')) {
125
+ console.log(`${styles.blue} Configuring Devin rules...${styles.reset}`);
126
+ copyFileSync(genericRulesFile, path.join(targetRoot, '.devin', 'rules', 'rules.md'));
127
+ copyFileSync(genericRulesFile, path.join(targetRoot, 'AGENTS.md'));
128
+ }
129
+
130
+ // 3. Cursor
131
+ if (selected.includes('cursor')) {
132
+ console.log(`${styles.blue} Configuring Cursor rules...${styles.reset}`);
133
+ copyFileSync(genericRulesFile, path.join(targetRoot, '.cursorrules'));
134
+ }
135
+
136
+ // 4. Claude
137
+ if (selected.includes('claude')) {
138
+ console.log(`${styles.blue} Configuring Claude CLAUDE.md...${styles.reset}`);
139
+ copyFileSync(claudeFile, path.join(targetRoot, 'CLAUDE.md'));
140
+ }
141
+
142
+ // 5. Codex/Copilot
143
+ if (selected.includes('codex')) {
144
+ console.log(`${styles.blue} Configuring Codex/Copilot rules...${styles.reset}`);
145
+ copyFileSync(copilotFile, path.join(targetRoot, '.github', 'copilot-instructions.md'));
102
146
  }
103
147
  }
104
148
 
105
- // 2. Design System
149
+ // 6. Design System
106
150
  if (selected.includes('design')) {
107
151
  console.log(`${styles.blue} Installing Prism Design System...${styles.reset}`);
108
152
  const srcDesignDir = path.join(packageRoot, 'design');
109
- // Defaulting to root design folder or src/design if src exists
110
153
  const destDesignDir = fs.existsSync(path.join(targetRoot, 'src'))
111
154
  ? path.join(targetRoot, 'src', 'design')
112
155
  : path.join(targetRoot, 'design');
@@ -119,7 +162,7 @@ function runInstallation() {
119
162
  }
120
163
  }
121
164
 
122
- // 3. Development Guidelines
165
+ // 7. Development Guidelines
123
166
  if (selected.includes('guidelines')) {
124
167
  console.log(`${styles.blue} Installing Development Guidelines...${styles.reset}`);
125
168
  const srcGuidelinesDir = path.join(packageRoot, 'guidelines');
@@ -133,7 +176,7 @@ function runInstallation() {
133
176
  }
134
177
  }
135
178
 
136
- // 4. SOP
179
+ // 8. SOP
137
180
  if (selected.includes('sop')) {
138
181
  console.log(`${styles.blue} Installing Solo Developer AI SOP...${styles.reset}`);
139
182
  const srcSopFile = path.join(packageRoot, 'Solo Developer AI SOP.md');
@@ -146,13 +189,14 @@ function runInstallation() {
146
189
  }
147
190
  }
148
191
 
149
- console.log(`\n${styles.green}${styles.bold}✓ Installation completed successfully!${styles.reset}\n`);
192
+ const completeMsg = isDryRun
193
+ ? '✓ Dry run completed successfully! No files were modified.'
194
+ : '✓ Installation completed successfully!';
195
+ console.log(`\n${styles.green}${styles.bold}${completeMsg}${styles.reset}\n`);
150
196
  process.exit(0);
151
197
  }
152
198
 
153
- const args = process.argv.slice(2);
154
-
155
- // Check if help is requested
199
+ // Help documentation
156
200
  if (args.includes('--help') || args.includes('-h') || args.includes('help')) {
157
201
  console.log(`
158
202
  aayushus-skills CLI Installer
@@ -161,31 +205,42 @@ Usage:
161
205
  npx aayushus-skills Interactive installation menu (default)
162
206
  npx aayushus-skills all Install everything directly
163
207
  npx aayushus-skills design Install Prism Design System only
164
- npx aayushus-skills agent-config Install AI Agent Configurations only
165
208
  npx aayushus-skills guidelines Install Development Guidelines only
166
209
  npx aayushus-skills sop Install Solo Developer AI SOP only
210
+ npx aayushus-skills cursor Install Cursor rules only
211
+ npx aayushus-skills antigravity Install Antigravity rules only
212
+ npx aayushus-skills devin Install Devin rules only
213
+ npx aayushus-skills claude Install Claude rules only
214
+ npx aayushus-skills codex Install Codex/Copilot rules only
215
+
216
+ Flags:
217
+ -d, --dry-run Preview installation without making actual changes
167
218
  `);
168
219
  process.exit(0);
169
220
  }
170
221
 
171
- // Map command-line args to options values
222
+ // Check for direct subcommands
172
223
  const argMap = {
224
+ 'antigravity': 'antigravity',
225
+ 'devin': 'devin',
226
+ 'cursor': 'cursor',
227
+ 'claude': 'claude',
228
+ 'codex': 'codex',
229
+ 'copilot': 'codex',
173
230
  'design': 'design',
174
- 'agent-config': 'agent-config',
175
- 'agent': 'agent-config',
176
231
  'guidelines': 'guidelines',
177
232
  'sop': 'sop'
178
233
  };
179
234
 
180
- const hasDirectCommand = args.some(arg => argMap[arg] || arg === 'all');
235
+ const directArgs = args.filter(arg => arg !== '--dry-run' && arg !== '-d');
236
+ const hasDirectCommand = directArgs.some(arg => argMap[arg] || arg === 'all');
181
237
 
182
238
  if (hasDirectCommand) {
183
- if (args.includes('all')) {
239
+ if (directArgs.includes('all')) {
184
240
  options.forEach(opt => opt.checked = true);
185
241
  } else {
186
- // Select only options matching the command line arguments
187
242
  options.forEach(opt => {
188
- opt.checked = args.some(arg => argMap[arg] === opt.value);
243
+ opt.checked = directArgs.some(arg => argMap[arg] === opt.value);
189
244
  });
190
245
  }
191
246
  runInstallation();
@@ -193,7 +248,6 @@ if (hasDirectCommand) {
193
248
 
194
249
  // Start interactive CLI
195
250
  if (!process.stdin.isTTY) {
196
- // If not TTY, default to installing everything
197
251
  console.log('Non-interactive environment detected. Installing all components...');
198
252
  options.forEach(opt => opt.checked = true);
199
253
  runInstallation();
@@ -227,7 +281,6 @@ process.stdin.on('keypress', (str, key) => {
227
281
  break;
228
282
  case 'return':
229
283
  case 'enter':
230
- // Clean up raw mode
231
284
  if (process.stdin.isTTY) {
232
285
  process.stdin.setRawMode(false);
233
286
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aayushus-skills",
3
- "version": "1.0.1",
3
+ "version": "1.2.0",
4
4
  "description": "Interactive CLI tool to install developer agent configurations, design system tokens, guidelines, and SOPs.",
5
5
  "main": "cli.js",
6
6
  "bin": {
@@ -1,128 +0,0 @@
1
- # Universal coding rules — applies to all projects
2
-
3
- These rules are tool-agnostic, stack-agnostic hard constraints.
4
- Project-specific stack decisions live in .windsurfrules at the project root.
5
-
6
- ---
7
-
8
- ## SECURITY — never negotiate these
9
-
10
- - Validate every input at every system boundary — HTTP, queue, file upload, CLI args
11
- - All strings have a max length — no unbounded input
12
- - Passwords: Argon2id only — never bcrypt, MD5, SHA-1, or SHA-256 for passwords
13
- - Secrets in a secrets manager (Doppler, AWS Secrets Manager, Vault) — never in code, env files, or logs
14
- - One place reads environment variables — a config module with schema validation
15
- - Never reveal whether a user/email/resource exists to an unauthenticated caller
16
- - Unauthorised reads return 404, not 403 — prevents existence leak
17
- - Never log secrets, tokens, PII, or raw passwords — redact at the transport layer
18
- - Session tokens rotate on: login, logout, privilege change
19
- - File uploads: validate by magic number (not extension), scan for malware, strip metadata
20
- - SSRF: DNS-resolve before fetching, reject private/loopback IPs
21
- - Every outbound network call has a hard timeout
22
- - Retries only on 5xx and network errors — never on 4xx
23
- - Rate-limit authentication endpoints (login, password reset, MFA)
24
- - CORS: explicit allowlist — never wildcard `*` in production
25
- - Security headers on every response: HSTS, X-Frame-Options, CSP
26
- - TLS 1.2+ everywhere
27
-
28
- ---
29
-
30
- ## CODE QUALITY — language-agnostic rules
31
-
32
- - Use the strictest type-checking mode available for your language
33
- - Never use the "any" escape hatch (TypeScript `any`, Python `Any` without bounds, Go `interface{}` without assertion)
34
- - Functions ≤ 80 lines (aim ≤ 30); files ≤ 500 lines (aim ≤ 300)
35
- - No `console.log` / `print` in committed code — use a structured logger
36
- - No commented-out code — delete it; use git history
37
- - No TODO without author and date; CI should fail if TODOs accumulate
38
- - Boolean variables use `is/has/can/should` prefix
39
- - Error handling: throw/panic for programming errors (bugs); return typed errors/Result for expected failures (validation, not-found, rate-limit)
40
- - Async/await always — never raw promise chains or callbacks
41
- - Parallelise independent async work — don't await sequentially when parallel is safe
42
- - No N+1 queries — use eager loading, joins, or batching
43
- - No circular imports — signals wrong module boundaries
44
- - PR size ≤ 400 lines unless generated — split larger changes
45
- - Refactoring and feature work never in the same PR
46
-
47
- ---
48
-
49
- ## PERFORMANCE — hard budgets
50
-
51
- | Interaction | Budget |
52
- |---|---|
53
- | UI response (click, hover, keypress) | ≤ 100ms |
54
- | Page / view transition | ≤ 200ms |
55
- | API read (cached) p95 | < 200ms |
56
- | API read (list) p95 | < 300ms |
57
- | API write p95 | < 300ms |
58
- | Anything > 1s | Show progress indicator; consider async |
59
- | Anything > 10s | Must be async with completion notification |
60
- | LCP | ≤ 2.5s (p75) |
61
- | INP | ≤ 200ms (p75) |
62
- | CLS | ≤ 0.1 (p75) |
63
- | JS bundle gzipped | ≤ 170KB |
64
- | CSS bundle gzipped | ≤ 30KB |
65
- | DB indexed point lookup | ≤ 10ms |
66
- | DB list query | ≤ 200ms |
67
-
68
- - Profile before optimising — never optimise by intuition
69
- - Every query must hit an index — no sequential scans on large tables
70
- - Cache keys must include tenant/user scope — never serve one user's cached data to another
71
- - TTL on every cache entry — no infinite caches
72
-
73
- ---
74
-
75
- ## OBSERVABILITY — always
76
-
77
- - Structured JSON logs — required fields: `timestamp`, `level`, `service`, `correlationId`, `message`
78
- - Correlation ID on every log line, every async job, every cross-service call
79
- - Every HTTP route emits request count + duration metrics
80
- - Slow queries logged automatically — threshold: 50ms dev, 200ms staging, 500ms prod
81
- - Audit logs for any action that changes permissions, deletes data, or touches billing — append-only, never editable
82
-
83
- ---
84
-
85
- ## PRISM DESIGN SYSTEM — applies to all UI work
86
-
87
- - Never hardcode colours, radii, or font names — use CSS tokens (`var(--token-name)`)
88
- - Never use pure `#000` or `#fff` as text — use `var(--text-default)` (warm off-black)
89
- - Three colour layers: neutrals (90% of pixels) · product accent (`--accent`) · AI gradient (`--ai-grad`) — never mix
90
- - Sparkle star is the only AI glyph — no robots, brains, lightbulbs, wands
91
- - Never import Tailwind, Radix defaults, or shadcn themes — use `components.tsx` from the design system
92
- - Touch targets: 44×44px minimum on mobile
93
- - Mobile inputs: `font-size ≥ 16px` — iOS Safari zooms on focus otherwise
94
- - Dark mode: `[data-theme="dark"]` selector overrides — never `@media (prefers-color-scheme: dark)` in component CSS
95
- - Spacing: multiples of 4px only — allowed: 4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 48, 56, 64
96
-
97
- ---
98
-
99
- ## DOCUMENTATION — always
100
-
101
- - ADR for every irreversible architectural decision — written before code merges
102
- - Every public API documented (OpenAPI 3.1 for HTTP, equivalent for others)
103
- - README passes the "5 minutes to running" test
104
- - Every migration is reversible or explicitly documented as one-way
105
- - Diagrams in code (Mermaid preferred) — never in external tools that drift
106
-
107
- ---
108
-
109
- ## ASYNC WORK — any language, any queue
110
-
111
- - Any work > 1 second belongs in a background job — never block an HTTP handler
112
- - Every job is idempotent — safe to retry without double side effects
113
- - Idempotency keys on mutations with external side effects (email, payment, webhook)
114
- - Jobs have a retry limit with exponential backoff
115
- - Job failure is observable — dead-letter queue or failure log
116
-
117
- ---
118
-
119
- ## WHEN TO CHECK FULL DOCS
120
-
121
- Full guidelines live in the Obsidian Skills vault:
122
- - Any UI work → load `prism-design` skill
123
- - Architecture, service boundaries, DB design → `guidelines/architecture-guidelines.md`
124
- - Auth, file upload, external APIs, AI features → `guidelines/security-guidelines.md`
125
- - Tests, refactoring, PR review → `guidelines/code-quality-guidelines.md`
126
- - Performance, caching, queries → `guidelines/performance-guidelines.md`
127
- - ADRs, READMEs, API docs → `guidelines/documentation-guidelines.md`
128
- - New component from scratch → `design/implementation-guide.md`
File without changes