clawcompany 0.12.0 → 0.13.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/dist/index.js +210 -10
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -26,21 +26,21 @@ function getDefaultConfig() {
|
|
|
26
26
|
version: "1.0",
|
|
27
27
|
providers: [DEFAULT_CLAWAPI_PROVIDER],
|
|
28
28
|
roles: rolesMap,
|
|
29
|
-
fallbackChain: DEFAULT_FALLBACK_CHAIN
|
|
29
|
+
fallbackChain: DEFAULT_FALLBACK_CHAIN,
|
|
30
|
+
activeTemplate: "default"
|
|
30
31
|
};
|
|
31
32
|
}
|
|
32
|
-
function getBuiltinRole(id) {
|
|
33
|
-
return BUILTIN_ROLES.find((r) => r.id === id);
|
|
34
|
-
}
|
|
35
33
|
function resolveRoles(config) {
|
|
34
|
+
const templateId = config.activeTemplate ?? "default";
|
|
35
|
+
const template = TEMPLATES[templateId] ?? DEFAULT_TEMPLATE;
|
|
36
36
|
const resolved = [];
|
|
37
37
|
for (const [id, overrides] of Object.entries(config.roles)) {
|
|
38
|
-
const builtin =
|
|
38
|
+
const builtin = template.roles.find((r) => r.id === id);
|
|
39
39
|
if (builtin) {
|
|
40
40
|
resolved.push({ ...builtin, ...overrides, id, isBuiltin: true, updatedAt: (/* @__PURE__ */ new Date()).toISOString() });
|
|
41
41
|
} else {
|
|
42
42
|
if (!overrides.name || !overrides.model) {
|
|
43
|
-
|
|
43
|
+
continue;
|
|
44
44
|
}
|
|
45
45
|
resolved.push({
|
|
46
46
|
id,
|
|
@@ -49,9 +49,9 @@ function resolveRoles(config) {
|
|
|
49
49
|
systemPrompt: overrides.systemPrompt ?? `You are ${overrides.name}.`,
|
|
50
50
|
model: overrides.model,
|
|
51
51
|
provider: overrides.provider ?? config.providers[0]?.id ?? "clawapi",
|
|
52
|
-
reportsTo: overrides.reportsTo ??
|
|
52
|
+
reportsTo: overrides.reportsTo ?? null,
|
|
53
53
|
canDelegateTo: overrides.canDelegateTo ?? [],
|
|
54
|
-
canEscalateTo: overrides.canEscalateTo ?? [
|
|
54
|
+
canEscalateTo: overrides.canEscalateTo ?? [],
|
|
55
55
|
budgetTier: overrides.budgetTier ?? "save",
|
|
56
56
|
budgetMonthly: overrides.budgetMonthly ?? null,
|
|
57
57
|
maxTokensPerTask: overrides.maxTokensPerTask ?? null,
|
|
@@ -67,7 +67,7 @@ function resolveRoles(config) {
|
|
|
67
67
|
}
|
|
68
68
|
return resolved;
|
|
69
69
|
}
|
|
70
|
-
var DEFAULT_CLAWAPI_PROVIDER, BUILTIN_ROLES, DEFAULT_FALLBACK_CHAIN, MODEL_PRICING;
|
|
70
|
+
var DEFAULT_CLAWAPI_PROVIDER, BUILTIN_ROLES, DEFAULT_TEMPLATE, YC_STARTUP_ROLES, YC_STARTUP_TEMPLATE, TEMPLATES, DEFAULT_FALLBACK_CHAIN, MODEL_PRICING;
|
|
71
71
|
var init_defaults = __esm({
|
|
72
72
|
"../packages/shared/src/defaults.ts"() {
|
|
73
73
|
"use strict";
|
|
@@ -370,6 +370,206 @@ CRITICAL: When collecting data (prices, statistics, figures), you MUST use tools
|
|
|
370
370
|
updatedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
371
371
|
}
|
|
372
372
|
];
|
|
373
|
+
DEFAULT_TEMPLATE = {
|
|
374
|
+
id: "default",
|
|
375
|
+
name: "Default",
|
|
376
|
+
icon: "\u{1F99E}",
|
|
377
|
+
description: "General purpose AI company \u2014 9 roles, 4 models",
|
|
378
|
+
roles: BUILTIN_ROLES
|
|
379
|
+
};
|
|
380
|
+
YC_STARTUP_ROLES = [
|
|
381
|
+
{
|
|
382
|
+
id: "founder_coach",
|
|
383
|
+
name: "Founder Coach",
|
|
384
|
+
description: "YC-style partner \u2014 rethinks problems before executing.",
|
|
385
|
+
systemPrompt: `You are the Founder Coach \u2014 a YC-style partner who has seen 10,000 startups.
|
|
386
|
+
When the Chairman gives you a mission or idea, DO NOT execute it immediately. Your job is to RETHINK THE PROBLEM FIRST.
|
|
387
|
+
|
|
388
|
+
PHASE 1 \u2014 UNDERSTAND:
|
|
389
|
+
1. What specific pain are we solving?
|
|
390
|
+
2. Who experiences this pain?
|
|
391
|
+
3. What do they do today?
|
|
392
|
+
4. Why hasn't someone solved this?
|
|
393
|
+
5. What would a 10-star version look like?
|
|
394
|
+
6. What's the simplest version we could ship this week?
|
|
395
|
+
|
|
396
|
+
PHASE 2 \u2014 CHALLENGE: Push back on the framing. Identify hidden assumptions. Suggest alternatives.
|
|
397
|
+
|
|
398
|
+
PHASE 3 \u2014 DESIGN DOC: Problem statement, Target user, Core insight, MVP scope, Success metrics, Risks.
|
|
399
|
+
|
|
400
|
+
DELEGATION: Architecture \u2192 Tech Lead, UI/UX \u2192 Designer, Implementation \u2192 Engineer, Testing \u2192 QA, Growth \u2192 Growth Hacker, Market analysis \u2192 Product Manager.
|
|
401
|
+
|
|
402
|
+
COST AWARENESS: You are the most expensive role. Delegate execution immediately after alignment.`,
|
|
403
|
+
model: "claude-opus-4-6",
|
|
404
|
+
provider: "clawapi",
|
|
405
|
+
reportsTo: null,
|
|
406
|
+
canDelegateTo: ["product_manager", "tech_lead", "designer", "engineer", "qa", "growth_hacker"],
|
|
407
|
+
canEscalateTo: [],
|
|
408
|
+
budgetTier: "earn",
|
|
409
|
+
budgetMonthly: null,
|
|
410
|
+
maxTokensPerTask: null,
|
|
411
|
+
tools: ["web_fetch", "web_search", "price_feed", "browser_use"],
|
|
412
|
+
skills: [],
|
|
413
|
+
isBuiltin: true,
|
|
414
|
+
isActive: true,
|
|
415
|
+
heartbeatInterval: 0,
|
|
416
|
+
createdAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
417
|
+
updatedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
418
|
+
},
|
|
419
|
+
{
|
|
420
|
+
id: "product_manager",
|
|
421
|
+
name: "Product Manager",
|
|
422
|
+
description: 'Owns the "what" and "why" \u2014 specs, user stories, prioritization.',
|
|
423
|
+
systemPrompt: `You are the Product Manager \u2014 you own the "what" and "why."
|
|
424
|
+
Translate vision into actionable specs. Define user stories with acceptance criteria. Prioritize ruthlessly. Say NO to features that don't serve the core user. Every feature ships with a way to measure its impact.`,
|
|
425
|
+
model: "claude-sonnet-4-6",
|
|
426
|
+
provider: "clawapi",
|
|
427
|
+
reportsTo: "founder_coach",
|
|
428
|
+
canDelegateTo: ["designer", "engineer", "growth_hacker"],
|
|
429
|
+
canEscalateTo: ["founder_coach"],
|
|
430
|
+
budgetTier: "save",
|
|
431
|
+
budgetMonthly: null,
|
|
432
|
+
maxTokensPerTask: null,
|
|
433
|
+
tools: ["web_fetch", "web_search"],
|
|
434
|
+
skills: [],
|
|
435
|
+
isBuiltin: true,
|
|
436
|
+
isActive: true,
|
|
437
|
+
heartbeatInterval: 0,
|
|
438
|
+
createdAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
439
|
+
updatedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
440
|
+
},
|
|
441
|
+
{
|
|
442
|
+
id: "tech_lead",
|
|
443
|
+
name: "Tech Lead",
|
|
444
|
+
description: "Technical architecture, engineering quality, system design.",
|
|
445
|
+
systemPrompt: `You are the Tech Lead \u2014 you own technical architecture and engineering quality.
|
|
446
|
+
Review every plan for technical feasibility. Design system architecture: data flow, APIs, edge cases. Identify technical debt. Enforce coding standards and security practices.
|
|
447
|
+
|
|
448
|
+
Principles: Simple > clever. Make it work, make it right, make it fast.`,
|
|
449
|
+
model: "gpt-5.4",
|
|
450
|
+
provider: "clawapi",
|
|
451
|
+
reportsTo: "founder_coach",
|
|
452
|
+
canDelegateTo: ["engineer", "qa"],
|
|
453
|
+
canEscalateTo: ["founder_coach"],
|
|
454
|
+
budgetTier: "save",
|
|
455
|
+
budgetMonthly: null,
|
|
456
|
+
maxTokensPerTask: null,
|
|
457
|
+
tools: ["shell", "filesystem", "http", "code_interpreter", "web_fetch"],
|
|
458
|
+
skills: ["coding"],
|
|
459
|
+
isBuiltin: true,
|
|
460
|
+
isActive: true,
|
|
461
|
+
heartbeatInterval: 0,
|
|
462
|
+
createdAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
463
|
+
updatedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
464
|
+
},
|
|
465
|
+
{
|
|
466
|
+
id: "designer",
|
|
467
|
+
name: "Designer",
|
|
468
|
+
description: "User experience, interface design, user flows.",
|
|
469
|
+
systemPrompt: `You are the Designer \u2014 you own the user experience.
|
|
470
|
+
Design intuitive interfaces. Create user flows before wireframes. Push for simplicity.
|
|
471
|
+
|
|
472
|
+
Principles: "Don't make me think." One primary action per screen. The best UI is no UI.
|
|
473
|
+
Rate designs 0-10 on: Clarity, Simplicity, Delight, Consistency, Accessibility.`,
|
|
474
|
+
model: "claude-sonnet-4-6",
|
|
475
|
+
provider: "clawapi",
|
|
476
|
+
reportsTo: "founder_coach",
|
|
477
|
+
canDelegateTo: ["engineer"],
|
|
478
|
+
canEscalateTo: ["founder_coach"],
|
|
479
|
+
budgetTier: "save",
|
|
480
|
+
budgetMonthly: null,
|
|
481
|
+
maxTokensPerTask: null,
|
|
482
|
+
tools: ["web_fetch", "web_search", "browser_use"],
|
|
483
|
+
skills: [],
|
|
484
|
+
isBuiltin: true,
|
|
485
|
+
isActive: true,
|
|
486
|
+
heartbeatInterval: 0,
|
|
487
|
+
createdAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
488
|
+
updatedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
489
|
+
},
|
|
490
|
+
{
|
|
491
|
+
id: "engineer",
|
|
492
|
+
name: "Engineer",
|
|
493
|
+
description: "Code implementation, debugging, testing, feature development.",
|
|
494
|
+
systemPrompt: `You are the Engineer \u2014 you write the code that ships.
|
|
495
|
+
Read the spec FIRST. Write tests alongside code. Small commits. Handle errors. No magic numbers. DRY but don't over-abstract. Working software > perfect software.`,
|
|
496
|
+
model: "gpt-5.4",
|
|
497
|
+
provider: "clawapi",
|
|
498
|
+
reportsTo: "tech_lead",
|
|
499
|
+
canDelegateTo: ["qa"],
|
|
500
|
+
canEscalateTo: ["tech_lead"],
|
|
501
|
+
budgetTier: "save",
|
|
502
|
+
budgetMonthly: null,
|
|
503
|
+
maxTokensPerTask: null,
|
|
504
|
+
tools: ["shell", "filesystem", "http", "code_interpreter", "browser_use"],
|
|
505
|
+
skills: ["coding"],
|
|
506
|
+
isBuiltin: true,
|
|
507
|
+
isActive: true,
|
|
508
|
+
heartbeatInterval: 0,
|
|
509
|
+
createdAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
510
|
+
updatedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
511
|
+
},
|
|
512
|
+
{
|
|
513
|
+
id: "qa",
|
|
514
|
+
name: "QA",
|
|
515
|
+
description: "Testing \u2014 happy path, edge cases, error paths, security, performance.",
|
|
516
|
+
systemPrompt: `You are the QA Engineer \u2014 you break things so users don't have to.
|
|
517
|
+
Test: happy path, edge cases, error paths, security, performance, regression.
|
|
518
|
+
|
|
519
|
+
Bug report format: Title, Steps to reproduce, Expected, Actual, Severity.`,
|
|
520
|
+
model: "gpt-5-mini",
|
|
521
|
+
provider: "clawapi",
|
|
522
|
+
reportsTo: "tech_lead",
|
|
523
|
+
canDelegateTo: [],
|
|
524
|
+
canEscalateTo: ["tech_lead"],
|
|
525
|
+
budgetTier: "save",
|
|
526
|
+
budgetMonthly: null,
|
|
527
|
+
maxTokensPerTask: null,
|
|
528
|
+
tools: ["shell", "filesystem", "http", "browser_use"],
|
|
529
|
+
skills: [],
|
|
530
|
+
isBuiltin: true,
|
|
531
|
+
isActive: true,
|
|
532
|
+
heartbeatInterval: 0,
|
|
533
|
+
createdAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
534
|
+
updatedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
535
|
+
},
|
|
536
|
+
{
|
|
537
|
+
id: "growth_hacker",
|
|
538
|
+
name: "Growth Hacker",
|
|
539
|
+
description: "User acquisition, activation, retention \u2014 AARRR framework.",
|
|
540
|
+
systemPrompt: `You are the Growth Hacker \u2014 you find users and make them stay.
|
|
541
|
+
AARRR framework: Acquisition, Activation, Retention, Revenue, Referral.
|
|
542
|
+
|
|
543
|
+
Design experiments: Hypothesis, Control, Variant, Sample size, Success criteria.
|
|
544
|
+
Measure everything. Retention > acquisition.`,
|
|
545
|
+
model: "gemini-3.1-flash-lite",
|
|
546
|
+
provider: "clawapi",
|
|
547
|
+
reportsTo: "product_manager",
|
|
548
|
+
canDelegateTo: [],
|
|
549
|
+
canEscalateTo: ["product_manager"],
|
|
550
|
+
budgetTier: "save",
|
|
551
|
+
budgetMonthly: null,
|
|
552
|
+
maxTokensPerTask: null,
|
|
553
|
+
tools: ["web_fetch", "web_search", "price_feed", "browser_use"],
|
|
554
|
+
skills: [],
|
|
555
|
+
isBuiltin: true,
|
|
556
|
+
isActive: true,
|
|
557
|
+
heartbeatInterval: 0,
|
|
558
|
+
createdAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
559
|
+
updatedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
560
|
+
}
|
|
561
|
+
];
|
|
562
|
+
YC_STARTUP_TEMPLATE = {
|
|
563
|
+
id: "yc_startup",
|
|
564
|
+
name: "YC Startup",
|
|
565
|
+
icon: "\u{1F680}",
|
|
566
|
+
description: "Lean startup team \u2014 7 roles, YC methodology, ship fast",
|
|
567
|
+
roles: YC_STARTUP_ROLES
|
|
568
|
+
};
|
|
569
|
+
TEMPLATES = {
|
|
570
|
+
default: DEFAULT_TEMPLATE,
|
|
571
|
+
yc_startup: YC_STARTUP_TEMPLATE
|
|
572
|
+
};
|
|
373
573
|
DEFAULT_FALLBACK_CHAIN = [
|
|
374
574
|
"claude-opus-4-6",
|
|
375
575
|
"claude-sonnet-4-6",
|
|
@@ -947,7 +1147,7 @@ import { join } from "path";
|
|
|
947
1147
|
import { existsSync, readFileSync, writeFileSync, mkdirSync } from "fs";
|
|
948
1148
|
function banner() {
|
|
949
1149
|
console.log("");
|
|
950
|
-
console.log(" \u{1F99E} ClawCompany v0.
|
|
1150
|
+
console.log(" \u{1F99E} ClawCompany v0.13.0");
|
|
951
1151
|
console.log(" Build for OPC. Every human being is a chairman.");
|
|
952
1152
|
console.log("");
|
|
953
1153
|
}
|
package/package.json
CHANGED