@dzhechkov/keysarium 1.0.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 +289 -0
- package/bin/cli.js +5 -0
- package/package.json +43 -0
- package/src/cli.js +157 -0
- package/src/commands/doctor.js +469 -0
- package/src/commands/init.js +171 -0
- package/src/commands/list.js +147 -0
- package/src/commands/remove.js +197 -0
- package/src/commands/update.js +191 -0
- package/src/utils.js +274 -0
- package/templates/.claude/agents/cjm-variant-worker.md +60 -0
- package/templates/.claude/agents/discovery-worker.md +45 -0
- package/templates/.claude/agents/parallel-research-orchestrator.md +70 -0
- package/templates/.claude/agents/presentation-worker.md +55 -0
- package/templates/.claude/agents/research-worker.md +43 -0
- package/templates/.claude/commands/architecture-phase.md +37 -0
- package/templates/.claude/commands/casarium.md +163 -0
- package/templates/.claude/commands/cjm-prototype.md +42 -0
- package/templates/.claude/commands/discovery.md +34 -0
- package/templates/.claude/commands/explore-case.md +22 -0
- package/templates/.claude/commands/harvest.md +67 -0
- package/templates/.claude/commands/new-research.md +69 -0
- package/templates/.claude/commands/parallel-research.md +45 -0
- package/templates/.claude/commands/presentation.md +49 -0
- package/templates/.claude/commands/research.md +32 -0
- package/templates/.claude/commands/solve.md +36 -0
- package/templates/.claude/rules/agent-swarm.md +31 -0
- package/templates/.claude/rules/anti-patterns.md +19 -0
- package/templates/.claude/rules/checkpoint-protocol.md +23 -0
- package/templates/.claude/rules/domain-specific.md +32 -0
- package/templates/.claude/rules/file-conventions.md +38 -0
- package/templates/.claude/rules/modular-reuse.md +35 -0
- package/templates/.claude/rules/research-quality.md +20 -0
- package/templates/.claude/settings.json +37 -0
- package/templates/.claude/skills/explore/SKILL.md +215 -0
- package/templates/.claude/skills/explore/references/questioning-techniques.md +151 -0
- package/templates/.claude/skills/explore/references/task-brief-templates.md +355 -0
- package/templates/.claude/skills/frontend-design/LICENSE.txt +177 -0
- package/templates/.claude/skills/frontend-design/SKILL.md +42 -0
- package/templates/.claude/skills/goap-research-ed25519/SKILL.md +415 -0
- package/templates/.claude/skills/goap-research-ed25519/references/ed25519-verification.md +658 -0
- package/templates/.claude/skills/goap-research-ed25519/references/research-actions.md +544 -0
- package/templates/.claude/skills/goap-research-ed25519/references/source-evaluation.md +560 -0
- package/templates/.claude/skills/goap-research-ed25519/scripts/ed25519_verifier.py +662 -0
- package/templates/.claude/skills/goap-research-ed25519/scripts/goap_planner.py +720 -0
- package/templates/.claude/skills/presentation-storyteller/SKILL.md +371 -0
- package/templates/.claude/skills/presentation-storyteller/references/example-presentation.md +273 -0
- package/templates/.claude/skills/presentation-storyteller/references/slide-types.md +426 -0
- package/templates/.claude/skills/presentation-storyteller/references/sources-index-template.md +213 -0
- package/templates/.claude/skills/presentation-storyteller/references/speaker-script-patterns.md +324 -0
- package/templates/.claude/skills/presentation-storyteller/references/storytelling-frameworks.md +270 -0
- package/templates/.claude/skills/problem-solver-enhanced/SKILL.md +562 -0
- package/templates/.claude/skills/reverse-engineering-unicorn/SKILL.md +194 -0
- package/templates/.claude/skills/reverse-engineering-unicorn/examples/noom-cjm-example.md +100 -0
- package/templates/.claude/skills/reverse-engineering-unicorn/examples/noom-module1-example.md +88 -0
- package/templates/.claude/skills/reverse-engineering-unicorn/modules/01-intelligence.md +328 -0
- package/templates/.claude/skills/reverse-engineering-unicorn/modules/02-product-customers.md +221 -0
- package/templates/.claude/skills/reverse-engineering-unicorn/modules/025-cjm-prototype.md +206 -0
- package/templates/.claude/skills/reverse-engineering-unicorn/modules/03-market-competition.md +402 -0
- package/templates/.claude/skills/reverse-engineering-unicorn/modules/04-business-finance.md +287 -0
- package/templates/.claude/skills/reverse-engineering-unicorn/modules/05-growth-engine.md +290 -0
- package/templates/.claude/skills/reverse-engineering-unicorn/modules/06-playbook-synthesis.md +286 -0
- package/templates/.claude/skills/reverse-engineering-unicorn/references/blue-ocean-canvas.md +39 -0
- package/templates/.claude/skills/reverse-engineering-unicorn/references/industry-benchmarks.md +67 -0
- package/templates/.claude/skills/reverse-engineering-unicorn/references/jtbd-canvas.md +48 -0
- package/templates/CLAUDE.md +185 -0
- package/templates/TOOLKIT_HARVEST.md +29 -0
- package/templates/docs/keysarium/01-deployment-guide.md +768 -0
- package/templates/docs/keysarium/02-admin-guide.md +1170 -0
- package/templates/docs/keysarium/03-user-guide.md +884 -0
- package/templates/docs/keysarium/04-infrastructure-requirements.md +967 -0
- package/templates/docs/keysarium/05-architecture.md +706 -0
- package/templates/docs/keysarium/06-user-flows.md +925 -0
- package/templates/docs/skills-bto/01-deployment-guide.md +828 -0
- package/templates/docs/skills-bto/02-admin-guide.md +1052 -0
- package/templates/docs/skills-bto/03-user-guide.md +960 -0
- package/templates/docs/skills-bto/04-infrastructure-requirements.md +610 -0
- package/templates/docs/skills-bto/05-architecture.md +1112 -0
- package/templates/docs/skills-bto/06-user-flows.md +977 -0
- package/templates/lib/agent-patterns.md +115 -0
- package/templates/lib/domain-templates.md +172 -0
- package/templates/lib/phase-utils.md +107 -0
- package/templates/lib/skill-loader.md +78 -0
- package/templates/researches/.gitkeep +0 -0
package/src/utils.js
ADDED
|
@@ -0,0 +1,274 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const fs = require('fs');
|
|
4
|
+
const path = require('path');
|
|
5
|
+
|
|
6
|
+
// ===========================================================================
|
|
7
|
+
// Colors — ANSI escape codes (zero dependencies)
|
|
8
|
+
// ===========================================================================
|
|
9
|
+
|
|
10
|
+
const supportsColor = process.stdout.isTTY && !process.env.NO_COLOR;
|
|
11
|
+
|
|
12
|
+
function wrap(code, text) {
|
|
13
|
+
if (!supportsColor) return text;
|
|
14
|
+
return `\x1b[${code}m${text}\x1b[0m`;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
function green(text) { return wrap('32', text); }
|
|
18
|
+
function red(text) { return wrap('31', text); }
|
|
19
|
+
function yellow(text) { return wrap('33', text); }
|
|
20
|
+
function blue(text) { return wrap('34', text); }
|
|
21
|
+
function cyan(text) { return wrap('36', text); }
|
|
22
|
+
function bold(text) { return wrap('1', text); }
|
|
23
|
+
function dim(text) { return wrap('2', text); }
|
|
24
|
+
function gray(text) { return wrap('90', text); }
|
|
25
|
+
|
|
26
|
+
// ===========================================================================
|
|
27
|
+
// Logging
|
|
28
|
+
// ===========================================================================
|
|
29
|
+
|
|
30
|
+
function info(msg) { console.log(blue('[INFO]') + ' ' + msg); }
|
|
31
|
+
function success(msg) { console.log(green('[OK]') + ' ' + msg); }
|
|
32
|
+
function warn(msg) { console.log(yellow('[WARN]') + ' ' + msg); }
|
|
33
|
+
function error(msg) { console.log(red('[ERROR]') + ' ' + msg); }
|
|
34
|
+
|
|
35
|
+
function step(n, total, msg) {
|
|
36
|
+
console.log(cyan(`[${n}/${total}]`) + ' ' + msg);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
// ===========================================================================
|
|
40
|
+
// File operations — all synchronous, Node.js built-ins only
|
|
41
|
+
// ===========================================================================
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Copy a directory recursively from src to dest, creating dirs as needed.
|
|
45
|
+
* If src is a file, copies the single file.
|
|
46
|
+
*/
|
|
47
|
+
function copyDirRecursive(src, dest) {
|
|
48
|
+
const stat = fs.statSync(src);
|
|
49
|
+
|
|
50
|
+
if (stat.isFile()) {
|
|
51
|
+
ensureDir(path.dirname(dest));
|
|
52
|
+
fs.copyFileSync(src, dest);
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
if (stat.isDirectory()) {
|
|
57
|
+
ensureDir(dest);
|
|
58
|
+
const entries = fs.readdirSync(src);
|
|
59
|
+
for (const entry of entries) {
|
|
60
|
+
const srcEntry = path.join(src, entry);
|
|
61
|
+
const destEntry = path.join(dest, entry);
|
|
62
|
+
copyDirRecursive(srcEntry, destEntry);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Returns true if the path exists (file or directory).
|
|
69
|
+
*/
|
|
70
|
+
function fileExists(filePath) {
|
|
71
|
+
try {
|
|
72
|
+
fs.accessSync(filePath);
|
|
73
|
+
return true;
|
|
74
|
+
} catch {
|
|
75
|
+
return false;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* Read and parse a JSON file. Returns null if file not found or invalid.
|
|
81
|
+
*/
|
|
82
|
+
function readJSON(filePath) {
|
|
83
|
+
try {
|
|
84
|
+
const raw = fs.readFileSync(filePath, 'utf8');
|
|
85
|
+
return JSON.parse(raw);
|
|
86
|
+
} catch {
|
|
87
|
+
return null;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* Write an object as JSON with 2-space indentation.
|
|
93
|
+
*/
|
|
94
|
+
function writeJSON(filePath, data) {
|
|
95
|
+
ensureDir(path.dirname(filePath));
|
|
96
|
+
fs.writeFileSync(filePath, JSON.stringify(data, null, 2) + '\n', 'utf8');
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* Create a directory (and parents) if it does not exist.
|
|
101
|
+
*/
|
|
102
|
+
function ensureDir(dirPath) {
|
|
103
|
+
fs.mkdirSync(dirPath, { recursive: true });
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* Return an array of all file paths relative to `dir`, traversed recursively.
|
|
108
|
+
*/
|
|
109
|
+
function getRelativePaths(dir) {
|
|
110
|
+
const results = [];
|
|
111
|
+
|
|
112
|
+
function walk(current, rel) {
|
|
113
|
+
const entries = fs.readdirSync(current);
|
|
114
|
+
for (const entry of entries) {
|
|
115
|
+
const full = path.join(current, entry);
|
|
116
|
+
const relPath = rel ? path.join(rel, entry) : entry;
|
|
117
|
+
const stat = fs.statSync(full);
|
|
118
|
+
if (stat.isDirectory()) {
|
|
119
|
+
walk(full, relPath);
|
|
120
|
+
} else {
|
|
121
|
+
results.push(relPath);
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
if (fileExists(dir) && fs.statSync(dir).isDirectory()) {
|
|
127
|
+
walk(dir, '');
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
return results;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* Compare files between srcDir and destDir.
|
|
135
|
+
* Returns { added, modified, unchanged, missing }.
|
|
136
|
+
* added: files in src but not in dest
|
|
137
|
+
* modified: files in both but with different content
|
|
138
|
+
* unchanged: files in both with identical content
|
|
139
|
+
* missing: files in dest but not in src (would be removed on clean install)
|
|
140
|
+
*/
|
|
141
|
+
function diffFiles(srcDir, destDir) {
|
|
142
|
+
const srcFiles = new Set(getRelativePaths(srcDir));
|
|
143
|
+
const destFiles = new Set(getRelativePaths(destDir));
|
|
144
|
+
|
|
145
|
+
const added = [];
|
|
146
|
+
const modified = [];
|
|
147
|
+
const unchanged = [];
|
|
148
|
+
const missing = [];
|
|
149
|
+
|
|
150
|
+
for (const rel of srcFiles) {
|
|
151
|
+
if (!destFiles.has(rel)) {
|
|
152
|
+
added.push(rel);
|
|
153
|
+
} else {
|
|
154
|
+
const srcContent = fs.readFileSync(path.join(srcDir, rel));
|
|
155
|
+
const destContent = fs.readFileSync(path.join(destDir, rel));
|
|
156
|
+
if (srcContent.equals(destContent)) {
|
|
157
|
+
unchanged.push(rel);
|
|
158
|
+
} else {
|
|
159
|
+
modified.push(rel);
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
for (const rel of destFiles) {
|
|
165
|
+
if (!srcFiles.has(rel)) {
|
|
166
|
+
missing.push(rel);
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
return { added, modified, unchanged, missing };
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
// ===========================================================================
|
|
174
|
+
// Manifest — .keysarium.json management
|
|
175
|
+
// ===========================================================================
|
|
176
|
+
|
|
177
|
+
const MANIFEST_FILE = '.keysarium.json';
|
|
178
|
+
|
|
179
|
+
/**
|
|
180
|
+
* Read the manifest from targetDir. Returns null if not found.
|
|
181
|
+
*/
|
|
182
|
+
function readManifest(targetDir) {
|
|
183
|
+
return readJSON(path.join(targetDir, MANIFEST_FILE));
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
/**
|
|
187
|
+
* Write the manifest to targetDir.
|
|
188
|
+
*/
|
|
189
|
+
function writeManifest(targetDir, data) {
|
|
190
|
+
writeJSON(path.join(targetDir, MANIFEST_FILE), data);
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
/**
|
|
194
|
+
* Create a fresh manifest object.
|
|
195
|
+
*/
|
|
196
|
+
function createManifest(version, components, files) {
|
|
197
|
+
return {
|
|
198
|
+
version: version,
|
|
199
|
+
installedAt: new Date().toISOString(),
|
|
200
|
+
components: components,
|
|
201
|
+
files: files,
|
|
202
|
+
};
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
// ===========================================================================
|
|
206
|
+
// Templates path
|
|
207
|
+
// ===========================================================================
|
|
208
|
+
|
|
209
|
+
/**
|
|
210
|
+
* Returns the absolute path to the templates/ directory inside the package.
|
|
211
|
+
*/
|
|
212
|
+
function getTemplatesDir() {
|
|
213
|
+
return path.join(__dirname, '..', 'templates');
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
// ===========================================================================
|
|
217
|
+
// Component definitions
|
|
218
|
+
// ===========================================================================
|
|
219
|
+
|
|
220
|
+
const COMPONENTS = {
|
|
221
|
+
skills: { src: '.claude/skills', label: 'Skills (6 skill packs)', group: 'core' },
|
|
222
|
+
commands: { src: '.claude/commands', label: 'Commands (11 slash commands)', group: 'core' },
|
|
223
|
+
rules: { src: '.claude/rules', label: 'Rules (7 auto-loaded rules)', group: 'core' },
|
|
224
|
+
agents: { src: '.claude/agents', label: 'Agent templates (5 swarm configs)', group: 'core' },
|
|
225
|
+
hooks: { src: '.claude/settings.json', label: 'Hooks configuration', group: 'core', isFile: true },
|
|
226
|
+
lib: { src: 'lib', label: 'Library modules (4 modules)', group: 'extended' },
|
|
227
|
+
docs: { src: 'docs', label: 'Documentation (6 guides)', group: 'docs' },
|
|
228
|
+
claude_md: { src: 'CLAUDE.md', label: 'Master instructions', group: 'core', isFile: true },
|
|
229
|
+
harvest: { src: 'TOOLKIT_HARVEST.md', label: 'Knowledge harvest tracker', group: 'core', isFile: true },
|
|
230
|
+
};
|
|
231
|
+
|
|
232
|
+
// ===========================================================================
|
|
233
|
+
// Exports
|
|
234
|
+
// ===========================================================================
|
|
235
|
+
|
|
236
|
+
module.exports = {
|
|
237
|
+
// Colors
|
|
238
|
+
green,
|
|
239
|
+
red,
|
|
240
|
+
yellow,
|
|
241
|
+
blue,
|
|
242
|
+
cyan,
|
|
243
|
+
bold,
|
|
244
|
+
dim,
|
|
245
|
+
gray,
|
|
246
|
+
|
|
247
|
+
// Logging
|
|
248
|
+
info,
|
|
249
|
+
success,
|
|
250
|
+
warn,
|
|
251
|
+
error,
|
|
252
|
+
step,
|
|
253
|
+
|
|
254
|
+
// File operations
|
|
255
|
+
copyDirRecursive,
|
|
256
|
+
fileExists,
|
|
257
|
+
readJSON,
|
|
258
|
+
writeJSON,
|
|
259
|
+
ensureDir,
|
|
260
|
+
getRelativePaths,
|
|
261
|
+
diffFiles,
|
|
262
|
+
|
|
263
|
+
// Manifest
|
|
264
|
+
MANIFEST_FILE,
|
|
265
|
+
readManifest,
|
|
266
|
+
writeManifest,
|
|
267
|
+
createManifest,
|
|
268
|
+
|
|
269
|
+
// Templates
|
|
270
|
+
getTemplatesDir,
|
|
271
|
+
|
|
272
|
+
// Components
|
|
273
|
+
COMPONENTS,
|
|
274
|
+
};
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# Agent Template: CJM Variant Worker
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
Генерирует один вариант CJM (Customer Journey Map) в рамках Phase 2.5.
|
|
5
|
+
Используется как один из 3 параллельных агентов.
|
|
6
|
+
|
|
7
|
+
## Spawning Pattern
|
|
8
|
+
```
|
|
9
|
+
Agent(
|
|
10
|
+
subagent_type="general-purpose",
|
|
11
|
+
description="Phase 2.5 CJM Variant [X]",
|
|
12
|
+
prompt="""
|
|
13
|
+
Read the skills:
|
|
14
|
+
- .claude/skills/reverse-engineering-unicorn/modules/025-cjm-prototype.md
|
|
15
|
+
- .claude/skills/frontend-design/SKILL.md
|
|
16
|
+
|
|
17
|
+
Read the context:
|
|
18
|
+
- researches/<slug>/00_product_discovery.md
|
|
19
|
+
- researches/<slug>/01_case_brief.md
|
|
20
|
+
- researches/<slug>/02_research_findings.md
|
|
21
|
+
|
|
22
|
+
Generate CJM Variant [X]: [VARIANT_NAME]
|
|
23
|
+
|
|
24
|
+
Approach: [APPROACH_DESCRIPTION]
|
|
25
|
+
- Entry point: [pull/push/hybrid]
|
|
26
|
+
- AI autonomy: [advisor/executor/partner]
|
|
27
|
+
- Target segment: [user segment]
|
|
28
|
+
|
|
29
|
+
Deliverable: Return a JSON-like structure:
|
|
30
|
+
{
|
|
31
|
+
name: "[variant name]",
|
|
32
|
+
emoji: "[emoji]",
|
|
33
|
+
trigger: { title, scenario, metric },
|
|
34
|
+
input: { title, fields, scenario },
|
|
35
|
+
processing: { title, steps, duration },
|
|
36
|
+
result: { title, format, scenario },
|
|
37
|
+
review: { title, hitl, scenario },
|
|
38
|
+
action: { title, integration, scenario }
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
Plus a brief comparison row for the variant table.
|
|
42
|
+
"""
|
|
43
|
+
)
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## Variants
|
|
47
|
+
1. **Agent A** — Variant A: основной подход (наиболее очевидный)
|
|
48
|
+
2. **Agent B** — Variants B + C: альтернативные подходы
|
|
49
|
+
3. **Agent C** — Trend Research для Variant D (Future-Ready)
|
|
50
|
+
|
|
51
|
+
## Agent C Special Instructions
|
|
52
|
+
Agent C uses GOAP research (`.claude/skills/goap-research-ed25519/SKILL.md`) to:
|
|
53
|
+
1. Research 5 trend categories (AI Evolution, UX Shifts, Infra, Regulatory, Competitive)
|
|
54
|
+
2. Create Trend Brief
|
|
55
|
+
3. Synthesize Variant D based on trends + best of A/B/C
|
|
56
|
+
|
|
57
|
+
## Synthesis
|
|
58
|
+
Orchestrator combines all variants into:
|
|
59
|
+
- `02.5_trend_brief.md` (from Agent C)
|
|
60
|
+
- `prototype/cjm-prototype.jsx` (unified React component with all 4 variants)
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# Agent Template: Discovery Worker
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
Выполняет часть Product Discovery в рамках Phase 0.
|
|
5
|
+
Используется как один из 2 параллельных агентов.
|
|
6
|
+
|
|
7
|
+
## Spawning Pattern
|
|
8
|
+
```
|
|
9
|
+
Agent(
|
|
10
|
+
subagent_type="general-purpose",
|
|
11
|
+
description="Phase 0 [direction]",
|
|
12
|
+
prompt="""
|
|
13
|
+
Read the skill: .claude/skills/reverse-engineering-unicorn/SKILL.md
|
|
14
|
+
Read module: .claude/skills/reverse-engineering-unicorn/modules/02-product-customers.md
|
|
15
|
+
|
|
16
|
+
Case description: [CASE_TEXT]
|
|
17
|
+
Domain: [DOMAIN]
|
|
18
|
+
|
|
19
|
+
Direction: [DIRECTION]
|
|
20
|
+
|
|
21
|
+
[DIRECTION-SPECIFIC INSTRUCTIONS]
|
|
22
|
+
|
|
23
|
+
Deliverable: Return markdown sections as specified.
|
|
24
|
+
"""
|
|
25
|
+
)
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Agents
|
|
29
|
+
|
|
30
|
+
### Agent 1: JTBD + User Analysis
|
|
31
|
+
Sections to generate:
|
|
32
|
+
- A. Current Process (As-Is One-Liner)
|
|
33
|
+
- B. User Segments (JTBD table: 3+ segments)
|
|
34
|
+
- C. Voice of Customer (hate/value)
|
|
35
|
+
- D. Aha Moment for AI solution
|
|
36
|
+
- H. Adoption Strategy (Pilot → Rollout → Scale)
|
|
37
|
+
|
|
38
|
+
### Agent 2: Market + Business Analysis
|
|
39
|
+
Sections to generate:
|
|
40
|
+
- E. Why AI, Why Now? (4 factors table)
|
|
41
|
+
- F. Competitive Analysis (3+ competitors)
|
|
42
|
+
- G. Business Case (ROI, payback period)
|
|
43
|
+
|
|
44
|
+
## Synthesis
|
|
45
|
+
Orchestrator merges both agents' outputs into `00_product_discovery.md`.
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# Agent Template: Parallel Research Orchestrator
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
Оркестратор для запуска нескольких исследований параллельно.
|
|
5
|
+
Каждое исследование выполняется изолированным агентом.
|
|
6
|
+
|
|
7
|
+
## Spawning Pattern
|
|
8
|
+
```
|
|
9
|
+
# For each case in the parallel-research input:
|
|
10
|
+
Agent(
|
|
11
|
+
subagent_type="general-purpose",
|
|
12
|
+
description="Research: [case_name]",
|
|
13
|
+
prompt="""
|
|
14
|
+
You are conducting Phase 0 (Product Discovery) for a case study.
|
|
15
|
+
|
|
16
|
+
Read the skill: .claude/skills/reverse-engineering-unicorn/SKILL.md
|
|
17
|
+
|
|
18
|
+
Case: [CASE_DESCRIPTION]
|
|
19
|
+
Working directory: researches/[SLUG]/
|
|
20
|
+
|
|
21
|
+
Create the following structure:
|
|
22
|
+
1. researches/[SLUG]/prototype/ (directory)
|
|
23
|
+
2. researches/[SLUG]/diagrams/ (directory)
|
|
24
|
+
3. researches/[SLUG]/README.md (with case metadata)
|
|
25
|
+
4. researches/[SLUG]/00_product_discovery.md (full Phase 0 output)
|
|
26
|
+
|
|
27
|
+
Follow the Product Discovery template from the skill.
|
|
28
|
+
Use PARANOID mode for any factual claims.
|
|
29
|
+
|
|
30
|
+
After completion, provide a 3-line summary:
|
|
31
|
+
- Key user segments found
|
|
32
|
+
- Main competitive differentiator
|
|
33
|
+
- Estimated ROI
|
|
34
|
+
"""
|
|
35
|
+
)
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Orchestration Flow
|
|
39
|
+
|
|
40
|
+
```
|
|
41
|
+
1. Parse input: split by "|" separator
|
|
42
|
+
2. For each case:
|
|
43
|
+
a. Generate slug (snake_case, latin)
|
|
44
|
+
b. Create directory structure
|
|
45
|
+
c. Spawn isolated agent
|
|
46
|
+
3. Wait for all agents to complete
|
|
47
|
+
4. Generate summary table
|
|
48
|
+
5. Present to user for next steps
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## Limits
|
|
52
|
+
- Maximum 4 parallel cases (Claude Code context/cost optimization)
|
|
53
|
+
- Each agent is independent — no shared state
|
|
54
|
+
- If one agent fails, others continue
|
|
55
|
+
|
|
56
|
+
## Post-Completion
|
|
57
|
+
```
|
|
58
|
+
═══════════════════════════════════════════════════════
|
|
59
|
+
✅ Parallel Discovery Complete
|
|
60
|
+
|
|
61
|
+
| # | Case | Directory | Segments | ROI | Status |
|
|
62
|
+
|---|------|-----------|----------|-----|--------|
|
|
63
|
+
| 1 | [name] | researches/[slug]/ | [N] | [X] руб/мес | ✅ |
|
|
64
|
+
| 2 | [name] | researches/[slug]/ | [N] | [X] руб/мес | ✅ |
|
|
65
|
+
|
|
66
|
+
Next steps:
|
|
67
|
+
/casarium researches/[slug1]/ — continue case 1
|
|
68
|
+
/casarium researches/[slug2]/ — continue case 2
|
|
69
|
+
═══════════════════════════════════════════════════════
|
|
70
|
+
```
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# Agent Template: Presentation Worker
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
Генерирует один из компонентов презентации в рамках Phase 5.
|
|
5
|
+
Используется как один из 3 параллельных агентов.
|
|
6
|
+
|
|
7
|
+
## Spawning Pattern
|
|
8
|
+
```
|
|
9
|
+
Agent(
|
|
10
|
+
subagent_type="general-purpose",
|
|
11
|
+
description="Phase 5 [component]",
|
|
12
|
+
prompt="""
|
|
13
|
+
Read the skill: .claude/skills/presentation-storyteller/SKILL.md
|
|
14
|
+
|
|
15
|
+
Read ALL prior artifacts for full context:
|
|
16
|
+
- researches/<slug>/00_product_discovery.md
|
|
17
|
+
- researches/<slug>/01_case_brief.md
|
|
18
|
+
- researches/<slug>/02_research_findings.md
|
|
19
|
+
- researches/<slug>/02.5_trend_brief.md
|
|
20
|
+
- researches/<slug>/03_solution_strategy.md
|
|
21
|
+
- researches/<slug>/04_architecture.md
|
|
22
|
+
|
|
23
|
+
Component to generate: [COMPONENT]
|
|
24
|
+
|
|
25
|
+
[COMPONENT-SPECIFIC INSTRUCTIONS]
|
|
26
|
+
|
|
27
|
+
Write the result to: researches/<slug>/[FILENAME]
|
|
28
|
+
"""
|
|
29
|
+
)
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Components (spawn one agent per component)
|
|
33
|
+
|
|
34
|
+
### Agent 1: Presentation Content
|
|
35
|
+
- File: `05_presentation_content.md`
|
|
36
|
+
- 10-12 slides with structure: Title, Problem, Question+Answer, Concept, User Flow, AI Pipeline, Data, Security, Metrics+ROI, Roadmap, Team+CTA, Q&A
|
|
37
|
+
- Each slide: title, key message, visual description, data points
|
|
38
|
+
|
|
39
|
+
### Agent 2: Speaker Script
|
|
40
|
+
- File: `06_speaker_script.md`
|
|
41
|
+
- For each slide: HOOK (question/fact), CONTENT (30-60 sec), BRIDGE (transition), TONE, KEY MOMENT
|
|
42
|
+
- Total time: 7-10 minutes
|
|
43
|
+
- Storytelling arc: Problem → Journey → Solution → Impact
|
|
44
|
+
|
|
45
|
+
### Agent 3: Q&A + Executive Summary
|
|
46
|
+
- Files: `07_qa_preparation.md` + `08_executive_summary.md`
|
|
47
|
+
- Q&A: 7+ typical jury questions with 30-sec answers and supporting data
|
|
48
|
+
- Executive Summary: 1-page summary (Problem, Solution, Architecture, Metrics, Roadmap, Verification)
|
|
49
|
+
- Executive Summary is MANDATORY — never skip
|
|
50
|
+
|
|
51
|
+
## Synthesis
|
|
52
|
+
Orchestrator reviews all 3 outputs for:
|
|
53
|
+
- Consistency of narrative across presentation, script, and Q&A
|
|
54
|
+
- No contradictions between slides and speaker notes
|
|
55
|
+
- Executive summary accurately reflects the full solution
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# Agent Template: Research Worker
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
Выполняет research по одному направлению в рамках Phase 2 (Research).
|
|
5
|
+
Используется как один из 3 параллельных агентов.
|
|
6
|
+
|
|
7
|
+
## Spawning Pattern
|
|
8
|
+
```
|
|
9
|
+
Agent(
|
|
10
|
+
subagent_type="general-purpose",
|
|
11
|
+
description="Phase 2 [direction] research",
|
|
12
|
+
prompt="""
|
|
13
|
+
Read the skill: .claude/skills/goap-research-ed25519/SKILL.md
|
|
14
|
+
Read the case context: researches/<slug>/00_product_discovery.md
|
|
15
|
+
Read the case brief: researches/<slug>/01_case_brief.md
|
|
16
|
+
|
|
17
|
+
Research direction: [DIRECTION]
|
|
18
|
+
Mode: PARANOID (confidence threshold 0.99)
|
|
19
|
+
|
|
20
|
+
Deliverable: Return a markdown section with:
|
|
21
|
+
## [Direction Title]
|
|
22
|
+
### Findings
|
|
23
|
+
| Finding | Source | Verified |
|
|
24
|
+
|---------|--------|----------|
|
|
25
|
+
### Key Insights
|
|
26
|
+
- [insight 1]
|
|
27
|
+
- [insight 2]
|
|
28
|
+
### Recommendations
|
|
29
|
+
- [recommendation with justification]
|
|
30
|
+
|
|
31
|
+
IMPORTANT: Every claim must have a verifiable source.
|
|
32
|
+
Mark unverifiable claims as [UNVERIFIED].
|
|
33
|
+
"""
|
|
34
|
+
)
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Directions (spawn one agent per direction)
|
|
38
|
+
1. **Analogues + Metrics** — кто решал, какие результаты
|
|
39
|
+
2. **Technologies + Anti-patterns** — стек, что не работает
|
|
40
|
+
3. **Regulations + Market Data** — требования, рыночные данные
|
|
41
|
+
|
|
42
|
+
## Synthesis
|
|
43
|
+
After all 3 agents complete, the orchestrator merges results into `02_research_findings.md`.
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# Phase 4: Architecture — Техническая архитектура
|
|
2
|
+
|
|
3
|
+
## Использование
|
|
4
|
+
```
|
|
5
|
+
/architecture-phase [путь к директории исследования]
|
|
6
|
+
```
|
|
7
|
+
|
|
8
|
+
## Аргумент
|
|
9
|
+
$ARGUMENTS
|
|
10
|
+
|
|
11
|
+
## Действия
|
|
12
|
+
|
|
13
|
+
1. **Прочитай Phase 0-3** для полного контекста
|
|
14
|
+
2. **Спроектируй архитектуру:**
|
|
15
|
+
- Архитектурная диаграмма (Mermaid C4)
|
|
16
|
+
- Компоненты решения (технология, назначение, обоснование)
|
|
17
|
+
- AI Models & Pipeline (задача, тип, конкретная модель)
|
|
18
|
+
- Data Architecture (источники, ETL, storage, Vector DB)
|
|
19
|
+
- Интеграции (система, протокол)
|
|
20
|
+
- Security & Compliance (контур, RBAC, аудит, регуляторика)
|
|
21
|
+
- Scalability (latency, throughput, масштабирование)
|
|
22
|
+
- MVP Scope
|
|
23
|
+
|
|
24
|
+
3. **Обязательные диаграммы (минимум 2):**
|
|
25
|
+
- `architecture-c4.mermaid` — C4 Context
|
|
26
|
+
- `sequence-main-flow.mermaid` — Sequence diagram ключевого flow
|
|
27
|
+
|
|
28
|
+
4. **Создай файлы:**
|
|
29
|
+
- `04_architecture.md`
|
|
30
|
+
- `diagrams/architecture-c4.mermaid`
|
|
31
|
+
- `diagrams/sequence-main-flow.mermaid`
|
|
32
|
+
5. **Покажи Checkpoint 4**
|
|
33
|
+
|
|
34
|
+
## Domain-specific правила
|
|
35
|
+
- **Банк:** on-premise LLM, ФЗ-152, ЦБ, ФСТЭК, GigaChat/YandexGPT
|
|
36
|
+
- **Ритейл:** Latency < 200ms, A/B тестирование
|
|
37
|
+
- **Enterprise:** Change Management, Legacy интеграции, SLA
|