majlis 0.3.1 → 0.3.2

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/cli.js +24 -5
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -522,13 +522,29 @@ Before building:
522
522
  3. Check docs/classification/ for problem taxonomy
523
523
  4. Check docs/experiments/ for prior work
524
524
 
525
- During building:
526
- - Create branch: exp/NNN-description
527
- - Create experiment log from template
525
+ ## Scope Constraint (CRITICAL)
526
+
527
+ You get ONE attempt per cycle. Your job is:
528
+ 1. Read and diagnose \u2014 understand the problem thoroughly
529
+ 2. Form ONE hypothesis about what to fix
530
+ 3. Implement ONE focused change (not a multi-step debug session)
531
+ 4. Run the benchmark ONCE to see the result
532
+ 5. Document what you did, what happened, and what you think the next step should be
533
+ 6. STOP
534
+
535
+ Do NOT iterate. Do NOT try multiple approaches. Do NOT debug your own fix.
536
+ If your change doesn't work, document why and let the cycle continue \u2014
537
+ the adversary, critic, and verifier will help diagnose what went wrong.
538
+ The cycle will come back to you with their insights.
539
+
540
+ If you find yourself wanting to "try one more thing," that's the signal to stop
541
+ and write up what you learned. The other agents exist precisely for this reason.
542
+
543
+ ## During building:
528
544
  - Tag EVERY decision: proof / test / strong-consensus / consensus / analogy / judgment
529
545
  - When making judgment-level decisions, state: "This is judgment \u2014 reasoning without precedent"
530
546
  - Run baseline metrics BEFORE making changes
531
- - Run comparison metrics AFTER making changes
547
+ - Run comparison metrics AFTER making changes (once)
532
548
 
533
549
  You may NOT verify your own work or mark your own decisions as proven.
534
550
  Output your decisions in structured format so they can be recorded in the database.
@@ -2323,7 +2339,7 @@ async function runQuery(opts) {
2323
2339
  cwd: opts.cwd,
2324
2340
  permissionMode: "bypassPermissions",
2325
2341
  allowDangerouslySkipPermissions: true,
2326
- maxTurns: 50,
2342
+ maxTurns: 30,
2327
2343
  persistSession: false,
2328
2344
  settingSources: ["project"]
2329
2345
  }
@@ -2363,6 +2379,9 @@ async function runQuery(opts) {
2363
2379
  } else if (message.type === "result") {
2364
2380
  if (message.subtype === "success") {
2365
2381
  costUsd = message.total_cost_usd;
2382
+ } else if (message.subtype === "error_max_turns") {
2383
+ costUsd = "total_cost_usd" in message ? message.total_cost_usd : 0;
2384
+ console.warn(`[majlis] Agent hit max turns (${turnCount}). Returning partial output.`);
2366
2385
  } else {
2367
2386
  const errors = "errors" in message ? message.errors?.join("; ") ?? "Unknown error" : "Unknown error";
2368
2387
  throw new Error(`Agent query failed (${message.subtype}): ${errors}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "majlis",
3
- "version": "0.3.1",
3
+ "version": "0.3.2",
4
4
  "description": "Multi-agent workflow CLI for structured doubt, independent verification, and compressed knowledge",
5
5
  "bin": {
6
6
  "majlis": "./dist/cli.js"