@azerogluemin/ai-bootstrap 0.4.2 → 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.
- package/CHANGELOG.md +153 -0
- package/dist/applier/agents-installer.d.ts +1 -6
- package/dist/applier/agents-installer.js +16 -64
- package/dist/applier/agents-installer.js.map +1 -1
- package/dist/applier/pool.d.ts +34 -0
- package/dist/applier/pool.js +166 -0
- package/dist/applier/pool.js.map +1 -0
- package/dist/applier/preset-definitions.d.ts +15 -0
- package/dist/applier/preset-definitions.js +225 -0
- package/dist/applier/preset-definitions.js.map +1 -0
- package/dist/applier/preset-scaffolder.d.ts +14 -0
- package/dist/applier/preset-scaffolder.js +526 -0
- package/dist/applier/preset-scaffolder.js.map +1 -0
- package/dist/applier/skills-installer.d.ts +5 -3
- package/dist/applier/skills-installer.js +26 -75
- package/dist/applier/skills-installer.js.map +1 -1
- package/dist/commands/help.d.ts +1 -0
- package/dist/commands/help.js +98 -0
- package/dist/commands/help.js.map +1 -0
- package/dist/commands/mcp.js +50 -5
- package/dist/commands/mcp.js.map +1 -1
- package/dist/commands/new.js +74 -164
- package/dist/commands/new.js.map +1 -1
- package/dist/commands/scan.d.ts +1 -0
- package/dist/commands/scan.js +42 -0
- package/dist/commands/scan.js.map +1 -0
- package/dist/commands/skills.js +65 -1
- package/dist/commands/skills.js.map +1 -1
- package/dist/index.js +10 -1
- package/dist/index.js.map +1 -1
- package/dist/utils/paths.d.ts +3 -0
- package/dist/utils/paths.js +8 -1
- package/dist/utils/paths.js.map +1 -1
- package/dist/wizard.js +63 -75
- package/dist/wizard.js.map +1 -1
- package/package.json +1 -1
- package/templates/skills/art-director/SKILL.md +209 -0
- package/templates/skills/backend-developer/SKILL.md +198 -0
- package/templates/skills/cinematographer/SKILL.md +233 -0
- package/templates/skills/colorist/SKILL.md +210 -0
- package/templates/skills/devops-developer/SKILL.md +263 -0
- package/templates/skills/editor/SKILL.md +166 -0
- package/templates/skills/frontend-developer/SKILL.md +147 -0
- package/templates/skills/mobile-developer/SKILL.md +227 -0
package/dist/utils/paths.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"paths.js","sourceRoot":"","sources":["../../src/utils/paths.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAEhC,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"paths.js","sourceRoot":"","sources":["../../src/utils/paths.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAEhC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAC5C,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEhD,MAAM,CAAC,MAAM,IAAI,GAAG,OAAO,EAAE,CAAC;AAC9B,MAAM,CAAC,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;AAChD,MAAM,CAAC,MAAM,aAAa,GAAG,IAAI,CAAC,UAAU,EAAE,WAAW,CAAC,CAAC;AAC3D,MAAM,CAAC,MAAM,UAAU,GAAG,IAAI,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;AACrD,MAAM,CAAC,MAAM,UAAU,GAAG,IAAI,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;AACrD,MAAM,CAAC,MAAM,aAAa,GAAG,IAAI,CAAC,UAAU,EAAE,eAAe,CAAC,CAAC;AAE/D,8DAA8D;AAC9D,uFAAuF;AACvF,8EAA8E;AAC9E,qCAAqC;AACrC,MAAM,CAAC,MAAM,eAAe,GAAG,IAAI,CAAC,UAAU,EAAE,aAAa,CAAC,CAAC;AAC/D,MAAM,CAAC,MAAM,eAAe,GAAG,IAAI,CAAC,UAAU,EAAE,aAAa,CAAC,CAAC;AAE/D,MAAM,CAAC,MAAM,UAAU,GAAG,QAAQ,EAAE,KAAK,OAAO,CAAC;AAEjD,MAAM,UAAU,SAAS,CAAC,IAAY;IACpC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC;QACtB,SAAS,CAAC,IAAI,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IACvC,CAAC;AACH,CAAC;AAED,MAAM,UAAU,aAAa,CAAC,IAAY;IACxC,OAAO,IAAI,CAAC,aAAa,EAAE,IAAI,CAAC,CAAC;AACnC,CAAC;AAED,MAAM,UAAU,UAAU,CAAC,CAAS;IAClC,sDAAsD;IACtD,IAAI,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC;QAAE,OAAO,KAAK,CAAC;IACnC,IAAI,CAAC,CAAC,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,UAAU,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,UAAU,CAAC,UAAU,CAAC,EAAE,CAAC;QAC1G,OAAO,KAAK,CAAC;IACf,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAED,MAAM,UAAU,UAAU,CAAC,CAAS;IAClC,IAAI,CAAC,CAAC,UAAU,CAAC,IAAI,CAAC;QAAE,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;IACtD,IAAI,CAAC,KAAK,GAAG;QAAE,OAAO,IAAI,CAAC;IAC3B,OAAO,CAAC,CAAC;AACX,CAAC"}
|
package/dist/wizard.js
CHANGED
|
@@ -1,93 +1,81 @@
|
|
|
1
|
-
// ai-bootstrap wizard —
|
|
1
|
+
// ai-bootstrap wizard — single-step setup (v0.5.0 rewrite).
|
|
2
|
+
//
|
|
3
|
+
// Old v0.4.x: 6 steps with 15+ questions, lots of friction.
|
|
4
|
+
// v0.5.0 redesign (per user feedback):
|
|
5
|
+
// - 1 step: profile (3 questions only — ad, dil, kim+nə)
|
|
6
|
+
// - Bundle question REMOVED — auto-installs foundation user-scope
|
|
7
|
+
// - Project scan REMOVED — `ai-bootstrap scan <path>` if needed later
|
|
8
|
+
// - MCPs auto-installed (free, no-credential ones); `ai-bootstrap mcp add` for paid
|
|
9
|
+
// - Memory always-on (no questions)
|
|
10
|
+
// - GitHub backup deferred → `ai-bootstrap backup init` when ready
|
|
11
|
+
//
|
|
12
|
+
// Result: 30-second setup with no overwhelm.
|
|
2
13
|
import chalk from 'chalk';
|
|
3
|
-
import { confirm } from '@inquirer/prompts';
|
|
4
|
-
|
|
5
|
-
import { projectsStep } from './steps/2-projects.js';
|
|
6
|
-
import { bundlesStep } from './steps/3-bundles.js';
|
|
7
|
-
import { mcpsStep } from './steps/4-mcps.js';
|
|
8
|
-
import { memoryStep } from './steps/5-memory.js';
|
|
9
|
-
import { githubStep } from './steps/6-github.js';
|
|
14
|
+
import { input, select, confirm } from '@inquirer/prompts';
|
|
15
|
+
const FREE_MCPS = ['filesystem', 'memory', 'git', 'fetch', 'time', 'arxiv', 'youtube-transcript', 'puppeteer', 'playwright'];
|
|
10
16
|
export async function runWizard() {
|
|
11
|
-
// Banner
|
|
12
17
|
console.log('');
|
|
13
18
|
console.log(chalk.bold.cyan('🧠 ai-bootstrap'));
|
|
14
|
-
console.log(chalk.dim(' Personal AI infrastructure
|
|
19
|
+
console.log(chalk.dim(' Personal AI infrastructure for Claude Code'));
|
|
15
20
|
console.log('');
|
|
16
|
-
|
|
17
|
-
console.log(chalk.yellow('⚠️ İcazə lazımdır:'));
|
|
18
|
-
console.log(chalk.dim(' - Layihə qovluqlarını oxumaq (read-only)'));
|
|
19
|
-
console.log(chalk.dim(' - AI profilini qurmaq (sual verir)'));
|
|
20
|
-
console.log(chalk.dim(' - ~/.claude/ konfiqurasiya etmək'));
|
|
21
|
-
console.log(chalk.dim(' - MCP-lər üçün credential istəmək'));
|
|
21
|
+
console.log(chalk.dim(' 3 sual, 30 saniyə. Sonra hazırsan.'));
|
|
22
22
|
console.log('');
|
|
23
|
-
const proceed = await confirm({
|
|
24
|
-
message: 'Davam edək?',
|
|
25
|
-
default: true,
|
|
26
|
-
});
|
|
23
|
+
const proceed = await confirm({ message: 'Davam edək?', default: true });
|
|
27
24
|
if (!proceed) {
|
|
28
25
|
console.log(chalk.yellow('Ləğv edildi.'));
|
|
29
26
|
process.exit(0);
|
|
30
27
|
}
|
|
31
|
-
|
|
28
|
+
console.log('');
|
|
29
|
+
console.log(chalk.bold('1/3 — Adın?'));
|
|
30
|
+
const name = await input({ message: 'Ad:', validate: (v) => v.trim().length > 0 || 'Boş ola bilməz' });
|
|
31
|
+
console.log('');
|
|
32
|
+
console.log(chalk.bold('2/3 — Əsas dilin?'));
|
|
33
|
+
const primaryLanguage = await select({
|
|
34
|
+
message: 'Dil:',
|
|
35
|
+
choices: [
|
|
36
|
+
{ name: 'Azərbaycan', value: 'az' },
|
|
37
|
+
{ name: 'English', value: 'en' },
|
|
38
|
+
{ name: 'Русский', value: 'ru' },
|
|
39
|
+
{ name: 'Türkçe', value: 'tr' },
|
|
40
|
+
],
|
|
41
|
+
default: 'az',
|
|
42
|
+
});
|
|
43
|
+
console.log('');
|
|
44
|
+
console.log(chalk.bold('3/3 — Sən kimsən, nə edirsən?'));
|
|
45
|
+
console.log(chalk.dim(' Misal: "Emin, AI creator + founder. SaaS qururam, IG-də komedi videolar paylaşıram."'));
|
|
46
|
+
const bio = await input({
|
|
47
|
+
message: 'Bio:',
|
|
48
|
+
validate: (v) => v.trim().length >= 5 || 'Ən azı 5 hərf yaz',
|
|
49
|
+
});
|
|
32
50
|
const state = {
|
|
51
|
+
profile: {
|
|
52
|
+
name: name.trim(),
|
|
53
|
+
primaryLanguage,
|
|
54
|
+
otherLanguages: [],
|
|
55
|
+
role: bio.trim(),
|
|
56
|
+
experience: 'expert',
|
|
57
|
+
country: '',
|
|
58
|
+
goals: { sixMonth: '', twelveMonth: '', twentyFourMonth: '' },
|
|
59
|
+
},
|
|
33
60
|
projectPaths: [],
|
|
34
61
|
projects: [],
|
|
62
|
+
selectedBundles: {
|
|
63
|
+
// Always install foundation user-scope. Project bundles come from `ai-bootstrap new`.
|
|
64
|
+
skills: 'foundation',
|
|
65
|
+
agents: 'foundation',
|
|
66
|
+
mcps: 'custom',
|
|
67
|
+
},
|
|
68
|
+
memoryConfig: {
|
|
69
|
+
storage: 'markdown-only',
|
|
70
|
+
autoLearn: true,
|
|
71
|
+
syncToGithub: false,
|
|
72
|
+
},
|
|
35
73
|
};
|
|
36
|
-
//
|
|
37
|
-
state.
|
|
38
|
-
// Step 2: Projects
|
|
39
|
-
const projectsResult = await projectsStep();
|
|
40
|
-
state.projectPaths = projectsResult.paths;
|
|
41
|
-
state.projects = projectsResult.selected;
|
|
42
|
-
// Step 3: Bundles
|
|
43
|
-
const bundlesResult = await bundlesStep();
|
|
44
|
-
state.selectedBundles = {
|
|
45
|
-
skills: bundlesResult.skills,
|
|
46
|
-
agents: bundlesResult.agents,
|
|
47
|
-
mcps: 'custom', // determined in step 4
|
|
48
|
-
};
|
|
49
|
-
// Step 4: MCPs
|
|
50
|
-
const mcpsResult = await mcpsStep();
|
|
51
|
-
state.mcps = mcpsResult.selected;
|
|
52
|
-
// Step 5: Memory
|
|
53
|
-
const memoryResult = await memoryStep();
|
|
54
|
-
state.memoryConfig = {
|
|
55
|
-
storage: memoryResult.storage,
|
|
56
|
-
autoLearn: memoryResult.autoLearn,
|
|
57
|
-
syncToGithub: false, // determined in step 6
|
|
58
|
-
};
|
|
59
|
-
// Step 6: GitHub
|
|
60
|
-
const githubResult = await githubStep();
|
|
61
|
-
state.memoryConfig.syncToGithub = githubResult.enabled;
|
|
62
|
-
if (githubResult.repoUrl) {
|
|
63
|
-
state.memoryConfig.githubRepo = githubResult.repoUrl;
|
|
64
|
-
}
|
|
65
|
-
// Final summary
|
|
66
|
-
console.log('');
|
|
67
|
-
console.log(chalk.bold.green('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━'));
|
|
68
|
-
console.log(chalk.bold.green('✓ Setup tamamlandı!'));
|
|
69
|
-
console.log(chalk.bold.green('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━'));
|
|
70
|
-
console.log('');
|
|
71
|
-
console.log(chalk.bold('Yığım:'));
|
|
72
|
-
console.log(` Ad: ${chalk.cyan(state.profile.name)}`);
|
|
73
|
-
console.log(` Dil: ${chalk.cyan(state.profile.primaryLanguage)}`);
|
|
74
|
-
console.log(` Rol: ${chalk.cyan(state.profile.role)}`);
|
|
75
|
-
console.log(` Layihələr: ${chalk.cyan(state.projects.length)} əlavə edildi`);
|
|
76
|
-
console.log(` Skill bundle:${chalk.cyan(state.selectedBundles.skills)}`);
|
|
77
|
-
console.log(` Agent bundle:${chalk.cyan(state.selectedBundles.agents)}`);
|
|
78
|
-
console.log(` MCP-lər: ${chalk.cyan(mcpsResult.selected.length)} aktiv`);
|
|
79
|
-
console.log(` Yaddaş: ${chalk.cyan(state.memoryConfig.storage)}`);
|
|
80
|
-
console.log(` GitHub sync: ${chalk.cyan(state.memoryConfig.syncToGithub ? 'aktiv' : 'qeyri-aktiv')}`);
|
|
81
|
-
console.log('');
|
|
82
|
-
console.log(chalk.bold('Yaddaşın yeri:'));
|
|
83
|
-
console.log(` ${chalk.dim('~/.claude/')} ${chalk.dim('— Claude Code config')}`);
|
|
84
|
-
console.log(` ${chalk.dim('~/.claude/knowledge/')} ${chalk.dim('— cross-project memory')}`);
|
|
85
|
-
console.log(` ${chalk.dim('~/.claude/skills/')} ${chalk.dim('— skill-lər')}`);
|
|
86
|
-
console.log(` ${chalk.dim('~/.claude/agents/')} ${chalk.dim('— agent-lər')}`);
|
|
74
|
+
// Free MCPs auto-installed
|
|
75
|
+
state.mcps = FREE_MCPS;
|
|
87
76
|
console.log('');
|
|
88
|
-
console.log(chalk.bold('
|
|
89
|
-
console.log(
|
|
90
|
-
console.log(` ${chalk.cyan('claude /help')} — komandalar`);
|
|
77
|
+
console.log(chalk.bold.green('✓ Profile yığıldı.'));
|
|
78
|
+
console.log(chalk.dim(' Quraşdırılır...'));
|
|
91
79
|
console.log('');
|
|
92
80
|
return state;
|
|
93
81
|
}
|
package/dist/wizard.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wizard.js","sourceRoot":"","sources":["../src/wizard.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"wizard.js","sourceRoot":"","sources":["../src/wizard.ts"],"names":[],"mappings":"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"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@azerogluemin/ai-bootstrap",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"description": "Personal AI infrastructure bootstrap for Claude Code — interactive setup wizard with skills, agents, MCPs, and cross-project memory",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: art-director
|
|
3
|
+
description: Senior art director responsible for overall visual identity across a project — production design, color palette, costume, props, set dressing, era specificity. Activates on visual world-building, project visual language, mood board design, look/feel direction. Triggers on AZ phrases like "vizual dil", "atmosfer", "art direction", "mood board", "production design" and EN equivalents.
|
|
4
|
+
license: MIT
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Art Director
|
|
8
|
+
|
|
9
|
+
Senior art director (bədii rejissor) who designs the visual world of a project — every choice that appears on screen.
|
|
10
|
+
|
|
11
|
+
## When this skill activates
|
|
12
|
+
|
|
13
|
+
- User asks for visual direction / mood / look of a project
|
|
14
|
+
- User wants mood board, reference deck, visual brief
|
|
15
|
+
- User asks about production design (sets, props, costumes, era)
|
|
16
|
+
- User mentions "world-building" for ad / film / video / brand
|
|
17
|
+
- User asks for visual coherence critique across project
|
|
18
|
+
|
|
19
|
+
## Core principles
|
|
20
|
+
|
|
21
|
+
1. **One world, many choices** — Every visible element (set, costume, prop, color, texture, lighting hint) reinforces the same world. A wrong prop breaks the spell.
|
|
22
|
+
2. **Era specificity** — If your story is set in 1973 Soviet Baku, the typography, fabric weave, ceramic glaze, and lighting fixtures all need to be 1973. Anachronisms destroy trust.
|
|
23
|
+
3. **Color tells story** — Color palette per scene/character planned in pre-production, not improvised on set.
|
|
24
|
+
4. **Subtraction over addition** — Best production design removes distractions, focuses eye on actor/subject.
|
|
25
|
+
5. **Reference, don't copy** — Borrow from real films/artists/photographers; never paste their look verbatim.
|
|
26
|
+
|
|
27
|
+
## Pre-production deliverables
|
|
28
|
+
|
|
29
|
+
### 1. Visual treatment (5-15 pages)
|
|
30
|
+
- Project synopsis (1 paragraph)
|
|
31
|
+
- Visual logline (1 sentence: "It looks like ___ meets ___")
|
|
32
|
+
- Mood board (8-20 reference images, grouped by theme)
|
|
33
|
+
- Color palette (5-8 swatches with hex codes + intended use)
|
|
34
|
+
- Lighting language (key + fill + back + ambient — described per location)
|
|
35
|
+
- Texture + material (3-5 dominant materials: brushed steel, raw linen, polished concrete)
|
|
36
|
+
- Costume notes per character
|
|
37
|
+
- Era + cultural reference notes
|
|
38
|
+
|
|
39
|
+
### 2. Mood board structure
|
|
40
|
+
|
|
41
|
+
Don't dump 50 random images. Curate:
|
|
42
|
+
|
|
43
|
+
```
|
|
44
|
+
Mood board sections:
|
|
45
|
+
├── Overall vibe (3-4 hero refs)
|
|
46
|
+
├── Color (5-6 swatches + sample frames)
|
|
47
|
+
├── Lighting (key looks per scene type)
|
|
48
|
+
├── Costume (per character/scene)
|
|
49
|
+
├── Set / location (3-5 per primary set)
|
|
50
|
+
├── Props (hero objects — 5-10)
|
|
51
|
+
└── Composition references (framing/depth/scale)
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
### 3. Production bible
|
|
55
|
+
- Locked palettes per scene
|
|
56
|
+
- Costume continuity per character
|
|
57
|
+
- Hero prop list with sourcing notes
|
|
58
|
+
- Hand-drawn or 3D set sketches
|
|
59
|
+
- Visual continuity rules ("never see fluorescent lighting", "no plastic visible")
|
|
60
|
+
|
|
61
|
+
## Color palette design
|
|
62
|
+
|
|
63
|
+
### Approach: per-scene palette
|
|
64
|
+
Each scene has dominant + supporting + accent colors.
|
|
65
|
+
|
|
66
|
+
**Wes Anderson Hotel Budapest** (example):
|
|
67
|
+
- Lobby: Pink (#E8B4B8) + bronze (#B8956A) + cream (#F2EDDA)
|
|
68
|
+
- Confectionery: Pastel violet + sky blue + raspberry
|
|
69
|
+
- Prison: Olive + faded denim + steel
|
|
70
|
+
- Mountain: White + cobalt + spruce green
|
|
71
|
+
|
|
72
|
+
### Approach: per-character palette
|
|
73
|
+
Each character associated with 1-2 colors throughout.
|
|
74
|
+
|
|
75
|
+
**Joker (Joaquin Phoenix)**:
|
|
76
|
+
- Early Arthur: drab brown, washed-out cream
|
|
77
|
+
- Becoming Joker: emerald + violet + blood red (saturation increases as character transforms)
|
|
78
|
+
|
|
79
|
+
### Color wheel patterns
|
|
80
|
+
- **Complementary** (opposite) — high contrast, tension
|
|
81
|
+
- **Analogous** (adjacent) — harmony, calm
|
|
82
|
+
- **Triadic** — vibrant balance
|
|
83
|
+
- **Split-complementary** — dynamic without harshness
|
|
84
|
+
- **Monochromatic** + accent — singular mood with one pop
|
|
85
|
+
|
|
86
|
+
### Tools
|
|
87
|
+
- **Pantone Studio** — match real-world colors
|
|
88
|
+
- **Adobe Color** — extract palette from image
|
|
89
|
+
- **Color Hunt** / **Coolors** — discover palettes
|
|
90
|
+
- **Khroma** — AI palette gen trained on your taste
|
|
91
|
+
|
|
92
|
+
## Era + cultural research
|
|
93
|
+
|
|
94
|
+
For period work (or culture-specific work):
|
|
95
|
+
|
|
96
|
+
### Research checklist
|
|
97
|
+
- [ ] Decade-specific typography (Helvetica was 1957; don't use it for 1940s)
|
|
98
|
+
- [ ] Fabric availability + weaving patterns
|
|
99
|
+
- [ ] Color palettes of the era (Kodachrome looks different from Technicolor)
|
|
100
|
+
- [ ] Furniture + appliances (1973 Soviet kitchen ≠ 1973 Western kitchen)
|
|
101
|
+
- [ ] Cars, signage, advertising
|
|
102
|
+
- [ ] Hair + makeup (silhouettes, products of the era)
|
|
103
|
+
- [ ] Lighting tech (gas lamp ≠ tungsten ≠ fluorescent ≠ LED)
|
|
104
|
+
- [ ] Hand gestures + posture norms
|
|
105
|
+
|
|
106
|
+
### AZ specific (Azerbaijani context)
|
|
107
|
+
- 1970s-80s: Soviet color palettes (muted reds, ochre, olive); brutalist + ornament fusion
|
|
108
|
+
- 1990s post-Soviet: faded propaganda + emerging consumer goods
|
|
109
|
+
- 2000s: Heydar Aliyev era public space aesthetics
|
|
110
|
+
- Karabakh war references: handle with care; cultural sensitivity required
|
|
111
|
+
- Religious imagery: Shi'a Muslim majority — avoid casual desecration of symbols
|
|
112
|
+
|
|
113
|
+
## Costume design
|
|
114
|
+
|
|
115
|
+
### Per character process
|
|
116
|
+
1. **Backstory** — Where do they live? What income? What taste?
|
|
117
|
+
2. **Color story** — 1-2 dominant colors that follow character arc
|
|
118
|
+
3. **Texture story** — Materials reflect status (silk = elite, denim = working, wool = professional, synthetic = utilitarian)
|
|
119
|
+
4. **Continuity** — Same costume across scenes unless story justifies change
|
|
120
|
+
5. **Distress / wear** — New shoes scream "fresh from prop room"; intentional wear sells reality
|
|
121
|
+
|
|
122
|
+
### Continuity tracker
|
|
123
|
+
| Scene | Character | Costume | Notes |
|
|
124
|
+
|---|---|---|---|
|
|
125
|
+
| 01 | Aida | Cream silk blouse, charcoal trouser, gold ring | First impression: composed |
|
|
126
|
+
| 02 | Aida | Same trouser, white tee, ring removed | Day later, cracked composure |
|
|
127
|
+
|
|
128
|
+
## Set + location
|
|
129
|
+
|
|
130
|
+
### Choosing locations
|
|
131
|
+
- **Practical location** (real space) — authenticity, cheap, limits (size, time, control)
|
|
132
|
+
- **Studio set build** — control over everything, expensive, requires time
|
|
133
|
+
- **Mixed (location + extension/dressing)** — most common
|
|
134
|
+
|
|
135
|
+
### Dressing a location
|
|
136
|
+
- Layer 1: Architecture (given)
|
|
137
|
+
- Layer 2: Furniture + large objects
|
|
138
|
+
- Layer 3: Dressing (rugs, curtains, art)
|
|
139
|
+
- Layer 4: Set decoration (hero props placed for camera)
|
|
140
|
+
- Layer 5: Continuity touches (coffee cup placement, book stack)
|
|
141
|
+
|
|
142
|
+
## Working with director + DP
|
|
143
|
+
|
|
144
|
+
- Art director **proposes**, director **decides**
|
|
145
|
+
- DP + art director must agree on lighting compatible with set materials (shiny surfaces vs matte)
|
|
146
|
+
- Continuity supervisor catches mistakes — share continuity tracker with them
|
|
147
|
+
- Costume designer reports to art director on coherence; both report to director
|
|
148
|
+
|
|
149
|
+
## Output format
|
|
150
|
+
|
|
151
|
+
When asked to design a visual treatment:
|
|
152
|
+
|
|
153
|
+
```markdown
|
|
154
|
+
## Visual treatment — <project>
|
|
155
|
+
|
|
156
|
+
### Visual logline
|
|
157
|
+
"It looks like <A> meets <B>"
|
|
158
|
+
|
|
159
|
+
### Mood
|
|
160
|
+
- Overall: <emotion + atmosphere>
|
|
161
|
+
- Key scene tonal map: <list>
|
|
162
|
+
|
|
163
|
+
### Palette
|
|
164
|
+
- Dominant: #XXXXXX (<name>)
|
|
165
|
+
- Supporting: #YYYYYY (<name>)
|
|
166
|
+
- Accent: #ZZZZZZ (<name>)
|
|
167
|
+
- Application: <how used scene-to-scene>
|
|
168
|
+
|
|
169
|
+
### Lighting language
|
|
170
|
+
- Day exteriors: <style>
|
|
171
|
+
- Night interiors: <style>
|
|
172
|
+
- Dramatic / climax: <style>
|
|
173
|
+
|
|
174
|
+
### Era / setting
|
|
175
|
+
- Time: <year/range>
|
|
176
|
+
- Place: <city/region>
|
|
177
|
+
- Cultural notes: <important specifics>
|
|
178
|
+
|
|
179
|
+
### Costume per character
|
|
180
|
+
| Character | Color story | Texture | Notes |
|
|
181
|
+
|
|
182
|
+
### Hero props
|
|
183
|
+
-
|
|
184
|
+
|
|
185
|
+
### Set / location refs
|
|
186
|
+
- <Pinterest board / drive link>
|
|
187
|
+
|
|
188
|
+
### Anti-references (avoid)
|
|
189
|
+
-
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
## Anti-patterns (qadağa)
|
|
193
|
+
|
|
194
|
+
- Generic "moody + cinematic" without specific era/culture
|
|
195
|
+
- Mood board of 30 random Pinterest screenshots without theme
|
|
196
|
+
- Costume continuity errors (different watch each scene)
|
|
197
|
+
- Modern appliances in period piece (microwaves in 1972 kitchen)
|
|
198
|
+
- Color palette decided in post (must drive pre-production)
|
|
199
|
+
- Ignoring cultural specificity (generic "Middle East look" applied to AZ)
|
|
200
|
+
- Hero prop visible but story-irrelevant (distracts eye)
|
|
201
|
+
|
|
202
|
+
## Sources
|
|
203
|
+
|
|
204
|
+
- "Production Design" — Vincent LoBrutto
|
|
205
|
+
- "The Visual Story" — Bruce Block (visual structure)
|
|
206
|
+
- ASC American Cinematographer magazine
|
|
207
|
+
- AFI / NYFA production design courses
|
|
208
|
+
- Pinterest + Are.na (curation tools)
|
|
209
|
+
- Real museum archives for era research
|
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: backend-developer
|
|
3
|
+
description: Senior backend engineer specializing in NestJS, Hono, FastAPI, Express. API design, multi-tenant data, auth, validation, caching, queues, observability. Activates on backend implementation, API design, DB patterns, auth flows, performance tuning. Triggers on AZ phrases like "API yaz", "endpoint qur", "auth", "tenant izolasiya", "queue", "caching" and EN equivalents.
|
|
4
|
+
license: MIT
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Backend Developer
|
|
8
|
+
|
|
9
|
+
Senior backend engineer who designs and implements production-grade APIs and services.
|
|
10
|
+
|
|
11
|
+
## When this skill activates
|
|
12
|
+
|
|
13
|
+
- User asks to implement an API endpoint, service, or background job
|
|
14
|
+
- User asks about REST vs GraphQL, schema design, status codes
|
|
15
|
+
- User mentions authentication, authorization, multi-tenancy, RLS
|
|
16
|
+
- User asks for caching strategy, queue setup, observability
|
|
17
|
+
- User wants OWASP / security review of backend code
|
|
18
|
+
|
|
19
|
+
## Core principles
|
|
20
|
+
|
|
21
|
+
1. **Boundaries first** — Validate input at every system boundary (HTTP, queue consumer, cross-service). Trust internal code.
|
|
22
|
+
2. **Typed end-to-end** — Schema-first (OpenAPI / Zod / Pydantic). Generate types from schema, not vice-versa.
|
|
23
|
+
3. **Idempotency** — All mutating operations idempotent or marked explicitly. Webhook handlers store request IDs.
|
|
24
|
+
4. **Observability built-in** — Structured logs (JSON), traces with parent IDs, metrics. OpenTelemetry SDK from day one.
|
|
25
|
+
5. **Fail fast, recover loud** — No silent catches. Errors return structured responses; unrecoverable failures crash + restart.
|
|
26
|
+
|
|
27
|
+
## Framework patterns
|
|
28
|
+
|
|
29
|
+
### NestJS (TypeScript, opinionated)
|
|
30
|
+
- Module per domain (`UsersModule`, `OrdersModule`)
|
|
31
|
+
- Controller = HTTP-thin: parse, validate, delegate
|
|
32
|
+
- Service = business logic, framework-agnostic
|
|
33
|
+
- Repository pattern (Prisma / TypeORM)
|
|
34
|
+
- DTOs with class-validator + class-transformer
|
|
35
|
+
- Pipes for transformation, Guards for auth, Interceptors for cross-cutting (logging, transactions)
|
|
36
|
+
- `@nestjs/swagger` for OpenAPI auto-generation
|
|
37
|
+
- Global ValidationPipe with `whitelist: true, forbidNonWhitelisted: true`
|
|
38
|
+
|
|
39
|
+
### Hono (lightweight, edge-first)
|
|
40
|
+
- Middleware composition: `app.use('/api/*', authMiddleware)`
|
|
41
|
+
- Type-safe context: `c.var`, `c.get`, `c.json` with generics
|
|
42
|
+
- Zod validation: `zValidator('json', schema)`
|
|
43
|
+
- Built for Vercel/Cloudflare/Bun runtime — minimal cold start
|
|
44
|
+
|
|
45
|
+
### FastAPI (Python, async-first)
|
|
46
|
+
- Pydantic v2 models for request/response
|
|
47
|
+
- Dependency injection (`Depends()`) for DB sessions, auth
|
|
48
|
+
- Background tasks via `BackgroundTasks` (light) or Celery/RQ (heavy)
|
|
49
|
+
- Async SQLAlchemy 2.x + `asyncpg` for Postgres
|
|
50
|
+
- `@field_validator` for custom validation
|
|
51
|
+
|
|
52
|
+
## API design
|
|
53
|
+
|
|
54
|
+
### REST
|
|
55
|
+
- Resource nouns, HTTP verbs (`GET /users`, `POST /users`, `PATCH /users/:id`)
|
|
56
|
+
- Status codes meaningful: 200 OK, 201 Created, 204 No Content, 400 Bad Request, 401 Unauthorized, 403 Forbidden, 404 Not Found, 409 Conflict, 422 Unprocessable Entity, 429 Too Many Requests
|
|
57
|
+
- Pagination: cursor-based for feeds (`?cursor=xxx&limit=20`), offset for admin tables
|
|
58
|
+
- Error response shape: `{ error: { code: "VALIDATION_FAILED", message: "...", details: [...] } }`
|
|
59
|
+
- API versioning via URL path (`/api/v1/`) — simpler than headers
|
|
60
|
+
|
|
61
|
+
### GraphQL
|
|
62
|
+
- Schema-first (SDL), not code-first when team has frontend devs
|
|
63
|
+
- DataLoader for N+1 prevention
|
|
64
|
+
- Persisted queries for production (no arbitrary queries from client)
|
|
65
|
+
- Pothos schema builder (TypeScript) or Strawberry (Python)
|
|
66
|
+
|
|
67
|
+
## Multi-tenant patterns
|
|
68
|
+
|
|
69
|
+
Three patterns by isolation strength:
|
|
70
|
+
|
|
71
|
+
| Pattern | Isolation | Cost | When to use |
|
|
72
|
+
|---|---|---|---|
|
|
73
|
+
| **Shared schema + tenantId column** | Logical (app must enforce) | Low | Startup, < 1000 tenants |
|
|
74
|
+
| **Row-Level Security (Postgres RLS)** | DB-enforced | Low-Med | Scale-up, sensitive data |
|
|
75
|
+
| **Schema-per-tenant** | Schema isolation | Med | Large enterprise customers |
|
|
76
|
+
| **DB-per-tenant** | Full isolation | High | Regulated industries (healthcare, finance) |
|
|
77
|
+
|
|
78
|
+
**Always** include `tenant_id` in every domain table from day one — easier to add isolation later than retrofit.
|
|
79
|
+
|
|
80
|
+
RLS example (Postgres):
|
|
81
|
+
```sql
|
|
82
|
+
ALTER TABLE orders ENABLE ROW LEVEL SECURITY;
|
|
83
|
+
CREATE POLICY tenant_isolation ON orders
|
|
84
|
+
USING (tenant_id = current_setting('app.current_tenant')::uuid);
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
## Authentication & authorization
|
|
88
|
+
|
|
89
|
+
- **Auth**: JWT (stateless, short TTL ≤ 15min) + refresh token (rotating, stored hashed)
|
|
90
|
+
- **Session-based** if SSR-heavy (Next.js + Auth.js); use HttpOnly + Secure + SameSite cookies
|
|
91
|
+
- **OAuth2 / OIDC** for SSO (Clerk / Auth.js / Auth0 / Supabase Auth — buy don't build)
|
|
92
|
+
- **Authz**: RBAC (`role` claim) or ABAC (Casbin, Oso) for fine-grained
|
|
93
|
+
- **API keys**: stored hashed (bcrypt/argon2id), prefix visible (`sk_live_abc...`)
|
|
94
|
+
- **Service-to-service**: mTLS or signed JWTs with short TTL
|
|
95
|
+
|
|
96
|
+
OWASP gotchas:
|
|
97
|
+
- Never trust client-sent `userId` / `tenantId` — read from JWT/session
|
|
98
|
+
- Verify ownership before mutate (`order.userId === currentUser.id`)
|
|
99
|
+
- Rate-limit auth endpoints (10/min/IP for login, 3/min/IP for password reset)
|
|
100
|
+
|
|
101
|
+
## Validation
|
|
102
|
+
|
|
103
|
+
- **Zod** (TS) — runtime + compile-time types
|
|
104
|
+
- **class-validator** (NestJS) — decorator-based
|
|
105
|
+
- **Pydantic** (FastAPI) — model-based
|
|
106
|
+
- Reject early at boundary, never trust untyped data
|
|
107
|
+
- Sanitize HTML inputs (DOMPurify) before storing/rendering
|
|
108
|
+
|
|
109
|
+
## Caching strategy
|
|
110
|
+
|
|
111
|
+
| Layer | Tool | TTL | Invalidation |
|
|
112
|
+
|---|---|---|---|
|
|
113
|
+
| Browser | HTTP cache headers | minutes-hours | Stale-while-revalidate |
|
|
114
|
+
| CDN | Cloudflare/Fastly | hours-days | Tag-based purge |
|
|
115
|
+
| App | Redis | seconds-minutes | Write-through, event-based |
|
|
116
|
+
| DB | Query plan cache | automatic | — |
|
|
117
|
+
|
|
118
|
+
Patterns: Cache-aside (read-through), Write-through, Write-behind. Default to cache-aside.
|
|
119
|
+
|
|
120
|
+
Anti-pattern: caching everything by default. Cache only proven hot paths.
|
|
121
|
+
|
|
122
|
+
## Queues + background jobs
|
|
123
|
+
|
|
124
|
+
- **BullMQ** (Node + Redis) — production queue with retries, scheduling, priorities
|
|
125
|
+
- **Sidekiq** (Ruby), **Celery** (Python), **Temporal** (durable workflows)
|
|
126
|
+
- Job idempotency: every handler must be safe to retry
|
|
127
|
+
- Dead-letter queues for failed jobs
|
|
128
|
+
- Observability: queue depth, latency, error rate
|
|
129
|
+
|
|
130
|
+
## Observability
|
|
131
|
+
|
|
132
|
+
- **Structured logs** (JSON) with `trace_id`, `tenant_id`, `user_id`, `request_id`
|
|
133
|
+
- **Distributed traces** (OpenTelemetry → Jaeger / Datadog / Honeycomb)
|
|
134
|
+
- **Metrics**: Request rate, error rate, p50/p95/p99 latency, queue depth
|
|
135
|
+
- **Health checks**: `/healthz` (liveness), `/readyz` (readiness — DB reachable, deps healthy)
|
|
136
|
+
|
|
137
|
+
## OWASP Top 10 (2021)
|
|
138
|
+
|
|
139
|
+
| Risk | Mitigation |
|
|
140
|
+
|---|---|
|
|
141
|
+
| Broken access control | Authz on every endpoint; verify ownership |
|
|
142
|
+
| Cryptographic failures | TLS everywhere; argon2id for passwords; key rotation |
|
|
143
|
+
| Injection | Parameterized queries; never `${userInput}` in SQL |
|
|
144
|
+
| Insecure design | Threat modeling pre-feature |
|
|
145
|
+
| Misconfiguration | Secure defaults; least privilege; security headers |
|
|
146
|
+
| Vulnerable components | `npm audit`, Snyk, Dependabot |
|
|
147
|
+
| Auth failures | MFA support, lockout policies, secure session mgmt |
|
|
148
|
+
| Data integrity failures | Signed artifacts, SBOM |
|
|
149
|
+
| Logging failures | Centralized logs, alerting on critical errors |
|
|
150
|
+
| SSRF | URL allow-list, validate Host header |
|
|
151
|
+
|
|
152
|
+
## Output format
|
|
153
|
+
|
|
154
|
+
When asked to build an API endpoint:
|
|
155
|
+
|
|
156
|
+
```markdown
|
|
157
|
+
## Endpoint: <METHOD> <path>
|
|
158
|
+
|
|
159
|
+
### Auth
|
|
160
|
+
- Required: <role / scope>
|
|
161
|
+
|
|
162
|
+
### Request
|
|
163
|
+
- Headers
|
|
164
|
+
- Path params
|
|
165
|
+
- Query params
|
|
166
|
+
- Body (Zod/Pydantic schema)
|
|
167
|
+
|
|
168
|
+
### Response
|
|
169
|
+
- 200: <schema>
|
|
170
|
+
- 4xx errors
|
|
171
|
+
|
|
172
|
+
### Implementation
|
|
173
|
+
[controller + service + repository code]
|
|
174
|
+
|
|
175
|
+
### Tests
|
|
176
|
+
[unit + integration test specs]
|
|
177
|
+
|
|
178
|
+
### Observability
|
|
179
|
+
[what's logged, traced, metered]
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
## Anti-patterns (qadağa)
|
|
183
|
+
|
|
184
|
+
- `req.body.userId` trusted without verifying against session
|
|
185
|
+
- N+1 queries (load related data with joins or DataLoader)
|
|
186
|
+
- Long-running work in HTTP handlers (move to queue)
|
|
187
|
+
- Catching errors silently (`catch { /* nothing */ }`)
|
|
188
|
+
- Storing secrets in code (use env + vault)
|
|
189
|
+
- Returning DB errors to client (`PG::UniqueViolation`) — translate to user-facing
|
|
190
|
+
- ORM `findAll()` in tenant code without `WHERE tenant_id = $1`
|
|
191
|
+
|
|
192
|
+
## Sources
|
|
193
|
+
|
|
194
|
+
- OWASP Cheat Sheet Series
|
|
195
|
+
- NestJS docs (docs.nestjs.com)
|
|
196
|
+
- Hono docs (hono.dev)
|
|
197
|
+
- FastAPI docs (fastapi.tiangolo.com)
|
|
198
|
+
- Postgres RLS docs (postgresql.org/docs)
|