chatroom-cli 1.143.2 → 1.144.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
@@ -33431,6 +33431,14 @@ var init_agent_role = __esm(() => {
33431
33431
  { teamId: "trio", order: 25 }
33432
33432
  ]
33433
33433
  },
33434
+ "product-manager": {
33435
+ tags: ["ephemeral" /* Ephemeral */],
33436
+ teams: [
33437
+ { teamId: "duo", order: 15 },
33438
+ { teamId: "solo", order: 15 },
33439
+ { teamId: "trio", order: 15 }
33440
+ ]
33441
+ },
33434
33442
  verifier: {
33435
33443
  tags: ["ephemeral" /* Ephemeral */],
33436
33444
  teams: [
@@ -72558,7 +72566,7 @@ var init_team_presets = __esm(() => {
72558
72566
  duo: {
72559
72567
  structureId: TEAM_STRUCTURE_IDS.duo,
72560
72568
  name: "Duo",
72561
- description: "A planner and builder working as a pair, planner as coordinator, with optional ephemeral architect, researcher, triage, reviewer, uiux-engineer, game-asset-designer, and verifier roles",
72569
+ description: "A planner and builder working as a pair, planner as coordinator, with optional ephemeral architect, product-manager, researcher, triage, reviewer, uiux-engineer, game-asset-designer, and verifier roles",
72562
72570
  roles: getBuiltinRolesForTeam("duo"),
72563
72571
  entryPoint: "planner",
72564
72572
  handoffGraph: "advisory",
@@ -72567,7 +72575,7 @@ var init_team_presets = __esm(() => {
72567
72575
  solo: {
72568
72576
  structureId: TEAM_STRUCTURE_IDS.solo,
72569
72577
  name: "Solo",
72570
- description: "A single agent working independently, with optional ephemeral architect, triage, uiux-engineer, and verifier roles",
72578
+ description: "A single agent working independently, with optional ephemeral architect, product-manager, triage, uiux-engineer, and verifier roles",
72571
72579
  roles: getBuiltinRolesForTeam("solo"),
72572
72580
  entryPoint: "solo",
72573
72581
  handoffGraph: "advisory",
@@ -72576,7 +72584,7 @@ var init_team_presets = __esm(() => {
72576
72584
  trio: {
72577
72585
  structureId: TEAM_STRUCTURE_IDS.trio,
72578
72586
  name: "Trio",
72579
- description: "A coordinator, specifier, and builder: the coordinator owns the user conversation and routes all work, the specifier turns plans into code-level builder briefs, with optional ephemeral architect, researcher, triage, reviewer, uiux-engineer, game-asset-designer, and verifier roles",
72587
+ description: "A coordinator, specifier, and builder: the coordinator owns the user conversation and routes all work, the specifier turns plans into code-level builder briefs, with optional ephemeral architect, product-manager, researcher, triage, reviewer, uiux-engineer, game-asset-designer, and verifier roles",
72580
72588
  roles: getBuiltinRolesForTeam("trio"),
72581
72589
  entryPoint: "coordinator",
72582
72590
  handoffGraph: "enforced",
@@ -72955,7 +72963,7 @@ ${handoffCommand({
72955
72963
  function getArchitectToEntryPointHandoffTemplate(query) {
72956
72964
  const entryPoint = query.toRole;
72957
72965
  const sharedContractsHeading = `## Shared contracts (${entryPoint}-owned)`;
72958
- return `Instructions (not part of the message): Return exactly one recommended, evidence-backed design brief for the authoritative user request to \`${entryPoint}\`. This is an advisory handback: do not implement code, edit files, spawn subagents, present alternatives, or expand scope. The injected \`<handoff-templates>\` block is the authoritative structure for this handoff; complete every section in order. Use \`Not Applicable.\` only when a section is genuinely inapplicable, with no explanation or filler.
72966
+ return `Instructions (not part of the message): Return exactly one recommended, evidence-backed design brief for the authoritative user request to \`${entryPoint}\`. This is an advisory handback: do not implement code, edit files, spawn subagents, present alternatives, or expand scope. Decide every open repository technical-design decision for the development work yourself inside the one design; do not return open technical questions. List an item for the user only if it meets the escalation criteria. The injected \`<handoff-templates>\` block is the authoritative structure for this handoff; complete every section in order. Use \`Not Applicable.\` only when a section is genuinely inapplicable, with no explanation or filler.
72959
72967
 
72960
72968
  ## Summary
72961
72969
  <describe the design problem being solved, the repository/product surface where it fits, and the evidence-backed context; do not refer to hidden session text>
@@ -73010,6 +73018,7 @@ ${sharedContractsHeading}
73010
73018
  ## What to avoid
73011
73019
  - Do not implement code or edit files as the architect; this handoff is advisory only.
73012
73020
  - Do not present alternative designs, generic advice, or requirements without concrete evidence and file-level consequences.
73021
+ - Do not hand the entry point a list of open technical questions: decide those that concern repository technical design for development work in the design, with the evidence you used. Escalate only an item that meets the escalation criteria, in \`## Escalation items for the user\`.
73013
73022
  - Do not invent APIs, schema fields, query shapes, indexes, or source-of-truth locations when existing repository patterns apply.
73014
73023
  - <explicit task-specific anti-patterns, scope boundaries, and migration/source-of-truth pitfalls>
73015
73024
 
@@ -73019,6 +73028,9 @@ ${sharedContractsHeading}
73019
73028
  ## Out of scope
73020
73029
  - <explicit files, flows, behavior, or migration work the implementer must not touch>
73021
73030
 
73031
+ ## Escalation items for the user
73032
+ <only items that meet the escalation criteria: (a) the request is clearly ambiguous or insufficient, and no specialist can settle the question from the request, the code, \`memory/\`, or \`docs/\`; (b) the decision involves deletion, data loss, an irreversible migration, an externally visible or production-affecting action, or spending money. For each, give the item, why it meets the criteria, the options with the consequence of each, and a recommended default. Do not list technical choices here: decide them in the design. Write exactly \`None observed.\` if no item meets the criteria>
73033
+
73022
73034
  Instructions after the body (not part of the message): run the normal handoff command to \`${entryPoint}\` with the complete body above, then stop.
73023
73035
 
73024
73036
  \`\`\`bash
@@ -73746,6 +73758,83 @@ var init_planner_game_asset_designer_chat = __esm(() => {
73746
73758
  init_planner_game_asset_designer_code();
73747
73759
  });
73748
73760
 
73761
+ // ../../services/backend/prompts/teams/product-manager-handoff-templates.ts
73762
+ function getEntryPointToProductManagerHandoffTemplate(query) {
73763
+ const entryPoint = query.fromRole;
73764
+ return `The automatically injected \`<user-message>\` is the authoritative request. Pass the feature request in the user's words, the problem it solves and who it is for, any constraints or decisions already made, and the areas of the app it likely touches. List the domain nouns the product manager must check for existing equivalents in the repository. Ask the product manager for a specification only: do not edit files, implement code, or design the technical architecture.
73765
+
73766
+ Use this for a new, ambiguous feature request whose scope is not yet decided. Skip it for small bug fixes and for requests whose scope is already unambiguous, unless a bug fix needs a scope decision.
73767
+
73768
+ After completing the specification, the product manager must return it to \`${entryPoint}\` with the normal handoff command.
73769
+
73770
+ \`\`\`bash
73771
+ ${handoffCommand({
73772
+ chatroomId: "<chatroom-id>",
73773
+ role: entryPoint,
73774
+ nextRole: "product-manager",
73775
+ cliEnvPrefix: ""
73776
+ })}
73777
+ \`\`\``;
73778
+ }
73779
+ function getProductManagerToEntryPointHandoffTemplate(query) {
73780
+ const entryPoint = query.toRole;
73781
+ return `Instructions (not part of the message): Return a complete product specification for the authoritative feature request. The product manager is advisory and read-only: do not edit files, build, or implement. Base every consistency claim on the existing app behavior you inspected, citing concrete repository paths and symbols, docs, or decision records under \`memory/\`. Decide every development-scope product decision yourself with a recommended default and rationale; return non-development product questions (copy, pricing, opinions, general product talk) to \`${entryPoint}\` in \`## Summary\`; list a question for the user only if it meets the escalation criteria. Begin with the \`## Summary\` section, then use the remaining sections below in order. Use \`###\` for sub-items within a section.
73782
+
73783
+ ## Summary
73784
+ <state the feature, the recommended scope in two to four sentences, and whether any escalation item blocks planning>
73785
+
73786
+ ## Problem statement
73787
+ <the problem the user is trying to solve, who is affected, and the outcome they want, recovered from the request and relevant history>
73788
+
73789
+ ## User stories
73790
+ <one \`###\` per story in the form "As a <user>, I want <capability>, so that <outcome>", each followed by a bullet list of testable acceptance criteria>
73791
+
73792
+ ## In scope
73793
+ <every capability, behavior, and state the feature includes, including the states needed to make it feature complete (loading, empty, error, permissions, and migration of existing data where they apply)>
73794
+
73795
+ ## Out of scope
73796
+ <each excluded or deferred item with a one-line reason; write exactly \`None observed.\` if nothing is excluded>
73797
+
73798
+ ## Consistency with existing functionality
73799
+ <the existing capabilities the feature must stay consistent with, with concrete paths and symbols as evidence; where the feature extends or conflicts with existing behavior, say so and record each conflict as a product decision under \`## Product decisions made\`; the gaps the feature would leave if the proposed scope is not accepted>
73800
+
73801
+ ## UI and UX review
73802
+ <if the feature has any UI surface (a new screen, panel, flow, interaction, or visible state), state that \`${entryPoint}\` must get a \`uiux-engineer\` design before any UI work on this feature, and name each surface; do not design layout yourself. If the feature has no UI surface, write exactly \`No UI surface: no uiux-engineer design needed.\`>
73803
+
73804
+ ## Product decisions made
73805
+ <one \`###\` per development-scope product decision you made (scope, user stories, in and out of scope, consistency with existing behavior), each with the options considered, the recommended default you chose, and a one-line rationale; write exactly \`None observed.\` if you made none>
73806
+
73807
+ ## Open questions for the user
73808
+ <only items that meet the escalation criteria: (a) the request is clearly ambiguous or insufficient, and no specialist can settle the question from the request, the code, \`memory/\`, or \`docs/\`; (b) the decision involves deletion, data loss, an irreversible migration, an externally visible or production-affecting action, or spending money. For each, give the options, the consequence of each, and a recommended default. Do not list ordinary product choices here: decide them under \`## Product decisions made\`. Write exactly \`None observed.\` if no item meets the criteria>
73809
+
73810
+ Instructions after the body (not part of the message): run the normal handoff command to \`${entryPoint}\` with the complete body above, then stop.
73811
+
73812
+ \`\`\`bash
73813
+ ${handoffCommand({
73814
+ chatroomId: "<chatroom-id>",
73815
+ role: "product-manager",
73816
+ nextRole: entryPoint,
73817
+ cliEnvPrefix: ""
73818
+ })}
73819
+ \`\`\``;
73820
+ }
73821
+ var init_product_manager_handoff_templates = __esm(() => {
73822
+ init_command2();
73823
+ });
73824
+
73825
+ // ../../services/backend/prompts/teams/duo/handoff-templates/planner-product-manager-code.ts
73826
+ function getPlannerProductManagerCodeTemplate(query) {
73827
+ return getEntryPointToProductManagerHandoffTemplate(query);
73828
+ }
73829
+ var init_planner_product_manager_code = __esm(() => {
73830
+ init_product_manager_handoff_templates();
73831
+ });
73832
+
73833
+ // ../../services/backend/prompts/teams/duo/handoff-templates/planner-product-manager-chat.ts
73834
+ var init_planner_product_manager_chat = __esm(() => {
73835
+ init_planner_product_manager_code();
73836
+ });
73837
+
73749
73838
  // ../../services/backend/prompts/teams/researcher-handoff-templates.ts
73750
73839
  function getEntryPointToResearcherHandoffTemplate(query) {
73751
73840
  const entryPoint = query.fromRole;
@@ -74440,6 +74529,8 @@ var init_planner = __esm(() => {
74440
74529
  init_planner_builder_code();
74441
74530
  init_planner_game_asset_designer_chat();
74442
74531
  init_planner_game_asset_designer_code();
74532
+ init_planner_product_manager_chat();
74533
+ init_planner_product_manager_code();
74443
74534
  init_planner_researcher_chat();
74444
74535
  init_planner_researcher_code();
74445
74536
  init_planner_reviewer_chat();
@@ -74459,6 +74550,7 @@ var init_planner = __esm(() => {
74459
74550
  "user",
74460
74551
  "builder",
74461
74552
  "architect",
74553
+ "product-manager",
74462
74554
  "uiux-engineer",
74463
74555
  "triage",
74464
74556
  "researcher",
@@ -74470,6 +74562,7 @@ var init_planner = __esm(() => {
74470
74562
  "user",
74471
74563
  "builder",
74472
74564
  "architect",
74565
+ "product-manager",
74473
74566
  "uiux-engineer",
74474
74567
  "triage",
74475
74568
  "researcher",
@@ -74486,6 +74579,10 @@ var init_planner = __esm(() => {
74486
74579
  chat: getPlannerArchitectCodeTemplate,
74487
74580
  code: getPlannerArchitectCodeTemplate
74488
74581
  }),
74582
+ "product-manager": handoffTemplateByMode({
74583
+ chat: getPlannerProductManagerCodeTemplate,
74584
+ code: getPlannerProductManagerCodeTemplate
74585
+ }),
74489
74586
  "uiux-engineer": handoffTemplateByMode({
74490
74587
  chat: getPlannerUiuxEngineerCodeTemplate,
74491
74588
  code: getPlannerUiuxEngineerCodeTemplate
@@ -74518,6 +74615,38 @@ var init_planner = __esm(() => {
74518
74615
  };
74519
74616
  });
74520
74617
 
74618
+ // ../../services/backend/prompts/teams/duo/handoff-templates/product-manager-planner-code.ts
74619
+ function getProductManagerPlannerCodeTemplate(query) {
74620
+ return getProductManagerToEntryPointHandoffTemplate(query);
74621
+ }
74622
+ var init_product_manager_planner_code = __esm(() => {
74623
+ init_product_manager_handoff_templates();
74624
+ });
74625
+
74626
+ // ../../services/backend/prompts/teams/duo/handoff-templates/product-manager-planner-chat.ts
74627
+ var init_product_manager_planner_chat = __esm(() => {
74628
+ init_product_manager_planner_code();
74629
+ });
74630
+
74631
+ // ../../services/backend/prompts/teams/duo/handoff-templates/product-manager.ts
74632
+ var duoProductManagerHandoffContract;
74633
+ var init_product_manager = __esm(() => {
74634
+ init_product_manager_planner_chat();
74635
+ init_product_manager_planner_code();
74636
+ init_contracts();
74637
+ duoProductManagerHandoffContract = {
74638
+ role: "product-manager",
74639
+ receivesFrom: ["planner"],
74640
+ returnsTo: ["planner"],
74641
+ outboundTemplates: {
74642
+ planner: handoffTemplateByMode({
74643
+ chat: getProductManagerPlannerCodeTemplate,
74644
+ code: getProductManagerPlannerCodeTemplate
74645
+ })
74646
+ }
74647
+ };
74648
+ });
74649
+
74521
74650
  // ../../services/backend/prompts/teams/duo/handoff-templates/researcher-planner-code.ts
74522
74651
  function getResearcherPlannerCodeTemplate(query) {
74523
74652
  return getResearcherToEntryPointHandoffTemplate(query);
@@ -74688,6 +74817,7 @@ var init_handoff_templates = __esm(() => {
74688
74817
  init_builder();
74689
74818
  init_game_asset_designer();
74690
74819
  init_planner();
74820
+ init_product_manager();
74691
74821
  init_researcher();
74692
74822
  init_reviewer();
74693
74823
  init_triage();
@@ -74698,6 +74828,7 @@ var init_handoff_templates = __esm(() => {
74698
74828
  planner: duoPlannerHandoffContract,
74699
74829
  builder: duoBuilderHandoffContract,
74700
74830
  architect: duoArchitectHandoffContract,
74831
+ "product-manager": duoProductManagerHandoffContract,
74701
74832
  researcher: duoResearcherHandoffContract,
74702
74833
  reviewer: duoReviewerHandoffContract,
74703
74834
  "uiux-engineer": duoUiuxEngineerHandoffContract,
@@ -74744,6 +74875,38 @@ var init_architect2 = __esm(() => {
74744
74875
  };
74745
74876
  });
74746
74877
 
74878
+ // ../../services/backend/prompts/teams/solo/handoff-templates/product-manager-solo-code.ts
74879
+ function getProductManagerSoloCodeTemplate(query) {
74880
+ return getProductManagerToEntryPointHandoffTemplate(query);
74881
+ }
74882
+ var init_product_manager_solo_code = __esm(() => {
74883
+ init_product_manager_handoff_templates();
74884
+ });
74885
+
74886
+ // ../../services/backend/prompts/teams/solo/handoff-templates/product-manager-solo-chat.ts
74887
+ var init_product_manager_solo_chat = __esm(() => {
74888
+ init_product_manager_solo_code();
74889
+ });
74890
+
74891
+ // ../../services/backend/prompts/teams/solo/handoff-templates/product-manager.ts
74892
+ var soloProductManagerHandoffContract;
74893
+ var init_product_manager2 = __esm(() => {
74894
+ init_product_manager_solo_chat();
74895
+ init_product_manager_solo_code();
74896
+ init_contracts();
74897
+ soloProductManagerHandoffContract = {
74898
+ role: "product-manager",
74899
+ receivesFrom: ["solo"],
74900
+ returnsTo: ["solo"],
74901
+ outboundTemplates: {
74902
+ solo: handoffTemplateByMode({
74903
+ chat: getProductManagerSoloCodeTemplate,
74904
+ code: getProductManagerSoloCodeTemplate
74905
+ })
74906
+ }
74907
+ };
74908
+ });
74909
+
74747
74910
  // ../../services/backend/prompts/teams/solo/handoff-templates/solo-architect-code.ts
74748
74911
  function getSoloArchitectCodeTemplate(query) {
74749
74912
  return getEntryPointToArchitectHandoffTemplate(query);
@@ -74757,6 +74920,19 @@ var init_solo_architect_chat = __esm(() => {
74757
74920
  init_solo_architect_code();
74758
74921
  });
74759
74922
 
74923
+ // ../../services/backend/prompts/teams/solo/handoff-templates/solo-product-manager-code.ts
74924
+ function getSoloProductManagerCodeTemplate(query) {
74925
+ return getEntryPointToProductManagerHandoffTemplate(query);
74926
+ }
74927
+ var init_solo_product_manager_code = __esm(() => {
74928
+ init_product_manager_handoff_templates();
74929
+ });
74930
+
74931
+ // ../../services/backend/prompts/teams/solo/handoff-templates/solo-product-manager-chat.ts
74932
+ var init_solo_product_manager_chat = __esm(() => {
74933
+ init_solo_product_manager_code();
74934
+ });
74935
+
74760
74936
  // ../../services/backend/prompts/teams/solo/handoff-templates/solo-triage-code.ts
74761
74937
  function getSoloTriageCodeTemplate(query) {
74762
74938
  return getEntryPointToTriageHandoffTemplate(query);
@@ -74816,6 +74992,8 @@ var soloHandoffContract;
74816
74992
  var init_solo = __esm(() => {
74817
74993
  init_solo_architect_chat();
74818
74994
  init_solo_architect_code();
74995
+ init_solo_product_manager_chat();
74996
+ init_solo_product_manager_code();
74819
74997
  init_solo_triage_chat();
74820
74998
  init_solo_triage_code();
74821
74999
  init_solo_uiux_engineer_chat();
@@ -74827,13 +75005,17 @@ var init_solo = __esm(() => {
74827
75005
  init_contracts();
74828
75006
  soloHandoffContract = {
74829
75007
  role: "solo",
74830
- receivesFrom: ["user", "architect", "uiux-engineer", "triage", "verifier"],
74831
- returnsTo: ["user", "architect", "uiux-engineer", "triage", "verifier"],
75008
+ receivesFrom: ["user", "architect", "product-manager", "uiux-engineer", "triage", "verifier"],
75009
+ returnsTo: ["user", "architect", "product-manager", "uiux-engineer", "triage", "verifier"],
74832
75010
  outboundTemplates: {
74833
75011
  architect: handoffTemplateByMode({
74834
75012
  chat: getSoloArchitectCodeTemplate,
74835
75013
  code: getSoloArchitectCodeTemplate
74836
75014
  }),
75015
+ "product-manager": handoffTemplateByMode({
75016
+ chat: getSoloProductManagerCodeTemplate,
75017
+ code: getSoloProductManagerCodeTemplate
75018
+ }),
74837
75019
  "uiux-engineer": handoffTemplateByMode({
74838
75020
  chat: getSoloUiuxEngineerCodeTemplate,
74839
75021
  code: getSoloUiuxEngineerCodeTemplate
@@ -74957,6 +75139,7 @@ function listSoloRoleHandoffContracts() {
74957
75139
  var SOLO_ROLE_HANDOFF_CATALOG, SOLO_ROLE_HANDOFF_CONTRACTS, validatedSoloRoleHandoffContracts;
74958
75140
  var init_handoff_templates2 = __esm(() => {
74959
75141
  init_architect2();
75142
+ init_product_manager2();
74960
75143
  init_solo();
74961
75144
  init_triage2();
74962
75145
  init_uiux_engineer2();
@@ -74965,6 +75148,7 @@ var init_handoff_templates2 = __esm(() => {
74965
75148
  SOLO_ROLE_HANDOFF_CATALOG = {
74966
75149
  solo: soloHandoffContract,
74967
75150
  architect: soloArchitectHandoffContract,
75151
+ "product-manager": soloProductManagerHandoffContract,
74968
75152
  "uiux-engineer": soloUiuxEngineerHandoffContract,
74969
75153
  triage: soloTriageHandoffContract,
74970
75154
  verifier: soloVerifierHandoffContract
@@ -75066,6 +75250,19 @@ var init_coordinator_game_asset_designer_chat = __esm(() => {
75066
75250
  init_coordinator_game_asset_designer_code();
75067
75251
  });
75068
75252
 
75253
+ // ../../services/backend/prompts/teams/trio/handoff-templates/coordinator-product-manager-code.ts
75254
+ function getCoordinatorProductManagerCodeTemplate(query) {
75255
+ return getEntryPointToProductManagerHandoffTemplate(query);
75256
+ }
75257
+ var init_coordinator_product_manager_code = __esm(() => {
75258
+ init_product_manager_handoff_templates();
75259
+ });
75260
+
75261
+ // ../../services/backend/prompts/teams/trio/handoff-templates/coordinator-product-manager-chat.ts
75262
+ var init_coordinator_product_manager_chat = __esm(() => {
75263
+ init_coordinator_product_manager_code();
75264
+ });
75265
+
75069
75266
  // ../../services/backend/prompts/teams/trio/handoff-templates/coordinator-researcher-code.ts
75070
75267
  function getCoordinatorResearcherCodeTemplate(query) {
75071
75268
  return getEntryPointToResearcherHandoffTemplate(query);
@@ -75197,6 +75394,8 @@ var init_coordinator = __esm(() => {
75197
75394
  init_coordinator_architect_code();
75198
75395
  init_coordinator_game_asset_designer_chat();
75199
75396
  init_coordinator_game_asset_designer_code();
75397
+ init_coordinator_product_manager_chat();
75398
+ init_coordinator_product_manager_code();
75200
75399
  init_coordinator_researcher_chat();
75201
75400
  init_coordinator_researcher_code();
75202
75401
  init_coordinator_reviewer_chat();
@@ -75218,6 +75417,7 @@ var init_coordinator = __esm(() => {
75218
75417
  "user",
75219
75418
  "specifier",
75220
75419
  "architect",
75420
+ "product-manager",
75221
75421
  "uiux-engineer",
75222
75422
  "triage",
75223
75423
  "researcher",
@@ -75229,6 +75429,7 @@ var init_coordinator = __esm(() => {
75229
75429
  "user",
75230
75430
  "specifier",
75231
75431
  "architect",
75432
+ "product-manager",
75232
75433
  "uiux-engineer",
75233
75434
  "triage",
75234
75435
  "researcher",
@@ -75249,6 +75450,10 @@ var init_coordinator = __esm(() => {
75249
75450
  chat: getCoordinatorArchitectCodeTemplate,
75250
75451
  code: getCoordinatorArchitectCodeTemplate
75251
75452
  }),
75453
+ "product-manager": handoffTemplateByMode({
75454
+ chat: getCoordinatorProductManagerCodeTemplate,
75455
+ code: getCoordinatorProductManagerCodeTemplate
75456
+ }),
75252
75457
  "uiux-engineer": handoffTemplateByMode({
75253
75458
  chat: getCoordinatorUiuxEngineerCodeTemplate,
75254
75459
  code: getCoordinatorUiuxEngineerCodeTemplate
@@ -75309,6 +75514,38 @@ var init_game_asset_designer2 = __esm(() => {
75309
75514
  };
75310
75515
  });
75311
75516
 
75517
+ // ../../services/backend/prompts/teams/trio/handoff-templates/product-manager-coordinator-code.ts
75518
+ function getProductManagerCoordinatorCodeTemplate(query) {
75519
+ return getProductManagerToEntryPointHandoffTemplate(query);
75520
+ }
75521
+ var init_product_manager_coordinator_code = __esm(() => {
75522
+ init_product_manager_handoff_templates();
75523
+ });
75524
+
75525
+ // ../../services/backend/prompts/teams/trio/handoff-templates/product-manager-coordinator-chat.ts
75526
+ var init_product_manager_coordinator_chat = __esm(() => {
75527
+ init_product_manager_coordinator_code();
75528
+ });
75529
+
75530
+ // ../../services/backend/prompts/teams/trio/handoff-templates/product-manager.ts
75531
+ var trioProductManagerHandoffContract;
75532
+ var init_product_manager3 = __esm(() => {
75533
+ init_product_manager_coordinator_chat();
75534
+ init_product_manager_coordinator_code();
75535
+ init_contracts();
75536
+ trioProductManagerHandoffContract = {
75537
+ role: "product-manager",
75538
+ receivesFrom: ["coordinator"],
75539
+ returnsTo: ["coordinator"],
75540
+ outboundTemplates: {
75541
+ coordinator: handoffTemplateByMode({
75542
+ chat: getProductManagerCoordinatorCodeTemplate,
75543
+ code: getProductManagerCoordinatorCodeTemplate
75544
+ })
75545
+ }
75546
+ };
75547
+ });
75548
+
75312
75549
  // ../../services/backend/prompts/teams/trio/handoff-templates/researcher-coordinator-code.ts
75313
75550
  function getResearcherCoordinatorCodeTemplate(query) {
75314
75551
  return getResearcherToEntryPointHandoffTemplate(query);
@@ -75596,6 +75833,7 @@ var init_handoff_templates3 = __esm(() => {
75596
75833
  init_builder2();
75597
75834
  init_coordinator();
75598
75835
  init_game_asset_designer2();
75836
+ init_product_manager3();
75599
75837
  init_researcher2();
75600
75838
  init_reviewer2();
75601
75839
  init_specifier();
@@ -75608,6 +75846,7 @@ var init_handoff_templates3 = __esm(() => {
75608
75846
  specifier: trioSpecifierHandoffContract,
75609
75847
  builder: trioBuilderHandoffContract,
75610
75848
  architect: trioArchitectHandoffContract,
75849
+ "product-manager": trioProductManagerHandoffContract,
75611
75850
  researcher: trioResearcherHandoffContract,
75612
75851
  reviewer: trioReviewerHandoffContract,
75613
75852
  "uiux-engineer": trioUiuxEngineerHandoffContract,
@@ -76164,13 +76403,14 @@ ${getInterRoleHandoffRule()}
76164
76403
  4. Analyze concurrent writers and races, idempotency, ordering/monotonicity, retries, transactions, failure/recovery, primary read paths, indexes, projections/read models, query shapes, scan/transaction limits, and invalidation/subscription scope.
76165
76404
  5. Account for Convex reactivity and bandwidth: avoid unnecessary reactive fanout and separate high-frequency heartbeat/liveness/status fields from low-frequency identity/configuration fields. Specify migration/backfill sequence, tests, acceptance criteria, and the implementation and verification sequence.
76166
76405
  6. Keep the proposal within the user's request and the repository's established patterns. Do not expand scope, spawn subagents, implement the design, edit files, or act as the builder.
76167
- 7. Hand the complete design brief to \`{ENTRY_POINT_ROLE}\` with the normal command, then stop:
76406
+ 7. Decide every open technical decision for the development work yourself, inside your one recommended design (approach, design, contracts, schema, libraries, trade-offs), and state the evidence you used (repository paths, \`memory/\`, \`docs/\`, existing tests). Do not hand \`{ENTRY_POINT_ROLE}\` a list of open technical questions. Questions outside repository technical design (product, copy, general discussion) are not part of the design: leave them to \`{ENTRY_POINT_ROLE}\`. Escalate only an item that meets the escalation criteria: (a) **ambiguous or insufficient request:** the request is clearly ambiguous or insufficient, and no specialist can settle the question from the request, the code, \`memory/\`, or \`docs/\`; (b) **destructive risk:** the decision involves deletion, data loss, an irreversible migration, an externally visible or production-affecting action, or spending money. Name each escalated item in the \`## Escalation items for the user\` section of your handoff. Decide everything else in the design yourself.
76407
+ 8. Hand the complete design brief to \`{ENTRY_POINT_ROLE}\` with the normal command, then stop:
76168
76408
 
76169
76409
  \`\`\`bash
76170
76410
  chatroom handoff --chatroom-id="<chatroom-id>" --role="architect" --next-role="{ENTRY_POINT_ROLE}"
76171
76411
  \`\`\`
76172
76412
 
76173
- The handoff must contain every required brief section, repository evidence, chosen design, exact file/API/schema details, risks, acceptance criteria, tests, and implementation sequence \`{ENTRY_POINT_ROLE}\` needs to coordinate implementation. It must not contain implementation edits or alternative designs.`;
76413
+ The handoff must contain every required brief section, repository evidence, chosen design, exact file/API/schema details, risks, acceptance criteria, tests, and implementation sequence \`{ENTRY_POINT_ROLE}\` needs to coordinate implementation. It must not contain implementation edits or alternative designs. Any item that meets the escalation criteria is named in \`## Escalation items for the user\`; otherwise that section is \`None observed.\`.`;
76174
76414
  });
76175
76415
 
76176
76416
  // ../../services/backend/prompts/cli/roles/builder.ts
@@ -76252,6 +76492,33 @@ var init_planner2 = __esm(() => {
76252
76492
  init_sections();
76253
76493
  });
76254
76494
 
76495
+ // ../../services/backend/prompts/cli/roles/product-manager.ts
76496
+ var PRODUCT_MANAGER_GUIDANCE;
76497
+ var init_product_manager4 = __esm(() => {
76498
+ init_sections();
76499
+ PRODUCT_MANAGER_GUIDANCE = `## Product Manager Operating Model
76500
+
76501
+ You are the product manager responsible for scoping coding and development work in this repository: turning a new, ambiguous feature request into a product specification: user stories with acceptance criteria and an explicit in-scope and out-of-scope decision. You are advisory and read-only: never edit repository files, never build, and never implement. You may read code and docs.
76502
+
76503
+ ${"{SESSION_CONTINUITY}"}
76504
+
76505
+ ${getInterRoleHandoffRule()}
76506
+
76507
+ 1. Recover the authoritative request from the injected task and chatroom history. State the problem the user is trying to solve and who benefits, in one paragraph. If the request is ambiguous, resolve it from the code, \`memory/\`, and \`docs/\` first; raise it to the user only if it meets the escalation criteria in step 6.
76508
+ 2. Before proposing any scope, inspect the existing app behavior the feature touches: the relevant code paths, UI, CLI commands, docs, and decision records under \`memory/\` (start at \`memory/index.md\`). Cite concrete paths and symbols. Search for existing capabilities that already do part of the job under another name.
76509
+ 3. Name the existing capabilities the feature must stay consistent with. Name the gaps the feature would leave if they are not in scope, so the delivered feature is complete and not a half-feature. Do not propose scope that contradicts existing behavior without recording the conflict as a product decision with your recommended default and rationale.
76510
+ 4. Write user stories in the form "As a <user>, I want <capability>, so that <outcome>", each with testable acceptance criteria.
76511
+ 5. Decide scope explicitly: list what is in scope and what is out of scope, with a one-line reason for every out-of-scope item. Defer or exclude work; do not leave it unclassified.
76512
+ 6. Decide each development-scope product decision yourself (scope, user stories, in and out of scope, consistency with existing behavior) with a recommended default and a one-line rationale. Non-development product questions (copy, pricing, opinions, general product talk) are not yours to decide: return them to \`{ENTRY_POINT_ROLE}\` in your \`## Summary\`. List to the user only items that meet the escalation criteria: (a) **ambiguous or insufficient request:** the request is clearly ambiguous or insufficient, and no specialist can settle the question from the request, the code, \`memory/\`, or \`docs/\`; (b) **destructive risk:** the decision involves deletion, data loss, an irreversible migration, an externally visible or production-affecting action, or spending money. Decide everything else in development scope yourself.
76513
+ 7. State the UI and UX review the entry point owes. Your spec answers *what* and *whether*; \`uiux-engineer\` answers *how it looks and behaves* (flows, screens, layout, states, keyboard and responsive behavior). Never design layout yourself. In the \`## UI and UX review\` section, if the feature has any UI surface (a new screen, panel, flow, interaction, or visible state), remind \`{ENTRY_POINT_ROLE}\` that it must get a \`uiux-engineer\` design before any UI work on this new feature, and name each surface. If the feature has no UI surface, say so explicitly.
76514
+ 8. Write the spec using the sections in the injected \`<handoff-templates>\`, in the order given, beginning with the \`## Summary\` section.
76515
+ 9. Hand the spec to \`{ENTRY_POINT_ROLE}\` with the normal command, then stop. You cannot contact other roles directly.
76516
+
76517
+ \`\`\`bash
76518
+ chatroom handoff --chatroom-id="<chatroom-id>" --role="product-manager" --next-role="{ENTRY_POINT_ROLE}"
76519
+ \`\`\``;
76520
+ });
76521
+
76255
76522
  // ../../services/backend/prompts/cli/roles/researcher.ts
76256
76523
  var RESEARCHER_GUIDANCE;
76257
76524
  var init_researcher3 = __esm(() => {
@@ -76393,10 +76660,14 @@ var init_planner_guidance_context = __esm(() => {
76393
76660
  init_env();
76394
76661
  });
76395
76662
 
76663
+ // ../../services/backend/prompts/teams/entry-point-coordination-gates.ts
76664
+ var init_entry_point_coordination_gates = () => {};
76665
+
76396
76666
  // ../../services/backend/prompts/teams/solo/prompts/solo.ts
76397
76667
  var init_solo2 = __esm(() => {
76398
76668
  init_planner_guidance_context();
76399
76669
  init_sections();
76670
+ init_entry_point_coordination_gates();
76400
76671
  });
76401
76672
 
76402
76673
  // ../../services/backend/prompts/teams/solo/prompts/fromContext.ts
@@ -76410,6 +76681,7 @@ var init_fromContext2 = __esm(() => {
76410
76681
  init_builder3();
76411
76682
  init_game_asset_designer3();
76412
76683
  init_planner2();
76684
+ init_product_manager4();
76413
76685
  init_researcher3();
76414
76686
  init_reviewer3();
76415
76687
  init_triage4();
@@ -76423,10 +76695,12 @@ var init_fromContext2 = __esm(() => {
76423
76695
  var init_builder4 = __esm(() => {
76424
76696
  init_builder3();
76425
76697
  });
76698
+
76426
76699
  // ../../services/backend/prompts/teams/duo/prompts/planner.ts
76427
76700
  var init_planner3 = __esm(() => {
76428
76701
  init_planner_guidance_context();
76429
76702
  init_sections();
76703
+ init_entry_point_coordination_gates();
76430
76704
  });
76431
76705
 
76432
76706
  // ../../services/backend/prompts/teams/duo/prompts/fromContext.ts
@@ -76445,6 +76719,7 @@ var init_coordinator2 = __esm(() => {
76445
76719
  init_agent_role();
76446
76720
  init_planner_guidance_context();
76447
76721
  init_sections();
76722
+ init_entry_point_coordination_gates();
76448
76723
  });
76449
76724
 
76450
76725
  // ../../services/backend/prompts/teams/trio/prompts/specifier.ts
@@ -76558,6 +76833,20 @@ var init_templates = __esm(() => {
76558
76833
  ],
76559
76834
  defaultHandoffTarget: "planner"
76560
76835
  },
76836
+ "product-manager": {
76837
+ role: "product-manager",
76838
+ title: "Product Manager",
76839
+ description: "You are the product manager responsible for producing one product specification (user stories with acceptance criteria and an explicit in-scope and out-of-scope decision) that is feature complete and consistent with existing app behavior; you are not an implementer.",
76840
+ responsibilities: [
76841
+ "Recover the authoritative feature request and the problem it solves",
76842
+ "Inspect the existing app behavior, docs, and decision records the feature touches",
76843
+ "Write user stories with testable acceptance criteria",
76844
+ "Decide scope explicitly: in scope, out of scope, and the gaps an incomplete scope would leave",
76845
+ "Flag conflicts with existing behavior, decide each development-scope product decision with a recommended default and rationale, and list to the user only items that meet the escalation criteria",
76846
+ "Hand one product specification back to the role that activated you"
76847
+ ],
76848
+ defaultHandoffTarget: "planner"
76849
+ },
76561
76850
  reviewer: {
76562
76851
  role: "reviewer",
76563
76852
  title: "Reviewer",
@@ -123903,4 +124192,4 @@ program2.hook("preAction", async (_thisCommand, actionCommand) => {
123903
124192
  });
123904
124193
  program2.parse();
123905
124194
 
123906
- //# debugId=8F9B7F0317CF518264756E2164756E21
124195
+ //# debugId=030D7C51B871E61A64756E2164756E21