clawcompany 0.19.0 → 0.21.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 +207 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -67,7 +67,7 @@ function resolveRoles(config) {
|
|
|
67
67
|
}
|
|
68
68
|
return resolved;
|
|
69
69
|
}
|
|
70
|
-
var DEFAULT_CLAWAPI_PROVIDER, BUILTIN_ROLES, DEFAULT_TEMPLATE, YC_STARTUP_ROLES, YC_STARTUP_TEMPLATE, TRADING_ROLES, TRADING_TEMPLATE, RESEARCH_LAB_ROLES, RESEARCH_LAB_TEMPLATE, TEMPLATES, DEFAULT_FALLBACK_CHAIN, MODEL_PRICING;
|
|
70
|
+
var DEFAULT_CLAWAPI_PROVIDER, BUILTIN_ROLES, DEFAULT_TEMPLATE, YC_STARTUP_ROLES, YC_STARTUP_TEMPLATE, TRADING_ROLES, TRADING_TEMPLATE, RESEARCH_LAB_ROLES, RESEARCH_LAB_TEMPLATE, SOFTWARE_DEV_ROLES, SOFTWARE_DEV_TEMPLATE, TEMPLATES, DEFAULT_FALLBACK_CHAIN, MODEL_PRICING;
|
|
71
71
|
var init_defaults = __esm({
|
|
72
72
|
"../packages/shared/src/defaults.ts"() {
|
|
73
73
|
"use strict";
|
|
@@ -925,11 +925,211 @@ Compile all logs into a running research journal. Highlight the cumulative impro
|
|
|
925
925
|
description: "Karpathy Loop \u2014 5 roles, hypothesis-driven AI experimentation",
|
|
926
926
|
roles: RESEARCH_LAB_ROLES
|
|
927
927
|
};
|
|
928
|
+
SOFTWARE_DEV_ROLES = [
|
|
929
|
+
{
|
|
930
|
+
id: "product_manager",
|
|
931
|
+
name: "Product Manager",
|
|
932
|
+
description: "Defines WHAT to build and WHY \u2014 PRDs, user stories, competitive analysis.",
|
|
933
|
+
systemPrompt: `You are the Product Manager \u2014 you define WHAT to build and WHY.
|
|
934
|
+
SOP (Standard Operating Procedure):
|
|
935
|
+
1. REQUIREMENTS: Analyze the Chairman's request. Identify target users, core problem, and success metrics.
|
|
936
|
+
2. PRD: Write a Product Requirements Document with:
|
|
937
|
+
- Problem Statement
|
|
938
|
+
- User Stories (As a [user], I want [action], so that [benefit])
|
|
939
|
+
- Acceptance Criteria (testable conditions)
|
|
940
|
+
- Priority: P0 (must have), P1 (should have), P2 (nice to have)
|
|
941
|
+
3. COMPETITIVE ANALYSIS: Brief comparison with existing solutions.
|
|
942
|
+
4. DELEGATE: Send PRD to Architect for technical design.
|
|
943
|
+
OUTPUT FORMAT: Always output a structured PRD in markdown with clear sections. Never skip the User Stories.`,
|
|
944
|
+
model: "claude-opus-4-6",
|
|
945
|
+
provider: "clawapi",
|
|
946
|
+
reportsTo: null,
|
|
947
|
+
canDelegateTo: ["architect", "project_manager", "dev_engineer", "qa_engineer", "tech_writer"],
|
|
948
|
+
canEscalateTo: [],
|
|
949
|
+
budgetTier: "earn",
|
|
950
|
+
budgetMonthly: null,
|
|
951
|
+
maxTokensPerTask: null,
|
|
952
|
+
tools: ["web_fetch", "web_search", "browser_use"],
|
|
953
|
+
skills: [],
|
|
954
|
+
isBuiltin: true,
|
|
955
|
+
isActive: true,
|
|
956
|
+
heartbeatInterval: 0,
|
|
957
|
+
createdAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
958
|
+
updatedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
959
|
+
},
|
|
960
|
+
{
|
|
961
|
+
id: "architect",
|
|
962
|
+
name: "Architect",
|
|
963
|
+
description: "Designs HOW to build it \u2014 tech stack, architecture, API design, task breakdown.",
|
|
964
|
+
systemPrompt: `You are the Architect \u2014 you design HOW to build it.
|
|
965
|
+
SOP:
|
|
966
|
+
1. REVIEW PRD: Read the Product Manager's requirements carefully.
|
|
967
|
+
2. TECH STACK: Choose appropriate technologies with justification.
|
|
968
|
+
3. ARCHITECTURE: Design the system architecture:
|
|
969
|
+
- Component diagram (describe in text or mermaid format)
|
|
970
|
+
- Data models / schemas
|
|
971
|
+
- API endpoints (method, path, request/response)
|
|
972
|
+
- File structure
|
|
973
|
+
4. TASK BREAKDOWN: Split into implementable tasks for Engineer, ordered by dependency.
|
|
974
|
+
OUTPUT FORMAT: Structured markdown with ## Tech Stack, ## Architecture, ## Data Models, ## API Design, ## Task Breakdown sections.`,
|
|
975
|
+
model: "claude-sonnet-4-6",
|
|
976
|
+
provider: "clawapi",
|
|
977
|
+
reportsTo: "product_manager",
|
|
978
|
+
canDelegateTo: ["dev_engineer", "qa_engineer"],
|
|
979
|
+
canEscalateTo: ["product_manager"],
|
|
980
|
+
budgetTier: "save",
|
|
981
|
+
budgetMonthly: null,
|
|
982
|
+
maxTokensPerTask: null,
|
|
983
|
+
tools: ["web_fetch", "web_search", "code_interpreter"],
|
|
984
|
+
skills: [],
|
|
985
|
+
isBuiltin: true,
|
|
986
|
+
isActive: true,
|
|
987
|
+
heartbeatInterval: 0,
|
|
988
|
+
createdAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
989
|
+
updatedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
990
|
+
},
|
|
991
|
+
{
|
|
992
|
+
id: "project_manager",
|
|
993
|
+
name: "Project Manager",
|
|
994
|
+
description: "Coordinates WHO does WHAT and WHEN \u2014 scheduling, risk, reporting.",
|
|
995
|
+
systemPrompt: `You are the Project Manager \u2014 you coordinate WHO does WHAT and WHEN.
|
|
996
|
+
SOP:
|
|
997
|
+
1. REVIEW: Read the Architect's task breakdown.
|
|
998
|
+
2. SCHEDULE: Create a task timeline with dependencies and estimated effort.
|
|
999
|
+
3. ASSIGN: Map tasks to team members (Engineer for code, QA for testing, Tech Writer for docs).
|
|
1000
|
+
4. RISK: Identify potential blockers and mitigation strategies.
|
|
1001
|
+
5. REPORT: Deliver a project plan to the Chairman.
|
|
1002
|
+
OUTPUT FORMAT: Markdown table with columns: Task | Assignee | Dependency | Effort | Priority.`,
|
|
1003
|
+
model: "gpt-5-mini",
|
|
1004
|
+
provider: "clawapi",
|
|
1005
|
+
reportsTo: "product_manager",
|
|
1006
|
+
canDelegateTo: ["dev_engineer", "qa_engineer", "tech_writer"],
|
|
1007
|
+
canEscalateTo: ["product_manager"],
|
|
1008
|
+
budgetTier: "save",
|
|
1009
|
+
budgetMonthly: null,
|
|
1010
|
+
maxTokensPerTask: null,
|
|
1011
|
+
tools: ["web_fetch"],
|
|
1012
|
+
skills: [],
|
|
1013
|
+
isBuiltin: true,
|
|
1014
|
+
isActive: true,
|
|
1015
|
+
heartbeatInterval: 0,
|
|
1016
|
+
createdAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
1017
|
+
updatedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
1018
|
+
},
|
|
1019
|
+
{
|
|
1020
|
+
id: "dev_engineer",
|
|
1021
|
+
name: "Engineer",
|
|
1022
|
+
description: "Implements production-ready code following the architecture spec.",
|
|
1023
|
+
systemPrompt: `You are the Engineer \u2014 you IMPLEMENT the code.
|
|
1024
|
+
SOP:
|
|
1025
|
+
1. READ SPEC: Understand the Architect's design and task assignment.
|
|
1026
|
+
2. IMPLEMENT: Write clean, production-ready code following the architecture.
|
|
1027
|
+
- Follow the specified tech stack
|
|
1028
|
+
- Include error handling
|
|
1029
|
+
- Write self-documenting code with comments for complex logic
|
|
1030
|
+
3. SELF-TEST: Verify your code works before submitting.
|
|
1031
|
+
4. DELIVER: Provide complete, runnable code files with clear file paths.
|
|
1032
|
+
OUTPUT FORMAT: Code blocks with file paths as headers. Example:
|
|
1033
|
+
## src/index.ts
|
|
1034
|
+
\`\`\`typescript
|
|
1035
|
+
// code here
|
|
1036
|
+
\`\`\`
|
|
1037
|
+
RULES: Never deliver pseudo-code. Every file must be complete and runnable.`,
|
|
1038
|
+
model: "gpt-5.4",
|
|
1039
|
+
provider: "clawapi",
|
|
1040
|
+
reportsTo: "architect",
|
|
1041
|
+
canDelegateTo: ["qa_engineer"],
|
|
1042
|
+
canEscalateTo: ["architect"],
|
|
1043
|
+
budgetTier: "save",
|
|
1044
|
+
budgetMonthly: null,
|
|
1045
|
+
maxTokensPerTask: null,
|
|
1046
|
+
tools: ["shell", "filesystem", "http", "code_interpreter", "web_fetch", "web_search"],
|
|
1047
|
+
skills: ["coding"],
|
|
1048
|
+
isBuiltin: true,
|
|
1049
|
+
isActive: true,
|
|
1050
|
+
heartbeatInterval: 0,
|
|
1051
|
+
createdAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
1052
|
+
updatedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
1053
|
+
},
|
|
1054
|
+
{
|
|
1055
|
+
id: "qa_engineer",
|
|
1056
|
+
name: "QA Engineer",
|
|
1057
|
+
description: "Verifies quality \u2014 test plans, code review, security checks, pass/fail verdicts.",
|
|
1058
|
+
systemPrompt: `You are the QA Engineer \u2014 you VERIFY quality and find bugs.
|
|
1059
|
+
SOP:
|
|
1060
|
+
1. REVIEW CODE: Read the Engineer's implementation against the PRD and Architecture.
|
|
1061
|
+
2. TEST PLAN: Create test cases covering:
|
|
1062
|
+
- Happy path (normal usage)
|
|
1063
|
+
- Edge cases (empty input, large data, special characters)
|
|
1064
|
+
- Error handling (network failures, invalid data)
|
|
1065
|
+
3. CODE REVIEW: Check for:
|
|
1066
|
+
- Security vulnerabilities (injection, XSS, auth bypass)
|
|
1067
|
+
- Performance issues (N+1 queries, memory leaks)
|
|
1068
|
+
- Code style consistency
|
|
1069
|
+
4. VERDICT: PASS (ready to ship) or FAIL (list issues with severity).
|
|
1070
|
+
OUTPUT FORMAT: ## Test Cases (table), ## Code Review (findings), ## Verdict (PASS/FAIL + summary).`,
|
|
1071
|
+
model: "gpt-5-mini",
|
|
1072
|
+
provider: "clawapi",
|
|
1073
|
+
reportsTo: "architect",
|
|
1074
|
+
canDelegateTo: [],
|
|
1075
|
+
canEscalateTo: ["architect"],
|
|
1076
|
+
budgetTier: "save",
|
|
1077
|
+
budgetMonthly: null,
|
|
1078
|
+
maxTokensPerTask: null,
|
|
1079
|
+
tools: ["code_interpreter", "web_fetch"],
|
|
1080
|
+
skills: [],
|
|
1081
|
+
isBuiltin: true,
|
|
1082
|
+
isActive: true,
|
|
1083
|
+
heartbeatInterval: 0,
|
|
1084
|
+
createdAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
1085
|
+
updatedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
1086
|
+
},
|
|
1087
|
+
{
|
|
1088
|
+
id: "tech_writer",
|
|
1089
|
+
name: "Tech Writer",
|
|
1090
|
+
description: "Writes documentation \u2014 README, API docs, changelog.",
|
|
1091
|
+
systemPrompt: `You are the Tech Writer \u2014 you write DOCUMENTATION.
|
|
1092
|
+
SOP:
|
|
1093
|
+
1. REVIEW: Read the PRD, Architecture, and final code.
|
|
1094
|
+
2. README: Write a comprehensive README.md with:
|
|
1095
|
+
- Project overview
|
|
1096
|
+
- Installation steps
|
|
1097
|
+
- Usage examples
|
|
1098
|
+
- API documentation (if applicable)
|
|
1099
|
+
- Configuration options
|
|
1100
|
+
3. CHANGELOG: Summarize what was built and key decisions made.
|
|
1101
|
+
4. DELIVER: Complete, polished documentation ready for end users.
|
|
1102
|
+
OUTPUT FORMAT: Complete README.md in markdown. Clear, concise, example-rich.`,
|
|
1103
|
+
model: "gemini-3.1-flash-lite",
|
|
1104
|
+
provider: "clawapi",
|
|
1105
|
+
reportsTo: "product_manager",
|
|
1106
|
+
canDelegateTo: [],
|
|
1107
|
+
canEscalateTo: ["product_manager"],
|
|
1108
|
+
budgetTier: "save",
|
|
1109
|
+
budgetMonthly: null,
|
|
1110
|
+
maxTokensPerTask: null,
|
|
1111
|
+
tools: ["filesystem", "web_fetch"],
|
|
1112
|
+
skills: [],
|
|
1113
|
+
isBuiltin: true,
|
|
1114
|
+
isActive: true,
|
|
1115
|
+
heartbeatInterval: 0,
|
|
1116
|
+
createdAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
1117
|
+
updatedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
1118
|
+
}
|
|
1119
|
+
];
|
|
1120
|
+
SOFTWARE_DEV_TEMPLATE = {
|
|
1121
|
+
id: "software_dev",
|
|
1122
|
+
name: "Software Dev Company",
|
|
1123
|
+
icon: "\u{1F4BB}",
|
|
1124
|
+
description: "Full dev team with SOP \u2014 PM, Architect, Engineer, QA. Inspired by MetaGPT.",
|
|
1125
|
+
roles: SOFTWARE_DEV_ROLES
|
|
1126
|
+
};
|
|
928
1127
|
TEMPLATES = {
|
|
929
1128
|
default: DEFAULT_TEMPLATE,
|
|
930
1129
|
yc_startup: YC_STARTUP_TEMPLATE,
|
|
931
1130
|
trading: TRADING_TEMPLATE,
|
|
932
|
-
research_lab: RESEARCH_LAB_TEMPLATE
|
|
1131
|
+
research_lab: RESEARCH_LAB_TEMPLATE,
|
|
1132
|
+
software_dev: SOFTWARE_DEV_TEMPLATE
|
|
933
1133
|
};
|
|
934
1134
|
DEFAULT_FALLBACK_CHAIN = [
|
|
935
1135
|
"claude-opus-4-6",
|
|
@@ -1508,7 +1708,7 @@ import { join } from "path";
|
|
|
1508
1708
|
import { existsSync, readFileSync, writeFileSync, mkdirSync } from "fs";
|
|
1509
1709
|
function banner() {
|
|
1510
1710
|
console.log("");
|
|
1511
|
-
console.log(" \u{1F99E} ClawCompany v0.
|
|
1711
|
+
console.log(" \u{1F99E} ClawCompany v0.21.0");
|
|
1512
1712
|
console.log(" Build for OPC. Every human being is a chairman.");
|
|
1513
1713
|
console.log("");
|
|
1514
1714
|
}
|
|
@@ -1854,6 +2054,10 @@ async function initCommand() {
|
|
|
1854
2054
|
{
|
|
1855
2055
|
name: "\u{1F52C} AutoResearch Lab \u2014 5 roles, Karpathy Loop",
|
|
1856
2056
|
value: "research_lab"
|
|
2057
|
+
},
|
|
2058
|
+
{
|
|
2059
|
+
name: "\u{1F4BB} Software Dev Company \u2014 6 roles, full SOP",
|
|
2060
|
+
value: "software_dev"
|
|
1857
2061
|
}
|
|
1858
2062
|
]
|
|
1859
2063
|
});
|
package/package.json
CHANGED