jumbo-cli 2.2.0 → 2.4.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 (78) hide show
  1. package/README.md +4 -6
  2. package/assets/skills/define-jumbo-goals/SKILL.md +7 -0
  3. package/assets/skills/refine-jumbo-goals/SKILL.md +19 -6
  4. package/assets/skills/start-jumbo-goal/SKILL.md +24 -1
  5. package/dist/application/context/sessions/get/SessionContextQueryHandler.js +1 -1
  6. package/dist/application/context/sessions/get/SessionContextQueryHandler.js.map +1 -1
  7. package/dist/application/context/sessions/start/ActivityMirrorAssembler.d.ts +25 -0
  8. package/dist/application/context/sessions/start/ActivityMirrorAssembler.d.ts.map +1 -0
  9. package/dist/application/context/sessions/start/ActivityMirrorAssembler.js +63 -0
  10. package/dist/application/context/sessions/start/ActivityMirrorAssembler.js.map +1 -0
  11. package/dist/application/context/sessions/start/IBrownfieldStatusReader.d.ts +17 -0
  12. package/dist/application/context/sessions/start/IBrownfieldStatusReader.d.ts.map +1 -0
  13. package/dist/application/{SolutionContextView.js → context/sessions/start/IBrownfieldStatusReader.js} +1 -1
  14. package/dist/application/context/sessions/start/IBrownfieldStatusReader.js.map +1 -0
  15. package/dist/application/context/sessions/start/LocalStartSessionGateway.d.ts +5 -3
  16. package/dist/application/context/sessions/start/LocalStartSessionGateway.d.ts.map +1 -1
  17. package/dist/application/context/sessions/start/LocalStartSessionGateway.js +9 -5
  18. package/dist/application/context/sessions/start/LocalStartSessionGateway.js.map +1 -1
  19. package/dist/application/context/sessions/start/SessionStartResponse.d.ts +4 -2
  20. package/dist/application/context/sessions/start/SessionStartResponse.d.ts.map +1 -1
  21. package/dist/application/host/IApplicationContainer.d.ts +2 -4
  22. package/dist/application/host/IApplicationContainer.d.ts.map +1 -1
  23. package/dist/domain/project/JumboMdContent.d.ts.map +1 -1
  24. package/dist/domain/project/JumboMdContent.js +32 -2
  25. package/dist/domain/project/JumboMdContent.js.map +1 -1
  26. package/dist/infrastructure/context/sessions/start/SqliteBrownfieldStatusReader.d.ts +16 -0
  27. package/dist/infrastructure/context/sessions/start/SqliteBrownfieldStatusReader.d.ts.map +1 -0
  28. package/dist/infrastructure/context/sessions/start/SqliteBrownfieldStatusReader.js +32 -0
  29. package/dist/infrastructure/context/sessions/start/SqliteBrownfieldStatusReader.js.map +1 -0
  30. package/dist/infrastructure/host/HostBuilder.d.ts.map +1 -1
  31. package/dist/infrastructure/host/HostBuilder.js +9 -11
  32. package/dist/infrastructure/host/HostBuilder.js.map +1 -1
  33. package/dist/presentation/cli/commands/goals/list/GoalListOutputBuilder.d.ts +9 -5
  34. package/dist/presentation/cli/commands/goals/list/GoalListOutputBuilder.d.ts.map +1 -1
  35. package/dist/presentation/cli/commands/goals/list/GoalListOutputBuilder.js +69 -70
  36. package/dist/presentation/cli/commands/goals/list/GoalListOutputBuilder.js.map +1 -1
  37. package/dist/presentation/cli/commands/goals/refine/GoalRefineOutputBuilder.d.ts.map +1 -1
  38. package/dist/presentation/cli/commands/goals/refine/GoalRefineOutputBuilder.js +7 -1
  39. package/dist/presentation/cli/commands/goals/refine/GoalRefineOutputBuilder.js.map +1 -1
  40. package/dist/presentation/cli/commands/goals/start/GoalStartOutputBuilder.d.ts.map +1 -1
  41. package/dist/presentation/cli/commands/goals/start/GoalStartOutputBuilder.js +7 -1
  42. package/dist/presentation/cli/commands/goals/start/GoalStartOutputBuilder.js.map +1 -1
  43. package/dist/presentation/cli/commands/sessions/start/SessionContextOutputBuilder.d.ts +33 -0
  44. package/dist/presentation/cli/commands/sessions/start/SessionContextOutputBuilder.d.ts.map +1 -0
  45. package/dist/presentation/cli/commands/sessions/start/SessionContextOutputBuilder.js +179 -0
  46. package/dist/presentation/cli/commands/sessions/start/SessionContextOutputBuilder.js.map +1 -0
  47. package/dist/presentation/cli/commands/sessions/start/SessionGoalsOutputBuilder.d.ts +41 -0
  48. package/dist/presentation/cli/commands/sessions/start/SessionGoalsOutputBuilder.d.ts.map +1 -0
  49. package/dist/presentation/cli/commands/sessions/start/SessionGoalsOutputBuilder.js +111 -0
  50. package/dist/presentation/cli/commands/sessions/start/SessionGoalsOutputBuilder.js.map +1 -0
  51. package/dist/presentation/cli/commands/sessions/start/SessionStartOutputBuilder.d.ts +28 -0
  52. package/dist/presentation/cli/commands/sessions/start/SessionStartOutputBuilder.d.ts.map +1 -0
  53. package/dist/presentation/cli/commands/sessions/start/SessionStartOutputBuilder.js +96 -0
  54. package/dist/presentation/cli/commands/sessions/start/SessionStartOutputBuilder.js.map +1 -0
  55. package/dist/presentation/cli/commands/sessions/start/SessionStartTextRenderer.d.ts +6 -28
  56. package/dist/presentation/cli/commands/sessions/start/SessionStartTextRenderer.d.ts.map +1 -1
  57. package/dist/presentation/cli/commands/sessions/start/SessionStartTextRenderer.js +27 -223
  58. package/dist/presentation/cli/commands/sessions/start/SessionStartTextRenderer.js.map +1 -1
  59. package/dist/presentation/cli/commands/sessions/start/session.start.d.ts +1 -1
  60. package/dist/presentation/cli/commands/sessions/start/session.start.d.ts.map +1 -1
  61. package/dist/presentation/cli/commands/sessions/start/session.start.js +6 -22
  62. package/dist/presentation/cli/commands/sessions/start/session.start.js.map +1 -1
  63. package/package.json +1 -1
  64. package/dist/application/ISolutionContextReader.d.ts +0 -17
  65. package/dist/application/ISolutionContextReader.d.ts.map +0 -1
  66. package/dist/application/ISolutionContextReader.js +0 -3
  67. package/dist/application/ISolutionContextReader.js.map +0 -1
  68. package/dist/application/SolutionContextView.d.ts +0 -26
  69. package/dist/application/SolutionContextView.d.ts.map +0 -1
  70. package/dist/application/SolutionContextView.js.map +0 -1
  71. package/dist/application/UnprimedBrownfieldQualifier.d.ts +0 -29
  72. package/dist/application/UnprimedBrownfieldQualifier.d.ts.map +0 -1
  73. package/dist/application/UnprimedBrownfieldQualifier.js +0 -47
  74. package/dist/application/UnprimedBrownfieldQualifier.js.map +0 -1
  75. package/dist/infrastructure/SqliteSolutionContextReader.d.ts +0 -20
  76. package/dist/infrastructure/SqliteSolutionContextReader.d.ts.map +0 -1
  77. package/dist/infrastructure/SqliteSolutionContextReader.js +0 -138
  78. package/dist/infrastructure/SqliteSolutionContextReader.js.map +0 -1
@@ -1,242 +1,46 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SessionStartTextRenderer = void 0;
4
- const YamlFormatter_js_1 = require("../../../formatting/YamlFormatter.js");
4
+ const SessionStartOutputBuilder_js_1 = require("./SessionStartOutputBuilder.js");
5
+ const SessionContextOutputBuilder_js_1 = require("./SessionContextOutputBuilder.js");
5
6
  /**
6
- * SessionStartTextRenderer - Formats session start context for LLM orientation
7
+ * SessionStartTextRenderer - Formats session start context for LLM orientation.
7
8
  *
8
- * Renders the session start context:
9
- * - Project name and purpose
10
- * - Target audiences
11
- * - Active audience pains
12
- * - Session context (focus, status, paused goals, recent decisions)
13
- * - In-progress goals
14
- * - Planned goals
15
- *
16
- * Output Format: YAML (more LLM-friendly than JSON)
9
+ * Delegates to SessionStartOutputBuilder for composition.
10
+ * Retained for backward compatibility with existing callers and tests.
17
11
  */
18
12
  class SessionStartTextRenderer {
19
13
  constructor() {
20
- this.yamlFormatter = new YamlFormatter_js_1.YamlFormatter();
14
+ this.sessionStartOutputBuilder = new SessionStartOutputBuilder_js_1.SessionStartOutputBuilder();
15
+ this.sessionContextOutputBuilder = new SessionContextOutputBuilder_js_1.SessionContextOutputBuilder();
21
16
  }
22
17
  render(context) {
23
- const blocks = [];
24
- const projectContextYaml = this.renderProjectContext(context.context.projectContext);
25
- if (projectContextYaml) {
26
- blocks.push(projectContextYaml);
27
- }
28
- blocks.push(this.renderSessionSummary(context));
29
- blocks.push(this.renderInProgressGoals(context.context.activeGoals.concat(context.context.pausedGoals)));
30
- blocks.push(this.renderPlannedGoals(context.context.plannedGoals));
31
- return {
32
- blocks,
33
- llmInstruction: this.renderGoalStartInstruction(),
34
- };
18
+ const output = this.sessionStartOutputBuilder.buildSessionStartOutput(context);
19
+ const blocks = output.getSections()
20
+ .filter(s => s.type === "prompt" && s.content)
21
+ .map(s => s.content);
22
+ // Last two sections are the separator and goal start instruction.
23
+ // Extract the instruction separately for the legacy return shape.
24
+ const goalStartIndex = blocks.findIndex(b => b.includes("@LLM: Prompt the user"));
25
+ const llmInstruction = goalStartIndex >= 0 ? blocks.splice(goalStartIndex, 1)[0] : "";
26
+ // Remove separator block
27
+ const separatorIndex = blocks.findIndex(b => b.trim() === "---");
28
+ if (separatorIndex >= 0) {
29
+ blocks.splice(separatorIndex, 1);
30
+ }
31
+ return { blocks, llmInstruction };
35
32
  }
36
33
  buildStructuredContext(context) {
37
- const sessionContextResult = this.buildSessionContextData(context);
34
+ const structured = this.sessionStartOutputBuilder.buildStructuredOutput(context, "");
38
35
  return {
39
- projectContext: this.buildProjectContextData(context.context.projectContext),
40
- sessionContext: sessionContextResult.data.sessionContext,
41
- inProgressGoals: this.buildInProgressGoalsData(context.context.activeGoals.concat(context.context.pausedGoals)),
42
- plannedGoals: this.buildPlannedGoalsData(context.context.plannedGoals),
43
- llmInstructions: {
44
- sessionContext: sessionContextResult.llmInstruction ?? null,
45
- goalStart: this.renderGoalStartInstruction(),
46
- },
36
+ projectContext: structured.projectContext,
37
+ sessionContext: structured.sessionContext,
38
+ goals: structured.goals,
39
+ llmInstructions: structured.llmInstructions,
47
40
  };
48
41
  }
49
42
  renderSessionSummary(context) {
50
- const sessionContextResult = this.buildSessionContextData(context);
51
- let output = this.yamlFormatter.toYaml(sessionContextResult.data);
52
- if (sessionContextResult.llmInstruction) {
53
- output += sessionContextResult.llmInstruction;
54
- }
55
- return output;
56
- }
57
- renderProjectContext(projectContext) {
58
- const contextData = this.buildProjectContextData(projectContext);
59
- if (!contextData) {
60
- return "";
61
- }
62
- return this.yamlFormatter.toYaml({ projectContext: contextData });
63
- }
64
- renderInProgressGoals(goals) {
65
- const data = this.buildInProgressGoalsData(goals);
66
- return this.yamlFormatter.toYaml({ inProgressGoals: data });
67
- }
68
- renderPlannedGoals(goals) {
69
- const data = this.buildPlannedGoalsData(goals);
70
- return this.yamlFormatter.toYaml({ plannedGoals: data });
71
- }
72
- renderGoalStartInstruction() {
73
- const llmInstruction = [
74
- "@LLM: Prompt the user for input about what goal to start. ",
75
- "For example, \"I can see we've recently worked on X, Y, Z. ",
76
- "Everything was completed without blockers. Goals A, B, and N ",
77
- "are planned. Do you want to start with A, or something else?\"",
78
- "IMPORTANT: Run 'jumbo goal start --id <id>' before doing any work!",
79
- ];
80
- return llmInstruction.join("\n");
81
- }
82
- /**
83
- * Format message when no session summary exists (first-ever session on brownfield project)
84
- *
85
- * Outputs direct LLM instructions that cause the agent to proactively offer
86
- * to help transfer existing project context into Jumbo.
87
- */
88
- buildProjectContextData(projectContext) {
89
- if (!projectContext) {
90
- return null;
91
- }
92
- const contextData = {
93
- name: projectContext.project.name,
94
- purpose: projectContext.project.purpose || "Not defined",
95
- };
96
- if (projectContext.audiences.length > 0) {
97
- contextData.audiences = projectContext.audiences.map((a) => ({
98
- name: a.name,
99
- description: a.description,
100
- priority: a.priority,
101
- }));
102
- }
103
- if (projectContext.audiencePains.length > 0) {
104
- contextData.audiencePains = projectContext.audiencePains.map((p) => ({
105
- title: p.title,
106
- description: p.description,
107
- }));
108
- }
109
- return contextData;
110
- }
111
- buildInProgressGoalsData(goals) {
112
- if (goals.length === 0) {
113
- return {
114
- count: 0,
115
- message: "No goals currently in progress. Use 'jumbo goal start --id <id>' to begin working on a goal.",
116
- };
117
- }
118
- return {
119
- count: goals.length,
120
- goals: goals.map((g) => ({
121
- goalId: g.goalId,
122
- objective: g.objective,
123
- status: g.status,
124
- createdAt: g.createdAt,
125
- })),
126
- };
127
- }
128
- buildPlannedGoalsData(goals) {
129
- if (goals.length === 0) {
130
- return {
131
- count: 0,
132
- message: "No planned goals available. Use 'jumbo goal add' to create a new goal to work on.",
133
- };
134
- }
135
- return {
136
- count: goals.length,
137
- goals: goals.map((g) => ({
138
- goalId: g.goalId,
139
- objective: g.objective,
140
- status: g.status,
141
- createdAt: g.createdAt,
142
- })),
143
- };
144
- }
145
- buildSessionContextData(context) {
146
- if (context.instructions.includes("brownfield-onboarding")) {
147
- return {
148
- data: {
149
- sessionContext: {
150
- message: "No previous session context available. This appears to be your first session with Jumbo on this project.",
151
- },
152
- },
153
- llmInstruction: this.buildBrownfieldInstruction(),
154
- };
155
- }
156
- if (!context.session) {
157
- return {
158
- data: {
159
- sessionContext: {
160
- message: "No previous session context available.",
161
- },
162
- },
163
- };
164
- }
165
- const contextData = {
166
- sessionContext: {
167
- focus: context.session.focus ?? "Not yet defined",
168
- status: context.session.status,
169
- },
170
- };
171
- const sessionCtx = contextData.sessionContext;
172
- if (context.context.pausedGoals.length > 0) {
173
- sessionCtx.pausedGoals = context.context.pausedGoals.map((g) => {
174
- const pausedGoal = {
175
- goalId: g.goalId,
176
- objective: g.objective,
177
- pausedAt: g.updatedAt,
178
- };
179
- if (g.note) {
180
- pausedGoal.note = g.note;
181
- }
182
- return pausedGoal;
183
- });
184
- }
185
- if (context.context.recentDecisions.length > 0) {
186
- sessionCtx.recentDecisions = context.context.recentDecisions.map((d) => ({
187
- decisionId: d.decisionId,
188
- title: d.title,
189
- rationale: d.rationale,
190
- }));
191
- }
192
- if (context.context.deactivatedRelations.count > 0) {
193
- sessionCtx.deactivatedRelations = {
194
- count: context.context.deactivatedRelations.count,
195
- summary: context.context.deactivatedRelations.summary,
196
- };
197
- sessionCtx.warning =
198
- "Deactivated relations detected. Review them before relying on architecture links.";
199
- }
200
- const llmInstruction = context.context.pausedGoals.length > 0
201
- ? "\n\n@LLM: Goals were paused. To resume a paused goal, run:\n jumbo goal resume --id <goal-id>"
202
- : undefined;
203
- return { data: contextData, llmInstruction };
204
- }
205
- buildBrownfieldInstruction() {
206
- return [
207
- "",
208
- "@LLM: This is a BROWNFIELD PROJECT with no Jumbo context yet.",
209
- "",
210
- "REQUIRED ACTION: Proactively engage the user with the following approach:",
211
- "",
212
- "1. GREET and ACKNOWLEDGE: \"Hi! I can see that you've added Jumbo to this project. ",
213
- " This looks like an existing codebase with valuable context to preserve.\"",
214
- "",
215
- "2. OFFER HELP: \"Would you like me to help transfer your existing project knowledge into Jumbo? ",
216
- " I can scan your documentation, code structure, and patterns to capture:\"",
217
- " - Project purpose and target audience (from README, docs)",
218
- " - Architectural components and dependencies (from code structure)",
219
- " - Development guidelines and coding standards (from patterns)",
220
- " - Architectural decisions (from docs, comments, ADRs)",
221
- "",
222
- "3. GET PERMISSION: \"I'll ask for your confirmation before adding anything to Jumbo. ",
223
- " Should we start by scanning your project documentation?\"",
224
- "",
225
- "IMPORTANT:",
226
- "- Take initiative: Don't wait passively. Actively offer to help.",
227
- "- Be conversational: Use natural language, not robotic instructions.",
228
- "- Human-in-the-loop: Always get user confirmation before running jumbo commands.",
229
- "- Start with docs: README.md, package.json, or docs/ are good starting points.",
230
- "",
231
- "AVAILABLE COMMANDS (use after getting user permission):",
232
- "- jumbo architecture define --help",
233
- "- jumbo component add --name 'ComponentName' --description 'What it does'",
234
- "- jumbo decision add --title 'Decision' --rationale 'Why' --context 'Background'",
235
- "- jumbo guideline add --category 'testing' --description 'Guideline text'",
236
- "- jumbo invariant add --category 'architecture' --description 'Non-negotiable rule'",
237
- "",
238
- "Run 'jumbo --help' to see all available commands.",
239
- ].join("\n");
43
+ return this.sessionContextOutputBuilder.renderSessionSummary(context);
240
44
  }
241
45
  }
242
46
  exports.SessionStartTextRenderer = SessionStartTextRenderer;
@@ -1 +1 @@
1
- {"version":3,"file":"SessionStartTextRenderer.js","sourceRoot":"","sources":["../../../../../../src/presentation/cli/commands/sessions/start/SessionStartTextRenderer.ts"],"names":[],"mappings":";;;AAIA,2EAAqE;AAkBrE;;;;;;;;;;;;GAYG;AACH,MAAa,wBAAwB;IAGnC;QACE,IAAI,CAAC,aAAa,GAAG,IAAI,gCAAa,EAAE,CAAC;IAC3C,CAAC;IAED,MAAM,CAAC,OAA+B;QACpC,MAAM,MAAM,GAAa,EAAE,CAAC;QAE5B,MAAM,kBAAkB,GAAG,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;YAClG,CAAC,CAAC,SAAS,CAAC;QAEhB,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,cAAc,EAAE,CAAC;IAC/C,CAAC;IAEO,0BAA0B;QAChC,OAAO;YACL,EAAE;YACF,+DAA+D;YAC/D,EAAE;YACF,2EAA2E;YAC3E,EAAE;YACF,qFAAqF;YACrF,8EAA8E;YAC9E,EAAE;YACF,kGAAkG;YAClG,8EAA8E;YAC9E,8DAA8D;YAC9D,sEAAsE;YACtE,kEAAkE;YAClE,0DAA0D;YAC1D,EAAE;YACF,uFAAuF;YACvF,8DAA8D;YAC9D,EAAE;YACF,YAAY;YACZ,kEAAkE;YAClE,sEAAsE;YACtE,kFAAkF;YAClF,gFAAgF;YAChF,EAAE;YACF,yDAAyD;YACzD,oCAAoC;YACpC,2EAA2E;YAC3E,kFAAkF;YAClF,2EAA2E;YAC3E,qFAAqF;YACrF,EAAE;YACF,mDAAmD;SACpD,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACf,CAAC;CACF;AApRD,4DAoRC"}
1
+ {"version":3,"file":"SessionStartTextRenderer.js","sourceRoot":"","sources":["../../../../../../src/presentation/cli/commands/sessions/start/SessionStartTextRenderer.ts"],"names":[],"mappings":";;;AACA,iFAA2E;AAC3E,qFAA+E;AAiB/E;;;;;GAKG;AACH,MAAa,wBAAwB;IAInC;QACE,IAAI,CAAC,yBAAyB,GAAG,IAAI,wDAAyB,EAAE,CAAC;QACjE,IAAI,CAAC,2BAA2B,GAAG,IAAI,4DAA2B,EAAE,CAAC;IACvE,CAAC;IAED,MAAM,CAAC,OAA+B;QACpC,MAAM,MAAM,GAAG,IAAI,CAAC,yBAAyB,CAAC,uBAAuB,CAAC,OAAO,CAAC,CAAC;QAE/E,MAAM,MAAM,GAAG,MAAM,CAAC,WAAW,EAAE;aAChC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,QAAQ,IAAI,CAAC,CAAC,OAAO,CAAC;aAC7C,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,OAAiB,CAAC,CAAC;QAEjC,kEAAkE;QAClE,kEAAkE;QAClE,MAAM,cAAc,GAAG,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,uBAAuB,CAAC,CAAC,CAAC;QAClF,MAAM,cAAc,GAAG,cAAc,IAAI,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,cAAc,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;QAEtF,yBAAyB;QACzB,MAAM,cAAc,GAAG,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,KAAK,KAAK,CAAC,CAAC;QACjE,IAAI,cAAc,IAAI,CAAC,EAAE,CAAC;YACxB,MAAM,CAAC,MAAM,CAAC,cAAc,EAAE,CAAC,CAAC,CAAC;QACnC,CAAC;QAED,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,CAAC;IACpC,CAAC;IAED,sBAAsB,CAAC,OAA+B;QACpD,MAAM,UAAU,GAAG,IAAI,CAAC,yBAAyB,CAAC,qBAAqB,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;QACrF,OAAO;YACL,cAAc,EAAE,UAAU,CAAC,cAAgD;YAC3E,cAAc,EAAE,UAAU,CAAC,cAAyC;YACpE,KAAK,EAAE,UAAU,CAAC,KAAgC;YAClD,eAAe,EAAE,UAAU,CAAC,eAG3B;SACF,CAAC;IACJ,CAAC;IAED,oBAAoB,CAAC,OAA+B;QAClD,OAAO,IAAI,CAAC,2BAA2B,CAAC,oBAAoB,CAAC,OAAO,CAAC,CAAC;IACxE,CAAC;CACF;AA9CD,4DA8CC"}
@@ -15,7 +15,7 @@ export declare const metadata: CommandMetadata;
15
15
  *
16
16
  * Responsibilities (presentation layer only):
17
17
  * - Call SessionStartController for orchestrated session start
18
- * - Render the result for display
18
+ * - Render the result via SessionStartOutputBuilder
19
19
  *
20
20
  * Orchestration is delegated to SessionStartController in the application layer.
21
21
  */
@@ -1 +1 @@
1
- {"version":3,"file":"session.start.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/cli/commands/sessions/start/session.start.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AACpE,OAAO,EAAE,qBAAqB,EAAE,MAAM,0DAA0D,CAAC;AAKjG;;GAEG;AACH,eAAO,MAAM,QAAQ,EAAE,eAWtB,CAAC;AAEF;;;;;;;;;GASG;AACH,wBAAsB,YAAY,CAChC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,EAC9B,SAAS,EAAE,qBAAqB,iBAwCjC"}
1
+ {"version":3,"file":"session.start.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/cli/commands/sessions/start/session.start.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AACpE,OAAO,EAAE,qBAAqB,EAAE,MAAM,0DAA0D,CAAC;AAIjG;;GAEG;AACH,eAAO,MAAM,QAAQ,EAAE,eAWtB,CAAC;AAEF;;;;;;;;;GASG;AACH,wBAAsB,YAAY,CAChC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,EAC9B,SAAS,EAAE,qBAAqB,iBAiCjC"}
@@ -8,7 +8,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
8
8
  exports.metadata = void 0;
9
9
  exports.sessionStart = sessionStart;
10
10
  const Renderer_js_1 = require("../../../rendering/Renderer.js");
11
- const SessionStartTextRenderer_js_1 = require("./SessionStartTextRenderer.js");
11
+ const SessionStartOutputBuilder_js_1 = require("./SessionStartOutputBuilder.js");
12
12
  /**
13
13
  * Command metadata for auto-registration
14
14
  */
@@ -30,7 +30,7 @@ exports.metadata = {
30
30
  *
31
31
  * Responsibilities (presentation layer only):
32
32
  * - Call SessionStartController for orchestrated session start
33
- * - Render the result for display
33
+ * - Render the result via SessionStartOutputBuilder
34
34
  *
35
35
  * Orchestration is delegated to SessionStartController in the application layer.
36
36
  */
@@ -45,22 +45,16 @@ async function sessionStart(options, container) {
45
45
  // 1. CONTROLLER: Orchestrate session start
46
46
  const response = await container.sessionStartController.handle({});
47
47
  // 2. RENDER: Display context and result
48
+ const outputBuilder = new SessionStartOutputBuilder_js_1.SessionStartOutputBuilder();
48
49
  if (isTextOutput) {
49
- const textRenderer = new SessionStartTextRenderer_js_1.SessionStartTextRenderer();
50
- const textOutput = textRenderer.render(response.context);
51
- for (const block of textOutput.blocks) {
52
- if (block) {
53
- renderer.info(block);
54
- }
55
- }
56
- renderer.info("---\n");
57
- renderer.info(textOutput.llmInstruction);
50
+ const output = outputBuilder.buildSessionStartOutput(response.context, response.activityMirror);
51
+ renderer.info(output.toHumanReadable());
58
52
  renderer.success("Session started", {
59
53
  sessionId: response.sessionId,
60
54
  });
61
55
  }
62
56
  else {
63
- renderer.data(buildStructuredSessionStartOutput(response.context, response.sessionId));
57
+ renderer.data(outputBuilder.buildStructuredOutput(response.context, response.sessionId, response.activityMirror));
64
58
  }
65
59
  }
66
60
  catch (error) {
@@ -69,14 +63,4 @@ async function sessionStart(options, container) {
69
63
  }
70
64
  // NO CLEANUP - infrastructure manages itself!
71
65
  }
72
- function buildStructuredSessionStartOutput(sessionContext, sessionId) {
73
- const textRenderer = new SessionStartTextRenderer_js_1.SessionStartTextRenderer();
74
- const structuredContext = textRenderer.buildStructuredContext(sessionContext);
75
- return {
76
- ...structuredContext,
77
- sessionStart: {
78
- sessionId,
79
- },
80
- };
81
- }
82
66
  //# sourceMappingURL=session.start.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"session.start.js","sourceRoot":"","sources":["../../../../../../src/presentation/cli/commands/sessions/start/session.start.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAkCH,oCA0CC;AAxED,gEAA0D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AC,iBAAiB,EAAE;gBAClC,SAAS,EAAE,QAAQ,CAAC,SAAS;aAC9B,CAAC,CAAC;QACL,CAAC;aAAM,CAAC;YACN,QAAQ,CAAC,IAAI,CAAC,iCAAiC,CAAC,QAAQ,CAAC,OAAO,EAAE,QAAQ,CAAC,SAAS,CAAC,CAAC,CAAC;QACzF,CAAC;IACH,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,QAAQ,CAAC,KAAK,CAAC,yBAAyB,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;QAC1F,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;IACD,8CAA8C;AAChD,CAAC;AAED,SAAS,iCAAiC,CACxC,cAAsC,EACtC,SAAiB;IAEjB,MAAM,YAAY,GAAG,IAAI,sDAAwB,EAAE,CAAC;IACpD,MAAM,iBAAiB,GAAG,YAAY,CAAC,sBAAsB,CAAC,cAAc,CAAC,CAAC;IAE9E,OAAO;QACL,GAAG,iBAAiB;QACpB,YAAY,EAAE;YACZ,SAAS;SACV;KACF,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"session.start.js","sourceRoot":"","sources":["../../../../../../src/presentation/cli/commands/sessions/start/session.start.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAiCH,oCAmCC;AAhED,gEAA0D;AAC1D,iFAA2E;AAE3E;;GAEG;AACU,QAAA,QAAQ,GAAoB;IACvC,WAAW,EAAE,6BAA6B;IAC1C,QAAQ,EAAE,MAAM;IAChB,OAAO,EAAE,EAAE;IACX,QAAQ,EAAE;QACR;YACE,OAAO,EAAE,qBAAqB;YAC9B,WAAW,EAAE,6BAA6B;SAC3C;KACF;IACD,OAAO,EAAE,CAAC,aAAa,EAAE,eAAe,EAAE,YAAY,CAAC;CACxD,CAAC;AAEF;;;;;;;;;GASG;AACI,KAAK,UAAU,YAAY,CAChC,OAA8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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jumbo-cli",
3
- "version": "2.2.0",
3
+ "version": "2.4.0",
4
4
  "description": "Memory and Context Orchestration for Coding Agents",
5
5
  "keywords": [
6
6
  "cli",
@@ -1,17 +0,0 @@
1
- import { SolutionContextView } from "./SolutionContextView.js";
2
- /**
3
- * ISolutionContextReader - Port interface for reading aggregated solution context
4
- *
5
- * Infrastructure implementations query the data store and return solution views.
6
- * Application layer services (like UnprimedBrownfieldQualifier) use this data
7
- * to make business decisions.
8
- */
9
- export interface ISolutionContextReader {
10
- /**
11
- * Get all solution context recorded in Jumbo
12
- *
13
- * @returns Aggregated view of architecture, components, decisions, invariants, guidelines
14
- */
15
- getSolutionContext(): Promise<SolutionContextView>;
16
- }
17
- //# sourceMappingURL=ISolutionContextReader.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ISolutionContextReader.d.ts","sourceRoot":"","sources":["../../src/application/ISolutionContextReader.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAE/D;;;;;;GAMG;AACH,MAAM,WAAW,sBAAsB;IACrC;;;;OAIG;IACH,kBAAkB,IAAI,OAAO,CAAC,mBAAmB,CAAC,CAAC;CACpD"}
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=ISolutionContextReader.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ISolutionContextReader.js","sourceRoot":"","sources":["../../src/application/ISolutionContextReader.ts"],"names":[],"mappings":""}
@@ -1,26 +0,0 @@
1
- import { ArchitectureView } from "./context/architecture/ArchitectureView.js";
2
- import { ComponentView } from "./context/components/ComponentView.js";
3
- import { DecisionView } from "./context/decisions/DecisionView.js";
4
- import { InvariantView } from "./context/invariants/InvariantView.js";
5
- import { GuidelineView } from "./context/guidelines/GuidelineView.js";
6
- /**
7
- * SolutionContextView - Aggregated view of all solution context
8
- *
9
- * Contains the full solution context that has been recorded in Jumbo:
10
- * - Architecture definition (patterns, principles, tech stack, data flow)
11
- * - Components (system parts and their responsibilities)
12
- * - Decisions (architectural and design choices with rationale)
13
- * - Invariants (non-negotiable constraints)
14
- * - Guidelines (coding standards and practices)
15
- *
16
- * Used by application layer services to make business decisions about
17
- * solution state (e.g., determining if a brownfield project needs priming).
18
- */
19
- export interface SolutionContextView {
20
- readonly architecture: ArchitectureView | null;
21
- readonly components: ComponentView[];
22
- readonly decisions: DecisionView[];
23
- readonly invariants: InvariantView[];
24
- readonly guidelines: GuidelineView[];
25
- }
26
- //# sourceMappingURL=SolutionContextView.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SolutionContextView.d.ts","sourceRoot":"","sources":["../../src/application/SolutionContextView.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,4CAA4C,CAAC;AAC9E,OAAO,EAAE,aAAa,EAAE,MAAM,uCAAuC,CAAC;AACtE,OAAO,EAAE,YAAY,EAAE,MAAM,qCAAqC,CAAC;AACnE,OAAO,EAAE,aAAa,EAAE,MAAM,uCAAuC,CAAC;AACtE,OAAO,EAAE,aAAa,EAAE,MAAM,uCAAuC,CAAC;AAEtE;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,YAAY,EAAE,gBAAgB,GAAG,IAAI,CAAC;IAC/C,QAAQ,CAAC,UAAU,EAAE,aAAa,EAAE,CAAC;IACrC,QAAQ,CAAC,SAAS,EAAE,YAAY,EAAE,CAAC;IACnC,QAAQ,CAAC,UAAU,EAAE,aAAa,EAAE,CAAC;IACrC,QAAQ,CAAC,UAAU,EAAE,aAAa,EAAE,CAAC;CACtC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"SolutionContextView.js","sourceRoot":"","sources":["../../src/application/SolutionContextView.ts"],"names":[],"mappings":""}
@@ -1,29 +0,0 @@
1
- import { ISolutionContextReader } from "./ISolutionContextReader.js";
2
- /**
3
- * UnprimedBrownfieldQualifier - Determines if a brownfield project needs priming
4
- *
5
- * A brownfield project is "unprimed" when it has been added to Jumbo but no
6
- * solution context has been recorded yet. In this state, LLMs should be prompted
7
- * to help transfer existing project knowledge into Jumbo.
8
- *
9
- * This is the single source of truth for determining "unprimed brownfield" state.
10
- * To adjust what counts as "primed", modify the isUnprimed() method.
11
- *
12
- * Current rule: A project is primed if it has ANY of the following:
13
- * - Architecture definition
14
- * - At least one component
15
- * - At least one decision
16
- * - At least one invariant
17
- * - At least one guideline
18
- */
19
- export declare class UnprimedBrownfieldQualifier {
20
- private readonly solutionContextReader;
21
- constructor(solutionContextReader: ISolutionContextReader);
22
- /**
23
- * Check if the project is in an unprimed brownfield state
24
- *
25
- * @returns true if the project needs priming (no solution context exists)
26
- */
27
- isUnprimed(): Promise<boolean>;
28
- }
29
- //# sourceMappingURL=UnprimedBrownfieldQualifier.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"UnprimedBrownfieldQualifier.d.ts","sourceRoot":"","sources":["../../src/application/UnprimedBrownfieldQualifier.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AAErE;;;;;;;;;;;;;;;;GAgBG;AACH,qBAAa,2BAA2B;IAC1B,OAAO,CAAC,QAAQ,CAAC,qBAAqB;gBAArB,qBAAqB,EAAE,sBAAsB;IAE1E;;;;OAIG;IACG,UAAU,IAAI,OAAO,CAAC,OAAO,CAAC;CAmBrC"}
@@ -1,47 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.UnprimedBrownfieldQualifier = void 0;
4
- /**
5
- * UnprimedBrownfieldQualifier - Determines if a brownfield project needs priming
6
- *
7
- * A brownfield project is "unprimed" when it has been added to Jumbo but no
8
- * solution context has been recorded yet. In this state, LLMs should be prompted
9
- * to help transfer existing project knowledge into Jumbo.
10
- *
11
- * This is the single source of truth for determining "unprimed brownfield" state.
12
- * To adjust what counts as "primed", modify the isUnprimed() method.
13
- *
14
- * Current rule: A project is primed if it has ANY of the following:
15
- * - Architecture definition
16
- * - At least one component
17
- * - At least one decision
18
- * - At least one invariant
19
- * - At least one guideline
20
- */
21
- class UnprimedBrownfieldQualifier {
22
- constructor(solutionContextReader) {
23
- this.solutionContextReader = solutionContextReader;
24
- }
25
- /**
26
- * Check if the project is in an unprimed brownfield state
27
- *
28
- * @returns true if the project needs priming (no solution context exists)
29
- */
30
- async isUnprimed() {
31
- const context = await this.solutionContextReader.getSolutionContext();
32
- const hasArchitecture = context.architecture !== null;
33
- const hasComponents = context.components.length > 0;
34
- const hasDecisions = context.decisions.length > 0;
35
- const hasInvariants = context.invariants.length > 0;
36
- const hasGuidelines = context.guidelines.length > 0;
37
- // Primed if ANY solution context exists
38
- const isPrimed = hasArchitecture ||
39
- hasComponents ||
40
- hasDecisions ||
41
- hasInvariants ||
42
- hasGuidelines;
43
- return !isPrimed;
44
- }
45
- }
46
- exports.UnprimedBrownfieldQualifier = UnprimedBrownfieldQualifier;
47
- //# sourceMappingURL=UnprimedBrownfieldQualifier.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"UnprimedBrownfieldQualifier.js","sourceRoot":"","sources":["../../src/application/UnprimedBrownfieldQualifier.ts"],"names":[],"mappings":";;;AAEA;;;;;;;;;;;;;;;;GAgBG;AACH,MAAa,2BAA2B;IACtC,YAA6B,qBAA6C;QAA7C,0BAAqB,GAArB,qBAAqB,CAAwB;IAAG,CAAC;IAE9E;;;;OAIG;IACH,KAAK,CAAC,UAAU;QACd,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,qBAAqB,CAAC,kBAAkB,EAAE,CAAC;QAEtE,MAAM,eAAe,GAAG,OAAO,CAAC,YAAY,KAAK,IAAI,CAAC;QACtD,MAAM,aAAa,GAAG,OAAO,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC,CAAC;QACpD,MAAM,YAAY,GAAG,OAAO,CAAC,SAAS,CAAC,MAAM,GAAG,CAAC,CAAC;QAClD,MAAM,aAAa,GAAG,OAAO,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC,CAAC;QACpD,MAAM,aAAa,GAAG,OAAO,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC,CAAC;QAEpD,wCAAwC;QACxC,MAAM,QAAQ,GACZ,eAAe;YACf,aAAa;YACb,YAAY;YACZ,aAAa;YACb,aAAa,CAAC;QAEhB,OAAO,CAAC,QAAQ,CAAC;IACnB,CAAC;CACF;AA3BD,kEA2BC"}
@@ -1,20 +0,0 @@
1
- /**
2
- * SqliteSolutionContextReader - Aggregates solution context from multiple readers
3
- *
4
- * Composes existing solution context readers to build the aggregated view.
5
- * This avoids duplicating SQL queries and row mapping logic.
6
- */
7
- import { Database } from "better-sqlite3";
8
- import { ISolutionContextReader } from "../application/ISolutionContextReader.js";
9
- import { SolutionContextView } from "../application/SolutionContextView.js";
10
- export declare class SqliteSolutionContextReader implements ISolutionContextReader {
11
- private readonly db;
12
- constructor(db: Database);
13
- getSolutionContext(): Promise<SolutionContextView>;
14
- private getArchitecture;
15
- private getActiveComponents;
16
- private getActiveDecisions;
17
- private getInvariants;
18
- private getActiveGuidelines;
19
- }
20
- //# sourceMappingURL=SqliteSolutionContextReader.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SqliteSolutionContextReader.d.ts","sourceRoot":"","sources":["../../src/infrastructure/SqliteSolutionContextReader.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAE,sBAAsB,EAAE,MAAM,0CAA0C,CAAC;AAClF,OAAO,EAAE,mBAAmB,EAAE,MAAM,uCAAuC,CAAC;AAS5E,qBAAa,2BAA4B,YAAW,sBAAsB;IAC5D,OAAO,CAAC,QAAQ,CAAC,EAAE;gBAAF,EAAE,EAAE,QAAQ;IAEnC,kBAAkB,IAAI,OAAO,CAAC,mBAAmB,CAAC;YAmB1C,eAAe;YAwBf,mBAAmB;YAuBnB,kBAAkB;YAyBlB,aAAa;YAoBb,mBAAmB;CAwBlC"}