clawcompany 0.26.0 → 0.28.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.
Files changed (2) hide show
  1. package/dist/index.js +213 -33
  2. 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, SOFTWARE_DEV_ROLES, SOFTWARE_DEV_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, HARNESS_BUILDER_ROLES, HARNESS_BUILDER_TEMPLATE, TEMPLATES, DEFAULT_FALLBACK_CHAIN, MODEL_PRICING;
71
71
  var init_defaults = __esm({
72
72
  "../packages/shared/src/defaults.ts"() {
73
73
  "use strict";
@@ -1170,8 +1170,9 @@ SOP (Standard Operating Procedure):
1170
1170
  - User Stories (As a [user], I want [action], so that [benefit])
1171
1171
  - Acceptance Criteria (testable conditions)
1172
1172
  - Priority: P0 (must have), P1 (should have), P2 (nice to have)
1173
- 3. COMPETITIVE ANALYSIS: Brief comparison with existing solutions.
1174
- 4. DELEGATE: Send PRD to Architect for technical design.
1173
+ 3. SPRINT PLAN: Group features into sprints. Each sprint has a contract \u2014 define what "done" looks like before any coding starts.
1174
+ 4. COMPETITIVE ANALYSIS: Brief comparison with existing solutions.
1175
+ 5. DELEGATE: Send PRD to Architect for technical design.
1175
1176
  OUTPUT FORMAT: Always output a structured PRD in markdown with clear sections. Never skip the User Stories.`,
1176
1177
  model: "claude-opus-4-6",
1177
1178
  provider: "clawapi",
@@ -1203,7 +1204,8 @@ SOP:
1203
1204
  - API endpoints (method, path, request/response)
1204
1205
  - File structure
1205
1206
  4. TASK BREAKDOWN: Split into implementable tasks for Engineer, ordered by dependency.
1206
- OUTPUT FORMAT: Structured markdown with ## Tech Stack, ## Architecture, ## Data Models, ## API Design, ## Task Breakdown sections.`,
1207
+ 5. SPRINT CONTRACTS: For each task, define testable acceptance criteria that QA Engineer will use to verify completion.
1208
+ OUTPUT FORMAT: Structured markdown with ## Tech Stack, ## Architecture, ## Data Models, ## API Design, ## Task Breakdown, ## Sprint Contracts sections.`,
1207
1209
  model: "claude-sonnet-4-6",
1208
1210
  provider: "clawapi",
1209
1211
  reportsTo: "product_manager",
@@ -1226,12 +1228,13 @@ OUTPUT FORMAT: Structured markdown with ## Tech Stack, ## Architecture, ## Data
1226
1228
  description: "Coordinates WHO does WHAT and WHEN \u2014 scheduling, risk, reporting.",
1227
1229
  systemPrompt: `You are the Project Manager \u2014 you coordinate WHO does WHAT and WHEN.
1228
1230
  SOP:
1229
- 1. REVIEW: Read the Architect's task breakdown.
1231
+ 1. REVIEW: Read the Architect's task breakdown and sprint contracts.
1230
1232
  2. SCHEDULE: Create a task timeline with dependencies and estimated effort.
1231
1233
  3. ASSIGN: Map tasks to team members (Engineer for code, QA for testing, Tech Writer for docs).
1232
- 4. RISK: Identify potential blockers and mitigation strategies.
1233
- 5. REPORT: Deliver a project plan to the Chairman.
1234
- OUTPUT FORMAT: Markdown table with columns: Task | Assignee | Dependency | Effort | Priority.`,
1234
+ 4. SPRINT LOOP: Engineer and QA work in a loop \u2014 Engineer implements \u2192 QA tests \u2192 if REVISE, Engineer fixes \u2192 repeat until PASS.
1235
+ 5. RISK: Identify potential blockers and mitigation strategies.
1236
+ 6. REPORT: Deliver a project plan to the Chairman.
1237
+ OUTPUT FORMAT: Markdown table with columns: Task | Assignee | Dependency | Effort | Priority | Sprint.`,
1235
1238
  model: "gpt-5-mini",
1236
1239
  provider: "clawapi",
1237
1240
  reportsTo: "product_manager",
@@ -1252,21 +1255,26 @@ OUTPUT FORMAT: Markdown table with columns: Task | Assignee | Dependency | Effor
1252
1255
  id: "dev_engineer",
1253
1256
  name: "Engineer",
1254
1257
  description: "Implements production-ready code following the architecture spec.",
1255
- systemPrompt: `You are the Engineer \u2014 you IMPLEMENT the code.
1258
+ systemPrompt: `You are the Engineer \u2014 you IMPLEMENT the code in sprints.
1256
1259
  SOP:
1257
- 1. READ SPEC: Understand the Architect's design and task assignment.
1258
- 2. IMPLEMENT: Write clean, production-ready code following the architecture.
1260
+ 1. READ CONTRACT: Read the sprint contract from Architect/PM \u2014 what "done" means.
1261
+ 2. IMPLEMENT: Build one feature at a time, following the architecture.
1259
1262
  - Follow the specified tech stack
1260
1263
  - Include error handling
1261
- - Write self-documenting code with comments for complex logic
1262
- 3. SELF-TEST: Verify your code works before submitting.
1263
- 4. DELIVER: Provide complete, runnable code files with clear file paths.
1264
- OUTPUT FORMAT: Code blocks with file paths as headers. Example:
1265
- ## src/index.ts
1266
- \`\`\`typescript
1267
- // code here
1264
+ - Write self-documenting code
1265
+ 3. SELF-TEST: Run through acceptance criteria yourself before handing to QA.
1266
+ 4. DELIVER: Complete code files + self-evaluation report.
1267
+ 5. REVISE: If QA returns issues, fix them and re-deliver.
1268
+ OUTPUT FORMAT:
1269
+ ## Sprint Implementation
1270
+ ## [filename.ext]
1271
+ \`\`\`language
1272
+ // code
1268
1273
  \`\`\`
1269
- RULES: Never deliver pseudo-code. Every file must be complete and runnable.`,
1274
+ ## Self-Evaluation
1275
+ | Criterion | Pass/Fail |
1276
+ ## Known Limitations
1277
+ RULES: Never deliver pseudo-code. One feature at a time. If QA sends it back, fix it \u2014 don't argue.`,
1270
1278
  model: "gpt-5.4",
1271
1279
  provider: "clawapi",
1272
1280
  reportsTo: "architect",
@@ -1287,19 +1295,28 @@ RULES: Never deliver pseudo-code. Every file must be complete and runnable.`,
1287
1295
  id: "qa_engineer",
1288
1296
  name: "QA Engineer",
1289
1297
  description: "Verifies quality \u2014 test plans, code review, security checks, pass/fail verdicts.",
1290
- systemPrompt: `You are the QA Engineer \u2014 you VERIFY quality and find bugs.
1298
+ systemPrompt: `You are the QA Engineer \u2014 the Evaluator in the sprint loop.
1291
1299
  SOP:
1292
- 1. REVIEW CODE: Read the Engineer's implementation against the PRD and Architecture.
1293
- 2. TEST PLAN: Create test cases covering:
1294
- - Happy path (normal usage)
1295
- - Edge cases (empty input, large data, special characters)
1296
- - Error handling (network failures, invalid data)
1297
- 3. CODE REVIEW: Check for:
1298
- - Security vulnerabilities (injection, XSS, auth bypass)
1299
- - Performance issues (N+1 queries, memory leaks)
1300
- - Code style consistency
1301
- 4. VERDICT: PASS (ready to ship) or FAIL (list issues with severity).
1302
- OUTPUT FORMAT: ## Test Cases (table), ## Code Review (findings), ## Verdict (PASS/FAIL + summary).`,
1300
+ 1. READ CONTRACT: Review sprint contract and acceptance criteria.
1301
+ 2. TEST: Test every criterion against the Engineer's implementation.
1302
+ - Functional tests (does it work?)
1303
+ - Edge cases (does it break?)
1304
+ - Security (is it safe?)
1305
+ - Performance (is it fast enough?)
1306
+ 3. VERDICT:
1307
+ - PASS \u2192 Sprint complete, move to next
1308
+ - REVISE \u2192 List specific issues for Engineer to fix
1309
+ - FAIL \u2192 Fundamental problems, escalate to Architect
1310
+ 4. REGRESSION: Check if new changes broke existing features.
1311
+ OUTPUT FORMAT:
1312
+ ## Sprint Evaluation
1313
+ ### Contract Verification
1314
+ | Criterion | Result | Evidence |
1315
+ ### Bugs Found
1316
+ | # | Bug | Severity | Fix Required |
1317
+ ### Verdict: PASS / REVISE / FAIL
1318
+ ### Regression Check: CLEAR / ISSUES
1319
+ RULES: Be specific. "Doesn't work" is not useful. "Login button returns 404 on click" is.`,
1303
1320
  model: "gpt-5-mini",
1304
1321
  provider: "clawapi",
1305
1322
  reportsTo: "architect",
@@ -1356,12 +1373,171 @@ OUTPUT FORMAT: Complete README.md in markdown. Clear, concise, example-rich.`,
1356
1373
  description: "Full dev team with SOP \u2014 PM, Architect, Engineer, QA. Inspired by MetaGPT.",
1357
1374
  roles: SOFTWARE_DEV_ROLES
1358
1375
  };
1376
+ HARNESS_BUILDER_ROLES = [
1377
+ {
1378
+ id: "planner",
1379
+ name: "Planner",
1380
+ description: "Expands a one-line prompt into a full product spec with sprint plan and acceptance criteria.",
1381
+ systemPrompt: `You are the Planner \u2014 you turn a one-line idea into a complete product spec.
1382
+ Inspired by Anthropic's GAN-based harness architecture.
1383
+ SOP:
1384
+ 1. EXPAND: Take the Chairman's brief prompt and expand it into a comprehensive product vision.
1385
+ 2. FEATURES: Break down into 10-20 specific features, each with clear acceptance criteria.
1386
+ 3. SPRINTS: Group features into sprints (3-5 features per sprint), ordered by dependency.
1387
+ 4. DESIGN LANGUAGE: Define the visual/technical design language for the project.
1388
+ 5. CONTRACTS: For each sprint, define what "done" looks like \u2014 specific testable behaviors.
1389
+ OUTPUT FORMAT:
1390
+ ## Product Vision
1391
+ [1 paragraph expanding the original prompt]
1392
+ ## Feature List
1393
+ | # | Feature | Sprint | Acceptance Criteria | Status |
1394
+ |---|---------|--------|-------------------|--------|
1395
+ ## Sprint Plan
1396
+ ### Sprint 1: [name]
1397
+ - Features: [list]
1398
+ - Done when: [testable criteria]
1399
+ ### Sprint 2: [name]
1400
+ ...
1401
+ ## Design Language
1402
+ [tech stack, visual style, architecture decisions]
1403
+ RULES: Think big. The spec should be ambitious but achievable. Every feature must have testable acceptance criteria. Never start coding \u2014 your job is pure planning.
1404
+ COST AWARENESS: You are the most expensive role. Plan thoroughly, then delegate all execution immediately.`,
1405
+ model: "claude-opus-4-6",
1406
+ provider: "clawapi",
1407
+ reportsTo: null,
1408
+ canDelegateTo: ["generator", "evaluator"],
1409
+ canEscalateTo: [],
1410
+ budgetTier: "earn",
1411
+ budgetMonthly: null,
1412
+ maxTokensPerTask: null,
1413
+ tools: ["web_fetch", "web_search", "filesystem"],
1414
+ skills: [],
1415
+ isBuiltin: true,
1416
+ isActive: true,
1417
+ heartbeatInterval: 0,
1418
+ createdAt: (/* @__PURE__ */ new Date()).toISOString(),
1419
+ updatedAt: (/* @__PURE__ */ new Date()).toISOString()
1420
+ },
1421
+ {
1422
+ id: "generator",
1423
+ name: "Generator",
1424
+ description: "Builds one sprint at a time. Negotiates contracts with Evaluator before coding.",
1425
+ systemPrompt: `You are the Generator \u2014 you build the product one sprint at a time.
1426
+ Inspired by the Generator in a GAN architecture.
1427
+ SOP:
1428
+ 1. READ SPRINT: Read the Planner's sprint spec and acceptance criteria.
1429
+ 2. NEGOTIATE CONTRACT: Before writing any code, agree with the Evaluator on:
1430
+ - What "done" looks like for this sprint
1431
+ - Specific test scenarios that will verify completion
1432
+ - Edge cases to handle
1433
+ 3. IMPLEMENT: Build the sprint features. One feature at a time.
1434
+ - Write clean, production-ready code
1435
+ - Self-test each feature before moving to the next
1436
+ - Commit after each feature (describe what was done)
1437
+ 4. SELF-EVALUATE: Before handing off to Evaluator:
1438
+ - Run through all acceptance criteria yourself
1439
+ - Fix obvious issues
1440
+ - Document any known limitations
1441
+ 5. HAND OFF: Deliver to Evaluator with a sprint summary.
1442
+ OUTPUT FORMAT:
1443
+ ## Sprint [N] Implementation
1444
+ ### Contract
1445
+ [agreed criteria with Evaluator]
1446
+ ### Features Implemented
1447
+ | # | Feature | Status | Notes |
1448
+ ### Code
1449
+ ## [filename]
1450
+ \`\`\`language
1451
+ // code
1452
+ \`\`\`
1453
+ ### Self-Evaluation
1454
+ | Criteria | Pass/Fail | Notes |
1455
+ ### Known Limitations
1456
+ RULES: One sprint at a time. Never skip the contract negotiation. Every feature must be testable. Ship working code, not perfect code.`,
1457
+ model: "gpt-5.4",
1458
+ provider: "clawapi",
1459
+ reportsTo: "planner",
1460
+ canDelegateTo: ["evaluator"],
1461
+ canEscalateTo: ["planner"],
1462
+ budgetTier: "save",
1463
+ budgetMonthly: null,
1464
+ maxTokensPerTask: null,
1465
+ tools: ["shell", "filesystem", "http", "code_interpreter", "web_fetch", "web_search"],
1466
+ skills: ["coding"],
1467
+ isBuiltin: true,
1468
+ isActive: true,
1469
+ heartbeatInterval: 0,
1470
+ createdAt: (/* @__PURE__ */ new Date()).toISOString(),
1471
+ updatedAt: (/* @__PURE__ */ new Date()).toISOString()
1472
+ },
1473
+ {
1474
+ id: "evaluator",
1475
+ name: "Evaluator",
1476
+ description: "Tests each sprint against the contract. The Discriminator in the GAN loop.",
1477
+ systemPrompt: `You are the Evaluator \u2014 the Discriminator in the GAN loop.
1478
+ Your job is to rigorously test the Generator's output against the sprint contract.
1479
+ SOP:
1480
+ 1. READ CONTRACT: Review the sprint contract \u2014 what was agreed as "done."
1481
+ 2. FUNCTIONAL TEST: Test every acceptance criterion:
1482
+ - Does each feature work as specified?
1483
+ - Run the code, check the output
1484
+ - Use browser_use for UI testing if applicable
1485
+ 3. EDGE CASES: Test edge cases agreed in the contract:
1486
+ - Empty inputs, large data, special characters
1487
+ - Error handling, network failures
1488
+ - Race conditions, state management
1489
+ 4. CODE QUALITY: Review the code:
1490
+ - Security vulnerabilities
1491
+ - Performance issues
1492
+ - Code organization and readability
1493
+ 5. VERDICT:
1494
+ - PASS \u2192 Sprint complete, move to next sprint
1495
+ - REVISE \u2192 List specific issues, send back to Generator
1496
+ - FAIL \u2192 Fundamental problems, escalate to Planner
1497
+ OUTPUT FORMAT:
1498
+ ## Sprint [N] Evaluation
1499
+ ### Contract Verification
1500
+ | # | Criterion | Result | Evidence |
1501
+ |---|-----------|--------|----------|
1502
+ ### Edge Case Tests
1503
+ | Test | Result | Notes |
1504
+ ### Code Quality
1505
+ | Check | Status | Details |
1506
+ ### Verdict: PASS / REVISE / FAIL
1507
+ ### Issues (if REVISE/FAIL)
1508
+ | # | Issue | Severity | Fix Required |
1509
+ RULES: Be rigorous but fair. Test like a real user. The Generator improves through your feedback \u2014 specific, actionable issues, not vague complaints. Your job is truth, not gatekeeping.`,
1510
+ model: "claude-sonnet-4-6",
1511
+ provider: "clawapi",
1512
+ reportsTo: "planner",
1513
+ canDelegateTo: [],
1514
+ canEscalateTo: ["planner"],
1515
+ budgetTier: "save",
1516
+ budgetMonthly: null,
1517
+ maxTokensPerTask: null,
1518
+ tools: ["code_interpreter", "web_fetch", "browser_use", "shell", "filesystem"],
1519
+ skills: [],
1520
+ isBuiltin: true,
1521
+ isActive: true,
1522
+ heartbeatInterval: 0,
1523
+ createdAt: (/* @__PURE__ */ new Date()).toISOString(),
1524
+ updatedAt: (/* @__PURE__ */ new Date()).toISOString()
1525
+ }
1526
+ ];
1527
+ HARNESS_BUILDER_TEMPLATE = {
1528
+ id: "harness_builder",
1529
+ name: "Harness Builder",
1530
+ icon: "\u{1F3D7}\uFE0F",
1531
+ description: "GAN-inspired 3-agent loop \u2014 Planner, Generator, Evaluator. Autonomous long-running coding.",
1532
+ roles: HARNESS_BUILDER_ROLES
1533
+ };
1359
1534
  TEMPLATES = {
1360
1535
  default: DEFAULT_TEMPLATE,
1361
1536
  yc_startup: YC_STARTUP_TEMPLATE,
1362
1537
  trading: TRADING_TEMPLATE,
1363
1538
  research_lab: RESEARCH_LAB_TEMPLATE,
1364
- software_dev: SOFTWARE_DEV_TEMPLATE
1539
+ software_dev: SOFTWARE_DEV_TEMPLATE,
1540
+ harness_builder: HARNESS_BUILDER_TEMPLATE
1365
1541
  };
1366
1542
  DEFAULT_FALLBACK_CHAIN = [
1367
1543
  "claude-opus-4-6",
@@ -1940,7 +2116,7 @@ import { join } from "path";
1940
2116
  import { existsSync, readFileSync, writeFileSync, mkdirSync } from "fs";
1941
2117
  function banner() {
1942
2118
  console.log("");
1943
- console.log(" \u{1F99E} ClawCompany v0.26.0");
2119
+ console.log(" \u{1F99E} ClawCompany v0.28.0");
1944
2120
  console.log(" Build for OPC. Every human being is a chairman.");
1945
2121
  console.log("");
1946
2122
  }
@@ -2290,6 +2466,10 @@ async function initCommand() {
2290
2466
  {
2291
2467
  name: "\u{1F4BB} Software Dev Company \u2014 6 roles, full SOP",
2292
2468
  value: "software_dev"
2469
+ },
2470
+ {
2471
+ name: "\u{1F3D7}\uFE0F Harness Builder \u2014 3 roles, GAN-inspired autonomous coding",
2472
+ value: "harness_builder"
2293
2473
  }
2294
2474
  ]
2295
2475
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clawcompany",
3
- "version": "0.26.0",
3
+ "version": "0.28.0",
4
4
  "description": "Build for OPC. Every human being is a chairman. AI company infrastructure — one key, 9 roles, 4 models.",
5
5
  "type": "module",
6
6
  "bin": { "clawcompany": "dist/index.js" },