kantban-cli 0.1.11 → 0.1.13

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.
@@ -720,7 +720,7 @@ var PromoteSignalSchema = z19.object({
720
720
 
721
721
  // ../types/dist/pipeline-session.schema.js
722
722
  import { z as z20 } from "zod";
723
- var InvocationTypeSchema = z20.enum(["heavy", "light", "advisor", "stuck_detection", "orchestrator"]);
723
+ var InvocationTypeSchema = z20.enum(["heavy", "light", "advisor", "stuck_detection", "orchestrator", "replanner"]);
724
724
  var ExitReasonSchema = z20.enum(["moved", "stalled", "error", "max_iterations", "stopped", "deleted"]);
725
725
  var PipelineSessionSchema = z20.object({
726
726
  id: z20.string().uuid(),
@@ -904,67 +904,6 @@ var CreatePipelineEventSchema = z22.object({
904
904
  var CreatePipelineEventBatchSchema = z22.object({
905
905
  events: z22.array(CreatePipelineEventSchema).min(1).max(100)
906
906
  });
907
- var PipelineEventsQuerySchema = z22.object({
908
- boardId: z22.string().uuid(),
909
- layer: z22.string().optional().transform((val) => {
910
- if (!val)
911
- return void 0;
912
- const parts = val.split(",").map((s) => s.trim());
913
- for (const p of parts) {
914
- PipelineEventLayerSchema.parse(p);
915
- }
916
- return val;
917
- }),
918
- severity: z22.string().optional().transform((val) => {
919
- if (!val)
920
- return void 0;
921
- const parts = val.split(",").map((s) => s.trim());
922
- for (const p of parts) {
923
- PipelineEventSeveritySchema.parse(p);
924
- }
925
- return val;
926
- }),
927
- ticketId: z22.string().uuid().optional(),
928
- columnId: z22.string().uuid().optional(),
929
- runId: z22.string().optional(),
930
- since: z22.string().datetime({ offset: true }).optional(),
931
- until: z22.string().datetime({ offset: true }).optional(),
932
- cursor: z22.string().optional(),
933
- limit: z22.coerce.number().int().min(1).max(200).default(50)
934
- });
935
- var LayerSummarySchema = z22.object({
936
- gates: z22.object({
937
- total: z22.number(),
938
- passed: z22.number(),
939
- failed: z22.number(),
940
- top_failing_gate: z22.string().nullable(),
941
- top_failing_count: z22.number()
942
- }),
943
- advisor: z22.object({
944
- total: z22.number(),
945
- by_action: z22.record(z22.number())
946
- }),
947
- evaluator: z22.object({
948
- total: z22.number(),
949
- approved: z22.number(),
950
- rejected: z22.number(),
951
- blocker_count: z22.number()
952
- }),
953
- constraints: z22.object({
954
- total_evaluations: z22.number(),
955
- currently_blocked: z22.number(),
956
- top_blocking_name: z22.string().nullable(),
957
- top_blocking_column: z22.string().nullable()
958
- }),
959
- cost: z22.object({
960
- total_tokens_in: z22.number(),
961
- total_tokens_out: z22.number(),
962
- max_tokens: z22.number().nullable(),
963
- top_ticket_id: z22.string().uuid().nullable(),
964
- top_ticket_tokens: z22.number()
965
- }),
966
- truncated: z22.boolean()
967
- });
968
907
 
969
908
  // ../types/dist/board-ws.schema.js
970
909
  var WsActorSchema = z23.object({
@@ -3345,6 +3284,8 @@ var PROMPT_BUDGETS = {
3345
3284
  ticket_details: 1500,
3346
3285
  comments: 2e3,
3347
3286
  transition_rules: 500,
3287
+ transition_history: 1e3,
3288
+ dependency_requirements: 500,
3348
3289
  linked_documents: 2e3,
3349
3290
  metadata: 200
3350
3291
  };
@@ -3427,14 +3368,26 @@ You MUST change approach. What you've been doing is not working. Consider:
3427
3368
  - **${ticketContext.tool_prefix}append_run_memory** \u2014 Share discoveries with future agents.
3428
3369
  Params: \`{ section: 'conventions'|'interfaces'|'failures'|'decisions', content: string }\`
3429
3370
 
3371
+ ## Knowledge Sharing
3372
+ Before moving the ticket to the next column, you MUST:
3373
+ 1. **Write a signal** via \`${ticketContext.tool_prefix}create_signal\` summarizing the key outcome of your work:
3374
+ - What you discovered, built, validated, or decided
3375
+ - Scope it to the ticket (\`ticketId\`) so future agents on this ticket see it
3376
+ - One concise signal is better than none \u2014 don't skip this step
3377
+ 2. **Contribute to run memory** via \`${ticketContext.tool_prefix}append_run_memory\` if you discovered:
3378
+ - Conventions or patterns others should follow (\`section: 'conventions'\`)
3379
+ - Interfaces or APIs consumed or created (\`section: 'interfaces'\`)
3380
+ - Failures or dead-ends to avoid (\`section: 'failures'\`)
3381
+ - Design decisions and their rationale (\`section: 'decisions'\`)
3382
+
3383
+ Signals and run memory are how you communicate with future agents. Without them, the next agent starts blind.
3384
+
3430
3385
  ## Iteration Summary
3431
3386
  If you made meaningful progress this iteration, create a comment using \`${ticketContext.tool_prefix}create_comment\` summarizing:
3432
3387
  - What you accomplished
3433
3388
  - What remains to be done
3434
3389
  - Any blockers or issues encountered
3435
3390
 
3436
- This comment is your handoff to the next iteration. Without it, the next iteration starts blind.
3437
-
3438
3391
  ## Critical Rules
3439
3392
  1. **Always call ${ticketContext.tool_prefix}check_transition before ${ticketContext.tool_prefix}move_ticket** \u2014 moves that violate workflow rules will fail.
3440
3393
  2. **If the ticket has UNRESOLVED blockers, do not attempt to move it.** Create a comment explaining you are waiting, then stop.
@@ -3515,94 +3468,93 @@ After completing your work, commit all changes to your worktree branch.
3515
3468
  ## Run Memory
3516
3469
  `);
3517
3470
  parts.push(truncateToTokens(meta.runMemoryContent, PROMPT_BUDGETS.run_memory));
3518
- parts.push(`
3519
- You can contribute to run memory using ${ticketContext.tool_prefix}append_run_memory.`);
3520
3471
  }
3521
- parts.push(`## Current Ticket
3472
+ const ticketParts = [];
3473
+ ticketParts.push(`## Current Ticket
3522
3474
  `);
3523
- parts.push(`**Title:** ${ticketContext.ticket.title}`);
3524
- parts.push(`**Ticket ID:** ${ticketContext.ticket.id}`);
3525
- parts.push(`**Ticket Number:** ${String(ticketContext.ticket.ticket_number)}`);
3475
+ ticketParts.push(`**Title:** ${ticketContext.ticket.title}`);
3476
+ ticketParts.push(`**Ticket ID:** ${ticketContext.ticket.id}`);
3477
+ ticketParts.push(`**Ticket Number:** ${String(ticketContext.ticket.ticket_number)}`);
3526
3478
  if (ticketContext.ticket.description) {
3527
- parts.push(`
3528
- ${truncateToTokens(ticketContext.ticket.description, PROMPT_BUDGETS.ticket_details)}`);
3479
+ ticketParts.push(`
3480
+ ${ticketContext.ticket.description}`);
3529
3481
  }
3530
3482
  if (ticketContext.ticket.assignee) {
3531
- parts.push(`**Assignee:** ${ticketContext.ticket.assignee.name}`);
3483
+ ticketParts.push(`**Assignee:** ${ticketContext.ticket.assignee.name}`);
3532
3484
  }
3533
3485
  if (ticketContext.ticket.column) {
3534
- parts.push(`**Current Column:** ${ticketContext.ticket.column.name} (${ticketContext.ticket.column.type})`);
3486
+ ticketParts.push(`**Current Column:** ${ticketContext.ticket.column.name} (${ticketContext.ticket.column.type})`);
3535
3487
  }
3536
3488
  if (ticketContext.ticket.backward_transitions > 0) {
3537
- parts.push(`**Backward Transitions:** ${String(ticketContext.ticket.backward_transitions)}`);
3489
+ ticketParts.push(`**Backward Transitions:** ${String(ticketContext.ticket.backward_transitions)}`);
3538
3490
  }
3539
3491
  if (ticketContext.field_values.length > 0) {
3540
- parts.push(`
3492
+ ticketParts.push(`
3541
3493
  ## Field Values
3542
3494
  `);
3543
3495
  for (const fv of ticketContext.field_values) {
3544
- parts.push(`- **${fv.field_name}:** ${fv.value !== null ? JSON.stringify(fv.value) : "(not set)"}`);
3496
+ ticketParts.push(`- **${fv.field_name}:** ${fv.value !== null ? JSON.stringify(fv.value) : "(not set)"}`);
3545
3497
  }
3546
3498
  }
3547
3499
  if (ticketContext.parent) {
3548
- parts.push(`
3500
+ ticketParts.push(`
3549
3501
  ## Parent Ticket
3550
3502
  `);
3551
- parts.push(`- #${String(ticketContext.parent.ticket_number)}: ${ticketContext.parent.title}`);
3503
+ ticketParts.push(`- #${String(ticketContext.parent.ticket_number)}: ${ticketContext.parent.title}`);
3552
3504
  }
3553
3505
  if (ticketContext.children.length > 0) {
3554
- parts.push(`
3506
+ ticketParts.push(`
3555
3507
  ## Child Tickets
3556
3508
  `);
3557
3509
  for (const child of ticketContext.children) {
3558
- parts.push(`- #${String(child.ticket_number)}: ${child.title}${child.column_name ? ` (${child.column_name})` : ""}`);
3510
+ ticketParts.push(`- #${String(child.ticket_number)}: ${child.title}${child.column_name ? ` (${child.column_name})` : ""}`);
3559
3511
  }
3560
3512
  }
3561
3513
  if (ticketContext.transitions.length > 0) {
3562
- parts.push(`
3514
+ ticketParts.push(`
3563
3515
  ## Transition History
3564
3516
  `);
3565
3517
  let transitionTokens = 0;
3566
- const TRANSITION_BUDGET = 1e3;
3567
3518
  for (const t of ticketContext.transitions) {
3568
3519
  let line = `- ${t.from ?? "Backlog"} \u2192 ${t.to}`;
3569
3520
  if (t.handoff) line += ` (handoff: ${JSON.stringify(t.handoff)})`;
3570
3521
  const lineTokens = estimateTokens(line);
3571
- if (transitionTokens + lineTokens > TRANSITION_BUDGET) {
3572
- parts.push(`- [...truncated \u2014 ${String(ticketContext.transitions.length)} total transitions]`);
3522
+ if (transitionTokens + lineTokens > PROMPT_BUDGETS.transition_history) {
3523
+ ticketParts.push(`- [...truncated \u2014 ${String(ticketContext.transitions.length)} total transitions]`);
3573
3524
  break;
3574
3525
  }
3575
- parts.push(line);
3526
+ ticketParts.push(line);
3576
3527
  transitionTokens += lineTokens;
3577
3528
  }
3578
3529
  }
3579
3530
  if (ticketContext.ticket_links.length > 0) {
3580
- parts.push(`
3531
+ ticketParts.push(`
3581
3532
  ## Ticket Links
3582
3533
  `);
3583
3534
  const blockers = ticketContext.ticket_links.filter((l) => l.direction === "inward" && l.link_type === "blocks");
3584
3535
  const blocking = ticketContext.ticket_links.filter((l) => l.direction === "outward" && l.link_type === "blocks");
3585
3536
  const related = ticketContext.ticket_links.filter((l) => l.link_type === "relates_to");
3586
3537
  if (blockers.length > 0) {
3587
- parts.push(`**Blocked by:**`);
3538
+ ticketParts.push(`**Blocked by:**`);
3588
3539
  for (const l of blockers) {
3589
3540
  const status = l.resolved ? "(resolved)" : "UNRESOLVED";
3590
- parts.push(`- #${String(l.ticket_number)}: ${l.title} [${l.column_name ?? "backlog"}] ${status}`);
3541
+ ticketParts.push(`- #${String(l.ticket_number)}: ${l.title} [${l.column_name ?? "backlog"}] ${status}`);
3591
3542
  }
3592
3543
  }
3593
3544
  if (blocking.length > 0) {
3594
- parts.push(`**Blocks:**`);
3545
+ ticketParts.push(`**Blocks:**`);
3595
3546
  for (const l of blocking) {
3596
- parts.push(`- #${String(l.ticket_number)}: ${l.title} [${l.column_name ?? "backlog"}]`);
3547
+ ticketParts.push(`- #${String(l.ticket_number)}: ${l.title} [${l.column_name ?? "backlog"}]`);
3597
3548
  }
3598
3549
  }
3599
3550
  if (related.length > 0) {
3600
- parts.push(`**Related:**`);
3551
+ ticketParts.push(`**Related:**`);
3601
3552
  for (const l of related) {
3602
- parts.push(`- #${String(l.ticket_number)}: ${l.title}`);
3553
+ ticketParts.push(`- #${String(l.ticket_number)}: ${l.title}`);
3603
3554
  }
3604
3555
  }
3605
3556
  }
3557
+ parts.push(truncateToTokens(ticketParts.join("\n"), PROMPT_BUDGETS.ticket_details));
3606
3558
  if (ticketContext.comments.length > 0) {
3607
3559
  parts.push(`
3608
3560
  ## Comments
@@ -3619,7 +3571,7 @@ ${truncateToTokens(ticketContext.ticket.description, PROMPT_BUDGETS.ticket_detai
3619
3571
  parts.push(`
3620
3572
  ## Dependency & Field Requirements
3621
3573
  `);
3622
- parts.push(ticketContext.dependency_requirements);
3574
+ parts.push(truncateToTokens(ticketContext.dependency_requirements, PROMPT_BUDGETS.dependency_requirements));
3623
3575
  }
3624
3576
  if (ticketContext.linked_documents.length > 0) {
3625
3577
  parts.push(`
@@ -4108,4 +4060,4 @@ export {
4108
4060
  generateGateProxyMcpConfig,
4109
4061
  cleanupGateProxyConfigs
4110
4062
  };
4111
- //# sourceMappingURL=chunk-ZCUIGFSP.js.map
4063
+ //# sourceMappingURL=chunk-FKIFDPKK.js.map