@ginkoai/cli 2.0.6 → 2.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commands/epic/index.d.ts +29 -0
- package/dist/commands/epic/index.d.ts.map +1 -0
- package/dist/commands/epic/index.js +94 -0
- package/dist/commands/epic/index.js.map +1 -0
- package/dist/commands/epic/status.d.ts +40 -0
- package/dist/commands/epic/status.d.ts.map +1 -0
- package/dist/commands/epic/status.js +244 -0
- package/dist/commands/epic/status.js.map +1 -0
- package/dist/commands/graph/api-client.d.ts +221 -1
- package/dist/commands/graph/api-client.d.ts.map +1 -1
- package/dist/commands/graph/api-client.js +141 -2
- package/dist/commands/graph/api-client.js.map +1 -1
- package/dist/commands/graph/load.d.ts.map +1 -1
- package/dist/commands/graph/load.js +40 -2
- package/dist/commands/graph/load.js.map +1 -1
- package/dist/commands/handoff.d.ts +3 -3
- package/dist/commands/handoff.d.ts.map +1 -1
- package/dist/commands/handoff.js +32 -3
- package/dist/commands/handoff.js.map +1 -1
- package/dist/commands/migrate/index.d.ts +27 -0
- package/dist/commands/migrate/index.d.ts.map +1 -0
- package/dist/commands/migrate/index.js +76 -0
- package/dist/commands/migrate/index.js.map +1 -0
- package/dist/commands/migrate/status-migration.d.ts +58 -0
- package/dist/commands/migrate/status-migration.d.ts.map +1 -0
- package/dist/commands/migrate/status-migration.js +323 -0
- package/dist/commands/migrate/status-migration.js.map +1 -0
- package/dist/commands/nudging/index.d.ts +24 -0
- package/dist/commands/nudging/index.d.ts.map +1 -0
- package/dist/commands/nudging/index.js +175 -0
- package/dist/commands/nudging/index.js.map +1 -0
- package/dist/commands/sprint/create.d.ts +26 -0
- package/dist/commands/sprint/create.d.ts.map +1 -0
- package/dist/commands/sprint/create.js +269 -0
- package/dist/commands/sprint/create.js.map +1 -0
- package/dist/commands/sprint/index.d.ts.map +1 -1
- package/dist/commands/sprint/index.js +28 -0
- package/dist/commands/sprint/index.js.map +1 -1
- package/dist/commands/sprint/quick-fix.d.ts +25 -0
- package/dist/commands/sprint/quick-fix.d.ts.map +1 -0
- package/dist/commands/sprint/quick-fix.js +151 -0
- package/dist/commands/sprint/quick-fix.js.map +1 -0
- package/dist/commands/sprint/sprint-pipeline-enhanced.d.ts.map +1 -1
- package/dist/commands/sprint/sprint-pipeline-enhanced.js +37 -0
- package/dist/commands/sprint/sprint-pipeline-enhanced.js.map +1 -1
- package/dist/commands/sprint/status.d.ts +42 -0
- package/dist/commands/sprint/status.d.ts.map +1 -0
- package/dist/commands/sprint/status.js +298 -0
- package/dist/commands/sprint/status.js.map +1 -0
- package/dist/commands/start/start-reflection.d.ts +53 -0
- package/dist/commands/start/start-reflection.d.ts.map +1 -1
- package/dist/commands/start/start-reflection.js +464 -71
- package/dist/commands/start/start-reflection.js.map +1 -1
- package/dist/commands/sync/sprint-syncer.d.ts +19 -12
- package/dist/commands/sync/sprint-syncer.d.ts.map +1 -1
- package/dist/commands/sync/sprint-syncer.js +58 -140
- package/dist/commands/sync/sprint-syncer.js.map +1 -1
- package/dist/commands/sync/sync-command.d.ts.map +1 -1
- package/dist/commands/sync/sync-command.js +6 -18
- package/dist/commands/sync/sync-command.js.map +1 -1
- package/dist/commands/task/index.d.ts +25 -0
- package/dist/commands/task/index.d.ts.map +1 -0
- package/dist/commands/task/index.js +100 -0
- package/dist/commands/task/index.js.map +1 -0
- package/dist/commands/task/status.d.ts +46 -0
- package/dist/commands/task/status.d.ts.map +1 -0
- package/dist/commands/task/status.js +348 -0
- package/dist/commands/task/status.js.map +1 -0
- package/dist/commands/team/index.d.ts +5 -0
- package/dist/commands/team/index.d.ts.map +1 -1
- package/dist/commands/team/index.js +28 -0
- package/dist/commands/team/index.js.map +1 -1
- package/dist/commands/team/status.d.ts +16 -0
- package/dist/commands/team/status.d.ts.map +1 -0
- package/dist/commands/team/status.js +180 -0
- package/dist/commands/team/status.js.map +1 -0
- package/dist/index.js +21 -32
- package/dist/index.js.map +1 -1
- package/dist/lib/adoption-score.d.ts +69 -0
- package/dist/lib/adoption-score.d.ts.map +1 -0
- package/dist/lib/adoption-score.js +206 -0
- package/dist/lib/adoption-score.js.map +1 -0
- package/dist/lib/coaching-level.d.ts +127 -0
- package/dist/lib/coaching-level.d.ts.map +1 -0
- package/dist/lib/coaching-level.js +406 -0
- package/dist/lib/coaching-level.js.map +1 -0
- package/dist/lib/context-loader-events.d.ts.map +1 -1
- package/dist/lib/context-loader-events.js +7 -26
- package/dist/lib/context-loader-events.js.map +1 -1
- package/dist/lib/event-logger.d.ts +42 -0
- package/dist/lib/event-logger.d.ts.map +1 -1
- package/dist/lib/event-logger.js +77 -0
- package/dist/lib/event-logger.js.map +1 -1
- package/dist/lib/output-formatter.d.ts +8 -2
- package/dist/lib/output-formatter.d.ts.map +1 -1
- package/dist/lib/output-formatter.js +98 -18
- package/dist/lib/output-formatter.js.map +1 -1
- package/dist/lib/pending-updates.d.ts +148 -0
- package/dist/lib/pending-updates.d.ts.map +1 -0
- package/dist/lib/pending-updates.js +301 -0
- package/dist/lib/pending-updates.js.map +1 -0
- package/dist/lib/planning-menu.d.ts +69 -0
- package/dist/lib/planning-menu.d.ts.map +1 -0
- package/dist/lib/planning-menu.js +342 -0
- package/dist/lib/planning-menu.js.map +1 -0
- package/dist/lib/sprint-loader.d.ts +86 -14
- package/dist/lib/sprint-loader.d.ts.map +1 -1
- package/dist/lib/sprint-loader.js +293 -98
- package/dist/lib/sprint-loader.js.map +1 -1
- package/dist/lib/state-cache.d.ts +142 -0
- package/dist/lib/state-cache.d.ts.map +1 -0
- package/dist/lib/state-cache.js +259 -0
- package/dist/lib/state-cache.js.map +1 -0
- package/dist/lib/targeted-coaching.d.ts +71 -0
- package/dist/lib/targeted-coaching.d.ts.map +1 -0
- package/dist/lib/targeted-coaching.js +318 -0
- package/dist/lib/targeted-coaching.js.map +1 -0
- package/dist/lib/task-graph-sync.d.ts +105 -0
- package/dist/lib/task-graph-sync.d.ts.map +1 -0
- package/dist/lib/task-graph-sync.js +178 -0
- package/dist/lib/task-graph-sync.js.map +1 -0
- package/dist/lib/task-parser.d.ts +109 -0
- package/dist/lib/task-parser.d.ts.map +1 -0
- package/dist/lib/task-parser.js +407 -0
- package/dist/lib/task-parser.js.map +1 -0
- package/dist/lib/user-sprint.d.ts +53 -0
- package/dist/lib/user-sprint.d.ts.map +1 -1
- package/dist/lib/user-sprint.js +137 -2
- package/dist/lib/user-sprint.js.map +1 -1
- package/dist/lib/work-reconciliation.d.ts +59 -0
- package/dist/lib/work-reconciliation.d.ts.map +1 -0
- package/dist/lib/work-reconciliation.js +267 -0
- package/dist/lib/work-reconciliation.js.map +1 -0
- package/dist/templates/ai-instructions-template.d.ts.map +1 -1
- package/dist/templates/ai-instructions-template.js +7 -5
- package/dist/templates/ai-instructions-template.js.map +1 -1
- package/dist/templates/epic-template.md +0 -2
- package/dist/types/config.d.ts.map +1 -1
- package/dist/types/config.js +7 -5
- package/dist/types/config.js.map +1 -1
- package/dist/utils/synthesis.d.ts +4 -0
- package/dist/utils/synthesis.d.ts.map +1 -1
- package/dist/utils/synthesis.js +12 -18
- package/dist/utils/synthesis.js.map +1 -1
- package/dist/utils/version-check.d.ts +26 -0
- package/dist/utils/version-check.d.ts.map +1 -0
- package/dist/utils/version-check.js +186 -0
- package/dist/utils/version-check.js.map +1 -0
- package/package.json +2 -2
|
@@ -0,0 +1,342 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileType: utility
|
|
3
|
+
* @status: current
|
|
4
|
+
* @updated: 2026-01-26
|
|
5
|
+
* @tags: [planning, menu, coaching, structure-detection, epic-016-s04]
|
|
6
|
+
* @related: [start-reflection.ts, user-sprint.ts, event-logger.ts]
|
|
7
|
+
* @priority: high
|
|
8
|
+
* @complexity: medium
|
|
9
|
+
* @dependencies: [prompts, chalk, event-logger]
|
|
10
|
+
*/
|
|
11
|
+
/**
|
|
12
|
+
* Guided Planning Menu (EPIC-016 Sprint 4 t02)
|
|
13
|
+
*
|
|
14
|
+
* Shows a menu when `ginko start` detects no structured work.
|
|
15
|
+
* Guides users toward Epic→Sprint→Task structure while allowing
|
|
16
|
+
* ad-hoc work when appropriate.
|
|
17
|
+
*
|
|
18
|
+
* Menu Options:
|
|
19
|
+
* [a] New Epic - Large initiative with multiple sprints
|
|
20
|
+
* [b] New Feature Sprint - Focused work with clear goals
|
|
21
|
+
* [c] Quick fix / Bug fix - Single task, minimal overhead
|
|
22
|
+
* [d] Something else - Explore, research, or work ad-hoc
|
|
23
|
+
*/
|
|
24
|
+
import prompts from 'prompts';
|
|
25
|
+
import chalk from 'chalk';
|
|
26
|
+
import { logEvent, logPlanningMenuEvent } from './event-logger.js';
|
|
27
|
+
// EPIC-016 Sprint 4: Adoption-based quieting (t05)
|
|
28
|
+
import { getAdoptionScore, recordAdoptionSignal, getPlanningMenuConfig, checkAdhocStreak } from './adoption-score.js';
|
|
29
|
+
// EPIC-016 Sprint 5: Adaptive coaching based on insight scores (t01)
|
|
30
|
+
import { getCoachingContext, PROMPT_VARIANTS, selectPrompt, getTargetedCoachingSuggestions, } from './coaching-level.js';
|
|
31
|
+
import { getGraphId } from '../commands/graph/config.js';
|
|
32
|
+
// =============================================================================
|
|
33
|
+
// Constants
|
|
34
|
+
// =============================================================================
|
|
35
|
+
const PLANNING_MENU_CHOICES = [
|
|
36
|
+
{
|
|
37
|
+
title: 'New Epic',
|
|
38
|
+
description: 'Large initiative with multiple sprints (launches ginko epic)',
|
|
39
|
+
value: 'epic',
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
title: 'New Feature Sprint',
|
|
43
|
+
description: 'Focused work with clear goals (guides through sprint creation)',
|
|
44
|
+
value: 'sprint',
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
title: 'Quick fix / Bug fix',
|
|
48
|
+
description: 'Single task, minimal overhead (creates 1-task sprint)',
|
|
49
|
+
value: 'quick-fix',
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
title: 'Something else',
|
|
53
|
+
description: 'Explore, research, or work ad-hoc (tracked for coaching)',
|
|
54
|
+
value: 'adhoc',
|
|
55
|
+
},
|
|
56
|
+
];
|
|
57
|
+
// =============================================================================
|
|
58
|
+
// Menu Display
|
|
59
|
+
// =============================================================================
|
|
60
|
+
/**
|
|
61
|
+
* Display the guided planning menu and get user selection
|
|
62
|
+
*
|
|
63
|
+
* Called when ginko start detects no structured work.
|
|
64
|
+
* Logs selection for coaching insights analysis (t05).
|
|
65
|
+
* Uses adoption-based quieting to adjust verbosity.
|
|
66
|
+
*
|
|
67
|
+
* @param status - Work structure status from checkWorkStructure()
|
|
68
|
+
* @returns Menu selection result
|
|
69
|
+
*/
|
|
70
|
+
export async function showPlanningMenu(status) {
|
|
71
|
+
// EPIC-016 Sprint 4 t05: Get quieting configuration based on adoption level
|
|
72
|
+
const menuConfig = await getPlanningMenuConfig();
|
|
73
|
+
const adoptionScore = await getAdoptionScore();
|
|
74
|
+
// EPIC-016 Sprint 5 t01: Get coaching context based on insight scores
|
|
75
|
+
const graphId = await getGraphId().catch(() => null);
|
|
76
|
+
const coachingContext = await getCoachingContext(graphId || undefined);
|
|
77
|
+
const coachingLevel = coachingContext.level;
|
|
78
|
+
console.log('');
|
|
79
|
+
// Check for ad-hoc streak (3+ consecutive sessions resets score)
|
|
80
|
+
if (status?.consecutiveAdhocSessions) {
|
|
81
|
+
await checkAdhocStreak(status.consecutiveAdhocSessions);
|
|
82
|
+
}
|
|
83
|
+
// EPIC-016 Sprint 5 t03: Show targeted coaching for low metrics
|
|
84
|
+
if (coachingLevel === 'supportive') {
|
|
85
|
+
const suggestions = getTargetedCoachingSuggestions(coachingContext);
|
|
86
|
+
if (suggestions.length > 0) {
|
|
87
|
+
console.log(chalk.cyan('💡 Coaching tip:'));
|
|
88
|
+
console.log(chalk.dim(` ${suggestions[0]}`));
|
|
89
|
+
console.log('');
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
// Show context-appropriate header based on coaching level
|
|
93
|
+
if (menuConfig.showCelebration && adoptionScore.score >= 20) {
|
|
94
|
+
console.log(chalk.green('🌳 Great job staying organized!'));
|
|
95
|
+
}
|
|
96
|
+
if (status?.reason === 'all_tasks_complete') {
|
|
97
|
+
// Use coaching-level variant for sprint complete message
|
|
98
|
+
const message = selectPrompt(PROMPT_VARIANTS.sprintComplete, coachingLevel);
|
|
99
|
+
console.log(message);
|
|
100
|
+
}
|
|
101
|
+
else if (menuConfig.showCoachingTip && status?.consecutiveAdhocSessions && status.consecutiveAdhocSessions > 1) {
|
|
102
|
+
console.log(chalk.yellow(`💡 You've had ${status.consecutiveAdhocSessions} sessions without planned work.`));
|
|
103
|
+
console.log(chalk.white('Would you like to plan your work?'));
|
|
104
|
+
}
|
|
105
|
+
else {
|
|
106
|
+
// Use coaching-level variant for no structure message
|
|
107
|
+
const message = selectPrompt(PROMPT_VARIANTS.noStructure, coachingLevel);
|
|
108
|
+
console.log(message);
|
|
109
|
+
}
|
|
110
|
+
console.log('');
|
|
111
|
+
// Build menu choices based on quieting level
|
|
112
|
+
const choices = PLANNING_MENU_CHOICES.map((c, i) => ({
|
|
113
|
+
title: `${chalk.cyan(`[${String.fromCharCode(97 + i)}]`)} ${c.title}`,
|
|
114
|
+
description: menuConfig.showFullDescription ? chalk.dim(c.description) : undefined,
|
|
115
|
+
value: c.value,
|
|
116
|
+
}));
|
|
117
|
+
const response = await prompts({
|
|
118
|
+
type: 'select',
|
|
119
|
+
name: 'choice',
|
|
120
|
+
message: 'Select an option',
|
|
121
|
+
choices,
|
|
122
|
+
initial: 0,
|
|
123
|
+
});
|
|
124
|
+
// Handle cancellation (Ctrl+C or ESC)
|
|
125
|
+
if (response.choice === undefined) {
|
|
126
|
+
return { choice: null, cancelled: true };
|
|
127
|
+
}
|
|
128
|
+
// Log selection and record adoption signal (non-blocking)
|
|
129
|
+
// EPIC-016 Sprint 5 t05: Pass coaching context for feedback loop
|
|
130
|
+
logPlanningChoice(response.choice, coachingLevel, coachingContext.overallScore).catch(() => {
|
|
131
|
+
// Ignore logging errors
|
|
132
|
+
});
|
|
133
|
+
return { choice: response.choice, cancelled: false };
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* Log the planning menu selection for coaching analysis (t05)
|
|
137
|
+
*
|
|
138
|
+
* Enables the insights system to:
|
|
139
|
+
* - Track pattern adoption over time
|
|
140
|
+
* - Identify users who frequently choose ad-hoc
|
|
141
|
+
* - Measure effectiveness of planning prompts
|
|
142
|
+
*
|
|
143
|
+
* Also records adoption signals for quieting behavior.
|
|
144
|
+
*/
|
|
145
|
+
async function logPlanningChoice(choice, coachingLevel, overallScore) {
|
|
146
|
+
const descriptions = {
|
|
147
|
+
'epic': 'Started new epic creation from planning menu',
|
|
148
|
+
'sprint': 'Started new sprint creation from planning menu',
|
|
149
|
+
'quick-fix': 'Started quick-fix flow from planning menu',
|
|
150
|
+
'adhoc': 'Chose ad-hoc work from planning menu',
|
|
151
|
+
};
|
|
152
|
+
// Map menu choices to adoption signals
|
|
153
|
+
const adoptionSignals = {
|
|
154
|
+
'epic': 'created_epic',
|
|
155
|
+
'sprint': 'created_sprint',
|
|
156
|
+
'quick-fix': 'used_quick_fix',
|
|
157
|
+
'adhoc': 'chose_adhoc',
|
|
158
|
+
};
|
|
159
|
+
try {
|
|
160
|
+
// Log event for insights
|
|
161
|
+
await logEvent({
|
|
162
|
+
category: 'decision',
|
|
163
|
+
description: descriptions[choice],
|
|
164
|
+
tags: ['planning-menu', `choice-${choice}`, 'coaching-data'],
|
|
165
|
+
impact: choice === 'adhoc' ? 'low' : 'medium',
|
|
166
|
+
});
|
|
167
|
+
// EPIC-016 Sprint 5 t05: Log coaching interaction for feedback loop
|
|
168
|
+
if (coachingLevel) {
|
|
169
|
+
await logPlanningMenuEvent(choice, coachingLevel, overallScore);
|
|
170
|
+
}
|
|
171
|
+
// Record adoption signal for quieting behavior (t05)
|
|
172
|
+
const signal = adoptionSignals[choice];
|
|
173
|
+
if (signal) {
|
|
174
|
+
await recordAdoptionSignal(signal);
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
catch {
|
|
178
|
+
// Non-critical - don't fail startup if logging fails
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
// =============================================================================
|
|
182
|
+
// Route Handlers
|
|
183
|
+
// =============================================================================
|
|
184
|
+
/**
|
|
185
|
+
* Route the planning menu choice to appropriate handler
|
|
186
|
+
*
|
|
187
|
+
* Routes:
|
|
188
|
+
* - epic → launches ginko epic command
|
|
189
|
+
* - sprint → launches sprint creation flow (t03)
|
|
190
|
+
* - quick-fix → launches quick-fix flow (t04)
|
|
191
|
+
* - adhoc → marks session as ad-hoc, continues to normal start
|
|
192
|
+
*
|
|
193
|
+
* @param choice - User's menu selection
|
|
194
|
+
* @returns Route result with success status and metadata
|
|
195
|
+
*/
|
|
196
|
+
export async function routePlanningChoice(choice) {
|
|
197
|
+
switch (choice) {
|
|
198
|
+
case 'epic':
|
|
199
|
+
return routeToEpicCreation();
|
|
200
|
+
case 'sprint':
|
|
201
|
+
return routeToSprintCreation();
|
|
202
|
+
case 'quick-fix':
|
|
203
|
+
return routeToQuickFix();
|
|
204
|
+
case 'adhoc':
|
|
205
|
+
return routeToAdhocWork();
|
|
206
|
+
default:
|
|
207
|
+
return { success: false, message: 'Unknown choice', shouldContinueStart: true };
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
/**
|
|
211
|
+
* Route to epic creation (ginko epic)
|
|
212
|
+
*/
|
|
213
|
+
async function routeToEpicCreation() {
|
|
214
|
+
console.log('');
|
|
215
|
+
console.log(chalk.cyan('🚀 Launching epic creation...'));
|
|
216
|
+
console.log('');
|
|
217
|
+
try {
|
|
218
|
+
// Import and execute epic command
|
|
219
|
+
const { epicCommand } = await import('../commands/epic.js');
|
|
220
|
+
await epicCommand({});
|
|
221
|
+
return {
|
|
222
|
+
success: true,
|
|
223
|
+
message: 'Epic creation flow completed',
|
|
224
|
+
shouldContinueStart: false // Epic command handles its own output
|
|
225
|
+
};
|
|
226
|
+
}
|
|
227
|
+
catch (error) {
|
|
228
|
+
console.error(chalk.red('Failed to launch epic creation:'), error);
|
|
229
|
+
return {
|
|
230
|
+
success: false,
|
|
231
|
+
message: 'Epic creation failed',
|
|
232
|
+
shouldContinueStart: true
|
|
233
|
+
};
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
/**
|
|
237
|
+
* Route to sprint creation flow (t03)
|
|
238
|
+
* Full implementation in packages/cli/src/commands/sprint/create.ts
|
|
239
|
+
*/
|
|
240
|
+
async function routeToSprintCreation() {
|
|
241
|
+
console.log('');
|
|
242
|
+
console.log(chalk.cyan('📋 Starting sprint creation...'));
|
|
243
|
+
console.log('');
|
|
244
|
+
try {
|
|
245
|
+
// Import and execute sprint create command
|
|
246
|
+
const { createSprintCommand } = await import('../commands/sprint/create.js');
|
|
247
|
+
const result = await createSprintCommand({ adhoc: true });
|
|
248
|
+
return {
|
|
249
|
+
success: result.success,
|
|
250
|
+
sprintId: result.sprintId,
|
|
251
|
+
message: result.message || 'Sprint creation completed',
|
|
252
|
+
shouldContinueStart: !result.success // Continue if creation failed
|
|
253
|
+
};
|
|
254
|
+
}
|
|
255
|
+
catch (error) {
|
|
256
|
+
// Fallback: Sprint creation not yet implemented (t03)
|
|
257
|
+
console.log(chalk.dim('Sprint creation flow launching...'));
|
|
258
|
+
console.log('');
|
|
259
|
+
console.log(chalk.white('To create a sprint, describe what you want to build:'));
|
|
260
|
+
console.log(chalk.dim(' The AI will break this down into tasks and create a sprint.'));
|
|
261
|
+
console.log('');
|
|
262
|
+
return {
|
|
263
|
+
success: true,
|
|
264
|
+
message: 'Sprint creation guidance displayed',
|
|
265
|
+
shouldContinueStart: true
|
|
266
|
+
};
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
/**
|
|
270
|
+
* Route to quick-fix flow (t04)
|
|
271
|
+
* Creates a single-task sprint with minimal ceremony
|
|
272
|
+
*/
|
|
273
|
+
async function routeToQuickFix() {
|
|
274
|
+
console.log('');
|
|
275
|
+
console.log(chalk.cyan('⚡ Quick fix mode'));
|
|
276
|
+
console.log('');
|
|
277
|
+
// Get quick description
|
|
278
|
+
const response = await prompts({
|
|
279
|
+
type: 'text',
|
|
280
|
+
name: 'description',
|
|
281
|
+
message: 'Describe the fix in one line:',
|
|
282
|
+
validate: (value) => value.trim().length > 5 ? true : 'Please provide a brief description',
|
|
283
|
+
});
|
|
284
|
+
if (!response.description) {
|
|
285
|
+
return { success: false, message: 'Quick fix cancelled', shouldContinueStart: false };
|
|
286
|
+
}
|
|
287
|
+
const description = response.description.trim();
|
|
288
|
+
try {
|
|
289
|
+
// Try to use the quick-fix implementation (t04)
|
|
290
|
+
const { createQuickFixTask } = await import('../commands/sprint/quick-fix.js');
|
|
291
|
+
const result = await createQuickFixTask(description);
|
|
292
|
+
console.log('');
|
|
293
|
+
console.log(chalk.green(`✓ Created: ${result.taskId} - ${description}`));
|
|
294
|
+
console.log(chalk.dim(' Ready to work. Run `ginko task complete` when done.'));
|
|
295
|
+
return {
|
|
296
|
+
success: true,
|
|
297
|
+
taskId: result.taskId,
|
|
298
|
+
sprintId: result.sprintId,
|
|
299
|
+
message: 'Quick fix task created',
|
|
300
|
+
shouldContinueStart: true
|
|
301
|
+
};
|
|
302
|
+
}
|
|
303
|
+
catch {
|
|
304
|
+
// Fallback: Log as an event for now
|
|
305
|
+
console.log('');
|
|
306
|
+
console.log(chalk.green(`✓ Ready to work on: ${description}`));
|
|
307
|
+
console.log(chalk.dim(' Tip: Run `ginko log "completed: ${description}"` when done.'));
|
|
308
|
+
// Log the quick fix start as an event
|
|
309
|
+
await logEvent({
|
|
310
|
+
category: 'feature',
|
|
311
|
+
description: `Quick fix started: ${description}`,
|
|
312
|
+
tags: ['quick-fix', 'unstructured'],
|
|
313
|
+
impact: 'medium',
|
|
314
|
+
}).catch(() => { });
|
|
315
|
+
return {
|
|
316
|
+
success: true,
|
|
317
|
+
message: 'Quick fix tracked (full sprint creation in t04)',
|
|
318
|
+
shouldContinueStart: true
|
|
319
|
+
};
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
/**
|
|
323
|
+
* Route to ad-hoc work mode
|
|
324
|
+
* User explicitly chooses unstructured work - track for coaching
|
|
325
|
+
*/
|
|
326
|
+
async function routeToAdhocWork() {
|
|
327
|
+
console.log('');
|
|
328
|
+
console.log(chalk.dim('Working ad-hoc. Use `ginko log` to track your progress.'));
|
|
329
|
+
return {
|
|
330
|
+
success: true,
|
|
331
|
+
message: 'Ad-hoc work mode - session will continue normally',
|
|
332
|
+
shouldContinueStart: true
|
|
333
|
+
};
|
|
334
|
+
}
|
|
335
|
+
// =============================================================================
|
|
336
|
+
// Exports for Testing
|
|
337
|
+
// =============================================================================
|
|
338
|
+
export const __testing = {
|
|
339
|
+
PLANNING_MENU_CHOICES,
|
|
340
|
+
logPlanningChoice,
|
|
341
|
+
};
|
|
342
|
+
//# sourceMappingURL=planning-menu.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"planning-menu.js","sourceRoot":"","sources":["../../src/lib/planning-menu.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH;;;;;;;;;;;;GAYG;AAEH,OAAO,OAAO,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,QAAQ,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AACnE,mDAAmD;AACnD,OAAO,EACL,gBAAgB,EAChB,oBAAoB,EACpB,qBAAqB,EACrB,gBAAgB,EAEjB,MAAM,qBAAqB,CAAC;AAC7B,qEAAqE;AACrE,OAAO,EACL,kBAAkB,EAElB,eAAe,EACf,YAAY,EACZ,8BAA8B,GAC/B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAqBzD,gFAAgF;AAChF,YAAY;AACZ,gFAAgF;AAEhF,MAAM,qBAAqB,GAAG;IAC5B;QACE,KAAK,EAAE,UAAU;QACjB,WAAW,E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L,OAAO,EAAE,IAAI;YACb,OAAO,EAAE,iDAAiD;YAC1D,mBAAmB,EAAE,IAAI;SAC1B,CAAC;IACJ,CAAC;AACH,CAAC;AAED;;;GAGG;AACH,KAAK,UAAU,gBAAgB;IAC7B,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IAChB,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,yDAAyD,CAAC,CAAC,CAAC;IAElF,OAAO;QACL,OAAO,EAAE,IAAI;QACb,OAAO,EAAE,mDAAmD;QAC5D,mBAAmB,EAAE,IAAI;KAC1B,CAAC;AACJ,CAAC;AAED,gFAAgF;AAChF,sBAAsB;AACtB,gFAAgF;AAEhF,MAAM,CAAC,MAAM,SAAS,GAAG;IACvB,qBAAqB;IACrB,iBAAiB;CAClB,CAAC"}
|
|
@@ -1,21 +1,49 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @fileType: utility
|
|
3
3
|
* @status: current
|
|
4
|
-
* @updated:
|
|
5
|
-
* @tags: [sprint, task-
|
|
6
|
-
* @related: [charter-loader.ts, start-reflection.ts, context-loader-events.ts]
|
|
4
|
+
* @updated: 2026-01-19
|
|
5
|
+
* @tags: [sprint, task-content, epic-015, session-context]
|
|
6
|
+
* @related: [charter-loader.ts, start-reflection.ts, context-loader-events.ts, task-extractor.ts]
|
|
7
7
|
* @priority: high
|
|
8
8
|
* @complexity: medium
|
|
9
9
|
* @dependencies: [fs-extra, path]
|
|
10
10
|
*/
|
|
11
11
|
/**
|
|
12
|
-
* Task state enumeration
|
|
12
|
+
* Task state enumeration (kept for backward compatibility)
|
|
13
|
+
* NOTE: As of EPIC-015 Sprint 2, status comes from the graph API.
|
|
14
|
+
* File parsing defaults all tasks to 'todo'. Merge with graph status at runtime.
|
|
13
15
|
* - todo: [ ] Not started
|
|
14
16
|
* - in_progress: [@] Currently being worked on
|
|
15
17
|
* - paused: [Z] Temporarily on hold (sleeping)
|
|
16
18
|
* - complete: [x] Finished
|
|
17
19
|
*/
|
|
18
20
|
export type TaskState = 'todo' | 'in_progress' | 'paused' | 'complete';
|
|
21
|
+
/**
|
|
22
|
+
* Task content extracted from sprint markdown (no status)
|
|
23
|
+
* Status comes from graph API and is merged at runtime.
|
|
24
|
+
*/
|
|
25
|
+
export interface TaskContent {
|
|
26
|
+
id: string;
|
|
27
|
+
title: string;
|
|
28
|
+
files?: string[];
|
|
29
|
+
effort?: string;
|
|
30
|
+
priority?: string;
|
|
31
|
+
relatedADRs?: string[];
|
|
32
|
+
relatedPatterns?: string[];
|
|
33
|
+
relatedGotchas?: string[];
|
|
34
|
+
acceptanceCriteria?: AcceptanceCriterion[];
|
|
35
|
+
dependsOn?: string[];
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Sprint content extracted from markdown (no status-based progress)
|
|
39
|
+
* Status/progress comes from graph API and is merged at runtime.
|
|
40
|
+
*/
|
|
41
|
+
export interface SprintContent {
|
|
42
|
+
name: string;
|
|
43
|
+
file: string;
|
|
44
|
+
tasks: TaskContent[];
|
|
45
|
+
dependencyWarnings?: string[];
|
|
46
|
+
}
|
|
19
47
|
/**
|
|
20
48
|
* Acceptance criterion type - auto-detected from description (EPIC-004 Sprint 3)
|
|
21
49
|
* - test: Unit tests, specs, test suites
|
|
@@ -37,7 +65,9 @@ export interface AcceptanceCriterion {
|
|
|
37
65
|
command?: string;
|
|
38
66
|
}
|
|
39
67
|
/**
|
|
40
|
-
* Individual task from sprint checklist
|
|
68
|
+
* Individual task from sprint checklist (backward compatible interface)
|
|
69
|
+
* NOTE: As of EPIC-015 Sprint 2, state defaults to 'todo' from file parsing.
|
|
70
|
+
* Actual status should be merged from graph API at runtime.
|
|
41
71
|
*/
|
|
42
72
|
export interface Task {
|
|
43
73
|
id: string;
|
|
@@ -54,7 +84,9 @@ export interface Task {
|
|
|
54
84
|
dependsOn?: string[];
|
|
55
85
|
}
|
|
56
86
|
/**
|
|
57
|
-
* Sprint checklist with task states and progress
|
|
87
|
+
* Sprint checklist with task states and progress (backward compatible interface)
|
|
88
|
+
* NOTE: As of EPIC-015 Sprint 2, progress values will be zeroed from file parsing.
|
|
89
|
+
* Actual progress should be calculated from graph API status at runtime.
|
|
58
90
|
*/
|
|
59
91
|
export interface SprintChecklist {
|
|
60
92
|
name: string;
|
|
@@ -75,11 +107,12 @@ export interface SprintChecklist {
|
|
|
75
107
|
* Find active sprint file
|
|
76
108
|
*
|
|
77
109
|
* Priority:
|
|
78
|
-
* 1.
|
|
79
|
-
* 2. Check CURRENT-SPRINT.md for sprint reference → return that file
|
|
80
|
-
* 3. Fall back to scanning SPRINT-*.md files for first incomplete one
|
|
110
|
+
* 1. Scan SPRINT-*.md files for first incomplete one
|
|
81
111
|
* - Respects frontmatter `status` field: active > not_started > (skip paused/complete)
|
|
82
112
|
*
|
|
113
|
+
* EPIC-015 Sprint 3: CURRENT-SPRINT.md is deprecated. Sprint state now comes from
|
|
114
|
+
* the graph API, not from a local file. This function only scans actual sprint files.
|
|
115
|
+
*
|
|
83
116
|
* Valid status values:
|
|
84
117
|
* - active: Currently being worked on
|
|
85
118
|
* - not_started: Planned but not yet started
|
|
@@ -93,25 +126,57 @@ export interface SprintChecklist {
|
|
|
93
126
|
*/
|
|
94
127
|
export declare function findActiveSprint(projectRoot?: string): Promise<string | null>;
|
|
95
128
|
/**
|
|
96
|
-
* Parse sprint markdown into task checklist
|
|
129
|
+
* Parse sprint markdown into task checklist (backward compatible)
|
|
130
|
+
*
|
|
131
|
+
* EPIC-015 Sprint 2: Status parsing removed. All tasks default to 'todo'.
|
|
132
|
+
* Status should be merged from graph API at runtime.
|
|
97
133
|
*
|
|
98
134
|
* Looks for:
|
|
99
135
|
* - Sprint name from title (# SPRINT: ...)
|
|
100
136
|
* - Tasks from ## Sprint Tasks or ### TASK-N sections
|
|
101
|
-
* -
|
|
102
|
-
* -
|
|
137
|
+
* - Task metadata (files, priority, effort, dependencies)
|
|
138
|
+
* - Related knowledge (ADRs, patterns, gotchas)
|
|
139
|
+
* - Acceptance criteria
|
|
103
140
|
*
|
|
104
141
|
* @param markdown - Sprint markdown content
|
|
105
142
|
* @param filePath - Path to sprint file
|
|
106
|
-
* @returns Parsed sprint checklist
|
|
143
|
+
* @returns Parsed sprint checklist (all tasks with state: 'todo')
|
|
107
144
|
*/
|
|
108
145
|
export declare function parseSprintChecklist(markdown: string, filePath: string): SprintChecklist;
|
|
109
146
|
/**
|
|
110
|
-
*
|
|
147
|
+
* Parse sprint markdown into content-only structure (no status)
|
|
148
|
+
*
|
|
149
|
+
* EPIC-015 Sprint 2: New content-focused parsing function.
|
|
150
|
+
* Extracts task content (ID, title, metadata, relationships) without status.
|
|
151
|
+
* Status should be fetched from graph API and merged separately.
|
|
152
|
+
*
|
|
153
|
+
* @param markdown - Sprint markdown content
|
|
154
|
+
* @param filePath - Path to sprint file
|
|
155
|
+
* @returns Parsed sprint content (no status information)
|
|
156
|
+
*/
|
|
157
|
+
export declare function parseSprintContent(markdown: string, filePath: string): SprintContent;
|
|
158
|
+
/**
|
|
159
|
+
* Load active sprint content (no status)
|
|
160
|
+
*
|
|
161
|
+
* EPIC-015 Sprint 2: New content-focused loading function.
|
|
162
|
+
* Finds active sprint file and parses content without status.
|
|
163
|
+
* Status should be fetched from graph API and merged separately.
|
|
164
|
+
*
|
|
165
|
+
* @param projectRoot - Project root directory (defaults to git root)
|
|
166
|
+
* @param sprintFilePath - Optional specific sprint file path
|
|
167
|
+
* @returns Parsed sprint content or null if no sprint found
|
|
168
|
+
*/
|
|
169
|
+
export declare function loadSprintContent(projectRoot?: string, sprintFilePath?: string): Promise<SprintContent | null>;
|
|
170
|
+
/**
|
|
171
|
+
* Load active sprint checklist (backward compatible)
|
|
172
|
+
*
|
|
173
|
+
* EPIC-015 Sprint 2: This function maintained for backward compatibility.
|
|
174
|
+
* All tasks will have state: 'todo'. Merge with graph API status at runtime.
|
|
111
175
|
*
|
|
112
176
|
* Finds active sprint file and parses into structured checklist
|
|
113
177
|
*
|
|
114
178
|
* @param projectRoot - Project root directory (defaults to git root)
|
|
179
|
+
* @param sprintFilePath - Optional specific sprint file path
|
|
115
180
|
* @returns Parsed sprint checklist or null if no sprint found
|
|
116
181
|
*/
|
|
117
182
|
export declare function loadSprintChecklist(projectRoot?: string, sprintFilePath?: string): Promise<SprintChecklist | null>;
|
|
@@ -146,6 +211,13 @@ export interface SprintProgressionInfo {
|
|
|
146
211
|
totalSprints: number;
|
|
147
212
|
completedSprints: number;
|
|
148
213
|
}
|
|
214
|
+
/**
|
|
215
|
+
* Find sprint file by ID
|
|
216
|
+
* @param sprintId - Sprint ID (e.g., 'e011_s01' or 'e016_s03')
|
|
217
|
+
* @param projectRoot - Project root directory
|
|
218
|
+
* @returns Path to sprint file or null if not found
|
|
219
|
+
*/
|
|
220
|
+
export declare function findSprintFileById(sprintId: string, projectRoot: string): Promise<string | null>;
|
|
149
221
|
/**
|
|
150
222
|
* Detect sprint progression and epic completion status
|
|
151
223
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sprint-loader.d.ts","sourceRoot":"","sources":["../../src/lib/sprint-loader.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;
|
|
1
|
+
{"version":3,"file":"sprint-loader.d.ts","sourceRoot":"","sources":["../../src/lib/sprint-loader.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAyBH;;;;;;;;GAQG;AACH,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,aAAa,GAAG,QAAQ,GAAG,UAAU,CAAC;AAOvE;;;GAGG;AACH,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;IAC3B,c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