@telora/daemon 0.12.33
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/.env.example +64 -0
- package/README.md +229 -0
- package/build-info.json +4 -0
- package/dist/activity-tracker.d.ts +13 -0
- package/dist/activity-tracker.d.ts.map +1 -0
- package/dist/activity-tracker.js +19 -0
- package/dist/activity-tracker.js.map +1 -0
- package/dist/agent-state.d.ts +45 -0
- package/dist/agent-state.d.ts.map +1 -0
- package/dist/agent-state.js +61 -0
- package/dist/agent-state.js.map +1 -0
- package/dist/audit-hooks.d.ts +12 -0
- package/dist/audit-hooks.d.ts.map +1 -0
- package/dist/audit-hooks.js +45 -0
- package/dist/audit-hooks.js.map +1 -0
- package/dist/auto-update.d.ts +42 -0
- package/dist/auto-update.d.ts.map +1 -0
- package/dist/auto-update.js +96 -0
- package/dist/auto-update.js.map +1 -0
- package/dist/branch-status.d.ts +40 -0
- package/dist/branch-status.d.ts.map +1 -0
- package/dist/branch-status.js +107 -0
- package/dist/branch-status.js.map +1 -0
- package/dist/completion-detector.d.ts +87 -0
- package/dist/completion-detector.d.ts.map +1 -0
- package/dist/completion-detector.js +160 -0
- package/dist/completion-detector.js.map +1 -0
- package/dist/completion-handler.d.ts +48 -0
- package/dist/completion-handler.d.ts.map +1 -0
- package/dist/completion-handler.js +200 -0
- package/dist/completion-handler.js.map +1 -0
- package/dist/condition-evaluators.d.ts +31 -0
- package/dist/condition-evaluators.d.ts.map +1 -0
- package/dist/condition-evaluators.js +416 -0
- package/dist/condition-evaluators.js.map +1 -0
- package/dist/config.d.ts +55 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +311 -0
- package/dist/config.js.map +1 -0
- package/dist/control-state.d.ts +41 -0
- package/dist/control-state.d.ts.map +1 -0
- package/dist/control-state.js +204 -0
- package/dist/control-state.js.map +1 -0
- package/dist/crash-recovery-cleanup.d.ts +21 -0
- package/dist/crash-recovery-cleanup.d.ts.map +1 -0
- package/dist/crash-recovery-cleanup.js +198 -0
- package/dist/crash-recovery-cleanup.js.map +1 -0
- package/dist/crash-recovery-scan.d.ts +19 -0
- package/dist/crash-recovery-scan.d.ts.map +1 -0
- package/dist/crash-recovery-scan.js +145 -0
- package/dist/crash-recovery-scan.js.map +1 -0
- package/dist/crash-recovery-types.d.ts +54 -0
- package/dist/crash-recovery-types.d.ts.map +1 -0
- package/dist/crash-recovery-types.js +13 -0
- package/dist/crash-recovery-types.js.map +1 -0
- package/dist/crash-recovery.d.ts +88 -0
- package/dist/crash-recovery.d.ts.map +1 -0
- package/dist/crash-recovery.js +448 -0
- package/dist/crash-recovery.js.map +1 -0
- package/dist/daemon-logs.d.ts +19 -0
- package/dist/daemon-logs.d.ts.map +1 -0
- package/dist/daemon-logs.js +81 -0
- package/dist/daemon-logs.js.map +1 -0
- package/dist/daemon-process.d.ts +154 -0
- package/dist/daemon-process.d.ts.map +1 -0
- package/dist/daemon-process.js +427 -0
- package/dist/daemon-process.js.map +1 -0
- package/dist/dag-validator.d.ts +52 -0
- package/dist/dag-validator.d.ts.map +1 -0
- package/dist/dag-validator.js +199 -0
- package/dist/dag-validator.js.map +1 -0
- package/dist/delivery-guards.d.ts +41 -0
- package/dist/delivery-guards.d.ts.map +1 -0
- package/dist/delivery-guards.js +195 -0
- package/dist/delivery-guards.js.map +1 -0
- package/dist/delivery-lifecycle.d.ts +110 -0
- package/dist/delivery-lifecycle.d.ts.map +1 -0
- package/dist/delivery-lifecycle.js +353 -0
- package/dist/delivery-lifecycle.js.map +1 -0
- package/dist/delivery-merge.d.ts +17 -0
- package/dist/delivery-merge.d.ts.map +1 -0
- package/dist/delivery-merge.js +89 -0
- package/dist/delivery-merge.js.map +1 -0
- package/dist/dependency-resolver.d.ts +77 -0
- package/dist/dependency-resolver.d.ts.map +1 -0
- package/dist/dependency-resolver.js +337 -0
- package/dist/dependency-resolver.js.map +1 -0
- package/dist/evaluation-context.d.ts +49 -0
- package/dist/evaluation-context.d.ts.map +1 -0
- package/dist/evaluation-context.js +98 -0
- package/dist/evaluation-context.js.map +1 -0
- package/dist/git-activity.d.ts +24 -0
- package/dist/git-activity.d.ts.map +1 -0
- package/dist/git-activity.js +97 -0
- package/dist/git-activity.js.map +1 -0
- package/dist/git-branch.d.ts +33 -0
- package/dist/git-branch.d.ts.map +1 -0
- package/dist/git-branch.js +88 -0
- package/dist/git-branch.js.map +1 -0
- package/dist/git-integration.d.ts +27 -0
- package/dist/git-integration.d.ts.map +1 -0
- package/dist/git-integration.js +82 -0
- package/dist/git-integration.js.map +1 -0
- package/dist/git-merge-helpers.d.ts +48 -0
- package/dist/git-merge-helpers.d.ts.map +1 -0
- package/dist/git-merge-helpers.js +105 -0
- package/dist/git-merge-helpers.js.map +1 -0
- package/dist/git-merge-lock.d.ts +67 -0
- package/dist/git-merge-lock.d.ts.map +1 -0
- package/dist/git-merge-lock.js +157 -0
- package/dist/git-merge-lock.js.map +1 -0
- package/dist/git-merge-strategies.d.ts +39 -0
- package/dist/git-merge-strategies.d.ts.map +1 -0
- package/dist/git-merge-strategies.js +127 -0
- package/dist/git-merge-strategies.js.map +1 -0
- package/dist/git-merge.d.ts +80 -0
- package/dist/git-merge.d.ts.map +1 -0
- package/dist/git-merge.js +373 -0
- package/dist/git-merge.js.map +1 -0
- package/dist/git-state-detector.d.ts +24 -0
- package/dist/git-state-detector.d.ts.map +1 -0
- package/dist/git-state-detector.js +122 -0
- package/dist/git-state-detector.js.map +1 -0
- package/dist/git-types.d.ts +40 -0
- package/dist/git-types.d.ts.map +1 -0
- package/dist/git-types.js +23 -0
- package/dist/git-types.js.map +1 -0
- package/dist/git-utils.d.ts +28 -0
- package/dist/git-utils.d.ts.map +1 -0
- package/dist/git-utils.js +57 -0
- package/dist/git-utils.js.map +1 -0
- package/dist/git.d.ts +24 -0
- package/dist/git.d.ts.map +1 -0
- package/dist/git.js +64 -0
- package/dist/git.js.map +1 -0
- package/dist/guard-engine.d.ts +19 -0
- package/dist/guard-engine.d.ts.map +1 -0
- package/dist/guard-engine.js +21 -0
- package/dist/guard-engine.js.map +1 -0
- package/dist/guard-evaluator.d.ts +47 -0
- package/dist/guard-evaluator.d.ts.map +1 -0
- package/dist/guard-evaluator.js +193 -0
- package/dist/guard-evaluator.js.map +1 -0
- package/dist/heartbeat.d.ts +73 -0
- package/dist/heartbeat.d.ts.map +1 -0
- package/dist/heartbeat.js +306 -0
- package/dist/heartbeat.js.map +1 -0
- package/dist/index.d.ts +32 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +493 -0
- package/dist/index.js.map +1 -0
- package/dist/listener-auto-advance.d.ts +29 -0
- package/dist/listener-auto-advance.d.ts.map +1 -0
- package/dist/listener-auto-advance.js +172 -0
- package/dist/listener-auto-advance.js.map +1 -0
- package/dist/listener-review.d.ts +37 -0
- package/dist/listener-review.d.ts.map +1 -0
- package/dist/listener-review.js +217 -0
- package/dist/listener-review.js.map +1 -0
- package/dist/listener.d.ts +57 -0
- package/dist/listener.d.ts.map +1 -0
- package/dist/listener.js +361 -0
- package/dist/listener.js.map +1 -0
- package/dist/log-manager.d.ts +18 -0
- package/dist/log-manager.d.ts.map +1 -0
- package/dist/log-manager.js +18 -0
- package/dist/log-manager.js.map +1 -0
- package/dist/otlp-log-parser.d.ts +21 -0
- package/dist/otlp-log-parser.d.ts.map +1 -0
- package/dist/otlp-log-parser.js +143 -0
- package/dist/otlp-log-parser.js.map +1 -0
- package/dist/otlp-metric-parser.d.ts +20 -0
- package/dist/otlp-metric-parser.d.ts.map +1 -0
- package/dist/otlp-metric-parser.js +113 -0
- package/dist/otlp-metric-parser.js.map +1 -0
- package/dist/otlp-port-manager.d.ts +26 -0
- package/dist/otlp-port-manager.d.ts.map +1 -0
- package/dist/otlp-port-manager.js +130 -0
- package/dist/otlp-port-manager.js.map +1 -0
- package/dist/otlp-receiver.d.ts +51 -0
- package/dist/otlp-receiver.d.ts.map +1 -0
- package/dist/otlp-receiver.js +663 -0
- package/dist/otlp-receiver.js.map +1 -0
- package/dist/otlp-types.d.ts +92 -0
- package/dist/otlp-types.d.ts.map +1 -0
- package/dist/otlp-types.js +133 -0
- package/dist/otlp-types.js.map +1 -0
- package/dist/output-monitor.d.ts +33 -0
- package/dist/output-monitor.d.ts.map +1 -0
- package/dist/output-monitor.js +67 -0
- package/dist/output-monitor.js.map +1 -0
- package/dist/planning-prompt-builder.d.ts +67 -0
- package/dist/planning-prompt-builder.d.ts.map +1 -0
- package/dist/planning-prompt-builder.js +515 -0
- package/dist/planning-prompt-builder.js.map +1 -0
- package/dist/prompt-builder.d.ts +14 -0
- package/dist/prompt-builder.d.ts.map +1 -0
- package/dist/prompt-builder.js +174 -0
- package/dist/prompt-builder.js.map +1 -0
- package/dist/qa-crash-recovery.d.ts +77 -0
- package/dist/qa-crash-recovery.d.ts.map +1 -0
- package/dist/qa-crash-recovery.js +243 -0
- package/dist/qa-crash-recovery.js.map +1 -0
- package/dist/qa-dev-server.d.ts +73 -0
- package/dist/qa-dev-server.d.ts.map +1 -0
- package/dist/qa-dev-server.js +279 -0
- package/dist/qa-dev-server.js.map +1 -0
- package/dist/qa-orchestrator.d.ts +79 -0
- package/dist/qa-orchestrator.d.ts.map +1 -0
- package/dist/qa-orchestrator.js +349 -0
- package/dist/qa-orchestrator.js.map +1 -0
- package/dist/qa-port-allocator.d.ts +34 -0
- package/dist/qa-port-allocator.d.ts.map +1 -0
- package/dist/qa-port-allocator.js +75 -0
- package/dist/qa-port-allocator.js.map +1 -0
- package/dist/qa-provisioner.d.ts +33 -0
- package/dist/qa-provisioner.d.ts.map +1 -0
- package/dist/qa-provisioner.js +141 -0
- package/dist/qa-provisioner.js.map +1 -0
- package/dist/qa-state.d.ts +93 -0
- package/dist/qa-state.d.ts.map +1 -0
- package/dist/qa-state.js +74 -0
- package/dist/qa-state.js.map +1 -0
- package/dist/queries/control-state.d.ts +25 -0
- package/dist/queries/control-state.d.ts.map +1 -0
- package/dist/queries/control-state.js +34 -0
- package/dist/queries/control-state.js.map +1 -0
- package/dist/queries/daemon-connection.d.ts +25 -0
- package/dist/queries/daemon-connection.d.ts.map +1 -0
- package/dist/queries/daemon-connection.js +28 -0
- package/dist/queries/daemon-connection.js.map +1 -0
- package/dist/queries/deliveries.d.ts +100 -0
- package/dist/queries/deliveries.d.ts.map +1 -0
- package/dist/queries/deliveries.js +184 -0
- package/dist/queries/deliveries.js.map +1 -0
- package/dist/queries/git-activity.d.ts +20 -0
- package/dist/queries/git-activity.d.ts.map +1 -0
- package/dist/queries/git-activity.js +22 -0
- package/dist/queries/git-activity.js.map +1 -0
- package/dist/queries/guards.d.ts +47 -0
- package/dist/queries/guards.d.ts.map +1 -0
- package/dist/queries/guards.js +138 -0
- package/dist/queries/guards.js.map +1 -0
- package/dist/queries/index.d.ts +19 -0
- package/dist/queries/index.d.ts.map +1 -0
- package/dist/queries/index.js +17 -0
- package/dist/queries/index.js.map +1 -0
- package/dist/queries/issues.d.ts +41 -0
- package/dist/queries/issues.d.ts.map +1 -0
- package/dist/queries/issues.js +67 -0
- package/dist/queries/issues.js.map +1 -0
- package/dist/queries/qa.d.ts +79 -0
- package/dist/queries/qa.d.ts.map +1 -0
- package/dist/queries/qa.js +85 -0
- package/dist/queries/qa.js.map +1 -0
- package/dist/queries/roles.d.ts +13 -0
- package/dist/queries/roles.d.ts.map +1 -0
- package/dist/queries/roles.js +39 -0
- package/dist/queries/roles.js.map +1 -0
- package/dist/queries/schemas.d.ts +777 -0
- package/dist/queries/schemas.d.ts.map +1 -0
- package/dist/queries/schemas.js +391 -0
- package/dist/queries/schemas.js.map +1 -0
- package/dist/queries/sessions.d.ts +64 -0
- package/dist/queries/sessions.d.ts.map +1 -0
- package/dist/queries/sessions.js +100 -0
- package/dist/queries/sessions.js.map +1 -0
- package/dist/queries/shared.d.ts +61 -0
- package/dist/queries/shared.d.ts.map +1 -0
- package/dist/queries/shared.js +187 -0
- package/dist/queries/shared.js.map +1 -0
- package/dist/queries/strategies.d.ts +69 -0
- package/dist/queries/strategies.d.ts.map +1 -0
- package/dist/queries/strategies.js +80 -0
- package/dist/queries/strategies.js.map +1 -0
- package/dist/queries/workflows.d.ts +17 -0
- package/dist/queries/workflows.d.ts.map +1 -0
- package/dist/queries/workflows.js +49 -0
- package/dist/queries/workflows.js.map +1 -0
- package/dist/queries/worktrees.d.ts +38 -0
- package/dist/queries/worktrees.d.ts.map +1 -0
- package/dist/queries/worktrees.js +37 -0
- package/dist/queries/worktrees.js.map +1 -0
- package/dist/self-update.d.ts +94 -0
- package/dist/self-update.d.ts.map +1 -0
- package/dist/self-update.js +438 -0
- package/dist/self-update.js.map +1 -0
- package/dist/session-lifecycle.d.ts +77 -0
- package/dist/session-lifecycle.d.ts.map +1 -0
- package/dist/session-lifecycle.js +379 -0
- package/dist/session-lifecycle.js.map +1 -0
- package/dist/shutdown-state.d.ts +17 -0
- package/dist/shutdown-state.d.ts.map +1 -0
- package/dist/shutdown-state.js +22 -0
- package/dist/shutdown-state.js.map +1 -0
- package/dist/spawn-cooldown.d.ts +14 -0
- package/dist/spawn-cooldown.d.ts.map +1 -0
- package/dist/spawn-cooldown.js +34 -0
- package/dist/spawn-cooldown.js.map +1 -0
- package/dist/spawn-environment.d.ts +35 -0
- package/dist/spawn-environment.d.ts.map +1 -0
- package/dist/spawn-environment.js +48 -0
- package/dist/spawn-environment.js.map +1 -0
- package/dist/spawner-liveness.d.ts +23 -0
- package/dist/spawner-liveness.d.ts.map +1 -0
- package/dist/spawner-liveness.js +99 -0
- package/dist/spawner-liveness.js.map +1 -0
- package/dist/spawner-resolution.d.ts +27 -0
- package/dist/spawner-resolution.d.ts.map +1 -0
- package/dist/spawner-resolution.js +99 -0
- package/dist/spawner-resolution.js.map +1 -0
- package/dist/spawner-timeout.d.ts +32 -0
- package/dist/spawner-timeout.d.ts.map +1 -0
- package/dist/spawner-timeout.js +124 -0
- package/dist/spawner-timeout.js.map +1 -0
- package/dist/spawner.d.ts +77 -0
- package/dist/spawner.d.ts.map +1 -0
- package/dist/spawner.js +734 -0
- package/dist/spawner.js.map +1 -0
- package/dist/strategy-completion.d.ts +110 -0
- package/dist/strategy-completion.d.ts.map +1 -0
- package/dist/strategy-completion.js +434 -0
- package/dist/strategy-completion.js.map +1 -0
- package/dist/strategy-engine.d.ts +47 -0
- package/dist/strategy-engine.d.ts.map +1 -0
- package/dist/strategy-engine.js +419 -0
- package/dist/strategy-engine.js.map +1 -0
- package/dist/strategy-executor.d.ts +93 -0
- package/dist/strategy-executor.d.ts.map +1 -0
- package/dist/strategy-executor.js +775 -0
- package/dist/strategy-executor.js.map +1 -0
- package/dist/strategy-lifecycle.d.ts +61 -0
- package/dist/strategy-lifecycle.d.ts.map +1 -0
- package/dist/strategy-lifecycle.js +516 -0
- package/dist/strategy-lifecycle.js.map +1 -0
- package/dist/strategy-merge.d.ts +72 -0
- package/dist/strategy-merge.d.ts.map +1 -0
- package/dist/strategy-merge.js +371 -0
- package/dist/strategy-merge.js.map +1 -0
- package/dist/strategy-prompt-builder.d.ts +62 -0
- package/dist/strategy-prompt-builder.d.ts.map +1 -0
- package/dist/strategy-prompt-builder.js +538 -0
- package/dist/strategy-prompt-builder.js.map +1 -0
- package/dist/strategy-provisioning.d.ts +16 -0
- package/dist/strategy-provisioning.d.ts.map +1 -0
- package/dist/strategy-provisioning.js +119 -0
- package/dist/strategy-provisioning.js.map +1 -0
- package/dist/strategy-team-state.d.ts +24 -0
- package/dist/strategy-team-state.d.ts.map +1 -0
- package/dist/strategy-team-state.js +43 -0
- package/dist/strategy-team-state.js.map +1 -0
- package/dist/strategy-teardown.d.ts +24 -0
- package/dist/strategy-teardown.d.ts.map +1 -0
- package/dist/strategy-teardown.js +158 -0
- package/dist/strategy-teardown.js.map +1 -0
- package/dist/strategy-worktree-state.d.ts +47 -0
- package/dist/strategy-worktree-state.d.ts.map +1 -0
- package/dist/strategy-worktree-state.js +104 -0
- package/dist/strategy-worktree-state.js.map +1 -0
- package/dist/supabase.d.ts +36 -0
- package/dist/supabase.d.ts.map +1 -0
- package/dist/supabase.js +50 -0
- package/dist/supabase.js.map +1 -0
- package/dist/task-converter.d.ts +61 -0
- package/dist/task-converter.d.ts.map +1 -0
- package/dist/task-converter.js +286 -0
- package/dist/task-converter.js.map +1 -0
- package/dist/task-dag-builder.d.ts +14 -0
- package/dist/task-dag-builder.d.ts.map +1 -0
- package/dist/task-dag-builder.js +17 -0
- package/dist/task-dag-builder.js.map +1 -0
- package/dist/team-prompt-base.d.ts +114 -0
- package/dist/team-prompt-base.d.ts.map +1 -0
- package/dist/team-prompt-base.js +531 -0
- package/dist/team-prompt-base.js.map +1 -0
- package/dist/team-prompt-variants.d.ts +27 -0
- package/dist/team-prompt-variants.d.ts.map +1 -0
- package/dist/team-prompt-variants.js +134 -0
- package/dist/team-prompt-variants.js.map +1 -0
- package/dist/team-spawner.d.ts +50 -0
- package/dist/team-spawner.d.ts.map +1 -0
- package/dist/team-spawner.js +410 -0
- package/dist/team-spawner.js.map +1 -0
- package/dist/telemetry-writer.d.ts +66 -0
- package/dist/telemetry-writer.d.ts.map +1 -0
- package/dist/telemetry-writer.js +96 -0
- package/dist/telemetry-writer.js.map +1 -0
- package/dist/trigger-executor.d.ts +56 -0
- package/dist/trigger-executor.d.ts.map +1 -0
- package/dist/trigger-executor.js +313 -0
- package/dist/trigger-executor.js.map +1 -0
- package/dist/types/config.d.ts +60 -0
- package/dist/types/config.d.ts.map +1 -0
- package/dist/types/config.js +5 -0
- package/dist/types/config.js.map +1 -0
- package/dist/types/dag.d.ts +53 -0
- package/dist/types/dag.d.ts.map +1 -0
- package/dist/types/dag.js +5 -0
- package/dist/types/dag.js.map +1 -0
- package/dist/types/delivery.d.ts +71 -0
- package/dist/types/delivery.d.ts.map +1 -0
- package/dist/types/delivery.js +5 -0
- package/dist/types/delivery.js.map +1 -0
- package/dist/types/index.d.ts +15 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +15 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/issue.d.ts +22 -0
- package/dist/types/issue.d.ts.map +1 -0
- package/dist/types/issue.js +5 -0
- package/dist/types/issue.js.map +1 -0
- package/dist/types/merge.d.ts +28 -0
- package/dist/types/merge.d.ts.map +1 -0
- package/dist/types/merge.js +5 -0
- package/dist/types/merge.js.map +1 -0
- package/dist/types/session.d.ts +98 -0
- package/dist/types/session.d.ts.map +1 -0
- package/dist/types/session.js +5 -0
- package/dist/types/session.js.map +1 -0
- package/dist/types/strategy.d.ts +175 -0
- package/dist/types/strategy.d.ts.map +1 -0
- package/dist/types/strategy.js +5 -0
- package/dist/types/strategy.js.map +1 -0
- package/dist/types/workflow.d.ts +34 -0
- package/dist/types/workflow.d.ts.map +1 -0
- package/dist/types/workflow.js +9 -0
- package/dist/types/workflow.js.map +1 -0
- package/dist/types.d.ts +9 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +9 -0
- package/dist/types.js.map +1 -0
- package/dist/unified-init.d.ts +16 -0
- package/dist/unified-init.d.ts.map +1 -0
- package/dist/unified-init.js +183 -0
- package/dist/unified-init.js.map +1 -0
- package/dist/unified-shell-config.d.ts +34 -0
- package/dist/unified-shell-config.d.ts.map +1 -0
- package/dist/unified-shell-config.js +238 -0
- package/dist/unified-shell-config.js.map +1 -0
- package/dist/unified-shell-status.d.ts +15 -0
- package/dist/unified-shell-status.d.ts.map +1 -0
- package/dist/unified-shell-status.js +100 -0
- package/dist/unified-shell-status.js.map +1 -0
- package/dist/unified-shell.d.ts +50 -0
- package/dist/unified-shell.d.ts.map +1 -0
- package/dist/unified-shell.js +682 -0
- package/dist/unified-shell.js.map +1 -0
- package/dist/version-check.d.ts +19 -0
- package/dist/version-check.d.ts.map +1 -0
- package/dist/version-check.js +67 -0
- package/dist/version-check.js.map +1 -0
- package/dist/workflow-engine.d.ts +95 -0
- package/dist/workflow-engine.d.ts.map +1 -0
- package/dist/workflow-engine.js +165 -0
- package/dist/workflow-engine.js.map +1 -0
- package/dist/worktree-merge.d.ts +23 -0
- package/dist/worktree-merge.d.ts.map +1 -0
- package/dist/worktree-merge.js +57 -0
- package/dist/worktree-merge.js.map +1 -0
- package/dist/worktree-safety.d.ts +48 -0
- package/dist/worktree-safety.d.ts.map +1 -0
- package/dist/worktree-safety.js +113 -0
- package/dist/worktree-safety.js.map +1 -0
- package/dist/worktree-strategy.d.ts +69 -0
- package/dist/worktree-strategy.d.ts.map +1 -0
- package/dist/worktree-strategy.js +214 -0
- package/dist/worktree-strategy.js.map +1 -0
- package/dist/worktree.d.ts +159 -0
- package/dist/worktree.d.ts.map +1 -0
- package/dist/worktree.js +512 -0
- package/dist/worktree.js.map +1 -0
- package/package.json +76 -0
- package/scripts/telora-daemon-wrapper.sh +31 -0
|
@@ -0,0 +1,531 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Core prompt building infrastructure for strategy team prompts.
|
|
3
|
+
*
|
|
4
|
+
* Contains shared section builders used across multiple prompt variants,
|
|
5
|
+
* plus the main buildStrategyTeamPrompt function which composes them.
|
|
6
|
+
*
|
|
7
|
+
* Extracted from strategy-prompt-builder.ts for maintainability.
|
|
8
|
+
*/
|
|
9
|
+
// ---------------------------------------------------------------------------
|
|
10
|
+
// Section builders -- each produces a string[] of prompt lines for one section
|
|
11
|
+
// ---------------------------------------------------------------------------
|
|
12
|
+
/**
|
|
13
|
+
* Build the role context section from the agent role's system prompt template.
|
|
14
|
+
*/
|
|
15
|
+
export function buildRoleSection(role) {
|
|
16
|
+
const lines = [];
|
|
17
|
+
if (role.system_prompt_template) {
|
|
18
|
+
lines.push(role.system_prompt_template);
|
|
19
|
+
lines.push('');
|
|
20
|
+
}
|
|
21
|
+
return lines;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Build the domain boundaries section from allowed file patterns.
|
|
25
|
+
*/
|
|
26
|
+
export function buildDomainBoundariesSection(role) {
|
|
27
|
+
const lines = [];
|
|
28
|
+
if (role.allowed_file_patterns.length > 0) {
|
|
29
|
+
lines.push('## Domain Boundaries');
|
|
30
|
+
lines.push('You are authorized to work on files matching these patterns:');
|
|
31
|
+
for (const pattern of role.allowed_file_patterns) {
|
|
32
|
+
lines.push(`- ${pattern}`);
|
|
33
|
+
}
|
|
34
|
+
lines.push('');
|
|
35
|
+
}
|
|
36
|
+
return lines;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Build the team lead role description section.
|
|
40
|
+
*/
|
|
41
|
+
export function buildTeamLeadRoleSection() {
|
|
42
|
+
return [
|
|
43
|
+
'## Your Role: Strategy Team Lead',
|
|
44
|
+
'',
|
|
45
|
+
'You are the team lead for this strategy. You coordinate all deliveries',
|
|
46
|
+
'and their issues, spawning workers for parallel execution where possible.',
|
|
47
|
+
'',
|
|
48
|
+
'**Core responsibilities:**',
|
|
49
|
+
'1. Read all deliveries and issues for the strategy',
|
|
50
|
+
'2. Build a task execution plan respecting delivery priority and file overlap',
|
|
51
|
+
'3. Spawn workers (using the Task tool) for parallelizable work',
|
|
52
|
+
'4. Track issue completion and advance delivery stages',
|
|
53
|
+
'5. Poll for new deliveries added during execution',
|
|
54
|
+
'6. Handle errors, escalate blockers, and report progress',
|
|
55
|
+
'',
|
|
56
|
+
];
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Build the read-only audit mode notice section.
|
|
60
|
+
* Returns empty array if not in read-only mode.
|
|
61
|
+
*/
|
|
62
|
+
export function buildReadOnlyAuditSection(readOnly) {
|
|
63
|
+
if (!readOnly)
|
|
64
|
+
return [];
|
|
65
|
+
return [
|
|
66
|
+
'## READ-ONLY AUDIT MODE',
|
|
67
|
+
'',
|
|
68
|
+
'This is a read-only audit session. The filesystem allows reading but commits',
|
|
69
|
+
'are blocked by a pre-commit hook. Your job is DISCOVERY ONLY:',
|
|
70
|
+
'',
|
|
71
|
+
'- Identify and document problems by creating issues via MCP tools',
|
|
72
|
+
'- Create exactly ONE remediation delivery per audit delivery via',
|
|
73
|
+
' telora_product_delivery_create (execution_status: "planning")',
|
|
74
|
+
'- Use Context Groups to organize findings within remediation deliveries',
|
|
75
|
+
'- Do NOT modify, fix, or commit any code changes',
|
|
76
|
+
'- Do NOT attempt to bypass the pre-commit hook',
|
|
77
|
+
'',
|
|
78
|
+
'If you try to commit, the hook will reject it with a reminder of these rules.',
|
|
79
|
+
'',
|
|
80
|
+
];
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Build the strategy context section (strategy ID, name, product ID).
|
|
84
|
+
*/
|
|
85
|
+
export function buildStrategyContextSection(context) {
|
|
86
|
+
return [
|
|
87
|
+
'## Strategy',
|
|
88
|
+
`**Strategy ID:** ${context.strategyId}`,
|
|
89
|
+
`**Strategy:** ${context.strategyName}`,
|
|
90
|
+
`**Product ID:** ${context.productId}`,
|
|
91
|
+
'',
|
|
92
|
+
];
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Build the product context documents section.
|
|
96
|
+
* Deduplicates documents by title. Returns empty array if no docs.
|
|
97
|
+
*/
|
|
98
|
+
export function buildProductContextSection(docs) {
|
|
99
|
+
if (!docs || docs.length === 0)
|
|
100
|
+
return [];
|
|
101
|
+
const seen = new Set();
|
|
102
|
+
const uniqueDocs = [];
|
|
103
|
+
for (const doc of docs) {
|
|
104
|
+
if (!seen.has(doc.title)) {
|
|
105
|
+
seen.add(doc.title);
|
|
106
|
+
uniqueDocs.push(doc);
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
const lines = [];
|
|
110
|
+
lines.push('## Product Context');
|
|
111
|
+
lines.push('');
|
|
112
|
+
for (const doc of uniqueDocs) {
|
|
113
|
+
lines.push(`### ${doc.title}`);
|
|
114
|
+
lines.push(doc.content);
|
|
115
|
+
lines.push('');
|
|
116
|
+
}
|
|
117
|
+
return lines;
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* Build the deployment profile section (inception prompt + guidelines).
|
|
121
|
+
* Returns empty array if no snapshot provided.
|
|
122
|
+
*/
|
|
123
|
+
export function buildDeploymentProfileSection(snapshot) {
|
|
124
|
+
if (!snapshot)
|
|
125
|
+
return [];
|
|
126
|
+
const lines = [];
|
|
127
|
+
const { inceptionPrompt, guidelines } = snapshot;
|
|
128
|
+
if (inceptionPrompt) {
|
|
129
|
+
lines.push('## Deployment Profile: Operational Context');
|
|
130
|
+
lines.push('');
|
|
131
|
+
lines.push(inceptionPrompt);
|
|
132
|
+
lines.push('');
|
|
133
|
+
}
|
|
134
|
+
if (guidelines) {
|
|
135
|
+
lines.push('## Deployment Constraints');
|
|
136
|
+
lines.push('');
|
|
137
|
+
lines.push(guidelines);
|
|
138
|
+
lines.push('');
|
|
139
|
+
}
|
|
140
|
+
return lines;
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* Build the execution config section (max workers, poll interval).
|
|
144
|
+
*/
|
|
145
|
+
export function buildExecutionConfigSection(config) {
|
|
146
|
+
return [
|
|
147
|
+
'## Execution Config',
|
|
148
|
+
`- Max parallel workers: ${config.maxWorkers}`,
|
|
149
|
+
`- Idle poll interval: ${config.idlePollIntervalMs / 1000}s`,
|
|
150
|
+
'',
|
|
151
|
+
];
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
154
|
+
* Build the delivery listing sections: other deliveries (brief) + team deliveries (detailed).
|
|
155
|
+
*
|
|
156
|
+
* Partitions deliveries into team work (queued/coding) and other (human-owned).
|
|
157
|
+
* Renders issue counts, context groups, and standalone issues for team deliveries.
|
|
158
|
+
*/
|
|
159
|
+
export function buildDeliveryListingSection(deliveries, issues) {
|
|
160
|
+
const lines = [];
|
|
161
|
+
const TEAM_WORK_STATUSES = new Set(['queued', 'coding']);
|
|
162
|
+
const sortedDeliveries = [...deliveries].sort((a, b) => a.priorityRank - b.priorityRank);
|
|
163
|
+
// In-progress (coding) deliveries first -- resume interrupted work before pulling new
|
|
164
|
+
const codingDeliveries = sortedDeliveries.filter(d => d.executionStatus === 'coding');
|
|
165
|
+
const queuedDeliveries = sortedDeliveries.filter(d => d.executionStatus === 'queued');
|
|
166
|
+
const teamDeliveries = [...codingDeliveries, ...queuedDeliveries];
|
|
167
|
+
const otherDeliveries = sortedDeliveries.filter(d => !TEAM_WORK_STATUSES.has(d.executionStatus ?? ''));
|
|
168
|
+
// Other deliveries summary (brief -- saves context window)
|
|
169
|
+
if (otherDeliveries.length > 0) {
|
|
170
|
+
lines.push('## Other Deliveries (NOT your work)');
|
|
171
|
+
lines.push('');
|
|
172
|
+
lines.push('These deliveries are in human-owned states. Do NOT work on them.');
|
|
173
|
+
lines.push('');
|
|
174
|
+
for (const delivery of otherDeliveries) {
|
|
175
|
+
lines.push(`- **${delivery.name}** [${delivery.executionStatus}]`);
|
|
176
|
+
}
|
|
177
|
+
lines.push('');
|
|
178
|
+
}
|
|
179
|
+
// Team deliveries with full detail
|
|
180
|
+
lines.push('## Your Deliveries');
|
|
181
|
+
lines.push('');
|
|
182
|
+
if (teamDeliveries.length === 0) {
|
|
183
|
+
lines.push('No queued or in-progress deliveries. Poll for new queued deliveries.');
|
|
184
|
+
lines.push('');
|
|
185
|
+
}
|
|
186
|
+
else {
|
|
187
|
+
if (codingDeliveries.length > 0) {
|
|
188
|
+
lines.push(`**${codingDeliveries.length} in-progress delivery(ies) \u2014 resume these first.**`);
|
|
189
|
+
lines.push('These were interrupted (daemon restart). Complete them before pulling from the queue.');
|
|
190
|
+
lines.push('');
|
|
191
|
+
}
|
|
192
|
+
if (queuedDeliveries.length > 0) {
|
|
193
|
+
lines.push(`${queuedDeliveries.length} queued delivery(ies) waiting.`);
|
|
194
|
+
}
|
|
195
|
+
lines.push('Within each group, deliveries are in priority order (first = highest priority).');
|
|
196
|
+
lines.push('');
|
|
197
|
+
}
|
|
198
|
+
for (const delivery of teamDeliveries) {
|
|
199
|
+
const status = delivery.executionStatus ?? 'draft';
|
|
200
|
+
lines.push(`### ${delivery.name} [${status}]`);
|
|
201
|
+
lines.push(`**Delivery ID:** ${delivery.id}`);
|
|
202
|
+
// Compact issue summary -- counts by status + one-liner per issue
|
|
203
|
+
const deliveryIssues = issues.filter(i => i.deliveryId === delivery.id);
|
|
204
|
+
const actionableIssues = deliveryIssues.filter(i => i.issueType !== 'Context Group');
|
|
205
|
+
const contextGroups = deliveryIssues.filter(i => i.issueType === 'Context Group');
|
|
206
|
+
const standalone = deliveryIssues.filter(i => i.issueType !== 'Context Group' && !i.parentIssueId);
|
|
207
|
+
// Issue count summary
|
|
208
|
+
if (actionableIssues.length > 0) {
|
|
209
|
+
const statusCounts = new Map();
|
|
210
|
+
for (const issue of actionableIssues) {
|
|
211
|
+
statusCounts.set(issue.status, (statusCounts.get(issue.status) ?? 0) + 1);
|
|
212
|
+
}
|
|
213
|
+
const countParts = [];
|
|
214
|
+
for (const s of ['To Do', 'In Progress', 'Done', 'Blocked', 'In Review']) {
|
|
215
|
+
const count = statusCounts.get(s);
|
|
216
|
+
if (count !== undefined) {
|
|
217
|
+
countParts.push(`${count} ${s}`);
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
lines.push(`**Issues (${countParts.join(', ')}):**`);
|
|
221
|
+
}
|
|
222
|
+
// Context groups with children as one-liners (include dependency info)
|
|
223
|
+
for (const group of contextGroups) {
|
|
224
|
+
const children = deliveryIssues.filter(i => i.parentIssueId === group.id);
|
|
225
|
+
const depsSuffix = group.dependsOn && group.dependsOn.length > 0
|
|
226
|
+
? ` [depends on: ${group.dependsOn.map(depId => {
|
|
227
|
+
const depCg = contextGroups.find(cg => cg.id === depId);
|
|
228
|
+
return depCg ? `"${depCg.title}"` : depId;
|
|
229
|
+
}).join(', ')}]`
|
|
230
|
+
: '';
|
|
231
|
+
if (children.length > 0) {
|
|
232
|
+
const childSummaries = children.map(c => `${c.key} (${c.status})`).join(', ');
|
|
233
|
+
lines.push(` Context Group: "${group.title}"${depsSuffix} -- children: ${childSummaries}`);
|
|
234
|
+
}
|
|
235
|
+
else {
|
|
236
|
+
lines.push(` Context Group: "${group.title}"${depsSuffix}`);
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
// Standalone issues as one-liners
|
|
240
|
+
for (const issue of standalone) {
|
|
241
|
+
lines.push(` - ${issue.key}: ${issue.title} (${issue.status})`);
|
|
242
|
+
}
|
|
243
|
+
lines.push('');
|
|
244
|
+
}
|
|
245
|
+
return lines;
|
|
246
|
+
}
|
|
247
|
+
/**
|
|
248
|
+
* Build the mandatory status update rules section.
|
|
249
|
+
*/
|
|
250
|
+
export function buildStatusUpdateRulesSection() {
|
|
251
|
+
return [
|
|
252
|
+
'## Status Update Rules (MANDATORY)',
|
|
253
|
+
'',
|
|
254
|
+
'These rules apply to ALL work -- whether you do it directly or via spawned workers.',
|
|
255
|
+
'',
|
|
256
|
+
'**Delivery status (HANDS OFF):**',
|
|
257
|
+
'- NEVER call `telora_product_delivery_update` to change `executionStatus`.',
|
|
258
|
+
'- The daemon manages ALL delivery stage transitions automatically:',
|
|
259
|
+
' - queued -> coding: database trigger when first issue moves to "In Progress"',
|
|
260
|
+
' - coding -> verify: daemon advances when all issues are Done',
|
|
261
|
+
' - verify -> done: daemon advances after verification passes',
|
|
262
|
+
'- The API will REJECT invalid transitions with a 400 error.',
|
|
263
|
+
'- Your only job is to keep issue statuses accurate. Delivery status follows.',
|
|
264
|
+
'',
|
|
265
|
+
'**Issue status transitions:**',
|
|
266
|
+
'- Every issue MUST follow: To Do -> In Progress -> Done',
|
|
267
|
+
'- NEVER skip "In Progress". An issue MUST be set to "In Progress" BEFORE any',
|
|
268
|
+
' work begins on it.',
|
|
269
|
+
'- NEVER move an issue directly from "To Do" to "Done".',
|
|
270
|
+
'- Use `telora_product_issue_update` with `issueId` and `status`:',
|
|
271
|
+
' - Start work: `{ "issueId": "<id>", "status": "In Progress" }`',
|
|
272
|
+
' - Finish work: `{ "issueId": "<id>", "status": "Done" }`',
|
|
273
|
+
' - Blocked: `{ "issueId": "<id>", "status": "Blocked" }`',
|
|
274
|
+
'',
|
|
275
|
+
'**When working directly on an issue** (not spawning a worker):',
|
|
276
|
+
'1. Call `telora_product_issue_update` to set status to "In Progress"',
|
|
277
|
+
'2. Do the work',
|
|
278
|
+
'3. Call `telora_product_issue_update` to set status to "Done"',
|
|
279
|
+
'',
|
|
280
|
+
'**When spawning a worker for an issue:**',
|
|
281
|
+
'1. Set issue to "In Progress" BEFORE spawning the worker',
|
|
282
|
+
'2. When the worker completes, verify its output',
|
|
283
|
+
'3. Set issue to "Done" after verification',
|
|
284
|
+
'',
|
|
285
|
+
];
|
|
286
|
+
}
|
|
287
|
+
/**
|
|
288
|
+
* Build the execution instructions section (Phase 1: Setup).
|
|
289
|
+
*/
|
|
290
|
+
export function buildExecutionInstructionsSection(productId) {
|
|
291
|
+
return [
|
|
292
|
+
'## Execution Instructions',
|
|
293
|
+
'',
|
|
294
|
+
'### Phase 1: Setup',
|
|
295
|
+
'1. Read the CLAUDE.md file at the repo root for repository conventions',
|
|
296
|
+
'2. Review all deliveries and issues above to understand the full scope',
|
|
297
|
+
`3. Before starting work on each delivery, fetch its full details: use \`telora_product_delivery_list\` with productId "${productId}" and look for the delivery by ID to read its description, acceptance criteria, and technical context.`,
|
|
298
|
+
`4. Before working on a context group's issues, fetch the group's full context and relevant files using \`telora_product_issue_list\` with the delivery's ID.`,
|
|
299
|
+
`5. Use \`telora_product_issue_list\` with productId "${productId}" to get the latest issue states`,
|
|
300
|
+
'6. Plan your execution order:',
|
|
301
|
+
' - Higher priority deliveries first (lower priorityRank number)',
|
|
302
|
+
' - Within a delivery, issues under the same Context Group can be parallelized',
|
|
303
|
+
' - Issues that share relevant files MUST be done sequentially',
|
|
304
|
+
' - Context Groups with `depends on` annotations MUST execute in order:',
|
|
305
|
+
' all issues under dependency CGs must complete before starting issues',
|
|
306
|
+
' under the dependent CG. Independent CGs (no depends_on) can run in parallel.',
|
|
307
|
+
' - Issues across different independent Context Groups with no file overlap can run in parallel',
|
|
308
|
+
' - **Between deliveries**: After committing a delivery, run the full build and',
|
|
309
|
+
' test suite (`npm run build && npm test`) before starting the next delivery.',
|
|
310
|
+
' Fix any cross-delivery breakage immediately. This catches integration issues',
|
|
311
|
+
' (e.g. renamed symbols, shifted phases) before they compound.',
|
|
312
|
+
'',
|
|
313
|
+
];
|
|
314
|
+
}
|
|
315
|
+
/**
|
|
316
|
+
* Build the worker management section (Phase 2 / TEL-4).
|
|
317
|
+
*/
|
|
318
|
+
export function buildWorkerManagementSection(maxWorkers) {
|
|
319
|
+
return [
|
|
320
|
+
'### Phase 2: Worker Management',
|
|
321
|
+
'',
|
|
322
|
+
'You manage worker execution using the Task tool. Workers are subagents',
|
|
323
|
+
'that execute individual issues.',
|
|
324
|
+
'',
|
|
325
|
+
'**Spawning workers:**',
|
|
326
|
+
`- Spawn up to ${maxWorkers} workers at a time`,
|
|
327
|
+
'- Only spawn workers for issues that are currently unblocked (all dependencies complete)',
|
|
328
|
+
'- Each worker receives a clear prompt with:',
|
|
329
|
+
' - The issue key, title, and description',
|
|
330
|
+
' - Context from the parent Context Group (if any)',
|
|
331
|
+
' - Relevant files to focus on',
|
|
332
|
+
' - Instructions to update issue status via `telora_product_issue_update`',
|
|
333
|
+
' - Instructions to commit work and report completion',
|
|
334
|
+
'',
|
|
335
|
+
'**Worker lifecycle:**',
|
|
336
|
+
'- Before spawning: set issue status to "In Progress" via `telora_product_issue_update`',
|
|
337
|
+
'- When worker completes: verify its work, then set issue status to "Done"',
|
|
338
|
+
'- When worker fails: assess the failure, either retry or set issue to "Blocked"',
|
|
339
|
+
' and create an escalation via `telora_agent_escalate`',
|
|
340
|
+
'- After each worker completion, check if new issues are now unblocked',
|
|
341
|
+
'',
|
|
342
|
+
'**Scaling rules:**',
|
|
343
|
+
'- Count unblocked issues (status "To Do" with no blocking dependencies)',
|
|
344
|
+
`- Active workers = min(unblocked count, ${maxWorkers})`,
|
|
345
|
+
'- As workers complete tasks and new tasks become unblocked, spawn more workers',
|
|
346
|
+
'- When no unblocked work remains, wait for in-progress workers to finish',
|
|
347
|
+
'',
|
|
348
|
+
'**Simple issues (no parallelism needed):**',
|
|
349
|
+
'- If a delivery has only 1-2 small issues, you can work on them directly',
|
|
350
|
+
' instead of spawning workers. Use your judgment.',
|
|
351
|
+
'- IMPORTANT: Even when working directly, you MUST still update issue status.',
|
|
352
|
+
' Set to "In Progress" before starting, then "Done" when complete.',
|
|
353
|
+
'',
|
|
354
|
+
];
|
|
355
|
+
}
|
|
356
|
+
/**
|
|
357
|
+
* Build the delivery stage progression section (Phase 3 / TEL-5).
|
|
358
|
+
*/
|
|
359
|
+
export function buildDeliveryStageProgressionSection() {
|
|
360
|
+
return [
|
|
361
|
+
'### Phase 3: Delivery Stage Progression',
|
|
362
|
+
'',
|
|
363
|
+
'Delivery stages advance **automatically** based on issue activity:',
|
|
364
|
+
'',
|
|
365
|
+
'- When an issue moves to "In Progress", the parent delivery auto-advances',
|
|
366
|
+
' from "queued" to "coding" via a database trigger. You do NOT need to',
|
|
367
|
+
' update delivery status manually for this transition.',
|
|
368
|
+
'- Track issue completion per delivery using `telora_product_issue_list`.',
|
|
369
|
+
'',
|
|
370
|
+
'**When ALL issues in a delivery are Done:**',
|
|
371
|
+
'1. Commit all changes for the delivery',
|
|
372
|
+
'2. The daemon will automatically advance the delivery from coding to verify',
|
|
373
|
+
'3. Do NOT attempt to update the delivery executionStatus yourself',
|
|
374
|
+
'',
|
|
375
|
+
'**Delivery status reporting:**',
|
|
376
|
+
'- The daemon manages ALL delivery stage transitions. Do NOT update them.',
|
|
377
|
+
'- queued -> coding: handled automatically by database trigger (no action needed).',
|
|
378
|
+
'- coding -> verify -> done: handled automatically by the daemon.',
|
|
379
|
+
'- Focus on keeping issue statuses accurate -- the delivery status follows from them.',
|
|
380
|
+
'',
|
|
381
|
+
];
|
|
382
|
+
}
|
|
383
|
+
/**
|
|
384
|
+
* Build the rescoping and splitting deliveries section.
|
|
385
|
+
*/
|
|
386
|
+
export function buildRescopingSection(strategyId, productId) {
|
|
387
|
+
return [
|
|
388
|
+
'### Rescoping and Splitting Deliveries',
|
|
389
|
+
'',
|
|
390
|
+
'You are encouraged to restructure work as you learn more about the codebase. If a delivery is larger than expected, split it. If an issue is unnecessary, close it. If you discover new work, create issues for it.',
|
|
391
|
+
'',
|
|
392
|
+
'**Splitting a delivery:**',
|
|
393
|
+
`1. Create new deliveries via telora_product_delivery_create (same strategyId: "${strategyId}", productId: "${productId}")`,
|
|
394
|
+
'2. Create issues under the new deliveries via telora_product_issue_create',
|
|
395
|
+
"3. Mark the original delivery's remaining issues as Done (if moved) or close as won't-do",
|
|
396
|
+
'4. The daemon will automatically pick up new deliveries',
|
|
397
|
+
'',
|
|
398
|
+
'**Adding issues:**',
|
|
399
|
+
'- Create new issues on any delivery you are working on via telora_product_issue_create',
|
|
400
|
+
"- Set status to 'To Do' -- they will be picked up in your current execution",
|
|
401
|
+
'',
|
|
402
|
+
'**Descoping issues:**',
|
|
403
|
+
"- Mark issues as Done with a description note explaining why they were descoped (e.g., 'Descoped: not needed because X')",
|
|
404
|
+
'- Do not leave orphan issues -- always update status',
|
|
405
|
+
"- Known limitation: there is no 'Won't Do' status. Using Done with a note is the convention for now. The description note is important for audit trail.",
|
|
406
|
+
'',
|
|
407
|
+
'**Do not ask for permission to rescope.** Restructure autonomously based on what you learn.',
|
|
408
|
+
'',
|
|
409
|
+
];
|
|
410
|
+
}
|
|
411
|
+
/**
|
|
412
|
+
* Build the new work delivery section (Phase 5 -- daemon-push model).
|
|
413
|
+
*/
|
|
414
|
+
export function buildNewWorkDeliverySection() {
|
|
415
|
+
return [
|
|
416
|
+
'### Phase 5: New Work Delivery',
|
|
417
|
+
'',
|
|
418
|
+
'You do NOT need to poll for new work. The daemon monitors for new deliveries',
|
|
419
|
+
'and will send them to you directly via a "New Work Available" message.',
|
|
420
|
+
'',
|
|
421
|
+
'When you receive a "New Work Available" message:',
|
|
422
|
+
'1. Read the new deliveries and their issues listed in the message',
|
|
423
|
+
'2. Integrate them into your execution plan respecting priority ordering',
|
|
424
|
+
'3. Higher priority deliveries go next, but do not preempt in-progress work',
|
|
425
|
+
'4. Stop any pending work for cancelled deliveries',
|
|
426
|
+
'',
|
|
427
|
+
'Do NOT call `telora_product_delivery_list` to poll for new deliveries.',
|
|
428
|
+
'The daemon is the sole control plane and will push work to you when available.',
|
|
429
|
+
'',
|
|
430
|
+
];
|
|
431
|
+
}
|
|
432
|
+
/**
|
|
433
|
+
* Build the error handling and escalation section (TEL-6).
|
|
434
|
+
*/
|
|
435
|
+
export function buildErrorHandlingSection() {
|
|
436
|
+
return [
|
|
437
|
+
'### Error Handling',
|
|
438
|
+
'',
|
|
439
|
+
'- **Worker failure**: If a worker fails on an issue, assess whether to retry',
|
|
440
|
+
' or escalate. Set the issue to "Blocked" and use `telora_agent_escalate`',
|
|
441
|
+
' if the issue requires human intervention.',
|
|
442
|
+
'- **Build/test failures**: Fix them before moving on. If you cannot fix them,',
|
|
443
|
+
' escalate with details about what failed.',
|
|
444
|
+
'- **Merge conflicts**: If you encounter merge conflicts during commits,',
|
|
445
|
+
' resolve them and continue. If resolution is unclear, escalate.',
|
|
446
|
+
'- **Discovered work**: If you find work not covered by existing issues,',
|
|
447
|
+
' create new issues using `telora_product_issue_create` under the relevant delivery.',
|
|
448
|
+
'',
|
|
449
|
+
];
|
|
450
|
+
}
|
|
451
|
+
/**
|
|
452
|
+
* Build the merge conflict resolution protocol section.
|
|
453
|
+
*/
|
|
454
|
+
export function buildMergeConflictSection() {
|
|
455
|
+
return [
|
|
456
|
+
'### Merge Conflict Resolution',
|
|
457
|
+
'',
|
|
458
|
+
'During your session, you may receive a message asking you to resolve merge',
|
|
459
|
+
'conflicts. This means the integration branch has changes that conflict with',
|
|
460
|
+
'your strategy branch. When you receive this:',
|
|
461
|
+
'',
|
|
462
|
+
'1. Open each conflicted file listed in the message',
|
|
463
|
+
'2. Resolve all conflict markers (<<<<<<< / ======= / >>>>>>>)',
|
|
464
|
+
'3. Stage each resolved file with `git add <file>`',
|
|
465
|
+
'4. Commit the merge resolution: `git commit --no-edit`',
|
|
466
|
+
'5. Run: `npm run build && npm test`',
|
|
467
|
+
'6. If build+test fails, fix the issues, commit, and re-run',
|
|
468
|
+
'',
|
|
469
|
+
'Do NOT run `git merge --abort`. Your goal is to produce a clean merge',
|
|
470
|
+
'commit that passes build and tests. The daemon will detect resolution',
|
|
471
|
+
'automatically when the merge commit is created and no unmerged files remain.',
|
|
472
|
+
'',
|
|
473
|
+
];
|
|
474
|
+
}
|
|
475
|
+
/**
|
|
476
|
+
* Build the completion section.
|
|
477
|
+
*/
|
|
478
|
+
export function buildCompletionSection() {
|
|
479
|
+
return [
|
|
480
|
+
'### Completion',
|
|
481
|
+
'',
|
|
482
|
+
'When ALL issues across ALL deliveries are Done:',
|
|
483
|
+
'1. Run a final build and test to verify everything works together',
|
|
484
|
+
'2. Commit any final changes',
|
|
485
|
+
'3. Summarize the changes made across all deliveries',
|
|
486
|
+
'4. Wait for further instructions. The daemon manages your lifecycle.',
|
|
487
|
+
'',
|
|
488
|
+
'Do NOT exit on your own. The daemon will send new work or terminate you.',
|
|
489
|
+
'',
|
|
490
|
+
];
|
|
491
|
+
}
|
|
492
|
+
// ---------------------------------------------------------------------------
|
|
493
|
+
// Main prompt composition
|
|
494
|
+
// ---------------------------------------------------------------------------
|
|
495
|
+
/**
|
|
496
|
+
* Build the prompt for the strategy team lead agent.
|
|
497
|
+
*
|
|
498
|
+
* Composes the prompt from individual section builders for maintainability.
|
|
499
|
+
* The output is identical to the original monolithic implementation.
|
|
500
|
+
*/
|
|
501
|
+
export function buildStrategyTeamPrompt(role, context) {
|
|
502
|
+
const sections = [
|
|
503
|
+
buildRoleSection(role),
|
|
504
|
+
buildDomainBoundariesSection(role),
|
|
505
|
+
buildTeamLeadRoleSection(),
|
|
506
|
+
buildReadOnlyAuditSection(context.readOnly),
|
|
507
|
+
buildStrategyContextSection(context),
|
|
508
|
+
buildProductContextSection(context.productContextDocs),
|
|
509
|
+
buildDeploymentProfileSection(context.deploymentProfileSnapshot),
|
|
510
|
+
buildExecutionConfigSection(context.executionConfig),
|
|
511
|
+
buildDeliveryListingSection(context.deliveries, context.issues),
|
|
512
|
+
buildStatusUpdateRulesSection(),
|
|
513
|
+
buildExecutionInstructionsSection(context.productId),
|
|
514
|
+
buildWorkerManagementSection(context.executionConfig.maxWorkers),
|
|
515
|
+
buildDeliveryStageProgressionSection(),
|
|
516
|
+
buildRescopingSection(context.strategyId, context.productId),
|
|
517
|
+
buildNewWorkDeliverySection(),
|
|
518
|
+
buildErrorHandlingSection(),
|
|
519
|
+
buildMergeConflictSection(),
|
|
520
|
+
buildCompletionSection(),
|
|
521
|
+
];
|
|
522
|
+
// Flatten all section line arrays into a single array and join
|
|
523
|
+
const parts = [];
|
|
524
|
+
for (const section of sections) {
|
|
525
|
+
for (const line of section) {
|
|
526
|
+
parts.push(line);
|
|
527
|
+
}
|
|
528
|
+
}
|
|
529
|
+
return parts.join('\n');
|
|
530
|
+
}
|
|
531
|
+
//# sourceMappingURL=team-prompt-base.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"team-prompt-base.js","sourceRoot":"","sources":["../src/team-prompt-base.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AA+BH,8EAA8E;AAC9E,+EAA+E;AAC/E,8EAA8E;AAE9E;;GAEG;AACH,MAAM,UAAU,gBAAgB,CAAC,IAAe;IAC9C,MAAM,KAAK,GAAa,EAAE,CAAC;IAC3B,IAAI,IAAI,CAAC,sBAAsB,EAAE,CAAC;QAChC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,sBAAsB,CAAC,CAAC;QACxC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACjB,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,4BAA4B,CAAC,IAAe;IAC1D,MAAM,KAAK,GAAa,EAAE,CAAC;IAC3B,IAAI,IAAI,CAAC,qBAAqB,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAC1C,KAAK,CAAC,IAAI,CAAC,sBAAsB,CAAC,CAAC;QACnC,KAAK,CAAC,IAAI,CAAC,8DAA8D,CAAC,CAAC;QAC3E,KAAK,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ACnB,CAAC;IACH,CAAC;IAED,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Strategy team prompt variants.
|
|
3
|
+
*
|
|
4
|
+
* Contains functions that build non-planning prompt variants sent to
|
|
5
|
+
* active strategy teams: wake messages for new work delivery and
|
|
6
|
+
* review directives for code review sessions.
|
|
7
|
+
*
|
|
8
|
+
* Extracted from strategy-prompt-builder.ts for maintainability.
|
|
9
|
+
*/
|
|
10
|
+
import type { StrategyDeliveryInfo, StrategyIssueInfo } from './types.js';
|
|
11
|
+
/**
|
|
12
|
+
* Build a wake message for an idle team when new work is available.
|
|
13
|
+
*
|
|
14
|
+
* The team already has role context and execution instructions from the
|
|
15
|
+
* initial prompt. This message is a lean update with just the new work.
|
|
16
|
+
*/
|
|
17
|
+
export declare function buildWakeMessage(deliveries: StrategyDeliveryInfo[], issues: StrategyIssueInfo[], knownDeliveryIds: Set<string>): string;
|
|
18
|
+
/**
|
|
19
|
+
* Build a review directive for an active team.
|
|
20
|
+
*
|
|
21
|
+
* Sent via stdin when a user clicks "Review N" or when auto-review
|
|
22
|
+
* is triggered after all deliveries reach verify. The team lead
|
|
23
|
+
* examines code changes against scope and creates remediation issues
|
|
24
|
+
* or a new remediation delivery.
|
|
25
|
+
*/
|
|
26
|
+
export declare function buildReviewDirective(deliveries: StrategyDeliveryInfo[], issues: StrategyIssueInfo[]): string;
|
|
27
|
+
//# sourceMappingURL=team-prompt-variants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"team-prompt-variants.d.ts","sourceRoot":"","sources":["../src/team-prompt-variants.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EACV,oBAAoB,EACpB,iBAAiB,EAClB,MAAM,YAAY,CAAC;AAEpB;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAC9B,UAAU,EAAE,oBAAoB,EAAE,EAClC,MAAM,EAAE,iBAAiB,EAAE,EAC3B,gBAAgB,EAAE,GAAG,CAAC,MAAM,CAAC,GAC5B,MAAM,CAyER;AAED;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAClC,UAAU,EAAE,oBAAoB,EAAE,EAClC,MAAM,EAAE,iBAAiB,EAAE,GAC1B,MAAM,CAkDR"}
|