chatroom-cli 1.149.0 → 1.149.1

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 CHANGED
@@ -71789,8 +71789,21 @@ var init_planner_architect_chat = __esm(() => {
71789
71789
  });
71790
71790
 
71791
71791
  // ../../services/backend/prompts/teams/builder-delegation-handoff-templates.ts
71792
+ function getBatchingFragments(batching) {
71793
+ const roundGuidance = batching ? "A builder round trip is slow — implement, commit, verify. Group phases when one verification pass covers them, and land a risky or contract-changing phase alone. You decide the grouping. In the brief body, keep only the `## Verification scope` line that applies: `round-final` for the round's final brief, `focused` for the others." : "Keep one slice ≈ one focused review surface. Delegate slices incrementally — one at a time, not all at once.";
71794
+ const endToEndRequirement = batching ? "- Include at least one end-to-end check **on the round's final brief**. Earlier briefs need focused evidence only; the round as a whole must be end-to-end verified." : "- Include at least one check that the feature is **verified end-to-end**. Unit tests alone are insufficient for new features.";
71795
+ const verificationScopeSection = batching ? [
71796
+ "## Verification scope",
71797
+ "`focused` — run the tests that touch this brief's files.",
71798
+ "`round-final` — run the full unit suite, typecheck, lint, and the e2e specs this round affects.",
71799
+ "",
71800
+ ""
71801
+ ].join(`
71802
+ `) : "";
71803
+ return { roundGuidance, endToEndRequirement, verificationScopeSection };
71804
+ }
71792
71805
  function getBuilderDelegationBriefTemplate(options) {
71793
- const { delegatorRole, gatesOwner } = options;
71806
+ const { delegatorRole, gatesOwner, batching = false } = options;
71794
71807
  const prelude = gatesOwner === "self" ? `**Before you delegate:** if this slice introduces anything not yet grounded in the repository (a new library, API, external platform behavior, or an unresolved choice that depends on missing facts), hand off to \`researcher\` first and delegate only after its brief returns. Skip this when the \`researcher\` template's skip condition applies. The \`researcher\` handoff template defines the criteria.
71795
71808
 
71796
71809
  **Bug fixes:** if this slice fixes a reported bug, delegate only after a \`triage\` report for that bug has returned, and build the brief from its root cause and proposed fix. The \`triage\` handoff template defines the investigation.
@@ -71798,6 +71811,7 @@ function getBuilderDelegationBriefTemplate(options) {
71798
71811
  **Division of labor:** For backend contract, API, or schema/persistence changes, the architect designs first and you delegate only after its design returns. You (${delegatorRole}) own slicing and sequencing of builder work. The UI/UX engineer owns UI/UX design. Include its target markup, classes, styles, and screen and flow drawings in UI implementation briefs; the builder implements the components.` : `**Before you delegate:** the \`${gatesOwner}\` clears research, triage, architecture, UI/UX, and asset gates before work reaches you. If a slice depends on a fact, design decision, or bug diagnosis that the work package does not settle, hand back to \`${gatesOwner}\` with the open question instead of guessing. Do not hand off to \`researcher\`, \`triage\`, \`architect\`, or any other specialist yourself.
71799
71812
 
71800
71813
  **Division of labor:** You (${delegatorRole}) own turning the work package into file-level builder slices and sequencing them. Copy any UI/UX target markup, classes, styles, and drawings from the work package into UI implementation briefs; the builder implements the components.`;
71814
+ const { roundGuidance, endToEndRequirement, verificationScopeSection } = getBatchingFragments(batching);
71801
71815
  return `${getDelegationBriefIntro()}
71802
71816
 
71803
71817
  ${prelude}
@@ -71806,7 +71820,7 @@ ${prelude}
71806
71820
 
71807
71821
  **Test seams:** Fill \`## Test seams\` in the brief body for each behavior the slice changes. See the \`test-seam\` glossary term for what a seam is.
71808
71822
 
71809
- Guidance for you (not part of the message): Keep one slice ≈ one focused review surface. Delegate slices incrementally — one at a time, not all at once.
71823
+ Guidance for you (not part of the message): ${roundGuidance}
71810
71824
 
71811
71825
  \`\`\`\`markdown
71812
71826
  ## Summary
@@ -71858,14 +71872,14 @@ Cross-file types, interfaces, or patterns that apply beyond a single file. Omit
71858
71872
 
71859
71873
  ## Requirements (acceptance criteria)
71860
71874
  - <verifiable outcome the builder can self-check>
71861
- - Include at least one check that the feature is **verified end-to-end**. Unit tests alone are insufficient for new features.
71875
+ ${endToEndRequirement}
71862
71876
 
71863
71877
  ## Test seams
71864
71878
  - <behavior>: seam <public interface or port>; catches <what>; misses <what>
71865
71879
  - or: no test seam — <reason>
71866
71880
  - For each named seam: write a failing test first, then make it pass (red-green). If the seam is \`no test seam\`, delete this line.
71867
71881
 
71868
- ## What to avoid
71882
+ ${verificationScopeSection}## What to avoid
71869
71883
  - <anti-patterns, recurring mistakes, or scope creep for this slice — be explicit>
71870
71884
  - Do not test private methods or mock internal collaborators. A test that breaks on refactor while behavior is unchanged is wrong.
71871
71885
  - Do not derive expected values by re-running the code's own formula. Take them from a known-good literal, a worked example, or the spec.
@@ -73469,14 +73483,13 @@ var init_command3 = __esm(() => {
73469
73483
 
73470
73484
  // ../../services/backend/prompts/teams/trio/handoff-templates/coordinator-specifier-code.ts
73471
73485
  function getCoordinatorSpecifierCodeTemplate(query) {
73472
- const readPhaseCommand = planReadCommand({
73486
+ const readPlanCommand = planReadCommand({
73473
73487
  cliEnvPrefix: query.cliEnvPrefix ?? "",
73474
73488
  chatroomId: query.chatroomId,
73475
73489
  role: "specifier",
73476
- planId: "<planId>",
73477
- phase: "<Pn>"
73490
+ planId: "<planId>"
73478
73491
  });
73479
- return `Instructions (not part of the message): Delegate ONE work package to the \`specifier\`. The specifier plans the package as file-level builder slices, drives the builder through ONE slice, and hands a slice report back to you that names the slices still to do. The first package for a request carries \`Plan ID: None — first pass: publish the plan\`; the specifier publishes the phased plan and builds its first phase. Every later package names the phase to build under \`## Plan reference\` instead of restating the plan. Clear every required gate first (researcher, triage, architect, uiux-engineer, game-asset-designer) and include the decisions from their briefs, citing message ids — the specifier cannot contact those roles. Do not write file-level code instructions yourself; state outcomes, constraints, and acceptance criteria. Each package starts the specifier in a fresh session: include everything it needs, or name the message ids it must read with \`chatroom messages download\`.
73492
+ return `Instructions (not part of the message): Delegate one work package to the \`specifier\`. State the outcome, the user's requirements and constraints, the specialist decisions, the delivery expectations, and what the plan has already delivered. The specifier plans the slices, decides which phases it delegates in this round, drives the builder through them, and reports back. Builder rounds are slow — it may be a while before you hear back. Do not size its rounds or write file-level code instructions. Clear every required gate first (researcher, triage, architect, uiux-engineer, game-asset-designer) and include the decisions from their briefs, citing message ids — the specifier cannot contact those roles. Each package starts the specifier in a fresh session: include everything it needs, or name the message ids it must read with \`chatroom messages download\`.
73480
73493
 
73481
73494
  ${getDelegationBriefIntro()}
73482
73495
 
@@ -73500,8 +73513,8 @@ ${getFileReferenceGuidanceComment()}
73500
73513
 
73501
73514
  ## Plan reference
73502
73515
  Plan ID: <planId>, or \`None — first pass: publish the plan\`
73503
- Phase: <Pn>, or \`None — first pass: publish the plan\`
73504
- When \`Phase\` names a phase, read it before you brief the builder: \`${readPhaseCommand}\`
73516
+ Delivered so far: <phases the plan already landed and anything left open; or \`Nothing yet.\`>
73517
+ Read the plan when useful: \`${readPlanCommand}\`
73505
73518
 
73506
73519
  ## Rework findings (prior round)
73507
73520
  <message id of the specifier, reviewer, or verifier report and the blocking findings to fix (paste each with file and line where known); or \`None.\`>
@@ -73513,7 +73526,7 @@ When \`Phase\` names a phase, read it before you brief the builder: \`${readPhas
73513
73526
  <commit, branch, push, and PR expectations from the user; or \`None stated.\`>
73514
73527
 
73515
73528
  ## History pointers
73516
- <message ids or a \`--since-message-id\` anchor the specifier should download for context, including the prior slice report when this package continues a slice plan; or \`None.\`>
73529
+ <message ids or a \`--since-message-id\` anchor the specifier should download for context, including the prior round report when this package continues a plan; or \`None.\`>
73517
73530
  \`\`\``;
73518
73531
  }
73519
73532
  var init_coordinator_specifier_code = __esm(() => {
@@ -73806,7 +73819,8 @@ var init_reviewer2 = __esm(() => {
73806
73819
  function getSpecifierBuilderCodeTemplate(_query) {
73807
73820
  return getBuilderDelegationBriefTemplate({
73808
73821
  delegatorRole: "specifier",
73809
- gatesOwner: "coordinator"
73822
+ gatesOwner: "coordinator",
73823
+ batching: true
73810
73824
  });
73811
73825
  }
73812
73826
  var init_specifier_builder_code = __esm(() => {
@@ -73822,12 +73836,12 @@ var init_specifier_builder_chat = __esm(() => {
73822
73836
  function getSpecifierCoordinatorChatTemplate(_query) {
73823
73837
  return `Instructions (not part of the message): chat response for the coordinator —
73824
73838
  \`\`\`markdown
73825
- <write only the concise status the coordinator needs: what this slice delivered, the slices still to do, blockers, and decisions it must make; do not add handoff XML sections, proofs, or report headings>
73839
+ <write only the concise status the coordinator needs: what this round delivered, what the plan still has, blockers, and decisions it must make; do not add handoff XML sections, proofs, or report headings>
73826
73840
 
73827
73841
  Plan reference:
73828
73842
  Plan ID: <planId> (newly published | unchanged | superseded by <planId>)
73829
- Phases delivered: <P1, …, Pn>
73830
- Next phase: <Pn, or None — plan complete>
73843
+ Phases delivered so far: <P1, …, Pn>
73844
+ What remains: <phases not yet delivered, or None — plan complete>
73831
73845
  \`\`\``;
73832
73846
  }
73833
73847
 
@@ -73837,7 +73851,7 @@ function getSpecifierCoordinatorCodeTemplate(query) {
73837
73851
 
73838
73852
  \`\`\`markdown
73839
73853
  ## Summary
73840
- <what this slice delivered, or why it stopped, in plain terms; say which slice of the package this report covers>
73854
+ <what this round delivered, and why the round ended where it did, in plain terms>
73841
73855
 
73842
73856
  ## Template Disclosure Confirmation
73843
73857
  - [ ] I confirm that I have seen this template at the start of this work package, before driving the builder
@@ -73848,25 +73862,28 @@ ${getRoleGuidanceDisclosureBlock({
73848
73862
  })}
73849
73863
 
73850
73864
  ## What exists today
73851
- ${getHandoffNotApplicableSectionComment("Describe current state after this slice")}
73852
- <current state after this slice: what the user can now do, what is in place, how the system behaves>
73865
+ ${getHandoffNotApplicableSectionComment("Describe current state after this round")}
73866
+ <current state after this round: what the user can now do, what is in place, how the system behaves>
73867
+
73868
+ ## What this round delivered
73869
+ <one line per phase: phase id and title, builder handoff message id, commits, files changed, rework rounds>
73853
73870
 
73854
- ## Slice delivered
73855
- <the one builder slice this report covers: builder handoff message id, commits, files changed, rework rounds>
73871
+ ## Verification run
73872
+ <what ran at which stage: focused tests per phase, full suite / typecheck / lint / e2e at the round's end, with the command and result; and anything that did not run, and why (blocked or early stop)>
73856
73873
 
73857
- ## Slices still to do
73858
- <the remaining slices of this work package, in build order, each with its goal and the files it touches; or \`None — the package is complete.\`>
73874
+ ## What the plan still has
73875
+ <a reminder for the next round, not an assignment: the phases not yet delivered, in plan order, each with its title; or \`None — the plan is complete.\`>
73859
73876
 
73860
73877
  ## Plan reference
73861
73878
  Plan ID: <planId> (newly published | unchanged | superseded by <planId>)
73862
- Phases delivered: <P1, …, Pn>
73863
- Next phase: <Pn, or None — plan complete>
73879
+ Phases delivered so far: <P1, …, Pn>
73880
+ What remains: <the phases not yet delivered, or \`None — plan complete\`>
73864
73881
 
73865
73882
  ${getHandoffQualityPrinciplesSectionBlock("work")}
73866
73883
 
73867
73884
  ## Proof of Completion
73868
73885
  ${getFileReferenceProofOfCompletionExample()}
73869
- <for each acceptance criterion in the work package: met / not met / left to a remaining slice, with evidence (test names and output, commands run, commits)>
73886
+ <for each acceptance criterion in the work package: met / not met / left to a later round, with evidence (test names and output, commands run, commits)>
73870
73887
 
73871
73888
  ## Code Change Verification
73872
73889
  ${CODE_CHANGE_VERIFICATION_CONFIRMATION}
@@ -123650,4 +123667,4 @@ program2.hook("preAction", async (_thisCommand, actionCommand) => {
123650
123667
  });
123651
123668
  program2.parse();
123652
123669
 
123653
- //# debugId=31A28C453A0672B464756E2164756E21
123670
+ //# debugId=4DFD5C63CD73CF0C64756E2164756E21