@cat-factory/orchestration 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (182) hide show
  1. package/LICENSE +21 -0
  2. package/dist/container.d.ts +460 -0
  3. package/dist/container.d.ts.map +1 -0
  4. package/dist/container.js +657 -0
  5. package/dist/container.js.map +1 -0
  6. package/dist/index.d.ts +29 -0
  7. package/dist/index.d.ts.map +1 -0
  8. package/dist/index.js +31 -0
  9. package/dist/index.js.map +1 -0
  10. package/dist/modules/board/BoardService.d.ts +125 -0
  11. package/dist/modules/board/BoardService.d.ts.map +1 -0
  12. package/dist/modules/board/BoardService.js +496 -0
  13. package/dist/modules/board/BoardService.js.map +1 -0
  14. package/dist/modules/board/board.logic.d.ts +17 -0
  15. package/dist/modules/board/board.logic.d.ts.map +1 -0
  16. package/dist/modules/board/board.logic.js +51 -0
  17. package/dist/modules/board/board.logic.js.map +1 -0
  18. package/dist/modules/boardScan/BoardScanService.d.ts +35 -0
  19. package/dist/modules/boardScan/BoardScanService.d.ts.map +1 -0
  20. package/dist/modules/boardScan/BoardScanService.js +91 -0
  21. package/dist/modules/boardScan/BoardScanService.js.map +1 -0
  22. package/dist/modules/boardScan/board-scan.logic.d.ts +10 -0
  23. package/dist/modules/boardScan/board-scan.logic.d.ts.map +1 -0
  24. package/dist/modules/boardScan/board-scan.logic.js +26 -0
  25. package/dist/modules/boardScan/board-scan.logic.js.map +1 -0
  26. package/dist/modules/bootstrap/BootstrapService.d.ts +114 -0
  27. package/dist/modules/bootstrap/BootstrapService.d.ts.map +1 -0
  28. package/dist/modules/bootstrap/BootstrapService.js +516 -0
  29. package/dist/modules/bootstrap/BootstrapService.js.map +1 -0
  30. package/dist/modules/clarity/ClarityReviewService.d.ts +48 -0
  31. package/dist/modules/clarity/ClarityReviewService.d.ts.map +1 -0
  32. package/dist/modules/clarity/ClarityReviewService.js +63 -0
  33. package/dist/modules/clarity/ClarityReviewService.js.map +1 -0
  34. package/dist/modules/clarity/clarity.logic.d.ts +36 -0
  35. package/dist/modules/clarity/clarity.logic.d.ts.map +1 -0
  36. package/dist/modules/clarity/clarity.logic.js +98 -0
  37. package/dist/modules/clarity/clarity.logic.js.map +1 -0
  38. package/dist/modules/estimation/estimate.logic.d.ts +11 -0
  39. package/dist/modules/estimation/estimate.logic.d.ts.map +1 -0
  40. package/dist/modules/estimation/estimate.logic.js +37 -0
  41. package/dist/modules/estimation/estimate.logic.js.map +1 -0
  42. package/dist/modules/execution/AgentContextBuilder.d.ts +114 -0
  43. package/dist/modules/execution/AgentContextBuilder.d.ts.map +1 -0
  44. package/dist/modules/execution/AgentContextBuilder.js +316 -0
  45. package/dist/modules/execution/AgentContextBuilder.js.map +1 -0
  46. package/dist/modules/execution/CompanionController.d.ts +60 -0
  47. package/dist/modules/execution/CompanionController.d.ts.map +1 -0
  48. package/dist/modules/execution/CompanionController.js +216 -0
  49. package/dist/modules/execution/CompanionController.js.map +1 -0
  50. package/dist/modules/execution/ExecutionService.d.ts +874 -0
  51. package/dist/modules/execution/ExecutionService.d.ts.map +1 -0
  52. package/dist/modules/execution/ExecutionService.js +2921 -0
  53. package/dist/modules/execution/ExecutionService.js.map +1 -0
  54. package/dist/modules/execution/MergeResolver.d.ts +34 -0
  55. package/dist/modules/execution/MergeResolver.d.ts.map +1 -0
  56. package/dist/modules/execution/MergeResolver.js +81 -0
  57. package/dist/modules/execution/MergeResolver.js.map +1 -0
  58. package/dist/modules/execution/ReviewGateController.d.ts +163 -0
  59. package/dist/modules/execution/ReviewGateController.d.ts.map +1 -0
  60. package/dist/modules/execution/ReviewGateController.js +251 -0
  61. package/dist/modules/execution/ReviewGateController.js.map +1 -0
  62. package/dist/modules/execution/TesterController.d.ts +61 -0
  63. package/dist/modules/execution/TesterController.d.ts.map +1 -0
  64. package/dist/modules/execution/TesterController.js +215 -0
  65. package/dist/modules/execution/TesterController.js.map +1 -0
  66. package/dist/modules/execution/advance.d.ts +84 -0
  67. package/dist/modules/execution/advance.d.ts.map +1 -0
  68. package/dist/modules/execution/advance.js +2 -0
  69. package/dist/modules/execution/advance.js.map +1 -0
  70. package/dist/modules/execution/artifact-review.logic.d.ts +25 -0
  71. package/dist/modules/execution/artifact-review.logic.d.ts.map +1 -0
  72. package/dist/modules/execution/artifact-review.logic.js +39 -0
  73. package/dist/modules/execution/artifact-review.logic.js.map +1 -0
  74. package/dist/modules/execution/ci.logic.d.ts +101 -0
  75. package/dist/modules/execution/ci.logic.d.ts.map +1 -0
  76. package/dist/modules/execution/ci.logic.js +117 -0
  77. package/dist/modules/execution/ci.logic.js.map +1 -0
  78. package/dist/modules/execution/drive.d.ts +47 -0
  79. package/dist/modules/execution/drive.d.ts.map +1 -0
  80. package/dist/modules/execution/drive.js +112 -0
  81. package/dist/modules/execution/drive.js.map +1 -0
  82. package/dist/modules/execution/gates.d.ts +97 -0
  83. package/dist/modules/execution/gates.d.ts.map +1 -0
  84. package/dist/modules/execution/gates.js +2 -0
  85. package/dist/modules/execution/gates.js.map +1 -0
  86. package/dist/modules/execution/individualVendors.logic.d.ts +22 -0
  87. package/dist/modules/execution/individualVendors.logic.d.ts.map +1 -0
  88. package/dist/modules/execution/individualVendors.logic.js +33 -0
  89. package/dist/modules/execution/individualVendors.logic.js.map +1 -0
  90. package/dist/modules/execution/job.logic.d.ts +52 -0
  91. package/dist/modules/execution/job.logic.d.ts.map +1 -0
  92. package/dist/modules/execution/job.logic.js +56 -0
  93. package/dist/modules/execution/job.logic.js.map +1 -0
  94. package/dist/modules/execution/release.logic.d.ts +43 -0
  95. package/dist/modules/execution/release.logic.d.ts.map +1 -0
  96. package/dist/modules/execution/release.logic.js +49 -0
  97. package/dist/modules/execution/release.logic.js.map +1 -0
  98. package/dist/modules/execution/retry.logic.d.ts +40 -0
  99. package/dist/modules/execution/retry.logic.d.ts.map +1 -0
  100. package/dist/modules/execution/retry.logic.js +83 -0
  101. package/dist/modules/execution/retry.logic.js.map +1 -0
  102. package/dist/modules/execution/stepGating.logic.d.ts +15 -0
  103. package/dist/modules/execution/stepGating.logic.d.ts.map +1 -0
  104. package/dist/modules/execution/stepGating.logic.js +29 -0
  105. package/dist/modules/execution/stepGating.logic.js.map +1 -0
  106. package/dist/modules/execution/stepResolvers.d.ts +41 -0
  107. package/dist/modules/execution/stepResolvers.d.ts.map +1 -0
  108. package/dist/modules/execution/stepResolvers.js +2 -0
  109. package/dist/modules/execution/stepResolvers.js.map +1 -0
  110. package/dist/modules/execution/tester-infra.logic.d.ts +42 -0
  111. package/dist/modules/execution/tester-infra.logic.d.ts.map +1 -0
  112. package/dist/modules/execution/tester-infra.logic.js +46 -0
  113. package/dist/modules/execution/tester-infra.logic.js.map +1 -0
  114. package/dist/modules/merge/MergePresetService.d.ts +32 -0
  115. package/dist/modules/merge/MergePresetService.d.ts.map +1 -0
  116. package/dist/modules/merge/MergePresetService.js +109 -0
  117. package/dist/modules/merge/MergePresetService.js.map +1 -0
  118. package/dist/modules/modelDefaults/ModelDefaultsService.d.ts +22 -0
  119. package/dist/modules/modelDefaults/ModelDefaultsService.d.ts.map +1 -0
  120. package/dist/modules/modelDefaults/ModelDefaultsService.js +28 -0
  121. package/dist/modules/modelDefaults/ModelDefaultsService.js.map +1 -0
  122. package/dist/modules/notifications/NotificationService.d.ts +74 -0
  123. package/dist/modules/notifications/NotificationService.d.ts.map +1 -0
  124. package/dist/modules/notifications/NotificationService.js +131 -0
  125. package/dist/modules/notifications/NotificationService.js.map +1 -0
  126. package/dist/modules/observability/LlmObservabilityService.d.ts +121 -0
  127. package/dist/modules/observability/LlmObservabilityService.d.ts.map +1 -0
  128. package/dist/modules/observability/LlmObservabilityService.js +140 -0
  129. package/dist/modules/observability/LlmObservabilityService.js.map +1 -0
  130. package/dist/modules/observability/observability.logic.d.ts +57 -0
  131. package/dist/modules/observability/observability.logic.d.ts.map +1 -0
  132. package/dist/modules/observability/observability.logic.js +186 -0
  133. package/dist/modules/observability/observability.logic.js.map +1 -0
  134. package/dist/modules/pipelines/PipelineService.d.ts +54 -0
  135. package/dist/modules/pipelines/PipelineService.d.ts.map +1 -0
  136. package/dist/modules/pipelines/PipelineService.js +226 -0
  137. package/dist/modules/pipelines/PipelineService.js.map +1 -0
  138. package/dist/modules/pipelines/pipelineShape.d.ts +53 -0
  139. package/dist/modules/pipelines/pipelineShape.d.ts.map +1 -0
  140. package/dist/modules/pipelines/pipelineShape.js +74 -0
  141. package/dist/modules/pipelines/pipelineShape.js.map +1 -0
  142. package/dist/modules/recurring/RecurringPipelineService.d.ts +76 -0
  143. package/dist/modules/recurring/RecurringPipelineService.d.ts.map +1 -0
  144. package/dist/modules/recurring/RecurringPipelineService.js +295 -0
  145. package/dist/modules/recurring/RecurringPipelineService.js.map +1 -0
  146. package/dist/modules/recurring/TrackerSettingsService.d.ts +16 -0
  147. package/dist/modules/recurring/TrackerSettingsService.d.ts.map +1 -0
  148. package/dist/modules/recurring/TrackerSettingsService.js +30 -0
  149. package/dist/modules/recurring/TrackerSettingsService.js.map +1 -0
  150. package/dist/modules/recurring/schedule.logic.d.ts +14 -0
  151. package/dist/modules/recurring/schedule.logic.d.ts.map +1 -0
  152. package/dist/modules/recurring/schedule.logic.js +85 -0
  153. package/dist/modules/recurring/schedule.logic.js.map +1 -0
  154. package/dist/modules/releaseHealth/ReleaseHealthService.d.ts +38 -0
  155. package/dist/modules/releaseHealth/ReleaseHealthService.d.ts.map +1 -0
  156. package/dist/modules/releaseHealth/ReleaseHealthService.js +96 -0
  157. package/dist/modules/releaseHealth/ReleaseHealthService.js.map +1 -0
  158. package/dist/modules/requirements/RequirementReviewService.d.ts +48 -0
  159. package/dist/modules/requirements/RequirementReviewService.d.ts.map +1 -0
  160. package/dist/modules/requirements/RequirementReviewService.js +83 -0
  161. package/dist/modules/requirements/RequirementReviewService.js.map +1 -0
  162. package/dist/modules/requirements/requirements.logic.d.ts +93 -0
  163. package/dist/modules/requirements/requirements.logic.d.ts.map +1 -0
  164. package/dist/modules/requirements/requirements.logic.js +203 -0
  165. package/dist/modules/requirements/requirements.logic.js.map +1 -0
  166. package/dist/modules/review/IterativeReviewService.d.ts +175 -0
  167. package/dist/modules/review/IterativeReviewService.d.ts.map +1 -0
  168. package/dist/modules/review/IterativeReviewService.js +327 -0
  169. package/dist/modules/review/IterativeReviewService.js.map +1 -0
  170. package/dist/modules/serviceFragmentDefaults/ServiceFragmentDefaultsService.d.ts +20 -0
  171. package/dist/modules/serviceFragmentDefaults/ServiceFragmentDefaultsService.d.ts.map +1 -0
  172. package/dist/modules/serviceFragmentDefaults/ServiceFragmentDefaultsService.js +26 -0
  173. package/dist/modules/serviceFragmentDefaults/ServiceFragmentDefaultsService.js.map +1 -0
  174. package/dist/modules/services/ServiceMountService.d.ts +48 -0
  175. package/dist/modules/services/ServiceMountService.d.ts.map +1 -0
  176. package/dist/modules/services/ServiceMountService.js +90 -0
  177. package/dist/modules/services/ServiceMountService.js.map +1 -0
  178. package/dist/modules/settings/WorkspaceSettingsService.d.ts +22 -0
  179. package/dist/modules/settings/WorkspaceSettingsService.d.ts.map +1 -0
  180. package/dist/modules/settings/WorkspaceSettingsService.js +50 -0
  181. package/dist/modules/settings/WorkspaceSettingsService.js.map +1 -0
  182. package/package.json +41 -0
@@ -0,0 +1,63 @@
1
+ import { CLARITY_REVIEW_SYSTEM_PROMPT, CLARITY_REWORK_SYSTEM_PROMPT } from '@cat-factory/agents';
2
+ import { IterativeReviewService, } from '../review/IterativeReviewService.js';
3
+ import { buildClarityPrompt, buildClarityReworkPrompt, } from './clarity.logic.js';
4
+ /**
5
+ * The clarity-review (bug-report triage) agent. A single LLM call triages a block's bug
6
+ * report for fixability and raises findings, humans answer them, and a second LLM call folds
7
+ * the answers into a clarified report. The iterative loop lives in
8
+ * {@link IterativeReviewService}; this class supplies only the bug-report subject (optionally
9
+ * enriched by an investigator), the prompts and the persisted document field
10
+ * (`clarifiedReport`).
11
+ */
12
+ export class ClarityReviewService extends IterativeReviewService {
13
+ repository;
14
+ constructor(deps) {
15
+ super(deps);
16
+ this.repository = deps.clarityReviewRepository;
17
+ }
18
+ entityName = 'Clarity review';
19
+ reviewerLabel = 'clarity reviewer';
20
+ reviewAgentKind = 'clarity-review';
21
+ reworkAgentKind = 'clarity-rework';
22
+ reviewSystemPrompt = CLARITY_REVIEW_SYSTEM_PROMPT;
23
+ reworkSystemPrompt = CLARITY_REWORK_SYSTEM_PROMPT;
24
+ reviewIdPrefix = 'clr';
25
+ itemIdPrefix = 'clri';
26
+ revisedNoun = 'revised bug report';
27
+ truncationMessage = 'The reworked bug report was cut off before completion (model output limit reached). ' +
28
+ 'Try splitting this work into smaller tasks, then rework again.';
29
+ notificationType = 'clarity_review';
30
+ notificationSubject = 'The clarity reviewer';
31
+ notificationTitle(block) {
32
+ return `Bug-report triage: ${block.title}`;
33
+ }
34
+ buildReviewPrompt(ctx) {
35
+ return buildClarityPrompt(ctx);
36
+ }
37
+ buildReworkPrompt(ctx, items) {
38
+ return buildClarityReworkPrompt(ctx, items);
39
+ }
40
+ applyIncorporatedDoc(ctx, doc) {
41
+ ctx.clarifiedDoc = doc;
42
+ }
43
+ applyFeedback(ctx, feedback) {
44
+ ctx.reworkFeedback = feedback;
45
+ }
46
+ readDoc(review) {
47
+ return review.clarifiedReport;
48
+ }
49
+ withDoc(review, doc) {
50
+ return { ...review, clarifiedReport: doc };
51
+ }
52
+ newReview(common) {
53
+ return { ...common, clarifiedReport: null };
54
+ }
55
+ /** Assemble the bug report under review (block + optional investigation). */
56
+ async gatherContext(_workspaceId, block, input) {
57
+ return {
58
+ block: { title: block.title, type: block.type, description: block.description },
59
+ investigation: input.investigation,
60
+ };
61
+ }
62
+ }
63
+ //# sourceMappingURL=ClarityReviewService.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ClarityReviewService.js","sourceRoot":"","sources":["../../../src/modules/clarity/ClarityReviewService.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,4BAA4B,EAAE,4BAA4B,EAAE,MAAM,qBAAqB,CAAA;AAChG,OAAO,EAEL,s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O,MAAM,CAAC,eAAe,CAAA;IAC/B,CAAC;IAES,OAAO,CAAC,MAAqB,EAAE,GAAW;QAClD,OAAO,EAAE,GAAG,MAAM,EAAE,eAAe,EAAE,GAAG,EAAE,CAAA;IAC5C,CAAC;IAES,SAAS,CAAC,MAAoB;QACtC,OAAO,EAAE,GAAG,MAAM,EAAE,eAAe,EAAE,IAAI,EAAE,CAAA;IAC7C,CAAC;IAED,6EAA6E;IACnE,KAAK,CAAC,aAAa,CAC3B,YAAoB,EACpB,KAAY,EACZ,KAA0B;QAE1B,OAAO;YACL,KAAK,EAAE,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,EAAE,WAAW,EAAE,KAAK,CAAC,WAAW,EAAE;YAC/E,aAAa,EAAE,KAAK,CAAC,aAAa;SACnC,CAAA;IACH,CAAC;CACF"}
@@ -0,0 +1,36 @@
1
+ import type { Block, RequirementReviewItem } from '@cat-factory/kernel';
2
+ export { coerceReviewItems, disposeReview, extractJson, hasNotesToIncorporate, type ReviewDisposition, } from '../requirements/requirements.logic.js';
3
+ /** Everything the clarity reviewer reasons over: the bug report plus any investigation. */
4
+ export interface ClarityContext {
5
+ block: Pick<Block, 'title' | 'type' | 'description'>;
6
+ /**
7
+ * The prose report an upstream `bug-investigator` step produced (enriched bug report +
8
+ * optional working hypothesis). When present it is the primary triage subject — the raw
9
+ * description becomes background. Absent when no investigator ran.
10
+ */
11
+ investigation?: string;
12
+ /**
13
+ * The clarified bug report produced by a prior incorporation. When present (a re-review
14
+ * or a redo), it is the authoritative report the reviewer/rework reasons over. Absent on
15
+ * the first pass.
16
+ */
17
+ clarifiedDoc?: string;
18
+ /** The human's freeform "do it differently" comment when redoing a merge. Absent otherwise. */
19
+ reworkFeedback?: string;
20
+ }
21
+ /**
22
+ * Render the bug report under review as a single Markdown document — the clarified report
23
+ * when one exists (a later cycle), else the block description plus the investigator's
24
+ * enriched report when present. Used both as the reviewer's input and as the base the
25
+ * incorporate step rewrites.
26
+ */
27
+ export declare function renderBugReport(ctx: ClarityContext): string;
28
+ export declare function buildClarityPrompt(ctx: ClarityContext): string;
29
+ /**
30
+ * Build the user prompt for the clarity-rework step: the gathered bug report plus the
31
+ * human's answers (folded in) and dismissals (kept out). Works with an empty item list
32
+ * (the "no challenges" path simply restates the report in the standard structure). The
33
+ * {@link CLARITY_REWORK_SYSTEM_PROMPT} (in `@cat-factory/agents`) defines the output shape.
34
+ */
35
+ export declare function buildClarityReworkPrompt(ctx: ClarityContext, items: RequirementReviewItem[]): string;
36
+ //# sourceMappingURL=clarity.logic.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"clarity.logic.d.ts","sourceRoot":"","sources":["../../../src/modules/clarity/clarity.logic.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAA;AAWvE,OAAO,EACL,iBAAiB,EACjB,aAAa,EACb,WAAW,EACX,qBAAqB,EACrB,KAAK,iBAAiB,GACvB,MAAM,uCAAuC,CAAA;AAE9C,2FAA2F;AAC3F,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,aAAa,CAAC,CAAA;IACpD;;;;OAIG;IACH,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB;;;;OAIG;IACH,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,+FAA+F;IAC/F,cAAc,CAAC,EAAE,MAAM,CAAA;CACxB;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,cAAc,GAAG,MAAM,CAsB3D;AAED,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,cAAc,GAAG,MAAM,CAwB9D;AAED;;;;;GAKG;AACH,wBAAgB,wBAAwB,CACtC,GAAG,EAAE,cAAc,EACnB,KAAK,EAAE,qBAAqB,EAAE,GAC7B,MAAM,CA0CR"}
@@ -0,0 +1,98 @@
1
+ // Pure logic for the clarity-review (bug-report triage) agent: assembling the bug
2
+ // report under review (the block description, optionally enriched by an upstream
3
+ // `bug-investigator` step's prose report), and building the triage + rework prompts.
4
+ // The item parsing / disposition helpers are subject-agnostic and REUSED from the
5
+ // requirements logic — this file only supplies the clarity-specific subject + prompts.
6
+ //
7
+ // Re-export the shared helpers so the clarity service imports its whole logic surface
8
+ // from here (one import site), mirroring how `requirements.logic` is the requirements
9
+ // service's surface.
10
+ export { coerceReviewItems, disposeReview, extractJson, hasNotesToIncorporate, } from '../requirements/requirements.logic.js';
11
+ /**
12
+ * Render the bug report under review as a single Markdown document — the clarified report
13
+ * when one exists (a later cycle), else the block description plus the investigator's
14
+ * enriched report when present. Used both as the reviewer's input and as the base the
15
+ * incorporate step rewrites.
16
+ */
17
+ export function renderBugReport(ctx) {
18
+ const lines = ctx.clarifiedDoc?.trim()
19
+ ? [
20
+ `# ${ctx.block.title} (${ctx.block.type})`,
21
+ '',
22
+ '## Current standardized bug report (under review)',
23
+ ctx.clarifiedDoc.trim(),
24
+ ]
25
+ : [
26
+ `# ${ctx.block.title} (${ctx.block.type})`,
27
+ '',
28
+ '## Reported bug',
29
+ ctx.block.description?.trim() || '(no description provided)',
30
+ ];
31
+ if (!ctx.clarifiedDoc?.trim() && ctx.investigation?.trim()) {
32
+ lines.push('', '## Investigation (read-only findings from the codebase)', ctx.investigation.trim());
33
+ }
34
+ return lines.join('\n');
35
+ }
36
+ export function buildClarityPrompt(ctx) {
37
+ return [
38
+ 'Here is the bug report to triage for fixability:',
39
+ '',
40
+ renderBugReport(ctx),
41
+ '',
42
+ 'Produce a JSON object of this exact shape:',
43
+ '{',
44
+ ' "items": [',
45
+ ' {',
46
+ ' "category": "gap|clarification|assumption|risk|question",',
47
+ ' "severity": "low|medium|high",',
48
+ ' "title": "short headline of the concern",',
49
+ ' "detail": "the full question / gap / challenge, phrased for the bug reporter"',
50
+ ' }',
51
+ ' ]',
52
+ '}',
53
+ '',
54
+ 'Assign a severity to EVERY item — no item may omit it. Use `high` for a missing detail ' +
55
+ 'that would block a confident fix (e.g. no reproduction steps), `medium` for one that ' +
56
+ 'risks fixing the wrong thing, and `low` for a minor clarification. Raise between 0 and ' +
57
+ '20 items, ordered by severity (high first). If the bug report is genuinely clear and ' +
58
+ 'fixable, return an empty items array. Output JSON only.',
59
+ ].join('\n');
60
+ }
61
+ /**
62
+ * Build the user prompt for the clarity-rework step: the gathered bug report plus the
63
+ * human's answers (folded in) and dismissals (kept out). Works with an empty item list
64
+ * (the "no challenges" path simply restates the report in the standard structure). The
65
+ * {@link CLARITY_REWORK_SYSTEM_PROMPT} (in `@cat-factory/agents`) defines the output shape.
66
+ */
67
+ export function buildClarityReworkPrompt(ctx, items) {
68
+ const lines = ['Current bug report:', '', renderBugReport(ctx), ''];
69
+ const answered = items.filter((i) => (i.status === 'answered' || i.status === 'resolved') && i.reply?.trim());
70
+ const dismissed = items.filter((i) => i.status === 'dismissed');
71
+ if (answered.length) {
72
+ lines.push('Clarifications the reporter provided (fold these in):', '');
73
+ for (const i of answered) {
74
+ lines.push(`- Q (${i.category}): ${i.title} — ${i.detail}`);
75
+ lines.push(` A: ${i.reply?.trim() || '(no answer recorded)'}`);
76
+ }
77
+ lines.push('');
78
+ }
79
+ if (dismissed.length) {
80
+ lines.push('Items the reporter dismissed as out of scope (do NOT add these):', '');
81
+ for (const i of dismissed)
82
+ lines.push(`- ${i.title}`);
83
+ lines.push('');
84
+ }
85
+ if (!answered.length && !dismissed.length) {
86
+ lines.push('The reviewer raised no open questions — restate the bug report cleanly in the ' +
87
+ 'standard structure without inventing new facts.', '');
88
+ }
89
+ if (ctx.reworkFeedback?.trim()) {
90
+ lines.push('', 'The reviewer was UNHAPPY with your previous reworked report and asked you to redo it ' +
91
+ 'with this specific direction — follow it closely:', '', ctx.reworkFeedback.trim(), '');
92
+ }
93
+ lines.push('Rewrite the bug report as a single self-contained Markdown document in the standard ' +
94
+ 'structure described in your instructions, folding in every answer above. Output the ' +
95
+ 'revised bug report only.');
96
+ return lines.join('\n');
97
+ }
98
+ //# sourceMappingURL=clarity.logic.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"clarity.logic.js","sourceRoot":"","sources":["../../../src/modules/clarity/clarity.logic.ts"],"names":[],"mappings":"AAEA,kFAAkF;AAClF,iFAAiF;AACjF,qFAAqF;AACrF,kFAAkF;AAClF,uFAAuF;AACvF,EAAE;AACF,sFAAsF;AACtF,sFAAsF;AACtF,qBAAqB;AACrB,OAAO,EACL,iBAAiB,EACjB,aAAa,EACb,WAAW,EACX,qBAAqB,GAEtB,MAAM,uCAAuC,CAAA;AAqB9C;;;;;GAKG;AACH,MAAM,UAAU,eAAe,CAAC,GAAmB;IACjD,MAAM,KAAK,GAAa,GAAG,CAAC,YAAY,EAAE,IAAI,EAAE;QAC9C,CAAC,CAAC;YACE,KAAK,GAAG,CAAC,KAAK,CAAC,KAAK,KAAK,GAAG,CAAC,KAAK,CAAC,IAAI,GAAG;YAC1C,EAAE;YACF,mDAAmD;YACnD,GAAG,CAAC,YAAY,CAAC,IAAI,EAAE;SACxB;QACH,CAAC,CAAC;YACE,KAAK,GAAG,CAAC,KAAK,CAAC,KAAK,KAAK,GAAG,CAAC,KAAK,CAAC,IAAI,GAAG;YAC1C,EAAE;YACF,iBAAiB;YACjB,GAAG,CAAC,KAAK,CAAC,WAAW,EAAE,IAAI,EAAE,IAAI,2BAA2B;SAC7D,CAAA;IACL,IAAI,CAAC,GAAG,CAAC,YAAY,EAAE,IAAI,EAAE,IAAI,GAAG,CAAC,aAAa,EAAE,IAAI,EAAE,EAAE,CAAC;QAC3D,KAAK,CAAC,IAAI,CACR,EAAE,EACF,yDAAyD,EACzD,GAAG,CAAC,aAAa,CAAC,IAAI,EAAE,CACzB,CAAA;IACH,CAAC;IACD,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;AACzB,CAAC;AAED,MAAM,UAAU,kBAAkB,CAAC,GAAmB;IACpD,OAAO;QACL,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jE,CAAC;QACD,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;IAChB,CAAC;IACD,IAAI,SAAS,CAAC,MAAM,EAAE,CAAC;QACrB,KAAK,CAAC,IAAI,CAAC,kEAAkE,EAAE,EAAE,CAAC,CAAA;QAClF,KAAK,MAAM,CAAC,IAAI,SAAS;YAAE,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,CAAC,CAAA;QACrD,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;IAChB,CAAC;IACD,IAAI,CAAC,QAAQ,CAAC,MAAM,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,CAAC;QAC1C,KAAK,CAAC,IAAI,CACR,gFAAgF;YAC9E,iDAAiD,EACnD,EAAE,CACH,CAAA;IACH,CAAC;IACD,IAAI,GAAG,CAAC,cAAc,EAAE,IAAI,EAAE,EAAE,CAAC;QAC/B,KAAK,CAAC,IAAI,CACR,EAAE,EACF,uFAAuF;YACrF,mDAAmD,EACrD,EAAE,EACF,GAAG,CAAC,cAAc,CAAC,IAAI,EAAE,EACzB,EAAE,CACH,CAAA;IACH,CAAC;IACD,KAAK,CAAC,IAAI,CACR,sFAAsF;QACpF,sFAAsF;QACtF,0BAA0B,CAC7B,CAAA;IACD,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;AACzB,CAAC"}
@@ -0,0 +1,11 @@
1
+ import type { TaskEstimate } from '@cat-factory/kernel';
2
+ /**
3
+ * Coerce a task-estimator agent's output into a {@link TaskEstimate}. Tolerant:
4
+ * accepts a JSON object embedded in prose, clamps the three axes to [0,1], and
5
+ * defaults a missing rationale to empty. Returns null when no usable scores are
6
+ * present (caller then leaves the block estimate untouched).
7
+ */
8
+ export declare function coerceTaskEstimate(output: string, model: string | null, now: number): TaskEstimate | null;
9
+ /** A concise markdown summary of an estimate for the step's reviewable output. */
10
+ export declare function summarizeEstimate(estimate: TaskEstimate): string;
11
+ //# sourceMappingURL=estimate.logic.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"estimate.logic.d.ts","sourceRoot":"","sources":["../../../src/modules/estimation/estimate.logic.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AAcvD;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,MAAM,GAAG,IAAI,EACpB,GAAG,EAAE,MAAM,GACV,YAAY,GAAG,IAAI,CAUrB;AAED,kFAAkF;AAClF,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,YAAY,GAAG,MAAM,CAMhE"}
@@ -0,0 +1,37 @@
1
+ import { extractJson } from '../requirements/requirements.logic.js';
2
+ // Pure helpers for the core `task-estimator` step: tolerant parsing of the
3
+ // agent's JSON triage into a {@link TaskEstimate}, plus a readable summary the
4
+ // board shows in place of the raw JSON. Kept pure (no I/O) for unit testing. The
5
+ // tolerant JSON extraction is the shared `extractJson` helper (same package).
6
+ /** Clamp a finite number into [0,1]; null for anything non-numeric. */
7
+ function clamp01(value) {
8
+ if (typeof value !== 'number' || !Number.isFinite(value))
9
+ return null;
10
+ return Math.max(0, Math.min(1, value));
11
+ }
12
+ /**
13
+ * Coerce a task-estimator agent's output into a {@link TaskEstimate}. Tolerant:
14
+ * accepts a JSON object embedded in prose, clamps the three axes to [0,1], and
15
+ * defaults a missing rationale to empty. Returns null when no usable scores are
16
+ * present (caller then leaves the block estimate untouched).
17
+ */
18
+ export function coerceTaskEstimate(output, model, now) {
19
+ const raw = extractJson(output);
20
+ if (!raw || typeof raw !== 'object')
21
+ return null;
22
+ const obj = raw;
23
+ const complexity = clamp01(obj.complexity);
24
+ const risk = clamp01(obj.risk);
25
+ const impact = clamp01(obj.impact);
26
+ if (complexity === null || risk === null || impact === null)
27
+ return null;
28
+ const rationale = typeof obj.rationale === 'string' ? obj.rationale : '';
29
+ return { complexity, risk, impact, rationale, model, createdAt: now };
30
+ }
31
+ /** A concise markdown summary of an estimate for the step's reviewable output. */
32
+ export function summarizeEstimate(estimate) {
33
+ const pct = (n) => `${Math.round(n * 100)}%`;
34
+ const header = `**Task estimate** — Complexity ${pct(estimate.complexity)} · Risk ${pct(estimate.risk)} · Impact ${pct(estimate.impact)}`;
35
+ return estimate.rationale ? `${header}\n\n${estimate.rationale}` : header;
36
+ }
37
+ //# sourceMappingURL=estimate.logic.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"estimate.logic.js","sourceRoot":"","sources":["../../../src/modules/estimation/estimate.logic.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,uCAAuC,CAAA;AAEnE,2EAA2E;AAC3E,+EAA+E;AAC/E,iFAAiF;AACjF,8EAA8E;AAE9E,uEAAuE;AACvE,SAAS,OAAO,CAAC,KAAc;IAC7B,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC;QAAE,OAAO,IAAI,CAAA;IACrE,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAA;AACxC,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,kBAAkB,CAChC,MAAc,EACd,KAAoB,EACpB,GAAW;IAEX,MAAM,GAAG,GAAG,WAAW,CAAC,MAAM,CAAC,CAAA;IAC/B,IAAI,CAAC,GAAG,IAAI,OAAO,GAAG,KAAK,QAAQ;QAAE,OAAO,IAAI,CAAA;IAChD,MAAM,GAAG,GAAG,GAA8B,CAAA;IAC1C,MAAM,UAAU,GAAG,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,CAAA;IAC1C,MAAM,IAAI,GAAG,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAA;IAC9B,MAAM,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAA;IAClC,IAAI,UAAU,KAAK,IAAI,IAAI,IAAI,KAAK,IAAI,IAAI,MAAM,KAAK,IAAI;QAAE,OAAO,IAAI,CAAA;IACxE,MAAM,SAAS,GAAG,OAAO,GAAG,CAAC,SAAS,KAAK,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,CAAA;IACxE,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE,GAAG,EAAE,CAAA;AACvE,CAAC;AAED,kFAAkF;AAClF,MAAM,UAAU,iBAAiB,CAAC,QAAsB;IACtD,MAAM,GAAG,GAAG,CAAC,CAAS,EAAU,EAAE,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,GAAG,GAAG,CAAC,GAAG,CAAA;IAC5D,MAAM,MAAM,GAAG,kCAAkC,GAAG,CAAC,QAAQ,CAAC,UAAU,CAAC,WAAW,GAAG,CACrF,QAAQ,CAAC,IAAI,CACd,aAAa,GAAG,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAA;IACpC,OAAO,QAAQ,CAAC,SAAS,CAAC,CAAC,CAAC,GAAG,MAAM,OAAO,QAAQ,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC,MAAM,CAAA;AAC3E,CAAC"}
@@ -0,0 +1,114 @@
1
+ import type { AccountRepository, AgentRunContext, Block, BlockRepository, ClarityReviewRepository, DocumentRepository, ExecutionInstance, PipelineStep, RequirementReviewRepository, TaskRepository, WorkspaceRepository } from '@cat-factory/kernel';
2
+ import type { EnvironmentProvisioningService } from '@cat-factory/integrations';
3
+ /**
4
+ * The `revision` slice of an agent context when a step is being re-run with feedback
5
+ * — either a human's "request changes" on its approval gate, or a downstream
6
+ * companion's automatic rework (`step.rework`). The companion path wins when both are
7
+ * present. Empty object when neither applies (no revision context).
8
+ */
9
+ export declare function buildRevisionContext(step: PipelineStep): {
10
+ revision?: {
11
+ previousProposal: string;
12
+ feedback: string;
13
+ comments?: {
14
+ quotedSource?: string;
15
+ body: string;
16
+ }[];
17
+ };
18
+ };
19
+ /** The collaborators the context builder reads from (all owned by the engine container). */
20
+ export interface AgentContextBuilderDeps {
21
+ workspaceRepository: WorkspaceRepository;
22
+ blockRepository: BlockRepository;
23
+ accountRepository: AccountRepository;
24
+ documents?: DocumentRepository;
25
+ tasks?: TaskRepository;
26
+ requirementReviews?: RequirementReviewRepository;
27
+ clarityReviews?: ClarityReviewRepository;
28
+ environmentProvisioning?: EnvironmentProvisioningService;
29
+ }
30
+ /**
31
+ * Assembles the {@link AgentRunContext} for a pipeline step from the run + block state:
32
+ * the (possibly reworked) requirements, linked docs/tracker issues, the live environment,
33
+ * the service-frame config, the best-practice fragments, prior step outputs, recorded
34
+ * decisions and any revision feedback. Pure inputs → output (it only reads repositories),
35
+ * extracted out of `ExecutionService` so the engine stays a thin state machine. Also the
36
+ * single home for service-frame resolution (`resolveServiceFrameId`/`resolveServiceConfig`),
37
+ * which a few other engine paths reuse.
38
+ */
39
+ export declare class AgentContextBuilder {
40
+ private readonly deps;
41
+ constructor(deps: AgentContextBuilderDeps);
42
+ /** Assemble the {@link AgentRunContext} for a step from the run + block state. */
43
+ buildContext(workspaceId: string, instance: ExecutionInstance, step: PipelineStep, isFinalStep: boolean, block: Block): Promise<AgentRunContext>;
44
+ /** The service-frame id for a block (walks up frame → module → task; cycle-guarded). */
45
+ resolveServiceFrameId(workspaceId: string, blockId: string): Promise<string | null>;
46
+ /**
47
+ * Resolve the service-level (frame) configuration for a run's block — the
48
+ * Tester's local-infra docker-compose path / "no infra" flag and the provisioning
49
+ * provider + instance size — by walking up to the service frame. When the frame
50
+ * pins no cloud provider it inherits the owning account's `defaultCloudProvider`
51
+ * (so the account-level default actually reaches dispatch, not just the UI).
52
+ * Returns undefined when no frame carries any of these settings, so callers can
53
+ * spread it conditionally onto the agent context.
54
+ */
55
+ resolveServiceConfig(workspaceId: string, block: Block): Promise<AgentRunContext['service'] | undefined>;
56
+ /**
57
+ * The owning account's `defaultCloudProvider`, or undefined when the workspace
58
+ * has no account or the account pins no default (so the transport keeps its own).
59
+ */
60
+ private resolveAccountDefaultProvider;
61
+ /**
62
+ * The reworked ("incorporated") requirements for a block — the standard-format
63
+ * document the requirements-rework step produced — or `null` when the feature is
64
+ * unwired or the block has no incorporated review yet. Used both to substitute the
65
+ * agent context for every step and to feed the spec-writer.
66
+ */
67
+ private resolveReworkedRequirements;
68
+ /**
69
+ * The clarified bug report for a block — the standard-format document the clarity-rework
70
+ * step produced — or `null` when the feature is unwired or the block has no incorporated
71
+ * clarity review yet. The clarity mirror of {@link resolveReworkedRequirements}.
72
+ */
73
+ private resolveClarifiedBrief;
74
+ /**
75
+ * Resolve the best-practice fragments to fold into a step's system prompt. Service
76
+ * fragments reach an agent ONLY when its kind carries the `code-aware` trait: those
77
+ * kinds get the running SERVICE's selected fragments (the frame's
78
+ * `serviceFragmentIds`, seeded from the workspace default and editable per service)
79
+ * unioned with the block's own manual pins, resolved against the universal pool. A
80
+ * non-code-aware kind returns null so `composeBlockSystemPrompt` falls back to the
81
+ * block's own `fragmentIds` unchanged. Records the selected ids on the step for
82
+ * observability; never throws (a lookup failure degrades to the block pins).
83
+ */
84
+ private resolveFragments;
85
+ /**
86
+ * The selected best-practice fragment ids of the block's owning service frame. Walks
87
+ * up from the block we already hold (bounded: frame → module → task, cycle-guarded),
88
+ * reading the frame's `serviceFragmentIds` — without re-fetching the block in hand or
89
+ * fetching the frame twice.
90
+ */
91
+ private resolveServiceFragmentIds;
92
+ /**
93
+ * Resolve documents (from any source) linked to the running block into compact
94
+ * agent context. A no-op unless the document-source integration is wired (the
95
+ * repository is an optional dependency), so the engine stays unchanged when it
96
+ * is off.
97
+ */
98
+ private resolveContextDocs;
99
+ /**
100
+ * Resolve tracker issues (from any source) linked to the running block into
101
+ * structured agent context. A no-op unless the task-source integration is
102
+ * wired (the repository is an optional dependency), so the engine stays
103
+ * unchanged when it is off.
104
+ */
105
+ private resolveContextTasks;
106
+ /**
107
+ * Resolve the live ephemeral environment provisioned for the running block
108
+ * into compact agent context. A no-op unless the environment integration is
109
+ * wired (the provisioning service is an optional dependency), so the engine
110
+ * stays unchanged when it is off.
111
+ */
112
+ private resolveEnvironment;
113
+ }
114
+ //# sourceMappingURL=AgentContextBuilder.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AgentContextBuilder.d.ts","sourceRoot":"","sources":["../../../src/modules/execution/AgentContextBuilder.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,iBAAiB,EACjB,eAAe,EACf,KAAK,EACL,eAAe,EACf,uBAAuB,EAEvB,kBAAkB,EAClB,iBAAiB,EACjB,YAAY,EACZ,2BAA2B,EAC3B,cAAc,EACd,mBAAmB,EACpB,MAAM,qBAAqB,CAAA;AAG5B,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,2BAA2B,CAAA;AAE/E;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,YAAY,GAAG;IACxD,QAAQ,CAAC,EAAE;QACT,gBAAgB,EAAE,MAAM,CAAA;QACxB,QAAQ,EAAE,MAAM,CAAA;QAChB,QAAQ,CAAC,EAAE;YAAE,YAAY,CAAC,EAAE,MAAM,CAAC;YAAC,IAAI,EAAE,MAAM,CAAA;SAAE,EAAE,CAAA;KACrD,CAAA;CACF,CA6BA;AAED,4FAA4F;AAC5F,MAAM,WAAW,uBAAuB;IACtC,mBAAmB,EAAE,mBAAmB,CAAA;IACxC,eAAe,EAAE,eAAe,CAAA;IAChC,iBAAiB,EAAE,iBAAiB,CAAA;IACpC,SAAS,CAAC,EAAE,kBAAkB,CAAA;IAC9B,KAAK,CAAC,EAAE,cAAc,CAAA;IACtB,kBAAkB,CAAC,EAAE,2BAA2B,CAAA;IAChD,cAAc,CAAC,EAAE,uBAAuB,CAAA;IACxC,uBAAuB,CAAC,EAAE,8BAA8B,CAAA;CACzD;AAED;;;;;;;;GAQG;AACH,qBAAa,mBAAmB;IAClB,OAAO,C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