ghcralph 0.1.2 → 0.1.4
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/README.md +23 -16
- package/dist/commands/run.d.ts.map +1 -1
- package/dist/commands/run.js +66 -19
- package/dist/commands/run.js.map +1 -1
- package/dist/core/action-executor.d.ts +13 -0
- package/dist/core/action-executor.d.ts.map +1 -1
- package/dist/core/action-executor.js +32 -0
- package/dist/core/action-executor.js.map +1 -1
- package/dist/core/checkpoint-manager.d.ts +50 -11
- package/dist/core/checkpoint-manager.d.ts.map +1 -1
- package/dist/core/checkpoint-manager.js +287 -187
- package/dist/core/checkpoint-manager.js.map +1 -1
- package/dist/core/config-schema.d.ts +9 -1
- package/dist/core/config-schema.d.ts.map +1 -1
- package/dist/core/config-schema.js +14 -0
- package/dist/core/config-schema.js.map +1 -1
- package/dist/core/context-builder.d.ts.map +1 -1
- package/dist/core/context-builder.js +61 -16
- package/dist/core/context-builder.js.map +1 -1
- package/dist/core/index.d.ts +4 -4
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +1 -1
- package/dist/core/index.js.map +1 -1
- package/dist/core/loop-engine.d.ts +6 -1
- package/dist/core/loop-engine.d.ts.map +1 -1
- package/dist/core/loop-engine.js +72 -4
- package/dist/core/loop-engine.js.map +1 -1
- package/dist/core/loop-state.d.ts +8 -0
- package/dist/core/loop-state.d.ts.map +1 -1
- package/dist/core/loop-state.js.map +1 -1
- package/dist/core/progress-tracker.d.ts +73 -3
- package/dist/core/progress-tracker.d.ts.map +1 -1
- package/dist/core/progress-tracker.js +192 -2
- package/dist/core/progress-tracker.js.map +1 -1
- package/dist/core/prompt-examples.d.ts +11 -3
- package/dist/core/prompt-examples.d.ts.map +1 -1
- package/dist/core/prompt-examples.js +47 -5
- package/dist/core/prompt-examples.js.map +1 -1
- package/package.json +2 -1
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Progress Tracker
|
|
3
3
|
*
|
|
4
|
-
* Creates and maintains Markdown-based progress artifacts
|
|
4
|
+
* Creates and maintains Markdown-based progress artifacts.
|
|
5
|
+
* Uses in-memory accumulation to preserve full task history across a run.
|
|
5
6
|
*/
|
|
6
|
-
import type { FullLoopState } from './loop-state.js';
|
|
7
|
+
import type { FullLoopState, IterationRecord } from './loop-state.js';
|
|
8
|
+
import type { ProgressVerbosity } from './config-schema.js';
|
|
7
9
|
/**
|
|
8
10
|
* Session data for JSON output
|
|
9
11
|
*/
|
|
@@ -27,13 +29,81 @@ export interface SessionData {
|
|
|
27
29
|
}>;
|
|
28
30
|
lastCheckpoint?: string;
|
|
29
31
|
}
|
|
32
|
+
/**
|
|
33
|
+
* Completed task result for history tracking
|
|
34
|
+
*/
|
|
35
|
+
export interface TaskResult {
|
|
36
|
+
taskId: string;
|
|
37
|
+
taskTitle: string;
|
|
38
|
+
status: 'completed' | 'failed' | 'stuck';
|
|
39
|
+
attempt: number;
|
|
40
|
+
iterationCount: number;
|
|
41
|
+
tokensUsed: number;
|
|
42
|
+
startedAt: Date;
|
|
43
|
+
completedAt: Date;
|
|
44
|
+
summary?: string;
|
|
45
|
+
error?: string;
|
|
46
|
+
iterations: IterationRecord[];
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Run session tracking all tasks in a multi-task execution
|
|
50
|
+
*/
|
|
51
|
+
export interface RunSession {
|
|
52
|
+
startTime: Date;
|
|
53
|
+
branch?: string | undefined;
|
|
54
|
+
totalTasks?: number | undefined;
|
|
55
|
+
completedTasks: TaskResult[];
|
|
56
|
+
currentTask?: {
|
|
57
|
+
taskId: string;
|
|
58
|
+
taskTitle: string;
|
|
59
|
+
taskNumber: number;
|
|
60
|
+
state: FullLoopState;
|
|
61
|
+
} | undefined;
|
|
62
|
+
}
|
|
30
63
|
/**
|
|
31
64
|
* Progress Tracker class
|
|
65
|
+
*
|
|
66
|
+
* Maintains in-memory accumulation of all task results across a run,
|
|
67
|
+
* persisting full history to the progress file after each task.
|
|
32
68
|
*/
|
|
33
69
|
export declare class ProgressTracker {
|
|
34
70
|
private projectRoot;
|
|
35
71
|
private maxIterations;
|
|
36
|
-
|
|
72
|
+
private session;
|
|
73
|
+
private verbosity;
|
|
74
|
+
constructor(projectRoot?: string, maxIterations?: number, verbosity?: ProgressVerbosity);
|
|
75
|
+
/**
|
|
76
|
+
* Set verbosity level
|
|
77
|
+
*/
|
|
78
|
+
setVerbosity(verbosity: ProgressVerbosity): void;
|
|
79
|
+
/**
|
|
80
|
+
* Get the current session (for context like task numbers in commit messages)
|
|
81
|
+
*/
|
|
82
|
+
getSession(): RunSession | null;
|
|
83
|
+
/**
|
|
84
|
+
* Get the count of completed tasks in the session
|
|
85
|
+
*/
|
|
86
|
+
getCompletedTaskCount(): number;
|
|
87
|
+
/**
|
|
88
|
+
* Start a new run session for multi-task execution
|
|
89
|
+
*/
|
|
90
|
+
startSession(branch?: string, totalTasks?: number): void;
|
|
91
|
+
/**
|
|
92
|
+
* Set the current task being processed (for live progress display)
|
|
93
|
+
*/
|
|
94
|
+
setCurrentTask(taskNumber: number, state: FullLoopState): void;
|
|
95
|
+
/**
|
|
96
|
+
* Record a completed task result and persist to file
|
|
97
|
+
*/
|
|
98
|
+
recordTaskCompletion(state: FullLoopState, status: 'completed' | 'failed' | 'stuck', attempt: number, summary?: string, error?: string): Promise<void>;
|
|
99
|
+
/**
|
|
100
|
+
* Save the full session history to progress file
|
|
101
|
+
*/
|
|
102
|
+
private saveFullSession;
|
|
103
|
+
/**
|
|
104
|
+
* Generate full session markdown with all task history
|
|
105
|
+
*/
|
|
106
|
+
private generateFullSessionMarkdown;
|
|
37
107
|
/**
|
|
38
108
|
* Get the progress file path
|
|
39
109
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"progress-tracker.d.ts","sourceRoot":"","sources":["../../src/core/progress-tracker.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"progress-tracker.d.ts","sourceRoot":"","sources":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7B;;OAEG;IACH,gBAAgB,CAAC,KAAK,EAAE,aAAa,GAAG,MAAM;IA8B9C;;OAEG;IACH,OAAO,CAAC,YAAY;IAiBpB;;OAEG;IACH,OAAO,CAAC,eAAe;IAoDvB;;OAEG;IACG,IAAI,CAAC,KAAK,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC;IAW/C;;OAEG;IACG,IAAI,IAAI,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC;IAYzC;;OAEG;IACH,MAAM,CAAC,KAAK,EAAE,aAAa,GAAG,WAAW;IAuCzC;;OAEG;IACG,UAAU,IAAI,OAAO,CAAC,OAAO,CAAC;IASpC;;OAEG;IACG,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAQ5B;;;OAGG;IACG,uBAAuB,IAAI,OAAO,CAAC,MAAM,CAAC;IA0BhD;;;OAGG;IACG,gBAAgB,CACpB,IAAI,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,EACnC,MAAM,EAAE,WAAW,GAAG,QAAQ,GAAG,OAAO,EACxC,OAAO,EAAE,MAAM,EACf,OAAO,CAAC,EAAE,MAAM,EAChB,KAAK,CAAC,EAAE,MAAM,GACb,OAAO,CAAC,IAAI,CAAC;CAiDjB"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Progress Tracker
|
|
3
3
|
*
|
|
4
|
-
* Creates and maintains Markdown-based progress artifacts
|
|
4
|
+
* Creates and maintains Markdown-based progress artifacts.
|
|
5
|
+
* Uses in-memory accumulation to preserve full task history across a run.
|
|
5
6
|
*/
|
|
6
7
|
import fs from 'node:fs/promises';
|
|
7
8
|
import path from 'node:path';
|
|
@@ -32,13 +33,177 @@ function formatElapsed(startDate, endDate) {
|
|
|
32
33
|
}
|
|
33
34
|
/**
|
|
34
35
|
* Progress Tracker class
|
|
36
|
+
*
|
|
37
|
+
* Maintains in-memory accumulation of all task results across a run,
|
|
38
|
+
* persisting full history to the progress file after each task.
|
|
35
39
|
*/
|
|
36
40
|
export class ProgressTracker {
|
|
37
41
|
projectRoot;
|
|
38
42
|
maxIterations;
|
|
39
|
-
|
|
43
|
+
session = null;
|
|
44
|
+
verbosity;
|
|
45
|
+
constructor(projectRoot, maxIterations = 10, verbosity = 'standard') {
|
|
40
46
|
this.projectRoot = projectRoot;
|
|
41
47
|
this.maxIterations = maxIterations;
|
|
48
|
+
this.verbosity = verbosity;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Set verbosity level
|
|
52
|
+
*/
|
|
53
|
+
setVerbosity(verbosity) {
|
|
54
|
+
this.verbosity = verbosity;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Get the current session (for context like task numbers in commit messages)
|
|
58
|
+
*/
|
|
59
|
+
getSession() {
|
|
60
|
+
return this.session;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Get the count of completed tasks in the session
|
|
64
|
+
*/
|
|
65
|
+
getCompletedTaskCount() {
|
|
66
|
+
return this.session?.completedTasks.length ?? 0;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Start a new run session for multi-task execution
|
|
70
|
+
*/
|
|
71
|
+
startSession(branch, totalTasks) {
|
|
72
|
+
this.session = {
|
|
73
|
+
startTime: new Date(),
|
|
74
|
+
branch,
|
|
75
|
+
totalTasks,
|
|
76
|
+
completedTasks: [],
|
|
77
|
+
};
|
|
78
|
+
debug(`Started progress tracking session${branch ? ` on branch ${branch}` : ''}`);
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Set the current task being processed (for live progress display)
|
|
82
|
+
*/
|
|
83
|
+
setCurrentTask(taskNumber, state) {
|
|
84
|
+
if (!this.session) {
|
|
85
|
+
this.startSession();
|
|
86
|
+
}
|
|
87
|
+
// Session is guaranteed to exist after startSession()
|
|
88
|
+
const session = this.session;
|
|
89
|
+
session.currentTask = {
|
|
90
|
+
taskId: state.task.id,
|
|
91
|
+
taskTitle: state.task.title,
|
|
92
|
+
taskNumber,
|
|
93
|
+
state,
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Record a completed task result and persist to file
|
|
98
|
+
*/
|
|
99
|
+
async recordTaskCompletion(state, status, attempt, summary, error) {
|
|
100
|
+
if (!this.session) {
|
|
101
|
+
this.startSession();
|
|
102
|
+
}
|
|
103
|
+
// Session is guaranteed to exist after startSession()
|
|
104
|
+
const session = this.session;
|
|
105
|
+
const result = {
|
|
106
|
+
taskId: state.task.id,
|
|
107
|
+
taskTitle: state.task.title,
|
|
108
|
+
status,
|
|
109
|
+
attempt,
|
|
110
|
+
iterationCount: state.iteration,
|
|
111
|
+
tokensUsed: state.tokensUsed,
|
|
112
|
+
startedAt: state.startedAt,
|
|
113
|
+
completedAt: new Date(),
|
|
114
|
+
iterations: [...state.iterations],
|
|
115
|
+
};
|
|
116
|
+
if (summary)
|
|
117
|
+
result.summary = summary;
|
|
118
|
+
if (error)
|
|
119
|
+
result.error = error;
|
|
120
|
+
session.completedTasks.push(result);
|
|
121
|
+
session.currentTask = undefined;
|
|
122
|
+
// Persist full history to file
|
|
123
|
+
await this.saveFullSession();
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* Save the full session history to progress file
|
|
127
|
+
*/
|
|
128
|
+
async saveFullSession() {
|
|
129
|
+
if (!this.session)
|
|
130
|
+
return;
|
|
131
|
+
const filePath = this.getProgressFilePath();
|
|
132
|
+
const dir = path.dirname(filePath);
|
|
133
|
+
await fs.mkdir(dir, { recursive: true });
|
|
134
|
+
const content = this.generateFullSessionMarkdown();
|
|
135
|
+
await fs.writeFile(filePath, content, 'utf-8');
|
|
136
|
+
debug(`Progress saved with ${this.session.completedTasks.length} task(s) to ${filePath}`);
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* Generate full session markdown with all task history
|
|
140
|
+
*/
|
|
141
|
+
generateFullSessionMarkdown() {
|
|
142
|
+
if (!this.session)
|
|
143
|
+
return '';
|
|
144
|
+
let md = `# Ralph Progress Log\n\n`;
|
|
145
|
+
md += `## Run Session\n\n`;
|
|
146
|
+
md += `- **Started**: ${formatDate(this.session.startTime)}\n`;
|
|
147
|
+
if (this.session.branch) {
|
|
148
|
+
md += `- **Branch**: ${this.session.branch}\n`;
|
|
149
|
+
}
|
|
150
|
+
if (this.session.totalTasks) {
|
|
151
|
+
md += `- **Total Tasks**: ${this.session.totalTasks}\n`;
|
|
152
|
+
}
|
|
153
|
+
md += `- **Completed**: ${this.session.completedTasks.length}\n`;
|
|
154
|
+
md += `- **Elapsed**: ${formatElapsed(this.session.startTime)}\n`;
|
|
155
|
+
md += `\n---\n\n`;
|
|
156
|
+
// Output all completed tasks with full iteration history
|
|
157
|
+
for (let i = 0; i < this.session.completedTasks.length; i++) {
|
|
158
|
+
const task = this.session.completedTasks[i];
|
|
159
|
+
if (!task)
|
|
160
|
+
continue;
|
|
161
|
+
const taskNum = i + 1;
|
|
162
|
+
const statusEmoji = task.status === 'completed' ? '✅' : task.status === 'stuck' ? '🔄' : '❌';
|
|
163
|
+
md += `## Task ${taskNum}: ${task.taskTitle}\n\n`;
|
|
164
|
+
md += `- **ID**: ${task.taskId}\n`;
|
|
165
|
+
md += `- **Status**: ${statusEmoji} ${task.status}\n`;
|
|
166
|
+
md += `- **Attempt**: ${task.attempt}\n`;
|
|
167
|
+
md += `- **Iterations**: ${task.iterationCount}\n`;
|
|
168
|
+
md += `- **Tokens Used**: ${task.tokensUsed.toLocaleString()}\n`;
|
|
169
|
+
md += `- **Started**: ${formatDate(task.startedAt)}\n`;
|
|
170
|
+
md += `- **Completed**: ${formatDate(task.completedAt)}\n`;
|
|
171
|
+
md += `- **Duration**: ${formatElapsed(task.startedAt, task.completedAt)}\n`;
|
|
172
|
+
if (task.summary) {
|
|
173
|
+
md += `- **Summary**: ${task.summary}\n`;
|
|
174
|
+
}
|
|
175
|
+
if (task.error) {
|
|
176
|
+
md += `- **Error**: ${task.error}\n`;
|
|
177
|
+
}
|
|
178
|
+
// Include iteration log for this task
|
|
179
|
+
if (task.iterations.length > 0) {
|
|
180
|
+
md += `\n### Iteration Log\n\n`;
|
|
181
|
+
for (const iter of task.iterations) {
|
|
182
|
+
md += this.formatIteration(iter);
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
md += `\n---\n\n`;
|
|
186
|
+
}
|
|
187
|
+
// Include current task if in progress
|
|
188
|
+
if (this.session.currentTask) {
|
|
189
|
+
const { taskNumber, state } = this.session.currentTask;
|
|
190
|
+
md += `## Task ${taskNumber}: ${state.task.title} (In Progress)\n\n`;
|
|
191
|
+
md += `- **ID**: ${state.task.id}\n`;
|
|
192
|
+
md += `- **Status**: 🔄 ${this.formatStatus(state.status)}\n`;
|
|
193
|
+
md += `- **Iterations**: ${state.iteration}/${this.maxIterations}\n`;
|
|
194
|
+
md += `- **Tokens Used**: ${state.tokensUsed.toLocaleString()}\n`;
|
|
195
|
+
md += `- **Started**: ${formatDate(state.startedAt)}\n`;
|
|
196
|
+
if (state.lastCheckpoint) {
|
|
197
|
+
md += `- **Last Checkpoint**: \`${state.lastCheckpoint}\`\n`;
|
|
198
|
+
}
|
|
199
|
+
if (state.iterations.length > 0) {
|
|
200
|
+
md += `\n### Iteration Log\n\n`;
|
|
201
|
+
for (const iter of state.iterations) {
|
|
202
|
+
md += this.formatIteration(iter);
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
return md;
|
|
42
207
|
}
|
|
43
208
|
/**
|
|
44
209
|
* Get the progress file path
|
|
@@ -97,6 +262,10 @@ export class ProgressTracker {
|
|
|
97
262
|
formatIteration(iter) {
|
|
98
263
|
const time = iter.startedAt.toLocaleTimeString();
|
|
99
264
|
const status = iter.success ? '✓' : '✗';
|
|
265
|
+
// Minimal verbosity: just iteration header and status
|
|
266
|
+
if (this.verbosity === 'minimal') {
|
|
267
|
+
return `#### Iteration ${iter.iteration} (${time}) ${status}\n\n`;
|
|
268
|
+
}
|
|
100
269
|
let md = `#### Iteration ${iter.iteration} (${time}) ${status}\n\n`;
|
|
101
270
|
md += `- **Tokens**: ${iter.tokensUsed.toLocaleString()}\n`;
|
|
102
271
|
if (iter.summary) {
|
|
@@ -109,6 +278,27 @@ export class ProgressTracker {
|
|
|
109
278
|
const duration = iter.endedAt.getTime() - iter.startedAt.getTime();
|
|
110
279
|
md += `- **Duration**: ${Math.floor(duration / 1000)}s\n`;
|
|
111
280
|
}
|
|
281
|
+
// Standard+ verbosity: include actions executed if available
|
|
282
|
+
if ((this.verbosity === 'standard' || this.verbosity === 'full') && iter.actions && iter.actions.length > 0) {
|
|
283
|
+
md += `\n**Actions**:\n`;
|
|
284
|
+
for (const action of iter.actions) {
|
|
285
|
+
const actionStatus = action.success ? '✓' : '✗';
|
|
286
|
+
md += `- ${actionStatus} \`[${action.type}]\``;
|
|
287
|
+
if (action.summary) {
|
|
288
|
+
// Truncate long summaries
|
|
289
|
+
const truncated = action.summary.length > 60
|
|
290
|
+
? action.summary.substring(0, 57) + '...'
|
|
291
|
+
: action.summary;
|
|
292
|
+
md += ` ${truncated}`;
|
|
293
|
+
}
|
|
294
|
+
md += '\n';
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
// Full verbosity only: include raw response
|
|
298
|
+
if (this.verbosity === 'full' && iter.rawResponse) {
|
|
299
|
+
md += `\n**Agent Response**:\n`;
|
|
300
|
+
md += `\`\`\`\n${iter.rawResponse}\n\`\`\`\n`;
|
|
301
|
+
}
|
|
112
302
|
md += `\n`;
|
|
113
303
|
return md;
|
|
114
304
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"progress-tracker.js","sourceRoot":"","sources":["../../src/core/progress-tracker.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAClC,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB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ACjB,IAAI,CAAC;gBACH,OAAO,GAAG,MAAM,EAAE,CAAC,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;YACjD,CAAC;YAAC,MAAM,CAAC;gBACP,yCAAyC;gBACzC,OAAO,GAAG,2CAA2C,CAAC;YACxD,CAAC;YAED,gDAAgD;YAChD,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAAC,EAAE,CAAC;gBACzC,OAAO,IAAI,qBAAqB,CAAC;YACnC,CAAC;YAED,8BAA8B;YAC9B,OAAO,IAAI,KAAK,CAAC;YAEjB,MAAM,EAAE,CAAC,SAAS,CAAC,QAAQ,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;YAC/C,KAAK,CAAC,4BAA4B,IAAI,CAAC,EAAE,OAAO,QAAQ,EAAE,CAAC,CAAC;QAC9D,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,KAAK,CAAC,iCAAiC,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QAC7F,CAAC;IACH,CAAC;CACF"}
|
|
@@ -25,18 +25,26 @@ export declare const EXECUTE_EXAMPLE = "[ACTION:EXECUTE]\ncommand: npm test";
|
|
|
25
25
|
* Example of ACTION:COMPLETE block
|
|
26
26
|
*/
|
|
27
27
|
export declare const COMPLETE_EXAMPLE = "[ACTION:COMPLETE]\nreason: All tests pass. Calculator implements addition, subtraction, multiplication, and division.";
|
|
28
|
+
/**
|
|
29
|
+
* Example of ACTION:STUCK block (for when task cannot be completed)
|
|
30
|
+
*/
|
|
31
|
+
export declare const STUCK_EXAMPLE = "[ACTION:STUCK]\nattempted: Tried 3 different approaches to fix the syntax error in case statement\nblocker: Bash case syntax requires specific quoting for * character that conflicts with shell expansion\nsuggestion: Consider using a different operator syntax or escaping approach - may need human review";
|
|
32
|
+
/**
|
|
33
|
+
* Example of COMMIT_MESSAGE block for git commit summaries
|
|
34
|
+
*/
|
|
35
|
+
export declare const COMMIT_MESSAGE_EXAMPLE = "[COMMIT_MESSAGE]\nAdd division operation with error handling\n[/COMMIT_MESSAGE]";
|
|
28
36
|
/**
|
|
29
37
|
* All examples combined for inclusion in prompts
|
|
30
38
|
*/
|
|
31
|
-
export declare const ALL_EXAMPLES = "\n### Example: Create a new file\n[ACTION:CREATE]\npath: src/calculator.sh\n```bash\n#!/bin/bash\n# Simple calculator\n\nnum1=$1\nop=$2\nnum2=$3\n\ncase $op in\n \"+\") echo $((num1 + num2)) ;;\n \"-\") echo $((num1 - num2)) ;;\n \"*\") echo $((num1 * num2)) ;;\n \"/\") echo $((num1 / num2)) ;;\nesac\n```\n\n### Example: Edit an existing file\n[ACTION:EDIT]\npath: src/calculator.sh\n[OLD]\ncase $op in\n \"+\") echo $((num1 + num2)) ;;\nesac\n[NEW]\ncase $op in\n \"+\") echo $((num1 + num2)) ;;\n \"-\") echo $((num1 - num2)) ;;\nesac\n\n### Example: Run a command to test\n[ACTION:EXECUTE]\ncommand: npm test\n\n### Example: Mark task complete\n[ACTION:COMPLETE]\nreason: All tests pass. Calculator implements addition, subtraction, multiplication, and division.\n";
|
|
39
|
+
export declare const ALL_EXAMPLES = "\n### Example: Create a new file\n[ACTION:CREATE]\npath: src/calculator.sh\n```bash\n#!/bin/bash\n# Simple calculator\n\nnum1=$1\nop=$2\nnum2=$3\n\ncase $op in\n \"+\") echo $((num1 + num2)) ;;\n \"-\") echo $((num1 - num2)) ;;\n \"*\") echo $((num1 * num2)) ;;\n \"/\") echo $((num1 / num2)) ;;\nesac\n```\n\n### Example: Edit an existing file\n[ACTION:EDIT]\npath: src/calculator.sh\n[OLD]\ncase $op in\n \"+\") echo $((num1 + num2)) ;;\nesac\n[NEW]\ncase $op in\n \"+\") echo $((num1 + num2)) ;;\n \"-\") echo $((num1 - num2)) ;;\nesac\n\n### Example: Run a command to test\n[ACTION:EXECUTE]\ncommand: npm test\n\n### Example: Mark task complete (ONLY when tests pass!)\n[ACTION:COMPLETE]\nreason: All tests pass. Calculator implements addition, subtraction, multiplication, and division.\n\n### Example: Report when stuck (be honest if you can't complete!)\n[ACTION:STUCK]\nattempted: Tried 3 different approaches to fix the syntax error in case statement\nblocker: Bash case syntax requires specific quoting for * character that conflicts with shell expansion\nsuggestion: Consider using a different operator syntax or escaping approach - may need human review\n\n### Example: Commit message for the iteration\n[COMMIT_MESSAGE]\nAdd division operation with error handling\n[/COMMIT_MESSAGE]\n";
|
|
32
40
|
/**
|
|
33
41
|
* Minimal examples (for context-constrained situations)
|
|
34
42
|
*/
|
|
35
|
-
export declare const MINIMAL_EXAMPLES = "\nExample CREATE:\n[ACTION:CREATE]\npath: file.sh\n```bash\n#!/bin/bash\necho \"Hello\"\n```\n\nExample EDIT:\n[ACTION:EDIT]\npath: file.sh\n[OLD]\necho \"Hello\"\n[NEW]\necho \"Hello World\"\n\nExample EXECUTE:\n[ACTION:EXECUTE]\ncommand: ./file.sh\n\nExample COMPLETE:\n[ACTION:COMPLETE]\nreason: Task done, tests pass\n";
|
|
43
|
+
export declare const MINIMAL_EXAMPLES = "\nExample CREATE:\n[ACTION:CREATE]\npath: file.sh\n```bash\n#!/bin/bash\necho \"Hello\"\n```\n\nExample EDIT:\n[ACTION:EDIT]\npath: file.sh\n[OLD]\necho \"Hello\"\n[NEW]\necho \"Hello World\"\n\nExample EXECUTE:\n[ACTION:EXECUTE]\ncommand: ./file.sh\n\nExample COMPLETE (only when tests pass!):\n[ACTION:COMPLETE]\nreason: Task done, tests pass\n\nExample STUCK (when you cannot complete):\n[ACTION:STUCK]\nattempted: Tried X approach\nblocker: Error Y prevents completion\nsuggestion: Try Z instead\n";
|
|
36
44
|
/**
|
|
37
45
|
* Format instructions for ACTION blocks
|
|
38
46
|
*/
|
|
39
|
-
export declare const FORMAT_INSTRUCTIONS = "## Output Format\n\nYou MUST respond using ONLY structured ACTION blocks. DO NOT write prose explanations.\n\nAvailable actions:\n\n**[ACTION:CREATE]** - Create a new file\n```\n[ACTION:CREATE]\npath: <relative file path>\n```<language>\n<file content>\n```\n```\n\n**[ACTION:EDIT]** - Modify an existing file \n```\n[ACTION:EDIT]\npath: <relative file path>\n[OLD]\n<exact text to find>\n[NEW]\n<replacement text>\n```\n\n**[ACTION:EXECUTE]** - Run a shell command\n```\n[ACTION:EXECUTE]\ncommand: <shell command>\n```\n\n**[ACTION:COMPLETE]** - Mark task as done (
|
|
47
|
+
export declare const FORMAT_INSTRUCTIONS = "## Output Format\n\nYou MUST respond using ONLY structured ACTION blocks. DO NOT write prose explanations.\n\nAvailable actions:\n\n**[ACTION:CREATE]** - Create a new file\n```\n[ACTION:CREATE]\npath: <relative file path>\n```<language>\n<file content>\n```\n```\n\n**[ACTION:EDIT]** - Modify an existing file \n```\n[ACTION:EDIT]\npath: <relative file path>\n[OLD]\n<exact text to find>\n[NEW]\n<replacement text>\n```\n\n**[ACTION:EXECUTE]** - Run a shell command\n```\n[ACTION:EXECUTE]\ncommand: <shell command>\n```\n\n**[ACTION:COMPLETE]** - Mark task as done (ONLY when all tests pass!)\n```\n[ACTION:COMPLETE]\nreason: <brief explanation of why task is complete>\n```\n\n**[ACTION:STUCK]** - Report inability to complete (be honest!)\n```\n[ACTION:STUCK]\nattempted: <what you tried>\nblocker: <what prevents completion>\nsuggestion: <what might help>\n```\n\n**[COMMIT_MESSAGE]** - Provide commit message for this iteration\n```\n[COMMIT_MESSAGE]\n<max 50 chars, imperative mood, specific>\n[/COMMIT_MESSAGE]\n```\n\n## Important Rules\n1. Use EXACT text for [OLD] blocks - must match file contents precisely\n2. Use [ACTION:EXECUTE] to run tests before marking complete\n3. Only use [ACTION:COMPLETE] when ALL tests pass with exit code 0\n4. Use [ACTION:STUCK] if you cannot complete - honesty is critical!\n5. One action per block - you can include multiple blocks\n6. Include a [COMMIT_MESSAGE] block to summarize what you did\n";
|
|
40
48
|
/**
|
|
41
49
|
* Get prompt examples based on model strength
|
|
42
50
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prompt-examples.d.ts","sourceRoot":"","sources":["../../src/core/prompt-examples.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH;;GAEG;AACH,eAAO,MAAM,cAAc,iSAgBpB,CAAC;AAER;;GAEG;AACH,eAAO,MAAM,YAAY,8MAUpB,CAAC;AAEN;;GAEG;AACH,eAAO,MAAM,cAAc,2CACL,CAAC;AAEvB;;GAEG;AACH,eAAO,MAAM,eAAe,wCACV,CAAC;AAEnB;;GAEG;AACH,eAAO,MAAM,gBAAgB,0HACsE,CAAC;AAEpG;;GAEG;AACH,eAAO,MAAM,YAAY,
|
|
1
|
+
{"version":3,"file":"prompt-examples.d.ts","sourceRoot":"","sources":["../../src/core/prompt-examples.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH;;GAEG;AACH,eAAO,MAAM,cAAc,iSAgBpB,CAAC;AAER;;GAEG;AACH,eAAO,MAAM,YAAY,8MAUpB,CAAC;AAEN;;GAEG;AACH,eAAO,MAAM,cAAc,2CACL,CAAC;AAEvB;;GAEG;AACH,eAAO,MAAM,eAAe,wCACV,CAAC;AAEnB;;GAEG;AACH,eAAO,MAAM,gBAAgB,0HACsE,CAAC;AAEpG;;GAEG;AACH,eAAO,MAAM,aAAa,oTAG0E,CAAC;AAErG;;GAEG;AACH,eAAO,MAAM,sBAAsB,oFAEjB,CAAC;AAEnB;;GAEG;AACH,eAAO,MAAM,YAAY,2yCAkBxB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,gBAAgB,0fA8B5B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,mBAAmB,q6CA2D/B,CAAC;AAEF;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,aAAa,EAAE,QAAQ,GAAG,QAAQ,GAAG,MAAM,GAAG,MAAM,CAcrF;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,QAAQ,GAAG,QAAQ,GAAG,MAAM,CAyB5E;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAGzD"}
|
|
@@ -54,6 +54,19 @@ command: npm test`;
|
|
|
54
54
|
*/
|
|
55
55
|
export const COMPLETE_EXAMPLE = `[ACTION:COMPLETE]
|
|
56
56
|
reason: All tests pass. Calculator implements addition, subtraction, multiplication, and division.`;
|
|
57
|
+
/**
|
|
58
|
+
* Example of ACTION:STUCK block (for when task cannot be completed)
|
|
59
|
+
*/
|
|
60
|
+
export const STUCK_EXAMPLE = `[ACTION:STUCK]
|
|
61
|
+
attempted: Tried 3 different approaches to fix the syntax error in case statement
|
|
62
|
+
blocker: Bash case syntax requires specific quoting for * character that conflicts with shell expansion
|
|
63
|
+
suggestion: Consider using a different operator syntax or escaping approach - may need human review`;
|
|
64
|
+
/**
|
|
65
|
+
* Example of COMMIT_MESSAGE block for git commit summaries
|
|
66
|
+
*/
|
|
67
|
+
export const COMMIT_MESSAGE_EXAMPLE = `[COMMIT_MESSAGE]
|
|
68
|
+
Add division operation with error handling
|
|
69
|
+
[/COMMIT_MESSAGE]`;
|
|
57
70
|
/**
|
|
58
71
|
* All examples combined for inclusion in prompts
|
|
59
72
|
*/
|
|
@@ -67,8 +80,14 @@ ${EDIT_EXAMPLE}
|
|
|
67
80
|
### Example: Run a command to test
|
|
68
81
|
${EXECUTE_EXAMPLE}
|
|
69
82
|
|
|
70
|
-
### Example: Mark task complete
|
|
83
|
+
### Example: Mark task complete (ONLY when tests pass!)
|
|
71
84
|
${COMPLETE_EXAMPLE}
|
|
85
|
+
|
|
86
|
+
### Example: Report when stuck (be honest if you can't complete!)
|
|
87
|
+
${STUCK_EXAMPLE}
|
|
88
|
+
|
|
89
|
+
### Example: Commit message for the iteration
|
|
90
|
+
${COMMIT_MESSAGE_EXAMPLE}
|
|
72
91
|
`;
|
|
73
92
|
/**
|
|
74
93
|
* Minimal examples (for context-constrained situations)
|
|
@@ -94,9 +113,15 @@ Example EXECUTE:
|
|
|
94
113
|
[ACTION:EXECUTE]
|
|
95
114
|
command: ./file.sh
|
|
96
115
|
|
|
97
|
-
Example COMPLETE:
|
|
116
|
+
Example COMPLETE (only when tests pass!):
|
|
98
117
|
[ACTION:COMPLETE]
|
|
99
118
|
reason: Task done, tests pass
|
|
119
|
+
|
|
120
|
+
Example STUCK (when you cannot complete):
|
|
121
|
+
[ACTION:STUCK]
|
|
122
|
+
attempted: Tried X approach
|
|
123
|
+
blocker: Error Y prevents completion
|
|
124
|
+
suggestion: Try Z instead
|
|
100
125
|
`;
|
|
101
126
|
/**
|
|
102
127
|
* Format instructions for ACTION blocks
|
|
@@ -132,17 +157,34 @@ path: <relative file path>
|
|
|
132
157
|
command: <shell command>
|
|
133
158
|
\`\`\`
|
|
134
159
|
|
|
135
|
-
**[ACTION:COMPLETE]** - Mark task as done (
|
|
160
|
+
**[ACTION:COMPLETE]** - Mark task as done (ONLY when all tests pass!)
|
|
136
161
|
\`\`\`
|
|
137
162
|
[ACTION:COMPLETE]
|
|
138
163
|
reason: <brief explanation of why task is complete>
|
|
139
164
|
\`\`\`
|
|
140
165
|
|
|
166
|
+
**[ACTION:STUCK]** - Report inability to complete (be honest!)
|
|
167
|
+
\`\`\`
|
|
168
|
+
[ACTION:STUCK]
|
|
169
|
+
attempted: <what you tried>
|
|
170
|
+
blocker: <what prevents completion>
|
|
171
|
+
suggestion: <what might help>
|
|
172
|
+
\`\`\`
|
|
173
|
+
|
|
174
|
+
**[COMMIT_MESSAGE]** - Provide commit message for this iteration
|
|
175
|
+
\`\`\`
|
|
176
|
+
[COMMIT_MESSAGE]
|
|
177
|
+
<max 50 chars, imperative mood, specific>
|
|
178
|
+
[/COMMIT_MESSAGE]
|
|
179
|
+
\`\`\`
|
|
180
|
+
|
|
141
181
|
## Important Rules
|
|
142
182
|
1. Use EXACT text for [OLD] blocks - must match file contents precisely
|
|
143
183
|
2. Use [ACTION:EXECUTE] to run tests before marking complete
|
|
144
|
-
3. Only use [ACTION:COMPLETE] when
|
|
145
|
-
4.
|
|
184
|
+
3. Only use [ACTION:COMPLETE] when ALL tests pass with exit code 0
|
|
185
|
+
4. Use [ACTION:STUCK] if you cannot complete - honesty is critical!
|
|
186
|
+
5. One action per block - you can include multiple blocks
|
|
187
|
+
6. Include a [COMMIT_MESSAGE] block to summarize what you did
|
|
146
188
|
`;
|
|
147
189
|
/**
|
|
148
190
|
* Get prompt examples based on model strength
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prompt-examples.js","sourceRoot":"","sources":["../../src/core/prompt-examples.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG;;;;;;;;;;;;;;;;OAgBvB,CAAC;AAER;;GAEG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG;;;;;;;;;;KAUvB,CAAC;AAEN;;GAEG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG;sBACR,CAAC;AAEvB;;GAEG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG;kBACb,CAAC;AAEnB;;GAEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG;mGACmE,CAAC;AAEpG;;GAEG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG;;EAE1B,cAAc;;;EAGd,YAAY;;;EAGZ,eAAe;;;EAGf,gBAAgB;
|
|
1
|
+
{"version":3,"file":"prompt-examples.js","sourceRoot":"","sources":["../../src/core/prompt-examples.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG;;;;;;;;;;;;;;;;OAgBvB,CAAC;AAER;;GAEG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG;;;;;;;;;;KAUvB,CAAC;AAEN;;GAEG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG;sBACR,CAAC;AAEvB;;GAEG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG;kBACb,CAAC;AAEnB;;GAEG;AAC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CAAC,QAAQ,CAAC;QAC7B,UAAU,CAAC,QAAQ,CAAC,MAAM,CAAC,EAC3B,CAAC;QACD,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,iDAAiD;IACjD,IACE,UAAU,CAAC,QAAQ,CAAC,aAAa,CAAC;QAClC,UAAU,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAC7B,CAAC;QACD,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,uCAAuC;IACvC,qEAAqE;IACrE,OAAO,MAAM,CAAC;AAChB,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,mBAAmB,CAAC,KAAa;IAC/C,MAAM,QAAQ,GAAG,gBAAgB,CAAC,KAAK,CAAC,CAAC;IACzC,OAAO,iBAAiB,CAAC,QAAQ,CAAC,CAAC;AACrC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ghcralph",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
4
4
|
"description": "GitHub Copilot Ralph - A cross-platform CLI for running autonomous agentic coding loops using the Ralph Wiggum pattern with GitHub Copilot",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -77,6 +77,7 @@
|
|
|
77
77
|
"dependencies": {
|
|
78
78
|
"@github/copilot-sdk": "^0.1.17",
|
|
79
79
|
"@octokit/rest": "^22.0.1",
|
|
80
|
+
"async-mutex": "^0.5.0",
|
|
80
81
|
"chalk": "^5.6.2",
|
|
81
82
|
"commander": "^14.0.2",
|
|
82
83
|
"glob": "^13.0.0",
|