@azerogluemin/ai-bootstrap 0.5.0 → 0.6.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.
@@ -0,0 +1,526 @@
1
+ // Preset scaffolder — writes folder structure + CLAUDE.md per preset.
2
+ //
3
+ // Each preset defines:
4
+ // - List of folders to create (some may be empty placeholders)
5
+ // - Skeleton files to write (CLAUDE.md, README.md, docs/*.md template)
6
+ //
7
+ // Folders are created idempotently (no overwrites if exists).
8
+ // Files are written ONLY IF they don't exist (CLAUDE.md is sacred — never overwrite).
9
+ import { existsSync, mkdirSync, writeFileSync } from 'node:fs';
10
+ import { join } from 'node:path';
11
+ export function scaffoldPreset(presetId, opts) {
12
+ switch (presetId) {
13
+ case 'saas-development':
14
+ return scaffoldSaas(opts);
15
+ case 'social-page':
16
+ return scaffoldSocialPage(opts);
17
+ case 'ai-studio':
18
+ return scaffoldAiStudio(opts);
19
+ }
20
+ }
21
+ // ════════════════════════════════════════════════════════════
22
+ // SaaS Development
23
+ // ════════════════════════════════════════════════════════════
24
+ function scaffoldSaas(opts) {
25
+ const r = { foldersCreated: [], filesWritten: [], filesSkipped: [] };
26
+ // Top-level folders
27
+ const folders = [
28
+ 'apps/web',
29
+ 'apps/api',
30
+ 'apps/admin',
31
+ 'packages/ui',
32
+ 'packages/db',
33
+ 'packages/shared',
34
+ 'docs',
35
+ 'scripts',
36
+ 'infra',
37
+ ];
38
+ for (const f of folders)
39
+ ensureFolder(opts.cwd, f, r);
40
+ // docs/ — numbered template files
41
+ const docs = [
42
+ { name: '00-claude-code-guide.md', body: '# 00 — Claude Code Guide\n\n<!-- Necə Claude Code istifadə olunur bu layihədə -->\n' },
43
+ { name: '01-overview.md', body: '# 01 — Layihə icmal\n\n<!-- Bu SaaS nə həll edir, kim üçündür -->\n' },
44
+ { name: '02-architecture.md', body: '# 02 — Arxitektura\n\n<!-- Yüksək səviyyə komponent diaqramı -->\n' },
45
+ { name: '03-stack-decisions.md', body: '# 03 — Stack qərarları\n\n<!-- Niyə bu framework, DB, deploy hostu -->\n' },
46
+ { name: '04-multi-tenant-model.md', body: '# 04 — Multi-tenant model\n\n<!-- Shared schema / RLS / schema-per-tenant / DB-per-tenant -->\n' },
47
+ { name: '05-auth-strategy.md', body: '# 05 — Auth strategiyası\n\n<!-- JWT/session, OAuth, RBAC vs ABAC -->\n' },
48
+ { name: '06-api-design.md', body: '# 06 — API dizayn\n\n<!-- REST/GraphQL, naming, error format, versioning -->\n' },
49
+ { name: '07-data-model.md', body: '# 07 — Data model\n\n<!-- Əsas entity-lər, relations, indexes -->\n' },
50
+ { name: '08-frontend-architecture.md', body: '# 08 — Frontend arxitektura\n\n<!-- State mgmt, routing, design tokens -->\n' },
51
+ { name: '09-decisions-log.md', body: '# 09 — Decisions log\n\nAppend-only. Hər mühüm qərar #NNN ilə qeyd olunur.\n\n## #001 — <decision title>\n**Date**: YYYY-MM-DD\n**Context**: \n**Decision**: \n**Alternatives**: \n**Tradeoff**: \n**Reversibility**: reversible / one-way\n' },
52
+ { name: '10-open-questions.md', body: '# 10 — Open questions\n\n<!-- Cavabsız strateji suallar -->\n' },
53
+ { name: '11-backlog.md', body: '# 11 — Backlog\n\n<!-- Növbə işlər, RICE/ICE prioritetlə -->\n' },
54
+ { name: '12-modules.md', body: '# 12 — Modul status\n\n| Modul | Status | Owner | Notlar |\n|---|---|---|---|\n' },
55
+ { name: '13-database.md', body: '# 13 — Database\n\n<!-- Schema, migration, RLS policies -->\n' },
56
+ { name: '14-deployment.md', body: '# 14 — Deployment\n\n<!-- Production deploy axını, env-lər -->\n' },
57
+ { name: '15-monitoring.md', body: '# 15 — Monitoring + observability\n\n<!-- Metrics, traces, logs, SLOs -->\n' },
58
+ { name: '16-security.md', body: '# 16 — Security\n\n<!-- OWASP checklist, secrets, audit log -->\n' },
59
+ { name: '17-compliance.md', body: '# 17 — Compliance\n\n<!-- GDPR/CCPA/AZ data protection -->\n' },
60
+ { name: '18-i18n.md', body: '# 18 — Internationalization\n\n<!-- Dil dəstəyi, fallback, RTL -->\n' },
61
+ { name: '19-testing.md', body: '# 19 — Testing\n\n<!-- Unit, integration, E2E strategiyası -->\n' },
62
+ { name: '20-performance.md', body: '# 20 — Performance\n\n<!-- Lighthouse targets, p95 latency, optimization log -->\n' },
63
+ { name: '21-pricing-model.md', body: '# 21 — Pricing model\n\n<!-- Tier-lər, qiymət, billing, Stripe events -->\n' },
64
+ { name: '22-onboarding.md', body: '# 22 — Onboarding flow\n\n<!-- Signup → first value, time-to-value target -->\n' },
65
+ { name: '23-support-runbook.md', body: '# 23 — Support runbook\n\n<!-- Customer support proseslər, response SLA -->\n' },
66
+ { name: '24-incident-response.md', body: '# 24 — Incident response\n\n<!-- SEV1/2/3 təriflər, on-call, post-mortem template -->\n' },
67
+ { name: '25-marketing.md', body: '# 25 — Marketing\n\n<!-- Acquisition kanallar, SEO target, paid ads -->\n' },
68
+ { name: '26-sales-playbook.md', body: '# 26 — Sales playbook\n\n<!-- ICP, qualification, demo script -->\n' },
69
+ { name: '27-go-live-runbook.md', body: '# 27 — Go-live runbook\n\n<!-- Production launch checklist -->\n' },
70
+ ];
71
+ for (const d of docs)
72
+ writeIfNew(opts.cwd, `docs/${d.name}`, d.body, r);
73
+ // Root files
74
+ writeIfNew(opts.cwd, 'CLAUDE.md', saasClaudeMd(opts), r);
75
+ writeIfNew(opts.cwd, 'README.md', saasReadme(opts), r);
76
+ writeIfNew(opts.cwd, '.gitignore', saasGitignore(), r);
77
+ return r;
78
+ }
79
+ function saasClaudeMd(o) {
80
+ return `# CLAUDE.md — ${o.projectName}
81
+
82
+ Bu fayl bu layihə üçün xüsusi instruksiyalardır. Hər söhbətdə avtomatik yüklənir.
83
+
84
+ ## Layihə haqqında
85
+
86
+ ${o.description || '(təsvir verilməyib — buraya yaz)'}
87
+
88
+ ## Preset
89
+
90
+ SaaS Development — fullstack web + mobile + API + DB.
91
+
92
+ ## Skill + agent
93
+
94
+ Project-scope skill və agent-lər \`.claude/skills/\` və \`.claude/agents/\` qovluqlarındadır.
95
+
96
+ ## Strukrur
97
+
98
+ \`\`\`
99
+ apps/
100
+ ├── web/ # Frontend (React/Next/Vue/Svelte)
101
+ ├── api/ # Backend (NestJS/Hono/FastAPI)
102
+ └── admin/ # Admin dashboard
103
+ packages/
104
+ ├── ui/ # Shared design system
105
+ ├── db/ # Shared DB (Prisma schema, migrations)
106
+ └── shared/ # Shared types, utils
107
+ docs/ # 28 numbered docs (00-27)
108
+ infra/ # IaC (Terraform/Pulumi)
109
+ scripts/ # Build, deploy, seed scripts
110
+ \`\`\`
111
+
112
+ ## Sərt qaydalar
113
+
114
+ 1. **TypeScript strict** — \`any\` qadağa. Hər boundary-də Zod/class-validator.
115
+ 2. **Multi-tenant** — hər DB sorğusunda \`tenantId\` filter. RLS Postgres-də mümkünsə.
116
+ 3. **Auth** — JWT 15min + refresh rotating. Cookie HttpOnly + Secure + SameSite.
117
+ 4. **Test piramida** — unit (vitest/jest), integration (testcontainers), E2E (Playwright).
118
+ 5. **OWASP Top 10** — hər PR-da security-auditor agent.
119
+ 6. **decisions-log** append-only — \`docs/09-decisions-log.md\`-ə hər mühüm qərar #NNN.
120
+ 7. **Living docs** — kod dəyişdikdə \`docs/12-modules.md\` status yenilənir.
121
+ 8. **No silent catch** — error-lar həmişə loglanır + struktur cavab.
122
+
123
+ ## Custom rules (bu layihəyə xas)
124
+
125
+ <!-- Buraya layihəyə xas qaydalar yaz -->
126
+ `;
127
+ }
128
+ function saasReadme(o) {
129
+ return `# ${o.projectName}
130
+
131
+ ${o.description || '(qısa təsvir)'}
132
+
133
+ ## Quick start
134
+
135
+ \`\`\`bash
136
+ pnpm install
137
+ pnpm dev
138
+ \`\`\`
139
+
140
+ ## Docs
141
+
142
+ Bütün sənədlər \`docs/\` qovluğunda (00-27 numbered).
143
+
144
+ - [01 — Overview](./docs/01-overview.md)
145
+ - [02 — Architecture](./docs/02-architecture.md)
146
+ - [03 — Stack decisions](./docs/03-stack-decisions.md)
147
+ - [09 — Decisions log](./docs/09-decisions-log.md)
148
+ - [14 — Deployment](./docs/14-deployment.md)
149
+ `;
150
+ }
151
+ function saasGitignore() {
152
+ return [
153
+ 'node_modules/', 'dist/', '.next/', '.nuxt/', '.svelte-kit/', 'build/',
154
+ '.env', '.env.local', '.env.*.local', '*.log',
155
+ '.DS_Store', '.idea/', '.vscode/',
156
+ 'coverage/', '*.tsbuildinfo',
157
+ '',
158
+ ].join('\n');
159
+ }
160
+ // ════════════════════════════════════════════════════════════
161
+ // Social Page
162
+ // ════════════════════════════════════════════════════════════
163
+ function scaffoldSocialPage(opts) {
164
+ const r = { foldersCreated: [], filesWritten: [], filesSkipped: [] };
165
+ // Strategy folders
166
+ ensureFolder(opts.cwd, 'strategy', r);
167
+ ensureFolder(opts.cwd, 'calendar', r);
168
+ // Today's daily folder (auto-create with date)
169
+ const today = todayDateStr();
170
+ const dailyBase = `days/${today}`;
171
+ for (const sub of ['characters', 'shots', 'video', 'music', 'thumbnail', 'final']) {
172
+ ensureFolder(opts.cwd, `${dailyBase}/${sub}`, r);
173
+ }
174
+ // Prompts library
175
+ for (const sub of ['characters', 'shots', 'thumbnails', 'music']) {
176
+ ensureFolder(opts.cwd, `prompts-library/${sub}`, r);
177
+ }
178
+ // Assets, analytics, references
179
+ for (const f of ['assets/brand-logo', 'assets/fonts', 'assets/color-palette', 'analytics']) {
180
+ ensureFolder(opts.cwd, f, r);
181
+ }
182
+ // Strategy MD skeletons
183
+ writeIfNew(opts.cwd, 'strategy/brand-guide.md', socialBrandGuide(opts), r);
184
+ writeIfNew(opts.cwd, 'strategy/content-pillars.md', socialContentPillars(opts), r);
185
+ writeIfNew(opts.cwd, 'strategy/audience-personas.md', socialAudiencePersonas(), r);
186
+ writeIfNew(opts.cwd, 'strategy/competitors.md', socialCompetitors(), r);
187
+ // Calendar
188
+ writeIfNew(opts.cwd, `calendar/content-plan-${today.slice(0, 7)}.md`, socialMonthlyPlan(today), r);
189
+ // Root files
190
+ writeIfNew(opts.cwd, 'CLAUDE.md', socialClaudeMd(opts), r);
191
+ writeIfNew(opts.cwd, 'README.md', socialReadme(opts), r);
192
+ writeIfNew(opts.cwd, '.gitignore', socialGitignore(), r);
193
+ return r;
194
+ }
195
+ function socialClaudeMd(o) {
196
+ return `# CLAUDE.md — ${o.projectName}
197
+
198
+ Bu fayl bu sosial brand üçün xüsusi instruksiyalardır.
199
+
200
+ ## Brand haqqında
201
+
202
+ ${o.description || '(təsvir verilməyib — buraya yaz)'}
203
+
204
+ ## Preset
205
+
206
+ Social Page — sosial brand idarəsi (kontent + strateji + analitika).
207
+
208
+ ## Strukrur
209
+
210
+ \`\`\`
211
+ strategy/
212
+ ├── brand-guide.md # Voice, tone, do/don't
213
+ ├── content-pillars.md # 4-6 pillar
214
+ ├── audience-personas.md # 3-5 persona
215
+ └── competitors.md
216
+ calendar/
217
+ └── content-plan-YYYY-MM.md
218
+ days/
219
+ └── YYYY-MM-DD/
220
+ ├── characters/ shots/ video/ music/ thumbnail/ final/
221
+ prompts-library/ # Təsdiqlənmiş prompt-lar
222
+ ├── characters/ shots/ thumbnails/ music/
223
+ assets/
224
+ ├── brand-logo/ fonts/ color-palette/
225
+ analytics/
226
+ \`\`\`
227
+
228
+ ## Sərt qayda — Prompt əvvəl, MD sonra (vizual təsdiqsiz fayl yaratma)
229
+
230
+ Vizual layihələrdə (obraz, shot, thumbnail, video keyframe):
231
+ 1. **Prompt-u chat-də yaz** (paste-ready) — istifadəçi generate edir
232
+ 2. **İstifadəçi şəkili göstərir** — bəyənir/bəyənmir
233
+ 3. **Təsdiq olsa** → həmin prompt MD-yə yaxud uyğun qovluğa yazılır (\`prompts-library/\`-ə əlavə)
234
+ 4. **Təsdiq olmasa** → düzəliş, yenidən prompt
235
+ 5. **Vizual təsdiqsiz fayl qadağa**
236
+
237
+ ## Sərt qayda — Günlük qovluğa təşkilatlılıq
238
+
239
+ Hər gün öz qovluğunda işləyirik (\`days/YYYY-MM-DD/\`). İşlərin qarışmaması üçün:
240
+ - Bu günün karakterləri → \`days/<today>/characters/\`
241
+ - Bu günün shot-ları → \`days/<today>/shots/\`
242
+ - Final video → \`days/<today>/final/\`
243
+
244
+ Strategy / calendar (uzunmüddətli) ayrıca qalır.
245
+
246
+ ## Sərt qayda — Mütəxəssis-səviyyə araşdırma
247
+
248
+ Hər iddia / tövsiyə / copy üçün:
249
+ - Web search / faktiki mənbə yoxlanır
250
+ - "Düşünürəm ki..." yerinə "Mənbə X-də bu yazılıb..."
251
+ - Uydurma yox
252
+
253
+ ## Custom rules
254
+
255
+ <!-- Buraya brand-spesifik qaydalar yaz -->
256
+ `;
257
+ }
258
+ function socialBrandGuide(o) {
259
+ return `# Brand Guide — ${o.projectName}
260
+
261
+ ## Voice
262
+ <!-- Brand necə danışır? 1-2 cümlə. Misal: "AI komediya creator, sözünü kəsməyən, müsbət enerjili" -->
263
+
264
+ ## Tone (per context)
265
+ - **Educational post**:
266
+ - **Komediya Reel**:
267
+ - **BTS story**:
268
+ - **DM cavab**:
269
+
270
+ ## Visual identity
271
+ - **Rəng palitrası** (hex codes):
272
+ - **Tipoqrafiya** (font ailəsi):
273
+ - **Logo qaydaları**:
274
+
275
+ ## Do (mütləq et)
276
+ -
277
+
278
+ ## Don't (mütləq etmə)
279
+ -
280
+
281
+ ## Voice nümunələri (real post-lardan)
282
+ > "..."
283
+
284
+ ## Brand əsas hekayəsi
285
+ <!-- 2-3 cümlə — sən kimsən, nə üçün varsan -->
286
+ `;
287
+ }
288
+ function socialContentPillars(o) {
289
+ return `# Content Pillars — ${o.projectName}
290
+
291
+ 4-6 pillar. Hər post bir pillarə düşməlidir.
292
+
293
+ ## Pillar 1: <ad>
294
+ - **Məqsəd**: <educational / entertainment / inspiration / community / promotion>
295
+ - **Format-lar**: <Reel / Story / Carousel / Static>
296
+ - **Tezlik**: hər həftədə X dəfə
297
+ - **Pillar nümunəsi**:
298
+
299
+ ## Pillar 2:
300
+
301
+ ## Pillar 3:
302
+
303
+ ## Pillar 4:
304
+
305
+ ## Distribution (haftalıq cədvəl)
306
+ | Gün | Pillar | Format |
307
+ |---|---|---|
308
+ | Mon | | |
309
+ | Tue | | |
310
+ | Wed | | |
311
+ | Thu | | |
312
+ | Fri | | |
313
+ | Sat | | |
314
+ | Sun | | |
315
+ `;
316
+ }
317
+ function socialAudiencePersonas() {
318
+ return `# Audience Personas
319
+
320
+ ## Persona 1: <ad>
321
+ - **Yaş**:
322
+ - **İş**:
323
+ - **Pain point**:
324
+ - **Niyə bizi izləyir**:
325
+ - **Hansı pillar ona xitab edir**:
326
+
327
+ ## Persona 2:
328
+
329
+ ## Persona 3:
330
+ `;
331
+ }
332
+ function socialCompetitors() {
333
+ return `# Competitors
334
+
335
+ | Brand | Handle | Niye baxırıq | Nə öyrənirik |
336
+ |---|---|---|---|
337
+
338
+ `;
339
+ }
340
+ function socialMonthlyPlan(today) {
341
+ const ym = today.slice(0, 7);
342
+ return `# Content Plan — ${ym}
343
+
344
+ ## Theme this month
345
+ <!-- 1 cümlə — ayın əsas mövzusu -->
346
+
347
+ ## Goals
348
+ - Reach:
349
+ - Engagement:
350
+ - Follower growth:
351
+ - Saved posts:
352
+
353
+ ## Weekly cadence
354
+ | Week | Theme | Posts |
355
+ |---|---|---|
356
+ | 1 | | |
357
+ | 2 | | |
358
+ | 3 | | |
359
+ | 4 | | |
360
+ `;
361
+ }
362
+ function socialReadme(o) {
363
+ return `# ${o.projectName}
364
+
365
+ ${o.description || '(qısa təsvir)'}
366
+
367
+ ## Workflow
368
+
369
+ 1. Strategy yenilə → \`strategy/\`
370
+ 2. Aylıq plan → \`calendar/\`
371
+ 3. Hər gün öz qovluğu → \`days/YYYY-MM-DD/\`
372
+ 4. Təsdiqlənmiş prompt-lar → \`prompts-library/\`
373
+
374
+ ## Claude Code
375
+
376
+ Bu layihə \`ai-bootstrap\` ilə qurulub. Skills + agents \`.claude/\` qovluğundadır.
377
+ \`\`\`bash
378
+ claude
379
+ \`\`\`
380
+ `;
381
+ }
382
+ function socialGitignore() {
383
+ return [
384
+ '.DS_Store', '*.log',
385
+ 'days/*/video/*.mp4', 'days/*/music/*.wav', 'days/*/music/*.mp3',
386
+ '# Large media — store via Drive/Dropbox if needed:',
387
+ '# days/*/final/*.mp4',
388
+ '',
389
+ ].join('\n');
390
+ }
391
+ // ════════════════════════════════════════════════════════════
392
+ // AI Studio
393
+ // ════════════════════════════════════════════════════════════
394
+ function scaffoldAiStudio(opts) {
395
+ const r = { foldersCreated: [], filesWritten: [], filesSkipped: [] };
396
+ // Projects + days
397
+ ensureFolder(opts.cwd, 'projects', r);
398
+ const today = todayDateStr();
399
+ const dailyBase = `days/${today}`;
400
+ for (const sub of ['characters', 'shots', 'video', 'music', 'final']) {
401
+ ensureFolder(opts.cwd, `${dailyBase}/${sub}`, r);
402
+ }
403
+ // References
404
+ for (const f of ['references/pixar-style', 'references/cinematography', 'references/color-grading']) {
405
+ ensureFolder(opts.cwd, f, r);
406
+ }
407
+ // Prompts library
408
+ for (const sub of ['characters', 'shots', 'video', 'music']) {
409
+ ensureFolder(opts.cwd, `prompts-library/${sub}`, r);
410
+ }
411
+ // Root files
412
+ writeIfNew(opts.cwd, 'CLAUDE.md', aiStudioClaudeMd(opts), r);
413
+ writeIfNew(opts.cwd, 'README.md', aiStudioReadme(opts), r);
414
+ writeIfNew(opts.cwd, '.gitignore', socialGitignore(), r); // same as social
415
+ return r;
416
+ }
417
+ function aiStudioClaudeMd(o) {
418
+ return `# CLAUDE.md — ${o.projectName}
419
+
420
+ Bu fayl bu AI Studio üçün xüsusi instruksiyalardır.
421
+
422
+ ## Studio haqqında
423
+
424
+ ${o.description || '(təsvir verilməyib — buraya yaz)'}
425
+
426
+ ## Preset
427
+
428
+ AI Studio — AI ilə video / şəkil / musiqi production. Müştəri sifarişləri + şəxsi eksperimentlər. Sosial nəşr yoxdur.
429
+
430
+ ## Strukrur
431
+
432
+ \`\`\`
433
+ projects/ # Müştəri / portfolio layihələri (uzunmüddətli)
434
+ ├── <project-name>/
435
+ │ ├── brief.md
436
+ │ ├── characters/ locations/ shots/ video/ music/
437
+ days/ # Gündəlik eksperiment + təcrübə
438
+ └── YYYY-MM-DD/
439
+ ├── characters/ shots/ video/ music/ final/
440
+ references/ # Stil + texniki referans
441
+ ├── pixar-style/
442
+ ├── cinematography/
443
+ └── color-grading/
444
+ prompts-library/ # Təsdiqlənmiş prompt-lar
445
+ ├── characters/ shots/ video/ music/
446
+ \`\`\`
447
+
448
+ ## Sərt qayda — Prompt əvvəl, MD sonra (vizual təsdiqsiz fayl yaratma)
449
+
450
+ Vizual layihələrdə:
451
+ 1. Prompt-u chat-də yaz → istifadəçi generate edir
452
+ 2. Şəkil göstərilir → bəyənilir/yox
453
+ 3. Təsdiq olsa → prompt MD-yə + \`prompts-library/\`-ə yazılır
454
+ 4. Vizual təsdiqsiz fayl qadağa
455
+
456
+ ## Sərt qayda — Stil referansı əvvəl, prompt sonra
457
+
458
+ Yeni layihəyə başlamadan əvvəl:
459
+ 1. Müştəri / brief stilini araşdır (\`references/\`-də referans top)
460
+ 2. Stil prinsipləri çıxar (color, lighting, character design rules)
461
+ 3. **Sonra** prompt yaz
462
+
463
+ ## Sərt qayda — Workflow file naming
464
+
465
+ - Characters: \`obraz-1.png\`, \`obraz-2.png\`, ... (sıra ilə)
466
+ - Shots: \`kadr-1.png\`, \`kadr-2.png\`, ...
467
+ - Videos: \`video-1.mp4\`, \`video-2.mp4\`
468
+ - Music: \`music-1.mp3\`, \`music-final.wav\`
469
+ - Final: \`final-9x16.mp4\`, \`final-16x9.mp4\`
470
+
471
+ ## Custom rules
472
+
473
+ <!-- Buraya studio-spesifik qaydalar yaz -->
474
+ `;
475
+ }
476
+ function aiStudioReadme(o) {
477
+ return `# ${o.projectName}
478
+
479
+ ${o.description || '(qısa təsvir)'}
480
+
481
+ ## Workflow
482
+
483
+ 1. Yeni layihə → \`projects/<name>/\` yarat + brief.md
484
+ 2. Gündəlik eksperiment → \`days/YYYY-MM-DD/\`
485
+ 3. Stil refs → \`references/\`-yə top
486
+ 4. Uğurlu prompt → \`prompts-library/\`-yə əlavə
487
+
488
+ ## Claude Code
489
+
490
+ \`\`\`bash
491
+ claude
492
+ \`\`\`
493
+ `;
494
+ }
495
+ // ════════════════════════════════════════════════════════════
496
+ // Helpers
497
+ // ════════════════════════════════════════════════════════════
498
+ function ensureFolder(cwd, relPath, r) {
499
+ const full = join(cwd, relPath);
500
+ if (!existsSync(full)) {
501
+ mkdirSync(full, { recursive: true });
502
+ r.foldersCreated.push(relPath);
503
+ }
504
+ }
505
+ function writeIfNew(cwd, relPath, body, r) {
506
+ const full = join(cwd, relPath);
507
+ if (existsSync(full)) {
508
+ r.filesSkipped.push(relPath);
509
+ return;
510
+ }
511
+ // Ensure parent exists
512
+ const parent = full.substring(0, full.lastIndexOf('/'));
513
+ if (parent && !existsSync(parent))
514
+ mkdirSync(parent, { recursive: true });
515
+ writeFileSync(full, body, 'utf-8');
516
+ r.filesWritten.push(relPath);
517
+ }
518
+ function todayDateStr() {
519
+ // Use TZ-aware date (local time, ISO format)
520
+ const now = new Date();
521
+ const yyyy = now.getFullYear();
522
+ const mm = String(now.getMonth() + 1).padStart(2, '0');
523
+ const dd = String(now.getDate()).padStart(2, '0');
524
+ return `${yyyy}-${mm}-${dd}`;
525
+ }
526
+ //# sourceMappingURL=preset-scaffolder.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"preset-scaffolder.js","sourceRoot":"","sources":["../../src/applier/preset-scaffolder.ts"],"names":[],"mappings":"AAAA,sEAAsE;AACtE,EAAE;AACF,uBAAuB;AACvB,iEAAiE;AACjE,yEAAyE;AACzE,EAAE;AACF,8DAA8D;AAC9D,sFAAsF;AAEtF,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAC/D,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAgBjC,MAAM,UAAU,cAAc,CAAC,QAAkB,EAAE,IAAqB;IACtE,QAAQ,QAAQ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