baro-ai 0.39.1 → 0.40.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/cli.mjs CHANGED
@@ -8324,14 +8324,13 @@ var LevelCompletedItem = class extends BusEvent {
8324
8324
  }
8325
8325
  };
8326
8326
  var StorySpawnRequestItem = class extends BusEvent {
8327
- constructor(storyId, prompt, model, retries, timeoutSecs, appendSystemPrompt) {
8327
+ constructor(storyId, prompt, model, retries, timeoutSecs) {
8328
8328
  super();
8329
8329
  this.storyId = storyId;
8330
8330
  this.prompt = prompt;
8331
8331
  this.model = model;
8332
8332
  this.retries = retries;
8333
8333
  this.timeoutSecs = timeoutSecs;
8334
- this.appendSystemPrompt = appendSystemPrompt;
8335
8334
  }
8336
8335
  type = "story_spawn_request";
8337
8336
  toJSON() {
@@ -8341,8 +8340,7 @@ var StorySpawnRequestItem = class extends BusEvent {
8341
8340
  promptLen: this.prompt.length,
8342
8341
  model: this.model,
8343
8342
  retries: this.retries,
8344
- timeoutSecs: this.timeoutSecs,
8345
- appendSystemPromptLen: this.appendSystemPrompt?.length ?? 0
8343
+ timeoutSecs: this.timeoutSecs
8346
8344
  };
8347
8345
  }
8348
8346
  };
@@ -8866,9 +8864,6 @@ var ClaudeCliParticipant = class _ClaudeCliParticipant extends BaroParticipant {
8866
8864
  if (this.options.resumeSessionId) {
8867
8865
  args.push("--resume", this.options.resumeSessionId);
8868
8866
  }
8869
- if (this.options.appendSystemPrompt && this.options.appendSystemPrompt.length > 0) {
8870
- args.push("--append-system-prompt", this.options.appendSystemPrompt);
8871
- }
8872
8867
  if (this.options.extraArgs && this.options.extraArgs.length > 0) {
8873
8868
  args.push(...this.options.extraArgs);
8874
8869
  }
@@ -9127,8 +9122,7 @@ var StoryAgent = class extends BaroParticipant {
9127
9122
  this.transition("running", `attempt ${attempt}`);
9128
9123
  const claude = new ClaudeCliParticipant(this.spec.id, {
9129
9124
  cwd: this.spec.cwd,
9130
- model: this.spec.model,
9131
- appendSystemPrompt: this.spec.appendSystemPrompt
9125
+ model: this.spec.model
9132
9126
  });
9133
9127
  this.currentClaude = claude;
9134
9128
  claude.join(this.envRef);
@@ -9488,9 +9482,7 @@ var Conductor = class extends BaroParticipant {
9488
9482
  }
9489
9483
  async requestStorySpawn(story) {
9490
9484
  const model = this.opts.overrideModel ?? story.model ?? this.opts.defaultModel;
9491
- const resolved = this.resolvePrompt(story);
9492
- let prompt = resolved.userPrompt;
9493
- const appendSystemPrompt = resolved.appendSystemPrompt;
9485
+ let prompt = this.resolvePrompt(story);
9494
9486
  if (this.opts.onBeforeStoryLaunch) {
9495
9487
  try {
9496
9488
  const extra = await this.opts.onBeforeStoryLaunch(story.id, story);
@@ -9515,8 +9507,7 @@ ${prompt}`;
9515
9507
  prompt,
9516
9508
  model,
9517
9509
  story.retries,
9518
- this.opts.timeoutSecs,
9519
- appendSystemPrompt
9510
+ this.opts.timeoutSecs
9520
9511
  )
9521
9512
  );
9522
9513
  }
@@ -9626,26 +9617,24 @@ ${prompt}`;
9626
9617
  prompt = buildDefaultStoryPrompt(story);
9627
9618
  }
9628
9619
  const doc = this.prd?.decisionDocument;
9629
- if (!doc || doc.trim().length === 0) {
9630
- return { userPrompt: prompt };
9631
- }
9632
- const trimmedDoc = doc.trim();
9633
- const headerLines = [
9634
- "## Design spec (authoritative \u2014 already decided)",
9635
- "",
9636
- "The Architect made these decisions before any story started.",
9637
- "Treat them as fixed: use these exact file paths, names,",
9638
- "schemas, API shapes, and dependency choices. Do NOT",
9639
- "improvise alternatives \u2014 your siblings are working from",
9640
- "the same spec and divergence breaks the build.",
9641
- ""
9642
- ];
9643
- if (this.opts.shareArchitectCache) {
9644
- const appendSystemPrompt = [...headerLines, trimmedDoc].join("\n");
9645
- return { userPrompt: prompt, appendSystemPrompt };
9646
- }
9647
- const header = [...headerLines, trimmedDoc, "", "---", ""].join("\n");
9648
- return { userPrompt: header + prompt };
9620
+ if (doc && doc.trim().length > 0) {
9621
+ const header = [
9622
+ "## Design spec (authoritative \u2014 already decided)",
9623
+ "",
9624
+ "The Architect made these decisions before any story started.",
9625
+ "Treat them as fixed: use these exact file paths, names,",
9626
+ "schemas, API shapes, and dependency choices. Do NOT",
9627
+ "improvise alternatives \u2014 your siblings are working from",
9628
+ "the same spec and divergence breaks the build.",
9629
+ "",
9630
+ doc.trim(),
9631
+ "",
9632
+ "---",
9633
+ ""
9634
+ ].join("\n");
9635
+ prompt = header + prompt;
9636
+ }
9637
+ return prompt;
9649
9638
  }
9650
9639
  emit(event) {
9651
9640
  this.envRef?.deliverBusEvent(this, event);
@@ -11695,8 +11684,7 @@ var StoryFactory = class extends BaroParticipant {
11695
11684
  cwd: this.opts.cwd,
11696
11685
  model: claudeModel,
11697
11686
  retries: req.retries,
11698
- timeoutSecs: req.timeoutSecs,
11699
- appendSystemPrompt: req.appendSystemPrompt
11687
+ timeoutSecs: req.timeoutSecs
11700
11688
  });
11701
11689
  agent.join(this.envRef);
11702
11690
  this.active.set(req.storyId, agent);
@@ -12126,7 +12114,6 @@ async function orchestrate(config) {
12126
12114
  overrideModel: config.overrideModel ?? void 0,
12127
12115
  defaultModel: config.defaultModel ?? "opus",
12128
12116
  intraLevelDelaySecs: config.intraLevelDelaySecs,
12129
- shareArchitectCache: config.shareArchitectCache ?? false,
12130
12117
  onRunStart: useGit ? async (prd) => {
12131
12118
  baseSha = await getHeadSha(config.cwd);
12132
12119
  if (prd.branchName) {
@@ -12414,7 +12401,6 @@ function parseArgs(argv) {
12414
12401
  withSurgeon: false,
12415
12402
  surgeonUseLlm: false,
12416
12403
  llm: "claude",
12417
- shareArchitectCache: false,
12418
12404
  help: false
12419
12405
  };
12420
12406
  for (let i = 0; i < argv.length; i++) {
@@ -12488,9 +12474,6 @@ function parseArgs(argv) {
12488
12474
  args.llm = v;
12489
12475
  break;
12490
12476
  }
12491
- case "--share-architect-cache":
12492
- args.shareArchitectCache = true;
12493
- break;
12494
12477
  default:
12495
12478
  process.stderr.write(`[cli] unknown flag: ${a}
12496
12479
  `);
@@ -12570,8 +12553,7 @@ async function main() {
12570
12553
  surgeonModel: args.surgeonModel,
12571
12554
  intraLevelDelaySecs: args.intraLevelDelaySecs,
12572
12555
  llm: args.llm,
12573
- storyModel: args.storyModel,
12574
- shareArchitectCache: args.shareArchitectCache
12556
+ storyModel: args.storyModel
12575
12557
  };
12576
12558
  if (args.llm === "openai" && !process.env.OPENAI_API_KEY) {
12577
12559
  process.stderr.write(